Beispiel #1
0
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	archives
 */
require_once 'config/config.inc.php';
require_once "class/archives.class.php";
$objWebInit = new archives();
$objWebInit->db();
$arrWhere = array();
$arrWhere[] = "type_title_english = '" . $_GET['name'] . "'";
$strWhere = implode(' AND ', $arrWhere);
$strWhere = 'where ' . $strWhere;
$arrInfo = $objWebInit->getInfoWhere($strWhere);
if (!empty($arrInfo['meta_Title'])) {
    $strTitle = $arrInfo['meta_Title'];
} else {
    $strTitle = $arrInfo['module_name'];
}
if (!empty($arrInfo['meta_Description'])) {
    $strDescription = $arrInfo['meta_Description'];
} else {
    $strDescription = $strTitle . ',' . $arrInfo['module_name'];
}
if (!empty($arrInfo['meta_Keywords'])) {
    $strKeywords = $arrInfo['meta_Keywords'];
} else {
    $strKeywords = $arrInfo['module_name'];
}
Beispiel #2
0
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	archives
 */
require_once '../config/config.inc.php';
require_once "../class/archives.class.php";
require_once '../..' . __WEBADMIN_ROOT . '/checklogin.php';
$objWebInit = new archives();
$objWebInit->db();
//访问权限检查
if (!$objWebInit->checkPopedomG($_SESSION['user_id'], 'w')) {
    check::AlertExit('对不起,您没有写权限', -1);
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $arrTemp = $objWebInit->getInfoWhere("where type_title_english='" . $_POST['type_title_english'] . "'", 'module_name');
    if (!empty($arrTemp)) {
        check::AlertExit('英文标识名称不能重复!', -1);
    }
    if (empty($_POST['module_name'])) {
        check::AlertExit("错误:单页名称不能为空!", -1);
    }
    if (empty($_POST['type_title_english'])) {
        check::AlertExit("错误:英文标识名称!", -1);
    }
    if (empty($_POST['intro'])) {
        check::AlertExit("错误:内容不能为空!", -1);
    }
    $objWebInit->saveInfo($_POST, 0, 0);
    //更新smarty缓存文件或纯静态文件
    $objWebInit->updateCache($_POST['type_title_english'], '', $arrMOutput);