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


PHP Supplier::register方法代码示例

本文整理汇总了PHP中Supplier::register方法的典型用法代码示例。如果您正苦于以下问题:PHP Supplier::register方法的具体用法?PHP Supplier::register怎么用?PHP Supplier::register使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Supplier的用法示例。


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

示例1:

$stmt->execute(array(":sup_code" => $scode));
$row = $stmt->fetch(PDO::FETCH_ASSOC);
if ($stmt->rowCount() > 0) {
    $msg = '<div class="alert alert-warning alert-dismissable">
  <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
  <h4>  <i class="icon fa fa-check"></i> Sorry!</h4>
  supplier allready exists , Please Try another one.
</div>';
    // $msg = "
    //       <div class='alert alert-error'>
    //     <button class='close' data-dismiss='alert'>&times;</button>
    //       <strong>Sorry !</strong>  email allready exists , Please Try another one
    //     </div>
    //     ";
} else {
    if ($supplier->register($scode, $fname, $lname, $nic, $iCheck, $email, $address_1, $mobile, $estate, $estate_name, $reg_no, $size_of_estate, $estate_address, $bankn, $branch, $account, $bankacc, $editor)) {
        $message = "Thalapalakanada Tea factory, username: 0001 password: {$nic} http://tsms.x10host.com/page/";
        if (!empty($mobile)) {
            $mobileNumber = Communication::prepareNumber($mobile);
            Communication::sendMessage($message, $mobileNumber);
        }
        echo '
<div class="row">
<div class="col-md-12">
  <div class="box">
    <div class="box-header">
      <h3 class="box-title">Supplier Settings</h3>
    </div>
    <div class="box-body">
      <p>Supplier Successfuly added to the database. Also You can change Supplier settings.</p>
      <a class="btn btn-app">
开发者ID:TSMS,项目名称:UCSC-groupProject-Tsms,代码行数:31,代码来源:addsuppliers.php

示例2: array

<?php

require_once 'core/init.php';
if (count($_POST) > 0) {
    $supplier_data = array("company" => $_POST["company"], "email" => $_POST["email"], "street" => $_POST["street"], "line2" => $_POST["line2"], "city" => $_POST["city"], "province" => $_POST["province"], "postal" => $_POST["postal"], "country" => $_POST["country"], "telephone" => $_POST["links"]);
    $_SESSION['form_data'] = $supplier_data;
    header("Location: supplier_registration.php", true, 303);
    die;
} else {
    if (isset($_SESSION['form_data'])) {
        $new_supplier = new Supplier();
        print_r($_SESSION["form_data"]);
        $new_supplier->create($_SESSION["form_data"]);
        if ($new_supplier->register()) {
            $message = "You have successfully Registered the Supplier !!";
            echo "<script type='text/javascript'>alert('{$message}');</script>";
        } else {
            $message = "The Supplier Registration was unsuccessful.";
            echo "<script type='text/javascript'>alert('{$message}');</script>";
        }
        unset($_SESSION["form_data"]);
    }
}
?>


<!DOCTYPE html>
<html>
<head>
<title>Supplier Management</title>
开发者ID:NalindaHemanga,项目名称:ELMS,代码行数:30,代码来源:supplier_management.php


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