diff --git a/upload/admin_area/flagged_videos.php b/upload/admin_area/flagged_videos.php index 99fa3775..5850a627 100644 --- a/upload/admin_area/flagged_videos.php +++ b/upload/admin_area/flagged_videos.php @@ -42,13 +42,13 @@ if(isset($_GET['deactivate'])){ } //Using Multple Action -if(isset($_POST['activate_selected'])){ +if($_POST['mode']=='activate_selected'){ for($id=0;$id<=RESULTS;$id++){ $cbvid->action('activate',$_POST['check_video'][$id]); } e("Selected Videos Have Been Activated","m"); } -if(isset($_POST['deactivate_selected'])){ +if($_POST['mode']=='deactivate_selected'){ for($id=0;$id<=RESULTS;$id++){ $cbvid->action('deactivate',$_POST['check_video'][$id]); } @@ -64,7 +64,7 @@ if(isset($_REQUEST['delete_flags'])) } //Deleting Multiple Videos -if(isset($_POST['delete_flags'])) +if($_POST['mode']=='delete_flags') { for($id=0;$id<=RESULTS;$id++) { diff --git a/upload/admin_area/styles/cbv3/layout/flagged_videos.html b/upload/admin_area/styles/cbv3/layout/flagged_videos.html index 36f1da63..758014df 100644 --- a/upload/admin_area/styles/cbv3/layout/flagged_videos.html +++ b/upload/admin_area/styles/cbv3/layout/flagged_videos.html @@ -1,94 +1,145 @@ {if $mode=='view'} -Flagged Videos Manager - -
- - - - - - -
- - - - - - -
+

Flagged Videos Manager

+
- - - - - - - -
- VID
Details
 
- - - - - - -{assign var = bgcolor value = ""} -{section name=list loop=$videos} - - - - - - - {if $bgcolor == ""} - {assign var = bgcolor value = "#EEEEEE"} - {else} - {assign var = bgcolor value = ""} - {/if} - -{/section} -
{$videos[list].videoid} - - {$videos[list].title} - — - - Active:{$videos[list].active} • - Status:{$videos[list].status} • - Flags:{$videos[list].total_flags} - - -
-
 
+ + + + + + + + + + + + + + + + + + + + {foreach $videos as $video} + + + + + + + + + + + + {/foreach} + +
#ThumbVideoFlagsUploaderStatusDate
{$video.videoid}{$video.title} + + {if $video.status=='Successful'} + ({$video.duration|SetTime}) + {/if} + + {if $video.broadcast!='public'} +    + {/if} + +
+ + {if $video.active=='yes'} + {lang code='Active'} + {else} + {lang code='Inactive'} + {/if} + + {if $video.featured=='yes'} + Featured + {/if} + + +
{$video.total_flags|number_format}{$video.username}{$video.status}{$video.date_added|niceTime} + + + + +
+
+ + - - - - - -
- - - - - - -
- - {include file="$style_dir/blocks/pagination.html" } @@ -97,40 +148,56 @@ {if $mode=='view_flags'} -Viewing {$video.title} flagsView videoEdit videoDelete FlagsDelete Video -
- -
- - - - - - -
 Flag Details 
+

{$video.title} flags

