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


PHP create_submit函数代码示例

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


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

示例1: search_form

function search_form()
{
    global $day, $month, $year, $phpc_script, $month_names, $sort_options, $order_options;
    $day_sequence = create_sequence(1, 31);
    $month_sequence = create_sequence(1, 12);
    $year_sequence = create_sequence(1970, 2037);
    $html_table = tag('table', attributes('class="phpc-main"'), tag('caption', _('Search')), tag('tfoot', tag('tr', tag('td', attributes('colspan="2"'), create_submit(_('Submit'))))), tag('tr', tag('td', _('Phrase') . ': '), tag('td', tag('input', attributes('type="text"', 'name="searchstring"', 'size="32"')), create_hidden('action', 'search'))), tag('tr', tag('td', _('From') . ': '), tag('td', create_select('sday', $day_sequence, $day), create_select('smonth', $month_names, $month), create_select('syear', $year_sequence, $year))), tag('tr', tag('td', _('To') . ': '), tag('td', create_select('eday', $day_sequence, $day), create_select('emonth', $month_names, $month), create_select('eyear', $year_sequence, $year))), tag('tr', tag('td', _('Sort By') . ': '), tag('td', create_select('sort', $sort_options, false))), tag('tr', tag('td', _('Order') . ': '), tag('td', create_select('order', $order_options, false))));
    return tag('form', attributes("action=\"{$phpc_script}\"", 'method="post"'), $html_table);
}
开发者ID:noprom,项目名称:cryptdb,代码行数:9,代码来源:search.php

示例2: login_form

function login_form()
{
    global $vars, $phpc_script;
    $submit_data = tag('td', attributes('colspan="2"'), create_hidden('action', 'login'), create_submit(__('Log in')));
    if (!empty($vars['lasturl'])) {
        $submit_data->prepend(create_hidden('lasturl', escape_entities(urlencode($vars['lasturl']))));
    }
    return tag('form', attributes("action=\"{$phpc_script}\"", 'method="post"'), tag('table', tag('caption', __('Log in')), tag('thead', tag('tr', tag('th', attributes('colspan="2"'), __('You must have cookies enabled to login.')))), tag('tfoot', tag('tr', $submit_data)), tag('tbody', tag('tr', tag('th', __('Username')), tag('td', create_text('username'))), tag('tr', tag('th', __('Password')), tag('td', create_password('password'))))));
}
开发者ID:hubandbob,项目名称:php-calendar,代码行数:9,代码来源:login.php

示例3: display_form

function display_form()
{
    global $phpc_script, $phpc_token;
    $tbody = tag('tbody');
    foreach (get_config_options() as $element) {
        $text = $element[1];
        $input = create_config_input($element);
        $tbody->add(tag('tr', tag('th', $text), tag('td', $input)));
    }
    return tag('form', attributes("action=\"{$phpc_script}\"", 'method="post"'), tag('table', attributes("class=\"phpc-container\""), tag('caption', __('Create Calendar')), tag('tfoot', tag('tr', tag('td', attributes('colspan="2"'), create_hidden('phpc_token', $phpc_token), create_hidden('action', 'calendar_form'), create_hidden('submit_form', 'submit_form'), create_submit(__('Submit'))))), $tbody));
}
开发者ID:php-calendar,项目名称:php-calendar,代码行数:11,代码来源:calendar_form.php

示例4: config_form

function config_form()
{
    global $phpc_script, $phpc_user_tz, $phpc_user_lang, $phpc_token;
    $tz_input = create_multi_select('timezone', get_timezone_list(), $phpc_user_tz);
    $languages = array("" => __("Default"));
    foreach (get_languages() as $lang) {
        $languages[$lang] = $lang;
    }
    $lang_input = create_select('language', $languages, $phpc_user_lang);
    $form = tag('form', attributes("action=\"{$phpc_script}\"", 'method="post"'), tag('table', attributes("class=\"phpc-container\""), tag('caption', __('Settings')), tag('tfoot', tag('tr', tag('td', attributes('colspan="2"'), create_hidden('phpc_token', $phpc_token), create_hidden('action', 'settings'), create_hidden('phpc_submit', 'settings'), create_submit(__('Submit'))))), tag('tbody', tag('tr', tag('th', __('Timezone')), tag('td', $tz_input)), tag('tr', tag('th', __('Language')), tag('td', $lang_input)))));
    return tag('div', attrs('id="phpc-config"'), $form);
}
开发者ID:Godjqb,项目名称:Php-test,代码行数:12,代码来源:settings.php

示例5: display_form

