• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP AZLib类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Run

 static function Run()
 {
     AZLib::CheckDir(PAGE_CACHE_DIR);
     if (isset($_REQUEST['page'])) {
         if ($_REQUEST['page'] == "home") {
             Url::redirect_url(WEB_DIR, 301);
         }
         $page_name = strtolower($_REQUEST['page']);
     } else {
         $page_name = 'home';
     }
     AZNet::$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(AZNet::$page_cache_file)) {
         require_once AZNet::$page_cache_file;
     } else {
         $re = DB::query('SELECT id, name, title, layout  FROM page WHERE name="' . addslashes($page_name) . '"', __LINE__ . __FILE__);
         if ($re) {
             AZNet::$page = mysql_fetch_assoc($re);
         }
         if (!AZNet::$page) {
             Url::redirect_url(WEB_DIR, 301);
         }
         AZGen::PageGenerate();
     }
 }
开发者ID:duynhan07,项目名称:elink,代码行数:28,代码来源:AZNet.php


示例2: on_submit

 function on_submit()
 {
     $user_name = AZLib::getParam('user_name');
     $content = AZLib::getParam('content');
     $active = (int) Url::get('active');
     $expire = (int) Url::get('expire', 7);
     $id = (int) Url::get('id');
     $cmd = Url::get('cmd');
     $sql = "SELECT id FROM user WHERE user_name='{$user_name}'";
     $row = DB::fetch($sql);
     $user_id = (int) $row["id"];
     if (!$user_id) {
         $this->setFormError('user_name', 'Không tồn tại thành viên này!');
     } elseif (!$user_name || !$content) {
         $this->setFormError('content', 'Dữ liệu không hợp lệ!');
     } else {
         if ($cmd == "add") {
             $item_array = array('content' => $content, 'user_name' => $user_name, 'user_id' => $user_id, 'admin_add' => User::user_name(), 'active' => $active, 'time_add' => TIME_NOW, 'expire_date' => TIME_NOW + 86400 * $expire);
             DB::insert('admin_notice_user', $item_array);
         } elseif ($cmd == "edit" && $id) {
             $item_array = array('content' => $content, 'user_name' => $user_name, 'user_id' => $user_id, 'admin_edit' => User::user_name(), 'active' => $active, 'time_edit' => TIME_NOW, 'expire_date' => TIME_NOW + 86400 * $expire);
             DB::update_id('admin_notice_user', $item_array, $id);
         }
         User::getAdminNoticeUser($user_id, 0, 1);
         Url::redirect_current(array('act'));
     }
 }
开发者ID:duynhan07,项目名称:elink,代码行数:27,代码来源:EditAdminNoticeUser.php


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


示例4: 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();
 }
开发者ID:duynhan07,项目名称:elink,代码行数:27,代码来源:FeedbackReply.php


示例5: draw

 function draw()
 {
     global $display;
     $cat_newss = array();
     $display->add('is_admin', User::have_permit(ADMIN_NEWS));
     $display->add('url_home', WEB_DIR);
     $display->add('time_now', News::displayTime());
     $display->add('cat_name', $this->news_cat['name']);
     $display->add('cat_url', URL::build('news_list', array('news_catid' => $this->news_cat['id'], 'azname' => AZLib::safe_title($this->news_cat['name']))));
     $condition = ' status=1 ';
     $total = DB::count("news", $condition);
     $limit = '';
     //$pagging	= AZPagging::paging_list($limit,20,'page_no');
     $pagging = AZPagging::paging_list($limit, $total, 20);
     $re = DB::query('SELECT * FROM news WHERE ' . $condition . ' ORDER BY id DESC' . $limit);
     if ($re) {
         while ($news = mysql_fetch_assoc($re)) {
             $news['title'] = stripslashes($news['title']);
             $news['brief'] = stripslashes($news['brief']);
             $news['url'] = Url::build('news_detail', array('news_catid' => $news['news_catid'], 'news_id' => $news['id'], 'azname' => AZLib::safe_title($news['title'])));
             if ($news['image']) {
                 $news['image'] = AZLib::getImageThumb($news['image'], 150, 0, 0, $news['img_server']);
             }
             $news['news_h'] = date('H:i', $news['time_created']);
             $news['news_d'] = date('d-m-Y', $news['time_created']);
             $news['admin_link'] = News::admin_link($news);
             $cat_newss[$news['id']] = $news;
         }
     }
     $display->add('pagging', $pagging);
     $display->add('cat_newss', $cat_newss);
     $display->output("NewsPage");
 }
开发者ID:duynhan07,项目名称:elink,代码行数:33,代码来源:NewsPage.php


示例6: 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();
 }
开发者ID:duynhan07,项目名称:elink,代码行数:31,代码来源:list.php


示例7: piclens_gallery

 function piclens_gallery()
 {
     $item_id = AZLib::getParam('item_id');
     $entry = '';
     if ($item_id) {
         $sql = 'select id, img_url, title, position from item_image where item_id = ' . intval($item_id) . ' ORDER BY position ';
         DB::query($sql);
         if (DB::num_rows()) {
             $entry = '';
             while ($rows = DB::fetch_row()) {
                 $rows['title'] = $rows['title'] ? $rows['title'] : "Image {$rows['position']}";
                 $rows['title'] = trim(XMLLib::_xml_encode_attribute($rows['title']));
                 if (ereg('/', $rows['img_url'])) {
                     $url = trim(XMLLib::_xml_encode_attribute("http://" . IMAGE_PATH . "{$rows['img_url']}"));
                 } else {
                     $url = trim(XMLLib::_xml_encode_attribute("http://" . IMAGE_PATH . "uploaded/items/{$rows['img_url']}"));
                 }
                 $entry .= "\r\n\t\t \t \t<item>\r\n\t\t \t \t\t\t<title>" . stripslashes($rows['title']) . "</title>\r\n\t\t\t\t\t\t<link>{$url}</link>\r\n\t\t\t\t\t\t<guid>Image {$rows['position']}</guid>\r\n\t\t\t\t\t\t<media:thumbnail url=\"{$url}\" />\r\n\t\t\t\t\t\t<media:content url=\"{$url}\" />\r\n\t\t\t\t</item>\r\n\t\t \t \t";
             }
             @header("Content-type: text/xml");
             echo "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\r\n\t\t\t <rss version=\"2.0\" xmlns:media=\"http://search.yahoo.com/mrss\">\r\n\t\t\t <channel>\t\t\t\r\n\t\t\t <title>Enbac.com</title>\r\n\t\t\t <link>http://www.enbac.com/</link>\r\n\t\t\t <description>Enbac.com - </description>\r\n\t\t\t <logo url=\"style/images/logo.piclens.png\" />\r\n\t\t\t";
             echo $entry;
             echo "\r\n\t\t \t </channel>\r\n\t\t\t </rss>\r\n\t\t\t";
         } else {
             die("no_info");
         }
     } else {
         die("no_info");
     }
 }
开发者ID:duynhan07,项目名称:elink,代码行数:30,代码来源:xml_item.xml.php


示例8: draw

 function draw()
 {
     global $display;
     $news_ids = '';
     $hot_newss = array();
     $configs = @CGlobal::$configs['NewsHomeHot']['conf_val'];
     if ($configs) {
         $configs = unserialize(stripslashes($configs));
         $title_news = $configs['title'];
         $news_ids = $configs['news_ids'];
     } else {
         $title_news = "TIN HOT";
         $news_ids = '';
     }
     if ($news_ids != '') {
         $re = DB::query("SELECT id, title, news_catid FROM news WHERE id IN({$news_ids}) AND status = 1 ORDER BY find_in_set(id,'{$news_ids}')");
         if ($re) {
             while ($news = mysql_fetch_assoc($re)) {
                 $news['title'] = stripslashes($news['title']);
                 $news['url'] = Url::build('news_detail', array('news_catid' => $news['news_catid'], 'news_id' => $news['id'], 'azname' => AZLib::safe_title($news['title'])));
                 $hot_newss[$news['id']] = $news;
             }
         }
     }
     if (User::is_admin()) {
         $display->add("is_admin", 1);
         $display->add("msg", $this->showFormErrorMessages(1));
         $display->add('begin_form', $this->beginForm(true, 'post', false, false, 1));
         $display->add('end_form', $this->endForm(true));
     }
     $display->add('title_news', $title_news);
     $display->add('news_ids', $news_ids);
     $display->add('hot_newss', $hot_newss);
     $display->output("NewsHomeHot");
 }
