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


PHP Url::access_denied方法代码示例

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


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

示例1: AdminNewsCategory

 function AdminNewsCategory($row)
 {
     Module::Module($row);
     if (User::is_admin()) {
         $cmd = Url::get('cmd');
         switch ($cmd) {
             case "edit":
             case "add_category":
                 require_once 'forms/detail.php';
                 $this->add_form(new AdminNewsCategoryDetail());
                 break;
             case "delete":
                 $id = Url::get('id');
                 if (!is_numeric($id)) {
                     Url::redirect('admin_news_category');
                     return;
                 }
                 DB::delete_id('news_category', $id);
                 eb_memcache::do_remove('news_category/all');
                 eb_memcache::do_remove('news_category:' . $id);
                 Url::redirect('admin_news_category');
                 break;
             default:
                 require_once 'forms/list.php';
                 $this->add_form(new AdminNewsCategoryForm());
                 break;
         }
     } else {
         Url::access_denied();
     }
 }
开发者ID:hqd276,项目名称:bigs,代码行数:31,代码来源:class.php

示例2: ManageSupport

 function ManageSupport($row)
 {
     Module::Module($row);
     if (User::is_admin() || User::have_permit(support_all_perm)) {
         CGlobal::$website_title = 'Quản lý thư góp ý của khách hàng';
         switch (Url::get('cmd')) {
             case 'delete':
                 DB::query('DELETE FROM support WHERE id=' . EClassApi::getParam('id'));
                 Url::redirect_url(Url::build_all(array('chk_id', 'del_all', 'cmd', 'id')));
                 break;
             case "edit":
                 /*case "add":
                 		require_once 'forms/edit.php';		
                 		$this->add_form(new EditBadWordForm());
                 		break;*/
             /*case "add":
             		require_once 'forms/edit.php';		
             		$this->add_form(new EditBadWordForm());
             		break;*/
             default:
                 require_once 'forms/list.php';
                 $this->add_form(new ManageSupportForm());
                 break;
         }
     } else {
         Url::access_denied();
     }
 }
开发者ID:hqd276,项目名称:bigs,代码行数:28,代码来源:class.php

示例3: DocumentAdmin

 function DocumentAdmin($row)
 {
     Module::Module($row);
     if (User::is_admin()) {
         $cmd = Url::get('cmd');
         require_once "forms/DocumentAdmin.php";
         switch ($cmd) {
             case 'delete':
                 $this->add_form(new Deletedocument());
                 break;
             case 'change':
                 $this->add_form(new PublicdocumentForm());
                 break;
             case 'add':
                 $this->add_form(new AddDocumentForm());
                 break;
             case 'edit':
                 $this->add_form(new EditDocumentForm());
                 break;
             default:
                 $this->add_form(new ListdocumentForm());
                 break;
         }
     } else {
         Url::access_denied();
     }
 }
开发者ID:duynhan07,项目名称:elink,代码行数:27,代码来源:class.php

示例4: AdminNews

 function AdminNews($row)
 {
     Module::Module($row);
     if (User::is_admin()) {
         $cmd = Url::get('cmd');
         switch ($cmd) {
             case "edit":
             case "add_item":
                 require_once 'forms/detail.php';
                 $this->add_form(new AdminNewsDetail());
                 break;
             case "delete":
                 $url = urldecode(Url::get('url'));
                 $id = Url::get('id');
                 if (!is_numeric($id)) {
                     Url::redirect('admin_news_item');
                     return;
                 }
                 DB::delete_id('news_item', $id);
                 eb_memcache::do_remove('news_item:' . $id);
                 Url::redirect_url($url);
                 break;
             default:
                 require_once 'forms/list.php';
                 $this->add_form(new AdminNewsForm());
                 break;
         }
     } else {
         Url::access_denied();
     }
 }
开发者ID:hqd276,项目名称:bigs,代码行数:31,代码来源:class.php

示例5: NewsAdminCats

 function NewsAdminCats($row)
 {
     Module::Module($row);
     if (!User::have_permit(ADMIN_NEWS)) {
         Url::access_denied();
     }
     switch (Url::get('cmd')) {
         case 'delete':
             $this->add_form(new DeleteNewsCatForm());
             break;
         case 'move_down':
         case 'move_up':
             $this->add_form(new MoveNewsCatForm());
             break;
         case 'move_home':
         case 'move_end':
             $this->add_form(new MoveHomeNewsCatForm());
             break;
         case 'edit':
             require_once 'forms/NewsAdminCatsEdit.php';
             $this->add_form(new NewsAdminCatsEditForm());
             break;
         case 'add':
             require_once 'forms/NewsAdminCatsAdd.php';
             $this->add_form(new NewsAdminCatsAddForm());
             break;
         default:
             require_once 'forms/NewsAdminCats.php';
             $this->add_form(new NewsAdminCatsForm());
     }
 }
