Added : Mass Email

Update : Update cb stats
Update : FFMPEG codecs check
This commit is contained in:
Arslan Hassan 2011-09-27 10:54:39 +00:00
parent 638b76d6c8
commit 3a93152019
9 changed files with 64 additions and 29 deletions

View file

@ -31,7 +31,8 @@ $videos['comments'] = $vid_comments[0]['total_comments'];
/**
* Testing
* * PASSED
*/echo json_encode($videos);
*/
echo json_encode($videos);
//Users

View file

@ -32,9 +32,9 @@ for($i=0;$i<$days;$i++)
for($i=0;$i<$days;$i++)
{
$day[$i]['video'] = json_decode($datas[$i]['video_stats']);
$day[$i]['users'] = json_decode($datas[$i]['user_stats']);
$day[$i]['groups'] = json_decode($datas[$i]['group_stats']);
$day[$i]['video'] = json_decode($datas[$i]['video_stats'],true);
$day[$i]['users'] = json_decode($datas[$i]['user_stats'],true);
$day[$i]['groups'] = json_decode($datas[$i]['group_stats'],true);
}
$max = 1;

View file

@ -32,9 +32,9 @@ for($i=0;$i<$days;$i++)
for($i=0;$i<$days;$i++)
{
$day[$i]['video'] = json_decode($datas[$i]['video_stats']);
$day[$i]['users'] = json_decode($datas[$i]['user_stats']);
$day[$i]['groups'] = json_decode($datas[$i]['group_stats']);
$day[$i]['video'] = json_decode($datas[$i]['video_stats'],true);
$day[$i]['users'] = json_decode($datas[$i]['user_stats'],true);
$day[$i]['groups'] = json_decode($datas[$i]['group_stats'],true);
}
$max = 1;

View file

