FIXED : Plugin SystemA
IGNORE : Depreciated Functions Cleaned : Plugins
This commit is contained in:
parent
33cfaca1de
commit
107deca82f
21 changed files with 252 additions and 237 deletions
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/*
|
||||
* @since : 2009
|
||||
* @author : Arslan Hassahn
|
||||
* @author : Arslan Hassan
|
||||
*/
|
||||
require_once '../includes/admin_config.php';
|
||||
$userquery->admin_login_check();
|
||||
|
@ -11,13 +11,10 @@ if(isset($_POST['update']))
|
|||
{
|
||||
$text = mysql_clean($_POST['text']);
|
||||
update_announcement($text);
|
||||
$msg = e("Annoucment has been updated",m);
|
||||
$msg = e("Announcement has been updated",m);
|
||||
}
|
||||
|
||||
Assign('msg', @$msg);
|
||||
Template('header.html');
|
||||
Template('leftmenu.html');
|
||||
Template('message.html');
|
||||
Template('edit_announcemnent.html');
|
||||
Template('footer.html');
|
||||
template_files('edit_announcemnent.html');
|
||||
display_it();
|
||||
|
||||
?>
|
|
@ -121,7 +121,7 @@
|
|||
cat_div = "#thumbs_{$category[list].category_id}";
|
||||
{literal}
|
||||
$(function() { {/literal}
|
||||
$("#thumbs_{$category[list].category_id}").tooltip({literal}{showURL: false});
|
||||
$("#thumbs_{$category[list].category_id}").tooltip({literal}{showURL: false,delay: 0});
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
<td>
|
||||
<select name="status">
|
||||
<option value="Successful" {if $data.status=='Successful'} selected {/if}>Successfull</option>
|
||||
<option value="processing" {if $data.status=='processing'} selected {/if}>Processing</option>
|
||||
<option value="processing" {if $data.status=='Processing'} selected {/if}>Processing</option>
|
||||
<option value="Failed" {if $data.status=='Failed'} selected {/if}>Failed</option>
|
||||
</select>
|
||||
</td>
|
||||
|
|
|
@ -90,8 +90,8 @@
|
|||
<a href="?deactivate={$videos[list].videoid}">Deactivate</a> {else} |
|
||||
<a href="?activate={$videos[list].videoid}">Activate</a> {/if} |
|
||||
<a href="?editor_pick={$videos[list].videoid}">Add To Editor's Pick</a> |
|
||||
<a href="view_conversion_log.php?file_name={$videos[list].file_name}">File conversion details</a>
|
||||
|
||||
<a href="view_conversion_log.php?file_name={$videos[list].file_name}">File conversion details</a> |
|
||||
<a href="?delete_video={$videos[list].videoid}">Delete</a>
|
||||
</div>
|
||||
</td>
|
||||
<td width="50" valign="top" class="video_opt_td"> </td>
|
||||
|
|
|
@ -58,12 +58,6 @@ if($myquery->VideoExists($video)){
|
|||
|
||||
|
||||
|
||||
//Assing Template
|
||||
Assign('msg',@$msg);
|
||||
Template('header.html');
|
||||
Template('leftmenu.html');
|
||||
Template('message.html');
|
||||
Template('upload_thumbs.html');
|
||||
Template('footer.html');
|
||||
|
||||
template_files('upload_thumbs.html');
|
||||
display_it();
|
||||
?>
|
|
@ -64,12 +64,6 @@ switch($mode)
|
|||
}
|
||||
|
||||
|
||||
|
||||
Assign('msg', @$msg);
|
||||
Template('header.html');
|
||||
Template('leftmenu.html');
|
||||
Template('message.html');
|
||||
Template('user_levels.html');
|
||||
Template('footer.html');
|
||||
|
||||
template_files('user_levels.html');
|
||||
display_it();
|
||||
?>
|
|
@ -14,34 +14,26 @@ $pages->page_redir();
|
|||
//Feature / UnFeature Video
|
||||
if(isset($_GET['make_feature'])){
|
||||
$video = mysql_clean($_GET['make_feature']);
|
||||
if($myquery->VideoExists($video)){
|
||||
$msg[] = $myquery->MakeFeaturedVideo($video);
|
||||
}else{
|
||||
$msg[] = $LANG['class_vdo_del_err'];
|
||||
}
|
||||
$cbvid->action('feature',$video);
|
||||
}
|
||||
if(isset($_GET['make_unfeature'])){
|
||||
$video = mysql_clean($_GET['make_unfeature']);
|
||||
if($myquery->VideoExists($video)){
|
||||
$msg[] = $myquery->MakeUnFeaturedVideo($video);
|
||||
}else{
|
||||
$msg[] = $LANG['class_vdo_del_err'];
|
||||
}
|
||||
$cbvid->action('unfeature',$video);
|
||||
}
|
||||
|
||||
//Using Multple Action
|
||||
if(isset($_POST['make_featured_selected'])){
|
||||
if(isset($_POST['make_featured_selected'])){
|
||||
for($id=0;$id<=RESULTS;$id++){
|
||||
$myquery->MakeFeaturedVideo($_POST['check_video'][$id]);
|
||||
$cbvid->action('feature',$_POST['check_video'][$id]);
|
||||
}
|
||||
$msg = "Selected Videos Have Been Set As Featured";
|
||||
}
|
||||
if(isset($_POST['make_unfeatured_selected'])){
|
||||
e("Selected videos have been set as featured",m);
|
||||
}
|
||||
if(isset($_POST['make_unfeatured_selected'])){
|
||||
for($id=0;$id<=RESULTS;$id++){
|
||||
$myquery->MakeUnFeaturedVideo($_POST['check_video'][$id]);
|
||||
}
|
||||
$msg = "Selected Videos Have Been Removed From The Featured Video List";
|
||||
$cbvid->action('unfeature',$_POST['check_video'][$id]);
|
||||
}
|
||||
e("Selected videos have been removed from featured list",m);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -59,55 +51,44 @@ if(isset($_GET['editor_pick'])){
|
|||
|
||||
if(isset($_GET['activate'])){
|
||||
$video = mysql_clean($_GET['activate']);
|
||||
if($myquery->VideoExists($video)){
|
||||
$msg[] = $myquery->ActivateVideo($video);
|
||||
}else{
|
||||
$msg[] = $LANG['class_vdo_del_err'];
|
||||
}
|
||||
$cbvid->action('activate',$video);
|
||||
}
|
||||
if(isset($_GET['deactivate'])){
|
||||
$video = mysql_clean($_GET['deactivate']);
|
||||
if($myquery->DeActivateVideo($video)){
|
||||
$msg[] = $myquery->DeActivateVideo($video);
|
||||
}else{
|
||||
$msg[] = $LANG['class_vdo_del_err'];
|
||||
}
|
||||
$cbvid->action('deactivate',$video);
|
||||
}
|
||||
|
||||
//Using Multple Action
|
||||
if(isset($_POST['activate_selected'])){
|
||||
//Using Multple Action
|
||||
if(isset($_POST['activate_selected'])){
|
||||
for($id=0;$id<=RESULTS;$id++){
|
||||
$myquery->ActivateVideo($_POST['check_video'][$id]);
|
||||
$cbvid->action('activate',$_POST['check_video'][$id]);
|
||||
}
|
||||
$msg = "Selected Videos Have Been Activated";
|
||||
}
|
||||
if(isset($_POST['deactivate_selected'])){
|
||||
e("Selected Videos Have Been Activated");
|
||||
}
|
||||
if(isset($_POST['deactivate_selected'])){
|
||||
for($id=0;$id<=RESULTS;$id++){
|
||||
$myquery->DeActivateVideo($_POST['check_video'][$id]);
|
||||
}
|
||||
$msg = "Selected Videos Have Been Dectivated";
|
||||
$cbvid->action('deactivate',$_POST['check_video'][$id]);
|
||||
}
|
||||
e("Selected Videos Have Been Dectivated");
|
||||
}
|
||||
|
||||
|
||||
//Delete Video
|
||||
if(isset($_GET['delete_video'])){
|
||||
//Delete Video
|
||||
if(isset($_GET['delete_video'])){
|
||||
$video = mysql_clean($_GET['delete_video']);
|
||||
if($myquery->VideoExists($video)){
|
||||
$msg[] = $myquery->DeleteVideo($video);
|
||||
}else{
|
||||
$msg[] = $LANG['class_vdo_del_err'];
|
||||
}
|
||||
}
|
||||
$cbvideo->delete_video($video);
|
||||
}
|
||||
|
||||
//Deleting Multiple Videos
|
||||
if(isset($_POST['delete_selected'])){
|
||||
for($id=0;$id<=RESULTS;$id++){
|
||||
if($myquery->VideoExists($_POST['check_video'][$id])){
|
||||
$msg[] = $myquery->DeleteVideo($_POST['check_video'][$id]);
|
||||
}
|
||||
}
|
||||
$msg = $LANG['vdo_del_selected'];
|
||||
//Deleting Multiple Videos
|
||||
if(isset($_POST['delete_selected']))
|
||||
{
|
||||
for($id=0;$id<=RESULTS;$id++)
|
||||
{
|
||||
$cbvideo->delete_video($_POST['check_video'][$id]);
|
||||
}
|
||||
$eh->flush();
|
||||
e(lang("vdo_multi_del_erro"),m);
|
||||
}
|
||||
|
||||
//Jump To The page
|
||||
if(isset($_POST['display_page'])){
|
||||
|
|
|
@ -46,7 +46,6 @@ class ClipBucket
|
|||
'checkall.js' => 'global',
|
||||
'redir.js' => 'global',
|
||||
'functions.js' => 'global',
|
||||
'jquery_plugs/date_picker.js' => 'global',
|
||||
));
|
||||
|
||||
//This is used to create Admin Menu
|
||||
|
|
|
@ -67,8 +67,7 @@ class AdsManager
|
|||
global $LANG;
|
||||
$placement = mysql_clean($_POST['type']);
|
||||
$name = mysql_clean($_POST['name']);
|
||||
//Replacing Single Quotes With Double Codes
|
||||
$code = addslashes($_POST['code']);
|
||||
$code = htmlspecialchars($_POST['code']);
|
||||
$category = mysql_clean(@$_POST['category']);
|
||||
if(empty($name)){
|
||||
$msg = e($LANG['ad_name_error']);
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* @LINK : http://arslan.labguru.com/ - http://clip-bucket.com/
|
||||
* @LICENSE : CBLA
|
||||
* @DATE : Feb 21 2009
|
||||
* @Version : 1.0
|
||||
* @CB Version : 1.7.2
|
||||
* @Version : 1.2
|
||||
* @CB Version : v2
|
||||
* @Class : formObj
|
||||
*/
|
||||
|
||||
|
|
|
@ -75,23 +75,6 @@ class myquery {
|
|||
return $data;
|
||||
}
|
||||
|
||||
function Get_Advertisments(){
|
||||
$query = mysql_query("SELECT * FROM ads_data
|
||||
WHERE ad_id >= FLOOR( RAND( ) * ( SELECT MAX( ad_id ) FROM ads_data ) ) AND ad_status='1'
|
||||
ORDER BY ad_id ASC
|
||||
");
|
||||
while($row = mysql_fetch_array($query)){
|
||||
$id = $row['ad_id'];
|
||||
$imp = $row['ad_impressions']+1;
|
||||
$name = $row['ad_placement'];
|
||||
$data[$name] = stripslashes($row['ad_code']);
|
||||
//Update IMpressions
|
||||
mysql_query("UPDATE ads_data SET ad_impressions ='".$imp."' WHERE ad_id='".$id."' ");
|
||||
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
function check_user($username){
|
||||
$query = mysql_query("SELECT * FROM users WHERE username ='".$username."'");
|
||||
if(mysql_num_rows($query) > 0){
|
||||
|
@ -111,95 +94,6 @@ class myquery {
|
|||
|
||||
}
|
||||
|
||||
function fetch($query){
|
||||
$fetch = mysql_fetch_array($query);
|
||||
return $fetch;
|
||||
}
|
||||
|
||||
//This Function is used to Add Categories
|
||||
|
||||
function AddCategory(){
|
||||
global $LANG;
|
||||
$title = mysql_clean($_POST['title']);
|
||||
$description = mysql_clean($_POST['description']);
|
||||
$file = $_FILES['category_thumb']['name'];
|
||||
$ext = substr($file, strrpos($file, '.') + 1);
|
||||
$thumb = 'no_thumb.jpg';
|
||||
if(!empty($file)){
|
||||
$image = new ResizeImage();
|
||||
if($image->ValidateImage($_FILES['category_thumb']['tmp_name'],$ext)){
|
||||
$newfilename = RandomString(10).'.'.$ext;
|
||||
$category_thumb = '../images/category_thumbs/'.$newfilename;
|
||||
copy($_FILES['category_thumb']['tmp_name'],$category_thumb);
|
||||
$image->CreateThumb($category_thumb,$category_thumb,120,$ext);
|
||||
$thumb = $newfilename;
|
||||
}else{
|
||||
$msg[] = e($LANG['class_error_occured']);
|
||||
$add = false;
|
||||
}
|
||||
}
|
||||
if(empty($msg)){
|
||||
mysql_query("INSERT INTO category(category_name,category_description,category_thumb,date_added)
|
||||
VALUES('".$title."','".$description."','".$thumb."',now())");
|
||||
$add = true;
|
||||
}
|
||||
return $add;
|
||||
}
|
||||
|
||||
//This Function Is Used to Check Category Exits or Not
|
||||
|
||||
/*function CategoryExists($category){
|
||||
$query = mysql_query("SELECT categoryid FROM category WHERE categoryid ='".$category."'");
|
||||
if(mysql_num_rows($query)>0){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
//This Function Is Used to Update Category
|
||||
|
||||
function UpdateCategory($category){
|
||||
global $LANG;
|
||||
$title = mysql_clean($_POST['title']);
|
||||
$description = mysql_clean($_POST['description']);
|
||||
$file = $_FILES['category_thumb']['name'];
|
||||
$ext = substr($file, strrpos($file, '.') + 1);
|
||||
$thumb = $_POST['thumb'];
|
||||
if(!empty($file)){
|
||||
$image = new ResizeImage();
|
||||
if($image->ValidateImage($_FILES['category_thumb']['tmp_name'],$ext)){
|
||||
if($thumb != 'no_thumb.jpg'){
|
||||
unlink('../images/category_thumbs/'.$thumb);
|
||||
}
|
||||
$newfilename = RandomString(10).'.'.$ext;
|
||||
$category_thumb = '../images/category_thumbs/'.$newfilename;
|
||||
copy($_FILES['category_thumb']['tmp_name'],$category_thumb);
|
||||
$image->CreateThumb($category_thumb,$category_thumb,120,$ext);
|
||||
$thumb = $newfilename;
|
||||
}
|
||||
}
|
||||
if(empty($msg)){
|
||||
mysql_query("UPDATE category SET
|
||||
category_name ='".$title."',
|
||||
category_description ='".$description."',
|
||||
category_thumb ='".$thumb."'
|
||||
WHERE categoryid = '".$category."'");
|
||||
$update = true;
|
||||
}
|
||||
return $update;
|
||||
}
|
||||
|
||||
//Function Delete Category
|
||||
function DeleteCategory($category){
|
||||
global $LANG;
|
||||
mysql_query("DELETE FROM category WHERE categoryid='".$category."'");
|
||||
$msg=e($LANG['class_cat_del_msg'],m);
|
||||
return $msg;
|
||||
}
|
||||
|
||||
//Function Used to Delete Flv File
|
||||
|
||||
function DeleteFlv($flv){
|
||||
|
|
|
@ -122,7 +122,7 @@ class signup {
|
|||
'id' => 'gender',
|
||||
'value' => array('Male'=>$LANG['male'],'Female'=>$LANG['female']),
|
||||
'sep'=> ' ',
|
||||
'checked'=>'female',
|
||||
'checked'=>'Male',
|
||||
'db_field'=>'sex',
|
||||
'required'=>'yes',
|
||||
),
|
||||
|
|
|
@ -329,11 +329,11 @@ class userquery {
|
|||
* Function used to check user is admin or not
|
||||
* @param BOOLEAN if true, after checcking user will be redirected to login page if needed
|
||||
*/
|
||||
function admin_login_check($is_login_page=false)
|
||||
function admin_login_check($check_only=false)
|
||||
{
|
||||
if(!$this->login_check('admin_access'))
|
||||
{
|
||||
if($is_login_page==FALSE)
|
||||
if($check_only==FALSE)
|
||||
redirect_to('login.php');
|
||||
return false;
|
||||
}else{
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Author : Arslan Hassan
|
||||
* Script : ClipBucket v2
|
||||
|
@ -192,6 +191,13 @@ class CBvideo extends CBCategory
|
|||
$query .= ',';
|
||||
}*/
|
||||
|
||||
if(has_access('admin_access'))
|
||||
{
|
||||
$query_field[] = 'status';
|
||||
$query_field[] = 'duration';
|
||||
$query_val[] = $array['status'];
|
||||
$query_val[] = $array['duration'];
|
||||
}
|
||||
|
||||
if(!userid())
|
||||
{
|
||||
|
@ -206,7 +212,99 @@ class CBvideo extends CBCategory
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function used to delete a video
|
||||
*/
|
||||
function delete_video($vid)
|
||||
{
|
||||
global $db;
|
||||
|
||||
if($this->video_exists($vid))
|
||||
{
|
||||
$vdetails = $this->get_video($vid);
|
||||
//list of functions to perform while deleting a video
|
||||
$del_vid_funcs = $this->video_delete_functions;
|
||||
if(is_array($del_vid_funcs))
|
||||
{
|
||||
foreach($del_vid_funcs as $func)
|
||||
{
|
||||
if(function_exists($func))
|
||||
{
|
||||
$func($vdetails);
|
||||
}
|
||||
}
|
||||
}
|
||||
//Finally Removing Database entry of video
|
||||
$db->execute("DELETE FROM video WHERE videoid='$vid'");
|
||||
e(lang("class_vdo_del_msg"),m);
|
||||
}else{
|
||||
e(lang("class_vdo_del_err"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to remove video thumbs
|
||||
*/
|
||||
function remove_thumbs($vdetails)
|
||||
{
|
||||
//First lets get list of all thumbs
|
||||
$thumbs = get_thumb($vdetails,1,true,false,false);
|
||||
if(!is_default_thumb($thumbs))
|
||||
{
|
||||
if(is_array($thumbs))
|
||||
{
|
||||
foreach($thumbs as $thumb)
|
||||
{
|
||||
$file = THUMBS_DIR.'/'.$thumb;
|
||||
if(file_exists($file) && is_file($file))
|
||||
unlink($file);
|
||||
}
|
||||
}else{
|
||||
$file = THUMBS_DIR.'/'.$thumbs;
|
||||
if(file_exists($file) && is_file($file))
|
||||
unlink($file);
|
||||
}
|
||||
|
||||
e(lang("vid_thumb_removed_msg"),m);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Function used to remove video log
|
||||
*/
|
||||
function remove_log($vdetails)
|
||||
{
|
||||
global $db;
|
||||
$src = $vdetails['videoid'];
|
||||
$db->execute("DELETE FROM video_file WHERE src_name = '$src'");
|
||||
e(lang("vid_log_delete_msg"),m);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to remove video files
|
||||
*/
|
||||
function remove_files($vdetails)
|
||||
{
|
||||
//Getting list of files
|
||||
$files = get_video_file($vdetails,false,false,true);
|
||||
if(is_array($files))
|
||||
{
|
||||
foreach($files as $file)
|
||||
{
|
||||
if(file_exists(VIDEOS_DIR.'/'.$file) && is_file(VIDEOS_DIR.'/'.$file))
|
||||
unlink(VIDEOS_DIR.'/'.$file);
|
||||
}
|
||||
}else{
|
||||
if(file_exists(VIDEOS_DIR.'/'.$files) && is_file(VIDEOS_DIR.'/'.$files))
|
||||
unlink(VIDEOS_DIR.'/'.$files);
|
||||
}
|
||||
e(lang("vid_files_removed_msg"),m);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
|
@ -102,7 +102,7 @@ if(DEBUG_LEVEL == 1)
|
|||
}
|
||||
elseif(DEBUG_LEVEL == 2)
|
||||
{
|
||||
error_reporting(E_ALL ^ E_NOTICE);
|
||||
error_reporting(E_ALL ^ E_NOTICE ^E_DEPRECATED);
|
||||
ini_set('display_errors', '1');
|
||||
}
|
||||
else
|
||||
|
@ -111,7 +111,7 @@ else
|
|||
ini_set('display_errors', '0');
|
||||
}
|
||||
|
||||
error_reporting(E_ALL ^ E_NOTICE);
|
||||
error_reporting(E_ALL ^ E_NOTICE ^E_DEPRECATED);
|
||||
ini_set('display_errors', '1');
|
||||
|
||||
//Website Details
|
||||
|
@ -415,4 +415,10 @@ $Smarty->register_modifier('request_form_val','request_form_val');
|
|||
$Smarty->register_modifier('get_thumb_num','get_thumb_num');
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
register_action_remove_video('remove_video_thumbs');
|
||||
register_action_remove_video('remove_video_log');
|
||||
register_action_remove_video('remove_video_files');
|
||||
?>
|
|
@ -502,7 +502,7 @@ function SetTime($sec, $padHours = true) {
|
|||
* @param ARRAY video_details, or videoid will also work
|
||||
*/
|
||||
|
||||
function get_thumb($vdetails,$num='default',$multi=false,$count=false){
|
||||
function get_thumb($vdetails,$num='default',$multi=false,$count=false,$return_full_path=true){
|
||||
global $db,$Cbucket,$myquery;
|
||||
$num = $num ? $num : 'default';
|
||||
#checking what kind of input we have
|
||||
|
@ -569,7 +569,11 @@ function SetTime($sec, $padHours = true) {
|
|||
{
|
||||
$thumb_parts = explode('/',$thumb);
|
||||
$thumb_file = $thumb_parts[count($thumb_parts)-1];
|
||||
|
||||
if($return_full_path)
|
||||
$thumbs[] = THUMBS_URL.'/'.$thumb_file;
|
||||
else
|
||||
$thumbs[] = $thumb_file;
|
||||
}
|
||||
|
||||
if(count($thumbs)==0)
|
||||
|
@ -615,6 +619,17 @@ function SetTime($sec, $padHours = true) {
|
|||
return BASEURL.'/files/thumbs/processing.jpg';
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to check weather give thumb is deafult or not
|
||||
*/
|
||||
function is_default_thumb($i)
|
||||
{
|
||||
if(getname($i)=='processing.jpg')
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//TEST EXCEC FUNCTION
|
||||
function test_exec( $cmd )
|
||||
|
@ -876,7 +891,7 @@ function SetTime($sec, $padHours = true) {
|
|||
}
|
||||
//Complete Query
|
||||
$query = "UPDATE $tbl SET $fields_query WHERE $cond $ep";
|
||||
//if(!mysql_query($query)) die(mysql_error());
|
||||
//if(!mysql_query($query)) die($query.'<br>'.mysql_error());
|
||||
$db->Execute($query);
|
||||
if(mysql_error()) die ($db->db_query.'<br>'.mysql_error());
|
||||
return $query;
|
||||
|
@ -1060,6 +1075,15 @@ function SetTime($sec, $padHours = true) {
|
|||
}
|
||||
function username(){return user_name();}
|
||||
|
||||
/**
|
||||
* Function used to check weather user access or not
|
||||
*/
|
||||
function has_access($acces,$check_only=FALSE)
|
||||
{
|
||||
global $userquery;
|
||||
return $userquery->login_check($access,$check_only);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to return mysql time
|
||||
* @author : Fwhite
|
||||
|
@ -1857,4 +1881,33 @@ function SetTime($sec, $padHours = true) {
|
|||
return $LANG[$var];
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* function used to remove video thumbs
|
||||
*/
|
||||
function remove_video_thumbs($vdetails)
|
||||
{
|
||||
global $cbvid;
|
||||
return $cbvid->remove_thumbs($vdetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* function used to remove video log
|
||||
*/
|
||||
function remove_video_log($vdetails)
|
||||
{
|
||||
global $cbvid;
|
||||
return $cbvid->remove_log($vdetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* function used to remove video files
|
||||
*/
|
||||
function remove_video_files($vdetails)
|
||||
{
|
||||
global $cbvid;
|
||||
return $cbvid->remove_files($vdetails);
|
||||
}
|
||||
|
||||
?>
|
|
@ -250,4 +250,14 @@
|
|||
$link = $array['link'];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* function use to register function that will be
|
||||
* called while deleting a video
|
||||
*/
|
||||
function register_action_remove_video($func)
|
||||
{
|
||||
global $cbvid;
|
||||
$cbvid->video_delete_functions[] = $func;
|
||||
}
|
||||
?>
|
|
@ -14,5 +14,4 @@ register_action('date_picker','date_picker');
|
|||
//Adding header
|
||||
$file = PLUG_DIR.'/date_picker/header.html';
|
||||
$Cbucket->add_header(array('uploadactive'=>$file ,'signupactive'=>$file));
|
||||
|
||||
?>
|
|
@ -42,7 +42,7 @@ var imageurl = '{$imageurl}';
|
|||
|
||||
|
||||
<!-- Including Headers -->
|
||||
{foreach from=$Cbucket->header_files key=file item=type}
|
||||
{foreach from=$Cbucket->header_files key=type item=file}
|
||||
{if $curActive == $type || $type=='global' }
|
||||
{include file="$file"}
|
||||
{/if}
|
||||
|
|
|
@ -17,13 +17,6 @@ subtitle('videos');
|
|||
|
||||
$myquery->getVideoList(array('limit'=>'nolimit','featured'=>'yes','order'=>'date_added DESC'));
|
||||
|
||||
//Getting List Of Categories
|
||||
$sql = "SELECT * FROM category ORDER BY category_name";
|
||||
$data = $db->Execute($sql);
|
||||
$total_data = $data->recordcount() + 0;
|
||||
$category = $data->getrows();
|
||||
Assign('category',$category);
|
||||
|
||||
//Listing Videos
|
||||
$limit = VLISTPP;
|
||||
Assign('limit',$limit);
|
||||
|
@ -68,13 +61,11 @@ $myquery->getVideoList(array('limit'=>'nolimit','featured'=>'yes','order'=>'date
|
|||
//$sql = "SELECT * FROM video WHERE $cat_query AND $query_param $orderby $query_limit";
|
||||
//$sql_p = "SELECT * FROM video WHERE $cat_query AND $query_param $orderby";
|
||||
$sql = $myquery->getVideoList(array(
|
||||
'category'=>$cat_id,
|
||||
'feature'=>$featured,
|
||||
'order'=>$orderby,
|
||||
'limit'=>$query_limit
|
||||
),true,'query');
|
||||
$sql_p = $myquery->getVideoList(array(
|
||||
'category'=>$cat_id,
|
||||
'feature'=>$featured,
|
||||
'order'=>$orderby,
|
||||
'limit'=>'nolimit'
|
||||
|
|
Loading…
Add table
Reference in a new issue