Jumat, 27 September 2013

PHP Indonesia - Facebook: Butuh bantuan para master untuk menampilkan berita...

PHP Indonesia - Facebook
PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
All Tech news in ONE place

Tired of browsing thru hundreds of RSS feeds? Try Techi. All the tech news from around the web in ONE place, including exclusive articles. Daily newsletter.
From our sponsors
Butuh bantuan para master untuk menampilkan berita...
Sep 27th 2013, 04:02, by Asri Mardiana Putra

Asri Mardiana Putra 4:02am Sep 27
Butuh bantuan para master untuk menampilkan berita dalam 3 kolom, gmn caranya?

Asri Mardiana Putra 4:05am Sep 27
baru bisa namppil di satu kolom

Asri Mardiana Putra 4:06am Sep 27
ini codenya :

Asri Mardiana Putra 4:06am Sep 27
<?php
// require_once('page.php');

function show_icon($type){
global $APP;
$setOfType = array("doc","bmp", "gif", "jpg", "mp3", "pdf", "png", "ppt", "rar", "txt", "xls", "zip");
if(in_array($type, $setOfType)){
$icon_file = "icon_".strtolower($type).".png";
}else{
$icon_file = "icon_others.png";
}
$retimage = '<img src="'.$APP['PATH_TPL'].'/img/icon_set/'.$icon_file.'" />';
return $retimage;
}

$str = '<table width="100%" cellspacing="1" border="0" class="dropbox">

';




$ADDOBJECT = new App($db_config[DB]);
$Q = "SELECT DISTINCT(a.fileCatID), b.catName FROM tbl_files as a INNER JOIN tbl_category as b ON a.fileCatID = b.catID ORDER BY a.fileCatID ASC";
$APPOBJECT->query($Q);
if($APPOBJECT->num_rows()>0){
while($cat = $APPOBJECT->fetch_assoc()){
$dataCat[] = $cat;
}
for($j=0;$j<count($dataCat);$j++){
$catid = $dataCat[$j]['fileCatID'];
$catName = $dataCat[$j]['catName'];
$str .= '
<tr style="border-bottom: 1px solid #EEE;">

</tr>
';
$Q = "SELECT a.*, UNIX_TIMESTAMP(a.insertedDate) as ux_inserted FROM tbl_files as a WHERE a.fileCatID = $catid ORDER BY a.insertedDate DESC";
$APPOBJECT->query($Q);

unset($data);
if($APPOBJECT->num_rows()>0){
while($f = $APPOBJECT->fetch_assoc()){
$data[] = $f;
}
for($i=0;$i<count($data);$i++){
$Q = "UPDATE tbl_files SET fileViewed = fileViewed + 1 WHERE fileID = ".$data[$i]['fileID'];
$APPOBJECT->query($Q);
if($lang=="EN"){
$fileTitle = $data[$i]['fileTitle'.$lang];
$fileModified = date("Y-m-d", $data[$i]['ux_inserted']);
}else if($lang=="IN"){
$fileTitle = $data[$i]['fileTitle'];
$fileModified = date("d-m-Y", $data[$i]['ux_inserted']);
}else{
$fileTitle = $data[$i]['fileTitle'.DEFAULT_LANG];
$fileModified = date("Y-m-d", $data[$i]['ux_inserted']);
}
$str .= '
<tr><td style="padding:0 0 0 5px;" class="small hiddenCol">'.$fileModified.'</td></tr>
<tr><td style="padding:0 0 0 5px;" class="small">'.$fileTitle.'</td></tr>
<tr><td style="padding:0 0 0 20px;"><a href="javascript:void(0)" onclick="goDownload('.$data[$i]['fileID'].')">'.show_icon($data[$i]['fileTypes']).'</a></td></tr>

<tr><td>'.$data[$i]['fileID'].'</td></tr>



';
}
}
}
$str .= '</table>';
}else{
$TPLOBJECT->LoadTemplate($APP['PATH_TPL']."/page.notfound.htm");
}

?>

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Tidak ada komentar:

Posting Komentar