• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_current_time函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: import_orders

 public function import_orders()
 {
     if (strpos($_SERVER['SCRIPT_FILENAME'], 'solr_auto_import_orders.php') === FALSE) {
         exit;
     }
     $end_time = date('Y-m-d H:i:s');
     set_time_limit(0);
     $limit = 1000;
     $end_time = get_current_time();
     $offset = 0;
     $order_table = 'order_list_completed';
     $order_id = 'order_id';
     $start_time = $this->solr_order_model->fetch_solr_order_updated_date();
     $start_time = date('Y-m-d H:i:s', mktime(substr($start_time, 11, 2), substr($start_time, 14, 2), substr($start_time, 17, 2), substr($start_time, 5, 2), substr($start_time, 8, 2) - 45, substr($start_time, 0, 4)));
     echo $start_time;
     $successful = TRUE;
     $successful1 = TRUE;
     //$this->_process_import_order($order_table, $order_id, $start_time, $end_time, $limit, $offset);
     $offset = 0;
     $order_table = 'order_list';
     $order_id = 'id';
     $successful2 = $this->_process_import_order($order_table, $order_id, $start_time, $end_time, $limit, $offset);
     if ($successful1 && $successful2) {
         $this->solr_order_model->update_solr_order_updated_date($end_time);
     }
 }
开发者ID:ohjack,项目名称:mallerp_standard,代码行数:26,代码来源:solr_order_auto.php


示例2: _proccess_track_ebay_competitor

 private function _proccess_track_ebay_competitor($id)
 {
     $ebay_url_base = 'http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=';
     $competitor = $this->ebay_model->fetch_competitor_by_id($id);
     $item_id = $competitor->item_id;
     //$item_id = 270801805639;
     $ebay_item = $this->ebay_model->fetch_ebay_item_by_item_id($item_id);
     if ($ebay_item->currency == 'EUR') {
         $ebay_url_base = 'http://www.ebay.de/itm/ws/eBayISAPI.dll?ViewItem&item=';
     }
     if ($ebay_item->currency == 'GBP') {
         $ebay_url_base = 'http://www.ebay.co.uk/itm/ws/eBayISAPI.dll?ViewItem&item=';
     }
     if ($ebay_item->currency == 'AUD') {
         $ebay_url_base = 'http://www.ebay.com.au/itm/ws/eBayISAPI.dll?ViewItem&item=';
     }
     if (empty($ebay_item)) {
         //$this->ebay_model->drop_competitor_by_item_id($item_id);
         return;
     }
     $competitor_result = fetch_ebay_competitor_price($competitor->url);
     if (empty($competitor_result)) {
         return;
     }
     $our_result = fetch_ebay_competitor_price($ebay_url_base . $ebay_item->item_id);
     if (empty($our_result)) {
         return;
     }
     //var_dump($our_result);die();
     $price = $competitor_result['total'];
     $our_price = $our_result['total'] + $competitor->allowed_difference;
     if ($our_price > $price) {
         $balance = $price - $our_price;
         $status = 1;
     } else {
         $balance = '+' . ($price - $our_price);
         $status = 0;
     }
     $competitor_data = array('balance' => $balance, 'status' => $status, 'track_time' => get_current_time());
     $this->ebay_model->update_competitor($competitor->id, $competitor_data);
     var_dump($competitor_data);
     /*
      * warn our saler
      */
     if ($status && $ebay_item->alarm != 1) {
         $this->ebay_model->update_ebay_by_item_id($item_id, array('alarm' => 1));
     }
     /**
      * update our item price.
      **/
     $this->ebay_model->update_ebay_by_item_id($item_id, array('price' => $our_result['product'], 'shipping_price' => $our_result['shipping']));
     if ($status) {
         $click_url = $competitor->url;
         $saler_ids = $this->ebay_model->fetch_saler_ids_by_ebay_id($ebay_item->ebay_id);
         var_dump($saler_ids);
         $this->events->trigger('ebay_item_price_too_high', array('type' => 'ebay_item_price_too_high_notify', 'click_url' => $click_url, 'content' => sprintf(lang('competitor_has_lower_price'), $competitor->seller_id), 'owner_id' => 0, 'allowed_user_ids' => $saler_ids));
     }
 }
开发者ID:ohjack,项目名称:mallerp_standard,代码行数:58,代码来源:auto_ebay.php


示例3: start_execution

function start_execution()
{
    $unix = new unix();
    BuildingExecRightStatus("Building postfix status...", 20);
    postfix_status();
    BuildingExecRightStatus("Building postfix status...", 55);
    events("postfix_status() OK");
    get_current_time();
    events("get_current_time() OK");
    BuildingExecRightStatus("Building postfix status...", 90);
    BuildingExecRightStatus("done...", 100);
}
开发者ID:brucewu16899,项目名称:artica,代码行数:12,代码来源:exec.admin.smtp.flow.status.php


