403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.48
Web Server : Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12
System : Windows NT DESKTOP-3H4FHQJ 10.0 build 19045 (Windows 10) AMD64
User : win 10 ( 0)
PHP Version : 8.2.12
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  D:/khalafsite-backup/khalafsons.gap/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : D:/khalafsite-backup/khalafsons.gap/transaction_auto.php
<?php
session_start();
include('db_con.php'); 
$status = $_GET['status'];
?>

<?php 
  
$curr_date = date("d"); 
$curr_month = date("m"); 
$curr_year = date("Y"); 

?> 
<input type="" value="<?php echo"$curr_date"; ?>" style="display:none;" />
<input type="" value="<?php echo"$curr_month"; ?>" style="display:none;" />
<input type="" value="<?php echo"$curr_year"; ?>" style="display:none;" />


<?php
/*
if($status =='make_new_order_insert') 
{
	$my_id = $_GET['my_id'];
    $bd_name = $_GET['building_name'];
    $flat_no = $_GET['order_flat_no'];
    $name_product = $_GET['product_name'];
    $qty_product = $_GET['product_qty'];
    $ordered_by = $_GET['order_by'];
	
	$insert_oreder ="insert into new_ordertb (my_id,building_name,flat_no,product_name,product_qty,order_by_id,curr_date,curr_time) 
	values('$my_id','$bd_name','$flat_no','$name_product','$qty_product','$ordered_by',CURDATE(),CURTIME() )";
	$run_order_insert = mysqli_query($con,$insert_oreder);
	if(!$run_order_insert){echo"<span style='color:red;'>Something Went Wrong,Your Information Has Not Been Saved</span>";}




}
*/

if($status =='disp_new_orders')
{
//echo"only me";	
?>



<div class="order_new_input_title" >Purchase List <button onClick="close_purchase_list_div();"  class="close_main_div" >x</button></div>

<div class="order_list_label_div" >

<div class="order_list_label_smallest" >No</div>
<div class="order_list_label_smallest" >Image</div>
<div class="order_list_label_big" >Building</div>
<div class="order_list_label_small" >Flat no</div>
<div class="order_list_label_big" >Product</div>
<div class="order_list_label_small" >Quantity </div>
<div class="order_list_label_big" >Order by </div>
<div class="order_list_label_small" >Date </div>

</div>

<?php

	$get_new_order ="select * from new_ordertb order by id desc ";
	$run_new_order = mysqli_query($con,$get_new_order);
	while($row_new_order = mysqli_fetch_array($run_new_order))
	
	{
		$order_id= $row_new_order['id'];
		$bd_name = $row_new_order['building_name'];
		$flat_no = $row_new_order['flat_no'];
		$image_url_one = $row_new_order['image_url_one'];
		$image_url_two = $row_new_order['image_url_two'];
		
		$product_name = $row_new_order['product_name'];
		$product_qty = $row_new_order['product_qty'];
		$order_by = $row_new_order['order_by_id'];
		$curr_date = $row_new_order['curr_date'];
		$curr_time = $row_new_order['curr_time'];
		
		if($image_url_one ==""){$image_url = $image_url_two;}elseif($image_url_two ==""){$image_url = $image_url_one;}else{$image_url = $image_url_one;}
		
		$check_purchased_product ="select * from purchased_producttb where order_id='$order_id'";
	    $run_purchased_product = mysqli_query($con,$check_purchased_product);
		$check_product = mysqli_num_rows($run_purchased_product);
		if($check_product >0){echo"";}else{
		
?>
<div class="order_list_out_div" >
<div class="order_list_out_put_smallest" ><?php echo"$order_id"; ?></div>

<div class="order_list_out_put_smallest" >

<?php
if($image_url !==""){
?>
<img onClick="zoom_sample_images(this.id);" id="<?php echo"$order_id"; ?>" src="new_order_sample_img/<?php echo"$image_url"; ?>" width="100%" height="100%" />

<?php } ?>

</div>

<div class="order_list_out_put_big" ><?php echo"$bd_name"; ?></div>
<div class="order_list_out_put_small" ><?php echo"$flat_no"; ?></div>
<div class="order_list_out_put_big" ><?php echo"$product_name"; ?></div>
<div class="order_list_out_put_small" ><?php echo"$product_qty"; ?></div>

<div class="order_list_out_put_big" >
<?php
	$in_user ="select * from khalaf_usertb where id='$order_by'";
	$run_in_user = mysqli_query($con,$in_user);
	while($row_user_new_oreder = mysqli_fetch_array($run_in_user)){
		$user_fname = $row_user_new_oreder['first_name'];
    echo"$user_fname";
	}	
 ?>
</div>

<div class="order_list_out_put_small" ><?php echo"$curr_date";  ?></div>

<button onClick="show_order_option(this.id);" id="<?php echo"$order_id"; ?>" style="font-size:1.1em;cursor:pointer;color:white;background:transparent;border:transparent;">...</button>

<div onmouseleave="close_order_option();" id="transcation_option_div<?php echo"$order_id"; ?>" class="transcation_option_div">
<button onClick="check_out(this.id);" id="<?php echo"$order_id"; ?>" class="transcation_btn">Check</button>
<button onClick="edit_order(this.id);" id="<?php echo"$order_id"; ?>" class="transcation_btn">Edit</button>
<button onClick="show_delete_order_confirm_area(this.id);" id="<?php echo"$order_id"; ?>" class="transcation_btn">Del</button>

</div>

<div onmouseleave="close_delete_order_confirm_area();" id="delete_order_confirm_area<?php echo"$order_id"; ?>" style="float:left;width:30%;height:60px;background:#ededed;margin-left:35%;display:none;" >

<span style="float:left;width:100%;color:blue;margin-bottom:6px;">Want To Delete This Data</span>
<button  onClick="no_del_order(this.id);" id="<?php echo"$order_id"; ?>" style="floatk:left;width:70px;height:30px;margin-right:8px;font-size:0.9em;background:white;color:red;border:transparent;cursor:pointer;">No</button>
<button onClick="delete_order(this.id);" id="<?php echo"$order_id"; ?>" style="floatk:left;width:70px;height:30px;margin-right:8px;font-size:0.9em;background:white;color:green;border:transparent;cursor:pointer;">Yes</button>

</div>

</div>

<div id="zoomed_sample_img_pc<?php echo"$order_id"; ?>" class="zoomed_sample_img_pc">


<?php if($image_url_one !==""){ ?>
<img ondblclick=" (this.id);" id="<?php echo"$order_id"; ?>" src="new_order_sample_img/<?php echo"$image_url_one"; ?>" class="zoomed_image_pc" />
<?php } if($image_url_two !==""){ ?>
<img ondblclick="close_zoom_sample_images(this.id);" id="<?php echo"$order_id"; ?>" src="new_order_sample_img/<?php echo"$image_url_two"; ?>" class="zoomed_image_pc" />
<?php } ?>


</div>





<div id="purchase_list_mob_div" class="purchase_list_mob_div">

<div class="order_list_label_mob_div">
<div class="order_list_label_smallest_mob">No</div>

<div class="order_list_label_big_mob">Product name</div>
<div class="order_list_label_smallest_mob">Qty</div>
<div class="order_list_label_smallest_mob">Date</div>
<button onClick="show_order_option(this.id);" id="<?php echo"$order_id"; ?>"  class="order_list_option_btn">...</button>

</div>

<div class="order_list_out_mob_div">
<div class="order_list_out_put_smallest_mob"><?php echo"$order_id"; ?></div>
<div class="order_list_out_put_big_mob"><?php echo"$product_name"; ?></div>
<div class="order_list_out_put_smallest_mob"><?php echo"$product_qty"; ?></div>
<div class="order_list_out_put_small_mob"><?php echo"$curr_date";  ?></div>

</div>

<div class="order_list_label_mob_div">
<div class="order_list_label_smallest_mob">image</div>
<div class="order_list_label_big_mob">Building name</div>
<div class="order_list_label_smallest_mob">Flat</div>
<div class="order_list_label_small_mob">Order by</div>

</div>

<div class="order_list_out_mob_div">
<div class="order_list_out_put_smallest_mob">

<?php
if($image_url !==""){
?>
<img onClick="zoom_sample_images(this.id);" id="<?php echo"$order_id"; ?>" src="new_order_sample_img/<?php echo"$image_url"; ?>" style="cursor:pointer;" width="100%" height="100%" />

<?php } ?>

</div>
<div class="order_list_out_put_big_mob"><?php echo"$bd_name"; ?></div>
<div class="order_list_out_put_smallest_mob"><?php echo"$flat_no"; ?></div>
<div class="order_list_out_put_small_mob"><?php echo"$order_by"; ?></div>


</div>


<div onmouseleave="close_order_option_mob();" id="transcation_option_div2<?php echo"$order_id"; ?>" class="transcation_option_div">
<button onClick="check_out(this.id);" id="<?php echo"$order_id"; ?>" class="transcation_btn">Check</button>
<button onClick="edit_order(this.id);" id="<?php echo"$order_id"; ?>" class="transcation_btn">Edit</button>
<button onClick="show_delete_order_confirm_area(this.id);" id="<?php echo"$order_id"; ?>" class="transcation_btn">Del</button>
<button onClick="close_order_option_mob(this.id);" id="<?php echo"$order_id"; ?>" class="transcation_btn">Exit</button>

</div>


<div onmouseleave="close_delete_order_confirm_area();" id="delete_order_confirm_mob_area<?php echo"$order_id"; ?>" style="float:left;width:80%;height:80px;margin-top:-75px;background:#fff;margin-left:10%;border-radius:15px;border:1px solid #85929E;display:none;" >

<span style="float:left;width:100%;color:blue;margin-bottom:10px;margin-top:10px;text-align:center;">You Want To Delete This Data</span>
<button  onClick="no_del_order(this.id);" id="<?php echo"$order_id"; ?>" style="floatk:left;width:70px;height:30px;margin-right:8px;font-size:0.9em;margin-left:25%;background:#ccc;color:red;border:transparent;cursor:pointer;">No</button>
<button onClick="delete_order(this.id);" id="<?php echo"$order_id"; ?>" style="floatk:left;width:70px;height:30px;margin-right:8px;font-size:0.9em;background:#ccc;color:green;border:transparent;cursor:pointer;">Yes</button>

</div>


</div>

<div class="zoom_img_helping_div" >

<div id="zoomed_sample_img_div<?php echo"$order_id"; ?>" class="zoomed_sample_img_div">
<?php if($image_url_one !==""){ ?>
<img onClick="zoom_sample_images(this.id);" ondblclick="close_zoom_sample_images(this.id);" id="<?php echo"$order_id"; ?>" src="new_order_sample_img/<?php echo"$image_url_one"; ?>" class="zoomed_sample_img" />
<?php } if($image_url_two !==""){ ?>
<img onClick="zoom_sample_images(this.id);" ondblclick="close_zoom_sample_images(this.id);" id="<?php echo"$order_id"; ?>" src="new_order_sample_img/<?php echo"$image_url_two"; ?>" class="zoomed_sample_img" />
<?php } ?>

</div>
</div>




<?php
}
}
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


if($status =='disp_checkout_order_inputs')
{
	//echo"Me the programer";
	$order_id = $_GET['order_id'];
	
	$get_new_order ="select * from new_ordertb where id='$order_id'";
	$run_new_order = mysqli_query($con,$get_new_order);
	while($row_new_order = mysqli_fetch_array($run_new_order))
	
	{
		$order_id= $row_new_order['id'];
		$bd_name = $row_new_order['building_name'];
		$flat_no = $row_new_order['flat_no'];
		$product_name = $row_new_order['product_name'];
		$product_qty = $row_new_order['product_qty'];
		$order_by_id = $row_new_order['order_by_id'];
		$curr_date = $row_new_order['curr_date'];
		$curr_time = $row_new_order['curr_time'];
			
?>

<div id="new_sales_input_div" class="new_sales_input_div" style="displayk:none;">

<div class="order_new_input_title" >Sales Entry <button onClick="close_new_sales_input_div();"  class="close_main_div" >x</button></div>


<div class="order_input_lebal" >Building name</div>
<input id="sale_bd_name" class="order_bd_name_input" value="<?php echo"$bd_name";  ?>"  />

<div class="order_input_lebal" >Flat no.</div>
<input id="sale_flat_no" class="order_bd_name_input" value="<?php echo"$flat_no";  ?>"  />

<div class="order_input_lebal" >Product name</div>
<input id="sale_product_name" class="order_bd_name_input" value="<?php echo"$product_name";  ?>"  />

<div class="order_input_lebal" >Product qty</div>
<input id="sale_product_qty" class="order_bd_name_input" value="<?php echo"$product_qty";  ?>"  />

<input id="order_by_id" style="display:none;" value="<?php echo"$order_by_id";  ?>"  />

<div class="order_input_lebal" >Shop</div>
<input id="shop_per_iterm" class="order_bd_name_input" />

<div class="order_input_lebal" >Total price</div>
<input id="sale_total_price" class="order_bd_name_input"  />

<div class="order_input_lebal" >Picked by</div>
<input id="sale_picked_by" class="order_bd_name_input" />

<div class="order_input_lebal" >Invoice no</div>
<input id="bill_invoice" class="order_bd_name_input" />


<div id="purchased_product_erorr_out_put" class="erorr_out_put" ></div>

<button onClick="cancle_purchase();" class="sales_cancel_btn">Cancel</button>
<button onClick="sale_now_product(this.id);" id="<?php echo"$order_id"; ?>" class="sale_now_btn">Sale</button>

</div><!--end of new_sales_input_div-->



<?php	
	
}
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='disp_edit_order_inputs')
{

	$order_id = $_GET['order_id'];
	
	$get_new_order ="select * from new_ordertb where id='$order_id'";
	$run_new_order = mysqli_query($con,$get_new_order);
	while($row_new_order = mysqli_fetch_array($run_new_order))
	
	{
		$order_id= $row_new_order['id'];
		$bd_name = $row_new_order['building_name'];
		$flat_no = $row_new_order['flat_no'];
		$product_name = $row_new_order['product_name'];
		$product_qty = $row_new_order['product_qty'];
		$curr_date = $row_new_order['curr_date'];
		$curr_time = $row_new_order['curr_time'];
			
?>

<div id="new_sales_input_div" class="order_edit_input_div" style="displayk:none;">

<div class="order_new_input_title" >Editing Order Window <button onClick="close_edit_order_input_div();"  class="close_main_div" >x</button></div>


<div class="order_input_lebal" >Building name</div>
<input id="edit_bd_name" class="order_bd_name_input" value="<?php echo"$bd_name";  ?>"  />

<div class="order_input_lebal" >Flat no.</div>
<input id="edit_flat_no" class="order_bd_name_input" value="<?php echo"$flat_no";  ?>"  />

<div class="order_input_lebal" >Product name</div>
<input id="edit_product_name" class="order_bd_name_input" value="<?php echo"$product_name";  ?>"  />

<div class="order_input_lebal" >Product qty</div>
<input id="edit_product_qty" class="order_bd_name_input" value="<?php echo"$product_qty";  ?>"  />

<div id="eidt_order_erorr_out_put" class="erorr_out_put" ></div>

<button onClick="cancle_purchase();" class="sales_cancel_btn">Cancel</button>
<button onClick="update_order_now(this.id);" id="<?php echo"$order_id"; ?>" class="sale_now_btn">Update</button>

</div><!--end of new_sales_input_div-->



<?php	
	
}
	
}



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


if($status =='update_order_now')
{
 $my_id = $_GET['my_id'];
 $order_id = $_GET['order_id'];
 $edit_bd_name = $_GET['edit_bd_name'];
 $edit_flat_no = $_GET['edit_flat_no'];
 $edit_product_name = $_GET['edit_product_name'];
 $edit_product_qty = $_GET['edit_product_qty'];
 
 $update_order ="update new_ordertb set building_name='$edit_bd_name',flat_no='$edit_flat_no',product_name='$edit_product_name',product_qty='$edit_product_qty' where my_id='$my_id' AND id='$order_id' "; 
 $run_update_order = mysqli_query($con,$update_order);


}



////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='delete_order')
{
  $my_id = $_GET['my_id'];
  $order_id = $_GET['order_id'];
  $del_order = "delete from new_ordertb where my_id='$my_id' AND id='$order_id' ";
  $run_del_order = mysqli_query($con,$del_order);
}


//////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='insert_sold_products')
{

 $my_id = $_GET['my_id'];
 $order_id = $_GET['order_id'];
 $sale_bd_name = $_GET['sale_bd_name'];
 $sale_flat_no = $_GET['sale_flat_no'];
 $sale_product_name = $_GET['sale_product_name'];
 $sale_product_qty = $_GET['sale_product_qty'];
 $shop_per_iterm = $_GET['shop_per_iterm'];
 $sale_total_price = $_GET['sale_total_price'];
 $sale_order_by_id = $_GET['sale_order_by_id'];
 $sale_picked_by = $_GET['sale_picked_by'];
 $bill_invoice = $_GET['bill_invoice'];
 
 $insert_purchased_product ="insert into purchased_producttb (user_id,order_id,building_name,flat_no,product_name,product_qty,shop_iterm,total_price,order_by_id,picked_by,invoice_no,curr_date,curr_month,curr_year,curr_time) 
 values('$my_id','$order_id','$sale_bd_name','$sale_flat_no','$sale_product_name','$sale_product_qty','$shop_per_iterm','$sale_total_price','$sale_order_by_id','$sale_picked_by','$bill_invoice','$curr_date','$curr_month','$curr_year',CURTIME() )";
 $run_purchased_product = mysqli_query($con,$insert_purchased_product);
 if(!$run_purchased_product){echo"<span style='color:red;'>Something Went Wrong,Your Information Has Not Been Saved</span>";}
	
}


/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='display_purchase_list')
{
		//$order_id = $_GET['order_id'];
		?>
		
<div class="order_new_input_title" >Final Recept 
 <button onClick="close_final_recept_div();"  class="close_main_div" >Pri</button> 
<button onClick="close_final_recept_div();"  class="close_main_div" >x</button>
 </div>


<div class="recept_list_label_div" >

<div class="recept_label_small" >Inv no</div>
<div class="recept_label_big" >Building</div>
<div class="recept_label_small" >Flat no</div>
<div class="recept_label_big" >Product</div>
<div class="recept_label_small" >Quantity </div>
<div class="recept_label_small" >Shop</div>
<div class="recept_label_small" >Total Price </div>
<div class="recept_label_small" >Order by </div>
<div class="recept_label_small" >Picked by</div>
<div class="recept_label_small" style="display:none;" >Served by</div>
<div class="recept_label_small" >Date </div>

</div>
		<?php
	
	$get_purchased_product ="select * from purchased_producttb";
	$run_purchased_product = mysqli_query($con,$get_purchased_product);
	while($row_purchased_product = mysqli_fetch_array($run_purchased_product))
	
	{
		$purchased_product_id= $row_purchased_product['id'];
		$served_by_id= $row_purchased_product['user_id'];
		$bd_name = $row_purchased_product['building_name'];
		$flat_no = $row_purchased_product['flat_no'];
		$product_name = $row_purchased_product['product_name'];
		$product_qty = $row_purchased_product['product_qty'];
		$shop_per_iterm = $row_purchased_product['shop_iterm'];
		$total_price = $row_purchased_product['total_price'];
		$order_by_id = $row_purchased_product['order_by_id'];
		$picked_by = $row_purchased_product['picked_by'];
		$curr_date = $row_purchased_product['curr_date'];
		$curr_month = $row_purchased_product['curr_month'];
		$curr_year = $row_purchased_product['curr_year'];
		$curr_time = $row_purchased_product['curr_time'];

	?>

	
	<div class="recept_out_div" >
<div class="recept_list_out_put_small" ><?php echo"$purchased_product_id"; ?> </div>
<div class="recept_list_out_put_big" ><?php echo"$bd_name"; ?> </div>
<div class="recept_list_out_put_small" ><?php echo"$flat_no"; ?></div>
<div class="recept_list_out_put_big" ><?php echo"$product_name"; ?></div>
<div class="recept_list_out_put_small" ><?php echo"$product_qty"; ?></div>
<div class="recept_list_out_put_small" ><?php echo"$shop_per_iterm"; ?></div>
<div class="recept_list_out_put_small" style="color:green;" ><?php echo"$total_price"; ?></div>

<div class="recept_list_out_put_small" style="display:none;" >
<?php 

	$in_user ="select * from khalaf_usertb where id='$order_by_id'";
	$run_in_user = mysqli_query($con,$in_user);
	while($row_user_new_oreder = mysqli_fetch_array($run_in_user)){
		$user_fname = $row_user_new_oreder['first_name'];
    echo"$user_fname";
	}	

 ?></div>


<div class="recept_list_out_put_small" >
<?php
 
 	$in_user ="select * from khalaf_usertb where id='$served_by_id'";
	$run_in_user = mysqli_query($con,$in_user);
	while($row_user_new_oreder = mysqli_fetch_array($run_in_user)){
		$user_fname = $row_user_new_oreder['first_name'];
    echo"$user_fname";
	}
 
 ?></div>
 
 <div class="recept_list_out_put_small" ><?php echo"$picked_by";  ?></div>
 
<div classk="recept_list_out_put_small" style="float:left;width:8.1%;height:40px;line-heightk:40px;background:#fff;text-align:center;border-right:1px solid #ccc;" ><?php echo"<spana style='float:left;height:20px;backgroundk:red;'>$curr_date - $curr_month - $curr_year</span><br/>"; echo"<spana style='float:right;height:20px;font-size:14px;color:blue;backgroundk:green;font-weight:bold;'>$curr_time</span>"; ?></div>
<!--div class="recept_list_out_put_big" ><?php //echo"$order_id"; ?></div-->
</div>


<div class="recept_list_label_div_mob" >

<!--div class="recept_label_small" >Id no</div-->
<div class="recept_label_big_mob" >Building</div>
<div class="recept_label_small_mob" >Flat no</div>
<div class="recept_label_small_mob" >Order by </div>
<div class="recept_label_big_mob" >Date </div>

<!--div class="recept_label_small" >Rate</div>
<div class="recept_label_small" >Total Price </div>
<div class="recept_label_small" >Order by </div>
<div class="recept_label_big" >Date </div-->

</div>

<div class="recept_out_div_mob" >
<!--div class="recept_list_out_put_small_mob" ><?php echo"$purchased_product_id"; ?> </div-->
<div class="recept_list_out_put_big_mob" ><?php echo"$bd_name"; ?> </div>
<div class="recept_list_out_put_small_mob" ><?php echo"$flat_no"; ?></div>
<div class="recept_list_out_put_small_mob" ><?php echo"$picked_by"; ?></div>
<div class="recept_list_out_put_big_mob" ><?php echo"$curr_date"; //echo"|$curr_date";  ?></div>
<!--div class="recept_list_out_put_small" ><?php echo"$price_per_iterm"; ?></div>
<div class="recept_list_out_put_small" style="color:green;" ><?php echo"$total_price"; ?></div>
<div class="recept_list_out_put_small" ><?php echo"$picked_by"; ?></div>
<div class="recept_list_out_put_big" ><?php echo"$curr_date";echo"|$curr_date";  ?></div>
<!--div class="recept_list_out_put_big" ><?php //echo"$order_id"; ?></div-->
</div>



<div class="recept_list_label_div_mob" >

<div class="recept_label_big_mob" >Product</div>
<div class="recept_label_small_mob" >Qnty </div>
<div class="recept_label_small_mob" >Rate</div>
<div class="recept_label_big_mob" >Total Price </div>

</div>

<div class="recept_out_div_mob_two" >
<div class="recept_list_out_put_big_mob" ><?php echo"$product_name"; ?></div>
<div class="recept_list_out_put_small_mob" ><?php echo"$product_qty"; ?></div>
<!--div class="recept_list_out_put_small_mob" ><?php echo"$price_per_iterm"; ?></div-->
<div class="recept_list_out_put_big_mob" style="color:green;" ><?php echo"$total_price"; ?></div>


<!--div class="recept_list_out_put_big" ><?php //echo"$order_id"; ?></div-->
</div>


	
<?php
	}
    }	

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


if($status =='insert_graph_data')
{

    $my_id = $_GET['my_id'];
	$propert_name = $_GET['propert_name'];
	$property_amount = $_GET['property_amount'];
	$percentage = $_GET['percentage'];
	$tran_start_date = $_GET['tran_start_date'];
	$tran_end_date = $_GET['tran_end_date'];
	
	$get_calender = "select * from graph_calendartb where start_date ='$tran_start_date'  AND end_date ='$tran_end_date'";// AND curr_day='$curr_date' AND curr_month='$curr_month' AND curr_year='$curr_year' ";
	$run_get_calender = mysqli_query($con,$get_calender);
	$check_calender = mysqli_num_rows($run_get_calender);
	if($check_calender < 1 ){
	
	$insert_calender ="insert into graph_calendartb (my_id,start_date,end_date,curr_day,curr_month,curr_year,curr_time) values('$my_id','$tran_start_date','$tran_end_date','$curr_date','$curr_month','$curr_year',CURTIME())";
	$run_insert_calender = mysqli_query($con,$insert_calender);
	}

	$disp_graph_info = "select * from graph_datatb where property_name='$propert_name' AND amount='$property_amount' AND trans_start_date='$tran_start_date' AND trans_end_date='$tran_end_date' AND cur_day='$curr_date' AND cur_month='$curr_month' AND cur_year='$curr_year'";
    $run_disp_graph_info = mysqli_query($con,$disp_graph_info);
    $check_graph_info = mysqli_num_rows($run_disp_graph_info);
	if($check_graph_info < 1 ){
//while($row_disp_graph_info = mysqli_fetch_array($run_disp_graph_info))
//{
	//$propert_name = $row_disp_graph_info['property_name'];
	//$propert_amount = $row_disp_graph_info['amount'];
	//$amount_percentage = $row_disp_graph_info['amount_percentage'];
	//$trans_start_date = $row_disp_graph_info['trans_start_date'];
	//$trans_end_date = $row_disp_graph_info['trans_end_date'];
	
	
	$insert_graph_info = "insert into graph_datatb (my_id,property_name,amount,amount_percentage,trans_start_date,trans_end_date,cur_day,cur_month,cur_year,cur_time) 
	values ('$my_id','$propert_name','$property_amount','$percentage','$tran_start_date','$tran_end_date','$curr_date','$curr_month','$curr_year',CURTIME() )";
	$run_graph_info = mysqli_query($con,$insert_graph_info);
	echo"New data has been saved Thanks.";
}

}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status == 'disp_preview_graph_data')
{?>
<div class="graph_data_previwe_name">Property Name</div>
<div class="graph_data_previwe_amount">Amount</div> 
   
   
   
   <?php

$disp_graph_info = "select * from graph_datatb";// where trans_start_date='$start_date' AND trans_end_date='$end_date'";
$run_disp_graph_info = mysqli_query($con,$disp_graph_info);
while($row_disp_graph_info = mysqli_fetch_array($run_disp_graph_info))
{
	$propert_name = $row_disp_graph_info['property_name'];
	$propert_amount = $row_disp_graph_info['amount'];
	$amount_percentage = $row_disp_graph_info['amount_percentage'];
	$trans_start_date = $row_disp_graph_info['trans_start_date'];
	$trans_end_date = $row_disp_graph_info['trans_end_date'];
	
	
?>
  <div class="graph_data_previwe_name"><?php echo"$propert_name"; ?></div>
<div class="graph_data_previwe_amount"><?php echo"$propert_amount"; ?></div> 
  
<?php } 
	//echo"Katende Vicent";
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='show_graph_diagram')
{
	$diff_id = $_GET['diff_id'];
	echo"$diff_id";
	
	


	$get_calender = "select * from graph_calendartb where start_date='$diff_id' ";
	$run_get_calender = mysqli_query($con,$get_calender);
	while($row_calender = mysqli_fetch_array($run_get_calender)){
		$start_date = $row_calender['start_date'];
		$end_date = $row_calender['end_date'];

		
$disp_graph_info = "select * from graph_datatb where trans_start_date='$start_date' AND trans_end_date='$end_date'";
$run_disp_graph_info = mysqli_query($con,$disp_graph_info);
while($row_disp_graph_info = mysqli_fetch_array($run_disp_graph_info))
{
	$propert_name = $row_disp_graph_info['property_name'];
	$propert_amount = $row_disp_graph_info['amount'];
	$amount_percentage = $row_disp_graph_info['amount_percentage'];
	$trans_start_date = $row_disp_graph_info['trans_start_date'];
	$trans_end_date = $row_disp_graph_info['trans_end_date'];
	


$percent = $propert_amount / 400 * 100 ;

?>

<div class="graph_draw" style="height:<?php echo"$percent%"; ?>; ">
<?php 
echo"$propert_name"; echo" ";
echo"$percent %";
 ?>
</div>

<?php } } 



	
}










?>

Youez - 2016 - github.com/yon3zu
LinuXploit