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

PHP force_page函数代码示例

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

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



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

示例1: check_acl

function check_acl($db, $module, $page)
{
    $uid = $_SESSION['login_id'];
    /* get group id */
    $q = 'SELECT ' . PRFX . 'CONFIG_EMPLOYEE_TYPE.TYPE_NAME
			FROM ' . PRFX . 'TABLE_EMPLOYEE,' . PRFX . 'CONFIG_EMPLOYEE_TYPE 
			WHERE ' . PRFX . 'TABLE_EMPLOYEE.EMPLOYEE_TYPE  = ' . PRFX . 'CONFIG_EMPLOYEE_TYPE.TYPE_ID AND EMPLOYEE_ID=' . $db->qstr($uid);
    if (!($rs = $db->execute($q))) {
        force_page('core', 'error&error_msg=Could not get Group ID for user');
        exit;
    } else {
        $gid = $rs->fields['TYPE_NAME'];
    }
    /* check page to see if we have access */
    if (!isset($module)) {
        $page = "core:main";
    } else {
        $page = $module . ":" . $page;
    }
    $q = 'SELECT ' . $gid . ' as ACL FROM ' . PRFX . 'ACL WHERE page=' . $db->qstr($page);
    if (!($rs = $db->execute($q))) {
        force_page('core', 'error&error_msg=Could not get Page ACL');
        exit;
    } else {
        $acl = $rs->fields['ACL'];
        if ($acl != 1) {
            return false;
        } else {
            return true;
        }
    }
}
开发者ID:jewelhuq,项目名称:myitcrm1,代码行数:32,代码来源:acl.php


示例2: display_workorder_status2

function display_workorder_status2($db, $wo_id)
{
    $sql = "SELECT " . PRFX . "TABLE_WORK_ORDER_STATUS.*, " . PRFX . "TABLE_EMPLOYEE.EMPLOYEE_DISPLAY_NAME \n\t\t\t\tFROM " . PRFX . "TABLE_WORK_ORDER_STATUS, " . PRFX . "TABLE_EMPLOYEE \n\t\t\t\tWHERE  " . PRFX . "TABLE_WORK_ORDER_STATUS.WORK_ORDER_ID=" . $db->qstr($wo_id) . " \n\t\t\t\tAND " . PRFX . "TABLE_EMPLOYEE.EMPLOYEE_ID = " . PRFX . "TABLE_WORK_ORDER_STATUS.WORK_ORDER_STATUS_ENTER_BY ORDER BY " . PRFX . "TABLE_WORK_ORDER_STATUS.WORK_ORDER_STATUS_ID";
    if (!($result = $db->Execute($sql))) {
        force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1&type=database');
        exit;
    }
    $work_order_status2 = $result->GetArray();
    return $work_order_status2;
}
开发者ID:jewelhuq,项目名称:myitcrm1,代码行数:10,代码来源:include.php


示例3: date_format_call

function date_format_call($db)
{
    $q = 'SELECT * FROM ' . PRFX . 'TABLE_COMPANY';
    if (!($rs = $db->execute($q))) {
        force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1&type=database');
        exit;
    } else {
        $date_format = $rs->fields['COMPANY_DATE_FORMAT'];
        return $date_format;
    }
}
开发者ID:jewelhuq,项目名称:myitcrm1,代码行数:11,代码来源:include.php


示例4: display_closed

