Пример #1
0
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	tender_ad
 */
if (is_object($objWebInit)) {
    if (!isset($objtender_ad)) {
        include_once __WEB_ROOT . "/tender_ad/class/tender_ad.class.php";
        include_once __WEB_ROOT . "/tender_ad/config/var.inc.php";
        $objtender_ad = new tender_ad();
        $objtender_ad->setDBG($arrGPdoDB);
        if (is_object($objWebInit->db)) {
            $objtender_ad->db = $objWebInit->db;
        } else {
            $objtender_ad->db();
        }
    }
    if (isset($arrInfo['tag']) && !empty($arrInfo['tag'])) {
        $arrTag = explode(',', $arrInfo['tag']);
        $where = array();
        foreach ($arrTag as $strTag) {
            $where[] = "'%" . $strTag . "%'";
        }
        //echo $arrInfo['id'];
        //print_r($where);
        $strWhere = implode(" || ", $where);
        $strWhere = 'where (tag like ' . $strWhere . ')';
    }
    //echo $strWhere;
    $arrRelative = array();
Пример #2
0
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	tender_ad
 */
require_once '../config/config.inc.php';
require_once "../class/tender_ad.class.php";
require_once '../..' . __WEBADMIN_ROOT . '/checklogin.php';
$objWebInit = new tender_ad();
//数据库连接参数
$objWebInit->setDBG($arrGPdoDB);
//smarty参数
$arrMOutput["template_file"] = "admin.html";
$objWebInit->arrGSmarty = $arrGSmarty;
$objWebInit->db();
//图形参数
$objWebInit->arrGPic = $arrGPic;
//访问权限检查
if (!$objWebInit->checkPopedomG($_SESSION['user_id'])) {
    check::AlertExit('对不起,您没有权限访问此页', -1);
}
if (isset($_GET['action'])) {
    switch ($_GET['action']) {
        // 显示新增页面
        case 'add':
            $arrTypeList = $objWebInit->getTypeList(null, ' order by type_id desc');
            $arrTypeList = $objWebInit->formatTypeList(0, $arrTypeList);
            $arrMOutput["smarty_assign"]['arrData'] = $arrTypeList;
            $arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['admin_main_dir'] . 'add_category.htm';
            $objWebInit->output($arrMOutput);