Jumat, 27 September 2013

PHP Indonesia - Facebook: Butuh bantuan para master ne... gmn code untuk men...

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 ne... gmn code untuk men...
Sep 27th 2013, 03:58, by Asri Mardiana Putra

Asri Mardiana Putra 3:58am Sep 27
Butuh bantuan para master ne... gmn code untuk menampilkan seperti ini ?

Danura Aditya 3:59am Sep 27
<?php echo "ini?";?>

Asri Mardiana Putra 3:59am Sep 27
Gimana code untuk menampilkan news yang terisi di 3 colum

Asri Mardiana Putra 4:00am Sep 27
itu gambar nya gan.... bisa di bantu gan?

Danura Aditya 4:02am Sep 27
itu ditabelin

Asri Mardiana Putra 4:03am Sep 27
news nya nampil dinamis gan, dalam 3 kolom, gmn code nya gan?

Asri Mardiana Putra 4:04am 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");
}

?>

Asri Mardiana Putra 4:05am Sep 27
sementara baru terisi satu kolom gan

Hand Excel 4:06am Sep 27
bisa pakek logika pen-tabelan.
jadi logikanya
jika udah 3 baris nanti akan pindah kebawah dst.

Asri Mardiana Putra 4:06am Sep 27
code nya gmn tu gan...

Asri Mardiana Putra 4:07am Sep 27
iya itu yg saya butuhkan gan.... help me please

Hand Excel 4:11am Sep 27
ini punya saya bisa di sesuain sama table DB agan

<?php $result = mysql_query("select * from artikel order by tgl DESC");
$no=mysql_num_rows($result);
//menampilkan foto
?>
<br>
<table border="0" cellspacing="3" cellpadding="2">
<tr>
<?php
$i = 1;
while($row = mysql_fetch_array($result)){
?>
<td ><a href="?p=artd&&id_artikel=<?php echo $row['id_artikel']; ?>" ><?php echo $row['judul'];?></a>
<a href="admin/<?php echo $row['nama_foto'];?>" class="fancybox" title="<?php echo $row['judul'];?><br><?php echo substr(strip_tags($row['isi']),0,146); ?> ..."><img src="admin/<?php echo $row['nama_foto'];?>" style="border-radius:5px;border:1px solid #fff;" alt="" width="132" height="132" border="0"/>
</a>
</td>

<?php
if($i % 3 == 0){
echo '</tr><tr>';
}
$i++;
}?>
</tr>
</table>

Herman Sihombing 4:13am Sep 27
kolomnya tetap 3 ga?atau kontentnya aja yg dinamis?

Asri Mardiana Putra 4:15am Sep 27
kontennya dinamis, newsnya terisi di 3 kolom gan

Asri Mardiana Putra 4:16am Sep 27
Hand Excel Terima kasih codenya gan, itu menampilkan newsnya di tiga kolom gan?

Hand Excel 4:18am Sep 27
itu saya gunakan buat gallery foto,
jadi nampilin gambar sampai 3 baris saja dan setelah itu ganti baris..

gambarnya bisa diganti dengan tulisan content agan..

Asri Mardiana Putra 4:19am Sep 27
ooo iya sama logika nya gan, saya coba codenya gan, terima kasih gan

Hand Excel 4:20am Sep 27
ok selamat berkreasi

Asri Mardiana Putra 4:23am Sep 27
trm kash gan

Hand Excel 4:24am Sep 27
sama-sama

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