• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP submit函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了submit函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: edit_service

/**
 * Controller for an edit service request
 * @global array $_POST only set if the browser has POSTed data
 * @return null
 */
function edit_service()
{
    $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) {
        // If we receive a POST request it's for a new site
        submit($user);
    } else {
        // If there is no post data, draw the edit site form
        draw($user);
    }
}
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:19,代码来源:edit_service.php


示例17: delete

function delete()
{
    if (!isset($_REQUEST['id']) || !is_numeric($_REQUEST['id'])) {
        throw new Exception("An id must be specified");
    }
    $dn = Get_User_Principle();
    $user = \Factory::getUserService()->getUserByPrinciple($dn);
    //get the site
    $site = \Factory::getSiteService()->getSite($_REQUEST['id']);
    if ($_POST or sizeof($site->getServices()) == 0) {
        submit($site, $user);
    } else {
        draw($site);
    }
}
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:15,代码来源:delete_site.php


示例18: add_service_group_property

/**
 * Controller for a new_property request
 * @global array $_POST only set if the browser has POSTed data
 * @return null
 */
function add_service_group_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);
    //Check user has modification rights for this entity
    if ($_POST) {
        // If we receive a POST request it's for a new property
        submit($user);
    } else {
        // If there is no post data, draw the New property form
        draw($user);
    }
}
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:20,代码来源:add_service_group_property.php


示例19: etable

function etable($datos, $tablea = [], $tha = [], $tra = [], $tda = [])
{
    global $d, $t, $columnas;
    $res = "\n" . t("tr", tarray("th", $columnas, $tha), $tra);
    // aqui acumulamos el resultado parcial - los headings + rows
    // intentamos hacer una fila de edit controls
    $edits = "";
    foreach ($columnas as $i) {
        $edits .= "\n" . t("td", input(["name" => $i]), $tda);
    }
    $res .= t("tr", $edits . t("td", submit("Insertar") . hidden("d", $d) . hidden("t", $t) . hidden("c", "i"), $tda), $tra);
    foreach ($datos[1] as $arr) {
        $res .= "\n" . t("tr", tarray("td", $arr, $tda), $tra);
    }
    return t("table", $res, $tablea);
}
开发者ID:plamencurso,项目名称:myphpinc,代码行数:16,代码来源:revistas.php


示例20: add_ngis_to_project

/**
 * Controller for a request to add NGIs to a project
 * @global array $_POST only set if the browser has POSTed data
 * @return null
 */
function add_ngis_to_project()
{
    $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);
    ////Check the user has permission to see the page, will throw exception
    //if correct permissions are lacking
    checkUserIsAdmin();
    if ($_POST) {
        // If we receive a POST request it's to add ngis
        submit();
    } else {
        // If there is no post data, draw the add NGI page
        draw();
    }
}
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:22,代码来源:add_ngis.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP submit_add_or_update_center函数代码示例发布时间:2022-05-23
下一篇:
PHP submenu函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap