本文整理汇总了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;
}