function display_closed($db, $page_no, $smarty)
{
    global $smarty;
    // Define the number of results per page
    $max_results = 25;
    // Figure out the limit for the Execute based
    // on the current page number.
    $from = $page_no * $max_results - $max_results;
    $sql = "SELECT \n\t\t\t" . PRFX . "TABLE_WORK_ORDER.WORK_ORDER_ID, \n\t\t\t" . PRFX . "TABLE_WORK_ORDER.WORK_ORDER_OPEN_DATE,\n\t\t\t" . PRFX . "TABLE_WORK_ORDER.WORK_ORDER_ASSIGN_TO,\n\t\t\t" . PRFX . "TABLE_WORK_ORDER.WORK_ORDER_SCOPE, \n\t\t\t" . PRFX . "TABLE_WORK_ORDER.WORK_ORDER_CLOSE_DATE,\n\t\t\t" . PRFX . "TABLE_CUSTOMER.*, \n\t\t\t" . PRFX . "TABLE_EMPLOYEE.EMPLOYEE_ID, \n\t\t\t" . PRFX . "TABLE_EMPLOYEE.EMPLOYEE_DISPLAY_NAME, \n\t\t\t" . PRFX . "TABLE_EMPLOYEE.EMPLOYEE_WORK_PHONE, \n\t\t\t" . PRFX . "TABLE_EMPLOYEE.EMPLOYEE_HOME_PHONE, \n\t\t\t" . PRFX . "TABLE_EMPLOYEE.EMPLOYEE_MOBILE_PHONE, \n\t\t\t" . PRFX . "CONFIG_WORK_ORDER_STATUS.CONFIG_WORK_ORDER_STATUS\n\t\t\tFROM " . PRFX . "TABLE_WORK_ORDER\n\t\t\tLEFT JOIN " . PRFX . "TABLE_CUSTOMER ON " . PRFX . "TABLE_WORK_ORDER.CUSTOMER_ID = " . PRFX . "TABLE_CUSTOMER.CUSTOMER_ID\n\t\t\tLEFT JOIN " . PRFX . "TABLE_EMPLOYEE ON " . PRFX . "TABLE_WORK_ORDER.WORK_ORDER_ASSIGN_TO = " . PRFX . "TABLE_EMPLOYEE.EMPLOYEE_ID\n\t\t\tLEFT JOIN " . PRFX . "CONFIG_WORK_ORDER_STATUS ON " . PRFX . "TABLE_WORK_ORDER.WORK_ORDER_CURRENT_STATUS = " . PRFX . "CONFIG_WORK_ORDER_STATUS.CONFIG_WORK_ORDER_STATUS_ID\n\t\t\tWHERE WORK_ORDER_STATUS=" . $db->qstr(6) . " GROUP BY " . PRFX . "TABLE_WORK_ORDER.WORK_ORDER_ID ORDER BY " . PRFX . "TABLE_WORK_ORDER.WORK_ORDER_ID DESC LIMIT {$from}, {$max_results}";
    if (!($rs = $db->Execute($sql))) {
        force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1&type=database');
        exit;
    } else {
        $work_order = $rs->GetArray();
    }
    // Figure out the total number of results in DB:
    $q = "SELECT COUNT(*) as Num FROM " . PRFX . "TABLE_WORK_ORDER WHERE WORK_ORDER_STATUS=" . $db->qstr(6);
    if (!($results = $db->Execute($q))) {
        force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1&type=database');
        exit;
    }
    if (!($total_results = $results->FetchRow())) {
        force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1&type=database');
        exit;
    } else {
        $smarty->assign('total_results', $total_results['Num']);
    }
    // Figure out the total number of pages. Always round up using ceil()
    $total_pages = ceil($total_results["Num"] / $max_results);
    $smarty->assign('total_pages', $total_pages);
    // Assign the first page
    if ($page_no > 1) {
        $prev = $page_no - 1;
    }
    // Build Next Link
    if ($page_no < $total_pages) {
        $next = $page_no + 1;
    }
    $smarty->assign('name', $name);
    $smarty->assign('page_no', $page_no);
    $smarty->assign("previous", $prev);
    $smarty->assign("next", $next);
    return $work_order;
}
开发者ID:jewelhuq,项目名称:myitcrm1,代码行数:44,代码来源:view_closed.php


示例5: gateway_xml2php

<?php

