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


PHP AZLib::show_error_mes方法代码示例

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


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

示例1: draw


//.........这里部分代码省略.........
         if (CGlobal::$curLevel2Cat) {
             $cat_url = "c" . CGlobal::$curLevel2Cat['id'] . "/" . CGlobal::$curMainCat['ebname'] . "-" . CGlobal::$curLevel2Cat['ebname'];
             $cat_name = CGlobal::$curLevel2Cat['name'];
         } elseif (CGlobal::$curMainCat) {
             $cat_url = "c" . CGlobal::$curMainCat['id'] . "/" . CGlobal::$curMainCat['ebname'];
             $cat_name = CGlobal::$curMainCat['name'];
         }
         $display->add("cat_url", $cat_url);
         $display->add("cat_name", $cat_name);
         $display->add("cat_name", $cat_name);
         if (isset($_SERVER['REQUEST_URI'])) {
             $display->add("http_referer", $_SERVER['REQUEST_URI']);
         } else {
             $display->add("http_referer", "");
         }
         /*//if(isset($_SERVER['HTTP_REFERER']) && eregi('enbac.com/c', $_SERVER['HTTP_REFERER'])){
         		if(isset($_SERVER['HTTP_REFERER']) && eregi(WEB_ROOT.'c', $_SERVER['HTTP_REFERER'])){
         			$display->add("ref_url", $_SERVER['HTTP_REFERER']);
         		}
         		else{
         			$display->add("ref_url", $cat_url);
         		}
         		
         		//$display->add("go_back", (isset($_SERVER['HTTP_REFERER']) && eregi('enbac.com/c', $_SERVER['HTTP_REFERER'])));
         		$display->add("go_back", (isset($_SERVER['HTTP_REFERER']) && eregi(WEB_ROOT.'c', $_SERVER['HTTP_REFERER'])));*/
         ####################################################################################################################################################################################
         //Rating product
         $display->add('ranking', AZLib::getRank($item_detail, true));
         $display->add('login', (int) User::is_login());
         $display->add('rate_num', $item_detail['rate_num']);
         $display->add('_rank', number_format($item_detail['rank'], 1, '.', ','));
         $display->add('_f_rank', number_format($item_detail['f_rank'], 1, '.', ','));
         $display->add('_d_rank', number_format($item_detail['d_rank'], 1, '.', ','));
         $display->add('_u_rank', number_format($item_detail['u_rank'], 1, '.', ','));
         if ($item_detail['f_rank']) {
             $f_rank = number_format($item_detail['f_rank'], 1, '.', ',');
         } else {
             $f_rank = 0;
         }
         $display->add('f_rank_', round($item_detail['f_rank']));
         $display->add('f_rank', $f_rank);
         $display->add('f_rate_num', $item_detail['f_rate_num']);
         if (User::have_permit(ADMIN_ITEM) || User::is_login() && !DB::select("item_rating", "type=0 AND user_id=" . User::id() . " AND item_id=" . $item_detail['id'])) {
             $display->add('block_f_rank', 1);
         } else {
             $display->add('block_f_rank', 0);
         }
         if ($item_detail['d_rank']) {
             $d_rank = number_format($item_detail['d_rank'], 1, '.', ',');
         } else {
             $d_rank = 0;
         }
         $display->add('d_rank_', round($item_detail['d_rank']));
         $display->add('d_rank', $d_rank);
         $display->add('d_rate_num', $item_detail['d_rate_num']);
         if (User::have_permit(ADMIN_ITEM) || User::is_login() && !DB::select("item_rating", "type=1 AND user_id=" . User::id() . " AND item_id=" . $item_detail['id'])) {
             $display->add('block_d_rank', 1);
         } else {
             $display->add('block_d_rank', 0);
         }
         if ($item_detail['u_rank']) {
             $u_rank = number_format($item_detail['u_rank'], 1, '.', ',');
         } else {
             $u_rank = 0;
         }
         $display->add('u_rank_', round($item_detail['u_rank']));
         $display->add('u_rank', $u_rank);
         $display->add('u_rate_num', $item_detail['u_rate_num']);
         if (User::have_permit(ADMIN_ITEM) || User::is_login() && !DB::select("item_rating", "type=2 AND user_id=" . User::id() . " AND item_id=" . $item_detail['id'])) {
             $display->add('block_u_rank', 1);
         } else {
             $display->add('block_u_rank', 0);
         }
         //End Rating product
         ####################################################################################################################################################################################
         $display->output("ItemDetail");
     } else {
         $content = 'Sản phẩm này hiện không tồn tại.';
         if (Item::$item && isset(Item::$item['status']) && isset(Item::$item['category_id']) && Item::$item['category_id'] && isset(CGlobal::$allCategories[Item::$item['category_id']])) {
             $ebname = CGlobal::$allCategories[Item::$item['category_id']]['ebname'];
             $pid = CGlobal::$allCategories[Item::$item['category_id']]['parent_id'];
             if ($pid && isset(CGlobal::$allCategories[$pid])) {
                 $ebname = CGlobal::$allCategories[$pid]['ebname'] . "-" . $ebname;
                 $pid = CGlobal::$allCategories[$pid]['parent_id'];
                 if ($pid && isset(CGlobal::$allCategories[$pid])) {
                     $ebname = CGlobal::$allCategories[$pid]['ebname'] . "-" . $ebname;
                 }
             }
             //header("HTTP/1.0 404 Not Found");
             $content .= " Click <a href='" . WEB_DIR . "c" . Item::$item['category_id'] . "/{$ebname}'>vào đây</a> để xem các sản phẩm liên quan.";
         } elseif (Item::$item && isset(Item::$item['status']) && isset(Item::$item['level_1_catid']) && Item::$item['level_1_catid'] && isset(CGlobal::$allCategories[Item::$item['level_1_catid']])) {
             $ebname = CGlobal::$allCategories[Item::$item['level_1_catid']]['ebname'];
             //header("HTTP/1.0 404 Not Found");
             $content .= " Click <a href='" . WEB_DIR . "c" . Item::$item['level_1_catid'] . "/{$ebname}'>vào đây</a> để xem các sản phẩm liên quan.";
         } else {
             $content .= " Click <a href='" . WEB_DIR . "'>vào đây</a> để trở về Trang chủ.";
         }
         AZLib::show_error_mes($content);
     }
 }
开发者ID:duynhan07,项目名称:elink,代码行数:101,代码来源:ItemDetail.php


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