?> :</span> <span class="message"> <?php if ($notif->notification_type_id == NotificationTypeData::getByName("Nuevo Comentario")->id) { echo "<i class='fa fa-comment'></i> Nuevo comentario "; } else { if ($notif->notification_type_id == NotificationTypeData::getByName("Nuevo Seguidor")->id) { echo "<i class='fa fa-ok'></i> Nuevo seguidor "; } else { if ($notif->notification_type_id == NotificationTypeData::getByName("Nuevo Like")->id) { echo "<i class='fa fa-thumbs-up'></i> Nuevo like "; } else { if ($notif->notification_type_id == NotificationTypeData::getByName("Nuevo Dislike")->id) { echo "<i class='fa fa-thumbs-down'></i> Nuevo dislike "; } } } } ?> </span> <span class="time"><i class="fa fa-clock-o"></i> 4:34 PM</span> </a> </li> <li class="divider"></li> <?php } ?> <li><a href="index.php?view=notifications">Ver todas <span class="label label-danger"><?php
$like = new IsLikeData(); $like->is_like = $_GET["l"]; $like->image_id = $_GET['id']; $like->user_id = Session::getUID(); $like->add(); //print_r($_GET); $text = ""; $u = UserData::getById(Session::getUID()); $image = ImageData::getById($_GET['id']); if ($_GET["l"] == 1) { $not_type = NotificationTypeData::getByName("Nuevo Like"); $text = "A <b>{$u->name} {$u->lastname}</b> le ha gusta tu imagen."; } else { if ($_GET["l"] == 0) { $not_type = NotificationTypeData::getByName("Nuevo DisLike"); $text = "A <b>{$u->name} {$u->lastname}</b> NO le ha gusta tu imagen."; } } $n = new NotificationData(); $n->brief = $text; $n->content = ""; $n->channel_id = $image->channel_id; $n->image_id = $_GET['id']; $n->comment_id = "NULL"; $n->album_id = "NULL"; $n->notification_type_id = $not_type->id; $n->user_id = Session::getUID(); //print_r($n); $n->add(); print "<script>window.location='index.php?view=image&id={$_GET['id']}';</script>";
<?php $f = new FollowerData(); $f->channel_id = $_POST['channel_id']; $f->add(); $u = UserData::getById(Session::getUID()); $channel = ChannelData::getById($_POST['channel_id']); $author = $channel->getUser(); $not_type = NotificationTypeData::getByName("Nuevo Seguidor"); $n = new NotificationData(); $n->brief = "<b>{$u->name} {$u->lastname}</b> Te Sigue"; $n->content = ""; $n->channel_id = $_POST['channel_id']; $n->image_id = "NULL"; $n->comment_id = "NULL"; $n->album_id = "NULL"; $n->notification_type_id = $not_type->id; $n->user_id = Session::getUID(); $n->add(); //index.php?module=channelinfo&id=1 print "<script>window.location='index.php?view=channelinfo&id={$_POST['channel_id']}';</script>";
<?php $comment = new CommentData(); $comment->content = $_POST['content']; $comment->image_id = $_POST['image_id']; $comment->user_id = Session::getUID(); $comment->add(); $not_type = NotificationTypeData::getByName("Nuevo Comentario"); $u = UserData::getById(Session::getUID()); $image = ImageData::getById($_POST['image_id']); $n = new NotificationData(); $n->brief = "<b>{$u->name} {$u->lastname}</b> Te ha agregado un nuevo comentario."; $n->content = ""; $n->channel_id = $image->channel_id; $n->image_id = $_POST['image_id']; $n->comment_id = "NULL"; $n->album_id = "NULL"; $n->notification_type_id = $not_type->id; $n->user_id = Session::getUID(); $n->add(); print "<script>window.location='index.php?view=image&id={$_POST['image_id']}';</script>";