Esempio n. 1
0
} elseif ($_GET['sort'] == 3) {
    $strOrder = ' ORDER BY ID DESC';
} elseif ($_GET['sort'] == 4) {
    $strOrder = ' ORDER BY ID ASC';
}
$arrLink[] = 'sort=' . $_GET['sort'];
if (!isset($_GET['page']) || $_GET['page'] == '') {
    $_GET['page'] = $arrGPage['page'];
}
$arrData = $objWebInit->getInfoList($strWhere, $strOrder, ($_GET['page'] - 1) * $arrGPage['page_size'], $arrGPage['page_size'], true);
//翻页跳转link
$strLink = '';
if (!empty($arrLink)) {
    $strLink = implode('&', $arrLink);
}
$strPage = $objWebInit->makeInfoListPage($arrData['COUNT_ROWS'], $strLink);
unset($arrData['COUNT_ROWS']);
$arrMType = $objWebInit->getTypeList();
// 取类别标题
if (is_array($arrMType) && !empty($arrMType)) {
    $objWebInit->makeTypeCache($arrGWeb['module_id']);
    foreach ($arrData as $k => $data) {
        foreach ($arrMType as $k1 => $type) {
            if ($data['type_id'] == $type['type_id']) {
                $arrData[$k]['type_title'] = $type['type_title'];
            }
        }
    }
}
// 输出到模板
$arrMOutput["template_file"] = "admin.html";
Esempio n. 2
0
	$strUrl = $arrGWeb['WEB_ROOT_pre'].'/'.$arrGWeb['module_id'].'/detail.php?id='.$arrInfoList[0]['id'];
	header("Location: $strUrl");
	exit;
}
*/
if ($_GET) {
    $gettype = $_GET['type'];
} else {
    $gettype = 2;
}
//静态url处理
$strLink = '';
if ($arrGWeb['URL_static']) {
    if (!empty($arrLink)) {
        $strLink = str_replace('=', '-', implode('-', $arrLink));
    }
} else {
    if (!empty($arrLink)) {
        $strLink = implode('&', $arrLink);
    }
}
//翻页跳转link
$strPage = $objWebInit->makeInfoListPage($intRows, $strLink, $link_type = $arrGWeb['URL_static'], '3');
// 输出到模板
$arrMOutput["smarty_assign"]['requesttype'] = $gettype;
$arrMOutput["smarty_assign"]['arrInfoList'] = $arrInfoList;
$arrMOutput["smarty_assign"]['strPage'] = $strPage;
$arrMOutput["smarty_assign"]['arrMType'] = $arrMType;
$arrMOutput["smarty_assign"]['type_title'] = $type_title;
$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['main_dir'] . 'index.html';
$objWebInit->output($arrMOutput);