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


PHP Module::Module方法代码示例

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


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

示例1: 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

示例2: 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

示例3: FeedbackAdmin

 function FeedbackAdmin($row)
 {
     Module::Module($row);
     CGlobal::$website_title = AZNet::$page['title'];
     if (User::is_admin()) {
         $cmd = Url::get('cmd');
         switch ($cmd) {
             case 'delete':
                 $this->add_form(new DeleteFeedBackForm());
                 break;
             case 'exam':
                 $this->add_form(new ExmamFeedBackForm());
                 break;
             case 'unexam':
                 $this->add_form(new UnexmamFeedBackForm());
                 break;
             case 'reply':
                 require_once "forms/FeedbackReply.php";
                 $this->add_form(new FeedbackReplyForm());
                 break;
             default:
                 require_once "forms/FeedbackAdmin.php";
                 $this->add_form(new FeedbackAdminForm());
                 break;
         }
     }
 }
开发者ID:duynhan07,项目名称:elink,代码行数:27,代码来源:class.php

示例4: Register

 function Register($row)
 {
     Module::Module($row);
     switch (Url::get('cmd')) {
         case 'create_image':
             require_once 'forms/create_image.php';
             break;
         case 'check_user':
             $this->check_user();
             exit;
         case 'check_email':
             $this->check_email();
             exit;
         case 'check_security_code':
             $this->check_security_code();
             exit;
         case 'check_email_format':
             $this->check_email_format();
             exit;
         default:
             require_once 'forms/register.php';
             $this->add_form(new RegisterForm());
             break;
     }
 }
开发者ID:duynhan07,项目名称:elink,代码行数:25,代码来源:class.php

示例5: ManageFilter

 function ManageFilter($row)
 {
     Module::Module($row);
     if (!class_exists('eCateElectronic')) {
         require_once ROOT_PATH . 'core/eCate.php';
     }
     if (User::have_permit(ADMIN_CATEGORY)) {
         $cmd = Url::get('cmd');
         switch ($cmd) {
             case 'add':
                 require_once 'forms/ManageFilterAdd.php';
                 $this->add_form(new ManageFilterAddForm());
                 break;
             case 'edit':
                 require_once 'forms/ManageFilterEdit.php';
                 $this->add_form(new ManageFilterEditForm());
                 break;
             case 'sync':
                 require_once 'forms/ManageFilterSync.php';
                 $this->add_form(new ManageFilterSyncForm());
                 break;
             default:
                 require_once 'forms/ManageFilter.php';
                 $this->add_form(new ManageFilterForm());
                 break;
         }
     } else {
         die('die');
     }
 }
开发者ID:hqd276,项目名称:bigs,代码行数:30,代码来源:class.php

示例6: 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

示例7: SignIn

 function SignIn($row)
 {
     Module::Module($row);
     if (User::is_login()) {
         if ($data = Session::get('user_data') and $data['home_page']) {
             Url::redirect_url($data['home_page']);
         } else {
             Url::redirect('home');
         }
     } else {
         // xoa toan bo du lieu dang co truoc khi dang nhap
         if (Session::is_set('user_id')) {
             $id = Session::get('user_id');
             DB::update('account', array('last_online_time' => time()), 'id=\'' . $id . '\'');
             setcookie('user_id', "", time() - 3600);
             Session::destroy('user_id');
         }
         //if(URL::get("m")== "mobile"){
         //	require_once 'forms/mlogin.php';
         //	$this->add_form(new SignInmForm);
         //}else{
         require_once 'forms/sign_in.php';
         $this->add_form(new SignInForm());
         //}
     }
 }
开发者ID:nguyenxuantung,项目名称:Website_Quan_Ly_Nha_Hang,代码行数:26,代码来源:class.php

示例8: 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

示例9: 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

示例10: 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

示例11: 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

示例12: RegisterSuccess

 function RegisterSuccess($row)
 {
     Module::Module($row);
     switch (Url::get('cmd')) {
         case 'notify':
             //Thông báo kích hoạt tài khoản (nếu bật chế độ cần kích hoạt - USER_ACTIVE_ON = true )
             if (!User::is_login() && USER_ACTIVE_ON) {
                 require_once 'forms/notify.php';
                 $this->add_form(new NotifyForm());
             } else {
                 Url::redirect_current();
             }
             break;
         case 'active':
             //Kích hoạt tài khoản
             if (!User::is_login() && USER_ACTIVE_ON) {
                 require_once 'forms/active.php';
                 $this->add_form(new ActiveForm());
             } else {
                 Url::redirect('profile', array('user_id' => User::id(), 'user_name' => User::user_name()));
             }
             break;
         case 'activated':
         default:
             require_once 'forms/register_success.php';
             $this->add_form(new RegisterSuccessForm());
             break;
     }
 }
开发者ID:duynhan07,项目名称:elink,代码行数:29,代码来源:class.php

示例13: 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

示例14: 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

示例15: __construct

 function __construct($row)
 {
     Module::Module($row);
     CGlobal::$adminRegion = FALSE;
     require_once 'forms/list.php';
     $this->add_form(new SeoForm());
 }
开发者ID:hqd276,项目名称:bigs,代码行数:7,代码来源:class.php


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