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


PHP display_notification函数代码示例

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


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

示例1: on_submit

function on_submit($selected_parent, $selected_id = -1)
{
    if (!check_num('quantity', 0)) {
        display_error(_("The quantity entered must be numeric and greater than zero."));
        set_focus('quantity');
        return;
    }
    if ($selected_id != -1) {
        update_bom($selected_parent, $selected_id, $_POST['workcentre_added'], $_POST['loc_code'], input_num('quantity'));
        display_notification(_('Selected component has been updated'));
        $Mode = 'RESET';
    } else {
        /*Selected component is null cos no item selected on first time round
        		so must be adding a record must be Submitting new entries in the new
        		component form */
        //need to check not recursive bom component of itself!
        if (!check_for_recursive_bom($selected_parent, $_POST['component'])) {
            /*Now check to see that the component is not already on the bom */
            if (!is_component_already_on_bom($_POST['component'], $_POST['workcentre_added'], $_POST['loc_code'], $selected_parent)) {
                add_bom($selected_parent, $_POST['component'], $_POST['workcentre_added'], $_POST['loc_code'], input_num('quantity'));
                display_notification(_("A new component part has been added to the bill of material for this item."));
                $Mode = 'RESET';
            } else {
                /*The component must already be on the bom */
                display_error(_("The selected component is already on this bom. You can modify it's quantity but it cannot appear more than once on the same bom."));
            }
        } else {
            display_error(_("The selected component is a parent of the current item. Recursive BOMs are not allowed."));
        }
    }
}
开发者ID:blestab,项目名称:frontaccounting,代码行数:31,代码来源:bom_edit.php

示例2: handle_submit

function handle_submit(&$selected_id)
{
    global $path_to_root, $Ajax, $auto_create_branch;
    if (!can_process()) {
        return;
    }
    if ($selected_id) {
        update_customer($_POST['customer_id'], $_POST['CustName'], $_POST['cust_ref'], $_POST['address'], $_POST['tax_id'], $_POST['curr_code'], $_POST['dimension_id'], $_POST['dimension2_id'], $_POST['credit_status'], $_POST['payment_terms'], input_num('discount') / 100, input_num('pymt_discount') / 100, input_num('credit_limit'), $_POST['sales_type'], $_POST['notes']);
        update_record_status($_POST['customer_id'], $_POST['inactive'], 'debtors_master', 'debtor_no');
        $Ajax->activate('customer_id');
        // in case of status change
        display_notification(_("Customer has been updated."));
    } else {
        //it is a new customer
        begin_transaction();
        add_customer($_POST['CustName'], $_POST['cust_ref'], $_POST['address'], $_POST['tax_id'], $_POST['curr_code'], $_POST['dimension_id'], $_POST['dimension2_id'], $_POST['credit_status'], $_POST['payment_terms'], input_num('discount') / 100, input_num('pymt_discount') / 100, input_num('credit_limit'), $_POST['sales_type'], $_POST['notes']);
        $selected_id = $_POST['customer_id'] = db_insert_id();
        if (isset($auto_create_branch) && $auto_create_branch == 1) {
            add_branch($selected_id, $_POST['CustName'], $_POST['cust_ref'], $_POST['address'], $_POST['salesman'], $_POST['area'], $_POST['tax_group_id'], get_company_pref('default_sales_act'), get_company_pref('default_sales_discount_act'), get_company_pref('debtors_act'), get_company_pref('default_prompt_payment_act'), $_POST['location'], $_POST['address'], 0, 0, $_POST['ship_via'], $_POST['notes']);
            $selected_branch = db_insert_id();
            add_crm_person($_POST['CustName'], $_POST['cust_ref'], '', $_POST['address'], $_POST['phone'], $_POST['phone2'], $_POST['fax'], $_POST['email'], '', '');
            $pers_id = db_insert_id();
            add_crm_contact('cust_branch', 'general', $selected_branch, $pers_id);
            add_crm_contact('customer', 'general', $selected_id, $pers_id);
        }
        commit_transaction();
        display_notification(_("A new customer has been added."));
        if (isset($auto_create_branch) && $auto_create_branch == 1) {
            display_notification(_("A default Branch has been automatically created, please check default Branch values by using link below."));
        }
        $Ajax->activate('_page_body');
    }
}
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:33,代码来源:customers.php

