-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcancel_request.php
More file actions
31 lines (31 loc) · 862 Bytes
/
cancel_request.php
File metadata and controls
31 lines (31 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
require_once "classes/connect.php";
require_once "classes/class_stud_stat.php";
session_start();
$select_tr=mysql_query("SELECT * FROM teachers_primary_info WHERE T_uniqueid='$_GET[id]' ");
$tr=mysql_fetch_array($select_tr);
$present=0; $times=0;
$checkifpresent=mysql_query("SELECT T_uniqueid FROM students_stats_info WHERE T_uniqueid='$_GET[id]' AND Emailid='$_SESSION[emailid]' ");
while($checkif_row=mysql_fetch_array($checkifpresent))
{
if($checkif_row['T_uniqueid']==$tr['T_uniqueid'] )
{
$times++;
$present=1;
}
}
if($present==1)
{
$ob=new stud_stat();
$ob->update_request($_GET['id'],'no');
//display
$ob->stats_bar($_GET['id']);
}
else if($present==0) // this part should not be there..
{
$ob=new stud_stat();
$ob->insert_request($_GET['id'],'no');
//display
$ob->stats_bar($_GET['id']);
}
?>