<?php require "_header.php";?>
<div id="main-content" >
<?php
if($_SESSION["VedantnrUserRole"] == "Student")
{
	?>
<span style="float:left;padding:10px 0px 0px 10px;">
<div id="divbutton">
    <div class="x-panel-header" style="margin-bottom:5px;"><a href="student-fees-report.php">View Fees Info.</a></div>
    <div class="x-panel-header" style="margin-bottom:5px;"><a href="student-result-report.php" >View Result Info.</a></div>
    <div class="x-panel-header" style="margin-bottom:5px;"><a href="student-attendence-report.php" >View Attendance Info.</a></div>
    <div class="x-panel-header" style="margin-bottom:5px;"><a href="logout.php" >Logout</a></div>
</div>
</span>
<?php }
if($_SESSION['VedantnrModuleFolder']!="library" && $_SESSION["VedantnrUserRole"] != "Student")
{
?>
<!--<span style="float:left;padding:10px 0px 0px 10px;">
<div id="divbutton">
    <div class="x-panel-header" style="margin-bottom:5px;"><a href="addedit-student.php">Add Student</a></div>
    <div class="x-panel-header" style="margin-bottom:5px;"><a href="manage-student.php" >Manage Student</a></div>
    <div class="x-panel-header" style="margin-bottom:5px;"><a href="addedit-daily-present.php" >Add Daily Present</a></div>
    <div class="x-panel-header" style="margin-bottom:5px;"><a href="view-present.php" >View Daily Present</a></div>
    <div class="x-panel-header" style="margin-bottom:5px;"><a href="addedit-feesreceive.php" >Add Fees Receipt</a></div>
    <div class="x-panel-header" style="margin-bottom:5px;"><a href="report-daily-fees-collection.php" >Fees Collection Report</a></div>
    <div class="x-panel-header" style="margin-bottom:5px;"><a href="autogenerate_sms.php" >Autogenerated SMS</a></div>
    <div class="x-panel-header" style="margin-bottom:5px;"><a href="addedit-feedback-question.php" >Feedback Questions</a></div>
</div>
</span>-->
<div style="float:right;padding:10px 20px 0px 0px;color:#333">

<?php
if($_SESSION["VedantnrUserRole"]=="PowerUser" || $_SESSION["VedantnrUserId"]=="3" )
{
	
//$date="2010-10-12"; //date("Y-m-d")
$qry="Select login_id,user_name,sum(receive_amt) as receive_amt
	  from 
	  		cms_feesreceivemaster fees, 
			cms_usermaster user 
	Where 
		user.user_id=fees.login_id
		And fees.receipt_date='".date("Y-m-d")."'
    	group by login_id";
		
$out=dbquery($qry);
if(dbRows($out)>0)
{ ?>
<table style="border:1px solid #03C" class="report-color" >
<tr>
<th>User Name</th>
<th>Fees Collect</th>
</tr>
<?php
	while($row=dbArray($out))
	{ ?>
		 <tr>
        <td ><?php echo $row['user_name'];  ?> </td>
        <td style="text-align:right;font-size:12px;"><?php echo $row['receive_amt'];  ?> </td>
        </tr>
	<?php $totalfees+= $row['receive_amt'];} ?>
     <tr>
        <th>Total</th>
        <th style="text-align:right"><?php echo $totalfees;  ?> </th>
        </tr>
    </table>
    <?php
}else
{
	echo "No Fees Recived";
}
	
}

}

?>
</div>

<script src="js/1_5_jquery.js" type="text/javascript"></script>
<style type="text/css">

	  .x-ticker-wrap { border: solid 1px black; overflow: hidden; }
		.x-panel-body {}
		.x-panel-header { text-align:center;}
		.x-panel-header a { text-decoration:none;color:#15428B;}
		#pnlDiv {margin-top:40px;margin-left:0px;margin-right:10px; width:500px;}
		#pnlDivContent {padding-left:5px;font-family:Arial,Helvetica,sans-serif;}
		#pnlDiv1 {margin-top:10px;margin-left:25px;margin-right:25px;width:300px;}
		#pnlDivContent1 {padding-left:5px;font-family:Arial,Helvetica,sans-serif;}
		.ntitle {font-weight:bold;padding-bottom:5px;font-size:9pt;padding-top:5px;}
		.ntitlenotvisite{font-weight:bold;color:#F00;padding-bottom:5px;font-size:9pt;padding-top:5px;text-align:left;}
		.ntitlenotvisite a {color:#F00;text-decoration:none;}
		.ntitle a {color:#000066;text-decoration:none;}
		.ntitle a {color:#000066;text-decoration:none;}
		.ndesc {padding-bottom:10px;text-indent:10px;font-size:12px;}
		.ndesc a{text-decoration:none;color:#000000;}
		#divnews {float:right;}
		#divbutton {float:left;margin-top:15px;margin-left:25px;width:190px;}
</style>
<?php
 	/*if(isset($_SESSION["VedantnrUserRole"]) && $_SESSION["VedantnrUserRole"]== "Faculty"){
		dbquery("SET group_concat_max_len = 102400");
	  	$visitedqry ="SELECT group_concat(distinct circular_id) as circularids 
	  					FROM cms_circularlog 
						where  employee_Id = '". $_SESSION['Employee_Id']."' order by circular_id ASC";
	   	$visitedresult=dbQuery($visitedqry);
	   	while($visitedrow = dbArray($visitedresult)){
		   $visitedString=$visitedrow['circularids'];
	   	}
	}
	
	$server_date=date('Y-m-d');
	$qry = "SELECT * FROM `cms_circularmaster` WHERE `circular_active` = 1 and circular_start_date<='".$server_date."' AND circular_end_date >='".$server_date."' order by createdon DESC ";
	$result=dbQuery($qry);
	if(dbRows($result) > 0) 
	{*/ ?>
        <script language="javascript" type="text/javascript">
	Ext.onReady(function() { 	 
	 	new Ext.Panel({ title: 'Important Notice', renderTo: 'pnlDiv', height:300, autoScroll:true, width:500,contentEl: 'pnlDivContent'});
	});
</script>
<div style="clear:both"></div>
<div id="divnews">
    <div id="pnlDiv"></div>
    <div id="pnlDivContent" class="x-hidden">
		<ul>
		<?php /*
		$circular_type=0;
		
		while($row = dbArray($result)){
			if(isset($_SESSION["VedantnrUserRole"]) && $_SESSION["VedantnrUserRole"]== "Faculty"){
				if($row['branch_id']!=""){
				$branch_id_array=explode(',',$row['branch_id']);
				$emp_branch=$_SESSION['branch_name'];
				if(!in_array($emp_branch,$branch_id_array)){
					continue;
				}
	    	}
		}
		if($row["circular_type"]==1){
				$circular_type = "News"; 
		}else if($row["circular_type"]==2)
			{
			$circular_type = "Circular"; 
		}else if($row["circular_type"]==3){
			$circular_type = "Notice";
		}	
		
		
		if(isset($_SESSION["VedantnrUserRole"]) && $_SESSION["VedantnrUserRole"]== "Faculty"){
			if(isset($_SESSION['Employee_Id'])){
			$empid=$_SESSION['Employee_Id'];
			}else{
				$empid="";
			}
			if(isset($_SESSION['student_id']) && $_SESSION['student_id']!= NULL){
			$student_id = $_SESSION['student_id'];
			}
			else {
				$student_id = "";
			}
        	 $pos = strpos($visitedString, $row['circular_id']);
			if ($pos === false) {
		?>
			<li>	
				<div class="ntitlenotvisite" >
                 <?php if($row['circular_file']!=""){ ?>
                <a href="download-circular.php?ID=<?php echo $row['circular_id'];?>&file=<?php echo $row['circular_file']?>">
				<?php print "<span style=text-decoration:underline; >".$circular_type."</span> -<span style=color:#606;text-decoration:none> ".$row['circular_subject'].' ['.date('d M, Y',strtotime($row['createdon'])).']'."</span>"; ?></a>
                <?php }else{ ?>
                <?php print "<span style=text-decoration:underline; >".$circular_type."</span> -<span style=color:#606;text-decoration:none> ".$row['circular_subject'].' ['.date('d M, Y',strtotime($row['createdon'])).']'."</span>"; ?>
                <?php }*/ ?>
                </div>
			</li>
            
            <?php /*
			} else {
    	?>
        	<li>	
				<div class="ntitle" >
                 <?php if($row['circular_file']!=""){ ?>
                <a href="download-circular.php?ID=<?php echo $row['circular_id'];?>&file=<?php echo $row['circular_file']?>" >
				<?php print "<span style=text-decoration:underline;>".$circular_type."</span> -<span style=color:#606;text-decoration:none>".$row['circular_subject'].' ['.date('d M, Y',strtotime($row['createdon'])).']'."</span>"; ?></a></div>
				 <?php }else{ ?>
                <?php print "<span style=text-decoration:underline; >".$circular_type."</span> -<span style=color:#606;text-decoration:none> ".$row['circular_subject'].' ['.date('d M, Y',strtotime($row['createdon'])).']'."</span>"; ?>
                <?php } ?>
			</li>
		<?php } 
			$qry= "SELECT * FROM `cms_circularlog` WHERE employee_id='".$empid."' AND circular_id = '".$row['circular_id']."'";
			$res=dbQuery($qry);
			if(dbNumRows($res)==0){
				dbQuery("INSERT INTO cms_circularlog( circular_id, student_id, employee_id, datetime ) VALUES ( '".$row['circular_id']."', '".$student_id."', '".$empid."',NOW() )");
			} } else{*/
		?>
      
        <li>	
				<div class="ntitle" style="text-align:left;">
                <?php /*if($row['circular_file']!=""){ ?>
                <a  href="download-circular.php?ID=<?php echo $row["circular_id"];?>&file=<?php echo $row["circular_file"];?>">
				<?php print "<span style=text-decoration:underline; >".$circular_type."</span> -<span style=color:#606;text-decoration:none> ".$row['circular_subject']."</span>"." [ ".date('d M, Y',strtotime($row['createdon']))." ]" ; ?></a>
                <?php }else{ ?>
                <?php print "<span style=text-decoration:underline;color:#000066; >".$circular_type."</span> -<span style=color:#606;text-decoration:none> ".$row['circular_subject']."</span>"." [ ".date('d M, Y',strtotime($row['createdon']))." ]" ; ?>
                <?php } */?>
                </div>
			</li>
		<?php // } }?>
		</ul>
	<?php //} ?>
	</div>
</div>
</div>
<?php require "_footer.php";?>