<? @session_start();?> <!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" /> <title>Untitled Document</title> </head> <body> <form name="form1" method="post" action="index.php?home=upfilecomplete" enctype="multipart/form-data"> <br> <table width="50%" border="0" align="center" cellpadding="2" cellspacing="1"> <tr> <td colspan="3"><div align="center">อัพโหลดข้อมูลผลงาน</div></td> </tr> <tr> <td colspan="3"><div align="center"> <p> </p> </div></td> </tr> <tr> <td width="29%">ชื่อไฟล์</td> <td width="2%">:</td> <td width="69%"><input type="text" name="txtName" maxlength="100" /></td> </tr> <tr> <td>เลือกไฟล์</td> <td>:</td> <td><input type="file" name="filUpload" /></td> </tr> <tr> <td> </td> <td> </td> <td><input name="btnSubmit" type="submit" value="บันทึก" /></td> </tr> </table> </form> </body> </html>
<? @session_start();?> <!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" /> <title>Untitled Document</title> <style type="text/css"> body { margin-top: 0px; } </style> </head> <body> <? $id_pic = $_SESSION['id1']; $strSQL = "SELECT * FROM works WHERE id_pic = $id_pic"; $objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); $Num_Rows = mysql_num_rows($objQuery); $Per_Page = 11; $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 ASC LIMIT $Page_Start , $Per_Page"; $result_show = mysql_query($strSQL); while($objResult = mysql_fetch_array($result_show)) { ?> <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><a href="index.php?home=upfileform&id">เพิ่มผลงาน</a></td> </tr> </table> <table width="90%" border="0" align="center" cellpadding="3" cellspacing="1"> <tr> <th width="554" bgcolor="#999999"> <div align="center">ชื่อผลงาน | เกียรติบัตร | วิจัย</div></th> <th colspan="2" bgcolor="#999999">จัดการข้อมูล</th> </tr> <? while($objResult = mysql_fetch_array($result_show)) { ?> <tr> <td bgcolor="#CCCCCC"><center><a href="uploadfile/myfile/<?=$objResult["FilesName"];?>"><?=$objResult["Name"];?></a></center></td> <td width="148" bgcolor="#CCCCCC"><div align="center"><a href="index.php?home=deleteworks&FilesID=<?=$objResult["FilesID"];?>" onclick="return confirm('คุณกำลังลบไฟล์ แน่ใจหรือว่าคุณต้องการที่จะลบไฟล์นี้')">ลบ</a></div></td> </tr> <? }} ?> </table> <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><div align="center"><br> <? if($Prev_Page) { echo " <a href='index.php?home=upfileshow&Page=$Prev_Page&id'><< Back</a> "; } for($i=1; $i<=$Num_Pages; $i++){ if($i != $Page) { echo "[ <a href='index.php?home=upfileshow&Page=$i&id'>$i</a> ]"; } else { echo "<b> $i </b>"; } } if($Page!=$Num_Pages) { echo " <a href ='index.php?home=upfileshow&Page=$Next_Page&id'>Next>></a> "; } ?> </div></td> </tr> </table> <p> </p> <? mysql_close(); ?> </body> </html>
<? @session_start();?> <!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" /> <title>Untitled Document</title> <style type="text/css"> body { background-image: url(images/bgbg.png); margin-top: 0px; } </style> </head> <body leftmargin="10" marginwidth="10"> <table width="68%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><table width="90%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="7%"><img src="images/e-portfolio_01.png" alt="" width="68" height="15" /></td> <td width="1%"><img src="images/e-portfolio_02.png" width="10" height="15" alt="" /></td> <td colspan="2"><img src="images/e-portfolio_03.png" width="867" height="15" alt="" /></td> <td width="1%"><img src="images/e-portfolio_04.png" width="14" height="15" alt="" /></td> <td width="6%"><img src="images/e-portfolio_05.png" width="61" height="15" alt="" /></td> </tr> <tr> <td><img src="images/e-portfolio_06.png" width="68" height="237" alt="" /></td> <td><img src="images/e-portfolio_07.png" width="10" height="237" alt="" /></td> <td colspan="2" bgcolor="#FFFFFF"><img src="images/e-portfolio_08.png" width="867" height="237" alt="" /></td> <td><img src="images/e-portfolio_09.png" width="14" height="237" alt="" /></td> <td><img src="images/e-portfolio_10.png" width="61" height="237" alt="" /></td> </tr> <tr> <td background="images/e-portfolio_11.png"></td> <td background="images/e-portfolio_12.png"></td> <td width="25%" bgcolor="#CCCCCC"> <? include ('includes/config.php'); ?> <? if ($_SESSION['log'] == 'LOGIN'){ ?> <table width="100%" border="0" cellspacing="5" cellpadding="0"> <tr> <td colspan="3" bgcolor="#009900"><div align="center" style="font-size: 16pt; font-weight: bold; font-family: 'Browallia New';">ยินดีต้อนรับเข้าสู่ระบบ</div></td> </tr> <tr> <td width="31%" style="font-family: 'TH Sarabun New'; font-size: 16pt;"><div align="right">คุณ</div></td> <td width="4%">:</td> <td width="65%"><? echo "$_SESSION[adminname]";?><? echo "$_SESSION[name]";?></td> </tr> <tr> <td style="font-size: 16pt; font-family: 'TH Sarabun New';"><div align="right">สถานะ</div></td> <td>:</td> <td><? if ($_SESSION[type_id] == '1') { echo "Administrator"; }elseif ($_SESSION[type_id] == '0') { echo "นักศึกษา"; } elseif ($_SESSION[type_id] == '2') {echo "อาจารย์";} ?></td> </tr> <tr> <td> </td> <td> </td> <td><div align="left"><a href="logout.php">ออกจากระบบ</a></div></td> </tr> </table> <? }else{ ?> <form id="form1" name="form1" method="post" action="member/login.php?op=LOG" > <table width="100%" border="0" cellspacing="5" cellpadding="0"> <tr> <td colspan="3" bgcolor="#009900"><div align="center" style="font-size: 16pt; font-weight: bold; font-family: 'Browallia New';">กรุณาเข้าสู่ระบบ</div></td> </tr> <tr> <td width="23%" style="font-family: 'TH Sarabun New'; font-size: 16pt;">Username</td> <td width="3%">:</td> <td width="74%"><input type="text" name="user" id="user" /></td> </tr> <tr> <td style="font-size: 16pt; font-family: 'TH Sarabun New';">Password</td> <td>:</td> <td><input type="password" name="pass" id="pass" /></td> </tr> <tr> <td> </td> <td> </td> <td><input type="submit" name="button" id="Submit" value="เข้าสู่ระบบ" /> <input type="reset" name="button2" id="button" value="clear" /></td> </tr> </table> </form> <? } ?> <td width="60%" rowspan="3" valign="top" bgcolor="#FFFFFF"><p> <? switch ($_GET[home]) { case register: include ("member/register.php"); break; case management: include ("member/management.php"); break; case login: include ("member/login.php"); break; case logout: include ("logout.php"); break; case editprofile: include ("member/editprofile.php"); break; case edit: include ("member/edit.php"); break; case search: include ("search.php"); break; case saveprofile: include ("member/saveprofile.php"); break; case showprofile: include ("member/showprofile.php"); break; case upfileform: include ("uploadfile/upfileform.php"); break; case upfilecomplete: include ("uploadfile/upfilecomplete.php"); break; case upfileshow: include ("uploadfile/upfileshow.php"); break; case createalbum: include ("activity/create_album.php"); break; case creategallery: include ("activity/create_gallery.php"); break; case deletealbum: include ("activity/delete_album.php"); break; case deletegallery: include ("activity/delete_gallery.php"); break; case editalbum: include ("activity/edit_album.php"); break; case editgallery: include ("activity/edit_gallery.php"); break; case savealbum: include ("activity/save_album.php"); break; case savegallery: include ("activity/save_gallery.php"); break; case showalbum: include ("activity/show_album.php"); break; case showgallery: include ("activity/show_gallery.php"); break; case updatealbum: include ("activity/update_album.php"); break; case updategallery: include ("activity/update_gallery.php"); break; case uploadgallery: include ("activity/upload_gallery.php"); break; case viewalbum: include ("activity/view_album.php"); break; case deleteworks: include ("uploadfile/deleteworks.php"); break; case showupload: include ("uploadfile/showupload.php"); break; case activityshow: include ("activity/activityshow.php"); break; case activitygalery: include ("activity/activitygalery.php"); break; case del: include ("member/del.php"); break; default: { include("home.php"); break;} } ?> </p></td> <td background="images/e-portfolio_14.png"></td> <td background="images/e-portfolio_15.png"></td> </tr> <tr> <td background="images/e-portfolio_11.png"></td> <td background="images/e-portfolio_12.png"></td> <td bgcolor="#CCCCCC"><table width="100%" border="0" cellspacing="5" cellpadding="0"> <tr> <td bgcolor="#009900"><div align="center" style="font-family: 'Browallia New'; font-size: 16pt; font-weight: bold;">เมนูหลัก</div></td> </tr> </table></td> <td background="images/e-portfolio_14.png"></td> <td background="images/e-portfolio_15.png"></td> </tr> <tr> <td background="images/e-portfolio_11.png"></td> <td background="images/e-portfolio_12.png"></td> <td valign="top" bgcolor="#CCCCCC"><table width="100%" border="0" cellpadding="0" cellspacing="5"> <tr> <td style="text-align: left; font-family: 'Browallia New'; font-size: 16pt; font-weight: bold;"><div align="center"><a href="index.php">หน้าแรก</a></div></td> </tr> <tr> <td style="text-align: left; font-family: 'Browallia New'; font-size: 16pt; font-weight: bold;"><div align="center"> <? if ($_SESSION['type_id'] == '0') { echo "<a href=\"index.php?home=editprofile\">แก้ไขข้อมูลส่วนตัว</a> "; } if ($_SESSION['type_id'] == '1'){ echo "<a href=\"index.php?home=management\">จัดการข้อมูลนักศึกษา</a>"; } if ($_SESSION['type_id'] == '2'){ echo "<a href=\"index.php?home=search\">ค้นหาและดูข้อมูลนักศึกษา</a>"; } ?> </div></td> </tr> <tr> <td style="text-align: center; font-family: 'Browallia New'; font-size: 16pt; font-weight: bold;"> <? if ($_SESSION['type_id'] == '0'){ echo "<a href=\"index.php?home=upfileshow&id\">จัดการข้อมูลผลงาน</a>"; }?> </td> </tr> <tr> <td style="text-align: center; font-family: 'Browallia New'; font-size: 16pt; font-weight: bold;"> <? if ($_SESSION['type_id'] == '0'){ echo "<a href=\"index.php?home=viewalbum&id\">จัดการข้อมูลกิจกรรม</a>"; }?></td> </tr> <tr> <td style="text-align: center; font-family: 'Browallia New'; font-size: 16pt; font-weight: bold;"> <? if ($_SESSION['type_id'] == '0'){ echo "<a href=\"index.php?home=search\">ค้นหาและดูสมาชิก</a>"; }?></td> </tr> </table> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p></td> <td background="images/e-portfolio_14.png"></td> <td background="images/e-portfolio_15.png"></td> </tr> <tr> <td background="images/e-portfolio_11.png"></td> <td background="images/e-portfolio_22.png"></td> <td colspan="2" bgcolor="#FFFFFF"><img src="images/e-portfolio_23.png" width="867" height="133" alt="" /></td> <td background="images/e-portfolio_24.png"></td> <td background="images/e-portfolio_15.png"></td> </tr> </table></td> </tr> </table> </body> </html>
<?php $Username=mysql_real_escape_string($_POST['txtUsername']); $Password=mysql_real_escape_string($_POST['txtPassword']); $select=mysql_query("select * from example WHERE Username='".$Username."' AND Password=='".$Password."'") or die (mysql_error()); $num_row=mysql_num_rows($select); if($num_row == 1){ $Member=mysql_fetch_array($select); $_SESSION['Username']=$Member['Username']; $File=$Member['File']; if($File == ''){ header('location:upfileform.php'); }else{ header('location:upfileshow.php'); } }else{ echo "<script>alert('$Username ไม่มีอยู่ในระบบ');</script>"; } ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง