setTable("cms_linksmart_data"); $a_variable = "*"; $query->addColumn($a_variable); //$query->setWhere("companion_id"); $query->setWhere("linksmart_id"); /* setOrderBy(), setGroupBy(), setHaving() */ $query->setOrderBy("linksmart_id DESC"); $sql_query = $query->buildQuery(); $items = $dbconnect->fetch($sql_query); if(!get_magic_quotes_gpc()){ $result2 = stripslashes_deep($items); }else{ $result2 = $items; } // $params = array( 'mode' => 'Sliding', 'httpMethod' => 'GET', 'urlVar' => 'page', 'totalItems' => count($items), 'delta' => 3, 'perPage' => 10000, 'spacesBeforeSeparator' => 1, 'spacesAfterSeparator' => 1, 'separator' => '|', //'curPageLinkClassName' => 'selected', 'prevImg' => '< Prev', 'nextImg' => 'Next >', 'firstPagePre' => '', 'firstPageText' => '<< Start', 'firstPagePost' => '', 'lastPagePre' => '', 'lastPageText' => 'End >>', 'lastPagePost' => '', 'itemData' => $result2, ); $o_page=Pager::factory($params); foreach($o_page->getPageData() as $item){ $data_list_for_page[]=$item; } $smarty->assign("linksmart", $data_list_for_page); $navi=$o_page->getLinks(); $smarty->assign("pageNavi", $navi['all']); //******************************************************************* //SELECT Ǽ̼ $query = new SqlQueryS("SELECT"); $query->setTable("cms_admin_data"); $a_variable = "*"; $query->addColumn($a_variable); //$query->setWhere("companion_id"); $query->setWhere("admin_id"); /* setOrderBy(), setGroupBy(), setHaving() */ $query->setOrderBy("admin_id DESC LIMIT 1"); $sql_query = $query->buildQuery(); $result = $dbconnect->fetch($sql_query); if(!get_magic_quotes_gpc()){ $result2 = stripslashes_deep($result); }else{ $result2 = $result; } $smarty->assign("shop", $result2 ); //******************************************************************* $cookie_val = explode("\t", $_COOKIE['c_cms_db_login']); //print_r($cookie_val); $smarty->assign("ck_id", $cookie_val[0]); $smarty->assign("ck_passwd", $cookie_val[1]); $smarty->assign("today_lag_date", lag_date(LAG_HOUR) ); $smarty->assign("comp_list_table_cols", COMP_LIST_TABLE_COLS ); $smarty->assign("url_back", $_SERVER[HTTP_REFERER]); $smarty->display(basename($_SERVER['SCRIPT_NAME'],".html").".tpl"); ?>