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


PHP functions::data_update方法代码示例

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


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

示例1: array

 $benificary_declaration = $_REQUEST['benificary_declaration'];
 $certificate_quantity = $_REQUEST['certificate_quantity'];
 $query = "SELECT * FROM document_detatils WHERE consignment_id=" . $consigment_id;
 $result = $con->data_select($query);
 if ($result != "no") {
     $arr = array('bill_of_laden' => $bill_of_laden, 'packing_list' => $packing_list, 'certificate_of_analysis' => $certificate_of_analysis, 'certificate_of_origin' => $certificate_of_origin, 'gsp' => $gsp, 'haz_declaraition' => $haz_declaraition, 'non_hAZ_declaraition' => $non_hAZ_declaraition, 'msds' => $msds, 'heat_treatment_certification' => $heat_treatment_certification, 'benificary_declaration' => $benificary_declaration, 'certificate_quantity' => $certificate_quantity);
     $json_data = json_encode($arr);
     if (is_uploaded_file($_FILES['document']['tmp_name'])) {
         $sourcePath = $_FILES['document']['tmp_name'];
         $document_name = pathinfo($_FILES['document']['name']);
         $extension = $document_name['extension'];
         if ($document_type == "Shipping Documents") {
             if ($result[0]['shipping_document'] > 0) {
                 $shipping_document = $result[0]['shipping_document'];
                 $query = "UPDATE document_detatils SET service_provider='{$service_provider}',shipping_document_details='{$json_data}', shipping_document='{$shipping_document}', shipping_document_update='{$date}' WHERE consignment_id=" . $consigment_id;
                 $result = $con->data_update($query);
                 if ($result > 0) {
                     $targetPath = "../uploaded/" . $shipping_document;
                     //echo "success";
                 }
             } else {
                 $shipping_document = $consigment_id . "shipping_document" . "." . $extension;
                 $query = "UPDATE document_detatils SET service_provider='{$service_provider}',shipping_document_details='{$json_data}', shipping_document='{$shipping_document}', shipping_document_update='{$date}' WHERE consignment_id=" . $consigment_id;
                 $result = $con->data_update($query);
                 if ($result > 0) {
                     $targetPath = "../uploaded/" . $shipping_document;
                     //echo "success";
                 }
             }
         } elseif ($document_type == "Commercial Invoice") {
             if ($result[0]['commercial_invoice'] > 0) {
开发者ID:pratikluniya,项目名称:dorfketal,代码行数:31,代码来源:upload.php

示例2: header

        echo "Invalied CUSTOMER_NUMBER or PASSWORD";
    }
}
if (isset($_REQUEST['action']) && $_REQUEST['action'] == "Logout") {
    session_destroy();
    session_unset();
    header('Location: index.php');
}
if (isset($_REQUEST['action']) && $_REQUEST['action'] == "F-Vertical") {
    $sql = "SELECT FAVOURITE_VERTICAL FROM login_master WHERE CUSTOMER_NUMBER = " . $_SESSION['cust_id'];
    $result = $con->data_select($sql);
    echo $result[0]['FAVOURITE_VERTICAL'];
}
if (isset($_REQUEST['action']) && $_REQUEST['action'] == "updatefcat") {
    $sql = "UPDATE login_master SET FAVOURITE_VERTICAL = '" . $_REQUEST['cat_name'] . "' WHERE CUSTOMER_NUMBER = " . $_SESSION['cust_id'];
    $result = $con->data_update($sql);
    echo "Success";
}
if (isset($_REQUEST['action']) && $_REQUEST['action'] == "cartonload") {
    $sql = "SELECT COUNT(*) FROM customer_cart WHERE CUSTOMER_NUMBER = '" . $_SESSION['cust_id'] . "'";
    $result = $con->data_select($sql);
    $_SESSION["cart_count"] = $result[0]['COUNT(*)'];
    echo $_SESSION['cart_count'];
}
if (isset($_REQUEST['action']) && $_REQUEST['action'] == "insertcart") {
    $prod_code = $_REQUEST['prod_code'];
    $prod_desc = $_REQUEST['prod_desc'];
    $remark = $_REQUEST['remark'];
    $qty = $_REQUEST['qty'];
    $pkgsize = $_REQUEST['pkgsize'];
    $cust_id = $_SESSION['cust_id'];
开发者ID:pratikluniya,项目名称:dorfketal,代码行数:31,代码来源:ajax.php

示例3: 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);
开发者ID:pratikluniya,项目名称:dorfketal,代码行数:31,代码来源:ajax_service.php


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