forked from WWBN/AVideo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchannelBody.php
103 lines (96 loc) · 3.55 KB
/
channelBody.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php
$isMyChannel = false;
if (User::isLogged() && $user_id == User::getId()) {
$isMyChannel = true;
}
$user = new User($user_id);
$_GET['channelName'] = $user->getChannelName();
$_POST['sort']['created'] = "DESC";
if (empty($_GET['current'])) {
$_POST['current'] = 1;
} else {
$_POST['current'] = $_GET['current'];
}
$current = $_POST['current'];
$rowCount = 25;
$_POST['rowCount'] = $rowCount;
$uploadedVideos = Video::getAllVideosAsync("a", $user_id);
$uploadedTotalVideos = Video::getTotalVideos("a", $user_id);
$totalPages = ceil($uploadedTotalVideos / $rowCount);
unset($_POST['sort']);
unset($_POST['rowCount']);
unset($_POST['current']);
$get = array('channelName' => $_GET['channelName']);
?>
<div class="bgWhite list-group-item gallery clear clearfix" >
<div class="row bg-info profileBg" style="background-image: url('<?php echo $global['webSiteRootURL'], $user->getBackgroundURL(); ?>')">
<img src="<?php echo User::getPhoto($user_id); ?>" alt="<?php echo $user->_getName(); ?>" class="img img-responsive img-thumbnail" style="max-width: 100px;"/>
</div>
<div class="row"><div class="col-6 col-md-12">
<h1 class="pull-left">
<?php
echo $user->getNameIdentificationBd();
?></h1>
<span class="pull-right">
<?php
echo Subscribe::getButton($user_id);
?>
</span>
</div></div>
<div class="col-md-12">
<?php echo nl2br($user->getAbout()); ?>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<?php
if ($isMyChannel) {
?>
<a href="<?php echo $global['webSiteRootURL']; ?>mvideos" class="btn btn-success ">
<span class="glyphicon glyphicon-film"></span>
<span class="glyphicon glyphicon-headphones"></span>
<?php echo __("My videos"); ?>
</a>
<?php
} else {
echo __("My videos");
}
echo YouPHPTubePlugin::getChannelButton();
?>
</div>
<div class="panel-body">
<?php
if (!empty($uploadedVideos[0])) {
$video = $uploadedVideos[0];
$obj = new stdClass();
$obj->BigVideo = true;
$obj->Description = false;
include $global['systemRootPath'] . 'plugin/Gallery/view/BigVideo.php';
unset($uploadedVideos[0]);
}
?>
<div class="row mainArea">
<?php
createGallerySection($uploadedVideos, "", $get);
?>
</div>
</div>
<div class="panel-footer">
<ul id="channelPagging"></ul>
<script>
$(document).ready(function () {
$('#channelPagging').bootpag({
total: <?php echo $totalPages; ?>,
page: <?php echo $current; ?>,
maxVisible: 10
}).on('page', function (event, num) {
document.location = ("<?php echo $global['webSiteRootURL']; ?>channel/<?php echo $_GET['channelName']; ?>?current=" + num);
});
});
</script>
</div>
</div>
<?php
include $global['systemRootPath'] . 'view/channelPlaylist.php';
?>
</div>
<script src="<?php echo $global['webSiteRootURL']; ?>plugin/Gallery/script.js" type="text/javascript"></script>