Ejemplo n.º 1
0
            } else {
                setcookie($_COOKIE['LOS']['admin_id'], '', 1);
                setcookie($_COOKIE['LOS']['admin_pass'], '', 1);
                if (!empty($_REQUEST['is_ajax'])) {
                    make_json_error($_LANG['priv_error']);
                } else {
                    los_header("Location: privilege.php?act=login\n");
                }
                exit;
            }
        }
    } else {
        if (!empty($_REQUEST['is_ajax'])) {
            make_json_error($_LANG['priv_error']);
        } else {
            los_header("Location: privilege.php?act=login\n");
        }
        exit;
    }
}
//header('Cache-control: private');
header('content-type: text/html; charset=' . EC_CHARSET);
header('Expires: Fri, 14 Mar 1980 20:53:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
if ((DEBUG_MODE & 1) == 1) {
    error_reporting(E_ALL);
} else {
    error_reporting(E_ALL ^ E_NOTICE);
}
Ejemplo n.º 2
0
    $order_id = $_REQUEST['order_id'];
    $order_id_list = explode(',', $order_id);
    foreach ($order_id_list as $order) {
        $db_write->query("update order_delivery set status=1 WHERE order_id = '{$order}'");
    }
    $url = 'shipping_delivery.php?act=query&' . str_replace('act=delete', '', $_SERVER['QUERY_STRING']);
    los_header("Location: {$url}\n");
    exit;
} elseif ($_REQUEST['act'] == 'check_eg') {
    //admin_priv('26');
    $order = intval($_REQUEST['id']);
    $sql = "UPDATE order_delivery SET status =2,admind = '" . $_SESSION['admin_id'] . "',out_time = '" . time() . "' WHERE order_id = '{$order}'";
    $res = $db_write->query($sql);
    if ($res) {
        $url = 'shipping_delivery.php?act=query&' . str_replace('act=check_eg', '', $_SERVER['QUERY_STRING']);
        los_header("Location: {$url}\n");
        exit;
    } else {
        make_json_error('审核出错!请检查!');
    }
} elseif ($_REQUEST['act'] == 'employee') {
    require ROOT_PATH . 'includes/cls_json.php';
    $stn = intval($_GET['stn']);
    $sql = "select id as employee_id,name as employee_name from hr_employees where station_id = '" . $stn . "' and flag=1";
    $arr = $db_read->getAll($sql);
    $json = new JSON();
    echo $json->encode($arr);
}
function order_list()
{
    $filter['sdate'] = empty($_REQUEST['sdate']) ? '' : trim($_REQUEST['sdate']);
Ejemplo n.º 3
0
    $smarty->assign('page_count', $list['page_count']);
    $smarty->assign('filter', $list['filter']);
    $smarty->assign('list', $list['orders']);
    make_json_result($smarty->fetch('shipping_commission.html'), '', array('filter' => $list['filter'], 'page_count' => $list['page_count']));
} elseif ($_REQUEST['act'] == 'retry') {
    $stations = $db_read->getAll("SELECT station_id,station_name FROM ship_station where city_code {$city_code} ");
    $smarty->assign('stations', $stations);
    $smarty->assign('ur_here', '配送提成复核');
    $smarty->display('shipping_commission_retry.html');
} elseif ($_REQUEST['act'] == 'reset') {
    $station_id = intval($_POST['station']);
    $station = $db_read->getOne("select station_name from ship_station where station_id=" . $station_id);
    $bdate = $_POST['bdate'];
    $sql = "delete from ship_commit where station = '{$station}' and bdate = '{$bdate}'";
    $stations = $db_write->query($sql);
    los_header("Location: shipping_commission.php?station=" . $station_id . "&bdate=" . $bdate . "\n");
    exit;
}
function order_list()
{
    $filter['bdate'] = empty($_REQUEST['bdate']) ? date('Y-m-d') : trim($_REQUEST['bdate']);
    $filter['station'] = empty($_REQUEST['station']) ? 7 : intval($_REQUEST['station']);
    $reset = intval($_REQUEST['reset']);
    $sql = "SELECT station_name FROM ship_station  where station_id = '" . $filter['station'] . "'";
    $station = $GLOBALS['db_read']->getOne($sql);
    $sql = "select count(1) from ship_commit where station = '" . $station . "' and bdate = '" . $filter['bdate'] . "' ";
    $count = $GLOBALS['db_read']->getOne($sql);
    $stat = array();
    if ($count) {
        $sql = "select * from ship_commit where station = '" . $station . "' and bdate = '" . $filter['bdate'] . "' ";
        $res = $GLOBALS['db_read']->getAll($sql);