<? require "config.php"; require "connect.php"; if($_POST['command']=="add"){ $sqladd = "insert into member values('','".$_POST['inputmember_gender']."', '".$_POST['inputmember_name']."', '".$_POST['inputmember_nickname']."','".$_POST['inputmember_education']."','".$_POST['inputmember_attend']."','".$_POST['inputmember_graduate']."','".$_POST['inputmember_skill']."' ,'".$_POST['inputmember_career']."','".$_POST['inputmember_email']."','".$_FILES["inputmember_image"]["name"]."')"; mysql_query($sqladd); ?> <script> alert('เพิ่มข้อมูลเรียบร้อย'); window.location="index.php"; </script> <? } ?> <br> <center><h2>ค้นหาข้อมูลสมาชิก</h2></center> <form action="index.php?option=com_jumi&view=application&fileid=4" method="post" enctype="multipart/form-data" > <center><table cellpadding="10" align="center"> <td> <B>ค้นหาจากปีที่เข้ารับการศึกษา : </td><td> <select name="input_attend"> <option value="">เลือกทั้งหมด</option> <? $sql = "select distinct member_attend from member"; $rs = mysql_query($sql); while($row=mysql_fetch_array($rs)){ ?> <option value="<?=$row["member_attend"]?>"><?=$row["member_attend"]?></option> <? } ?> </select> </td> <tr> <td> <B>ค้นหาจากชื่อ-นามสกุล : </td><td><input type="text" name="input_name" size="50"></td> </tr> <tr> <td> <b>สาขาวิชา : </td><td> <select name="input_education"> <option value="">เลือกทั้งหมด</option> <option value="ไฟฟ้า">ไฟฟ้า</option> <option value="อิเล็กทรอนิกส์">อิเล็กทรอนิกส์</option> <option value="คอมพิวเตอร์">คอมพิวเตอร์</option> <option value="มัลติมีเดียและระบบอินเตอร์เน็ต">มัลติมีเดียและระบบอินเตอร์เน็ต</option> </select> </td> </tr> <td colspan="2" align="center"> <input type="hidden" name="command" value="view"><input type="submit" value="ค้นหา"> </td> </tr> <tr> <td colspan="2" align="center"> <font color = "red"> * ไม่ป้อนข้อมูลจะเป็นการแสดงข้อมูลทั้งหมด </font> </td> </tr> </table></center> </form><hr /> <? if($_POST['command']=="view"){ ?> <center><table width="574" align="center" cellpadding="10"> <tr> <td width="49" align="center"><B>ลำดับที่</td> <td width="135" align="center"><B>ชื่อ-นามสกุล</td> <td width="88" align="center"><B>สาขาวิชา</td> <td width="88" align="center"><B>ปีที่เข้ารับการศึกษา</td> <td width="64" align="center"><B>ติดต่อ</td> </tr> <? if($_POST['input_name']<>"")$where1 = " and member_name like '%".$_POST['input_name']."%' "; if($_POST['input_education']<>"")$where2 = " and member_education like '%".$_POST['input_education']."%' "; if($_POST['input_attend']<>"")$where3 = " and member_attend = '".$_POST['input_attend']."' "; if( 'sortgraduate' == "g" )$where4 = " ORDER BY member.member_graduate ASC "; if( 'sortname' == true )$where5 =" ORDER BY member.member_name ASC "; $sql2 = "select * from member where member_id <> '' $where1 $where2 $where3 $where4 $where5 "; $rs2 = mysql_query($sql2); $i = 1; while($row2=mysql_fetch_array($rs2)){ ?> <tr> <td align="center"><?=$i?></td><td align="center"><?=$row2["member_name"]?></td> <td align="center"><?=$row2["member_education"]?></td> <td align="center"><?=$row2["member_attend"]?></td> <td align="center"><div align="center"><a href="contact.php?id=<?=$row2["member_id"]?>" target="_blank"> ติดต่อ </a> </tr> <? $i++;} ?> </table></center> <? } ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง