modified : issues fixed Random

This commit is contained in:
Fahad Abbas 2015-12-28 12:34:42 +00:00
parent 30cb5d910b
commit 14b862441f
9 changed files with 96 additions and 28 deletions

View file

@ -75,6 +75,12 @@
logData('Preparing configuration to parse in ffmpeg class','checkpoints'); logData('Preparing configuration to parse in ffmpeg class','checkpoints');
$configs = array( $configs = array(
'use_video_rate' => true,
'use_video_bit_rate' => true,
'use_audio_rate' => true,
'use_audio_bit_rate' => true,
'use_audio_codec' => true,
'use_video_codec' => true,
'format' => 'mp4', 'format' => 'mp4',
'video_codec'=> config('video_codec'), 'video_codec'=> config('video_codec'),
'audio_codec'=> config('audio_codec'), 'audio_codec'=> config('audio_codec'),
@ -87,7 +93,8 @@
'high_res' => config('high_resolution'), 'high_res' => config('high_resolution'),
'max_video_duration' => config('max_video_duration'), 'max_video_duration' => config('max_video_duration'),
'resize'=>'max', 'resize'=>'max',
'outputPath' => $fileDir 'outputPath' => $fileDir,
'cb_combo_res' => config('cb_combo_res')
); );
logData('Inlcuding FFmpeg Class','checkpoints'); logData('Inlcuding FFmpeg Class','checkpoints');
@ -95,7 +102,7 @@
$ffmpeg = new FFMpeg($configs, $log); $ffmpeg = new FFMpeg($configs, $log);
$ffmpeg->ffmpeg($orig_file); $ffmpeg->ffmpeg($orig_file);
$ffmpeg->cb_combo_res = config('cb_combo_res'); $ffmpeg->configs = $configs;
$ffmpeg->res_configurations = array('gen_240' => config('gen_240'), $ffmpeg->res_configurations = array('gen_240' => config('gen_240'),
'gen_360' => config('gen_360'), 'gen_360' => config('gen_360'),
'gen_480' => config('gen_480'), 'gen_480' => config('gen_480'),

View file

@ -130,6 +130,18 @@ if(isset($_POST['unban_selected'])){
$page = mysql_clean($_GET['page']); $page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page,RESULTS); $get_limit = create_query_limit($page,RESULTS);
if ( isset($_GET['category']) )
{
if ( $_GET['category'][0] == 'all')
{
$cat_field = "";
}
else
{
$cat_field = $_GET['category'];
}
}
if(isset($_GET['search'])) if(isset($_GET['search']))
{ {
@ -137,7 +149,7 @@ if(isset($_POST['unban_selected'])){
( (
'userid' => $_GET['userid'], 'userid' => $_GET['userid'],
'username' => $_GET['username'], 'username' => $_GET['username'],
'category' => $_GET['category'], 'category' => $cat_field,
'featured' => $_GET['featured'], 'featured' => $_GET['featured'],
'ban' => $_GET['ban'], 'ban' => $_GET['ban'],
'status' => $_GET['status'], 'status' => $_GET['status'],
@ -152,7 +164,7 @@ if(isset($_POST['unban_selected'])){
$result_array['limit'] = $get_limit; $result_array['limit'] = $get_limit;
if(!$array['order']) if(!$array['order'])
$result_array['order'] = " doj DESC "; $result_array['order'] = " doj DESC ";
pr($result_array,true);
$users = get_users($result_array); $users = get_users($result_array);
Assign('users', $users); Assign('users', $users);

View file

@ -93,14 +93,7 @@
</script> </script>
<script> <script>
$(document).ready(function() {
$('.edit_lang').editable(baseurl+'/actions/update_phrase.php', { alert('yu');
// cancel : 'Cancel',
// submit : 'OK',
indicator : '<img src="'+baseurl+'/images/icons/progIndicator.gif">',
tooltip : 'Click to edit...',
});
});
$(document).ready(function(){ $(document).ready(function(){
$(".drop").on({ $(".drop").on({
click: function(e){ click: function(e){

View file

@ -68,7 +68,7 @@
<?php endif; ?> <?php endif; ?>
<div id="container" class="br5px"> <div id="container" class="br5px">
<?php include($mode.'.php'); ?> <?php include(__DIR__."/".$mode.'.php'); ?>
</div> </div>

View file

@ -55,3 +55,22 @@ ALTER TABLE `{tbl_prefix}photos` ADD `photo_details` VARCHAR( 255 ) CHARACTER SE
ALTER TABLE `{tbl_prefix}action_log` DROP `action_link`; ALTER TABLE `{tbl_prefix}action_log` DROP `action_link`;
ALTER TABLE `{tbl_prefix}video` ADD `file_directory` VARCHAR( 10 ) NOT NULL AFTER `file_server_path` ALTER TABLE `{tbl_prefix}video` ADD `file_directory` VARCHAR( 10 ) NOT NULL AFTER `file_server_path`
ALTER TABLE `{tbl_prefix}video` ADD `video_files` text(33) NOT NULL;
ALTER TABLE `{tbl_prefix}video` ADD `server_ip` varchar(20) NOT NULL;
ALTER TABLE `{tbl_prefix}video` ADD `file_server_path` text NOT NULL;
ALTER TABLE `{tbl_prefix}video` ADD `files_thumbs_path` text NOT NULL;
ALTER TABLE `{tbl_prefix}video` ADD `file_thumbs_count` varchar(30) NOT NULL;
ALTER TABLE `{tbl_prefix}video` ADD `has_hq` enum('yes','no') NOT NULL DEFAULT 'no';
ALTER TABLE `{tbl_prefix}video` ADD `has_mobile` enum('yes','no') NOT NULL DEFAULT 'no';
ALTER TABLE `{tbl_prefix}video` ADD `has_mobile` enum('yes','no') NOT NULL DEFAULT 'no';
ALTER TABLE `{tbl_prefix}video` ADD `filegrp_size` varchar(30) NOT NULL;
ALTER TABLE `{tbl_prefix}video` ADD `process_status` bigint(30) NOT NULL DEFAULT '0';
ALTER TABLE `{tbl_prefix}video` ADD `has_hd` enum('yes','no') NOT NULL DEFAULT 'no';

View file

@ -840,7 +840,7 @@ class FFMpeg{
$orig_file = $this->input_file; $orig_file = $this->input_file;
// setting type of conversion, fetching from configs // setting type of conversion, fetching from configs
$this->resolutions = $this->cb_combo_res; $this->resolutions = $this->configs['cb_combo_res'];
$res169 = $this->res169; $res169 = $this->res169;
logData('CB combo reslution : '.$this->resolutions,'checkpoints'); logData('CB combo reslution : '.$this->resolutions,'checkpoints');
@ -855,7 +855,7 @@ class FFMpeg{
$this->configs['gen_480'] = $this->res_configurations['gen_480']; $this->configs['gen_480'] = $this->res_configurations['gen_480'];
$this->configs['gen_720'] = $this->res_configurations['gen_720']; $this->configs['gen_720'] = $this->res_configurations['gen_720'];
$this->configs['gen_1080'] = $this->res_configurations['gen_1080']; $this->configs['gen_1080'] = $this->res_configurations['gen_1080'];
logdata($this->configs,'checkpoints');
$this->ratio = $ratio; $this->ratio = $ratio;
foreach ($res169 as $value) foreach ($res169 as $value)
{ {
@ -867,6 +867,7 @@ class FFMpeg{
$more_res['video_width'] = $video_width; $more_res['video_width'] = $video_width;
$more_res['video_height'] = $video_height; $more_res['video_height'] = $video_height;
$more_res['name'] = $video_height; $more_res['name'] = $video_height;
logData("About to Call Convert() Function","checkpoints");
$this->convert(NULL,false,$more_res); $this->convert(NULL,false,$more_res);
} }
@ -1199,7 +1200,7 @@ class FFMpeg{
$p = $this->configs; $p = $this->configs;
$i = $this->input_details; $i = $this->input_details;
logData($p,'checkpoints');
# Prepare the ffmpeg command to execute # Prepare the ffmpeg command to execute
if(isset($p['extra_options'])) if(isset($p['extra_options']))
$opt_av .= " -y {$p['extra_options']} "; $opt_av .= " -y {$p['extra_options']} ";
@ -1323,8 +1324,7 @@ class FFMpeg{
$abrate = $i['audio_bitrate']; $abrate = $i['audio_bitrate'];
if(!empty($abrate)) if(!empty($abrate))
{ {
$abrate = min('128',$abrate); $abrate_cmd = " -ab ".$abrate;
$abrate_cmd = " -ab ".$abrate."k";
$opt_av .= $abrate_cmd; $opt_av .= $abrate_cmd;
} }
} }
@ -1355,6 +1355,7 @@ class FFMpeg{
$tmp_file = time().RandomString(5).'.tmp'; $tmp_file = time().RandomString(5).'.tmp';
//$opt_av .= " -map_meta_data ".$this->output_file.":".$this->input_file; //$opt_av .= " -map_meta_data ".$this->output_file.":".$this->input_file;
logData('Convert() function => setting options opt_av :'.$opt_av,'checkpoints');
@ -2080,4 +2081,36 @@ public function regenerateThumbs($input_file,$test,$duration,$dim,$num,$rand=NUL
return false; return false;
} }
function validChannels($in)
{
if(!$in)
return true;
$in['audio_channels'] = strtolower($in['audio_channels']);
$channels = false;
if(is_numeric($in['audio_channels']))
$channels = $in['audio_channels'];
else
{
if(strstr($in['audio_channels'],'stereo'))
$channels = 2;
if(strstr($in['audio_channels'],'mono'))
$channels = 1;
if(!$channels)
{
preg_match('/([0-9.]+)/',$in['audio_channels'],$matches);
if($matches)
$channels = $matches[1];
}
}
if(!$channels)
return true;
elseif($channels>2)
return false;
else
return true;
}
} }

View file

@ -3493,9 +3493,9 @@ class userquery extends CBCategory{
'type'=> 'dropdown', 'type'=> 'dropdown',
'name'=> 'category', 'name'=> 'category',
'id'=> 'category', 'id'=> 'category',
'value'=> array('category', isset($default['category'])), 'value'=> array('category', $default['category']),
'db_field'=>'category', 'db_field'=>'category',
'checked'=> isset($default['category']), 'checked'=> $default['category'],
'required'=>'yes', 'required'=>'yes',
'invalid_err'=>lang("Please select your category"), 'invalid_err'=>lang("Please select your category"),
'display_function' => 'convert_to_categories', 'display_function' => 'convert_to_categories',

View file

@ -56,13 +56,16 @@ function profile_fileds_check($array)
$post_clean = false; $post_clean = false;
} }
if (!empty($array['profile_tags']) && preg_match('/[0-9]+/', $array['profile_tags']) || !strpos($array['profile_tags'], ',')) if (!empty($array['profile_tags']))
{ {
e('Invalid tags. Kindly review!'); if (preg_match('/[0-9]+/', $array['profile_tags']) || !strpos($array['profile_tags'], ','))
$post_clean = false; {
e('Invalid tags. Kindly review!');
$post_clean = false;
}
} }
if (!filter_var($array['web_url'], FILTER_VALIDATE_URL)) if (!empty($array['web_url']) && !filter_var($array['web_url'], FILTER_VALIDATE_URL))
{ {
e('Invalid URL provided.'); e('Invalid URL provided.');
$post_clean = false; $post_clean = false;

View file

@ -55,13 +55,14 @@
</button> </button>
</div> </div>
</div> </div>
</form>
</div> </div>
<div id="asettings" class="tab-pane {if $mode=='account_settings'}active{/if}"> <div id="asettings" class="tab-pane {if $mode=='account_settings'}active{/if}">
<form method="post" class="accountForm">
<div class="accountSettings col-md-6"> <div class="accountSettings col-md-6">
<!--- CHANGING USER ACCOUNT AND PROFILE --> <!--- CHANGING USER ACCOUNT AND PROFILE -->
{$signup_fields = $userquery->load_signup_fields($user)} {$signup_fields = $userquery->load_signup_fields($user)}
{$cust_signup_fields = $userquery->load_custom_signup_fields($user,false,true)} {$cust_signup_fields = $userquery->load_custom_signup_fields($user,false,true)}
<legend>{lang code='account_details'}</legend> <legend>{lang code='account_details'}</legend>
<div class="form-group"> <div class="form-group">
@ -85,14 +86,14 @@
</label> </label>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="category">{lang code='account_details'}</label> <label for="category">{lang code='Category'}</label>
{ANCHOR place=$signup_fields.cat.anchor_before} {ANCHOR place=$signup_fields.cat.anchor_before}
{$signup_fields.cat.class='form-control'} {$signup_fields.cat.class='form-control'}
{$formObj->createField($signup_fields.cat)} {$formObj->createField($signup_fields.cat)}
{ANCHOR place=$signup_fields.cat.anchor_after} {ANCHOR place=$signup_fields.cat.anchor_after}
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="dob">{lang code='user_date_of_birth'}</label> <label for="dob">{lang code='user_date_of_birth'}</label>
{ANCHOR place=$signup_fields.dob.anchor_before} {ANCHOR place=$signup_fields.dob.anchor_before}