From fcd28e49b8d4d1480f46c12a210a17465f585f0a Mon Sep 17 00:00:00 2001 From: Arslan Hassan Date: Thu, 5 Nov 2009 21:50:39 +0000 Subject: [PATCH] ADDED : Editor's PICK plugins UPDATE : Index Page --- upload/admin_area/editor_pick.php | 40 +- upload/admin_area/flagged_videos.php | 111 +---- .../styles/cbadmin/layout/editor_pick.html | 46 ++ .../styles/cbadmin/layout/video_manager.html | 4 +- .../clipbucketblue/layout/editor_pick.html | 7 - .../clipbucketblue/layout/view_video.html | 1 - upload/admin_area/video_manager.php | 18 +- upload/includes/classes/actions.class.php | 33 ++ upload/includes/classes/stats.class.php | 439 ------------------ upload/includes/classes/user.class.php | 14 +- upload/includes/classes/video.class.php | 33 +- upload/includes/defined_links.php | 1 + upload/includes/functions.php | 26 ++ upload/index.php | 27 +- upload/plugins/cb_bbcodes/cb_bbcode.php | 2 +- .../editors_pick}/editors_pick_player.php | 23 +- .../editors_pick}/editors_pick_player.swf | Bin upload/plugins/editors_pick/editors_picks.php | 206 ++++++++ .../editors_pick/install_editors_picks.php | 27 ++ .../editors_pick/uninstall_editors_picks.php | 12 + upload/styles/cbv2/layout/blocks/video.html | 33 +- upload/styles/cbv2/layout/header.html | 2 +- upload/styles/cbv2/layout/index.html | 108 ++++- upload/styles/cbv2/theme/blocks.css | 2 +- upload/styles/cbv2/theme/body.css | 16 +- 25 files changed, 614 insertions(+), 617 deletions(-) create mode 100644 upload/admin_area/styles/cbadmin/layout/editor_pick.html rename upload/{modules => plugins/editors_pick}/editors_pick_player.php (52%) rename upload/{modules => plugins/editors_pick}/editors_pick_player.swf (100%) create mode 100644 upload/plugins/editors_pick/editors_picks.php create mode 100644 upload/plugins/editors_pick/install_editors_picks.php create mode 100644 upload/plugins/editors_pick/uninstall_editors_picks.php diff --git a/upload/admin_area/editor_pick.php b/upload/admin_area/editor_pick.php index f9bd41be..90f3ae76 100644 --- a/upload/admin_area/editor_pick.php +++ b/upload/admin_area/editor_pick.php @@ -12,41 +12,27 @@ $userquery->admin_login_check(); $pages->page_redir(); //Move Video Up -if(isset($_GET['up'])){ - $id = mysql_clean($_GET['up']); - $msg = $myquery->MovePickUp($id); +if(isset($_GET['move_up'])){ + $id = mysql_clean($_GET['move_up']); + move_pick_up($id); } //Move Down Up -if(isset($_GET['down'])){ - $id = mysql_clean($_GET['down']); - $msg = $myquery->MovePickDown($id); +if(isset($_GET['move_down'])){ + $id = mysql_clean($_GET['move_down']); + move_pick_down($id); } -//Removing From Editor's List +//Removing if(isset($_GET['remove'])){ $id = mysql_clean($_GET['remove']); - $msg = $myquery->DeleteEditorPick($id); + remove_vid_editors_pick($id); } -//Geting List Of Videos From Editor PIcks table -$query = "SELECT * FROM editors_picks ORDER BY sort ASC"; -$data = $db->Execute($query); -$videos = $data->getrows(); -$total_videos = $data->recordcount()+0; - for($id=0;$id<=$total_videos;$id++){ - $details = @$myquery->GetVideDetails($videos[$id]['videokey']); - $videos[$id]['title'] = $details['title']; - $videos[$id]['views'] = $details['views']; - $videos[$id]['rating'] = pullRating($details['views'],true,false,true,'novote'); - } -Assign('total_videos',$total_videos); -Assign('videos',$videos); +assign('videos',get_ep_videos()); +assign('max',get_highest_sort_number()); +assign('min',get_lowest_sort_number()); -Assign('msg', @$msg); -Template('header.html'); -Template('leftmenu.html'); -Template('message.html'); -Template('editor_pick.html'); -Template('footer.html'); +template_files('editor_pick.html'); +display_it(); ?> \ No newline at end of file diff --git a/upload/admin_area/flagged_videos.php b/upload/admin_area/flagged_videos.php index ffac6cfd..8a7ad488 100644 --- a/upload/admin_area/flagged_videos.php +++ b/upload/admin_area/flagged_videos.php @@ -8,106 +8,21 @@ */ require_once '../includes/admin_config.php'; -$userquery->admin_login_check(); -$pages->page_redir(); +$userquery->login_check('video_moderation'); -//Function Used To Remove Flag +//Getting Video List +$page = mysql_clean($_GET['page']); +$get_limit = create_query_limit($page,RESULTS); +$videos = $cbvid->action->get_flagged_objects($get_limit); +Assign('videos', $videos); -if(isset($_GET['remove_flags'])){ - $video = mysql_clean($_GET['remove_flags']); - if($myquery->VideoExists($video)){ - $msg[] = $myquery->DeleteFlag($video); - }else{ - $msg[] = $LANG['class_vdo_del_err']; - } -} +//Collecting Data for Pagination +$total_rows = $cbvid->action->count_flagged_objects(); +$total_pages = count_pages($total_rows,VLISTPP); -//Activate / Deactivate - -if(isset($_GET['activate'])){ - $video = mysql_clean($_GET['activate']); - if($myquery->VideoExists($video)){ - $msg[] = $myquery->ActivateVideo($video); - }else{ - $msg[] = $LANG['class_vdo_del_err']; - } -} -if(isset($_GET['deactivate'])){ - $video = mysql_clean($_GET['deactivate']); - if($myquery->DeActivateVideo($video)){ - $msg[] = $myquery->DeActivateVideo($video); - }else{ - $msg[] = $LANG['class_vdo_del_err']; - } -} - -//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']; - } -} -//Getting List From Flaggeed Videos - - $limit = 15; - Assign('limit',$limit); - $page = mysql_clean(@$_GET['page']); - Assign('limit',$limit); - if(empty($page) || $page == 0){ - $page = 1; - } - $from = $page-1; - $from = $from*$limit; +//Pagination +$pages->paginate($total_pages,$page); - $query_limit = "limit $from,$limit"; - - $query = "SELECT videoid, count(*) AS flags FROM flagged_videos GROUP BY videoid ORDER BY flags DESC $query_limit"; - $sql_p = "SELECT videoid, count(*) AS flags FROM flagged_videos GROUP BY videoid ORDER BY flags DESC "; - $data = $db->Execute($query); - $videos = $data->getrows(); - $total_videos = $data->recordcount()+0; - - for($id=0;$id<$total_videos;$id++){ - $vdo_data = $myquery->GetVideoDetails($videos[$id]['videoid']); - $title = $vdo_data['title']; - $videokey = $vdo_data['videokey']; - $active = $vdo_data['active']; - $username = $vdo_data['username']; - $type = $vdo_data['broadcast']; - $videos[$id]['title'] = $title; - $videos[$id]['videokey'] = $videokey; - $videos[$id]['active'] = $active; - $videos[$id]['username'] = $username; - $videos[$id]['broadcast'] = $type; - $$vdo_data[$id] = $vdo_data; - } - - Assign('videos',$videos); - -//Pagination - - $query = mysql_query($sql_p); - Assign('grand_total',mysql_num_rows($query)); - $total_rows = mysql_num_rows($query); - $page_id=1; - $id = 1; - //$all_pages[0]['page'] = $page_id; - $records = $total_rows/$limit; - $pages = round($records+0.49,0); - - Assign('pages',$pages+1); - Assign('cur_page',$page); - Assign('nextpage',$page+1); - Assign('prepage',$page-1); - Assign('total_pages',$page_id); - -Assign('msg', @$msg); -Template('header.html'); -Template('leftmenu.html'); -Template('message.html'); -Template('flagged_videos.html'); -Template('footer.html'); +template_files('video_manager.php'); +display_it(); ?> \ No newline at end of file diff --git a/upload/admin_area/styles/cbadmin/layout/editor_pick.html b/upload/admin_area/styles/cbadmin/layout/editor_pick.html new file mode 100644 index 00000000..642861f9 --- /dev/null +++ b/upload/admin_area/styles/cbadmin/layout/editor_pick.html @@ -0,0 +1,46 @@ +Editor's Pick + + + + + + + + + +
+ NumSort
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].sort}{if $videos[list].sort > $min}Up{/if} – {if $videos[list].sort < $max}Down{/if} + + {$videos[list].title} + Remove from editor's pick— + + Featured:{$videos[list].featured} • + Active:{$videos[list].active} • + Status:{$videos[list].status} + + +
+
 
+ + + diff --git a/upload/admin_area/styles/cbadmin/layout/video_manager.html b/upload/admin_area/styles/cbadmin/layout/video_manager.html index b02834bc..75043ce7 100644 --- a/upload/admin_area/styles/cbadmin/layout/video_manager.html +++ b/upload/admin_area/styles/cbadmin/layout/video_manager.html @@ -89,9 +89,11 @@ {if $videos[list].active == yes} | Deactivate {else} | Activate {/if} | - Add To Editor's Pick | File conversion details | Delete + {foreach from=$cbvid->video_manager_links item=links} + {$cbvid->video_manager_link($links,$videos[list])} + {/foreach}   diff --git a/upload/admin_area/styles/clipbucketblue/layout/editor_pick.html b/upload/admin_area/styles/clipbucketblue/layout/editor_pick.html index b36f4379..d4c83fa3 100644 --- a/upload/admin_area/styles/clipbucketblue/layout/editor_pick.html +++ b/upload/admin_area/styles/clipbucketblue/layout/editor_pick.html @@ -1,12 +1,5 @@
Editor's Pick
- - - - - - -
TitleDate AddedAction
{assign var = bgcolor value = ""} diff --git a/upload/admin_area/styles/clipbucketblue/layout/view_video.html b/upload/admin_area/styles/clipbucketblue/layout/view_video.html index c4a2b106..cdf7ea4d 100644 --- a/upload/admin_area/styles/clipbucketblue/layout/view_video.html +++ b/upload/admin_area/styles/clipbucketblue/layout/view_video.html @@ -1,4 +1,3 @@ -
{$data.title}
{assign var='requiredFields' value=$Upload->loadRequiredFields($data)} {assign var='optionFields' value=$Upload->loadOptionFields($data)} diff --git a/upload/admin_area/video_manager.php b/upload/admin_area/video_manager.php index dc72bf9a..318622c2 100644 --- a/upload/admin_area/video_manager.php +++ b/upload/admin_area/video_manager.php @@ -8,7 +8,7 @@ */ require_once '../includes/admin_config.php'; -$userquery->admin_login_check(); +$userquery->login_check('video_moderation'); $pages->page_redir(); //Feature / UnFeature Video @@ -35,18 +35,6 @@ if(isset($_POST['make_unfeatured_selected'])){ e("Selected videos have been removed from featured list",m); } - - -//Add To Editor's Pick -if(isset($_GET['editor_pick'])){ - $video = mysql_clean($_GET['editor_pick']); - if($myquery->VideoExists($video)){ - $msg[] = $myquery->AddToEditorPick($video); - }else{ - $msg[] = $LANG['class_vdo_del_err']; - } -} - //Activate / Deactivate if(isset($_GET['activate'])){ @@ -89,6 +77,10 @@ if(isset($_POST['delete_selected'])) $eh->flush(); e(lang("vdo_multi_del_erro"),m); } + + +//Calling Video Manager Functions +call_functions($cbvid->video_manager_funcs); //Jump To The page if(isset($_POST['display_page'])){ diff --git a/upload/includes/classes/actions.class.php b/upload/includes/classes/actions.class.php index 4f6d8d29..7d13c752 100644 --- a/upload/includes/classes/actions.class.php +++ b/upload/includes/classes/actions.class.php @@ -277,6 +277,39 @@ class cbactions }else e(sprintf(lang('unknown_favorite'),$this->name)); } + + + /** + * Function used to get object flags + */ + function get_flagged_objects($limit=NULL) + { + global $db; + $type = $this->type; + $results = $db->select($this->flag_tbl.",".$this->type_tbl,"*, + count(*) AS total_flags",$this->flag_tbl.".id = ".$this->type_tbl.".".$this->type_id_field." + AND type='".$this->type."' GROUP BY ".$this->flag_tbl.".id ,".$this->flag_tbl.".type ",$limit); + if($db->num_rows>0) + return $results; + else + return false; + } + + + /** + * Function used to count object flags + */ + function count_flagged_objects() + { + global $db; + $type = $this->type; + $results = $db->select($this->flag_tbl.",".$this->type_tbl,"id",$this->flag_tbl.".id = ".$this->type_tbl.".".$this->type_id_field." + AND type='".$this->type."' GROUP BY ".$this->flag_tbl.".id ,".$this->flag_tbl.".type "); + if($db->num_rows>0) + return count($results); + else + return false; + } } ?> \ No newline at end of file diff --git a/upload/includes/classes/stats.class.php b/upload/includes/classes/stats.class.php index 06873243..ba0730f9 100644 --- a/upload/includes/classes/stats.class.php +++ b/upload/includes/classes/stats.class.php @@ -15,445 +15,6 @@ class Stats { -//This Variable will be used to store all stats of the websites -var $stats; - - function Stats($refresh=false){ - $query = mysql_query("SELECT * FROM stats"); - while($data = mysql_fetch_array($query)){ - $details[$data['name']] = $data['value']; - } - $this->stats = $details; - if($refresh=true){ - $this->Refresh(); - } - } - - //FUNCTION USED TO REFRESH STATS DATA - function Refresh(){ - $today = date("Y-m-d"); - $query = mysql_query("SELECT * FROM users WHERE doj like '%$today%'"); - $array['today_signups'] = mysql_num_rows($query); - $query = mysql_query("SELECT * FROM users WHERE last_logged like '%$today%'"); - $array['todays_logins'] = mysql_num_rows($query); - $query = mysql_query("SELECT * FROM video WHERE date_added like '%$today%'"); - $array['videos_added_today'] = mysql_num_rows($query); - - $month = date("Y-m"); - //if(date("Y-m",strtotime($this->stats['last_update'])) != $month ){ - $query = mysql_query("SELECT * FROM users WHERE last_logged like '%$month%'"); - $array['months_logins'] = mysql_num_rows($query); - $query = mysql_query("SELECT * FROM video WHERE date_added like '%$month%'"); - $array['videos_added_this_month'] = mysql_num_rows($query); - //} - - $query = mysql_query("SELECT videoid, count(*) AS flags FROM flagged_videos GROUP BY videoid ORDER BY flags DESC "); - $array['total_flagged_videos'] = mysql_num_rows($query); - - mysql_query("UPDATE stats SET value='".$array['today_signups']."' WHERE name='today_signups'"); - mysql_query("UPDATE stats SET value='".$array['todays_logins']."' WHERE name='todays_logins'"); - mysql_query("UPDATE stats SET value='".$array['videos_added_today']."' WHERE name='videos_added_today'"); - mysql_query("UPDATE stats SET value='".$array['months_logins']."' WHERE name='months_logins'"); - mysql_query("UPDATE stats SET value='".$array['videos_added_this_month']."' WHERE name='videos_added_this_month'"); - mysql_query("UPDATE stats SET value='".$array['total_flagged_videos']."' WHERE name='total_flagged_videos'"); - mysql_query("UPDATE stats SET value=now() WHERE name='last_update'"); - $this->UpdateGroupRecord(); - $query = mysql_query("SELECT * FROM stats"); - while($data = mysql_fetch_array($query)){ - $details[$data['name']] = $data['value']; - } - - if($query) - mysql_free_result($query); - $this->stats = $details; - } - - //FUNCTION USED TO UPDATE USER RECORD - function UpdateUserRecord($type=1){ - $today = date("Y-m-d"); - $month = date("Y-m"); - switch($type){ - //TYPE 1 , INCREASE TOTAL USERS - case 1; - $update = $this->stats['total_users'] + 1; - break; - //TYPE 2 , Decrease TOTAL USERS - case 2; - $update = $this->stats['total_users'] - 1; - break; - //Type 3, Update Users Signup Today - case 3; - $query = mysql_query("SELECT * FROM users WHERE doj like '%$today%'"); - $array['today_logins'] = mysql_num_rows($query); - mysql_query("UPDATE stats SET value='".$array['today_logins']."' WHERE name='today_signups'"); - break; - //Type 4, Update Users Login Today - case 4; - $query = mysql_query("SELECT * FROM users WHERE last_logged like '%$today%'"); - $array['today_logins'] = mysql_num_rows($query); - mysql_query("UPDATE stats SET value='".$array['today_logins']."' WHERE name='todays_logins'"); - break; - //Type 5, Update Users Login This Month - case 5; - $query = mysql_query("SELECT * FROM users WHERE last_logged like '%$month%'"); - $array['months_logins'] = mysql_num_rows($query); - mysql_query("UPDATE stats SET value='".$array['months_logins']."' WHERE name='months_logins'"); - break; - //Type 6, Update Number of total user comments - case 6; - $update = $this->stats['total_user_comments'] + 1; - if(!mysql_query("UPDATE stats SET value = '".$update."' WHERE name='total_user_comments'"))die(mysql_error()); - break; - } - - if($type<=2){ - mysql_query("UPDATE stats SET value = '".$update."' WHERE name='total_users'"); - } - - if(@$query) - mysql_free_result($query); - } - - - //FUNCTION USED TO UPDATE VIDEO RECORD - function UpdateVideoRecord($type=1){ - switch($type){ - //Case1: Increase 1 Video - case 1; - $update = $this->stats['total_videos'] + 1; - break; - case 2; - $update = $this->stats['total_videos'] - 1; - break; - case 3; - $update = $this->stats['total_video_comments'] + 1; - break; - case 4; - $update = $this->stats['total_video_comments'] - 1; - break; - case 5; - $update = $this->stats['total_watched_videos'] + 1; - mysql_query("UPDATE stats SET value = '".$update."' WHERE name='total_watched_videos'"); - break; - case 6; - $update = $this->stats['total_added_favorites'] + 1; - break; - case 7; - $update = $this->stats['total_added_favorites'] - 1; - break; - case 8; - $update = $this->stats['total_success_videos'] + 1; - $update2 = $this->stats['total_videos_processing'] - 1; - mysql_query("UPDATE stats SET value = '".$update."' WHERE name='total_success_videos'"); - mysql_query("UPDATE stats SET value = '".$update2."' WHERE name='total_videos_processing'"); - break; - case 9; - $update = $this->stats['total_videos_processing'] + 1; - mysql_query("UPDATE stats SET value = '".$update."' WHERE name='total_videos_processing'"); - break; - case 10; - $update = $this->stats['total_failed_videos'] + 1; - $update2 = $this->stats['total_videos_processing'] - 1; - mysql_query("UPDATE stats SET value = '".$update."' WHERE name='total_failed_videos'"); - mysql_query("UPDATE stats SET value = '".$update2."' WHERE name='total_videos_processing'"); - break; - case 11; - $update = $this->stats['total_active_videos'] + 1; - mysql_query("UPDATE stats SET value = '".$update."' WHERE name='total_active_videos'"); - break; - case 12; - $update = $this->stats['total_active_videos'] - 1; - mysql_query("UPDATE stats SET value = '".$update."' WHERE name='total_active_videos'"); - break; - } - - if($type<=2){ - mysql_query("UPDATE stats SET value = '".$update."' WHERE name='total_videos'"); - } - if($type==4 || $type==3){ - mysql_query("UPDATE stats SET value = '".$update."' WHERE name='total_video_comments'"); - } - if($type==6 || $type==7){ - mysql_query("UPDATE stats SET value = '".$update."' WHERE name='total_added_favorites'"); - } - - if(@$query) - mysql_free_result($query); - - } - - //Update Group Record - function UpdateGroupRecord(){ - $details = $this->GetGroupStats(); - mysql_query("UPDATE stats SET value='".$details['total' ]."' WHERE name='total_groups'"); - mysql_query("UPDATE stats SET value='".$details['total_topics' ]."' WHERE name='total_topics'"); - mysql_query("UPDATE stats SET value='".$details['total_posts' ]."' WHERE name='total_posts'"); - mysql_query("UPDATE stats SET value='".$details['group_invitations' ]."' WHERE name='group_invitations'"); - mysql_query("UPDATE stats SET value='".$details['groups_added_today']."' WHERE name='groups_added_today'"); - mysql_query("UPDATE stats SET value='".$details['groups_added_month']."' WHERE name='groups_added_month'"); - mysql_query("UPDATE stats SET value='".$details['group_members' ]."' WHERE name='group_members'"); - } - - //FUNCTIONS USED TO GET USER STATSS - function GetUsersStats(){ - //Query of total users - $query = mysql_query("SELECT * FROM users"); - $array['total'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - //Query For Active Users Only - $query = mysql_query("SELECT * FROM users WHERE usr_status='Ok'"); - $array['active'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - //Query For Todays Signups - $today = date("Y-m-d"); - $query = mysql_query("SELECT * FROM users WHERE doj like '%$today%'"); - $array['today_singups'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - //Query for todays Logins - $query = mysql_query("SELECT * FROM users WHERE last_logged like '%$today%'"); - $array['today_logins'] = mysql_num_rows($query); - //Query for Active Users in This Month - $month = date("Y-m"); - $query = mysql_query("SELECT * FROM users WHERE last_logged like '%$month%'"); - $array['months_logins'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - //Query For counting comments on user profiles - $query = mysql_query("SELECT * FROM channel_comments"); - $array['total_comments'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - - - return $array; - } - - //FUNCTION USED TO GET VIDEO DETAILS - function GetVideoStats(){ - $today = date("Y-m-d"); - $month = date("Y-m"); - //Query User To Get Total Videos - $query = mysql_query("SELECT * FROM video"); - $array['total'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - //Query User To Get Total Active Videos - $query = mysql_query("SELECT * FROM video WHERE active='yes'"); - $array['total_active'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - //Query User To Get FlaggedVideos - - $query = mysql_query("SELECT videoid, count(*) AS flags FROM flagged_videos GROUP BY videoid ORDER BY flags DESC "); - $array['total_flags'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - //Videos Added Today - $query = mysql_query("SELECT * FROM video WHERE date_added like '%$today%'"); - $array['added_today'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - - $query = mysql_query("SELECT * FROM video WHERE date_added like '%$month%'"); - $array['added_this_month'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - - //Total Videos Watched - $query = mysql_query("SELECT views FROM video "); - $views = 0; - while($data = mysql_fetch_array($query)){ - @$views = $views + $data['views']; - } - $array['total_watched'] = $views; - //Used To Count Comment Of Videos - $query = mysql_query("SELECT * FROM video_comments"); - $array['total_comments'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - //Used To Count Number Videos in Favourites - $query = mysql_query("SELECT * FROM video_favourites"); - $array['total_favorites'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - //Get Total Processed Videos - $query = mysql_query("SELECT * FROM video WHERE status='Processing'"); - $array['total_videos_processing'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - //Get Total Successfull Videos - $query = mysql_query("SELECT * FROM video WHERE status='Successful'"); - $array['total_success_videos'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - //Get Total Failed Videos - $query = mysql_query("SELECT * FROM video WHERE status='Failed'"); - $array['total_failed_videos'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - return $array; - } - - - //Function Used Get Group Details - function GetGroupStats($type=false){ - $today = date("Y-m-d"); - $month = date("Y-m"); - if($type==FALSE){ - //Used To Get Total Number Of Groups - $query = mysql_query("SELECT * FROM groups"); - $array['total'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - //Used To Get Total Number Of Topics - $query = mysql_query("SELECT * FROM group_topics"); - $array['total_topics'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - //Used To Get Total Number Of Posts - $query = mysql_query("SELECT * FROM group_posts"); - $array['total_posts'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - //Used To Get Total Number Of Invitations - $query = mysql_query("SELECT * FROM group_invitations"); - $array['group_invitations'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - //Groups Added Today - $query = mysql_query("SELECT * FROM groups WHERE date_added like '%$today%'"); - $array['groups_added_today'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - //Groups Added This Month - $query = mysql_query("SELECT * FROM groups WHERE date_added like '%$month%'"); - $array['groups_added_month'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - //Total Members - $query = mysql_query("SELECT * FROM group_members"); - $array['group_members'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - }else{ - switch($type){ - case 1; - //Used To Get Total Number Of Groups - $query = mysql_query("SELECT * FROM groups"); - $array['total'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - break; - - case 2; - //Used To Get Total Number Of Topics - $query = mysql_query("SELECT * FROM group_topics"); - $array['total_topics'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - break; - - case 3; - //Used To Get Total Number Of Posts - $query = mysql_query("SELECT * FROM group_posts"); - $array['total_posts'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - break; - - case 4; - //Used To Get Total Number Of Invitations - $query = mysql_query("SELECT * FROM group_invitations"); - $array['group_invitations'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - break; - - case 5; - //Groups Added Today - $query = mysql_query("SELECT * FROM groups WHERE date_added like '%$today%'"); - $array['groups_added_today'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - break; - - case 6; - //Groups Added This Month - $query = mysql_query("SELECT * FROM groups WHERE date_added like '%$month%'"); - $array['groups_added_today'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - break; - - case 7; - //Total Members - $query = mysql_query("SELECT * FROM group_members"); - $array['group_members'] = mysql_num_rows($query); - if($query) - mysql_free_result($query); - break; - - } - } - - - return $array; - } - - - //Use To Get Database Stats - function ServerDetails(){ - global $db; - $status['mysql_ver'] = mysql_get_server_info(); - $result = mysql_query( "SHOW TABLE STATUS" ); - $dbsize = 0; - while( $row = mysql_fetch_array( $result ) ) { - $dbsize += $row[ "Data_length" ] + $row[ "Index_length" ]; - } - $status['db_size'] = formatfilesize($dbsize); - $status['disk_space'] = formatfilesize(disk_total_space(BASEDIR)); - $status['space_free'] = formatfilesize(disk_free_space(BASEDIR)); - $status['space_used'] = formatfilesize(disk_total_space(BASEDIR)-disk_free_space(BASEDIR)); - $status['php_ver'] = PHP_VERSION; - return $status ; - } - - //Function Force Update - //FUNCTION USED TO COUNT THE DETAIL FROMT THE TABLES - //1 by 1 - function __FORCEUPDATE__(){ - //Update User Stats - $user_details = $this->GetUsersStats(); - mysql_query("UPDATE stats SET value='".$user_details['total' ]."' WHERE name='total_users'"); - mysql_query("UPDATE stats SET value='".$user_details['active' ]."' WHERE name='total_active_users'"); - mysql_query("UPDATE stats SET value='".$user_details['today_singups' ]."' WHERE name='today_signups'"); - mysql_query("UPDATE stats SET value='".$user_details['today_logins' ]."' WHERE name='todays_logins'"); - mysql_query("UPDATE stats SET value='".$user_details['months_logins' ]."' WHERE name='months_logins'"); - mysql_query("UPDATE stats SET value='".$user_details['total_comments' ]."' WHERE name='total_user_comments'"); - - //Update Video Stats - $video_details = $this->GetVideoStats(); - mysql_query("UPDATE stats SET value='".$video_details['total' ]."' WHERE name='total_videos'"); - mysql_query("UPDATE stats SET value='".$video_details['total_active' ]."' WHERE name='total_active_videos'"); - mysql_query("UPDATE stats SET value='".$video_details['total_flags' ]."' WHERE name='total_flagged_videos'"); - mysql_query("UPDATE stats SET value='".$video_details['added_today' ]."' WHERE name='videos_added_today'"); - mysql_query("UPDATE stats SET value='".$video_details['added_this_month']."' WHERE name='videos_added_this_month'"); - mysql_query("UPDATE stats SET value='".$video_details['total_watched' ]."' WHERE name='total_watched_videos'"); - mysql_query("UPDATE stats SET value='".$video_details['total_comments' ]."' WHERE name='total_video_comments'"); - mysql_query("UPDATE stats SET value='".$video_details['total_favorites' ]."' WHERE name='total_added_favorites'"); - mysql_query("UPDATE stats SET value='".$video_details['total_videos_processing']."' WHERE name='total_videos_processing'"); - mysql_query("UPDATE stats SET value='".$video_details['total_success_videos']."' WHERE name='total_success_videos'"); - mysql_query("UPDATE stats SET value='".$video_details['total_failed_videos']."' WHERE name='total_failed_videos'"); - - } - - function UpdateDate(){ - mysql_query("UPDATE stats SET value=now() WHERE name='date_updated'"); - } - } ?> \ No newline at end of file diff --git a/upload/includes/classes/user.class.php b/upload/includes/classes/user.class.php index 62c92748..77012776 100644 --- a/upload/includes/classes/user.class.php +++ b/upload/includes/classes/user.class.php @@ -289,7 +289,7 @@ class userquery { global $db; $results = $db->select("users", "userid,email,level,usr_status,user_session_key,user_session_code", - "username='$username' OR userid='$username' AND password='$pass'"); + "(username='$username' OR userid='$username') AND password='$pass'"); if($db->num_rows > 0) { return $results[0]; @@ -2395,5 +2395,17 @@ class userquery { else return false; } + + /** + * function used to get user details with profile + */ + function get_user_details_with_profile($uid=NULL) + { + global $db; + if(!$uid) + $uid = userid(); + $result = $db->select($this->dbtbl['users'].",".$this->dbtbl['user_profile'],"*",$this->dbtbl['users'].".userid ='$uid' AND ".$this->dbtbl['users'].".userid = ".$this->dbtbl['user_profile'].".userid"); + return $result[0]; + } } ?> \ No newline at end of file diff --git a/upload/includes/classes/video.class.php b/upload/includes/classes/video.class.php index b03f1bae..4056824c 100644 --- a/upload/includes/classes/video.class.php +++ b/upload/includes/classes/video.class.php @@ -23,6 +23,10 @@ class CBvideo extends CBCategory var $email_template_vars = array(); var $dbtbl = array('video'=>'video'); + + var $video_manager_links = array(); + var $video_manager_funcs = array(); + /** * __Constructor of CBVideo */ @@ -103,7 +107,7 @@ class CBvideo extends CBCategory case "featured": case "f": { - $db->update("video",array('featured'),array('yes')," videoid='$vid' OR videokey = '$vid' "); + $db->update("video",array('featured','featured_date'),array('yes',now())," videoid='$vid' OR videokey = '$vid' "); e(lang("class_vdo_fr_msg"),m); } break; @@ -407,6 +411,15 @@ class CBvideo extends CBCategory $cond .= " ($tag_n_title) "; } + //FEATURED + if($params['featured']) + { + if($cond!='') + $cond .= ' AND '; + $featured .= " featured = 'yes' "; + } + + $result = $db->select('video','*',$cond,$limit,$order); @@ -584,7 +597,7 @@ class CBvideo extends CBCategory } - /** + /* * Function used to update video and set a thumb as default * @param VID * @param THUMB NUM @@ -618,6 +631,22 @@ class CBvideo extends CBCategory return false; } + /** + * Function used to display video manger link + */ + function video_manager_link($link,$vid) + { + if(function_exists($link) && !is_array($link)) + { + return $link($vid); + }else + { + if(!empty($link['title']) && !empty($link['link'])) + { + return ' | '.$link['title'].''; + } + } + } } ?> \ No newline at end of file diff --git a/upload/includes/defined_links.php b/upload/includes/defined_links.php index b20b5be3..e8917daf 100644 --- a/upload/includes/defined_links.php +++ b/upload/includes/defined_links.php @@ -11,6 +11,7 @@ $Cbucket->links = array 'login' =>array('signup.php','login'), 'logout' =>array('logout.php','logout'), 'videos' =>array('videos.php','videos'), +'my_account'=>array('myaccount.php','my_account'), ); ?> \ No newline at end of file diff --git a/upload/includes/functions.php b/upload/includes/functions.php index 7f15f101..5331a2ab 100644 --- a/upload/includes/functions.php +++ b/upload/includes/functions.php @@ -2494,4 +2494,30 @@ global $cbvideo; return $cbvideo->get_videos($param); } + + /** + * Function used to call functions + */ + function call_functions($in,$params=NULL) + { + if(is_array($in)) + { + foreach($in as $i) + { + if(function_exists($i)) + if(!$params) + $i(); + else + $i($params); + } + }else + { + if(function_exists($in)) + if(!$params) + $in(); + else + $in($params); + } + + } ?> \ No newline at end of file diff --git a/upload/index.php b/upload/index.php index 04d00076..c5801b16 100644 --- a/upload/index.php +++ b/upload/index.php @@ -10,12 +10,29 @@ define('THIS_PAGE','index'); require 'includes/config.inc.php'; $pages->page_redir(); -pr($userquery); +//Get Videos Beign Watched +$being_watched = array +('limit' => 6, + 'order' => 'last_viewed DESC', + ); -if(isset($_GET['cb_ver']) && $is_admin) -{ -$msg = "ClipBucket ".CB_VERSION.""; -} +assign('being_watched',$cbvid->get_videos($being_watched)); + +//GettinG list Of Featured Videos +$featured = array +('limit' => 4, + 'featured' => 'yes', + 'order' => ' featured_date DESC ', + ); +assign('featured_videos',$cbvid->get_videos($featured)); + + +//GettinG list Of recently added Videos +$recently_added = array +('limit' => 12, + 'order' => ' date_added DESC ', + ); +assign('recently_added',$cbvid->get_videos($recently_added)); //Displaying The Template diff --git a/upload/plugins/cb_bbcodes/cb_bbcode.php b/upload/plugins/cb_bbcodes/cb_bbcode.php index 6cbf37fd..34275330 100644 --- a/upload/plugins/cb_bbcodes/cb_bbcode.php +++ b/upload/plugins/cb_bbcodes/cb_bbcode.php @@ -44,7 +44,7 @@ register_action(array('bb_to_html'=>array('comment','description','pm_compose_bo register_anchor("",'before_compose_box'); register_anchor("",'before_reply_compose_box'); register_anchor("",'before_desc_compose_box'); -register_anchor("",'before_pm_compose_box'); +register_anchor("",'before_pm_compose_box'); //Adding JS Code $Cbucket->addJS(array('bbcode_js/ed.js'=>'global')); diff --git a/upload/modules/editors_pick_player.php b/upload/plugins/editors_pick/editors_pick_player.php similarity index 52% rename from upload/modules/editors_pick_player.php rename to upload/plugins/editors_pick/editors_pick_player.php index 7f7e2397..4dbd9785 100644 --- a/upload/modules/editors_pick_player.php +++ b/upload/plugins/editors_pick/editors_pick_player.php @@ -9,26 +9,21 @@ | @ License: Addon With ClipBucket | **************************************************************************************************** */ -include ("../includes/config.inc.php"); +include ("../../includes/config.inc.php"); echo""; echo"\n\t"; echo"\n\t"; - $query = mysql_query("SELECT * FROM editors_picks WHERE status = '1' ORDER BY sort ASC LIMIT 0,10 "); - while($data = mysql_fetch_array($query)){ - - $videos = $myquery->GetVideDetails($data['videokey']); - $filename = GetName($videos['flv']); - $image = BASEURL."/files/thumbs/$filename-big.jpg"; - $thumb = BASEURL."/files/thumbs/$filename-1.jpg"; - $flv = BASEURL."/files/videos/".$videos['flv']; - $title = $videos['title']; - if(!empty($title)){ - echo" $image\n\t\t"; - } - + $ep_videos = get_ep_videos(); + foreach($ep_videos as $video) + { + if(!empty($video['title'])) + { + echo" ".getthumb($video,'big')."\n\t\t"; + } } + echo "\n\t"; echo"\n"; echo""; diff --git a/upload/modules/editors_pick_player.swf b/upload/plugins/editors_pick/editors_pick_player.swf similarity index 100% rename from upload/modules/editors_pick_player.swf rename to upload/plugins/editors_pick/editors_pick_player.swf diff --git a/upload/plugins/editors_pick/editors_picks.php b/upload/plugins/editors_pick/editors_picks.php new file mode 100644 index 00000000..93bb4ddf --- /dev/null +++ b/upload/plugins/editors_pick/editors_picks.php @@ -0,0 +1,206 @@ +video_exists($vid)) + { + if(!is_video_in_editors_pick($vid)) + { + $sort = get_highest_sort_number() + 1 ; + $db->insert("cb_editors_picks",array("videoid","sort","date_added"),array($vid,$sort,now())); + e(lang("Video has been added to editor's pick"),"m"); + }else{ + e(lang("Video is already in editor's pick"),"e"); + } + }else + e(lang("video_exist_err")); + } + + /** + * Remove Video From Editor's Pick + */ + function remove_vid_editors_pick($vid) + { + global $db; + if(is_array($vid)) + $vid = $vid['videoid']; + if(is_video_in_editors_pick($vid)) + { + $db->delete('cb_editors_picks',array('videoid'),array($vid)); + e(lang("Video has been removed from editor's pick"),"m"); + } + } + + + /** + * Function used to check weather video already exisrts in editors pick or not + */ + function is_video_in_editors_pick($vid) + { + global $db; + $count = $db->count("cb_editors_picks","videoid"," videoid='$vid'"); + if($count>0) + return true; + else + return false; + } + + /** + * Function used to get highest sort number + */ + function get_highest_sort_number() + { + global $db; + $result = $db->select("cb_editors_picks","sort",NULL,NULL," sort DESC "); + return $result[0]['sort']; + } + + /** + * Function used to get highest sort number + */ + function get_lowest_sort_number() + { + global $db; + $result = $db->select("cb_editors_picks","sort",NULL,NULL," sort ASC "); + return $result[0]['sort']; + } + + /** + * Function used to display video manager link| + */ + function video_manager_ep_link($vid) + { + if(is_video_in_editors_pick($vid['videoid'])) + return ' | Remove From Editor\'s Pick'; + else + return ' | Add To Editor\'s Pick'; + } + + + /** + * Function used to get editor picks videos and details + */ + function get_ep_videos() + { + global $db; + $results = $db->select('cb_editors_picks,video',"*"," cb_editors_picks.videoid = video.videoid ORDER BY cb_editors_picks.sort ASC"); + return $results; + } + + /** + * Function used to move pic up + */ + function move_pick_up($id) + { + global $db; + $result = $db->select("cb_editors_picks","*"," pick_id='$id'"); + if($db->num_rows>0) + { + $result = $result[0]; + $sort = $result['sort']; + if($sort>get_lowest_sort_number()) + { + $less_result = $db->select("cb_editors_picks","*"," sort<$sort",1); + if($db->num_rows>0) + { + $less_result = $less_result[0]; + $new_sort = $less_result['sort']; + + $db->update('cb_editors_picks',array('sort'),$new_sort," pick_id='$id'"); + $db->update('cb_editors_picks',array('sort'),$sort," pick_id='".$less_result['pick_id']."'"); + } + } + } + } + + + /** + * Function used to move pic up + */ + function move_pick_down($id) + { + global $db; + $result = $db->select("cb_editors_picks","*"," pick_id='$id'"); + if($db->num_rows>0) + { + $result = $result[0]; + $sort = $result['sort']; + if($sortselect("cb_editors_picks","*"," sort>$sort",1); + if($db->num_rows>0) + { + $less_result = $less_result[0]; + $new_sort = $less_result['sort']; + + $db->update('cb_editors_picks',array('sort'),$new_sort," pick_id='$id'"); + $db->update('cb_editors_picks',array('sort'),$sort," pick_id='".$less_result['pick_id']."'"); + } + } + } + } + + /** + * Function used to display editors pick + */ + function show_editor_pick() + { + echo '
+ This content requires JavaScript and Macromedia Flash Player 7 or higher. Get Flash