开发者ID:duynhan07,项目名称:elink,代码行数:31,代码来源:class.php

示例6: ImportExcel

 function ImportExcel($row)
 {
     if (User::have_permit(array(ADMIN_ITEM))) {
         Module::Module($row);
         $cmd = Url::get('cmd');
         switch ($cmd) {
             case 'download':
                 $file_src = DATA_PATH . "AzNet.xls";
                 if (file_exists(ROOT_PATH . $file_src)) {
                     $ext = AZLib::getExtension($file_src);
                     if ($ext && strlen($ext) <= 5) {
                         $ext_app = substr($ext, 1);
                         header("Content-type: application/{$ext_app}");
                         header("Content-Disposition: attachment; filename=" . date("Y.m.d-H\\hi", TIME_NOW) . "_ANS_Products{$ext}");
                         readfile(ROOT_PATH . $file_src);
                         exit;
                     }
                 }
                 header("HTTP/1.0 404 Not Found");
                 echo "<h1>404 - Not Found!<br />Return to <a href='" . WEB_ROOT . "'>" . WEB_NAME . "</a></h1>";
                 exit;
                 break;
             default:
                 require_once 'forms/ImportExcel.php';
                 $this->add_form(new ImportExcelForm());
                 break;
         }
     } else {
         Url::access_denied();
     }
 }
开发者ID:duynhan07,项目名称:elink,代码行数:31,代码来源:class.php

示例7: AdminLogs

 function AdminLogs($row)
 {
     Module::Module($row);
     if (User::is_mod() || User::have_permit('logs_all_perm')) {
         switch (Url::get('cmd')) {
             case 'list_log':
                 $id = Url::get('id', 0);
                 if (empty($id)) {
                     Url::redirect_url('admin_log.html');
                     exit;
                 }
                 require_once 'forms/ListLog.php';
                 $this->add_form(new ListLogForm());
                 break;
             case 'list_coin':
                 require_once 'forms/ListCoin.php';
                 $this->add_form(new ListCoinForm());
                 break;
             case 'extend':
                 require_once 'forms/Extend.php';
                 $this->add_form(new ExtendForm());
                 break;
             default:
                 require_once 'forms/ListLog.php';
                 $this->add_form(new ListLogForm());
                 break;
         }
     } else {
         Url::access_denied();
     }
 }
开发者ID:hqd276,项目名称:bigs,代码行数:31,代码来源:class.php

示例8: AdminUsers

 function AdminUsers($row)
 {
     Module::Module($row);
     if (User::is_admin()) {
         $cmd = Url::get('cmd');
         switch ($cmd) {
             case "edit_user":
             case "add_user":
                 require_once 'forms/detail.php';
                 $this->add_form(new AdminUserDetail());
                 break;
             case "list_users":
                 require_once 'forms/list.php';
                 $this->add_form(new AdminListUsersForm());
                 break;
             case "delete_user":
                 $id = Url::get('id');
                 if (!is_numeric($id)) {
                     Url::redirect('admin_users');
                     return;
                 }
                 break;
         }
     } else {
         Url::access_denied();
     }
 }
开发者ID:hqd276,项目名称:bigs,代码行数:27,代码来源:class.php

示例9: PostItem

 function PostItem($row)
 {
     Module::Module($row);
     if (User::is_login()) {
         if (!User::have_permit(ADMIN_ITEM) || User::is_block()) {
             Url::access_denied();
         } else {
             if (Url::get('cmd') == 'edit') {
                 if (Url::get('id')) {
                     require_once 'forms/EditItemForm.php';
                     $this->add_form(new EditItemForm());
                     return;
                 }
             }
             if (Url::get('cmd') != '') {
                 Url::redirect_current();
             }
             require_once 'forms/PostItemForm.php';
             $this->add_form(new PostItemForm());
         }
     } else {
         AZLib::check_uri();
         Url::redirect_url('?page=sign_in&href=' . base64_encode(CGlobal::$query_string));
     }
 }
开发者ID:duynhan07,项目名称:elink,代码行数:25,代码来源:class.php

