<? session_start(); if($_SESSION['UserID'] == "") { echo "Please Login!"; exit(); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="style_uploadfile.css" type="text/css" /> <title>Untitled Document</title> </head> <body> <div id="Form"> <div id="header"> </div> <h1>.::Upload files::.</h1> <ul id="menu"> <li><a href="index.php?page=UploadFiles"><img src="images/upload.png" /> Upload Files</a></li></td> <li><a href="index.php?page=ViewFiles"><img src="images/list.png" /> View Files</a></li> <li><a href="index.php?page=Search"><img src="images/search.png" /> Search</a></li> <li><a href="index.php?page=Profile"><img src="images/profile.png" /> Profile</a></li> <li><a href="index.php?page=ChangPassword"><img src="images/chang.png" /> Chang Password</a></li> <li><a href="#"><img src="images/manual.gif" /> Manual</a></li> <li><a href="Logout.php"><img src="images/logout.png" /> Logout</a></li> </ul> </div> <table width="65%" border="0" align="center" cellspacing="1"> <tr> <td> <? switch ($_GET["page"]) { case "UploadFiles": echo"Home -> Upload Files"; include("UploadFiles.php"); break; case "ViewFiles": echo "Home -> View Files"; include("ViewFiles.php"); break; case "Search": echo "Home -> Search"; include("Search.php"); break; case "Profile": echo "Home -> Profile"; include("Profile.php"); break; case "ChangPassword": echo "Home -> ChangPassword"; include("ChangPassword.php"); break; default: echo "Home -> Profile"; include("Profile.php"); } ?> </td> </tr> </table> </body> </html>
<html> <head> <title>ThaiCreate.Com PHP & MySQL Tutorial</title> </head> <body> <? $objConnect = mysql_connect("localhost","root","6845") or die("Error Connect to Database"); $objDB = mysql_select_db("dc"); mysql_query("SET NAMES UTF8"); $strSQL = "SELECT * FROM files "; $objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); $Num_Rows = mysql_num_rows($objQuery); $Per_Page = 2; // Per Page $Page = $_GET["Page"]; if(!$_GET["Page"]) { $Page=1; } $Prev_Page = $Page-1; $Next_Page = $Page+1; $Page_Start = (($Per_Page*$Page)-$Per_Page); if($Num_Rows<=$Per_Page) { $Num_Pages =1; } else if(($Num_Rows % $Per_Page)==0) { $Num_Pages =($Num_Rows/$Per_Page) ; } else { $Num_Pages =($Num_Rows/$Per_Page)+1; $Num_Pages = (int)$Num_Pages; } $strSQL .=" order by FilesID desc LIMIT $Page_Start , $Per_Page"; $objQuery = mysql_query($strSQL); ?> <table width="600" border="1"> <tr> <th width="91"> <div align="center">CustomerID </div></th> <th width="98"> <div align="center">Name </div></th> <th width="198"> <div align="center">Email </div></th> <th width="97"> <div align="center">CountryCode </div></th> <th width="59"> <div align="center">Budget </div></th> <th width="71"> <div align="center">Used </div></th> </tr> <? while($objResult = mysql_fetch_array($objQuery)) { ?> <tr> <td class="tbl5"><div align="center"><?=$objResult["FilesID"];?></div></td> <td class="tbl5"><center><img width="20" height="20" src="myfile/<?=$objResult["Filesname"];?>"></center></td> if{ <td class="tbl5"><center><?=$objResult["Name"];?></center></td> <td class="tbl5"><center><?=$objResult["Date"];?></center></td> <td class="tbl5"><center><?=$objResult["Time"];?></center></td> <td class="tbl5"><center><a href="viewmember.php?UserID=<?=$objResult["UserID"];?>"><?=$objResult["Name_M"];?></a></center></td> <td class="tbl5"><center><a href="viewdetails.php?FilesID=<?=$objResult["FilesID"];?>">Details</a></center></td> </tr> <? } ?> </table> <br> Total <?= $Num_Rows;?> Record : <?=$Num_Pages;?> Page : <? if($Prev_Page) { echo " <a href='$_SERVER[SCRIPT_NAME]?Page=$Prev_Page'><< Back</a> "; } for($i=1; $i<=$Num_Pages; $i++){ if($i != $Page) { echo "[ <a href='$_SERVER[SCRIPT_NAME]?Page=$i'>$i</a> ]"; } else { echo "<b> $i </b>"; } } if($Page!=$Num_Pages) { echo " <a href ='$_SERVER[SCRIPT_NAME]?Page=$Next_Page'>Next>></a> "; } mysql_close($objConnect); ?> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง