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


PHP get_customer函数代码示例

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


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

示例1: sendShippingConfirmEmail

function sendShippingConfirmEmail($order_id)
{
    $customer = get_customer(get_customer_id($order_id));
    $customer_name = $customer['firstName'] . ' ' . $customer['lastName'];
    $customer_email = $customer['emailAddress'];
    $order = get_order($order_id);
    $order_date = strtotime($order['orderDate']);
    $order_date = date('M j, Y', $order_date);
    $order_items = get_order_items($order_id);
    $ship_date = date('M j, Y', strtotime($order['shipDate']));
    $shipping_address = get_address($order['shipAddressID']);
    $ship_line1 = $shipping_address['line1'];
    $ship_line2 = $shipping_address['line2'];
    $ship_city = $shipping_address['city'];
    $ship_state = $shipping_address['state'];
    $ship_zip = $shipping_address['zipCode'];
    $ship_phone = $shipping_address['phone'];
    $copyright_date = date("Y");
    set_time_limit(0);
    $messageHTML = <<<HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- the head section -->
<head>
    <title>My Guitar Shop: Shipping Confirmation</title>
    <style>
    /* the styles for the HTML elements */
    body {
        margin-top: 0;
        background-color: rgb(128, 141, 159);
        font-family: Arial, Helvetica, sans-serif;
    }
    h1 {
        font-size: 150%;
        margin: 0;
        padding: .5em 0 .25em;
    }
    h2 {
        font-size: 120%;
        margin: 0;
        padding: .5em 0 .25em;
    }
    h1, h2 {
        color: rgb(205, 163, 94);
    }

    ul {
        margin: 0 0 1em 0;
        padding: 0 0 0 2.5em;
    }
    li {
        margin: 0;
        padding: .25em;
    }
    a {
        color: rgb(69, 85, 106);   
        font-weight: bold;

    }
    a:hover {
        color: blue;
    }
    p {
        margin: 0;
        padding: .25em 0;
    }

    form {
        margin: .5em 0;
        width: 100%;
    }
    label {
        width: 8em;
        padding-right: .5em;
        padding-bottom: .5em;
        text-align: right;
        float: left;
    }
    textarea {
        width: 25em;
        margin-bottom: .5em;
    }
    table {
        border-collapse: collapse;
    }
    td, th {
        margin: 0;
        padding: .15em 0;
    }
    br {
        clear: both;
    }

    /* the styles for the div tags that divide the page into sections */
    #page {
        width: 850px;
        margin: 0 auto;
        background-color: white;
        border: 1px solid rgb(119, 75, 77);
//.........这里部分代码省略.........
开发者ID:hessemanj2100,项目名称:guitar_shop,代码行数:101,代码来源:email.php

示例2: intval

        $bill_state = $billing_address['state'];
        $bill_zip = $billing_address['zipCode'];
        $bill_phone = $billing_address['phone'];
        include 'order.php';
        break;
    case 'set_ship_date':
        $order_id = intval($_POST['order_id']);
        set_ship_date($order_id);
        $url = '?action=view_order&order_id=' . $order_id;
        sendShippingConfirmEmail($order_id);
        redirect($url);
    case 'confirm_delete':
        // Get order data
        $order_id = intval($_POST['order_id']);
        $order = get_order($order_id);
        $order_date = date('M j, Y', strtotime($order['orderDate']));
        // Get customer data
        $customer = get_customer($order['customerID']);
        $name = $customer['lastName'] . ', ' . $customer['firstName'];
        $email = $customer['emailAddress'];
        include 'confirm_delete.php';
        break;
    case 'delete':
        $order_id = intval($_POST['order_id']);
        delete_order($order_id);
        redirect('.');
        break;
    default:
        display_error("Unknown order action: " . $action);
        break;
}
开发者ID:hessemanj2100,项目名称:guitar_shop,代码行数:31,代码来源:index.php

示例3: die

<?php

