Example #1
0
 public function getChannel()
 {
     return ChannelData::getById($this->channel_id);
 }
Example #2
0
<?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>";
Example #3
0
<?php

$channel = ChannelData::getById($_GET['id']);
// aui empieza ...
if ($channel != null) {
    $images = ImageData::getAllByChannel($channel->id);
    $followers = FollowerData::getByChannelId($_GET['id']);
    $url = "";
    $background = "";
    if ($channel->image != "") {
        $url = "storage/channel/{$channel->id}/profile/{$channel->image}";
    }
    if ($url != "") {
        $background = "style='background: url({$url}) center;'";
    }
    $f = null;
    if (Session::getUID() != "") {
        $f = FollowerData::existFollowerChannel(Session::getUID(), $channel->id);
    }
    ?>

<br>	<div class='row'>
		<div class="col-md-12">
				<h1 class='roboto'><?php 
    echo $channel->title;
    ?>
</h1>
				<p class="lead"><?php 
    echo $channel->description;
    ?>
</p>
Example #4
0
			</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());
    }
    ?>

<?php 
    $channel = ChannelData::getById($image->channel_id);
    echo "<a href='index.php?view=channel&id={$channel->id}' class='btn btn-default pull-right'><i class='fa fa-th-large'></i> {$channel->title}</a>";
    if (count($xlike) == 0) {
        ?>
				 <div class="btn-group">
				  <a href="index.php?action=addlike&id=<?php 
        echo $image->id;
        ?>
&l=1" class="btn btn-default" ><i class='fa fa-thumbs-up'></i> Me Gusta</a>
				  <a href="index.php?action=addlike&id=<?php 
        echo $image->id;
        ?>
&l=0" class="btn btn-default "> No Me Gusta <i class='fa fa-thumbs-down'></i></a>
				</div>
<?php 
    } else {