当前位置: 首页>>代码示例>>PHP>>正文


PHP addInput函数代码示例

本文整理汇总了PHP中addInput函数的典型用法代码示例。如果您正苦于以下问题:PHP addInput函数的具体用法?PHP addInput怎么用?PHP addInput使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了addInput函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: addressbook_inp_field

/**
 * Make an input field
 * @param string $label
 * @param string $field
 * @param string $name
 * @param string $size
 * @param array $values
 * @param string $add
 */
function addressbook_inp_field($label, $field, $name, $size, $values, $add)
{
    global $color;
    $value = isset($values[$field]) ? $values[$field] : '';
    $td_str = addInput($name . '[' . $field . ']', $value, $size) . $add;
    return html_tag('tr', html_tag('td', $label . ':', 'right', $color[4]) . html_tag('td', $td_str, 'left', $color[4])) . "\n";
}
开发者ID:jprice,项目名称:EHCP,代码行数:16,代码来源:addressbook.php

示例2: execute

 function execute()
 {
     $Id = __post("Id");
     if ((int) $Id > 0) {
         $token = __post("token");
         $data = $this->getListDetail($Id);
         foreach ($data as $key => $value) {
             ${$key} = $value;
         }
     }
     $list_form = new XTemplate('Config/HospitalAdd.html');
     $arr_info_province_id = $this->getListProvince();
     $Attr_province_id = array('rel' => '{Require:\'R\',Alert:\'Vui lòng chọn tỉnh thành \'}', 'style' => '');
     $txt_province_id = addSelectList2('province_id', $arr_info_province_id, NULL, $Attr_province_id, $list_form, $province_id);
     $arr_info_status = array(1 => 'Active', 0 => 'InActive');
     $Attr_status = array('rel' => '{Require:\'R\',Alert:\'Vui lòng chọn trạng thái \'}', 'style' => '');
     $txt_status = addSelectList2('status', $arr_info_status, NULL, $Attr_status, $list_form, $status);
     $Attr_pstname = array('rel' => '{Require:\'R\',Alert:\'Vui lòng nhập tên bệnh viện \'}', 'style' => 'width:200px;');
     $txt_pstname = addInput('text', 'name', $name, $Attr_pstname, $list_form);
     $Attr_pstorder = array('style' => '');
     $txt_pstorder = addInput('text', 'order', $order, $Attr_pstorder, $list_form);
     $list_form->assign('Id', $Id);
     $list_form->assign('token', $token);
     $list_form->parse('main');
     $html = $list_form->out_return('main');
     die($html);
 }
开发者ID:congtt,项目名称:pj.ntk,代码行数:27,代码来源:HospitalAdd.php

示例3: foreach

            $editfield = '';
            $i = 0;
            foreach ($data['value'] as $k => $v) {
                if ($data['type'] == 'array_keyval') {
                    $editfield .= addInput("config_{$key}[{$i}][key]", $k, 0, 0, $extra);
                    $editfield .= addInput("config_{$key}[{$i}][val]", $v, 0, 0, $extra);
                } else {
                    $editfield .= addInput("config_{$key}[{$i}]", $v, 0, 0, $extra);
                }
                $editfield .= "<br />";
                $i++;
            }
            if ($data['type'] == 'array_keyval') {
                $editfield .= addInput("config_{$key}[{$i}][key]", '', 0, 0, $extra);
                $editfield .= addInput("config_{$key}[{$i}][val]", '', 0, 0, $extra);
            } else {
                $editfield .= addInput("config_{$key}[{$i}]", '', 0, 0, $extra);
            }
            break;
        default:
            $editfield = '';
            break;
    }
    // Ignore unknown datatypes
    if (empty($editfield)) {
        continue;
    }
    echo "<tr><td>" . htmlspecialchars(ucfirst(strtr($key, '_', ' '))) . "</td><td style=\"white-space: nowrap;\">" . $editfield . "</td><td>" . htmlspecialchars($data['desc']) . "</td></tr>\n";
}
echo "</tbody>\n</table>\n<p>" . addSubmit('Save', 'save') . addSubmit('Cancel', 'cancel', null, true, 'formnovalidate') . "</p>" . addEndForm();
require LIBWWWDIR . '/footer.php';
开发者ID:nya3jp,项目名称:domjudge,代码行数:31,代码来源:config.php

