if(isset($action)){
switch($action){
case "404":
$error_page = "Błąd 404: strona o podanym adresie nie istnieje";
break;
default: $error_page = "Strona o podanym adresie nie istnieje";
}
?>
} ?>
if(!isset($start)) $start = 0;
//
$db = new Connect();
$db = $db->polacz();//sqlite_open("/sqlite/ukulele");
$que = $db->query("SELECT * FROM front_page WHERE display='1' ORDER BY CASE WHEN top = 1 THEN 0 ELSE 1 END, id DESC LIMIT " . $start . ", " . $limit . " ");
//sqlite_close($db);
//
//$dbile = sqlite_open("sqlite/ukulele",0666,$sqerr);
//$dbile = new SQLiteDatabase("sqlite/ukulele");
//if($sqerr) echo "sqerr " . $sqerr;
//$queile = sqlite_query($dbile,"SELECT * FROM front_page WHERE display='1'",SQLITE_ASSOC,$err);
$qeile = $db->query("SELECT COUNT(id) tyle,id FROM front_page WHERE display='1'")->fetchAll();
//echo $err;
//sqlite_close($dbile);
//$dbile.close();
//$ile = sqlite_num_rows($queile);
$ile = $qeile[0]["tyle"];//$qeile->numRows();
//
$strony = ($ile / $limit);
//echo $strony . " : " . ceil($strony) . " ( $ile, $limit )";
?>
//
for($i = 0; $i < $strony; $i++){
?>
class="count_a"
}
?>>
1
} ?>
//
$wyn = $que;
foreach ( $wyn as $dane ) {
?>
if($dane["link"] != "" && $dane["is_video"]) { ?>
} else { ?>
} ?>
if($dane["img"] != "") {
if(!$dane["is_video"]){
if($dane["link"] != ""){
?>
} else { ?>
}
} else{ ?>
}
} ?>
} ?>
//
for($i = 0; $i < $strony; $i++){
?>
class="count_a"
}
?>>
1
} ?>