Hacked By AnonymousFox

Current Path : C:/AppServ/www/timetable_student/home/
Upload File :
Current File : C:/AppServ/www/timetable_student/home/selectdate1.php

<? 
include("../lib/session.php");
include("../lib/config.php");
include("../lib/connect.php");
include("../lib/function.php");
include("../lib/register_global.php");

$sqltotal="select * from evaluate_subject where evaluate_subject_StudentID='$System_Session_User_ID'";
$querytotal=mysql_query($sqltotal);
$numtotal=mysql_num_rows($querytotal);

$sqltotalcourse="select * from evaluate_system_course group by evaluate_system_course_Subject";
$querytotalcourse=mysql_query($sqltotalcourse);
$rowtotalcourse=mysql_num_rows($querytotalcourse);
$numtotalcourse=$rowtotalcourse;
$percentage=($numtotal/$numtotalcourse)*100; 

?>
<!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=windows-874" />
<title>ระบบประเมินรายวิชา/การสอนอาจารย์ </title>
<script type="text/javascript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<link href="../css/menu.css" rel="stylesheet" type="text/css" />
<link href="../css/font.css" rel="stylesheet" type="text/css" />
<link href="../css/piya_style.css" rel="stylesheet" type="text/css" />
<link href="../css/table.css" rel="stylesheet" type="text/css" />
<style>
.input1{ 

background: #006600; 

font-family:Tahoma, Geneva, sans-serif; 

font-size:14px;  

padding: 5px 10px 5px 10px; 

color: #fff; 

font-weight: bold; 

-moz-border-radius: 6px; 

-webkit-border-radius: 6px; 

-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5); 

-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5); 

text-shadow: 0 -1px 1px rgba(0,0,0,0.25); 

border-bottom: 1px solid rgba(0,0,0,0.25); 

border-left:none; 

border-top:none; 

margin:10px 0 10px 0; 

} 

.input1:hover{ 

background: #62A062; 

}

.input2{ 

background:#F50000; 

font-family:Tahoma, Geneva, sans-serif; 

font-size:14px;  

padding: 5px 10px 5px 10px; 

color: #fff; 

font-weight: bold; 

-moz-border-radius: 6px; 

-webkit-border-radius: 6px; 

-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5); 

-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5); 

text-shadow: 0 -1px 1px rgba(0,0,0,0.25); 

border-bottom: 1px solid rgba(0,0,0,0.25); 

cursor: pointer; 

border-left:none; 

border-top:none; 

margin:10px 0 10px 0; 

} 

.input2:hover{ 

background:#FF4B1A; 

}
.input3{ 

background: #999999; 

font-family:Tahoma, Geneva, sans-serif; 

font-size:14px;  

padding: 5px 10px 5px 10px; 

color: #fff; 

font-weight: bold; 

-moz-border-radius: 6px; 

-webkit-border-radius: 6px; 

-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5); 

-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5); 

text-shadow: 0 -1px 1px rgba(0,0,0,0.25); 

border-bottom: 1px solid rgba(0,0,0,0.25); 

border-left:none; 

border-top:none; 

margin:10px 0 10px 0; 

} 

.input3:hover{ 

background: #D5D5D5; 

}
.input31 {
background: #999999; 

font-family:Tahoma, Geneva, sans-serif; 

font-size:14px;  

padding: 5px 10px 5px 10px; 

color: #fff; 

font-weight: bold; 

-moz-border-radius: 6px; 

-webkit-border-radius: 6px; 

-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5); 

-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5); 

text-shadow: 0 -1px 1px rgba(0,0,0,0.25); 

border-bottom: 1px solid rgba(0,0,0,0.25); 

border-left:none; 

border-top:none; 

margin:10px 0 10px 0; 
}
.graph { 
position: relative; /* IE is dumb */
width: 400px; 
border: 1px solid #000000; 
padding: 2px; 
}
.graph .barred { 
display: block;
position: relative;
background: #FFA29B; 
text-align: center; 
color: #333; 
height: 2em; 
line-height: 2em; 
}
.graph .bargreen { 
display: block;
position: relative;
background: #89B889; 
text-align: center; 
color: #333; 
height: 2em; 
line-height: 2em; 
}
.graph .bar span { position: absolute; left: 1em; }
</style>
</head>

