當前位置: 首頁>>代碼示例>>PHP>>正文


PHP siteurl函數代碼示例

本文整理匯總了PHP中siteurl函數的典型用法代碼示例。如果您正苦於以下問題:PHP siteurl函數的具體用法?PHP siteurl怎麽用?PHP siteurl使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了siteurl函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: init

	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);
		}    	        	
	}
開發者ID:panhongsheng,項目名稱:zl_cms,代碼行數:59,代碼來源:rss.php

示例2: redirectRoute

function redirectRoute($path, $params = null)
{
    if ($params) {
        $queryString = '?' . http_build_query($params);
    } else {
        $queryString = '';
    }
    header("Location: " . siteurl() . $path . $queryString);
    die;
}
開發者ID:anandrmedia,項目名稱:micronPHP,代碼行數:10,代碼來源:functions.php

示例3: init

 /**
  * 按照模型搜索
  */
 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');
 }
開發者ID:baowzh,項目名稱:fulianweb,代碼行數:50,代碼來源:tag.php

示例4: category

 /**
  * 更新欄目緩存方法
  */
 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;
 }
開發者ID:ahmatjan,項目名稱:huluphp,代碼行數:47,代碼來源:cache_api.class.php

示例5: init

 /**
  * 按照模型搜索
  */
 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');
 }
開發者ID:zhouzhouxs,項目名稱:Progect,代碼行數:45,代碼來源:tag.php

示例6: catpos_ask

/**
 * 當前路徑 
 * 返回指定欄目路徑層級
 * @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;
}
開發者ID:zhouzhouxs,項目名稱:Progect,代碼行數:27,代碼來源:global.func.php

示例7: closeParent

	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>
開發者ID:panhongsheng,項目名稱:zl_cms,代碼行數:31,代碼來源:content_page.tpl.php

示例8: published

 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');
 }
開發者ID:boylzj,項目名稱:omguitar,代碼行數:37,代碼來源:content.php

示例9: defined

<?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">
開發者ID:hxzyzz,項目名稱:ddc,代碼行數:31,代碼來源:list.php

示例10: fixDiv2

      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'));
?>
開發者ID:B2-NET,項目名稱:B2-NET-CMS,代碼行數:31,代碼來源:header.php

示例11: init


//.........這裏部分代碼省略.........
                     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}'";
                         }
                     }
開發者ID:cfhb,項目名稱:MIS,代碼行數:67,代碼來源:search.php

示例12: if

                                            <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>     
開發者ID:heqishengcai,項目名稱:phpcms,代碼行數:31,代碼來源:header_1.php

示例13: published

 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 = '{$_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 = '{$_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 = '{$_username}'";
                         $sql1 = "select * From gxw_month_products pr  WHERE " . $where;
//.........這裏部分代碼省略.........
開發者ID:shenhua4286,項目名稱:gxw,代碼行數:101,代碼來源:content.php

示例14: L

		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>
開發者ID:ahmatjan,項目名稱:huluphp,代碼行數:31,代碼來源:content_page.tpl.php

示例15: category_cache

 /**
  * 更新欄目緩存
  */
 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;
 }
開發者ID:baowzh,項目名稱:fulianweb,代碼行數:27,代碼來源:type_manage.php


注:本文中的siteurl函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。