示例4: addRadioButton

    ?>
		<label for='data_0__mapping__0__extra__{id}__allow_submit_0'>no</label>
	</td>
	<td>
		<?php 
    echo addRadioButton("data[0][mapping][0][extra][{id}][allow_judge]", true, 1);
    ?>
		<label for='data_0__mapping__0__extra__{id}__allow_judge_1'>yes</label>
		<?php 
    echo addRadioButton("data[0][mapping][0][extra][{id}][allow_judge]", false, 0);
    ?>
		<label for='data_0__mapping__0__extra__{id}__allow_judge_0'>no</label>
	</td>
	<td>
		<?php 
    echo addInput("data[0][mapping][0][extra][{id}][color]", '{color}', 15, 25, 'class="color {required:false,adjust:false,hash:true,caps:false}"');
    ?>
	</td>
	<td>
		<?php 
    echo addInputField('number', "data[0][mapping][0][extra][{id}][lazy_eval_results]", '{lazy_eval_results}', ' min="0" max="1"');
    ?>
	</td>
</tr>
</script>
<table id="problems_table">
	<thead>
	<tr>
		<th>ID</th>
		<th>name</th>
		<th>short name</th>
开发者ID:nya3jp,项目名称:domjudge,代码行数:31,代码来源:contest.php

示例5: addInput

<tr><td><label for="data_0__name_">Description:</label></td>
<td><?php 
    echo addInput('data[0][name]', @$row['name'], 15, 255, 'required');
    ?>
</td></tr>

<tr><td><label for="data_0__sortorder_">Sort order:</label></td>
<td><?php 
    echo addInputField('number', 'data[0][sortorder]', empty($row['sortorder']) ? 0 : $row['sortorder'], ' size="3" maxlength="2"');
    ?>
</td></tr>

<tr><td><label for="data_0__color_">Colour:</label></td>
<td><?php 
    echo addInput('data[0][color]', @$row['color'], 15, 25, 'class="color {required:false,adjust:false,hash:true,caps:false}"');
    ?>
<a target="_blank"
href="http://www.w3schools.com/cssref/css_colornames.asp"><img
src="../images/b_help.png" class="smallpicto" alt="?" /></a></td></tr>

<tr><td>Visible:</td>
<td><?php 
    echo addRadioButton('data[0][visible]', !isset($row['visible']) || $row['visible'], 1);
    ?>
 <label for="data_0__visible_1">yes</label>
<?php 
    echo addRadioButton('data[0][visible]', isset($row['visible']) && !$row['visible'], 0);
    ?>
 <label for="data_0__visible_0">no</label></td></tr>
开发者ID:bertptrs,项目名称:domjudge,代码行数:29,代码来源:team_category.php

示例6: rejudgeForm

/**
 * Returns a form to rejudge all judgings based on a (table,id)
 * pair. For example, to rejudge all for language 'java', call
 * as rejudgeForm('language', 'java').
 */