开发者ID:duynhan07,项目名称:elink,代码行数:35,代码来源:NewsHomeHot.php


示例9: ListItem

 function ListItem($row)
 {
     Module::Module($row);
     CGlobal::$website_title = AZLib::titlePath(CGlobal::$curCategory);
     require_once 'forms/ListItem.php';
     $this->add_form(new ListItemForm());
 }
开发者ID:duynhan07,项目名称:elink,代码行数:7,代码来源:class.php


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


示例11: FilterMenuSearch

 function FilterMenuSearch($row)
 {
     Module::Module($row);
     AZLib::getFilters();
     require_once 'forms/FilterMenuSearch.php';
     $this->add_form(new FilterMenuSearchForm());
 }
开发者ID:duynhan07,项目名称:elink,代码行数:7,代码来源:class.php


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


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


示例14: check_login

 function check_login()
 {
     if (!User::is_login()) {
         AZLib::check_uri();
         Url::redirect_url('?page=sign_in&href=' . base64_encode(CGlobal::$query_string));
     }
 }
开发者ID:duynhan07,项目名称:elink,代码行数:7,代码来源:class.php


示例15: draw

 function draw()
 {
     global $display;
     $cmd = Url::get('cmd');
     if ($cmd == 'update') {
         AZMemcache::do_put("prhot_ver:", 0);
         Url::redirect_current();
     }
     $this->beginForm();
     $list_cat = array(999999999 => 'Mặc định', 0 => 'Trang chủ');
     $list_cat += AZLib::getTopCats();
     $item = DB::fetch_all('SELECT item_id,status,product_hot_cat_id,end_time,start_time FROM product_hot');
     $items_tmp = array();
     foreach ($item as $values) {
         if (isset($list_cat[$values['product_hot_cat_id']])) {
             $items_tmp[$values['product_hot_cat_id']]['cat_name'] = $list_cat[$values['product_hot_cat_id']];
             if ($values['status'] == 1) {
                 $items_tmp[$values['product_hot_cat_id']]['item_vip'][$values['item_id']]['cat_id'] = $values['product_hot_cat_id'];
                 $items_tmp[$values['product_hot_cat_id']]['item_vip'][$values['item_id']]['start_time'] = date("d/m/Y", $values['start_time']);
                 $items_tmp[$values['product_hot_cat_id']]['item_vip'][$values['item_id']]['end_time'] = date("d/m/Y", $values['end_time']);
             } else {
                 $items_tmp[$values['product_hot_cat_id']]['item'][$values['item_id']] = $values['product_hot_cat_id'];
             }
         }
     }
     $items = array();
     foreach ($list_cat as $key => $values) {
         if (isset($items_tmp[$key])) {
             $items[$key] = $items_tmp[$key];
         }
     }
     $display->add('items', $items);
     $display->output('ManageProductHot');
     $this->endForm();
 }
开发者ID:duynhan07,项目名称:elink,代码行数:35,代码来源:ManageProductHot.php


示例16: 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");
 }
开发者ID:duynhan07,项目名称:elink,代码行数:35,代码来源:NewsAdminCats.php


示例17: draw

 function draw()
 {
     global $display;
     if (User::id() != 0) {
         if (User::$current->data["avatar_url"] != "") {
             $avatar = '<img src="' . AZLib::getImageThumb(User::$current->data["avatar_url"], 100, 100, 0, User::$current->data["img_server"]) . '" />';
         } else {
             $avatar = '<img src="style/images/no_avatar_item.gif" width="94" height="94"/>';
         }
         $display->add('avatar', $avatar);
         $display->add('user_name', User::$current->data["user_name"]);
         $display->add('get_cmd', Url::get('cmd'));
         $display->add('get_action', Url::get('action'));
         $display->add('get_page', Url::get('page'));
         $display->add('get_page', AZNet::$page['name']);
         $display->add('get_cmd', Url::get('cmd'));
         $display->add('user_name', User::user_name());
         $display->add('can_edit_blast', User::is_admin() || !User::is_block());
         $blast = User::$current->data['blast'];
         $avatar_link = '';
         $avatar_url = 'style/images/no_avatar_item.gif';
         if (User::$current->data['avatar_url'] != '') {
             $avatar_link = "http://" . CGlobal::$img_server[User::$current->data['img_server']] . User::$current->data['avatar_url'];
             $avatar_url = AZLib::getImageThumb(User::$current->data['avatar_url'], 80, 80, 0, User::$current->data['img_server']);
         }
         if ($blast == '') {
             $blast = '...';
         } else {
             $blast = ' ' . $blast;
             if (strpos($blast, 'http://')) {
                 $user_blast = $blast;
                 while (strpos($user_blast, 'http://')) {
                     $tmp = substr($user_blast, strpos($user_blast, 'http://'));
                     if (strpos($tmp, ' ') || strpos($tmp, '<')) {
                         if (strpos($tmp, ' ') && strpos($tmp, '<') && strpos($tmp, ' ') > strpos($tmp, '<')) {
                             $blast_url = substr($tmp, 0, strpos($tmp, '<'));
                         } else {
                             $blast_url = substr($tmp, 0, strpos($tmp, ' '));
                         }
                     } else {
                         $blast_url = $tmp;
                     }
                     $user_blast = str_replace($blast_url, '', $user_blast);
                 }
                 $new_blast_url = ' <a rel="nofollow" href="' . $blast_url . '" target="_blank">Click here</a>';
                 $blast = substr($user_blast . $new_blast_url, 1);
             }
         }
         $display->add('avatar_link', $avatar_link);
         $display->add('avatar_url', $avatar_url);
         $display->add('blast', $blast);
         $display->add('user_id', User::id());
         $TopMenu = $display->output('TopMenu', true, 'Personal');
         $display->add('TopMenu', $TopMenu);
         $display->output('change_pass', false, 'Personal');
     } else {
         Url::redirect('home');
     }
 }
开发者ID:duynhan07,项目名称:elink,代码行数:59,代码来源:ChangePassword.php


示例18: 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();
 }
开发者ID:duynhan07,项目名称:elink,代码行数:59,代码来源:CartAdmin.php


示例19: draw

 function draw()
 {
     $this->beginForm();
     global $display;
     $user_id = intval(Url::get('user_id'));
     $user_info = DB::select('user', 'id="' . $user_id . '"');
     $display->add('created_time_from', Url::get('created_time_from'));
     $display->add('created_time_to', Url::get('created_time_to'));
     //search theo ngay thang nam
     $created_time_from = 0;
     $created_time_to = 0;
     if (Url::get('created_time_from')) {
         $date_arr = explode('-', Url::get('created_time_from'));
         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 (Url::get('created_time_to')) {
         $date_arr = explode('-', Url::get('created_time_to'));
         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]);
         }
     }
     $search_value = ' 1 ';
     if ($created_time_from) {
         $search_value .= ' AND created_time >= ' . $created_time_from;
     }
     if ($created_time_to) {
         $search_value .= ' AND created_time <= ' . $created_time_to;
     }
     $item_per_page = 50;
     $sql_count = 'SELECT COUNT(id) AS total_item FROM item WHERE user_id = "' . $user_id . '" AND ' . $search_value;
     $total = DB::fetch($sql_count, 'total_item', 0);
     $items = array();
     if ($total) {
         $limit = '';
         $paging = AZPagging::pagingSE($limit, $total, $item_per_page, 10, 'page_no', true, 'Sản phẩm', 'Trang');
         $sql = 'SELECT * FROM item WHERE user_id = "' . $user_id . '" AND ' . $search_value . ' ORDER BY modify_time  DESC ' . $limit;
         $result = DB::query($sql);
         if ($result) {
             while ($row = mysql_fetch_assoc($result)) {
                 $row['ebname'] = AZLib::safe_title($row['name']);
                 $row['modify_time'] = date('d/m/y H:i', $row['modify_time']);
                 $row['created_time'] = date('d/m/y H:i', $row['created_time']);
                 $row['del_link'] = Url::build_all(array('chk_id', 'del_all', 'cmd', 'id', 'lock_die_all', 'hd_ac'), 'cmd=delete&id=' . $row['id'] . '&user_id=' . $row['user_id']);
                 $items[$row['id']] = $row;
             }
         }
     } else {
         $paging = '';
     }
     $display->add('user_info', $user_info);
     $display->add('total_item', $total);
     $display->add('items', $items);
     $display->add('paging', $paging);
     $display->output('item_list');
     $this->endForm();
 }