示例3: generate_backup

function generate_backup($conn, $ext = 'no', $comm = '')
{
    $filename = db_backup($conn, $ext, $comm);
    if ($filename) {
        display_notification(_("Backup successfully generated.") . ' ' . _("Filename") . ": " . $filename);
    } else {
        display_error(_("Database backup failed."));
    }
    return $filename;
}
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:10,代码来源:backups.php

示例4: handle_delete

function handle_delete()
{
    global $selected_id, $Mode;
    if (check_can_delete($selected_id)) {
        //only delete if used in neither customer or supplier, comp prefs, bank trans accounts
        delete_currency($selected_id);
        display_notification(_('Selected currency has been deleted'));
    }
    $Mode = 'RESET';
}
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:10,代码来源:currencies.php

示例5: get_add_workcenter

function get_add_workcenter($name)
{
    $name = db_escape($name);
    $sql = "SELECT id FROM " . TB_PREF . "workcentres WHERE UPPER( name ) = UPPER( {$name} )";
    $result = db_query($sql, "Can not search workcentres table");
    $row = db_fetch_row($result);
    if (!$row[0]) {
        $sql = "INSERT INTO " . TB_PREF . "workcentres (name, description) VALUES ( {$name}, {$name})";
        $result = db_query($sql, "Could not add workcenter");
        $id = db_insert_id();
        display_notification("Added {$name} as id {$id}");
    } else {
        $id = $row[0];
    }
    return $id;
}
开发者ID:blestab,项目名称:frontaccounting,代码行数:16,代码来源:import_items.php

示例6: handle_report

function handle_report()
{
    global $Ajax;
    if (can_process()) {
        $from = $_POST['TransFromDate'];
        $to = $_POST['TransToDate'];
        $typeId = $_POST['typeId'];
        $accountId = $_POST['accountId'];
        display_notification(_('Report successfully generated.'));
        $arr = array($from, $to, $typeId, $accountId);
        $trans_type = ST_SUBSIDIARY;
        display_note(print_document_link($arr, _("&Print Report"), true, $trans_type));
    } else {
        display_notification(_('Report not generated, please contact the administrator.'));
    }
    $Ajax->activate('_page_body');
    return;
}
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:18,代码来源:subsidiary_ledger_2.php

示例7: handle_submit

function handle_submit()
{
    global $path_to_root;
    if (!can_process()) {
        return;
    }
    if (!isset($_POST['New'])) {
        $sql = "UPDATE debtors_master SET name=" . db_escape($_POST['CustName']) . ", \n\t\t\taddress=" . db_escape($_POST['address']) . ", \n\t\t\ttax_id=" . db_escape($_POST['tax_id']) . ", \n\t\t\tcurr_code=" . db_escape($_POST['curr_code']) . ", \n\t\t\temail=" . db_escape($_POST['email']) . ", \n\t\t\tdimension_id=" . db_escape($_POST['dimension_id']) . ", \n\t\t\tdimension2_id=" . db_escape($_POST['dimension2_id']) . ", \n            credit_status=" . db_escape($_POST['credit_status']) . ", \n            payment_terms=" . db_escape($_POST['payment_terms']) . ", \n            discount=" . input_num('discount') / 100 . ", \n            pymt_discount=" . input_num('pymt_discount') / 100 . ", \n            credit_limit=" . input_num('credit_limit') . ", \n            sales_type = " . db_escape($_POST['sales_type']) . " \n            WHERE debtor_no = '" . $_POST['customer_id'] . "'";
        db_query($sql, "The customer could not be updated");
        display_notification(tr("Customer has been updated."));
        clear_fields();
    } else {
        //it is a new customer
        begin_transaction();
        $sql = "INSERT INTO debtors_master (name, address, tax_id, email, dimension_id, dimension2_id,  \n\t\t\tcurr_code, credit_status, payment_terms, discount, pymt_discount,credit_limit, \n\t\t\tsales_type) VALUES (" . db_escape($_POST['CustName']) . ", " . db_escape($_POST['address']) . ", " . db_escape($_POST['tax_id']) . "," . db_escape($_POST['email']) . ", " . db_escape($_POST['dimension_id']) . ", " . db_escape($_POST['dimension2_id']) . ", " . db_escape($_POST['curr_code']) . ", \n\t\t\t" . db_escape($_POST['credit_status']) . ", " . db_escape($_POST['payment_terms']) . ", " . input_num('discount') / 100 . ", \n\t\t\t" . input_num('pymt_discount') / 100 . ", " . input_num('credit_limit') . ", " . db_escape($_POST['sales_type']) . ")";
        db_query($sql, "The customer could not be added");
        $new_customer_id = db_insert_id();
        commit_transaction();
        display_notification(tr("A new customer has been added."));
        hyperlink_params($path_to_root . "/sales/manage/customer_branches.php", tr("Add branches for this customer"), "debtor_no={$new_customer_id}");
        clear_fields();
    }
}
开发者ID:ravenii,项目名称:guardocs,代码行数:23,代码来源:customers.php

示例8: handle_delete

function handle_delete($id)
{
    global $path_to_root;
    $extensions = get_company_extensions();
    $ext = $extensions[$id];
    if ($ext['version'] != '-') {
        if (!uninstall_package($ext['package'])) {
            return false;
        }
    } else {
        @(include_once $path_to_root . '/' . $ext['path'] . '/hooks.php');
        $hooks_class = 'hooks_' . $ext['package'];
        if (class_exists($hooks_class)) {
            $hooks = new $hooks_class();
            $hooks->uninstall_extension(false);
        }
    }
    unset($extensions[$id]);
    if (update_extensions($extensions)) {
        display_notification(_("Selected extension has been successfully deleted"));
    }
    return true;
}
开发者ID:M-Shahbaz,项目名称:FA,代码行数:23,代码来源:inst_module.php

示例9: add_days

        $to = add_days($to, $myrow['days']);
        if ($myrow['debtor_no'] == 0) {
            $cust = get_cust_branches_from_group($myrow['group_no']);
            while ($row = db_fetch($cust)) {
                $invs[] = create_recurrent_invoices($row['debtor_no'], $row['branch_code'], $myrow['order_no'], $myrow['id'], $date, $from, $to);
            }
        } else {
            $invs[] = create_recurrent_invoices($myrow['debtor_no'], $myrow['group_no'], $myrow['order_no'], $myrow['id'], $date, $from, $to);
        }
        if (count($invs) > 0) {
            $min = min($invs);
            $max = max($invs);
        } else {
            $min = $max = 0;
        }
        display_notification(sprintf(_("%s recurrent invoice(s) created, # %s - # %s."), count($invs), $min, $max));
        if (count($invs) > 0) {
            $ar = array('PARAM_0' => $min . "-" . ST_SALESINVOICE, 'PARAM_1' => $max . "-" . ST_SALESINVOICE, 'PARAM_2' => "", 'PARAM_3' => 0, 'PARAM_4' => 0, 'PARAM_5' => "", 'PARAM_6' => $def_print_orientation);
            display_note(print_link(sprintf(_("&Print Recurrent Invoices # %s - # %s"), $min, $max), 107, $ar), 0, 1);
            $ar['PARAM_3'] = 1;
            // email
            display_note(print_link(sprintf(_("&Email Recurrent Invoices # %s - # %s"), $min, $max), 107, $ar), 0, 1);
        }
    } else {
        display_error(_("The entered date is not in fiscal year."));
    }
}
$result = get_recurrent_invoices();
start_form();
start_table(TABLESTYLE_NOBORDER);
start_row();
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:31,代码来源:create_recurrent_invoices.php

示例10: get_crm_category

