clipbucket/upload/ajax/view_channel.php
2016-04-04 14:32:50 +05:00

33 lines
No EOL
815 B
PHP
Executable file

<?php
require '../includes/config.inc.php';
if (isset($_POST['mode'])) {
$mode = $_POST['mode'];
switch ($mode) {
case 'channelMore':
global $db, $cbvid, $Smarty;
$load_hit = $_POST['loadHit'];
$load_limit = $_POST['loadLimit'];
$user = $_POST['user'];
$start = $load_limit * $load_hit - $load_limit;
$sql_limit = "$start, $load_limit";
$total_items = $_POST['totalVids'];
$items = get_videos(array("user"=>$user, "order"=>"date_added DESC","limit"=>$sql_limit));
if ($start >= $total_items) {
echo "none";
return false;
}
foreach ($items as $key => $video) {
assign("video", $video);
assign("display_type","ajaxHome");
echo trim(Fetch('/blocks//videos/video.html'));
}
break;
default:
# code...
break;
}
}
?>