コード例 #1
0
ファイル: index.inc.php プロジェクト: TiMoChao/xingfu
    }
    if (empty($_POST['iphone']) || $_POST['iphone'] == '联系电话') {
        check::AlertExit('对不起,联系电话必须填写!', -1);
    }
    if (empty($_POST['class']) || $_POST['class'] == '所报班级') {
        check::AlertExit('对不起,所报班级必须填写!!', -1);
    }
    if (empty($_POST['address']) || $_POST['address'] == '家庭住址') {
        check::AlertExit('对不起,家庭地址必须填写!!', -1);
    }
    if (empty($_POST['ethnic']) || $_POST['ethnic'] == '民族') {
        check::AlertExit('对不起,民族必须填写!!', -1);
    }
    $strIP = check::getip();
    $_POST['user_ip'] = $strIP;
    $objWebInit->saveInfo($_POST, 0);
    check::AlertExit("", $arrGWeb['WEB_ROOT_pre'] . "/xingfu_apply/");
}
if (!isset($_GET['page']) || $_GET['page'] == '') {
    $_GET['page'] = $arrGPage['page'];
}
$arrInfoList = $objWebInit->getInfolist("where pass=1", "ORDER BY submit_date DESC", ($_GET['page'] - 1) * $arrGPage['page_size'], $arrGPage['page_size'], '*', '');
$intRows = $arrInfoList['COUNT_ROWS'];
unset($arrInfoList['COUNT_ROWS']);
//静态url处理
$strLink = '';
if ($arrGWeb['URL_static']) {
    if (!empty($arrLink)) {
        $strLink = str_replace('=', '-', implode('-', $arrLink));
    }
} else {
コード例 #2
0
ファイル: modifyinfo.php プロジェクト: TiMoChao/xingfu
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	xingfu_apply
 */
require_once '../config/config.inc.php';
require_once "../class/xingfu_apply.class.php";
require_once '../..' . __WEBADMIN_ROOT . '/checklogin.php';
$objWebInit = new xingfu_apply();
$objWebInit->db();
//访问权限检查
if (!$objWebInit->checkPopedomG($_SESSION['user_id'], 'w')) {
    check::AlertExit('对不起,您没有读权限', -1);
}
// 取得文章信息
$arrInfo = $objWebInit->getInfo($_REQUEST['id']);
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $arrInfo['id'] = $_POST['id'];
    $arrInfo['state'] = $_POST['state'];
    $arrInfo['remark'] = $_POST['remark'];
    $objWebInit->saveInfo($arrInfo, 1);
    check::WindowLocation('index.php', $_SERVER["QUERY_STRING"]);
}
// 输出到模板
$arrMOutput["template_file"] = "admin.html";
$arrMOutput["smarty_assign"]['arrData'] = $arrInfo;
$arrMOutput["smarty_assign"]['arrGState'] = $arrGState;
$arrMOutput["smarty_assign"]['action_type'] = "save";
$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['admin_main_dir'] . 'submit.htm';
$objWebInit->output($arrMOutput);