本文整理汇总了PHP中XTemplate::out_return方法的典型用法代码示例。如果您正苦于以下问题:PHP XTemplate::out_return方法的具体用法?PHP XTemplate::out_return怎么用?PHP XTemplate::out_return使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XTemplate
的用法示例。
在下文中一共展示了XTemplate::out_return方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
function execute()
{
$list_form = new XTemplate('Home/List.html');
$left_menu = $this->rmenu();
$uId = get_userid();
$infoArr = $this->fnc_get_user_info($type_id = 1, $value = $uId, $html = true);
$gridview = $infoArr['html'];
$list_form->assign('slide_bar', $this->slide_bar($left_menu));
$list_form->assign('tabs', $this->set_tabs());
$list_form->assign('gridview', $gridview);
$list_form->assign('dialog_title', 'thành viên');
$list_form->parse('main');
$html = $list_form->out_return('main');
echo $html;
}
示例2: switch
function fnc_get_user_info($type_id, $value, $html = false, $html_type = 0)
{
$detail_id = 0;
$user_name = '';
$user_code = '';
switch ($type_id) {
case 1:
$detail_id = $value;
break;
case 2:
$user_name = $value;
break;
case 3:
$user_code = $value;
break;
default:
break;
}
$arr_result['result'] = -1;
if ($detail_id > 0 || $user_name != '' || $user_code != '') {
$sSQL = "exec usp_user_info 0,'" . $user_name . "'," . (int) $detail_id . ",'" . $user_code . "'";
$result = $this->db->query($sSQL, true, "Query failed");
if ($aRow = $this->db->fetchByAssoc($result)) {
$token_user = $this->md5sum($aRow['detail_id'] . $aRow['user_name'] . $aRow['position_id'] . $aRow['level_id']);
$aRow['token_user'] = $token_user;
$org_chart = $this->getOrgChart($aRow['dep_id']);
$aRow['org_chart'] = $org_chart;
$arr_result['result'] = 1;
$arr_result['data'] = $aRow;
if ($html) {
if ($html_type == 0) {
$list_form = new XTemplate('templates/user_info_1.html');
} else {
$list_form = new XTemplate('templates/user_info.html');
}
$list_form->assign('user_info', $aRow);
$list_form->assign('check_status_' . (int) $aRow['status'], 'checked="checked"');
$list_form->parse('main');
$html = $list_form->out_return('main');
$arr_result['html'] = $html;
}
}
}
return $arr_result;
}