if (!defined('sugarEntry') || !sugarEntry) {
    die('Not A Valid Entry Point');
}
if (isset($_POST['id']) && isset($_POST['type'])) {
    $id = isset($_POST['id']) ? htmlspecialchars($_POST['id']) : "";
    $type = isset($_POST['type']) ? htmlspecialchars($_POST['type']) : "";
    $arrHT = get_hotel($id, $type);
    $arrCus = get_customer($id);
    $allData = array('hotels' => json_encode($arrHT), 'customer' => json_encode($arrCus));
    $allData = json_encode($allData);
    echo $allData;
}
function get_hotel($id = '', $type = '')
{
    global $db;
    if ($type == 'ob') {
        $query = "SELECT id, NAME FROM hotels \r\n            WHERE id IN(SELECT\r\n            tours_hote9da4shotels_idb\r\n            FROM tours_hotels_c WHERE tours_hote943flstours_ida IN( SELECT tour_id FROM groupprograms WHERE id='" . $id . "'))";
    } else {
        if ($type == 'dos' || $type == 'ib') {
            $query = "SELECT NAME,id FROM hotels\r\n            WHERE id IN(SELECT\r\n            parent_id\r\n            FROM groupsprogramslines\r\n            WHERE parent = 'Hotels'\r\n            AND groupprogram_id = '" . $id . "'\r\n            AND deleted = 0) AND deleted =0 ";
        }
    }
    $result = $db->query($query);
    while ($row = $db->fetchByAssoc($result)) {
        $arrHT[] = array('id' => $row['id'], 'name' => $row['NAME']);
    }
    return $arrHT;
}
function get_customer($id = '')
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:31,代码来源:GetDatabase.php

示例4: get_customer

<?php

