當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Tpl::flexigridXML方法代碼示例

本文整理匯總了PHP中Tpl::flexigridXML方法的典型用法代碼示例。如果您正苦於以下問題:PHP Tpl::flexigridXML方法的具體用法?PHP Tpl::flexigridXML怎麽用?PHP Tpl::flexigridXML使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Tpl的用法示例。


在下文中一共展示了Tpl::flexigridXML方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: get_channel_xmlOp

 /**
  * 輸出頻道列表XML數據
  */
 public function get_channel_xmlOp()
 {
     $model_channel = Model('web_channel');
     $model_web_config = Model('web_con');
     $style_array = $model_web_config->getStyleList();
     //板塊樣式數組
     $page = intval($_POST['rp']);
     if ($page < 1) {
         $page = 15;
     }
     $condition = array();
     if ($_POST['qtype'] == 'channel_name') {
         $condition[$_POST['qtype']] = array('like', '%' . trim($_POST['query']) . '%');
     }
     $list = $model_channel->getChannelList($condition, $page);
     $out_list = array();
     if (!empty($list) && is_array($list)) {
         $fields_array = array('channel_name', 'channel_style', 'gc_name', 'channel_show');
         foreach ($list as $k => $v) {
             $out_array = getFlexigridArray(array(), $fields_array, $v, $format_array = '');
             $out_array['channel_style'] = $style_array[$v['channel_style']];
             if ($v['gc_id'] == 0) {
                 $out_array['gc_name'] = '無';
             }
             if ($v['channel_show'] == 1) {
                 $out_array['channel_show'] = '<span class="yes"><i class="fa fa-check-circle"></i>是</span>';
             } else {
                 $out_array['channel_show'] = '<span class="no"><i class="fa fa-ban"></i>否</span>';
             }
             $operation = '';
             if ($v['channel_show'] == 1) {
                 $operation .= '<a class="btn green" href="' . uk86_urlShop('channel', 'index', array('id' => $v['channel_id'])) . '" target="_blank"><i class="fa fa-list-alt"></i>查看</a>';
             } else {
                 $operation .= '<a class="btn red" href="javascript:fg_operation_del(' . $v['channel_id'] . ');"><i class="fa fa-trash-o"></i>刪除</a>';
             }
             $operation .= '<span class="btn"><em><i class="fa fa-cog"></i>設置<i class="arrow"></i></em><ul>';
             $operation .= '<li><a href="index.php?act=web_channel&op=edit_channel&channel_id=' . $v['channel_id'] . '">基本設置</a></li>';
             $operation .= '<li><a href="index.php?act=web_channel&op=set_channel&channel_id=' . $v['channel_id'] . '">編輯模塊</a></li>';
             $operation .= '</ul></span>';
             $out_array['operation'] = $operation;
             $out_list[$v['channel_id']] = $out_array;
         }
     }
     $data = array();
     $data['now_page'] = $model_channel->gettotalpage();
     $data['total_num'] = $model_channel->gettotalnum();
     $data['list'] = $out_list;
     echo Tpl::flexigridXML($data);
     exit;
 }
開發者ID:wangjiang988,項目名稱:ukshop,代碼行數:53,代碼來源:web_channel.php


注:本文中的Tpl::flexigridXML方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。