示例4: add_new_template

 public function add_new_template()
 {
     $user_id = get_current_user_id();
     $created_date = get_current_time();
     $data = array('template_name' => '[edit]', 'template_content' => '[edit]', 'user' => $user_id, 'template_subject' => '[edit]', 'created_date ' => $created_date);
     try {
         $this->ebay_model->add_ebay_message_template($data);
         echo $this->create_json(1, lang('configuration_accepted'));
     } catch (Exception $e) {
         $this->ajax_failed();
         echo lang('error_msg');
     }
 }
开发者ID:ohjack,项目名称:mallerp_standard,代码行数:13,代码来源:ebay_message.php


示例5: add_new_email_template

 public function add_new_email_template()
 {
     $user_id = get_current_user_id();
     $update_time = get_current_time();
     $name = get_current_user_name();
     $created_date = get_current_time();
     $remark = $name . lang('on') . $update_time . lang('create_template') . "<br>";
     $data = array('title' => '', 'content' => '', 'code' => '', 'creator' => $user_id, 'remark' => $remark, 'created_date ' => $created_date);
     try {
         $this->edm_email_model->add_edm_email($data);
         echo $this->create_json(1, lang('configuration_accepted'));
     } catch (Exception $e) {
         $this->ajax_failed();
         echo lang('error_msg');
     }
 }
开发者ID:ohjack,项目名称:mallerp_standard,代码行数:16,代码来源:email_marketing.php


示例6: move_save

 public function move_save()
 {
     if ($this->input->is_post()) {
         $ship_order_no = $this->input->post('ship_order_no');
         $log_type = $this->input->post('log_type');
         $storage_code = $this->input->post('storage_code');
         $ship_confirm_date = $this->input->post('ship_confirm_date');
         $locale = $this->input->post('locale');
         $collect_address = $this->input->post('collect_address');
         $ship_confirm_user = $this->input->post('ship_confirm_user');
         $transaction_number = $this->input->post('transaction_number');
         $abroad_stock_remark = $this->input->post('abroad_stock_remark');
         $sku_arr = $this->input->post('sku');
         $qty_arr = $this->input->post('qty');
     }
     $sku_str = '';
     $qty_str = '';
     foreach ($sku_arr as $val => $sku) {
         if (!$this->product_model->check_exists('product_basic', array('sku' => $sku))) {
             echo $this->create_json(0, lang('product_sku_nonentity'));
             return;
         } else {
             $sku_str = $sku_str . $sku . ',';
         }
     }
     foreach ($qty_arr as $qty) {
         if (!is_positive($qty)) {
             echo $this->create_json(0, lang('qty_not_natural'));
             return;
         } else {
             $qty_str = $qty_str . $qty . ',';
         }
     }
     $sku_str = substr($sku_str, 0, strlen($sku_str) - 1);
     $qty_str = substr($qty_str, 0, strlen($qty_str) - 1);
     $creator = $this->get_current_login_name();
     $created_date = get_current_time();
     $data = array('ship_order_no' => $ship_order_no, 'log_type' => $log_type, 'storage_code' => $storage_code, 'ship_confirm_date' => $ship_confirm_date, 'locale' => $locale, 'remark' => $abroad_stock_remark, 'collect_address' => $collect_address, 'ship_confirm_user' => $ship_confirm_user, 'transaction_number' => $transaction_number, 'sku_str' => $sku_str, 'qty_str' => $qty_str, 'creator' => $creator, 'created_date' => $created_date);
     $this->product_model->save_move_stock($data);
     foreach ($sku_arr as $val => $sku) {
         $count = $qty_arr[$val];
         $this->change_stock_count($sku, $storage_code, $count);
     }
     echo $this->create_json(1, lang('purchase_apply_saved'));
 }
开发者ID:ohjack,项目名称:mallerp_standard,代码行数:45,代码来源:move_stock.php


示例7: trade_get

 public function trade_get()
 {
     $now = get_current_time();
     $top_client = get_top_client();
     $tids = $this->taobao_model->get_order_tid();
     foreach ($tids as $tid) {
         $tid = $tid->tid;
         $req = new TradeGetRequest();
         $req->setFields("tid, status");
         $req->setTid($tid);
         try {
             $resp = $top_client->execute($req);
         } catch (Exception $e) {
             echo lang('error_msg');
         }
         $this->taobao_model->trade_get($resp, $now);
     }
 }
开发者ID:ohjack,项目名称:mallerp_standard,代码行数:18,代码来源:auto_taobao.php


示例8: writeLog

 function writeLog()
 {
     $date = get_current_date();
     $filename = ROOT_DIR . 'log/log_info' . $date;
     if (!file_exists($filename)) {
         $fp = fopen($filename, "wa");
         fclose($fp);
     }
     $data = get_current_time() . " " . $this->getIp() . " " . $this->getInfo() . PHP_EOL;
     try {
         file_put_contents($filename, $data, FILE_APPEND | LOCK_EX);
     } catch (Exception $ex) {
         print_r("<pre>");
         print_r($ex->getMessage());
         print_r($ex->getTrace());
         print_r("</pre>");
         die;
     }
 }
开发者ID:tttodorov13,项目名称:suSurvey,代码行数:19,代码来源:Info.php


示例9: save_accounting_costs

 public function save_accounting_costs()
 {
     $order_count = $this->input->post('order_count');
     $user_id = get_current_user_id();
     for ($i = 0; $i < $order_count; $i++) {
         $order_id = $this->input->post('order_id_' . $i);
         $shipping_cost = trim($this->input->post('shipping_cost_' . $i));
         $product_cost = trim($this->input->post('product_cost_' . $i));
         $product_cost_string = trim(trim($this->input->post('product_cost_string_' . $i)), ',');
         if (!is_numeric($shipping_cost) || !is_numeric($product_cost) || $shipping_cost <= 0 || $product_cost <= 0) {
             continue;
         }
         try {
             $data = array('cost_user' => $user_id, 'cost_date' => get_current_time(), 'cost' => $shipping_cost + $product_cost, 'shipping_cost' => $shipping_cost, 'product_cost_all' => $product_cost, 'product_cost' => $product_cost_string);
             $this->order_model->update_order_information($order_id, $data);
             calculate_order_profit_rate($order_id);
         } catch (Exception $e) {
             echo lang('error_msg');
             $this->ajax_failed();
         }
     }
     echo $this->create_json(1, lang('stock_check_or_count_successfully'));
 }
开发者ID:ohjack,项目名称:mallerp_standard,代码行数:23,代码来源:accounting_cost.php


示例10: new_dataset

 function new_dataset()
 {
     $data['content'] = 'dataset-new';
     $data['nav'] = 'dataset';
     $data['title'] = 'Add Data Set';
     if ($this->input->post()) {
         $dataset = array('dataset_name' => $this->input->post('datasetname'), 'create_at' => get_current_time());
         if ($dataset['dataset_name'] == "") {
             $data['status'] = 0;
             $data['message'] = 'The name of dataset cannot be empty';
         } else {
             $num_rows = $this->db->where('dataset_name', $dataset['dataset_name'])->from('dataset')->count_all_results();
             if ($num_rows > 0) {
                 $data['status'] = 0;
                 $data['message'] = $dataset['dataset_name'] . ' has already existed';
             } else {
                 $data['status'] = 1;
                 $data['message'] = $dataset['dataset_name'] . ' dataset added successfully';
                 $this->db->insert('dataset', $dataset);
             }
         }
     }
     $this->load->view('/template/header', $data);
 }
开发者ID:Kaelcao,项目名称:cbir,代码行数:24,代码来源:UI.php


示例11: stChangeOrderStatus

function stChangeOrderStatus($orderID, $statusID, $comment = '', $notify = 0)
{
    $q_status_name = db_query("select status_name from " . ORDER_STATUES_TABLE . " where statusID=" . (int) $statusID);
    list($status_name) = db_fetch_row($q_status_name);
    $sql = "insert into " . ORDER_STATUS_CHANGE_LOG_TABLE . " ( orderID, status_name, status_change_time, status_comment ) " . " values( " . (int) $orderID . ", '" . xToText($status_name) . "', '" . xEscSQL(get_current_time()) . "', '" . xToText(trim($comment)) . "' ) ";
    db_query($sql);
    if ($notify) {
        $Order = ordGetOrder($orderID);
        $t = '';
        $Email = '';
        $FirstName = '';
        regGetContactInfo(regGetLoginById($Order['customerID']), $t, $Email, $FirstName, $t, $t, $t);
        if (!$Email) {
            $Email = $Order['customer_email'];
        }
        if (!$FirstName) {
            $FirstName = $Order['customer_firstname'];
        }
        xMailTxt($Email, STRING_CHANGE_ORDER_STATUS, 'customer.order.change_status.tpl', array('customer_firstname' => $FirstName, '_MSG_CHANGE_ORDER_STATUS' => str_replace(array('{STATUS}', '{ORDERID}'), array($status_name == 'STRING_CANCELED_ORDER_STATUS' ? STRING_CANCELED_ORDER_STATUS : $status_name, $orderID), MSG_CHANGE_ORDER_STATUS), '_ADMIN_COMMENT' => $comment));
    }
}
开发者ID:gblok,项目名称:rsc,代码行数:21,代码来源:statistic_functions.php