开发者ID:duynhan07,项目名称:elink,代码行数:58,代码来源:item_list.php


示例20: draw

 function draw()
 {
     global $display;
     $this->beginForm();
     $user = $this->user;
     if ($user['show_home_phone'] == 0) {
         $user['show_home_phone'] = '';
     } else {
         $user['show_home_phone'] = '(Đã ẩn)';
     }
     if ($user['show_email'] == 0) {
         $user['show_email'] = '';
     } else {
         $user['show_email'] = '(Đã ẩn)';
     }
     if ($user['email_alert'] == 0) {
         $user['email_alert'] = '';
     } else {
         $user['email_alert'] = '(Nhận email thông báo)';
     }
     if ($user['birth_day']) {
         $arrBirtday = explode('-', $user['birth_day']);
         $user['birth_day'] = $arrBirtday['2'] . '-' . $arrBirtday['1'] . '-' . $arrBirtday['0'];
     }
     if ($user['avatar_url'] != "") {
         $user['avatar_url'] = '<img src="' . AZLib::getImageThumb($user['avatar_url'], 100, 100, 0, $user['img_server']) . '" />';
     } else {
         $user['avatar_url'] = '<img src="style/images/no_avatar_item.gif" width="94" height="94" />';
     }
     $user['create_time'] = date('d/m/y H:i', $user['create_time']);
     $user['reg_ip'] = ($user['reg_ip'] ? "RegIP: <b>{$user['reg_ip']}</b>" : '') . ($user['last_ip'] ? "LastIP: <b>{$user['last_ip']}</b>" : '');
     if ($user['block_time'] > TIME_NOW || $user['block_time'] == -1) {
         if ($user['block_time'] != -1) {
             $user['status'] = "<font color=red><b>" . date('H:i d/m/y', $user['block_time']) . '</b></font>';
         } else {
             $user['status'] = '<font color=red><b>Khóa vĩnh viễn</b></font>';
         }
     } elseif ($user['invalid_time']) {
         $user['status'] = "<font color=red><b>Đang bị kiểm duyệt</b></font>";
     } else {
         $user['status'] = "Bình thường";
     }
     $display->add('msg', $this->showFormErrorMessages(1));
     $display->add('user', $user);
     $openids = array();
     $re = DB::query("SELECT id, openid_url FROM openid WHERE user_id=" . $user['id']);
     if ($re) {
         while ($openid = mysql_fetch_assoc($re)) {
             $openid['openid'] = $openid['openid_url'];
             $openids[$openid['id']] = $openid;
         }
     }
     $display->add('openids', $openids);
     $display->add('user', $user);
     $display->output('UserDetail');
     $this->endForm();
 }
开发者ID:duynhan07,项目名称:elink,代码行数:57,代码来源:UserDetail.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP AbstractAction类代码示例发布时间:2022-05-23
下一篇:
PHP AWS_APP类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap