7 Star 19 Fork 7

王东祥/HongYuDSC

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
merchants_steps_action.php 5.38 KB
一键复制 编辑 原始数据 按行查看 历史
鸿宇科技 提交于 2018-03-02 02:43 . Initial commit
<?php
//zend by QQ:1527200768 鸿宇科技 禁止倒卖 一经发现停止任何服务
define('IN_ECS', true);
require dirname(__FILE__) . '/includes/init.php';
if ((DEBUG_MODE & 2) != 2) {
$smarty->caching = true;
}
$cache_id = sprintf('%X', crc32($_SESSION['user_rank'] . '-' . $_CFG['lang']));
$user_id = $_SESSION['user_id'];
$step = (isset($_REQUEST['step']) ? htmlspecialchars(trim($_REQUEST['step'])) : '');
$sid = (isset($_REQUEST['sid']) ? intval($_REQUEST['sid']) : 1);
$agreement = (isset($_REQUEST['agreement']) ? intval($_REQUEST['agreement']) : 0);
$pid_key = (isset($_REQUEST['pid_key']) ? intval($_REQUEST['pid_key']) : 0);
$brandView = (isset($_REQUEST['brandView']) ? htmlspecialchars(trim($_REQUEST['brandView'])) : '');
$brandId = (isset($_REQUEST['brandId']) ? intval($_REQUEST['brandId']) : 0);
$search_brandType = (isset($_REQUEST['search_brandType']) ? htmlspecialchars($_REQUEST['search_brandType']) : '');
$searchBrandZhInput = (isset($_REQUEST['searchBrandZhInput']) ? htmlspecialchars(trim($_REQUEST['searchBrandZhInput'])) : '');
$searchBrandZhInput = (!empty($searchBrandZhInput) ? addslashes($searchBrandZhInput) : '');
$searchBrandEnInput = (isset($_REQUEST['searchBrandEnInput']) ? htmlspecialchars(trim($_REQUEST['searchBrandEnInput'])) : '');
$searchBrandEnInput = (!empty($searchBrandEnInput) ? addslashes($searchBrandEnInput) : '');
if ($user_id <= 0) {
show_message($_LANG['steps_UserLogin'], $_LANG['UserLogin'], 'user.php');
exit();
}
$sql = 'select agreement from ' . $ecs->table('merchants_steps_fields') . ' where user_id = \'' . $user_id . '\'';
$sf_agreement = $db->getOne($sql);
if ($sf_agreement != 1) {
if ($agreement == 1) {
$parent = array('user_id' => $user_id, 'agreement' => $agreement);
$GLOBALS['db']->autoExecute($GLOBALS['ecs']->table('merchants_steps_fields'), $parent, 'INSERT');
}
}
else {
$shopTime_term = (isset($_REQUEST['shopTime_term']) ? intval($_REQUEST['shopTime_term']) : 0);
if (($pid_key == 2) && ($step == 'stepTwo')) {
$parent = array('shopTime_term' => $shopTime_term);
$GLOBALS['db']->autoExecute($GLOBALS['ecs']->table('merchants_steps_fields'), $parent, 'UPDATE', 'user_id = \'' . $user_id . '\'');
}
$process_list = get_root_steps_process_list($sid);
$process = $process_list[$pid_key];
$noWkey = $pid_key - 1;
$noWprocess = $process_list[$noWkey];
$form = get_steps_title_insert_form($noWprocess['id']);
$parent = get_setps_form_insert_date($form['formName']);
$parent['site_process'] = !empty($parent['site_process']) ? addslashes($parent['site_process']) : $parent['site_process'];
$GLOBALS['db']->autoExecute($GLOBALS['ecs']->table('merchants_steps_fields'), $parent, 'UPDATE', 'user_id = \'' . $user_id . '\'');
if ($step == 'stepTwo') {
if (!is_array($process)) {
$step = 'stepThree';
$pid_key = 0;
$sid = $sid + 1;
}
else {
$step = 'stepTwo';
$pid_key = $pid_key;
}
}
else if ($step == 'stepThree') {
if (!is_array($process)) {
$ec_rz_shopName = (isset($_REQUEST['ec_rz_shopName']) ? trim($_REQUEST['ec_rz_shopName']) : '');
$ec_hopeLoginName = (isset($_REQUEST['ec_hopeLoginName']) ? trim($_REQUEST['ec_hopeLoginName']) : '');
$sql = 'select user_id from ' . $ecs->table('merchants_shop_information') . ' where rz_shopName = \'' . $ec_rz_shopName . '\' AND user_id <> \'' . $_SESSION['user_id'] . '\'';
if ($db->getOne($sql)) {
show_message($_LANG['Settled_Prompt'], $_LANG['Return_last_step'], 'merchants_steps.php?step=' . $step . '&pid_key=' . $noWkey);
exit();
}
else {
$sql = 'update ' . $ecs->table('merchants_shop_information') . ' set steps_audit = 1' . ' where user_id = \'' . $_SESSION['user_id'] . '\'';
$db->query($sql);
$step = 'stepSubmit';
$pid_key = 0;
}
$sql = 'select user_id from ' . $ecs->table('admin_user') . ' where user_name = \'' . $ec_hopeLoginName . '\' AND ru_id <> \'' . $_SESSION['user_id'] . '\'';
if ($db->getOne($sql)) {
show_message($_LANG['Settled_Prompt_name'], $_LANG['Return_last_step'], 'merchants_steps.php?step=' . $step . '&pid_key=' . $noWkey);
exit();
}
else {
$sql = 'update ' . $ecs->table('merchants_shop_information') . ' set steps_audit = 1' . ' where user_id = \'' . $_SESSION['user_id'] . '\'';
$db->query($sql);
$step = 'stepSubmit';
$pid_key = 0;
}
}
}
}
if (empty($step)) {
$step = 'stepOne';
}
$act = '';
if ($brandView == 'brandView') {
$pid_key -= 1;
}
else if ($brandView == 'add_brand') {
if (0 < $brandId) {
$act .= '&brandId=' . $brandId . '&search_brandType=' . $search_brandType;
}
if ($searchBrandZhInput != '') {
$act .= '&searchBrandZhInput=' . $searchBrandZhInput;
}
if ($searchBrandEnInput != '') {
$act .= '&searchBrandEnInput=' . $searchBrandEnInput;
}
$act .= '&brandView=brandView';
}
$steps_site = 'merchants_steps.php?step=' . $step . '&pid_key=' . $pid_key . $act;
$sql = ' select site_process from ' . $ecs->table('merchants_steps_fields') . ' where user_id = \'' . $user_id . '\'';
$site_process = $db->getOne($sql);
$strpos = strpos($site_process, $steps_site);
if ($strpos === false) {
if (!empty($site_process)) {
$site_process .= ',' . $steps_site;
}
else {
$site_process = $steps_site;
}
$sql = 'update ' . $ecs->table('merchants_steps_fields') . ' set steps_site = \'' . $steps_site . '\', site_process = \'' . $site_process . '\' where user_id = \'' . $user_id . '\'';
$db->query($sql);
}
ecs_header('Location: ' . $steps_site . "\n");
exit();
?>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/doney/HongYuDSC.git
git@gitee.com:doney/HongYuDSC.git
doney
HongYuDSC
HongYuDSC
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385