Example #1
0
    if ($sort != $vsort) {
        assign('sort', $vsort);
    } else {
        $sort = false;
    }
    if ($vsort == 'most_recent') {
        $sort = false;
    }
}
$counter = get_counter('channel', $count_query);
if (!$counter) {
    //Collecting Data for Pagination
    $ucount = $u_cond;
    $ucount['count_only'] = true;
    $total_rows = get_users($ucount);
    $counter = $total_rows;
    update_counter('channel', $count_query, $counter);
}
$total_pages = count_pages($counter, CLISTPP);
//Pagination
$pages->paginate($total_pages, $page);
$subtitle = lang('Channels');
if ($category) {
    $subtitle .= " › " . $category;
}
if ($sort) {
    $subtitle .= " • " . $sort;
}
subtitle($subtitle);
template_files('channels.html');
display_it();
Example #2
0
                            //execute($db, $Q, "index.3");
                            $image = "image" . $j++;
                            $p[$i][$image] = $irow['location'] . "/" . $irow['image'];
                        }
                    }
                }
                $i++;
            }
        }
    }
}
if (isset($_GET['manual'])) {
    $manual = $_GET['manual'];
} else {
    $manual = 0;
    update_counter($db, "Home");
}
if (isset($_POST['key_num'])) {
    $key_num = $_POST['key_num'];
} else {
    if (isset($_GET['key_num'])) {
        $key_num = $_GET['key_num'];
    } else {
        $key_num = -1;
    }
}
// Increment or reset the $key_num value
$key_num++;
if ($key_num == count($p)) {
    $key_num = 0;
}
Example #3
0
 $get_limit = create_query_limit($page, 9);
 $vlist = $vid_cond;
 $count_query = $vid_cond;
 $vlist['limit'] = $get_limit;
 $vlist['user'] = $udetails["userid"];
 $videos = get_videos($vlist);
 Assign('videos', $videos);
 //Collecting Data for Pagination
 $vcount = $vid_cond;
 $counter = get_counter('video', $count_query);
 if (!$counter) {
     $vcount['count_only'] = true;
     $total_rows = get_videos($vcount);
     $total_pages = count_pages($total_rows, VLISTPP);
     $counter = $total_rows;
     update_counter('video', $count_query, $counter);
 }
 $total_pages = count_pages($counter, VLISTPP);
 //Pagination
 $link == NULL;
 $extra_params = NULL;
 $tag = '<li><a #params#>#page#</a><li>';
 $pages->paginate($total_pages, $page, $link, $extra_params, $tag);
 // pulls user profile
 $profile = $userquery->get_user_profile($udetails['userid']);
 Assign('u_control', $profile);
 // making sure user can see his private vid tab
 //$user_cond = $userquery->userid != $udetails['userid'];
 //Assign('u_cond', $user_cond);
 $firstVideo = isset($videos[0]) ? $videos[0] : false;
 $firstVideo = $cbvid->get_video($firstVideo['videoid']);
Example #4
0
<?php

function update_counter()
{
    $counter++;
}
$counter = 10;
update_counter();
echo $counter;