{
    $row = get_crm_category($id);
    $sql = "SELECT COUNT(*) FROM " . TB_PREF . "crm_contacts WHERE type='" . $row['type'] . "' AND action='" . $row['action'] . "'";
    $result = db_query($sql, "check relations for crm_contacts failed");
    $contacts = db_fetch($result);
    return $contacts[0];
}
if ($Mode == 'Delete') {
    $cancel_delete = 0;
    if (key_in_crm_contacts($selected_id)) {
        $cancel_delete = 1;
        display_error(_("Cannot delete this category because there are contacts related to it."));
    }
    if ($cancel_delete == 0) {
        delete_crm_category($selected_id);
        display_notification(_('Category has been deleted'));
    }
    $Mode = 'RESET';
}
if ($Mode == 'RESET') {
    $selected_id = -1;
    $sav = get_post('show_inactive');
    unset($_POST);
    $_POST['show_inactive'] = $sav;
}
//-------------------------------------------------------------------------------------------------
$result = get_crm_categories(check_value('show_inactive'));
start_form();
start_table(TABLESTYLE, "width=70%");
$th = array(_("Category Type"), _("Category Subtype"), _("Short Name"), _("Description"), "", " ");
inactive_control_column($th);
开发者ID:nativebandung,项目名称:frontaccounting,代码行数:31,代码来源:crm_categories.php

示例11: display_error

    }
    if (key_in_foreign_table($type, 'chart_master', 'account_type')) {
        display_error(_("Cannot delete this account group because GL accounts have been created referring to it."));
        return false;
    }
    if (key_in_foreign_table($type, 'chart_types', 'parent')) {
        display_error(_("Cannot delete this account group because GL account groups have been created referring to it."));
        return false;
    }
    return true;
}
//-----------------------------------------------------------------------------------
if ($Mode == 'Delete') {
    if (can_delete($selected_id)) {
        delete_account_type($selected_id);
        display_notification(_('Selected account group has been deleted'));
    }
    $Mode = 'RESET';
}
if ($Mode == 'RESET') {
    $selected_id = "";
    $_POST['id'] = $_POST['name'] = '';
    unset($_POST['parent']);
    unset($_POST['class_id']);
}
//-----------------------------------------------------------------------------------
$result = get_account_types(check_value('show_inactive'));
start_form();
start_table(TABLESTYLE);
$th = array(_("Group ID"), _("Group Name"), _("Subgroup Of"), _("Class"), "", "");
inactive_control_column($th);
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:31,代码来源:gl_account_types.php

示例12: update_requisition_detail

    }
    if ($input_error != 1) {
        if ($selected_id != -1) {
            update_requisition_detail($selected_id, $_POST['item_code'], $_POST['purpose'], $_POST['order_quantity'], input_num('estimate_price'));
            display_notification(_('Selected requisition details has been updated.'));
        } else {
            add_requisition_detail($_POST['requisitionid'], $_POST['item_code'], $_POST['purpose'], $_POST['order_quantity'], input_num('estimate_price'));
            display_notification(_('New requisition details has been added'));
        }
        $Mode = 'RESET';
    }
}
//-----------------------------------------------------------------------------------
if ($Mode == 'Delete') {
    delete_requisition_detail($selected_id);
    display_notification(_('Selected requisition detail has been deleted'));
    $Mode = 'RESET';
}
if ($Mode == 'RESET') {
    $selected_id = -1;
    $sav = get_post('show_inactive');
    $requisitionid = $_POST['requisitionid'];
    unset($_POST);
    $_POST['requisitionid'] = $requisitionid;
}
//-----------------------------------------------------------------------------------
$result = get_one_requisition(get_post('requisitionid'));
start_table(TABLESTYLE, "width=50%");
$th = array(_("Point of use"), _("Narrative"), _("Application Date"), _("Completation"));
inactive_control_column($th);
table_header($th);
开发者ID:blestab,项目名称:frontaccounting,代码行数:31,代码来源:requisition_details.php

示例13: add_item_purchasing_data

    }
    if ($input_error == 0) {
        if ($Mode == 'ADD_ITEM') {
            add_item_purchasing_data($_POST['supplier_id'], $_POST['stock_id'], input_num('price', 0), $_POST['suppliers_uom'], input_num('conversion_factor'), $_POST['supplier_description']);
            display_notification(_("This supplier purchasing data has been added."));
        } else {
            update_item_purchasing_data($selected_id, $_POST['stock_id'], input_num('price', 0), $_POST['suppliers_uom'], input_num('conversion_factor'), $_POST['supplier_description']);
            display_notification(_("Supplier purchasing data has been updated."));
        }
        $Mode = 'RESET';
    }
}
//--------------------------------------------------------------------------------------------------
if ($Mode == 'Delete') {
    delete_item_purchasing_data($selected_id, $_POST['stock_id']);
    display_notification(_("The purchasing data item has been sucessfully deleted."));
    $Mode = 'RESET';
}
if ($Mode == 'RESET') {
    $selected_id = -1;
}
if (isset($_POST['_selected_id_update'])) {
    $selected_id = $_POST['selected_id'];
    $Ajax->activate('_page_body');
}
if (list_updated('stock_id')) {
    $Ajax->activate('price_table');
}
//--------------------------------------------------------------------------------------------------
if (!@$_GET['popup']) {
    start_form();
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:31,代码来源:purchasing_data.php

示例14: display_notification

        }
        display_notification($note);
        $Mode = 'RESET';
    }
}
if ($Mode == 'Delete') {
    $cancel_delete = 0;
    // PREVENT DELETES IF DEPENDENT RECORDS IN ''
    /*if (key_in_foreign_table($selected_id, 'cust_branch', 'group_no'))
    	{
    		$cancel_delete = 1;
    		display_error(_("Cannot delete this group because customers have been created using this group."));
    	} */
    if ($cancel_delete == 0) {
        delete_item_level($selected_id);
        display_notification(_('Selected book level has been deleted'));
    }
    //end if Delete group
    $Mode = 'RESET';
}
if ($Mode == 'RESET') {
    $selected_id = -1;
    $sav = get_post('show_inactive');
    unset($_POST);
    if ($sav) {
        $_POST['show_inactive'] = 1;
    }
}
$result = get_item_level(check_value('show_inactive'));
start_form();
start_table(TABLESTYLE, "width=30%");
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:31,代码来源:levels.php

示例15: handle_cancel_order

function handle_cancel_order()
{
    global $path_to_root, $Ajax;
    if ($_SESSION['Items']->trans_type == ST_CUSTDELIVERY) {
        display_notification(_("Direct delivery entry has been cancelled as requested."), 1);
        submenu_option(_("Enter a New Sales Delivery"), "/sales/sales_order_entry.php?NewDelivery=1");
    } elseif ($_SESSION['Items']->trans_type == ST_SALESINVOICE) {
        display_notification(_("Direct invoice entry has been cancelled as requested."), 1);
        submenu_option(_("Enter a New Sales Invoice"), "/sales/sales_order_entry.php?NewInvoice=1");
    } elseif ($_SESSION['Items']->trans_type == ST_SALESQUOTE) {
        if ($_SESSION['Items']->trans_no != 0) {
            delete_sales_order(key($_SESSION['Items']->trans_no), $_SESSION['Items']->trans_type);
        }
        display_notification(_("This sales quotation has been cancelled as requested."), 1);
        submenu_option(_("Enter a New Sales Quotation"), "/sales/sales_order_entry.php?NewQuotation=Yes");
    } else {
        // sales order
        if ($_SESSION['Items']->trans_no != 0) {
            $order_no = key($_SESSION['Items']->trans_no);
            if (sales_order_has_deliveries($order_no)) {
                close_sales_order($order_no);
                display_notification(_("Undelivered part of order has been cancelled as requested."), 1);
                submenu_option(_("Select Another Sales Order for Edition"), "/sales/inquiry/sales_orders_view.php?type=" . ST_SALESORDER);
            } else {
                delete_sales_order(key($_SESSION['Items']->trans_no), $_SESSION['Items']->trans_type);
                display_notification(_("This sales order has been cancelled as requested."), 1);
                submenu_option(_("Enter a New Sales Order"), "/sales/sales_order_entry.php?NewOrder=Yes");
            }
        } else {
            processing_end();
            meta_forward($path_to_root . '/index.php', 'application=orders');
        }
    }
    processing_end();
    display_footer_exit();
}
开发者ID:blestab,项目名称:frontaccounting,代码行数:36,代码来源:sales_order_entry.php


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