本文整理汇总了PHP中text_input函数的典型用法代码示例。如果您正苦于以下问题:PHP text_input函数的具体用法?PHP text_input怎么用?PHP text_input使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了text_input函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pCell
function pCell($item, $var, $format, $size = "", $nohelp = "")
{
$var = stripslashes($var);
$out = tda(gTxt($item), ' style="text-align:right;vertical-align:middle"');
switch ($format) {
case "radio":
$in = yesnoradio($item, $var);
break;
case "input":
$in = text_input($item, $var, $size);
break;
case "timeoffset":
$in = timeoffset_select($item, $var);
break;
case 'commentmode':
$in = commentmode($item, $var);
break;
case 'cases':
$in = cases($item, $var);
break;
case 'dateformats':
$in = dateformats($item, $var);
break;
case 'weeks':
$in = weeks($item, $var);
break;
case 'logging':
$in = logging($item, $var);
break;
case 'languages':
$in = languages($item, $var);
break;
case 'text':
$in = text($item, $var);
break;
case 'urlmodes':
$in = urlmodes($item, $var);
}
$out .= td($in);
$out .= $nohelp != 1 ? tda(popHelp($item), ' style="vertical-align:middle"') : td();
return tr($out);
}
示例2: rss_admin_editlink
function rss_admin_editlink($event, $step)
{
global $rss_ae_cookie;
include txpath . '/include/txp_prefs.php';
if (!isset($rss_ae_cookie)) {
$rss_ae_cookie = "rss_article_edit";
$rs = safe_insert('txp_prefs', "name='rss_ae_cookie', val='{$rss_ae_cookie}', prefs_id='1'");
}
if (gps("add")) {
safe_update("txp_prefs", "val = '" . addslashes(ps('rss_ae_cookie')) . "'", "name = 'rss_ae_cookie' and prefs_id ='1'");
setcookie($rss_ae_cookie, $rss_ae_cookie, time() + 31536000, "/");
header("Location: index.php?event=editlink");
} else {
if (gps("rem")) {
safe_update("txp_prefs", "val = '" . addslashes(ps('rss_ae_cookie')) . "'", "name = 'rss_ae_cookie' and prefs_id ='1'");
setcookie($rss_ae_cookie, $rss_ae_cookie, time() - 3600, "/");
header("Location: index.php?event=editlink");
}
}
pagetop("Edit Link");
$aeset = isset($_COOKIE[$rss_ae_cookie]) ? "" : " not";
$tdaStyle = ' style="text-align:right;vertical-align:middle"';
echo form(startTable("list") . tr(tdcs(hed("Add/Remove Public Site Article Edit Link", 1), 2)) . tr(tda(graf('Cookie ' . $rss_ae_cookie . ' is' . $aeset . ' set.', ' align="center"'), ' colspan="2"')) . tr(tda(gTxt('Cookie Name:'), ' style="text-align:right;vertical-align:middle"') . tda(text_input("rss_ae_cookie", $rss_ae_cookie, '20'), ' ')) . tr(tda(graf(fInput("submit", "add", gTxt("Add Edit Link"), "publish") . fInput("submit", "rem", gTxt("Remove Edit Link"), "publish") . eInput("editlink"), ' align="center"'), ' colspan="2"')) . endTable());
}
示例3: insert_db
insert_db('Caranille_Chat', array('Chat_Pseudo_ID' => $ID, 'Chat_Guild_ID' => $guild_ID, 'Chat_Message' => $Message));
// }
}
if (verif_access("Admin", true)) {
if (request_confirm('Chat-Clear')) {
//if(verifier_token(600, get_link('Chat','Guild') , 'guild-Chat-Send'))
//{
delete_db('Caranille_Chat', array('Chat_Guild_ID' => guild_data('Guild_ID')));
echo 'Tous les messages ont bien été supprimé';
//}
}
}
echo "<div id='guild-chat'>";
echo LanguageValidation::iMsg("intro.guild.chat");
echo '<br />';
echo '<iframe class="chatroom-frame" src="' . get_link('guild', 'Chat') . '"></iframe>';
echo formulaire_input(array(text_input("label.chat.message", "chat_Message", null, null, null, "placeholder.chat.message"), submit_input("Chat-Send", "btn.chat.send"), verif_access("Admin", true) ? submit_input("Chat-Clear", "btn.chat.clear") : null), "guild-Chat-Send", null, "post", null);
/**
echo '<form method="POST" action="'.get_link("Chat","Guild").'">';
echo '<input type="text" name="chat_Message" placeholder="'.LanguageValidation::nMsg("placeholder.chat.message").'"/>'.LanguageValidation::eMsg("placeholder.chat.message");
echo '<input type="submit" name="Chat-Send" value="'.LanguageValidation::nMsg("btn.chat.send").'"/>'.LanguageValidation::eMsg("btn.chat.send");
if(verif_access("Admin",true))
echo '<input type="submit" name="Clear" value="'.LanguageValidation::nMsg("btn.chat.clear").'"/>'.LanguageValidation::eMsg("btn.chat.clear");
echo '<input type="hidden" name="token" value="'.generer_token('guild-Chat-Send').'" />';
echo '</form>';
**/
echo "</div>";
}
}
示例4: form_entry
$helpdeskmail = '';
}
$tool_content .= "
<form class='form-horizontal' role='form' action='$_SERVER[SCRIPT_NAME]' method='post'>
<fieldset>" .
form_entry('urlForm', text_input('urlForm', 40), "$langSiteUrl (*)") .
form_entry('nameForm', text_input('nameForm', 40), "$langAdminName (*)") .
form_entry('emailForm', text_input('emailForm', 40), "$langAdminEmail (*)") .
form_entry('loginForm', text_input('loginForm', 40), "$langAdminLogin (*)") .
form_entry('passForm', text_input('passForm', 40), "$langAdminPass (*)") .
form_entry('campusForm', text_input('campusForm', 40), $langCampusName) .
form_entry('helpdeskForm', text_input('helpdeskForm', 40), $langHelpDeskPhone) .
form_entry('faxForm', text_input('faxForm', 40), $langHelpDeskFax) .
form_entry('helpdeskmail', text_input('helpdeskmail', 40), "$langHelpDeskEmail (**)") .
form_entry('institutionForm', text_input('institutionForm', 40), $langInstituteShortName) .
form_entry('institutionUrlForm', text_input('institutionUrlForm', 40), $langInstituteName) .
form_entry('postaddressForm', textarea_input('postaddressForm', 3, 40), $langInstitutePostAddress) .
form_entry('eclass_stud_reg',
selection_input(array('2' => $langDisableEclassStudRegType,
'1' => $langReqRegUser,
'0' => $langDisableEclassStudReg),
'eclass_stud_reg'),
"$langUserAccount $langViaeClass") .
form_entry('eclass_prof_reg',
selection_input(array('1' => $langReqRegProf,
'0' => $langDisableEclassProfReg),
'eclass_prof_reg'),
"$langProfAccount $langViaeClass") . "
<div class='form-group'>
<input type='submit' class='btn btn-default' name='install3' value='« $langPreviousStep'>
<input type='submit' class='btn btn-primary' name='install5' value='$langNextStep »'>
示例5: site_url
}
?>
<form role="form" method="post" name="pathfinder-form" id="pathfinder-form" action="<?php
echo site_url('/taxonomy/save/' . $type);
?>
">
<?php
echo create_bootstrap_input('text', 'name', array(), 'Term Name', '', '', isset($record->name) ? $record->name : '', '', 'Name of term', true);
echo create_bootstrap_input('text', 'description', array(), 'Description', '', '', isset($record->description) ? $record->description : '', '', 'Description/qualifier of term');
$weight_options = array();
for ($i = -50; $i < 51; $i++) {
$weight_options[$i] = $i;
}
echo create_bootstrap_input('select', 'weight', $weight_options, 'Weight', '', '', isset($record->weight) ? $record->weight : '', 'style="width: 75px;"', 'Weight for term');
?>
<input type="hidden" name="type" value="<?php
echo $type;
?>
" />
<?php
if (isset($update_ID)) {
echo text_input('hidden', 'update_ID', '', '', $update_ID);
echo text_input('button', 'cancel', 'btn btn-warning', '', 'Cancel', 'onclick="javascript: history.back()"');
echo ' ';
}
echo text_input('submit', 'save', 'btn btn-primary', '', 'Save Term');
?>
</form>
<?php
$main_content = ob_get_clean();
require './assets/themes/default/index.tpl.php';
示例6: form_begin
$given = $row['given'];
$patronym = $row['patronym'];
$toponym = $row['toponym'];
$surname = $row['surname'];
$occupation = $row['occupation'];
$epithet = $row['epithet'];
form_begin('person_insert', $_SERVER['PHP_SELF']);
hidden_input('posted', 1);
hidden_input('person', $person);
radio_gender($gender);
text_input("{$_Given}:", 50, 'given', $given);
text_input("{$_Patronym}:", 50, 'patronym', $patronym);
text_input("{$_Toponym}:", 50, 'toponym', $toponym);
text_input("{$_Surname}:", 50, 'surname', $surname);
text_input("{$_Occupation}:", 50, 'occupation', $occupation);
text_input("{$_Epithet}:", 50, 'epithet', $epithet);
form_submit();
form_end();
echo "</body>\n</html>\n";
} else {
$person = $_POST['person'];
$gender = $_POST['gender'];
$given = $_POST['given'];
$patronym = $_POST['patronym'];
$toponym = $_POST['toponym'];
$surname = $_POST['surname'];
$occupation = $_POST['occupation'];
$epithet = $_POST['epithet'];
pg_query("\n UPDATE\n persons\n SET\n last_edit = NOW(),\n gender = {$gender},\n given = '{$given}',\n patronym = '{$patronym}',\n toponym = '{$toponym}',\n surname = '{$surname}',\n occupation = '{$occupation}',\n epithet = '{$epithet}'\n WHERE\n person_id = {$person}\n ");
header("Location: {$app_root}/family.php?person={$person}");
}
示例7: fetch_row_assoc
echo "<h2>{$title}</h2>\n";
$rec = fetch_row_assoc("SELECT tag_fk, place_fk, event_date, date2text(sort_date) AS sd, event_note\n FROM events WHERE event_id = {$event}");
$note = note_from_db($rec['event_note']);
$notelen = strlen($note);
$notelen < 1000 ? $note_height = 5 : ($note_height = 20);
$note_width = 100;
form_begin('edit_event', $_SERVER['PHP_SELF']);
hidden_input('person', $person);
hidden_input('event', $event);
hidden_input('posted', 1);
select_tag($rec['tag_fk'], $person, $event);
select_place($rec['place_fk']);
date_input($rec['event_date'], $rec['sd']);
textarea_input("{$_Text}:<br />{$notelen}", $note_height, $note_width, 'event_note', $note);
source_input();
text_input("{$_Age}:", 10, 'age', '', "({$_Adds_birth_event})");
form_submit();
form_end();
echo "<h3>{$_Citations}</h3>\n";
$handle = pg_query("SELECT source_fk FROM event_citations WHERE event_fk = {$event}");
while ($row = pg_fetch_row($handle)) {
echo '<p>' . $row[0] . ' ';
echo fetch_val("SELECT get_source_text({$row['0']})");
echo "</p>\n";
}
echo "</body>\n</html>\n";
} else {
// do action
$src = $_POST['source_id'];
$txt = $_POST['source_text'];
if ($txt && fetch_val("SELECT is_leaf({$src})") == 't') {
示例8: gbp_array_text
function gbp_array_text($step, $value, $item = '')
{
switch (strtolower($step)) {
default:
case 'ui_in':
if (!is_array($value)) {
$value = array($value);
}
return text_input($item, implode(',', $value), 50);
break;
case 'ui_out':
return explode(',', $value);
break;
case 'db_set':
return implode(',', $value);
break;
case 'db_get':
return explode(',', $value);
break;
}
return '';
}
示例9: ob_start
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
$site_name_data = $this->Pathfinder_model->getConfig('site_name');
$contact_data = $this->Pathfinder_model->getConfig('content.contact');
$homepage_data = $this->Pathfinder_model->getConfig('content.homepage');
ob_start();
?>
<form role="form" method="post" name="pathfinder-form" id="pathfinder-form" action="<?php
echo site_url('/pathfinder/config/save');
?>
">
<?php
echo create_bootstrap_input('text', 'site_name', array(), 'Site name', '', '', isset($site_name_data['site_name']) ? $site_name_data['site_name'] : '', '', 'Name of this pathfinder site');
echo create_bootstrap_input('textarea', 'contact', array(), 'Contact Information', '', '', isset($contact_data['content.contact']['content']) ? $contact_data['content.contact']['content'] : '', '', 'Library/Librarian contact information');
echo create_bootstrap_input('textarea', 'homepage', array(), 'Homepage Information', '', '', isset($homepage_data['content.homepage']['content']) ? $homepage_data['content.homepage']['content'] : '', '', 'Information that appears on the homepage');
echo text_input('submit', 'save', 'btn btn-primary', '', 'Save Configuration');
?>
</form>
<?php
$main_content = ob_get_clean();
require './assets/themes/default/index.tpl.php';
示例10: get_link
<?php
if (verif_connect()) {
echo LanguageValidation::iMsg("intro.public.chat");
?>
<!--// chat_content -->
<iframe class="chatroom-frame" src="<?php
echo get_link('list', 'Chat');
?>
"></iframe>
<?php
echo formulaire_input(array(text_input("label.chat.message", "Message", null, null, null, "placeholder.chat.message"), submit_input("Send", "btn.chat.send"), verif_access("Admin", true) ? submit_input("Clear", "btn.chat.clear") : null), "Chat-Send", get_link('Chat', 'User'), "post", null);
}
示例11: form_begin
$tag_group = $tag_row['tag_group_fk'];
$tag_name = $tag_row['tag_name'];
$gedcom_tag = $tag_row['gedcom_tag'];
$tag_label = $tag_row['tag_label'];
$tag_type = $tag_row['tag_type_fk'];
}
require "./form_header.php";
echo "<h2>{$title}</h2>\n";
form_begin('tag_edit', $_SERVER['PHP_SELF']);
hidden_input('posted', 1);
hidden_input('tag', $tag);
select_tag_group($tag_group);
select_tag_type($tag_type);
text_input("GEDCOM :", 10, 'gedcom_tag', $gedcom_tag);
text_input("Tag name :", 80, 'tag_name', $tag_name);
text_input("Tag label:", 80, 'tag_label', $tag_label);
form_submit();
form_end();
echo "</body>\n</html>\n";
} else {
$tag = $_POST['tag'];
$tag_group = $_POST['tag_group'];
$tag_name = $_POST['tag_name'];
$gedcom_tag = $_POST['gedcom_tag'];
$tag_label = $_POST['tag_label'];
$tag_type = $_POST['tag_type'];
if (!$tag) {
// insert new tag
pg_query("BEGIN");
$tag = get_next('tag');
pg_query("\n INSERT INTO tags (\n tag_id,\n tag_group_fk,\n tag_type_fk,\n tag_name,\n gedcom_tag,\n tag_label\n )\n VALUES (\n {$tag},\n {$tag_group},\n {$tag_type},\n '{$tag_name}',\n '{$gedcom_tag}',\n '{$tag_label}'\n )\n ");
示例12: formulaire_input
<?php
if (empty($_POST['Delete']) && empty($_POST['Second_Delete'])) {
echo '<div id="login">';
/**
echo '<form method="POST" action="'.get_link('Delete_Account','User').'"><br />';
echo '<label for="Pseudo">Pseudo</label><input placeholder="Pseudo" type="text" name="Pseudo"><br /><br />';
echo '<label for="Password">Password</label><input placeholder="Mot de passe" type="password" name="Password"><br /><br />';
echo '<input type="submit" name="Second_Delete" value="Suppression">';
echo '<input type="hidden" name="token" value="'.generer_token("Delete_Account-step-1").'"/>';
echo '</form>';
**/
echo formulaire_input(array(text_input("label.login.pseudo", "Pseudo", null, null, null, "placeholder.login.pseudo"), password_input("label.login.password", "Password", null, null, null, "placeholder.login.password"), submit_input("Second_Delete", "btn.delete.account")), "Delete_Account-step-1", get_link('Delete', 'User'), "post", null);
echo '</div>';
}
if (request_confirm('Second_Delete')) {
// $Pseudo = htmlspecialchars(addslashes($_POST['Pseudo']));
// $Password = md5(htmlspecialchars(addslashes($_POST['Password'])));
if (verifier_token(600, get_link('Delete_Account'), 'Delete_Account-step-1')) {
extract(addslashes_r($_POST));
echo "Sans Regret ?<br />";
/** echo '<form method="POST" action="'.get_link('Delete','User').'">';
echo '<input type="hidden" name="Pseudo" value="'.$Pseudo.'"/>';
echo '<input type="hidden" name="Password" value="'.$Password.'"/>';
echo '<input type="submit" name="Back" value="Renoncer">';
echo '<input type="hidden" name="token" value="'.generer_token("Delete_Account-step-2").'"/>';
echo '<input type="submit" name="Delete" value="Suppression">';
echo '</form>';
**/
echo formulaire_input(array(hidden_input("Pseudo", $Pseudo), hidden_input("Password", $Password), submit_input("Back", "btn.back.account"), submit_input("Delete", "btn.delete.account")), "Delete_Account-step-2", get_link('Delete', 'User'), "post", null);
示例13: create_bootstrap_input2
function create_bootstrap_input2($type = 'text', $name, $options = array(), $label = ' ', $classes = '', $state = '', $default_value = '', $additional_attributes, $help = '', $required = false)
{
if ($required) {
$classes .= ' input-required';
$classes = trim($classes);
}
$output = '';
$output .= '<div class="form-group"><label for="' . $name . '" class="col-sm-2 control-label">' . $label . ($required ? ' <span class="required">*</span>' : '') . '</label>';
$output .= '<div class="col-sm-10">';
if ($type == 'textarea' || $type == 'longtext') {
$output .= textarea_input($name, $classes, $state, $default_value, $additional_attributes);
} else {
if ($type == 'select' || $type == 'dropdown') {
$output .= select_input($name, $options, $classes, $state, $default_value, $additional_attributes);
} else {
if ($type == 'checkbox') {
$output .= checkbox_input($options, $default_value);
} else {
if ($type == 'radio' || $type == 'switch') {
$output .= radio_input($options, $name, $default_value);
} else {
$output .= text_input($type, $name, $classes, $state, $default_value, $additional_attributes);
}
}
}
}
$output .= '<p class="help-block">' . $help . '</p></div>' . "\n";
$output .= '</div>' . "\n";
return $output;
}
示例14: q
$tool_content .= "\n <div class='alert alert-info'>{$langInfoLicence}</div>\n <form class='form-horizontal' role='form' action='{$_SERVER['SCRIPT_NAME']}' method='post'>\n <fieldset>\n <div class='form-group'>\n <pre class='pre-scrollable' style='col-sm-12'>" . q(wordwrap(file_get_contents('../info/license/gpl.txt'))) . "</pre>\n </div>\n <div class='form-group'>\n <div class='col-sm-12'>" . icon('fa-print') . " <a href='{$gpl_link}'>{$langPrintVers}</a></div>\n </div>\n <div class='form-group'>\n <div class='col-sm-10 col-offset-2 text-left'>\n <input type='submit' class='btn btn-default' name='install1' value='« {$langPreviousStep}'>\n <input type='submit' class='btn btn-primary' name='install3' value='{$langAccept}'>\n </div>\n </div>\n </fieldset>" . hidden_vars($all_vars) . "</form>";
draw($tool_content);
} elseif (isset($_POST['install3'])) {
$langStepTitle = $langDBSetting;
$langStep = $langStep3;
$_SESSION['step'] = 3;
$tool_content .= "\n <div class='alert alert-info'>{$langWillWrite} {$langDBSettingIntro}</div>\n <form class='form-horizontal' role='form' action='{$_SERVER['SCRIPT_NAME']}' method='post'>\n <fieldset>\n <div class='form-group'>\n\t <label for='dbHostForm' class='col-sm-2 control-label'>{$langdbhost}</label>\n <div class='col-sm-8'>" . text_input('dbHostForm', 25) . "</div>\n <div class='col-sm-2'>{$langEG} localhost</div>\n </div>\n <div class='form-group'>\n\t <label for='dbUsernameForm' class='col-sm-2 control-label'>{$langDBLogin}</label>\n <div class='col-sm-8'>" . text_input('dbUsernameForm', 25) . "</div>\n <div class='col-sm-2'>{$langEG} root</div>\n </div>\n <div class='form-group'>\n\t <label for='dbPassForm' class='col-sm-2 control-label'>{$langDBPassword}</label>\n <div class='col-sm-8'>" . text_input('dbPassForm', 25) . "</div>\n </div>\n <div class='form-group'>\n\t <label for='dbNameForm' class='col-sm-2 control-label'>{$langMainDB}</label>\n <div class='col-sm-8'>" . text_input('dbNameForm', 25) . "</div>\n <div class='col-sm-2'>{$langNeedChangeDB}</div>\n </div>\n <div class='form-group'>\n\t <label for='dbMyAdmin' class='col-sm-2 control-label'>{$langphpMyAdminURL}</label>\n <div class='col-sm-8'>" . text_input('dbMyAdmin', 25) . "</div>\n <div class='col-sm-2'>{$langOptional}</div>\n </div>\n <div class='form-group'>\n <input type='submit' class='btn btn-default' name='install2' value='« {$langPreviousStep}'>\n\t\t <input type='submit' class='btn btn-primary' name='install4' value='{$langNextStep} »'>\n </div>\n <div class='form-group'>\n <div class='col-sm-12'>{$langAllFieldsRequired}</div>\n </div>\n </fieldset>" . hidden_vars($all_vars) . "</form>";
draw($tool_content);
} elseif (isset($_POST['install4'])) {
$langStepTitle = $langBasicCfgSetting;
$langStep = $langStep4;
$_SESSION['step'] = 4;
if (empty($helpdeskmail)) {
$helpdeskmail = '';
}
$tool_content .= "\n <form class='form-horizontal' role='form' action='{$_SERVER['SCRIPT_NAME']}' method='post'>\n <fieldset>" . form_entry('urlForm', text_input('urlForm', 40), "{$langSiteUrl} (*)") . form_entry('nameForm', text_input('nameForm', 40), "{$langAdminName} (*)") . form_entry('emailForm', text_input('emailForm', 40), "{$langAdminEmail} (*)") . form_entry('loginForm', text_input('loginForm', 40), "{$langAdminLogin} (*)") . form_entry('passForm', text_input('passForm', 40), "{$langAdminPass} (*)") . form_entry('campusForm', text_input('campusForm', 40), $langCampusName) . form_entry('helpdeskForm', text_input('helpdeskForm', 40), $langHelpDeskPhone) . form_entry('faxForm', text_input('faxForm', 40), $langHelpDeskFax) . form_entry('helpdeskmail', text_input('helpdeskmail', 40), "{$langHelpDeskEmail} (**)") . form_entry('institutionForm', text_input('institutionForm', 40), $langInstituteShortName) . form_entry('institutionUrlForm', text_input('institutionUrlForm', 40), $langInstituteName) . form_entry('postaddressForm', textarea_input('postaddressForm', 3, 40), $langInstitutePostAddress) . form_entry('eclass_stud_reg', selection_input(array('2' => $langDisableEclassStudRegType, '1' => $langReqRegUser, '0' => $langDisableEclassStudReg), 'eclass_stud_reg'), "{$langUserAccount} {$langViaeClass}") . form_entry('eclass_prof_reg', selection_input(array('1' => $langReqRegProf, '0' => $langDisableEclassProfReg), 'eclass_prof_reg'), "{$langProfAccount} {$langViaeClass}") . "\n <div class='form-group'>\n <input type='submit' class='btn btn-default' name='install3' value='« {$langPreviousStep}'>\n\t\t <input type='submit' class='btn btn-primary' name='install5' value='{$langNextStep} »'>\n </div>\n <div class='form-group'>\n <div class='col-sm-12'>{$langRequiredFields}</div>\n\t <div class='col-sm-12'>(**) {$langWarnHelpDesk}</div></td>\n </div>\n </fieldset>" . hidden_vars($all_vars) . "</form>";
draw($tool_content);
} elseif (isset($_POST['install5'])) {
$langStepTitle = $langLastCheck;
$langStep = $langStep5;
$_SESSION['step'] = 5;
switch ($eclass_stud_reg) {
case '0':
$disable_eclass_stud_reg_info = $langDisableEclassStudRegYes;
break;
case '1':
$disable_eclass_stud_reg_info = $langDisableEclassStudRegViaReq;
break;
case '2':
$disable_eclass_stud_reg_info = $langDisableEclassStudRegNo;
break;
示例15: text_input
if (!preg_match("/^[a-zA-Z ]+\$/", $username)) {
$usernameErr = "只能为字母或者空格";
}
}
if (empty($_POST['email'])) {
$emailErr = "邮箱不能为空";
} else {
$email = text_input($_POST['email']);
if (!preg_match("/([\\w\\-]+\\@[\\w\\-]+\\.[\\w\\-]+)/", $email)) {
$emailErr = "请你输入合格的邮箱地址";
}
}
if (empty($_POST['website'])) {
$website = "";
} else {
$website = text_input($_POST['website']);
if (!preg_match("/\\b(?:(?:https?|ftp):\\/\\/|www\\.)[-a-z0-9+&#\\/%\\/?=~_|!:,.;]*[-a-z0-9+&@#\\/%#=~_|]/i", $website)) {
$websiteErr = "请输入合格的网址";
}
}
if (empty($_POST['usercomment'])) {
$usercomment = '';
} else {
$usercomment = text_input($_POST['usercomment']);
}
if (empty($_POST['sex'])) {
$sexErr = "性别不能为空";
} else {
$sex = text_input($_POST['sex']);
}
}