diff --git a/upload/.htaccess b/upload/.htaccess
new file mode 100644
index 00000000..c8abead3
--- /dev/null
+++ b/upload/.htaccess
@@ -0,0 +1,112 @@
+#
"; + print_r($array); + echo ""; +} + +$start_index = $_GET['start_index'] ? $_GET['start_index'] : 0; +$loop_size = $_GET['loop_size']; +$loop_size = $loop_size ? $loop_size : 5; +assign('loop_size',$loop_size); +$next_index = $start_index+$loop_size; +assign('next_index',$next_index); + +//Reindex Videos +if(isset($_GET['index_vids'])) +{ + $videos = get_videos(array("active"=>"yes","status"=>"Successful","limit"=>$start_index.",".$loop_size)); + $total_videos = get_videos(array("count_only"=>true,"active"=>"yes","status"=>"Successful")); + $percent = number_format(50 * $total_videos / 100); + $i = 0; + + assign('total',$total_videos); + assign('from',$start_index+1); + $to = $start_index+$loop_size; + if($to>$total_videos) + { + $to = $total_videos; + e($total_videos." videos have been reindexed successfully.","m"); + assign("stop_loop","yes"); + } + assign('to',$to); + + + + while($i < $total_videos) + { + if($videos[$i]['videoid']) + { + $params = array("video_id"=>$videos[$i]['videoid'],"video_comments"=>true,"favs_count"=>true,"playlist_count"=>true); + $indexes = $cbindex->count_index("vid",$params); + $fields = $cbindex->extract_fields("vid",$params); + $msg[] = $videos[$i]['video'].": Updating ".$videos[$i]['title'].""; + $cbindex->update_index("vid",array("fields"=>$fields,"values"=>$indexes,"video_id"=>$videos[$i]['videoid'])); + } + $i++; + } + e($start_index+1 ." - ".$to." videos have been reindexed successfully.","m"); + assign("index_msgs",$msg); + assign("indexing","yes"); + assign('mode','index_vids'); +} + +//Reindex Users +if(isset($_GET['index_usrs'])) { + $msg = array(); + $users = get_users(array("usr_status"=>"Ok","limit"=>$start_index.",".$loop_size)); + + $total_users = get_users(array("count_only"=>true,"usr_status"=>"Ok")); + $percent = $cbindex->percent(50,$total_users); + $i = 0; + + + assign('total',$total_users); + assign('from',$start_index+1); + $to = $start_index+$loop_size; + if($to>$total_users) + { + $to = $total_users; + e($total_users." users have been reindexed successfully.","m"); + assign("stop_loop","yes"); + } + assign('to',$to); + + + while($i < $total_users) + { + if($users[$i]['userid']) + { + $params = array("user"=>$users[$i]['userid'],"comment_added"=>true,"subscriptions_count"=>true,"subscribers_count"=>true, + "video_count"=>true,"groups_count"=>true,"comment_received"=>true,"collections_count"=>true,"photos_count"=>true); + $indexes = $cbindex->count_index("user",$params); + $fields = $cbindex->extract_fields("user",$params); + $msg[] = $users[$i]['userid'].": Updating ".$users[$i]['username'].""; + $cbindex->update_index("user",array("fields"=>$fields,"values"=>$indexes,"user"=>$users[$i]['userid'])); + + } + $i++; + + } + e($start_index+1 ." - ".$to." users have been reindexed successfully.","m"); + assign("index_msgs",$msg); + assign("indexing","yes"); + assign('mode','index_usrs'); + +} + +//Reindex Grous +if(isset($_GET['index_gps'])) { + $groups = get_groups(array("active"=>"yes")); + $total_groups = get_groups(array("count_only"=>true,"active"=>"yes")); + $percent = $cbindex->percent(50,$total_groups); + $i = 0; + + assign('total',$total_groups); + assign('from',$start_index+1); + $to = $start_index+$loop_size; + if($to>$total_groups) + { + $to = $total_groups; + e($total_groups." groups have been reindexed successfully.","m"); + assign("stop_loop","yes"); + } + assign('to',$to); + + while ($i < $total_groups) + { + if($groups[$i]['group_id']) + { + $params = array("group_id"=>$groups[$i]['group_id'],"group_videos"=>true,"group_topics"=>true,"group_members"=>true); + $indexes = $cbindex->count_index("group",$params); + $fields = $cbindex->extract_fields("group",$params); + $msg[] = $groups[$i]['group_id'].": Updating ".$groups[$i]['group_name'].""; + $cbindex->update_index("group",array("fields"=>$fields,"values"=>$indexes,"group_id"=>$groups[$i]['group_id'])); + } + $i++; + } + + e($start_index+1 ." - ".$to." groups have been reindexed successfully.","m"); + assign("index_msgs",$msg); + assign("indexing","yes"); + assign('mode','index_gps'); +} + +if(isset($_GET['index_photos'])) { + $photos = get_photos(array("active"=>"yes","limit"=>$start_index.",".$loop_size)); + $total_photos = get_photos(array("count_only"=>true,"active"=>"yes")); + $percent = $cbindex->percent(50,$total_photos); + $i = 0; + + assign('total',$total_photos); + assign('from',$start_index+1); + $to = $start_index+$loop_size; + if($to>$total_photos) + { + $to = $total_photos; + e($total_photos." photos have been reindexed successfully.","m"); + assign("stop_loop","yes"); + } + assign('to',$to); + + while ($i < $total_photos) + { + if($photos[$i]['photo_id']) + { + $params = array("photo_id"=>$photos[$i]['photo_id'],"favorite_count"=>true,"total_comments"=>true); + $indexes = $cbindex->count_index("photos",$params); + $fields = $cbindex->extract_fields("photos",$params); + $msg[] = $photos[$i]['photo_id'].": Updating ".$photos[$i]['photo_title'].""; + $cbindex->update_index("photos",array("fields"=>$fields,"values"=>$indexes,"photo_id"=>$photos[$i]['photo_id'])); + } + $i++; + } + + e($start_index+1 ." - ".$to." photos have been reindexed successfully.","m"); + assign("index_msgs",$msg); + assign("indexing","yes"); + assign('mode','index_photos'); +} + +if(isset($_GET['index_collections'])) { + $collections = get_collections(array("active"=>"yes","limit"=>$start_index.",".$loop_size)); + $total_collections = get_collections(array("count_only"=>true,"active"=>"yes")); + $percent = $cbindex->percent(50,$total_collections); + $i = 0; + + assign('total',$total_collections); + assign('from',$start_index+1); + $to = $start_index+$loop_size; + if($to>$total_collections) + { + $to = $total_collections; + e($total_collections." collections have been reindexed successfully.","m"); + assign("stop_loop","yes"); + } + assign('to',$to); + + while ($i < $total_collections) + { + if($collections[$i]['collection_id']) + { + $params = array("collection_id"=>$collections[$i]['collection_id'],"total_items"=>true,"total_comments"=>true); + $indexes = $cbindex->count_index("collections",$params); + $fields = $cbindex->extract_fields("collections",$params); + $msg[] = $collections[$i]['collection_id'].": Updating ".$collections[$i]['collection_name'].""; + $cbindex->update_index("collections",array("fields"=>$fields,"values"=>$indexes,"photo_id"=>$collections[$i]['collection_id'])); + } + $i++; + } + + e($start_index+1 ." - ".$to." collections have been reindexed successfully.","m"); + assign("index_msgs",$msg); + assign("indexing","yes"); + assign('mode','index_collections'); +} + +subtitle("Re-index Clipbucket"); +template_files('reindex_cb.html'); +display_it(); +?> \ No newline at end of file diff --git a/upload/admin_area/repair_vid_duration.php b/upload/admin_area/repair_vid_duration.php new file mode 100644 index 00000000..3bf0d527 --- /dev/null +++ b/upload/admin_area/repair_vid_duration.php @@ -0,0 +1,66 @@ +admin_login_check(); +$userquery->login_check('web_config_access'); + +$params = array('duration'=>'1','duration_op'=>'<=','status'=>'Successful'); +$videos = get_videos($params); +$fixed_array = array(); +if($_POST['fix_duration'] + || $_POST['mark_failed'] + || $_POST['mark_delete']) +{ + foreach($videos as $video) + { + $log = get_file_details($video['file_name']); + + if($log && $_POST['fix_duration']) + { + //$duration = $log['output_duration']; + //if(!$duration) + // $duration = $log['duration']; + + $duration = parse_duration(LOGS_DIR.'/'.$video['file_name'].'.log'); + + if(!$duration) + e("Can't do anything about \"".$video['title']."\""); + else + { + $db->update(tbl('video'),array('duration'),array($duration),"videoid='".$video['videoid']."'"); + $fixed_array[$video['file_name']] = 'yes'; + e("Succesfully updated duration of \"".$video['title']."\" to ".SetTime($duration),'m'); + } + } + + if(!$log && $_POST['mark_failed']) + { + $db->update(tbl("video"),array("status","failed_reason"), + array('Failed',"Unable to get video duration")," file_name='".$video['file_name']."'"); + e("\"".$video['title']."\" status has been changed to Failed","m"); + } + + if(!$log && $_POST['mark_delete']) + { + $db->update(tbl("video"),array("status","failed_reason"), + array('Failed',"Unable to get video duration")," file_name='".$video['file_name']."'"); + + $cbvideo->delete_video($video['videoid']); + } + } + $videos = get_videos($params); +} + +subtitle("Repair videos duration"); + +assign('videos',$videos); +assign('fixed_array',$fixed_array); +template_files('repair_vid_duration.html'); +display_it(); +?> \ No newline at end of file diff --git a/upload/admin_area/reports.php b/upload/admin_area/reports.php new file mode 100644 index 00000000..9b9b94b1 --- /dev/null +++ b/upload/admin_area/reports.php @@ -0,0 +1,40 @@ +admin_login_check(); +$userquery->login_check('web_config_access'); + + +$vid_dir = get_directory_size(VIDEOS_DIR); +$thumb_dir = get_directory_size(THUMBS_DIR); +$orig_dir = get_directory_size(ORIGINAL_DIR); + +$user_thumbs = get_directory_size(USER_THUMBS_DIR); +$user_bg = get_directory_size(USER_BG_DIR); + +$grp_thumbs = get_directory_size(GP_THUMB_DIR); +$cat_thumbs = get_directory_size(CAT_THUMB_DIR); + + +assign('vid_dir',$vid_dir); +assign('thumb_dir',$thumb_dir); +assign('orig_dir',$orig_dir); + +assign('user_thumbs',$user_thumbs); +assign('user_bg',$user_bg); + +assign('grp_thumbs',$grp_thumbs); +assign('cat_thumbs',$cat_thumbs); + +assign('db_size',formatfilesize(get_db_size())); + +template_files('reports.html'); +display_it(); +?> \ No newline at end of file diff --git a/upload/admin_area/statistics.php b/upload/admin_area/statistics.php new file mode 100644 index 00000000..0e917d37 --- /dev/null +++ b/upload/admin_area/statistics.php @@ -0,0 +1,17 @@ +admin_login_check(); +$userquery->login_check('web_config_access'); + + +template_files('under_development.html'); +display_it(); +?> \ No newline at end of file diff --git a/upload/admin_area/styles/cbv2/images/alert.png b/upload/admin_area/styles/cbv2/images/alert.png new file mode 100644 index 00000000..16aa3dd4 Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/alert.png differ diff --git a/upload/admin_area/styles/cbv2/images/arrow_return.png b/upload/admin_area/styles/cbv2/images/arrow_return.png new file mode 100644 index 00000000..4792abf1 Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/arrow_return.png differ diff --git a/upload/admin_area/styles/cbv2/images/arrow_return_invert.png b/upload/admin_area/styles/cbv2/images/arrow_return_invert.png new file mode 100644 index 00000000..390d0ef9 Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/arrow_return_invert.png differ diff --git a/upload/admin_area/styles/cbv2/images/bgs/gr_bg.png b/upload/admin_area/styles/cbv2/images/bgs/gr_bg.png new file mode 100644 index 00000000..8b5c20a1 Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/bgs/gr_bg.png differ diff --git a/upload/admin_area/styles/cbv2/images/bgs/left_menu_head.png b/upload/admin_area/styles/cbv2/images/bgs/left_menu_head.png new file mode 100644 index 00000000..50f9016f Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/bgs/left_menu_head.png differ diff --git a/upload/admin_area/styles/cbv2/images/bgs/login.png b/upload/admin_area/styles/cbv2/images/bgs/login.png new file mode 100644 index 00000000..13f414b6 Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/bgs/login.png differ diff --git a/upload/admin_area/styles/cbv2/images/bgs/pagination_bg.png b/upload/admin_area/styles/cbv2/images/bgs/pagination_bg.png new file mode 100644 index 00000000..e0ecd3c7 Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/bgs/pagination_bg.png differ diff --git a/upload/admin_area/styles/cbv2/images/bgs/round_bg.png b/upload/admin_area/styles/cbv2/images/bgs/round_bg.png new file mode 100644 index 00000000..1a2218a8 Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/bgs/round_bg.png differ diff --git a/upload/admin_area/styles/cbv2/images/bot.png b/upload/admin_area/styles/cbv2/images/bot.png new file mode 100644 index 00000000..81c30763 Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/bot.png differ diff --git a/upload/admin_area/styles/cbv2/images/botal.png b/upload/admin_area/styles/cbv2/images/botal.png new file mode 100644 index 00000000..15ce9aec Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/botal.png differ diff --git a/upload/admin_area/styles/cbv2/images/browsers.png b/upload/admin_area/styles/cbv2/images/browsers.png new file mode 100644 index 00000000..60fb2a8e Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/browsers.png differ diff --git a/upload/admin_area/styles/cbv2/images/button_bg.png b/upload/admin_area/styles/cbv2/images/button_bg.png new file mode 100644 index 00000000..72b29bcc Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/button_bg.png differ diff --git a/upload/admin_area/styles/cbv2/images/button_ok.png b/upload/admin_area/styles/cbv2/images/button_ok.png new file mode 100644 index 00000000..bb8d3dc4 Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/button_ok.png differ diff --git a/upload/admin_area/styles/cbv2/images/catgory_toggler.png b/upload/admin_area/styles/cbv2/images/catgory_toggler.png new file mode 100644 index 00000000..b9ecad8c Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/catgory_toggler.png differ diff --git a/upload/admin_area/styles/cbv2/images/collapse.png b/upload/admin_area/styles/cbv2/images/collapse.png new file mode 100644 index 00000000..3c289918 Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/collapse.png differ diff --git a/upload/admin_area/styles/cbv2/images/cross.png b/upload/admin_area/styles/cbv2/images/cross.png new file mode 100644 index 00000000..27bf3f2b Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/cross.png differ diff --git a/upload/admin_area/styles/cbv2/images/dot.gif b/upload/admin_area/styles/cbv2/images/dot.gif new file mode 100644 index 00000000..35d42e80 Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/dot.gif differ diff --git a/upload/admin_area/styles/cbv2/images/error.png b/upload/admin_area/styles/cbv2/images/error.png new file mode 100644 index 00000000..b28b24d2 Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/error.png differ diff --git a/upload/admin_area/styles/cbv2/images/gradients.png b/upload/admin_area/styles/cbv2/images/gradients.png new file mode 100644 index 00000000..0ca2406f Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/gradients.png differ diff --git a/upload/admin_area/styles/cbv2/images/headerafter.png b/upload/admin_area/styles/cbv2/images/headerafter.png new file mode 100644 index 00000000..065355fb Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/headerafter.png differ diff --git a/upload/admin_area/styles/cbv2/images/help.png b/upload/admin_area/styles/cbv2/images/help.png new file mode 100644 index 00000000..3efe67ed Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/help.png differ diff --git a/upload/admin_area/styles/cbv2/images/icons.png b/upload/admin_area/styles/cbv2/images/icons.png new file mode 100644 index 00000000..0446d29c Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/icons.png differ diff --git a/upload/admin_area/styles/cbv2/images/loading.gif b/upload/admin_area/styles/cbv2/images/loading.gif new file mode 100644 index 00000000..2059c9af Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/loading.gif differ diff --git a/upload/admin_area/styles/cbv2/images/login.png b/upload/admin_area/styles/cbv2/images/login.png new file mode 100644 index 00000000..c10e3abd Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/login.png differ diff --git a/upload/admin_area/styles/cbv2/images/nicEditIcons-latest.gif b/upload/admin_area/styles/cbv2/images/nicEditIcons-latest.gif new file mode 100644 index 00000000..d1add6f1 Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/nicEditIcons-latest.gif differ diff --git a/upload/admin_area/styles/cbv2/images/ok.png b/upload/admin_area/styles/cbv2/images/ok.png new file mode 100644 index 00000000..dec9a82e Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/ok.png differ diff --git a/upload/admin_area/styles/cbv2/images/play_icon.png b/upload/admin_area/styles/cbv2/images/play_icon.png new file mode 100644 index 00000000..95ed7d01 Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/play_icon.png differ diff --git a/upload/admin_area/styles/cbv2/images/slide_toggle.png b/upload/admin_area/styles/cbv2/images/slide_toggle.png new file mode 100644 index 00000000..10e7949b Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/slide_toggle.png differ diff --git a/upload/admin_area/styles/cbv2/images/slide_toggle_2.png b/upload/admin_area/styles/cbv2/images/slide_toggle_2.png new file mode 100644 index 00000000..4b61217d Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/slide_toggle_2.png differ diff --git a/upload/admin_area/styles/cbv2/images/slide_toggle_3.png b/upload/admin_area/styles/cbv2/images/slide_toggle_3.png new file mode 100644 index 00000000..ecab7086 Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/slide_toggle_3.png differ diff --git a/upload/admin_area/styles/cbv2/images/tick.png b/upload/admin_area/styles/cbv2/images/tick.png new file mode 100644 index 00000000..a8dcaa8a Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/tick.png differ diff --git a/upload/admin_area/styles/cbv2/images/widget_item_border.gif b/upload/admin_area/styles/cbv2/images/widget_item_border.gif new file mode 100644 index 00000000..c920f41a Binary files /dev/null and b/upload/admin_area/styles/cbv2/images/widget_item_border.gif differ diff --git a/upload/admin_area/styles/cbv2/layout/_permission.html b/upload/admin_area/styles/cbv2/layout/_permission.html new file mode 100644 index 00000000..f42f0a6d --- /dev/null +++ b/upload/admin_area/styles/cbv2/layout/_permission.html @@ -0,0 +1,63 @@ +{assign var='types' value=$userquery->get_level_types()} +
+ | {$types[t].user_permission_type_name} | ++ |
{$perm.permission_id} | +{$perm.permission_name} | + +{$perm.permission_code} | +{$perm.permission_desc} | +Delete | + +
No Permission Found | ||||
No Permission Found |
Add New Group | ++ | + |
+ | Required Member Details | ++ |
ID |
+ PlacementName |
+ PlacementCode |
+ TotalAds |
+ Action |
+
{$ads_placements[a_list].placement_id} |
+ {$ads_placements[a_list].placement_name} |
+ {literal}{AD place={/literal}{$ads_placements[a_list].placement}{literal}}{/literal} |
+ {$ads_placements[a_list].total_ads} |
+ {if $ads_placements[a_list].disable == no}Remove{else}Default Placement{/if} |
+
+ | Eid Advertisement | ++ |
+ |
+ | Add Advertisement | ++ |
+ |
+
+
|
+
CID | +UID | +Username | +Comment | +Date | +Votes | ++ |
{$comment.comment_id} | +{$comment.userid} | +{if $comment.anonym_name}{$comment.anonym_name}{else}{$comment.username}{/if} | +{if $comment.anonym_email}{$comment.anonym_email}{else}{$comment.email}{/if} | +{$comment.comment} |
+ {$comment.date_added|date_format} | +{$comment.vote} | +Delete | +
Editing {$data.title} | ++ | + |