<?php
include("../../db.php");
header("Access-Control-Allow-Origin: * ");

	//$idno=$_REQUEST['idno'];
	$session=$_REQUEST['session'];
	$school_id=$_REQUEST['school_id'];
	
	$session=mysql_real_escape_string($session);
	$school_id=mysql_real_escape_string($school_id);
	
 
$aryList=$db->getRows("SELECT teacher_complain.id, teacher_complain.teacher_id, staff.name,   teacher_complain.topic, teacher_complain.detail, teacher_complain.udate,  teacher_complain.reply, teacher_complain.reply_date,  teacher_complain.session, teacher_complain.school_id FROM teacher_complain left join staff on teacher_complain.teacher_id=staff.idno where teacher_complain.reply='' and teacher_complain.school_id='".$school_id."' and teacher_complain.session='$session'");

	

	
	if(is_array($aryList) && count($aryList)>0)
	{  
		echo json_encode(array('status' => 1, 'msg'=>'Message found Successfully..!', "data"=>$aryList));    
			
	}else
	{		
	 	echo json_encode(array('status' => 0, 'msg'=>'No message Found..!'));
	}
