コード例 #1
0
                    $t = array();
                    $t['r'] = $c['partner'];
                    $t['d'] = $c['jng_sp_customers_id'];
                    $t['c'] = $cname;
                    $action = '<input type="button" name="cadd2list" value="Add" />';
                    $action .= '<input type="hidden" id="cid-' . $c['jng_sp_customers_id'] . '" name="jng_sp_customers_id" value="' . $c['jng_sp_customers_id'] . '" />';
                    $t['a'] = $action;
                    $table[] = $t;
                }
                $result .= tep_draw_table('spo', $table);
            }
        }
        echo utf8_encode($result);
    } elseif ($_POST['me_action'] == 'ADDCUSTOMER') {
        $jng_sp_customers_id = tep_db_prepare_input($_POST['jng_sp_customers_id']);
        $added = $class_jcs->addCustomer($type, $jng_sp_customers_id);
        $result = $added ? $jng_sp_customers_id : 'fail';
        echo utf8_encode($result);
    }
    exit;
}
//START TEMPLATE
$content = '<div>Search Customer Name</div>';
$content .= '<div style="margin-bottom:20px;">';
$content .= '<input type="text" id="search_keywords" value="" class="iwbutton" />';
$content .= '<input type="button" id="search_button" value="Go" />';
$content .= '</div>';
$content .= '<div id="search_loading" style="display:none;"><img src="images/ajax-load-1.gif" /></div>';
$content .= '<div id="search_result" style="display:none;">&nbsp;</div>';
$javascript = '
			var url = "index.php?open=sp-customers-special-list-add&type=' . $type . '";
コード例 #2
0
$class_jcs = new jng_sp_customers_special();
use_class('jng_sp');
$class_sp = new jng_sp();
use_class('jng_sp_orders');
$class_jo = new jng_sp_orders();
$customers_id = isset($_GET['id']) ? tep_db_prepare_input($_GET['id']) : '';
if ($customers_id == '') {
    exit;
}
//SUBMIT ACTION
if (isset($_POST['me_action'])) {
    if ($_POST['me_action'] == 'SETSPECIALLIST') {
        $submit = tep_db_prepare_input($_POST['submit']);
        $type = strpos($submit, 'VIP') === false ? 'B' : 'V';
        $customers_id = tep_db_prepare_input($_POST['customer_id']);
        $class_jcs->addCustomer($type, $customers_id);
        $openspeciallistdetail = true;
    }
}
//START TEMPLATE
$customer = $class_jcust->retrieveDetail($customers_id);
$customer_special = $class_jcs->getCustomerDetail($customers_id);
$order_sl_type = '';
$order_sl_icon = '';
if (!is_null($customer_special)) {
    $crown_img = $class_jcs->getTypeSymbol($customer_special['list_type'], $customers_id);
    $order_sl_icon = $crown_img . ' ';
    $order_sl_type = $class_jcs->getTypeName($customer_special['list_type']);
    if ($order_sl_type != '') {
        $order_sl_type = ' (' . $order_sl_type . ')';
    }
コード例 #3
0
 $level = $request['reminderlevel'];
 $payi->addReminder($tx_time, $level, $received);
 $black_lists = array('5', 'A');
 //BLACK LIST FOR CUSTOMERS THAT ALREADY RECEIVE reminder_level 5 and A
 if (in_array($level, $black_lists)) {
     switch ($payi->detail['invoice_order_type']) {
         case 'S':
             use_class('jng_sp_customers_special');
             $class_jcs = new jng_sp_customers_special();
             if (isset($request['userid']) && $request['userid'] != '') {
                 $q = tep_db_query("SELECT jng_sp_customers_id FROM jng_sp_customers WHERE payone_userid=" . $request['userid']);
                 if (tep_db_num_rows($q) > 0) {
                     $cust = tep_db_fetch_array($q);
                     $jng_sp_customers_id = $cust['jng_sp_customers_id'];
                     if (is_null($class_jcs->getCustomerDetail($jng_sp_customers_id))) {
                         $class_jcs->addCustomer('B', $jng_sp_customers_id);
                     } else {
                         $class_jcs->updateCustomer($jng_sp_customers_id, 'list_type', 'B');
                     }
                 }
             }
             break;
         case 'J':
             use_class('customers_special_list');
             $class_cs = new customers_special_list();
             if (isset($request['userid']) && $request['userid'] != '') {
                 $q = tep_db_query("SELECT customers_id FROM customers WHERE payone_userid=" . $request['userid']);
                 if (tep_db_num_rows($q) > 0) {
                     $cust = tep_db_fetch_array($q);
                     $customers_id = $cust['customers_id'];
                     if (is_null($class_cs->getCustomerDetail($customers_id))) {
コード例 #4
0
ファイル: sp-order.php プロジェクト: blasiuscosa/manobo-2008
     //$comment = $class_jo->retrieveCommentDetail($comment_id);
     //$comments = array($comment);
     //$result = $class_jo->drawComments($comments, true);
     $result = drawSingleComment($comment_id, $comment_by, time(), $comment);
     echo utf8_encode($result);
     exit;
 } elseif ($_POST['me_action'] == 'DELETECOMMENT') {
     $order_id = tep_db_prepare_input($_POST['order_id']);
     $comment_id = tep_db_prepare_input($_POST['comment_id']);
     $class_jo->deleteComment($order_id, $comment_id);
     echo utf8_encode($comment_id);
     exit;
 } elseif ($_POST['me_action'] == 'UPDATECUSTOMERSPECIALLIST') {
     $customers_id = tep_db_prepare_input($_POST['customers_id']);
     $status = tep_db_prepare_input($_POST['status']);
     $class_jcs->addCustomer($status, $customers_id);
     $messagebox->add('Successfully set this customer as a ' . $class_jcs->getTypeName($status) . ' Customer', 'green');
     $openspeciallistdetail = true;
 } elseif ($_POST['me_action'] == 'CHANGEEMAILADDRESS') {
     $order_id = tep_db_prepare_input($_POST['order_id']);
     $old_email = tep_db_prepare_input($_POST['old_email']);
     $new_email = tep_db_prepare_input($_POST['new_email']);
     if (tep_validate_email($new_email)) {
         $class_jo->updateEmailAddress($order_id, $old_email, $new_email, $session_userinfo['username']);
         $result = 'OK';
     } else {
         $result = 'FAIL';
     }
     echo utf8_encode($result);
     exit;
 }