+
+ '; + } + + +//Adding Editor's Pick Link +$cbvid->video_manager_links[] = 'video_manager_ep_link'; +//Calling Editor Picks Function +$cbvid->video_manager_funcs[] = 'editors_pick'; +//ADding Admin Menu +add_admin_menu('Videos','Editor\'s Pick','editor_pick.php'); +//Adding Anchor Function +register_anchor_function(array('show_editor_pick'=>'index_right_top')); +//Registering Delete Action +register_action_remove_video('remove_vid_editors_pick'); + + +} +?> \ No newline at end of file diff --git a/upload/plugins/editors_pick/install_editors_picks.php b/upload/plugins/editors_pick/install_editors_picks.php new file mode 100644 index 00000000..d63b5555 --- /dev/null +++ b/upload/plugins/editors_pick/install_editors_picks.php @@ -0,0 +1,27 @@ +Execute( + "CREATE TABLE IF NOT EXISTS `cb_editors_picks` ( + `pick_id` int(225) NOT NULL AUTO_INCREMENT, + `videoid` int(225) NOT NULL, + `sort` bigint(5) NOT NULL DEFAULT '1', + `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`pick_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;" + ); + + //inserting new announcment + $db->Execute("INSERT INTO cb_global_announcement (announcement) VALUES ('')"); +} + + +//This will first check if plugin is installed or not, if not this function will install the plugin details +install_editors_pick(); + +?> \ No newline at end of file diff --git a/upload/plugins/editors_pick/uninstall_editors_picks.php b/upload/plugins/editors_pick/uninstall_editors_picks.php new file mode 100644 index 00000000..67fededb --- /dev/null +++ b/upload/plugins/editors_pick/uninstall_editors_picks.php @@ -0,0 +1,12 @@ +Execute( + 'DROP TABLE `cb_editors_picks`' + ); + } + + un_install_editors_pick(); +?> \ No newline at end of file diff --git a/upload/styles/cbv2/layout/blocks/video.html b/upload/styles/cbv2/layout/blocks/video.html index b1427b20..746a94d3 100644 --- a/upload/styles/cbv2/layout/blocks/video.html +++ b/upload/styles/cbv2/layout/blocks/video.html @@ -1,3 +1,6 @@ + + +{if $display_type =='normal' || $display_type==''}
@@ -9,4 +12,32 @@ {if $only_once}
-{/if} \ No newline at end of file +{/if} + +{/if} + + + + + + +{if $display_type =='verticle'} +
+
+ + {ANCHOR place="video_thumb_div" data=$video} + {$video.duration|SetTime:false} +
+
+ +
{$video.views|number_format} {lang code='views'}
+{$video.comments_count|number_format} {lang code='comments'}
+ by {$userquery->get_user_field_only($video.userid,'username')} {show_rating class='small_stars' rating='$videos.rating' ratings='$videos.rated_by' total='10'}
+ +{if $only_once} +
+{/if} + +{/if} + diff --git a/upload/styles/cbv2/layout/header.html b/upload/styles/cbv2/layout/header.html index 1499b529..f97c4619 100644 --- a/upload/styles/cbv2/layout/header.html +++ b/upload/styles/cbv2/layout/header.html @@ -6,7 +6,7 @@ {if !$userquery->login_check('',true)} Welcome Guest, Click here to Login or Register {else} - Hello {$userquery->username} | Inbox ({$cbpm->get_new_messages()}) | Notifications ({$cbpm->get_new_messages('','notification')}) | Account | Videos + Hello {$userquery->username} | Inbox ({$cbpm->get_new_messages()}) | Notifications ({$cbpm->get_new_messages('','notification')}) | Account | Videos {/if}
diff --git a/upload/styles/cbv2/layout/index.html b/upload/styles/cbv2/layout/index.html index 53953b67..35dcaa9a 100644 --- a/upload/styles/cbv2/layout/index.html +++ b/upload/styles/cbv2/layout/index.html @@ -1,4 +1,104 @@ -asdasd -asd -asd -as +
+ + +
+
Videos Being Watched
+
+ {section name=vlist loop=$being_watched} + {include file="$style_dir/blocks/video.html" video=$being_watched[vlist] display_type="verticle"} + {sectionelse} + No Videos + {/section} +
+
+
+ + + +
+
Featured Video
+
+ {section name=vlist loop=$featured_videos} + {include file="$style_dir/blocks/video.html" video=$featured_videos[vlist] display_type="normal"} + {sectionelse} + No Featured Videos + {/section} +
+
+
+ + + +
+
Recently Added Video
+
+ {section name=vlist loop=$recently_added} + {include file="$style_dir/blocks/video.html" video=$recently_added[vlist] display_type="normal"} + {sectionelse} + No Featured Videos + {/section} +
+
+
+
+ +
+ + +
+
Editor's Picks
+
+ {ANCHOR place='index_right_top'} +
+
+ + + {if !$userquery->login_check('',true)} +
+
Login Now
+
+ +
+ +
+
+ or Signup Here + +
+
+ {else} + +
+
My Account
+
+ {assign var=user value=$userquery->get_user_details($userquery->userid)} + +
+ + + + + + + + + + +
+
+
+
+ + {/if} + + + +
{AD place=336x280}
+ +
\ No newline at end of file diff --git a/upload/styles/cbv2/theme/blocks.css b/upload/styles/cbv2/theme/blocks.css index bdd7cb87..b80d8cdf 100644 --- a/upload/styles/cbv2/theme/blocks.css +++ b/upload/styles/cbv2/theme/blocks.css @@ -1,7 +1,7 @@ @charset "utf-8"; /* CSS Document */ .video_block{width:130px; margin:5px; float:left} - +.video_block_verticle{width:250px; margin:5px; float:left} /* Category List */ .category_list{width:160px; float:left; margin-right:10px;} .category_list ul, .category_list ul li{margin:0px; padding:0px; list-style:none} diff --git a/upload/styles/cbv2/theme/body.css b/upload/styles/cbv2/theme/body.css index 801078c5..6ddea551 100644 --- a/upload/styles/cbv2/theme/body.css +++ b/upload/styles/cbv2/theme/body.css @@ -104,4 +104,18 @@ a{text-decoration:none; font-family:Arial, Helvetica, sans-serif;color:#333; } .reply_icon{background-position:-30px -63px } .video_control{font-weight:normal; margin-left:10px; font-size:10px} -.arrow_pointing{background-position:-0px -78px; width:24px; height:14px;} \ No newline at end of file +.arrow_pointing{background-position:-0px -78px; width:24px; height:14px;} + + +/** + index + */ +.index_left_column{width:600px; float:left} +.index_box{} +.index_box .heading{ display:block; border-radius-topleft:5px; -webkit-border-radius-topleft:5px; -moz-border-radius-topleft:5px; border:1px solid #CCC; font-size:15px; font-weight:bold;border-radius-topright:5px; -webkit-border-radius-topright:5px; -moz-border-radius-topright:5px; padding:5px ; border-bottom:0px;} +.index_box .content{ display:block; border-radius-bottomleft:5px; -webkit-border-radius-bottomleft:5px; -moz-border-radius-bottomleft:5px; border:1px solid #CCC; font-size:12px; font-weight:bold;border-radius-bottomright:5px; -webkit-border-radius-bottomright:5px; -moz-border-radius-bottomright:5px; padding:5px ; border-top:0px; margin-bottom:15px} +.index_right_column{float:right; width:350px; margin-right:5px} + +.index_login{padding:10px} +.index_login,.index_login a{font-size:16px; font-weight:bold} +.index_login input{border:1px solid #999; width:300px; padding:5px; margin-bottom:10px} \ No newline at end of file