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


PHP getCustomer函数代码示例

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


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

示例1: getCustomerIdentifiers

	/**
	 * Identify same "customer" as someone with the same customer id, or ip address or email address.
	 *
	 * @return array
	 */
	public function getCustomerIdentifiers()
	{
		$ip = getIp();
		$quote = getCustomerQuote();
		$customerid = $quote->getCustomerId();
		$email = $quote->getBillingAddress()->getEmail();
		if ($email == '') {
			$customer = getCustomer($customerid);
			$email = $customer['custconemail'];
		}

		$identifiers = array(
			$ip,
			$customerid,
			$email,
		);

		return $identifiers;
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:24,代码来源:class.coupon.php

示例2: getCustomer

        echo 'selected';
    }
    ?>
>Pending</option><option value="paid" <?php 
    if ($invo[0]['status'] == 'paid') {
        echo 'selected';
    }
    ?>
>Paid</option><option value="cancelled" <?php 
    if ($invo[0]['status'] == 'pending') {
        echo 'cancelled';
    }
    ?>
>Cancelled</option></select>
<label>Customer Name </label><input type="text" name="name" value="<?php 
    $cust = getCustomer($number);
    echo $cust[0]['cust_name'];
    ?>
" readonly >
<label>Invoice Number </label><input type="text" name="invoice" value="<?php 
    echo $number;
    ?>
"  readonly >
<label>Date issued </label><input type="date" name="date_issued" value="<?php 
    echo $invo[0]['date_issued'];
    ?>
" >
<label>Amount </label><input type="number" name="amount" value="<?php 
    echo $invo[0]['amount'];
    ?>
">
开发者ID:benkip,项目名称:Reservation-system,代码行数:31,代码来源:updateinvoice.php

示例3: getBarangAvail

<?php

include 'db/pdo.php';
$jumlah_tabung = $_GET['jumlah_tabung'];
$barangs = getBarangAvail();
$customers = getCustomer();
?>
<div id='customer' class="inner-faktur-choice"><span>Customer : </span>
<input type="text" name="pilih_customer" id="customer" list="datalist2" onchange="showCustomer(this.value)">
	<datalist id="datalist2">
	<?php 
foreach ($customers as $row) {
    ?>
	<option onclick="showCustomer(this.value)" value="<?php 
    echo $row['nama_cust'];
    ?>
"><?php 
    echo $row['nama_cust'];
    ?>
</option>
	<?php 
}
?>
	</datalist>
</div>
<?php 
for ($i = 1; $i <= $jumlah_tabung; $i++) {
    ?>

<div id='tabung-$i' class="inner-faktur-choice"><span>Tabung ke <?php 
    echo $i;
开发者ID:blackbone23,项目名称:stoktabunghendri,代码行数:31,代码来源:buat_faktur.php

示例4: getCustomer

                                        <div id="collapse2" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading2">
                                            <div class="panel-body">

                                    <?php 
}
?>

                                            <?php 