@ -32,9 +32,9 @@ for($i=0;$i<$days;$i++)
for($i=0;$i<$days;$i++)
{
$day[$i]['video'] = json_decode($datas[$i]['video_stats']);
$day[$i]['users'] = json_decode($datas[$i]['user_stats']);
$day[$i]['groups'] = json_decode($datas[$i]['group_stats']);
$day[$i]['video'] = json_decode($datas[$i]['video_stats'],true);
$day[$i]['users'] = json_decode($datas[$i]['user_stats'],true);
$day[$i]['groups'] = json_decode($datas[$i]['group_stats'],true);
}
$max = 1;
@ -43,7 +43,7 @@ for($i=0;$i<$days;$i++)
if($i==$days-1)
{
$uploads[] = $cbvid->get_videos(array("count_only"=>true,"date_span"=>"today"))+0;
$active[] = $cbvid->get_videos(array("count_only"=>true,"date_span"=>"today","active"=>'yes'))+0;
$active[] = $cbvid->get_videos(array("count_only"=>true,"date_span"=>"today","active"=>'yes',"status"=>'Successful'))+0;
$processing[] = $cbvid->get_videos(array("count_only"=>true,"date_span"=>"today","status"=>'Processing'))+0;
}else{
$uploads[] =$day[$i]['video']->uploads+0;

View file

@ -63,27 +63,24 @@
<div align="center" style="margin-top:30px"><h2>MODULES VERSION</h2></div>
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<table width="605" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="10" align="center" valign="middle" class="left_head">&nbsp;</td>
<td width="195" align="left" class="head">Module</td>
<td width="195" align="left" class="head"><div class="head_sep_left" style="width:120px">Installed Version</div></td>
<td width="195" align="left" class="head"><div class="head_sep_left" style="width:100px">Required Version</div></td>
<td width="195" align="left" class="head"><div class="head_sep_left" style="width:100px">Status</div></td>
<td width="10" class="right_head">&nbsp;</td>
</tr>
</table>
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0"class="block">
<table width="605" border="0" align="center" cellpadding="0" cellspacing="0"class="block">
<tr>
<td width="10" align="center" valign="middle" >&nbsp;</td>
<td width="195" align="left" >FFMPEG</td>
<td width="10" align="left" ></td>
<td width="185" align="left" >r{$ffmpeg_status.version}</td>
<td width="185" align="left" >{$ffmpeg_status.version}</td>
<td width="10" align="left" ></td>
<td width="185" align="left" >r19000 or greater</td>
<td width="10" align="left" ></td>
<td width="185" align="left" ><img src="{$imageurl}/{if $ffmpeg_status.version>=19000}button_ok.png{else}error.png{/if}"></td>
<td width="185" align="left" ><img src="{$imageurl}/{if $ffmpeg_status.version}button_ok.png{else}error.png{/if}"></td>
<td width="10" >&nbsp;</td>
</tr>
<tr>
@ -92,8 +89,6 @@
<td align="left" ></td>
<td align="left" >{$php_status.version}</td>
<td align="left" ></td>
<td align="left" >5.2.1 or greater</td>
<td align="left" ></td>
<td align="left" ><img src="{$imageurl}/{if $php_status.version>='5.2.1'}button_ok.png{else}error.png{/if}"></td>
<td >&nbsp;</td>
</tr>
@ -103,8 +98,6 @@
<td align="left" ></td>
<td align="left" >{$flvtool2_status.version}</td>
<td align="left" ></td>
<td align="left" >1.0.6 or greater</td>
<td align="left" ></td>
<td align="left" ><img src="{$imageurl}/{if $flvtool2_status.version>='1.0.6'}button_ok.png{else}error.png{/if}"></td>
<td >&nbsp;</td>
</tr>
@ -114,8 +107,6 @@
<td align="left" ></td>
<td align="left" >{$mp4box_status.version}</td>
<td align="left" ></td>
<td align="left" >0.4.5 or greater</td>
<td align="left" ></td>
<td align="left" ><img src="{$imageurl}/{if $mp4box_status.version>='0.4.5'}button_ok.png{else}error.png{/if}"></td>
<td >&nbsp;</td>
</tr>
@ -124,7 +115,7 @@
<div align="center" style="margin-top:30px">
<h2>CHECKING FFMPEG CODECS</h2></div>
<h2>CHECKING FFMPEG CODECS</h2></div>
{assign var=ffmpeg value=func->get_ffmpeg_codecs()}
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">

View file

@ -1081,3 +1081,20 @@ ADD `collection_moderation` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no' AFTER `pho
ADD `plugins_moderation` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no' AFTER `collection_moderation` ,
ADD `tool_box` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no' AFTER `plugins_moderation` ,
ADD `plugins_perms` TEXT NOT NULL AFTER `tool_box` ;
CREATE TABLE IF NOT EXISTS `{tbl_prefix}mass_emails` (
`id` int(255) NOT NULL AUTO_INCREMENT,
`email_subj` varchar(255) NOT NULL,
`email_from` varchar(255) NOT NULL,
`email_msg` text NOT NULL,
`configs` text NOT NULL,
`sent` bigint(255) NOT NULL,
`total` bigint(20) NOT NULL,
`users` text NOT NULL,
`start_index` bigint(255) NOT NULL,
`method` enum('browser','background') NOT NULL,
`status` enum('completed','pending','sending') NOT NULL,
`date_added` datetime NOT NULL,
`last_update` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

View file

@ -42,6 +42,23 @@ UPDATE `{tbl_prefix}user_levels_permissions` SET `photos_moderation` = 'yes',
`plugins_moderation` = 'yes',
`tool_box` = 'yes' WHERE `cb_user_levels_permissions`.`user_level_permission_id` =1;
UPDATE {tbl_prefix}video SET rating='10' WHERE rating>10;
CREATE TABLE IF NOT EXISTS `{tbl_prefix}mass_emails` (
`id` int(255) NOT NULL AUTO_INCREMENT,
`email_subj` varchar(255) NOT NULL,
`email_from` varchar(255) NOT NULL,
`email_msg` text NOT NULL,
`configs` text NOT NULL,
`sent` bigint(255) NOT NULL,
`total` bigint(20) NOT NULL,
`users` text NOT NULL,
`start_index` bigint(255) NOT NULL,
`method` enum('browser','background') NOT NULL,
`status` enum('completed','pending','sending') NOT NULL,
`date_added` datetime NOT NULL,
`last_update` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
ALTER TABLE `{tbl_prefix}photos` ADD `photo_details` TEXT NOT NULL AFTER `photo_tags`;

View file

@ -1347,6 +1347,8 @@ class CBvideo extends CBCategory
$new_by = $total_voters;
$newrate = ($t + $rating) / $new_by;
if($newrate>10)
$newrate = 10;
$db->update(tbl($this->dbtbl['video']),array("rating","rated_by","voter_ids"),array($newrate,$new_by,"|no_mc|$voters")," videoid='$id'");
$userDetails = array(
"object_id" => $id,

View file

@ -4565,7 +4565,7 @@
/**
* Function used to check weather FFMPEG has Required Modules installed or not
*/
function get_ffmpeg_codecs()
function get_ffmpeg_codecs($data=false)
{
$req_codecs = array
('libxvid' => 'Required for DIVX AVI files',
@ -4576,7 +4576,11 @@
'libtheora' => 'Theora is an open video codec being developed by the Xiph.org',
'libvorbis' => 'Ogg Vorbis is a new audio compression format',
);
$version = shell_output( get_binaries('ffmpeg').' -i xxx -acodec copy -vcodec copy -f null /dev/null 2>&1' );
if($data)
$version = $data;
else
$version = shell_output( get_binaries('ffmpeg').' -i xxx -acodec copy -vcodec copy -f null /dev/null 2>&1' );
preg_match_all("/enable\-(.*) /Ui",$version,$matches);
$installed = $matches[1];
@ -4654,9 +4658,12 @@
//pr($matches);
if(is_numeric(floatval($matches[1]))) {
return $matches[1];
} else {
return false;
}
preg_match("/FFmpeg version ([0-9.]+),/i",strtolower($ffmpegData),$matches);
if(is_numeric(floatval($matches[1]))) {
return $matches[1];
}
}
break;
case 'php':