require_once './header.php';
require_once './db.php';
if ($_POST) {
    $error = NULL;
    try {
        if (isset($_POST['customer_id'])) {
            $charge = Stripe_Charge::create(array('customer' => $_POST['customer_id'], 'amount' => 53500, 'currency' => 'usd', 'description' => 'Single quote purchase after login'));
        } else {
            if (isset($_POST['stripeToken'])) {
                // Simple uniqueness check on the email address
                $existing_customer = get_customer($_POST['email']);
                if ($existing_customer) {
                    throw new Exception("That e-mail address already exists");
                }
                if (isset($_POST['subscription_purchase'])) {
                    $customer = Stripe_Customer::create(array('card' => $_POST['stripeToken'], 'email' => $_POST['email'], 'plan' => 'monthly'));
                } else {
                    $customer = Stripe_Customer::create(array('card' => $_POST['stripeToken'], 'email' => $_POST['email']));
                    $charge = Stripe_Charge::create(array('customer' => $customer->id, 'amount' => 53500, 'currency' => 'usd', 'description' => 'Single quote purchase'));
                }
                create_customer($_POST['email'], $_POST['password'], $customer->id);
            } else {
                throw new Exception("The Stripe Token or customer was not generated correctly");
            }
        }
    } catch (Exception $e) {
        $error = $e->getMessage();
    }
    if ($error == NULL) {
开发者ID:NiiMartey,项目名称:stripe-wilde-things,代码行数:31,代码来源:charge.php

示例5: get_searchedcustomers

     if ($lastName == NULL || $lastName == FALSE) {
         $error = "Missing or incorrect customer ID.";
         include '../errors/error.php';
     } else {
         $customers = get_searchedcustomers($lastName);
         include 'customer_list.php';
     }
 } else {
     if ($action == 'customer_update') {
         $customerID = filter_input(INPUT_POST, 'customerID', FILTER_VALIDATE_INT);
         if ($customerID == NULL || $customerID == FALSE) {
             $error = "Missing or incorrect customer ID.";
             include '../errors/error.php';
         } else {
             $countrys = get_countrys();
             $customer = get_customer($customerID);
             include 'customer_update.php';
         }
     } else {
         if ($action == 'delete_customer') {
             $techID = filter_input(INPUT_POST, 'techID', FILTER_VALIDATE_INT);
             if ($techID == NULL || $techID == FALSE) {
                 $error = "Missing or incorrect customer ID.";
                 include '../errors/error.php';
             } else {
                 delete_technician($techID);
                 header("Location: .?action=list_customer");
             }
         } else {
             if ($action == 'show_add_form') {
                 include 'customer_add.php';
开发者ID:ReneeHuh,项目名称:PHPSchoolProject,代码行数:31,代码来源:index.php

示例6: delete

 public function delete($rest, $id)
 {
     $req = $rest->request();
     $info = $req->post();
     $cust = get_customer($id);
     if ($cust == null) {
         api_error(400, 'Invalid Customer ID');
     }
     delete_customer($id);
     $cust = null;
     $cust = get_customer($id);
     if ($cust != null) {
         api_error(500, 'Could Not Delete from Database');
     } else {
         api_success_response("Customer has been deleted");
     }
 }
开发者ID:M-Shahbaz,项目名称:FrontAccountingSimpleAPI,代码行数:17,代码来源:Customers.php

示例7: details2

            } else {
                $OUTPUT = details2($_POST);
            }
            break;
        default:
            if (isset($_GET['cusnum'])) {
                $OUTPUT = slctacc($_GET);
            } else {
                $OUTPUT = "<li> - Invalid use of module.</li>";
            }
    }
} else {
    if (isset($_GET['cusnum'])) {
        $OUTPUT = slctacc($_GET);
    } else {
        $OUTPUT = get_customer();
    }
}
# Get templete
require "../template.php";
function get_customer()
{
    db_connect();
    $get_cust = "SELECT * FROM customers WHERE div = '" . USER_DIV . "' ORDER BY surname";
    $run_cust = db_exec($get_cust) or errDie("Unable to get customer information.");
    if (pg_numrows($run_cust) < 1) {
        return "\n\t\t\t\t\t<li class='err'>No Customers Could Be Found.</li>" . mkQuickLinks(ql("../core/trans-new.php", "Journal Transactions"), ql("../customers-new.php", "New Customer"), ql("../customers-view.php", "View Customers"));
    } else {
        $customer_drop = "<select name='cusnum'>";
        while ($carr = pg_fetch_array($run_cust)) {
            $customer_drop .= "<option value='{$carr['cusnum']}'>{$carr['surname']}</option>";
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:31,代码来源:record-debtor-trans.php

示例8: mysql_query

//echo $query;
$result = mysql_query($query);
$num = mysql_numrows($result);
$group_name = mysql_result($result, $i, "group_name");
//$task_start=mysql_result($result,$i,"task_start");
//$task_end=mysql_result($result,$i,"task_end");
mysql_close();
$i = 0;
echo "<font face=verdana size=2 color=gray><b>Manage Tab Headings</b></font><table border=1 cellpadding=0 cellspacing=0 bordercolor=#E5E5E5><tr><td><table border=0 cellpadding=3 cellspacing=2 width=600>";
echo "<font face=verdana size=1><form method=post action=admHeadingManager.php>Filter:<br><input class=inputv type='text' name='filt' value='" . $_GET['filt'] . "'> <input type=submit value='Filter'>";
while ($i < $num) {
    $group_name = mysql_result($result, $i, "group_name");
    $group_id = mysql_result($result, $i, "table_id");
    $customer_id = mysql_result($result, $i, "customer_id");
    echo "<tr><td bgcolor=#E5E5E5><font face=verdana size=1><a href=admHeadingManager.php?group={$group_name}&group_id={$group_id}&filt=" . $_GET['filt'] . ">{$group_name}</a></td>";
    echo "<td bgcolor=#E5E5E5><font face=verdana size=1>" . get_customer($customer_id) . "</td>";
    echo "<td width=10 bgcolor=#E5E5E5><font face=verdana size=1>[<a href=admHeadingManager.php?del={$group_id}&filt=" . $_GET['filt'] . ">DEL</a>]</td></tr>";
    $i++;
}
echo "<tr><form method=get action=admHeadingManager.php><td><font face=verdana size=1><table border=0><tr><td><font size=1>Name:<br><input class=inputv type='text' name='add' value='" . $_GET['group'] . "'></td><Br>";
echo "<td valign=top><font size=1>Customer:<br><select name=customer_id class=inputv>";
//echo "<input type=hidden name=filt value='".$_GET['filt']."'>";
mysql_connect("localhost", "root", "testme");
@mysql_select_db("emc_v2") or die("Unable to select database");
$iv = 0;
$query = "SELECT * FROM customer_table";
$resultv = mysql_query($query);
$numv = mysql_numrows($resultv);
while ($iv < $numv) {
    $customer_id = mysql_result($resultv, $iv, "table_id");
    $customer_name = mysql_result($resultv, $iv, "customer_name");
开发者ID:subrock,项目名称:emc,代码行数:31,代码来源:admHeadingManager.php

示例9: get_technicians_with_count

     } else {
         $technicians = get_technicians_with_count();
         include 'technician_select.php';
     }
 } else {
     if ($action == 'incident_assign') {
         $incidentID = filter_input(INPUT_POST, 'incidentID');
         $techID = filter_input(INPUT_POST, 'techID');
         $techfullname = filter_input(INPUT_POST, 'techfullname');
         if ($incidentID == NULL || $incidentID == FALSE || $techID == NULL || $techID == FALSE || $techfullname == NULL || $techfullname == FALSE) {
             $error = "Missing or incorrect huh ID.";
             include '../errors/error.php';
         } else {
             $incident = get_incident($incidentID);
             $custid = $incident['customerID'];
             $cust = get_customer($custid);
             $custfullname = $cust['firstName'] . " " . $cust['lastName'];
             include 'incident_assign.php';
         }
     } else {
         if ($action == 'assign') {
             $incidentID = filter_input(INPUT_POST, 'incidentID');
             $techID = filter_input(INPUT_POST, 'techID');
             if ($incidentID == NULL || $incidentID == FALSE || $techID == NULL || $techID == FALSE) {
                 $error = "Missing or incorrect huh ID.";
                 include '../errors/error.php';
             } else {
                 //assign_incident($incidentID,$techID);
                 $message = "This incident was assigned to a technician";
                 include 'incident_assign.php';
             }
开发者ID:ReneeHuh,项目名称:PHPSchoolProject,代码行数:31,代码来源:index.php

示例10: edd_unset_error

    if ($email_error = has_edd_error('invalid_email')) {
        $email_error_class = 'error';
        edd_unset_error('invalid_email');
    }
}
$fn_error_class = '';
if ($fn_error = has_edd_error('invalid_first_name')) {
    $fn_error_class = 'error';
    edd_unset_error('invalid_first_name');
}
$ln_error_class = '';
if ($ln_error = has_edd_error('invalid_last_name')) {
    $ln_error_class = 'error';
    edd_unset_error('invalid_last_name');
}
$customer = get_customer();
?>
<fieldset id="edd_checkout_user_info">
	<span><legend><?php 
echo apply_filters('edd_checkout_personal_info_text', __('Personal Info', 'yoast-theme'));
?>
</legend></span>

	<p id="edd-first-name-wrap">
		<label class="edd-label <?php 
echo $fn_error_class;
?>
" for="edd_first">
			<?php 
_e('First Name', 'yoast-theme');
?>
开发者ID:apsolut,项目名称:Yoast-theme-public,代码行数:31,代码来源:input-user-info.php

示例11: get_customer

<?php

require_once '../../../util/main.php';
require_once '../../../model/database.php';
require_once '../../../model/customer_db.php';
if (isset($_GET['customerID'])) {
    $customer = get_customer($_GET['customerID']);
} else {
    exit;
}
?>

<div class="modal-header">
    <h3 class="modal-title">
        Customer Information
    </h3>
</div>

<div class="modal-body">
    <div class="row">
        <div class="col-sm-12 col-md-12">
            <form class="form-horizontal">
                <fieldset>
                    <div class="form-group">
                        <label class="control-label col-sm-4"><strong>Username</strong></label>
                        <div class="col-sm-8">
                            <p class="form-control-static">
                                <strong><?php 
echo $customer['userName'];
?>
</strong>
开发者ID:sonialin,项目名称:kconlineorder,代码行数:31,代码来源:customer_view.php

示例12: get_customer

<?php

require_once './header.php';
require_once './db.php';
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $error = false;
    try {
        if (isset($_POST['customer_id'])) {
            $charge = \Stripe\Charge::create(array('customer' => $_POST['customer_id'], 'amount' => 53500, 'currency' => 'usd', 'description' => 'Single quote purchase after login'));
        } else {
            if (isset($_POST['stripeToken'])) {
                // Simple uniqueness check on the email address
                $existing_customer = get_customer($_POST['stripeEmail']);
                if ($existing_customer) {
                    throw new Exception("That e-mail address already exists");
                }
                if (isset($_POST['ticket_type'])) {
                    $customer = \Stripe\Customer::create(array('source' => $_POST['stripeToken'], 'email' => $_POST['stripeEmail']));
                    if ($_POST['ticket_type'] == 'player_ticket') {
                        $charge = \Stripe\Charge::create(array('customer' => $customer->id, 'amount' => 7000, 'currency' => 'gbp', 'description' => 'Player Ticket'));
                    } else {
                        $charge = \Stripe\Charge::create(array('customer' => $customer->id, 'amount' => 1700, 'currency' => 'gbp', 'description' => 'Crew Ticket'));
                    }
                } else {
                    throw new Exception("No ticket type supplied");
                }
                create_customer($_POST['stripeEmail'], $_POST['password'], $customer->id);
            } else {
                throw new Exception("The Stripe Token or customer was not generated correctly");
            }
        }
开发者ID:yodathedark,项目名称:moltis-tickets,代码行数:31,代码来源:charge.php

示例13: header

    header("Location:step4.php");
}
if (isset($_POST['formType']) && $_POST['formType'] == 'login') {
    if (empty($_POST['username']) || empty($_POST['password'])) {
        $login_error = 'You must enter your username or password';
    } else {
        try {
            $sql = 'SELECT userID, userName, status, cFlag, password FROM users WHERE userName = :uname LIMIT 1';
            $prestmt = $db->prepare($sql);
            $prestmt->bindValue(':uname', $_POST['username']);
            $prestmt->execute();
            $user = $prestmt->fetch();
            $userlogin = $_POST['username'];
            $userpwd = $_POST['password'];
            if (password_verify($userpwd, $user['password']) && $user['status'] == 'E' && $user['cFlag'] == '1') {
                $customer = get_customer($user['userID']);
                $_SESSION['customer'] = $customer;
                header("Location: step4.php");
            } else {
                $login_error = 'Your username or password was incorrect';
            }
        } catch (PDOException $e) {
            display_db_error($e->getMessage());
        }
    }
}
$user = array();
if (isset($_POST['formType']) && $_POST['formType'] == 'signup') {
    $user['username'] = $_POST['username'];
    $user['email'] = $_POST['email'];
    $user['password'] = $_POST['password'];
开发者ID:Byambatsog,项目名称:kconlineorder,代码行数:31,代码来源:step3.php

示例14: get_order_customer

function get_order_customer($order_summary)
{
    $cust_summary = get_customer($order_summary['id_customer']);
    $cust_addr = get_customer_invoice_address($order_summary['id_address_invoice']);
    $name = !empty($cust_addr['company']) ? $cust_addr['company'] : $cust_addr['lastname'] . " " . $cust_addr['firstname'];
    $customer = new KontrahentFlyweightBuilder($name, $cust_addr['postcode'], $cust_addr['city']);
    if (!empty($cust_addr['vat_number'])) {
        $customer->NIP($cust_addr['vat_number']);
    }
    if (!empty($cust_addr['address1'])) {
        $address = $cust_addr['address1'];
        if (!empty($cust_addr['address2'])) {
            $address .= ' ' . $cust_addr['address2'];
        }
        $customer->Ulica($address);
    }
    if (!empty($cust_addr['phone'])) {
        $customer->Telefon($cust_addr['phone']);
    }
    if (!($cust_summary['company'] != $cust_addr['company'] || $cust_summary['lastname'] != $cust_addr['lastname'])) {
        if (!empty($cust_summary['id_customer'])) {
            $customer->Identyfikator('IFI' . $cust_summary['id_customer']);
        }
    }
    return $customer;
}
开发者ID:s-neilo,项目名称:ifirma-api-sklepy,代码行数:26,代码来源:ifirma_functions.php

示例15: customer_settings

function customer_settings($selected_id)
{
    global $SysPrefs, $path_to_root, $auto_create_branch;
    if (!$selected_id) {
        if (list_updated('customer_id') || !isset($_POST['CustName'])) {
            $_POST['CustName'] = $_POST['cust_ref'] = $_POST['address'] = $_POST['tax_id'] = '';
            $_POST['dimension_id'] = 0;
            $_POST['dimension2_id'] = 0;
            $_POST['sales_type'] = -1;
            $_POST['curr_code'] = get_company_currency();
            $_POST['credit_status'] = -1;
            $_POST['payment_terms'] = $_POST['notes'] = '';
            $_POST['discount'] = $_POST['pymt_discount'] = percent_format(0);
            $_POST['credit_limit'] = price_format($SysPrefs->default_credit_limit());
        }
    } else {
        $myrow = get_customer($selected_id);
        $_POST['CustName'] = $myrow["name"];
        $_POST['cust_ref'] = $myrow["debtor_ref"];
        $_POST['address'] = $myrow["address"];
        $_POST['tax_id'] = $myrow["tax_id"];
        $_POST['dimension_id'] = $myrow["dimension_id"];
        $_POST['dimension2_id'] = $myrow["dimension2_id"];
        $_POST['sales_type'] = $myrow["sales_type"];
        $_POST['curr_code'] = $myrow["curr_code"];
        $_POST['credit_status'] = $myrow["credit_status"];
        $_POST['payment_terms'] = $myrow["payment_terms"];
        $_POST['discount'] = percent_format($myrow["discount"] * 100);
        $_POST['pymt_discount'] = percent_format($myrow["pymt_discount"] * 100);
        $_POST['credit_limit'] = price_format($myrow["credit_limit"]);
        $_POST['notes'] = $myrow["notes"];
        $_POST['inactive'] = $myrow["inactive"];
    }
    start_outer_table(TABLESTYLE2);
    table_section(1);
    table_section_title(_("Name and Address"));
    text_row(_("Customer Name:"), 'CustName', $_POST['CustName'], 40, 80);
    text_row(_("Customer Short Name:"), 'cust_ref', null, 30, 30);
    textarea_row(_("Address:"), 'address', $_POST['address'], 35, 5);
    text_row(_("GSTNo:"), 'tax_id', null, 40, 40);
    if (!$selected_id || is_new_customer($selected_id)) {
        currencies_list_row(_("Customer's Currency:"), 'curr_code', $_POST['curr_code']);
    } else {
        label_row(_("Customer's Currency:"), $_POST['curr_code']);
        hidden('curr_code', $_POST['curr_code']);
    }
    sales_types_list_row(_("Sales Type/Price List:"), 'sales_type', $_POST['sales_type']);
    if ($selected_id) {
        record_status_list_row(_("Customer status:"), 'inactive');
    } elseif (isset($auto_create_branch) && $auto_create_branch == 1) {
        table_section_title(_("Branch"));
        text_row(_("Phone:"), 'phone', null, 32, 30);
        text_row(_("Secondary Phone Number:"), 'phone2', null, 32, 30);
        text_row(_("Fax Number:"), 'fax', null, 32, 30);
        email_row(_("E-mail:"), 'email', null, 35, 55);
        sales_persons_list_row(_("Sales Person:"), 'salesman', null);
    }
    table_section(2);
    table_section_title(_("Sales"));
    percent_row(_("Discount Percent:"), 'discount', $_POST['discount']);
    percent_row(_("Prompt Payment Discount Percent:"), 'pymt_discount', $_POST['pymt_discount']);
    amount_row(_("Credit Limit:"), 'credit_limit', $_POST['credit_limit']);
    payment_terms_list_row(_("Payment Terms:"), 'payment_terms', $_POST['payment_terms']);
    credit_status_list_row(_("Credit Status:"), 'credit_status', $_POST['credit_status']);
    $dim = get_company_pref('use_dimension');
    if ($dim >= 1) {
        dimensions_list_row(_("Dimension") . " 1:", 'dimension_id', $_POST['dimension_id'], true, " ", false, 1);
    }
    if ($dim > 1) {
        dimensions_list_row(_("Dimension") . " 2:", 'dimension2_id', $_POST['dimension2_id'], true, " ", false, 2);
    }
    if ($dim < 1) {
        hidden('dimension_id', 0);
    }
    if ($dim < 2) {
        hidden('dimension2_id', 0);
    }
    if ($selected_id) {
        start_row();
        echo '<td class="label">' . _('Customer branches') . ':</td>';
        hyperlink_params_td($path_to_root . "/sales/manage/customer_branches.php", '<b>' . (@$_REQUEST['popup'] ? _("Select or &Add") : _("&Add or Edit ")) . '</b>', "debtor_no=" . $selected_id . (@$_REQUEST['popup'] ? '&popup=1' : ''));
        end_row();
    }
    textarea_row(_("General Notes:"), 'notes', null, 35, 5);
    if (!$selected_id && isset($auto_create_branch) && $auto_create_branch == 1) {
        table_section_title(_("Branch"));
        locations_list_row(_("Default Inventory Location:"), 'location');
        shippers_list_row(_("Default Shipping Company:"), 'ship_via');
        sales_areas_list_row(_("Sales Area:"), 'area', null);
        tax_groups_list_row(_("Tax Group:"), 'tax_group_id', null);
    }
    end_outer_table(1);
    div_start('controls');
    if (!$selected_id) {
        submit_center('submit', _("Add New Customer"), true, '', 'default');
    } else {
        submit_center_first('submit', _("Update Customer"), _('Update customer data'), @$_REQUEST['popup'] ? true : 'default');
        submit_return('select', $selected_id, _("Select this customer and return to document entry."));
        submit_center_last('delete', _("Delete Customer"), _('Delete customer data if have been never used'), true);
    }
//.........这里部分代码省略.........
开发者ID:pthdnq,项目名称:ivalley-svn,代码行数:101,代码来源:customers.php


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