Ejemplo n.º 1
0
function showlistrowalbum($value)
{
    global $_G, $BASESCRIPT;
    $mlist = '';
    $value['url'] = $_GET['optpass'] == 1 || $_GET['updatepass'] == 1 ? $BASESCRIPT . '?action=edit&m=album&itemid=' . $value['itemid'] . '&op=adminview&' . ($_GET['updatepass'] == 1 ? 'updatepass' : 'optpass') . '=1' : $BASESCRIPT . '?action=list&m=photo&shopid=' . $value['shopid'] . '&albumid=' . $value['itemid'] . '&filtersubmit=GO';
    $albumcats = getmodelcategory('album');
    $imgurl = getattachurl($value['subjectimage'], 1);
    $value['subject'] = cutstr($value['subject'], 15);
    // 上傳的鏈接
    if ($value['itemid'] > 0) {
        if ($value['frombbs']) {
            if (pkperm('isadmin')) {
                $addlink = '<a style="color:#900;" href="admin.php?action=import&fromalbum=1&albumid=' . $value['itemid'] . '">' . lang('import_albumchoose') . '</a>';
            }
        } else {
            $addlink = '<a style="color:#900;" href="' . $BASESCRIPT . '?action=add&m=photo&albumid=' . $value['itemid'] . '">' . lang('album_addphoto') . '</a>';
        }
    } else {
        $addlink = '';
    }
    $mlist = "\n\t<li>\t\t   \n\t\t<div class=\"b\">\n\t\t\t\t\t<p><a href=\"{$value['url']}\" rel=\"internal\" title=\"{$value['subject']}\">\n\t\t\t<img class=\"fit129\" src=\"{$imgurl}\" rel=\"\" height=\"128\" width=\"128\" /></a>\n\t\t\t</p>\n\t\t</div>\n\t\n\t\t<div class=\"w\" style=\"margin-top:5px; \">\n\t\t\t<div id=\"flExpand\" style=\"height:75; line-height:20px;\">\n\t\t\t\t<div id=\"div_subject_{$value['itemid']}\" style=\"position:absolute; display:none;\">\n\t\t\t\t\t<input id=\"input_subject_{$value['itemid']}\" style=\"height:20px; border:#ccc 1px solid; padding:1px;\" name=\"subject['{$value['itemid']}']\" onblur=\"edit_album_subject({$value['itemid']}, this.value);\" value=\"{$value['subject']}\" />\n\t\t\t\t</div>\n\t\t\t\t<a id=\"label_subject_{$value['itemid']}\" href=\"javascript:;\" onclick=\"start_edit_album_subject('{$value['itemid']}');\" style=\"display:block; height:30px; line-height:30px; text-decoration:none;\" rel=\"internal\" title=\"{$value['subject']}\">{$value['subject']} &nbsp;<img src=\"static/image/ico_edit.png\" /></a>\n\t\t\t\t" . $addlink . "<br />\n\t\t\t\t" . (IN_ADMIN === true ? ($value['title'] === NULL ? lang('album_default') : $value['title']) . "<br/>" : "") . "\n\t\t\t\t" . lang('album_catid') . ': ' . $albumcats[$value['catid']]['name'] . "<br />\n\t\t\t\t" . lang('display_order') . ":&nbsp;<input class=\"txt\" style=\"heigth:30px; width:30px; border:#ccc 1px solid; font-size:9px;\" type=\"text\" name=\"display[{$value['itemid']}]\" value=\"" . (IN_ADMIN === true ? $value['displayorder'] : $value['displayorder_s']) . "\" checked />\n\t\t\t\t<input class=\"checkbox\" style=\"\" type=\"checkbox\" name=\"item[]\" value=\"" . $value['itemid'] . "\" checked />\n\t\t\t\t<span></span>\n\t\t\t</div>\n\t\t</div>\n\t</li>\n\n\t";
    return $mlist;
}
Ejemplo n.º 2
0
    echo label(array('type' => 'select-div', 'alang' => 'category_title_newcatid', 'name' => 'newcatid', 'radio' => '1', 'options' => $catlistarr, 'value' => '0'));
    echo label(array('type' => 'table-end'));
    echo label(array('type' => 'div-end'));
    echo label(array('type' => 'eval', 'text' => '<br><center>'));
    echo label(array('type' => 'button-submit', 'name' => 'thevaluesubmit', 'value' => $alang['common_submit']));
    echo label(array('type' => 'button-reset', 'name' => 'thevaluereset', 'value' => $alang['common_reset']));
    echo label(array('type' => 'eval', 'text' => '</center>'));
    echo '<input name="catid" type="hidden" value="' . $delvalue['catid'] . '" />';
    echo '<input name="mid" type="hidden" value="' . $_GET['mid'] . '" />';
    echo '<input name="delvaluesubmit" type="hidden" value="yes" />';
    echo label(array('type' => 'form-end'));
}
//THE VALUE SHOW
if (is_array($thevalue) && $thevalue) {
    $stylearr = array();
    $catlistarr = getmodelcategory($resultmodels['modelname']);
    $upcatname = '';
    if (!empty($thevalue['upid']) && !empty($catlistarr[$thevalue['upid']]['name'])) {
        $upcatname = $catlistarr[$thevalue['upid']]['name'];
    } else {
        $thevalue['upid'] = 0;
        $upcatname = $alang['category_root'];
    }
    echo '
	<script language="javascript">
	<!--
	function jsfunction(value) {
		if(value == 0) {
			document.getElementById("tr_upid").style.display="none";
		} else {
			document.getElementById("tr_upid").style.display="";
Ejemplo n.º 3
0
define('B_URL_ALL', $newsiteurl);
if (file_exists(B_ROOT . './index.html')) {
    define('S_ISPHP', '1');
}
// config.cache不存在將刷新頁面
refreshbrandsetting();
// 讀取用戶組
if (!@(include_once B_ROOT . './data/system/shopgroup.cache.php')) {
    include_once B_ROOT . './source/function/cache.func.php';
    updateshopgroupcache();
}
// 讀取分類
$cattypes = array('region', 'shop', 'good', 'notice', 'consume', 'album', 'groupbuy');
foreach ($cattypes as $cattype) {
    if (!@(include_once B_ROOT . './data/system/' . $cattype . 'category.cache.php')) {
        include_once B_ROOT . './source/function/cache.func.php';
        updatecategorysingle($cattype);
    }
}
// 讀取分類
$categorylist = $cats = $cats_plus = array();
$_G['categorylist'] = getmodelcategory('shop');
// 讀取消息
if (exists_discuz()) {
    $pm = loadClass('pm');
    $pm_new = $pm->pm_new;
}
// 初始化 SEO 標題
$seo_title = $_G['setting']['sitename'] . ' - ' . $_G['setting']['wwwname'];
$seo_keywords = $_G['setting']['seokeywords'];
$seo_description = $_G['setting']['seodescription'];
Ejemplo n.º 4
0
function show_shop_changecat()
{
    global $_G, $_SGLOBAL;
    $arr_cat = getmodelcategory('shop');
    echo '
	<div style="width: 700px;" id="catdiv">
		<select id="catid_0" name="catid">
			<option value="-1" selected="selected">' . lang('attend_cats_select') . '</option>';
    foreach ($_G['categorylist'] as $cat) {
        if ($cat['upid'] == 0) {
            echo '<option value="' . $cat['catid'] . '" >' . $cat['pre'] . $cat['name'] . '</option>';
        }
    }
    echo '
		</select>
		<script type="text/javascript" charset="utf-8">
		$(function() {
			var arr_cats = ' . json_encode_region($arr_cat) . ';
			createmultiselect("catid_0", "catid", arr_cats, "catdiv", "' . lang('attend_cats_select') . '");});
		</script>
	</div>';
}
Ejemplo n.º 5
0
 *
 *      $Id: goodsearch.php 4374 2010-09-08 08:58:55Z fanshengshuai $
 */
define("CURSCRIPT", "goods");
include_once './common.php';
$active['goods'] = ' class="active"';
$tagarrs = $goodlist = $where = $value = array();
$tagids = $joinsql = $wheresql = '';
$query = NULL;
//常見id處理
foreach (array('itemid', 'nid', 'uid', 'catid', 'tagid', 'shopid') as $value) {
    $_GET[$value] = $_POST[$value] = intval(!empty($_POST[$value]) ? $_POST[$value] : $_GET[$value]);
}
$_GET['keyword'] = trim(addslashes(rawurldecode($_REQUEST['keyword'])));
$catid = empty($_GET['catid']) ? 0 : $_GET['catid'];
$categorylist = getmodelcategory('good');
//讀商品分類
include_once './batch.attribute.php';
$searchcats = getsearchcats($categorylist, $catid);
$tagid[] = $catid;
if (is_array($searchcats)) {
    foreach ($searchcats as $key => $value) {
        $tagid[] = $value['catid'];
    }
}
$tagids = implode(',', $tagid);
//搜索分類id拼合
//屬性篩選器
$attrvalues = empty($_GET['params']) ? array() : getattrvalues($_GET['params']);
if ($catid && $categorylist[$catid]['havechild'] == 0) {
    $attform = formatattrs($catid, $attrvalues, $_GET['keyword']);
Ejemplo n.º 6
0
 *      [品牌空間] (C)2001-2010 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: list.inc.php 4476 2010-09-15 04:51:33Z fanshengshuai $
 */
if (!defined('IN_STORE')) {
    exit('Acess Denied');
}
if (empty($_SGLOBAL['panelinfo']['enable' . $mname])) {
    cpmsg('no_perm');
}
//店長沒有店舖列表
if ($mname == 'shop') {
    header('Location:panel.php?action=edit&m=shop');
}
$cats = getmodelcategory($mname);
$wheresql = $joinsql = $query = $mlist = '';
$where = array();
$_GET['grade'] = isset($_GET['grade']) ? intval($_GET['grade']) : -1;
$_GET['subject'] = trim(strip_tags($_GET['subject']));
shownav('infomanage', $mname . '_list');
switch ($mname) {
    case 'good':
        showsubmenu('menu_good', array(array('menu_good', 'list&m=good', '1'), array('menu_list_addgood', 'add&m=good', '0')));
        break;
    case 'groupbuy':
        showsubmenu('menu_groupbuy', array(array('menu_groupbuy', 'list&m=groupbuy', '1'), array('menu_list_addgroupbuy', 'add&m=groupbuy', '0')));
        break;
    case 'album':
        showsubmenu('menu_album', array(array('menu_album', 'list&m=album', '1'), array('menu_album_add', 'add&m=album', '0')));
        break;
Ejemplo n.º 7
0
function synscategroiesforgroup($type, $catid)
{
    //取出所有店舖組的分類設置
    $grouplistneedsyns = array();
    $categorylist = getmodelcategory($type);
    $query = DB::query("SELECT id, " . $type . "_field FROM " . DB::table("shopgroup") . "");
    while ($result = DB::fetch($query)) {
        $result['catids'] = explode(",", $result[$type . "_field"]);
        if (!empty($result['catids']) && in_array($catid, $result['catids'])) {
            $result['catids'] = array_diff($result['catids'], array($catid));
            foreach ($result['catids'] as $key => $value) {
                if (!array_key_exists($value, $categorylist)) {
                    unset($result['catids'][$key]);
                }
            }
            $grouplistneedsyns[] = $result;
        }
    }
    //判斷是否更新、是則進行數據更新
    if (!empty($grouplistneedsyns)) {
        foreach ($grouplistneedsyns as $group) {
            DB::update('shopgroup', array($type . '_field' => implode(",", $group['catids'])), "id='{$group['id']}'");
        }
    }
    return false;
}
Ejemplo n.º 8
0
require_once B_ROOT . './source/adminfunc/tool.func.php';
$commentmodel = $commentmodelarr = array();
if ($_POST['commtmodel'] != 1) {
    unset($_POST['cmid']);
}
$type = $_REQUEST['type'] ? $_REQUEST['type'] : 'good';
if (!in_array($type, array('shop', 'region', 'good', 'album', 'consume', 'notice', 'groupbuy'))) {
    $type = 'shop';
}
$_POST['cmid'] = intval($_POST['cmid']);
$_POST['commtmodel'] = intval($_POST['commtmodel']);
if ($type != 'shop') {
    $_POST['cmid'] = 0;
    $_POST['commtmodel'] = 0;
    //讀取地區分類、商品分類、圖庫分類
    $categorylist = getmodelcategory($type);
}
$checkresults = array();
if ($_GET['op'] == 'add' && !empty($_POST['valuesubmit'])) {
    if (empty($_POST['subject'])) {
        cpmsg('category_subject_error');
        //array_push($checkresults, array('subject'=>lang('category_subject_error')));
    }
    //提交了添加數據
    $subjects = explode("\r\n", $_POST['subject']);
    foreach ($subjects as $subject) {
        if (!empty($subject)) {
            $insertstr[] = "('{$_POST['upid']}', '{$subject}', '{$_POST['note']}', '{$type}', '{$_POST['displayorder']}', '{$_POST['cmid']}', '{$_POST['commtmodel']}')";
        }
    }
    if (!empty($checkresults)) {
Ejemplo n.º 9
0
        $albumlist = array();
        $sql = 'SELECT i.itemid, i.shopid FROM ' . tname('albumitems') . " i WHERE i.shopid='{$shopid}' AND i.grade_s>2 AND i.grade>2 ORDER BY i.displayorder_s ASC, i.itemid DESC";
        $_BCACHE->cachesql('albumitems', $sql, 0, 0, 100, 0, 'storelist', 'album', $shopid, 0);
        foreach ($_SBLOCK['albumitems'] as $result) {
            $result = $_BCACHE->getiteminfo('album', $result['itemid'], $result['shopid']);
            $albumlist[] = $result;
        }
        $shopinfo = $_BCACHE->getshopinfo($shopid);
        include template('templates/site/default/shopalbum.html.php', 1);
    }
    ob_out();
    exit;
}
$_GET['keyword'] = trim(addslashes(rawurldecode($_REQUEST['keyword'])));
$catid = empty($_GET['catid']) ? 0 : $_GET['catid'];
$categorylist = getmodelcategory('album');
include_once './batch.attribute.php';
$searchcats = getsearchcats($categorylist, $catid);
$tagid[] = $catid;
if (is_array($searchcats)) {
    foreach ($searchcats as $key => $value) {
        $tagid[] = $value['catid'];
    }
}
$tagids = implode(",", $tagid);
//屬性篩選器
$attrvalues = empty($_GET['params']) ? array() : getattrvalues($_GET['params']);
if ($catid && $categorylist[$catid]['havechild'] == 0) {
    $attform = formatattrs($catid, $attrvalues, $_GET['keyword'], 'album.php');
}
//屬性搜索
Ejemplo n.º 10
0
            showmessage('attend_register_success', 'index.php');
        }
        exit;
    } else {
        showmessage('no_submit', geturl('attend.php'));
    }
} elseif ($do && $do == "attend") {
    //第二步,填寫基本信息
    $uid = $_G['uid'];
    $ucurl = avatar($uid);
    if (postget('refer')) {
        $refer = postget('refer');
    } else {
        if (!empty($_SERVER['HTTP_REFERER'])) {
            $refer = $_SERVER['HTTP_REFERER'];
        } else {
            $refer = B_URL_ALL;
        }
    }
    if (empty($uid)) {
        setcookie('_refer', 'attend.php?do=attend');
    }
    $showarr = getmodelcategory('region');
    $arr_cat = getmodelcategory('shop');
    include template('templates/site/default/attend_step2.html.php', 1);
} else {
    //第一步
    include template('templates/site/default/attend_step1.html.php', 1);
}
ob_out();
//正則處理url/模板
Ejemplo n.º 11
0
function showsettingmultiple($inputname, $cattype, $selected = array())
{
    $cats = getmodelcategory($cattype);
    echo '<tr><td class="td27" colspan="2">' . lang('group_' . $cattype) . '</td></tr><tr><td>' . lang('group_allcats') . '<br /><select multiple id="' . $inputname . '_s" style="width:380px;height:160px;">';
    foreach ($cats as $k => $v) {
        if (!$v['havechild'] && !in_array($k, $selected)) {
            echo '<option value="' . $v['catid'] . '">' . $v['name'] . '</option>';
        }
    }
    echo '</select><br /><a href="#" id="' . $inputname . '_add">' . lang('group_toright') . '&gt;&gt;</a></td><td>' . lang('group_cats') . '<br /><select multiple="multiple" id="' . $inputname . '" name="' . $inputname . '" style="width:380px;height:160px;">';
    if (count($selected) > 0) {
        foreach ($selected as $kk => $vv) {
            if (in_array($vv, array_keys($cats)) && !$cats[$vv]['havechild']) {
                echo '<option value="' . $vv . '">' . $cats[$vv]['name'] . '</option>';
            }
        }
    }
    echo '</select><br /><a href="#" id="' . $inputname . '_remove">&lt;&lt;' . lang('group_toleft') . '</a><input type="hidden" value="' . implode(",", $selected) . '" name="' . $inputname . '_v" id="' . $inputname . '_v"></td></tr>';
}
Ejemplo n.º 12
0
/**
 *      [品牌空間] (C)2001-2010 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: misc.php 4477 2010-09-15 05:08:30Z fanshengshuai $
 */
require_once './common.php';
@define('IN_BRAND', true);
@define('IN_ADMIN', true);
@define('IN_STORE', true);
require_once B_ROOT . './source/adminfunc/brandpost.func.php';
include_once B_ROOT . './language/swfupload.lang.php';
@header('Content-Type: text/xml; charset=utf-8');
$shopid = 0;
$albumcats = getmodelcategory('album', '|--');
//讀入相冊分類
//日誌記錄
function misclog($text)
{
    @($fp = fopen(B_ROOT . './data/log/misc.log.php', 'a'));
    @flock($fp, 2);
    @fwrite($fp, $text);
    //@fwrite($fp, "<?exit? >".var_export($_GET, true)."\n".var_export($_POST, true)."\n".var_export($_FILES, true)."\n\n");
    @fclose($fp);
}
if ($_GET['ac'] == 'swfupload') {
    if ($_GET['op'] == 'config') {
        $swfhash = md5(swfhash() . $_G['uid']);
        $attachextensions = '*.jpg,*.jpeg,*.gif,*.png';
        $depict = 'JPEG | PNG | GIF Image File ';
Ejemplo n.º 13
0
function updategroupfield($groupid)
{
    global $_G, $_SGLOBAL, $categorylist;
    $query = DB::query("SELECT album_field, good_field, notice_field, consume_field, groupbuy_field FROM " . tname("shopgroup") . " WHERE id = '{$groupid}'");
    $result = DB::fetch($query);
    $types = array('album', 'good', 'consume', 'groupbuy', 'notice');
    foreach ($types as $type) {
        $allarr = array();
        $categorylist = getmodelcategory($type);
        if (!empty($result[$type . '_field']) && $result[$type . '_field'] != 'all') {
            $allarr = $groupfields[$type] = explode(",", $result[$type . '_field']);
            foreach ($groupfields[$type] as $catid) {
                $arr = categorygetparents($catid);
                $allarr = array_merge($allarr, $arr);
            }
            $allarr = array_unique($allarr);
            DB::query("UPDATE " . tname("shopgroup") . " SET `" . $type . "_field` = '" . implode(",", $allarr) . "' WHERE id = '{$groupid}'");
        }
    }
    return $groupfields;
}
Ejemplo n.º 14
0
function bbs_getitemcatids($catid, $mname)
{
    $categorylist = getmodelcategory($mname);
    $thiscatid = $catid;
    $catstr = '';
    $key = 0;
    switch ($mname) {
        case 'good':
            $filename = 'goodsearch.php';
            break;
        case 'consume':
            $filename = 'consume.php';
            break;
        case 'notice':
            $filename = 'consume.php';
            break;
        case 'album':
            $filename = 'album.php';
            break;
        case 'groupbuy':
            $filename = 'groupbuy.php';
            break;
        default:
            $filename = 'goodsearch.php';
            break;
    }
    do {
        $catarr[$key] = '[url=' . B_URL . '/' . $filename . '?catid=' . $thiscatid . ']' . $categorylist[$thiscatid]['name'] . '[/url]';
        $thiscatid = $categorylist[$thiscatid]['upid'];
        $key++;
    } while ($thiscatid > 0);
    krsort($catarr);
    $catstr = implode(" > ", $catarr);
    return $catstr;
}
Ejemplo n.º 15
0
     showsubmenu($mname . '_unverified');
     showtips($mname . '_unverified_tips');
     showformheader('edit&m=' . $mname);
     showtableheader();
     foreach ($allow_unverified_fields as $key => $value) {
         if ($value == "itemid" || $value == "nid") {
             continue;
         }
         if ($value != 'catid') {
             if (preg_match('/(^ext_)/', $value)) {
                 showsetting($cacheinfo['columns'][$key]['fieldtitle'], $value, $editvalue[$value], 'text');
             } else {
                 showsetting($mname . '_' . $value, $value, $editvalue[$value], 'text');
             }
         } else {
             $categorylist = getmodelcategory('shop');
             $editvalue[$value] = $categorylist[$editvalue[$value]]['name'];
             showsetting($mname . '_' . $value, $value, $editvalue[$value], 'p');
         }
     }
     showhiddenfields(array('itemid' => $editvalue['itemid']));
     showhiddenfields(array('nid' => $editvalue['nid']));
     showsubmit('valuesubmit', 'submit', '');
     showtablefooter();
     showformfooter();
     bind_ajax_form();
     exit;
 }
 //顯示導航以及表頭
 switch ($mname) {
     case 'good':
Ejemplo n.º 16
0
include_once S_ROOT . './function/html.func.php';
include_once S_ROOT . './language/admincp.lang.php';
$_SGET['name'] = !empty($_SGET['name']) ? trim($_SGET['name']) : '';
$channel = $_SGET['name'];
if (!checkperm('allowview')) {
    showmessage('no_permission');
}
$cacheinfo = getmodelinfoall('modelname', $_SGET['name']);
if (empty($cacheinfo['models'])) {
    showmessage('visit_the_channel_does_not_exist', S_URL);
}
$modelsinfoarr = $cacheinfo['models'];
$categories = $cacheinfo['categories'];
$itemid = empty($_SGET['itemid']) ? 0 : intval($_SGET['itemid']);
$catid = intval(postget('catid'));
$categorylistarr = getmodelcategory($channel);
$categorylistarr[0] = array('pre' => '', 'name' => '------');
$resultmodelcolumns = array();
$attach_hash = smd5($_SGLOBAL['supe_uid'] . '/' . $_SGLOBAL['timestamp'] . random(6));
if ($cacheinfo['models']['mid'] > 0) {
    $query = $_SGLOBAL['db']->query('SELECT * FROM ' . tname('modelcolumns') . ' WHERE mid = \'' . $cacheinfo['models']['mid'] . '\'  AND allowshow = \'1\' ORDER BY displayorder, id');
    while ($result = $_SGLOBAL['db']->fetch_array($query)) {
        $resultmodelcolumns[] = $result;
    }
}
//qwl add
$newret = $defaultmval = $defaultfval = $defaultvval = array();
$feileisetting = getmodelcachecategory($cacheinfo['categoryarr']);
foreach ($feileisetting as $clkey => $clarr) {
    $filterm = $filterf = $filterv = array();
    $promodels = explode("\r\n", $clarr['pmodulesname']);
Ejemplo n.º 17
0
            showmessage('no_item', 'cp.php?ac=models&op=list&nameid=' . $nameid);
        }
        $item['subject'] = shtmlspecialchars($item['subject']);
        $item['message'] = jsstrip($item['message']);
    } else {
        $query = $_SGLOBAL['db']->query('SELECT * FROM ' . tname('modelfolders') . " WHERE mid='" . $cacheinfo['models']['mid'] . "' AND itemid='{$itemid}'");
        if (!($item = $_SGLOBAL['db']->fetch_array($query))) {
            showmessage('no_item', 'cp.php?ac=models&op=list&nameid=' . $nameid);
        }
        $temparr = unserialize($item['message']);
        unset($item['message']);
        $item = array_merge($item, $temparr);
    }
    $item['dateline'] = sgmdate($item['dateline']);
}
$categorylistarr = getmodelcategory($nameid);
$categorylistarr[0] = array('pre' => '', 'name' => '------');
$resultmodelcolumns = array();
if ($cacheinfo['models']['mid'] > 0) {
    $query = $_SGLOBAL['db']->query('SELECT * FROM ' . tname('modelcolumns') . ' WHERE mid = \'' . $cacheinfo['models']['mid'] . '\'  AND allowshow = \'1\' ORDER BY displayorder, id');
    while ($result = $_SGLOBAL['db']->fetch_array($query)) {
        $resultmodelcolumns[] = $result;
    }
}
if ($op == 'add' || $op == 'edit') {
    if ($itemid && ($item['uid'] != $_SGLOBAL['supe_uid'] || empty($_SGLOBAL['supe_uid']))) {
        showmessage('no_permission', 'cp.php?ac=models&op=list&nameid=' . $nameid);
    }
    $htmlarr = array();
    foreach ($resultmodelcolumns as $value) {
        //		if(!checkperm('managemodelfolders') && empty($value['allowpost'])) continue;
Ejemplo n.º 18
0
    }
    if ($categorylist_select == '') {
        foreach ($_G['categorylist'] as $key => $category) {
            if ($category['upid'] == $_G['categorylist'][$catid]['upid']) {
                $categorylist_select .= '<a' . ($key == $catid ? ' style="color:red;"' : '') . ' href="street.php?catid=' . $key . (!empty($region) ? '&region=' . $region : '') . '">' . $category['name'] . '</a>&nbsp;&nbsp;';
            }
        }
    }
} else {
    foreach ($_G['categorylist'] as $key => $category) {
        if ($category['upid'] == 0) {
            $categorylist_select .= '<a href="street.php?catid=' . $key . (!empty($region) ? '&region=' . $region : '') . '">' . $category['name'] . '</a>&nbsp;&nbsp;';
        }
    }
}
$regionlist = getmodelcategory('region');
if (!empty($region)) {
    $location['region'] = $regionlist[$region]['name'];
    foreach ($regionlist as $key => $category) {
        if ($category['upid'] == $region) {
            $regionlist_select .= '<a href="street.php?region=' . $key . (!empty($catid) ? '&catid=' . $catid : '') . '">' . $category['name'] . '</a>&nbsp;&nbsp;';
        }
    }
    if ($regionlist_select == '') {
        foreach ($regionlist as $key => $category) {
            if ($category['upid'] == $regionlist[$region]['upid']) {
                $regionlist_select .= '<a' . ($key == $region ? ' style="color:red;"' : '') . ' href="street.php?region=' . $key . (!empty($catid) ? '&catid=' . $catid : '') . '">' . $category['name'] . '</a>&nbsp;&nbsp;';
            }
        }
    }
} else {
Ejemplo n.º 19
0
     $editvalue['subjectimage'] = !empty($editvalue['subjectimage']) ? B_URL . '/' . getattachurl($editvalue['subjectimage']) : '';
     $editvalue['grade'] = lang('grade_' . $editvalue['grade']);
     $editvalue['validity_start'] = date("Y-m-d", !empty($_SGLOBAL['panelinfo']['validity_start']) ? $_SGLOBAL['panelinfo']['validity_start'] : time());
     $editvalue['validity_end'] = date("Y-m-d", $editvalue['validity_end']);
     $editvalue['isdiscount'] = $editvalue['isdiscount'] ? lang('yes') : lang('no');
 }
 if ($mname != 'shop') {
     $editvalue['subjectimage'] = !empty($editvalue['subjectimage']) ? B_URL . '/' . getattachurl($editvalue['subjectimage']) : '';
     if ($editvalue['grade'] == 0 || $editvalue['grade'] == 3) {
         $editvalue['grade'] = '顯示';
     } elseif ($editvalue['grade'] == '2') {
         $editvalue['grade'] = '關閉';
     }
     require_once B_ROOT . '/batch.attribute.php';
     $attributes = getattr($_GET['itemid'], $editvalue['catid']);
     $categorylist = getmodelcategory($mname);
     $editvalue['catid'] = $categorylist[$editvalue['catid']]['name'];
     $editvalue['validity_start'] = date("Y-m-d", $editvalue['validity_start']);
     $editvalue['validity_end'] = date("Y-m-d", $editvalue['validity_end']);
 }
 shownav('infomanage', $mname . '_adminview');
 showsubmenu($mname . '_adminview');
 showtips($mname . '_adminview_tips');
 showformheader('batchmod&m=' . $mname . '&operation=passupdate');
 showtableheader();
 if ($mname == 'shop') {
     $allow_admin_view_fields = array('subject', 'letter', 'groupid', 'syncfid', 'catid', 'region', 'grade', 'validity_start', 'validity_end', 'message', 'subjectimage', 'banner', 'windowsimg', 'windowstext', 'tips', 'tel', 'address', 'forum', 'isdiscount', 'discount');
     $query = DB::query('SELECT fieldname,fieldtitle FROM ' . tname('modelcolumns') . ' WHERE mid = 2 order by displayorder');
     while ($value = DB::fetch($query)) {
         if (!preg_match('/^ext_|^applicant/', $value['fieldname'])) {
             continue;
Ejemplo n.º 20
0
 *      $Id: groupbuy.php 4374 2010-09-08 08:58:55Z fanshengshuai $
 */
define("CURSCRIPT", "groupbuy");
include_once './common.php';
$active['groupbuy'] = ' class="active"';
$tagarrs = $groupbuylist = $where = $value = array();
$tagids = $joinsql = $wheresql = '';
$query = NULL;
//常見id處理
foreach (array('itemid', 'nid', 'uid', 'catid', 'tagid', 'shopid') as $value) {
    $_GET[$value] = $_POST[$value] = intval(!empty($_POST[$value]) ? $_POST[$value] : $_GET[$value]);
}
$_GET['keyword'] = trim(addslashes(rawurldecode($_REQUEST['keyword'])));
// 修改團購搜索
$catid = empty($_GET['catid']) ? 0 : $_GET['catid'];
$categorylist = getmodelcategory('groupbuy');
//讀團購分類
include_once './batch.attribute.php';
$searchcats = getsearchcats($categorylist, $catid);
$tagid[] = $catid;
if (is_array($searchcats)) {
    foreach ($searchcats as $key => $value) {
        $tagid[] = $value['catid'];
    }
}
$tagids = implode(',', $tagid);
//搜索分類id拼合
//屬性篩選器
$attrvalues = empty($_GET['params']) ? array() : getattrvalues($_GET['params']);
if ($catid && $categorylist[$catid]['havechild'] == 0) {
    $attform = formatattrs($catid, $attrvalues, $_GET['keyword']);