// Load the Expense Functions
require_once 'include.php';
// Load the Translations for this Module
if (!xml2php('expense')) {
    $smarty->assign('error_msg', "Error in language file");
}
$expenseID = $VAR['expenseID'];
// Load PHP Language Translations
$langvals = gateway_xml2php('expense');
// Make sure we got an Expense ID number
if (!isset($expenseID) || $expenseID == "") {
    $smarty->assign('results', 'Please go back and select an expense record');
    die;
}
// Delete the expense function call
if (!delete_expense($db, $expenseID)) {
    force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1&type=database');
    exit;
} else {
    force_page('expense', 'search&page_title=' . $langvals['expense_search_title']);
    exit;
}
开发者ID:jewelhuq,项目名称:myitcrm1,代码行数:24,代码来源:delete.php


示例6: gateway_xml2php

<?php

// Load the Expense Functions
require_once 'include.php';
// Load the Translations for this Module
if (!xml2php('expense')) {
    $smarty->assign('error_msg', "Error in language file");
}
// Load PHP Language Translations
$langvals = gateway_xml2php('expense');
// Load expense details
$expense_details = display_expense_info($db, $VAR['expenseID']);
// If details submitted run update values, if not set load edit.tpl and populate values
if (isset($VAR['submit'])) {
    if (!update_expense($db, $VAR)) {
        force_page('expense', 'edit&error_msg=Falied to Update Expense Information&expenseID=' . $VAR['expenseID']);
        exit;
    } else {
        force_page('expense', 'expense_details&expenseID=' . $VAR['expenseID'] . '&page_title=' . $langvals['expense_details_title']);
        exit;
    }
} else {
    $smarty->assign('expense_details', $expense_details);
    $smarty->display('expense' . SEP . 'edit.tpl');
}
开发者ID:jewelhuq,项目名称:myitcrm1,代码行数:25,代码来源:edit.php


示例7: gateway_xml2php

require_once 'include.php';
// Load the Translation for this Module
if (!xml2php('refund')) {
    $smarty->assign('error_msg', "Error in language file");
}
// Load PHP Language Translations
$langvals = gateway_xml2php('refund');
$last_record_id = last_record_id_lookup($db);
$new_record_id = $last_record_id + 1;
// If details submitted insert record, if non submitted load new.tpl and populate values
if (isset($VAR['submit']) || isset($VAR['submitandnew'])) {
    if ($run != insert_new_refund($db, $VAR)) {
        $smarty->assign('error_msg', 'Falied to insert Refund');
        $smarty->display('core' . SEP . 'error.tpl');
        echo "refund insert error";
    } else {
        if (isset($VAR['submitandnew'])) {
            // Submit New Refund and reload page
            force_page('refund', 'new&page_title=');
            exit;
        } else {
            // Submit and load Refund View Details
            force_page('refund', 'refund_details&refundID=' . $new_record_id . '&page_title=' . $langvals['refund_details_title']);
            exit;
        }
    }
} else {
    $smarty->assign('new_record_id', $new_record_id);
    $smarty->assign('tax_rate', $tax_rate);
    $smarty->display('refund' . SEP . 'new.tpl');
}
开发者ID:jewelhuq,项目名称:myitcrm1,代码行数:31,代码来源:new.php


示例8: employee_type

function employee_type($db)
{
    $q = "SELECT * FROM " . PRFX . "CONFIG_EMPLOYEE_TYPE";
    if (!($rs = $db->Execute($q))) {
        force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1&type=database');
        exit;
    } else {
        $arr = $rs->GetArray();
        return $arr;
    }
}
开发者ID:jewelhuq,项目名称:myitcrm1,代码行数:11,代码来源:include.php


示例9: force_page

<?php

require_once "include.php";
if (!xml2php("customer")) {
    $smarty->assign('error_msg', "Error in language file");
}
if (isset($VAR['submit'])) {
    if (!($customer_id = insert_new_customer($db, $VAR))) {
        $smarty->assign('error_msg', 'Falied to insert customer');
        $smarty->display('core' . SEP . 'error.tpl');
    } else {
        force_page('customer', 'customer_details&customer_id=' . $customer_id . '&msg=Added New Customer ' . $VAR["displayName"] . ' &page_title=' . $VAR["displayName"]);
        exit;
    }
} else {
    $smarty->display('customer' . SEP . 'new.tpl');
}
开发者ID:jewelhuq,项目名称:myitcrm1,代码行数:17,代码来源:new.php


示例10: force_page

<?php

require_once "include.php";
if (empty($VAR['wo_id'])) {
    force_page('core', 'error&error_msg=No Work Order ID');
    exit;
}
if (isset($VAR['submit'])) {
    if (!update_status($db, $VAR)) {
        force_page('core', 'error&error_msg=Falied to update work order status');
        exit;
    } else {
        force_page('workorder', 'view&wo_id=' . $VAR['wo_id'] . '&page_title=Work%20Order%20ID%20' . $VAR['wo_id']);
        exit;
    }
} else {
    $smarty->assign('wo_id', $VAR['wo_id']);
    $smarty->display('workorder' . SEP . 'new_status.tpl');
}
开发者ID:jewelhuq,项目名称:myitcrm1,代码行数:19,代码来源:new_status.php


示例11: force_page

$q = "INSERT INTO " . PRFX . "TABLE_WORK_ORDER_STATUS SET\n\t\t\t\tWORK_ORDER_ID\t\t\t\t\t= " . $db->qstr($wo_id) . ",\n\t\t\t\tWORK_ORDER_STATUS_DATE \t\t= " . $db->qstr(time()) . ",\n\t\t\t\tWORK_ORDER_STATUS_NOTES \t\t= " . $db->qstr($memo) . ",\n\t\t\t\tWORK_ORDER_STATUS_ENTER_BY\t= " . $db->qstr($_SESSION['login_id']);
if (!($rs = $db->execute($q))) {
    force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1');
    exit;
}
/* check status */
$q = "SELECT WORK_ORDER_STATUS FROM " . PRFX . "TABLE_WORK_ORDER WHERE WORK_ORDER_ID=" . $db->qstr($wo_id);
if (!($rs = $db->execute($q))) {
    force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1&type=database');
    exit;
}
if ($rs->fields['WORK_ORDER_STATUS'] != '6') {
    /* check if we have a schedule */
    $q = "SELECT count(*) as count  FROM " . PRFX . "TABLE_SCHEDULE WHERE WORK_ORDER_ID=" . $db->qstr($wo_id);
    if (!($rs = $db->execute($q))) {
        force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1&type=database');
        exit;
    }
    if ($rs->fields['count'] == 1) {
        $status = '2';
    } else {
        $status = '1';
    }
    $q = "UPDATE " . PRFX . "TABLE_WORK_ORDER SET WORK_ORDER_CURRENT_STATUS =" . $db->qstr($status) . ", LAST_ACTIVE=" . $db->qstr(time()) . " WHERE WORK_ORDER_ID = " . $db->qstr($wo_id);
    if (!($rs = $db->execute($q))) {
        force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1&type=database');
        exit;
    }
}
force_page('workorder', 'view&wo_id=' . $wo_id . '&page_title=Work%20Order%20ID%20' . $wo_id);
开发者ID:jewelhuq,项目名称:myitcrm1,代码行数:30,代码来源:update.php


示例12: force_page

$partsID = $VAR['partsID'];
// Labour Delete Record
if (isset($VAR['deleteType']) && $VAR['deleteType'] == "labourRecord") {
    // Delete the labour record Function call
    if (!delete_labour_record($db, $labourID)) {
        force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1&type=database');
        exit;
    } else {
        force_page('invoice', 'new&invoice_id=' . $invoice_id . '&wo_id=' . $wo_id . '&page_title=' . $langvals['invoice_invoice'] . '&customer_id=' . $customer_id);
        exit;
    }
}
// Parts Delete Record
if (isset($VAR['deleteType']) && $VAR['deleteType'] == "partsRecord") {
    // Delete the labour record Function call
    if (!delete_parts_record($db, $partsID)) {
        force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1&type=database');
        exit;
    } else {
        force_page('invoice', 'new&invoice_id=' . $invoice_id . '&wo_id=' . $wo_id . '&page_title=' . $langvals['invoice_invoice'] . '&customer_id=' . $customer_id);
        exit;
    }
}
// Delete Invoice
if (!delete_invoice($db, $invoice_id, $customer_id, $login)) {
    force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1&type=database');
    exit;
} else {
    force_page('invoice', 'view_paid&page_title=Paid%20Invoices');
    exit;
}
开发者ID:jewelhuq,项目名称:myitcrm1,代码行数:31,代码来源:delete.php