示例10: AdminPromotion

 function AdminPromotion($row)
 {
     Module::Module($row);
     if (User::have_permit(ADMIN_ADV)) {
         switch (Url::get('cmd')) {
             case 'edit':
                 $promo = urldecode(Url::get('name'));
                 if ($promo && is_dir(ROOT_PATH . 'promotion/' . $promo . '/')) {
                     $this->add_form(new EditPromotionForm());
                 } else {
                     Url::redirect_current();
                 }
                 break;
             case 'delete':
                 $promo = urldecode(Url::get('name'));
                 if ($promo && is_dir(ROOT_PATH . 'promotion/' . $promo . '/')) {
                     AZLib::delDir(ROOT_PATH . 'promotion/' . $promo . '/');
                 }
                 Url::redirect_current();
                 break;
             default:
                 $this->add_form(new AdminPromotionForm());
                 break;
         }
     } else {
         Url::access_denied();
     }
 }
开发者ID:duynhan07,项目名称:elink,代码行数:28,代码来源:class.php

示例11: AdminBanner

 function AdminBanner($row)
 {
     Module::Module($row);
     if (User::is_admin()) {
         switch (Url::get('cmd')) {
             case 'remove_banner':
                 $id = Url::get('id', 0);
                 if (empty($id)) {
                     Url::redirect_url('admin_banner.html');
                     exit;
                 }
                 Banner::delete_banner($id);
                 Url::redirect_url('admin_banner.html');
                 break;
             case 'edit_banner':
                 require_once 'forms/EditBanner.php';
                 $this->add_form(new EditBannerForm());
                 break;
             case 'list_banner':
                 require_once 'forms/ListBanner.php';
                 $this->add_form(new ListBannerForm());
                 break;
             default:
                 require_once 'forms/ListBanner.php';
                 $this->add_form(new ListBannerForm());
                 break;
         }
     } else {
         Url::access_denied();
     }
 }
开发者ID:hqd276,项目名称:bigs,代码行数:31,代码来源:class.php

示例12: ManageUserLock

 function ManageUserLock($row)
 {
     CGlobal::$website_title = 'Quản lý thành viên bị khóa';
     Module::Module($row);
     if (User::have_permit(ADMIN_USER)) {
         switch (Url::get('cmd')) {
             case 'unban_nick':
                 $id = (int) Url::get('id', 0);
                 $user_id = (int) Url::get('user_id', 0);
                 if ($id) {
                     DB::update('user', array('block_time' => 0), 'id="' . $user_id . '"');
                     DB::update('user_lock', array('unlock_time' => TIME_NOW, 'unlock_user' => User::user_name()), 'id = ' . $id);
                     User::getUser($id, 0, 1);
                 }
                 Url::redirect_url(Url::build_all(array('chk_id', 'del_all', 'cmd', 'id', 'lock_die_all', 'hd_ac')));
                 break;
             default:
                 require_once 'forms/ManageUserLock.php';
                 $this->add_form(new ListUserLockForm());
                 break;
         }
     } else {
         Url::access_denied();
     }
 }
开发者ID:duynhan07,项目名称:elink,代码行数:25,代码来源:class.php

示例13: CartAdmin

 function CartAdmin($row)
 {
     Module::Module($row);
     if (User::have_permit(ADMIN_ITEM)) {
         $cmd = Url::get('cmd');
         switch ($cmd) {
             case 'delete':
                 if (User::is_admin()) {
                     $id = Url::get('id', 0);
                     if ($id) {
                         DB::delete("cart", "id={$id}");
                     }
                 }
                 Url::redirect_current();
                 break;
             case 'edit':
                 require_once 'forms/CartEdit.php';
                 $this->add_form(new CartEditForm());
                 break;
             case '':
             default:
                 require_once 'forms/CartAdmin.php';
                 $this->add_form(new CartAdminForm());
                 break;
         }
     } else {
         Url::access_denied();
     }
 }
开发者ID:duynhan07,项目名称:elink,代码行数:29,代码来源:class.php

示例14: ModuleAdmin

	function ModuleAdmin($row){
		Module::Module($row);
		
		if(User::is_root()){
			if(Url::check(array('cmd'=>'delete_cache'))){
				EClass::update_all_page();
				require_once ROOT_PATH.'includes/enbac/dir.php';
				empty_all_dir(PAGE_CACHE_DIR,true);
				Url::redirect_current();
			}
			else
			if(Url::check(array('cmd'=>'scan'))){
				require_once 'forms/scan.php';
				$this->add_form(new ScanModuleForm());
			}
			else
			{
				require_once 'forms/list.php';
				$this->add_form(new ListModuleAdminForm());
			}
		}
		else{
			Url::access_denied();
		}
	}
开发者ID:hqd276,项目名称:bigs,代码行数:25,代码来源:class.php

示例15: InfoEditForm

 function InfoEditForm()
 {
     Form::Form('InfoEditForm');
     if (!User::is_admin()) {
         Url::access_denied();
     }
     AZLib::get_config();
 }
开发者ID:duynhan07,项目名称:elink,代码行数:8,代码来源:InfoEdit.php


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