本文整理汇总了PHP中Customer::addCustomer方法的典型用法代码示例。如果您正苦于以下问题:PHP Customer::addCustomer方法的具体用法?PHP Customer::addCustomer怎么用?PHP Customer::addCustomer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Customer
的用法示例。
在下文中一共展示了Customer::addCustomer方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: anyConfirmed
/**
* Function to create the appointment, scrub the database, and send out an email confirmation
*
* User interaction is complete
*
**/
public function anyConfirmed()
{
// When this boolean is set to True, instead of deleting all appointment times for the package duration
// It will instead remove all times up to the end of the day, and continue to the next day until the package
// time is done.
$overlapDays = FALSE;
$info = Session::get('appointmentInfo');
$startTime = DateTime::createFromFormat('Y-m-d H:i', $info['datetime'])->format('Y-m-d H:i');
$endTime = new DateTime($info['datetime']);
date_add($endTime, date_interval_create_from_date_string($info['package_time'] . ' hours'));
$newCustomer = Customer::addCustomer();
$endTime = $endTime->format('Y-m-d H:i');
// Create the appointment with this new customer id
Appointment::addAppointment($newCustomer);
if ($overlapDays) {
// Remove hours up to the last hour of the day, then continue to the next day
// If necessary
// PSEUDO CODE
// We will get the last appointment of the day and see if it's smaller than the package time
// If the last appointment occurs beyond the package duration, we delete like normal
// If the last appointment occurs before the package duration
// We subtract the hours we remove from the package duration to get remaining time
// Then we go to the next day with appointment times and remove enough appointments
// To make clearance for the package duration.
} else {
// Remove all dates conflicting with the appointment duration
BookingDateTimes::timeBetween($startTime, $endTime)->delete();
}
return View::make('success');
}
示例2: DomOrder
$PASSWORD = $VAR['DIRECTI_PASSWORD'];
$PARENTID = $VAR['DIRECTI_PARENTID'];
$LIB_DIR = "";
$iserror = false;
require_once $LIB_DIR . "domorder.class.php";
require_once $LIB_DIR . "customer.class.php";
require_once $LIB_DIR . "response.class.php";
$DomOrder = new DomOrder($LIB_DIR . "wsdl/domain.wsdl");
// Creating an instance of DomOrder by passing wsdl url.
$Customer = new Customer($LIB_DIR . "wsdl/customer.wsdl");
// Creating an instance of DomOrder by passing wsdl url.
// create/get the accounts id:
$return = $Customer->getCustomerId($USERNAME, $PASSWORD, "reseller", "en", $PARENTID, $VAR['ACCT_USER']);
if (is_array($return)) {
# add account
$return = $Customer->addCustomer($USERNAME, $PASSWORD, "reseller", "en", $PARENTID, $VAR['ACCT_USER'], $VAR['ACCT_PASS'], $VAR['ACCT_NAME'], $VAR['ACCT_ADDR'], "", "", "", $VAR['ACCT_CITY'], $VAR['ACCT_STATE'], $VAR['ACCT_COUNTRY'], $VAR['ACCT_ZIP'], "01", "8885551212", "01", "8885551212", "01", "8885551212", "en");
}
// Register domain
if (!is_array($return)) {
$account = $return;
$return = $DomOrder->registerDomain($USERNAME, $PASSWORD, "reseller", "en", $PARENTID, $domainHash, $nsHash, $account, $account, $account, $account, $account, 'NoInvoice');
}
$response = new Response($return);
// Status
if (@$return['status'] == 'Success') {
echo 'REGISTER SUCCESS!';
}
// Common Output for all above functions.
print "<BR><b>Output</b><br><br>";
if ($response->isError()) {
$response->printError();
示例3: array
if (trim($_REQUEST['contactno']) == "") {
$_SESSION['msg'] = 'Please enter contact no.';
$num = 'danger';
$url = ADMIN_URL . "/customers/add.php";
$general->redirectUrl($url, $num);
exit;
}
if (trim($_REQUEST['address']) == "") {
$_SESSION['msg'] = 'Please enter address';
$num = 'danger';
$url = ADMIN_URL . "/customers/add.php";
$general->redirectUrl($url, $num);
exit;
}
$fieldvalues = array('name' => $_REQUEST['name'], 'email' => $_REQUEST['emailid'], 'contactno' => $_REQUEST['contactno'], "address" => $_REQUEST['address'], "studentcardno" => $_REQUEST['studentcardno'], "studentcardvalidity" => $_REQUEST['studentcardvalidity'], "status" => $_REQUEST['status'], "remark" => $_REQUEST['remark'], "credit" => $_REQUEST['credit'], "is_deleted" => 0, "registerdate" => date('Y-m-d H:i:s'));
$updated = $Customer->addCustomer($fieldvalues);
if ($updated) {
$token = md5($updated . $_REQUEST['emailid']);
$fieldvalues1 = array("customerid" => $updated, "token" => $token, "date_added" => date('Y-m-d H:i:s'));
$ctoken = $Customer->addCustomertoken($fieldvalues1);
}
$mail = new PHPMailer();
$mail->IsSMTP();
// telling the class to use SMTP
$mail->Host = "smtp.gmail.com";
// SMTP server
$mail->SMTPDebug = 1;
$mail->SMTPAuth = true;
$mail->Port = 587;
$mail->SMTPSecure = 'tls';
$mail->Username = SMPT_EMAIL;
示例4: Validate
</div>
</div>
</div>
<?php
if (Input::exists()) {
$validate = new Validate();
$validation = $validate->check($_POST, array('cust_fname' => array('name' => 'Full Name', 'required' => true, 'min' => 2, 'max' => 50), 'cust_lname' => array('name' => 'Last Name', 'required' => true, 'min' => 2, 'max' => 50), 'cust_tel' => array('name' => 'Phone Number', 'required' => true, 'min' => 10, 'unique' => 'tbl_cust'), 'cust_email' => array('name' => 'Email', 'unique' => 'tbl_cust'), 'address' => array('name' => 'Street Address', 'min' => 2, 'max' => 50), 'city' => array('name' => 'City', 'min' => 2, 'max' => 50), 'state' => array('name' => 'State', 'min' => 2, 'max' => 50), 'postcode' => array('name' => 'PostCode', 'min' => 2, 'max' => 50), 'country' => array('name' => 'Country', 'required' => true), 'cust_pass' => array('name' => 'Password', 'required' => true, 'min' => 8, 'max' => 50), 'cust_uname' => array('name' => 'Username', 'min' => 8, 'max' => 50), 'rpassword' => array('name' => 'Retype password', 'required' => true, 'matches' => 'cust_pass'), 'cust_comment' => array('name' => 'Comment', 'max' => 100)));
if ($validation->passed()) {
$user = new Customer();
$address = new Address();
$img = new Image();
$img->checkimage('image', 'insert');
$id = $user->provideID('customer');
try {
$user->addCustomer(array('cust_id' => $id, 'cust_fname' => Input::get('cust_fname'), 'cust_lname' => Input::get('cust_lname'), 'cust_dob' => Input::get('cust_dob'), 'image' => $img->getimage(), 'image_name' => $img->getimagename(), 'image_type' => $img->getimagetype(), 'cust_email' => Input::get('cust_email'), 'cust_tel' => Input::get('cust_tel'), 'cust_gender' => Input::get('cust_gender'), 'cust_uname' => Input::get('cust_uname'), 'cust_pass' => Crytion::generatehash(Input::get('cust_pass')), 'cust_comment' => Input::get('comment'), 'date_reg' => date('d-m-Y H:i:s')));
$user->passed();
$address->addAddress(array('person_id' => $id, 'add_street' => Input::get('address'), 'add_city' => Input::get('city'), 'add_state' => Input::get('state'), 'add_post' => Input::get('postcode'), 'country_id' => Input::get('country')));
$address->passed();
} catch (Exception $e) {
die($e->getMessage());
}
} else {
Session::put('form-error', $validation->errors());
}
}
$assign = Crytion::decryt64(Session::get('assign'));
$user_id = Crytion::decryt64(Session::get('user_id'));
$user = new User();
$user->checkLoggedin(array('assign', 'user_id'));
if ($user->isLoggedin()) {
示例5: Customer
<td style="width:50%;">
<table>
<tr>
<td>
إضافة زبون جديد
</td>
</tr>
<tr>
<td>
<?php
$newcustomer = new Customer();
echo '<form method="post" action="' . $newcustomer->addCustomer() . '">';
?>
<table>
<tr>
<td>
الرقم الوطني
</td>
<td>
<input name="NationalNumber" type="text" />*
</td>
</tr>
<tr>
<td>
الاسم الأول
开发者ID:aalayach,项目名称:Damascsus-University-Team-PHP-insurance-company-project,代码行数:30,代码来源:AddCustomer.php
示例6: migrateCustomers
/**
* Migrar los clientes desde phpPMS.
*
* @throws SPException
* @return array resultado
*/
private static function migrateCustomers()
{
$customers = self::getCustomers();
$totalRecords = count($customers);
$num = 0;
foreach ($customers as $customer) {
Customer::$customerName = $customer;
try {
Customer::addCustomer();
$num++;
} catch (SPException $e) {
if ($e->getType() === SPException::SP_WARNING) {
continue;
}
throw new SPException(SPException::SP_CRITICAL, _('No es posible crear el cliente'), _('Contacte con el desarrollador'));
}
}
$log = new Log(_('Importar Clientes'));
$log->addDescription('OK');
$log->addDescription(_('Registros') . ': ' . $num . '/' . $totalRecords);
$log->writeLog();
}
示例7: createCustomer
function createCustomer()
{
$Customer = new Customer(LIBRARIES . "directi" . PATH_SEP . "wsdl" . PATH_SEP . "customer.wsdl");
$return = $Customer->addCustomer($this->USERNAME, $this->PASSWORD, $this->ROLE, $this->LANGPREF, $this->PARENTID, $this->data['email'], $this->data['dom_pass'], $this->data['name'], $this->data['domain'], $this->data['address'], "", "", $this->data['city'], $this->data['state'], $this->data['country'], $this->data['zip'], $this->data['country_code'], $this->data['telephone'], "", "", "", "", $this->LANGPREF);
$response = new Response($return);
$response->errorAnalyse();
if ($response->isError()) {
$this->error_str = $response->errorMsg;
$this->iserror = true;
if ($response->errorCode == "com.logicboxes.foundation.sfnb.user.CustomerExistsException") {
$return = $Customer->getCustomerId($this->USERNAME, $this->PASSWORD, $this->ROLE, $this->LANGPREF, $this->PARENTID, $this->data['email']);
$this->account = $return;
$response = new Response($return);
$response->errorAnalyse();
if ($response->isError()) {
$this->error_str = $response->errorMsg;
$this->iserror = true;
return;
} else {
$this->error_str = "";
$this->iserror = false;
return;
}
}
return;
} else {
$this->account = $response->getResult();
}
if (empty($this->account)) {
$this->error_str = "An unknown error occurred while creating customer!";
$this->iserror = true;
}
return;
}
示例8: Customer
<?php
$customer = new Customer();
if (isset($_POST['customer_add'])) {
$cust_add = $customer->addCustomer();
if ($cust_add) {
$msg = "<div class='alert alert-success'>Customer added successfully</div>";
}
}
if (isset($_GET['id'])) {
echo $_GET['id'];
$customerid = $_GET['id'];
$customer->setCustomerID($customerid);
}
if (isset($_POST['edit_customer'])) {
$customer->editCustomer();
}
$customerinfo = $customer->getCustomer();