示例13: display_memo

function display_memo($db, $customer_id)
{
    $q = "SELECT * FROM " . PRFX . "CUSTOMER_NOTES WHERE CUSTOMER_ID=" . $db->qstr($customer_id);
    if (!($rs = $db->execute($q))) {
        force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1&type=database');
        exit;
    }
    $arr = $rs->GetArray();
    return $arr;
}
开发者ID:jewelhuq,项目名称:myitcrm1,代码行数:10,代码来源:include.php


示例14: force_page

    $smarty->assign('DD_BSB', $DD_BSB);
    $smarty->assign('DD_ACC', $DD_ACC);
    $smarty->assign('DD_INS', $DD_INS);
    $smarty->assign('DD_BANK', $DD_BANK);
    $smarty->assign('CHECK_PAYABLE', $CHECK_PAYABLE);
    $smarty->assign('PAYMATE_LOGIN', $PAYMATE_LOGIN);
    $smarty->assign('company', $company);
    $smarty->assign('company2', $company2);
    //$smarty->assign('CURRENCY_CODE',$CURRENCY_CODE);
    //$smarty->assign('currency_sym',$currency_sym);
    $smarty->assign('country', $country);
    $smarty->assign('pamount', $pamount);
    $smarty->assign('paymate_amt', $paymate_amt);
    $smarty->assign('PAYMATE_FEES', $PAYMATE_FEES);
    $smarty->assign('parts_sub_total_sum', $parts_sub_total_sum);
    $smarty->assign('labour_sub_total_sum', $labour_sub_total_sum);
    $smarty->assign('wo_description', $wo_description);
    $smarty->assign('wo_resolution', $wo_resolution);
    $smarty->display('invoice' . SEP . 'print_html.tpl');
} else {
    // EOF HTML Printing Section
    // BOF PDF Printing Section
    if ($print_type == 'pdf') {
        require_once FILE_ROOT . 'templates/invoice/print_pdf_tpl.php';
        //This loads the PDF template file
    } else {
        force_page('core', "error&menu=1&error_msg=No Printing Options set. Please set up printing options in the Control Center.&type=error");
        exit;
    }
}
// EOF PDF Printing Section
开发者ID:jewelhuq,项目名称:myitcrm1,代码行数:31,代码来源:print.php


示例15: list

    if (!insert_new_schedule($db, $VAR)) {
        /* If db insert fails send em the error */
        $day = $VAR['start']['schedule_date'];
        $start_time = $VAR['start']['Time_Hour'] . ":" . $VAR['start']['Time_Minute'] . " " . $VAR['start']['Time_Meridian'];
        $notes = $VAR['schedule_notes'];
        $end_time = $VAR['end']['Time_Hour'] . ":" . $VAR['end']['Time_Minute'] . " " . $VAR['end']['Time_Meridian'];
        $smarty->assign('end_time', $end_time);
        $smarty->assign('start_day', $day);
        $smarty->assign('start_time', $start_time);
        $smarty->assign('schedule_notes', $notes);
        $smarty->assign('tech', $VAR['tech']);
        $smarty->assign('wo_id', $VAR['wo_id']);
        $smarty->display("schedule/new.tpl");
        //force_page('schedule','main&y='.$s_year.'&d='.$s_month.'&m='.$s_day.'&wo_id='.$VAR['wo_id'].'&page_title=schedule&tech='.$VAR['tech']);
    } else {
        //list($s_day, $s_month, $s_year) = split('[/.-]', $VAR['start']['SCHEDULE_date']);
        list($s_month, $s_day, $s_year) = split('[/.-]', $VAR['start']['SCHEDULE_date']);
        force_page('schedule', 'main&y=' . $s_year . '&d=' . $s_month . '&m=' . $s_day . '&wo_id=' . $VAR['wo_id'] . '&page_title=schedule&tech=' . $VAR['tech']);
    }
} else {
    // Load html form to smarty
    $start_time = $VAR['starttime'];
    $day = $VAR['day'];
    $wo_id = $VAR['wo_id'];
    $tech = $VAR['tech'];
    $smarty->assign('tech', $tech);
    $smarty->assign('wo_id', $wo_id);
    $smarty->assign('start_day', $day);
    $smarty->assign('start_time', $start_time);
    $smarty->display('schedule' . SEP . 'new.tpl');
}
开发者ID:jewelhuq,项目名称:myitcrm1,代码行数:31,代码来源:new.php