if (isset($_GET['phone'])) {
    ?>

                                                <?php 
    $phone = $_GET['phone'];
    ?>
                                                <?php 
    $customer = getCustomer($phone);
    ?>
                                                <?php 
    $customer = mysql_fetch_array($customer);
    ?>
                                            
                                                <form role="form" action="save-order-registered-customer.php" method="post">

                                                    <div class="form-group">
                                                        <label for="first-name">First Name</label>
                                                        <input readonly type="text" id="first-name" name="first-name" class="form-control" placeholder="First Name" value="<?php 
    echo $customer["first_name"];
    ?>
" required>
                                                    </div>
                                            
开发者ID:kaanburaksener,项目名称:bicycle-rent-app,代码行数:30,代码来源:add-new-order.php

示例5: foreach

		</form>
		
		<table class="adminTable col-100" cellspacing="0">
			<tr>
				<th>Order No.</th>
				<th>Date</th>
				<th>Discount</th>
				<th>Customer</th>
				<th class="col-m-0">Delivery Address</th>
				<th class="col-m-0">District</th>
				<th>Delivery Job</th>
			</tr>
			
			<?php 
foreach ($orders as $o) {
    $cust = getCustomer($o[custNo]);
    $dist = getDistrict($o[distNo]);
    echo '<tr>
							<td>' . $o[ordNo] . '</td>
							<td>' . $o[ordDate] . '</td>
							<td>' . $o[ordDiscount] . '</td>
							<td> <a href="cust_details.php?custNo=' . $cust[custName] . '">' . $cust[custName] . '</td>
							<td class="col-m-0">' . $o[deliAddr] . '</td>
							<td class="col-m-0">' . $dist[distName] . '</td>
							<td> <a href="job_details.php?jobNo=' . $o[jobNo] . '">' . $o[jobNo] . '</a></td>
						</tr>';
}
?>
			
		</table>
		
开发者ID:ahmanxdd,项目名称:WebProject,代码行数:30,代码来源:admin_order.php

示例6: foreach

        $invoice->having_and = "date_between";
        $filter_by_date = "yes";
        $having_and_count = 1;
    }
    $invoice->sort = "date";
    $invoice_all = $invoice->select_all();
    $invoices = $invoice_all->fetchAll();
    foreach ($invoices as $i => $row) {
        $statement['total'] = $statement['total'] + $row['invoice_total'];
        $statement['owing'] = $statement['owing'] + $row['owing'];
        $statement['paid'] = $statement['paid'] + $row['INV_PAID'];
    }
}
$sql = "select DISTINCT(custom_field3) from  " . TB_PREFIX . "invoices where custom_field3 != ''";
$cf3 = $db->query($sql);
$biller_details = getBiller($biller_id);
$customer_details = getCustomer($customer_id);
$smarty->assign('biller_id', $biller_id);
$smarty->assign('biller_details', $biller_details);
$smarty->assign('customer_id', $customer_id);
$smarty->assign('customer_details', $customer_details);
$smarty->assign('cf3', $cf3->fetchAll());
$smarty->assign('custom_field3', $custom_field3);
$smarty->assign('filter_by_date', $filter_by_date);
$smarty->assign('invoices', $invoices);
$smarty->assign('statement', $statement);
$smarty->assign('start_date', $start_date);
$smarty->assign('end_date', $end_date);
$smarty->assign('pageActive', 'report');
$smarty->assign('active_tab', '#home');
$smarty->assign('menu', $menu);
开发者ID:alachaum,项目名称:simpleinvoices,代码行数:31,代码来源:custom_field_3.php

