assign("rubrik","$rubrik"); $tpl->assign("arsip","$fulldomain/$kanal/arsip/$secalias/"); } else { $tpl->assign("rubrik","Pustaka Terbaru"); $tpl->assign("arsip","$fulldomain/$kanal/arsip/$secalias/"); $secalias = "global"; } $judul_per_hlm = 5; $batas_paging = 5; $hlm = $var[5]; $sql = "select count(*) as jml from tbl_$kanal where published='1' $where"; $hsl = sql( $sql); $tot = sql_result($hsl, 0, jml); $hlm_tot = ceil($tot / $judul_per_hlm); if (empty($hlm)){ $hlm = 1; } if ($hlm > $hlm_tot){ $hlm = $hlm_tot; } $ord = ($hlm - 1) * $judul_per_hlm; if ($ord < 0 ) $ord=0; $mysql = "select id,ringkas,nama,create_date,alias,secid,gambar,gambar1 from tbl_$kanal where published='1' $where order by id desc limit $ord, $judul_per_hlm"; $hasil = sql( $mysql); $datadetail = array(); $i = 0; while ($data = sql_fetch_data($hasil)) { $tanggal = $data['create_date']; $nama = $data['nama']; $id = $data['id']; $ringkas = $data['ringkas']; $alias = $data['alias']; $tanggal = tanggal($tanggal); $gambar = $data['gambar']; $gambar1 = $data['gambar1']; $secid = $data['secid']; $perintah = "select alias from tbl_$kanal"."_sec where secid='$secid'"; $res = sql($perintah); $dt = sql_fetch_data($res); $secalias1 = $dt['alias']; sql_free_result($res); if($i==0){ $gambar= $gambar1; } else { $gambar = $gambar; } if(!empty($gambar)) $gambar = "/gambar/$kanal/$gambar"; else $gambar = ""; $ringkas2 = explode(" ",$ringkas); for($i=0;$i<40;$i++) { $ringkas3 .= "$ringkas2[$i] "; } $link = "$fulldomain/$kanal/read/$secalias1/$id/$alias"; $datadetail[$id] = array("id"=>$id,"no"=>$i,"nama"=>$nama,"ringkas"=>$ringkas3,"tanggal"=>$tanggal,"alias"=>$alias,"link"=>$link,"gambar"=>$gambar); $i++; unset($ringkas3); } sql_free_result($hasil); $tpl->assign("datadetail",$datadetail); //Paging $batas_page =5; $stringpage = array(); $pageid =0; if ($hlm > 1){ $prev = $hlm - 1; $stringpage[$pageid] = array("nama"=>"<<","link"=>"$domainfull/$kanal/$aksi/$secalias/1"); $pageid++; $stringpage[$pageid] = array("nama"=>"<","link"=>"$domainfull/$kanal/$aksi/$secalias/$prev"); } else { $stringpage[$pageid] = array("nama"=>"<<","link"=>""); $pageid++; $stringpage[$pageid] = array("nama"=>"<","link"=>""); } $hlm2 = $hlm - (ceil($batas_page/2)); $hlm4= $hlm+(ceil($batas_page/2)); if($hlm2 <= 0 ) $hlm3=1; else $hlm3 = $hlm2; $pageid++; for ($ii=$hlm3; $ii <= $hlm_tot and $ii<=$hlm4; $ii++){ if ($ii==$hlm){ $stringpage[$pageid] = array("nama"=>"$ii","link"=>""); }else{ $stringpage[$pageid] = array("nama"=>"$ii","link"=>"$domainfull/$kanal/$aksi/$secalias/$ii"); } $pageid++; } if ($hlm < $hlm_tot){ $next = $hlm + 1; $stringpage[$pageid] = array("nama"=>">","link"=>"$domainfull/$kanal/$aksi/$secalias/$next"); $pageid++; $stringpage[$pageid] = array("nama"=>">>","link"=>"$domainfull/$kanal/$aksi/$secalias/$hlm_tot"); } else { $stringpage[$pageid] = array("nama"=>">","link"=>""); $pageid++; $stringpage[$pageid] = array("nama"=>">>","link"=>""); } $tpl->assign("stringpage",$stringpage); ?> $secid,"h"=>$h,"nama"=>$namamenu,"urlmenu"=>$urlmenu,"jml"=>$jumlah); $h %= 2; $h++; } sql_free_result($hasil); $tpl->assign("pustakasection",$section); ?>ERROR: select id,ringkas,nama,create_date,alias,gambar,secid from tbl_pustaka where published='1' order by views desc limit 10 : Table 'pangandaran.tbl_pustaka' doesn't exist
Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in /home/pangandaran/www/setingan/web.fungsi.php on line 29

Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /home/pangandaran/www/setingan/web.fungsi.php on line 39
Pustaka - Diary Siti Salamah Azzahra
Pustaka
Kategori
Pustaka Terpopuler