Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
[ Posted by Marlon Mendoza ] android.php
<?php
include('php/userloginprocess.php'); // Includes Login Script
if($_SESSION['login'] == FALSE){
header("location: login.php");
}
if($_SESSION['login'] == TRUE)
?>
<!Document HTML>
<html>
<head>
<title> Marketech | Buy Genuine Gadgets Online | Android Phones</title>
<script src="js/jquery.js"></script>
<script src="js/bootstrap.js"></script>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="shortcut icon" href="images/marketechlogo.ico" />
</head>
<body>
<!-- First Navigation Bar -->
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">Marketech</a>
</div>
<?php
//connection
mysql_connect("localhost","root","") or die(mysql_error());
mysql_select_db("marketech_db") or die(mysql_error());
//query
$sql = "SELECT * FROM user_tbl";
$records=mysql_query($sql);
while($users=mysql_fetch_assoc($records)){
}
?>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<form class="navbar-form navbar-left">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
<ul class="nav navbar-nav navbar-right">
<li><a href="cart.php"><span class = "glyphicon glyphicon-shopping-cart"></span> Cart</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><?php echo $_SESSION ['fname']; ?><span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="useraccountsettings.php">Account Settings</a></li>
<li><a href="php/logout.php">Logout</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<!-- Second Navigation Bar -->
<br><br><br>
<div class = "container-fluid">
<nav class="navbar navbar-inverse navbar-lower">
<div class="container-fluid">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-2" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-2">
<ul class="nav navbar-nav col-lg-12">
<li class="active col-md-2"><a href="android.php">Samsung</a></li>
<li class="col-md-2"><a href="iphone.php">Apple</a></li>
<li class="col-md-2"><a href="windows.php">Microsoft</a></li>
<li class="col-md-2"><a href="smartwatch.php">Smart Watch</a></li>
<li class="col-md-2"><a href="computer.php">Computers</a></li>
<li class="dropdown col-xs-2"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Other Popular Brands <span class="caret"></span></a>
<ul class="dropdown-menu col-xs-2">
<li><a href="sony.php">Sony</a></li>
<li><a href="asus.php">Asus</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<!-- Marketechs Third Navigation (with glyphicons) -->
<div class="container-fluid">
<ul class="list-unstyled">
<li class = "col-md-3"><span class="glyphicon glyphicon-transfer"></span> 30 days Free Returns</li>
<li class = "col-md-3"><span class="glyphicon glyphicon-plane"></span> Free Delivery Above 999 php</li>
<li class = "col-md-3"><span class="glyphicon glyphicon-usd"></span> Cash on Delivery</li>
<li class = "col-md-3"><span class="glyphicon glyphicon-earphone"></span> Call (049) 557 2681</li>
</ul>
</div>
</div>
<!-- Carousel -->
<div class="col-md-0 col-md-offset-0">
<div class="container">
<div class = "col-md-14">
<div class="carousel slide" id="carousel1" data-ride"carousel">
<ol class="carousel-indicators">
<li data-target="#carousel1" data-slide-to="0" class="active"></li>
<li data-target="#carousel1" data-slide-to="1"></li>
</ol>
<div class="carousel-inner">
<div class="item active">
<img src = "images/androidbanner1.jpg">
<div class = "carousel-caption">
<h4> Samsung J1 Mini Prime</h4>
</div>
</div>
<div class="item">
<img src = "images/androidbanner2.jpg">
<div class = "carousel-caption">
<h4>Samsung S7</h4>
</div>
</div>
</div>
<a href="#carousel1" data-slide="prev" class = "left carousel-control"><span class = "glyphicon glyphicon-chevron-left"></span></a>
<a href="#carousel1" data-slide="next" class = "right carousel-control"><span class = "glyphicon glyphicon-chevron-right"></span></a>
</div>
</div>
</div>
</div>
<!-- Items Division -->
<center><h2 id="samsung"><b>Samsung</b></h2></center>
<?php
mysql_connect("localhost","root","") or die(mysql_error());
$result = mysql_query("SELECT * FROM product_tbl where brand = 'samsung' AND type ='android'");
while($row = mysql_fetch_array($result)) {
?>
<p class = "col-md-4"><a href = "#">
<img class="img-responsive" src = "uploaded_images/<?php echo $row['item_image']?>" data-toggle="modal" data-target = "#modal<?php echo $row['prod_id'] ?>">
</a>
<a href = "#" data-toggle = "modal" data-target = "#modal<?php echo $row['prod_id']?>">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<font color = "black"><?php echo $row['item_name']?>
</a>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Price: <?php echo $row['item_price']?> Php</p>
<!-- Footer Navigation -->
<!-- Modal Locations -->
<!-- Start of the First Modal (SAMSUNG J1 MINI)-->
<div class = "modal fade" id = "modal<?php echo $row['prod_id']?>">
<div class = "modal-dialog">
<div class = "modal-content">
<div class = "modal-header">
<p> <?php echo $row['item_name']?> </p>
</div>
<div class = "modal-body">
<p class = "col-md-12"><b>Specifications</b>
<ul class = "list-unstyled col-md-12">
<li class = "col-md-12"><center><b><font color = "green">Display:</font></b><?php echo$row['display']?></center></li>
<li class = "col-md-12"><center><b><font color = "green">Resolution:</font></b><?php echo$row['resolution']?></center></li>
<li class = "col-md-12"><center><b><font color = "green">Storage:</font></b> <?php echo$row['storage']?></center></li>
<li class = "col-md-12"><center><b><font color = "green">RAM:</font></b> <?php echo$row['ram']?></center></li>
<li class = "col-md-12"><center><b><font color = "green">Front Cam:</font></b><?php echo$row['frontcam']?></center></li>
<li class = "col-md-12"><center><b><font color = "green">Rear Cam:</font></b><?php echo$row['rearcam']?></center></li>
<li class = "col-md-12"><center><b><font color = "green">OS:</font></b><?php echo$row['os']?></center></li>
<li class = "col-md-12"><center><b><font color = "green">Processor:</font></b><?php echo$row['processor']?></center></li>
<li class = "col-md-12"><center><b><font color = "green">Battery Capacity:</font></b><?php echo$row['battery']?></center></li>
</ul>
<div class = "zoom_img">
<center><img class = "img-responsive" src = "uploaded_images/<?php echo $row['item_image']?>"></center>
</p></div>
</div>
<div class = "modal-footer">
<form method = "GET" action = "php/addtocartprocess.php">
<p>Price: <?php echo $row['item_price']?><br>
<input class="btn btn-success" type="submit" name="add_to_cart" value="Add to Cart">
<input type="hidden" name="product_id" value="<?php echo $row["prod_id"];?>">
<span class="glyphicon glyphicon-shopping-cart"></span></form>
</p>
</p>
</div>
</div>
</div>
</div>
<?php
}
?>
<!-- End of Modal Locations -->
<!-- footer -->
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<div class ="container">
<nav class="navbar navbar-default">
<div class="container">
<ul class ="list-unstyled">
<li class = "col-md-2"><h5><b>Call Us: (049) 557 2681</b></h5></li>
<li class = "col-md-2"><h5><b><a href = "about.php"><font color = "black">About Us </b></h5></font></a></li>
<li class = "col-md-2"><h5><b><a href = "contact.php"><font color = "black">Contact Us</b></h5></font></a></li>
<li class = "col-md-2"><h5><b><a href = "privacy.php"><font color = "black">Privacy</b></h5></font></a></li>
<li class = "col-md-2"><h5><b><a href = "terms.php"><font color = "black">Terms of Service</b></h5></font></a></li>
<li class = "col-md-2"><h5><b>Copyright (c) 2016<h5></li>
</ul>
</div>
</nav>
</div>
<!--
Members:
Marlon Mendoza
Gee Ann Endriga
John Thelman Baldemor
-->
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment