Exemple #1
0
 /**
  * 上传文件
  * @author	肖飞
  * @param array	 	$arrFile			图片文件信息数组$_FILES
  * @param int 		$PR					自动压缩的比例
  * @param int		$intID				内容ID,标示新增还是修改
  * @return unknown
  */
 function uploadInfoImage($arrFile, $PR = 0, $intID = 0)
 {
     if ($arrFile['name']) {
         if (!in_array(strtolower($arrFile['type']), array('image/jpg', 'image/jpeg', 'image/gif', 'image/pjpeg', 'image/png', 'image/x-png', 'application/x-shockwave-flash'))) {
             check::AlertExit('文件类型不符合要求(' . $arrFile['type'] . ')', -1);
         }
     }
     if ($intID == 0) {
         $intID = $this->getMaxID();
     }
     $strDir = ceil($intID / 1000);
     $strMakeDir = $this->arrGPic['FileSavePath'] . $strDir;
     if (!is_dir($this->arrGPic['FileSavePath'])) {
         @mkdir($this->arrGPic['FileSavePath']);
         @chmod($this->arrGPic['FileSavePath'], 0777);
     }
     if (!is_dir($strMakeDir)) {
         @mkdir($strMakeDir);
         @chmod($strMakeDir, 0777);
     }
     $FileExt = strrchr($arrFile['name'], ".");
     //取得上传文件扩展名
     $strPhoto = $strDir . "/" . $intID . "_" . time() . $FileExt;
     //存入数据库的图片访问路径
     $strPicName = $strMakeDir . "/" . $intID . "_" . time() . $FileExt;
     //新图片路径及名称
     if ($arrFile['type'] != 'application/x-shockwave-flash' && $arrFile['size'] > $this->arrGPic['FileMaxSize']) {
         if ($PR != 0) {
             move_uploaded_file($arrFile['tmp_name'], $strPicName);
             $objGDImage = new GDImage();
             if ($objGDImage->makePRThumb($strPicName, $PR)) {
                 return $strPhoto;
             } else {
                 check::AlertExit($strPicName . "文件上传错误!", -1);
             }
         } else {
             check::AlertExit("文件大小不符合要求!", -1);
         }
     } else {
         if (move_uploaded_file($arrFile['tmp_name'], $strPicName)) {
             return $strPhoto;
         } else {
             check::AlertExit($strPicName . "文件上传错误!", -1);
         }
     }
 }
 /**
  * 保存信息内容
  * @author	肖飞
  * @param	int $arrData    信息信息数组
  * @return  void
  */
 function saveInfo($arrData, $intModify = 0, $isAlert = true)
 {
     $arr = array();
     $arr = check::SqlInjection($this->saveTableFieldG($arrData));
     if ($intModify == 0) {
         if (!empty($_SESSION['user_id'])) {
             $arr['user_id'] = intval($_SESSION['user_id']);
         }
         if ($this->insertInfo($arr)) {
             if ($isAlert) {
                 check::Alert("预约成功,我们会尽快通知您,祝您生活愉快", -1);
             }
             check::AlertExit("", $arrGWeb['WEB_ROOT_pre'] . "/xingfu_apply/");
         } else {
             check::Alert("发布失败", -1);
         }
     } else {
         if ($this->updateInfo($arr)) {
             check::Alert("修改成功!");
         } else {
             check::Alert("修改失败");
         }
     }
 }