示例7: logger

            logger($this)->addError("Mark a fulfillment as invalid", array('bidId' => $id));
            return internalError($response);
        }
        $response->getBody()->write(json_encode(array("code" => 200, "message" => "OK")));
        return $response;
    } catch (PDOException $e) {
        return handleError($e, $response);
    }
});
$app->post('/api/bids/place', function (Request $request, Response $response) {
    if (!array_key_exists('cst_session_id', $request->getCookieParams())) {
        logger($this)->addWarning('No contractor session id', getPath($request));
        return forbidden($response);
    }
    $customerSessionId = $request->getCookieParams()["cst_session_id"];
    $customer = getCustomer($customerSessionId);
    if (!isset($customer)) {
        logger($this)->addWarning('No contractor found by session id', array('cst_session_id' => $customerSessionId, 'uri' => $request->getUri()->getPath()));
        return forbidden($response);
    }
    $bid = json_decode($request->getBody());
    list($product, $amount, $price) = parseBid($bid);
    if (!isset($product)) {
        logger($this)->addWarning('Wrong bid', getPath($request));
        return badRequest($response);
    }
    $customerId = $customer['id'];
    if ($price > $customer['amount']) {
        logger($this)->addWarning("Customer doesn't have enough funds to place the bid with price", array('customer_id' => $customerId, 'price' => $price));
        return conflict($response);
    }
开发者ID:arteam,项目名称:orders-system,代码行数:31,代码来源:web.php

示例8: getCustomers

 *  - http://fakester.biz/
 *
 */
// And we're away
require_once "../app/Mage.php";
Mage::app();
// How many orders are we creating
$num_orders = (int) $_GET["orders"];
// Get some random customer information
$customers = getCustomers($num_orders);
// Create a few orders
for ($i = 1; $i <= $num_orders; $i++) {
    // Get random products
    $products = getProducts();
    // Get a customer
    $customer = getCustomer(array_pop($customers));
    // Order some mofo products for some mofo customer
    $order = createOrder($products, $customer);
    printf("Created order %s\n", $order->getIncrementId());
}
/*
 * Get random customer information from fakester.biz
 *
 * @return array
 */
function getCustomers($num_customers)
{
    $url = "http://fakester.biz/json?n={$num_customers}";
    $json = file_get_contents($url);
    $data = json_decode($json);
    /*
开发者ID:ashwanibhasin,项目名称:mage-test-orders,代码行数:31,代码来源:create_test_orders.php

示例9: redirect

<?php

// initialize
include_once '../../../common/init.php';
if (!isLoggedInAdmin()) {
    redirect('');
} else {
    // include needed database functions
    include_once $BASE_PATH . 'database/customers.php';
    include_once $BASE_PATH . 'database/sales.php';
    $id = $_GET['id'];
    // fetch data
    $customer = getCustomer($id);
    // send data to smarty
    $smarty->assign('customer', $customer);
    $smarty->assign('graph', getCustomerSalesGraph($id));
    // display smarty template
    $smarty->display('manager/customers/view_customer.tpl');
}
开发者ID:vascofg,项目名称:lbaw,代码行数:19,代码来源:view_customer.php

示例10: addValueArray

                 } else {
                     $user_assigned[$uid] = $uid;
                 }
             }
         }
     }
     addValueArray($field['var'], ${$field}['var']);
     break;
 case 'customer_id':
     if (!isset($_POST[$field['var']])) {
         ${$field}['var'] = 0;
     } else {
         ${$field}['var'] = (int) $_POST[$field['var']];
     }
     if (${$field}['var'] != 0) {
         $customer = getCustomer(${$field}['var']);
         if (!count($customer)) {
             $form_errors[] = __("Can't find the customer you tried to select") . ' (id ' . ${$field}['var'] . ')';
             ${$field}['var'] = '';
             $customer_name_ok = True;
             // Don't trigger the customer_name error
         } else {
             $customer_name = $customer['customer_name'];
             $customer_name_ok = True;
             // Don't trigger the customer_name error
         }
     } else {
         // Maybe just the customer_name is inserted?
         if (isset($_POST['customer_name']) && $_POST['customer_name'] != '') {
             // Trigger error...
             $customer_name_ok = False;
开发者ID:hnJaermuseet,项目名称:JM-booking,代码行数:31,代码来源:edit_entry2_datasubmit.php

示例11: user2custInfo

function user2custInfo($custNo)
{
    $user = getCustomer($custNo);
    $retArr = array("ID" => $user[custNo], "Name" => $user[custName], "Gender" => $user[custGender], "Date of Birth" => $user[custDOB], "Contact" => $user[custTel], "Address" => $user[custAddr], "District No" => $user[distNo]);
    return $retArr;
}
开发者ID:ahmanxdd,项目名称:WebProject,代码行数:6,代码来源:User.php

示例12: getCustomer

</div><!--end of header--->
<div style="clear: both;"></div>
<div id="content" class="content">
<h1>New Payment</h1>
<div class="main-content">
<div class="data-form">
<form action="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
" method="post">  
<label>Invoice Number :</label><input type="text" name="invoice_number" value="<?php 
    echo $invoice;
    ?>
"  readonly >
<label>Customer Name</label> <input type="text" name="name" value="<?php 
    $cust = getCustomer($invoice);
    echo $cust[0]['cust_name'];
    ?>
" readonly >
 <input type="hidden" name="invoice" value="<?php 
    echo $invoice;
    ?>
" >
 <label>Payment Date </label><input type="date" name="payment_date" id="from" value="<?php 
    echo date('m/d/Y');
    ?>
">
<label>Amount Paid </label><input type="number" name="amount">
<label>Payment Code</label> <input type="text" name="code" required>

<div class="controls">
开发者ID:benkip,项目名称:Reservation-system,代码行数:31,代码来源:addpayment.php

示例13: readEntryLog


//.........这里部分代码省略.........
                            if ($id == '0') {
                                $values[] = _('Nobody');
                            } else {
                                $thisone = getUser($id);
                                if (count($thisone)) {
                                    $values[] = $thisone['user_name'];
                                }
                            }
                        }
                        $return[] = _('Users assigned') . ' ' . $middlestring . ' <i>' . implode(', ', $values) . '</i>';
                    }
                    break;
                case 'user_assigned2':
                    if ($value == '') {
                        $return[] = _('Manual user assigned') . ' <i>' . _('not set') . '</i>';
                    } else {
                        $return[] = _('Manual user assigned') . ' ' . $middlestring . ' "' . $value . '"';
                    }
                    break;
                    /*
                    				 * Not in use...
                    				 case 'customer_name':
                    					$return .= _('Customer').' '.$middlestring.' "'.$value.'"';
                    					break;*/
                /*
                				 * Not in use...
                				 case 'customer_name':
                					$return .= _('Customer').' '.$middlestring.' "'.$value.'"';
                					break;*/
                case 'customer_id':
                    if ($value == 0) {
                        $return[] = _('Customer') . ' <i>' . _('not set') . '</i>';
                    } else {
                        $customer = getCustomer($value);
                        if (count($customer)) {
                            $return[] = _('Customer') . ' ' . $middlestring . ' <i>' . $customer['customer_name'] . '</i>';
                        } else {
                            $return[] = _('Customer ID') . ' ' . $middlestring . ' "' . $value . '"';
                        }
                    }
                    break;
                    /*
                    				 * Not in use...	
                    				case 'customer_municipal':
                    					$return .= _('Municipal').' '.$middlestring.' "'.$value.'"';
                    					break;*/
                /*
                				 * Not in use...	
                				case 'customer_municipal':
                					$return .= _('Municipal').' '.$middlestring.' "'.$value.'"';
                					break;*/
                case 'customer_municipal_num':
                    require "libs/municipals_norway.php";
                    if (isset($municipals[$value])) {
                        $return[] = _('Municipal') . ' ' . $middlestring . ' <i>' . $municipals[$value] . '</i>';
                    } elseif ($value == '') {
                        $return[] = _('Municipal') . ' <i>' . _('not set') . '</i>';
                    } else {
                        $return[] = _('Municipal') . ' ' . $middlestring . ' "' . $value . '"';
                    }
                    break;
                case 'contact_person_name':
                    if ($value == '') {
                        $return[] = _('Contact person') . ' <i>' . _('not set') . '</i>';
                    } else {
                        $return[] = _('Contact person') . ' ' . $middlestring . ' "' . $value . '"';
开发者ID:HNygard,项目名称:JM-booking,代码行数:67,代码来源:functions.inc.php

示例14: chr

     if ($listtype == 'servering') {
         echo '  <th style="vertical-align: bottom;">Alkohol?</th>' . chr(10);
         echo '  <th style="vertical-align: bottom;">' . __('Service description') . '</th>' . chr(10);
     }
     echo '  <th style="vertical-align: bottom;">' . __('Room') . '</th>' . chr(10);
 }
 echo ' </tr>' . chr(10);
 while ($R = mysql_fetch_assoc($Q)) {
     $entry = getEntryParseDatabaseArray($R);
     if ($listtype == 'customer_list') {
         if (isset($customer_list[$entry['customer_id']])) {
             $customer_list[$entry['customer_id']]['c'] += $entry['num_person_child'];
             $customer_list[$entry['customer_id']]['a'] += $entry['num_person_adult'];
             $customer_list[$entry['customer_id']]['e']++;
         } else {
             $customer_list[$entry['customer_id']] = getCustomer($entry['customer_id']);
             if (!count($customer_list[$entry['customer_id']])) {
                 $customer_list[$entry['customer_id']]['customer_id'] = $entry['customer_id'];
                 if ($entry['customer_id'] == 0) {
                     $customer_list[$entry['customer_id']]['customer_name'] = 'Ingen kunde valgt';
                 } else {
                     $customer_list[$entry['customer_id']]['customer_name'] = 'KUNDE IKKE FUNNET I DATABASE';
                 }
                 $customer_names[$entry['customer_id']] = '';
                 // Sort the unknowns to the top
             } else {
                 $customer_names[$entry['customer_id']] = $customer_list[$entry['customer_id']]['customer_name'];
             }
             $customer_list[$entry['customer_id']]['c'] = $entry['num_person_child'];
             $customer_list[$entry['customer_id']]['a'] = $entry['num_person_adult'];
             $customer_list[$entry['customer_id']]['e'] = 1;
开发者ID:hnJaermuseet,项目名称:JM-booking,代码行数:31,代码来源:entry_list.php

示例15: get_language

<?php

include_once ROOT . "includes/customers.php";
$lang = get_language();
$firstname = '';
$lastname = '';
$zip = '';
$city = '';
$address1 = '';
$address2 = '';
$email = '';
if (isset($_SESSION["user"])) {
    $customer = getCustomer($_SESSION["user"]->getCostumerId());
    if ($customer != null) {
        $firstname = $customer->getFirstname();
        $lastname = $customer->getLastname();
        if ($customer->getShippingAddress() != null) {
            $zip = $customer->getShippingAddress()->getZip();
            $city = $customer->getShippingAddress()->getCity();
            $address1 = $customer->getShippingAddress()->getAddress1();
            $address2 = $customer->getShippingAddress()->getAddress2();
        }
        $email = $customer->getEmail();
    }
}
echo "<form name=\"billingForm\" action=\"index.php?site=confirm\" onsubmit=\"return validateForm();\" method=\"post\">";
echo "<table class=\"address-form-table\">";
echo "<tr>";
echo "<td class=\"address-form-table-label\">{$AddressFirstnameLabel}: </td>";
echo "<td>";
echo "<input class=\"address-form-field\" type=\"text\" name=\"firstname\" value=\"{$firstname}\"  /input>";
开发者ID:nellen,项目名称:ch.bfh.bti7054.w2014.q.Web-Prophecies,代码行数:31,代码来源:billing.php


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