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


PHP Url::get方法代码示例

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


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

示例1: draw

 function draw()
 {
     $this->beginForm();
     global $display;
     $item_per_page = 20;
     $sql_count = 'SELECT COUNT(*) AS total_item FROM support';
     $total = DB::fetch($sql_count, 'total_item', 0);
     $items = array();
     if ($total) {
         $limit = '';
         require_once ROOT_PATH . 'core/ECPagging.php';
         $paging = ECPagging::pagingSE($limit, $total, $item_per_page, 10, 'page_no', true, 'Tin', 'Trang');
         $sql = 'SELECT * FROM support ORDER BY id DESC ' . $limit;
         $result = DB::query($sql);
         if ($result) {
             while ($row = mysql_fetch_assoc($result)) {
                 $row['del_link'] = Url::build_all(array('chk_id', 'del_all', 'cmd', 'id', 'contents'), 'cmd=delete&id=' . $row['id']);
                 if ($row['created']) {
                     $row['created'] = date("d/m/Y", $row['created']);
                 }
                 $items[$row['id']] = $row;
             }
         }
     } else {
         $paging = '';
     }
     $display->add('items', $items);
     $display->add('contents', Url::get('contents'));
     $display->add('paging', $paging);
     $display->output('list');
     $this->endForm();
 }
开发者ID:hqd276,项目名称:bigs,代码行数:32,代码来源:list.php

示例2: on_submit

 function on_submit()
 {
     $email_list = Url::get('email_list');
     $count = 0;
     if ($email_list) {
         $arr = explode("\n", $email_list);
         $arr_tmp = array();
         $email_list = '';
         if ($arr) {
             foreach ($arr as $email) {
                 $email = str_replace(array(chr(13), chr(10)), '', stripslashes($email));
                 if (eregi("^[A-Z0-9._%-]+@[A-Z0-9._%-]+\\.[A-Z]{2,6}\$", $email) && !isset($arr_tmp[$email])) {
                     $email_list .= ($email_list ? "\n" : '') . $email;
                     $arr_tmp[$email] = 1;
                     $count++;
                 }
             }
         }
     }
     $this->email_list = array('email_list' => addslashes($email_list), 'time' => TIME_NOW, 'time_modify' => TIME_NOW);
     $this->checkFormInput('Danh sách email', 'email_list', $email_list, 'str', true, '', 1);
     if ($count > 50) {
         $this->setFormError('', "Bạn đã nhập vào {$count} email, số mail nhập vào phải <=50!");
     }
     if (!$this->errNum) {
         $id = DB::insert('spam_mail', $this->email_list);
         if ($id) {
             Url::redirect_current(array('cmd' => 'email_list'));
         } else {
             $this->setFormError('', 'Không cập nhật được CSDL!');
         }
     }
 }
开发者ID:duynhan07,项目名称:elink,代码行数:33,代码来源:AddEmail.php

示例3: draw

 function draw()
 {
     $this->beginForm();
     global $display;
     $id = (int) Url::get("id", 0);
     $cmd = Url::get("cmd");
     if ($id && $cmd == "edit") {
         $item = DB::fetch("SELECT * FROM admin_notice_user WHERE id={$id}");
         $display->add('user_name', $item['user_name']);
         $display->add('content', $item['content']);
         $expire = (int) round(($item['expire_date'] - TIME_NOW) / 86400);
         $display->add('expire', $expire);
         if ($item["expire_date"] > TIME_NOW && $item["active"]) {
             $item["active"] = 1;
         } else {
             $item["active"] = 0;
         }
         $display->add('active', $item['active']);
     } elseif ($cmd == "add") {
         $display->add('user_name', Url::get('user_name'));
         $display->add('content', Url::get('content'));
         $display->add('active', (int) Url::get('active', 1));
         $display->add('expire', Url::get('expire', 7));
     }
     $display->add('cmd', $cmd);
     $display->add('msg', $this->showFormErrorMessages(1));
     $display->output('EditAdminNoticeUser');
     $this->endForm();
 }
开发者ID:duynhan07,项目名称:elink,代码行数:29,代码来源:EditAdminNoticeUser.php

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

示例5: draw

    function draw()
    {
        $p_item_same = (int) Url::get('p_item_same', 1);
        echo '<div id="item_same_cat"><center><img id="loading_item_same_cat" style="display:none;margin:10px 0" src="style/images/loading.gif" /></center></div>
				<script>
				jQuery(document).ready(function(){
					document.getElementById("loading_item_same_cat").style.display = "";
					jQuery.ajax({
						type: "GET",
						url: "' . WEB_DIR . 'ajax.php?act=item&code=item_same_category&category_id=' . CGlobal::$curCategory . '",
						data: "p_item_same=' . $p_item_same . '&item_id=' . Item::$item['id'] . '",
						success: function(data)
						{
							if(data != "")
							{						
								document.getElementById("loading_item_same_cat").style.display = "none";
							
								document.getElementById("item_same_cat").innerHTML = data;
							}
							else
							{
								jQuery("#item_same_cat").hide();
							}			
						}						
					});
				});
		</script>';
    }
开发者ID:duynhan07,项目名称:elink,代码行数:28,代码来源:ItemSameCategory.php

示例6: ForgotPassword

 function ForgotPassword($row)
 {
     Module::Module($row);
     $user_id = (int) Url::get('id');
     if ($user_id) {
         $user = DB::fetch("SELECT user_name,email FROM user WHERE id={$user_id}");
         if ($user && md5($user['user_name'] . $user['email']) == Url::get('u')) {
             $new_password = $this->random_string();
             $user_name = $user['user_name'];
             $subject = 'Khôi phục mật khẩu thành công!';
             $messenger = file_get_contents('templates/ForgotPassword/reset_password.html');
             $message = str_replace('[[|user_name|]]', $user_name, $messenger);
             $message = str_replace('[[|password|]]', $new_password, $message);
             if (System::sendEBEmail($user['email'], $subject, $message)) {
                 DB::update('user', array('password' => User::encode_password($new_password)), "id={$user_id}");
                 Url::redirect_current(array('action' => 'reset_success'));
             } else {
                 Url::redirect_current(array('action' => 'reset_error'));
             }
         } else {
             Url::redirect('home');
         }
     }
     require_once 'forms/forgot_password.php';
     $this->add_form(new ForgotPasswordForm());
 }
开发者ID:duynhan07,项目名称:elink,代码行数:26,代码来源:class.php

示例7: draw

 function draw()
 {
     $this->beginForm();
     if (Url::get('cmd') == 'edit' && ($row = DB::select('bad_words', 'id=' . intval(AZLib::getParam('id'))))) {
         $contents = $row['contents'];
         $reason = $row['reason'];
         $exact = $row['exact'];
         if ($row['is_phone'] == 1) {
             $contents = BadWord::filter_badword_show($contents);
         }
         $is_phone = $row['is_phone'];
     } else {
         $contents = '';
         $exact = '';
         $is_phone = '';
         $reason = '';
     }
     global $display;
     $display->add('msg', $this->showFormErrorMessages());
     $display->add('contents', $contents);
     $display->add('reason', $reason);
     $display->add('exact', $exact);
     $display->add('is_phone', $is_phone);
     $display->add('cmd', Url::get('cmd'));
     $display->output('edit');
     $this->endForm();
 }
开发者ID:duynhan07,项目名称:elink,代码行数:27,代码来源:edit.php

示例8: draw

 function draw()
 {
     //xoa 1 id
     if (Url::get("act") == "del" && Url::get('id')) {
         DB::query('DELETE FROM ban_ip WHERE id=' . Url::get('id'));
         Url::redirect_url(Url::build_all(array('chk_id', 'del_all', 'act', 'id')));
     }
     global $display;
     //list
     $this->beginForm();
     $items = array();
     $sql = "SELECT * FROM ban_ip Order by id desc";
     $result = DB::query($sql);
     while ($row = mysql_fetch_assoc($result)) {
         $row['create_time'] = date('d/m - h:i', $row['create_time']);
         $items[$row['id']] = $row;
         $arr_mem_cache[$row['ip']] = $row;
     }
     // cho mang vao memcache
     AZMemcache::do_put('list_ban_ip', $arr_mem_cache);
     $display->add('items', $items);
     $display->add('items_json', json_encode($items));
     $display->output('ManageBanIp');
     $this->endForm();
 }
开发者ID:duynhan07,项目名称:elink,代码行数:25,代码来源:ManageBanIp.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: 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

示例11: draw

 function draw()
 {
     if (!User::is_admin()) {
         return;
     }
     $this->beginForm(false, 'get', false, Url::build_current());
     global $display;
     $name = trim(Url::get('user_name'));
     $request_gid = trim(Url::get('gids'));
     $cond = '';
     if ($name != '') {
         $cond .= ' AND user_name LIKE "%' . $name . '%"';
     }
     if ($request_gid != '') {
         $cond .= " AND ((gids LIKE '%|" . $request_gid . "|%') OR (gids LIKE '" . $request_gid . "|%') OR (gids LIKE '%|" . $request_gid . "') OR (gids = '" . $request_gid . "')) ";
     }
     $acc_groups = CGlobal::$group;
     //$user_permits=array();
     $all_users = array();
     //$allist_users=array();
     self::getContent($acc_groups, $all_users, $cond);
     $display->add('all_groups', json_encode($acc_groups));
     $display->add('acc_groups', $acc_groups);
     $display->add('all_users', $all_users);
     $display->add('all_users_json', json_encode($all_users));
     $display->add('name', $name);
     $display->add('request_gid', $request_gid);
     $display->output('AdminUser');
     $this->endForm();
 }
开发者ID:hqd276,项目名称:bigs,代码行数:30,代码来源:AdminUserForm.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: Run

 static function Run()
 {
     EClassApi::CheckDir(PAGE_CACHE_DIR);
     if (isset($_REQUEST['page']) && $_REQUEST['page'] != '') {
         if ($_REQUEST['page'] == "home") {
             Url::redirect_url(WEB_DIR, 301);
         }
         $page_name = strtolower($_REQUEST['page']);
     } else {
         //echo $_COOKIE['lang'];die();
         $page_name = 'home';
     }
     EClass::$page_cache_file = PAGE_CACHE_DIR . $page_name . '.php';
     if (Url::get('refresh_page') == 1) {
         self::del_page_cache($page_name);
     }
     if (Url::get('refresh_page') != 1 && PAGE_CACHE_ON && file_exists(EClass::$page_cache_file)) {
         require_once EClass::$page_cache_file;
     } else {
         $re = DB::query('SELECT id, name, title, layout  FROM page WHERE name="' . addslashes($page_name) . '"', __LINE__ . __FILE__);
         if ($re) {
             EClass::$page = mysql_fetch_assoc($re);
         }
         if (!EClass::$page) {
             Url::redirect_url(WEB_DIR, 301);
         }
         require_once ROOT_PATH . 'core/EClassGen.php';
         EClassGen::PageGenerate();
     }
 }
开发者ID:hqd276,项目名称:bigs,代码行数:30,代码来源:EClass.php

示例15: on_submit

 function on_submit()
 {
     $og_name = Url::get('og_name');
     $u_name = Url::get('u_name');
     $u_yahoo = Url::get('u_yahoo');
     $u_skype = Url::get('u_skype');
     $OnlineSupport = array();
     if ($og_name) {
         foreach ($og_name as $gid => $g_name) {
             if ($g_name != '' && isset($u_name[$gid], $u_yahoo[$gid], $u_skype[$gid])) {
                 $garray = array('name' => $g_name, 'users' => array());
                 foreach ($u_name[$gid] as $uid => $name) {
                     if ($name != '' && isset($u_yahoo[$gid][$uid], $u_skype[$gid][$uid]) && ($u_yahoo[$gid][$uid] != '' || $u_skype[$gid][$uid] != '')) {
                         $garray['users'][$uid] = array('name' => $name, 'yahoo' => $u_yahoo[$gid][$uid], 'skype' => $u_skype[$gid][$uid]);
                     }
                 }
                 if ($garray['users']) {
                     $OnlineSupport[$gid] = $garray;
                 }
             }
         }
     }
     if (isset(CGlobal::$configs['OnlineSupport'])) {
         DB::update('configs', array("conf_val" => addslashes(serialize($OnlineSupport))), "conf_key='OnlineSupport'", __FILE__ . " Dòng:" . __LINE__);
     } else {
         DB::insert('configs', array("conf_key" => 'OnlineSupport', "conf_val" => addslashes(serialize($OnlineSupport))), __FILE__ . " Dòng:" . __LINE__);
     }
     AZLib::get_config(0, 1);
     AZLib::refreshParent();
 }
开发者ID:duynhan07,项目名称:elink,代码行数:30,代码来源:OnlineSupportEdit.php


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