public function init() { $siteurl = siteurl(SITEID); if(empty($this->rssid)) { $catid = $_GET['catid'] ? intval($_GET['catid']) : '0'; $siteids = getcache('category_content','commons'); $siteid = $siteids[$catid] ? $siteids[$catid] : 1; $CATEGORYS = getcache('category_content_'.$siteid,'commons'); $subcats = subcat($catid,0,1,$siteid); foreach ($CATEGORYS as $r) if($r['parentid'] == 0) $channel[] = $r; include template('content','rss'); } else { $CATEGORYS = getcache('category_content_'.$this->siteid,'commons'); $SITEINFO = getcache('sitelist','commons'); $CAT = $CATEGORYS[$this->rssid]; if(count($CAT) == 0) showmessage(L('missing_part_parameters'),'blank'); $siteid = $CAT['siteid']; $sitedomain = $SITEINFO[$siteid]['domain']; //获取站点域名 $MODEL = getcache('model','commons'); $modelid = $CAT['modelid']; $encoding = CHARSET; $about = SITE_PROTOCOL.SITE_URL; $title = $CAT['catname']; $description = $CAT['description']; $content_html = $CAT['content_ishtml']; $image_link = "<![CDATA[".$CAT['image']."]]> "; $category = ''; $cache = 60; $rssfile = new RSSBuilder($encoding, $about, $title, $description, $image_link, $category, $cache); $publisher = ''; $creator = SITE_PROTOCOL.SITE_URL; $date = date('r'); $rssfile->addDCdata($publisher, $creator, $date); $ids = explode(",",$CAT['arrchildid']); if(count($ids) == 1 && in_array($this->rssid, $ids)) { $sql .= "`catid` = '$this->rssid' AND `status` = '99'"; } else { $sql .= get_sql_catid('category_content_'.$siteid,$this->rssid)." AND `status` = '99'"; } if(empty($MODEL[$modelid]['tablename'])) showmessage(L('missing_part_parameters'),'blank'); $this->db->table_name = $this->db->db_tablepre.$MODEL[$modelid]['tablename']; $info = $this->db->select($sql,'`title`, `description`, `url`, `inputtime`, `thumb`, `keywords`','0,20','id DESC'); foreach ($info as $r) { //添加项目 if(!empty($r['thumb'])) $img = "<img src=".thumb($r['thumb'], 150, 150)." border='0' /><br />";else $img = ''; $about = $link = (strpos($r['url'], 'http://') !== FALSE || strpos($r['url'], 'https://') !== FALSE) ? "<![CDATA[".$r['url']."]]> " : (($content_html == 1) ? "<![CDATA[".substr($sitedomain,0,-1).$r['url']."]]> " : "<![CDATA[".substr(APP_PATH,0,-1).$r['url']."]]> "); $title = "<![CDATA[".$r['title']."]]> "; $description = "<![CDATA[".$img.$r['description']."]]> "; $subject = ''; $date = date('Y-m-d H:i:s' , $r['inputtime']); $author = $ZLCMS['sitename'].' '.SITE_PROTOCOL.SITE_URL; $comments = '';//注释; $rssfile->addItem($about, $title, $link, $description, $subject, $date, $author, $comments, $image); } $version = '2.00'; $rssfile->outputRSS($version); } }
function redirectRoute($path, $params = null) { if ($params) { $queryString = '?' . http_build_query($params); } else { $queryString = ''; } header("Location: " . siteurl() . $path . $queryString); die; }
/** * 按照模型搜索 */ public function init() { if (!isset($_GET['catid'])) { showmessage(L('missing_part_parameters')); } $catid = intval($_GET['catid']); $siteids = getcache('category_content', 'commons'); $siteid = $siteids[$catid]; $this->categorys = getcache('category_content_' . $siteid, 'commons'); if (!isset($this->categorys[$catid])) { showmessage(L('missing_part_parameters')); } if (isset($_GET['info']['catid']) && $_GET['info']['catid']) { $catid = intval($_GET['info']['catid']); } else { $_GET['info']['catid'] = 0; } if (isset($_GET['tag']) && trim($_GET['tag']) != '') { $tag = safe_replace(strip_tags($_GET['tag'])); } else { showmessage(L('illegal_operation')); } $modelid = $this->categorys[$catid]['modelid']; $modelid = intval($modelid); if (!$modelid) { showmessage(L('illegal_parameters')); } $CATEGORYS = $this->categorys; $siteid = $this->categorys[$catid]['siteid']; $siteurl = siteurl($siteid); $this->db->set_model($modelid); $page = $_GET['page']; $datas = $infos = array(); $infos = $this->db->listinfo("`keywords` LIKE '%{$tag}%'", 'id DESC', $page, 20); $total = $this->db->number; if ($total > 0) { $pages = $this->db->pages; foreach ($infos as $_v) { if (strpos($_v['url'], '://') === false) { $_v['url'] = $siteurl . $_v['url']; } $datas[] = $_v; } } $SEO = seo($siteid, $catid, $tag); include template('content', 'tag'); }
/** * 更新栏目缓存方法 */ public function category() { $categorys = array(); $models = getcache('model', 'commons'); if (is_array($models)) { foreach ($models as $modelid => $model) { $datas = $this->db->select(array('modelid' => $modelid), 'catid,type,items', 10000); $array = array(); foreach ($datas as $r) { if ($r['type'] == 0) { $array[$r['catid']] = $r['items']; } } setcache('category_items_' . $modelid, $array, 'commons'); } } $array = array(); $categorys = $this->db->select('`module`=\'content\'', 'catid,siteid', 20000, 'listorder ASC'); foreach ($categorys as $r) { $array[$r['catid']] = $r['siteid']; } setcache('category_content', $array, 'commons'); $categorys = $this->categorys = array(); $this->categorys = $this->db->select(array('siteid' => $this->siteid, 'module' => 'content'), '*', 10000, 'listorder ASC'); foreach ($this->categorys as $r) { unset($r['module']); $setting = string2array($r['setting']); $r['create_to_html_root'] = $setting['create_to_html_root']; $r['ishtml'] = $setting['ishtml']; $r['content_ishtml'] = $setting['content_ishtml']; $r['category_ruleid'] = $setting['category_ruleid']; $r['show_ruleid'] = $setting['show_ruleid']; $r['workflowid'] = $setting['workflowid']; $r['isdomain'] = '0'; if (!preg_match('/^(http|https):\\/\\//', $r['url'])) { $r['url'] = siteurl($r['siteid']) . $r['url']; } elseif ($r['ishtml']) { $r['isdomain'] = '1'; } $categorys[$r['catid']] = $r; } setcache('category_content_' . $this->siteid, $categorys, 'commons'); return true; }
/** * 按照模型搜索 */ public function init() { $catid = intval($_GET['catid']); $siteid = get_siteid(); $this->categorys = getcache('category_ask_' . $siteid, 'commons'); if ($catid && !isset($this->categorys[$catid])) { showmessage(L('missing_part_parameters')); } if (isset($_GET['tag']) && trim($_GET['tag']) != '') { $tag = safe_replace(strip_tags($_GET['tag'])); } else { showmessage(L('illegal_operation')); } $CATEGORYS = $this->categorys; $siteurl = siteurl($siteid); $page = $_GET['page']; $datas = $infos = array(); if ($_GET['type'] == 'nosolve') { $sql = " AND status = 3 "; } elseif ($_GET['type'] == 'solve') { $sql = " AND status = 5 "; } elseif ($_GET['type'] == 'vote') { $sql = " AND flag = 1 "; } elseif ($_GET['type'] == 'high') { $sql = " AND flag = 2 "; } else { $sql = " AND status > 2 "; } $infos = $this->db->listinfo("`keywords` LIKE '%{$tag}%' {$sql}", 'askid DESC', $page, 20); $total = $this->db->number; if ($total > 0) { $pages = $this->db->pages; foreach ($infos as $_v) { if (strpos($_v['url'], '://') === false) { $_v['url'] = $siteurl . $_v['url']; } $datas[] = $_v; } } $SEO = seo($siteid, $catid, $tag); include template('ask', 'tag'); }
/** * 当前路径 * 返回指定栏目路径层级 * @param $catid 栏目id * @param $symbol 栏目间隔符 */ function catpos_ask($catid, $symbol = ' > ') { $category_arr = array(); $siteids = getcache('category_ask', 'commons'); $siteid = $siteids[$catid]; $category_arr = getcache('category_ask_' . $siteid, 'commons'); if (!isset($category_arr[$catid])) { return ''; } $pos = ''; $siteurl = siteurl($category_arr[$catid]['siteid']); $arrparentid = array_filter(explode(',', $category_arr[$catid]['arrparentid'] . ',' . $catid)); foreach ($arrparentid as $catid) { $url = $category_arr[$catid]['url']; if (strpos($url, '://') === false) { $url = $siteurl . $url; } $pos .= '<a href="' . $url . '">' . $category_arr[$catid]['catname'] . '</a>' . $symbol; } return $pos; }
setInterval(closeParent,3000); }); function closeParent() { if($('#closeParentTime').html() == '') { window.top.$(".left_menu").addClass("left_menu_on"); window.top.$("#openClose").addClass("close"); window.top.$("html").addClass("on"); $('#closeParentTime').html('1'); window.top.$("#openClose").data('clicknum',1); } } //--> </SCRIPT> <div class="pad-lr-10"> <div class="pad-10"> <div class="content-menu ib-a blue line-x"><a href="javascript:;" class=on><em><?php echo L('page_manage');?></em></a><span>|</span> <a href="<?php if(strpos($category['url'],'http://')===false) echo siteurl($this->siteid);echo $category['url'];?>" target="_blank"><em><?php echo L('click_vistor');?></em></a> <span>|</span> <a href="?m=block&c=block_admin&a=public_visualization&catid=<?php echo $catid;?>&type=page"><em><?php echo L('visualization_edit');?></em></a> </div> </div> <form name="myform" action="?m=content&c=content&a=add" method="post" enctype="multipart/form-data"> <div class="pad_10"> <div style='overflow-y:auto;overflow-x:hidden' class='scrolltable'> <table width="100%" cellspacing="0" class="table_form contentWrap"> <tr> <th width="80"> <?php echo L('title');?> </th> <td><input type="text" style="width:400px;" name="info[title]" id="title" value="<?php echo $title?>" style="color:<?php echo $style;?>" class="measure-input " onBlur="$.post('api.php?op=get_keywords&number=3&sid='+Math.random()*5, {data:$('#title').val()}, function(data){if(data && $('#keywords').val()=='') $('#keywords').val(data); })"/> <input type="hidden" name="style_color" id="style_color" value="<?php echo $style_color;?>"> <input type="hidden" name="style_font_weight" id="style_font_weight" value="<?php echo $style_font_weight;?>"> <img src="statics/images/icon/colour.png" width="15" height="16" onclick="colorpicker('title_colorpanel','set_title_color');" style="cursor:hand"/> <img src="statics/images/icon/bold.png" width="10" height="10" onclick="input_font_bold()" style="cursor:hand"/> <span id="title_colorpanel" style="position:absolute; z-index:200" class="colorpanel"></span> </td> </tr>
public function published() { $memberinfo = $this->memberinfo; $sitelist = getcache('sitelist', 'commons'); if (!isset($_GET['siteid']) && count($sitelist) > 1) { include template('member', 'content_publish_select_model'); exit; } $_username = $this->memberinfo['username']; $_userid = $this->memberinfo['userid']; $siteid = intval($_GET['siteid']); if (!$siteid) { $siteid = 1; } $CATEGORYS = getcache('category_content_' . $siteid, 'commons'); $siteurl = siteurl($siteid); $pagesize = 20; $page = max(intval($_GET['page']), 1); $workflows = getcache('workflow_' . $siteid, 'commons'); $this->content_check_db = pc_base::load_model('content_check_model'); $infos = $this->content_check_db->listinfo(array('username' => $_username, 'siteid' => $siteid), 'inputtime DESC', $page); $datas = array(); foreach ($infos as $_v) { $arr_checkid = explode('-', $_v['checkid']); $_v['id'] = $arr_checkid[1]; $_v['modelid'] = $arr_checkid[2]; $_v['url'] = $_v['status'] == 99 ? go($_v['catid'], $_v['id']) : APP_PATH . 'index.php?m=content&c=index&a=show&catid=' . $_v['catid'] . '&id=' . $_v['id']; if (!isset($setting[$_v['catid']])) { $setting[$_v['catid']] = string2array($CATEGORYS[$_v['catid']]['setting']); } $workflowid = $setting[$_v['catid']]['workflowid']; $_v['flag'] = $workflows[$workflowid]['flag']; $datas[] = $_v; } $pages = $this->content_check_db->pages; include template('member', 'content_published'); }
<?php defined('IN_PHPCMS') or exit('No permission resources.'); ?><?php include template("content","header"); ?> <!--main--> <div class="main"> <div class="col-left"> <div class="crumbs"><a href="<?php echo siteurl($siteid);?>">Ê×Ò³</a><span> > </span><?php echo catpos($catid);?> Áбí</div> <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=5ab4b05e97fd14c3ed386604ee1a9399&action=lists&catid=%24catid&num=25&order=id+DESC&page=%24page\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">±à¼</a>";}$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'lists')) {$pagesize = 25;$page = intval($page) ? intval($page) : 1;if($page<=0){$page=1;}$offset = ($page - 1) * $pagesize;$content_total = $content_tag->count(array('catid'=>$catid,'order'=>'id DESC','limit'=>$offset.",".$pagesize,'action'=>'lists',));$pages = pages($content_total, $page, $pagesize, $urlrule);$data = $content_tag->lists(array('catid'=>$catid,'order'=>'id DESC','limit'=>$offset.",".$pagesize,'action'=>'lists',));}?> <ul class="list lh24 f14"> <?php $n=1;if(is_array($data)) foreach($data AS $r) { ?> <li><span class="rt"><?php echo date('Y-m-d H:i:s',$r[inputtime]);?></span>¡¤<a href="<?php echo $r['url'];?>" target="_blank"<?php echo title_style($r[style]);?>><?php echo $r['title'];?></a></li> <?php if($n%5==0) { ?><li class="bk20 hr"></li><?php } ?> <?php $n++;}unset($n); ?> </ul> <div id="pages" class="text-c"><?php echo $pages;?></div> <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?> </div> <div class="col-auto"> <div class="box"> <h5 class="title-2">ƵµÀ×ÜÅÅÐÐ</h5> <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=0ad40a45ad075d8f47798a231e25aec2&action=hits&catid=%24catid&num=10&order=views+DESC&cache=3600\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">±à¼</a>";}$tag_cache_name = md5(implode('&',array('catid'=>$catid,'order'=>'views DESC',)).'0ad40a45ad075d8f47798a231e25aec2');if(!$data = tpl_cache($tag_cache_name,3600)){$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'hits')) {$data = $content_tag->hits(array('catid'=>$catid,'order'=>'views DESC','limit'=>'10',));}if(!empty($data)){setcache($tag_cache_name, $data, 'tpl_data');}}?> <ul class="content digg"> <?php $n=1;if(is_array($data)) foreach($data AS $r) { ?> <li><a href="<?php echo $r['url'];?>" target="_blank"><?php echo $r['title'];?></a></li> <?php $n++;}unset($n); ?> </ul> <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?> </div> <div class="bk10"></div> <div class="box"> <h5 class="title-2">ƵµÀ±¾ÔÂÅÅÐÐ</h5> <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=2caa10e576ba663010144233732308cd&action=hits&catid=%24catid&num=8&order=monthviews+DESC&cache=3600\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">±à¼</a>";}$tag_cache_name = md5(implode('&',array('catid'=>$catid,'order'=>'monthviews DESC',)).'2caa10e576ba663010144233732308cd');if(!$data = tpl_cache($tag_cache_name,3600)){$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'hits')) {$data = $content_tag->hits(array('catid'=>$catid,'order'=>'monthviews DESC','limit'=>'8',));}if(!empty($data)){setcache($tag_cache_name, $data, 'tpl_data');}}?> <ul class="content rank">
fixDiv2(); </script> </head> <body> <header> <div id="logo_title"> <div id="logo"><a href="<?php siteurl(); ?> "><img src="<?php siteurl(); ?> content/themes/blue-king/img/logo.png" width="87px" height="87px"></a></div> <h1><a href="<?php siteurl(); ?> "><?php get_pagetitle(); ?> </a></h1> <p><?php get_pagesubtitle(); ?> </p> </div> <nav> <ul> <?php menu(array('position' => 'primary')); ?>
/** * 按照模型搜索 */ public function init() { $grouplist = getcache('grouplist', 'member'); $_groupid = param::get_cookie('_groupid'); if (!$_groupid) { $_groupid = 8; } if (!$grouplist[$_groupid]['allowsearch']) { if ($_groupid == 8) { showmessage(L('guest_not_allowsearch')); } else { showmessage(''); } } if (!isset($_GET['catid'])) { showmessage(L('missing_part_parameters')); } $catid = intval($_GET['catid']); $siteids = getcache('category_content', 'commons'); $siteid = $siteids[$catid]; $this->categorys = getcache('category_content_' . $siteid, 'commons'); if (!isset($this->categorys[$catid])) { showmessage(L('missing_part_parameters')); } if (isset($_GET['info']['catid']) && $_GET['info']['catid']) { $catid = intval($_GET['info']['catid']); } else { $_GET['info']['catid'] = 0; } $modelid = $this->categorys[$catid]['modelid']; $modelid = intval($modelid); if (!$modelid) { showmessage(L('illegal_parameters')); } //搜索间隔 $minrefreshtime = getcache('common', 'commons'); $minrefreshtime = intval($minrefreshtime['minrefreshtime']); $minrefreshtime = $minrefreshtime ? $minrefreshtime : 5; if (param::get_cookie('search_cookie') && param::get_cookie('search_cookie') > SYS_TIME - 2) { showmessage(L('search_minrefreshtime', array('min' => $minrefreshtime)), 'index.php?m=content&c=search&catid=' . $catid, $minrefreshtime * 1280); } else { param::set_cookie('search_cookie', SYS_TIME + 2); } //搜索间隔 $CATEGORYS = $this->categorys; //产生表单 pc_base::load_sys_class('form', '', 0); $fields = getcache('model_field_' . $modelid, 'model'); $forminfos = array(); foreach ($fields as $field => $r) { if ($r['issearch']) { if ($r['formtype'] == 'catid') { $r['form'] = form::select_category('', $_GET['info']['catid'], 'name="info[catid]"', L('please_select_category'), $modelid, 0, 1); } elseif ($r['formtype'] == 'number') { $r['form'] = "<input type='text' name='{$field}_start' id='{$field}_start' value='' size=5 class='input-text'/> - <input type='text' name='{$field}_end' id='{$field}_start' value='' size=5 class='input-text'/>"; } elseif ($r['formtype'] == 'datetime') { $r['form'] = form::date("info[{$field}]"); } elseif ($r['formtype'] == 'box') { $options = explode("\n", $r['options']); foreach ($options as $_k) { $v = explode("|", $_k); $option[$v[1]] = $v[0]; } switch ($r['boxtype']) { case 'radio': $string = form::radio($option, $value, "name='info[{$field}]' id='{$field}'"); break; case 'checkbox': $string = form::radio($option, $value, "name='info[{$field}]' id='{$field}'"); break; case 'select': $string = form::select($option, $value, "name='info[{$field}]' id='{$field}'"); break; case 'multiple': $string = form::select($option, $value, "name='info[{$field}]' id='{$field}'"); break; } $r['form'] = $string; } elseif ($r['formtype'] == 'typeid') { $types = getcache('type_content', 'commons'); $types_array = array(L('no_limit')); foreach ($types as $_k => $_v) { if ($modelid == $_v['modelid']) { $types_array[$_k] = $_v['name']; } } $r['form'] = form::select($types_array, 0, "name='info[{$field}]' id='{$field}'"); } elseif ($r['formtype'] == 'linkage') { $setting = string2array($r['setting']); $value = $_GET['info'][$field]; $r['form'] = menu_linkage($setting['linkageid'], $field, $value); } elseif (in_array($r['formtype'], array('text', 'keyword', 'textarea', 'editor', 'title', 'author', 'omnipotent'))) { $value = safe_replace($_GET['info'][$field]); $r['form'] = "<input type='text' name='info[{$field}]' id='{$field}' value='" . $value . "' class='input-text search-text'/>"; } else { continue; } $forminfos[$field] = $r; } } //----------- if (isset($_GET['dosubmit'])) { $siteid = $this->categorys[$catid]['siteid']; $siteurl = siteurl($siteid); $this->db->set_model($modelid); $tablename = $this->db->table_name; $page = max(intval($_GET['page']), 1); $sql = "SELECT * FROM `{$tablename}` a,`{$tablename}_data` b WHERE a.id=b.id AND a.status=99"; $sql_count = "SELECT COUNT(*) AS num FROM `{$tablename}` a,`{$tablename}_data` b WHERE a.id=b.id AND a.status=99"; //构造搜索SQL $where = ''; foreach ($fields as $field => $r) { if ($r['issearch']) { $table_nickname = $r['issystem'] ? 'a' : 'b'; if ($r['formtype'] == 'catid') { if ($_GET['info']['catid']) { $where .= " AND {$table_nickname}.catid='{$catid}'"; } } elseif ($r['formtype'] == 'number') { $start = "{$field}_start"; $end = "{$field}_end"; if ($_GET[$start]) { $start = intval($_GET[$start]); $where .= " AND {$table_nickname}.{$field}>'{$start}'"; } if ($_GET[$end]) { $end = intval($_GET[$end]); $where .= " AND {$table_nickname}.{$field}<'{$end}'"; } } elseif ($r['formtype'] == 'datetime') { if ($_GET['info'][$field]) { $start = strtotime($_GET['info'][$field]); if ($start) { $where .= " AND {$table_nickname}.{$field}>'{$start}'"; } } } elseif ($r['formtype'] == 'box') { if ($_GET['info'][$field]) { $field_value = safe_replace($_GET['info'][$field]); switch ($r['boxtype']) { case 'radio': $where .= " AND {$table_nickname}.`{$field}`='{$field_value}'"; break; case 'checkbox': $where .= " AND {$table_nickname}.`{$field}` LIKE '%,{$field_value},%'"; break; case 'select': $where .= " AND {$table_nickname}.`{$field}`='{$field_value}'"; break; case 'multiple': $where .= " AND {$table_nickname}.`{$field}` LIKE '%,{$field_value},%'"; break; } } } elseif ($r['formtype'] == 'typeid') { if ($_GET['info'][$field]) { $typeid = intval($_GET['info'][$field]); $where .= " AND {$table_nickname}.`{$field}`='{$typeid}'"; } } elseif ($r['formtype'] == 'linkage') { if ($_GET['info'][$field]) { $linkage = intval($_GET['info'][$field]); $where .= " AND {$table_nickname}.`{$field}`='{$linkage}'"; } } elseif (in_array($r['formtype'], array('text', 'keyword', 'textarea', 'editor', 'title', 'author', 'omnipotent'))) { if ($_GET['info'][$field]) { $keywords = safe_replace($_GET['info'][$field]); $where .= " AND {$table_nickname}.`{$field}` LIKE '%{$keywords}%'"; } } else { continue; } } } //----------- if ($where == '') { showmessage(L('please_enter_content_to_search')); } $pagesize = 20; $offset = intval($pagesize * ($page - 1)); $sql_count .= $where; $this->db->query($sql_count); $total = $this->db->fetch_array(); $total = $total[0]['num']; if ($total != 0) { $sql .= $where; $order = ''; $order = $_GET['orderby'] == 'a.id DESC' ? 'a.id DESC' : 'a.id ASC'; $sql .= ' ORDER BY ' . $order; $sql .= " LIMIT {$offset},{$pagesize}"; $this->db->query($sql); $datas = $this->db->fetch_array(); $pages = pages($total, $page, $pagesize); } else { $datas = array(); $pages = ''; } } $SEO = seo($siteid, $catid, $keywords); include template('content', 'search'); }
<a href="<?php echo $v['url'];?>"><?php echo $v['catname'];?></a> </div> <div class="SubMenuItemSeparator"></div> <?php $n++;}unset($n); ?><!--子栏目循环结束--> <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?> </div> <?php } ?> </div> <?php $n++;}unset($n); ?> <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?> <div style="clear:both;"></div> </div> <!--一级导航栏结束--> <!--网站介绍开始--> <div id="ctl43_spHorizontalNav" class="HorizontalNav Control Control_313"> <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=e3d146232857be4579899ac97dbd2f7c&action=category&catid=1&num=15&siteid=%24siteid&order=listorder+ASC\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'category')) {$data = $content_tag->category(array('catid'=>'1','siteid'=>$siteid,'order'=>'listorder ASC','limit'=>'15',));}?> <div class="HorizontalNavItem ControlLink_313"><a href="<?php echo siteurl($siteid);?>">Home</a></div> <?php $n=1;if(is_array($data)) foreach($data AS $r) { ?> <div class="HorizontalNavItem ControlLink_313"><a href="<?php echo $r['url'];?>" title="<?php echo $r['catname'];?>"><?php echo $r['catname'];?></a></div> <?php $n++;}unset($n); ?> <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?> <div style="clear:both;"></div> </div> <!--网站介绍结束--> </div> </div> </div> <div class="pagewidth"> </div> </header>
public function published() { $memberinfo = $this->memberinfo; $groupid = $memberinfo['groupid']; $sitelist = getcache('sitelist', 'commons'); if (!isset($_GET['siteid']) && count($sitelist) > 1) { include template('member', 'content_publish_select_model'); exit; } $_username = $this->memberinfo['username']; $_userid = $this->memberinfo['userid']; $catid = intval($_GET['catid']); $siteid = intval($_GET['siteid']); $pro_type = $_GET['pro_type']; $checkStatus = $_GET['checkStatus']; if (!$siteid) { $siteid = 1; } $CATEGORYS = getcache('category_content_' . $siteid, 'commons'); $siteurl = siteurl($siteid); $pagesize = 20; $page = max(intval($_GET['page']), 1); $workflows = getcache('workflow_' . $siteid, 'commons'); $this->content_check_db = pc_base::load_model('content_check_model'); // $info['L_3381']=3434; $this->content_db = pc_base::load_model('content_model'); $steps = $_GET['steps']; //是否是审核 $type = $_GET['type']; //是否是审核 if (empty($memberinfo['area'])) { $memberinfo['area'] = 0; } /** * 企业项目* */ if ($catid == 9) { $where .= "p.catid= {$catid} "; /**获取用户的区域,若用户没有区域即为gxw账户***/ $area = $memberinfo['area'] ? $memberinfo['area'] : $_POST['info']['area']; //if ($memberinfo ['groupid'] < 15) {//gxw帐号,不需要区域查询 if ($area) { $where .= "and m.area = '{$area}'"; } //} $title = isset($_POST['title']) ? $_POST['title'] : ''; if ($title) { $where .= "and p.title like '%{$title}%'"; } $steps = is_numeric($_REQUEST['steps']) ? $_REQUEST['steps'] : 1; if ($groupid > 12) { //企业以上用户 $where .= " and p.status =" . $steps; } else { $where .= " and p.username = '******'"; } $sql1 = "select p.*,l.`name`,m.nickname complayName,(select pg.title From gxw_project_progress pg where pg.projectId=p.id order by pg.id desc LIMIT 0,1) progressName from gxw_project p " . "LEFT JOIN gxw_linkage l ON p.pro_type=l.linkageid " . "LEFT JOIN gxw_member m ON m.username=p.username " . "WHERE " . $where; //echo $sql1; $datas = $this->content_db->mylistinfo($sql1, 'p.id desc', $page); $pages = $this->content_db->pages; } else { if ($catid == 10) { $where .= "p.catid= {$catid} "; if ($memberinfo['groupid'] < 15) { //gxw帐号,不需要区域查询 if (!empty($area)) { $where .= "and m.area = '{$area}'"; } } $title = isset($_POST['title']) ? $_POST['title'] : ''; if ($title) { $where .= "and p.title like '%{$title}%'"; } $steps = is_numeric($_REQUEST['steps']) ? $_REQUEST['steps'] : 1; if ($groupid > 12) { //企业以上用户 $where .= " and p.status =" . $steps; } else { $where .= " and p.username = '******'"; } $sql1 = "select a.*,p.*,m.nickname complayName from gxw_products_data a " . "LEFT JOIN gxw_products p on p.id=a.id " . "LEFT JOIN gxw_member m ON m.username=p.username " . "WHERE " . $where; //echo $sql1;die; $datas = $this->content_db->mylistinfo($sql1, 'a.id desc', $page); $pages = $this->content_db->pages; } else { if ($catid == 12) { $where = " catid= {$catid} "; $sql1 = "select * from gxw_notice_data a LEFT JOIN gxw_notice b on b.id=a.id WHERE " . $where; $datas = $this->content_db->mylistinfo($sql1, 'a.id desc', $page); $pages = $this->content_db->pages; } else { if ($catid == 13) { $where = " pr.catid= {$catid} "; $sql1 = "select pr.*,p.title projectTitle From gxw_project_progress pr left join gxw_project p on pr.projectId=p.id WHERE " . $where; $datas = $this->content_db->mylistinfo($sql1, 'pr.id desc', $page); $pages = $this->content_db->pages; } else { if ($catid == 14) { $where = " pr.catid= {$catid} and username = '******'"; $sql1 = "select * From gxw_month_products pr WHERE " . $where; $datas = $this->content_db->mylistinfo($sql1, 'pr.id desc', $page); $pages = $this->content_db->pages; } else { if ($catid == 16) { $where = " pr.catid= {$catid} and username = '******'"; $sql1 = "select * From gxw_month_dashi pr WHERE " . $where; $datas = $this->content_db->mylistinfo($sql1, 'pr.id desc', $page); $pages = $this->content_db->pages; } else { if ($catid == 19) { $where = " pr.catid= {$catid} and username = '******'"; $sql1 = "select * From gxw_info_application pr WHERE " . $where; $datas = $this->content_db->mylistinfo($sql1, 'pr.id desc', $page); $pages = $this->content_db->pages; } else { if ($catid == 20) { $where = " n.catid= {$catid}"; $sql1 = "select * From gxw_news n left join gxw_news_data d on n.id=d.id WHERE " . $where; $datas = $this->content_db->mylistinfo($sql1, 'n.id desc', $page); $pages = $this->content_db->pages; } else { if ($catid == 29) { $sql1 = "select r.*,d.data from gxw_shop_recommend r left join gxw_shop_recommend_data d on r.id=d.id"; $datas = $this->content_db->mylistinfo($sql1, 'r.id desc', $page); $pages = $this->content_db->pages; } else { $infos = $this->content_check_db->listinfo(array('username' => $_username, 'siteid' => $siteid, 'catid' => $catid), 'inputtime DESC', $page); foreach ($infos as $_v) { $arr_checkid = explode('-', $_v['checkid']); $_v['id'] = $arr_checkid[1]; $_v['modelid'] = $arr_checkid[2]; $_v['url'] = $_v['status'] == 99 ? go($_v['catid'], $_v['id']) : APP_PATH . 'index.php?m=content&c=index&a=show&catid=' . $_v['catid'] . '&id=' . $_v['id']; if (!isset($setting[$_v['catid']])) { $setting[$_v['catid']] = string2array($CATEGORYS[$_v['catid']]['setting']); } $workflowid = $setting[$_v['catid']]['workflowid']; $_v['flag'] = $workflows[$workflowid]['flag']; $datas[] = $_v; } $pages = $this->content_check_db->pages; } } } } } } } } } if (isset($type)) { include template('member', 'content_published_' . $type); } else { include template('member', 'content_published'); } }
window.top.$("#openClose").addClass("close"); window.top.$("html").addClass("on"); $('#closeParentTime').html('1'); window.top.$("#openClose").data('clicknum',1); } } //--> </SCRIPT> <div class="pad-lr-10"> <div class="pad-10"> <div class="content-menu ib-a blue line-x"><a href="javascript:;" class=on><em><?php echo L('page_manage'); ?> </em></a><span>|</span> <a href="<?php if (strpos($category['url'], 'http://') === false) { echo siteurl($this->siteid); } echo $category['url']; ?> " target="_blank"><em><?php echo L('click_vistor'); ?> </em></a> <span>|</span> <a href="?m=block&c=block_admin&a=public_visualization&catid=<?php echo $catid; ?> &type=page"><em><?php echo L('visualization_edit'); ?> </em></a> </div> </div>
/** * 更新栏目缓存 */ private function category_cache() { $categorys = array(); $this->categorys = $this->category_db->select(array('siteid' => $this->siteid, 'module' => 'content'), '*', 10000, 'listorder ASC'); foreach ($this->categorys as $r) { unset($r['module']); $setting = string2array($r['setting']); $r['create_to_html_root'] = $setting['create_to_html_root']; $r['ishtml'] = $setting['ishtml']; $r['content_ishtml'] = $setting['content_ishtml']; $r['category_ruleid'] = $setting['category_ruleid']; $r['show_ruleid'] = $setting['show_ruleid']; $r['workflowid'] = $setting['workflowid']; $r['isdomain'] = '0'; if (strpos($r['url'], 'http://') === false) { $r['url'] = siteurl($r['siteid']) . $r['url']; } elseif ($r['ishtml']) { $r['isdomain'] = '1'; } $categorys[$r['catid']] = $r; } setcache('category_content_' . $this->siteid, $categorys, 'commons'); return true; }
/** * 接口处理方法 * @param array $param 属性 请求时,为模型、栏目数组。提交添加为二维信息数据 。例:array(1=>array('title'=>'多发发送方法', ....)) * @param array $arr 参数 表单数据,只在请求添加时传递。 例:array('modelid'=>1, 'catid'=>12); */ public function category_list($param = array(), $arr = array()) { if ($arr['dosubmit']) { $id = $_POST['id']; if (empty($id)) { return true; } $id_arr = explode('|', $id); if (count($id_arr) == 0) { return true; } $old_catid = intval($_POST['catid']); if (!$old_catid) { return true; } $ids = $_POST['ids']; if (empty($ids)) { return true; } $ids = explode('|', $ids); $siteid = intval($_POST['siteid']); $siteids = getcache('category_content', 'commons'); $oldsiteid = $siteids[$old_catid]; $this->categorys = getcache('category_content_' . $oldsiteid, 'commons'); $modelid = $this->categorys[$old_catid]['modelid']; $this->db->set_model($modelid); $tablename = $this->db->table_name; $this->hits_db = pc_base::load_model('hits_model'); foreach ($id_arr as $id) { $this->db->table_name = $tablename; $r = $this->db->get_one(array('id' => $id)); $linkurl = preg_match('/^http:\\/\\//', $r['url']) ? $r['url'] : siteurl($siteid) . $r['url']; foreach ($ids as $catid) { $siteid = $siteids[$catid]; $this->categorys = getcache('category_content_' . $siteid, 'commons'); $modelid = $this->categorys[$catid]['modelid']; $this->db->set_model($modelid); $newid = $this->db->insert(array('title' => $r['title'], 'style' => $r['style'], 'thumb' => $r['thumb'], 'keywords' => $r['keywords'], 'description' => $r['description'], 'status' => $r['status'], 'catid' => $catid, 'url' => $linkurl, 'sysadd' => 1, 'username' => $r['username'], 'inputtime' => $r['inputtime'], 'updatetime' => $r['updatetime'], 'islink' => 1), true); $this->db->table_name = $this->db->table_name . '_data'; $this->db->insert(array('id' => $newid)); $hitsid = 'c-' . $modelid . '-' . $newid; $this->hits_db->insert(array('hitsid' => $hitsid, 'updatetime' => SYS_TIME)); } } return true; } else { $siteid = get_siteid(); $this->categorys = getcache('category_content_' . $siteid, 'commons'); $tree = pc_base::load_sys_class('tree'); $tree->icon = array(' │ ', ' ├─ ', ' └─ '); $tree->nbsp = ' '; $categorys = array(); $this->catids_string = array(); if ($_SESSION['roleid'] != 1) { $this->priv_db = pc_base::load_model('category_priv_model'); $priv_result = $this->priv_db->select(array('action' => 'add', 'roleid' => $_SESSION['roleid'], 'siteid' => $siteid, 'is_admin' => 1)); $priv_catids = array(); foreach ($priv_result as $_v) { $priv_catids[] = $_v['catid']; } if (empty($priv_catids)) { return ''; } } foreach ($this->categorys as $r) { if ($r['siteid'] != $siteid || $r['type'] != 0) { continue; } if ($_SESSION['roleid'] != 1 && !in_array($r['catid'], $priv_catids)) { $arrchildid = explode(',', $r['arrchildid']); $array_intersect = array_intersect($priv_catids, $arrchildid); if (empty($array_intersect)) { continue; } } if ($r['child']) { $r['checkbox'] = ''; $r['style'] = 'color:#8A8A8A;'; } else { $checked = ''; if ($typeid && $r['usable_type']) { $usable_type = explode(',', $r['usable_type']); if (in_array($typeid, $usable_type)) { $checked = 'checked'; $this->catids_string[] = $r['catid']; } } $r['checkbox'] = "<input type='checkbox' name='ids[]' value='{$r[catid]}' {$checked}>"; $r['style'] = ''; } $categorys[$r['catid']] = $r; } $str = "<tr>\n\t\t\t\t\t\t<td align='center'>\$checkbox</td>\n\t\t\t\t\t\t<td style='\$style'>\$spacer\$catname</td>\n\t\t\t\t\t</tr>"; $tree->init($categorys); $categorys = $tree->get_tree(0, $str); return $categorys; } }
'transitionOut': 'none', 'titlePosition': 'over', 'titleFormat': function (title, currentArray, currentIndex, currentOpts) { return '<span id="fancybox-title-over"> ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' ' + title : '') + '</span>'; } }); }); </script> <link media="all" href="<?php echo CSS_PATH;?>yingtian/widget009.css" type="text/css" rel="stylesheet"> <link media="all" href="<?php echo CSS_PATH;?>yingtian/counter015.css" type="text/css" rel="stylesheet"> </head> <section class="LayoutMiddle pagewidth"> <section class="LayoutContent"> <div itemscope="" itemtype="http://schema.org/Product" class="LayoutContentInner"> <span id="lblCategoryTrail" class="ProductDetailsCategoryTrail"> <a href="<?php echo siteurl($siteid);?>">Home</a> > <?php echo catpos($catid);?> </span> <div class="ProductDetailsLeft"> <div class="ProductDetailsPhotoArea"> <div class="ProductDetailsPhoto"> <!--Luara js文件--> <script src="<?php echo JS_PATH;?>yingtian/jquery.luara.0.0.1.min.js"></script> <link rel="stylesheet" href="<?php echo CSS_PATH;?>yingtian/luara.top.css"/> <div class="example1"> <ul> <?php $n=1;if(is_array($pics)) foreach($pics AS $r) { ?> <li><img src="<?php echo $r['url'];?>" alt="<?php echo $r['alt'];?>"/></li> <?php $n++;}unset($n); ?> </ul> <ol>
<?php defined('IN_PHPCMS') or exit('No permission resources.'); ?><?php include template("content","header"); ?> <div class="main"> <div class="col-left"> <div class="crumbs"><a href="<?php echo siteurl($siteid);?>">首页</a><span> > </span><?php echo catpos($catid);?> 正文</div> <div id="Article"> <h1><?php echo $title;?><br /> <span><?php echo $inputtime;?> 来源:<?php echo $copyfrom;?> 评论:<a href="#comment_iframe" id="comment">0</a> 点击:</span><span id="hits"></span></h1> <?php if($description) { ?><div class="summary" ><?php echo $description;?></div><?php } ?> <div class="content"> <?php if($allow_visitor==1) { ?> <?php echo $content;?> <!--内容关联投票--> <?php if($voteid) { ?><script language="javascript" src="<?php echo APP_PATH;?>index.php?m=vote&c=index&a=show&action=js&subjectid=<?php echo $voteid;?>&type=2"></script><?php } ?> <?php } else { ?> <CENTER><a href="<?php echo APP_PATH;?>index.php?m=content&c=readpoint&allow_visitor=<?php echo $allow_visitor;?>"><font color="red">阅读此信息需要您支付 <B><I><?php echo $readpoint;?> <?php if($paytype) { ?>元<?php } else { ?>点<?php } ?></I></B>,点击这里支付</font></a></CENTER> <?php } ?> </div> <?php if($titles) { ?> <fieldset> <legend class="f14">本文导航</legend><ul class="list blue row-2"> <?php $n=1;if(is_array($titles)) foreach($titles AS $r) { ?> <li><?php echo $n;?>、<a href="<?php echo $r['url'];?>"><?php echo $r['title'];?></a></li> <?php $n++;}unset($n); ?> </ul> </fieldset> <?php } ?> <div id="pages" class="text-c"><?php echo $pages;?></div> <p style="margin-bottom:10px"> <strong>相关热词搜索:</strong><?php $n=1;if(is_array($keywords)) foreach($keywords AS $keyword) { ?><a href="<?php echo APP_PATH;?>index.php?m=content&c=tag&catid=<?php echo $catid;?>&tag=<?php echo urlencode($keyword);?>" class="blue"><?php echo $keyword;?></a> <?php $n++;}unset($n); ?> </p>
$("a.fancybox").fancybox(); }); </script> <div class="Main2 constr fix"> <div class="m_T1nl"> <span> <div style="float: left;"> 当前位置: </div> <a href="<?php echo siteurl($siteid); ?> ">首页</a> > <?php echo catpos($catid); ?> <?php echo $title; ?> </span>
<input type="hidden" name="c" value="index"/> <input type="hidden" name="a" value="init"/> <input type="hidden" name="typeid" value="<?php echo $typeid;?>" id="typeid"/> <input type="hidden" name="siteid" value="<?php echo $siteid;?>" id="siteid"/> <input type="text" class="text" name="q" id="q"/><input type="submit" value="搜 索" class="button" /> </form> </div> </div> <div class="banner"><script language="javascript" src="<?php echo APP_PATH;?>index.php?m=poster&c=index&a=show_poster&id=1"></script></div> <div class="bk3"></div> <div class="nav-bar"> <map> <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=b43f1459ac702900c8d44c91a5e796dd&action=category&catid=0&num=25&siteid=%24siteid&order=listorder+ASC\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">修改</a>";}$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'category')) {$data = $content_tag->category(array('catid'=>'0','siteid'=>$siteid,'order'=>'listorder ASC','limit'=>'25',));}?> <ul class="nav-site"> <li><a href="<?php echo siteurl($siteid);?>"><span>首页</span></a></li> <?php $n=1;if(is_array($data)) foreach($data AS $r) { ?> <li class="line">|</li> <li><a href="<?php echo $r['url'];?>"><span><?php echo $r['catname'];?></span></a></li> <?php $n++;}unset($n); ?> </ul> <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?> <?php echo runhook('glogal_menu')?> </map> </div> <?php if($top_parentid) { ?> <div class="subnav"> <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=894824ec88c3701696ad9d879ede6b1d&action=category&catid=%24top_parentid&num=15&siteid=%24siteid&order=listorder+ASC\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">修改</a>";}$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'category')) {$data = $content_tag->category(array('catid'=>$top_parentid,'siteid'=>$siteid,'order'=>'listorder ASC','limit'=>'15',));}?> <?php $n=1;if(is_array($data)) foreach($data AS $r) { ?> <a href="<?php echo $r['url'];?>"><?php echo $r['catname'];?></a><span> | </span>
/** * 更新缓存 */ public function cache() { $categorys = array(); $array = array(); $categorys = $this->db->select(array('siteid' => $this->siteid, 'module' => 'ask'), 'catid,siteid', 20000, 'listorder ASC'); foreach ($categorys as $r) { $array[$r['catid']] = $r['siteid']; } setcache('category_ask', $array, 'commons'); $categorys = $this->categorys = array(); $this->categorys = $this->db->select(array('siteid' => $this->siteid, 'module' => 'ask'), '*', 10000, 'listorder ASC'); foreach ($this->categorys as $r) { unset($r['module']); $setting = string2array($r['setting']); $r['create_to_html_root'] = $setting['create_to_html_root']; $r['ishtml'] = $setting['ishtml']; $r['content_ishtml'] = $setting['content_ishtml']; $r['category_ruleid'] = $setting['category_ruleid']; $r['show_ruleid'] = $setting['show_ruleid']; $r['workflowid'] = $setting['workflowid']; $r['isdomain'] = '0'; if (!preg_match('/^(http|https):\\/\\//', $r['url'])) { $r['url'] = siteurl($r['siteid']) . $r['url']; } elseif ($r['ishtml']) { $r['isdomain'] = '1'; } //得到顶级栏目ID,写入栏目缓存 $pp = string2array("array(" . $r['arrparentid'] . ")"); if (count($pp) > 1) { $r['topparentid'] = $pp[1]; } else { $r['topparentid'] = $r['catid']; } $categorys[$r['catid']] = $r; } setcache('category_ask_' . $this->siteid, $categorys, 'commons'); return true; }
<div class="ControlItem ControlItem_359"><div class="ControlLink ControlLink_359"><a href="http://demo.cmsyou.com/blacken/index.php?m=content&c=index&a=show&catid=7&id=6" title="Food Lab Solution Title 1" class="ControlLink_Link ControlLink_Link_359">Food Lab Solution Title 1</a></div></div> <div class="ControlItem ControlItem_359"><div class="ControlLink ControlLink_359"><a href="http://demo.cmsyou.com/blacken/index.php?m=content&c=index&a=show&catid=18&id=6" title="Onestop Laboratory 6" class="ControlLink_Link ControlLink_Link_359">Onestop Laboratory 6</a></div></div> <div class="ControlItem ControlItem_359"><div class="ControlLink ControlLink_359"><a href="http://demo.cmsyou.com/blacken/index.php?m=content&c=index&a=show&catid=18&id=5" title="Onestop Laboratory Equipment 5" class="ControlLink_Link ControlLink_Link_359">Onestop Laboratory Equipment 5</a></div></div> <div class="ControlItem ControlItem_359"><div class="ControlLink ControlLink_359"><a href="http://demo.cmsyou.com/blacken/index.php?m=content&c=index&a=show&catid=22&id=4" title="Our manufacture are attending 2013 China" class="ControlLink_Link ControlLink_Link_359">Our manufacture are attending 2013 China</a></div></div> <div class="ControlItem ControlItem_359"><div class="ControlLink ControlLink_359"><a href="http://demo.cmsyou.com/blacken/index.php?m=content&c=index&a=show&catid=12&id=4" title="Food Lab Product Title 4" class="ControlLink_Link ControlLink_Link_359">Food Lab Product Title 4</a></div></div> <div class="ControlItem ControlItem_359"><div class="ControlLink ControlLink_359"><a href="http://demo.cmsyou.com/blacken/index.php?m=content&c=index&a=show&catid=22&id=2" title="Swimming pool heat pump" class="ControlLink_Link ControlLink_Link_359">Swimming pool heat pump</a></div></div> <div id="ctl27_dvControlFooter" class="ControlFooter ControlFooter_359"></div> </div> <div id="ctl28_dvControlHeader" class="ControlHeader ControlHeader_528"></div> </div> </aside> <section class="LayoutContent"> <div class="LayoutContentInner"> <span id="lblCategoryTrail" class="CategoryCategoryTrail"> <a href="<?php echo siteurl($siteid);?>">Home</a> > Search </span> <br><br> <div><span id="lblCategoryHeader" class="CategoryCategoryHeader"></span></div> <div id="dvWrapControl2250" style="clear: both;"> <div id="ctl45_dvControl" class="Control ProductDisplay Control_2250"> <div class="prolist"> <div class="l"> <div class="jg"> <div class="sr_head"> <div class="l" id="search"> <?php $j=0?> <?php $n=1;if(is_array($search_model)) foreach($search_model AS $k=>$v) { ?> <?php $j++;?> <a href="javascript:;" onclick="setmodel(<?php echo $v['typeid'];?>, $(this));" <?php if($j==1 && $typeid=$v['typeid']) { ?> class="on" <?php } ?>><?php echo $v['name'];?></a><?php if($j != count($search_model)) { ?> - <?php } ?> <?php $n++;}unset($n); ?>