Beispiel #1
0
        $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;
    }
}
//START TEMPLATE
$order_id = isset($_GET['id']) && $_GET['id'] != '' ? tep_db_prepare_input($_GET['id']) : '';
if ($order_id == '') {
    $order_id = isset($_POST['id']) && $_POST['id'] != '' ? tep_db_prepare_input($_POST['id']) : '';
}
$idform = '<form name="order-detail" action="?open=sp-order" method="post">';
$idform .= '<div>Barcode Entry:</div>';