| 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/old/htdocs old/ |
Upload File : |
<html>
<?php
session_start();
include('db_con.php');
include('function.php');
include('lang_function.php');
include('print_function.php');
?>
<?php
if(isset($_SESSION['id']))
{
$my_id = $_SESSION['id'];
//$user_email = $_SESSION['email'];
//echo $_SESSION['id'];
// echo"$user_email";
}
?>
<input id="my_id" style="display:none;" value="<?php echo"$my_id";?>" />
<?php
$user_ip = getenv('REMOTE_ADDR');
$geo = unserialize(file_get_contents("http://www.geoplugin.net/php.gp?ip=$user_ip"));
$city = $geo["geoplugin_city"];
$region = $geo["geoplugin_regionName"];
$country = $geo["geoplugin_countryName"];
/*echo"$user_ip";
echo "City: ".$city."<br>";
echo "Region: ".$region."<br>";
echo "Country: ".$country."<br>";
/*
geoplugin_request
geoplugin_status
geoplugin_credit
geoplugin_city
geoplugin_region
geoplugin_areaCode
geoplugin_dmaCode
geoplugin_countryCode
geoplugin_countryName
geoplugin_continentCode
geoplugin_latitude
geoplugin_longitude
geoplugin_regionCode
geoplugin_regionName
geoplugin_currencyCode
geoplugin_currencySymbol
geoplugin_currencySymbol_UTF8
geoplugin_currencyConverter
*/
?>
<input type="text" id="country_user" class="helping_id" style="display:none;" value="<?php echo $country;?>">
<input type="text" id="region_user" class="helping_id" style="display:none;" value="<?php echo $region;?>">
<input type="text" id="city_user" class="helping_id" style="display:none;" value="<?php echo $city;?>">
<head>
<title>Khala Sons Real Estate</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="kvt_con/khalaf_log.jpg" type="image/ico">
<link rel="stylesheet" type="text/css" href="main_css/purchase.css" />
</head>
<body id="body">
<div id="dash_container" class="dash_container" style="displayk:none;">
<a href="index"><div class="dash_icon_div" >Home</div></a>
<div onClick="show_new_order_entry();" class="dash_icon_div" >New Order</div>
<div onClick="show_new_order_list();" class="dash_icon_div" >Order List</div>
<div onClick="show_purchased_product_list();" class="dash_icon_div" >Purchased Products</div>
<div onClick="show_purchase_shops_div();" class="dash_icon_div" >Our Shops</div>
<div onClick="show_expenditure_main_div();" class="dash_icon_div" >Purchase Manager</div>
<div onClick="show_graph_shops_div();" class="dash_icon_div" >Graph</div>
<a href="extraction"><div class="dash_icon_div" >Extraction</div></a>
<a href="maintenance.php"><div class="dash_icon_div" >Maintenance</div></a>
<script>
function show_new_order_entry()
{
document.getElementById('order_new_input_div').style.display="block";
document.getElementById('dash_container').style.display="none";
}
function close_order_new_input_div()
{
document.getElementById('order_new_input_div').style.display="none";
document.getElementById('dash_container').style.display="block";
}
function show_new_order_list()
{
/*screen_size = screen.width;
if(screen_size < 700){
document.getElementById('purchase_list_mob_div').style.display="block";
document.getElementById('dash_container').style.display="none";
}else{*/
document.getElementById('purchase_list_div').style.display="block";
document.getElementById('dash_container').style.display="none";
}//}
function close_purchase_list_div()
{
document.getElementById('purchase_list_div').style.display="none";
document.getElementById('dash_container').style.display="block";
}
function show_purchased_product_list()
{
document.getElementById('final_recept_div').style.display="block";
document.getElementById('dash_container').style.display="none";
}
function close_final_recept_div()
{
document.getElementById('final_recept_div').style.display="none";
document.getElementById('dash_container').style.display="block";
}
function close_new_sales_input_div()
{
document.getElementById('new_sales_input_div').style.display="none";
document.getElementById('dash_container').style.display="block";
}
function close_edit_order_input_div()
{
document.getElementById('order_edit_input_output').style.display="none";
document.getElementById('dash_container').style.display="block";
}
function show_order_option(soo)
{
transcation_option ='transcation_option_div'+soo;
transcation_option2 ='transcation_option_div2'+soo;
document.getElementById(transcation_option).style.display="block";
document.getElementById(transcation_option2).style.display="block";
//document.getElementById('dash_container').style.display="block";
}
function close_order_option(coo)
{
//transcation_option ='transcation_option_div'+coo;
//transcation_option2 ='transcation_option_div2'+coo;
document.getElementById(transcation_option).style.display="none";
document.getElementById(transcation_option2).style.display="none";
//document.getElementById('dash_container').style.display="block";
}
function close_order_option_mob(coom)
{
transcation_option2 ='transcation_option_div2'+coom;
document.getElementById(transcation_option2).style.display="none";
//document.getElementById('dash_container').style.display="block";
}
function show_delete_order_confirm_area(sdoca)
{
delete_order_confirm ='delete_order_confirm_area'+sdoca;
delete_order_confirm_mob ='delete_order_confirm_mob_area'+sdoca;
transcation_option ='transcation_option_div'+sdoca;
document.getElementById(delete_order_confirm).style.display="block";
document.getElementById(transcation_option).style.display="none";
document.getElementById(delete_order_confirm_mob).style.display="block";
}
function zoom_sample_images(zsi)
{
screen_size = screen.width;
zoomed_image_pc ='zoomed_sample_img_pc'+zsi;
zoomed_image ='zoomed_sample_img_div'+zsi;
document.getElementById(zoomed_image_pc).style.display="block";
document.getElementById(zoomed_image).style.display="block";
if(screen_size <600){
document.getElementById('body').style="overflow:hidden;";
zoomed_image.scrollTo(0,0);
scrollTo(0,0);
}else{document.getElementById('body').style="overflow:auto;";}
}
function close_zoom_sample_images(czsi)
{
zoomed_image_pc ='zoomed_sample_img_pc'+czsi;
zoomed_image ='zoomed_sample_img_div'+czsi;
document.getElementById(zoomed_image_pc).style.display="none";
document.getElementById(zoomed_image).style.display="none";
document.getElementById('body').style="overflow:auto;";
}
function no_del_order(ndo)
{
delete_order_confirm ='delete_order_confirm_area'+ndo;
delete_order_confirm_mob ='delete_order_confirm_mob_area'+ndo;
transcation_option ='transcation_option_div'+ndo;
document.getElementById(delete_order_confirm).style.display="none";
document.getElementById(delete_order_confirm_mob).style.display="none";
document.getElementById(transcation_option).style.display="none";
//document.getElementById('dash_container').style.display="block";
}
function close_delete_order_confirm_area()
{
document.getElementById(delete_order_confirm).style.display="none";
document.getElementById(transcation_option).style.display="none";
//document.getElementById('dash_container').style.display="block";
}
function show_purchase_shops_div()
{
document.getElementById('purchase_shops_div').style.display="block";
document.getElementById('dash_container').style.display="none";
}
function close_purchase_shops_div()
{
document.getElementById('purchase_shops_div').style.display="none";
document.getElementById('dash_container').style.display="block";
}
function show_expenditure_main_div()
{
document.getElementById('expenditure_main_div').style.display="block";
document.getElementById('dash_container').style.display="none";
}
function close_expenditure_main_div()
{
document.getElementById('expenditure_main_div').style.display="none";
document.getElementById('dash_container').style.display="block";
}
function show_graph_shops_div()
{
document.getElementById('show_graph_div').style.display="block";
document.getElementById('graph_contain_div').style.display="block";
document.getElementById('dash_container').style.display="none";
document.getElementById('expenditure_main_div').style.display="none";
}
function close_graph_div()
{
document.getElementById('show_graph_div').style.display="none";
document.getElementById('dash_container').style.display="block";
window.open('purchase.php','_self');
}
</script>
</div><!--end of dash_container-->
<div id="purchase_list_div" class="purchase_list_div" style="display:none;">
<div id="display_new_orders_out_put" ></div>
<script>
display_new_orders();
function display_new_orders()
{
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","transaction_auto.php?status=disp_new_orders",false);
xmlhttp.send(null);
document.getElementById('display_new_orders_out_put').innerHTML=xmlhttp.responseText;
}
function check_out(co)
{
// document.getElementById('new_sales_input_div').style.display="block";
order_id =co;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","transaction_auto.php?order_id="+order_id+"&&status=disp_checkout_order_inputs",false);
xmlhttp.send(null);
document.getElementById('order_check_input_output').innerHTML=xmlhttp.responseText;
document.getElementById('purchase_list_div').style.display="none";
}
function edit_order(eo)
{
document.getElementById('order_edit_input_output').style.display="block";
my_id = document.getElementById('my_id').value;
order_id = eo;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","transaction_auto.php?order_id="+order_id+"&my_id="+my_id+"&status=disp_edit_order_inputs",false);
xmlhttp.send(null);
document.getElementById('order_edit_input_output').innerHTML=xmlhttp.responseText;
document.getElementById('purchase_list_div').style.display="none";
}
function delete_order(deo)
{
//document.getElementById('order_edit_input_output').style.display="block";
my_id = document.getElementById('my_id').value;
order_id = deo;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","transaction_auto.php?order_id="+order_id+"&my_id="+my_id+"&status=delete_order",false);
xmlhttp.send(null);
document.getElementById('order_edit_input_output').innerHTML=xmlhttp.responseText;
//document.getElementById('purchase_list_div').style.display="none";
display_new_orders();
//alert(deo);
}
function sale_now_product(snp)
{
my_id = document.getElementById('my_id').value;
sale_bd_name = document.getElementById('sale_bd_name').value;
sale_flat_no = document.getElementById('sale_flat_no').value;
sale_product_name = document.getElementById('sale_product_name').value;
sale_product_qty = document.getElementById('sale_product_qty').value;
shop_per_iterm = document.getElementById('shop_per_iterm').value;
sale_total_price = document.getElementById('sale_total_price').value;
sale_order_by_id = document.getElementById('order_by_id').value;
sale_picked_by = document.getElementById('sale_picked_by').value;
bill_invoice = document.getElementById('bill_invoice').value;
if(sale_bd_name=="" || sale_flat_no=="" || sale_product_name=="" || sale_product_qty=="" || shop_per_iterm=="" || sale_total_price=="" || sale_picked_by=="" || bill_invoice=="" ){
document.getElementById('purchased_product_erorr_out_put').innerHTML="Fill All The Spaces";
document.getElementById('purchased_product_erorr_out_put').style="color:red;display:block";
}else{
// alert(sale_bd_name);
order_id =snp;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","transaction_auto.php?order_id="+order_id+"&my_id="+my_id+"&sale_bd_name="+sale_bd_name+"&sale_flat_no="+sale_flat_no+"&sale_product_name="+sale_product_name+"&sale_product_qty="+sale_product_qty+"&shop_per_iterm="+shop_per_iterm+"&sale_total_price="+sale_total_price+"&&sale_order_by_id="+sale_order_by_id+"&sale_picked_by="+sale_picked_by+"&bill_invoice="+bill_invoice+"&status=insert_sold_products",false);
xmlhttp.send(null);
document.getElementById('purchased_product_erorr_out_put').innerHTML=xmlhttp.responseText;
document.getElementById('purchased_product_erorr_out_put').style="color:red;display:block";
//alert(sale_bd_name);
document.getElementById('sale_bd_name').value="";
document.getElementById('sale_flat_no').value="";
document.getElementById('sale_product_name').value="";
document.getElementById('sale_product_qty').value="";
document.getElementById('shop_per_iterm').value="";
document.getElementById('sale_total_price').value="";
document.getElementById('sale_picked_by').value="";
document.getElementById('bill_invoice').value="";
display_purchase_list();
document.getElementById('final_recept_div').style.display="block";
document.getElementById('new_sales_input_div').style.display="none";
display_new_orders();
}
}
function cancle_purchase()
{
document.getElementById('new_sales_input_div').style.display="none";
document.getElementById('dash_container').style.display="block";
}
function update_order_now(uon)
{
order_id = uon;
my_id = document.getElementById('my_id').value;
edit_bd_name = document.getElementById('edit_bd_name').value;
edit_flat_no = document.getElementById('edit_flat_no').value;
edit_product_name = document.getElementById('edit_product_name').value;
edit_product_qty = document.getElementById('edit_product_qty').value;
if(edit_bd_name=="" || edit_flat_no=="" || edit_product_name=="" || edit_product_qty=="" ){
document.getElementById('eidt_order_erorr_out_put').innerHTML="Fill All The Spaces";
document.getElementById('eidt_order_erorr_out_put').style="color:red;display:block";
}else{ //alert(uon);
order_id =uon;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","transaction_auto.php?order_id="+order_id+"&my_id="+my_id+"&edit_bd_name="+edit_bd_name+"&edit_flat_no="+edit_flat_no+"&edit_product_name="+edit_product_name+"&edit_product_qty="+edit_product_qty+"&status=update_order_now",false);
xmlhttp.send(null);
document.getElementById('eidt_order_erorr_out_put').innerHTML=xmlhttp.responseText;
document.getElementById('eidt_order_erorr_out_put').style="color:red;display:block";
document.getElementById('edit_bd_name').value="";
document.getElementById('edit_flat_no').value="";
document.getElementById('edit_product_name').value="";
document.getElementById('edit_product_qty').value="";
display_new_orders();
document.getElementById('purchase_list_div').style="display:block;";
document.getElementById('order_edit_input_output').style="display:none;";
}
}
</script>
</div>
<div id="order_check_input_output" ></div>
<div id="order_edit_input_output" ></div>
<div id="order_new_input_div" class="order_new_input_div" style="display:none;">
<div class="order_new_input_title" >Purchase Entry <button onClick="close_order_new_input_div();" class="close_main_div" >x</button></div>
<form method="post" enctype="multipart/form-data">
<div class="order_input_lebal" >Building name</div>
<select type="text" id="building_name" name="building_name" class="order_bd_name_input">
<option selected disabled>Select Building Name</option>
<?php option_building_name(); ?>
</select>
<!--input id="building_name" name="building_name" class="order_bd_name_input" /-->
<div class="order_input_lebal" >Flat no.</div>
<input id="order_flat_no" name="order_flat_no" class="order_bd_name_input" />
<div class="order_input_lebal" >Product name</div>
<input id="product_name" name="product_name" class="order_bd_name_input" />
<div class="order_input_lebal" >Product qty</div>
<input id="product_qty" name="product_qty" class="order_bd_name_input" />
<input id="sample_image" name="sample_image" onchange="show_sample_img_name();" type="file" style="display:none;" />
<input id="sample_image2" name="sample_image2" onchange="show_sample_img_name2();" type="file" style="display:none;" />
<div class="order_input_lebal" >Order by</div>
<input id="order_by" name="order_by" class="order_bd_name_input" />
<button type="submit" id="save_new_order" name="save_new_order" class="new_order_publish_btn" style="display:none;"></button>
</form >
<button onClick="document.getElementById('sample_image').click();" id="sel_sample_image1" name="sel_sample_image1" class="sel_sample_image">Select Image 1</button>
<div id="sample_img_name_out1" class="sample_img_name_out" ></div>
<button onClick="document.getElementById('sample_image2').click();" id="sel_sample_image2" name="sel_sample_image2" class="sel_sample_image">Select Image 2</button>
<div id="sample_img_name_out2" class="sample_img_name_out" ></div>
<div id="order_erorr_out_put" class="erorr_out_put" ></div>
<button onClick="cancel_new_order();" class="new_order_cancel_btn">Cancel</button>
<button id="order_publish_btn" onClick="make_new_order();" class="new_order_publish_btn">Publish</button>
<button id="final_save_new_order_btn" onClick="document.getElementById('save_new_order').click();" style="display:none;" class="new_order_publish_btn">Finish</button>
<script>
function show_sample_img_name()
{
//image_name = document.getElementById('sample_image').file['name'];
image_name = document.getElementById("sample_image").files[0];
file_name = image_name.name;
document.getElementById('sample_img_name_out1').innerHTML = file_name;
document.getElementById('sel_sample_image1').innerHTML="<span style='color:green;'>Image 1 selected</span>";
//alert(image_n);
}
function show_sample_img_name2()
{
//image_name = document.getElementById('sample_image').file['name'];
image_name = document.getElementById("sample_image2").files[0];
file_name = image_name.name;
document.getElementById('sample_img_name_out2').innerHTML = file_name;
document.getElementById('sel_sample_image2').innerHTML="<span style='color:green;'>Image 2 selected</span>";
//alert(image_n);
}
function make_new_order()
{//alert('pool');
my_id = document.getElementById('my_id').value;
bd_name = document.getElementById('building_name').value;
flat_no = document.getElementById('order_flat_no').value;
name_product = document.getElementById('product_name').value;
qty_product = document.getElementById('product_qty').value;
ordered_by = document.getElementById('order_by').value;
/*
image_sample1 = document.getElementById('sample_image').files[0];
image_sample2 = document.getElementById('sample_image2').files[0];
var image_sampleone = image_sample1.type;
var image_sampletwo = image_sample2.type;
alert(image_sampletwo);
if(image_sampleone !=="image/png" || image_sampleone !=="image/jpeg" ){
document.getElementById('order_erorr_out_put').innerHTML="<span style='color:red;'>Image one Selected Formate Not Supported</span>";
document.getElementById('order_erorr_out_put').style.display="block";
}/*else if(image_sampletwo !=="image/png" || image_sampletwo !=="image/jpeg" ){
document.getElementById('order_erorr_out_put').innerHTML="<span style='color:red;'>Image Two Selected Formate Not Supported</span>";
document.getElementById('order_erorr_out_put').style.display="block";
}//else{alert('image_sample1');}*/
if(bd_name=="" || flat_no=="" || name_product=="" || qty_product=="" || ordered_by==""){
document.getElementById('order_erorr_out_put').innerHTML="Fill All The Spaces";
document.getElementById('order_erorr_out_put').style.display="block";
}else{
document.getElementById('final_save_new_order_btn').style.display="block";
document.getElementById('order_publish_btn').style.display="none";
/*
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","transaction_auto.php?my_id="+my_id+"&building_name="+bd_name+"&order_flat_no="+flat_no+"&product_name="+name_product+"&product_qty="+qty_product+"&order_by="+ordered_by+"&status=make_new_order_insert",false);
xmlhttp.send(null);
document.getElementById('order_erorr_out_put').innerHTML=xmlhttp.responseText;
document.getElementById('order_erorr_out_put').style.display="block";*/
/*document.getElementById('building_name').value="";
document.getElementById('order_flat_no').value="";
document.getElementById('product_name').value="";
document.getElementById('product_qty').value="";
document.getElementById('order_by').value="";*/
//display_new_orders();
//document.getElementById('purchase_list_div').style.display="block";
//document.getElementById('order_new_input_div').style.display="none";
}
}
function cancel_new_order()
{
document.getElementById('building_name').value="";
document.getElementById('order_flat_no').value="";
document.getElementById('product_name').value="";
document.getElementById('product_qty').value="";
document.getElementById('order_by').value="";
document.getElementById('order_erorr_out_put').style.display="none";
}
</script>
<?php
if(isset($_POST['save_new_order']))
{
//$my_id = $_POST['my_id'];
$bd_name = $_POST['building_name'];
$flat_no = $_POST['order_flat_no'];
$name_product = $_POST['product_name'];
$qty_product = $_POST['product_qty'];
$ordered_by = $_POST['order_by'];
$image_url_one = $_FILES['sample_image']['name'];
$type_one = explode('.',$image_url_one);
$type_one =end($type_one);
$random_name_one =rand();
$image_one_tmp = $_FILES['sample_image']['tmp_name'];
$image_url_two = $_FILES['sample_image2']['name'];
$type_two = explode('.',$image_url_two);
$type_two =end($type_two);
$random_name_two =rand();
$image_two_tmp = $_FILES['sample_image2']['tmp_name'];
$insert_oreder ="insert into new_ordertb (my_id,building_name,flat_no,product_name,product_qty,order_by_id,image_url_one,image_url_two,curr_date,curr_time)
values('$my_id','$bd_name','$flat_no','$name_product','$qty_product','$ordered_by','$random_name_one.$type_one','$random_name_two.$type_two',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>";
?>
<script>
document.getElementById('order_new_input_div').style.display="block";
document.getElementById('dash_container').style.display="none";
</script>
<?php
}else{
move_uploaded_file($image_one_tmp,'new_order_sample_img/'.$random_name_one.'.'.$type_one);
move_uploaded_file($image_two_tmp,'new_order_sample_img/'.$random_name_two.'.'.$type_two);
?>
<script>
document.getElementById('purchase_list_div').style.display="block";
document.getElementById('dash_container').style.display="none";
</script>
<?php
}
}
?>
</div><!--end of order_new_input_div-->
<div id="final_recept_div" class="final_recept_div" style="display:none;">
<div id="purchase_list_output" ></div>
</div>
<div id="print_purchased_list_container" style="float:left;width:920px;height:80%;background:red;display:none; ">
<div class="" style="float:left;width:100%;height:40px;line-height:40px;background:#ccc;text-align:center;font-size:1.2em;" >PURCHASE LIST</div>
<div id="purchase_print_out" ></div>
</div>
<script>
display_purchase_list();
function display_purchase_list()
{
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","transaction_auto.php?status=display_purchase_list",false);
xmlhttp.send(null);
document.getElementById('purchase_list_output').innerHTML=xmlhttp.responseText;
}
function print_purchase_list()
{
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","transaction_auto.php?status=print_purchase_list",false);
xmlhttp.send(null);
document.getElementById('purchase_print_out').innerHTML=xmlhttp.responseText;
}
function print_purchaed_list()
{
print_purchase_list();
restore_original = document.body.innerHTML;
printable_page = document.getElementById('print_purchased_list_container').innerHTML;
document.body.innerHTML = printable_page;
window.print();
document.body.innerHTML = restore_original;
}
</script>
<div id="purchase_shops_div" class="purchase_shops_div" >
<div class="purchase_shops_header_div" >
<div class="purchase_shops_title" >Shops from where we purchase spare parts</div>
<button onClick="close_purchase_shops_div();" class="close_main_div" >x</button>
<button class="add_new_shop_btn" >Add Shop</button>
</div>
<?php
$get_shop_name = "select * from shoptb ";
$run_get_shop_name = mysqli_query($con,$get_shop_name);
while($row_get_shop_name = mysqli_fetch_array($run_get_shop_name))
{
$name_shop = $row_get_shop_name['shop_name'];
?>
<div class="single_shop_div">
<div class="single_shop_image">Salman Fardan</div>
<div class="single_shop_name"><?php echo $name_shop; ?></div>
<div class="single_shop_location">Manama BH</div>
</div>
<?php } ?>
</div><!-- end of purchase_shops-->
<div id="expenditure_main_div" class="expenditure_main_div" >
<div class="expend_main_title">
<div id="expend_main_title_eng" style="float:left;width:750px;background:#ccc;margin-left:15%;">Maintenance Expenses.</div>
<div id="expend_main_title_arabic" style="float:left;width:900px;background:#ccc;margin-left:15%;display:none;" >نفقات الصيانة</div>
<span style="float:right;background:pink;">
<button onClick="close_graph_div()" class="close_graph_btn" style="margin-top:15px;" >X</button>
<!--img src="kvt_con/print_btn.png" width="50px" height="50px" style="float:right;margin-right:20px;margin-top:5px;cursor:pointer;" /-->
<button id="" onClick="show_graph_shops_div();" class="datagraph_btn_two" style="margin-top:15px;">Details</button>
<button id="" onClick="show_print_div();" class="datagraph_btn_two" style="margin-top:15px;">Print</button>
<button id="translate_eng_btn" onClick="lang_translate_eng();" class="datagraph_btn_two" style="margin-top:15px;display:none;">Eng</button>
<button id="translate_arabic_btn" onClick="lang_translate_arabic();" class="datagraph_btn_two" style="margin-top:15px;">Arabic</button>
<img src="kvt_con/search.png" id="show_expenditure_expense_search_btn" onClick="show_expenditure_expense_search();" width="25px" height="25px" style="float:right;margin-top:15px;margin-right:6px;backgroundk:red;cursor:pointer;" />
<button id="close_expenditure_expense_search_btn" onClick="close_expenditure_expense_search();" style="float:right;width:26px;height:26px;margin-top:15px;margin-right:6px;background:red;cursor:pointer;display:none;">X</button>
</span>
</div>
<div id="search_main_expenditure_div" class="search_div">
<button onClick="search_shop_expense();" class="sel_search_btn">ok</button>
<div class="graph_search_input">
<select id="single_bd_search_input_year" class="sel_search_input"><?php option_date_year(); ?></select>
<select id="single_bd_search_input_month" class="sel_search_input"><?php option_date_month(); ?></select>
<select id="single_bd_search_input_day" class="sel_search_input"><?php option_date_day(); ?></select>
</div>
<input type="text" id="single_bd_search_input" onKeyup="search_shop_expense()" placeholder="Shop Name" class="graph_search_input" />
</div>
<div id="main_expend_div" >
<div class="main_expend_lebal_div" >
<div class="shop_exp_to_name">SHOP NAME</div>
<div class="shop_exp_to_amount">AMOUNT BD</div>
<div class="shop_exp_to_date"> DATE</div>
</div>
<div id="main_expend_helping_div" >
<?php
$get_shop_name = "select * from expendituretb order by id desc ";
$run_get_expenditure = mysqli_query($con,$get_shop_name);
while($row_get_expenditure = mysqli_fetch_array($run_get_expenditure))
{
$name_shop = $row_get_expenditure['shop_name'];
$spent_amount = $row_get_expenditure['amount'];
$start_date= $row_get_expenditure['start_date'];
$end_date= $row_get_expenditure['end_date'];
?>
<div class="main_expend_out_div" >
<div class="shop_exp_to_name_output"><?php echo $name_shop ?></div>
<div class="shop_exp_to_amount_output"><?php echo $spent_amount ?></div>
<div class="shop_exp_to_date_output"><?php echo"<span style='color:green'>$start_date </span> / <span style='color:red'>$end_date</span>"; ?></div>
</div>
<?php } ?>
</div>
</div><!--end of main_expend_div -->
<?php lang_trans_expenditure_main(); ?>
<div id="disp_main_expend_search_output" ></div>
<div id="expendiure_printing_div" style="display:none;" >
<div id="expendiure_printing" ><?php expendiure_printing(); ?></div>
<div id="trans_expendiure_printing" style="display:none" ><?php trans_expendiure_printing(); ?></div>
</div><!-- end of expendiure_printing_div -->
<script>
function show_expenditure_expense_search()
{
document.getElementById('search_main_expenditure_div').style.display="block";
document.getElementById('close_expenditure_expense_search_btn').style.display="block";
document.getElementById('show_expenditure_expense_search_btn').style.display="none";
window.scrollTo(0,0);
}
function close_expenditure_expense_search()
{
document.getElementById('search_main_expenditure_div').style.display="none";
document.getElementById('close_expenditure_expense_search_btn').style.display="none";
document.getElementById('show_expenditure_expense_search_btn').style.display="block";
//display_all_comp();
}
function search_shop_expense()
{
ongoing_search = document.getElementById('single_bd_search_input').value;
ongoing_search_day = document.getElementById('single_bd_search_input_day').value;
ongoing_search_month = document.getElementById('single_bd_search_input_month').value;
ongoing_search_year = document.getElementById('single_bd_search_input_year').value;
ongoing_search_leng = ongoing_search.length;
if(ongoing_search_month < 10){sub_search_month ='0'+ongoing_search_month;}else{sub_search_month=ongoing_search_month;}
start_search_date = ongoing_search_day+'-'+sub_search_month+'-'+ongoing_search_year;
if(ongoing_search_leng < 1 && start_search_date =="Select day-Select month-Select year" )
{
document.getElementById('disp_main_expend_search_output').style.display="none";
document.getElementById('main_expend_helping_div').style.display="block";
}else{
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","transaction_auto.php?ongoing_search="+ongoing_search+"&&start_search_date="+start_search_date+"&&status=display_main_expenditure_search_result",false);
xmlhttp.send(null);
document.getElementById('disp_main_expend_search_output').innerHTML=xmlhttp.responseText;
document.getElementById('disp_main_expend_search_output').style.display="block";
//document.getElementById('main_expend_out_div').style.display="none";
document.getElementById('main_expend_helping_div').style="display:none;";
//alert(123);
}
}
function show_print_div()
{
print_expend = document.getElementById('expendiure_printing_div').innerHTML;
restore_page = document.body.innerHTML;
document.body.innerHTML = print_expend;
window.print();
document.body.innerHTML = restore_page;
//alert('expendiure_printing_div');
}
function lang_translate_arabic()
{
document.getElementById('expend_main_title_arabic').style.display="block";
document.getElementById('expend_main_title_eng').style.display="none";
document.getElementById('translate_arabic_btn').style.display="none";
document.getElementById('translate_eng_btn').style.display="block";
document.getElementById('main_expend_div_trans').style.display="block";
document.getElementById('main_expend_div').style.display="none";
document.getElementById('trans_expendiure_printing').style.display="block";
document.getElementById('expendiure_printing').style.display="none";
document.getElementById('arabic_display_all_comp').style.display="block";
document.getElementById('display_all_comp_output').style.display="none";
//alert('Lang');
}
function lang_translate_eng()
{
document.getElementById('expend_main_title_arabic').style.display="none";
document.getElementById('expend_main_title_eng').style.display="block";
document.getElementById('translate_arabic_btn').style.display="block";
document.getElementById('translate_eng_btn').style.display="none";
document.getElementById('main_expend_div_trans').style.display="none";
document.getElementById('main_expend_div').style.display="block";
document.getElementById('trans_expendiure_printing').style.display="none";
document.getElementById('expendiure_printing').style.display="block";
document.getElementById('arabic_display_all_comp').style.display="none";
document.getElementById('display_all_comp_output').style.display="block";
//alert('Lang2');
}
</script>
</div><!-- end of expenditure_main_div -->
<div id="show_graph_div" class="show_graph_div" style="margin-bottom:10px;" >
<script>
function show_graph_diagram(sgd)
{ diff_id = sgd;
document.getElementById('graph_data').style.display="block";
document.getElementById('show_graph_text_btn').style.display="block";
document.getElementById('graph_contain_div').style.display="none";
//document.getElementById('graph_text_info_div').style.display="none";
document.getElementById('show_graph_diagram_btn').style.display="none";
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","transaction_auto.php?diff_id="+diff_id+"&status=show_graph_diagram",false);
xmlhttp.send(null);
document.getElementById('graph_data_output').innerHTML=xmlhttp.responseText;
}
function show_graph_text()
{
document.getElementById('graph_contain_div').style.display="block";
//document.getElementById('graph_text_info_head_div').style.display="block";
document.getElementById('show_graph_diagram_btn').style.display="block";
document.getElementById('graph_data').style.display="none";
document.getElementById('show_graph_text_btn').style.display="none";
}
function show_graph_shops_div2()
{
document.getElementById('show_graph_div').style.display="none";
document.getElementById('graph_contain_div').style.display="none";
document.getElementById('dash_container').style.display="none";
document.getElementById('expenditure_main_div').style.display="block";
}
function close_graph_div()
{
document.getElementById('show_graph_div').style.display="none";
document.getElementById('dash_container').style.display="block";
window.open('purchase.php','_self');
}
</script>
<div id="graph_contain_div" style="display:none;" >
<div id="helping_graph_div" class="helping_graph_div" >
<button onClick="close_graph_div()" class="close_graph_btn">X</button>
<button id="show_graph_diagram_btn" onClick="show_graph_shops_div2();" class="datagraph_btn_two">Back</button>
<button id="show_graph_text_btn" onClick="show_graph_text();" class="datagraph_btn_two" style="display:none;">Data</button>
<button id="show_graph_diagram_btn" onClick="show_more_option_div();" class="datagraph_btn_two">more</button>
<img src="kvt_con/search.png" id="show_single_expense_search_btn" onClick="show_single_expense_search();" width="25px" height="25px" style="float:right;margin-top:3px;margin-right:6px;backgroundk:red;cursor:pointer;" />
<button id="close_single_expense_search_btn" onClick="close_single_expense_search();" style="float:right;width:26px;height:26px;margin-top:3px;margin-right:6px;background:red;cursor:pointer;display:none;">X</button>
</div>
<div class="postion_helping_graph_div"></div>
<div id="search_main_div" class="search_div">
<button onClick="search_single_building_expense();" class="sel_search_btn">ok</button>
<div class="graph_search_input">
<select id="single_bd_search_input_year" class="sel_search_input"><?php option_date_year(); ?></select>
<select id="single_bd_search_input_month" class="sel_search_input"><?php option_date_month(); ?></select>
<select id="single_bd_search_input_day" class="sel_search_input"><?php option_date_day(); ?></select>
</div>
<input type="text" id="single_bd_search_input" onKeyup="search_single_building_expense()" placeholder="Property Name" class="graph_search_input" />
</div>
<div id="more_option_div" onmouseleave="close_graph_more_option_div_comp();" style="float:right;width:150px;height:auto;margin-left:90%;margin-top:40px;background:pink;text-align:center;font-weight:bold;color:blue;display:none;position:fixed;" >More option case
<button onClick="display_all_comp();" class="more_option_btn">ALL</button>
<button onClick="display_single_comp('adel');" class="more_option_btn">ADEL</button>
<button onClick="display_single_comp('salah');" class="more_option_btn">SALAH</button>
<button onClick="display_single_comp('khalaf sons');" class="more_option_btn">KHALAF SONS</button>
<button onClick="display_single_comp('adel and salah');" class="more_option_btn">ADEL AND SALAH</button>
<button onClick="close_more_option_div();" onClick="close_more_option_div();" class="more_option_btn">Exist</button>
<style>
.more_option_btn{width:90%;height:40px;margin-left:5%;margin-bottom:5px;cursor:pointer;font-weight:bold;color:blue;}
.search_div{float:left;width:550px;height:60px;margin-left:30%;backgroundk:pink;display:none;}
.graph_search_input{float:right;height:25px;margin-top:17px;margin-right:6px;border-radius:5px;border:transparent;padding-left:3px;font-size:1em;border:1px solid gray;text-align:center;}
.sel_search_input{float:right;height:25px;border:transparent;}
.sel_search_btn{float:right;height:25px;margin-right:8px;margin-top:17px;background:pink;borderk:transparent;cursor:pointer;}
</style>
</div>
<div id="display_single_comp_output" style="float:left;" ></div>
<div id="display_all_comp_output" ></div>
<div id="arabic_display_all_comp" style="display:none;" ><?php lang_trans_display_all_comp(); ?></div>
<div id="disp_single_comp_print_output" style="display:none;" ></div>
<div id="disp_single_bd_expen_search_output" ></div>
<div id="print_single_bd_expen_arabic" style="display:none;" ></div>
<div id="print_single_bd_expen_search_output" style="display:none;" ></div>
<script>
function show_graph_option_btn(sgob)
{
graph_more_option_div ='graph_more_option_div'+sgob;
document.getElementById(graph_more_option_div).style.display="block";
}
function close_graph_more_option_div()
{
document.getElementById(graph_more_option_div).style.display="none";
}
function show_graph_option_btn_comp(sgobc)
{
graph_more_option_div_comp ='graph_more_option_div_comp'+sgobc;
document.getElementById(graph_more_option_div_comp).style.display="block";
}
function close_graph_more_option_div_comp()
{
document.getElementById(graph_more_option_div_comp).style.display="none";
}
function print_text_graph_dat_comp(ptgdc)
{
graph_more_option_btn_comp='graph_more_option_btn_comp'+ptgdc;
graph_more_option_div_comp='graph_more_option_div_comp'+ptgdc;
document.getElementById(graph_more_option_btn_comp).style.display="none";
document.getElementById(graph_more_option_div_comp).style.display="none";
owner_helping_comp = document.getElementById('owner_helping_comp').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","transaction_auto.php?owner_helping_comp="+owner_helping_comp+"&&status=disp_single_comp_print",false);
xmlhttp.send(null);
document.getElementById('disp_single_comp_print_output').innerHTML=xmlhttp.responseText;
restore_page = document.body.innerHTML;
display_single_comp_print ='display_single_comp_print'+ptgdc;
printible_graph_text = document.getElementById(display_single_comp_print).innerHTML;
document.body.innerHTML = printible_graph_text;
window.print();
document.body.innerHTML = restore_page;
document.getElementById(graph_more_option_btn_comp).style.display="block";
//alert('print_text_graph_data');
}
function show_more_option_div()
{
document.getElementById('more_option_div').style.display="block";
}
function close_more_option_div()
{
document.getElementById('more_option_div').style.display="none";
}
function display_all_comp()
{
document.getElementById('display_all_div').style.display="block";
document.getElementById('display_single_comp_output').style.display="none";
}
display_all_comp();
function display_all_comp()
{
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","transaction_auto.php?status=display_all_comp",false);
xmlhttp.send(null);
document.getElementById('display_all_comp_output').innerHTML=xmlhttp.responseText;
document.getElementById('display_all_comp_output').style.display="block";
document.getElementById('display_single_comp_output').style.display="none";
document.getElementById('disp_single_bd_expen_search_output').style.display="none";
//alert(dsc);
}
function display_single_comp(dsc)
{
property_owner = dsc;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","transaction_auto.php?property_owner="+property_owner+"&&status=display_single_comp",false);
xmlhttp.send(null);
document.getElementById('display_single_comp_output').innerHTML=xmlhttp.responseText;
document.getElementById('display_single_comp_output').style.display="block";
document.getElementById('display_all_comp_output').style.display="none";
document.getElementById('disp_single_bd_expen_search_output').style.display="none";
document.getElementById('arabic_display_all_comp').style.display="none";
//alert(dsc);
}
function show_single_expense_search()
{
document.getElementById('search_main_div').style.display="block";
document.getElementById('close_single_expense_search_btn').style.display="block";
document.getElementById('show_single_expense_search_btn').style.display="none";
window.scrollTo(0,0);
}
function close_single_expense_search()
{
document.getElementById('search_main_div').style.display="none";
document.getElementById('close_single_expense_search_btn').style.display="none";
document.getElementById('show_single_expense_search_btn').style.display="block";
display_all_comp();
}
function search_single_building_expense()
{
ongoing_search = document.getElementById('single_bd_search_input').value;
ongoing_search_day = document.getElementById('single_bd_search_input_day').value;
ongoing_search_month = document.getElementById('single_bd_search_input_month').value;
ongoing_search_year = document.getElementById('single_bd_search_input_year').value;
ongoing_search_leng = ongoing_search.length;
if(ongoing_search_month < 10){sub_search_month ='0'+ongoing_search_month;}else{sub_search_month=ongoing_search_month;}
start_search_date = ongoing_search_day+'-'+sub_search_month+'-'+ongoing_search_year;
if(ongoing_search_leng < 1 && start_search_date =="Select day-Select month-Select year" )
{display_all_comp();}else{
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","transaction_auto.php?ongoing_search="+ongoing_search+"&&start_search_date="+start_search_date+"&&status=display_single_bd_expen_search_result",false);
xmlhttp.send(null);
document.getElementById('disp_single_bd_expen_search_output').innerHTML=xmlhttp.responseText;
document.getElementById('disp_single_bd_expen_search_output').style.display="block";
document.getElementById('display_all_comp_output').style.display="none";
//document.getElementById('display_single_comp_output').style.display="none";
//alert(dsc);
}
}
function show_graph_option_onsearch(sgoo)
{
graph_more_option_search_div = 'graph_more_option_search_div'+sgoo;
document.getElementById(graph_more_option_search_div).style.display="block";
}
function close_graph_option_onsearch()
{
document.getElementById(graph_more_option_search_div).style.display="none";
}
////////////////////////////////////////////////////////////////11
function print_text_graph_dat_search(ptgds)
{ //alert(111);
calender_id = ptgds;
ongoing_search = document.getElementById('single_bd_search_input').value;
ongoing_search_day = document.getElementById('single_bd_search_input_day').value;
ongoing_search_month = document.getElementById('single_bd_search_input_month').value;
ongoing_search_year = document.getElementById('single_bd_search_input_year').value;
ongoing_search_leng = ongoing_search.length;
if(ongoing_search_month < 10){sub_search_month ='0'+ongoing_search_month;}else{sub_search_month=ongoing_search_month;}
start_search_date = ongoing_search_day+'-'+sub_search_month+'-'+ongoing_search_year;
if(ongoing_search_leng < 1 && start_search_date =="Select day-Select month-Select year" )
{display_all_comp();}else{
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","transaction_auto.php?calender_id="+calender_id+"&&ongoing_search="+ongoing_search+"&&start_search_date="+start_search_date+"&&status=print_single_bd_expen_search_result",false);
xmlhttp.send(null);
document.getElementById('print_single_bd_expen_search_output').innerHTML=xmlhttp.responseText;
document.getElementById('disp_single_bd_expen_search_output').style.display="block";
document.getElementById('display_all_comp_output').style.display="none";
}
restore_page = document.body.innerHTML;
//print_single_bd_expen_arabic ='print_single_bd_expen_arabic'+ptgda;
printible_graph_text = document.getElementById('print_single_bd_expen_search_output').innerHTML;
document.body.innerHTML = printible_graph_text;
window.print();
document.body.innerHTML = restore_page;
}
////////////////////////////////////////////////////////////////////////
function show_graph_option_arabic(sgoa)
{
graph_more_option_div_arabic ='graph_more_option_div_arabic'+sgoa;
document.getElementById(graph_more_option_div_arabic).style.display="block";
}
function close_graph_more_option_arabic()
{
document.getElementById(graph_more_option_div_arabic).style.display="none";
}
///////////////////////////////////////////////////////////////////////////////////
function print_text_graph_dat_arabic(ptgda)
{
calender_id = ptgda;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","transaction_auto.php?calender_id="+calender_id+"&&status=print_single_bd_expen_arabic",false);
xmlhttp.send(null);
document.getElementById('print_single_bd_expen_arabic').innerHTML=xmlhttp.responseText;
//alert(77776);
restore_page = document.body.innerHTML;
//print_single_bd_expen_arabic ='print_single_bd_expen_arabic'+ptgda;
printible_graph_text = document.getElementById('print_single_bd_expen_arabic').innerHTML;
document.body.innerHTML = printible_graph_text;
window.print();
document.body.innerHTML = restore_page;
}
/*
print_text_graph_dat_arabic();
function print_text_graph_dat_arabic()
{
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","transaction_auto.php?status=print_single_bd_expen_arabic",false);
xmlhttp.send(null);
document.getElementById('print_single_bd_expen_arabic').innerHTML=xmlhttp.responseText;
alert(77776);
}*/
////////////////////////////////////////////////////////////////////////////////////////
</script>
</div><!-- end of graph_contain_div-->
<div id="graph_contain_div" style="display:none;" >
<!--div id="helping_graph_div" class="helping_graph_div" >
<button onClick="close_graph_div()" class="close_graph_btn">X</button>
<button id="show_graph_diagram_btn" onClick="show_graph_shops_div2();" class="datagraph_btn_two">Back</button>
<button id="show_graph_text_btn" onClick="show_graph_text()" class="datagraph_btn_two" style="display:none;">Data</button>
</div-->
<?php
$get_calender = "select * from graph_calendartb ";
$run_get_calender = mysqli_query($con,$get_calender);
while($row_calender = mysqli_fetch_array($run_get_calender)){
$calender_id = $row_calender['id'];
$start_date = $row_calender['start_date'];
$shop_name = $row_calender['shop_name'];
$status_code = $row_calender['status_code'];
$final_amount = $row_calender['total_amount'];
?>
<div id="print_text_graph_data<?php echo $calender_id; ?>" style="float:left;" >
<div style="float:left;width:948px;height:30px;line-height:30px;text-align:center;color:#952811;font-weight:bold;font-size:1.3em;background:#ccc;margin-top:10px;border-top: 1px solid gray;border-left: 1px solid gray;border-right: 1px solid gray;" ><?php echo $shop_name; ?> Expenditure.</div>
<div id="graph_text_info_head_div" style="float:left;width:950px;height:40px;margin-topk:60px;background:red;" >
<div style="float:left;width:245px;height:40px;line-height:40px;margin-leftk:5px;margin-bottomk:5px;background:#ccc;colork:white;border:1px solid gray;font-size:1.2em;text-align:center;font-weight:bold;"><span id="english_lang3">PROPERTY NAME</span> <!--span id="arabic_lang3"> <?php lang_trans_property_name(); ?></span--></div>
<div style="float:left;width:237px;height:40px;line-height:40px;margin-leftk:5px;margin-bottomk:5px;background:#ccc;colork:white;border:1px solid gray;font-size:1.2em;text-align:center;font-weight:bold;"><span id="english_lang4">AMOUNT BD</span> <!--span id="arabic_lang4"><?php lang_trans_amount(); ?></span!--></div>
<div style="float:left;width:230px;height:40px;line-height:40px;margin-leftk:5px;margin-bottomk:5px;background:#ccc;colork:white;border:1px solid gray;font-size:1.2em;text-align:center;font-weight:bold;"><span id="english_lang5">PERCENTAGE</span> <!--span id="arabic_lang5"><?php lang_trans_percentge(); ?></span!--></div>
<div style="float:left;width:230px;height:40px;line-height:40px;margin-leftk:5px;margin-bottomk:5px;background:#ccc;colork:white;border:1px solid gray;font-size:1.2em;text-align:center;font-weight:bold;">DATE</div>
<script>
function print_text_graph_dat(ptgd)
{
restore_page = document.body.innerHTML;
sub_printible_graph_text = 'print_text_graph_data'+ptgd;
printible_graph_text = document.getElementById(sub_printible_graph_text).innerHTML;
document.body.innerHTML = printible_graph_text;
window.print();
document.body.innerHTML = restore_page;
//alert('print_text_graph_data');
}
</script>
</div>
<?php
$disp_graph_info = "select * from graph_datatb where status_code='$status_code' ";//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'];
$my_percentage = 100;
$amount_percentage = number_format($propert_amount / $final_amount * $my_percentage,1,'.','');
?>
<div id="graph_text_info_div" style="float:left;width:950px;height:auto;margin-topk:2px;background:#fff;" >
<div style="float:left;width:245px;height:30px;line-height:30px;margin-leftk:5px;margin-bottomk:5px;background:#fff;colork:white;border:1px solid gray;text-align:center;font-size:1.2em;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><?php echo"$propert_name"; ?></div>
<div style="float:left;width:237px;height:30px;line-height:30px;margin-leftk:5px;margin-bottomk:5px;background:#fff;colork:white;border:1px solid gray;text-align:center;font-size:1.2em;white-space: nowrap;overflow: hidden;text-overflow: ellipsis; "><?php echo"$propert_amount"; ?></div>
<div style="float:left;width:230px;height:30px;line-height:30px;margin-leftk:5px;margin-bottomk:5px;background:#fff;colork:white;border:1px solid gray;text-align:center;font-size:1.2em;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><?php echo"$amount_percentage"; ?></div>
<div style="float:left;width:230px;height:30px;line-height:30px;margin-leftk:5px;margin-bottomk:5px;background:#fff;colork:white;border:1px solid gray;text-align:center;font-size:1.2em;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><?php echo"<span style='color:green'>$trans_start_date </span>/<span style='color:red'> $trans_end_date </span>"; ?></div>
</div><!-- end of graph_text_info_div-->
<?php } ?>
</div><!--end of print_text_graph_data -->
<?php } ?>
</div><!-- end of graph_contain_div-->
<div id="print_single_bd_expen_arabic" style="float:left;display:none;" >
<!--div id="helping_graph_div" class="helping_graph_div" >
<button onClick="close_graph_div()" class="close_graph_btn">X</button>
<button id="show_graph_diagram_btn" onClick="show_graph_shops_div2();" class="datagraph_btn_two">Back</button>
<button id="show_graph_text_btn" onClick="show_graph_text()" class="datagraph_btn_two" style="display:none;">Data</button>
</div-->
<?php
$lang_output="";
$lang_output2="";
$get_calender = "select * from graph_calendartb ";
$run_get_calender = mysqli_query($con,$get_calender);
while($row_calender = mysqli_fetch_array($run_get_calender)){
$calender_id = $row_calender['id'];
$start_date = $row_calender['start_date'];
$shop_name = $row_calender['shop_name'];
$status_code = $row_calender['status_code'];
$final_amount = $row_calender['total_amount'];
$get_lang ="select * from lang_transtb where english ='$shop_name'";
$run_lang = mysqli_query($con,$get_lang);
while($row_lang = mysqli_fetch_array($run_lang))
{
$lang_output = $row_lang['arabic'];
$lang_output2 = $row_lang['english'];
}
?>
<div id="print_text_graph_data<?php echo $calender_id; ?>" style="float:left;" >
<?php
if($shop_name == $lang_output2){?>
<div style="float:left;width:948px;height:30px;line-height:30px;text-align:center;color:#952811;font-weight:bold;font-size:1.3em;background:#ccc;margin-top:10px;border-top: 1px solid gray;border-left: 1px solid gray;border-right: 1px solid gray;" ><?php echo $lang_output; ?> المصروفات <!--Expenditure.--></div>
<?php }else{ ?>
<div style="float:left;width:948px;height:30px;line-height:30px;text-align:center;color:#952811;font-weight:bold;font-size:1.3em;background:#ccc;margin-top:10px;border-top: 1px solid gray;border-left: 1px solid gray;border-right: 1px solid gray;" ><?php echo $shop_name; ?> المصروفات <!--Expenditure.--></div>
<?php } ?>
<div id="graph_text_info_head_div" style="float:left;width:950px;height:40px;margin-topk:60px;background:red;" >
<div style="float:left;width:245px;height:40px;line-height:40px;margin-leftk:5px;margin-bottomk:5px;background:#ccc;colork:white;border:1px solid gray;font-size:1.2em;text-align:center;font-weight:bold;"><!--PROPERTY NAME--><?php lang_trans_property_name(); ?></div>
<div style="float:left;width:237px;height:40px;line-height:40px;margin-leftk:5px;margin-bottomk:5px;background:#ccc;colork:white;border:1px solid gray;font-size:1.2em;text-align:center;font-weight:bold;"><!--AMOUNT BD--><?php lang_trans_amount(); ?></div>
<div style="float:left;width:230px;height:40px;line-height:40px;margin-leftk:5px;margin-bottomk:5px;background:#ccc;colork:white;border:1px solid gray;font-size:1.2em;text-align:center;font-weight:bold;"><!--PERCENTAGE--><?php lang_trans_percentge(); ?></div>
<div style="float:left;width:230px;height:40px;line-height:40px;margin-leftk:5px;margin-bottomk:5px;background:#ccc;colork:white;border:1px solid gray;font-size:1.2em;text-align:center;font-weight:bold;"><!--DATE--><?php lang_trans_date(); ?></div>
<script>
function print_text_graph_dat(ptgd)
{
restore_page = document.body.innerHTML;
sub_printible_graph_text = 'print_text_graph_data'+ptgd;
printible_graph_text = document.getElementById(sub_printible_graph_text).innerHTML;
document.body.innerHTML = printible_graph_text;
window.print();
document.body.innerHTML = restore_page;
//alert('print_text_graph_data');
}
</script>
</div>
<?php
$lang_output="";
$lang_output2="";
$disp_graph_info = "select * from graph_datatb where status_code='$status_code' ";//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'];
$trans_start_date = $row_disp_graph_info['trans_start_date'];
$trans_end_date = $row_disp_graph_info['trans_end_date'];
$my_percentage = 100;
$amount_percentage = number_format($propert_amount / $final_amount * $my_percentage,1,'.','');
$get_lang ="select * from lang_transtb where english ='$propert_name'";
$run_lang = mysqli_query($con,$get_lang);
?>
<div id="graph_text_info_div" style="float:left;width:950px;height:auto;margin-topk:2px;background:#fff;" >
<?php
while($row_lang = mysqli_fetch_array($run_lang))
{
$lang_output = $row_lang['arabic'];
$lang_output2 = $row_lang['english'];
}
if($propert_name == $lang_output2){
?>
<div style="float:left;width:245px;height:30px;line-height:30px;margin-leftk:5px;margin-bottomk:5px;background:#fff;colork:white;border:1px solid gray;text-align:center;font-size:1.2em;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><?php echo"$lang_output"; ?></div>
<?php }else{ ?>
<div style="float:left;width:245px;height:30px;line-height:30px;margin-leftk:5px;margin-bottomk:5px;background:#fff;colork:white;border:1px solid gray;text-align:center;font-size:1.2em;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><?php echo"$propert_name"; ?></div>
<?php } ?>
<div style="float:left;width:237px;height:30px;line-height:30px;margin-leftk:5px;margin-bottomk:5px;background:#fff;colork:white;border:1px solid gray;text-align:center;font-size:1.2em;white-space: nowrap;overflow: hidden;text-overflow: ellipsis; "><?php echo"$propert_amount"; ?></div>
<div style="float:left;width:230px;height:30px;line-height:30px;margin-leftk:5px;margin-bottomk:5px;background:#fff;colork:white;border:1px solid gray;text-align:center;font-size:1.2em;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><?php echo"$amount_percentage"; ?></div>
<div style="float:left;width:230px;height:30px;line-height:30px;margin-leftk:5px;margin-bottomk:5px;background:#fff;colork:white;border:1px solid gray;text-align:center;font-size:1.2em;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><?php echo"<span style='color:green'>$trans_start_date </span>/<span style='color:red'> $trans_end_date </span>"; ?></div>
</div><!-- end of graph_text_info_div-->
<?php } ?>
</div><!--end of print_text_graph_data -->
<?php } ?>
</div><!-- end of print_detailed_expenditure_div-->
<!--/div><!-- end of print_detailed_expenditure_div-->
<div id="graph_data" class="graph_data" style="display:none;" >
<div id="helping_graph_div" class="helping_graph_div" style="displayk:none;background:#ccc;" >
<!--div class="graph_info_title" style="margin-top:0px;" ><?php echo $shop_name; ?> Expenditure.</div-->
<button onClick="close_graph_div()" class="close_graph_btn">X</button>
<!--button id="show_graph_diagram_btn" onClick="show_graph_shops_div2();" class="datagraph_btn_two">Back</button-->
<button id="show_graph_text_btn" onClick="show_graph_text()" class="datagraph_btn_two" >Data</button>
</div>
<div id="graph_data_output" ></div>
<!--div class="graph_draw" style="height:11.2%;margin-left:113px;position:fixed;bottom:60px;" >Tower B 11.1%</div>
<div class="graph_draw" style="height:10.8%;margin-left:200px;position:fixed;bottom:60px;" >Patrex 10.8%</div>
<div class="graph_draw" style="height:0%;margin-left:285px;position:fixed;bottom:60px;color:brown;" >Adliya</div>
<!--div class="graph_draw" style="height:2.02%;margin-left:370px;position:fixed;bottom:60px;" >Brown T 2%</div>
<div class="graph_draw" style="height:21.6%;margin-left:455px;position:fixed;bottom:60px;" >Salmaniya 21.6%</div>
<div class="graph_draw" style="height:3.4%;margin-left:540px;position:fixed;bottom:60px;" >C M C 3.4%</div>
<div class="graph_draw" style="height:1.6%;margin-left:625px;position:fixed;bottom:60px;">Tubli 1.6%</div>
<div class="graph_draw" style="height:1.9%;margin-left:710px;position:fixed;bottom:60px;" >Vintage 1.9%</div>
<div class="graph_draw" style="height:5.6%;margin-left:795px;position:fixed;bottom:60px;">Lenox1 5.6%</div>
<div class="graph_draw" style="height:5.5%;margin-left:880px;position:fixed;bottom:60px;">Lenox2 5.5%</div>
<div class="graph_draw" style="height:3.4%;margin-left:965px;position:fixed;bottom:60px;">Lenox3 3.4%</div>
<div class="graph_draw"style="height:1.6%;line-height:10px;margin-left:1050px;position:fixed;bottom:60px;">Saj 1</div>
<div class="graph_draw"style="height:1.1%;line-height:5px;margin-left:1135px;position:fixed;bottom:60px;">Saj 2</div>
<div class="graph_draw" style="height:3.5%;margin-left:1220px;position:fixed;bottom:60px;">Saj 3 .5%</div>
<div class="graph_draw"style="height:16.5%;margin-left:1305px;position:fixed;bottom:60px;">Others 13.8%</div>
<div class="graph_draw" style="height:0%;margin-left:1390px;position:fixed;bottom:60px;color:brown;">Indonesian Emb</div>
<div class="graph_draw"style="height:6.1%;margin-left:1475px;position:fixed;bottom:60px;">Panorama 6.1%</div-->
<div class="graph_bottom_div">1-sep-2019 to 15-sep-2019 Salman Fardan</div>
</div>
<script>
/*
function show_add_graph_data_div(sagdd)
{
calender_id = sagdd;
document.getElementById('adding_graph_data_div').style.display="block";
document.getElementById('graph_contain_div').style.display="none";
document.getElementById('show_graph_div').style.display="none";
document.getElementById('helping_graph_div').style.display="none";
//alert(sagdd);
}*/
</script>
</div><!--end_of_ show_graph_div-->
<?php
/*
$lang_output2="";
$get_shop_name = "select * from expendituretb order by id desc ";
$run_get_expenditure = mysqli_query($con,$get_shop_name);
while($row_get_expenditure = mysqli_fetch_array($run_get_expenditure))
{
$name_shop = $row_get_expenditure['shop_name'];
$spent_amount = $row_get_expenditure['amount'];
$start_date= $row_get_expenditure['start_date'];
$end_date= $row_get_expenditure['end_date'];
$get_lang ="select * from lang_transtb where english ='$name_shop'";
$run_lang = mysqli_query($con,$get_lang);
while($row_lang = mysqli_fetch_array($run_lang))
{
$lang_output = $row_lang['arabic'];
$lang_output2 = $row_lang['english'];
}
if($name_shop == $lang_output2){
$my_name = $name_shop;
echo"<div stylek='width:45%;height:30px;float:left;color:red;background:orange;margin-bottom:5px;'>q$lang_output</div>";
}else{echo"<div stylek='width:45%;height:30px;float:right;color:green;background:pink;margin-bottom:5px;'>v$name_shop</div>";}
}
/*$get_lang2 = "
SELECT expendituretb.shop_name,lang_transtb.english,
lang_transtb.arabic
FROM expendituretb
LEFT JOIN lang_transtb
ON expendituretb.shop_name = lang_transtb.english
";
$run_lang = mysqli_query($con,$get_lang2);
while($row_lang = mysqli_fetch_array($run_lang)){
$lang_output = $row_lang['arabic'];
$lang_output2 = $row_lang['english'];
$shop_name = $row_lang['shop_name'];
//echo"<div>$lang_output</div>";
echo"<div>$shop_name</div>";
}*/
?>
<?php
/*
$lang_output="";
$lang_output2="";
$get_calender = "select * from graph_calendartb ";
$run_get_calender = mysqli_query($con,$get_calender);
while($row_calender = mysqli_fetch_array($run_get_calender)){
$calender_id = $row_calender['id'];
$start_date = $row_calender['start_date'];
$shop_name = $row_calender['shop_name'];
$status_code = $row_calender['status_code'];
$final_amount = $row_calender['total_amount'];
$get_lang ="select * from lang_transtb where english ='$shop_name'";
$run_lang = mysqli_query($con,$get_lang);
while($row_lang = mysqli_fetch_array($run_lang))
{
$lang_output = $row_lang['arabic'];
$lang_output2 = $row_lang['english'];
}
if($shop_name == $lang_output2){
echo"<div stylek='width:45%;height:30px;float:left;color:red;background:orange;margin-bottom:5px;'>q$lang_output</div>";
}else{echo"<div stylek='width:45%;height:30px;float:right;color:green;background:pink;margin-bottom:5px;'>v$shop_name</div>";}
*/
//echo"<div>$lang_output</div>";
//}
?>
</body>
</html>