Exemple #3
0
}
$arrGMeta['video']['meta'] = array('Title' => $arrGMeta['video']['name'], 'Description' => $arrGMeta['video']['name'], 'Keywords' => $arrGMeta['video']['name']);
$somecontent = '<?php' . "\n" . '$arrGWeb = ' . var_export($arrGWeb, true) . ';' . "\n" . '$arrGMeta = ' . var_export($arrGMeta, true) . ';' . "\n" . '?>';
// 首先我们要确定文件存在并且可写。
if (is_writable($strFilename)) {
    if (!($handle = fopen($strFilename, 'w'))) {
        check::AlertExit("错误:不能打开文件 {$strFilename} !", -1);
    }
    // 将$somecontent写入到我们打开的文件中。
    if (fwrite($handle, $somecontent) === FALSE) {
        check::AlertExit("错误:不能写入到文件 {$strFilename} !", -1);
    }
    fclose($handle);
} else {
    check::AlertExit("错误:文件 {$strFilename} 不可写!", -1);
}
//sql语句
$sql[] = "CREATE TABLE IF NOT EXISTS `" . $arrGPdoDB['db_tablepre'] . "video` (\r\n  `id` int(10) unsigned NOT NULL auto_increment,\r\n  `type_id` tinyint(3) unsigned default '0',\r\n  `type_roue_id` varchar(80) default NULL,\r\n  `user_id` int(10) unsigned default '0',\r\n  `tag` varchar(30) default NULL,\r\n  `bedeck` tinyint(3) unsigned default '0',\r\n  `title` varchar(100) default NULL,\r\n  `title_md5` char(32) default NULL,\r\n  `linkurl` varchar(100) default NULL,\r\n  `summary` varchar(" . $intDbSummaryLen . ") default NULL,\r\n  `structon_tb` mediumtext,\r\n  `thumbnail` varchar(100) default NULL,\r\n  `submit_date` datetime default '0000-00-00 00:00:00',\r\n  `topflag` tinyint(1) default '0',\r\n  `recommendflag` tinyint(1) default '0',\r\n  `stars` tinyint(1) default '0',\r\n  `clicktimes` mediumint(10) unsigned default '0',\r\n  `pass` tinyint(1) default '1',\r\n  PRIMARY KEY  (`id`),\r\n  KEY `user_id` (`user_id`),\r\n  KEY `type_id` (`type_id`),\r\n  KEY `title_md5` (`title_md5`),\r\n  KEY `submit_date` (`submit_date`)\r\n) ENGINE=MyISAM {$extend} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT='行业资讯表' ;";
if (!is_array($arrMType) || empty($arrMType)) {
    $sql[] = "CREATE TABLE IF NOT EXISTS `" . $arrGPdoDB['db_tablepre'] . "video_type` (\r\n\t  `type_id` int(10) unsigned NOT NULL auto_increment,\r\n\t  `type_parentid` int(10) unsigned NOT NULL default '0',\r\n\t  `type_roue_id` varchar(80) default NULL,\r\n\t  `type_title` varchar(80) default NULL,\r\n\t  `type_link` varchar(150) default NULL COMMENT '跳转链接',\r\n\t  `type_sort` int(10) unsigned default NULL,\r\n\t  `type_pass` tinyint(1) NOT NULL default '1',\r\n\t  `type_read_grade` tinyint(1) NOT NULL default '0',\r\n\t  `type_write_grade` tinyint(1) NOT NULL default '0',\r\n\t  PRIMARY KEY  (`type_id`),\r\n\t  KEY `type_parentid` (`type_parentid`),\r\n\t  KEY `type_sort` (`type_sort`)\r\n\t) ENGINE=MyISAM  {$extend} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT='行业视频分类表' ;";
}
foreach ($sql as $val) {
    $objWebInit->db->query($val);
}
if (empty($arrModule)) {
    if (!is_array($arrMType) || empty($arrMType)) {
        check::AlertExit('数据库分类行业视频系统安装成功', "{$strWEB_ROOT_pre}/{$strWEBADMIN_ROOT}/");
    } else {
        check::AlertExit('配置文件分类行业视频系统安装成功', "{$strWEB_ROOT_pre}/{$strWEBADMIN_ROOT}/");
    }
}
    check::AlertExit('对不起,您没有权限访问此页', -1);
}
if (empty($_GET['path'])) {
    $arrMOutput["template_file"] = 'siteset/template_right_index.htm';
} else {
    $path = $_GET['path'];
    if ($_SERVER["REQUEST_METHOD"] == "POST") {
        $strFileName = $_SESSION['fileName'];
        $content = str_replace('\\', '', $_POST['content']);
        if (is_writable($strFileName)) {
            $fp = fopen($strFileName, 'w');
            fputs($fp, $content);
            fclose($fp);
            check::AlertExit('修改成功', -1);
        } else {
            check::AlertExit('很遗憾,template/ 下文件没有写权限!', -1);
        }
    }
    $strFileName = __WEB_ROOT . '/templates/' . $arrGWeb['templates_id'] . '/' . $path;
    $_SESSION['fileName'] = $strFileName;
    $fp = fopen($strFileName, 'r');
    $contents = fread($fp, filesize($strFileName));
    fclose($fp);
    //文件类型
    $opeType = substr(strrchr($path, '.'), 1);
    $arrMOutput["smarty_assign"]['contents'] = $contents;
    $arrMOutput["smarty_assign"]['strType'] = $opeType;
    $arrMOutput["template_file"] = 'siteset/template_right.htm';
}
// 输出到模板
$objWebInit->output($arrMOutput);
Exemple #5
0
 if (empty($_POST['content'])) {
     check::AlertExit("错误:短信内容没填!", -1);
 }
 //解析手机号开始
 $strSpacemark = $_POST['spacemark'];
 $strMobiles = $_POST['mobiles'];
 $arrMobiles = explode($strSpacemark, $strMobiles);
 $arrValidMobiles = array();
 foreach ($arrMobiles as $v) {
     $v = trim($v);
     if (check::CheckMobilePhone($v)) {
         $arrValidMobiles[] = $v;
     }
 }
 if (count($arrValidMobiles) == 0) {
     check::AlertExit("错误:填写的手机号都不合法!", -1);
 }
 $strMobiles = implode(";", $arrValidMobiles);
 //解析手机号完成
 $objSms = new BizSMS();
 $objSms->setParam($yx_arrMBizParam);
 //设置商务领航短信接口的基本参数
 $strResult = $objSms->sendShortMessage($strMobiles, $_POST['content']);
 //从页面中获取手机号和短信内容
 $strReturnCode = substr($strResult, 0, 1);
 if ($strReturnCode == "0") {
     check::Alert("发送成功!");
 } else {
     if ($strReturnCode == "1") {
         check::Alert("用户名或密码错误!", -1);
     } else {
Exemple #6
0
            $arrWhere[] = "type_id='" . $intTypeID . "' or type_roue_id like '%:{$intTypeID}:%'";
            $arrLink[] = 'type_id=' . $intTypeID;
        }
        if (!empty($_GET['state'])) {
            $intState = intval($_GET['state']);
            $arrWhere[] = " state = '{$intState}' ";
            $arrLink[] = 'state=' . $intState;
        }
    } else {
        if ($_GET['action'] == 'del') {
            if (!$objWebInit->checkPopedomG($_SESSION['user_id'], 'd')) {
                check::AlertExit('对不起,您没有删除权限', -1);
            }
        } else {
            if (!$objWebInit->checkPopedomG($_SESSION['user_id'], 'w')) {
                check::AlertExit('对不起,您没有写权限', -1);
            }
        }
        $objWebInit->doInfoAction($_GET['action'], $_POST['select']);
    }
}
if (!empty($_GET['title'])) {
    $strKeywords = strval(urldecode($_GET['title']));
    if ($strKeywords[0] == '/') {
        //精确查询ID
        $strKeywords = substr($strKeywords, 1);
        if (is_numeric($strKeywords)) {
            $arrWhere[] = "id = '" . $strKeywords . "'";
        }
    } else {
        $arrWhere[] = "title LIKE '%" . $_GET['title'] . "%'";
Exemple #7
0
//数据库连接参数
$objWebInit->setDBG($arrGPdoDB);
//smarty参数
$objWebInit->arrGSmarty = $arrGSmarty;
//图片上传参数
$objWebInit->arrGPic = $arrGPic;
$objWebInit->db();
//访问权限检查
if (!$objWebInit->checkPopedomG($_SESSION['user_id'])) {
    check::AlertExit('对不起,您没有权限访问此页', -1);
}
// 取得文章信息
$arrInfo = $objWebInit->getInfo($_REQUEST['id']);
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if (empty($_POST['type_id']) || empty($_POST['title']) || empty($_POST['intro'])) {
        check::AlertExit("错误:有必填选项没填!", -1);
    }
    //还原图片数组
    $_POST['photo'] = array();
    if (!empty($_POST['savephoto'])) {
        foreach ($_POST['savephoto'] as $key => $val) {
            $arrTemp = array();
            $arrTemp['photo'] = $val;
            if (!empty($_POST['photo_narrate' . $key])) {
                $arrTemp['photo_narrate'] = $_POST['photo_narrate' . $key];
            }
            $_POST['photo'][$key] = $arrTemp;
        }
    }
    //删除旧图
    if (!empty($_POST['delphoto'])) {
Exemple #8
0
                if ($types['type_id'] == $id) {
                    $arrType = $types;
                }
            }
            $arrTypeList = $objWebInit->formatTypeList(0, $arrTypeList);
            $arrMOutput["smarty_assign"]['type_id'] = $id;
            $arrMOutput["smarty_assign"]['arrType'] = $arrType;
            $arrMOutput["smarty_assign"]['arrData'] = $arrTypeList;
            $arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['admin_main_dir'] . 'edit_category.htm';
            $objWebInit->output($arrMOutput);
            break;
            // 更新课程培训类别
        // 更新课程培训类别
        case 'update':
            if (empty($_POST['type_title'])) {
                check::AlertExit("错误:提交数据为空!", -1);
            }
            if (!empty($_POST['type_link'])) {
                $_POST['type_link'] = str_replace("http://", "", strtolower($_POST['type_link']));
            }
            $objWebInit->makeUpdateType($_POST);
            unset($_GET['action']);
            break;
    }
}
if (!isset($_GET['action'])) {
    // 课程培训类型列表
    $arrTypeList = $objWebInit->getTypeList();
    $arrTypeList = $objWebInit->formatTypeList(0, $arrTypeList);
    // 输出到模板
    $arrMOutput["smarty_assign"]['arrData'] = $arrTypeList;
Exemple #9
0
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if (!$objWebInit->checkPopedomG($_SESSION['user_id'], 'w', 'siteset')) {
        check::AlertExit('对不起,您没有写权限', -1);
    }
    unset($_POST['okgo']);
    unset($arrGWeb);
    $strFilename = '../../data/webconfig.inc.php';
    include $strFilename;
    foreach ($arrGWeb as $k => $v) {
        foreach ($_POST as $k1 => $v1) {
            if ($k == $k1) {
                $arrGWeb[$k] = $_POST[$k1];
            }
        }
    }
    $somecontent = '<?php' . "\n" . '$arrGWeb = ' . var_export($arrGWeb, true) . ';' . "\n" . '$arrGMeta = ' . var_export($arrGMeta, true) . ';' . "\n" . '?>';
    if (!($handle = fopen($strFilename, 'w'))) {
        check::AlertExit("错误:不能打开文件 {$strFilename} !", -1);
    }
    // 将$somecontent写入到我们打开的文件中。
    if (fwrite($handle, $somecontent) === FALSE) {
        check::AlertExit("错误:不能写入到文件 {$strFilename} !", -1);
    }
    fclose($handle);
    check::AlertExit("成功地写入到文件 {$strFilename} !", -1);
}
// 输出到模板
$arrMOutput["smarty_assign"]['strNav'] = '网站缓存设置';
$arrMOutput["template_file"] = "admin.html";
$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['admin_main_dir'] . 'siteset/cache_set.htm';
$objWebInit->output($arrMOutput);
Exemple #10
0
 /**
  * 会员登陆
  * @author	肖飞
  * @param	array $arrUser    会员信息数组
  * @return  void
  */
 public function userLogin($arrData, $isEncryption = 0, $jamStr)
 {
     if (!check::CheckUser($arrData['User'])) {
         check::AlertExit("输入的用户名必须是4-20字符之间的数字、字母或中文!", -1);
         return false;
     }
     if (!check::CheckPassword($arrData['Pass'])) {
         check::AlertExit("输入的密码必须是4-20字符之间的数字、字母!", -1);
         return false;
     }
     $strPassTemp = $arrData['Pass'];
     if ($isEncryption) {
         $strPassTemp = check::strEncryption($strPassTemp, $jamStr);
     }
     $strSQL = "SELECT * FROM {$this->tablename2} WHERE user_name = ? and password = ?";
     $rs = $this->db->prepare($strSQL);
     $rs->execute(array($arrData['User'], $strPassTemp));
     if ($arr = $rs->fetchAll()) {
         $arr = current($this->loadTableFieldG($arr));
         $user_id = '';
         $user_name = '';
         $password = '';
         $real_name = '';
         $user_group = '';
         $user_popedom = '';
         $submit_date = '';
         $pass = '';
         $email = '';
         $tel = '';
         $company_cn = '';
         $user_type = '';
         $user_bonus = '';
         $_SESSION['user_id'] = $arr['user_id'];
         $_SESSION['user_name'] = $arr['user_name'];
         $_SESSION['password'] = $arr['password'];
         $_SESSION['user_group'] = $arr['user_group'];
         $_SESSION['user_grade'] = $arr['user_grade'];
         $_SESSION['user_popedom'] = $arr['user_popedom'];
         $_SESSION['real_name'] = $arr['real_name'];
         $_SESSION['email'] = $arr['email'];
         $_SESSION['tel'] = $arr['tel'];
         $_SESSION['company_cn'] = $arr['company_cn'];
         $_SESSION['user_type'] = $arr['user_type'];
         $_SESSION['user_bonus'] = $arr['user_bonus'];
         $_SESSION['pass'] = $arr['pass'];
         $_SESSION['province'] = $arr['province'];
         $_SESSION['city'] = $arr['city'];
         $_SESSION['type_id'] = $arr['type_id'];
         $arrUpdate['user_ip'] = check::getIP();
         $arrUpdate['lastlog '] = date('Y-m-d H:i:s');
         $arrUpdate['user_id'] = $arr['user_id'];
         $this->updateUser($arrUpdate);
         return true;
     } else {
         return false;
     }
 }