function display_form()
{
    global $phpc_script, $phpc_token, $phpcdb;
    $groups = array();
    foreach ($phpcdb->get_groups() as $group) {
        $groups[$group['gid']] = $group['name'];
    }
    $size = sizeof($groups);
    if ($size > 6) {
        $size = 6;
    }
    return tag('form', attributes("action=\"{$phpc_script}\"", 'method="post"'), tag('table', attributes("class=\"phpc-container\""), tag('caption', __('Create User')), tag('tfoot', tag('tr', tag('td', attributes('colspan="2"'), create_hidden('phpc_token', $phpc_token), create_hidden('action', 'user_create'), create_hidden('submit_form', 'submit_form'), create_submit(__('Submit'))))), tag('tbody', tag('tr', tag('th', __('User Name')), tag('td', create_text('user_name'))), tag('tr', tag('th', __('Password')), tag('td', create_password('password1'))), tag('tr', tag('th', __('Confirm Password')), tag('td', create_password('password2'))), tag('tr', tag('th', __('Make Admin')), tag('td', create_checkbox('make_admin', '1', false, __('Admin')))), tag('tr', tag('th', __('Groups')), tag('td', create_select('groups[]', $groups, false, attrs('multiple', "size=\"{$size}\"")))))));
}
开发者ID:php-calendar,项目名称:php-calendar,代码行数:13,代码来源:user_create.php

示例6: display_form

function display_form()
{
    global $phpc_script, $phpc_token, $phpcdb, $vars, $phpc_cal;
    $groups = array();
    foreach ($phpc_cal->get_groups() as $group) {
        $groups[$group['gid']] = $group['name'];
    }
    $size = sizeof($groups);
    if ($size > 6) {
        $size = 6;
    }
    $user = $phpcdb->get_user($vars["uid"]);
    $user_groups = array();
    foreach ($user->get_groups() as $group) {
        $user_groups[] = $group['gid'];
    }
    return tag('form', attributes("action=\"{$phpc_script}\"", 'method="post"'), tag('div', attributes("class=\"phpc-container\""), tag('h2', __('Edit User Groups')), tag('div', create_select('groups[]', $groups, $user_groups, attrs('multiple', "size=\"{$size}\""))), tag('div', create_hidden('phpc_token', $phpc_token), create_hidden('uid', $vars['uid']), create_hidden('action', 'user_groups'), create_hidden('submit_form', 'submit_form'), create_submit(__('Submit')))));
}
开发者ID:Godjqb,项目名称:Php-test,代码行数:18,代码来源:user_groups.php

示例7: login_form

function login_form()
{
    global $vars, $phpc_script, $day, $year, $month;
    $lastaction = empty($vars['lastaction']) ? '' : $vars['lastaction'];
    $submit_data = tag('td', attributes('colspan="2"'), create_hidden('action', 'login'), create_submit(_('Log in')));
    if (!empty($vars['lastaction'])) {
        $submit_data->prepend(create_hidden('lastaction', $vars['lastaction']));
    }
    if (!empty($vars['day'])) {
        $submit_data->prepend(create_hidden('day', $day));
    }
    if (!empty($vars['month'])) {
        $submit_data->prepend(create_hidden('month', $month));
    }
    if (!empty($vars['year'])) {
        $submit_data->prepend(create_hidden('year', $year));
    }
    return tag('form', attributes("action=\"{$phpc_script}\"", 'method="post"'), tag('table', attributes('class="phpc-main"'), tag('caption', _('Log in')), tag('thead', tag('tr', tag('th', attributes('colspan="2"'), _('You must have cookies enabled to login.')))), tag('tfoot', tag('tr', $submit_data)), tag('tbody', tag('tr', tag('th', _('Username') . ':'), tag('td', create_text('username'))), tag('tr', tag('th', _('Password') . ':'), tag('td', create_password('password'))))));
}
开发者ID:noprom,项目名称:cryptdb,代码行数:19,代码来源:login.php

示例8: display_day

