本文整理汇总了PHP中submit函数的典型用法代码示例。如果您正苦于以下问题:PHP submit函数的具体用法?PHP submit怎么用?PHP submit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了submit函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: edit_allocations_for_transaction
function edit_allocations_for_transaction($type, $trans_no)
{
global $systypes_array;
$cart = $_SESSION['alloc'];
display_heading(sprintf(_("Allocation of %s # %d"), $systypes_array[$cart->type], $cart->trans_no));
display_heading($cart->person_name);
display_heading2(_("Date:") . " <b>" . $cart->date_ . "</b>");
display_heading2(_("Total:") . " <b>" . price_format($cart->bank_amount) . ' ' . $cart->currency . "</b>");
if ($cart->currency != $cart->person_curr) {
$total = _("Total in clearing currency:") . " <b>" . price_format($cart->amount) . "</b>" . sprintf(" %s (%s %s/%s)", $cart->person_curr, exrate_format($cart->bank_amount / $cart->amount), $cart->currency, $cart->person_curr);
display_heading2($total);
}
echo "<br>";
start_form();
div_start('alloc_tbl');
if (count($cart->allocs) > 0) {
show_allocatable(true);
submit_center_first('UpdateDisplay', _("Refresh"), _('Start again allocation of selected amount'), true);
submit('Process', _("Process"), true, _('Process allocations'), 'default');
submit_center_last('Cancel', _("Back to Allocations"), _('Abandon allocations and return to selection of allocatable amounts'), 'cancel');
} else {
display_note(_("There are no unsettled transactions to allocate."), 0, 1);
submit_center('Cancel', _("Back to Allocations"), true, _('Abandon allocations and return to selection of allocatable amounts'), 'cancel');
}
div_end();
end_form();
}
示例2: edit
function edit($table, $vyber, $id)
{
$error_msg = array();
if ($_POST[submit]) {
$meno = sec_sql(sec_input($_POST["meno"]));
$hodnota = sec_sql(sec_input($_POST["hodnota"]));
if (strlen($meno) > 30 or strlen($meno) < 3) {
$error_msg[] = "Meno môže mať od 4 do 30 znakov";
}
if (strlen($hodnota) > 30 or strlen($hodnota) < 3) {
$error_msg[] = "Hodnota môže mať od 4 do 30 znakov";
}
//var_dump($error_msg);
if (empty($error_msg)) {
echo "ok";
} else {
echo "<div id=error_message>" . implode("<br>", $error_msg) . "</div>";
}
}
$id = sec_sql($id);
$query = "Select id, hodnota, meno from " . PREFIX . "{$table} WHERE id={$id}";
$value = sql_query($query);
$value = $value[0];
echo "<form method=\"POST\">";
hidden("id", $value[id]);
textfield("meno", $value[meno], "Meno", 50, 20);
textfield("hodnota", $value[hodnota], "Hodnota", 40, 20);
submit("submit", "Odoslať");
echo "</form>";
}
示例3: showCustomerForm
function showCustomerForm($data, $action, $badFields)
{
formHeader($action, "<h1>Customer Info Form</h1>", "customerForm", "void");
customerFields($data, $badFields);
tableRow(array(tableData(""), tableData(""), tableData(""), tableData(""), tableData(""), tableData(submit("Enter/Edit Customer!"), "right")));
echo getWordpressHiddenFormField();
formFooter("customerForm");
}
示例4: showPackageForm
function showPackageForm($data, $action, $badFields)
{
formHeader($action, "Package Form", "packageForm", "void");
packageFields($data, $badFields);
tableRow(array(tableData(""), tableData(""), tableData(""), tableData(""), tableData(""), tableData(submit("Submit!"))));
echo getWordpressHiddenFormField();
formFooter("packageForm");
}
示例5: parse
public function parse($orig_name)
{
global $CORE;
ob_start();
if (is_action()) {
try {
$name = post('name');
if (!$name) {
throw new FieldInputError('name', l('Please provide a map name.'));
}
if (!preg_match(MATCH_MAP_NAME, $name)) {
throw new FieldInputError('name', l('This is not a valid map name (need to match [M])', array('M' => MATCH_MAP_NAME)));
}
if (count($CORE->getAvailableMaps('/^' . $name . '$/')) > 0) {
throw new FieldInputError('name', l('A map with this name already exists.'));
}
// Read the old config
$MAPCFG = new GlobalMapCfg($orig_name);
$MAPCFG->readMapConfig();
// Create a new map config
$NEW = new GlobalMapCfg($name);
$NEW->createMapConfig();
foreach ($MAPCFG->getMapObjects() as $object_id => $cfg) {
$NEW->addElement($cfg['type'], $cfg, $perm = true, $object_id);
}
success(l('The map has been created.'));
reload(cfg('paths', 'htmlbase') . '/frontend/nagvis-js/index.php?mod=Map&show=' . $name, 1);
} catch (FieldInputError $e) {
form_error($e->field, $e->msg);
} catch (NagVisException $e) {
form_error(null, $e->message());
} catch (Exception $e) {
if (isset($e->msg)) {
form_error(null, $e->msg);
} else {
throw $e;
}
}
}
echo $this->error;
echo '<div class="simple_form">' . N;
js_form_start('to_new_map');
input('name');
submit(l('Save'));
focus('name');
// Keep the view parameters the users has set
$params = ltrim(req('view_params'), '&');
if ($params) {
$parts = explode('&', $params);
foreach ($parts as $part) {
list($key, $val) = explode('=', $part);
hidden($key, $val);
}
}
form_end();
echo '</div>' . N;
return ob_get_clean();
}
示例6: delete_ngi
function delete_ngi()
{
checkUserIsAdmin();
if ($_POST) {
submit();
} else {
draw();
}
}
示例7: showShippingForm
function showShippingForm($data, $action, $badFields = array())
{
prepDatePicker();
formHeader($action, "<h1>Shipping Info Form</h1>", "shippingForm", "void");
shippingFields($data, $badFields);
tableRow(array(tableData(""), tableData(""), tableData(""), tableData(""), tableData(""), tableData(submit("Enter Shipping Details!"), "right")));
if (inWordPress()) {
echo getWordpressHiddenFormField();
}
formFooter("shippingForm");
}
示例8: submit_add_or_update_center2
function submit_add_or_update_center2($add = true, $title = false, $async = false)
{
echo "<center>";
if ($add) {
submit('ADD_ITEM2', _("Add new"), true, $title, $async);
} else {
submit('UPDATE_ITEM2', _("Update"), true, $title, $async);
submit('RESET2', _("Cancel"), true, $title, $async);
}
echo "</center>";
}
示例9: showOrderEntryForm
function showOrderEntryForm($data, $badFields = array())
{
formHeader("", "", "orderEntry", "void");
customerFields($data, $badFields);
orderFields($data, $badFields);
if (inWordPress()) {
echo getWordpressHiddenFormField();
}
tableRow(array(tableData(""), tableData(""), tableData(""), tableData(""), tableData(""), tableData(submit("Enter Order!"), "right")));
formFooter("orderEntryForm");
}
示例10: move_service_end_point
/**
* Controller for a service move request
* @global array $_POST only set if the browser has POSTed data
* @return null
*/
function move_service_end_point()
{
//The following line will be needed if this controller is ever used for non administrators:
//checkPortalIsNotReadOnlyOrUserIsAdmin($user);
if ($_POST) {
// If we receive a POST request it's for a service movement
submit();
} else {
// If there is no post data, draw the select old site form
drawSelectOldSite();
}
}
示例11: add_type
/**
* Controller for an add service type request
* @global array $_POST only set if the browser has POSTed data
* @return null
*/
function add_type()
{
//The following line will be needed if this controller is ever used for non administrators:
//checkPortalIsNotReadOnlyOrUserIsAdmin($user);
if ($_POST) {
// If we receive a POST request it's to add a service type
submit();
} else {
// If there is no post data, draw the add service type form
draw();
}
}
示例12: edit_dn
/**
* Controller for an edit user_dn request
* @global array $_POST only set if the browser has POSTed data
* @return null
*/
function edit_dn()
{
//The following line will be needed if this controller is ever used for non administrators:
//checkPortalIsNotReadOnlyOrUserIsAdmin($user);
if ($_POST) {
// If we receive a POST request it's to edit a user dn
submit();
} else {
// If there is no post data, draw the edit DN page
draw();
}
}
示例13: retrieve
/**
* Controller for a retrieve account request.
* @global array $_POST only set if the browser has POSTed data
* @return null
*/
function retrieve()
{
//Check the portal is not in read only mode, returns exception if it is
checkPortalIsNotReadOnly();
if ($_POST) {
// If we receive a POST request it's to update a user
submit();
} else {
// If there is no post data, draw the edit user form
draw();
}
}
示例14: edit_property
/**
* Controller for an edit site property request
* @global array $_POST only set if the browser has POSTed data
* @return null
*/
function edit_property()
{
$dn = Get_User_Principle();
$user = \Factory::getUserService()->getUserByPrinciple($dn);
//Check the portal is not in read only mode, returns exception if it is and user is not an admin
checkPortalIsNotReadOnlyOrUserIsAdmin($user);
if ($_POST) {
submit($user);
} else {
draw($user);
}
}
示例15: edit_form
function edit_form($file)
{
global $PHP_SELF;
if (@is_readable($file)) {
$data = join('', file($file));
} elseif (EDIT_USE_SUOPEN and $f = suopen($file, "r")) {
while (!feof($f)) {
$data .= fread($f, 16000);
}
suclose($f);
}
return form($PHP_SELF, textarea('data', $data) . submit('Save'));
}