SOCMED/application/view/community2.php

168 lines
6.7 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><?php echo $data['desc']['name']; ?> - TEAM</title>
<link href="asset/css/bootstrap.min.css" rel="stylesheet">
<link href="asset/css/style2.css" rel="stylesheet">
<script type="text/javascript" src="asset/js/jquery.js"></script>
<script type="text/javascript" src="asset/js/script.js"></script>
<script type="text/javascript" src="asset/js/bootstrap.min.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:Modern;"><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" role="search">
<div class="form-group">
<input type="text" 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>
</div>
</nav>
<!--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-->
<div class="container community">
<div class="row clearfix">
<div class="col-md-12 column">
<!--com Info-->
<div class="row clearfix info">
<!--com Avatar-->
<div class="col-md-2 column boxPhoto">
<img alt="140x140" src="<?php echo $data['desc']['photo'] ?>" />
</div>
<!--com Desc-->
<div class="col-md-6 column boxinfo">
<dl class="dl-horizontal">
<dt>Name</dt>
<dd><?php echo $data['desc']['name'] ?></dd>
<dt>Jenis</dt>
<dd><?php echo $data['desc']['type'] ?></dd>
<dt>Location</dt>
<dd>
<?php echo $data['desc']['location'] ?>
</dd>
<dt>Description </dt>
<dd>
<?php echo $data['desc']['description'] ?>
</dd>
</dl>
</div>
<div class="col-md-3 col-lg-offset-1 column todayevent">
<h5><b>Today Event</b></h5>
<div>
<p>No Event Today</p>
</div>
</div>
</div>
<!--com Content-->
<div class="row clearfix content">
<!--com event-->
<div class="col-md-8 column boxevent">
<h3>Activities</h3>
<?php if (ismember($_SESSION['username'],$_GET['id'])){ ?>
<a href="community.php?action=createEvent&id=<?php echo $_GET['id'] ?>" class=" btn btn-primary btn-xs" style="margin-bottom:20px;">Create Activities</a>
<?php } ?>
<div class="tabbable" id="tabs-306701">
<ul class="nav nav-tabs">
<li class="active">
<a href="#upcoming" data-toggle="tab">Upcoming Event</a>
</li>
<li>
<a href="#past" data-toggle="tab">Past Event</a>
</li>
</ul>
<div class="tab-content">
<!--upcoming event-->
<div class="tab-pane active" id="upcoming">
<div class="panel-group" id="accordion">
<?php $i=1; while ($row = mysql_fetch_assoc($data['event'])) {
if(!haspassed($row['date'])){
?>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title"><a data-toggle="collapse" data-parent="#accordion" href="#upcoming<?php echo $i ?>"><?php echo $row['name'].' <small>('.$row['date'].')</small>' ?> </a></h4>
</div>
<div id="upcoming<?php echo $i ?>" class="panel-collapse collapse">
<div class="panel-body">
<img src="<?php echo $row['poster'] ?>" style="width:100px;border:solid 1px #f2f2f2;border-radius:5px;margin-right:10px;float:left">
<p><?php echo substr($row['desciption'], 0, 100); ?>...<a href="community.php?event=<?php echo $row['id'] ?>">(more)</a></p>
</div>
</div>
</div>
<?php $i++; }}
if ($i<2) echo 'No Upcoming Event';
?>
</div>
</div>
<!--past event-->
<div class="tab-pane" id="past">
<div class="panel-group" id="accordion2">
<?php
$j=1;
if(mysql_num_rows($data['event'])>=1)mysql_data_seek($data['event'], 0);
while ($row = mysql_fetch_assoc($data['event'])) {
if(haspassed($row['date'])){
?>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title"><a data-toggle="collapse" data-parent="#accordion2" href="#past<?php echo $j ?>"><?php echo $row['name'].' <small>('.$row['date'].')</small>' ?> </a></h4>
</div>
<div id="past<?php echo $j ?>" class="panel-collapse collapse">
<div class="panel-body" style="vertical-align:top;">
<img src="<?php echo $row['poster'] ?>" style="width:100px;border:solid 1px #f2f2f2;border-radius:5px;margin-right:10px;float:left;">
<p><?php echo substr($row['desciption'], 0, 100); ?>...<a href="community.php?event=<?php echo $row['id'] ?>">(more)</a></p>
</div>
</div>
</div>
<?php $j++; }}
if ($j<2) echo 'No Past Event';
?>
</div>
</div>
</div>
</div>
</div>
<!--com member-->
<div class="col-md-3 pull-right column">
<div class="row"><div class="boxmember">
<h5><b>Member</b></h5>
<div class="tmbmember">
<?php while ($row = mysql_fetch_assoc($data['member'])) { ?>
<a href="profile.php?id=<?php echo $row['username'] ?>"><img src="<?php echo $row['avatar']?>" alt="..." class="img-thumbnail" title="<?php echo $row['nama'] ?>" style="height:40px;width:40px" ></a>
<?php } ?>
</div>
</div></div>
</div>
</div>
</div>
</div>
</div>
<div id="footer" style="background-color:#222;color:#fff;padding:10px;box-sizing:border-box;">
<div class="container">
<p class="text-muted">copyright by <span class="glyphicon glyphicon-copyright-mark"></span> IFTeam</p>
</div>
</div>
</body>
</html>