Exemplo n.º 1
0
<?php

/**
 *      [品牌空間] (C)2001-2010 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: street.php 4374 2010-09-08 08:58:55Z fanshengshuai $
 */
define("CURSCRIPT", "street");
include_once './common.php';
require_once B_ROOT . './source/function/cache.func.php';
updatebrandadscache(false, 86430);
$tagarrs = $where = $shoplist = $value = array();
$tagids = $joinsql = $wheresql = '';
$query = NULL;
//常見id處理
foreach (array('itemid', 'nid', 'uid', 'catid', 'tagid') as $value) {
    $_GET[$value] = $_POST[$value] = intval(!empty($_POST[$value]) ? $_POST[$value] : $_GET[$value]);
}
$_GET['keyword'] = trim(addslashes(rawurldecode($_REQUEST['keyword'])));
$catid = $_GET['catid'] ? $_GET['catid'] : 0;
$region = $_GET['region'] ? $_GET['region'] : 0;
$categorylist_select = $regionlist_select = '';
if (!empty($catid)) {
    foreach ($_G['categorylist'] as $key => $category) {
        if ($category['upid'] == $catid) {
            $categorylist_select .= '<a href="street.php?catid=' . $key . (!empty($region) ? '&region=' . $region : '') . '">' . $category['name'] . '</a>&nbsp;&nbsp;';
        }
    }
    if ($categorylist_select == '') {
        foreach ($_G['categorylist'] as $key => $category) {
Exemplo n.º 2
0
 function _init_cache()
 {
     global $_G;
     data_cache_start();
     if (defined('CURSCRIPT')) {
         require_once B_ROOT . './source/function/cache.func.php';
         updatebrandadscache(false, 86430);
     }
 }
Exemplo n.º 3
0
                        $value[$k]['url'] = trim(strip_tags($v['url']));
                    }
                }
                $value = addslashes(serialize($value));
                $rpsql .= "{$comma} ('{$key}', '{$value}') ";
                $comma = ', ';
            }
        }
    }
    if (!empty($rpsql)) {
        DB::query('REPLACE INTO ' . tname('data') . ' (`variable`, `value`) VALUES ' . $rpsql);
    }
    $sitetheme = saddslashes($_POST['sitetheme']);
    DB::query('REPLACE INTO ' . tname('settings') . ' (`variable`, `value`) VALUES (\'sitetheme\', \'' . $sitetheme . '\')');
    updatesettingcache();
    updatebrandadscache();
    //生成緩存
    $_BCACHE->deltype('index');
    $_BCACHE->deltype('sidebar');
    cpmsg('message_success', 'admin.php?action=ads');
} else {
    $sitethemearr = array();
    $dir = opendir(B_ROOT . './templates/site');
    while ($entry = readdir($dir)) {
        if (strpos($entry, '.') === false) {
            $sitethemearr[] = array($entry, 'templates/site/' . $entry);
        }
    }
    shownav('global', 'ads_basic');
    showsubmenu('ads_basic');
    showtips('ads_tips');