Server IP : 10.254.12.21 / Your IP : 10.254.12.21 Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.6.40 System : Linux arit.skru.ac.th 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64 User : apache ( 48) PHP Version : 5.6.40 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/arit/ |
Upload File : |
<!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <link rel="shortcut icon" href="images/logotab.ico"> </head> <!-- เลือกวันที่--> <link type="text/css" href="calendar2/flora.calendars.picker.css" rel="stylesheet"/> <script type="text/javascript" src="js/jquery.min.js"></script> <script type="text/javascript" src="calendar2/jquery.calendars.min.js"></script> <script type="text/javascript" src="calendar2/jquery.calendars.plus.min.js"></script> <script type="text/javascript" src="calendar2/jquery.calendars.picker.min.js"></script> <script type="text/javascript" src="calendar2/jquery.calendars.thai.min.js"></script> <script type="text/javascript" src="calendar2/jquery.calendars.thai-th.js"></script> <script type="text/javascript" src="calendar2/jquery.calendars.picker-th.js"></script> <script type="text/javascript"> $(function() { $('#mydate').calendarsPicker({calendar: $.calendars.instance('thai','th')}); }); </script> <link href="structer.css" rel="stylesheet" type="text/css"> <!-- คณะและสาขาวิชา่--> <script language="javascript"> menu = new Array(); menu[-1] = new Array(0, "ไม่มีข้อมูล"); menu[1] = new Array( 101, "การศึกษาปฐมวัย", 102, "สังคมศาตร์", 103, "ภาษาไทย",104,"ภาษาอังกฤษ",105,"คณิตศาสตร์",106,"วิทยาศาสตร์ทั่วไป"); menu[2] = new Array(201, "พัฒนาชุมชน", 202, "ภาษาอังกฤษ",203,"รัฐประศาสนศาสตร์",204,"ภาษาไทย",205,"การจัดการทางวัฒนธรรม",206,"สังคมศาสตร์เพื่อมัคคุเทศก์"); menu[3] = new Array(301, "อุตสาหกรรมท่องเที่ยว", 302, "บริหารทรัพยากรมนุษย์",303,"การจัดการ",304,"การตลาด",305,"คอมพิวเตอร์ธุรกิจ",306,"เศรษฐศาสตร์ ",307,"นิเทศศาสตร์ "); menu[4] = new Array(401, "การเพาะเลี้ยงสัตว์น้ำ", 402, "เกษตรศาสตร์",403,"วิทยาศาสตร์และเทคโนโลยีการอาหาร");//ถ้าเพิ่ม สาขาก็เพิ่มmenu[4] menu[5] = new Array(501, "วิศวกรรมการจัดการ", 502, "เทคโนโลยีอุตสาหกรรม (ต่อเนื่อง)"); menu[6] = new Array(601, "การแพทย์แผนไทยประยุกต์", 602, "สาธารณสุขศาสตร์",603,"ฟิสิกส์",604,"เคมี",605,"ชีววิทยา",606,"เทคโนโลยียางและพอลิเมอร์",607,"เทคโนโลยีสารสนเทศ",608,"วิทยาการคอมพิวเตอร์",609,"วิทยาศาสตร์สิ่งแวดล้อม",610,"คหกรรมศาสตร์",611,"ชีววิทยาประยุกต์",612,"คณิตศาสตร์และสถิติ"); menu[7] = new Array(701, "ออกแบบประยุกต์ศิลป์", 702, "นาฏยรังสรรค์",703,"ดนตรีสากล",704,"ดนตรีไทย",705,"ทัศนศิลป์"); menu[8] = new Array(801, "หลักสูตรและการสอน", 802, "การบริหารการศึกษา",803,"ยุทธศาสตร์การพัฒนา",804,"วิทยาศาสตร์ศึกษา",805,"สาธารณสุขชุมชน",806,"การจัดการเทคโนโลยีการเกษตร",807,"การบริหารธุรกิจ"); function showSubMenu(i)//อันนี้ไม่ต้องแก้ { box = document.f1.Branch; i++; while(box.options.length) box.options[0] = null; c = 0; for(m = 0; m < menu[i-1].length/2; m++) { if((document.f1.action.value == "post") && (menu[i-1][m*2] >= 0)) { box.options[c++] = new Option(menu[i-1][m*2+1], menu[i-1][m*2]); } else { box.options[c++] = new Option(menu[i-1][m*2+1], menu[i-1][m*2]); } } } </script> <script language="JavaScript"> // ตรวจสอบข้อมูลก่อนเพิ่ม function checkFields2() { missinginfo = ""; if (document.f1.Fname.value == "") { missinginfo += "\n - * ชื่อ"; } if (document.f1.Lname.value == "") { missinginfo += "\n - * สกุล"; } if (document.f1.Depart.value == "") { missinginfo += "\n - * สังกัด/คณะ"; } if (document.f1.Title.value == "") { missinginfo += "\n - * ชื่อเรื่อง"; } if (missinginfo != "") { missinginfo ="_____________________________\n" + "กรุณากรอกข้อมูลต่อไปนี้ :\n" + missinginfo + "\n_____________________________" + "\nกรุณากลับไปกรอกอีกครั้ง "; alert(missinginfo); return false; } else return true; } </script> <title>แบบฟอร์มแนะนำทรัพยากรเข้าห้องสมุด</title> </head> <style type="text/css"> .news_content { width:750px; float:right; } .news_menu { width:200px; float:left; height:800px; } .sidebar_menu { list-style: none; margin: 0 0 30px; padding: 0; } .sidebar_menu li { margin: 0; padding: 2px 0 3px 16px; background: url(./images/templatemo_list_01.png) no-repeat scroll 0 8px; border-bottom: 1px dotted #ccc } .sidebar_menu li a { font-size: 14px; } #sidebar h3 { font-size: 16px; padding: 0 0 15px 0; margin: 0 0 15px 0; background: url(./images/sidebar_header_bg.png) left bottom no-repeat } h1 { margin: 0 0 5px 0; padding: 10px 0 10px 10px; font-size: 24px; font-weight: normal; color: #ffffff; background: #26405b; } h2 { margin: 0 0 10px 0; padding: 5px 0 5px 10px; font-size: 16px; } h4 { margin: 0; padding: 3px 0 3px 10px; font-size: 18px; font-weight: bold; color: #03F; background: #EEE; } .section_02_box { float: left; width: 350px; border: 1px solid #CCCCCC; margin: 0 20px 0 0px; } .section_02_box .section_02_box_content{ float: left; padding: 15px; } .section_02_box_content .section_02_box_content_title { font-weight: bold; } .section_02_box_content ul{ clear: both; list-style: none; margin: 0; padding: 0; } .section_02_box_content ul li{ padding: 0 0 5px 15px; margin: 0; background: url(images/templatemo_listicon.gif) top left no-repeat; } .section_02_box img { float: left; margin: 3px 15px 0 0; } .cleaner_with_height { clear: both; width: 100%; height: 20px; } .style1 {color: #0000FF} </style> </head> <body> <!--start logo --> <div id="logo"> <? include "logo.php";?> </div> <!--end logo --> <!-- start nav --> <nav> <div id="nav"> <div id="content-nav"> <? include "navigator.php";?> </div> </div> </nav> <!-- start article --> <article> <div id="content"> <!-- start content --> <div class="content-title"> แบบฟอร์มแนะนำทรัพยากรเข้าห้องสมุด <img src="images/dot21.jpg" width="12px;"> <div class="content-line"></div> </div> <div class="content-text"> <div class="news_menu"> <ul class="sidebar_menu"> <li><a href="IntroForm_Index.php">แนะนำทรัพยากรเข้าห้องสมุด</a></li> <li><a href="IntroForm_Search.php">ค้นหาข้อมูลการแนะนำทรัพยากร</a></li> <li><a href="IntroForm_Publisher.php">ข้อมูลสำนักพิมพ์</a></li> <? include('IntroForm_Authen.php'); if(empty($numrows)) { ?> <li><a href="IntroForm_login.php">เข้าระบบ</a></li> <? } else { ?> <li><a href="IntroForm_logout.php">ออกจากระบบ</a></li> <? } ?> </ul> </div> <div class="news_content"> <? if(isset($_POST[Fname])) { $Fname=$_POST[Fname]; $Lname=$_POST[Lname]; $Depart=$_POST[Depart]; $MailUser=$_POST[MailUser]; $Tel=$_POST[Tel]; $pre=$_POST[pre]; include "connect_intro_resource.php"; $query=mysql_query("select * from user where Fname = '$Fname' and Lname='$Lname' "); $row=mysql_num_rows($query); if (empty($row)) { include "connect_intro_resource.php"; $MailUser=$_POST[MailUser]; $Tel=$_POST[Tel]; $Depart=$_POST[Depart]; mysql_query ("INSERT INTO `intro_resource`.`user` ( `Pre` , `Fname` , `Lname` , `Depart` , `MailUser` , `Tel` ) VALUES ( '$pre', '$Fname' ,'$Lname','$Depart','$MailUser','$Tel' ); ")or die ("ไม่สามารถเพิ่มข้อมูลได้ค่ะ1"); echo "เพิ่มข้อมูลเรียบร้อยแล้ว"; } if (!empty($row)) { if (!empty($Depart)) { mysql_query("update user set Depart='$Depart' where Fname = '$Fname' and Lname='$Lname'"); } if (!empty($MailUser)) { mysql_query("update user set MailUser='$MailUser' where Fname = '$Fname' and Lname='$Lname' "); } if (!empty($Tel)) { mysql_query("update user set Tel='$Tel' where Fname = '$Fname' and Lname='$Lname'"); } if (!empty($pre)) { mysql_query("update user set Pre='$pre' where Fname = '$Fname' and Lname='$Lname'"); } } include "connect_intro_resource.php"; $query=mysql_query("select * from introdetail where Title = '$Title' and Author='$Author' and Fname = '$Fname' and Lname='$Lname' "); $row=mysql_num_rows($query); if (empty($row)) { $SourceType=$_POST[SourceType]; $Publisher=$_POST[Publisher]; $Title=$_POST[Title]; $Author=$_POST[Author]; $Edition=$_POST[Edition]; $Year=$_POST[Year]; $NumWant=$_POST[NumWant]; $Price=$_POST[Price]; $Note=$_POST[Note]; $ISBN=$_POST[ISBN]; $date=date("Y:m:d"); $Title = addslashes ($Title); mysql_query ("INSERT INTO `intro_resource`.`introdetail` ( `IntroID` , `Fname` , `Lname` , `SourceType` , `Title` , `Author` , `Publisher` , `PulbilshYear` , `Edition` , `Note` , `Price` , `NumWant` , `SourceStatus` , `LibrarianNote` , `OrderType` , `CallNumber` , `IntroDate`, `ISBN` ) VALUES ( NULL , '$Fname', '$Lname', '$SourceType', '$Title', '$Author', '$Publisher', '$Year', '$Edition', '$Note', '$Price', '$NumWant', '1', '', '1', '', '$date', '$ISBN' ); ")or die ("ไม่สามารถเพิ่มข้อมูลได้ค่ะ22"); //echo "เพิ่มข้อมูลเรียบร้อยแล้ว"; } else {"ขออภัยค่ะ ไม่สามารถเพิ่มข้อมูลได้...เนื่องจากทรัพยากรซ้ำ";} $query=mysql_query("select * from user where Fname = '$Fname' and Lname='$Lname' "); $arr=mysql_fetch_array($query); $Pre =$arr[Pre]; $Depart =$arr[Depart]; $MailUser =$arr[MailUser]; $Tel =$arr[Tel]; $Pre =$arr[Pre]; } ?> <form action="IntroForm_Index.php" method="post" name="f1" onSubmit="return checkFields2();"> <? if(isset($_POST[Fname])) { echo " <h2> แนะนำทรัพยากรเพิ่มเติม </h2> "; echo " <p style='margin-left:20px;'> "; echo "<span class='style1'>ชื่อ-สกุล : </span> $Pre $Fname $Lname "; if (!empty($Depart)) { echo "<span class='style1'>สังกัด : </span>$Depart ";} if (!empty($MailUser)) { echo "<span class='style1'>อีเมล : </span>$MailUser ";} if (!empty($Tel)) { echo "<span class='style1'>เบอร์โทร : </span>$Tel ";} echo "<input name='Fname' id='Fname' type='hidden' value='$Fname'>"; echo "<input name='Lname' id='Lname' type='hidden' value='$Lname'>"; echo "<input name='Depart' id='Depart' type='hidden' value='$Depart'>"; echo "</p>"; } else { ?> <h2> ข้อมูลผู้แนะนำทรัพยากร </h2> <p style="margin-left:20px;"> <span class="style1">คำนำหน้า <select name="pre" id="pre"> <? $query2=mysql_query("select * from statustype where StatusTypeID = '$SourceStatus' "); $arr2=mysql_fetch_array($query2); $StatusTypeName=$arr2[StatusTypeName]; $StatusTypeID=$arr2[StatusTypeID]; $color=$arr2[color]; ?> <option value="">--กรุณาเลือก--</option> <option value="นางสาว">นางสาว</option> <option value="นาง">นาง</option> <option value="นาย">นาย</option> <option value="อาจารย์">อาจารย์</option> <option value="ศ.ดร.">ศ.ดร.</option> <option value="รศ.ดร.">รศ.ดร.</option> <option value="ผศ.ดร.">ผศ.ดร.</option> </select> **ชื่อ</span> <input name="Fname" id="Fname" type="text" /> <span class="style1"> **สกุล</span> <input name="Lname" id="Lname" type="text" /> </p> <p style="margin-left:20px;"> <span class="style1">**สังกัด</span> <input name="Depart" id="Depart" type="text"/> <span class="style1"> อีเมล</span> <input name="MailUser" id="MailUser" type="text" /> <span class="style1"> เบอร์โทร</span> <input name="Tel" id="Tel" type="text" /> </p> <? } ?> <h2> ข้อมูลทรัพยากร </h2> <p style="margin-left:20px;"> <span class="style1"> ประเภททรัพยากร</span> <select name="SourceType" id="SourceType"> <option value='1'>หนังสือ</option> <option value='2'>CD</option> <option value='3'>DVD</option> <option value='4'>VDO</option> <option value='5'>เทป</option> <option value='6'>ฐานข้อมูล</option> <option value='7'>อื่น ๆ</option> </select> <span class="style1">**ชื่อเรื่อง</span> <input name="Title" id="Title" type="text" size="60px;"/> <p style="margin-left:20px;"> <span class="style1"> ชื่อผู้แต่ง</span> <input name="Author" id="Author" type="text" size="38px;" /> <span class="style1">สำนักพิมพ์</span> <input name="Publisher" id="Publisher" type="text" size=35px;" /> </p> <p style="margin-left:20px;"> <span class="style1"> ISBN <input name="ISBN" id="ISBN" type="text"size="7px;" /> ปีที่พิมพ์</span> <input name="Year" id="Year" type="text"size="5px;" /> <span class="style1"> ครั้งที่พิมพ์ </span> <input name="Edition" id="Edition" type="text" size="5px;"/> <span class="style1"> จำนวนที่ต้องการ <input name="NumWant" id="NumWant" type="text"size="5px;" /> ราคา <input name="Price" id="Price" type="text" size="5px;" /> (บาท/หน่วย)</span> </p> <p style="margin-left:20px;"> <span class="style1"> รายละเอียดอื่น ๆ (ถ้ามี)</span></p> <p style="margin-left:20px;"> <textarea name="Note" cols="80" rows="5"></textarea> </p> <p style="margin-left:20px;"> <input name="" type="submit" value="แนะนำทรัพยากร" /> <input name="" type="reset" value="ยกเลิก" /> </p> </form > <? if (isset($Fname)) { $query=mysql_query("select * from introdetail where Fname = '$Fname' and Lname='$Lname'"); $row=mysql_num_rows($query); if (!empty($row)) { ?> <h1> ข้อมูลทรัพยากรที่แนะนำโดย <? echo "$Fname $Lname";?></h1> <table width="100%" border="0" cellpadding="3" cellspacing="0"> <tr bgcolor="#063171"> <td align="center" valign="middle"><font color="#FFFFFF"><strong>ลำดับที่</strong></font></td> <td align="center" valign="middle"><font color="#FFFFFF"><strong>ชื่อเรื่อง</strong></font></td> <td align="center" valign="middle"><font color="#FFFFFF"><strong>ชื่อผู้แต่ง</strong></font></td> <td align="center" valign="middle"><font color="#FFFFFF"><strong>สถานะการดำเนินการ</strong></font></td> </tr> <? for ($i=1;$i<=$row;$i++) { $arr=mysql_fetch_array($query); $IntroID=$arr[IntroID]; $Fname=$arr[Fname]; $Lname=$arr[Lname]; $Title =$arr[Title]; $Author =$arr[Author]; $Publisher =$arr[Publisher]; $PulbilshYear =$arr[PulbilshYear]; $SourceStatus =$arr[SourceStatus]; $query2=mysql_query("select * from statustype where StatusTypeID = '$SourceStatus' "); $arr2=mysql_fetch_array($query2); $StatusTypeName=$arr2[StatusTypeName]; $StatusTypeID=$arr2[StatusTypeID]; $color=$arr2[color]; if ($i%2==0) { $cr="#fffce6"; } else { $cr="#FFFFFF"; } echo "<tr bgcolor='$cr'>"; echo "<td align='center'>$i</td>"; echo "<td>$Title</td>"; echo "<td>$Author</td>"; echo "<td bgcolor=$color>$StatusTypeName </td>"; echo "</tr>"; echo "<tr><td colspan='6'> </tr>"; } ?> </table> <? } } ?> </div> <!-- end news_content --> </div> <!-- end content-text --> </div> <!-- end content --> </article> <footer> <? include "footer.php";?> </footer> </body> </html>