include("baglan.php");
include("include/sayfa.php");
if($_GET["id"]<>""){
$row = $db->row("select * from ressam where id=".$_GET["id"]."");
$nav="Geri";
if($row->resim<>""){$resim='';}
else{$resim='';}
if($row){
$ressamlar.='
'.$resim.'
'.$row->adi.' '.$row->icerik.'
';
}
}else{
$st=$_GET["st"];
// Make query
if (!$st) $st=0;
$st=(int) $st;
if (!$adet) $adet=6;
$adet=(int) $adet;
if ($adet<1) $adet=6;
$rec=$db -> row("SELECT count(id) as sayi FROM ressam order by adi");
$pg=new page_creator();
$pg->TotalItems=$rec->sayi;
$pg->ItemsPerPage=$adet;
$pg->PrevNext=true;
$pg->FirstLast=true;
$pg->TrailingPages=2;
$pg->ShowTotalPages=false;
$pg->ShowTotalPagesString="Toplam Sayfa Sayisi: ";
$pg->ScriptVariable="st";
$pg->Parameters=array('amount'=>$adet);
$nav=$pg->Create_Pagelinks();
$rows = $db->rows("select * from ressam order by adi limit $st,$adet");
if($rows){
foreach($rows as $row){
$icck=strip_tags($row->icerik);
if($row->resim<>""){$resim='';}
else{$resim='';}
$ressamlar.='