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


PHP create_form函数代码示例

本文整理汇总了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();
        }
    }
}
开发者ID:prostart,项目名称:Carbecco,代码行数:24,代码来源:form-fr.php

示例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 .= '&nbsp;';
    $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>';
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:alliance_treaties.php

示例3: create_form

                <a href="editpics.php?album={$CLEAN['album']}" class="admin_menu">{$lang_modifyalb_php['edit_files']}</a>
                &nbsp;&nbsp;-&nbsp;&nbsp;
                <a href="index.php?cat={$ALBUM_DATA['category']}" class="admin_menu">{$lang_modifyalb_php['parent_category']}</a>
                &nbsp;&nbsp;-&nbsp;&nbsp;
                <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']}" />
开发者ID:phill104,项目名称:branches,代码行数:31,代码来源:modifyalb.php

示例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']}" />
                                &nbsp;&nbsp;
                                    </td>
                                </tr>
                            </table>
                        </td>
                </tr>
EOT;
开发者ID:phill104,项目名称:branches,代码行数:31,代码来源:cms_config.php

示例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;
开发者ID:lowriek,项目名称:CSCI1154_Examples,代码行数:31,代码来源:xml_from_the_web.php

示例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:&nbsp;</td>
		<td class="mb"><input type="text" name="PlayerName" size="30"></td>
	</tr>
</table><br />
';
$PHP_OUTPUT .= $form['submit'];
$PHP_OUTPUT .= '</form>';
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:message_blacklist.php

示例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:&nbsp;</td>
		<td class="mb"><input type="text" name="Word" size="30"></td>
	</tr>
	<tr>
		<td class="top">Replacement:&nbsp;</td>
		<td class="mb"><input type="text" name="WordReplacement" size="30"></td>
	</tr>
</table><br />
';
$PHP_OUTPUT .= $form['submit'];
$PHP_OUTPUT .= '</form>';
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:word_filter.php

示例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:&nbsp;</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">
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:alliance_create.php

示例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);
}
开发者ID:icecloud12,项目名称:Our-Lady-of-Assumption,代码行数:26,代码来源:register_new_minister.php

示例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">&nbsp;';
        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');
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:alliance_roster.php

示例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
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:alliance_remove_member.php

示例12: array

		<td><input type="text" size="5" name="from" maxlength="5" class="center" value="';
echo $player->sector_id;
echo '"></td>
		<td>&nbsp;&nbsp;&nbsp;&nbsp;To:&nbsp;</td>
		<td><input type="text" size="5" name="to" maxlength="5" class="center"></td>
		<td>&nbsp;&nbsp;&nbsp;&nbsp;';
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:&nbsp;</td>
			<td><input type="text" size="5" name="to" maxlength="5" class="center"></td>
			<td>&nbsp;&nbsp;&nbsp;&nbsp;';
    echo $form['submit'];
    echo '	</td>
		</tr>
	</table>
	</form>';
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:course_plot.php

示例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>';
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:alliance_exempt_authorize.php

示例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();
开发者ID:phill104,项目名称:branches,代码行数:31,代码来源:photo_shop_config.php

示例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']}">
                        &nbsp;&nbsp;
                        <input type="submit" class="button" name="restore_config" value="{$lang_config_php['restore_cfg']}">
                </td>
        </form>
        </tr>

EOT;
endtable();
pagefooter();
ob_end_flush();
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:config.php


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