示例16: delete_invoice

function delete_invoice($db, $invoice_id, $customer_id, $login)
{
    //Actual Deletion Function from Invoice Table
    $q = "DELETE FROM " . PRFX . "TABLE_INVOICE WHERE INVOICE_ID=" . $db->qstr($invoice_id);
    if (!($rs = $db->Execute($q))) {
        force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1&type=database');
        exit;
    } else {
        return true;
    }
    // TODO - Add transaction log to database
    /*
        $q = "INSERT INTO ".PRFX."TABLE_TRANSACTION ( TRANSACTION_ID, DATE, TYPE, INVOICE_ID, WORKORDER_ID, CUSTOMER_ID, MEMO, AMOUNT ) VALUES,
             ( NULL, ".$db->qstr(time()).",'6',".$db->qstr($invoice_id).",'0',".$db->qstr($customer_id).",'Invoice Deleted By ".$db->qstr($login).",'0.00');";
    
        if (!$rs = $db->Execute($q)) {
            force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1&type=database');
            exit;
        }*/
}
开发者ID:jewelhuq,项目名称:myitcrm1,代码行数:20,代码来源:include.php


示例17: force_page

        force_page('billing', 'new&wo_id=' . $workorder_id . '&customer_id=' . $customer_id . '&invoice_id=' . $invoice_id . '&error_msg=You can not bill more than the amount of the invoice.');
        exit;
    }
    if ($invoice_details['INVOICE_AMOUNT'] == $deposit_amount) {
        /* insert Transaction */
        $memo = "Full Deposit Payment Made of {$currency_sym}{$deposit_amount}, Deposit ID#: {$deposit_recieved}, Deposit Memo: {$deposit_memo}";
        $q = "INSERT INTO " . PRFX . "TABLE_TRANSACTION SET\n\t\t\tDATE \t\t\t= " . $db->qstr(time()) . ",\n\t\t\tTYPE \t\t\t= '6',\n\t\t\tINVOICE_ID              = " . $db->qstr($invoice_id) . ",\n\t\t\tWORKORDER_ID            = " . $db->qstr($workorder_id) . ",\n\t\t\tCUSTOMER_ID             = " . $db->qstr($customer_id) . ",\n\t\t\tMEMO \t\t\t= " . $db->qstr($memo) . ",\n\t\t\tAMOUNT\t\t\t= " . $db->qstr($deposit_amount);
        if (!($rs = $db->execute($q))) {
            force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1');
            exit;
        }
        /* update the invoice */
        $q = "UPDATE " . PRFX . "TABLE_INVOICE SET\n\t\t\tPAID_DATE  \t\t= " . $db->qstr(time()) . ", \n\t\t\tPAID_AMOUNT \t\t= " . $db->qstr($deposit_amount) . ",\n\t\t\tINVOICE_PAID\t\t= '1',\n\t\t\tBALANCE \t\t= " . $db->qstr(0.0) . "\n\t\t\tWHERE INVOICE_ID \t= " . $db->qstr($invoice_id);
        if (!($rs = $db->execute($q))) {
            force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1');
            exit;
        }
        /* update work order */
        $q = "INSERT INTO " . PRFX . "TABLE_WORK_ORDER_STATUS SET\n\t\t\tWORK_ORDER_ID\t\t\t= " . $db->qstr($workorder_id) . ",\n\t\t\tWORK_ORDER_STATUS_DATE \t\t= " . $db->qstr(time()) . ",\n\t\t\tWORK_ORDER_STATUS_NOTES \t= " . $db->qstr($memo) . ",\n\t\t\tWORK_ORDER_STATUS_ENTER_BY\t= " . $db->qstr($_SESSION['login_id']);
        if (!($rs = $db->execute($q))) {
            force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1');
            exit;
        }
        $q = "UPDATE " . PRFX . "TABLE_WORK_ORDER SET\n\t\t\tWORK_ORDER_STATUS\t\t\t= '6',\n\t\t\tWORK_ORDER_CURRENT_STATUS \t= '8'\n\t\t\tWHERE WORK_ORDER_ID \t\t=\t" . $db->qstr($workorder_id);
        if (!($rs = $db->execute($q))) {
            force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1');
            exit;
        }
        force_page('invoice', "view&invoice_id={$invoice_id}&customer_id={$customer_id}");
    }
}
开发者ID:jewelhuq,项目名称:myitcrm1,代码行数:31,代码来源:proc_deposit.php


