當前位置: 首頁>>代碼示例>>PHP>>正文


PHP simple_page_mode函數代碼示例

本文整理匯總了PHP中simple_page_mode函數的典型用法代碼示例。如果您正苦於以下問題:PHP simple_page_mode函數的具體用法?PHP simple_page_mode怎麽用?PHP simple_page_mode使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了simple_page_mode函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: page

<?php

$page_security = 'SA_GLACCOUNTGROUP';
$path_to_root = "../..";
include $path_to_root . "/includes/session.inc";
page(_($help_context = "GL Account Groups"));
include $path_to_root . "/gl/includes/gl_db.inc";
include $path_to_root . "/includes/ui.inc";
simple_page_mode(false);
//-----------------------------------------------------------------------------------
function can_process($selected_id)
{
    if (strlen(trim($_POST['id'])) == 0) {
        display_error(_("The account group id cannot be empty."));
        set_focus('id');
        return false;
    }
    if (strlen(trim($_POST['name'])) == 0) {
        display_error(_("The account group name cannot be empty."));
        set_focus('name');
        return false;
    }
    $type = get_account_type(trim($_POST['id']));
    if ($type && $type['id'] != $selected_id) {
        display_error(_("This account group id is already in use."));
        set_focus('id');
        return false;
    }
    //if (strcmp($_POST['id'], $_POST['parent']) == 0)
    if ($_POST['id'] === $_POST['parent']) {
        display_error(_("You cannot set an account group to be a subgroup of itself."));
開發者ID:knjy24,項目名稱:FrontAccounting,代碼行數:31,代碼來源:gl_account_types.php

示例2: page

<?php

$page_security = 'SA_BOM';
$path_to_root = "../..";
include_once $path_to_root . "/includes/session.inc";
page(_($help_context = "Bill Of Materials"));
include_once $path_to_root . "/includes/date_functions.inc";
include_once $path_to_root . "/includes/ui.inc";
include_once $path_to_root . "/includes/data_checks.inc";
include_once $path_to_root . "/includes/manufacturing.inc";
check_db_has_bom_stock_items(_("There are no manufactured or kit items defined in the system."));
check_db_has_workcentres(_("There are no work centres defined in the system. BOMs require at least one work centre be defined."));
simple_page_mode(true);
$selected_component = $selected_id;
//--------------------------------------------------------------------------------------------------
//if (isset($_GET["NewItem"]))
//{
//	$_POST['stock_id'] = $_GET["NewItem"];
//}
if (isset($_GET['stock_id'])) {
    $_POST['stock_id'] = $_GET['stock_id'];
    $selected_parent = $_GET['stock_id'];
}
/* selected_parent could come from a post or a get */
/*if (isset($_GET["selected_parent"]))
{
	$selected_parent = $_GET["selected_parent"];
}
else if (isset($_POST["selected_parent"]))
{
	$selected_parent = $_POST["selected_parent"];
開發者ID:knjy24,項目名稱:FrontAccounting,代碼行數:31,代碼來源:bom_edit.php

示例3: Copyright

/**********************************************************************
    Copyright (C) FrontAccounting, LLC.
	Released under the terms of the GNU General Public License, GPL, 
	as published by the Free Software Foundation, either version 3 
	of the License, or (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
    See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
$page_security = 'SA_BANKACCOUNT';
$path_to_root = "../..";
include $path_to_root . "/includes/session.inc";
page(_($help_context = "Bank Accounts"));
include $path_to_root . "/includes/ui.inc";
simple_page_mode();
//-----------------------------------------------------------------------------------
if ($Mode == 'ADD_ITEM' || $Mode == 'UPDATE_ITEM') {
    //initialise no input errors assumed initially before we test
    $input_error = 0;
    //first off validate inputs sensible
    if (strlen($_POST['bank_account_name']) == 0) {
        $input_error = 1;
        display_error(_("The bank account name cannot be empty."));
        set_focus('bank_account_name');
    }
    if ($Mode == 'ADD_ITEM' && (gl_account_in_bank_accounts(get_post('account_code')) || key_in_foreign_table(get_post('account_code'), 'gl_trans', 'account'))) {
        $input_error = 1;
        display_error(_("The GL account selected is already in use. Select another GL account."));
        set_focus('account_code');
    }
開發者ID:pthdnq,項目名稱:ivalley-svn,代碼行數:31,代碼來源:bank_accounts.php


注:本文中的simple_page_mode函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。