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
<?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 #3
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'>