本文整理汇总了PHP中Url::build_current方法的典型用法代码示例。如果您正苦于以下问题:PHP Url::build_current方法的具体用法?PHP Url::build_current怎么用?PHP Url::build_current使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Url
的用法示例。
在下文中一共展示了Url::build_current方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: draw
function draw()
{
global $display;
$this->beginForm();
$display->add('url_admin', Url::build_current());
$display->add('msg', $this->showFormErrorMessages(1));
if ($this->contact['name']) {
$email = stripslashes($this->contact['name']) . " ";
}
if ($this->contact['address']) {
$email .= "( " . stripslashes($this->contact['address']) . ") ";
}
$email .= '<a href="mailto:' . $this->contact['email'] . '"><font color=blue>' . $this->contact['email'] . "</font></a>";
$display->add('email', $email);
$display->add('date', date('H:i:s d/m/Y', $this->contact['time']));
$display->add('date2', AZLib::duration_time($this->contact['time']));
$display->add('content', stripslashes($this->contact['content']));
$display->add('reply_content', stripslashes(Url::get('reply_content')));
$display->add('subject', stripslashes(Url::get('subject')));
if ($this->contact['reply_content']) {
$display->add('replied_content', stripslashes($this->contact['reply_content']));
} else {
$display->add('replied_content', "Chưa có");
}
$display->output('FeedbackReply');
$this->endForm();
}
示例2: draw
function draw()
{
global $display;
$cmd = Url::get('cmd');
$display->add('id_survey', $this->public_survey['id']);
$display->add('title', stripslashes($this->public_survey['title']));
$display->add('question', stripslashes($this->public_survey['question']));
$display->add('url_edit', Url::build('admin_survey', array('cmd' => 'edit', 'id_survey' => $this->public_survey['id'])));
$opts = DB::fetch_all('SELECT * FROM `public_survey_opinion` WHERE `id_survey`=' . $this->public_survey['id']);
$i = 0;
foreach ($opts as &$opt) {
$i++;
$opt['num'] = $i;
$opt['edit'] = Url::build_current(array('id_survey' => Url::get('id_survey', 'int', 0), 'cmd' => 'edit', 'id' => $opt['id']));
$opt['del'] = Url::build_current(array('id_survey' => Url::get('id_survey', 'int', 0), 'cmd' => 'delete', 'id' => $opt['id']));
}
$display->add('opts', $opts);
if ($cmd == 'edit') {
$public_survey_opinion = DB::select('public_survey_opinion', 'id=' . Url::get('id', 0));
if ($public_survey_opinion) {
$display->add('value', $public_survey_opinion['option']);
$display->add('option_id', $public_survey_opinion['id']);
}
}
$this->beginForm();
$display->output('PublicSurveyOption');
$this->endForm();
}
示例3: 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();
}
示例4: draw
function draw()
{
global $display;
$cats = array();
$display->add('url_add', Url::build_current(array('cmd' => 'add')));
/*
$display->add('url_edit',Url::build_current(array('cmd'=>'edit','id'=>$category['id'])));
$display->add('url_del',Url::build_current(array('cmd'=>'delete','id'=>$category['id'])));
$display->add('url_sort_up',Url::build_current(array('cmd'=>'move_home','dir'=>'move_home','id'=>$category['id'])));
$display->add('url_sort_low',Url::build_current(array('cmd'=>'move_home','dir'=>'move_end','id'=>$category['id'])));
*/
$posMin = 1;
$posMax = DB::count("news_categories");
$re = DB::query('SELECT * FROM news_categories ORDER BY position, id');
if ($re) {
$index = 0;
$column = 1;
while ($row = mysql_fetch_assoc($re)) {
$row['url'] = URL::build('news_list', array('news_catid' => $row['id'], 'azname' => AZLib::safe_title($row['name'])));
$row['edit'] = Url::build_current(array('cmd' => 'edit', 'id' => $row['id']));
$row['delete'] = Url::build_current(array('cmd' => 'delete', 'id' => $row['id']));
$row['move_home'] = '<a title="Chuyển lên trên cùng" href="' . Url::build_current(array('cmd' => 'move_home', 'id' => $row['id'])) . '">Move HOME</a>';
$row['move_end'] = '<a title="Chuyển xuống dưới cùng" href="' . Url::build_current(array('cmd' => 'move_end', 'id' => $row['id'])) . '">Move END</a>';
if ($row['position'] > $posMin) {
$row['move_up'] = '<a title="Chuyển lên" href="' . Url::build_current(array('cmd' => 'move_up', 'id' => $row['id'])) . '"><img src="style/img/admin/move_up.gif"></a>';
}
if ($row['position'] < $posMax) {
$row['move_down'] = '<a title="Chuyển xuống" href="' . Url::build_current(array('cmd' => 'move_down', 'id' => $row['id'])) . '"><img src="style/img/admin/move_down.gif"></a>';
}
$cats[$row['id']] = $row;
}
}
$display->add('cats', $cats);
$display->output("NewsAdminCats");
}
示例5: draw
function draw()
{
global $display;
$this->beginForm(false, "post", false, Url::build_current());
$item_per_page = 30;
$total_row = DB::fetch('SELECT count(*) AS total_row FROM `province` limit 0,1', 'total_row', 0);
$paging = '';
$items = array();
if ($total_row) {
$limit = '';
$paging = AZPagging::pagingSE($limit, $total_row, $item_per_page, 10, 'page_no', true);
$sql = "SELECT * FROM province ORDER BY id " . $limit;
$re = DB::query($sql);
if ($re) {
while ($row = mysql_fetch_assoc($re)) {
$area = array(1 => 'Bắc', 2 => 'Trung', 3 => 'Nam');
$status = array('SHOW' => 'Hiện', 'HIDE' => '<font color=red>Ẩn</font>', 'HOME' => 'HOME');
$row['area'] = $area[$row['area']];
$row['status'] = $status[$row['status']];
$items[$row['id']] = $row;
$items[$row['id']] = $row;
}
}
}
$display->add('hover', AZLib::mouse_hover('#F7F7F7', true));
$display->add('items', $items);
$display->add('paging', $paging);
$display->add('total_row', $total_row);
$display->output('list');
$this->endForm();
}
示例6: draw
function draw()
{
global $display;
$this->beginForm();
$all_zone_cats = array();
$re = DB::query("SELECT c.id, z.zoneid, c.name , c.status FROM (SELECT zoneid, catid FROM category_zone_cat) AS z LEFT JOIN category AS c ON c.id=z.catid ORDER BY position");
if ($re) {
while ($cat = mysql_fetch_assoc($re)) {
if ($cat['status'] == 'HOME') {
$cat['name'] .= ' (HOME)';
} elseif ($cat['status'] == 'HIDE') {
$cat['name'] .= ' (HIDE)';
}
$cat['link'] = Url::build_current(array('cmd' => 'edit', 'id' => $cat['id']));
$all_zone_cats[$cat['zoneid']][$cat['id']] = $cat;
}
}
$sql = "SELECT * FROM category_zone ORDER BY position";
$re = DB::query($sql);
$items = array();
$sub_items = array();
if ($re) {
$last_id = 0;
while ($row = mysql_fetch_assoc($re)) {
if (isset($all_zone_cats[$row['id']])) {
$row['cats_total'] = count($all_zone_cats[$row['id']]);
$row['cats'] = $all_zone_cats[$row['id']];
} else {
$row['cats_total'] = 0;
$row['cats'] = array();
}
$row['edit_link'] = Url::build_current(array('mod', 'cmd' => 'edit', 'id' => $row['id']));
if ($row['status'] == 1) {
$row['status'] = '<b>Hiện</b> [ <a href="' . Url::build_current(array('mod', 'cmd' => 'hide', 'id' => $row['id'])) . '">Ẩn</a> ]';
} elseif ($row['status'] == 0) {
$row['status'] = '<b>Ẩn</b> [ <a href="' . Url::build_current(array('mod', 'cmd' => 'show', 'id' => $row['id'])) . '">Hiện</a> ]';
}
//Top cat
if (!isset($sub_items[$row['id']])) {
$sub_items[$row['id']] = array();
}
if ($last_id) {
$items[$last_id]['down'] = '<a href="' . Url::build_current(array('mod', 'cmd' => 'move_down', 'id' => $last_id)) . '"><img src="style/images/admin/down_arrow_.gif" /></a>';
$row['up'] = '<a href="' . Url::build_current(array('mod', 'cmd' => 'move_up', 'id' => $row['id'])) . '"><img src="style/images/admin/up_arrow_.gif" /></a>';
} else {
$row['up'] = '';
}
$row['down'] = '';
$items[$row['id']] = $row;
$last_id = $row['id'];
}
if ($last_id && $items[$last_id]['position'] > 1) {
$items[$last_id]['up'] = '<a href="' . Url::build_current(array('mod', 'cmd' => 'move_up', 'id' => $last_id)) . '"><img src="style/images/admin/up_arrow_.gif" /></a>';
}
}
$display->add('items', $items);
$display->add('hover', '');
$display->output('zone_list');
$this->endForm();
}
示例7: draw
function draw()
{
global $display;
$display->add('msg', $this->showFormErrorMessages(1));
$display->add("url_admin", Url::build_current());
$status_select = Url::get('status_select', 6);
//1:Chưa cập nhật; 2: Đã gửi đơn hàng ; 3: Đã TT; 4: Hủy đơn hàng; 5: Đã duyệt
$status_arr = array(6 => "--Tất cả--", 2 => "Đã gửi đơn hàng", 1 => "Chưa cập nhật", 3 => "Đã Thanh toán", 5 => "Đã duyệt", 4 => "Đã hủy");
$display->add("status_option", AZLib::getOption($status_arr, $status_select));
$date_begin = Url::get('date_begin');
$date_end = Url::get('date_end');
$display->add("date_begin", $date_begin);
$display->add("date_end", $date_end);
$created_time_from = 0;
$created_time_to = 0;
if ($date_begin) {
$date_arr = explode("-", $date_begin);
if (isset($date_arr[0]) && isset($date_arr[1]) && isset($date_arr[2])) {
$created_time_from = mktime(0, 0, 0, (int) $date_arr[1], (int) $date_arr[0], (int) $date_arr[2]);
}
}
if ($date_end) {
$date_arr = explode("-", $date_end);
if (isset($date_arr[0]) && isset($date_arr[1]) && isset($date_arr[2])) {
$created_time_to = mktime(23, 59, 59, (int) $date_arr[1], (int) $date_arr[0], (int) $date_arr[2]);
}
}
$condition = "";
if ($status_select != 6) {
$condition .= "status=" . $status_select;
}
if ($created_time_from) {
$condition .= ($condition != '' ? ' AND ' : '') . ' time_create >=' . $created_time_from;
}
if ($date_end) {
$condition .= ($condition != '' ? ' AND ' : '') . " time_create <={$created_time_to}";
}
$total = DB::count("cart", $condition);
$limit = '';
$display->add('paging', AZPagging::paging_list($limit, $total, 40, 10, 'page_no', '', true, 'Đơn hàng'));
$all_carts = array();
$re = DB::query("SELECT * FROM cart " . ($condition != '' ? 'WHERE ' : '') . $condition . " ORDER BY id DESC {$limit}");
if ($re) {
while ($Cart = mysql_fetch_assoc($re)) {
$Cart["time_create"] = date('d/m/Y H:i:s', $Cart['time_create']);
$Cart["time_change"] = date('d/m/Y H:i:s', $Cart['time_change']);
$Cart["url"] = Url::build_current(array('cmd' => 'edit', 'id' => $Cart['id']));
$Cart["status"] = $status_arr[$Cart['status']];
$Cart["delete"] = Url::build_current(array('cmd' => 'delete', 'id' => $Cart['id']));
$Cart["price"] = number_format($Cart['price'], null, null, '.');
$all_carts[$Cart['id']] = $Cart;
}
}
$display->add('all_carts', $all_carts);
$display->add('is_admin', User::is_admin());
$this->beginForm();
$display->output('CartAdmin');
$this->endForm();
}
示例8: on_submit
function on_submit()
{
$all_modules = array();
$re = DB::query('SELECT id, name FROM module ORDER BY name');
if ($re) {
while ($module = mysql_fetch_assoc($re)) {
$all_modules[strtolower($module['name'])] = $module;
}
}
$module_dirs = scandir(DIR_MODULE);
unset($module_dirs[0]);
unset($module_dirs[1]);
if ($module_dirs) {
$i = 1;
foreach ($module_dirs as $module_dir) {
if (is_dir(DIR_MODULE . $module_dir) && !isset($all_modules[strtolower($module_dir)])) {
$arr = array('name' => $module_dir);
if ($this->update) {
$id = DB::insert('module', $arr);
if ($id) {
$this->list_scan .= '<br />' . $i++ . ') <font color="blue">Đã thêm module: ' . $module_dir . '</font>';
$all_modules[strtolower($module_dir)] = array('id' => $id, 'name' => $module_dir);
}
} else {
$this->list_scan .= '<br />' . $i++ . ')<font color="blue">Thêm module: ' . $module_dir . '</font>';
}
}
}
}
if ($all_modules) {
$this->list_scan .= $this->list_scan ? '<br />' : '';
$i = 1;
foreach ($all_modules as $module) {
if (!is_dir(DIR_MODULE . $module['name'])) {
if ($this->update) {
DB::delete('block', 'module_id=' . $module['id']);
DB::delete('module', 'id=' . $module['id']);
$this->list_scan .= '<br />' . $i++ . ')<font color="red">Đã xoá module: ' . $module['name'] . '</font>';
} else {
$this->list_scan .= '<br />' . $i++ . ')<font color="red">Xoá module: ' . $module['name'] . '</font>';
}
}
}
}
$this->list_scan = $this->list_scan ? '<center><b>CÁC MODULES THAY ĐỔI</b></center>' . $this->list_scan . '<br />' : '';
if ($this->update) {
$this->list_scan .= '<br /><center><font color="green"><b>ĐÃ CẬP NHẬT XONG</b>
<br /><br /><a href="' . Url::build_current(array('cmd' => 'scan')) . '"><b>Scan tiếp</b></a></font></center><br />';
} else {
if ($this->list_scan) {
$this->list_scan .= '<br /><br /><center><input type="submit" value="Cập nhật"></center>';
} else {
$this->list_scan .= '<center><b>KHÔNG CÓ THÔNG TIN THAY ĐỔI NÀO</b></center>';
}
}
}
示例9: draw
function draw()
{
global $display;
$this->beginForm();
$sql = "SELECT COUNT(*) AS total_row FROM spam_mail";
$total = DB::fetch($sql, 'total_row', 0);
$spam_content = DB::select('spam_content', 'status=1');
$pagging = '';
$spam_emails = array();
if ($total) {
$limit = '';
$pagging = AZPagging::pagingSE($limit, $total, 50, 10, 'page_no', true);
$sql = "SELECT id, email_list, time, time_modify, spam_id, status FROM spam_mail ORDER BY id DESC {$limit}";
$re = DB::query($sql);
if ($re) {
while ($email = mysql_fetch_assoc($re)) {
if ($email['time'] != $email['time_modify']) {
$email['time'] = "<b>Tạo:</b> " . date('H\\hi d.m.Y', $email['time']);
$email['time'] .= "<br /><b>Sửa:</b> " . date('H\\hi d.m.Y', $email['time_modify']);
} else {
$email['time'] = "<b>Tạo:</b> " . date('H\\hi d.m.Y', $email['time']);
}
if ($spam_content && $spam_content['id'] == $email['spam_id']) {
$email['spam_id'] = '<font color="green">Đã spam</font>';
$email['reset'] = AZLib::button(Url::build_current(array('cmd' => 'reset_email', 'id' => $email['id'])), 'icon-reload.gif', 'Spam lại');
} else {
$email['spam_id'] = '<font color="orange">Chưa được Spam</font>';
$email['reset'] = '';
}
if ($email['status']) {
$email['status'] = '<font color="green">Có</font>';
$email['check'] = AZLib::button(Url::build_current(array('cmd' => 'deactive_email', 'id' => $email['id'])), 'admin/delete_button_dis.gif', 'Không cho phép spam');
} else {
$email['status'] = '<font color="orange">Không</font>';
$email['check'] = AZLib::button(Url::build_current(array('cmd' => 'active_email', 'id' => $email['id'])), 'admin/check.gif', 'Cho phép spam');
}
if ($email['email_list']) {
$email['email_list'] = count(explode("\n", $email['email_list']));
} else {
$email['email_list'] = 0;
}
$email['edit_link'] = Url::build_current(array('cmd' => 'edit_email', 'id' => $email['id']));
$email['del_link'] = Url::build_current(array('cmd' => 'delete_email', 'id' => $email['id']));
$spam_emails[$email['id']] = $email;
}
}
}
$display->add('check_all', AZLib::button(Url::build_current(array('cmd' => 'active_all_email')), 'admin/check.gif', 'Cho phép spam tất cả các mail'));
$display->add('check_none', AZLib::button(Url::build_current(array('cmd' => 'deactive_all_email')), 'admin/delete_button_dis.gif', 'Không phép spam tất cả các mail'));
$display->add('items', $spam_emails);
$display->add('pagging', $pagging);
$display->output('ManageEmail');
$this->endForm();
}
示例10: draw
function draw()
{
global $display;
$this->beginForm(false, 'post', false, Url::build_current(array('cmd' => 'active')));
$display->add('msg', $this->showFormErrorMessages(1));
$display->add('smsg', $this->showFormSuccesMessages(1));
$display->add('show_active', $this->show_active);
$display->add('user_name', Url::get('user_name', $this->user['user_name']));
$display->output('active');
$this->endForm();
}
示例11: draw
function draw()
{
global $display;
$InfoContent = stripslashes(@CGlobal::$configs['Info_' . AZNet::$page['name']]['conf_val']);
$display->add("url_home", WEB_DIR);
$display->add("title", AZNet::$page['title']);
$display->add("url", Url::build_current());
if (User::is_admin()) {
$display->add("edit", Url::build_current(array('cmd' => 'update_' . AZNet::$page['name'])));
}
$display->add("text", html_entity_decode($InfoContent, ENT_QUOTES, "UTF-8"));
$this->beginForm();
$display->output("InfoView");
$this->endForm();
}
示例12: draw
function draw()
{
global $display;
$display->add("url_home", WEB_DIR);
$display->add("title", AZNet::$page['title']);
$display->add("url", Url::build_current());
$content = stripslashes(Url::get('content'));
if (!$content) {
$content = stripslashes(@CGlobal::$configs["Info_" . AZNet::$page['name']]['conf_val']);
}
$display->add("msg", $this->showFormErrorMessages(1));
$display->add("content", $content);
$this->beginForm();
$display->output("InfoEdit");
$this->endForm();
}
示例13: draw
function draw()
{
global $display;
$this->beginForm();
$display->add('url_add', Url::build_current(array('cmd' => 'add')));
$current_path = "<a href='" . URL::build('news_list', array('news_catid' => $this->row['id'], 'azname' => AZLib::safe_title($this->row['name']))) . "'>" . $this->row['name'] . "</a>";
$display->add('current_cat', $current_path);
$display->add('name', Url::get('name', $this->row['name']));
$display->add('position_option', AZLib::getOptionNum(1, DB::count("news_categories"), Url::get('position', $this->row['position'])));
$display->add('public', Url::get('public', $this->row['public'] ? 1 : 2));
$display->add('keywords', Url::get('keywords', $this->row['keywords']));
$display->add('description', Url::get('description', $this->row['description']));
$display->add('msg', $this->showFormErrorMessages(1));
$display->output("NewsAdminCatsEdit");
$this->endForm();
}
示例14: draw
function draw()
{
global $display;
$item_id = intval(Url::get('id', 0));
$this->beginForm(true, 'post', false, Url::build_current(array("cmd" => "edit", "id" => $item_id)));
$item = array();
// Get Data
if ($item_id) {
$item = News::get_item($item_id);
}
$display->add('item', $item);
$display->add('error_message', $this->getErrorMessage('news/item/error'));
$display->add('success_message', $this->getSuccessMessage('news/item/success'));
$display->output('Edit');
$this->endForm();
}
示例15: draw
function draw()
{
$this->beginForm(false, 'post', false, Url::build_current());
$category_id = intval(Url::get('id', 0));
$category = array();
// Get Data
if (!empty($category_id)) {
$category = NewsCategory::get_category($category_id, true);
}
global $display;
$display->add('category', $category);
$display->add('error_message', $this->getErrorMessage('news/category/error'));
$display->add('success_message', $this->getSuccessMessage('news/category/success'));
$display->output('Edit');
$this->endForm();
}