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


PHP submit函数代码示例

本文整理汇总了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();
}
开发者ID:M-Shahbaz,项目名称:FA,代码行数:27,代码来源:customer_allocate.php

示例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>";
}
开发者ID:jozefvasko,项目名称:kraf-app,代码行数:30,代码来源:material.php

示例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");
}
开发者ID:ChapResearch,项目名称:Online-Orders-Database,代码行数:8,代码来源:customerForm.php

示例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");
}
开发者ID:ChapResearch,项目名称:Online-Orders-Database,代码行数:8,代码来源:packageForm.php

示例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();
 }
开发者ID:rlugojr,项目名称:nagvis,代码行数:58,代码来源:ViewToNewMap.php

示例6: delete_ngi

function delete_ngi()
{
    checkUserIsAdmin();
    if ($_POST) {
        submit();
    } else {
        draw();
    }
}
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:9,代码来源:delete_ngi.php

示例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");
}
开发者ID:ChapResearch,项目名称:Online-Orders-Database,代码行数:11,代码来源:shippingInfoForm.php

示例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>";
}
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:11,代码来源:gl_quick_entries.php

示例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");
}
开发者ID:ChapResearch,项目名称:Online-Orders-Database,代码行数:11,代码来源:orderEntry.php

示例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();
    }
}
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:17,代码来源:move_service_end_point.php

示例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();
    }
}
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:17,代码来源:add_service_type.php

示例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();
    }
}
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:17,代码来源:edit_user_dn.php

示例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();
    }
}
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:17,代码来源:retrieve_account.php

示例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);
    }
}
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:17,代码来源:edit_service_group_property.php

示例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'));
}
开发者ID:nbtscommunity,项目名称:phpfnlib,代码行数:13,代码来源:edit.php


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