示例18: parts_sub_total_sum

    $parts_sub_total_sum = parts_sub_total_sum($db, $invoice['INVOICE_ID']);
    $smarty->assign('labour_sub_total_sum', $labour_sub_total_sum);
    $smarty->assign('parts_sub_total_sum', $parts_sub_total_sum);
    $smarty->display('invoice' . SEP . 'new.tpl');
    // If discount is greate than 100% then these close WO and mark the invoice as paid
    if ($VAR['discount'] >= 100) {
        $q = "UPDATE " . PRFX . "TABLE_WORK_ORDER SET\n                                WORK_ORDER_STATUS\t\t= '6',\n                                WORK_ORDER_CURRENT_STATUS \t= '8'\n                                WHERE WORK_ORDER_ID \t\t=" . $db->qstr($wo_id);
        if (!($rs = $db->execute($q))) {
            force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1');
            exit;
        }
    }
    if ($VAR['discount'] >= 100) {
        /* update the invoice */
        $q = "UPDATE " . PRFX . "TABLE_INVOICE SET\n                                PAID_DATE  \t\t= " . $db->qstr(time()) . ",\n                                PAID_AMOUNT \t\t= '0',\n                                INVOICE_PAID\t\t= '1'\n                                WHERE INVOICE_ID \t= " . $db->qstr($VAR['invoice_id']);
        if (!($rs = $db->execute($q))) {
            force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1');
            exit;
        }
    }
}
##################################
# If We have a Submit2 		 #
##################################
if (isset($submit2) && $wo_id != "0") {
    $q = "UPDATE " . PRFX . "TABLE_WORK_ORDER SET\n\t\t\tWORK_ORDER_STATUS\t\t= '6',\n\t\t\tWORK_ORDER_CURRENT_STATUS \t= '8'\n\t\t\tWHERE WORK_ORDER_ID \t\t=" . $db->qstr($wo_id);
    if (!($rs = $db->execute($q))) {
        force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1');
        exit;
    }
}
开发者ID:jewelhuq,项目名称:myitcrm1,代码行数:31,代码来源:new.php