function display_day()
{
    global $phpcid, $phpc_cal, $phpc_user, $phpc_script, $phpcdb, $day, $month, $year;
    $monthname = month_name($month);
    $results = $phpcdb->get_occurrences_by_date($phpcid, $year, $month, $day);
    $today_epoch = mktime(0, 0, 0, $month, $day, $year);
    $have_events = false;
    $html_table = tag('table', attributes('class="phpc-main"'), tag('caption', "{$day} {$monthname} {$year}"), tag('thead', tag('tr', tag('th', __('Title')), tag('th', __('Time')), tag('th', __('Description')))));
    if ($phpc_cal->can_modify()) {
        $html_table->add(tag('tfoot', tag('tr', tag('td', attributes('colspan="4"'), create_hidden('action', 'event_delete'), create_hidden('day', $day), create_hidden('month', $month), create_hidden('year', $year), create_submit(__('Delete Selected'))))));
    }
    $html_body = tag('tbody');
    while ($row = $results->fetch_assoc()) {
        $event = new PhpcOccurrence($row);
        if (!$event->can_read()) {
            continue;
        }
        $have_events = true;
        $eid = $event->get_eid();
        $oid = $event->get_oid();
        $html_subject = tag('td');
        if ($event->can_modify()) {
            $html_subject->add(create_checkbox('eid[]', $eid));
        }
        $html_subject->add(create_occurrence_link(tag('strong', $event->get_subject()), 'display_event', $oid));
        if ($event->can_modify()) {
            $html_subject->add(" (");
            $html_subject->add(create_event_link(__('Modify'), 'event_form', $eid));
            $html_subject->add(')');
        }
        $html_body->add(tag('tr', $html_subject, tag('td', $event->get_time_span_string()), tag('td', $event->get_desc())));
    }
    $html_table->add($html_body);
    if ($phpc_cal->can_modify()) {
        $output = tag('form', attributes("action=\"{$phpc_script}\""), $html_table);
    } else {
        $output = $html_table;
    }
    if (!$have_events) {
        $output = tag('h2', __('No events on this day.'));
    }
    return tag('', create_day_menu(), $output);
}
开发者ID:Godjqb,项目名称:Php-test,代码行数:43,代码来源:display_day.php

示例9: config_form

function config_form()
{
    global $phpc_script, $phpc_user_tz, $phpc_user_lang, $phpc_token, $phpcdb, $phpc_user;
    $tz_input = create_multi_select('timezone', get_timezone_list(), $phpc_user_tz);
    $languages = array("" => __("Default"));
    foreach (get_languages() as $lang) {
        $languages[$lang] = $lang;
    }
    $lang_input = create_select('language', $languages, $phpc_user_lang);
    $calendars = array("" => __("None"));
    foreach ($phpcdb->get_calendars() as $calendar) {
        $calendars[$calendar->get_cid()] = $calendar->get_title();
    }
    $default_input = create_select('default_cid', $calendars, $phpc_user->get_default_cid());
    $table = tag('table', attrs('class="phpc-form"'));
    if (is_user()) {
        $table->add(tag('tr', tag('th', __('Default Calendar')), tag('td', $default_input)));
    }
    $table->add(tag('tr', tag('th', __('Timezone')), tag('td', $tz_input)));
    $table->add(tag('tr', tag('th', __('Language')), tag('td', $lang_input)));
    $form = tag('form', attributes("action=\"{$phpc_script}\"", 'method="post"'), tag('div', attrs('class="phpc-sub-title"'), __('Settings')), $table, create_hidden('phpc_token', $phpc_token), create_hidden('action', 'user_settings_submit'), create_submit(__('Submit')));
    return tag('div', attrs('id="phpc-config"'), $form);
}
开发者ID:hubandbob,项目名称:php-calendar,代码行数:23,代码来源:user_settings.php

示例10: user_list

function user_list()
{
    global $phpc_script, $phpcid, $phpcdb, $vars;
    $users = $phpcdb->get_users_with_permissions($phpcid);
    $tbody = tag('tbody');
    foreach ($users as $user) {
        $phpc_user = new PhpcUser($user);
        $group_list = array();
        foreach ($phpc_user->get_groups() as $group) {
            if ($group['cid'] == $phpcid) {
                $group_list[] = $group['name'];
            }
        }
        $groups = implode(', ', $group_list);
        $tbody->add(tag('tr', tag('th', $user['username'], create_hidden('uid[]', $user['uid'])), tag('td', create_checkbox("read{$user['uid']}", "1", !empty($user['read']), __('Read'))), tag('td', create_checkbox("write{$user['uid']}", "1", !empty($user['write']), __('Write'))), tag('td', create_checkbox("readonly{$user['uid']}", "1", !empty($user['readonly']), __('Read-only'))), tag('td', create_checkbox("modify{$user['uid']}", "1", !empty($user['modify']), __('Modify'))), tag('td', create_checkbox("admin{$user['uid']}", "1", !empty($user['calendar_admin']), __('Admin'))), tag('td', $groups), tag('td', create_action_link(__("Edit Groups"), "user_groups", array("uid" => $user["uid"])))));
    }
    $hidden_div = tag('div', create_hidden('action', 'user_permissions_submit'));
    if (isset($vars['phpcid'])) {
        $hidden_div->add(create_hidden('phpcid', $vars['phpcid']));
    }
    $form = tag('form', attributes("action=\"{$phpc_script}\"", 'method="post"'), $hidden_div, tag('table', attributes("class=\"phpc-container\""), tag('caption', __('User Permissions')), tag('tfoot', tag('tr', tag('td', attributes('colspan="8"'), create_submit(__('Submit'))))), tag('thead', tag('tr', tag('th', __('User Name')), tag('th', __('Read')), tag('th', __('Write')), tag('th', __('Can Create Read-Only')), tag('th', __('Modify')), tag('th', __('Admin')), tag('th', __('Groups')), tag('th', __('Edit Groups')))), $tbody));
    return tag('div', attrs('id="phpc-users"'), $form);
}
开发者ID:Godjqb,项目名称:Php-test,代码行数:23,代码来源:cadmin.php