function rejudgeForm($table, $id)
{
    $ret = addForm('rejudge.php') . addHidden('table', $table) . addHidden('id', $id);
    $button = 'REJUDGE this submission';
    $question = "Rejudge submission s{$id}?";
    $disabled = false;
    $allbutton = false;
    // special case submission
    if ($table == 'submission') {
        // disable the form button if there are no valid judgings anyway
        // (nothing to rejudge) or if the result is already correct
        global $DB;
        $validresult = $DB->q('MAYBEVALUE SELECT result FROM judging WHERE
		                       submitid = %i AND valid = 1', $id);
        if (IS_ADMIN) {
            if (!$validresult) {
                $question = "Restart judging of PENDING submission s{$id}, " . 'are you sure?';
                $button = 'RESTART judging';
            } elseif ($validresult == 'correct') {
                $question = "Rejudge CORRECT submission s{$id}, " . 'are you sure?';
            }
        } else {
            if (!$validresult || $validresult == 'correct') {
                $disabled = true;
            }
        }
    } else {
        $button = "REJUDGE ALL for {$table} {$id}";
        $question = "Rejudge all submissions for this {$table}?";
        if (IS_ADMIN) {
            $allbutton = true;
        }
    }
    $ret .= '<input type="submit" value="' . htmlspecialchars($button) . '" ' . ($disabled ? 'disabled="disabled"' : 'onclick="return confirm(\'' . htmlspecialchars($question) . '\');"') . " />\n" . ($allbutton ? addCheckBox('include_all') . '<label for="include_all">include pending/correct submissions</label>' : '') . addCheckBox('full_rejudge') . '<label for="full_rejudge">create rejudging with reason: </label>' . addInput('reason', '', 0, 255) . addEndForm();
    return $ret;
}
开发者ID:retnan,项目名称:domjudge,代码行数:41,代码来源:common.jury.php

示例7: requireAdmin

    requireAdmin();
    $DB->q('UPDATE judgehost SET active = %i', isset($_POST['cmd-activate']) ? 1 : 0);
    auditlog('judgehost', null, 'marked all ' . (isset($_POST['cmd-activate']) ? 'active' : 'inactive'));
}
if ($cmd == 'add' || $cmd == 'edit') {
    requireAdmin();
    $restrictions = $DB->q('KEYVALUETABLE SELECT restrictionid, name
	                        FROM judgehost_restriction ORDER BY restrictionid');
    $restrictions = array(null => '-- No restrictions --') + $restrictions;
    echo addForm('edit.php');
    ?>
<script type="text/template" id="judgehost_template">
<tr>
	<td>
		<?php 
    echo addInput("data[{id}][hostname]", null, 20, 50, 'pattern="[A-Za-z0-9._-]+"');
    ?>
	</td>
	<td>
		<?php 
    echo addSelect("data[{id}][active]", array(1 => 'yes', 0 => 'no'), '1', true);
    ?>
	</td>
	<td>
		<?php 
    echo addSelect("data[{id}][restrictionid]", $restrictions, null, true);
    ?>
	</td>
</tr>
</script>
<?php 
开发者ID:nya3jp,项目名称:domjudge,代码行数:31,代码来源:judgehosts.php

示例8: addTextArea

    echo addTextArea('data[0][comments]', @$row['comments']);
    ?>
</td></tr>

<?php 
    $num_contests = $DB->q("VALUE SELECT COUNT(*) FROM contest c WHERE c.public = 0");
    if ($num_contests > 0) {
        $prepopulate = $DB->q("TABLE SELECT c.cid AS id, c.name, c.shortname,\n\t                       CONCAT(c.name, ' (', c.shortname, ' - c', c.cid, ')') AS search\n\t                       FROM contest c INNER JOIN contestteam USING (cid)\n\t                       WHERE teamid = %i", $id);
        ?>

<!-- contest selection -->
<tr>
	<td>Private contests:</td>
	<td>
		<?php 
        echo addInput('data[0][mapping][0][items]', '', 50);
        ?>
		<script type="text/javascript">
			$(function() {
				$('#data_0__mapping__0__items_').tokenInput('ajax_contests.php?public=0', {
					propertyToSearch: 'search',
					hintText: 'Type to search for contest ID, name, or short name',
					noResultsText: 'No private contests found',
					preventDuplicates: true,
					excludeCurrent: true,
					prePopulate: <?php 
        echo json_encode($prepopulate);
        ?>
				});
			});
		</script>
开发者ID:sponi78,项目名称:domjudge,代码行数:31,代码来源:team.php

示例9: compose_Header

/* --- End functions --- */
if ($compose_new_win == '1') {
    compose_Header($color, $mailbox);
} else {
    displayPageHeader($color, $mailbox);
}
/* Initialize addressbook */
$abook = addressbook_init();
echo '<br />' . html_tag('table', html_tag('tr', html_tag('td', '<b>' . _("Address Book Search") . '</b>', 'center', $color[0])), 'center', '', 'width="95%" cellpadding="2" cellspacing="2" border="0"');
/* Search form */
echo '<center>' . html_tag('table', '', 'center', '', 'border="0"') . html_tag('tr') . html_tag('td', '', 'left', '', 'nowrap valign="middle"') . "\n" . addForm($PHP_SELF . '?html_addr_search=true', 'post', 'f') . "\n<center>\n" . '  <nobr><strong>' . _("Search for") . "</strong>\n";
addr_insert_hidden();
if (!isset($addrquery)) {
    $addrquery = '';
}
echo addInput('addrquery', $addrquery, 26);
/* List all backends to allow the user to choose where to search */
if (!isset($backend)) {
    $backend = '';
}
if ($abook->numbackends > 1) {
    echo '<strong>' . _("in") . '</strong>&nbsp;';
    $selopts['-1'] = _("All address books");
    $ret = $abook->get_backend_list();
    while (list($undef, $v) = each($ret)) {
        $selopts[$v->bnum] = $v->sname;
    }
    echo addSelect('backend', $selopts, $backend, TRUE);
} else {
    echo addHidden('backend', '-1');
}
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:31,代码来源:addrbook_search_html.php

示例10: addFileField

    }
    echo "</script>\n\n";
    ?>
<h3>Create new testcase</h3>

<table>
<tr><td>Input testdata: </td><td><?php 
    echo addFileField('add_input');
    ?>
</td></tr>
<tr><td>Output testdata:</td><td><?php 
    echo addFileField('add_output');
    ?>
</td></tr>
<tr><td>Sample testcase:</td><td><?php 
    echo addSelect('add_sample', array("no", "yes"), 0, true);
    ?>
</td></tr>
<tr><td>Description:    </td><td><?php 
    echo addInput('add_desc', '', 30);
    ?>
</td></tr>
<tr><td>Image:          </td><td><?php 
    echo addFileField('add_image');
    ?>
</td></tr>
</table>
<?php 
    echo "<br />" . addSubmit('Submit all changes') . addEndForm();
}
require LIBWWWDIR . '/footer.php';
开发者ID:nya3jp,项目名称:domjudge,代码行数:31,代码来源:testcase.php

示例11: displayHtmlHeader

    @(include $theme[$theme_default]['PATH']);
}
displayHtmlHeader("{$org_name} - " . _("Login"), $header, FALSE);
echo "<body text=\"{$color['8']}\" bgcolor=\"{$color['4']}\" link=\"{$color['7']}\" vlink=\"{$color['7']}\" alink=\"{$color['7']}\" onLoad=\"squirrelmail_loginpage_onload()\">" . "\n" . '<form action="redirect.php" method="post" onSubmit="document.forms[0].js_autodetect_results.value=\'' . SMPREF_JS_ON . '\';">' . "\n";
$username_form_name = 'login_username';
$password_form_name = 'secretkey';
do_hook('login_top');
$loginname_value = sqGetGlobalVar('loginname', $loginname) ? htmlspecialchars($loginname) : '';
/* If they don't have a logo, don't bother.. */
if (isset($org_logo) && $org_logo) {
    /* Display width and height like good little people */
    $width_and_height = '';
    if (isset($org_logo_width) && is_numeric($org_logo_width) && $org_logo_width > 0) {
        $width_and_height = " width=\"{$org_logo_width}\"";
    }
    if (isset($org_logo_height) && is_numeric($org_logo_height) && $org_logo_height > 0) {
        $width_and_height .= " height=\"{$org_logo_height}\"";
    }
}
if (sqgetGlobalVar('mailto', $mailto)) {
    $rcptaddress = addHidden('mailto', $mailto);
} else {
    $rcptaddress = '';
}
echo html_tag('table', html_tag('tr', html_tag('td', '<center>' . (isset($org_logo) && $org_logo ? '<img src="' . $org_logo . '" alt="' . sprintf(_("%s Logo"), $org_name) . '"' . $width_and_height . ' /><br />' . "\n" : '') . (isset($hide_sm_attributions) && $hide_sm_attributions ? '' : '<small>' . sprintf(_("SquirrelMail version %s"), $version) . '<br />' . "\n" . '  ' . _("By the SquirrelMail Development Team") . '<br /></small>' . "\n") . html_tag('table', html_tag('tr', html_tag('td', '<b>' . sprintf(_("%s Login"), $org_name) . "</b>\n", 'center', $color[0])) . html_tag('tr', html_tag('td', "\n" . html_tag('table', html_tag('tr', html_tag('td', _("Name:"), 'right', '', 'width="30%"') . html_tag('td', addInput($username_form_name, $loginname_value), 'left', '', 'width="*"')) . "\n" . html_tag('tr', html_tag('td', _("Password:"), 'right', '', 'width="30%"') . html_tag('td', addPwField($password_form_name) . addHidden('js_autodetect_results', SMPREF_JS_OFF) . $rcptaddress . addHidden('just_logged_in', '1'), 'left', '', 'width="*"')), 'center', $color[4], 'border="0" width="100%"'), 'left', $color[4])) . html_tag('tr', html_tag('td', '<center>' . addSubmit(_("Login")) . '</center>', 'left')), '', $color[4], 'border="0" width="350"') . '</center>', 'center')), '', $color[4], 'border="0" cellspacing="0" cellpadding="0" width="100%"');
do_hook('login_form');
echo '</form>' . "\n";
do_hook('login_bottom');
?>
</body></html>
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:30,代码来源:login.php

