SOCMED/application/view/home.php

173 lines
6.6 KiB
PHP
Raw Permalink Normal View History

2020-01-02 21:48:25 +07:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Home - TEAM</title>
<!--style-->
<link rel="stylesheet" type="text/css" href="asset/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="asset/css/style.css" />
<link rel="stylesheet" type="text/css" href="asset/css/style2.css" />
<style type="text/css">
body{width:100%}
.col-md-4{
/*border: 1px solid #000;*/
height: 250px;
width: 250px;
margin-right: 15px;
margin-top: 10px;
background-color: #eee;
}
.col-md-8{
height: 250px;
width: 810px;
margin-top: 10px;
background-color: #eee;
}
#timeline{
height: 100%;
margin-bottom: 10px;
}
#status-box{
height: 120px;
}
.btn{
float: right;
margin-right: 10px;
margin-top: 10px;
}
.img-circle{
padding: 5px;
}
.col-lg-1{
/*border: 1px solid #000;*/
width: 70px;
}
.col-md-7{
height: 170px;
width: 770px;
border: 1px solid #000;
margin: 10px;
}
#gambar{
margin-top: -20px;
}
#gambar2{
margin-left: 10px;
}
#Upcoming{
margin-top: -540px;
}
.info{
margin:0;
}
.topbar{
width:100%;
}
</style>
<!--script-->
<script src="asset/js/jquery.js"></script>
<script src="asset/js/script.js"></script>
</head>
<body>
<!--nav-->
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="<?php echo base_url ?>" style="height:50px;padding:2px 15px;font-family:Roman;"><img src="asset/image/pic_0000_Group-1-copy.png" height="100%"/> Socmed Campus</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<div class="cari" style="margin-left:500px">
<form class="navbar-form navbar-left" action="home.php" role="search">
<div class="form-group">
<input type="text" name="search2" size="30" id="search" style="width:320px;" class="form-control" autocomplete="off" placeholder="Search" onkeyup="lookup(this.value);">
</div>
<div id="suggestions"></div>
</form>
</div>
<ul class="nav navbar-nav navbar-right">
<li><a href="home.php"><img src="asset/image/home.png" width="20px" title="Home"></a></li>
<li><a href="<?php base_url ?>profile.php?id=<?php echo $_SESSION['username'] ?>"><img src="asset/image/profile.png" width="20px" title="Profile"></a></li>
<li><a href="community.php" id="com"><img src="asset/image/community.png" width="20px" title="Community"></a></li>
<li><a href="<?php base_url ?>home.php?action=logout" id="com"><img src="asset/image/logout.png" title="Logout" width="20px"></a></li>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<!--content-->
<div class="container">
<!--alert-->
<?php if(isset($_SESSION['notif-alert'])) { ?>
<div class="alert alert-warning notif" id="alert" style="height:100%;padding:3px;padding-left:6px;width:94%;"><?php echo $_SESSION['notif-alert'] ?></div>
<?php } ?>
<!--end alert-->
<!--notif-->
<?php if(isset($data['notiffriend'])) {
while ($row = mysql_fetch_assoc($data['notiffriend'])) {
?>
<div class="alert alert-info notif" id="notif" style="height:100%;padding:3px;padding-left:6px;width:94%;"><a href="profile.php?id=<?php echo $row['username'] ?>"><b><?php echo $row['nama'] ?></b></a> Ingin Berteman dengan Anda
<a href="home.php?action=appFriend&id=<?php echo $row['id']?>"><span class="glyphicon glyphicon-ok" title="Approve"></span></a>
<a href="home.php?action=rejFriend&id=<?php echo $row['id']?>"><span class="glyphicon glyphicon-remove" title="Decline"></span></a></div>
<?php }} ?>
<!--end notif-->
<div class="col-md-4"><h3><b>Our Member</b></h3>
<?php while ($row = mysql_fetch_assoc($data['member'])) { ?>
<div class="col-lg-1"><a href="profile.php?id=<?php echo $row['username'] ?>"> <img src="<?php echo $row['avatar']?>" alt="..." class="img-circle"title="<?php echo $row['username'] ?>"></a></div>
<?php } ?>
</div>
<div class="col-md-8"> <h3><b>Status Box</b></h3>
<form role="form" action="profile.php?action=update" method="post">
<input type="status" name="status" class="form-control" placeholder="Share your campus activity!!" id="status-box" required>
<button type="submit" class="btn btn-primary">Update</button>
</form>
</div>
<div class="col-md-4"><h3><b>Our Group</b></h3>
<?php while ($row = mysql_fetch_assoc($data['comm'])) { ?>
<div class="col-lg-1"><a href="community.php?id=<?php echo $row['id'] ?>"> <img src="<?php echo $row['photo']?>" alt="..." class="img-circle"title="<?php echo $row['name'] ?>"></a></div>
<?php }?>
</div>
<div class="col-md-8 tl" id="timeline"><h3><b>Timeline</b></h3>
<div class="row">
<?php while ($row = mysql_fetch_assoc($data['post'])) { ?>
<div class="container">
<div class="col-lg-1" id="gambar">
<a href="profile.php?id=<?php echo $row['username'] ?>"><img src="<?php echo $row['avatar']?>" alt="..." class="img-circle"></a>
</div>
<div class="col-lg-9">
<?php if(!empty($row['toUser'])){?>
<h4>
<b><a href="profile.php?id=<?php echo $row['username'] ?>"><?php echo $row['nama'].' </a></b>&#9658;<b><a href="profile.php?id='.$row['toUser'].'"> '.$row['toUser'].'</a>' ?></b>
</h4>
<?php }else{ ?>
<h4><b><a href="profile.php?id=<?php echo $row['username'] ?>"><?php echo $row['nama']?></a></b></h4>
<?php }?>
<div class="text">
<?php echo $row['status']?>
</div>
<div class="text">
<h6 style="color:blue"><?php echo $row['date'] ?></h6>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
<div class="col-md-4" id="Upcoming"><h3><b>Upcoming Event</b></h3>
<div class="col-lg-1"><img src="..." alt="..." class="img-circle"></div>
</div>
</div>
<!--footer-->
</br>
<div id="footer" style="background-color:#222;color:#fff;padding:10px;box-sizing:border-box;">
<div class="container">
<p class="text-muted">copyright by IFTeam</p>
</div>
</div>
</body>
</html>