public function getImage() { return ImageData::getById($this->image_id); }
<?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>";
<?php $image = ImageData::getById($_GET['id']); ?> <div style='background:rgba(255,255,255,0.3);'> <div class='row'> <div class='span10'> <a href='index.php?module=viewalbum&alid=<?php echo $image->album_id; ?> ' class='btn pull-right'><i class='fa fa-arrow-left'></i> Regresar</a> <h2 class='roboto'><?php echo $image->title; ?> <small>Editar imagen</small></h2> <form enctype="multipart/form-data" method='post' action='add.php' class='form-horizontal' id='form_upload'> <center> <img id='preview' style='width:50%;' src="<?php echo "storage/images/albums/{$image->album_id}/{$image->image}"; ?> "></center> <div class="control-group"> <label class="control-label" for="inputEmail"></label> <div class="controls"> <input type="file" name='image' id="inputImage" placeholder="Email"> <input type="hidden" name='reference' value='updateimage'> <input type="hidden" name='image_id' value='<?php echo $_GET['id']; ?> '>
<?php $image = ImageData::getById($_GET["id"]); $u = null; if (Core::$user != null) { $u = Core::$user; } ?> <div class='row'> <div class="col-md-9"> <?php if ($image != null) { //if($image->privacy_id==1){ echo "<i class='fa fa-globe pull-right'></i>";} //else if($image->privacy_id==2){ echo "<i class='fa fa-lock pull-right'></i>";} ?> <h1><?php echo $image->title; ?> </h1><br> <img class="img-responsive" src='storage/channel/<?php echo $image->channel_id . "/" . $image->name; ?> '> <br><br> <?php $xlike = null; if (Session::getUID() != "") { $xlike = IslikeData::getAllLikeImageUser($_GET['id'], Session::getUID()); } ?>