1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
include("TinyButStrong/tbs_class_php5.php") ;
include_once('TinyButStrong/plugins/tbs_plugin_bypage.php');
include_once('TinyButStrong/plugins/tbs_plugin_navbar.php');
include("Maj.php");
include("connect.php");
// Default value
if (!isset($_GET)) $_GET=&$HTTP_GET_VARS;
if (isset($_GET['PageNum'])) {
$PageNum = $_GET['PageNum'];
} else {
$PageNum = 1;
}
// Default value
if (isset($_GET['RecCnt'])) {
$RecCnt = intval($_GET['RecCnt']);
} else {
$RecCnt = -1;
}
$PageSize = 10;
//création un nouvel objet tbs
$tbs = new clsTinyButStrong ;
//modèle html dynamique ÃÂÃÂÃutiliser
$tbs -> LoadTemplate("Page_annonces.php");
//la requete
$requete = "SELECT * ,date_format(Mec, '%d/%m/%Y') AS MeC FROM autotran ORDER BY Prix_public ";
// Merge the block by page
$tbs->PlugIn(TBS_BYPAGE,$PageSize,$PageNum,$RecCnt); // Next block will be merged suing By-Page mode.
$RecCnt = $tbs->MergeBlock('blk',$connect,$requete);
// Merge the Navigation Bar
$tbs->PlugIn(TBS_NAVBAR,'nv','',$PageNum,$RecCnt,$PageSize);
$tbs->PlugIn(TBS_NAVBAR,'nv2','',$PageNum,$RecCnt,$PageSize);
//execute la requete,recupere les resultats et fusionne avec le modele html
//affiche le fichier html
$tbs -> Show(); |
Partager