示例12: _

if (isset($vcard_nice['tel;cell'])) {
    $opts[$vcard_nice['tel;cell']] = _("Cellular Phone");
}
if (isset($vcard_nice['tel;fax'])) {
    $opts[$vcard_nice['tel;fax']] = _("Fax");
}
if (isset($vcard_nice['note'])) {
    $opts[$vcard_nice['note']] = _("Note");
}
/*
 * If the vcard comes with nothing but name and e-mail address, the user gets
 * the chance to type some additional info. If there's more info in the card,
 * the user gets to choose what will be added as additional info.
 */
if (count($opts) == 0) {
    echo addInput('addaddr[label]', '', '20');
} else {
    echo addSelect('addaddr[label]', $opts, '', TRUE);
}
?>
</td></tr>
<tr><td colspan="2" align="center"><br />
<?php 
echo addHidden('addaddr[firstname]', $vcard_safe['firstname']) . addHidden('addaddr[lastname]', $vcard_safe['lastname']) . addSubmit(_("Add to Address Book"), 'addaddr[SUBMIT]');
?>
</td></tr>
</table>
</form>
</td></tr>
<tr><td align="center">
<?php 
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:31,代码来源:vcard.php

示例13: OCTET_LENGTH

		               OCTET_LENGTH(zipfile) AS size
		               FROM executable
		               WHERE execid = %s', $id);
        echo addHidden('keydata[0][execid]', $row['execid']);
        echo specialchars($row['execid']);
    } else {
        echo "<tr><td><label for=\"data_0__execid_\">Executable ID:</label></td><td>";
        echo addInput('data[0][execid]', null, 8, 10, " required pattern=\"" . IDENTIFIER_CHARS . "+\"");
        echo " (alphanumerics only)";
    }
    echo "</td></tr>\n";
    // FIXME: unzip and show zip here
    ?>
<tr><td><label for="data_0__description_">Executable description:</label></td>
<td><?php 
    echo addInput('data[0][description]', @$row['description'], 30, 255, 'required');
    ?>
</td></tr>
<tr><td><label for="data_0__type_">Executable type:</label></td>
<td><?php 
    echo addSelect('data[0][type]', $executable_types, @$row['type'], True);
    ?>
</td></tr>
<tr><td>Content:     </td><td><a href="show_executable.php?edit_source=1&amp;id=<?php 
    echo specialchars($id);
    ?>
">edit file contents</a></td></tr>
</table>

<?php 
    echo addHidden('cmd', $cmd) . addHidden('table', 'executable') . addHidden('referrer', @$_GET['referrer']) . addSubmit('Save') . addSubmit('Cancel', 'cancel', null, true, 'formnovalidate') . addEndForm();
开发者ID:sponi78,项目名称:domjudge,代码行数:31,代码来源:executable.php

示例14: showInputForm

function showInputForm($session, $values = false)
{
    global $send_to, $send_to_cc, $body, $startMessage, $passed_body, $color, $use_signature, $signature, $prefix_sig, $editor_size, $editor_height, $attachments, $subject, $newmail, $use_javascript_addr_book, $send_to_bcc, $passed_id, $mailbox, $from_htmladdr_search, $location_of_buttons, $attachment_dir, $username, $data_dir, $identity, $idents, $draft_id, $delete_draft, $mailprio, $default_use_mdn, $mdn_user_support, $compose_new_win, $saved_draft, $mail_sent, $sig_first, $edit_as_new, $action, $username, $compose_messages, $composesession, $default_charset;
    $composeMessage = $compose_messages[$session];
    if ($values) {
        $send_to = $values['send_to'];
        $send_to_cc = $values['send_to_cc'];
        $send_to_bcc = $values['send_to_bcc'];
        $subject = $values['subject'];
        $mailprio = $values['mailprio'];
        $body = $values['body'];
        $identity = (int) $values['identity'];
    } else {
        $send_to = decodeHeader($send_to, true, false);
        $send_to_cc = decodeHeader($send_to_cc, true, false);
        $send_to_bcc = decodeHeader($send_to_bcc, true, false);
    }
    if ($use_javascript_addr_book) {
        echo "\n" . '<script language="JavaScript">' . "\n<!--\n" . 'function open_abook() { ' . "\n" . '  var nwin = window.open("addrbook_popup.php","abookpopup",' . '"width=670,height=300,resizable=yes,scrollbars=yes");' . "\n" . '  if((!nwin.opener) && (document.windows != null))' . "\n" . '    nwin.opener = document.windows;' . "\n" . "}\n" . "// -->\n</script>\n\n";
    }
    echo "\n" . '<form name="compose" action="compose.php" method="post" ' . 'enctype="multipart/form-data"';
    do_hook('compose_form');
    echo ">\n";
    echo addHidden('startMessage', $startMessage);
    if ($action == 'draft') {
        echo addHidden('delete_draft', $passed_id);
    }
    if (isset($delete_draft)) {
        echo addHidden('delete_draft', $delete_draft);
    }
    if (isset($session)) {
        echo addHidden('session', $session);
    }
    if (isset($passed_id)) {
        echo addHidden('passed_id', $passed_id);
    }
    if ($saved_draft == 'yes') {
        echo '<br /><center><b>' . _("Draft Saved") . '</center></b>';
    }
    if ($mail_sent == 'yes') {
        echo '<br /><center><b>' . _("Your Message has been sent.") . '</center></b>';
    }
    echo '<table align="center" cellspacing="0" border="0">' . "\n";
    if ($compose_new_win == '1') {
        echo '<table align="center" bgcolor="' . $color[0] . '" width="100%" border="0">' . "\n" . '   <tr><td></td>' . html_tag('td', '', 'right') . '<input type="button" name="Close" onClick="return self.close()" value="' . _("Close") . '" /></td></tr>' . "\n";
    }
    if ($location_of_buttons == 'top') {
        showComposeButtonRow();
    }
    /* display select list for identities */
    if (count($idents) > 1) {
        $ident_list = array();
        foreach ($idents as $id => $data) {
            $ident_list[$id] = $data['full_name'] . ' <' . $data['email_address'] . '>';
        }
        echo '   <tr>' . "\n" . html_tag('td', '', 'right', $color[4], 'width="10%"') . _("From:") . '</td>' . "\n" . html_tag('td', '', 'left', $color[4], 'width="90%"') . '         ' . addSelect('identity', $ident_list, $identity, TRUE);
        echo '      </td>' . "\n" . '   </tr>' . "\n";
    }
    echo '   <tr>' . "\n" . html_tag('td', '', 'right', $color[4], 'width="10%"') . _("To") . ':</td>' . "\n" . html_tag('td', '', 'left', $color[4], 'width="90%"') . addInput('send_to', $send_to, 60) . '<br />' . "\n" . '      </td>' . "\n" . '   </tr>' . "\n" . '   <tr>' . "\n" . html_tag('td', '', 'right', $color[4]) . _("Cc") . ':</td>' . "\n" . html_tag('td', '', 'left', $color[4]) . addInput('send_to_cc', $send_to_cc, 60) . '<br />' . "\n" . '      </td>' . "\n" . '   </tr>' . "\n" . '   <tr>' . "\n" . html_tag('td', '', 'right', $color[4]) . _("Bcc") . ':</td>' . "\n" . html_tag('td', '', 'left', $color[4]) . addInput('send_to_bcc', $send_to_bcc, 60) . '<br />' . "\n" . '      </td>' . "\n" . '   </tr>' . "\n" . '   <tr>' . "\n" . html_tag('td', '', 'right', $color[4]) . _("Subject") . ':</td>' . "\n" . html_tag('td', '', 'left', $color[4]) . "\n";
    echo '         ' . addInput('subject', $subject, 60) . '      </td>' . "\n" . '   </tr>' . "\n\n";
    if ($location_of_buttons == 'between') {
        showComposeButtonRow();
    }
    /* why this distinction? */
    if ($compose_new_win == '1') {
        echo '   <tr>' . "\n" . '      <td bgcolor="' . $color[0] . '" colspan="2" align="center">' . "\n" . '         <textarea name="body" id="body" rows="' . (int) $editor_height . '" cols="' . (int) $editor_size . '" wrap="virtual">';
    } else {
        echo '   <tr>' . "\n" . '      <td bgcolor="' . $color[4] . '" colspan="2">' . "\n" . '         &nbsp;&nbsp;<textarea name="body" id="body" rows="' . (int) $editor_height . '" cols="' . (int) $editor_size . '" wrap="virtual">';
    }
    if ($use_signature == true && $newmail == true && !isset($from_htmladdr_search)) {
        $signature = $idents[$identity]['signature'];
        if ($sig_first == '1') {
            if ($default_charset == 'iso-2022-jp') {
                echo "\n\n" . ($prefix_sig == true ? "-- \n" : '') . mb_convert_encoding($signature, 'EUC-JP');
            } else {
                echo "\n\n" . ($prefix_sig == true ? "-- \n" : '') . decodeHeader($signature, false, false);
            }
            echo "\n\n" . htmlspecialchars(decodeHeader($body, false, false));
        } else {
            echo "\n\n" . htmlspecialchars(decodeHeader($body, false, false));
            if ($default_charset == 'iso-2022-jp') {
                echo "\n\n" . ($prefix_sig == true ? "-- \n" : '') . mb_convert_encoding($signature, 'EUC-JP');
            } else {
                echo "\n\n" . ($prefix_sig == true ? "-- \n" : '') . decodeHeader($signature, false, false);
            }
        }
    } else {
        echo htmlspecialchars(decodeHeader($body, false, false));
    }
    echo '</textarea><br />' . "\n" . '      </td>' . "\n" . '   </tr>' . "\n";
    if ($location_of_buttons == 'bottom') {
        showComposeButtonRow();
    } else {
        echo '   <tr>' . "\n" . html_tag('td', '', 'right', '', 'colspan="2"') . "\n" . '         ' . addSubmit(_("Send"), 'send') . '         &nbsp;&nbsp;&nbsp;&nbsp;<br /><br />' . "\n" . '      </td>' . "\n" . '   </tr>' . "\n";
    }
    /* This code is for attachments */
    if ((bool) ini_get('file_uploads')) {
        /* Calculate the max size for an uploaded file.
         * This is advisory for the user because we can't actually prevent
         * people to upload too large files. */
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:101,代码来源:compose.php

示例15: html_tag

/* Choose correct colors for top and bottom frame */
if ($show == 'form' && !isset($listall)) {
    echo '<body text="' . $color[6] . '" bgcolor="' . $color[3] . '" ' . 'link="' . $color[6] . '" vlink="' . $color[6] . '" ' . 'alink="' . $color[6] . '" ' . 'OnLoad="document.sform.query.focus();">';
} else {
    echo '<body text="' . $color[8] . '" bgcolor="' . $color[4] . '" ' . 'link="' . $color[7] . '" vlink="' . $color[7] . '" ' . 'alink="' . $color[7] . "\">\n";
}
/* Empty search */
if (empty($query) && empty($show) && empty($listall)) {
    echo html_tag('p', '<br />' . _("No persons matching your search were found"), 'center') . "\n</body></html>\n";
    exit;
}
/* Initialize addressbook */
$abook = addressbook_init();
/* Create search form */
if ($show == 'form' && empty($listall)) {
    echo '<form name="sform" target="abookres" action="addrbook_search.php' . '" method="post">' . "\n" . html_tag('table', '', '', '', 'border="0" width="100%" height="100%"') . html_tag('tr') . html_tag('td', '  <strong>' . _("Search for") . "</strong>\n", 'left', '', 'nowrap valign="middle" width="10%"') . html_tag('td', '', 'left', '', '') . addInput('query', $query, 28);
    /* List all backends to allow the user to choose where to search */
    if ($abook->numbackends > 1) {
        echo '<strong>' . _("in") . '</strong>&nbsp;' . "\n";
        $selopts = array();
        $selopts['-1'] = _("All address books");
        $ret = $abook->get_backend_list();
        while (list($undef, $v) = each($ret)) {
            $selopts[$v->bnum] = $v->sname;
        }
        echo addSelect('backend', $selopts, '-1', TRUE);
    } else {
        echo addHidden('backend', '-1');
    }
    echo '</td></tr>' . html_tag('tr', html_tag('td', '', 'left') . html_tag('td', '<input type="submit" value="' . _("Search") . '" name="show" />' . '&nbsp;|&nbsp;<input type="submit" value="' . _("List all") . '" name="listall" />' . "\n" . '&nbsp;|&nbsp;<input type="button" value="' . _("Close") . '" onclick="parent.close();" />' . "\n", 'left')) . '</table></form>' . "\n";
} else {
开发者ID:jin255ff,项目名称:company_website,代码行数:31,代码来源:addrbook_search.php


注:本文中的addInput函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。