Exemple #11
0
    }
    $objQQWry =& new QQWry();
    $objQQWry->qqwry($strIP);
    $strZone = iconv('GB2312', 'UTF-8' . '//TRANSLIT', $objQQWry->Country);
    $_POST['zone'] = $strZone;
    $_POST['reply'] = array();
    if ($_POST['summary'] == '') {
        $_POST['summary'] = check::csubstr(trim(str_replace("&nbsp;", " ", str_replace("\r\n", "", strip_tags($_POST['intro'])))), 0, 100);
    }
    if (!array_key_exists('title', $_POST)) {
        $_POST['title'] = $_POST['titleprefix'] . $_POST['longtitle'];
    }
    unset($_POST['titleprefix']);
    unset($_POST['longtitle']);
    if ($_POST['title'] != '') {
        $_POST['title_md5'] = md5($_POST['title']);
    }
    //判断文章信息
    $arrTemp = $objWebInit->getInfoList("where title_md5='{$_POST['title_md5']}' and user_id = '{$_SESSION['user_id']}' and type_id='{$_POST['type_id']}'", "", 0, 1);
    if ($arrTemp['COUNT_ROWS'] != 0) {
        check::AlertExit("错误:相同的信息请不要重复发布!需要刷新排列的话,请登录会员中心使用列表下方“提前”选项!", -1);
    }
    $objWebInit->saveInfo($_POST, 0);
    if ($arrGWeb['URL_static']) {
        check::Alert("", $arrGWeb['WEB_ROOT_pre'] . "/ask/index.php");
    } else {
        check::AlertExit("请先完善提问信息", $arrGWeb['WEB_ROOT_pre'] . "/ask/index.php");
    }
} else {
    check::AlertExit('对不起,新问题的内容不能为空!', -1);
}
Exemple #12
0
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	user
 */
require_once 'config/config.inc.php';
require_once "class/user.class.php";
$objWebInit = new user();
//数据库连接参数
$objWebInit->setDBG($arrGPdoDB);
$objWebInit->db();
//smarty参数
$objWebInit->arrGSmarty = $arrGSmarty;
if (!empty($_POST)) {
    if (isset($_POST['authCode']) && $_POST['authCode'] != $_SESSION['authCode']) {
        check::AlertExit("错误:验证码不匹配!", -1);
    }
    if ($objWebInit->userLogin($_POST, $arrGWeb['user_pass_type'], $arrGWeb['jamstr'])) {
        check::AlertExit("恭喜您,登陆成功!", $_SERVER['HTTP_REFERER']);
    } else {
        check::AlertExit("用户名,或者密码错误!", $_SERVER['HTTP_REFERER']);
    }
}
//全站公用block
@(include '../_block.php');
if (empty($_SESSION['user_id'])) {
    $arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['main_dir'] . 'login.html';
    $objWebInit->output($arrMOutput);
}
Exemple #13
0
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	user
 */
require_once 'config/config.inc.php';
require_once "class/user.class.php";
$objWebInit = new user();
$objWebInit->db();
if (empty($_SESSION['jumpURL'])) {
    $_SESSION['jumpURL'] = $_SERVER['HTTP_REFERER'];
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if (empty($_POST['authCode']) || $_POST['authCode'] != $_SESSION['captcha']) {
        check::AlertExit("错误:验证码不匹配!", -1);
    }
    if ($objWebInit->userLogin($_POST, $arrGWeb['user_pass_type'], $arrGWeb['jamstr'])) {
        // 选择了记住用户名,用cookie的方式记录下来, 只记录用户名
        if (!empty($_POST['SafeControl'])) {
            // 需要记录
            setcookie('User', $_POST['User'], time() + 32140800, '/');
            // 默认有效期1年,
            setcookie('User_check', $_POST['SafeControl'], time() + 32140800, '/');
        } else {
            // 取消记录
            setcookie('User', $_POST['User'], time() - 100, '/');
            // 不需要记录,让Cookie 过期
            setcookie('User_check', $_POST['SafeControl'], time() - 100, '/');
        }
        if (!empty($_SESSION['jumpURL'])) {
Exemple #14
0
         }
     }
 }
 if ($_GET['action'] == 'detailtest') {
     echo "<a href=\r\n\t'{$val}' target=_blank>{$val}</a> &nbsp;&nbsp;&nbsp;&nbsp;<a href='index.php'>返回</a><pre>";
     print_r($arrSave);
     echo "</pre>";
     exit;
 }
 //存入数据库
 if ($_GET['action'] == 'fetchall' || $_GET['action'] == 'fetch') {
     if (empty($arrGFetch[$_GET['id']]['module_id'])) {
         check::AlertExit('存入栏目必须选择!', -1);
     }
     if (in_array($arrGFetch[$_GET['id']]['module_id'], array('mcenter', 'account', 'certification', 'comments', 'friend', 'message', 'payment', 'usermoney', 'logs', 'archives', 'ads', 'links', 'phonelist', 'emaillist', 'keywords', 'user'))) {
         check::AlertExit('非法栏目!', -1);
     }
     echo "<a href='{$val}' target=_blank>{$val}</a> &nbsp;&nbsp;&nbsp;&nbsp;<a href='javascript:history.go(-1);'>返回</a><pre>";
     print_r($arrSave);
     echo "</pre>";
     $arrSave['type_id'] = $arrGFetch[$_GET['id']]['type_id'];
     //if(!empty($arrSave['intro'])) $arrSave['summary'] = check::csubstr(trim(str_replace("&nbsp;"," ",str_replace("\r\n","",strip_tags($arrSave['intro'])))),0,250);
     if (!empty($arrSave['intro'])) {
         $arrSave['summary'] = check::csubstr(check::stripText($arrSave['intro']), 0, 250);
     }
     if (!empty($arrGFetch[$_GET['id']]['delimiter_df'])) {
         foreach ($arrGFetch[$_GET['id']]['delimiter_df'] as $k => $v) {
             if (!empty($v[0])) {
                 $arrSave[$v[0]] = $v[1];
             }
         }
Exemple #15
0
                if ($types['type_id'] == $id) {
                    $arrType = $types;
                }
            }
            $arrTypeList = $objWebInit->formatTypeList(0, $arrTypeList);
            $arrMOutput["smarty_assign"]['type_id'] = $id;
            $arrMOutput["smarty_assign"]['arrType'] = $arrType;
            $arrMOutput["smarty_assign"]['arrData'] = $arrTypeList;
            $arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['admin_main_dir'] . 'edit_category.htm';
            $objWebInit->output($arrMOutput);
            break;
            // 会展信息会展信息
        // 会展信息会展信息
        case 'update':
            if (empty($_POST['type_title'])) {
                check::AlertExit("会展信息会展信息空!", -1);
            }
            if (!empty($_POST['type_link'])) {
                $_POST['type_link'] = str_replace("http://", "", strtolower($_POST['type_link']));
            }
            $objWebInit->makeUpdateType($_POST);
            unset($_GET['action']);
            break;
    }
}
if (!isset($_GET['action'])) {
    // 会展信息会展信息
    $arrTypeList = $objWebInit->getTypeList();
    $arrTypeList = $objWebInit->formatTypeList(0, $arrTypeList);
    // 会展信息板
    $arrMOutput["smarty_assign"]['arrData'] = $arrTypeList;
Exemple #16
0
    $strWEBADMIN_ROOT = __WEBADMIN_ROOT;
}
unset($arrGWeb);
if (empty($ver_path)) {
    $ver_path = '';
}
$strFilename = '..' . $ver_path . '/data/webconfig.inc.php';
include $strFilename;
$arrGMeta['weixin_xingfufengcai']['name'] = '微信_名教风采';
$arrGMeta['weixin_xingfufengcai']['cache'] = 1;
//该栏目是否生成静态页,0=不可以,1=可以
$arrGMeta['weixin_xingfufengcai']['admin'] = array(array('href' => '../weixin_xingfufengcai/admin/category.php', 'name' => '微信_名教风采分类'), array('href' => '../weixin_xingfufengcai/admin/index.php', 'name' => '微信_名教风采管理'));
$arrGMeta['weixin_xingfufengcai']['meta'] = array('Title' => $arrGMeta['weixin_xingfufengcai']['name'], 'Description' => $arrGMeta['weixin_xingfufengcai']['name'], 'Keywords' => $arrGMeta['weixin_xingfufengcai']['name']);
$somecontent = '<?php' . "\n" . '$arrGWeb = ' . var_export($arrGWeb, true) . ';' . "\n" . '$arrGMeta = ' . var_export($arrGMeta, true) . ';' . "\n" . '?>';
//写入文件
file_put_contents($strFilename, $somecontent);
//sql语句
if ($_SESSION['install_type']) {
    $sql[] = "DROP TABLE IF EXISTS `" . $arrGPdoDB['db_tablepre'] . "weixin_xingfufengcai`;";
}
$sql[] = "CREATE TABLE IF NOT EXISTS `" . $arrGPdoDB['db_tablepre'] . "weixin_xingfufengcai` (\n  `id` int(10) unsigned NOT NULL auto_increment,\n  `type_id` tinyint(3) unsigned default '0',\n  `type_roue_id` varchar(80) default NULL,\n  `user_id` int(10) unsigned default '0',\n  `tag` varchar(30) default NULL,\n  `bedeck` tinyint(3) unsigned default '0',\n  `title` varchar(100) default NULL,\n  `title_md5` char(32) default NULL,\n  `linkurl` varchar(100) default NULL,\n  `summary` varchar(" . $intDbSummaryLen . ") default NULL,\n  `structon_tb` mediumtext,\n  `thumbnail` varchar(30) default NULL,\n  `submit_date` datetime default '0000-00-00 00:00:00',\n  `topflag` tinyint(1) default '0',\n  `recommendflag` tinyint(1) default '0',\n  `stars` tinyint(1) default '0',\n  `clicktimes` mediumint(10) unsigned default '0',\n  `pass` tinyint(1) default '1',\n  PRIMARY KEY  (`id`),\n  KEY `user_id` (`user_id`),\n  KEY `type_id` (`type_id`),\n  KEY `title_md5` (`title_md5`),\n  KEY `submit_date` (`submit_date`)\n) ENGINE=MyISAM {$extend} COMMENT='微信_名教风采表' ;";
if ($_SESSION['install_type']) {
    $sql[] = "DROP TABLE IF EXISTS `" . $arrGPdoDB['db_tablepre'] . "weixin_xingfufengcai_type`;";
}
$sql[] = "CREATE TABLE IF NOT EXISTS `" . $arrGPdoDB['db_tablepre'] . "weixin_xingfufengcai_type` (\n  `type_id` int(10) unsigned NOT NULL auto_increment,\n  `type_parentid` int(10) unsigned NOT NULL default '0',\n  `type_roue_id` varchar(80) default NULL,\n  `type_title` varchar(80) default NULL,\n  `type_link` varchar(150) default NULL COMMENT '跳转链接',\n  `type_sort` int(10) unsigned default NULL,\n  `type_pass` tinyint(1) NOT NULL default '1',\n  `type_read_grade` tinyint(1) NOT NULL default '0',\n  `type_write_grade` tinyint(1) NOT NULL default '0',\n  PRIMARY KEY  (`type_id`),\n  KEY `type_parentid` (`type_parentid`),\n  KEY `type_sort` (`type_sort`)\n) ENGINE=MyISAM  {$extend} COMMENT='微信_名教风采分类表' ;";
foreach ($sql as $val) {
    $objWebInit->db->query($val);
}
if (empty($arrModule)) {
    check::AlertExit('微信_名教风采系统安装成功', "{$strWEB_ROOT_pre}{$strWEBADMIN_ROOT}/");
}
Exemple #17
0
$objWebInit->arrGSmarty = $arrGSmarty;
if ($_GET['id'] === null) {
    exit;
}
$intID = intval($_GET['id']);
$arrInfo = $objWebInit->getInfo($intID);
if ($arrInfo['id'] == '') {
    echo "<script language=JavaScript>\r\n\t\t\talert('该页面已经删除!');\r\n\t\t\tparent.location='/';\r\n\t\t  </script>";
}
if ($arrInfo['stars'] > 0) {
    if (!empty($_SESSION['user_id'])) {
        if ($arrInfo['stars'] > $_SESSION['user_grade']) {
            check::AlertExit("你的权限不够,无法查看", -1);
        }
    } else {
        check::AlertExit("请先登陆", -1);
    }
}
if (!empty($arrInfo['meta_Title'])) {
    $strTitle = $arrInfo['meta_Title'];
} else {
    $strTitle = $arrInfo['title'];
}
if (!empty($arrInfo['meta_Description'])) {
    $strDescription = $arrInfo['meta_Description'];
} else {
    $strDescription = $strTitle . ',' . $arrInfo['summary'];
}
if (!empty($arrInfo['meta_Keywords'])) {
    $strKeywords = $arrInfo['meta_Keywords'];
} else {
Exemple #18
0
}
$arrGMeta['job']['meta'] = array('Title' => $arrGMeta['job']['name'], 'Description' => $arrGMeta['job']['name'], 'Keywords' => $arrGMeta['job']['name']);
$somecontent = '<?php' . "\n" . '$arrGWeb = ' . var_export($arrGWeb, true) . ';' . "\n" . '$arrGMeta = ' . var_export($arrGMeta, true) . ';' . "\n" . '?>';
// 首先我们要确定文件存在并且可写。
if (is_writable($strFilename)) {
    if (!($handle = fopen($strFilename, 'w'))) {
        check::AlertExit("错误:不能打开文件 {$strFilename} !", -1);
    }
    // 将$somecontent写入到我们打开的文件中。
    if (fwrite($handle, $somecontent) === FALSE) {
        check::AlertExit("错误:不能写入到文件 {$strFilename} !", -1);
    }
    fclose($handle);
} else {
    check::AlertExit("错误:文件 {$strFilename} 不可写!", -1);
}
//sql语句
$sql[] = "CREATE TABLE IF NOT EXISTS `" . $arrGPdoDB['db_tablepre'] . "job` (\r\n  `id` int(10) unsigned NOT NULL auto_increment,\r\n  `type_id` tinyint(3) unsigned default '0',\r\n  `type_roue_id` varchar(80) default NULL,\r\n  `user_id` int(10) unsigned default '0',\r\n  `tag` varchar(30) default NULL,\r\n  `bedeck` tinyint(3) unsigned default '0',\r\n  `title` varchar(100) default NULL,\r\n  `title_md5` char(32) default NULL,\r\n  `linkurl` varchar(100) default NULL,\r\n  `summary` varchar(" . $intDbSummaryLen . ") default NULL,\r\n  `structon_tb` mediumtext,\r\n  `thumbnail` varchar(100) default NULL,\r\n  `submit_date` datetime default '0000-00-00 00:00:00',\r\n  `topflag` tinyint(1) default '0',\r\n  `recommendflag` tinyint(1) default '0',\r\n  `stars` tinyint(1) default '0',\r\n  `clicktimes` mediumint(10) unsigned default '0',\r\n  `pass` tinyint(1) default '1',  \r\n  `province` varchar(20) default NULL,\r\n  `city` varchar(20) default NULL,\r\n  `area` varchar(20) default NULL,\r\n  PRIMARY KEY  (`id`),\r\n  KEY `user_id` (`user_id`),\r\n  KEY `type_id` (`type_id`),\r\n  KEY `title_md5` (`title_md5`),\r\n  KEY `submit_date` (`submit_date`)\r\n) ENGINE=MyISAM {$extend} COMMENT='招聘信息表' ;";
if (!is_array($arrMType) || empty($arrMType)) {
    $sql[] = "CREATE TABLE IF NOT EXISTS `" . $arrGPdoDB['db_tablepre'] . "job_type` (\r\n\t  `type_id` int(10) unsigned NOT NULL auto_increment,\r\n\t  `type_parentid` int(10) unsigned NOT NULL default '0',\r\n\t  `type_roue_id` varchar(80) default NULL,\r\n\t  `type_title` varchar(80) default NULL,\r\n\t  `type_link` varchar(150) default NULL COMMENT '跳转链接',\r\n\t  `type_sort` int(10) unsigned default NULL,\r\n\t  `type_pass` tinyint(1) NOT NULL default '1',\r\n\t  `type_read_grade` tinyint(1) NOT NULL default '0',\r\n\t  `type_write_grade` tinyint(1) NOT NULL default '0',\r\n\t  PRIMARY KEY  (`type_id`),\r\n\t  KEY `type_parentid` (`type_parentid`),\r\n\t  KEY `type_sort` (`type_sort`)\r\n\t) ENGINE=MyISAM  {$extend} COMMENT='招聘信息分类表' ;";
}
foreach ($sql as $val) {
    $objWebInit->db->query($val);
}
if (empty($arrModule)) {
    if (!is_array($arrMType) || empty($arrMType)) {
        check::AlertExit('数据库分类招聘信息系统安装成功', "{$strWEB_ROOT_pre}{$strWEBADMIN_ROOT}/");
    } else {
        check::AlertExit('配置文件分类招聘信息系统安装成功', "{$strWEB_ROOT_pre}{$strWEBADMIN_ROOT}/");
    }
}
Exemple #19
0
        continue;
    }
    if (!empty($v)) {
        $arrModuleDirs[$k]['id'] = $k;
        $arrModuleDirs[$k]['cache'] = $v['cache'];
        $arrModuleDirs[$k]['name'] = $v['name'];
    }
}
$isOK = 0;
foreach ($arrModuleDirs as $v) {
    if ($_SESSION['wapmod'] == $v['id']) {
        $isOK = 1;
    }
}
if (empty($isOK)) {
    check::AlertExit('未知栏目', -1);
}
if (empty($_GET['page'])) {
    $intPage = 1;
} else {
    $intPage = intval($_GET['page']);
}
$arrWhere = array();
$arrLink = array();
$arrWhere[] = "pass='******'";
if (empty($_SESSION['wapmod'])) {
    include_once 'include/title.php';
    include_once 'include/head.php';
    $myText = new HAW_text($arrGWeb['name'] . '欢迎您!');
    $objHaw->add_text($myText);
    include_once 'include/foot.php';
Exemple #20
0
        }
    }
    $somecontent = '<?php' . "\n" . '$arrGIllegal = ' . var_export($arrGIllegal, true) . ';' . "\n" . '?>';
    // 首先我们要确定文件存在并且可写。
    if (is_writable($strFilename)) {
        if (!($handle = fopen($strFilename, 'w'))) {
            check::AlertExit("错误:不能打开文件 {$strFilename} !", -1);
        }
        // 将$somecontent写入到我们打开的文件中。
        if (fwrite($handle, $somecontent) === FALSE) {
            check::AlertExit("错误:不能写入到文件 {$strFilename} !", -1);
        }
        fclose($handle);
        check::Alert("成功地写入到文件 {$strFilename} !");
    } else {
        check::AlertExit("错误:文件 {$strFilename} 不可写!", -1);
    }
}
//生成当前页显示数据
if (empty($_GET['page'])) {
    $start = 0;
} else {
    $start = intval($_GET['page']);
}
if ($start > 0) {
    $start -= 1;
}
$start *= $arrGPage['page_size'];
$max = $start + $arrGPage['page_size'];
$intTemp = 0;
$arrData = array();
Exemple #21
0
 if (empty($_POST['submitpass']) || $_POST['submitpass'] != $_SESSION['submitpasskey']) {
     exit;
 }
 if (empty($_POST['type_id']) || empty($_POST['title']) || empty($_POST['intro']) || empty($_POST['workexperience']) || empty($_POST['educationrecord']) || empty($_POST['salary']) || empty($_POST['num']) || empty($_POST['companyname']) || empty($_POST['companyintro']) || empty($_POST['contact'])) {
     check::AlertExit("错误:有必填选项没填!", -1);
 }
 $arrTemp = explode('|', $_POST['type_id']);
 $_POST['type_id'] = $arrTemp[0];
 $_POST['type_roue_id'] = $arrTemp[1];
 if ($_POST['title'] != '') {
     $_POST['title_md5'] = md5($_POST['title']);
 }
 //判断文章信息
 $arrTemp = $objWebInit->getInfoList("where title_md5='{$_POST['title_md5']}' and user_id = '{$_SESSION['user_id']}' and type_id='{$_POST['type_id']}'", "", 0, 1);
 if ($arrTemp['COUNT_ROWS'] != 0) {
     check::AlertExit("错误:相同的信息请不要重复发布!需要刷新排列的话,请使用列表下方“提前”选项!", -1);
 }
 if ($_FILES['Filedata']['name'] != "") {
     $_POST['photo'] = $objWebInit->uploadInfoImage($_FILES['Filedata'], '', $_POST['FileListPicSize'], $_POST['csize0']);
 }
 //新图上传
 set_time_limit(0);
 foreach ($_FILES as $key => $val) {
     if (strrpos($key, 'Filedata') === false) {
         continue;
     }
     $num = substr($key, strlen('Filedata'));
     if (!empty($_FILES['Filedata' . $num]['name'])) {
         $arrTemp = array();
         $arrTemp['photo'] = $objWebInit->uploadInfoImage($_FILES['Filedata' . $num], $num, $objWebInit->arrGPic['FileListPicSize'], $objWebInit->arrGPic['FileSourPicSize']);
         $arrTemp['photo_narrate'] = $_POST['photo_narrate' . $num];
Exemple #22
0
             unlink($strOldBFile);
         }
         if (is_file($strOldMFile)) {
             unlink($strOldMFile);
         }
         //unset($arrUserinfo['thumbnail']);
         $arrTemp['thumbnail'] = '';
         $arrTemp['user_id'] = $arrUserinfo['user_id'];
         $objWebInit->updateUser($arrTemp);
         //同步user表
         $arrTemp['recommendflag'] = 0;
         $strTemp = check::getAPIArray($arrTemp);
         check::getAPI('user', 'updateUser', $strTemp);
         check::WindowLocation("?action=edit&id=" . $userid . "");
     } else {
         check::AlertExit('删除失败!', -1);
     }
 }
 $arrTemp = array();
 foreach ($arrGMeta as $k => $v) {
     if ($k != 'index') {
         $arrTemp[$k]['r'] = $v['name'];
         $arrTemp[$k]['w'] = '写';
         $arrTemp[$k]['d'] = '删';
         $arrTemp[$k]['x'] = '执行';
     }
 }
 $arrTemp['siteset']['r'] = '系统设定';
 $arrTemp['pay']['r'] = '在线支付';
 $arrTemp['seo']['r'] = 'SEO优化';
 $arrTemp['backup']['r'] = '数据备份';
Exemple #23
0
 /**
  * 执行信息操作
  * @author	肖飞
  * @param	string	$strAction		执行命令
  * @param	array		$arrData		选中的操作数据id数组
  * @param	array		$arrFile			需要删除的文件
  * @return	boolen
  */
 public function doInfoAction($strAction = null, $arrData = null, $arrFile = array('photo'))
 {
     switch ($strAction) {
         case 'del':
             foreach ($arrData as $key => $val) {
                 if (!$this->checkPopedomG($_SESSION['user_id'], 'd')) {
                     check::AlertExit('对不起,您没有删除权限', -1);
                 }
                 $this->deleteInfo($val, $arrFile);
             }
             break;
         case 'delpic':
             foreach ($arrData as $key => $val) {
                 if (!$this->checkPopedomG($_SESSION['user_id'], 'd')) {
                     check::AlertExit('对不起,您没有删除权限', -1);
                 }
                 $this->deleteInfoPic($val, $arrFile);
             }
             break;
         case 'moveup':
             foreach ($arrData as $key => $val) {
                 if (!$this->checkPopedomG($_SESSION['user_id'], 'x')) {
                     check::AlertExit('对不起,您没有执行权限', -1);
                 }
                 $this->moveupInfo($val);
             }
             break;
         case 'check':
             foreach ($arrData as $key => $val) {
                 if (!$this->checkPopedomG($_SESSION['user_id'], 'x')) {
                     check::AlertExit('对不起,您没有执行权限', -1);
                 }
                 $this->passInfo($val, 1);
             }
             break;
         case 'uncheck':
             foreach ($arrData as $key => $val) {
                 if (!$this->checkPopedomG($_SESSION['user_id'], 'x')) {
                     check::AlertExit('对不起,您没有执行权限', -1);
                 }
                 $this->passInfo($val, 0);
             }
             break;
         case 'settop':
             foreach ($arrData as $key => $val) {
                 if (!$this->checkPopedomG($_SESSION['user_id'], 'x')) {
                     check::AlertExit('对不起,您没有执行权限', -1);
                 }
                 $this->topInfo($val, 1);
             }
             break;
         case 'unsettop':
             foreach ($arrData as $key => $val) {
                 if (!$this->checkPopedomG($_SESSION['user_id'], 'x')) {
                     check::AlertExit('对不起,您没有执行权限', -1);
                 }
                 $this->topInfo($val, 0);
             }
             break;
         case 'setrecommend':
             foreach ($arrData as $key => $val) {
                 if (!$this->checkPopedomG($_SESSION['user_id'], 'x')) {
                     check::AlertExit('对不起,您没有执行权限', -1);
                 }
                 $this->recommendInfo($val, 1);
             }
             break;
         case 'unsetrecommend':
             foreach ($arrData as $key => $val) {
                 if (!$this->checkPopedomG($_SESSION['user_id'], 'x')) {
                     check::AlertExit('对不起,您没有执行权限', -1);
                 }
                 $this->recommendInfo($val, 0);
             }
             break;
     }
     return true;
 }
Exemple #24
0
    $strWEBADMIN_ROOT = __WEBADMIN_ROOT;
}
unset($arrGWeb);
if (empty($ver_path)) {
    $ver_path = '';
}
$strFilename = '..' . $ver_path . '/data/webconfig.inc.php';
include $strFilename;
$arrGMeta['xingfu_admissions']['name'] = '招生简介';
$arrGMeta['xingfu_admissions']['cache'] = 1;
//该栏目是否生成静态页,0=不可以,1=可以
$arrGMeta['xingfu_admissions']['admin'] = array(array('href' => '../xingfu_admissions/admin/category.php', 'name' => '招生简介分类'), array('href' => '../xingfu_admissions/admin/index.php', 'name' => '招生简介管理'));
$arrGMeta['xingfu_admissions']['meta'] = array('Title' => $arrGMeta['xingfu_admissions']['name'], 'Description' => $arrGMeta['xingfu_admissions']['name'], 'Keywords' => $arrGMeta['xingfu_admissions']['name']);
$somecontent = '<?php' . "\n" . '$arrGWeb = ' . var_export($arrGWeb, true) . ';' . "\n" . '$arrGMeta = ' . var_export($arrGMeta, true) . ';' . "\n" . '?>';
//写入文件
file_put_contents($strFilename, $somecontent);
//sql语句
if ($_SESSION['install_type']) {
    $sql[] = "DROP TABLE IF EXISTS `" . $arrGPdoDB['db_tablepre'] . "xingfu_admissions`;";
}
$sql[] = "CREATE TABLE IF NOT EXISTS `" . $arrGPdoDB['db_tablepre'] . "xingfu_admissions` (\n  `id` int(10) unsigned NOT NULL auto_increment,\n  `type_id` tinyint(3) unsigned default '0',\n  `type_roue_id` varchar(80) default NULL,\n  `user_id` int(10) unsigned default '0',\n  `tag` varchar(30) default NULL,\n  `bedeck` tinyint(3) unsigned default '0',\n  `title` varchar(100) default NULL,\n  `title_md5` char(32) default NULL,\n  `linkurl` varchar(100) default NULL,\n  `summary` varchar(" . $intDbSummaryLen . ") default NULL,\n  `structon_tb` mediumtext,\n  `thumbnail` varchar(30) default NULL,\n  `submit_date` datetime default '0000-00-00 00:00:00',\n  `topflag` tinyint(1) default '0',\n  `recommendflag` tinyint(1) default '0',\n  `stars` tinyint(1) default '0',\n  `clicktimes` mediumint(10) unsigned default '0',\n  `pass` tinyint(1) default '1',\n  PRIMARY KEY  (`id`),\n  KEY `user_id` (`user_id`),\n  KEY `type_id` (`type_id`),\n  KEY `title_md5` (`title_md5`),\n  KEY `submit_date` (`submit_date`)\n) ENGINE=MyISAM {$extend} COMMENT='招生简介表' ;";
if ($_SESSION['install_type']) {
    $sql[] = "DROP TABLE IF EXISTS `" . $arrGPdoDB['db_tablepre'] . "xingfu_admissions_type`;";
}
$sql[] = "CREATE TABLE IF NOT EXISTS `" . $arrGPdoDB['db_tablepre'] . "xingfu_admissions_type` (\n  `type_id` int(10) unsigned NOT NULL auto_increment,\n  `type_parentid` int(10) unsigned NOT NULL default '0',\n  `type_roue_id` varchar(80) default NULL,\n  `type_title` varchar(80) default NULL,\n  `type_link` varchar(150) default NULL COMMENT '跳转链接',\n  `type_sort` int(10) unsigned default NULL,\n  `type_pass` tinyint(1) NOT NULL default '1',\n  `type_read_grade` tinyint(1) NOT NULL default '0',\n  `type_write_grade` tinyint(1) NOT NULL default '0',\n  PRIMARY KEY  (`type_id`),\n  KEY `type_parentid` (`type_parentid`),\n  KEY `type_sort` (`type_sort`)\n) ENGINE=MyISAM  {$extend} COMMENT='招生简介分类表' ;";
foreach ($sql as $val) {
    $objWebInit->db->query($val);
}
if (empty($arrModule)) {
    check::AlertExit('招生简介系统安装成功', "{$strWEB_ROOT_pre}{$strWEBADMIN_ROOT}/");
}
Exemple #25
0
require_once '../../admin/checklogin.php';
$objWebInit = new ads();
//数据库连接参数
$objWebInit->setDBG($arrGPdoDB);
//smarty参数
$objWebInit->arrGSmarty = $arrGSmarty;
//翻页参数
$objWebInit->arrGPage = $arrGPage;
//图片上传参数
$objWebInit->arrGPic = $arrGPic;
$objWebInit->db();
//JS生成参数
$objWebInit->arrGjs = $arrGjs;
//访问权限检查
if (!$objWebInit->checkPopedomG($_SESSION['user_id'])) {
    check::AlertExit('对不起,您没有权限访问此页', -1);
}
$arrWhere = array();
$arrLink = array();
if (isset($_GET['action'])) {
    if ($_GET['action'] == 'search') {
        // 构造搜索条件和翻页参数
        $arrLink[] = 'action=search';
        if (!empty($_GET['pass'])) {
            if ($_GET['pass'] == '1' || $_GET['pass'] == '0') {
                $arrWhere[] = "pass='******'pass'] . "'";
                $arrLink[] = 'pass='******'pass'];
            }
        }
        if (!empty($_GET['id'])) {
            $arrWhere[] = "id='" . $_GET['id'] . "'";
Exemple #26
0
$objWebInit->arrGSmarty = $arrGSmarty;
//图片上传参数
$objWebInit->arrGPic = $arrGPic;
//JS生成参数
$objWebInit->arrGjs = $arrGjs;
$objWebInit->db();
//访问权限检查
if (!$objWebInit->checkPopedomG($_SESSION['user_id'])) {
    check::AlertExit('对不起,您没有权限访问此页', -1);
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if (empty($_POST['position'])) {
        check::AlertExit("错误:显示位置必须选择!", -1);
    }
    if (empty($_POST['webname'])) {
        check::AlertExit("错误:请填写广告名称!", -1);
    }
    if ($_FILES['UploadFile']['name'] != "") {
        $_POST['UploadFile'] = $objWebInit->uploadInfoImage($_FILES['UploadFile']);
    }
    //取得图片链接的文件类型
    if (!empty($_POST['UploadFile'])) {
        $Uploadfile = $_POST['UploadFile'];
        $_POST['FileExt'] = strrchr($Uploadfile, ".");
    } else {
        if (!empty($_POST['weblogo'])) {
            $_POST['FileExt'] = strrchr($_POST['weblogo'], ".");
        }
    }
    //清除不要的字段
    unset($_POST['savefilename']);
Exemple #27
0
    $strWEBADMIN_ROOT = __WEBADMIN_ROOT;
}
unset($arrGWeb);
if (empty($ver_path)) {
    $ver_path = '';
}
$strFilename = '..' . $ver_path . '/data/webconfig.inc.php';
include $strFilename;
$arrGMeta['xingfu_school_show']['name'] = '兴甫幼儿园_ 园所展区';
$arrGMeta['xingfu_school_show']['cache'] = 1;
//该栏目是否生成静态页,0=不可以,1=可以
$arrGMeta['xingfu_school_show']['admin'] = array(array('href' => '../xingfu_school_show/admin/category.php', 'name' => '兴甫幼儿园_ 园所展区分类'), array('href' => '../xingfu_school_show/admin/index.php', 'name' => '兴甫幼儿园_ 园所展区管理'));
$arrGMeta['xingfu_school_show']['meta'] = array('Title' => $arrGMeta['xingfu_school_show']['name'], 'Description' => $arrGMeta['xingfu_school_show']['name'], 'Keywords' => $arrGMeta['xingfu_school_show']['name']);
$somecontent = '<?php' . "\n" . '$arrGWeb = ' . var_export($arrGWeb, true) . ';' . "\n" . '$arrGMeta = ' . var_export($arrGMeta, true) . ';' . "\n" . '?>';
//写入文件
file_put_contents($strFilename, $somecontent);
//sql语句
if ($_SESSION['install_type']) {
    $sql[] = "DROP TABLE IF EXISTS `" . $arrGPdoDB['db_tablepre'] . "xingfu_school_show`;";
}
$sql[] = "CREATE TABLE IF NOT EXISTS `" . $arrGPdoDB['db_tablepre'] . "xingfu_school_show` (\n  `id` int(10) unsigned NOT NULL auto_increment,\n  `type_id` tinyint(3) unsigned default '0',\n  `type_roue_id` varchar(80) default NULL,\n  `user_id` int(10) unsigned default '0',\n  `tag` varchar(30) default NULL,\n  `bedeck` tinyint(3) unsigned default '0',\n  `title` varchar(100) default NULL,\n  `title_md5` char(32) default NULL,\n  `linkurl` varchar(100) default NULL,\n  `summary` varchar(" . $intDbSummaryLen . ") default NULL,\n  `structon_tb` mediumtext,\n  `thumbnail` varchar(30) default NULL,\n  `submit_date` datetime default '0000-00-00 00:00:00',\n  `topflag` tinyint(1) default '0',\n  `recommendflag` tinyint(1) default '0',\n  `stars` tinyint(1) default '0',\n  `clicktimes` mediumint(10) unsigned default '0',\n  `pass` tinyint(1) default '1',\n  PRIMARY KEY  (`id`),\n  KEY `user_id` (`user_id`),\n  KEY `type_id` (`type_id`),\n  KEY `title_md5` (`title_md5`),\n  KEY `submit_date` (`submit_date`)\n) ENGINE=MyISAM {$extend} COMMENT='兴甫幼儿园_ 园所展区表' ;";
if ($_SESSION['install_type']) {
    $sql[] = "DROP TABLE IF EXISTS `" . $arrGPdoDB['db_tablepre'] . "xingfu_school_show_type`;";
}
$sql[] = "CREATE TABLE IF NOT EXISTS `" . $arrGPdoDB['db_tablepre'] . "xingfu_school_show_type` (\n  `type_id` int(10) unsigned NOT NULL auto_increment,\n  `type_parentid` int(10) unsigned NOT NULL default '0',\n  `type_roue_id` varchar(80) default NULL,\n  `type_title` varchar(80) default NULL,\n  `type_link` varchar(150) default NULL COMMENT '跳转链接',\n  `type_sort` int(10) unsigned default NULL,\n  `type_pass` tinyint(1) NOT NULL default '1',\n  `type_read_grade` tinyint(1) NOT NULL default '0',\n  `type_write_grade` tinyint(1) NOT NULL default '0',\n  PRIMARY KEY  (`type_id`),\n  KEY `type_parentid` (`type_parentid`),\n  KEY `type_sort` (`type_sort`)\n) ENGINE=MyISAM  {$extend} COMMENT='兴甫幼儿园_ 园所展区分类表' ;";
foreach ($sql as $val) {
    $objWebInit->db->query($val);
}
if (empty($arrModule)) {
    check::AlertExit('兴甫幼儿园_ 园所展区系统安装成功', "{$strWEB_ROOT_pre}{$strWEBADMIN_ROOT}/");
}
Exemple #28
0
$objWebInit->setDBG($arrGPdoDB);
$objWebInit->db();
//smarty参数
$objWebInit->arrGSmarty = $arrGSmarty;
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if (empty($_POST['user_name'])) {
        check::AlertExit('对不起,用户名必须填写!', -1);
    }
    if (empty($_POST['email'])) {
        check::AlertExit('对不起,电子邮箱必须填写!', -1);
    }
    if (!check::CheckEmailAddr($_POST['email'])) {
        check::AlertExit('电子邮件格式不合法!', -1);
    }
}
if (!empty($_POST)) {
    $arrPost = array($_POST['user_name']);
    if ($arrUserInfo = $objWebInit->getUserWhere("where user_name=? and structon_tb like '%{$_POST['email']}%'", $arrPost)) {
        $arrMOutput["smarty_assign"]['password'] = $arrUserInfo[0]['password'];
    } else {
        check::AlertExit("错误:用户名或电子邮件不正确!", -1);
    }
}
if (!empty($arrUserInfo[0]['password'])) {
    $arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['main_dir'] . 'getpassword.html';
} else {
    $arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['main_dir'] . 'forgotten.html';
}
//全站公用block
@(include '../_block.php');
$objWebInit->output($arrMOutput);
Exemple #29
0
        //GModuleLoad($arrMModule,$arrGModule);
        $strKeywords = strval(urldecode($_REQUEST['keywords']));
        $arrKeywords = explode(' ', $strKeywords);
        foreach ($arrKeywords as $v) {
            $v = trim($v);
            if (!empty($v)) {
                $arrWhere[] = "title LIKE '%{$v}%'";
            }
        }
        $_SESSION['arrWhere'] = $arrWhere;
        $_SESSION['strKeywords'] = $strKeywords;
    }
    $arrLink[] = 'keywords=' . urlencode($strKeywords);
} else {
    if (empty($_REQUEST['keywords']) && $isGo) {
        check::AlertExit("错误:关键词必须填写!", -1);
    } else {
        $arrWhere = $_SESSION['arrWhere'];
        $strKeywords = $_SESSION['strKeywords'];
    }
}
$strWhere = implode(' AND ', $arrWhere);
$strWhere = 'where ' . $strWhere;
$arrInfoList = $objWebInit->getInfoList($strWhere, '  ORDER BY topflag DESC,submit_date DESC', ($intPage - 1) * $arrGPage['page_size'], $arrGPage['page_size']);
$intRows = $arrInfoList['COUNT_ROWS'];
unset($arrInfoList['COUNT_ROWS']);
//翻页跳转link
$strPage = $objWebInit->makeInfoListPage($intRows, $strLink, $link_type = $arrGWeb['URL_static']);
// 输出到模板
$arrMOutput["smarty_assign"]['FileCallPath'] = $arrGPic['FileCallPath'];
$arrMOutput["smarty_assign"]['arrInfoList'] = $arrInfoList;
Exemple #30
0
$objWebInit->arrGSmarty = $arrGSmarty;
//访问权限检查
if (!$objWebInit->checkPopedomG($_SESSION['user_id'], 'r', 'tools')) {
    check::AlertExit('对不起,您没有读权限', -1);
}
$strFilename = '../../../data/illegal.inc.php';
include $strFilename;
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if (!$objWebInit->checkPopedomG($_SESSION['user_id'], 'w', 'tools')) {
        check::AlertExit('对不起,您没有写权限', -1);
    }
    unset($_POST['okgo']);
    unset($arrGIllegal[$_POST['id']]);
    $arrGIllegal[$_POST['title']] = array('replace' => $_POST['replace'], 'pass' => 1);
    $somecontent = '<?php' . "\n" . '$arrGIllegal = ' . var_export($arrGIllegal, true) . ';' . "\n" . '?>';
    if (!($handle = fopen($strFilename, 'w'))) {
        check::AlertExit("错误:不能以'写'模式打开文件 {$strFilename} !", -1);
    }
    // 将$somecontent写入到我们打开的文件中。
    if (fwrite($handle, $somecontent) === FALSE) {
        check::AlertExit("错误:不能写入到文件 {$strFilename} !", -1);
    }
    fclose($handle);
    check::WindowLocation('index.php', 'page=' . $_GET['page']);
}
// 输出到模板
$arrMOutput["smarty_assign"]['strNav'] = '非法信息过滤';
$arrMOutput["smarty_assign"]['arrData'] = $arrGIllegal[$_GET['id']];
$arrMOutput["template_file"] = "admin.html";
$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['admin_main_dir'] . 'tools/illegal/submit.htm';
$objWebInit->output($arrMOutput);