本文整理汇总了PHP中functions::data_select方法的典型用法代码示例。如果您正苦于以下问题:PHP functions::data_select方法的具体用法?PHP functions::data_select怎么用?PHP functions::data_select使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类functions
的用法示例。
在下文中一共展示了functions::data_select方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: functions
<?php
include "./classes/functions.php";
$con = new functions();
session_start();
date_default_timezone_set("Asia/Kolkata");
// echo "<pre>";
// print_r($_REQUEST);
// exit;
/******** Fetch Cart Products *****/
$sql_prod = "SELECT ID, PRODUCT_CODE AS ITEM_CODE, DESCRIPTION, ATTRIBUTE18 as PRODUCT_APPLICATION, ATTRIBUTE17 as PRODUCT_GROUP FROM xxdkapps_unsegregated_products as up WHERE DESCRIPTION = '" . $_REQUEST['prod_desc'] . "'";
$result_prod = $con->data_select($sql_prod);
$result_prod[0]['CUSTOMER_NUMBER'] = $_SESSION['cust_id'];
$result_prod[0]['QUANTITY'] = trim(substr($_REQUEST['qty'], 0, -3));
$result_prod[0]['PACKAGING_SIZE'] = trim(substr($_REQUEST['pkg_size'], 0, -10));
$result_prod[0]['AVAILABLE_PRICE'] = trim(substr($_REQUEST['price'], 0, -4));
$result_prod[0]['REMARK'] = $_REQUEST['remark'];
/******** Order Form Data Fields *****/
$ORDER_WEB_ID = 0;
$PO = $_REQUEST['po_no'];
$CUSTOMER_NUMBER = $_SESSION['cust_id'];
$CUSTOMER_ACCOUNT_NUMBER = "";
$SOLD_TO = $_REQUEST['sold_to'];
$SOLD_TO_ID = $_REQUEST['sold_to_id'];
$SHIP_TO = $_REQUEST['ship_to'];
$SHIP_TO_ID = $_REQUEST['ship_to_id'];
$UPLOAD_TYPE = "ORDER";
$CONTACT_PERSON = $_REQUEST['cont_per'];
$DELIVERY_DATE = $_REQUEST['del_date'];
$ORDERED_FROM = "PORTAL";
$STATUS = "ENTRY";
示例2: date
<?php
ob_start();
include '../classes/functions.php';
date_default_timezone_set("Asia/Kolkata");
$date4 = date('Y-m-d H:i:s');
$con = new functions();
$date = $con->get_datetime_html();
$date1 = date('Y-m-d\\T00:00:00', strtotime("-1 days"));
session_start();
$entity_id = $_SESSION['entity_id'];
//$query="SELECT consignment_details.consignment_id, consignment_details.cust_po_number, consignment_details.shipment_terms,consignment_details.commercial_invoice,consignment_details.port_of_discharge,consignment_details.item_description,consignment_details.ordered_quantity,consignment_details.order_quantity_uom, consignment_details.shipment_value,consignment_details.sailing_date,consignment_details.agent,consignment_details.require_date,consignment_details.remark,consignment_details.status, consignment_update.arrival_date FROM consignment_update INNER JOIN consignment_details ON consignment_update.consignment_id=consignment_details.consignment_id WHERE created_date between '".date('Y-m-d\ 00:00:00',strtotime("-1 days"))."' and '".date('Y-m-d H:i:s')."'";
$query = "SELECT * FROM consignment_details WHERE org_id in(" . $entity_id . ") and dispatch_date between '" . date('Y-m-d\\ 00:00:00', strtotime("-1 days")) . "' and '" . date('Y-m-d H:i:s') . "'";
$result = $con->data_select($query);
//customer get in select box
$query_user = "";
if ($entity_id == "") {
$query_user = "SELECT DISTINCT customer_num FROM consignment_details ";
$result1 = $con->data_select($query_user);
$customer_options = "<option value ='0'>Select Cutomer</option>";
foreach ($result1 as $key => $val) {
$customer_options .= "<option value ='" . $result1[$key]['customer_num'] . "'>" . $result1[$key]['customer_num'] . "</option>";
}
} else {
$query_user = "SELECT DISTINCT customer_num FROM consignment_details WHERE org_id in(" . $entity_id . ")";
$result1 = $con->data_select($query_user);
$customer_options = "<option value ='0'>Select Cutomer</option>";
foreach ($result1 as $key => $val) {
$customer_options .= "<option value ='" . $result1[$key]['customer_num'] . "'>" . $result1[$key]['customer_num'] . "</option>";
}
}
示例3: functions
include "classes/functions.php";
$con = new functions();
$id = $_REQUEST['id'];
if (isset($_POST['submit'])) {
$id = $_POST['id'];
$name = $_POST['name'];
$phone = $_POST['phone'];
$address = $_POST['address'];
$email = $_POST['email'];
$qryUpt = "UPDATE `customer_po` SET `name` = '{$name}', `phone` = '{$phone}', `address`='{$address}', `email`='{$email}' WHERE `sn`={$id}";
mysql_query($qryUpt) or die(mysql_error());
header("location:index.php");
}
$qryMem = "SELECT * FROM `customer_po` WHERE `ID`='{$id}'";
$mem = $con->data_select($qryMem);
?>
<form method="post" action="editdata.php" role="form">
<div class="modal-body">
<div class="form-group">
<label for="name">ID
<input type="text" id="id" name="id" value="<?php
echo $mem[0]['ID'];
?>
" readonly="true"/>
</label>
</div>
<div class="form-group">
<label for="name">Name
<input type="text" id="name" name="name" value="<?php
echo $mem[0]['PO_NUMBER'];
示例4: functions
<?php
include "classes/functions.php";
$con = new functions();
$id = $_REQUEST['id'];
$qryMem = "SELECT * FROM `customer_po` WHERE `ID`='{$id}'";
$mem = $con->data_select($qryMem);
$cust_id = $mem[0]['CUSTOMER_NUMBER'];
//Fetching Sold_To droupdown values
$sql_sold_to = "SELECT distinct SITE_USE_ID as ID, PRIMARY_FLAG,\n CONCAT_WS(',',ADDRESS1,ADDRESS2, ADDRESS3,ADDRESS4,CITY,COUNTRY) AS SHIP_ADDRESS \n FROM xxdkapps_customer_master WHERE BUSINESS_CODE ='BILL_TO'\n and CUSTOMER_NUMBER = " . $cust_id . "\n and ACCOUNT_STATUS='A'\n order by PRIMARY_FLAG DESC";
$result_sold_to = $con->data_select($sql_sold_to);
//Fetching Ship_To droupdown values
$sql_ship_to = "SELECT distinct SITE_USE_ID as ID, PRIMARY_FLAG,\n CONCAT_WS(',',ADDRESS1,ADDRESS2 , ADDRESS3,ADDRESS4,CITY, COUNTRY) AS SHIP_ADDRESS \n FROM xxdkapps_customer_master WHERE BUSINESS_CODE ='SHIP_TO'\n and CUSTOMER_NUMBER = " . $cust_id . "\n and ACCOUNT_STATUS='A'\n order by PRIMARY_FLAG DESC";
$result_ship_to = $con->data_select($sql_ship_to);
//Fetching Payment Terms droupdown values
$sql_payment_terms = "SELECT TERM_ID, DESCRIPTION FROM xxdkapps_payment_terms";
$result_payment_terms = $con->data_select($sql_payment_terms);
?>
<form>
<div class="modal-body">
<div class="row">
<div class="form-group col-xs-12 col-sm-12 col-md-6 col-lg-6">
<input type="hidden" id="po_id" value="<?php
echo $id;
?>
"/>
<label for="admin_po_number">PO# Number : </label>
<input type="text" id="admin_po_number" class="form-control" name="admin_po_number" value="<?php
echo $mem[0]['PO_NUMBER'];
?>
"/>
示例5: functions
<?php
ob_start();
include 'admin_sidebar_header.php';
include '../classes/functions.php';
$con = new functions();
date_default_timezone_set("Asia/Kolkata");
$date4 = date('Y-m-d H:i:s');
$query_tracking_url = "SELECT * FROM tracking_url WHERE id=1";
$result_tracking_url = $con->data_select($query_tracking_url);
/*echo "<pre>";
print_r($result_tracking_url[0]['tracking_url']);
exit;*/
?>
<!-- page content -->
<div class="right_col" role="main">
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="row">
<div class="col-md-12">
<div class="x_panel">
<div class="x_title">
<h2>Tracking Url</h2>
<div class="col-md-12">
<div class="x_panel">
<div class="col-md-12">
<form>
<input type="text" value="<?php
echo $result_tracking_url[0]['tracking_url'];
示例6: functions
<?php
include "classes/functions.php";
session_start();
$cust_id = $_SESSION['cust_id'];
$con = new functions();
//Fetch Quations History
$sql_quote = "SELECT cq.ID, cq.PRODUCT_CODE, cq.PACKAGING_SIZE, cq.QUANTITY, cq.FILE_NAME, cq.AVAILABLE_PRICE, cq.REQUESTED_PRICE, cq.REMARK, cq.FILE_NAME, cq.STATUS, up.DESCRIPTION FROM customer_quotations as cq, xxdkapps_unsegregated_products as up WHERE cq.PRODUCT_CODE = up.PRODUCT_CODE ORDER BY cq.ID DESC";
$result_quote_history = $con->data_select($sql_quote);
if ($result_quote_history != "no") {
$html_data = "";
?>
<div class="container table-responsive animated fadeIn quote-history-div">
<table id="cart_table" class="table table-bordered table-striped">
<thead>
<tr class="headings">
<th>PRODUCT NAME</th>
<th>AVAILABLE PRICE (PER KG)</th>
<th>REQUESTED PRICE (PER KG)</th>
<th>FILE_NAME</th>
<th>STATUS</th>
<th>Edit</th>
</tr>
</thead>
<tbody id="quote_history_table">
<?php
foreach ($result_quote_history as $key => $value) {
$html_data .= '<tr class="item">
<td>
' . $value['DESCRIPTION'] . '
</td>
示例7: functions
<?php
ob_start();
include 'admin_sidebar_header.php';
include '../classes/functions.php';
session_start();
$con = new functions();
$user_name = $_SESSION['user_name'];
if ($user_name != "") {
$query = "SELECT user_registration.user_id, user_registration.first_name,user_registration.last_name,user_registration.user_name,user_registration.address,user_registration.type,user_registration.status, entity.entity_name\n\tFROM entity\n\tINNER JOIN user_registration\n\tON entity.entity_id=user_registration.entity_id;";
$result = $con->data_select($query);
$query = "SELECT entity_id, entity_name FROM entity";
$result1 = $con->data_select($query);
$options = "";
foreach ($result1 as $key => $val) {
$options .= "<option value=" . $result1[$key]['entity_id'] . ">" . $result1[$key]['entity_name'] . "</option>";
}
$query = "SELECT role_id, role_name FROM user_role";
$result_role = $con->data_select($query);
$role_options = "";
$role_array = array();
foreach ($result_role as $key => $val) {
$role_options .= "<option value=" . $result_role[$key]['role_id'] . ">" . $result_role[$key]['role_name'] . "</option>";
$role_array[$result_role[$key]['role_id']] = $result_role[$key]['role_name'];
}
} else {
header('Location:admin_login.php');
}
?>
<script type="text/javascript">
function showdocument(user_id)
示例8: functions
<?php
include 'classes/functions.php';
$con = new functions();
session_start();
if (isset($_POST['submit'])) {
$user_name = $_POST['username'];
$password = $_POST['password'];
$qry = "SELECT * FROM user_registration WHERE email_id='{$user_name}' AND password='{$password}'";
echo $qry;
exit;
$result = $con->data_select($qry);
// echo $result[0]['role_id'];
if ($result != "no") {
if ($result[0]['role_id'] == 2) {
$_SESSION['user_id'] = $result[0]['user_id'];
$_SESSION['email_id'] = $user_name;
$_SESSION['first_name'] = $result[0]['first_name'];
$_SESSION['role_id'] = $result[0]['role_id'];
$_SESSION['entity_id'] = $result[0]['entity_id'];
header('Location: customer_dashboard.php');
} elseif ($result[0]['role_id'] == 4) {
$_SESSION['user_id'] = $result[0]['user_id'];
$_SESSION['email_id'] = $user_name;
$_SESSION['role_id'] = $result[0]['role_id'];
$_SESSION['first_name'] = $result[0]['first_name'];
$_SESSION['entity_id'] = $result[0]['entity_id'];
header('Location: user_dashboard.php');
} elseif ($result[0]['role_id'] == 3) {
$_SESSION['user_id'] = $result[0]['user_id'];
$_SESSION['email_id'] = $user_name;
示例9: functions
<?php
include '../classes/functions.php';
$con = new functions();
session_start();
date_default_timezone_set("Asia/Kolkata");
$date4 = date('Y-m-d H:i:s');
$role_id = $_SESSION['role_id'];
if ($_REQUEST['action'] == "insertupdateconsignment") {
$query = "UPDATE consignment_details SET consignment_address='" . $_REQUEST['consignment_address'] . "',mode_of_shipment='" . $_REQUEST['mode_of_shipment'] . "',vessel_name='" . $_REQUEST['vessel_name'] . "',etd_date='" . $_REQUEST['etd_date'] . "',container_number='" . $_REQUEST['container_name'] . "',shipped_on_board='" . $_REQUEST['shipped_on_board'] . "',transhipment_port='" . $_REQUEST['transhipment_port'] . "',transhipment_vessel_name='" . $_REQUEST['transhipment_vessel_name'] . "',eta_date='" . $_REQUEST['eta_date'] . "',arrival_date='" . $_REQUEST['arrival_date'] . "',custom_clearance_date='" . $_REQUEST['custom_clearance_date'] . "',custom_clearance='" . $_REQUEST['custom_clearance'] . "',delivered_cutomer_loaction='" . $_REQUEST['delivered_cutomer_loaction'] . "',remark='" . $_REQUEST['remark'] . "' WHERE consignment_id=" . $_REQUEST['consignment_id'];
$result0 = $con->data_update($query);
if ($result0 > 0) {
//$query="SELECT consigneement_addrss, mode_of_shipment, vessel_name, etd_date, container_number, shipped_on_board, transhipment_port, transhipment_vessel_name, eta_date, arrival_date, custom_clearance_date, custom_clearance, delivered_cutomer_loaction, remark, consignment_id FROM consignment_update WHERE consignment_id=".$_REQUEST['consignment_id'];
$query = "SELECT consignment_address, mode_of_shipment, vessel_name, etd_date, container_number, shipped_on_board, transhipment_port, transhipment_vessel_name, eta_date, arrival_date, custom_clearance_date, custom_clearance, delivered_cutomer_loaction, remark, consignment_id FROM consignment_details WHERE consignment_id=" . $_REQUEST['consignment_id'];
$result = $con->data_select($query);
$edt_date = $result[0]['etd_date'];
if ($edt_date > $date4) {
$query = "UPDATE consignment_details SET order_status='IN TRANSIT' WHERE consignment_id=" . $_REQUEST['consignment_id'];
$result1 = $con->data_update($query);
if ($result[0]['arrival_date'] > 0) {
$query = "UPDATE consignment_details SET order_status='ARRIVED AT PORT' WHERE consignment_id=" . $_REQUEST['consignment_id'];
$result2 = $con->data_update($query);
if ($result[0]['custom_clearance'] == "yes") {
$query = "UPDATE consignment_details SET order_status='UNDER CUSTOM ClEARENCE' WHERE consignment_id=" . $_REQUEST['consignment_id'];
$result3 = $con->data_update($query);
if ($result[0]['custom_clearance_date'] > 0) {
$query = "UPDATE consignment_details SET order_status='OUT FOR DELIVERY' WHERE consignment_id=" . $_REQUEST['consignment_id'];
$result4 = $con->data_update($query);
if ($result[0]['delivered_cutomer_loaction'] > 0) {
$query = "UPDATE consignment_details SET order_status='CLOSED' WHERE consignment_id=" . $_REQUEST['consignment_id'];
$result5 = $con->data_update($query);
示例10: functions
<?php
//ob_start();
include '../classes/functions.php';
$con = new functions();
$_SESSION['success'] = "no";
$query = "SELECT * FROM org_map";
$result1 = $con->data_select($query);
$options = "";
foreach ($result1 as $key => $val) {
$options .= "<option value=" . $result1[$key]['org_id'] . ">" . $result1[$key]['name'] . "</option>";
}
if (isset($_POST['add'])) {
$user_name = $_POST['username'];
$password = $_POST['password'];
$first_name = $_POST['firstname'];
$last_name = $_POST['lastname'];
$address = $_POST['address'];
$entity_id = $_POST['entity_id'];
$role_user = $_POST['role_user'];
$entity = implode(",", $entity_id);
$sql = "INSERT INTO user_registration(first_name, last_name, email_id, password, address, role_id, entity_id)\n\t\t\t\t VALUES ('{$first_name}','{$last_name}','{$user_name}','{$password}','{$address}','{$role_user}','{$entity}')";
$result = $con->data_insert($sql);
if ($result > 0) {
$_SESSION['success'] = "Data has been Added!!!!!";
header('Location:create_user.php');
} else {
$_SESSION['success'] = "no";
}
}
include 'admin_sidebar_header.php';
示例11: die
if (isset($_POST) && isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
//Get page number from Ajax POST
if (isset($_POST["page"])) {
$page_number = filter_var($_POST["page"], FILTER_SANITIZE_NUMBER_INT, FILTER_FLAG_STRIP_HIGH);
//filter number
if (!is_numeric($page_number)) {
die('Invalid page number!');
}
//incase of invalid page number
} else {
$page_number = 1;
//if there's no page number, set it to 1
}
if (isset($_REQUEST['search_category']) && $_REQUEST['search_category'] == "5") {
$sql = "SELECT op.ORDER_ID, op.PRODUCT_CODE, op.PACKAGE_QTY, op.QUANTITY, op.UNIT_PRICE, op.OSTATUS, op.REMARKS, up.DESCRIPTION, ofd.ID, ofd.ORACLE_ORDER, ofd.ORDER_WEB_ID, (DATE_FORMAT( ofd.ORDER_DATE, '%d/%m/%Y' )) AS ORDER_DATE, ofd.CUSTOMER_NUMBER, ofd.PO, ofd.DELIVERY_DATE, ofd.CONTACT_PERSON, ofd.COMMENTS, ofd.FREIGHT_TERMS, ofd.VESSEL, ofd.ATTRIBUTE12, cm.SITE_USE_ID, CONCAT_WS(',',cm.ADDRESS1,cm.ADDRESS2, cm.ADDRESS3,cm.ADDRESS4,cm.CITY,cm.COUNTRY) AS SHIP_ADDRESS FROM order_form_details as ofd, order_products as op, xxdkapps_unsegregated_products as up, xxdkapps_customer_master as cm WHERE ofd.CUSTOMER_NUMBER= " . $cust_id . " and ofd.ORACLE_ORDER = " . $_REQUEST['search_value'] . " and op.PRODUCT_CODE = up.PRODUCT_CODE and op.ORDER_ID = ofd.ID and ofd.SHIP_TO = cm.SITE_USE_ID";
$result = $con->data_select($sql);
$sql_sold_to = "SELECT distinct SITE_USE_ID as ID, PRIMARY_FLAG, CONCAT_WS(',',ADDRESS1,ADDRESS2, ADDRESS3,ADDRESS4,CITY,COUNTRY) AS SHIP_ADDRESS FROM xxdkapps_customer_master WHERE BUSINESS_CODE ='BILL_TO' and CUSTOMER_NUMBER = " . $cust_id . " and ACCOUNT_STATUS='A' order by PRIMARY_FLAG DESC";
$sold_to = $con->data_select($sql_sold_to);
} else {
if (isset($_REQUEST['search_category']) && $_REQUEST['search_category'] == "6") {
$sql = "SELECT op.ORDER_ID, op.PRODUCT_CODE, op.PACKAGE_QTY, op.QUANTITY, op.UNIT_PRICE, op.OSTATUS, op.REMARKS, up.DESCRIPTION, ofd.ID, ofd.ORACLE_ORDER, ofd.ORDER_WEB_ID, (DATE_FORMAT( ofd.ORDER_DATE, '%d/%m/%Y' )) AS ORDER_DATE, ofd.CUSTOMER_NUMBER, ofd.PO, ofd.DELIVERY_DATE, ofd.CONTACT_PERSON, ofd.COMMENTS, ofd.FREIGHT_TERMS, ofd.VESSEL, ofd.ATTRIBUTE12, cm.SITE_USE_ID, CONCAT_WS(',',cm.ADDRESS1,cm.ADDRESS2, cm.ADDRESS3,cm.ADDRESS4,cm.CITY,cm.COUNTRY) AS SHIP_ADDRESS FROM order_form_details as ofd, order_products as op, xxdkapps_unsegregated_products as up, xxdkapps_customer_master as cm WHERE ofd.CUSTOMER_NUMBER= " . $cust_id . " and ofd.ORDER_WEB_ID = '" . $_REQUEST['search_value'] . "' and op.PRODUCT_CODE = up.PRODUCT_CODE and op.ORDER_ID = ofd.ID and ofd.SHIP_TO = cm.SITE_USE_ID";
$result = $con->data_select($sql);
$sql_sold_to = "SELECT distinct SITE_USE_ID as ID, PRIMARY_FLAG, CONCAT_WS(',',ADDRESS1,ADDRESS2, ADDRESS3,ADDRESS4,CITY,COUNTRY) AS SHIP_ADDRESS FROM xxdkapps_customer_master WHERE BUSINESS_CODE ='BILL_TO' and CUSTOMER_NUMBER = " . $cust_id . " and ACCOUNT_STATUS='A' order by PRIMARY_FLAG DESC";
$sold_to = $con->data_select($sql_sold_to);
} else {
if (isset($_REQUEST['search_value']) && isset($_REQUEST['search_cat'])) {
if ($_REQUEST['search_cat'] == 1) {
$sql1 = "SELECT op.ORDER_ID FROM order_form_details as ofd, order_products as op, xxdkapps_unsegregated_products as up, xxdkapps_customer_master as cm WHERE ofd.CUSTOMER_NUMBER= " . $cust_id . " and op.PRODUCT_CODE = up.PRODUCT_CODE and op.ORDER_ID = ofd.ID and ofd.SHIP_TO = cm.SITE_USE_ID and op.PRODUCT_CODE LIKE '" . $_REQUEST['search_value'] . "%' ORDER BY ofd.ORDER_DATE DESC";
} else {
if ($_REQUEST['search_cat'] == 2) {
$sql1 = "SELECT op.ORDER_ID FROM order_form_details as ofd, order_products as op, xxdkapps_unsegregated_products as up, xxdkapps_customer_master as cm WHERE ofd.CUSTOMER_NUMBER= " . $cust_id . " and op.PRODUCT_CODE = up.PRODUCT_CODE and op.ORDER_ID = ofd.ID and ofd.SHIP_TO = cm.SITE_USE_ID and up.DESCRIPTION LIKE '" . $_REQUEST['search_value'] . "%' ORDER BY ofd.ORDER_DATE DESC";
示例12: functions
<?php
ob_start();
include '../classes/functions.php';
$con = new functions();
$con = new functions();
session_start();
$user_id = $_SESSION['user_id'];
$first_name = $_SESSION['first_name'];
if ($user_id != "") {
$result = $con->data_select("SELECT assign_id, user_id, consignment_id, orign_location, destination_location, picup_date_time, status FROM assign_consignment WHERE user_id=" . $user_id);
}
include 'user_sidebar_header.php';
?>
<!-- page content -->
<div class="right_col" role="main">
<div class="">
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2 style="color:#060;">Assign Container</h2>
<div class="clearfix"></div>
示例13: functions
include_once "../class/functions.php";
$obj = new functions();
$roles[1] = "Admin";
$roles[2] = "Manager";
echo "kudnan";
exit;
date_default_timezone_set('Asia/Kolkata');
$content = "";
if (isset($_REQUEST['action']) && $_REQUEST['action'] != "") {
$user_info_all = explode(",", $_REQUEST['user']);
$i = 1;
foreach ($user_info_all as $key => $values) {
$user_info = explode("-", $user_info_all[$key]);
$sql_duplicate = "select name from user where name='" . $user_info[1] . "' and role !=3 ";
$duplicate = $obj->data_select($sql_duplicate);
if ($duplicate != "no") {
continue;
} else {
$sql_insert = "insert into user(name,email,role,display_name) values ('" . $user_info[1] . "','" . $user_info[0] . "','" . $user_info[20] . "'," . $_REQUEST['role'] . ")";
$res = $obj->data_insert($sql_insert);
$content .= "<tr><td>" . $i . "</td><td>" . $user_info[1] . "</td><td>" . $user_info[0] . "</td><td>" . $roles[$_REQUEST['role']] . "</td></tr>";
$i++;
}
}
if ($content == "") {
$content .= "NO Records has been Added!!!!";
} else {
echo $content;
}
} else {
示例14: date
<?php
ob_start();
include '../classes/functions.php';
date_default_timezone_set("Asia/Kolkata");
$date4 = date('Y-m-d H:i:s');
$con = new functions();
session_start();
$date = $con->get_datetime_html();
$date1 = date('Y-m-d\\T00:00:00', strtotime("-1 days"));
$customer_num = $_SESSION['cust_id'];
//Get all existing Orders
$query = "SELECT * FROM consignment_details WHERE customer_num=" . $customer_num;
$result = $con->data_select($query);
// Check count of orders for dashboard
$query_booked = "SELECT count(order_status) from consignment_details WHERE order_status='BOOKED' and customer_num=" . $customer_num;
$result_booked = $con->data_select($query_booked);
$query_despatch = "SELECT count(order_status) from consignment_details WHERE order_status='DESPATCH' and customer_num=" . $customer_num;
$result_despatch = $con->data_select($query_despatch);
$query_closed = "SELECT count(order_status) from consignment_details WHERE order_status='CLOSED' and customer_num=" . $customer_num;
$result_closed = $con->data_select($query_closed);
$query_intransit = "SELECT count(order_status) from consignment_details WHERE order_status='IN TRANSIT' and customer_num=" . $customer_num;
$result_intransit = $con->data_select($query_intransit);
$query_outfor_delivery = "SELECT count(order_status) from consignment_details WHERE order_status='OUT FOR DELIVERY' and customer_num=" . $customer_num;
$result_outfor_delivery = $con->data_select($query_outfor_delivery);
$query_arrive_port = "SELECT count(order_status) from consignment_details WHERE order_status='ARRIVED AT PORT' and customer_num=" . $customer_num;
$result_arive_port = $con->data_select($query_arrive_port);
$query_custom = "SELECT count(order_status) from consignment_details WHERE order_status='UNDER CUSTOM ClEARENCE' and customer_num=" . $customer_num;
$result_custom = $con->data_select($query_custom);
?>
<!-- page content -->
示例15: selectDispatch
<?php
ob_start();
include '../classes/functions.php';
$con = new functions();
$result = $con->data_select("SELECT dispatch_id, transaction_number, start_address, destination, status FROM dspatch_details");
include 'user_sidebar_header.php';
?>
<script>
function selectDispatch(dispatchId)
{
$.ajax({
type:"POST",
url:"logistics/action_ajax.php",
data:"dispatch_id="+dispatchId+"&action=selectDispatch",
dataType:"JSON",
success: function(data)
{
//alert(data[0].dispatch_id);
if(data == "no record found")
{
alert("no record found");
}
$("#dispatchId").val(data[0].dispatch_id);
/*$("#firstname1").val(data[0].First_name);
$("#mobile1").val(data[0].Mobile);
$("#age1").val(data[0].Age);
$("#cliniclocation").val(data[0].Clinic_location);*/