本文整理汇总了PHP中create_form函数的典型用法代码示例。如果您正苦于以下问题:PHP create_form函数的具体用法?PHP create_form怎么用?PHP create_form使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了create_form函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: validate_form
function validate_form($fields)
{
$errors = false;
foreach ($fields as $key => $value) {
if (empty($value)) {
echo $key . " Required" . "<br />";
array_push($errors, $key);
$errors = true;
}
}
if ($errors) {
echo 'create form';
create_form();
} else {
$recipient = 'info@carbecco.com';
$subject = 'Site Submission';
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$body = $GLOBALS['report'];
if (mail($recipient, $subject, $body)) {
success();
}
}
}
示例2: create_container
$container = create_container('alliance_treaties_processing.php', '');
$container['alliance_id'] = $alliance->getAllianceID();
$container['alliance_id_1'] = $db->getField('alliance_id_1');
$container['aa'] = $db->getField('aa_access');
$container['alliance_name'] = $temp[$db->getField('alliance_id_1')];
$container['accept'] = true;
$PHP_OUTPUT .= create_button($container, 'Accept');
$container['accept'] = false;
$PHP_OUTPUT .= ' ';
$PHP_OUTPUT .= create_button($container, 'Reject');
$PHP_OUTPUT .= '<br /><br />';
}
$template->assign('PageTopic', 'Offer A Treaty');
$PHP_OUTPUT .= 'Select the alliance you wish to offer a treaty.<br /><small>Note: Treaties require 24 hours to be canceled once in effect</small><br />';
$container = create_container('skeleton.php', 'alliance_treaties_processing.php');
$container['alliance_id'] = $alliance->getAllianceID();
$form = create_form($container, 'Send the Offer');
$PHP_OUTPUT .= $form['form'];
$PHP_OUTPUT .= '<select name="proposedAlliance" id="InputFields">';
foreach ($temp as $allId => $allName) {
$PHP_OUTPUT .= '<option value="' . $allId . '">' . $allName . '</option>';
}
$PHP_OUTPUT .= '</select';
$PHP_OUTPUT .= '<br />Choose the treaty terms<br />';
$PHP_OUTPUT .= create_table();
foreach ($types as $checkName => $displayInfo) {
$PHP_OUTPUT .= '<tr><td>' . $displayInfo[0] . '<br /><small>' . $displayInfo[1] . '</small></td><td><input type="checkbox" name="' . $checkName . '"></td></tr>';
}
$PHP_OUTPUT .= '<tr><td colspan="2">';
$PHP_OUTPUT .= $form['submit'];
$PHP_OUTPUT .= '</td></tr></table></form></div>';
示例3: create_form
<a href="editpics.php?album={$CLEAN['album']}" class="admin_menu">{$lang_modifyalb_php['edit_files']}</a>
-
<a href="index.php?cat={$ALBUM_DATA['category']}" class="admin_menu">{$lang_modifyalb_php['parent_category']}</a>
-
<a href="thumbnails.php?album={$CLEAN['album']}" class="admin_menu">{$lang_modifyalb_php['thumbnail_view']}</a>
</td>
<td class="tableh2" align="right">
{$album_lb}
</td>
</tr>
<form method="post" name="modifyalbum" id="cpgform" action="db_input.php">
<input type="hidden" name="event" value="album_update" />
<input type="hidden" name="aid" value="{$CLEAN['album']}" />
EOT;
create_form($data);
echo <<<EOT
<tr>
<td colspan="2" align="left" class="tablef">
EOT;
if (GALLERY_ADMIN_MODE) {
printf($lang_modifyalb_php['notice1'], '<a href="groupmgr.php">', '</a>');
} else {
printf($lang_modifyalb_php['notice1'], '', '');
}
echo <<<EOT
</td>
</tr>
<tr>
<td colspan="2" align="center" class="tablef">
<input type="submit" class="button" value="{$lang_modifyalb_php['update']}" />
示例4: pageheader
}
}
}
}
pageheader($lang_minicms['minicms']);
msg_box($lang_minicms['minicms'], $lang_minicms['page_success'], $lang_common['continue'], 'index.php');
}
pagefooter();
exit;
}
pageheader($lang_minicms['minicms']);
$signature = 'Coppermine Photo Gallery ' . COPPERMINE_VERSION . ' (' . COPPERMINE_VERSION_STATUS . ')';
//echo "<form action=\"$PHP_SELF\" method=\"post\">";
echo "<form action=\"" . $CPG_PHP_SELF . '?file=minicms/cms_config' . "\" method=\"post\">";
starttable('100%', "{$lang_minicms['minicms']} - {$signature}", 2);
create_form($lang_minicms_config);
echo '</table></td></tr>';
echo <<<EOT
<tr>
<td align="left" class="tablef">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td width="67%" align="center">
<input type="submit" class="button" name="update_config" value="{$lang_common['continue']}" />
</td>
</tr>
</table>
</td>
</tr>
EOT;
示例5: array
<html>
<head>
<title>XML demo 3: RSS News Viewer</title>
<link rel="stylesheet" type="text/css" href="css/baseA.css" />
</head>
<body>
<?php
$feeds = array('http://rss.nytimes.com/services/xml/rss/nyt/Space.xml', 'http://www.usa.gov/rss/updates.xml', 'http://www.nasa.gov/rss/dyn/image_of_the_day.rss', 'http://cscilab.bc.edu/~csinsider/?feed=rss2', 'http://www.newyorker.com/feed/humor');
print_r($_GET);
?>
<h1>RSS Feeds</h1>
<?php
create_form($feeds, "feed");
if (isset($_GET['getfeed'])) {
handle_form($_GET['feed']);
}
?>
</body>
</html>
<?php
function handle_form($myfeed)
{
$rss = simplexml_load_file($myfeed);
$title = $rss->channel->title;
echo "<h1>{$title}</h1>";
# I would like to do this:
# foreach ($rss->channel->item as $item) {
# or this:
# foreach ($rss->item as $item) {
# but which one depends on the rss version in use.
$items = $rss->channel->item;
示例6: while
$PHP_OUTPUT .= $form['form'];
$PHP_OUTPUT .= '<table class="standard"><tr><th>Option</th><th>Name</th><th>Game ID</th>';
while ($db->nextRecord()) {
$row = $db->getRow();
$PHP_OUTPUT .= '<tr>';
$PHP_OUTPUT .= '<td class="center shrink"><input type="checkbox" name="entry_ids[]" value="' . $row['entry_id'] . '"></td>';
$PHP_OUTPUT .= '<td>' . $row['player_name'] . '</td>';
$PHP_OUTPUT .= '<td>' . $row['game_id'] . '</td>';
$PHP_OUTPUT .= '</tr>';
}
$PHP_OUTPUT .= '</table><br />';
$PHP_OUTPUT .= $form['submit'];
$PHP_OUTPUT .= '</form><br />';
} else {
$PHP_OUTPUT .= 'You are currently accepting all communications.<br />';
}
$PHP_OUTPUT .= '<br /><h2>Blacklist Player</h2><br />';
$container = array();
$container['url'] = 'message_blacklist_add.php';
$form = create_form($container, 'Blacklist');
$PHP_OUTPUT .= $form['form'];
$PHP_OUTPUT .= '
<table cellspacing="0" cellpadding="0" class="nobord nohpad">
<tr>
<td class="top">Name: </td>
<td class="mb"><input type="text" name="PlayerName" size="30"></td>
</tr>
</table><br />
';
$PHP_OUTPUT .= $form['submit'];
$PHP_OUTPUT .= '</form>';
示例7: while
while ($db->nextRecord()) {
$row = $db->getRow();
$PHP_OUTPUT .= '<tr>';
$PHP_OUTPUT .= '<td class="center shrink"><input type="checkbox" name="word_ids[]" value="' . $row['word_id'] . '"></td>';
$PHP_OUTPUT .= '<td>' . $row['word_value'] . '</td>';
$PHP_OUTPUT .= '<td>' . $row['word_replacement'] . '</td>';
$PHP_OUTPUT .= '</tr>';
}
$PHP_OUTPUT .= '</table><br />';
$PHP_OUTPUT .= $form['submit'];
$PHP_OUTPUT .= '</form><br />';
}
$PHP_OUTPUT .= '<h2>Add Word To Filter</h2><br />';
$container = array();
$container['url'] = 'word_filter_add.php';
$form = create_form($container, 'Add');
$PHP_OUTPUT .= $form['form'];
$PHP_OUTPUT .= '
<table cellspacing="0" cellpadding="0" class="nobord nohpad">
<tr>
<td class="top">Word: </td>
<td class="mb"><input type="text" name="Word" size="30"></td>
</tr>
<tr>
<td class="top">Replacement: </td>
<td class="mb"><input type="text" name="WordReplacement" size="30"></td>
</tr>
</table><br />
';
$PHP_OUTPUT .= $form['submit'];
$PHP_OUTPUT .= '</form>';
示例8: create_container
<?php
$template->assign('PageTopic', 'Create Alliance');
$container = create_container('alliance_create_processing.php');
$form = create_form($container, 'Create');
$PHP_OUTPUT .= $form['form'];
$PHP_OUTPUT .= '
<table cellspacing="0" cellpadding="0" class="nobord nohpad">
<tr>
<td class="top">Name:</td>
<td><input type="text" name="name" size="30"></td>
</tr>
<tr>
<td class="top">Description: </td>
<td><textarea spellcheck="true" name="description"></textarea></td>
</tr>
<tr>
<td class="top">Password:</td>
<td><input type="password" name="password" size="30"></td>
</tr>
<tr>
<td class="top">Members start with:</td>
<td>No permissions<input type="radio" name="Perms" value="none"><br />
Basic permissions<input type="radio" name="Perms" value="basic" checked><br />
Full permissions<input type="radio" name="Perms" value="full">
</td>
</tr>
<tr>
<td class="top">Recruiting:</td>
<td>Yes<input type="radio" name="recruit" value="yes" checked><br />
No<input type="radio" name="recruit" value="no">
示例9: get
<?php
include 'form.php';
include 'config.php';
if (isset($_POST['submit'])) {
$fname = get("fname");
$mname = get("mname");
$lname = get("lname");
$residence = get('residence');
$parish_affiliation = get('affiliation');
$affiliation = get('affiliate');
$sex = 'male';
alert($parish_affiliation);
} else {
$fname = input_form("Firstname", "fname", "text");
$mname = input_form("Middlename", "mname", "text");
$lname = input_form("Lastname", "lname", "text");
$residence = input_form("Residence", "residence", "area");
$parish_affiliation = multi("Affiliation", "affiliation", array("Our Lady of Assumption Parish", "Guest"), array("home", "other"), "radio");
$affiliation = input_form("Affiliation", "affiliate", "text");
$submit = input_form("Submit", "submit", "submit");
$form1 = create_form($fname . "" . $mname . "" . $lname . "" . $parish_affiliation . "" . $affiliation . "" . $residence . "" . $submit);
$card = create_card("Register New Minister", "{$form1}");
$content = $card;
newpage($content);
}
示例10: array
echo $roles[$role_id];
}
echo '</td>';
}
echo '</tr>';
}
echo '</table>';
echo '</div>';
if ($player->alliance_id == 0) {
// Newbie alliance is unlimited members, * means no new members allowed
if (($member_count < 30 || $alliance_id == 302) && $password != "*") {
echo '<br>';
$container = array();
$container["url"] = "alliance_join_processing.php";
$container["alliance_id"] = $alliance_id;
$form = create_form($container, 'Join');
echo $form['form'];
echo 'Enter password to join alliance<br><br>';
echo '<input type="password" name="password" size="30"> ';
echo $form['submit'];
echo '</form>';
}
}
if ($alliance_id == $player->alliance_id) {
echo '<br><h2>Options</h2><br>';
$container = array();
$container['url'] = 'skeleton.php';
$container['body'] = 'alliance_roster.php';
if (!isset($var['action']) || $var['action'] == 'Hide Alliance Roles') {
$container['action'] = 'Show Alliance Roles';
print_button($container, 'Show Alliance Roles');
示例11: array
account_id,
player_id,
player_name,
last_active
FROM player
WHERE game_id=' . SmrSession::$game_id . '
AND alliance_id=' . $player->alliance_id . '
AND account_id<>' . SmrSession::$old_account_id . '
ORDER BY last_active DESC
');
echo '<div align="center">';
if ($db->nf() != 0) {
$container = array();
$container['url'] = 'alliance_remove_member_processing.php';
$container['body'] = '';
$form = create_form($container, 'Banish \'em!');
echo $form['form'];
echo '<table cellspacing="0" cellpadding="0" class="standard inset"><th>Trader Name</th><th>Last Online</th><th>Action</th>';
while ($db->next_record()) {
// we won't exile ourself!
if ($player->account_id != $account_id) {
// get the amount of time since last_active
$diff = time() - $db->f('last_active');
if ($diff > 864000) {
$diff = 864000;
}
// green
if ($diff < 432000) {
// scale it down to 255
$dec = round($diff / 1694);
// make it hex and add leading zero if necessary
示例12: array
<td><input type="text" size="5" name="from" maxlength="5" class="center" value="';
echo $player->sector_id;
echo '"></td>
<td> To: </td>
<td><input type="text" size="5" name="to" maxlength="5" class="center"></td>
<td> ';
echo $form['submit'];
echo ' </td>
</tr>
</table>
</form>';
if (!empty($ship->hardware[HARDWARE_JUMP])) {
$container = array();
$container["url"] = "sector_jump_processing.php";
$container["target_page"] = "current_sector.php";
$form = create_form($container, 'Engage Jump (15)');
echo $form['form'];
echo '
<br>
<h2>Jumpdrive</h2><br>
<table cellspacing="0" cellpadding="0" class="nobord nohpad">
<tr>
<td>Jump To: </td>
<td><input type="text" size="5" name="to" maxlength="5" class="center"></td>
<td> ';
echo $form['submit'];
echo ' </td>
</tr>
</table>
</form>';
示例13: get_file_loc
$template->assign('PageTopic', $alliance->getAllianceName() . ' (' . $alliance->getAllianceID() . ')');
require_once get_file_loc('menu.inc');
create_alliance_menu($alliance->getAllianceID(), $alliance->getLeaderID());
$PHP_OUTPUT .= '<h2>Exemption Requests</h2><br />';
$PHP_OUTPUT .= 'Selecting a box will authorize it, leaving a box unselected will make it unauthorized after you submit.<br />';
//get rid of already approved entries
$db->query('UPDATE alliance_bank_transactions SET request_exempt = 0 WHERE exempt = 1');
//build player array
$db->query('SELECT * FROM player WHERE alliance_id = ' . $db->escapeNumber($alliance->getAllianceID()) . ' AND game_id = ' . $db->escapeNumber($alliance->getGameID()));
while ($db->nextRecord()) {
$players[$db->getInt('account_id')] = $db->getField('player_name');
}
$db->query('SELECT * FROM alliance_bank_transactions WHERE request_exempt = 1 ' . 'AND alliance_id = ' . $db->escapeNumber($alliance->getAllianceID()) . ' AND game_id = ' . $db->escapeNumber($alliance->getGameID()) . ' AND exempt = 0');
if ($db->getNumRows()) {
$container = create_container('bank_alliance_exempt_processing.php');
$form = create_form($container, 'Make Exempt');
$PHP_OUTPUT .= $form['form'];
$PHP_OUTPUT .= create_table();
$PHP_OUTPUT .= '<tr><th>Player Name</th><th>Type</th><th>Reason</th><th>Amount</th><th>Approve</th></tr>';
while ($db->nextRecord()) {
$trans = $db->getField('transaction') == 'Payment' ? 'Withdraw' : 'Deposit';
$PHP_OUTPUT .= '<tr><td>' . $players[$db->getInt('payee_id')] . '</td><td>' . $trans . '</td><td>' . $db->getField('reason') . '</td><td>' . number_format($db->getInt('amount')) . '</td>';
$PHP_OUTPUT .= '<td><input type="checkbox" name="exempt[' . $db->getField('transaction_id') . ']"></td>';
$PHP_OUTPUT .= '</tr>';
}
$PHP_OUTPUT .= '</table>';
$PHP_OUTPUT .= '<div align="center">';
$PHP_OUTPUT .= $form['submit'];
$PHP_OUTPUT .= '</div></form>';
} else {
$PHP_OUTPUT .= '<div align="center">Nothing to authorize.</div>';
示例14: cpg_db_query
$result = cpg_db_query("SELECT max(priority) FROM {$CONFIG['TABLE_SHOP_CONFIG']}");
$temp = mysql_fetch_row($result);
$priority = is_numeric($temp[0]) ? ++$temp[0] : 0;
mysql_free_result($result);
cpg_db_query("INSERT INTO {$CONFIG['TABLE_SHOP_CONFIG']} (priority) VALUES ('{$priority}')");
photoshop_refresh($_SERVER['PHP_SELF'] . '?file=photo_shop/photo_shop_config');
} elseif (isset($_POST['apply_modifs'])) {
photoshop_process_post_data();
}
}
pageheader($lang_photoshop_config['title']);
$signature = 'Coppermine Photo Gallery ' . COPPERMINE_VERSION . ' (' . COPPERMINE_VERSION_STATUS . ')';
//config start
echo "<form action=\"index.php?file=photo_shop/photo_shop_config\" method=\"post\">";
starttable('100%', "{$lang_photoshop_config['title']} - {$signature}", 3);
create_form($lang_photoshop_admin_data);
echo '</table></td></tr>';
echo <<<EOT
<tr>
<td align="left" class="tablef">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td width="100%" align="center">
<input type="submit" class="button" name="update_config" value="{$lang_admin_php['save_cfg']}" />
</td>
</tr>
</table>
</td>
</tr>
EOT;
endtable();
示例15: db_query
if (strpos($sql_query[$i], '_config') || strpos($sql_query[$i], '_filetypes')) {
db_query($sql_query[$i]);
}
}
}
pageheader($lang_config_php['title']);
msg_box($lang_config_php['info'], $lang_config_php['restore_success'], $lang_continue, $PHP_SELF);
pagefooter();
}
pageheader($lang_config_php['title']);
$signature = 'Coppermine Photo Gallery ' . COPPERMINE_VERSION;
starttable('100%', "{$lang_config_php['title']} - {$signature}", 2);
echo <<<EOT
<form action="{$PHP_SELF}" method="post">
EOT;
create_form($lang_config_data);
echo <<<EOT
<tr>
<td colspan="2" align="center" class="tablef">
<input type="submit" class="button" name="update_config" value="{$lang_config_php['save_cfg']}">
<input type="submit" class="button" name="restore_config" value="{$lang_config_php['restore_cfg']}">
</td>
</form>
</tr>
EOT;
endtable();
pagefooter();
ob_end_flush();