<body onload="MM_preloadImages('../images/menu/menu_03.png','../images/menu/menu_01_over.png','../images/menu/menu_05_over.png')">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="100" align="center" background="../images/head/sky.jpg" ><img src="../images/head/Sirirajlogo.gif" width="126" height="120" /></td>
  </tr>
  <tr>
    <td height="22" background="../images/head/bar.jpg"><table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td>
		<table border="0" align="right" cellpadding="0" cellspacing="0" class="login">
            <tr>
              <td align="right"><img src="../images/icon/people_1.png" width="13" height="14" />ยินดีต้อนรับ ! 
                <?=$System_Session_FullName?> เข้าสู่ระบบ  |  <img src="../images/icon/door.png" width="16" height="15" /><a href="../system/logout.php">ออกจากระบบ</a></td>
              </tr>
            </table>        </td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td align="center" valign="top"><br />
      <table width="90%" border="0">
      <tr>
        <td bgcolor="#FFFFFF"><br />
          <table width="90%" border="0" align="center">
            <tr>
              <td height="70"><div align="left">
                <table width="51%" border="2" align="left" bordercolor="#B00000" style="border-collapse:collapse">
                  <tr>
                    <td width="30%" bgcolor="#FF9595"><div align="center"><strong>เปอร์เซนต์การประเมิน</strong></div></td>
                    <td width="70%"><div class="graph"> <strong id="progress" <? if($percentage<80){?>class="barred"<? }else{ ?>class="bargreen"<? } ?> style="width: 0%;"><span id="val">0</span></strong> 
<script>
function setProgess()
{
var currentWidth = parseInt(document.getElementById("progress").style.width);
var newWidth = currentWidth+1;

if(newWidth <= <?=$percentage?>)
{
document.getElementById("progress").style.width = newWidth+"%";
document.getElementById("val").innerHTML = newWidth+"%";
setTimeout("setProgess()",1);
}
}
setProgess();
</script>
</td>
                  </tr>
                </table>
              </div>
                </td>
            </tr>
          </table>
          <br />
            <table width="90%" border="1" align="center" style="border-collapse:collapse" bordercolor="#000000">
            <tr>
              <td width="58%">&nbsp;</td>
              <td width="23%" bgcolor="#E0E0E0"><div align="center"><strong>ประเมินรายวิชา</strong></div></td>
              <td width="19%" bgcolor="#E0E0E0"><div align="center"><strong>ประเมินอาจารย์</strong></div></td>
            </tr>
            
            
            
            <? 
			$sql="select * from evaluate_system_course group by evaluate_system_course_Date order by evaluate_system_course_Date asc";
			$query=mysql_query($sql);
			while($row=mysql_fetch_array($query)){
			?>
            <tr>
              <td colspan="3" <? if($row[evaluate_system_course_Typeday]=="1"){ ?>bgcolor="#FFFFCC"<? } if($row[evaluate_system_course_Typeday]=="2"){ ?>bgcolor="#FFCCFF"<? } if($row[evaluate_system_course_Typeday]=="3"){ ?>bgcolor="#BFFFBF"<? } if($row[evaluate_system_course_Typeday]=="4"){ ?>bgcolor="#FFCC99"<? } if($row[evaluate_system_course_Typeday]=="5"){ ?>bgcolor="#A6EDFF"<? } ?>><div align="left"><strong>
                <? if($row[evaluate_system_course_Typeday]=="1"){ echo"วันจันทร์"; } if($row[evaluate_system_course_Typeday]=="2"){ echo"วันอังคาร"; } if($row[evaluate_system_course_Typeday]=="3"){ echo"วันพุธ"; } if($row[evaluate_system_course_Typeday]=="4"){ echo"วันพฤหัสบดี"; } if($row[evaluate_system_course_Typeday]=="5"){ echo"วันศุกร์"; } ?> 
                <?=ShowDateLongTh($row[evaluate_system_course_Date])?>
              </strong></div></td>
              </tr>
              
               <? 
			$sql1="select * from evaluate_system_course where evaluate_system_course_Date ='$row[evaluate_system_course_Date]' group by evaluate_system_course_Time order by evaluate_system_course_Time asc";
			$query1=mysql_query($sql1);
			while($row1=mysql_fetch_array($query1)){
			?>
            <tr>
              <td><div align="center" class="title2">เวลา <?=$row1[evaluate_system_course_Time]?>
                <br />
                SIID 
                <?=$row1[evaluate_system_course_Siid]?>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;
                <?=$row1[evaluate_system_course_Type]?> 
                <?=$row1[evaluate_system_course_Hour]?>
                </span></b><br />
                    <?=$row1[evaluate_system_course_Subject]?>
                </span></b></span>
                </div>
              </td>
              <td>
              <div align="center">
			  <?
			  if($row1[evaluate_system_course_Statussubject]=="0")
			  {
			  $today_date=date("Ymd"); 
			  	$a1f1=substr($row1[evaluate_system_course_Date],0,4);
				$a1f2=substr($row1[evaluate_system_course_Date],5,2);
				$a1f3=substr($row1[evaluate_system_course_Date],8,2);
				$totala1=$a1f1.$a1f2.$a1f3;
			   if($totala1<=$today_date){ ?>
			  <? $sqlnumc="select * from evaluate_subject where evaluate_subject_CourseID='$row1[evaluate_system_course_ID]' and evaluate_subject_StudentID='$System_Session_User_ID'";
			  $querynumc=mysql_query($sqlnumc);
			  $numc=mysql_num_rows($querynumc);
			  if($numc=="0")
			  { ?>
              <form method="post" action="eva1.php">
              <input type="hidden" name="SIID" value="<?=$row1[evaluate_system_course_Siid]?>" />
              <input type="hidden" name="Subject" value="<?=$row1[evaluate_system_course_Subject]?>" />
              <input type="hidden" name="Idcourse" value="<?=$row1[evaluate_system_course_ID]?>" />
                <input type="submit" name="button" id="button" value="ยังไม่ได้ประเมินรายวิชา" class="input2" /> </form> <? }  if($numc=="1") {?><input type="submit" name="button" id="button" value="ประเมินรายวิชาแล้ว" class="input1" /><? } } else {?>
                <input type="submit" name="button" id="button" value="ยังไม่ถึงวันประเมิน" class="input3" /> 
                <? } }else{?>
                
                -
                <? } ?>
              </div></td>
              <td><div align="center">
             <br />
             <?
               $sqlcount1="select * from evaluate_system_course where evaluate_system_course_Date='$row1[evaluate_system_course_Date]' and evaluate_system_course_Time ='$row1[evaluate_system_course_Time]'";
			$querycount1=mysql_query($sqlcount1);
			while($rowcount1=mysql_fetch_array($querycount1)){

			  if($rowcount1[evaluate_system_course_Statusteacher]=="0")
			  {
			  $today_date=date("Ymd"); 
			  	$a1f1=substr($row1[evaluate_system_course_Date],0,4);
				$a1f2=substr($row1[evaluate_system_course_Date],5,2);
				$a1f3=substr($row1[evaluate_system_course_Date],8,2);
				$totala1=$a1f1.$a1f2.$a1f3;
			   if($totala1<=$today_date){ 
              $sqlnumc="select * from evaluate_teacher where evaluate_teacher_CourseID='$rowcount1[evaluate_system_course_ID]' and evaluate_teacher_StudentID='$System_Session_User_ID'";
			  $querynumc=mysql_query($sqlnumc);
			  $numc=mysql_num_rows($querynumc);
			  if($numc=="0")
			  { ?>
             
             <form method="post" action="eva2.php">
              <input type="hidden" name="Teacher" value="<?=$rowcount1[evaluate_system_course_Teacher]?>" />
              <input type="hidden" name="Subject" value="<?=$rowcount1[evaluate_system_course_Subject]?>" />
              <input type="hidden" name="Date" value="<?=$rowcount1[evaluate_system_course_Date]?>" />
              <input type="hidden" name="Time" value="<?=$rowcount1[evaluate_system_course_Time]?>" />
              <input type="hidden" name="Hour" value="<?=$rowcount1[evaluate_system_course_Hour]?>" />
              <input type="hidden" name="Type" value="<?=$rowcount1[evaluate_system_course_Type]?>" />
              <input type="hidden" name="Faculty" value="<?=$rowcount1[evaluate_system_course_Faculty]?>" />
              <input type="hidden" name="Idcourse" value="<?=$rowcount1[evaluate_system_course_ID]?>" />
              <input type="submit" name="button2" id="button2" value="ยังไม่ได้ประเมิน <?=$rowcount1[evaluate_system_course_Teacher]?>" class="input2" />
                </form>
                <? }  if($numc=="1") {?><input type="submit" name="button" id="button" value="ประเมิน <?=$rowcount1[evaluate_system_course_Teacher]?> แล้ว" class="input1" /><? } } else {?>
                <input type="submit" name="button3" id="button3" value="ยังไม่ถึงวันประเมิน" class="input31" />
                <br /> 
                <? } } ?>
               <? } ?>
              <br />
</div></td>
            </tr>
            <? } ?>
            <? } ?>
          </table>
          <p>&nbsp;</p>
          <p>&nbsp;</p>
          <p>&nbsp;</p>
          <p>&nbsp;</p></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>

Hacked By AnonymousFox1.0, Coded By AnonymousFox