<?php session_start(); /** *Version 1.0 *Create By : Ticha Opacharoen *Create Date : 03.02.2010 *Descripton : MENU LEFT **/ //header("Content-type: text/xml; charset=UTF-8"); //ini_set("default_charset", "TIS-620"); // open this directory if ($_SESSION["StatusMenu"] == "dow_u"){ $myDirectoryName = "DOC\Doc_UserManual/"; }else if ($_SESSION["StatusMenu"] == "dow_s"){ $myDirectoryName = "DOC\ScoreReport/"; }else if ($_SESSION["StatusMenu"] == "dow_d"){ $myDirectoryName = "DOC\Download/"; }else if ($_SESSION["StatusMenu"] == "dow_f"){ $myDirectoryName = "DOC\Form/"; } $myDirectory = opendir($myDirectoryName); // get each entry while($entryName = readdir($myDirectory)) { $dirArray[] = iconv("TIS-620","UTF-8",$entryName); //$dirArray[] = $entryName; } // close directory closedir($myDirectory); // count elements in array $indexCount = count($dirArray); //Print ("$indexCount files<br>\n"); // sort 'em sort($dirArray); ?> <br> <table cellpadding="0" cellspacing="0" border="0" width="80%" align = "center"> <tr> <th><FONT COLOR=BLACK FACE="tahoma" SIZE=2px>No.</FONT></th> <th><FONT COLOR=BLACK FACE="tahoma" SIZE=2px>Description</FONT></th> <th><FONT COLOR=BLACK FACE="tahoma" SIZE=2px>Update Date</FONT></th> <th><FONT COLOR=BLACK FACE="tahoma" SIZE=2px>Download</FONT></th> </tr> <?php for($index=0; $index < $indexCount; $index++) { if(substr("$dirArray[$index]", 0, 1) != "."){ // don't list hidden files echo"<tr>"; echo"<td width = '10%' align = 'center'> <FONT COLOR=BLACK FACE='tahoma' SIZE=2px>"; echo $index-1; echo"</td >"; echo"<td width = '45%' align=\"left\" title='ดาวน์โหลด $dirArray[$index]'> "; //echo"<a href=\"download.php?file=$dirArray[$index]\" target='_blank' style=\"text-decoration: none;\">"; echo"<font color=\"#000000\" face=\"tahoma\" size=\"2px\">"; //$dirArray[$index] = iconv("TIS-620","UTF-8",$dirArray[$index]); echo"$dirArray[$index]"; echo"</font></a>"; echo"</td>"; echo"<td width = '25%' align = 'left'> <FONT COLOR=BLACK FACE='tahoma' SIZE=2px>"; echo "".date( "D d M Y g:i A", filemtime($myDirectoryName."/".$dirArray[$index])) . "<br>"; echo"</td >"; echo"<td width = '10%' align=\"left\" title='ดาวน์โหลด $dirArray[$index]'> "; //echo"<a href=\"download.php?file=$dirArray[$index]\" target='_blank' style=\"text-decoration: none;>test</a>"; echo"<a href ='download.php?file=$dirArray[$index]' target='_blank' ><IMG SRC='images/office/pdf_new.jpg' ALT='PDF' BORDER=0 HEIGHT=20 WIDTH=20></a>"; echo"<font color=\"#000000\" face=\"tahoma\" size=\"1px\">"; //echo"<b>$dirArray[$index]</b>"; echo"</font></a>"; echo"</td>"; echo"</tr>"; } //<IMG SRC="images2/bart.gif" ALT="Bart" BORDER=0 HEIGHT=148 WIDTH=110> } ?> </table> <?php session_start(); //echo "<pre>"; //print_r($_SESSION); //echo "</pre>"; ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง