<?
  class CEVENT{
  
    var $id,$secid,$wkDay,$pcInTime,$pcOutTime;
  
    function CTIMETABLE($pid){
        global $conn;
        
	  $query = "SELECT * FROM xoops_pc_timetable WHERE secid='$pid' ORDER BY wkDay";
	  $result = mysqli_query($conn,$query);
	  
     while($myrow = mysqli_fetch_array($result)){
	  $this->id = $myrow["id"];
	  $this->secid = $myrow["secid"];
	  $this->wkDay = $myrow["wkDay"];
	  $this->pcInTime = $myrow["pcInTime"];
	  $this->pcOutTime = $myrow["pcOutTime"];
     }
        
	}
  
  }
?>
<?
  function getEventList(){
  
      global $conn;
      
    $query = "SELECT * FROM xoops_pc_remarkevent ORDER BY tb_ord";
	$result = mysqli_query($conn,$query);
	$num = mysqli_num_rows($result);
	$i=0;
	while($myrow = mysqli_fetch_array($result)){
	
	  $tid = $myrow["id"];
	  $tevent = $myrow["event"];
	  $tb_ord = $myrow["tb_ord"];
	  
	  $output[$tid]["event"] = $tevent;
	  $output[$tid]["tb_ord"] = $tb_ord;
	
	  $i++;
	}
	return $output;
  
  }
?>