| Server IP : 27.254.66.5 / Your IP : 216.73.217.39 Web Server : Apache/2 System : Linux cs82.hostneverdie.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64 User : technic2 ( 1951) PHP Version : 7.4.30 Disable Function : apache_child_terminate, apache_setenv, define_syslog_variables, escapeshellarg, escapeshellcmd,exec, fp, fput, highlight_file, ini_alter, ini_restore, inject_code, passthru,phpAds_remoteInfo, phpAds_XmlRpc,phpAds_xmlrpcDecode, phpAds_xmlrpcEncode, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid,posix_setuid, posix_setuid, posix_uname,proc_open,proc_close, proc_get_status, proc_nice, proc_terminate, shell_exec, syslog, system, xmlrpc_entity_decode, show_source,sleep,pcntl_exec,virtual,suexec,dbmopen,dl,symlink,disk_free_space,diskfreespace,leak MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/technic2/domains/technicrayong.ac.th/public_html/old-website/jivec58/chachoengsao/ |
Upload File : |
<?php
Ob_start();
session_start();
if ($_SESSION["osj_name"] == "no" or $_SESSION["osj_name"] == "")
{
header("Location:../index.php");
}
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>สิ่งประดิษฐ์ของคนรุ่นใหม่</title>
<style type="text/css">
.FontTahoma {font-family: Tahoma, Geneva, sans-serif;
}
</style>
</head>
<body bgcolor="#FFCC66">
<form name="form1" id="form1" method="post" action="checklogin.php" onSubmit="JavaScript:return fncSubmit();">
<table border="0" align="center" cellpadding="0" cellspacing="0" width="1000">
<tr>
<td width="994" colspan="2"><br><table border="0" align="center" cellpadding="0" cellspacing="0" width="1000">
<tr>
<td align="center" ><img src="vec_logo.png" width="170" height="169"></td>
<td><div align="center">
<br>
<h2 class="FontTahoma">ระบบบันทึก</h2>
<span class="FontTahoma">
<?php
require_once("header.php");
?>
</span><br>
</div></td>
<td align="center"><img src="inventor_logo.png" width="170" height="169"></td>
</tr></table></td>
</tr>
<tr class="FontTahoma">
<td><p> </p>
<div align="center">คุณเข้าในงานในชื่อ <?php echo $_SESSION["osj_name"]; ?><br><br>
โปรดเลือกรายการที่ต้องการ<br><br>
</div>
<div align = "center">
<h4></h4>
<h4></h4>
<br>
</div>
<table border="1" align="center" cellpadding="0" cellspacing="0" class="FontTahoma">
<tr>
<td align="center"><a href="add.php">ป้อนข้อมูลใบสมัคร</a></td>
</tr>
<tr>
<td align="center"><a href="display.php">ดูข้อมูลที่เคยป้อนแล้ว</a></td>
</tr>
<tr>
<td align="center"><a href="logout.php">ออกจากระบบ</a></td>
</tr>
</table></td>
<tr class="FontTahoma">
<td align="center"><p><strong>สรุปยอดการสมัครส่งผลงานเข้าประกวด</strong></p>
<table width="700" border="1" cellspacing="0" cellpadding="0">
<tr>
<th bgcolor="#FF9966">ประเภท</th>
<th bgcolor="#FF9966">ระดับ ปวช.</th>
<th bgcolor="#FF9966">ระดับ ปวส.</th>
<th bgcolor="#FF9966">รวม</th>
</tr>
<?php
require_once("config.php");
$sql = "select invention_type, sum(invention_level like 'ปวช.' ) as L1, sum(invention_level like 'ปวส.' ) as L2, sum(invention_level like 'ปวช.' or invention_level like 'ปวส.' ) as L3 from jivec where vocational_name='" . $_SESSION["osj_name"] . "' group by invention_type";
$result = mysql_query($sql) or die ("คำสั่ง sql ผิด");
?>
<?php
$TL1 = 0;
$TL2 = 0;
$TL3 = 0;
$x = 0;
while ($row = mysql_fetch_array($result))
{
$TL1 += $row["L1"];
$TL2 += $row["L2"];
$TL3 += $row["L3"];
$x++;
$class = ($x%2 == 0)? '#FFCC99': '#FFFF99';
?>
<tr bgcolor="<?php echo $class; ?>">
<td><?php echo $row["invention_type"]; ?></td>
<td align="center"><?php echo $row["L1"]; ?></td>
<td align="center"><?php echo $row["L2"]; ?></td>
<td align="center"><?php echo $row["L3"]; ?></td>
</tr>
<?php
}
?>
<tr>
<td align="center" bgcolor="#FF9966"><strong>รวม</strong></td>
<td align="center" bgcolor="#FF9966"><?php echo $TL1; ?></td>
<td align="center" bgcolor="#FF9966"><?php echo $TL2; ?></td>
<td align="center" bgcolor="#FF9966"><?php echo $TL3; ?></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center">
<p><strong>สรุปภาพรวมรายวิทยาลัย</strong></p>
<table width="900" border="1" cellspacing="0" cellpadding="0">
<tr>
<th bgcolor="#FF9966">ลำดับที่</th>
<th bgcolor="#FF9966">ชื่อวิทยาลัย</th>
<th bgcolor="#FF9966">ป 1</th>
<th bgcolor="#FF9966">ป 2</th>
<th bgcolor="#FF9966">ป 3</th>
<th bgcolor="#FF9966">ป 4</th>
<th bgcolor="#FF9966">ป 5</th>
<th bgcolor="#FF9966">ป 6</th>
<th bgcolor="#FF9966">ป 7</th>
<th bgcolor="#FF9966">ป 8</th>
<th bgcolor="#FF9966">ป 9</th>
<th bgcolor="#FF9966">ป 10</th>
<th bgcolor="#FF9966">ป 11</th>
<th bgcolor="#FF9966">รวม</th>
</tr>
<?php
//$con = mysql_connect("localhost", "root", "prakit992508*") or die ("เชื่อต่อฐานข้อมูลไม่ได้");
//mysql_select_db("jivec", $con) or die ("ติดต่อก้อนฐานข้อมูลไม่ได้");
//mysql_query("set names utf8");
require_once("config.php");
$sql2 = "select invention.invention_type_id, jivec.college_name, sum(invention.invention_type_id = 1) as p1, sum(invention.invention_type_id = 2) as p2, sum(invention.invention_type_id = 3) as p3, sum(invention.invention_type_id = 4) as p4, sum(invention.invention_type_id = 5) as p5, sum(invention.invention_type_id = 6) as p6, sum(invention.invention_type_id = 7) as p7, sum(invention.invention_type_id = 8) as p8, sum(invention.invention_type_id = 9) as p9, sum(invention.invention_type_id = 10) as p10, sum(invention.invention_type_id = 11) as p11 from invention, jivec WHERE invention.invention_type_name = jivec.invention_type and vocational_name='" . $_SESSION["osj_name"] . "' group by college_name";
$result2 = mysql_query($sql2) or die ("คำสั่ง sql ผิด");
?>
<?php
$Tp1 = 0;
$Tp2 = 0;
$Tp3 = 0;
$Tp4 = 0;
$Tp5 = 0;
$Tp6 = 0;
$Tp7 = 0;
$Tp8 = 0;
$Tp9 = 0;
$Tp10 = 0;
$Tp11 = 0;
$count = 0;
$x = 0;
while ($row2 = mysql_fetch_array($result2))
{
$Tp1 += $row2["p1"];
$Tp2 += $row2["p2"];
$Tp3 += $row2["p3"];
$Tp4 += $row2["p4"];
$Tp5 += $row2["p5"];
$Tp6 += $row2["p6"];
$Tp7 += $row2["p7"];
$Tp8 += $row2["p8"];
$Tp9 += $row2["p9"];
$Tp10 += $row2["p10"];
$Tp11 += $row2["p11"];
$count += 1;
$x++;
$class = ($x%2 == 0)? '#FFCC99': '#FFFF99';
?>
<tr bgcolor="<?php echo $class; ?>">
<td align="center"><?php echo $count; ?></td>
<td><?php echo $row2["college_name"]; ?></td>
<td align="center"><?php echo $row2["p1"]; ?></td>
<td align="center"><?php echo $row2["p2"]; ?></td>
<td align="center"><?php echo $row2["p3"]; ?></td>
<td align="center"><?php echo $row2["p4"]; ?></td>
<td align="center"><?php echo $row2["p5"]; ?></td>
<td align="center"><?php echo $row2["p6"]; ?></td>
<td align="center"><?php echo $row2["p7"]; ?></td>
<td align="center"><?php echo $row2["p8"]; ?></td>
<td align="center"><?php echo $row2["p9"]; ?></td>
<td align="center"><?php echo $row2["p10"]; ?></td>
<td align="center"><?php echo $row2["p11"]; ?></td>
<td align="center"><?php echo ($row2["p1"] + $row2["p2"] + $row2["p3"] + $row2["p4"] + $row2["p5"] + $row2["p6"] + $row2["p7"] + $row2["p8"] + $row2["p9"] + $row2["p10"] + $row2["p11"]); ?></td>
</tr>
<?php
}
?>
<tr>
<td colspan="2" align="center" bgcolor="#FF9966"><strong>รวม</strong></td>
<td align="center" bgcolor="#FF9966"><?php echo $Tp1; ?></td>
<td align="center" bgcolor="#FF9966"><?php echo $Tp2; ?></td>
<td align="center" bgcolor="#FF9966"><?php echo $Tp3; ?></td>
<td align="center" bgcolor="#FF9966"><?php echo $Tp4; ?></td>
<td align="center" bgcolor="#FF9966"><?php echo $Tp5; ?></td>
<td align="center" bgcolor="#FF9966"><?php echo $Tp6; ?></td>
<td align="center" bgcolor="#FF9966"><?php echo $Tp7; ?></td>
<td align="center" bgcolor="#FF9966"><?php echo $Tp8; ?></td>
<td align="center" bgcolor="#FF9966"><?php echo $Tp9; ?></td>
<td align="center" bgcolor="#FF9966"><?php echo $Tp10; ?></td>
<td align="center" bgcolor="#FF9966"><?php echo $Tp11; ?></td>
<td align="center" bgcolor="#FF9966"><?php echo ($Tp1 + $Tp2 + $Tp3 + $Tp4 + $Tp5 + $Tp6 + $Tp7 + $Tp8 + $Tp9 + $Tp10 + $Tp11); ?></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center">
<p><strong>สรุปจำนวนผู้เข้าร่วมงาน ราย อศจ.</strong></p>
<table width="900" border="1" cellspacing="0" cellpadding="0">
<tr>
<th bgcolor="#FF9966">ลำดับที่</th>
<th bgcolor="#FF9966">ชื่อ อศจ.</th>
<th bgcolor="#FF9966">นักศึกษาชาย</th>
<th bgcolor="#FF9966">นักศึกษาหญิง</th>
<th bgcolor="#FF9966">ครูที่ปรึกษาชาย</th>
<th bgcolor="#FF9966">ครูที่ปรึกษาหญิง</th>
<th bgcolor="#FF9966">รวม</th>
</tr>
<?php
//$con = mysql_connect("localhost", "root", "prakit992508*") or die ("เชื่อต่อฐานข้อมูลไม่ได้");
//mysql_select_db("jivec", $con) or die ("ติดต่อก้อนฐานข้อมูลไม่ได้");
//mysql_query("set names utf8");
require_once("config.php");
$sql4 = "select vocational_name, sum(male_student_amount) as n1, sum(female_student_amount) as n2, sum(male_advisor_amount) as n3, sum(female_advisor_amount) as n4 from jivec where vocational_name='" . $_SESSION["osj_name"] . "' group by vocational_name";
$result4 = mysql_query($sql4) or die ("คำสั่ง sql ผิด");
?>
<?php
$Tn1 = 0;
$Tn2 = 0;
$Tn3 = 0;
$Tn4 = 0;
$count = 0;
$x = 0;
while ($row4 = mysql_fetch_array($result4))
{
$Tn1 += $row4["n1"];
$Tn2 += $row4["n2"];
$Tn3 += $row4["n3"];
$Tn4 += $row4["n4"];
$count += 1;
$x++;
$class = ($x%2 == 0)? '#FFCC99': '#FFFF99';
?>
<tr bgcolor="<?php echo $class; ?>">
<td align="center"><?php echo $count; ?></td>
<td><?php echo $row4["vocational_name"]; ?></td>
<td align="center"><?php echo $row4["n1"]; ?></td>
<td align="center"><?php echo $row4["n2"]; ?></td>
<td align="center"><?php echo $row4["n3"]; ?></td>
<td align="center"><?php echo $row4["n4"]; ?></td>
<td align="center"><?php echo ($row4["n1"] + $row4["n2"] + $row4["n3"] + $row4["n4"]); ?></td>
</tr>
<?php
}
?>
<tr>
<td colspan="2" align="center" bgcolor="#FF9966"><strong>รวม</strong></td>
<td align="center" bgcolor="#FF9966"><?php echo $Tn1; ?></td>
<td align="center" bgcolor="#FF9966"><?php echo $Tn2; ?></td>
<td align="center" bgcolor="#FF9966"><?php echo $Tn3; ?></td>
<td align="center" bgcolor="#FF9966"><?php echo $Tn4; ?></td>
<td align="center" bgcolor="#FF9966"><?php echo ($Tn1 + $Tn2 + $Tn3 + $Tn4); ?></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center">
<p><strong>สรุปรายละเอียดเพิ่มเติม</strong></p>
<table width="900" border="1" cellspacing="0" cellpadding="0">
<?php
require_once("config.php");
$sql5 = "select sum(power220v != '') as u1, sum(power380v != '') as u2, sum(use_water != '') as u3, sum(use_gas != '') as u4, sum(use_fuel_engine != '') as u5, sum(pollution like 'มีมลพิษ') as u6, sum(have_noise != '') as u7, sum(have_exhaust != '') as u8, sum(have_smoke != '') as u9 from jivec where vocational_name='" . $_SESSION["osj_name"] . "'";
$result5 = mysql_query($sql5) or die ("คำสั่ง sql ผิด");
?>
<?php
while ($row5 = mysql_fetch_array($result5))
{
?>
<tr>
<td bgcolor="#FF9966">ใช้ไฟฟ้า 220V</td>
<td bgcolor="#FFCC99" align="center"><?php echo $row5["u1"]; ?></td>
<td bgcolor="#FFFF99" align="center">ชิ้น</td>
</tr>
<tr>
<td bgcolor="#FF9966">ใช้ไฟฟ้า 380V</td>
<td bgcolor="#FFCC99" align="center"><?php echo $row5["u2"]; ?></td>
<td bgcolor="#FFFF99" align="center">ชิ้น</td>
</tr>
<tr>
<td bgcolor="#FF9966">ใช้น้ำประปา</td>
<td bgcolor="#FFCC99" align="center"><?php echo $row5["u3"]; ?></td>
<td bgcolor="#FFFF99" align="center">ชิ้น</td>
</tr>
<tr>
<td bgcolor="#FF9966">ใช้แก๊สหุงต้ม</td>
<td bgcolor="#FFCC99" align="center"><?php echo $row5["u4"]; ?></td>
<td bgcolor="#FFFF99" align="center">ชิ้น</td>
</tr>
<tr>
<td bgcolor="#FF9966">ใช้เชื้อเพลิง</td>
<td bgcolor="#FFCC99" align="center"><?php echo $row5["u5"]; ?></td>
<td bgcolor="#FFFF99" align="center">ชิ้น</td>
</tr>
<tr>
<td bgcolor="#FF9966">มีมลพิษ</td>
<td bgcolor="#FFCC99" align="center"><?php echo $row5["u6"]; ?></td>
<td bgcolor="#FFFF99" align="center">ชิ้น</td>
</tr>
<tr>
<td bgcolor="#FF9966">มีเสียงดัง</td>
<td bgcolor="#FFCC99" align="center"><?php echo $row5["u7"]; ?></td>
<td bgcolor="#FFFF99" align="center">ชิ้น</td>
</tr>
<tr>
<td bgcolor="#FF9966">มีไอเสีย</td>
<td bgcolor="#FFCC99" align="center"><?php echo $row5["u8"]; ?></td>
<td bgcolor="#FFFF99" align="center">ชิ้น</td>
</tr>
<tr>
<td bgcolor="#FF9966">มีควันไฟ</td>
<td bgcolor="#FFCC99" align="center"><?php echo $row5["u9"]; ?></td>
<td bgcolor="#FFFF99" align="center">ชิ้น</td>
</tr>
<?php
}
?>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>