| 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:/New folder/ |
Upload File : |
<html>
<?php
session_start();
include('db.php');
//include('function.php');
?>
<?php
if(isset($_SESSION['id']))
{
//$_SESSION['email']=$user_email;
$my_id = $_SESSION['id'];
//echo"$my_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
*/
?>
<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;?>">
<input type="text" id="ip_user" class="helping_id" style="display:none;" value="<?php echo $user_ip;?>">
</div>
<head>
<title>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/index.css" />
<script data-ad-client="ca-pub-5844229537144835" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
</head>
<body id="body">
<div class="home_div" >
<img src="main_icons/crane log.jpeg" class="home_log" />
<a href="" ><button class="home_btn" >Home</button></a>
<button onClick="showa_left_cat();" class="home_btn" >Category</button>
<div class="home_search_div" >
<form method='post'>
<input id="search_input" name="search_input" autocomplete="off" onKeyup="disp_categorys();" class="search_input" placeholder="search..." />
<img src="main_icons/search_icon2.png" onClick="document.getElementById('start_search').click();" class="home_search_icon" />
<button type="submit" id="start_search" name="start_search" style="display:none;"></button>
</form>
<?php
if(isset($_POST['start_search']))
{
$search_input = $_POST['search_input'];
echo"<script>window.open('search?kvt_sear=$search_input','_self')</script>";
}
?>
</div>
<?php if(isset($_SESSION['id'])){ ?>
<a href="logout" ><button class="home_btn" >Logout</button></a>
<a href="upload_ad" ><button class="home_btn" >Upload</button></a>
<?php }else{ ?>
<a href="login" ><button class="home_btn" >Login</button></a>
<a href="login" ><button class="home_btn" >Sign Up</button></a>
<?php } ?>
<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" class="cart_icon_home" /></a>
</div>
<div class="home_div_mob_helping" >
<div id="home_div_mob" class="home_div_mob" >
<img src="main_icons/crane log.jpeg" class="home_log" />
<img src="main_icons/cate.png" onClick="showa_menu_div();" class="home_menu_mob" />
<a href="cart?ipuser=<?php echo $user_ip ?>"><span id="cart_count_home_mob" ></span></a>
<a href="cart?ipuser=<?php echo $user_ip ?>"><img src="main_icons/mkt icon8.png" class="cart_icon_home" /></a>
<img src="main_icons/search_icon2.png" onClick="show_mob_search_div();" class="home_search_icon_mob" />
</div>
</div>
<div class="home_positioning_div" ></div>
<div class="right_helpcss_menu_div_mob" >
<div id="right_menu_div_mob" class="right_menu_div_mob" >
<div class="left_cat_title" >Menu</div>
<a href="" ><div class="left_cat_name" >Home</div></a>
<div onClick="show_mob_cat_list();" class="left_cat_name" >Categories</div>
<div class="left_cat_name" >Contact us</div>
<a href="login" ><div class="left_cat_name" >Login</div></a>
<a href="login" ><div class="left_cat_name" >Sign Up</div></a>
<input id="helping_right_menu_div_mob" style="display:none" value="1" />
</div>
</div>
<div id="right_menu_list_blur" onClick="close_menu_div();" class="right_menu_list_blur" ></div>
<div class="home_search_mob_div_helping" >
<div id="home_search_mob_div" class="home_search_mob_div" style="">
<form method='post'>
<img src="main_icons/back_btn.png" onClick="close_mob_search_div();" class="go_search_icon_mob" style="float:left;" />
<input id="search_input_mob" name="search_input" autocomplete="off" onKeyup="disp_categorys();" class="search_input_mob" placeholder="search..." />
<img src="main_icons/search_icon2.png" onClick="document.getElementById('start_search_mob').click();" class="go_search_icon_mob" style="float:right;" />
<button type="submit" id="start_search_mob" name="start_search" style="display:none;"></button>
</form>
<?php
if(isset($_POST['start_search']))
{
$search_input = $_POST['search_input'];
echo"<script>window.open('search?kvt_sear=$search_input','_self')</script>";
}
?>
</div>
</div>
<div id="more_cat_div" class="more_cat_div" >
<div id="disp_more_cat_output" ></div>
</div>
<div id="more_cat_div_mob" class="more_cat_div" >
<div id="disp_more_cat_output_mob" ></div>
</div>
<div class="category_list_div" >
<?php
$get_cat ="select * from categorytb LIMIT 10";
$run_cat = mysqli_query($con,$get_cat);
while($row_cat = mysqli_fetch_array($run_cat))
{
$cat_img = $row_cat['cat_img'];
$cat_name = $row_cat['cat_name'];
?>
<div class="single_cat_div" > <a href="search?kvt_sear=<?php echo $cat_name; ?>">
<div class="cat_img_div" > <img src="category_img/<?php echo $cat_img; ?>" width="60%" heightk="100%" stylek="border-radius:50%;" /></div>
<div class="cat_name_div" ><?php echo $cat_name; ?> </div></a>
</div>
<?php } ?>
</div>
<div id="left_category_list_div" onMouseleave="close_left_cat_list_div();" class="left_category_list_div" >
<input id="left_cat_helping_input" style="display:none" value="1" />
<div class="left_cat_title" >All Categories</div>
<?php
$get_cat ="select * from categorytb";
$run_cat = mysqli_query($con,$get_cat);
while($row_cat = mysqli_fetch_array($run_cat))
{
$cat_img = $row_cat['cat_img'];
$cat_name = $row_cat['cat_name'];
?>
<div class="left_single_cat" >
<a href="search?kvt_sear=<?php echo $cat_name; ?>">
<img src="category_img/<?php echo $cat_img; ?>" class="left_cat_img" />
<div class="left_cat_name" ><?php echo $cat_name; ?></div></a>
</div>
<?php } ?>
<div class="left_cat_title" >craneblue.com</div>
</div>
<div id="left_category_list_blur" onClick="close_left_cat_list_div();" class="left_category_list_blur" ></div>
<div class="top_selection_title" >Top Selections <a href="selection?itlist=all" ><i class="more_arrow_right"></i></a></div>
<div class="top_selection" >
<div class="sub_top_selection" >
<?php
$get_advert = "select * from adverttb ORDER BY rand() LIMIT 5";
$run_advert = mysqli_query($con,$get_advert);
while($row_advert = mysqli_fetch_array($run_advert))
{
$product_id = $row_advert['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_price = $row_advert['product_price'];
$product_category = $row_advert['product_category'];
?>
<a href="selection?cate=<?php echo"$product_category"; ?>" >
<div class="single_ad_trend" >
<div class="trend_img_div" >
<img src="advert_images/<?php echo"$product_image"; ?>" style="max-width:100%;max-height:100%;" />
</div>
<div class="trend_ad_name" > <?php echo"$product_name"; ?> </div>
<div class="trend_ad_price" > UGX: <?php echo"$product_price"; ?></div>
</div></a>
<?php } ?>
</div>
</div>
<div class="top_selection_title" >Top Rankings <a href="selection?itlist=all" ><i class="more_arrow_right"></i></a></div>
<div class="top_selection" >
<div class="sub_top_selection" >
<?php
$get_advert = "select * from adverttb ORDER BY rand() LIMIT 5";
$run_advert = mysqli_query($con,$get_advert);
while($row_advert = mysqli_fetch_array($run_advert))
{
$product_id = $row_advert['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_price = $row_advert['product_price'];
$product_category = $row_advert['product_category'];
?>
<a href="selection?rank=<?php echo"$product_category"; ?>" ><div class="single_ad_trend" >
<div class="trend_img_div" >
<img src="advert_images/<?php echo"$product_image"; ?>" style="max-width:100%;max-height:100%;" />
</div>
<div class="trend_ad_name" > <?php echo"$product_name"; ?> </div>
<div class="trend_ad_price" > UGX: <?php echo"$product_price"; ?></div>
</div></a>
<?php } ?>
</div>
</div>
<div class="half_div_area" >
<div class="sub_half_div_area" >
<div class="half_left_div" >
<a href="selection?fash_men=Men Fashions" ><div class="half_div_title_left" >Men's Fashion <i class="half_div_arrow_right"></i></div></a>
<div class="sub_half_left_div" >
<?php
$get_advert = "select * from adverttb where product_category='Men Fashions' ORDER BY rand() LIMIT 3";
$run_advert = mysqli_query($con,$get_advert);
while($row_advert = mysqli_fetch_array($run_advert))
{
$product_id = $row_advert['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_price = $row_advert['product_price'];
//$currency_name = $row_advert['currency_name'];
?>
<!--div class="half_div_single_ad" >Electronics</div-->
<a href="selection?fash_men=Men Fashions" ><img src="advert_images/<?php echo"$product_image"; ?>" class="half_div_single_ad" /></a>
<?php } ?>
</div>
</div>
<div class="half_left_div" >
<a href="selection?fash_women=Women Fashions" ><div class="half_div_title_left" >Women's Fashion <i class="half_div_arrow_right"></i></div></a>
<div class="sub_half_left_div" >
<?php
$get_advert = "select * from adverttb where product_category='Women Fashions' ORDER BY rand() LIMIT 3";
$run_advert = mysqli_query($con,$get_advert);
while($row_advert = mysqli_fetch_array($run_advert))
{
$product_id = $row_advert['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_price = $row_advert['product_price'];
//$currency_name = $row_advert['currency_name'];
?>
<!--div class="half_div_single_ad" >Electronics</div-->
<a href="selection?fash_women=Women Fashions" ><img src="advert_images/<?php echo"$product_image"; ?>" class="half_div_single_ad" /></a>
<?php } ?>
</div>
</div>
<div class="half_left_div" >
<a href="selection?ph_pc=Phones & Computers" ><div class="half_div_title_left" >Phones & Computers<i class="half_div_arrow_right"></i></div></a>
<div class="sub_half_left_div" >
<?php
$get_advert = "select * from adverttb where product_category='Phones' ORDER BY rand() LIMIT 3";
$run_advert = mysqli_query($con,$get_advert);
while($row_advert = mysqli_fetch_array($run_advert))
{
$product_id = $row_advert['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_price = $row_advert['product_price'];
//$currency_name = $row_advert['currency_name'];
?>
<!--div class="half_div_single_ad" >Electronics</div-->
<a href="selection?ph_pc=Phones & Computers" ><img src="advert_images/<?php echo"$product_image"; ?>" class="half_div_single_ad" /></a>
<?php } ?>
</div>
</div>
<div class="half_left_div" >
<a href="selection?electr=Electronics" ><div class="half_div_title_left" >Electronics<i class="half_div_arrow_right"></i></div></a>
<div class="sub_half_left_div" >
<!--a href="selection?electr=Electronics" ><div class="half_div_title" >Electronics<i class="half_div_arrow_right"></i></div></a-->
<!--div class="half_div_single_ad" >Electronics</div-->
<?php
$get_advert = "select * from adverttb where product_category='Electronics' ORDER BY rand() LIMIT 3";
$run_advert = mysqli_query($con,$get_advert);
while($row_advert = mysqli_fetch_array($run_advert))
{
$product_id = $row_advert['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_price = $row_advert['product_price'];
//$currency_name = $row_advert['currency_name'];
?>
<!--div class="half_div_single_ad" >Electronics</div-->
<a href="selection?electr=Electronics" ><img src="advert_images/<?php echo"$product_image"; ?>" class="half_div_single_ad" /></a>
<?php } ?>
</div>
</div>
</div>
</div>
<div id="main_content_area" class="main_content_area">
<!--div id="main_banner_area" class="main_banner_area"><img src="shop_banner_images/GamingLaptops_banner.jpg" class="main_banner_image" /></div-->
<div id="sub_content_area" class="sub_content_area">
<div class="popular_tip" >Popular items</div>
<?php
$get_advert = "select * from adverttb order by id desc";
$run_advert = mysqli_query($con,$get_advert);
while($row_advert = mysqli_fetch_array($run_advert))
{
$product_id = $row_advert['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_price = $row_advert['product_price'];
//$currency_name = $row_advert['currency_name'];
?>
<input type="text" id="product_id<?php echo $product_id;?>" class="helping_id" style="display:none;" value="<?php echo $product_id;?>">
<div class="single_advert">
<div class="product_image_div" >
<?php if($product_url !==""){ ?>
<a href="<?php echo $product_url ?>">
<img src="advert_images/<?php echo"$product_image"; ?>" onClick="get_user_view(this.id);" id="<?php echo $product_id;?>" class="ad_product_image" style="" />
</a>
<?php }else{ $tincy =rand(); ?>
<a href="detail.php?your_ad=<?php echo"$product_id";?> ">
<img src="advert_images/<?php echo"$product_image"; ?>" onClick="get_user_view(this.id);" id="<?php echo $product_id;?>" class="ad_product_image" style="" />
</a>
<?php } ?>
</div>
<div class="product_name_text"><?php echo $product_name; ?></div>
<div class="detailed_text"><?php echo $product_detail; ?></div>
<div class="ad_view_div">
<?php
$get_view ="select * from ad_viewtb where ad_product_id='$product_id'";
$run_get_ad_view = mysqli_query($con,$get_view);
$check_view = mysqli_num_rows($run_get_ad_view);
if($check_view >0){
if($check_view >1){echo"views: ";}else{echo"view: ";}
echo"$check_view ";
}
//views
?>
</div>
<?php
if($product_price){echo"<div class='show_price'>UGX $product_price</div>";}else{
?>
<a href="<?php echo $product_url ?>">
<button onClick="get_user_view(this.id);" id="<?php echo $product_id;?>" class="show_price">Price</button>
</a>
<?php } ?>
</div><!--end of single_advert-->
<?php } ?>
</div><!--end of sub_content_area-->
</div><!--end of main_content_area-->
<div class="footer" >
<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['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>
<div class="links_footer" >Security</div>
<div class="links_footer" >Cookie Policy</div>
</div>
<div class="information_footer" >
<div class="title_footer" >LOCATIONS</div>
<div class="links_footer" >Kampala</div>
<div class="links_footer" >Wakiso</div>
<div class="links_footer" >Luwero</div>
<div class="links_footer" >Nakaseke</div>
<div class="links_footer" >Mukono</div>
<div class="links_footer" >Mpigi</div>
</div>
</div><!--end of footer-->
<script>
show_cart_item_count();
function show_cart_item_count()
{
user_ip = document.getElementById('ip_user').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_count_home_mob').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);*/
}
//disp_categorys();
function disp_categorys()
{
search_input_pc = document.getElementById('search_input').value;
search_input_mob = document.getElementById('search_input_mob').value;
if(search_input_pc !==""){
leng_search_input = search_input_pc.length;
search_input = search_input_pc;
document.getElementById('search_input_mob').value ="";
}//else
if(search_input_mob !==""){
leng_search_input = search_input_mob.length;
search_input = search_input_mob;
document.getElementById('search_input').value ="";
}
if(search_input_mob <1){
document.getElementById('more_cat_div_mob').style.display="none";
}else{
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","main_auto_page.php?search_input="+search_input+"&&status=disp_categorys",false);
xmlhttp.send(null);
document.getElementById('disp_more_cat_output_mob').innerHTML=xmlhttp.responseText;
document.getElementById('more_cat_div_mob').style.display="block";
}
if(search_input_pc <1){
document.getElementById('more_cat_div').style.display="none";
}else{
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","main_auto_page.php?search_input="+search_input+"&&status=disp_categorys",false);
xmlhttp.send(null);
document.getElementById('disp_more_cat_output').innerHTML=xmlhttp.responseText;
document.getElementById('more_cat_div').style.display="block";
}
}
function showa_left_cat()
{
left_cat_helping_input = document.getElementById('left_cat_helping_input').value;
if(left_cat_helping_input ==1){
document.getElementById('left_category_list_div').style.display="block";
document.getElementById('left_category_list_blur').style.display="block";
document.getElementById('left_cat_helping_input').value=2;
close_menu_div();
}else{
document.getElementById('left_category_list_div').style.display="none";
document.getElementById('left_category_list_blur').style.display="none";
document.getElementById('left_cat_helping_input').value=1;
}
}
function close_left_cat_list_div()
{
document.getElementById('left_category_list_div').style.display="none";
document.getElementById('left_category_list_blur').style.display="none";
document.getElementById('left_cat_helping_input').value=1;
}
function showa_menu_div()
{
helping_right_menu_div_mob = document.getElementById('helping_right_menu_div_mob').value;
if(helping_right_menu_div_mob ==1){
document.getElementById('right_menu_div_mob').style.display="block";
document.getElementById('right_menu_list_blur').style.display="block";
document.getElementById('helping_right_menu_div_mob').value=2;
close_left_cat_list_div();
}else{
document.getElementById('right_menu_div_mob').style.display="none";
document.getElementById('right_menu_list_blur').style.display="none";
document.getElementById('helping_right_menu_div_mob').value=1;
}
}
function close_menu_div()
{
document.getElementById('right_menu_div_mob').style.display="none";
document.getElementById('right_menu_list_blur').style.display="none";
document.getElementById('helping_right_menu_div_mob').value=1;
//alert(434);
}
function show_mob_cat_list()
{
//document.getElementById('left_category_list_div').style.display="block";
showa_left_cat()
close_menu_div();
}
function show_mob_search_div()
{
document.getElementById('home_search_mob_div').style.display="block";
document.getElementById('home_div_mob').style.display="none";
document.getElementById('search_input_mob').focus();
}
function close_mob_search_div()
{
document.getElementById('home_div_mob').style.display="block";
document.getElementById('home_search_mob_div').style.display="none";
document.getElementById('more_cat_div_mob').style.display="none";
}
</script>
</body>
</html>