示例19: unlink

        unlink($target_path);*/
    } else {
        $users = array($email_from => $employee_details['EMPLOYEE_FIRST_NAME']);
        //Generate Replacements
        $replacements = array();
        foreach ($users as $email => $user) {
            $replacements[$email] = array('{name}' => $employee_details['EMPLOYEE_FIRST_NAME'], '{sig}' => $sig);
        }
        $decorator = new Swift_Plugins_DecoratorPlugin($replacements);
        $mailer->registerPlugin($decorator);
        $message = Swift_Message::newInstance($email_subject)->setFrom(array($email_from => $employee_details['EMPLOYEE_FIRST_NAME']))->setTo($users)->setBody($message_body, 'text/html');
        //Send the message
        $numSent = $mailer->send($message);
        //Display how many messages were sent
        echo "<script>alert('Successfully Sent {$numSent} message')</script>";
        echo "<script>navigate('?page=customer:email&customer_id=" . $c2 . "&page_title=Email Customer')</script>";
        //Show what file was uploaded
        //printf("File Location", $fname2);
        //Assign the variables with smarty
        $smarty->assign('email_subject', $email_subject);
        $smarty->assign('email_from', $email_from);
        $smarty->assign('email_to', $email_to);
        $smarty->assign('message_body', $message_body);
        $smarty->assign('rr', $rr);
        $smarty->assign('file_download', $file_download);
        // EOF Email Message details
        force_page('customer', "email&customer_id=" . $c2 . "&page_title=Email Customer");
    }
}
///Display the template we will use
$smarty->display('customer' . SEP . 'email.tpl');
开发者ID:jewelhuq,项目名称:myitcrm1,代码行数:31,代码来源:email.php


示例20: force_page

            exit;
        }
        force_page('billing', 'new&wo_id=' . $workorder_id . '&customer_id=' . $customer_id . '&invoice_id=' . $invoice_id . '&page_title=Billing&error_msg=' . $result[3]);
        exit;
    } else {
        if ($result[0] == "3") {
            /* insert Transaction */
            $memo = "ERROR: " . $result[3] . " Card Number: {$cc_num} TRANS ID: " . $result[37];
            $q = "INSERT INTO " . PRFX . "TABLE_TRANSACTION SET\n\t\t\tDATE \t\t\t= " . $db->qstr(time()) . ",\n\t\t\tTYPE \t\t\t= '1',\n\t\t\tINVOICE_ID \t\t= " . $db->qstr($invoice_id) . ",\n\t\t\tWORKORDER_ID            = " . $db->qstr($workorder_id) . ",\n\t\t\tCUSTOMER_ID \t\t= " . $db->qstr($customer_id) . ",\n\t\t\tMEMO \t\t\t= " . $db->qstr($memo) . ",\n\t\t\tAMOUNT\t\t\t= " . $db->qstr($cc_amount);
            if (!($rs = $db->execute($q))) {
                force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1');
                exit;
            }
            force_page('billing', 'new&wo_id=' . $workorder_id . '&customer_id=' . $customer_id . '&invoice_id=' . $invoice_id . '&page_title=Billing&error_msg=' . $result[3]);
            exit;
        } else {
            if ($result[0] == "4") {
                /* insert Transaction */
                $memo = "ERROR: " . $result[3] . " Card Number: {$cc_num} TRANS ID: " . $result[37];
                $q = "INSERT INTO " . PRFX . "TABLE_TRANSACTION SET\n\t\t\tDATE \t\t\t= " . $db->qstr(time()) . ",\n\t\t\tTYPE \t\t\t= '1',\n\t\t\tINVOICE_ID \t\t= " . $db->qstr($invoice_id) . ",\n\t\t\tWORKORDER_ID            = " . $db->qstr($workorder_id) . ",\n\t\t\tCUSTOMER_ID \t\t= " . $db->qstr($customer_id) . ",\n\t\t\tMEMO \t\t\t= " . $db->qstr($memo) . ",\n\t\t\tAMOUNT\t\t\t= " . $db->qstr($cc_amount);
                if (!($rs = $db->execute($q))) {
                    force_page('core', 'error&error_msg=MySQL Error: ' . $db->ErrorMsg() . '&menu=1');
                    exit;
                }
                force_page('billing', 'new&wo_id=' . $workorder_id . '&customer_id=' . $customer_id . '&invoice_id=' . $invoice_id . '&page_title=Billing&error_msg=' . $result[3]);
                exit;
            } else {
            }
        }
    }
}
开发者ID:jewelhuq,项目名称:myitcrm1,代码行数:31,代码来源:proc_cc.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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