|
|
|
หาคนช่วยแก้โค้ต php จากเว็บสำเร็จรูปให้หน่อยค่ะ เรื่องการดาวโหลดข้อมููล โดยแก้ให้สามารถโหลดได้ทุกคน ไม่จำเป็นต้องเป็นสมาชิก |
|
|
|
|
|
|
|
Code (PHP)
<?
//แสดง download
?>
<center><TABLE cellSpacing=0 cellPadding=0 width="454" border=0>
<TBODY>
<TR>
<TD colspan="3"><IMG SRC="templates/<?echo WEB_TEMPLATES;?>/images/menu/<?echo WEB_TEMPLATES;?>_download.png" BORDER="0" width="454" height="35"></td>
</tr>
<TR>
<TD background="images/main/4.gif" BORDER="0" height="100%" width="7"></td>
<TD>
<table class='iconframe' cellpadding='0' cellspacing='0'>
<tbody>
<tr>
<td class='imageframe'>
<TABLE width="440" align=center cellSpacing=0 cellPadding=0 border=0>
<?
//$category=1;
if($category){
$SQLwhere = " category='".$category."' ";
$SQLwhere2 = " WHERE category='".$category."' ";
}
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$limit = 10;
$res['download'] = $db->select_query("SELECT * FROM ".TB_DOWNLOAD." where status='1' ORDER BY id DESC LIMIT $limit ");
$count=0;
while($arr['download'] = $db->fetch($res['download'])){
// if ($count==0) { echo "<TR>"; }
echo "<TR>";
if($count%2==0) { //ส่วนของการ สลับสี
$ColorFill = "#FDEAFB";
} else {
$ColorFill = "#F0F0F0";
}
//ชื่อหมวดหมู่
$res['category'] = $db->select_query("SELECT category_name FROM ".TB_DOWNLOAD_CAT." WHERE id='".$arr['download']['category']."' ");
$arr['category'] = $db->fetch($res['category']);
$downloadid=$arr['download']['id'];
$ress['com'] = $db->select_query("SELECT *,count(id) as com FROM ".TB_DOWNLOAD_COMMENT." WHERE id ='".$downloadid."' group by id");
$arrs['com'] = $db->fetch($ress['com']);
?>
<TD bgcolor="<?=$ColorFill;?>" onmouseover="this.style.backgroundColor='#FFF0DF'" onmouseout="this.style.backgroundColor='<?=$ColorFill;?>'" width="100%" valign=top height="20" align="left">
<IMG SRC="images/admin/open.gif" BORDER="0" ALIGN="absmiddle"><A HREF="?name=download&file=readdownload&id=<?=$arr['download']['id'];?>" ><font color="#990066"><B>[ <?= ThaiTimeConvert($arr['download']['post_date'],"","");?> ] </font><font color="#0066FF"><?=$arr['download']['topic'];?></A></font></B>
<?=NewsIcon(TIMESTAMP, $arr['download']['post_date'], "images/icon_new.gif");?>(อ่าน : <?=$arr['download']['pageview'];?> / ดาวน์โหลด : <?=$arr['download']['rate'];?> ) โดย <?=$arr['download']['posted'];?>
</TD>
<?
$count++;
echo "</Tr><TR><TD colspan=2 height=\"1\" class=\"dotline\"></TD></TR>";
if (($count%_DOWNLOAD_COL) == 0) { echo "</TR><TR><TD colspan=2 height=\"1\" class=\"dotline\"></TD></TR>"; $count=0;
} else{ echo "</Tr><TR><TD colspan=2 height=\"1\" class=\"dotline\"></TD></TR>";}
//echo "</Tr>";
}
?>
<td>
</tr>
<tr>
<td colspan="2" align="right"><A HREF="index.php?name=download" ><img src="images/admin/2_15.gif"></a></td>
</tr>
</table>
<td>
</tr>
</table>
<TD background="images/main/5.gif" BORDER="0" height="100%" width="7"></td>
</tr>
<TR>
<TD><IMG SRC="images/main/6.gif" BORDER="0" width="7" height="7"></td><TD background="images/main/7.gif" BORDER="0" height="7" ></td><TD><IMG SRC="images/main/8.gif" BORDER="0" width="7" height="7"></td>
</tr>
</table><br>
|
|
|
|
|
Date :
2011-10-11 15:26:35 |
By :
lootboom |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ดูๆๆ มาแล้วยังไม่เห็นส่วนของการ ตรวจสอบสิทธิ์เลยอ่าครับ ช่วนเอาหน้าเว็บมาดูหน่อยจ้า ผมว่าน่าจะเป็นการตรวจสอบสิทธิ์ที่หน้าอื่นนะครับ
|
|
|
|
|
Date :
2011-10-11 15:30:27 |
By :
lootboom |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|