SOCMED/application/view/profile.php

195 lines
8.3 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['info']['nama'] ?> - 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" />
<!--script-->
<script src="asset/js/jquery.js"></script>
<script src="asset/js/jquery.foggy.min.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: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" action="home.php" 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><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</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="row profile">
<!--left-->
<div class="col-lg-2 col-lg-offset-1 left" style="margin-right:25px">
<!--foto-->
<div class="row"><div class="boxAvatar" style="text-align:center;vertical-align: middle">
<img src="<?php echo $data['info']['avatar'] ?>" />
</div></div>
<div id="edited">
<form method="post" id="formedit">
<!--nama-->
<div class="row"><div class="boxnama">
<b><h4 id="pnama"><?php echo $data['info']['nama'] ?></h4></b>
</div></div>
<!--info-->
<div class="row"><div class="boxinfo">
<?php if($_SESSION['username']==$_GET['id']){ ?>
<h6><a id="editprof" onclick="editprofil();" href="#"><span class="glyphicon glyphicon-pencil"></span> Edit</a></h6>
<!--<h6><a href="profile.php?id=<?php //echo $_GET['id']?>&action=edit"><span class="glyphicon glyphicon-pencil"></span> Edit</a></h6>-->
<?php } ?>
<h5><b>Personal Information</b></h5>
<span title="Date of Birth" class="glyphicon glyphicon-calendar"><div id="pdob"><?php echo $data['info']['dob'] ?></div></span></br>
<span title="Asal" class="glyphicon glyphicon glyphicon-home"><div id="pasal"><?php echo $data['info']['hometown'] ?></div></span></br>
<span title="Alamat" class="glyphicon glyphicon-map-marker"><div id="palamat"><?php echo $data['info']['address'] ?></div></span></br>
<span title="Fakultas" class="glyphicon glyphicon-book"><div id="pfakultas"><?php echo $data['info']['Fakultas'] ?></div></span></br>
<span title="Jurusan" class="glyphicon glyphicon-tower"><div id="pjurusan"><?php echo $data['info']['Jurusan'] ?></div></span></br>
<span title="Angkatan" class="glyphicon glyphicon-flag"><div id="pangkatan"><?php echo $data['info']['Angkatan'] ?></div></span>
</div></div>
</form>
</div>
</div>
<!--middle-->
<div class="col-lg-5 middle">
<!--status input-->
<?php if ((isFriend($_SESSION['username'],$_GET['id'])) || ($_SESSION['username'] == $_GET['id'])){ ?>
<div class="row"><div class="col-lg-12 well">
<form role="form" action="profile.php?action=update" method="post">
<div class="form-group">
<textarea class="form-control" name="status" rows="3" placeholder="Apa yang anda pikirkan..." required></textarea>
<?php if (isset($_GET['id']) && ($_SESSION['username'] != $_GET['id'] )) { ?>
<input type="hidden" name="idu" value="<?php echo $_GET['id'] ?>">
<?php } ?>
</div>
<button type="submit" class="btn btn-primary btn-sm pull-right">Update</button>
</form>
</div></div>
<?php } ?>
<!--user activity-->
<div class="row"><div class="col-lg-12 well">
<h3>User Activity</h3>
<table class="table table-hover table-striped table-condensed">
<tbody>
<?php while ($row = mysql_fetch_assoc($data['post'])) {
//$time = timeelapsed($row['date']);
$time = strtotime($row['date']);
$happen = time_passed($time);
?>
<tr><td>
<table class="userwall">
<tr>
<td rowspan="3" width="80px">
<img src="<?php echo $row['avatar'] ?>" alt="..." class="img-circle" width="50px" height="50px">
</td>
<td>
<?php if(!empty($row['toUser'])){?>
<h6><b><?php echo $row['nama'].' </b>&#9658;<b> '.$data['info']['nama'] ?></b></h6>
<?php }else{ ?>
<h6><b><?php echo $data['info']['nama'] ?></b></h6>
<?php }?>
</br><small><h6 style="color:#AF9090;margin-top:-5px" title="<?php echo waktu($row['date']); ?>"><span class="glyphicon glyphicon-time"></span>
<em> <?php echo $happen ?> ago </em></h6></small>
</td>
</tr>
<tr>
<td id="stts"><blockquote><p><?php echo $row['status'] ?></p></blockquote></td>
</tr>
</table>
</td></tr>
<?php } ?>
<tr><td style="text-align:center;background-color:#DFD8D8">
<p>No More Activity</p>
</td></tr>
</tbody>
</table>
</div></div>
</div>
<!--right-->
<div class="col-lg-3 right" style="margin-left:25px">
<!--friend-->
<div class="row"><div class="boxFriend">
<h5><b>Friends </b><small><b>(<?php echo $data['cFriend'] ?>)</b></small></h5>
<?php if(isset($data['sFriend'])){ ?>
<a class="btn btn-primary btn-xs" id="sfriend" style="float:right;margin-top:-30px" href="profile.php?action=addfriend&idprf=<?php echo $_GET['id']?>"><?php echo $data['sFriend'] ?></a>
<?php } ?>
<div class="tmbfriend">
<?php while ($row = mysql_fetch_assoc($data['Friend'])) { ?>
<?php if($_GET['id']!=$row['username']){?>
<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 } ?>
<?php } ?>
</div>
</div></div>
<!--community-->
<div class="row"><div class="boxComm">
<h5><b>Community Joined </b></h5>
<div class="tmbcomm">
<?php while ($row = mysql_fetch_assoc($data['comm'])) { ?>
<a href="community.php?id=<?php echo $row['id'] ?>"><img src="<?php echo $row['photo']?>" alt="..." class="img-thumbnail" title="<?php echo $row['name'] ?>" style="height:40px;width:40px" ></a>
<?php } ?>
</div>
</div></div>
<!--skill-->
<!--
<div class="row"><div class="boxSkill skills-section">
<?php if($_SESSION['username']==$_GET['id']){ ?>
<h6><a id="editskill" onclick="editprofil();" href="#"><span class="glyphicon glyphicon-pencil"></span> Edit</a></h6>
<?php } ?>
<h5><b>Skill</b></h5>
<ul class="skills">
<?php
//echo $data['info']['skills'];
$skill = explode(';',$data['info']['skills']);
foreach ($skill as $row){
$value = explode(',',$row);
?>
<li>
<h4><?php echo $value[0] ?></h4>
<span class="rat<?php echo $value[1] ?>"></span>
</li>
<?php } ?>
</ul>
</div></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 <span class="glyphicon glyphicon-copyright-mark"></span> IFTeam</p>
</div>
</div>
</body>
</html>