示例11: get_file_loc

<?php

$sector =& $player->getSector();
$template->assign('PageTopic', 'Place a Bounty');
require_once get_file_loc('menu.inc');
if ($sector->hasHQ()) {
    create_hq_menu();
} else {
    create_ug_menu();
}
$container = create_container('skeleton.php', 'bounty_place_confirm.php');
transfer('LocationID');
$PHP_OUTPUT .= create_echo_form($container);
$PHP_OUTPUT .= 'Select the player you want to add the bounty to<br />';
$PHP_OUTPUT .= '<select name="player_id" size="1" id="InputFields">';
$PHP_OUTPUT .= '<option value="0">[Please Select]</option>';
$db->query('SELECT player_id, player_name FROM player JOIN account USING(account_id) WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' AND account_id != ' . $db->escapeNumber($player->getAccountID()) . ' ORDER BY player_name');
while ($db->nextRecord()) {
    $PHP_OUTPUT .= '<option value="' . $db->getInt('player_id') . '">' . $db->getField('player_name') . '</option>';
}
$PHP_OUTPUT .= '</select>';
$PHP_OUTPUT .= '<br /><br />';
$PHP_OUTPUT .= 'Enter the amount you wish to place on this player<br />';
$PHP_OUTPUT .= '<table class="standardnobord"><tr><td>Credits:</td><td><input type="number" name="amount" maxlength="10" size="10" id="InputFields"></td></tr>';
$PHP_OUTPUT .= '<tr><td>Smr Credits:</td><td><input type="number" name="smrcredits" maxlength="10" size="10" id="InputFields"></td></tr></table>';
$PHP_OUTPUT .= '<br /><br />';
$PHP_OUTPUT .= create_submit('Place');
开发者ID:smrealms,项目名称:smrv2.0,代码行数:27,代码来源:bounty_place.php

示例12: bar_wall

    $amount = $db->getInt('message_id') + 1;
} else {
    $amount = 1;
}
$wall = $_REQUEST['wall'];
if (isset($wall)) {
    $db->query('INSERT INTO bar_wall (sector_id, game_id, message_id, message, time) VALUES (' . $db->escapeNumber($sector->getSectorID()) . ', ' . $db->escapeNumber($player->getGameID()) . ', ' . $db->escapeNumber($amount) . ',  ' . $db->escapeString($wall) . ' , ' . $db->escapeNumber(TIME) . ')');
}
$db->query('SELECT * FROM bar_wall WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' AND sector_id = ' . $db->escapeNumber($player->getSectorID()) . ' ORDER BY time DESC');
if ($db->getNumRows()) {
    $PHP_OUTPUT .= '<table class="standard">';
    $PHP_OUTPUT .= '<tr>';
    $PHP_OUTPUT .= '<th align="center">Time written</th>';
    $PHP_OUTPUT .= '<th align="center">Message</th>';
    $PHP_OUTPUT .= '</tr>';
    while ($db->nextRecord()) {
        $time = $db->getInt('time');
        $message_on_wall = $db->getField('message');
        $PHP_OUTPUT .= '<tr>';
        $PHP_OUTPUT .= '<td align="center"><b> ' . date(DATE_FULL_SHORT, $time) . ' </b></td>';
        $PHP_OUTPUT .= '<td align="center"><b>' . $message_on_wall . '</b></td>';
        $PHP_OUTPUT .= '</tr>';
    }
    $PHP_OUTPUT .= '</table>';
}
$template->assign('PageTopic', 'Write on the wall');
$PHP_OUTPUT .= '<br />';
$PHP_OUTPUT .= create_echo_form(create_container('skeleton.php', 'bar_read_wall.php'));
$PHP_OUTPUT .= '<textarea spellcheck="true" name="wall" id="InputFieldsText"></textarea><br /><br />';
$PHP_OUTPUT .= create_submit('Write it');
$PHP_OUTPUT .= '</form>';
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:bar_read_wall.php

示例13: foreach

$GOODS =& Globals::getGoods();
foreach ($GOODS as $goodID => $good) {
    if (!$ship->hasCargo($goodID) && !$planet->hasStockpile($goodID)) {
        continue;
    }
    if (!$present) {
        $present = true;
        $PHP_OUTPUT = "";
    }
    $container = create_container('planet_stockpile_processing.php');
    $container['good_id'] = $goodID;
    $PHP_OUTPUT .= create_echo_form($container);
    $PHP_OUTPUT .= '<tr>';
    $PHP_OUTPUT .= '<td class="left"><img src="' . $good['ImageLink'] . '" width="13" height="16" title="' . $good['Name'] . '" alt=""></td>';
    $PHP_OUTPUT .= '<td>' . $good['Name'] . '</td>';
    $PHP_OUTPUT .= '<td align="center">' . $ship->getCargo($goodID) . '</td>';
    $PHP_OUTPUT .= '<td align="center">' . $planet->getStockpile($goodID) . '</td>';
    $PHP_OUTPUT .= '<td align="center"><input type="number" name="amount" value="' . $ship->getCargo($goodID) . '" id="InputFields" size="4" class="center"/></td>';
    $PHP_OUTPUT .= '<td>';
    $PHP_OUTPUT .= create_submit('Ship');
    $PHP_OUTPUT .= '&nbsp;';
    $PHP_OUTPUT .= create_submit('Planet');
    $PHP_OUTPUT .= '</td>';
    $PHP_OUTPUT .= '</tr>';
    $PHP_OUTPUT .= '</form>';
}
if ($present) {
    $PHP_OUTPUT = $table . $PHP_OUTPUT;
    $PHP_OUTPUT .= '</table>';
    $PHP_OUTPUT .= '</p>';
}
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:planet_stockpile.php

示例14: get_file_loc

<?php

$raceName = Globals::getRaceName($var['race_id']);
$template->assign('PageTopic', 'Send message to ruling council of the ' . $raceName);
require_once get_file_loc('menu.inc');
create_message_menu();
$PHP_OUTPUT .= '<p>';
$container = create_container('council_send_message_processing.php');
transfer('race_id');
$PHP_OUTPUT .= create_echo_form($container);
$PHP_OUTPUT .= '<p><small><b>From:</b> ' . $player->getPlayerName() . ' (' . $player->getPlayerID() . ')<br />';
$PHP_OUTPUT .= '<b>To:</b> Ruling Council of ' . $raceName . '</small></p>';
$PHP_OUTPUT .= '<textarea spellcheck="true" name="message" id="InputFields"></textarea><br /><br />';
$PHP_OUTPUT .= create_submit('Send message');
$PHP_OUTPUT .= '</form>';
$PHP_OUTPUT .= '</p>';
开发者ID:smrealms,项目名称:smrv2.0,代码行数:16,代码来源:council_send_message.php

示例15: create_container

<?php

$template->assign('PageTopic', 'Warning');
$PHP_OUTPUT .= '<p>As you approach the warp you notice a warning beacon nearby. The beacon sends an automated message to your ship.</p>';
$PHP_OUTPUT .= '<p>"Your racial government cannot protect low-ranking traders in the galaxy you are about to enter. In this area you will be vulnerable to attack by high-ranked ships. It is not recommended that you enter this area at your current status."</p>';
$container = create_container('sector_' . $var['method'] . '_processing.php', '');
transfer('target_page');
transfer('target_sector');
$PHP_OUTPUT .= 'Are you sure you want to leave the newbie galaxy?';
$PHP_OUTPUT .= create_echo_form($container);
// for jump we need a 'to' field
$PHP_OUTPUT .= '<input type="hidden" name="to" value="' . $var['target_sector'] . '">';
$PHP_OUTPUT .= create_submit('Yes');
$PHP_OUTPUT .= '&nbsp;';
$PHP_OUTPUT .= create_submit('No');
$PHP_OUTPUT .= '</form>';
开发者ID:smrealms,项目名称:smrv2.0,代码行数:16,代码来源:leaving_newbie_galaxy.php


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