<!DOCTYPE html>
<html lang="en">
<!-- BEGIN HEAD -->

<head>
	<meta charset="utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta content="width=device-width, initial-scale=1" name="viewport" />
	<meta name="description" content="Responsive Admin Template" />
	<meta name="author" content="SmartUniversity" />
	<title>Rockypet Ghana - Proud to be Ghanaian</title>
	<!-- google font -->
	<link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700" rel="stylesheet" type="text/css" />
	<!-- icons -->
	<link href="fonts/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css" />
	<link href="fonts/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
	<link href="fonts/material-design-icons/material-icon.css" rel="stylesheet" type="text/css" />
	<!--bootstrap -->
	<link href="../assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
	<!-- data tables -->
	<link href="../assets/plugins/datatables/plugins/bootstrap/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" />
	<!-- Material Design Lite CSS -->
	<link rel="stylesheet" href="../assets/plugins/material/material.min.css">
	<link rel="stylesheet" href="../assets/css/material_style.css">
	<!-- Theme Styles -->
	<link href="../assets/css/theme/boxed/theme_style.css" rel="stylesheet" id="rt_style_components" type="text/css" />
	<link href="../assets/css/theme/boxed/style.css" rel="stylesheet" type="text/css" />
	<link href="../assets/css/plugins.min.css" rel="stylesheet" type="text/css" />
	<link href="../assets/css/responsive.css" rel="stylesheet" type="text/css" />
	<link href="../assets/css/theme/boxed/theme-color.css" rel="stylesheet" type="text/css" />
	<!-- favicon -->
	<link rel="shortcut icon" href="../assets/img/favicon.ico" />
</head>
<!-- END HEAD -->
<?php 
session_start();
if($_SESSION["isloggedin"] == "false"){
    header("Location: http://finstechnologies.com/rockypetghana/");
    die();
}
include 'common/config.php';

