Example #1
0
    public function renderHeader($channel)
    {
        $img = "";
        $url = "";
        $cfol = count(FollowerData::getByChannelId($_GET['id']));
        $ffol = "";
        $flink = "";
        if (Session::getUID() != "") {
            if (FollowerData::existFollowerChannel(Session::getUID(), $channel->id) == null) {
                $flink = "<a href='index.php?view=channelinfo&id={$channel->id}' class='btn btn-default'><i class='glyphicon glyphicon-ok'></i>&nbsp; Seguir</a>";
            } else {
                $flink = "<a href='#' class='btn btn-default btn-primary disabled'><i class='icon-ok'></i>&nbsp; Siguiendo</a>";
            }
        }
        if ($cfol == 1) {
            $ffol = "{$cfol} Seguidor";
        } else {
            $ffol = "{$cfol} Seguidores";
        }
        if ($channel->image != "") {
            $url = "storage/channel/{$channel->id}/profile/{$channel->image}";
        }
        if ($url != "") {
            $img = "<img class=media-object' src='{$url}' style='width:64px;height:64px;' data-src='holder.js/64x64'>";
        } else {
            $img = "<img class=media-object'  data-src='holder.js/80x80'>";
        }
        echo <<<AAA
<div class="media">
<!--  <a class="pull-left" href="#">
    {$img}
  </a> -->
\t\t\t<h1><b>{$channel->title}</b> <small class='f18'>{$ffol}</small></h1>
\t\t\t<p class='lead'>{$channel->description}</p>   
\t\t\t{$flink}
\t\t\t<br><br>
</div>
AAA;
    }
Example #2
0
$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>
<?php 
    if ($f == null) {
Example #3
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 #4
0
	<div class='row'>

<?php 
$channel_populars = FollowerData::getAllByPopular();
$image_populars = ImageViewData::getAllByPopular();
$channels = ChannelData::getAll();
$images = ImageData::getAll();
?>
		<div class="col-md-12">
			<h2 class='roboto'>Populares <small>Las mas vistas</small></h2>
			<?php 
if (count($image_populars) > 0) {
    Widget::renderPopularImages($image_populars);
} else {
    ?>
				<div class='hero-unit'>
					<h2 class='roboto'>No hay imagenes</h2>
					<p class='roboto'>No se ha cargado imagenes al sistema</p>
				</div>
			<?php 
}
?>
		</div>
				<!-- <div class='col-md-2'>
				<br><h4 class='roboto'>Populares</h4>
<?php 
php;
?>
		</div> -->

	</div><!-- /container -->
Example #5
0
<h1>Seguidores</h1>
    <a class="btn btn-default" href='index.php?view=channelpanel'>Configuracion</a>
    <a class="btn btn-default" href='index.php?view=channelpanel&part=image2'>Imagen de Canal</a>
    <a class="btn btn-default" href='index.php?view=channelpanel&part=followers'>Seguidores</a>
    <a class="btn btn-default" href='index.php?view=channelpanel&part=comments'>Comentarios</a>
<br>
<?php 
$followers = FollowerData::getByChannelId($channel->id);
if (count($followers) > 0) {
    ?>
<br><table class='table table-bordered table-hover'>
<?php 
    foreach ($followers as $follower) {
        $user = $follower->getUser();
        ?>
<tr>
	<td><?php 
        echo $user->name . " " . $user->lastname;
        ?>
</td>
	<td style='width:20px;'><i class='icon-ok'></i></td>
	</tr>
<?php 
    }
    ?>
	
</table><br><br><br><br><br>
<?php 
} else {
    ?>
<br>	<div class='jumbotron'>
Example #6
0
	<div class='row'>
<?php 
$image_populars = $uac = FollowerData::getUserIdActivity(Session::getUID());
?>
		<div class="col-md-12">
			<?php 
if (count($image_populars) > 0) {
    ?>
			<h2 class='roboto'>Actividad <small>Actualizaciones de los canales que siguies</small></h2>
<br>
			  		<?php 
    foreach ($image_populars as $activity) {
        $image = $activity->getImage();
        $url = "storage/channel/{$image->channel_id}/" . $image->name;
        $chan = $image->getChannel();
        $chanurl = "storage/channel/{$image->channel_id}/profile/" . $chan->image;
        $chanimg = "";
        if ($image->getChannel()->image != "") {
            $chanimg = "<img src='{$chanurl}'>";
        } else {
            $chanimg = "<img data-src='holder.js/64x64'>";
        }
        $likes = count($image->getLikes());
        $views = count($image->getViews());
        echo <<<AAA
                    <div class='col-md-3 col-sm-3 col-xs-6'>
\t            \t\t<a style='color:#434343;text-transform:capitalize;font-weight:bold;' href='index.php?view=image&id={$image->id}'>
\t\t\t\t\t\t<img class='img-responsive' data-src="holder.js/360x270" src='{$url}' alt="">
\t            \t\t</a>
\t\t\t\t\t\t<br><div class='counts'>
\t\t\t\t\t\t\t<div class='count btn btn-default btn-xs'> {$likes}&nbsp;<i class='fa fa-thumbs-up'></i></div>