本文整理汇总了PHP中getinput函数的典型用法代码示例。如果您正苦于以下问题:PHP getinput函数的具体用法?PHP getinput怎么用?PHP getinput使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getinput函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getsquadname
}
if ($ds['warmember']) {
$fight = '<select name="war[' . $ds['sqmID'] . ']"><option value="1" selected="selected">' . $_language->module['yes'] . '</option><option value="0">' . $_language->module['no'] . '</option></select>';
} else {
$fight = '<select name="war[' . $ds['sqmID'] . ']"><option value="1">' . $_language->module['yes'] . '</option><option value="0" selected="selected">' . $_language->module['no'] . '</option></select>';
}
$squads .= '<tr>
<td colspan="2"><hr /></td>
</tr>
<tr>
<td><b>' . $_language->module['squad'] . '</b></td>
<td><b>' . getsquadname($ds['squadID']) . '</b></td>
</tr>
<tr>
<td><b>' . $_language->module['position'] . '</b></td>
<td><input type="text" name="position[' . $ds['sqmID'] . ']" value="' . getinput($ds['position']) . '" size="60" />' . $activity . '</td>
</tr>
<tr>
<td><b>' . $_language->module['access_rights'] . '</b></td>
<td>' . $_language->module['joinus_admin'] . ': ' . $join . ' ' . $_language->module['fightus_admin'] . ': ' . $fight . '</td>
</tr>';
}
}
if (isnewsadmin($id)) {
$news = '<input type="checkbox" name="newsadmin" value="1" onmouseover="showWMTT(\'id1\')" onmouseout="hideWMTT()" checked="checked" />';
} else {
$news = '<input type="checkbox" name="newsadmin" value="1" onmouseover="showWMTT(\'id1\')" onmouseout="hideWMTT()" />';
}
if (isnewswriter($id)) {
$newswriter = '<input type="checkbox" name="newswriter" value="1" onmouseover="showWMTT(\'id2\')" onmouseout="hideWMTT()" checked="checked" />';
} else {
示例2: explode
$td = 'td1';
} else {
$td = 'td2';
}
$games = explode(";", $db['games']);
$games = implode(", ", $games);
if ($games) {
$games = "(" . $games . ")";
}
if ($db['gamesquad']) {
$type = $_language->module['gaming_squad'] . '<br /><small>' . $games . '</small>';
} else {
$type = $_language->module['non_gaming_squad'];
}
echo '<tr>
<td class="' . $td . '"><a href="../players" target="_blank">' . getinput($db['name']) . '</a></td>
<td class="' . $td . '" align="center">' . $type . '</td>
<td class="' . $td . '">' . cleartext($db['info'], 1, 'admin') . '</td>
<td class="' . $td . '" align="center"><input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=squads&action=edit&squadID=' . $db['squadID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
<input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'admincenter.php?site=squads&delete=true&squadID=' . $db['squadID'] . '&captcha_hash=' . $hash . '\')" value="' . $_language->module['delete'] . '" /></td>
<td class="' . $td . '" align="center"><select name="sort[]">';
for ($j = 1; $j <= $anzsquads; $j++) {
if ($db['sort'] == $j) {
echo '<option value="' . $db['squadID'] . '-' . $j . '" selected="selected">' . $j . '</option>';
} else {
echo '<option value="' . $db['squadID'] . '-' . $j . '">' . $j . '</option>';
}
}
echo '</select>
</td>
</tr>';
示例3: while
echo $clanwars_head;
$n = 1;
while ($ds = mysql_fetch_array($ergebnis)) {
if ($n % 2) {
$bg1 = BG_1;
$bg2 = BG_2;
} else {
$bg1 = BG_3;
$bg2 = BG_4;
}
$date = date("d.m.y", $ds['date']);
$squad = '<a href="index.php?site=clanwars&action=showonly&id=' . $ds['squad'] . '&page=' . $page . '&sort=game&type=' . $type . '&only=squad"><b>' . $ds['squadname'] . '</b></a>';
$league = '<a href="' . getinput($ds['leaguehp']) . '" target="_blank">' . $ds['league'] . '</a>';
$oppcountry = "[flag]" . $ds['oppcountry'] . "[/flag]";
$country = flags($oppcountry);
$opponent = '<a href="' . getinput($ds['opphp']) . '" target="_blank"><b>' . $ds['opptag'] . '</b></a>';
$hometeam = $ds['hometeam'];
$oppteam = $ds['oppteam'];
$server = $ds['server'];
if (file_exists('images/games/' . $ds['game'] . '.gif')) {
$pic = $ds['game'] . '.gif';
}
$game = '<a href="index.php?site=clanwars&action=showonly&id=' . $ds['game'] . '&page=' . $page . '&sort=game&type=' . $type . '&only=game"><img src="images/games/' . $pic . '" width="13" height="13" border="0" alt="" /></a>';
$homescr = array_sum(unserialize($ds['homescore']));
$oppscr = array_sum(unserialize($ds['oppscore']));
if ($homescr > $oppscr) {
$results = '<font color="' . $wincolor . '">' . $homescr . ':' . $oppscr . '</font>';
} elseif ($homescr < $oppscr) {
$results = '<font color="' . $loosecolor . '">' . $homescr . ':' . $oppscr . '</font>';
} else {
$results = '<font color="' . $drawcolor . '">' . $homescr . ':' . $oppscr . '</font>';
示例4: safe_query
}
$ergebnis = safe_query("SELECT * FROM `" . PREFIX . "imprint`");
$ds = mysql_fetch_array($ergebnis);
$CAPCLASS = new Captcha();
$CAPCLASS->create_transaction();
$hash = $CAPCLASS->get_hash();
$_language->read_module('bbcode', true);
eval("\$addbbcode = \"" . gettemplate("addbbcode", "html", "admin") . "\";");
eval("\$addflags = \"" . gettemplate("flags_admin", "html", "admin") . "\";");
echo '<script language="JavaScript" type="text/javascript">
<!--
function chkFormular() {
if(!validbbcode(document.getElementById(\'message\').value, \'admin\')){
return false;
}
}
-->
</script>';
echo '<form method="post" id="post" name="post" action="admincenter.php?site=imprint" onsubmit="return chkFormular();">
<input type="radio" name="type" value="0" ' . $type0 . ' /> ' . $_language->module['automatic'] . '<br />
<input type="radio" name="type" value="1" ' . $type1 . ' /> ' . $_language->module['manual'] . '<br /><br /><b>' . $_language->module['imprint'] . '</b><br /><small>' . $_language->module['you_can_use_html'] . '</small><br /><br />';
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">' . $addbbcode . '</td>
<td valign="top">' . $addflags . '</td>
</tr>
</table>';
echo '<br /><textarea id="message" name="message" rows="30" cols="" style="width: 100%;">' . getinput($ds['imprint']) . '</textarea><br /><br /><input type="hidden" name="captcha_hash" value="' . $hash . '" />
<input type="submit" name="submit" value="' . $_language->module['update'] . '" />
</form>';
}
示例5: cleartext
echo '<tr>
<td class="td_head" colspan="3"><b>' . $ds['faqcatname'] . '</b>
<br /><small>' . cleartext($ds['description'], 1, 'admin') . '</small></td>
</tr>';
$faq = safe_query("SELECT * FROM " . PREFIX . "faq WHERE faqcatID='{$ds['faqcatID']}' ORDER BY sort");
$anzfaq = safe_query("SELECT count(faqID) FROM " . PREFIX . "faq WHERE faqcatID='{$ds['faqcatID']}'");
$anzfaq = mysql_result($anzfaq, 0);
$i = 1;
while ($db = mysql_fetch_array($faq)) {
if ($i % 2) {
$td = 'td1';
} else {
$td = 'td2';
}
echo '<tr>
<td class="' . $td . '"><b>- ' . getinput($db['question']) . '</b></td>
<td class="' . $td . '" align="center"><input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=faq&action=edit&faqID=' . $db['faqID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
<input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'admincenter.php?site=faq&delete=true&faqID=' . $db['faqID'] . '&captcha_hash=' . $hash . '\')" value="' . $_language->module['delete'] . '" /></td>
<td class="' . $td . '" align="center"><select name="sortfaq[]">';
for ($j = 1; $j <= $anzfaq; $j++) {
if ($db['sort'] == $j) {
echo '<option value="' . $db['faqID'] . '-' . $j . '" selected="selected">' . $j . '</option>';
} else {
echo '<option value="' . $db['faqID'] . '-' . $j . '">' . $j . '</option>';
}
}
echo '</select></td>
</tr>';
$i++;
}
}
示例6: htmlspecialchars
$server = htmlspecialchars($ds['server']);
$hltv = htmlspecialchars($ds['hltv']);
$banner = $ds['banner'];
$linkpage = htmlspecialchars($ds['linkpage']);
$report = htmlspecialchars($ds['report']);
$linkpage = htmlspecialchars($ds['linkpage']);
// map-output, v1.0
$map = unserialize($ds['maps']);
$theHomeScore = unserialize($ds['homescore']);
$theOppScore = unserialize($ds['oppscore']);
$i = 0;
for ($i = 0; $i < count($map); $i++) {
$maps .= '
<tr>
<td width="15%"><input type="hidden" name="map_id[]" value="' . $i . '" />map #' . ($i + 1) . '</td>
<td width="25%"><input type="text" name="map_name[]" value="' . getinput($map[$i]) . '" size="35" /></td>
<td width="20%"><input type="text" name="map_result_home[]" value="' . $theHomeScore[$i] . '" size="3" /></td>
<td width="20%"><input type="text" name="map_result_opp[]" value="' . $theOppScore[$i] . '" size="3" /></td>
<td width="25%"><input type="checkbox" name="delete[' . $i . ']" value="1" /> ' . $_language->module['delete'] . '</td>
</tr>';
unset($mapname);
}
$gamesquads = safe_query("SELECT * FROM " . PREFIX . "squads WHERE gamesquad='1' ORDER BY sort");
while ($dq = mysql_fetch_array($gamesquads)) {
$hometeam .= '<option value="0">' . $dq['name'] . '</option>';
$squadmembers = safe_query("SELECT * FROM " . PREFIX . "squads_members WHERE squadID='{$dq['squadID']}' ORDER BY sort");
while ($dm = mysql_fetch_array($squadmembers)) {
$hometeam .= '<option value="' . $dm['userID'] . '"> - ' . getnickname($dm['userID']) . '</option>';
}
$hometeam .= '<option value="0"> </option>';
}
示例7: getinput
$td = 'td1';
} else {
$td = 'td2';
}
$ds['displayed'] == 1 ? $displayed = '<font color="green"><b>' . $_language->module['yes'] . '</b></font>' : ($displayed = '<font color="red"><b>' . $_language->module['no'] . '</b></font>');
if (stristr($ds['bannerurl'], 'http://')) {
$bannerurl = '<a href="' . getinput($ds['bannerurl']) . '" target="_blank">' . getinput($ds['bannerurl']) . '</a>';
} else {
$bannerurl = '<a href="http://' . getinput($ds['bannerurl']) . '" target="_blank">' . getinput($ds['bannerurl']) . '</a>';
}
$days = round((time() - $ds['date']) / (60 * 60 * 24));
if ($days) {
$perday = round($ds['hits'] / $days, 2);
} else {
$perday = $ds['hits'];
}
echo '<tr>
<td class="' . $td . '">' . getinput($ds['bannername']) . '</td>
<td class="' . $td . '">' . $bannerurl . '</td>
<td class="' . $td . '">' . $ds['hits'] . ' (' . $perday . ')</td>
<td class="' . $td . '" align="center">' . $displayed . '</td>
<td class="' . $td . '" align="center"><input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=bannerrotation&action=edit&bannerID=' . $ds['bannerID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
<input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'admincenter.php?site=bannerrotation&delete=true&bannerID=' . $ds['bannerID'] . '&captcha_hash=' . $hash . '\')" value="' . $_language->module['delete'] . '" /></td>
</tr>';
$i++;
}
} else {
echo '<tr><td class="td1" colspan="5">' . $_language->module['no_entries'] . '</td></tr>';
}
echo '</table></form>';
}
示例8: mysql_fetch_array
$bg1 = BG_1;
$ds = mysql_fetch_array($ergebnis);
$admincomment = getinput($ds['admincomment']);
eval("\$title_guestbook = \"" . gettemplate("title_guestbook") . "\";");
echo $title_guestbook;
eval("\$addbbcode = \"" . gettemplate("addbbcode") . "\";");
eval("\$guestbook_comment = \"" . gettemplate("guestbook_comment") . "\";");
echo $guestbook_comment;
} elseif ($action == 'add') {
$_language->read_module('guestbook');
$_language->read_module('bbcode', true);
$message = '';
if (isset($_GET['messageID'])) {
if (is_numeric($_GET['messageID'])) {
$ds = mysql_fetch_array(safe_query("SELECT comment, name FROM `" . PREFIX . "guestbook` WHERE gbID='" . $_GET['messageID'] . "'"));
$message = '[quote=' . $ds['name'] . ']' . getinput($ds['comment']) . '[/quote]';
}
}
eval("\$addbbcode = \"" . gettemplate("addbbcode") . "\";");
$bg1 = BG_1;
if (isset($_GET['error'])) {
if ($_GET['error'] == "captcha") {
$error = $_language->module['error_captcha'];
} else {
$error = $_language->module['enter_a_message'];
}
} else {
$error = null;
}
if ($loggedin) {
eval("\$guestbook_loggedin = \"" . gettemplate("guestbook_loggedin") . "\";");
示例9: str_replace
echo $search_result;
$i++;
}
} else {
echo str_replace("%min_chars%", $search_min_len, $_language->module['too_short']);
}
} else {
echo $_language->module['wrong_securitycode'];
}
} else {
if (!isset($_GET['site'])) {
header("Location: index.php?site=search");
}
$_language->read_module('search');
if (isset($_REQUEST['text'])) {
$text = getinput($_REQUEST['text']);
} else {
$text = '';
}
eval("\$title_search = \"" . gettemplate("title_search") . "\";");
echo $title_search;
$bg1 = BG_1;
if ($userID) {
eval("\$search_form = \"" . gettemplate("search_form_loggedin") . "\";");
echo $search_form;
} else {
$CAPCLASS = new Captcha();
$captcha = $CAPCLASS->create_captcha();
$hash = $CAPCLASS->get_hash();
$CAPCLASS->clear_oldcaptcha();
eval("\$search_form = \"" . gettemplate("search_form_notloggedin") . "\";");
示例10: safe_query
<td width="25%" class="title"><b>' . $_language->module['actions'] . '</b></td>
</tr>';
$ds = safe_query("SELECT * FROM " . PREFIX . "countries ORDER BY country");
$anz = mysql_num_rows($ds);
if ($anz) {
$i = 1;
$CAPCLASS = new Captcha();
$CAPCLASS->create_transaction();
$hash = $CAPCLASS->get_hash();
while ($flags = mysql_fetch_array($ds)) {
if ($i % 2) {
$td = 'td1';
} else {
$td = 'td2';
}
$pic = '<img src="../images/flags/' . $flags['short'] . '.gif" border="0" alt="' . $flags['country'] . '" />';
echo '<tr>
<td class="' . $td . '" align="center">' . $pic . '</td>
<td class="' . $td . '">' . getinput($flags['country']) . '</td>
<td class="' . $td . '" align="center">' . getinput($flags['short']) . '</td>
<td class="' . $td . '" align="center"><input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=countries&action=edit&countryID=' . $flags['countryID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
<input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'admincenter.php?site=countries&delete=true&countryID=' . $flags['countryID'] . '&captcha_hash=' . $hash . '\')" value="' . $_language->module['delete'] . '" /></td>
</tr>';
$i++;
}
} else {
echo '<tr><td class="td1" colspan="5">' . $_language->module['no_entries'] . '</td></tr>';
}
echo '</table>
</form>';
}
示例11: explode
$td = 'td1';
} else {
$td = 'td2';
}
$games = explode(";", $db['games']);
$games = implode(", ", $games);
if ($games) {
$games = "(" . $games . ")";
}
if ($db['gamesquad']) {
$type = $_language->module['gaming_squad'] . '<br /><small>' . $games . '</small>';
} else {
$type = $_language->module['non_gaming_squad'];
}
echo '<tr>
<td class="' . $td . '"><a href="../index.php?site=squads&squadID=' . $db['squadID'] . '" target="_blank">' . getinput($db['name']) . '</a></td>
<td class="' . $td . '" align="center">' . $type . '</td>
<td class="' . $td . '">' . cleartext($db['info'], 1, 'admin') . '</td>
<td class="' . $td . '" align="center"><input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=squads&action=edit&squadID=' . $db['squadID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
<input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'admincenter.php?site=squads&delete=true&squadID=' . $db['squadID'] . '&captcha_hash=' . $hash . '\')" value="' . $_language->module['delete'] . '" /></td>
<td class="' . $td . '" align="center"><select name="sort[]">';
for ($j = 1; $j <= $anzsquads; $j++) {
if ($db['sort'] == $j) {
echo '<option value="' . $db['squadID'] . '-' . $j . '" selected="selected">' . $j . '</option>';
} else {
echo '<option value="' . $db['squadID'] . '-' . $j . '">' . $j . '</option>';
}
}
echo '</select>
</td>
</tr>';
示例12: safe_query
</form>';
} else {
echo '<h1>¤ News Category</h1>';
echo '<input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=news_category&action=add\');return document.MM_returnValue" value="New Category" /><br /><br />';
$ergebnis = safe_query("SELECT * FROM " . PREFIX . "news_category ORDER BY category");
echo '<table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#DDDDDD">
<tr>
<td width="10%" class="title"><b>CategoryID</b></td>
<td width="40%" class="title"><b>Category Name</b></td>
<td width="20%" class="title"><b>Options</b></td>
</tr>';
$CAPCLASS = new Captcha();
$CAPCLASS->create_transaction();
$hash = $CAPCLASS->get_hash();
$i = 1;
while ($ds = mysql_fetch_array($ergebnis)) {
if ($i % 2) {
$td = 'td1';
} else {
$td = 'td2';
}
echo '<tr>
<td class="' . $td . '" align="center">' . $ds['categoryID'] . '</td>
<td class="' . $td . '">' . getinput($ds['category']) . '</td>
<td class="' . $td . '" align="center"><input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=news_category&action=edit&categoryID=' . $ds['categoryID'] . '\');return document.MM_returnValue" value="Edit" />
<input type="button" onclick="MM_confirm(\'Are you sure you wanna delete?\', \'admincenter.php?site=news_category&delete=true&categoryID=' . $ds['categoryID'] . '&captcha_hash=' . $hash . '\')" value="Delete" /></td>
</tr>';
$i++;
}
echo '</table>';
}
示例13: getuserlanguage
function getuserlanguage($userID)
{
$ds = mysql_fetch_array(safe_query("SELECT language FROM " . PREFIX . "user WHERE userID='" . $userID . "'"));
return getinput($ds['language']);
}
示例14: getinput
</tr>
<tr>
<td><b><?php
echo $_language->module['admin_name'];
?>
</b></td>
<td><input type="text" name="admname" value="<?php
echo getinput($ds['adminname']);
?>
" size="35" onmouseover="showWMTT('id5')" onmouseout="hideWMTT()" /></td>
<td><b><?php
echo $_language->module['admin_email'];
?>
</b></td>
<td><input type="text" name="admmail" value="<?php
echo getinput($ds['adminemail']);
?>
" size="35" onmouseover="showWMTT('id6')" onmouseout="hideWMTT()" /></td>
</tr>
</table>
<br /><br />
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td colspan="2"><b><?php
echo $_language->module['additional_options'];
?>
:</b></td>
</tr>
<tr>
<td>• <a href="admincenter.php?site=lock"><b><?php
echo $_language->module['pagelock'];
示例15: safe_query
$ergebnis = safe_query("SELECT * FROM " . PREFIX . "contact ORDER BY sort");
$anz = safe_query("SELECT count(contactID) FROM " . PREFIX . "contact");
$anz = mysql_result($anz, 0);
$i = 1;
$CAPCLASS = new Captcha();
$CAPCLASS->create_transaction();
$hash = $CAPCLASS->get_hash();
while ($ds = mysql_fetch_array($ergebnis)) {
if ($i % 2) {
$td = 'td1';
} else {
$td = 'td2';
}
echo '<tr>
<td class="' . $td . '">' . getinput($ds['name']) . '</td>
<td class="' . $td . '">' . getinput($ds['email']) . '</td>
<td class="' . $td . '" align="center"><input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=contact&action=edit&contactID=' . $ds['contactID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
<input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'admincenter.php?site=contact&delete=true&contactID=' . $ds['contactID'] . '&captcha_hash=' . $hash . '\')" value="' . $_language->module['delete'] . '" /></td>
<td class="' . $td . '" align="center"><select name="sortcontact[]">';
for ($n = 1; $n <= $anz; $n++) {
if ($ds['sort'] == $n) {
echo '<option value="' . $ds['contactID'] . '-' . $n . '" selected="selected">' . $n . '</option>';
} else {
echo '<option value="' . $ds['contactID'] . '-' . $n . '">' . $n . '</option>';
}
}
echo '</select></td>
</tr>';
$i++;
}
echo '<tr>