if (!$objWebInit->checkPopedomG($_SESSION['user_id'], 'w')) { check::AlertExit('对不起,您没有写权限', -1); } if ($_SERVER["REQUEST_METHOD"] == "POST") { if (empty($_POST['type_id']) || empty($_POST['title'])) { check::AlertExit("错误:有必填选项没填!", -1); } if (!check::CheckMobilePhone($_POST['title'])) { check::AlertExit("错误:手机格式不对!", -1); } //if($_POST['title'] != '') $_POST['title_md5'] = md5($_POST['title']); //判断是否发布重复信息 $arrTemp = $objWebInit->getInfoList("where title='{$_POST['title']}'", "", 0, 1); if ($arrTemp['COUNT_ROWS'] != 0) { check::AlertExit("错误:相同的信息请不要重复发布!", -1); } $objWebInit->saveInfo($_POST, 0, false); //$objWebInit->updateCache($objWebInit->lastInsertIdG(),$_POST['type_id'],$arrMOutput); check::WindowLocation('index.php', 'page=' . $_GET['page']); } if (!is_array($arrMType) || empty($arrMType)) { $arrMType = $objWebInit->getTypeList(); $arrMType = $objWebInit->formatTypeList(0, $arrMType); } // 输出到模板 $arrMOutput["template_file"] = "admin.html"; $arrMOutput["smarty_assign"]['arrMType'] = $arrMType; $arrMOutput["smarty_assign"]['arrTypeB'] = $arrMTypeB; $arrMOutput["smarty_assign"]['arrPhoneType'] = $arrPhoneType; $arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['admin_main_dir'] . 'submit.htm'; $objWebInit->output($arrMOutput);
$intPage = intval($_GET['page']); } $strWhere = implode(' AND ', $arrWhere); $strWhere = 'where ' . $strWhere; if ($_SERVER["REQUEST_METHOD"] == "POST") { if (empty($_POST['title'])) { check::AlertExit("请填写手机!", -1); } if (empty($_POST['yzm'])) { check::AlertExit("请填写验证码!", -1); } if (!check::CheckMobilePhone($_POST['title'])) { check::AlertExit("请填写正确的手机号码!", -1); } if ($_POST['mobilecode'] != $_POST['yzm']) { check::AlertExit("验证码输入错误!", -1); } else { $arrTemp = $objWebInit->getInfoWhere("where title='{$_POST['title']}'"); if (!empty($arrTemp)) { check::AlertExit("该手机已经订阅了!", -1); } else { unset($_POST['button']); unset($_POST['button2']); unset($_POST['yzm']); unset($_POST['mobilecode']); $objWebInit->saveInfo($_POST, 0); } } } $arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['main_dir'] . 'book.html'; $objWebInit->output($arrMOutput);
*/ require_once 'config/config.inc.php'; require_once "class/phonelist.class.php"; $objWebInit = new phonelist(); //数据库连接参数 $objWebInit->setDBG($arrGPdoDB); //smarty参数 $objWebInit->arrGSmarty = $arrGSmarty; //翻页参数 $objWebInit->arrGPage = $arrGPage; $objWebInit->db(); if ($_REQUEST['act'] == 'order') { $info = $objWebInit->getInfoWhere(" where title='{$_POST['title']}'"); if (!empty($info)) { $info = array_merge($info, $_POST); $objWebInit->saveInfo($info, 1, false); } else { $info = array(); $info['title'] = $_POST['title']; $info['product_a'] = 1; $objWebInit->saveInfo($info, 0, false); } echo 1; exit; } if (empty($_GET['page'])) { $intPage = 1; } else { $intPage = intval($_GET['page']); } $arrWhere = array();