| 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:/xamppkk/htdocs-coblaa/market/ |
Upload File : |
<html>
<?php
session_start();
include('db.php');
?>
<?php
if(isset($_SESSION['my_id']))
{
//$_SESSION['email']=$user_email;
$my_id = $_SESSION['my_id'];
//echo"$my_id";
}
?>
<?php
if(isset($_GET['your_ad'])){
$advert_id = $_GET['your_ad'];
}
?>
<input type="text" id="advert_id" class="helping_id" style="display:none;" value="<?php echo $advert_id;?>">
<input type="text" id="my_id" class="helping_id" style="display:none;" value="<?php echo $my_id;?>">
<div style="display:none;" >
<?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
*/
//////////////////////////////////////////////////////////
$curr_day = date("d");
$curr_month = date("M");
$curr_year = date("Y");
?>
<input type="text" id="ipuser" class="helping_id" style="display:none;" value="<?php echo $user_ip;?>">
</div>
<head>
<title>Cobmall online store</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/detail.css?v2" />
</head>
<body>
<div id="main_home_area" class="main_home_area" >
<!--a href="http://craneblue.com/market/store"><div class="main_home_tile">EA Market</div></a-->
<div class="sub_home_btn_area">
<img src="main_icons/back_btn.png" onClick="goBack_main();" class="back_btn_icon_home" />
<script>
function goBack_main() {window.history.back();}
</script>
<!--a href="cart?ipuser=<?php echo $user_ip ?>"><span id="cart_count_home" ></span></a>
<a href="cart?ipuser=<?php echo $user_ip ?>"><img src="main_icons/mkt icon8.png" widthk="40px" class="cart_icon_home" /></a-->
</div>
</div>
<div id="positioning_div" class="positioning_div"></div>
<?php
$get_advert = "select * from adverttb where id='$advert_id' ";
$run_advert = mysqli_query($con,$get_advert);
while($row_advert = mysqli_fetch_array($run_advert))
{
$product_id = $row_advert['id'];
$user_id = $row_advert['my_id'];
$product_name = $row_advert['product_name'];
$product_detail = $row_advert['product_detail'];
$product_image = $row_advert['product_image'];
$product_url = $row_advert['product_url'];
$product_cartegory = $row_advert['product_category'];
$product_status = $row_advert['product_status'];
$product_price = $row_advert['product_price'];
$before_price = $row_advert['before_price'];
$country = $row_advert['country'];
$city = $row_advert['city'];
$adress = $row_advert['adress'];
$contact = $row_advert['contact'];
$curr_date = $row_advert['curr_date'];
$curr_time = $row_advert['curr_time'];
?>
<input id="product_cartegory" value="<?php echo"$product_cartegory"; ?>" style="display:none;" />
<div class="main_preview_left_div" >
<div id="preview_img" class="preview_img" >
<img id="first_main_zoom_img" onClick="zoom_image(this.id);" src="advert_images/<?php echo"$product_image";?>" class="preview_image" />
<div id="disp_more_img_zoom_output" ></div>
</div>
<div class="more_img_div" >
<div id="display_more_img_output" ></div>
</div>
</div>
<div class="main_content_detail" >
<div class="pricing_div" >
<div class="cur_price_span" >USh <?php echo"$product_price"; ?></div>
</div>
<div class="ad_name" ><?php echo" $product_name"; ?></div>
<div class="ad_description" ><?php echo"$product_detail"; ?></div>
<!--div class="pricing_div" >
<!--div class="before_price_span" >UGX <?php echo"$before_price"; ?></div-k->
<div class="cur_price_span" >UGX <?php echo"$product_price"; ?></div>
<!--input id="product_price" value="<?php echo"$product_price"; ?>" style="display:none;"/-k->
</div-->
<!--div class="qty_color_div" >
<div class="lebal_qty" >Quantity:</div>
<button id="qty_reducation" onClick="qty_reducation();" class="qty_reducation">-</button>
<input id="qty_display" class="qty_display" value="1" />
<button id="qty_addation" onClick="qty_addation();" class="qty_addation">+</button>
</div-->
<!--div class="transcation_btn_div" >
<button id="<?php echo $advert_id ?>" onClick="directly_buying(this.id);" class="buy_now_btn" >Buy Now</button>
<button onClick="add_tocart(this.id);" id="<?php echo $advert_id ?>" class="add_cart_btn" >Add to Cart</button>
</div-->
<div class="conditon_status" ><?php echo $product_status ?></div>
<!--a href="cart?ipuser=<?php echo $user_ip ?>" id="go_cart_btn"-->
<?php if($product_url ==""){ ?>
<button id="contact_seller" onClick="show_contact_area();" class="go_cart_btn" >Contact Seller</button>
<?php }else{ ?>
<button id="contact_seller" name="<?php echo $product_url; ?>" onClick="show_contact_area_two(this.name);" class="go_cart_btn" >See Price</button>
<?php } ?>
<!--/a-->
<input id="cart_helping_input" style="display:none;" value="" />
<?php
$con = mysqli_connect('localhost','root','2019khalaf','cranebule_userdb');
if(! $con){echo"You have not connected to the database.";}
else{
$get_user = "select * from cb_userstb where id='$user_id'";
$run_get_user = mysqli_query($con,$get_user);
while($row_get_user = mysqli_fetch_array($run_get_user))
{
$user_phone = $row_get_user['contact'];
//}
?>
<div id="contact_area" class="contact_area">Seller <?php echo $user_phone ?></div>
<?php } } ?>
<script>
function show_contact_area()
{
document.getElementById('contact_area').style.display="block";
document.getElementById('contact_seller').style.display="none";
}
function show_contact_area_two(scat)
{
new_url = scat;
window.open(new_url,'_self')
}
</script>
</div>
<div class="recomend_right_div" >
<div class="recomend_right_title" >Recommended</div>
<div class="recommend_single_img_div" >
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4728417548940171"
crossorigin="anonymous"></script>
<!-- kvt_ad1 -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-4728417548940171"
data-ad-slot="4430165215"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
<div id="disp_reconmmeded_output" ></div>
</div>
<div id="invoice_div" class="invoice_div" style="backgroundk:#fff;display:none;" >
<div class="receipt_title" >Receipt</div>
<div class="invoice_lebal_header">
<div class="invo_data_lebal_product">Product</div>
<div class="invo_data_lebal_one">Qty</div>
<div class="invo_data_lebal_one" >Unit price</div>
<div class="invo_data_lebal_one">SubTotal</div>
</div>
<div id="disp_paid_info_output"></div>
</div>
</div>
<?php } ?>
</div>
<div class="footer" stylek="display:none;" >
<div class="information_footer" >
<div class="title_footer" >INFORMATION</div>
<div class="links_footer" >About us</div>
<div class="links_footer" >Contact us</div>
<?php
if(isset($_SESSION['my_id']))
{?>
<a href="log_out"><div class="links_footer" >Logout</button></div></a>
<a href="upload_ad"><div class="links_footer" >Sell Ad</button></div></a>
<?php }else{ ?>
<a href="login"><div class="links_footer" >Sell Ad</button></div></a>
<a href="login"><div class="links_footer" >Login</button></div></a>
<?php } ?>
</div>
<div class="information_footer" >
<div class="title_footer" >POLICY USE</div>
<div class="links_footer" >Terms of use</div>
<a href="https://coblaa.com/privacy_policy"><div class="links_footer" >Privacy policy</div></a>
<div class="links_footer" >Cookie Policy</div>
<div onClick="disp_paid_info();" class="links_footer" >All Invoice</div>
</div>
<div class="information_footer" >
<div class="title_footer" >Branches</div>
<div class="links_footer" >Kampala</div>
<div class="links_footer" >Wakiso</div>
<!--div class="links_footer" >Mukono</div>
<div class="links_footer" >Mbarara</div-->
</div>
</div><!--end of footer-->
<script>
display_more_img();
function display_more_img()
{
advert_id = document.getElementById('advert_id').value;
my_id = document.getElementById('my_id').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","main_auto_page.php?my_id="+my_id+"&&advert_id="+advert_id+"&&status=display_more_img",false);
xmlhttp.send(null);
document.getElementById('display_more_img_output').innerHTML =xmlhttp.responseText;
document.getElementById('first_main_zoom_img').style.display="block";
//alert(543);
}
function zoom_ad_img(zai)
{
var src_path_img ="more_advert_images/";
var cur_img = zai;
document.getElementById('disp_more_img_zoom_output').innerHTML="";
x = document.createElement("IMG");
x.style="max-width:100%;max-height:400px;";
x.setAttribute("src", src_path_img+cur_img);
document.getElementById('disp_more_img_zoom_output').appendChild(x);
document.getElementById('first_main_zoom_img').style.display="none";
// alert(zai);
}
function zoom_ad_img_one(zaio)
{
var src_path_img ="advert_images/";
var cur_img = zaio;
document.getElementById('disp_more_img_zoom_output').innerHTML="";
x = document.createElement("IMG");
x.style="max-width:100%;max-height:400px;";
x.setAttribute("src", src_path_img+cur_img);
document.getElementById('disp_more_img_zoom_output').appendChild(x);
document.getElementById('first_main_zoom_img').style.display="none";
// alert(zai);
}
disp_reconmmeded_items();
function disp_reconmmeded_items()
{
cur_category = document.getElementById('product_cartegory').value;
advert_id = document.getElementById('advert_id').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","main_auto_page.php?cur_category="+cur_category+"&&advert_id="+advert_id+"&&status=disp_reconmmeded_items",false);
xmlhttp.send(null);
document.getElementById('disp_reconmmeded_output').innerHTML=xmlhttp.responseText;
}
/// code bellow not working
var i=1;
load_qty_info();
function load_qty_info()
{
qty_display = document.getElementById('qty_display').value;
if(qty_display ==1){
document.getElementById('qty_reducation').style.display="none";
}
}
////////// end up/////
function qty_addation()
{
next_num=i++;
qty_display = document.getElementById('qty_display').value;
document.getElementById('qty_display').value=next_num;
document.getElementById('qty_reducation').style.display="block";
}
function qty_reducation()
{//alert(i);
qty_display = document.getElementById('qty_display').value;
document.getElementById('qty_display').value=i--;
if(qty_display <=2){
document.getElementById('qty_reducation').style.display="none";
}
}
function add_tocart(atc)
{
advert_id = atc;//document.getElementById('advert_id').value;
//my_id =1; // document.getElementById('advert_id').value;
item_qty = document.getElementById('qty_display').value;
product_price = document.getElementById('product_price').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","main_auto_page.php?advert_id="+advert_id+"&&item_qty="+item_qty+"&&product_price="+product_price+"&&status=insertto_cart",false);
xmlhttp.send(null);
//document.getElementById('cart_display_out').innerHTML=xmlhttp.responseText;
document.getElementById('cart_helping_input').value='1';
show_cart_item_count();
}
show_cart_item_count();
function show_cart_item_count()
{
user_ip = document.getElementById('ipuser').value;
cart_helping_input = document.getElementById('cart_helping_input').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","main_auto_page.php?user_ip="+user_ip+"&&status=show_cart_item_count",false);
xmlhttp.send(null);
document.getElementById('cart_count_home').innerHTML=xmlhttp.responseText;
document.getElementById('cart_btn_count').innerHTML=xmlhttp.responseText;
if(cart_helping_input > 0){
document.getElementById('go_cart_btn').style.display="block";
}else{document.getElementById('go_cart_btn').style.display="none";}
//alert(user_ip);
}
function directly_buying(db)
{
cur_ad_id =db;
add_tocart(cur_ad_id);
document.getElementById('go_cart_btn').click();
alert(db);
}
function disp_paid_info()
{
user_ip = document.getElementById('ipuser').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","main_auto_page.php?user_ip="+user_ip+"&&status=disp_paid_info",false);
xmlhttp.send(null);
document.getElementById('disp_paid_info_output').innerHTML=xmlhttp.responseText;
//document.getElementById('cart_main_div').style.display="none";
//document.getElementById('taking_option_div').style.display="none";
//document.getElementById('paying_div').style.display="none";
document.getElementById('invoice_div').style.display="block";
window.scrollTo(0,520);
}
</script>
</body>
</html>