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


PHP customer::getCustomersCount方法代碼示例

本文整理匯總了PHP中customer::getCustomersCount方法的典型用法代碼示例。如果您正苦於以下問題:PHP customer::getCustomersCount方法的具體用法?PHP customer::getCustomersCount怎麽用?PHP customer::getCustomersCount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在customer的用法示例。


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

示例1: customer

$customer = new customer();
if (isset($_GET['action']) && $_GET['action'] == 'custinvmarkpaid') {
    $id = $_GET['id'];
    $invoice = $customer->getCustomersInvoice($id);
    $smarty->assign('invoice', $customer->getCustomersInvoice($id));
    $smarty->assign('content', $smarty->fetch('custinvmarkpaid.tpl'));
} elseif (isset($_POST['action']) && $_POST['action'] == 'markpaid') {
    $data = $_POST;
    if ($customer->markInvoicedPaid($data)) {
        header('Location: ' . FRONTEND . 'custrevenue.php');
        exit;
    }
} elseif (isset($_GET['action']) && $_GET['action'] == 'invoicelist') {
    $id = $_GET['id'];
    $smarty->assign('customer', $customer->getCustomer($id));
    $smarty->assign('invoices', $customer->getCustomersInvoices($id));
    $smarty->assign('content', $smarty->fetch('custinvoicelist.tpl'));
} else {
    $page = 0;
    if (isset($_GET['page'])) {
        $page = $_GET['page'];
    }
    $customers = $customer->getCustomers($page, $offset = 10);
    $smarty->assign('customercount', $customer->getCustomersCount());
    $smarty->assign('page', $page);
    $smarty->assign('customer', $customers);
    $smarty->assign('content', $smarty->fetch('custrevenue.tpl'));
}
$smarty->assign('action', 'customer');
$smarty->assign('toolbar', $smarty->fetch('toolbar.tpl'));
$smarty->display('two-column-left.html');
開發者ID:roshanbhgt,項目名稱:erp,代碼行數:31,代碼來源:custrevenue.php

示例2: get_form_html

function get_form_html($form_id, $id, $page, $limit, $adjacents)
{
    ob_start();
    $customer = new customer();
    $user = new user();
    $user->id = $_SESSION['user_id'];
    $user->getUser();
    $count = $customer->getCustomersCount($user->company_id);
    if ($page == 1) {
        $start = 0;
        $head_message = "LAST {$limit} CUSTOMERS";
    } else {
        $start = ($page - 1) * $limit;
        $head_message = "CUSTOMERS {$start} TO " . ($start + $limit);
    }
    ?>
    <div id="head_div" style="padding: 5px 0; background-color: #ECECEC;  color: #21ACD7;
         border-radius: 5px;margin-left: auto; text-align: center; ">
        <?php 
    echo $head_message;
    ?>
    </div>
    <div style="margin-top: 10px; background-color:transparent;padding-bottom: 30px;">
        <style>
            div#purchace_items td{
                border: 1px solid #21ACD7;
            }
            div#purchace_items tbody td{
                padding: 5px 0 5px 5px;
            }
            div#purchace_items tbody td input,div#purchace_items tbody td select{
                padding: 0;
                border: 0;
                margin: 0;
                height: 100%;
                width: 100%;
                background-color: transparent;
            }
        </style>
        
        <div style="padding: 10px 0; background-color: transparent; 
             border-radius: 5px;margin-left: auto; text-align: center;overflow-x: auto; ">
             <?php 
    echo pagination($limit, $adjacents, $count, $page);
    ?>
        </div>
        
        <div id="purchace_items" style="width: 100%; padding: 10px 0; color: #21ACD7;">           
            <table id="items_table" style="border-collapse: collapse; width: 100%; 
                   background-color: #fff; border-radius: 10px;  color: #21ACD7;">
                <thead style="text-align: center;">
                    <tr  status="not_selected">
                        <td>
                            #
                        </td>
                        <td>
                            ID
                        </td>
                        <td>
                            CUSTOMER NAME
                        </td>
                        <td style="">
                            CONTACT NUMBER
                        </td>
                        <td style="">
                            TOTAL PURCHACE
                        </td>
                    </tr>
                </thead>
                <tbody style="padding-left: 3px; text-align: center; ">
                    <?php 
    $customers = $customer->getCustomersPaged($user->company_id, $start, $limit);
    $i = $start;
    if ($customers == NULL || sizeof($customers) == 0) {
        echo '<tr><td colspan="8"> No Customer Found </td></tr>';
    } else {
        foreach ($customers as $customer) {
            ?>
                        <tr id="<?php 
            echo $customer->id;
            ?>
"  onclick="select_row(this)" status="not_selected">
                            <td style="text-align: center;">
                                <?php 
            echo ++$i;
            ?>
                            </td>
                            <td>
                                <?php 
            echo $customer->id;
            ?>
                            </td>
                            <td id="customer_name"><?php 
            echo $customer->customer_name;
            ?>
</td>
                            <td id="contact_number"><?php 
            echo $customer->contact_number;
            ?>
</td>
//.........這裏部分代碼省略.........
開發者ID:sakkeerhussain,項目名稱:online_ims,代碼行數:101,代碼來源:21.php

示例3: elseif

} elseif (isset($_POST['action']) && $_POST['action'] == 'add') {
    $data = $_POST['data']['Customer'];
    if ($customer->addCustomer($data)) {
        header('Location: ' . FRONTEND . 'customer.php');
        exit;
    }
} elseif (isset($_POST['action']) && $_POST['action'] == 'update') {
    $data = $_POST['data']['Customer'];
    if ($customer->updateCustomer($data)) {
        header('Location: ' . FRONTEND . 'customer.php');
        exit;
    }
} elseif (isset($_GET['action']) && $_GET['action'] == 'search') {
    $keyword = $_POST['keywords'];
    $smarty->assign('customer', $customer->getSearchCustomers($keyword));
    $smarty->assign('content', $smarty->fetch('customerlist.tpl'));
} else {
    $page = 1;
    if (isset($_GET['page'])) {
        $page = $_GET['page'];
    }
    $customers = $customer->getCustomers($page, $offset = 10);
    $smarty->assign('customercount', $customer->getCustomersCount());
    $smarty->assign('page', $page);
    $smarty->assign('pagecount', ceil($customer->getCustomersCount() / $offset));
    $smarty->assign('customer', $customers);
    $smarty->assign('content', $smarty->fetch('customerlist.tpl'));
}
$smarty->assign('action', 'customer');
$smarty->assign('toolbar', $smarty->fetch('toolbar.tpl'));
$smarty->display('two-column-left.html');
開發者ID:roshanbhgt,項目名稱:erp,代碼行數:31,代碼來源:customer.php


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