+
+ + - -{assign var = bgcolor value = ""} -{section name=list loop=$flags} - - - - - - {if $bgcolor == ""} - {assign var = bgcolor value = "#EEEEEE"} - {else} - {assign var = bgcolor value = ""} - {/if} +
{$smarty.section.list.iteration}Reported as "{$flags[list].flag_type|flag_type}" by {$flags[list].userid|get_username} {$flags[list].date_added|niceTime} 
+ + + + + + + + + + + + + {foreach $flags as $flag} + + + + + + + + + {/foreach} -{/section} -
#ReportReporterDate
{$flag.flag_id}{$flag.flag_type|flag_type}{$flag.userid|get_username}{$flag.date_added|nicetime}
- + + + + +
{/if} \ No newline at end of file diff --git a/upload/admin_area/styles/cbv3/layout/javascript.html b/upload/admin_area/styles/cbv3/layout/javascript.html index 0ebcaf0b..13bafdaa 100644 --- a/upload/admin_area/styles/cbv3/layout/javascript.html +++ b/upload/admin_area/styles/cbv3/layout/javascript.html @@ -171,7 +171,7 @@ $('.edit_lang').editable(baseurl+'/actions/update_phrase.php', { indicator : '', tooltip : 'Click to edit...', - type : 'textarea', + width :500} ); diff --git a/upload/includes/adodb/adodb.php b/upload/includes/adodb/adodb.php index db8b8bf7..5cc9a965 100644 --- a/upload/includes/adodb/adodb.php +++ b/upload/includes/adodb/adodb.php @@ -1,7 +1,7 @@ debug = true; - @$db->Connect($server, $user, $password, $database); +$db = ADONewConnection($dbdriver); # eg 'mysql' or 'postgres' +$db->debug = true; +@$db->Connect($server, $user, $password, $database); ?> \ No newline at end of file diff --git a/upload/includes/classes/actions.class.php b/upload/includes/classes/actions.class.php index 87a97b94..afe15830 100644 --- a/upload/includes/classes/actions.class.php +++ b/upload/includes/classes/actions.class.php @@ -366,10 +366,16 @@ class cbactions { global $db; $type = $this->type; - $results = $db->select(tbl($this->flag_tbl.",".$this->type_tbl),"*, - count(*) AS total_flags",tbl($this->flag_tbl).".id = ".tbl($this->type_tbl).".".$this->type_id_field." - AND ".tbl($this->flag_tbl).".type='".$this->type."' GROUP BY ".tbl($this->flag_tbl).".id ,".tbl($this->flag_tbl).".type ",$limit); - if($db->num_rows>0) + $results = $db->select(tbl($this->flag_tbl).' LEFT JOIN '.tbl($this->type_tbl).' ON ' + .tbl($this->type_tbl.'.' + .$this->type_id_field.'=').tbl('flags.id') + .' LEFT JOIN '.tbl('users').' ON ' + .tbl($this->type_tbl.'.userid').' = '.tbl('users.userid'),"*, + count(*) AS total_flags",tbl($this->flag_tbl).".id = ".tbl($this->type_tbl).".".$this->type_id_field." + AND ".tbl($this->flag_tbl).".type='".$this->type."' GROUP BY ".tbl($this->flag_tbl).".id ,".tbl($this->flag_tbl).".type ",$limit); + + + if($db->num_rows>0) return $results; else return false; diff --git a/upload/includes/classes/user.class.php b/upload/includes/classes/user.class.php index 4f1b82dc..140f1811 100644 --- a/upload/includes/classes/user.class.php +++ b/upload/includes/classes/user.class.php @@ -588,7 +588,9 @@ class userquery extends CBCategory{ $result = $db->count(tbl($this->dbtbl['users']),"userid"," userid='".$id."' "); else $result = $db->count(tbl($this->dbtbl['users']),"userid"," username='".$id."' "); - if($result>0) + + + if($result>0) { $this->user_exist = 'yes'; }else{ diff --git a/upload/includes/dbconnect.php b/upload/includes/dbconnect.php index cb5dec5e..9074c764 100644 --- a/upload/includes/dbconnect.php +++ b/upload/includes/dbconnect.php @@ -25,6 +25,8 @@ $db->charpage = 'cp_utf8'; $db->charset = 'utf8'; + $db->SetFetchMode(ADODB_FETCH_ASSOC); + if(!$db->Connect($DBHOST, $DBUSER, $DBPASS, $DBNAME)) { exit($db->ErrorMsg()); diff --git a/upload/includes/functions.php b/upload/includes/functions.php index 0c3447a2..8427bcd1 100644 --- a/upload/includes/functions.php +++ b/upload/includes/functions.php @@ -794,9 +794,10 @@ function dbcount($tbl, $fields = '*', $cond = false) { $condition = " Where $cond "; $query = "Select Count($fields) From $tbl $condition"; $result = $db->Execute($query); + $db->total_queries++; $db->total_queries_sql[] = $query; - return $result->fields[0]; + return $result->_numOfRows; } /** diff --git a/upload/index.php b/upload/index.php index bebe7b5b..744a46eb 100644 --- a/upload/index.php +++ b/upload/index.php @@ -8,6 +8,7 @@ */ define('THIS_PAGE','index'); + require 'includes/config.inc.php'; $pages->page_redir(); diff --git a/upload/watch_video.php b/upload/watch_video.php index b0a308b5..560fc92b 100644 --- a/upload/watch_video.php +++ b/upload/watch_video.php @@ -63,7 +63,7 @@ if(video_playable($vdo)) } //Calling Functions When Video Is going to play call_watch_video_function($vdo); - + subtitle($vdo['title']); }else