当前位置: 首页>>代码示例>>PHP>>正文


PHP Uri::has方法代码示例

本文整理汇总了PHP中Uri::has方法的典型用法代码示例。如果您正苦于以下问题:PHP Uri::has方法的具体用法?PHP Uri::has怎么用?PHP Uri::has使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Uri的用法示例。


在下文中一共展示了Uri::has方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: index

 public function index()
 {
     $post = array('alert' => '');
     Model::load('admincp/comments');
     if ($match = Uri::match('\\/comments\\/(\\w+)')) {
         if (method_exists("controlComments", $match[1])) {
             $method = $match[1];
             $this->{$method}();
             die;
         }
     }
     $curPage = 0;
     if ($match = Uri::match('\\/page\\/(\\d+)')) {
         $curPage = $match[1];
     }
     if (Request::has('btnAction')) {
         actionProcess();
     }
     if (Request::has('btnSearch')) {
         filterProcess();
     } else {
         $post['pages'] = Misc::genSmallPage('admincp/comments', $curPage);
         $filterPending = '';
         if (Uri::has('\\/status\\/pending')) {
             $filterPending = " AND c.status='0' ";
         }
         $post['theList'] = Comments::get(array('limitShow' => 20, 'limitPage' => $curPage, 'query' => "select c.*,p.title from " . Database::getPrefix() . "post p," . Database::getPrefix() . "comments c where c.postid=p.postid order by c.commentid desc", 'cacheTime' => 1));
     }
     System::setTitle('Comments list - ' . ADMINCP_TITLE);
     View::make('admincp/head');
     self::makeContents('commentsList', $post);
     View::make('admincp/footer');
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:33,代码来源:controlComments.php

示例2: index

 public function index()
 {
     if ($match = Uri::match('\\/jsonCategory')) {
         $keyword = String::encode(Request::get('keyword', ''));
         $loadData = Categories::get(array('where' => "where title LIKE '%{$keyword}%'", 'orderby' => 'order by title asc'));
         $total = count($loadData);
         $li = '';
         for ($i = 0; $i < $total; $i++) {
             $li .= '<li><span data-method="category" data-id="' . $loadData[$i]['catid'] . '" >' . $loadData[$i]['title'] . '</span></li>';
         }
         echo $li;
         die;
     }
     $post = array('alert' => '');
     Model::load('admincp/post');
     if ($match = Uri::match('\\/post\\/(\\w+)')) {
         if (method_exists("controlPost", $match[1])) {
             $method = $match[1];
             $this->{$method}();
             die;
         }
     }
     $curPage = 0;
     if ($match = Uri::match('\\/page\\/(\\d+)')) {
         $curPage = $match[1];
     }
     if (Request::has('btnAction')) {
         actionProcess();
     }
     if (Request::has('btnSearch')) {
         filterProcess();
     } else {
         $post['pages'] = Misc::genSmallPage('admincp/post', $curPage);
         $filterPending = '';
         if (Uri::has('\\/status\\/pending')) {
             $filterPending = " WHERE p.status='0' ";
         }
         $post['theList'] = Post::get(array('limitShow' => 20, 'limitPage' => $curPage, 'query' => "select p.*,u.username,c.title as cattitle from " . Database::getPrefix() . "post p left join users u on p.userid=u.userid join " . Database::getPrefix() . "categories c on p.catid=c.catid {$filterPending} order by p.postid desc", 'cache' => 'no'));
     }
     System::setTitle('Post list - ' . ADMINCP_TITLE);
     View::make('admincp/head');
     self::makeContents('postList', $post);
     View::make('admincp/footer');
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:44,代码来源:controlPost.php

示例3:

    			</div>

				<div class="col-lg-12 text-right">
					<?php 
echo $pages;
?>
				</div>    			
    		</div>
    		<!-- row -->
    	</form>
    	</div>
    	<div class="col-lg-4">
        

        <?php 
if (!Uri::has('\\/edit\\/\\d+')) {
    ?>
    		<div class="divAddnew">
            <form action="" method="post" enctype="multipart/form-data"> 
            <?php 
    echo $alert;
    ?>
	     		<h4>Add new</h4>
	    		<p>
	    			<label><strong>Title</strong></label>
	    			<input type="text" class="form-control" name="send[title]" placeholder="Title" id="txtTitle" />
	    		</p>
                <p>
                    <label><strong>Thumbnail</strong></label>
                    <input type="file" class="form-control" name="image" />
                </p>     
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:31,代码来源:manufacturersList.php

示例4: array

<?php

if (!Uri::has('^page\\-\\d+\\-.*?\\.html')) {
    Redirect::to('404page');
}
$pageName = 'page';
$pageData = array();
$pageData['content_top'] = Render::content_top($pageName);
$pageData['content_left'] = Render::content_left($pageName);
$pageData['content_right'] = Render::content_right($pageName);
$pageData['content_bottom'] = Render::content_bottom($pageName);
$headData = GlobalCMS::$setting;
Theme::model('page');
$pageData['alert'] = '';
$pageData = pageProcess($pageData);
if (isset($pageData['keywords'])) {
    $headData['keywords'] = $pageData['keywords'];
}
$headData['title'] = $pageData['title'];
if ($pageData['page_type'] == 'fullwidth') {
    $pageName = 'pageFullWidth';
}
Theme::view('head', $headData);
Theme::view($pageName, $pageData);
Theme::view('footer');
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:25,代码来源:page.php


注:本文中的Uri::has方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。