示例12: save_return_order

 public function save_return_order($tag = NULL)
 {
     $id = $this->input->post('id');
     $item_no = $this->input->post('item_no');
     //        $view_return_cost = $this ->input ->post('view_return_cost');
     $order = $this->order_model->get_order_with_id($id);
     if (!empty($order->return_cost)) {
         $return_cost = $this->input->post('return_cost') + $order->return_cost;
     } else {
         $return_cost = $this->input->post('return_cost');
     }
     $return_type = $this->input->post('return_type');
     $return_type_string = $this->order_model->fetch_status_name('order_status', $return_type);
     $sys_remark = $order->sys_remark;
     $sys_remark .= sprintf(lang('apply_action_by_sys_remark'), get_current_user_name(), get_current_time(), lang($return_type_string), $return_cost . "( {$order->currency})");
     $status_id_wfa = $this->order_model->fetch_status_id('order_status', 'wait_for_assignment');
     $status_id_wfc = $this->order_model->fetch_status_id('order_status', 'wait_for_confirmation');
     $status_id_h = $this->order_model->fetch_status_id('order_status', 'holded');
     /*
      * 当申请未发货-申请退款时(待客服分配,待客服确认,客服暂不确认), 状态直接改为未发货-申请退款。
      * **/
     if ($order->order_status == $status_id_wfa || $order->order_status == $status_id_wfc || $order->order_status == $status_id_h) {
         $return_type = $this->order_model->fetch_status_id('order_status', 'not_shipped_apply_for_refund');
         $sys_remark = $order->sys_remark;
         $sys_remark .= sprintf(lang('apply_action_by_sys_remark'), get_current_user_name(), get_current_time(), lang('not_shipped_apply_for_refund'), $return_cost . "( {$order->currency})");
     }
     $status_id = $this->order_model->get_one('order_list', 'order_status', array('id' => $id));
     $return_status = $this->order_model->fetch_status_name('order_status', $status_id);
     /**
      * 前:已发货时的几种状态, 中: 未发货时的状态 , 后:二次退款的。
      */
     $return_status_arr = array('wait_for_purchase', 'wait_for_shipping_label', 'wait_for_shipping_confirmation', 'wait_for_feedback', 'received', 'wait_for_assignment', 'wait_for_confirmation', 'holded', 'not_received_partial_refunded', 'received_partial_refunded');
     $rules = array(array('field' => 'remark', 'label' => lang('remark'), 'rules' => 'trim|required'));
     $return_type_nrar = $this->order_model->fetch_status_id('order_status', 'not_received_apply_for_partial_refund');
     $return_type_rar = $this->order_model->fetch_status_id('order_status', 'received_apply_for_partial_refund');
     $status = $this->order_model->fetch_status_name('order_status', $return_type);
     /**
      * Form 验证。
      */
     $this->form_validation->set_rules($rules);
     if ($this->form_validation->run() == FALSE) {
         $error = validation_errors();
         echo $this->create_json(0, $error);
         return;
     }
     /**
      *   这里是申请审核的。
      */
     $user_priority = $this->user_model->fetch_user_priority_by_system_code('order');
     //        if($user_priority+1 >= 2)//Test
     if ($user_priority >= 2) {
         if ($tag == 'approved') {
             $order_status_approved = $this->order_model->get_one('order_list', 'order_status', array('id' => $id));
             $return_type_string = $this->order_model->fetch_status_name('order_status', $order_status_approved);
             if ($return_type_string == 'not_received_approved_resending' || $return_type_string == 'received_approved_resending') {
                 echo $this->create_json(0, lang('review_finish'));
                 return;
             }
             switch ($return_type_string) {
                 case 'not_received_apply_for_partial_refund':
                     $return_type = $this->order_model->fetch_status_id('order_status', 'not_received_partial_refunded');
                     break;
                 case 'not_received_apply_for_full_refund':
                     $return_type = $this->order_model->fetch_status_id('order_status', 'not_received_full_refunded');
                     //                        $return_cost = $view_return_cost;
                     break;
                 case 'not_received_apply_for_resending':
                     $return_type = $this->order_model->fetch_status_id('order_status', 'not_received_approved_resending');
                     break;
                 case 'received_apply_for_partial_refund':
                     $return_type = $this->order_model->fetch_status_id('order_status', 'received_partial_refunded');
                     break;
                 case 'received_apply_for_full_refund':
                     $return_type = $this->order_model->fetch_status_id('order_status', 'received_full_refunded');
                     //                        $return_cost = $view_return_cost;
                     break;
                 case 'received_apply_for_resending':
                     $return_type = $this->order_model->fetch_status_id('order_status', 'received_approved_resending');
                     break;
                 case 'not_shipped_apply_for_refund':
                     $return_type = $this->order_model->fetch_status_id('order_status', 'not_shipped_agree_to_refund');
                     break;
                 default:
                     echo $this->create_json(0, lang('no_return'));
                     return;
             }
             $return_cost = $this->input->post('return_cost');
             $sys_remark = $order->sys_remark;
             //                $sys_remark .= sprintf(lang('approved_by_sys_remark'), get_current_time(), get_current_user_name());
             $sys_remark .= sprintf(lang('approved_by_sys_remark_for_one'), get_current_time(), get_current_user_name(), $return_cost . "( {$order->currency})");
             $descript = $order->descript;
             $descript .= sprintf(lang('approved_by_sys_remark_for_one'), get_current_time(), get_current_user_name(), $return_cost . "( {$order->currency})");
         } elseif ($tag == 'rejected') {
             $not_ship_id = $this->order_model->fetch_status_id('order_status', 'not_shipped_apply_for_refund');
             if ($order->order_status == $not_ship_id) {
                 $holded_id = $this->order_model->fetch_status_id('order_status', 'holded');
                 $order_status_rejected = $holded_id;
                 $sys_remark = $order->sys_remark;
                 $sys_remark .= sprintf(lang('rejected_by_sys_remark'), get_current_user_name(), get_current_time(), lang('not_shipped_apply_for_refund'), lang('holded'));
                 $descript = $order->descript;
//.........这里部分代码省略.........
开发者ID:ohjack,项目名称:mallerp_standard,代码行数:101,代码来源:special_order.php


示例13: verify_order_before_print_label

 public function verify_order_before_print_label($order_id)
 {
     if (strpos($_SERVER['SCRIPT_FILENAME'], 'auto_verify_order_after_change.php') === FALSE) {
         exit;
     }
     if (empty($order_id)) {
         return;
     }
     $order = $this->order_model->get_order($order_id);
     $wait_for_purchase_status = fetch_status_id('order_status', 'wait_for_purchase');
     $wait_for_finance_status = fetch_status_id('order_status', 'wait_for_finance_confirmation');
     $sys_remark = $order->sys_remark . sprintf(lang('purchase_to_finance_confirmation_note_due_to_profit_rate'), get_current_time(), lang('system'));
     $skus = explode(',', $order->sku_str);
     $qties = explode(',', $order->qty_str);
     $product_price = 0;
     $shipping_weight = 0;
     $i = 0;
     foreach ($skus as $sku) {
         $qty = $qties[$i];
         $i++;
         $product = $this->product_model->fetch_product_by_sku($sku);
         $product_price += $product->price * $qty;
         $shipping_weight += $product->total_weight * $qty;
     }
     $order_data = array('item_id_str' => $order->item_id_str, 'gross' => $order->gross, 'net' => $order->net, 'currency' => $order->currency, 'transaction_ids' => $order->transaction_id, 'shipping_code' => $order->is_register, 'price' => $product_price, 'shipping_weight' => $shipping_weight, 'country' => $order->country);
     $result = $this->_calculate_profit_rate($order_data);
     if (isset($result['profit_rate'])) {
         $data = array();
         $profit = $result['profit'];
         $profit_rate = $result['profit_rate'];
         if ($profit < -1 or $profit_rate < -0.1 or $profit_rate > 0.3) {
             if ($order->order_status == $wait_for_purchase_status) {
                 $data = array('order_status' => $wait_for_finance_status, 'sys_remark' => $sys_remark);
             }
         }
         $data['profit_rate'] = $result['profit_rate'];
         $data['shipping_cost'] = $result['shipping_cost'];
         $data['product_cost_all'] = $result['product_cost'];
         $data['trade_fee'] = $result['trade_fee'];
         $data['listing_fee'] = $result['listing_fee'];
         /*  Not activate it currently.
              *
             $order_role = $this->_get_order_role($order->sku_str, $order->to_email);
             $data['stock_user_id'] = $order_role['stock_user_id'];
             $data['purchaser_id_str'] = $order_role['purchaser_id_str'];
             $data['developer_id'] = $order_role['developer_id'];
             $data['saler_id'] = $order_role['saler_id'];
             */
         $this->order_model->update_order_information($order_id, $data);
     }
 }
开发者ID:ohjack,项目名称:mallerp_standard,代码行数:51,代码来源:auto.php


示例14: auditing_order_rejecteds

 public function auditing_order_rejecteds($tag = NULL)
 {
     $order_id = $this->input->post('order_id');
     $order = $this->order_model->get_order_with_id($order_id);
     if (empty($order)) {
         return;
     }
     $sys_remark = $order->sys_remark;
     $sys_remark .= sprintf(lang('batch_rejected_by_sys_remark_one'), get_current_time(), get_current_user_name());
     $descript = $order->descript;
     $descript .= sprintf(lang('batch_rejected_by_sys_remark_one'), get_current_time(), get_current_user_name());
     $margin_arr = explode('|', $order->return_why);
     if (count($margin_arr) == 2) {
         $return_cost = $order->return_cost - $margin_arr[1];
     }
     $return_why = $margin_arr[0];
     try {
         $data = array('order_status' => $this->order_model->fetch_status_id('order_status', 'wait_for_feedback'), 'sys_remark' => $sys_remark, 'descript' => $descript, 'return_why' => $return_why);
         if (isset($return_cost)) {
             $data['return_cost'] = $return_cost;
         }
         $order_status_no_ship = $this->order_model->fetch_status_name('order_status', $order->order_status);
         if ($order_status_no_ship == 'not_shipped_apply_for_refund') {
             $data['order_status'] = $this->order_model->fetch_status_id('order_status', 'holded');
         }
         $this->order_model->update_order_information($order_id, $data);
         echo $this->create_json(1, 'ok');
     } catch (Exception $e) {
         echo lang('error_msg');
         $this->ajax_failed();
     }
 }
开发者ID:ohjack,项目名称:mallerp_standard,代码行数:32,代码来源:return_order_auditing.php


示例15: ordAccessToLoadFile

function ordAccessToLoadFile($orderID, $productID, &$pathToProductFile, &$productFileShortName)
{
    $order = ordGetOrder($orderID);
    $product = GetProduct($productID);
    if (strlen($product['eproduct_filename']) == 0 || !file_exists('core/files/' . $product['eproduct_filename']) || $product['eproduct_filename'] == null) {
        return 4;
    }
    if ((int) $order['statusID'] != (int) ostGetCompletedOrderStatus()) {
        return 3;
    }
    $orderContent = ordGetOrderContent($orderID);
    foreach ($orderContent as $item) {
        if (GetProductIdByItemId($item['itemID']) == $productID) {
            if ($item['load_counter'] < $product['eproduct_download_times'] || $product['eproduct_download_times'] == 0) {
                $date1 = dtGetParsedDateTime($order['order_time_mysql']);
                //$order['order_time']
                $date2 = dtGetParsedDateTime(get_current_time());
                $countDay = _getDayBetweenDate($date1, $date2);
                if ($countDay >= $product['eproduct_available_days']) {
                    return 2;
                }
                if ($product['eproduct_download_times'] != 0) {
                    db_query('update ' . ORDERED_CARTS_TABLE . ' set load_counter=load_counter+1 ' . ' where itemID=' . (int) $item['itemID'] . ' AND orderID=' . (int) $orderID);
                }
                $pathToProductFile = 'core/files/' . $product['eproduct_filename'];
                $productFileShortName = $product['eproduct_filename'];
                return 0;
            } else {
                return 1;
            }
        }
    }
    return -1;
}
开发者ID:gblok,项目名称:rsc,代码行数:34,代码来源:order_functions.php


示例16: edit_save_order_ship_remark

 public function edit_save_order_ship_remark()
 {
     $cur_time = get_current_time();
     $cur_date = date("Y-m-d");
     $id = $this->order_shipping_record_model->fetch_id_of_record();
     $data = array('date' => $cur_date, 'stock_note' => trim($this->input->post('stock_remark')), 'shipping_note' => trim($this->input->post('ship_remark')), 'created_date' => $cur_time);
     try {
         if ($id) {
             $this->order_shipping_record_model->delete_ship_record_remark($id);
             $this->order_shipping_record_model->save_ship_record_remark($data);
             echo $this->create_json(1, lang('remark_saved'));
         } else {
             $this->order_shipping_record_model->save_ship_record_remark($data);
             echo $this->create_json(1, lang('remark_saved'));
         }
     } catch (Exception $e) {
         echo lang('error_msg');
         $this->ajax_failed();
     }
 }
开发者ID:ohjack,项目名称:mallerp_standard,代码行数:20,代码来源:deliver_management.php


示例17: modification_order_status

 public function modification_order_status()
 {
     $item_no = $this->input->post('item_no');
     $order_status = $this->input->post('order_status');
     if (empty($item_no)) {
         echo $this->create_json(0, lang('item_no_is_null'));
         return;
     }
     $order = $this->order_model->get_order_with_item_no($item_no);
     if (!$order) {
         $order = $this->order_model->get_order_with_item_no_from_completed($item_no);
     }
     if (empty($order)) {
         echo $this->create_json(0, lang('order_not_exists'));
         return;
     } else {
         $status = $order->order_status;
     }
     $not_shipped = fetch_status_id('order_status', 'not_shipped_agree_to_refund');
     $ok_arr = array(fetch_status_id('order_status', 'not_received_partial_refunded'), fetch_status_id('order_status', 'not_received_full_refunded'), fetch_status_id('order_status', 'not_received_approved_resending'), fetch_status_id('order_status', 'received_partial_refunded'), fetch_status_id('order_status', 'received_full_refunded'), fetch_status_id('order_status', 'received_approved_resending'));
     if (empty($status)) {
         $lang_string = 'NULL';
     } else {
         $status_string = fetch_status_name('order_status', $order->order_status);
         $lang_string = lang($status_string);
     }
     $sys_remark = $order->sys_remark;
     $sys_remark .= sprintf(lang('modification_by_sys_remark'), get_current_time(), get_current_user_name(), $lang_string, lang('wait_for_feedback'));
     $data = array('order_status' => fetch_status_id('order_status', 'wait_for_feedback'), 'sys_remark' => $sys_remark);
     try {
         if (in_array($status, $ok_arr) || empty($status)) {
             $this->order_model->update_order_information_by_item_no($item_no, $data);
             $this->order_model->update_order_information_by_item_no_from_completed($item_no, $data);
             echo $this->create_json(1, lang('ok'));
         } else {
             if ($status == $not_shipped) {
                 $this->order_model->update_order_information_by_item_no($item_no, $data);
                 $this->order_model->update_order_information_by_item_no_from_completed($item_no, $data);
                 echo $this->create_json(1, lang('ok'));
             } else {
                 echo $this->create_json(0, lang('no_update_this_status_order'));
             }
         }
     } catch (Exception $ex) {
         echo lang('error_msg');
         $this->ajax_failed();
     }
 }
开发者ID:ohjack,项目名称:mallerp_standard,代码行数:48,代码来源:setting.php


示例18: regRegisterCustomer

function regRegisterCustomer($login, $cust_password, $Email, $first_name, $last_name, $subscribed4news, $additional_field_values, $affiliateLogin = '')
{
    $affiliateID = 0;
    if ($affiliateLogin) {
        $sql = "select customerID  FROM " . CUSTOMERS_TABLE . "\n                        WHERE Login='" . xToText(trim($affiliateLogin)) . "'";
        list($affiliateID) = db_fetch_row(db_query($sql));
    }
    foreach ($additional_field_values as $key => $val) {
        $additional_field_values[$key] = $val;
    }
    $currencyID = CONF_DEFAULT_CURRENCY;
    $cust_password = cryptPasswordCrypt($cust_password, null);
    // add customer to CUSTOMERS_TABLE
    $custgroupID = CONF_DEFAULT_CUSTOMER_GROUP;
    if ($custgroupID == 0) {
        $custgroupID = "NULL";
    }
    /**
     * Activation code
     */
    $ActivationCode = '';
    if (CONF_ENABLE_REGCONFIRMATION) {
        $CodeExists = true;
        while ($CodeExists) {
            $ActivationCode = generateRndCode(16);
            $sql = 'SELECT 1 FROM ' . CUSTOMERS_TABLE . '
                                WHERE ActivationCode="' . xEscapeSQLstring($ActivationCode) . '"';
            @(list($CodeExists) = db_fetch_row(db_query($sql)));
        }
    }
    db_query("insert into " . CUSTOMERS_TABLE . "( Login, cust_password, Email, first_name, last_name, subscribed4news, reg_datetime, CID, custgroupID, affiliateID, ActivationCode )" . "values( '" . xToText(trim($login)) . "', '" . xEscSQL(trim($cust_password)) . "', '" . xToText(trim($Email)) . "', " . " '" . xToText(trim($first_name)) . "', '" . xToText(trim($last_name)) . "', '" . (int) $subscribed4news . "', '" . xEscSQL(get_current_time()) . "', " . (int) $currencyID . ", " . (int) $custgroupID . ", " . xEscSQL(trim($affiliateID)) . ", '" . xEscSQL(trim($ActivationCode)) . "' )");
    // add additional values to CUSTOMER_REG_FIELDS_TABLE
    foreach ($additional_field_values as $key => $val) {
        SetRegField($key, $login, $val["additional_field"]);
    }
    $customerID = regGetIdByLogin($login);
    //db_query("update ".CUSTOMERS_TABLE." set addressID='".$addressID.
    //        "' where Login='".$login."'" );
    if ($subscribed4news) {
        subscrAddRegisteredCustomerEmail($customerID);
    }
    return true;
}
开发者ID:gblok,项目名称:rsc,代码行数:43,代码来源:registration_functions.php


示例19: auto_update_order_status

 public function auto_update_order_status()
 {
     if (strpos($_SERVER['SCRIPT_FILENAME'], 'auto_abroad_update_order_status.php') === FALSE) {
         exit;
     }
     define('SHIPPED_STATUS', 7);
     $status = 0;
     $outstocks = $this->abroad_stock_model->fetch_cky_outstock_by_status($status);
     $update_status_flag = TRUE;
     $wait_for_feedback_status = fetch_status_id('order_status', 'wait_for_feedback');
     $user_name = 'chukou1';
     foreach ($outstocks as $outstock) {
         $order_sign = $outstock->order_sign;
         $data = array('order_no' => $order_sign);
         $result = $this->cky_order->outstore_product_list($data);
         var_dump($result);
         if ($result && $result['status']) {
             $result = $result['result'];
             foreach ($result as $order_id => $value) {
                 if ($value['state'] == SHIPPED_STATUS) {
                     $shipping_status = $this->order_model->check_order_shipped_or_not($order_id);
                     // not shipped ?
                     if (!$shipping_status) {
                         // update shipping status
                         $datetime = get_current_time();
                         $order = $this->order_model->get_order($order_id);
                         if (empty($order)) {
                             continue;
                         }
                         $remark = $order->sys_remark;
                         $remark .= sprintf(lang('confirm_shipped_remark'), $datetime, $user_name);
                         $data = array('track_number' => $value['track_number'], 'ship_confirm_user' => $user_name, 'ship_confirm_date' => $datetime, 'order_status' => $wait_for_feedback_status, 'sys_remark' => $remark);
                         echo "updating order {$order_id},\n";
                         var_dump($data);
                         $this->order_model->update_order_information($order_id, $data);
                         // notify customer by email in backend.
                         $this->events->trigger('shipping_confirmation_after', array('order_id' => $order_id));
                     }
                 } else {
                     $update_status_flag = FALSE;
                 }
             }
         } else {
             $update_status_flag = FALSE;
             var_dump($result);
         }
         if ($update_status_flag) {
             $data = array('status' => 1);
             $this->abroad_stock_model->update_outstock($order_sign, $data);
         }
     }
 }
开发者ID:ohjack,项目名称:mallerp_standard,代码行数:52,代码来源:auto_abroad.php


示例20: update_how_number

 public function update_how_number()
 {
     $id = $this->input->post('id');
     $type = $this->input->post('type');
     $value = trim($this->input->post('value'));
     $order_sku = $this->purchase_order_model->fetch_sku($id);
     $sku = $order_sku->sku;
     $sku_arrival_quantity = $order_sku->sku_arrival_quantity;
     $product_how = $this->purchase_order_model->fetch_purchase_how($id);
     $product_basic = $this->purchase_order_model->fetch_product_id($sku);
     $product_id = $product_basic->b_id;
     $user_id = get_current_user_id();
     try {
         switch ($type) {
             case 'qualified_number':
                 if (!is_numeric($value) || $value <= 0) {
                     echo $this->create_json(0, lang('your_input_is_not_positive_numeric'), $value);
                     return;
                 }
                 break;
         }
         if (isset($product_how->order_sku_id)) {
             $qualified_number = $this->purchase_order_model->fetch_purchase_how($id)->qualified_number;
             if ($type == 'qualified_number') {
                 $order_id = $this->purchase_order_model->get_purchase_order_id($id);
                 $item_no = $this->purchase_order_model->get_item_no($order_id);
                 $number = $qualified_number + $value;
                 $this->purchase_order_model->update_how_number($id, $type, $number);
                 $stock_count = $this->product_model->fetch_stock_count($product_id);
                 $after_change_count = $stock_count + $value;
                 $data = array('stock_type' => 'product_instock', 'product_id' => $product_id, 'user_id' => $user_id, 'order_sku_id' => $id, 'change_count' => $value, 'type_extra' => $item_no, 'type' => 'purchase_ 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_current_url函数代码示例发布时间:2022-05-15
下一篇:
PHP get_current_theme函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap