<?php $friends = FriendData::countFriends(Session::$user->id); $images = ImageData::countByUserId(Session::$user->id); ?> <div class="list-group"> <a href="./?view=myfriends" class="list-group-item">Amigos <span class="label label-default pull-right"><?php echo $friends->c; ?> </span></a> <a href="./?view=myphotos" class="list-group-item">Fotos <span class="label label-default pull-right"><?php echo $images->c; ?> </span></a> <a href="./?view=conversations" class="list-group-item">Mensajes</a> <!-- <a href="#" class="list-group-item">Grupos</a> --> </div>
<?php if (isset($_SESSION["user_id"])) { $fs = FriendData::getFriendship($_SESSION["user_id"], $_GET["recid"]); $fs->accept(); Core::redir("./?view=user&id=" . $_GET["recid"]); }
<span class="time"><i class="fa fa-clock-o"></i> 4:34 PM</span> </a> </li> <li class="divider"></li> <?php } ?> <?php } ?> <li><a href="./?view=notifications">Ver notificaciones</a></li> </ul> </li> <li><a href="./?view=friendreqs"><i class="fa fa-male"></i> <?php $fq = FriendData::countUnReads(Session::$user->id); if ($fq->c > 0) { echo "<span class='label label-danger'>{$fq->c}</span>"; } else { echo "<span class='label label-default'>0</span>"; } ?> </a></li> <li><a href="./?view=conversations"><i class="fa fa-envelope-o"></i> <?php if ($nmsgs > 0) { echo "<span class='label label-danger'>{$nmsgs}</span>"; } else { echo "<span class='label label-default'>0</span>"; } ?> </a></li>
"><?php echo $user->getFullname(); ?> </a></h5> <?php if ($from == "logout") { ?> <!-- NO se muestra ningun boton --> <?php } else { if ($user->id == Session::$user->id) { ?> <a href="./?view=editinformation" class="btn btn-default btn-xs">Editar Informacion</a> <?php } else { $fs = FriendData::getFriendship($_SESSION["user_id"], $user->id); if ($fs == null) { ?> <a href="./?action=sendfriendreq&recid=<?php echo $user->id; ?> " class="btn btn-default btn-xs">Solicitud de Amistad</a> <?php } else { ?> <?php if ($fs->is_accepted) { ?> <button class="btn btn-primary btn-xs">Amigos</button> <?php } else {
<?php if (isset($_SESSION["user_id"])) { $fs = FriendData::getFriendship($_SESSION["user_id"], $_GET["recid"]); if ($fs == null) { $fs = new FriendData(); $fs->sender_id = $_SESSION["user_id"]; $fs->receptor_id = $_GET["recid"]; $fs->add(); } Core::redir("./?view=user&id=" . $_GET["recid"]); }
<?php if (!isset($_SESSION["user_id"])) { Core::redir("./"); } $frs = FriendData::getFriends($_SESSION["user_id"]); ?> <div class="container"> <div class="row"> <div class="col-md-3"> <?php Action::execute("_userbadge", array("user" => Session::$user, "profile" => Session::$profile, "from" => "logged")); Action::execute("_mainmenu", array()); ?> </div> <div class="col-md-7"> <h2>Mis Amigos</h2> <?php if (count($frs) > 0) { ?> <table class="table table-bordered"> <thead> <th>Amigo</th> <th></th> </thead> <?php foreach ($frs as $fr) { ?> <tr> <td> <?php
<?php $frs = FriendData::getUnAccepteds($_SESSION["user_id"]); ?> <div class="container"> <div class="row"> <div class="col-md-3"> <?php Action::execute("_userbadge", array("user" => Session::$user, "profile" => Session::$profile, "from" => "logged")); Action::execute("_mainmenu", array()); ?> </div> <div class="col-md-7"> <h2>Solicitudes de Amistad</h2> <?php if (count($frs) > 0) { ?> <table class="table table-bordered"> <thead> <th>Persona</th> <th></th> </thead> <?php foreach ($frs as $fr) { ?> <tr> <td><?php echo $fr->getSender()->getFullname(); ?> </td> <td style="width:60px;"> <a href="./?action=acceptfriendreq&recid=<?php
<?php $user = UserData::getById($_GET["uid"]); $profile = ProfileData::getByUserId($user->id); $frs = FriendData::getFriends($_GET["uid"]); ?> <div class="container"> <div class="row"> <div class="col-md-3"> <?php Action::execute("_userbadge", array("user" => $user, "profile" => $profile, "from" => "logged")); Action::execute("_usermenu", array("user" => $user, "from" => "logged")); ?> </div> <div class="col-md-7"> <h2>Amigos</h2> <?php if (count($frs) > 0) { ?> <table class="table table-bordered"> <thead> <th>Amigo</th> <th></th> </thead> <?php foreach ($frs as $fr) { ?> <tr> <td> <?php if ($fr->receptor_id == $user->id) {