?>
<body class="page-header-fixed sidemenu-closed-hidelogo page-content-white page-boxed page-md header-white white-sidebar-color logo-indigo">
	<div class="page-wrapper">
		<!-- start header -->
		<div class="page-header navbar navbar-fixed-top">
			<div class="page-header-inner container">
				<!-- logo start -->
				<div class="page-logo">
					<a href="project_all.php">
						<span class="logo-icon material-icons "><img src="../assets/img/logo.png" width="50%"/></span>
						</a>
				</div>
			</div>
		</div>		
		
		<div class="container">
			<!-- start page container -->
			<div class="page-container">
				<!-- start sidebar menu -->
				<div class="sidebar-container">
					<div class="sidemenu-container navbar-collapse collapse fixed-menu">
						<div id="remove-scroll" class="left-sidemenu">
							<ul class="sidemenu  page-header-fixed slimscroll-style" data-keep-expanded="false" data-auto-scroll="true"
							 data-slide-speed="200" style="padding-top: 20px">
								<li class="sidebar-toggler-wrapper hide">
									<div class="sidebar-toggler">
										<span></span>
									</div>
								</li>
								<li class="sidebar-user-panel">
									<div class="user-panel">
										<div class="pull-left image">
											<img src="../assets/img/dp.jpg" class="img-circle user-img-circle" alt="User Image" />
										</div>
										<div class="pull-left info">
											<p> USER'S NAME</p>
											<a href="#"><i class="fa fa-circle user-online"></i><span class="txtOnline"> Online</span></a>
										</div>
									</div>
								</li>
								<li class="nav-item active open">
									<a href="#" class="nav-link nav-toggle"> <i class="material-icons">person</i>
										<span class="title">Projects</span><span class="selected"></span>
										<span class="arrow open"></span>
									</a>
									<ul class="sub-menu">
										<li class="nav-item active">
											<a href="project_all.php" class="nav-link "> <span class="title">All Projects</span>
												<span class="selected"></span>
											</a>
										</li>
										<li class="nav-item">
											<a href="project_add.php" class="nav-link "> <span class="title">Add Project</span>
											</a>
										</li>
										<!--<li class="nav-item">
											<a href="project_manage.php" class="nav-link "> <span class="title">Manage Projects</span>
											</a>
										</li>-->
									</ul>
								</li>
								<li class="nav-item">
									<a href="#" class="nav-link nav-toggle"><i class="material-icons">group</i>
										<span class="title">Services</span><span class="arrow"></span></a>
									<ul class="sub-menu">
										<li class="nav-item">
											<a href="service_all.php" class="nav-link "> <span class="title">All Services</span>
											</a>
										</li>
										<li class="nav-item">
											<a href="service_add.php" class="nav-link "> <span class="title">Add Service</span>
											</a>
										</li>
										<!--<li class="nav-item">
											<a href="service_manage.php" class="nav-link "> <span class="title">Manage Services</span>
											</a>
										</li>-->
									</ul>
								</li>
								<li class="nav-item">
									<a href="logout.php" class="nav-link "> <span class="title">Log out</span>
											</a>
								</li>
							</ul>
						</div>
					</div>
				</div>
				<!-- end sidebar menu -->
				<!-- start page content -->
				<div class="page-content-wrapper">
					<div class="page-content">
						<div class="page-bar">
							<div class="page-title-breadcrumb">
								<div class=" pull-left">
									<div class="page-title">Projects</div>
								</div>
								<ol class="breadcrumb page-breadcrumb pull-right">
									<li><i class="fa fa-home"></i>&nbsp;Home&nbsp;<i class="fa fa-angle-right"></i>
									</li>
									<li>Projects&nbsp;<i class="fa fa-angle-right"></i>
									</li>
									<li class="active">All Projects</li>
								</ol>
							</div>
						</div>
						<div class="row">
							<div class="col-md-12">
								<div class="tabbable-line">
									<!-- <ul class="nav nav-tabs">
                                    <li class="active">
                                        <a href="#tab1" data-toggle="tab"> List View </a>
                                    </li>
                                    <li>
                                        <a href="#tab2" data-toggle="tab"> Grid View </a>
                                    </li>
                                </ul> -->
									<div class="tab-content">
									    <div class="tab-pane active" id="tab1">
											<div class="row">
    										<?php
    										    $arr = [];
                                                try {
                                                    $pdo = new PDO("mysql:host=$dbhost;dbname=$db_name", $dbuser, $dbpass);
                                                    $rows = $pdo->query("SELECT * FROM rockypet_projects");
                                                    while ($row = $rows->fetch()):
                                                        ?>
                                                        <div class="col-md-4">
        													<div class="card card-box">
        														<div class="card-body no-padding ">
        															<div class="doctor-profile">
        															    <form action="project_manage.php" method="post">
        																<img src="<?php echo $row['image_path']; ?>" class="doctor-pic" alt="">
        																<div class="profile-usertitle">
        																	<div class="doctor-name"><?php echo $row['project_id'];?> &nbsp-&nbsp <?php echo $row['project']; ?></div>
        																	<p><a href=""><?php echo $row['date']; ?></a></p>
        																</div>
        																<!--<p style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><?php echo $row['details']; ?></p>-->
        																<div>
        																	<p style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><?php echo $row['client']; ?></p>
        																</div>
        																<div class="profile-userbuttons">
        																	<!--<a href="project_manage.php" class="btn btn-circle deepPink-bgcolor btn-sm">manage</a>-->
        																	<input type="hidden" name="pid" value="<?php echo $row['project_id']; ?>"/>
        																	<input type="submit" name="manage_project" value="manage"/>
        																</div>
        																</form>
        															</div>
        														</div>
        													</div>
        												</div>
                                                        <?php
                                                    endwhile;
                                                }catch(PDOException $e) {
                                                    echo $sql . "<br>" . $e->getMessage();
                                                }
                                                $stmt = null;
                                                $pdo = null;
    										?>
    										</div>
										</div>
										
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<!-- end page content -->
				
			</div>
			<!-- end page container -->
		</div>
		<!-- start footer -->
		<div class="page-footer">
			<div class="page-footer-inner"> 2017 &copy; Smart University Theme By
				<a href="mailto:redstartheme@gmail.com" target="_top" class="makerCss">Redstar Theme</a>
			</div>
			<div class="scroll-to-top">
				<i class="icon-arrow-up"></i>
			</div>
		</div>
		<!-- end footer -->
	</div>
	<!-- start js include path -->
	<script src="../assets/plugins/jquery/jquery.min.js"></script>
	<script src="../assets/plugins/popper/popper.js"></script>
	<script src="../assets/plugins/jquery-blockui/jquery.blockui.min.js"></script>
	<script src="../assets/plugins/jquery-slimscroll/jquery.slimscroll.js"></script>
	<!-- bootstrap -->
	<script src="../assets/plugins/bootstrap/js/bootstrap.min.js"></script>
	<script src="../assets/plugins/bootstrap-switch/js/bootstrap-switch.min.js"></script>
	<!-- data tables -->
	<script src="../assets/plugins/datatables/jquery.dataTables.min.js"></script>
	<script src="../assets/plugins/datatables/plugins/bootstrap/dataTables.bootstrap4.min.js"></script>
	<script src="../assets/js/pages/table/table_data.js"></script>
	<!-- Common js-->
	<script src="../assets/js/app.js"></script>
	<script src="../assets/js/layout.js"></script>
	<script src="../assets/js/theme-color.js"></script>
	<!-- Material -->
	<script src="../assets/plugins/material/material.min.js"></script>
	<!-- end js include path -->
</body>

</html>