ADDED:New Player System
ADDED:Live Player Size Editor ADDED:JQUERYUI UPDATED:ADS SYSTEM REMOVED :Unwanted JS files Added : ClipBucket Modules as Plugins Added : Jwplayer,ClipBucket and flowplayer
|
@ -127,7 +127,7 @@ include('../includes/config.inc.php');
|
|||
exit(0);
|
||||
}else{
|
||||
$Upload->add_conversion_queue($file_name);
|
||||
exec(php_path()." -q ".BASEDIR."/actions/video_convert.php > /dev/null &");
|
||||
exec(php_path()." -q ".BASEDIR."/actions/video_convert.php &> /dev/null &");
|
||||
}
|
||||
|
||||
exit(0);
|
||||
|
|
22
upload/actions/update_configs.php
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
/**
|
||||
* Written by : Arslan Hassan
|
||||
* Software : ClipBucket v2
|
||||
* License : CBLA
|
||||
**/
|
||||
require'../includes/admin_config.php';
|
||||
$userquery->login_check('admin_access');
|
||||
|
||||
if(isset($_POST['update_player_size']))
|
||||
{
|
||||
$height = mysql_clean($_POST['height']);
|
||||
$width = mysql_clean($_POST['width']);
|
||||
if(!is_numeric($height) || $height <=100)
|
||||
$height = 100;
|
||||
if(!is_numeric($width) || $width <=100)
|
||||
$width = 100;
|
||||
$myquery->Set_Website_Details('player_height',$height);
|
||||
$myquery->Set_Website_Details('player_width',$width);
|
||||
echo "Player size has been updated";
|
||||
}
|
||||
?>
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
/***
|
||||
/**
|
||||
* Written by : Arslan Hassan
|
||||
* Software : ClipBucket v2
|
||||
* License : CBLA
|
||||
*///
|
||||
**/
|
||||
|
||||
|
||||
include(dirname(__FILE__)."/../includes/config.inc.php");
|
||||
|
@ -25,41 +25,68 @@ if(!empty($tmp_file)){
|
|||
$temp_file = TEMP_DIR.'/'.$tmp_file.'.'.$tmp_ext;
|
||||
$orig_file = CON_DIR.'/'.$tmp_file.'.'.$ext;
|
||||
|
||||
//rcopy($temp_file,$orig_file);
|
||||
//copy($temp_file,$orig_file);
|
||||
rename($temp_file,$orig_file);
|
||||
$configs = array
|
||||
(
|
||||
'use_video_rate' => true,
|
||||
'use_video_bit_rate' => true,
|
||||
'use_audio_rate' => true,
|
||||
'use_audio_bit_rate' => true,
|
||||
'use_audio_codec' => true,
|
||||
'format' => 'flv',
|
||||
'video_codec'=>'libx264',
|
||||
'audio_codec'=>'libfaac',
|
||||
'audio_rate'=>22050,
|
||||
'audio_bitrate'=>128000,
|
||||
'video_bitrate'=>512000,
|
||||
'video_width'=>400,
|
||||
'video_height'=>300,
|
||||
'resize'=>'max'
|
||||
);
|
||||
|
||||
$configs = array
|
||||
(
|
||||
'use_video_rate' => true,
|
||||
'use_video_bit_rate' => true,
|
||||
'use_audio_rate' => true,
|
||||
'use_audio_bit_rate' => true,
|
||||
'format' => 'flv',
|
||||
'video_codec'=>'flv',
|
||||
'audio_rate'=>22050,
|
||||
'audio_bitrate'=>128000,
|
||||
'video_bitrate'=>512000,
|
||||
'video_width'=>400,
|
||||
'video_height'=>300,
|
||||
'resize'=>'max'
|
||||
);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Calling Functions before converting Video
|
||||
*/
|
||||
if(get_functions('before_convert_functions'))
|
||||
{
|
||||
foreach(get_functions('before_convert_functions') as $func)
|
||||
{
|
||||
if(@function_exists($func))
|
||||
$func();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$ffmpeg = new ffmpeg($orig_file);
|
||||
$ffmpeg->configs = $configs;
|
||||
$ffmpeg->gen_thumbs = TRUE;
|
||||
$ffmpeg->gen_big_thumb = TRUE;
|
||||
$ffmpeg->output_file = VIDEOS_DIR.'/'.$tmp_file.'.flv';
|
||||
$ffmpeg->two_pass = FALSE;
|
||||
$ffmpeg->hq_output_file = VIDEOS_DIR.'/'.$tmp_file.'.mp4';
|
||||
$ffmpeg->h264_single_pass = TRUE;
|
||||
$ffmpeg->remove_input=FALSE;
|
||||
$ffmpeg->ClipBucket();
|
||||
|
||||
exit();
|
||||
$db->update("conversion_queue",
|
||||
array("cqueue_conversion"),
|
||||
array("yes")," cqueue_id = '".$queue_details['cqueue_id']."'");
|
||||
|
||||
update_processed_video($queue_details);
|
||||
|
||||
|
||||
/**
|
||||
* Calling Functions before converting Video
|
||||
*/
|
||||
if(get_functions('after_convert_functions'))
|
||||
{
|
||||
foreach(get_functions('after_convert_functions') as $func)
|
||||
{
|
||||
if(@function_exists($func))
|
||||
$func();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -38,11 +38,7 @@ $total_placements = $ads_exec->recordcount() + 0;
|
|||
|
||||
Assign('ads_placements',$ads_placements);
|
||||
|
||||
Assign('msg',@$msg);
|
||||
Template('header.html');
|
||||
Template('leftmenu.html');
|
||||
Template('message.html');
|
||||
Template('ads_add_placements.html');
|
||||
Template('footer.html');
|
||||
template_files('ads_add_placements.html');
|
||||
display_it();
|
||||
|
||||
?>
|
|
@ -1,91 +1,41 @@
|
|||
<?php
|
||||
/*
|
||||
****************************************************************************************************
|
||||
| Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved. |
|
||||
| @ Author : ArslanHassan |
|
||||
| @ Software : ClipBucket , © PHPBucket.com |
|
||||
****************************************************************************************************
|
||||
***************************************************************
|
||||
| Copyright (c) 2007-2009 Clip-Bucket.com. All rights reserved.
|
||||
| @ Author : ArslanHassan
|
||||
| @ Software : ClipBucket , © PHPBucket.com
|
||||
***************************************************************
|
||||
*/
|
||||
|
||||
require'../includes/admin_config.php';
|
||||
$userquery->admin_login_check();
|
||||
$userquery->login_check('admin_access');
|
||||
$pages->page_redir();
|
||||
|
||||
//Adding Advertisment
|
||||
|
||||
if(isset($_POST['add_ad'])){
|
||||
$msg = $ads_query->AddAd();
|
||||
//Adding
|
||||
if(isset($_POST['add']))
|
||||
{
|
||||
$adsObj->AddAd();
|
||||
}
|
||||
|
||||
//Changing Status
|
||||
|
||||
if(isset($_GET['change_status'])){
|
||||
$id = mysql_clean($_GET['change_status']);
|
||||
$status = mysql_clean($_GET['status']);
|
||||
$msg = $ads_query->ChangeAdStatus($status,$id);
|
||||
//Adding
|
||||
if(isset($_POST['update']))
|
||||
{
|
||||
$adsObj->EditAd($_POST['ad_id']);
|
||||
}
|
||||
|
||||
//Delet Advertisment
|
||||
if(isset($_GET['delete_ad'])){
|
||||
$id = mysql_clean($_GET['delete_ad']);
|
||||
$msg = $ads_query->DeleteAd($id);
|
||||
|
||||
//Editing Ad
|
||||
if(isset($_GET['ad_id']))
|
||||
{
|
||||
$ad_id = mysql_clean($_GET['ad_id']);
|
||||
$ad_data = $adsObj->get_ad_details($ad_id);
|
||||
if(!$ad_data)
|
||||
e("Ad does not exist");
|
||||
else
|
||||
assign('ad_data',$ad_data);
|
||||
}
|
||||
|
||||
//Editing An Add/
|
||||
if(isset($_GET['ad'])){
|
||||
$ad = clean($_GET['ad']);
|
||||
$query = mysql_query("SELECT * FROM ads_data WHERE ad_id='".$ad."'");
|
||||
if(mysql_num_rows($query)>0){
|
||||
if(isset($_POST['update_ad'])){
|
||||
$id = mysql_clean($_GET['ad']);
|
||||
$msg = $ads_query->EditAd($id);
|
||||
}
|
||||
$sql = "SELECT * FROM ads_data WHERE ad_id='".$ad."'";
|
||||
$rs = $db->Execute($sql);
|
||||
$ad_data = $rs->getrows();;
|
||||
Assign('ad_data',$ad_data);
|
||||
Assign('edit_ad','show');
|
||||
}else{
|
||||
$msg[] = $LANG['ad_exists_error1'];
|
||||
}
|
||||
}
|
||||
template_files('ads_manager.html');
|
||||
display_it();
|
||||
|
||||
//Advertisment Array
|
||||
$placements = array(
|
||||
"ad_160x600" => "Wide Skyscrapper 160 x 600",
|
||||
"ad_468x60" => "Banner 468 x 60",
|
||||
"ad_300x250" => "Medium Rectangle 300 x 250",
|
||||
"ad_728x90" => "Leader Board 728 x 90",
|
||||
"ad_200x200" => "Small Square 200 x 200",
|
||||
"ad_250x250" => "Square 250 x 250",
|
||||
"ad_120x600" => "Skyscrapper 120 x 600",
|
||||
"ad_336x280" => "Large Rectangle 336x280"
|
||||
);
|
||||
|
||||
Assign('placement',$placements);
|
||||
$sql = "SELECT * from ads_data";
|
||||
$rs = $db->Execute($sql);
|
||||
$total = $rs->recordcount();
|
||||
$ads = $rs->getrows();
|
||||
for($id=0;$id<$total;$id++){
|
||||
$category = $myquery->GetCategory($ads[$id]['ad_category']);
|
||||
$ads[$id]['ad_category'] = $category['category_name'];
|
||||
$ads[$id]['placement'] = $placements [$ads[$id]['ad_placement']];
|
||||
}
|
||||
|
||||
Assign('total', $total);
|
||||
Assign('ads', $ads);
|
||||
|
||||
|
||||
//Getting List Of Placement
|
||||
$sql = "SELECT * FROM ads_placements";
|
||||
$ads_exec = $db->Execute($sql);
|
||||
$ads_placements = $ads_exec->getrows();
|
||||
Assign('ads_placements',$ads_placements);
|
||||
Assign('msg',@$msg);
|
||||
Template('header.html');
|
||||
Template('leftmenu.html');
|
||||
Template('message.html');
|
||||
Template('ads_manager.html');
|
||||
Template('footer.html');
|
||||
?>
|
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
require_once '../includes/admin_config.php';
|
||||
$userquery->admin_login_check();
|
||||
$userquery->login_check('admin_access');
|
||||
$pages->page_redir();
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* @author : Arslan Hassan
|
||||
*/
|
||||
require_once '../includes/admin_config.php';
|
||||
$userquery->admin_login_check();
|
||||
$userquery->login_check('admin_access');
|
||||
$pages->page_redir();
|
||||
|
||||
if(isset($_POST['update']))
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
require'../includes/admin_config.php';
|
||||
$userquery->admin_login_check();
|
||||
$userquery->login_check('admin_access');
|
||||
$pages->page_redir();
|
||||
|
||||
$group = mysql_clean($_GET['group']);
|
||||
|
|
|
@ -40,8 +40,6 @@ Template('footer.html');
|
|||
*/
|
||||
|
||||
|
||||
pr($cbvid->category_exists(27));
|
||||
|
||||
template_files('index.html');
|
||||
display_it();
|
||||
?>
|
20
upload/admin_area/manage_players.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
/**
|
||||
* CLipBucket v2 Player Manage
|
||||
* Author : Arslan
|
||||
*
|
||||
* Licensed Under CBLA
|
||||
* ClipBucket 2007-2009
|
||||
*/
|
||||
|
||||
require_once '../includes/admin_config.php';
|
||||
$pages->page_redir();
|
||||
$userquery->login_check('admin_access');
|
||||
|
||||
if($_GET['set'])
|
||||
{
|
||||
$cbplayer->set_player($_GET);
|
||||
}
|
||||
template_files('manage_players.html');
|
||||
display_it();
|
||||
?>
|
BIN
upload/admin_area/styles/cbadmin/images/play_icon.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
|
@ -0,0 +1,80 @@
|
|||
<link href="../theme/stylesheet.css" rel="stylesheet" type="text/css" />
|
||||
{if $Cbucket->show_page == true}
|
||||
<script type="text/javascript" src="{$js}/popup_image.js"></script>
|
||||
|
||||
<!-- Adding Placement Form -->
|
||||
<form name="AddPlacement" id="AddPlacement" method="post" action="">
|
||||
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="10" class="left_head"> </td>
|
||||
<td class="head">Add Placement </td>
|
||||
<td width="10" class="right_head"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" class="block">
|
||||
|
||||
<tr>
|
||||
<td colspan="3" class="td_body"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="td_body"><strong><label for="placement_name">Placement Name</label> </strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="td_body"><input name="placement_name" id="placement_name" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="td_body"><strong><label for="placement_code">Placement Code</label> </strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="td_body"><input name="placement_code" value="" id="placement_code"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="td_body"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="td_body">
|
||||
<label>
|
||||
<input type="submit" name="AddPlacement" value="Submit" id="button"/>
|
||||
</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<em><strong><br />
|
||||
<br />
|
||||
|
||||
<!-- Adding Placement Form -->
|
||||
<span class="tr_head">Note: if you delete any placement, all ads under it will be deleted</span>
|
||||
<!-- Listing Placements Stars -->
|
||||
<br />
|
||||
<br />
|
||||
|
||||
</strong></em>
|
||||
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="30" class="left_head"><div style="width:30px; padding-left:5px">ID</div></td>
|
||||
<td class="head" ><div class="head_sep_left" style="width:150px">PlacementName</div></td>
|
||||
<td width="20%" class="head"><div class="head_sep_left" style="width:150px">PlacementCode</div></td>
|
||||
<td width="15%" class="head"><div class="head_sep_left" style="width:150px">TotalAds</div></td>
|
||||
<td width="15%" class="right_head" ><div class="head_sep_left" style="width:100px">Action</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
{section name=a_list loop=$ads_placements}
|
||||
{if $ads_placements[a_list].placement_name !=''}
|
||||
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="{$bgcolor}">
|
||||
<tr>
|
||||
<td width="30" align="center"><div style="padding-left:15px">{$ads_placements[a_list].placement_id}</div></td>
|
||||
<td ><div style="padding-left:15px">{$ads_placements[a_list].placement_name}</div></td>
|
||||
<td width="20%"><div style="padding-left:15px"><strong>{literal}{AD place={/literal}{$ads_placements[a_list].placement}{literal}}{/literal}</strong></div></td>
|
||||
<td width="15%"><div style="padding-left:15px">{$ads_placements[a_list].total_ads}</div></td>
|
||||
<td width="15%"><div style="padding-left:15px">{if $ads_placements[a_list].disable == no}<a href="?remove={$ads_placements[a_list].placement}">Remove</a>{else}Default Placement{/if}</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
{if $bgcolor == ""}
|
||||
{assign var = bgcolor value = "#EEEEEE"}
|
||||
{else}
|
||||
{assign var = bgcolor value = ""}
|
||||
{/if}
|
||||
{/if}
|
||||
{/section}
|
||||
<!-- Listing Placements End -->
|
||||
{/if}
|
161
upload/admin_area/styles/cbadmin/layout/ads_manager.html
Normal file
|
@ -0,0 +1,161 @@
|
|||
<link href="../theme/stylesheet.css" rel="stylesheet" type="text/css" />
|
||||
{if $ad_data.ad_name !=''}
|
||||
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="10" class="left_head"> </td>
|
||||
<td class="head">Eid Advertisement</td>
|
||||
<td width="10" class="right_head"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"><form id="form1" name="form1" method="post" action="">
|
||||
<input type="hidden" name="ad_id" value="{$ad_data.ad_id}" />
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="block">
|
||||
<tr>
|
||||
<td valign="top"> </td>
|
||||
<td align="right">all fields are required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"> </td>
|
||||
<td align="center">{$ad_data.ad_code|ad}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150" valign="top"><label for="name">Advertisement Name</label>
|
||||
*</td>
|
||||
<td><input name="name" type="text" id="name" value="{$ad_data.ad_name}" size="45" />
|
||||
e.g Home Banner</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><label for="placement">Advertisement Placement</label></td>
|
||||
<td><select name="placement" id="placement">
|
||||
{assign var='ads_placements' value=$adsObj->get_placements()}
|
||||
{section name=a_list loop=$ads_placements}
|
||||
{if $ads_placements[a_list].placement_name!=''}
|
||||
<option value="{$ads_placements[a_list].placement}" {if $ad_data.ad_placement==$ads_placements[a_list].placement} selected="selected"{/if} >{$ads_placements[a_list].placement_name}</option>
|
||||
{/if}
|
||||
{/section}
|
||||
|
||||
|
||||
</select>
|
||||
<a href="ads_add_placements.php">Add More Placements</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><label for="code">Advertisement Code</label></td>
|
||||
<td><textarea name="code" id="code" cols="45" rows="5">{$ad_data.ad_code}</textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Status</td>
|
||||
<td><label>
|
||||
<input name="status" type="radio" value="1" {if $ad_data.ad_status=='1'}checked="checked" {/if} />
|
||||
Active</label>
|
||||
<label>
|
||||
<input type="radio" name="status" value="0"{if $ad_data.ad_status=='0'}checked="checked"{/if} />
|
||||
Inactive</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td align="right"><input type="submit" name="update" id="button2" value="Update Advertisement" onclick="return validate_ad_form(add_adv)"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<br />
|
||||
{else}
|
||||
{if $edit_ad != "show"}
|
||||
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="10" class="left_head"> </td>
|
||||
<td class="head">Add Advertisement</td>
|
||||
<td width="10" class="right_head"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"><form id="form1" name="form1" method="post" action="">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="block">
|
||||
<tr>
|
||||
<td valign="top"> </td>
|
||||
<td align="right">all fields are required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150" valign="top"><label for="name">Advertisement Name</label>
|
||||
*</td>
|
||||
<td><input name="name" type="text" id="name" size="45" />
|
||||
e.g Home Banner</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><label for="placement">Advertisement Placement</label></td>
|
||||
<td><select name="placement" id="placement">
|
||||
{assign var='ads_placements' value=$adsObj->get_placements()}
|
||||
{section name=a_list loop=$ads_placements}
|
||||
{if $ads_placements[a_list].placement_name!=''}
|
||||
<option value="{$ads_placements[a_list].placement}" {$select} >{$ads_placements[a_list].placement_name}</option>
|
||||
{/if}
|
||||
{/section}
|
||||
|
||||
|
||||
</select>
|
||||
<a href="ads_add_placements.php">Add More Placements</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><label for="code">Advertisement Code</label></td>
|
||||
<td><textarea name="code" id="code" cols="45" rows="5"></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Status</td>
|
||||
<td><label>
|
||||
<input name="status" type="radio" value="1" checked="checked" />
|
||||
Active</label>
|
||||
<label>
|
||||
<input type="radio" name="status" value="0" />
|
||||
Inactive</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td align="right"><input type="submit" name="add" id="button2" value="Add Advertisement" onclick="return validate_ad_form(add_adv)"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
{/if}
|
||||
<br />
|
||||
<h2>Advertisement Manager</h2>
|
||||
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" >
|
||||
<tr>
|
||||
<td colspan="5" class="tr_head">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="block_head">
|
||||
<tr>
|
||||
<td width="50" align="left" class="left_head">AID</td>
|
||||
<td width="150" class="head" align="left"><div class="head_sep_left" style="width:130px">Advertisment name</div></td>
|
||||
<td class="head"><div class="head_sep_left" style="width:150px">Advertisment</div></td>
|
||||
<td width="120" align="left" class="head"><div class="head_sep_left" style="width:100px">Impressions</div></td>
|
||||
<td width="120" align="left" class="head"><div class="head_sep_left" style="width:100px">Date Added</div> </td>
|
||||
<td width="270" align="left" class="head"><div class="head_sep_left" style="width:220px">Placement</div></td>
|
||||
<td width="150" class="right_head"><div class="head_sep_left" style="width:100px">Actions</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="block">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
|
||||
{assign var='ads' value=$adsObj->get_advertisements()}
|
||||
{foreach item=ad from=$ads}
|
||||
<tr>
|
||||
<td width="50" align="left"><div>{$ad.ad_id}</div></td>
|
||||
<td width="150" align="left"><div style="padding-left:10px">{$ad.ad_name}</div></td>
|
||||
<td align="left"><div style="padding-left:10px">{$ad.ad_codes}<a href="ads_manager.php?ad_id={$ad.ad_id}">View Advertisment</a></div></td>
|
||||
<td width="120" align="left"><div style="padding-left:10px">{$ad.ad_impressions|number_format}</div></td>
|
||||
<td width="120" align="left"><div style="padding-left:10px">{$ad.date_added|date_format}</div></td>
|
||||
<td width="270" align="left"><div style="padding-left:10px">{$adsObj->get_placement_name($ad.ad_placement)}</div></td>
|
||||
<td width="150" align="left"><div style="padding-left:10px"> </div></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table></div></td>
|
||||
</tr>
|
||||
{if $bgcolor == ""}
|
||||
{assign var = bgcolor value = "#EEEEEE"}
|
||||
{else}
|
||||
{assign var = bgcolor value = ""}
|
||||
{/if}
|
||||
|
||||
</table>
|
||||
{/if}
|
|
@ -14,11 +14,14 @@ var baseurl = "{$baseurl}";
|
|||
<script type="text/javascript" src="{$js}/admin_functions.js"></script>
|
||||
<script type="text/javascript" src="{$js}/checkall.js"></script>
|
||||
<script type="text/javascript" src="{$js}/jquery.js"></script>
|
||||
<script type="text/javascript" src="{$js}/ui/jquery-ui-1.7.2.custom.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="{$js}/jquery_plugs/hover_intent.js"></script>
|
||||
<script type="text/javascript" src="{$js}/jquery_plugs/cb.tabs.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="{$js}/jquery_plugs/css/jquery.tooltip.css" />
|
||||
<link rel="stylesheet" href="{$js}/jquery_plugs/css/screen.css" />
|
||||
<link rel="stylesheet" href="{$js}/ui/css/ui-lightness/jquery-ui-1.7.2.custom.css" />
|
||||
|
||||
<script src="{$js}/jquery_plugs/jquery.bgiframe.js" type="text/javascript"></script>
|
||||
<script src="{$js}/jquery_plugs/jquery.dimensions.js" type="text/javascript"></script>
|
||||
|
|
|
@ -1 +1,30 @@
|
|||
<a href="javascript:void(0)" id="abcds" title="bullshit">Test is best</a>
|
||||
{literal}<style type="text/css">
|
||||
#resizable { width: 200px; height: 150px; padding: 5px; }
|
||||
#resizable h3 { text-align: center; margin: 0; }
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#resizable").resizable({
|
||||
maxHeight: 250,
|
||||
maxWidth: 350,
|
||||
minHeight: 150,
|
||||
minWidth: 200
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div id="resizable" class="ui-widget-content">
|
||||
<h3 class="ui-widget-header">Resize larger / smaller</h3>
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
<div class="demo-description">
|
||||
|
||||
<p>Limit the resizable element to a maximum or minimum height or width using the <code>maxHeight</code>, <code>maxWidth</code>, <code>minHeight</code>, and <code>minWidth</code> options.</p>
|
||||
|
||||
</div><!-- End demo-description -->
|
||||
{/literal}
|
99
upload/admin_area/styles/cbadmin/layout/manage_players.html
Normal file
|
@ -0,0 +1,99 @@
|
|||
<div class="setting_title">Selected Player</div>
|
||||
<div>
|
||||
{assign var="player_dir" value=$Cbucket->configs.player_dir}
|
||||
{assign var="player_file" value=$Cbucket->configs.player_file}
|
||||
|
||||
{assign var="curplayer" value=$cbplayer->getPlayerDetails($player_file,$player_dir)}
|
||||
<table width="800" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="190"><img src="{$cbplayer->get_preview_thumb($curplayer.folder)}" class="preview_thumb" ></td>
|
||||
<td valign="top"><h2 style="display:inline">{$curplayer.name}</h2> — <em><a href="{$curplayer.author_page}"><strong>{$curplayer.author}</strong></a></em><br />
|
||||
{$curplayer.description}<br />
|
||||
Version : {$curplayer.version} Released on {$curplayer.released|date_format}<br />
|
||||
Website : <a href="{$curplayer.website}">{$curplayer.website}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<hr size="1" noshade />
|
||||
|
||||
<div class="setting_title">Change Player Size</div>
|
||||
<div id="msg_box" style="margin:5px;"></div>
|
||||
<div>
|
||||
{literal}
|
||||
<style type="text/css">
|
||||
|
||||
#resizable{{/literal}background-image:url({$imageurl}/play_icon.png); background-repeat:no-repeat; background-position:center{literal}}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function update_player_size(width,height)
|
||||
{
|
||||
var page = baseurl+'/actions/update_configs.php';
|
||||
$.post(page,
|
||||
{
|
||||
width : width,
|
||||
height : height,
|
||||
update_player_size:'yes'
|
||||
},
|
||||
function(data)
|
||||
{
|
||||
if(!data)
|
||||
alert("No data");
|
||||
else
|
||||
$("#msg_box").html('<div style="width:300px; padding:5px; text-align:center; background-color:#0099cc; border-radius:5px; -moz-border-radius:5px; color:#fff">'+data+'</div>');
|
||||
},'text');
|
||||
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$("#resizable").resizable({
|
||||
maxHeight: 800,
|
||||
maxWidth: 600,
|
||||
minHeight: 100,
|
||||
minWidth: 100,
|
||||
grid: 10,
|
||||
resize:function(event,ui){$("#width").val(ui.size.width);$("#height").val(ui.size.height);},
|
||||
stop:function(event,ui){update_player_size(ui.size.width,ui.size.height)}
|
||||
});
|
||||
|
||||
$("#width").change(function () {$('#resizable').css("width",this.value+'px') ; update_player_size(this.value,$("#height").val()) });
|
||||
$("#height").change(function () {$('#resizable').css("height",this.value+'px'); update_player_size($("#width").val(),this.value) });
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
<div class="demo">
|
||||
|
||||
<div id="resizable" class="ui-widget-content" style="width:{$Cbucket->configs.player_width}px; height:{$Cbucket->configs.player_height}px">
|
||||
<h3 class="ui-widget-header">Actual Player Size</h3>
|
||||
</div>
|
||||
<label for="width">Width</label>
|
||||
<input type="text" name="width" id="width" value="{$Cbucket->configs.player_width}" />
|
||||
<label for="height">Height</label>
|
||||
<input type="text" name="height" id="height" value="{$Cbucket->configs.player_height}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr size="1" noshade />
|
||||
<div class="setting_title">Available Players</div>
|
||||
|
||||
{* Listing All Avilable Players *}
|
||||
|
||||
{assign var='players' value=$cbplayer->get_players()}
|
||||
|
||||
<div class="templates_container">
|
||||
{foreach from=$players item=player}
|
||||
{if $player_file !=$player.file && $player_dir != $player.folder}
|
||||
|
||||
<div class="template_box" align="center">
|
||||
<img src="{$cbplayer->get_preview_thumb($player.folder)}" class="preview_thumb" >
|
||||
<div align="center" style="" class="tpl_title">
|
||||
{$player.name} <br /><em>by <strong><a href="{$player.author_page}">{$player.author}</a></strong></em><br />
|
||||
<a href="manage_players.php?set=yes&folder={$player.folder}&file={$player.file}">Activate This Player</a><br />
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
|
@ -34,7 +34,7 @@
|
|||
<tr>
|
||||
<td width="30" align="center" valign="middle"><img src="{$imageurl}/arrow_return.png" width="25" height="25"></td>
|
||||
<td height="50" style="padding-left:15px">
|
||||
<input type="submit" name="activate_selected" value="Activate" class="button"/>
|
||||
<input type="submit" name="activate_selected" value="Activate" class="button"/>
|
||||
<input type="submit" name="deactivate_selected" value="Deactivate" class="button" />
|
||||
<input type="submit" name="make_featured_selected" value="Make Featured" class="button"/>
|
||||
<input type="submit" name="make_unfeatured_selected" value="Make Unfeatured" class="button"/>
|
||||
|
|
|
@ -49,6 +49,8 @@ a{font-size:12px; font-weight:bold; text-decoration:none; color:#147dc3; font-fa
|
|||
-webkit-border-radius: 5px; border:0px solid #EAEEFF;} .vdo_sets{font-size:11px; text-transform:uppercase; font-family: Consolas, Monaco, Courier, monospace;}
|
||||
|
||||
|
||||
|
||||
.setting_title{font-size:18px; margin-bottom:5px 0px 5px 0px;}
|
||||
/**
|
||||
* Forms
|
||||
*/
|
||||
|
@ -68,7 +70,8 @@ a{font-size:12px; font-weight:bold; text-decoration:none; color:#147dc3; font-fa
|
|||
|
||||
/**
|
||||
* Forms End
|
||||
*/
|
||||
*/
|
||||
.block_head tr td{padding:0px 2px 0px 2px}
|
||||
.block tr td{padding:2px; border-bottom:1px dotted #eee; }
|
||||
.block tr:hover{background-color:#f8f8f8}
|
||||
|
||||
|
@ -128,4 +131,7 @@ padding-left:5px; font-size:16px; font-weight:bold; font-family:Arial, Helvetica
|
|||
}
|
||||
.templates_container .tpl_title{width:80%; margin:auto; font-size:12px;}
|
||||
.templates_container .template_box{width:200px; float:left; margin:10px; padding:10px}
|
||||
.templates_container .template_box:hover{background-color:#F3E8FF}
|
||||
.templates_container .template_box:hover{background-color:#F3E8FF}
|
||||
|
||||
|
||||
.preview_thumb{max-width:175px; max-height:175px}
|
|
@ -11,7 +11,12 @@
|
|||
|
||||
if(has_access('admin_access',TRUE))
|
||||
{
|
||||
register_anchor('my_func','watch_admin_options');
|
||||
function show_video_admin_link($data)
|
||||
{
|
||||
echo '<a href="'.ADMIN_BASEURL.'/edit_video.php?video='.$data['videoid'].'">Edit Video</a>';
|
||||
}
|
||||
|
||||
register_anchor_function('show_video_admin_link','watch_admin_options');
|
||||
}
|
||||
|
||||
?>
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
define("BACK_END",TRUE);
|
||||
define("FRONT_END",FALSE);
|
||||
//Admin Area
|
||||
$admin_area = TRUE;
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
* @ Version : v1.8
|
||||
*/
|
||||
|
||||
|
||||
class ClipBucket
|
||||
{
|
||||
var $BASEDIR;
|
||||
|
@ -28,6 +27,15 @@ class ClipBucket
|
|||
var $cur_template = 'clipbucketblue';
|
||||
var $links = array();
|
||||
|
||||
/**
|
||||
* All Functions that are called
|
||||
* before after converting a video
|
||||
* are saved in these arrays
|
||||
*/
|
||||
|
||||
var $before_convert_functions = array();
|
||||
var $after_convert_functions = array();
|
||||
|
||||
function ClipBucket ()
|
||||
{
|
||||
global $pages;
|
||||
|
@ -69,8 +77,9 @@ class ClipBucket
|
|||
)
|
||||
);
|
||||
|
||||
$this->temp_exts = array('ahz','jhz','abc','xyz','cb2','tmp','olo','oar','oz','luffy','zoro','nami','chopper','ussop','sanji');
|
||||
$this->temp_exts = array('ahz','jhz','abc','xyz','cb2','tmp','olo','oar','ozz');
|
||||
$this->template = $this->configs['template_dir'];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -234,8 +243,15 @@ class ClipBucket
|
|||
'View Encoding Status'=>'',
|
||||
),
|
||||
|
||||
//Playes
|
||||
'Manage Players'=>
|
||||
array
|
||||
(
|
||||
'Manage Players' => 'manage_players.php'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
return $menu_array;
|
||||
}
|
||||
|
||||
|
@ -327,6 +343,7 @@ class ClipBucket
|
|||
|
||||
define('TEMPLATE',$template);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
|
@ -18,8 +18,8 @@ class AdsManager
|
|||
global $LANG;
|
||||
|
||||
$name = mysql_clean($_POST['name']);
|
||||
$code = mysql_clean(htmlspecialchars($_POST['code']));
|
||||
$placement = mysql_clean($_POST['type']);
|
||||
$code = mysql_real_escape_string(htmlspecialchars($_POST['code']));
|
||||
$placement = mysql_clean($_POST['placement']);
|
||||
$category = $_POST['category'];
|
||||
$status = $_POST['status'];
|
||||
|
||||
|
@ -65,9 +65,9 @@ class AdsManager
|
|||
|
||||
function EditAd($id){
|
||||
global $LANG;
|
||||
$placement = mysql_clean($_POST['type']);
|
||||
$placement = mysql_clean($_POST['placement']);
|
||||
$name = mysql_clean($_POST['name']);
|
||||
$code = htmlspecialchars($_POST['code']);
|
||||
$code = mysql_real_escape_string(htmlspecialchars($_POST['code']));
|
||||
$category = mysql_clean(@$_POST['category']);
|
||||
if(empty($name)){
|
||||
$msg = e($LANG['ad_name_error']);
|
||||
|
@ -193,5 +193,73 @@ class AdsManager
|
|||
$db->Execute($query);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function usd to get all placemetns
|
||||
*/
|
||||
function get_placements()
|
||||
{
|
||||
global $db;
|
||||
|
||||
$result = $db->select("ads_placements");
|
||||
if($db->num_rows>0)
|
||||
return $result;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to get all advertisments
|
||||
*/
|
||||
function get_advertisements()
|
||||
{
|
||||
global $db;
|
||||
|
||||
$result = $db->select("ads_data");
|
||||
if($db->num_rows>0)
|
||||
return $result;
|
||||
else
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to get placement
|
||||
*/
|
||||
function get_placement($place)
|
||||
{
|
||||
global $db;
|
||||
$result = $db->select("ads_placements","*"," placement='$place' OR placement_id='$place' ");
|
||||
if($db->num_rows>0)
|
||||
return $result[0];
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to create placement name
|
||||
*/
|
||||
function get_placement_name($place)
|
||||
{
|
||||
$details = $this->get_placement($place);
|
||||
if($details)
|
||||
return $details['placement_name'];
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to get advertismetn
|
||||
*/
|
||||
function get_ad_details($id)
|
||||
{
|
||||
global $db;
|
||||
$result = $db->select("ads_data","*"," ad_placement='$id' OR ad_id='$id'");
|
||||
if($db->num_rows>0)
|
||||
return $result[0];
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
|
@ -26,8 +26,8 @@ class ffmpeg
|
|||
var $gen_thumbs; //If set to TRUE , it will generate thumbnails also
|
||||
var $remove_input = TRUE;
|
||||
var $gen_big_thumb = FALSE;
|
||||
var $two_pass = FALSE;
|
||||
|
||||
var $h264_single_pass = FALSE;
|
||||
var $hq_output_file = '';
|
||||
|
||||
|
||||
/**
|
||||
|
@ -84,6 +84,7 @@ class ffmpeg
|
|||
*/
|
||||
function convert($file=NULL)
|
||||
{
|
||||
global $db;
|
||||
if($file)
|
||||
$this->input_file = $file;
|
||||
|
||||
|
@ -93,6 +94,7 @@ class ffmpeg
|
|||
$p = $this->configs;
|
||||
$i = $this->input_details;
|
||||
|
||||
echo test;
|
||||
|
||||
# Prepare the ffmpeg command to execute
|
||||
if(isset($p['extra_options']))
|
||||
|
@ -107,7 +109,9 @@ class ffmpeg
|
|||
$opt_av .= " -vcodec ".$p['video_codec'];
|
||||
elseif(isset($i['video_codec']))
|
||||
$opt_av .= " -vcodec ".$i['video_codec'];
|
||||
|
||||
if($p['video_codec'] == 'libx264')
|
||||
$opt_av .= " -vpre normal ";
|
||||
|
||||
# video rate
|
||||
if($p['use_video_rate'])
|
||||
{
|
||||
|
@ -153,7 +157,10 @@ class ffmpeg
|
|||
elseif(isset($i['audio_bitrate']))
|
||||
$abrate = $i['audio_bitrate'];
|
||||
if(!empty($abrate))
|
||||
$opt_av .= " -ab $abrate ";
|
||||
{
|
||||
$abrate_cmd = " -ab $abrate ";
|
||||
$opt_av .= $abrate_cmd;
|
||||
}
|
||||
}
|
||||
|
||||
# audio bitrate
|
||||
|
@ -169,19 +176,12 @@ class ffmpeg
|
|||
|
||||
$opt_av .= " -map_meta_data ".$this->output_file.":".$this->input_file;
|
||||
|
||||
if(!$this->two_pass)
|
||||
$command = $this->ffmpeg." -i ".$this->input_file." $opt_av ".$this->output_file." 2> ".TEMP_DIR."/output.tmp ";
|
||||
else
|
||||
if($this->h264_single_pass)
|
||||
{
|
||||
//Before Converting video to HQ , we must check weather
|
||||
// ITS Hq Or Not
|
||||
|
||||
$options = "-vcodec libx264 -b 512k -flags +loop+mv4 -cmp 256
|
||||
-partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8
|
||||
-me_method hex -subq 7 -trellis 1 -refs 5 -bf 3
|
||||
-flags2 +bpyramid+wpred+mixed_refs+dct8x8 -coder 1 -me_range 16
|
||||
-g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -qmin 10
|
||||
-qmax 51 -qdiff 4";
|
||||
|
||||
$command = $this->ffmpeg." -i ".$this->input_file." -an -pass 1 -threads 2 $options ".$this->output_file." 2> ".TEMP_DIR."/output.tmp ";
|
||||
$command = $this->ffmpeg." -i ".$this->input_file." -acodec libfaac -ab 96k -vcodec libx264 -vpre hq -crf 22 -threads 0 ".$this->hq_output_file." 2> ".TEMP_DIR."/output.tmp ";
|
||||
$output = $this->exec($command);
|
||||
if(file_exists(TEMP_DIR.'/output.tmp'))
|
||||
{
|
||||
|
@ -189,8 +189,16 @@ class ffmpeg
|
|||
unlink(TEMP_DIR.'/output.tmp');
|
||||
}
|
||||
|
||||
$command = $this->ffmpeg." -y -i ".$this->input_file." -acodec libfaac -ar 44100 -ab 96k -pass 2 -threads 2 $options ".$this->output_file." 2> ".TEMP_DIR."/output.tmp ";
|
||||
$this->log('HQ Video -- Conversion Command',$command);
|
||||
$this->log .="\r\n\r\nConversion Details\r\n\r\n";
|
||||
$this->log .=$output;
|
||||
$this->log .= "\r\n\r\n\n=========ENDING HQ CONVERSION==============\n\n";
|
||||
}
|
||||
|
||||
$command = $this->ffmpeg." -i ".$this->input_file." $opt_av ".$this->output_file." 2> ".TEMP_DIR."/output.tmp ";
|
||||
|
||||
//Updating DB
|
||||
$db->update($this->tbl,array('command_used'),array($command)," id = '".$this->row_id."'");
|
||||
|
||||
$output = $this->exec($command);
|
||||
if(file_exists(TEMP_DIR.'/output.tmp'))
|
||||
|
|
182
upload/includes/classes/player.class.php
Normal file
|
@ -0,0 +1,182 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Function used to handle players
|
||||
*/
|
||||
|
||||
|
||||
|
||||
class CBPlayer
|
||||
{
|
||||
|
||||
/**
|
||||
* Function used to read player directory and get list of all available players
|
||||
*/
|
||||
function getPlayers()
|
||||
{
|
||||
#first we will read the plugin directory
|
||||
$dir = PLAYER_DIR;
|
||||
$dir_list = scandir($dir);
|
||||
foreach($dir_list as $item)
|
||||
{
|
||||
if($item=='..' || $item=='.' || substr($item,0,1)=='_'|| substr($item,0,1)=='.')
|
||||
{
|
||||
//Skip $item_list[] = $item;
|
||||
//$sub_dir_list = scandir(PLAYER_DIR.'/'.$item);
|
||||
}else{
|
||||
//Now CHecking if its file, not a directory
|
||||
if(!is_dir(PLAYER_DIR.'/'.$item))
|
||||
{
|
||||
$item_list[] = $item;
|
||||
}else{
|
||||
$sub_dir = $item;
|
||||
$sub_dir_list = scandir(PLAYER_DIR.'/'.$item);
|
||||
foreach($sub_dir_list as $item)
|
||||
{
|
||||
if($item=='..' || $item=='.' || substr($item,0,1)=='_'|| substr($item,0,1)=='.')
|
||||
{
|
||||
//Skip $item_list[] = $item;
|
||||
//$sub_dir_list = scandir(PLUG_DIR.'/'.$item);
|
||||
}else{
|
||||
//Now CHecking if its file, not a directory
|
||||
if(!is_dir(PLAYER_DIR.'/'.$sub_dir.'/'.$item))
|
||||
{
|
||||
$subitem_list[$sub_dir][] = $item;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//Our Plugin List has plugin main files only, now star reading files
|
||||
foreach($item_list as $player_file)
|
||||
{
|
||||
$player_details = $this->getPlayerDetails($player_file);
|
||||
if(!empty($player_details['name']))
|
||||
$player_array[]= $player_details;
|
||||
}
|
||||
|
||||
//Now Reading Sub Dir Files
|
||||
foreach($subitem_list as $sub_dir => $sub_dir_list )
|
||||
{
|
||||
foreach($subitem_list[$sub_dir] as $player_file)
|
||||
{
|
||||
$player_details = $this->getPlayerDetails($player_file,$sub_dir);
|
||||
$player_details['dir'] = $player_details['folder'] = $sub_dir;
|
||||
if(!empty($player_details['name']))
|
||||
$player_array[] = $player_details;
|
||||
}
|
||||
}
|
||||
|
||||
return $player_array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to get ClipBucket Player
|
||||
*/
|
||||
function get_players()
|
||||
{
|
||||
return $this->getPlayers();
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to get player details
|
||||
* @input = file
|
||||
*/
|
||||
function get_player_details($player_file,$sub_dir=NULL)
|
||||
{
|
||||
if($sub_dir!='')
|
||||
$sub_dir = $sub_dir.'/';
|
||||
|
||||
$file = PLAYER_DIR.'/'.$sub_dir.$player_file;
|
||||
if(file_exists($file) && is_file($file))
|
||||
{
|
||||
// We don't need to write to the file, so just open for reading.
|
||||
$fp = fopen($file, 'r');
|
||||
// Pull only the first 8kiB of the file in.
|
||||
$plugin_data = fread( $fp, 8192 );
|
||||
// PHP will close file handle, but we are good citizens.
|
||||
fclose($fp);
|
||||
preg_match( '/Player Name:(.*)$/mi', $plugin_data, $name );
|
||||
preg_match( '/Website:(.*)$/mi', $plugin_data, $website );
|
||||
preg_match( '/Version:(.*)/mi', $plugin_data, $version );
|
||||
preg_match( '/Description:(.*)$/mi', $plugin_data, $description );
|
||||
preg_match( '/Author:(.*)$/mi', $plugin_data, $author );
|
||||
preg_match( '/Author Website:(.*)$/mi', $plugin_data, $author_page );
|
||||
preg_match( '/ClpBucket Version:(.*)$/mi', $plugin_data, $cbversion );
|
||||
preg_match( '/Player Type:(.*)$/mi', $plugin_data, $type );
|
||||
|
||||
$details_array = array
|
||||
(
|
||||
'name',
|
||||
'website',
|
||||
'version',
|
||||
'description',
|
||||
'author',
|
||||
'cbversion',
|
||||
'author_page',
|
||||
'code',
|
||||
'type',
|
||||
|
||||
);
|
||||
foreach ($details_array as $detail)
|
||||
{
|
||||
$plugin_array[$detail]=${$detail}[1];
|
||||
}
|
||||
$plugin_array['file'] = $player_file;
|
||||
$plugin_array['dir'] = $plugin_array['folder'] = $sub_dir;
|
||||
$plugin_array['code'] = preg_replace('/\s/', '', $code[1]);
|
||||
|
||||
return $plugin_array;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function getPlayerDetails($file,$sub_dir=NULL)
|
||||
{
|
||||
return $this->get_player_details($file,$sub_dir);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function used to get template thumb
|
||||
*/
|
||||
function get_preview_thumb($player)
|
||||
{
|
||||
$path = $player.'/preview.';
|
||||
$exts = array('png','jpg','gif');
|
||||
$thumb_path = BASEURL.'/images/icons/no_thumb.png';
|
||||
foreach($exts as $ext)
|
||||
{
|
||||
$file = PLAYER_DIR.'/'.$path.$ext;
|
||||
if(file_exists($file))
|
||||
{
|
||||
$thumb_path = PLAYER_URL.'/'.$path.$ext;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $thumb_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to set player for ClipBucket
|
||||
*/
|
||||
function set_player($details)
|
||||
{
|
||||
global $myquery;
|
||||
|
||||
if($this->getPlayerDetails($details['file'],$details['folder']))
|
||||
{
|
||||
$myquery->Set_Website_Details('player_file',$details['file']);
|
||||
$myquery->Set_Website_Details('player_dir',$details['folder']);
|
||||
e("Player has been activated",m);
|
||||
}else
|
||||
e("An error occured while activating player");
|
||||
}
|
||||
function setplayer($details)
|
||||
{
|
||||
return $this->set_player($details);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
|
@ -213,7 +213,7 @@ class CBPlugin extends ClipBucket
|
|||
preg_match( '/Author:(.*)$/mi', $plugin_data, $author );
|
||||
preg_match( '/Author Website:(.*)$/mi', $plugin_data, $author_page );
|
||||
preg_match( '/ClpBucket Version:(.*)$/mi', $plugin_data, $cbversion );
|
||||
preg_match( '/Plugint Type:(.*)$/mi', $plugin_data, $type );
|
||||
preg_match( '/Plugin Type:(.*)$/mi', $plugin_data, $type );
|
||||
|
||||
$details_array = array
|
||||
(
|
||||
|
@ -224,6 +224,7 @@ class CBPlugin extends ClipBucket
|
|||
'author',
|
||||
'cbversion',
|
||||
'code',
|
||||
'author_page',
|
||||
'type',
|
||||
|
||||
);
|
||||
|
|
|
@ -11,16 +11,21 @@ class SWFObject
|
|||
{
|
||||
|
||||
//var Code
|
||||
var $objName = 'FlashObject';
|
||||
var $DivId = 'videoplayer';
|
||||
var $objName = 'SWFObject';
|
||||
var $DivId = 'videoPlayer';
|
||||
var $code = '';
|
||||
var $playerFile = '';
|
||||
var $width = '450';
|
||||
var $height = '378';
|
||||
|
||||
var $PlayerVer = '7';
|
||||
var $bgcolor = '#FFFFFF';
|
||||
var $playerVar = 'player';
|
||||
|
||||
function SWFObject()
|
||||
{
|
||||
$this->width = config('player_width');
|
||||
$this->height = config('player_height');
|
||||
}
|
||||
|
||||
//Function Used TO Create Player
|
||||
function CreatePlayer(){
|
||||
$this->SelectPlayer();
|
||||
|
@ -88,9 +93,9 @@ var $playerVar = 'player';
|
|||
}
|
||||
|
||||
//function for Embed Code
|
||||
function EmbedCode($code){
|
||||
function EmbedCode($code,$div){
|
||||
$this->code = 'var EmbedCode="'.addslashes($code).'";'."\r\n";
|
||||
$this->code .= "innerHtmlDiv('".$this->DivId."',EmbedCode)";
|
||||
$this->code .= "innerHtmlDiv('".$div."',EmbedCode)";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1169,6 +1169,16 @@ class userquery {
|
|||
}function get_user_fields($uid,$field){return $this->get_user_field($uid,$field);}
|
||||
|
||||
|
||||
/**
|
||||
* This function will return
|
||||
* user field without array
|
||||
*/
|
||||
function get_user_field_only($uid,$field)
|
||||
{
|
||||
$fields = $this->get_user_field($uid,$field);
|
||||
return $fields[$field];
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to get user level and its details
|
||||
* @param INT userid
|
||||
|
@ -1430,5 +1440,15 @@ class userquery {
|
|||
{
|
||||
return $this->get_user_fields(user_id(),'username');
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to create profile link
|
||||
*/
|
||||
function profile_link($udetails)
|
||||
{
|
||||
if(!is_array($udetails) && is_numeric($udetails))
|
||||
$udetails = $this->get_user_details($udetails);
|
||||
return BASEURL.'/view_profile.php?uid='.$udetails['userid'];
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
class CBvideo extends CBCategory
|
||||
{
|
||||
var $embed_func_list = array(); //Function list that are applied while asking for video embed code
|
||||
|
||||
/**
|
||||
* __Constructor of CBVideo
|
||||
*/
|
||||
|
@ -350,6 +352,43 @@ class CBvideo extends CBCategory
|
|||
global $myquery;
|
||||
return $myquery->add_comment($comment,$obj_id,$reply_to,'v');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function used to generate Embed Code
|
||||
*/
|
||||
function embed_code($vdetails)
|
||||
{
|
||||
//Checking for video details
|
||||
if(!is_array($vdetails))
|
||||
{
|
||||
$vdetails = $this->get_video($vdetails);
|
||||
}
|
||||
|
||||
$embed_code = false;
|
||||
|
||||
$funcs = $this->embed_func_listl;
|
||||
if(is_array($funcs))
|
||||
{
|
||||
foreach($funcs as $func)
|
||||
{
|
||||
if(@function_exists($func))
|
||||
$embed_code = $func($vdetails);
|
||||
}
|
||||
}
|
||||
|
||||
if(!$embed_code)
|
||||
{
|
||||
//Default ClipBucket Embed Code
|
||||
if(function_exists('default_embed_code'))
|
||||
{
|
||||
$embed_code = default_embed_code($vdetails);
|
||||
}
|
||||
}
|
||||
|
||||
return $embed_code;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ if(file_exists(dirname(__FILE__).'/../install/isinstall.php')){
|
|||
require_once('classes/image.class.php');
|
||||
require_once('classes/category.class.php');
|
||||
require_once('classes/video.class.php');
|
||||
require_once('classes/player.class.php');
|
||||
require_once 'languages.php';
|
||||
|
||||
$pages = new pages();
|
||||
|
@ -82,9 +83,9 @@ if(file_exists(dirname(__FILE__).'/../install/isinstall.php')){
|
|||
$lang_obj = new language;
|
||||
$sess = new Session();
|
||||
$cblog = new CBLogs();
|
||||
$swfobj = new SWFObject();
|
||||
$imgObj = new ResizeImage();
|
||||
$cbvideo = $cbvid = new CBvideo();
|
||||
$cbplayer = new CBPlayer();
|
||||
|
||||
//Initializng Userquery class
|
||||
$userquery->init();
|
||||
|
@ -194,6 +195,7 @@ error_reporting(E_ALL ^ E_NOTICE ^E_DEPRECATED);
|
|||
define('SUBTITLE',$row['code_dev']);
|
||||
define('JSDIR','js'); //Javascript Directory Name
|
||||
define('ADMINDIR','admin_area'); //Admin Accissble Folder
|
||||
define('ADMIN_BASEURL',BASEURL.'/'.ADMINDIR);
|
||||
define('MODULEDIR',BASEDIR.'/modules'); //Modules Directory
|
||||
|
||||
//DIRECT PATHS OF VIDEO FILES
|
||||
|
@ -266,8 +268,9 @@ error_reporting(E_ALL ^ E_NOTICE ^E_DEPRECATED);
|
|||
|
||||
$cbtpl = new CBTemplate();
|
||||
$cbobjects = new CBObjects();
|
||||
|
||||
$is_admin = $userquery->admin_check();
|
||||
$swfobj = new SWFObject();
|
||||
|
||||
$is_admin = $userquery->admin_check();
|
||||
if ($is_admin == 1)
|
||||
{
|
||||
Assign('is_admin',$is_admin);
|
||||
|
@ -364,6 +367,7 @@ $Smarty->assign_by_ref('lang_obj', $lang_obj);
|
|||
$Smarty->assign_by_ref('cbvid', $cbvid);
|
||||
$Smarty->assign_by_ref('cbtpl',$cbtpl);
|
||||
$Smarty->assign_by_ref('cbobjects',$cbobjects);
|
||||
$Smarty->assign_by_ref('cbplayer',$cbplayer);
|
||||
|
||||
/*
|
||||
REGISERTING FUNCTION FOR SMARTY TEMPLATES
|
||||
|
@ -374,7 +378,7 @@ $Smarty->register_function('AD','getAd');
|
|||
$Smarty->register_function('get_thumb','getSmartyThumb');
|
||||
$Smarty->register_function('getThumb','getSmartyThumb');
|
||||
$Smarty->register_function('videoLink','videoSmartyLink');
|
||||
$Smarty->register_function('pullRating','pullSmartyRating');
|
||||
$Smarty->register_function('show_rating','show_rating');
|
||||
$Smarty->register_function('ANCHOR','ANCHOR');
|
||||
$Smarty->register_function('FUNC','FUNC');
|
||||
$Smarty->register_function('avatar','avatar');
|
||||
|
@ -383,6 +387,7 @@ $Smarty->register_function('get_all_video_files',get_all_video_files_smarty);
|
|||
$Smarty->register_function('input_value','input_value');
|
||||
$Smarty->register_function('userid','userid');
|
||||
$Smarty->register_function('FlashPlayer','flashPlayer');
|
||||
$Smarty->register_function('HQFlashPlayer','HQflashPlayer');
|
||||
$Smarty->register_function('link','cblink');
|
||||
|
||||
$Smarty->register_modifier('SetTime','SetTime');
|
||||
|
@ -393,6 +398,7 @@ $Smarty->register_modifier('get_from_val','get_from_val');
|
|||
$Smarty->register_modifier('post_form_val','post_form_val');
|
||||
$Smarty->register_modifier('request_form_val','request_form_val');
|
||||
$Smarty->register_modifier('get_thumb_num','get_thumb_num');
|
||||
$Smarty->register_modifier('ad','ad');
|
||||
|
||||
|
||||
/*
|
||||
|
@ -403,10 +409,5 @@ register_action_remove_video('remove_video_log');
|
|||
register_action_remove_video('remove_video_files');
|
||||
|
||||
|
||||
/**
|
||||
* Include ClipBucket's Default Player
|
||||
*/
|
||||
include(PLAYER_DIR.'/cbplayer/cbplayer.plug.php');
|
||||
|
||||
include('admin.functions.php');
|
||||
?>
|
|
@ -2,6 +2,9 @@
|
|||
/*
|
||||
Config.Inc.php
|
||||
*/
|
||||
define("FRONT_END",TRUE);
|
||||
define("BACK_END",FALSE);
|
||||
|
||||
include('common.php');
|
||||
|
||||
define('TEMPLATEDIR',BASEDIR.'/'.TEMPLATEFOLDER.'/'.TEMPLATE);
|
||||
|
@ -40,7 +43,7 @@ if($row['closed'] == 1){
|
|||
exit();
|
||||
}
|
||||
}
|
||||
$AdminArea = false;
|
||||
|
||||
include('plugins.php');
|
||||
|
||||
//Assigning JS Files
|
||||
|
|
|
@ -179,161 +179,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
// -------------RATING FUNCTION---------------- //
|
||||
|
||||
function getRating($id){
|
||||
|
||||
$total = 0;
|
||||
$rows = 0;
|
||||
|
||||
$sel = mysql_query("SELECT * FROM video WHERE videoid = '$id'");
|
||||
if(mysql_num_rows($sel) > 0){
|
||||
$data = mysql_fetch_assoc($sel);
|
||||
|
||||
//$newPerc = round($perc/5)*5;
|
||||
//return $newPerc.'%';
|
||||
|
||||
$newPerc = round($data['rating']*10,2);
|
||||
return $newPerc.'%';
|
||||
|
||||
} else {
|
||||
|
||||
return '0%';
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function outOfFive($id){
|
||||
|
||||
$total = 0;
|
||||
$rows = 0;
|
||||
|
||||
$sel = mysql_query("SELECT * FROM video WHERE videoid = '$id'");
|
||||
if(mysql_num_rows($sel) > 0){
|
||||
$data = mysql_fetch_assoc($sel);
|
||||
|
||||
return round($data['rating']/2,2);
|
||||
//return round(($perc*2), 0)/2; // 3.5
|
||||
|
||||
} else {
|
||||
|
||||
return '0';
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function getVotes($id){
|
||||
|
||||
$sel = mysql_query("SELECT * FROM video WHERE videoid = '$id'");
|
||||
$data = mysql_fetch_assoc($sel);
|
||||
return $data['rated_by'];
|
||||
|
||||
}
|
||||
|
||||
function pullRating($id,$show5 = false, $showPerc = false, $showVotes = false, $static = NULL){
|
||||
global $row;
|
||||
// Check if they have already voted...
|
||||
$text = '';
|
||||
|
||||
$sel = mysql_query("SELECT * FROM video WHERE videoid = '$id'");
|
||||
$data = mysql_fetch_array($sel);
|
||||
$voter_id = $data['voter_ids'];
|
||||
@$userid = $_SESSION['userid'];
|
||||
$niddle = "|";
|
||||
$niddle .= $userid;
|
||||
$niddle .= "|";
|
||||
$flag = strstr($voter_id, $niddle);
|
||||
if($row['user_rate_opt1'] !='yes'){
|
||||
if($data['username'] == $_SESSION['username']){
|
||||
$static = 'novote';
|
||||
}
|
||||
}
|
||||
if(!empty($flag) || $static == 'novote' || !isset($_SESSION['userid']) || isset($_COOKIE['has_voted_'.$id]) ){
|
||||
|
||||
|
||||
|
||||
if($show5 || $showPerc || $showVotes){
|
||||
|
||||
$text .= '<div class="rated_text">';
|
||||
|
||||
}
|
||||
|
||||
if($show5){
|
||||
$text .= 'Rated <span id="outOfFive_'.$id.'" class="out5Class">'.outOfFive($id).'</span>/5';
|
||||
}
|
||||
if($showPerc){
|
||||
$text .= ' (<span id="percentage_'.$id.'" class="percentClass">'.getRating($id).'</span>)';
|
||||
}
|
||||
if($showVotes){
|
||||
$text .= ' (<span id="showvotes_'.$id.'" class="votesClass">'.getVotes($id).'</span>)';
|
||||
}
|
||||
|
||||
if($show5 || $showPerc || $showVotes){
|
||||
|
||||
$text .= '</div>';
|
||||
|
||||
}
|
||||
|
||||
|
||||
return $text.'
|
||||
<ul class="star-rating2" id="rater_'.$id.'">
|
||||
<li class="current-rating" style="width:'.getRating($id).';" id="ul_'.$id.'"></li>
|
||||
<li><a onclick="return false;" href="#" title="1 star out of 5" class="one-star" > </a></li>
|
||||
<li><a onclick="return false;" href="#" title="2 stars out of 5" class="two-stars"> </a></li>
|
||||
<li><a onclick="return false;" href="#" title="3 stars out of 5" class="three-stars"> </a></li>
|
||||
<li><a onclick="return false;" href="#" title="4 stars out of 5" class="four-stars"> </a></li>
|
||||
<li><a onclick="return false;" href="#" title="5 stars out of 5" class="five-stars"> </a></li>
|
||||
</ul>
|
||||
<div id="loading_'.$id.'"></div>';
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
if($show5 || $showPerc || $showVotes){
|
||||
|
||||
$text .= '<div class="rated_text">';
|
||||
|
||||
}
|
||||
if($show5){
|
||||
$show5bool = 'true';
|
||||
$text .= 'Rated <span id="outOfFive_'.$id.'" class="out5Class">'.outOfFive($id).'</span>/5';
|
||||
} else {
|
||||
$show5bool = 'false';
|
||||
}
|
||||
if($showPerc){
|
||||
$showPercbool = 'true';
|
||||
$text .= ' (<span id="percentage_'.$id.'" class="percentClass">'.getRating($id).'</span>)';
|
||||
} else {
|
||||
$showPercbool = 'false';
|
||||
}
|
||||
if($showVotes){
|
||||
$showVotesbool = 'true';
|
||||
$text .= ' (<span id="showvotes_'.$id.'" class="votesClass">'.getVotes($id).'</span>)';
|
||||
} else {
|
||||
$showVotesbool = 'false';
|
||||
}
|
||||
|
||||
if($show5 || $showPerc || $showVotes){
|
||||
|
||||
$text .= '</div>';
|
||||
|
||||
}
|
||||
|
||||
return $text.'
|
||||
<ul class="star-rating" id="rater_'.$id.'">
|
||||
<li class="current-rating" style="width:'.getRating($id).';" id="ul_'.$id.'"></li>
|
||||
<li><a href="javascript:void(0)" onclick="rate(\'1\',\''.$id.'\','.$show5bool.','.$showPercbool.','.$showVotesbool.'); return false;" href="rating_process.php?id='.$id.'&rating=1" title="1 star out of 5" class="one-star" > </a></li>
|
||||
<li><a href="javascript:void(0)" onclick="rate(\'2\',\''.$id.'\','.$show5bool.','.$showPercbool.','.$showVotesbool.'); return false;" href="rating_process.php?id='.$id.'&rating=2" title="2 stars out of 5" class="two-stars"> </a></li>
|
||||
<li><a href="javascript:void(0)" onclick="rate(\'3\',\''.$id.'\','.$show5bool.','.$showPercbool.','.$showVotesbool.'); return false;" href="rating_process.php?id='.$id.'&rating=3" title="3 stars out of 5" class="three-stars"> </a></li>
|
||||
<li><a href="javascript:void(0)" onclick="rate(\'4\',\''.$id.'\','.$show5bool.','.$showPercbool.','.$showVotesbool.'); return false;" href="rating_process.php?id='.$id.'&rating=4" title="4 stars out of 5" class="four-stars"> </a></li>
|
||||
<li><a href="javascript:void(0)" onclick="rate(\'5\',\''.$id.'\','.$show5bool.','.$showPercbool.','.$showVotesbool.'); return false;" href="rating_process.php?id='.$id.'&rating=5" title="5 stars out of 5" class="five-stars"> </a></li>
|
||||
</ul>
|
||||
<div id="loading_'.$id.'"></div>';
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Function Send Email
|
||||
|
@ -389,38 +234,53 @@ function pullRating($id,$show5 = false, $showPerc = false, $showVotes = false, $
|
|||
return substr($file, strrpos($file,'.') + 1);
|
||||
}
|
||||
|
||||
function SetTime($sec, $padHours = true) {
|
||||
|
||||
$hms = "";
|
||||
|
||||
// there are 3600 seconds in an hour, so if we
|
||||
// divide total seconds by 3600 and throw away
|
||||
// the remainder, we've got the number of hours
|
||||
$hours = intval(intval($sec) / 3600);
|
||||
|
||||
// add to $hms, with a leading 0 if asked for
|
||||
$hms .= ($padHours)
|
||||
? str_pad($hours, 2, "0", STR_PAD_LEFT). ':'
|
||||
: $hours. ':';
|
||||
|
||||
// dividing the total seconds by 60 will give us
|
||||
// the number of minutes, but we're interested in
|
||||
// minutes past the hour: to get that, we need to
|
||||
// divide by 60 again and keep the remainder
|
||||
$minutes = intval(($sec / 60) % 60);
|
||||
|
||||
// then add to $hms (with a leading 0 if needed)
|
||||
$hms .= str_pad($minutes, 2, "0", STR_PAD_LEFT). ':';
|
||||
|
||||
// seconds are simple - just divide the total
|
||||
// seconds by 60 and keep the remainder
|
||||
$seconds = intval($sec % 60);
|
||||
|
||||
// add to $hms, again with a leading 0 if needed
|
||||
$hms .= str_pad($seconds, 2, "0", STR_PAD_LEFT);
|
||||
|
||||
return $hms;
|
||||
}
|
||||
function old_set_time($temps)
|
||||
{
|
||||
round($temps);
|
||||
$heures = floor($temps / 3600);
|
||||
$minutes = round(floor(($temps - ($heures * 3600)) / 60));
|
||||
if ($minutes < 10)
|
||||
$minutes = "0" . round($minutes);
|
||||
$secondes = round($temps - ($heures * 3600) - ($minutes * 60));
|
||||
if ($secondes < 10)
|
||||
$secondes = "0" . round($secondes);
|
||||
return $minutes . ':' . $secondes;
|
||||
}
|
||||
function SetTime($sec, $padHours = true) {
|
||||
|
||||
if($sec < 3600)
|
||||
return old_set_time($sec);
|
||||
|
||||
$hms = "";
|
||||
|
||||
// there are 3600 seconds in an hour, so if we
|
||||
// divide total seconds by 3600 and throw away
|
||||
// the remainder, we've got the number of hours
|
||||
$hours = intval(intval($sec) / 3600);
|
||||
|
||||
// add to $hms, with a leading 0 if asked for
|
||||
$hms .= ($padHours)
|
||||
? str_pad($hours, 2, "0", STR_PAD_LEFT). ':'
|
||||
: $hours. ':';
|
||||
|
||||
// dividing the total seconds by 60 will give us
|
||||
// the number of minutes, but we're interested in
|
||||
// minutes past the hour: to get that, we need to
|
||||
// divide by 60 again and keep the remainder
|
||||
$minutes = intval(($sec / 60) % 60);
|
||||
|
||||
// then add to $hms (with a leading 0 if needed)
|
||||
$hms .= str_pad($minutes, 2, "0", STR_PAD_LEFT). ':';
|
||||
|
||||
// seconds are simple - just divide the total
|
||||
// seconds by 60 and keep the remainder
|
||||
$seconds = intval($sec % 60);
|
||||
|
||||
// add to $hms, again with a leading 0 if needed
|
||||
$hms .= str_pad($seconds, 2, "0", STR_PAD_LEFT);
|
||||
|
||||
return $hms;
|
||||
}
|
||||
|
||||
//Simple Validation
|
||||
function isValidText($text){
|
||||
|
@ -708,7 +568,12 @@ function SetTime($sec, $padHours = true) {
|
|||
function getAd($params,&$Smarty)
|
||||
{
|
||||
global $adsObj;
|
||||
$data = $adsObj->getAd($params['place']);
|
||||
$data = '';
|
||||
if($params['style'] || $params['class'] || $params['align'])
|
||||
$data .= '<div style="'.$params['style'].'" class="'.$params['class'].'" align="'.$params['align'].'">';
|
||||
$data .= ad($adsObj->getAd($params['place']));
|
||||
if($params['style'] || $params['class'] || $params['align'])
|
||||
$data .= '</div>';
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
@ -1304,7 +1169,7 @@ function SetTime($sec, $padHours = true) {
|
|||
/**
|
||||
* Function use to get video files
|
||||
*/
|
||||
function get_video_file($vdetails,$return_default=true,$with_path=true,$multi=false,$count_only=false)
|
||||
function get_video_file($vdetails,$return_default=true,$with_path=true,$multi=false,$count_only=false,$hq=false)
|
||||
{
|
||||
# checking if there is any other functions
|
||||
# available
|
||||
|
@ -1344,10 +1209,33 @@ function SetTime($sec, $padHours = true) {
|
|||
return $files;
|
||||
if($count_only)
|
||||
return count($files);
|
||||
|
||||
foreach($files as $file)
|
||||
{
|
||||
if($hq)
|
||||
{
|
||||
if(getext($file)=='mp4')
|
||||
{
|
||||
return $file;
|
||||
break;
|
||||
}
|
||||
}else{
|
||||
return $file;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $files[0];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* FUnction used to get HQ ie mp4 video
|
||||
*/
|
||||
function get_hq_video_file($vdetails)
|
||||
{
|
||||
return get_video_file($vdetails,true,true,false,false,true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function used to display flash player for ClipBucket video
|
||||
|
@ -1356,6 +1244,8 @@ function SetTime($sec, $padHours = true) {
|
|||
{
|
||||
global $Cbucket,$swfobj;
|
||||
|
||||
$param['player_div'] = $param['player_div'] ? $param['player_div'] : 'videoPlayer';
|
||||
|
||||
$key = $param['key'];
|
||||
$flv = $param['flv'].'.flv';
|
||||
$code = $param['code'];
|
||||
|
@ -1371,38 +1261,28 @@ function SetTime($sec, $padHours = true) {
|
|||
{
|
||||
if(function_exists($funcs))
|
||||
{
|
||||
$func_data = $funcs($param['vdetails']);
|
||||
$func_data = $funcs($param);
|
||||
}
|
||||
if($func_data)
|
||||
return $func_data;
|
||||
}
|
||||
}
|
||||
|
||||
#checking video file
|
||||
$file = get_video_file($param['vdetails']);
|
||||
|
||||
|
||||
|
||||
//Getting Player
|
||||
$player = get_player();
|
||||
$swfobj->playerFile = BASEURL.'/player/'.FLVPLAYER;
|
||||
$swfobj->FlashObj();
|
||||
//Writing Param
|
||||
$swfobj->addParam('allowfullscreen','true');
|
||||
$swfobj->addParam('allowscriptaccess','always');
|
||||
$swfobj->addParam('quality','high');
|
||||
$swfobj->addVar('baseurl',BASEURL);
|
||||
$swfobj->addVar('video',get_video_file($param['vdetails'],false,true));
|
||||
|
||||
if(!empty($flv_url) && GetExt($flv_url)=='flv'){
|
||||
$swfobj->addVar('file_url',urldecode($flv_url));
|
||||
}else{
|
||||
$swfobj->addVar('file_url',$file );
|
||||
}
|
||||
$swfobj->CreatePlayer();
|
||||
return $swfobj->code;
|
||||
if(function_exists('cbplayer'))
|
||||
return cbplayer($param,true);
|
||||
return blank_screen($param);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* FUnctiuon used to plya HQ videos
|
||||
*/
|
||||
function HQflashPlayer($param,&$Smarty)
|
||||
{
|
||||
return flashPlayer($param,&$Smarty);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function used to get player from website settings
|
||||
*/
|
||||
|
@ -1635,17 +1515,17 @@ function SetTime($sec, $padHours = true) {
|
|||
}
|
||||
}
|
||||
|
||||
$count = 1;
|
||||
if(is_array($cat_array))
|
||||
$count = 1;
|
||||
if(is_array($cat_array))
|
||||
{
|
||||
foreach($cat_array as $cat)
|
||||
{
|
||||
foreach($cat_array as $cat)
|
||||
{
|
||||
echo '<a href="'.$cat[0].'">'.$cat[1].'</a>';
|
||||
if($count!=count($cat_array))
|
||||
echo ', ';
|
||||
$count++;
|
||||
}
|
||||
echo '<a href="'.$cat[0].'">'.$cat[1].'</a>';
|
||||
if($count!=count($cat_array))
|
||||
echo ', ';
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -2015,4 +1895,130 @@ function SetTime($sec, $padHours = true) {
|
|||
|
||||
return $cats;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function used to show rating
|
||||
* @inputs
|
||||
* class : class used to show rating usually rating_stars
|
||||
* rating : rating of video or something
|
||||
* ratings : number of rating
|
||||
* total : total rating or out of
|
||||
*/
|
||||
function show_rating($params,&$Smarty)
|
||||
{
|
||||
$class = $params['class'] ? $params['class'] : 'rating_stars';
|
||||
$rating = $params['rating'];
|
||||
$ratings = $params['ratings'];
|
||||
$total = $params['total'];
|
||||
|
||||
//Checking Percent
|
||||
if($rating<=0)
|
||||
$perc = '0';
|
||||
else
|
||||
{
|
||||
if($total<=1)
|
||||
$total = 1;
|
||||
$perc = $rating*100/$total;
|
||||
}
|
||||
|
||||
$perc = $perc.'%';
|
||||
|
||||
$rating = '<div class="'.$class.'">
|
||||
<div class="stars_blank">
|
||||
<div class="stars_filled" style="width:'.$perc.'"> </div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>';
|
||||
return $rating;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function used to display
|
||||
* Blank Screen
|
||||
* if there is nothing to play or to show
|
||||
* then who a blank screen
|
||||
*/
|
||||
function blank_screen($data)
|
||||
{
|
||||
global $swfobj;
|
||||
$code = '<div class="blank_screen" align="center">No Player or Video File Found - Unable to Play Any Video</div>';
|
||||
$swfobj->EmbedCode(unhtmlentities($code),$data['player_div']);
|
||||
return $swfobj->code;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function used to check weather video has Mp4 file or not
|
||||
*/
|
||||
function has_hq($vdetails)
|
||||
{
|
||||
$file = get_hq_video_file($vdetails);
|
||||
if(getext($file)=='mp4')
|
||||
return $file;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function used to display an ad
|
||||
*/
|
||||
function ad($in)
|
||||
{
|
||||
return stripslashes(htmlspecialchars_decode($in));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function used to get
|
||||
* available function list
|
||||
* for special place , read docs.clip-bucket.com
|
||||
*/
|
||||
function get_functions($name)
|
||||
{
|
||||
global $Cbucket;
|
||||
$funcs = $CBucket->get_functions;
|
||||
if(is_array($funcs) && count($funcs)>0)
|
||||
return $funcs;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function used to add js in ClipBuckets JSArray
|
||||
* see docs.clip-bucket.com
|
||||
*/
|
||||
function add_js($files)
|
||||
{
|
||||
global $Cbucket;
|
||||
return $Cbucket->addJS($files);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function add_header()
|
||||
* this will be used to add new files in header array
|
||||
* this is basically for plugins
|
||||
* for specific page array('page'=>'file')
|
||||
* ie array('uploadactive'=>'datepicker.js')
|
||||
*/
|
||||
function add_header($files)
|
||||
{
|
||||
global $Cbucket;
|
||||
return $Cbucket->add_header($files);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function used to get config value
|
||||
* of ClipBucket
|
||||
*/
|
||||
function config($input)
|
||||
{
|
||||
global $Cbucket;
|
||||
return $Cbucket->configs[$input];
|
||||
}
|
||||
function get_config($input){ return config($input); }
|
||||
|
||||
?>
|
|
@ -73,7 +73,12 @@
|
|||
foreach($funcs as $func)
|
||||
{
|
||||
if(function_exists($func))
|
||||
$func();
|
||||
{
|
||||
if($params['data'])
|
||||
$func($params['data']);
|
||||
else
|
||||
$func();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$funcs();
|
||||
|
|
|
@ -7,47 +7,43 @@ Simple Plugin System
|
|||
//Getting Plugin Config Details
|
||||
$plug_row = $myquery->Get_Plugin_Details();
|
||||
|
||||
if(!$AdminArea){
|
||||
|
||||
$pluginQueryNA = mysql_query("SELECT * FROM plugins WHERE plugin_active ='yes'");
|
||||
$total_plugins = mysql_num_rows($pluginQueryNA);
|
||||
while($pluginDataNa = mysql_fetch_array($pluginQueryNA)){
|
||||
|
||||
if($pluginDataNa['plugin_folder'])
|
||||
$folder = $pluginDataNa['plugin_folder'].'/';
|
||||
else
|
||||
$folder = '';
|
||||
if(file_exists(BASEDIR.'/plugins/'.$folder.$pluginDataNa['plugin_file'])
|
||||
&& !empty($pluginDataNa['plugin_file']))
|
||||
{
|
||||
include(BASEDIR.'/plugins/'.$folder.$pluginDataNa['plugin_file']);
|
||||
$plugin_list[] = $pluginDataNa;
|
||||
}
|
||||
if(FRONT_END){
|
||||
$installed_plugins = $cbplugin->getInstalledPlugins();
|
||||
foreach($installed_plugins as $plugin)
|
||||
{
|
||||
if($plugin['folder'])
|
||||
$folder = '/'.$plugin['folder'];
|
||||
$file = PLUG_DIR.$folder.'/'.$plugin['file'];
|
||||
if(file_exists($file))
|
||||
include_once($file);
|
||||
}
|
||||
}else{
|
||||
$pluginQueryA = mysql_query("SELECT * FROM plugins");
|
||||
$total_plugins = mysql_num_rows($pluginQueryA);
|
||||
if($total_plugins > 0)
|
||||
{
|
||||
while($pluginDataA = mysql_fetch_array($pluginQueryA)){
|
||||
|
||||
if($pluginDataA['plugin_folder'])
|
||||
$folder = $pluginDataA['plugin_folder'].'/';
|
||||
else
|
||||
$folder = '';
|
||||
|
||||
if(file_exists(BASEDIR.'/plugins/'.$folder.$pluginDataA['plugin_file'])
|
||||
&& !empty($pluginDataA['plugin_file']))
|
||||
include(BASEDIR.'/plugins/'.$folder.$pluginDataA['plugin_file']);
|
||||
//$plugin_list[] = $pluginDataA;
|
||||
$plugin_list[] = $pluginDataA;
|
||||
}
|
||||
Assign('plugin_list',$plugin_list);
|
||||
}
|
||||
}
|
||||
|
||||
$cbplugin = new CBPlugin();
|
||||
$cbplugin->getPlugins();
|
||||
if(BACK_END)
|
||||
{
|
||||
$plugin_list = $cbplugin->getPluginList();
|
||||
foreach($plugin_list as $plugin)
|
||||
{
|
||||
if($plugin['folder'])
|
||||
$folder = '/'.$plugin['folder'];
|
||||
$file = PLUG_DIR.$folder.'/'.$plugin['file'];
|
||||
if(file_exists($file))
|
||||
include_once($file);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Include ClipBucket Player
|
||||
*/
|
||||
|
||||
if($Cbucket->configs['player_file'] !='cbplayer.plug.php' && $Cbucket->configs['player_file'] !='')
|
||||
{
|
||||
if($Cbucket->configs['player_dir'])
|
||||
$folder = '/'.$Cbucket->configs['player_dir'] ;
|
||||
$file = PLAYER_DIR.$folder.'/'.$Cbucket->configs['player_file'] ;
|
||||
if(file_exists($file))
|
||||
include_once($file);
|
||||
}
|
||||
include_once(PLAYER_DIR.'/cbplayer/cbplayer.plug.php');
|
||||
|
||||
Assign('total_plugins',$total_plugins);
|
||||
?>
|
|
@ -1,25 +0,0 @@
|
|||
var AjaxObject = false;
|
||||
if(num){
|
||||
}else{
|
||||
var num = 1;
|
||||
}
|
||||
|
||||
if(window.XMLHttpRequest){
|
||||
AjaxObject = new XMLHttpRequest();
|
||||
}else if(window.ActiveXObject){
|
||||
AjaxObject = new ActiveXObject('Microsoft.XMLHTTP');
|
||||
}
|
||||
|
||||
function GetPageResults(URL,DIV){
|
||||
var ResultConatiner = document.getElementById(DIV);
|
||||
AjaxObject.open("GET",URL);
|
||||
AjaxObject.onreadystatechange = function(){
|
||||
if(AjaxObject.readyState == 4 && AjaxObject.status == 200){
|
||||
ResultConatiner.innerHTML = AjaxObject.responseText;
|
||||
}else{
|
||||
ResultConatiner.innerHTML = "<font size=\"3\"><b>Loading...</b></font> <img src=\""+baseurl+"/images/icons/progIndicator.gif\" border=\"0\">";
|
||||
}
|
||||
}
|
||||
|
||||
AjaxObject.send(null);
|
||||
}
|
|
@ -1,134 +0,0 @@
|
|||
var bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no)
|
||||
var loadstatustext="<img src='"+baseurl+"/styles/clipbucketblue/images/loading.gif' /> Loading"
|
||||
var enabletabpersistence=1 //enable tab persistence via session only cookies, so selected tab is remembered (1=yes, 0=no)?
|
||||
|
||||
////NO NEED TO EDIT BELOW////////////////////////
|
||||
var loadedobjects=""
|
||||
var defaultcontentarray=new Object()
|
||||
var bustcacheparameter=""
|
||||
|
||||
function ajaxpage(url, containerid, targetobj){
|
||||
var page_request = false
|
||||
if (window.XMLHttpRequest) // if Mozilla, IE7, Safari etc
|
||||
page_request = new XMLHttpRequest()
|
||||
else if (window.ActiveXObject){ // if IE
|
||||
try {
|
||||
page_request = new ActiveXObject("Msxml2.XMLHTTP")
|
||||
}
|
||||
catch (e){
|
||||
try{
|
||||
page_request = new ActiveXObject("Microsoft.XMLHTTP")
|
||||
}
|
||||
catch (e){}
|
||||
}
|
||||
}
|
||||
else
|
||||
return false
|
||||
var ullist=targetobj.parentNode.parentNode.getElementsByTagName("li")
|
||||
for (var i=0; i<ullist.length; i++)
|
||||
ullist[i].className="" //deselect all tabs
|
||||
targetobj.parentNode.className="selected" //highlight currently clicked on tab
|
||||
if (url.indexOf("#default")!=-1){ //if simply show default content within container (verus fetch it via ajax)
|
||||
document.getElementById(containerid).innerHTML=defaultcontentarray[containerid]
|
||||
return
|
||||
}
|
||||
document.getElementById(containerid).innerHTML=loadstatustext
|
||||
page_request.onreadystatechange=function(){
|
||||
loadpage(page_request, containerid)
|
||||
}
|
||||
if (bustcachevar) //if bust caching of external page
|
||||
bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
|
||||
page_request.open('GET', url+bustcacheparameter, true)
|
||||
page_request.send(null)
|
||||
}
|
||||
|
||||
function loadpage(page_request, containerid){
|
||||
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
|
||||
document.getElementById(containerid).innerHTML=page_request.responseText
|
||||
}
|
||||
|
||||
function loadobjs(revattribute){
|
||||
if (revattribute!=null && revattribute!=""){ //if "rev" attribute is defined (load external .js or .css files)
|
||||
var objectlist=revattribute.split(/\s*,\s*/) //split the files and store as array
|
||||
for (var i=0; i<objectlist.length; i++){
|
||||
var file=objectlist[i]
|
||||
var fileref=""
|
||||
if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding
|
||||
if (file.indexOf(".js")!=-1){ //If object is a js file
|
||||
fileref=document.createElement('script')
|
||||
fileref.setAttribute("type","text/javascript");
|
||||
fileref.setAttribute("src", file);
|
||||
}
|
||||
else if (file.indexOf(".css")!=-1){ //If object is a css file
|
||||
fileref=document.createElement("link")
|
||||
fileref.setAttribute("rel", "stylesheet");
|
||||
fileref.setAttribute("type", "text/css");
|
||||
fileref.setAttribute("href", file);
|
||||
}
|
||||
}
|
||||
if (fileref!=""){
|
||||
document.getElementsByTagName("head").item(0).appendChild(fileref)
|
||||
loadedobjects+=file+" " //Remember this object as being already added to page
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function expandtab(tabcontentid, tabnumber){ //interface for selecting a tab (plus expand corresponding content)
|
||||
var thetab=document.getElementById(tabcontentid).getElementsByTagName("a")[tabnumber]
|
||||
if (thetab.getAttribute("rel")){
|
||||
ajaxpage(thetab.getAttribute("href"), thetab.getAttribute("rel"), thetab)
|
||||
loadobjs(thetab.getAttribute("rev"))
|
||||
}
|
||||
}
|
||||
|
||||
function savedefaultcontent(contentid){// save default ajax tab content
|
||||
if (typeof defaultcontentarray[contentid]=="undefined") //if default content hasn't already been saved
|
||||
defaultcontentarray[contentid]=document.getElementById(contentid).innerHTML
|
||||
}
|
||||
|
||||
function startajaxtabs(){
|
||||
for (var i=0; i<arguments.length; i++){ //loop through passed UL ids
|
||||
var ulobj=document.getElementById(arguments[i])
|
||||
var ulist=ulobj.getElementsByTagName("li") //array containing the LI elements within UL
|
||||
var persisttabindex=(enabletabpersistence==1)? parseInt(getCookie(arguments[i])) : "" //get index of persisted tab (if applicable)
|
||||
var isvalidpersist=(persisttabindex<ulist.length)? true : false //check if persisted tab index falls within range of defined tabs
|
||||
for (var x=0; x<ulist.length; x++){ //loop through each LI element
|
||||
var ulistlink=ulist[x].getElementsByTagName("a")[0]
|
||||
ulistlink.index=x
|
||||
if (ulistlink.getAttribute("rel")){
|
||||
var modifiedurl=ulistlink.getAttribute("href").replace(/^http:\/\/[^\/]+\//i, "http://"+window.location.hostname+"/")
|
||||
ulistlink.setAttribute("href", modifiedurl) //replace URL's root domain with dynamic root domain, for ajax security sake
|
||||
savedefaultcontent(ulistlink.getAttribute("rel")) //save default ajax tab content
|
||||
ulistlink.onclick=function(){
|
||||
ajaxpage(this.getAttribute("href"), this.getAttribute("rel"), this)
|
||||
loadobjs(this.getAttribute("rev"))
|
||||
saveselectedtabindex(this.parentNode.parentNode.id, this.index)
|
||||
return false
|
||||
}
|
||||
if ((enabletabpersistence==1 && persisttabindex<ulist.length && x==persisttabindex) || (enabletabpersistence==0 && ulist[x].className=="selected")){
|
||||
ajaxpage(ulistlink.getAttribute("href"), ulistlink.getAttribute("rel"), ulistlink) //auto load currenly selected tab content
|
||||
loadobjs(ulistlink.getAttribute("rev")) //auto load any accompanying .js and .css files
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////Persistence related functions//////////////////////////
|
||||
|
||||
function saveselectedtabindex(ulid, index){ //remember currently selected tab (based on order relative to other tabs)
|
||||
if (enabletabpersistence==1) //if persistence feature turned on
|
||||
setCookie(ulid, index)
|
||||
}
|
||||
|
||||
function getCookie(Name){
|
||||
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
|
||||
if (document.cookie.match(re)) //if cookie found
|
||||
return document.cookie.match(re)[0].split("=")[1] //return its value
|
||||
return ""
|
||||
}
|
||||
|
||||
function setCookie(name, value){
|
||||
document.cookie = name+"="+value //cookie value is domain wide (path=/)
|
||||
}
|
|
@ -1,142 +0,0 @@
|
|||
if(typeof YAHOO=="undefined"){var YAHOO={};}
|
||||
YAHOO.namespace=function(){var a=arguments,o=null,i,j,d;for(i=0;i<a.length;i=i+1){d=a[i].split(".");o=YAHOO;for(j=(d[0]=="YAHOO")?1:0;j<d.length;j=j+1){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}
|
||||
return o;};YAHOO.log=function(msg,cat,src){var l=YAHOO.widget.Logger;if(l&&l.log){return l.log(msg,cat,src);}else{return false;}};YAHOO.init=function(){this.namespace("util","widget","example");if(typeof YAHOO_config!="undefined"){var l=YAHOO_config.listener,ls=YAHOO.env.listeners,unique=true,i;if(l){for(i=0;i<ls.length;i=i+1){if(ls[i]==l){unique=false;break;}}
|
||||
if(unique){ls.push(l);}}}};YAHOO.register=function(name,mainClass,data){var mods=YAHOO.env.modules;if(!mods[name]){mods[name]={versions:[],builds:[]};}
|
||||
var m=mods[name],v=data.version,b=data.build,ls=YAHOO.env.listeners;m.name=name;m.version=v;m.build=b;m.versions.push(v);m.builds.push(b);m.mainClass=mainClass;for(var i=0;i<ls.length;i=i+1){ls[i](m);}
|
||||
if(mainClass){mainClass.VERSION=v;mainClass.BUILD=b;}else{YAHOO.log("mainClass is undefined for module "+name,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[],getVersion:function(name){return YAHOO.env.modules[name]||null;}};YAHOO.lang={isArray:function(obj){if(obj&&obj.constructor&&obj.constructor.toString().indexOf('Array')>-1){return true;}else{return YAHOO.lang.isObject(obj)&&obj.constructor==Array;}},isBoolean:function(obj){return typeof obj=='boolean';},isFunction:function(obj){return typeof obj=='function';},isNull:function(obj){return obj===null;},isNumber:function(obj){return typeof obj=='number'&&isFinite(obj);},isObject:function(obj){return obj&&(typeof obj=='object'||YAHOO.lang.isFunction(obj));},isString:function(obj){return typeof obj=='string';},isUndefined:function(obj){return typeof obj=='undefined';},hasOwnProperty:function(obj,prop){if(Object.prototype.hasOwnProperty){return obj.hasOwnProperty(prop);}
|
||||
return!YAHOO.lang.isUndefined(obj[prop])&&obj.constructor.prototype[prop]!==obj[prop];},extend:function(subc,superc,overrides){if(!superc||!subc){throw new Error("YAHOO.lang.extend failed, please check that "+"all dependencies are included.");}
|
||||
var F=function(){};F.prototype=superc.prototype;subc.prototype=new F();subc.prototype.constructor=subc;subc.superclass=superc.prototype;if(superc.prototype.constructor==Object.prototype.constructor){superc.prototype.constructor=superc;}
|
||||
if(overrides){for(var i in overrides){subc.prototype[i]=overrides[i];}}},augment:function(r,s){if(!s||!r){throw new Error("YAHOO.lang.augment failed, please check that "+"all dependencies are included.");}
|
||||
var rp=r.prototype,sp=s.prototype,a=arguments,i,p;if(a[2]){for(i=2;i<a.length;i=i+1){rp[a[i]]=sp[a[i]];}}else{for(p in sp){if(!rp[p]){rp[p]=sp[p];}}}}};YAHOO.init();YAHOO.util.Lang=YAHOO.lang;YAHOO.augment=YAHOO.lang.augment;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.2.2",build:"204"});
|
||||
(function(){var Y=YAHOO.util,getStyle,setStyle,id_counter=0,propertyCache={};var ua=navigator.userAgent.toLowerCase(),isOpera=(ua.indexOf('opera')>-1),isSafari=(ua.indexOf('safari')>-1),isGecko=(!isOpera&&!isSafari&&ua.indexOf('gecko')>-1),isIE=(!isOpera&&ua.indexOf('msie')>-1);var patterns={HYPHEN:/(-[a-z])/i,ROOT_TAG:/body|html/i};var toCamel=function(property){if(!patterns.HYPHEN.test(property)){return property;}
|
||||
if(propertyCache[property]){return propertyCache[property];}
|
||||
var converted=property;while(patterns.HYPHEN.exec(converted)){converted=converted.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}
|
||||
propertyCache[property]=converted;return converted;};if(document.defaultView&&document.defaultView.getComputedStyle){getStyle=function(el,property){var value=null;if(property=='float'){property='cssFloat';}
|
||||
var computed=document.defaultView.getComputedStyle(el,'');if(computed){value=computed[toCamel(property)];}
|
||||
return el.style[property]||value;};}else if(document.documentElement.currentStyle&&isIE){getStyle=function(el,property){switch(toCamel(property)){case'opacity':var val=100;try{val=el.filters['DXImageTransform.Microsoft.Alpha'].opacity;}catch(e){try{val=el.filters('alpha').opacity;}catch(e){}}
|
||||
return val/100;break;case'float':property='styleFloat';default:var value=el.currentStyle?el.currentStyle[property]:null;return(el.style[property]||value);}};}else{getStyle=function(el,property){return el.style[property];};}
|
||||
if(isIE){setStyle=function(el,property,val){switch(property){case'opacity':if(YAHOO.lang.isString(el.style.filter)){el.style.filter='alpha(opacity='+val*100+')';if(!el.currentStyle||!el.currentStyle.hasLayout){el.style.zoom=1;}}
|
||||
break;case'float':property='styleFloat';default:el.style[property]=val;}};}else{setStyle=function(el,property,val){if(property=='float'){property='cssFloat';}
|
||||
el.style[property]=val;};}
|
||||
YAHOO.util.Dom={get:function(el){if(YAHOO.lang.isString(el)){return document.getElementById(el);}
|
||||
if(YAHOO.lang.isArray(el)){var c=[];for(var i=0,len=el.length;i<len;++i){c[c.length]=Y.Dom.get(el[i]);}
|
||||
return c;}
|
||||
if(el){return el;}
|
||||
return null;},getStyle:function(el,property){property=toCamel(property);var f=function(element){return getStyle(element,property);};return Y.Dom.batch(el,f,Y.Dom,true);},setStyle:function(el,property,val){property=toCamel(property);var f=function(element){setStyle(element,property,val);};Y.Dom.batch(el,f,Y.Dom,true);},getXY:function(el){var f=function(el){if((el.parentNode===null||el.offsetParent===null||this.getStyle(el,'display')=='none')&&el!=document.body){return false;}
|
||||
var parentNode=null;var pos=[];var box;if(el.getBoundingClientRect){box=el.getBoundingClientRect();var doc=document;if(!this.inDocument(el)&&parent.document!=document){doc=parent.document;if(!this.isAncestor(doc.documentElement,el)){return false;}}
|
||||
var scrollTop=Math.max(doc.documentElement.scrollTop,doc.body.scrollTop);var scrollLeft=Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft);return[box.left+scrollLeft,box.top+scrollTop];}
|
||||
else{pos=[el.offsetLeft,el.offsetTop];parentNode=el.offsetParent;var hasAbs=this.getStyle(el,'position')=='absolute';if(parentNode!=el){while(parentNode){pos[0]+=parentNode.offsetLeft;pos[1]+=parentNode.offsetTop;if(isSafari&&!hasAbs&&this.getStyle(parentNode,'position')=='absolute'){hasAbs=true;}
|
||||
parentNode=parentNode.offsetParent;}}
|
||||
if(isSafari&&hasAbs){pos[0]-=document.body.offsetLeft;pos[1]-=document.body.offsetTop;}}
|
||||
parentNode=el.parentNode;while(parentNode.tagName&&!patterns.ROOT_TAG.test(parentNode.tagName))
|
||||
{if(Y.Dom.getStyle(parentNode,'display')!='inline'){pos[0]-=parentNode.scrollLeft;pos[1]-=parentNode.scrollTop;}
|
||||
parentNode=parentNode.parentNode;}
|
||||
return pos;};return Y.Dom.batch(el,f,Y.Dom,true);},getX:function(el){var f=function(el){return Y.Dom.getXY(el)[0];};return Y.Dom.batch(el,f,Y.Dom,true);},getY:function(el){var f=function(el){return Y.Dom.getXY(el)[1];};return Y.Dom.batch(el,f,Y.Dom,true);},setXY:function(el,pos,noRetry){var f=function(el){var style_pos=this.getStyle(el,'position');if(style_pos=='static'){this.setStyle(el,'position','relative');style_pos='relative';}
|
||||
var pageXY=this.getXY(el);if(pageXY===false){return false;}
|
||||
var delta=[parseInt(this.getStyle(el,'left'),10),parseInt(this.getStyle(el,'top'),10)];if(isNaN(delta[0])){delta[0]=(style_pos=='relative')?0:el.offsetLeft;}
|
||||
if(isNaN(delta[1])){delta[1]=(style_pos=='relative')?0:el.offsetTop;}
|
||||
if(pos[0]!==null){el.style.left=pos[0]-pageXY[0]+delta[0]+'px';}
|
||||
if(pos[1]!==null){el.style.top=pos[1]-pageXY[1]+delta[1]+'px';}
|
||||
if(!noRetry){var newXY=this.getXY(el);if((pos[0]!==null&&newXY[0]!=pos[0])||(pos[1]!==null&&newXY[1]!=pos[1])){this.setXY(el,pos,true);}}};Y.Dom.batch(el,f,Y.Dom,true);},setX:function(el,x){Y.Dom.setXY(el,[x,null]);},setY:function(el,y){Y.Dom.setXY(el,[null,y]);},getRegion:function(el){var f=function(el){var region=new Y.Region.getRegion(el);return region;};return Y.Dom.batch(el,f,Y.Dom,true);},getClientWidth:function(){return Y.Dom.getViewportWidth();},getClientHeight:function(){return Y.Dom.getViewportHeight();},getElementsByClassName:function(className,tag,root){var method=function(el){return Y.Dom.hasClass(el,className);};return Y.Dom.getElementsBy(method,tag,root);},hasClass:function(el,className){var re=new RegExp('(?:^|\\s+)'+className+'(?:\\s+|$)');var f=function(el){return re.test(el.className);};return Y.Dom.batch(el,f,Y.Dom,true);},addClass:function(el,className){var f=function(el){if(this.hasClass(el,className)){return;}
|
||||
el.className=[el.className,className].join(' ');};Y.Dom.batch(el,f,Y.Dom,true);},removeClass:function(el,className){var re=new RegExp('(?:^|\\s+)'+className+'(?:\\s+|$)','g');var f=function(el){if(!this.hasClass(el,className)){return;}
|
||||
var c=el.className;el.className=c.replace(re,' ');if(this.hasClass(el,className)){this.removeClass(el,className);}};Y.Dom.batch(el,f,Y.Dom,true);},replaceClass:function(el,oldClassName,newClassName){if(oldClassName===newClassName){return false;}
|
||||
var re=new RegExp('(?:^|\\s+)'+oldClassName+'(?:\\s+|$)','g');var f=function(el){if(!this.hasClass(el,oldClassName)){this.addClass(el,newClassName);return;}
|
||||
el.className=el.className.replace(re,' '+newClassName+' ');if(this.hasClass(el,oldClassName)){this.replaceClass(el,oldClassName,newClassName);}};Y.Dom.batch(el,f,Y.Dom,true);},generateId:function(el,prefix){prefix=prefix||'yui-gen';el=el||{};var f=function(el){if(el){el=Y.Dom.get(el);}else{el={};}
|
||||
if(!el.id){el.id=prefix+id_counter++;}
|
||||
return el.id;};return Y.Dom.batch(el,f,Y.Dom,true);},isAncestor:function(haystack,needle){haystack=Y.Dom.get(haystack);if(!haystack||!needle){return false;}
|
||||
var f=function(needle){if(haystack.contains&&!isSafari){return haystack.contains(needle);}
|
||||
else if(haystack.compareDocumentPosition){return!!(haystack.compareDocumentPosition(needle)&16);}
|
||||
else{var parent=needle.parentNode;while(parent){if(parent==haystack){return true;}
|
||||
else if(!parent.tagName||parent.tagName.toUpperCase()=='HTML'){return false;}
|
||||
parent=parent.parentNode;}
|
||||
return false;}};return Y.Dom.batch(needle,f,Y.Dom,true);},inDocument:function(el){var f=function(el){return this.isAncestor(document.documentElement,el);};return Y.Dom.batch(el,f,Y.Dom,true);},getElementsBy:function(method,tag,root){tag=tag||'*';var nodes=[];if(root){root=Y.Dom.get(root);if(!root){return nodes;}}else{root=document;}
|
||||
var elements=root.getElementsByTagName(tag);if(!elements.length&&(tag=='*'&&root.all)){elements=root.all;}
|
||||
for(var i=0,len=elements.length;i<len;++i){if(method(elements[i])){nodes[nodes.length]=elements[i];}}
|
||||
return nodes;},batch:function(el,method,o,override){var id=el;el=Y.Dom.get(el);var scope=(override)?o:window;if(!el||el.tagName||!el.length){if(!el){return false;}
|
||||
return method.call(scope,el,o);}
|
||||
var collection=[];for(var i=0,len=el.length;i<len;++i){if(!el[i]){id=el[i];}
|
||||
collection[collection.length]=method.call(scope,el[i],o);}
|
||||
return collection;},getDocumentHeight:function(){var scrollHeight=(document.compatMode!='CSS1Compat')?document.body.scrollHeight:document.documentElement.scrollHeight;var h=Math.max(scrollHeight,Y.Dom.getViewportHeight());return h;},getDocumentWidth:function(){var scrollWidth=(document.compatMode!='CSS1Compat')?document.body.scrollWidth:document.documentElement.scrollWidth;var w=Math.max(scrollWidth,Y.Dom.getViewportWidth());return w;},getViewportHeight:function(){var height=self.innerHeight;var mode=document.compatMode;if((mode||isIE)&&!isOpera){height=(mode=='CSS1Compat')?document.documentElement.clientHeight:document.body.clientHeight;}
|
||||
return height;},getViewportWidth:function(){var width=self.innerWidth;var mode=document.compatMode;if(mode||isIE){width=(mode=='CSS1Compat')?document.documentElement.clientWidth:document.body.clientWidth;}
|
||||
return width;}};})();YAHOO.util.Region=function(t,r,b,l){this.top=t;this[1]=t;this.right=r;this.bottom=b;this.left=l;this[0]=l;};YAHOO.util.Region.prototype.contains=function(region){return(region.left>=this.left&®ion.right<=this.right&®ion.top>=this.top&®ion.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(region){var t=Math.max(this.top,region.top);var r=Math.min(this.right,region.right);var b=Math.min(this.bottom,region.bottom);var l=Math.max(this.left,region.left);if(b>=t&&r>=l){return new YAHOO.util.Region(t,r,b,l);}else{return null;}};YAHOO.util.Region.prototype.union=function(region){var t=Math.min(this.top,region.top);var r=Math.max(this.right,region.right);var b=Math.max(this.bottom,region.bottom);var l=Math.min(this.left,region.left);return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(el){var p=YAHOO.util.Dom.getXY(el);var t=p[1];var r=p[0]+el.offsetWidth;var b=p[1]+el.offsetHeight;var l=p[0];return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Point=function(x,y){if(x instanceof Array){y=x[1];x=x[0];}
|
||||
this.x=this.right=this.left=this[0]=x;this.y=this.top=this.bottom=this[1]=y;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.2.2",build:"204"});
|
||||
YAHOO.util.CustomEvent=function(type,oScope,silent,signature){this.type=type;this.scope=oScope||window;this.silent=silent;this.signature=signature||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}
|
||||
var onsubscribeType="_YUICEOnSubscribe";if(type!==onsubscribeType){this.subscribeEvent=new YAHOO.util.CustomEvent(onsubscribeType,this,true);}};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(fn,obj,override){if(!fn){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}
|
||||
if(this.subscribeEvent){this.subscribeEvent.fire(fn,obj,override);}
|
||||
this.subscribers.push(new YAHOO.util.Subscriber(fn,obj,override));},unsubscribe:function(fn,obj){if(!fn){return this.unsubscribeAll();}
|
||||
var found=false;for(var i=0,len=this.subscribers.length;i<len;++i){var s=this.subscribers[i];if(s&&s.contains(fn,obj)){this._delete(i);found=true;}}
|
||||
return found;},fire:function(){var len=this.subscribers.length;if(!len&&this.silent){return true;}
|
||||
var args=[],ret=true,i;for(i=0;i<arguments.length;++i){args.push(arguments[i]);}
|
||||
var argslength=args.length;if(!this.silent){}
|
||||
for(i=0;i<len;++i){var s=this.subscribers[i];if(s){if(!this.silent){}
|
||||
var scope=s.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var param=null;if(args.length>0){param=args[0];}
|
||||
ret=s.fn.call(scope,param,s.obj);}else{ret=s.fn.call(scope,this.type,args,s.obj);}
|
||||
if(false===ret){if(!this.silent){}
|
||||
return false;}}}
|
||||
return true;},unsubscribeAll:function(){for(var i=0,len=this.subscribers.length;i<len;++i){this._delete(len-1-i);}
|
||||
return i;},_delete:function(index){var s=this.subscribers[index];if(s){delete s.fn;delete s.obj;}
|
||||
this.subscribers.splice(index,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"scope: "+this.scope;}};YAHOO.util.Subscriber=function(fn,obj,override){this.fn=fn;this.obj=obj||null;this.override=override;};YAHOO.util.Subscriber.prototype.getScope=function(defaultScope){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}
|
||||
return defaultScope;};YAHOO.util.Subscriber.prototype.contains=function(fn,obj){if(obj){return(this.fn==fn&&this.obj==obj);}else{return(this.fn==fn);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+(this.obj||"")+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var loadComplete=false;var DOMReady=false;var listeners=[];var unloadListeners=[];var legacyEvents=[];var legacyHandlers=[];var retryCount=0;var onAvailStack=[];var legacyMap=[];var counter=0;var lastError=null;return{POLL_RETRYS:200,POLL_INTERVAL:10,EL:0,TYPE:1,FN:2,WFN:3,OBJ:3,ADJ_SCOPE:4,isSafari:(/KHTML/gi).test(navigator.userAgent),webkit:function(){var v=navigator.userAgent.match(/AppleWebKit\/([^ ]*)/);if(v&&v[1]){return v[1];}
|
||||
return null;}(),isIE:(!this.webkit&&!navigator.userAgent.match(/opera/gi)&&navigator.userAgent.match(/msie/gi)),_interval:null,startInterval:function(){if(!this._interval){var self=this;var callback=function(){self._tryPreloadAttach();};this._interval=setInterval(callback,this.POLL_INTERVAL);}},onAvailable:function(p_id,p_fn,p_obj,p_override){onAvailStack.push({id:p_id,fn:p_fn,obj:p_obj,override:p_override,checkReady:false});retryCount=this.POLL_RETRYS;this.startInterval();},onDOMReady:function(p_fn,p_obj,p_override){this.DOMReadyEvent.subscribe(p_fn,p_obj,p_override);},onContentReady:function(p_id,p_fn,p_obj,p_override){onAvailStack.push({id:p_id,fn:p_fn,obj:p_obj,override:p_override,checkReady:true});retryCount=this.POLL_RETRYS;this.startInterval();},addListener:function(el,sType,fn,obj,override){if(!fn||!fn.call){return false;}
|
||||
if(this._isValidCollection(el)){var ok=true;for(var i=0,len=el.length;i<len;++i){ok=this.on(el[i],sType,fn,obj,override)&&ok;}
|
||||
return ok;}else if(typeof el=="string"){var oEl=this.getEl(el);if(oEl){el=oEl;}else{this.onAvailable(el,function(){YAHOO.util.Event.on(el,sType,fn,obj,override);});return true;}}
|
||||
if(!el){return false;}
|
||||
if("unload"==sType&&obj!==this){unloadListeners[unloadListeners.length]=[el,sType,fn,obj,override];return true;}
|
||||
var scope=el;if(override){if(override===true){scope=obj;}else{scope=override;}}
|
||||
var wrappedFn=function(e){return fn.call(scope,YAHOO.util.Event.getEvent(e),obj);};var li=[el,sType,fn,wrappedFn,scope];var index=listeners.length;listeners[index]=li;if(this.useLegacyEvent(el,sType)){var legacyIndex=this.getLegacyIndex(el,sType);if(legacyIndex==-1||el!=legacyEvents[legacyIndex][0]){legacyIndex=legacyEvents.length;legacyMap[el.id+sType]=legacyIndex;legacyEvents[legacyIndex]=[el,sType,el["on"+sType]];legacyHandlers[legacyIndex]=[];el["on"+sType]=function(e){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(e),legacyIndex);};}
|
||||
legacyHandlers[legacyIndex].push(li);}else{try{this._simpleAdd(el,sType,wrappedFn,false);}catch(ex){this.lastError=ex;this.removeListener(el,sType,fn);return false;}}
|
||||
return true;},fireLegacyEvent:function(e,legacyIndex){var ok=true,le,lh,li,scope,ret;lh=legacyHandlers[legacyIndex];for(var i=0,len=lh.length;i<len;++i){li=lh[i];if(li&&li[this.WFN]){scope=li[this.ADJ_SCOPE];ret=li[this.WFN].call(scope,e);ok=(ok&&ret);}}
|
||||
le=legacyEvents[legacyIndex];if(le&&le[2]){le[2](e);}
|
||||
return ok;},getLegacyIndex:function(el,sType){var key=this.generateId(el)+sType;if(typeof legacyMap[key]=="undefined"){return-1;}else{return legacyMap[key];}},useLegacyEvent:function(el,sType){if(this.webkit&&("click"==sType||"dblclick"==sType)){var v=parseInt(this.webkit,10);if(!isNaN(v)&&v<418){return true;}}
|
||||
return false;},removeListener:function(el,sType,fn){var i,len;if(typeof el=="string"){el=this.getEl(el);}else if(this._isValidCollection(el)){var ok=true;for(i=0,len=el.length;i<len;++i){ok=(this.removeListener(el[i],sType,fn)&&ok);}
|
||||
return ok;}
|
||||
if(!fn||!fn.call){return this.purgeElement(el,false,sType);}
|
||||
if("unload"==sType){for(i=0,len=unloadListeners.length;i<len;i++){var li=unloadListeners[i];if(li&&li[0]==el&&li[1]==sType&&li[2]==fn){unloadListeners.splice(i,1);return true;}}
|
||||
return false;}
|
||||
var cacheItem=null;var index=arguments[3];if("undefined"==typeof index){index=this._getCacheIndex(el,sType,fn);}
|
||||
if(index>=0){cacheItem=listeners[index];}
|
||||
if(!el||!cacheItem){return false;}
|
||||
if(this.useLegacyEvent(el,sType)){var legacyIndex=this.getLegacyIndex(el,sType);var llist=legacyHandlers[legacyIndex];if(llist){for(i=0,len=llist.length;i<len;++i){li=llist[i];if(li&&li[this.EL]==el&&li[this.TYPE]==sType&&li[this.FN]==fn){llist.splice(i,1);break;}}}}else{try{this._simpleRemove(el,sType,cacheItem[this.WFN],false);}catch(ex){this.lastError=ex;return false;}}
|
||||
delete listeners[index][this.WFN];delete listeners[index][this.FN];listeners.splice(index,1);return true;},getTarget:function(ev,resolveTextNode){var t=ev.target||ev.srcElement;return this.resolveTextNode(t);},resolveTextNode:function(node){if(node&&3==node.nodeType){return node.parentNode;}else{return node;}},getPageX:function(ev){var x=ev.pageX;if(!x&&0!==x){x=ev.clientX||0;if(this.isIE){x+=this._getScrollLeft();}}
|
||||
return x;},getPageY:function(ev){var y=ev.pageY;if(!y&&0!==y){y=ev.clientY||0;if(this.isIE){y+=this._getScrollTop();}}
|
||||
return y;},getXY:function(ev){return[this.getPageX(ev),this.getPageY(ev)];},getRelatedTarget:function(ev){var t=ev.relatedTarget;if(!t){if(ev.type=="mouseout"){t=ev.toElement;}else if(ev.type=="mouseover"){t=ev.fromElement;}}
|
||||
return this.resolveTextNode(t);},getTime:function(ev){if(!ev.time){var t=new Date().getTime();try{ev.time=t;}catch(ex){this.lastError=ex;return t;}}
|
||||
return ev.time;},stopEvent:function(ev){this.stopPropagation(ev);this.preventDefault(ev);},stopPropagation:function(ev){if(ev.stopPropagation){ev.stopPropagation();}else{ev.cancelBubble=true;}},preventDefault:function(ev){if(ev.preventDefault){ev.preventDefault();}else{ev.returnValue=false;}},getEvent:function(e){var ev=e||window.event;if(!ev){var c=this.getEvent.caller;while(c){ev=c.arguments[0];if(ev&&Event==ev.constructor){break;}
|
||||
c=c.caller;}}
|
||||
return ev;},getCharCode:function(ev){return ev.charCode||ev.keyCode||0;},_getCacheIndex:function(el,sType,fn){for(var i=0,len=listeners.length;i<len;++i){var li=listeners[i];if(li&&li[this.FN]==fn&&li[this.EL]==el&&li[this.TYPE]==sType){return i;}}
|
||||
return-1;},generateId:function(el){var id=el.id;if(!id){id="yuievtautoid-"+counter;++counter;el.id=id;}
|
||||
return id;},_isValidCollection:function(o){return(o&&o.length&&typeof o!="string"&&!o.tagName&&!o.alert&&typeof o[0]!="undefined");},elCache:{},getEl:function(id){return document.getElementById(id);},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(e){if(!loadComplete){loadComplete=true;var EU=YAHOO.util.Event;EU._ready();if(this.isIE){EU._simpleRemove(window,"load",EU._load);}}},_ready:function(e){if(!DOMReady){DOMReady=true;var EU=YAHOO.util.Event;EU.DOMReadyEvent.fire();EU._simpleRemove(document,"DOMContentLoaded",EU._ready);}},_tryPreloadAttach:function(){if(this.locked){return false;}
|
||||
if(this.isIE&&!DOMReady){return false;}
|
||||
this.locked=true;var tryAgain=!loadComplete;if(!tryAgain){tryAgain=(retryCount>0);}
|
||||
var notAvail=[];var executeItem=function(el,item){var scope=el;if(item.override){if(item.override===true){scope=item.obj;}else{scope=item.override;}}
|
||||
item.fn.call(scope,item.obj);};var i,len,item,el;for(i=0,len=onAvailStack.length;i<len;++i){item=onAvailStack[i];if(item&&!item.checkReady){el=this.getEl(item.id);if(el){executeItem(el,item);onAvailStack[i]=null;}else{notAvail.push(item);}}}
|
||||
for(i=0,len=onAvailStack.length;i<len;++i){item=onAvailStack[i];if(item&&item.checkReady){el=this.getEl(item.id);if(el){if(loadComplete||el.nextSibling){executeItem(el,item);onAvailStack[i]=null;}}else{notAvail.push(item);}}}
|
||||
retryCount=(notAvail.length===0)?0:retryCount-1;if(tryAgain){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}
|
||||
this.locked=false;return true;},purgeElement:function(el,recurse,sType){var elListeners=this.getListeners(el,sType);if(elListeners){for(var i=0,len=elListeners.length;i<len;++i){var l=elListeners[i];this.removeListener(el,l.type,l.fn);}}
|
||||
if(recurse&&el&&el.childNodes){for(i=0,len=el.childNodes.length;i<len;++i){this.purgeElement(el.childNodes[i],recurse,sType);}}},getListeners:function(el,sType){var results=[],searchLists;if(!sType){searchLists=[listeners,unloadListeners];}else if(sType=="unload"){searchLists=[unloadListeners];}else{searchLists=[listeners];}
|
||||
for(var j=0;j<searchLists.length;++j){var searchList=searchLists[j];if(searchList&&searchList.length>0){for(var i=0,len=searchList.length;i<len;++i){var l=searchList[i];if(l&&l[this.EL]===el&&(!sType||sType===l[this.TYPE])){results.push({type:l[this.TYPE],fn:l[this.FN],obj:l[this.OBJ],adjust:l[this.ADJ_SCOPE],index:i});}}}}
|
||||
return(results.length)?results:null;},_unload:function(e){var EU=YAHOO.util.Event,i,j,l,len,index;for(i=0,len=unloadListeners.length;i<len;++i){l=unloadListeners[i];if(l){var scope=window;if(l[EU.ADJ_SCOPE]){if(l[EU.ADJ_SCOPE]===true){scope=l[EU.OBJ];}else{scope=l[EU.ADJ_SCOPE];}}
|
||||
l[EU.FN].call(scope,EU.getEvent(e),l[EU.OBJ]);unloadListeners[i]=null;l=null;scope=null;}}
|
||||
unloadListeners=null;if(listeners&&listeners.length>0){j=listeners.length;while(j){index=j-1;l=listeners[index];if(l){EU.removeListener(l[EU.EL],l[EU.TYPE],l[EU.FN],index);}
|
||||
j=j-1;}
|
||||
l=null;EU.clearCache();}
|
||||
for(i=0,len=legacyEvents.length;i<len;++i){legacyEvents[i][0]=null;legacyEvents[i]=null;}
|
||||
legacyEvents=null;EU._simpleRemove(window,"unload",EU._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var dd=document.documentElement,db=document.body;if(dd&&(dd.scrollTop||dd.scrollLeft)){return[dd.scrollTop,dd.scrollLeft];}else if(db){return[db.scrollTop,db.scrollLeft];}else{return[0,0];}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(el,sType,fn,capture){el.addEventListener(sType,fn,(capture));};}else if(window.attachEvent){return function(el,sType,fn,capture){el.attachEvent("on"+sType,fn);};}else{return function(){};}}(),_simpleRemove:function(){if(window.removeEventListener){return function(el,sType,fn,capture){el.removeEventListener(sType,fn,(capture));};}else if(window.detachEvent){return function(el,sType,fn){el.detachEvent("on"+sType,fn);};}else{return function(){};}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;if(EU.isIE){document.write('<scr'+'ipt id="_yui_eu_dr" defer="true" src="//:"></script>');var el=document.getElementById("_yui_eu_dr");el.onreadystatechange=function(){if("complete"==this.readyState){this.parentNode.removeChild(this);YAHOO.util.Event._ready();}};el=null;YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);}else if(EU.webkit){EU._drwatch=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._drwatch);EU._drwatch=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}
|
||||
EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}
|
||||
YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(p_type,p_fn,p_obj,p_override){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(ce){ce.subscribe(p_fn,p_obj,p_override);}else{this.__yui_subscribers=this.__yui_subscribers||{};var subs=this.__yui_subscribers;if(!subs[p_type]){subs[p_type]=[];}
|
||||
subs[p_type].push({fn:p_fn,obj:p_obj,override:p_override});}},unsubscribe:function(p_type,p_fn,p_obj){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(ce){return ce.unsubscribe(p_fn,p_obj);}else{return false;}},unsubscribeAll:function(p_type){return this.unsubscribe(p_type);},createEvent:function(p_type,p_config){this.__yui_events=this.__yui_events||{};var opts=p_config||{};var events=this.__yui_events;if(events[p_type]){}else{var scope=opts.scope||this;var silent=opts.silent||null;var ce=new YAHOO.util.CustomEvent(p_type,scope,silent,YAHOO.util.CustomEvent.FLAT);events[p_type]=ce;if(opts.onSubscribeCallback){ce.subscribeEvent.subscribe(opts.onSubscribeCallback);}
|
||||
this.__yui_subscribers=this.__yui_subscribers||{};var qs=this.__yui_subscribers[p_type];if(qs){for(var i=0;i<qs.length;++i){ce.subscribe(qs[i].fn,qs[i].obj,qs[i].override);}}}
|
||||
return events[p_type];},fireEvent:function(p_type,arg1,arg2,etc){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(ce){var args=[];for(var i=1;i<arguments.length;++i){args.push(arguments[i]);}
|
||||
return ce.fire.apply(ce,args);}else{return null;}},hasEvent:function(type){if(this.__yui_events){if(this.__yui_events[type]){return true;}}
|
||||
return false;}};YAHOO.util.KeyListener=function(attachTo,keyData,handler,event){if(!attachTo){}else if(!keyData){}else if(!handler){}
|
||||
if(!event){event=YAHOO.util.KeyListener.KEYDOWN;}
|
||||
var keyEvent=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof attachTo=='string'){attachTo=document.getElementById(attachTo);}
|
||||
if(typeof handler=='function'){keyEvent.subscribe(handler);}else{keyEvent.subscribe(handler.fn,handler.scope,handler.correctScope);}
|
||||
function handleKeyPress(e,obj){if(!keyData.shift){keyData.shift=false;}
|
||||
if(!keyData.alt){keyData.alt=false;}
|
||||
if(!keyData.ctrl){keyData.ctrl=false;}
|
||||
if(e.shiftKey==keyData.shift&&e.altKey==keyData.alt&&e.ctrlKey==keyData.ctrl){var dataItem;var keyPressed;if(keyData.keys instanceof Array){for(var i=0;i<keyData.keys.length;i++){dataItem=keyData.keys[i];if(dataItem==e.charCode){keyEvent.fire(e.charCode,e);break;}else if(dataItem==e.keyCode){keyEvent.fire(e.keyCode,e);break;}}}else{dataItem=keyData.keys;if(dataItem==e.charCode){keyEvent.fire(e.charCode,e);}else if(dataItem==e.keyCode){keyEvent.fire(e.keyCode,e);}}}}
|
||||
this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(attachTo,event,handleKeyPress);this.enabledEvent.fire(keyData);}
|
||||
this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(attachTo,event,handleKeyPress);this.disabledEvent.fire(keyData);}
|
||||
this.enabled=false;};this.toString=function(){return"KeyListener ["+keyData.keys+"] "+attachTo.tagName+
|
||||
(attachTo.id?"["+attachTo.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.register("event",YAHOO.util.Event,{version:"2.2.2",build:"204"});
|
|
@ -1,85 +0,0 @@
|
|||
function at_show_aux(parent, child)
|
||||
{
|
||||
var p = document.getElementById(parent);
|
||||
var c = document.getElementById(child );
|
||||
|
||||
var top = (c["at_position"] == "y") ? p.offsetHeight+2 : 0;
|
||||
var left = (c["at_position"] == "x") ? p.offsetWidth +2 : 0;
|
||||
|
||||
for (; p; p = p.offsetParent)
|
||||
{
|
||||
top += p.offsetTop;
|
||||
left += p.offsetLeft;
|
||||
}
|
||||
|
||||
c.style.position = "absolute";
|
||||
c.style.top = top +'px';
|
||||
c.style.left = left+'px';
|
||||
c.style.visibility = "visible";
|
||||
}
|
||||
|
||||
// ***** at_show *****
|
||||
|
||||
function at_show()
|
||||
{
|
||||
var p = document.getElementById(this["at_parent"]);
|
||||
var c = document.getElementById(this["at_child" ]);
|
||||
|
||||
at_show_aux(p.id, c.id);
|
||||
clearTimeout(c["at_timeout"]);
|
||||
}
|
||||
|
||||
// ***** at_hide *****
|
||||
|
||||
function at_hide()
|
||||
{
|
||||
var p = document.getElementById(this["at_parent"]);
|
||||
var c = document.getElementById(this["at_child" ]);
|
||||
|
||||
c["at_timeout"] = setTimeout("document.getElementById('"+c.id+"').style.visibility = 'hidden'", 333);
|
||||
}
|
||||
|
||||
// ***** at_click *****
|
||||
|
||||
function at_click()
|
||||
{
|
||||
var p = document.getElementById(this["at_parent"]);
|
||||
var c = document.getElementById(this["at_child" ]);
|
||||
|
||||
if (c.style.visibility != "visible") at_show_aux(p.id, c.id); else c.style.visibility = "hidden";
|
||||
return false;
|
||||
}
|
||||
|
||||
function at_attach(parent, child, showtype, position, cursor)
|
||||
{
|
||||
var p = document.getElementById(parent);
|
||||
var c = document.getElementById(child);
|
||||
|
||||
p["at_parent"] = p.id;
|
||||
c["at_parent"] = p.id;
|
||||
p["at_child"] = c.id;
|
||||
c["at_child"] = c.id;
|
||||
p["at_position"] = position;
|
||||
c["at_position"] = position;
|
||||
|
||||
c.style.position = "absolute";
|
||||
c.style.visibility = "hidden";
|
||||
|
||||
if (cursor != undefined) p.style.cursor = cursor;
|
||||
|
||||
switch (showtype)
|
||||
{
|
||||
case "click":
|
||||
p.onclick = at_click;
|
||||
p.onmouseout = at_hide;
|
||||
c.onmouseover = at_show;
|
||||
c.onmouseout = at_hide;
|
||||
break;
|
||||
case "hover":
|
||||
p.onmouseover = at_show;
|
||||
p.onmouseout = at_hide;
|
||||
c.onmouseover = at_show;
|
||||
c.onmouseout = at_hide;
|
||||
break;
|
||||
}
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
var bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no)
|
||||
var loadedobjects=""
|
||||
var rootdomain="http://"+window.location.hostname
|
||||
var bustcacheparameter=""
|
||||
|
||||
function ajaxpage(url, containerid){
|
||||
var page_request = false
|
||||
if (window.XMLHttpRequest) // if Mozilla, Safari etc
|
||||
page_request = new XMLHttpRequest()
|
||||
else if (window.ActiveXObject){ // if IE
|
||||
try {
|
||||
page_request = new ActiveXObject("Msxml2.XMLHTTP")
|
||||
}
|
||||
catch (e){
|
||||
try{
|
||||
page_request = new ActiveXObject("Microsoft.XMLHTTP")
|
||||
}
|
||||
catch (e){}
|
||||
}
|
||||
}
|
||||
else
|
||||
return false
|
||||
page_request.onreadystatechange=function(){
|
||||
loadpage(page_request, containerid)
|
||||
}
|
||||
if (bustcachevar) //if bust caching of external page
|
||||
bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
|
||||
page_request.open('GET', url+bustcacheparameter, true)
|
||||
page_request.send(null)
|
||||
}
|
||||
|
||||
function loadpage(page_request, containerid){
|
||||
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
|
||||
document.getElementById(containerid).innerHTML=page_request.responseText
|
||||
}
|
||||
|
||||
function loadobjs(){
|
||||
if (!document.getElementById)
|
||||
return
|
||||
for (i=0; i<arguments.length; i++){
|
||||
var file=arguments[i]
|
||||
var fileref=""
|
||||
if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding
|
||||
if (file.indexOf(".js")!=-1){ //If object is a js file
|
||||
fileref=document.createElement('script')
|
||||
fileref.setAttribute("type","text/javascript");
|
||||
fileref.setAttribute("src", file);
|
||||
}
|
||||
else if (file.indexOf(".css")!=-1){ //If object is a css file
|
||||
fileref=document.createElement("link")
|
||||
fileref.setAttribute("rel", "stylesheet");
|
||||
fileref.setAttribute("type", "text/css");
|
||||
fileref.setAttribute("href", file);
|
||||
}
|
||||
}
|
||||
if (fileref!=""){
|
||||
document.getElementsByTagName("head").item(0).appendChild(fileref)
|
||||
loadedobjects+=file+" " //Remember this object as being already added to page
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
// JavaScript Document
|
||||
var win_popup = null;
|
||||
|
||||
function openWindow( url, name, params, w, h )
|
||||
{
|
||||
var ah = window.availHeight;
|
||||
var aw = window.availWidth;
|
||||
|
||||
var l = (aw - w) / 2;
|
||||
var t = (ah - h) / 2;
|
||||
|
||||
params += params == "" ? "" : ",";
|
||||
params += "left=0,top=0,height="+ah+",width="+aw;
|
||||
|
||||
//close previous opened popup
|
||||
if (win_popup && win_popup.open && !win_popup.closed)
|
||||
{
|
||||
win_popup.close();
|
||||
}
|
||||
//---
|
||||
win_popup = window.open( "", name, params );
|
||||
win_popup.location.href = url;
|
||||
|
||||
}
|
|
@ -259,3 +259,19 @@
|
|||
if(progress<100)
|
||||
refresh_interval();
|
||||
}
|
||||
|
||||
|
||||
function go_hq(vid)
|
||||
{
|
||||
var flashvars = {
|
||||
htmlPage: document.location,
|
||||
settingsFile: "http://localhost/clipbucket/2.x/2/upload/player/cbplayer/settings.php?hqid="+vid
|
||||
};
|
||||
var params = {
|
||||
allowFullScreen: "true"
|
||||
};
|
||||
swfobject.embedSWF("http://localhost/clipbucket/2.x/2/upload/player/cbplayer/videoPlayer.swf",
|
||||
"videoPlayer", "600", "350", "9.0.115",
|
||||
"swfobject/expressInstall.swf", flashvars
|
||||
, params);
|
||||
}
|
||||
|
|
|
@ -1,106 +0,0 @@
|
|||
var ajaxpageclass=new Object()
|
||||
//1) HTML to show while requested page is being fetched:
|
||||
ajaxpageclass.loadstatustext="<img src='./styles/clipbucketblue/images/loading.gif' /> Loading content..."
|
||||
|
||||
//2) Bust cache when fetching pages?
|
||||
ajaxpageclass.ajaxbustcache=false
|
||||
|
||||
ajaxpageclass.connect=function(pageurl, divId){
|
||||
var page_request = false
|
||||
var bustcacheparameter=""
|
||||
if (window.XMLHttpRequest) // if Mozilla, IE7, Safari etc
|
||||
page_request = new XMLHttpRequest()
|
||||
else if (window.ActiveXObject){ // if IE6 or below
|
||||
try {
|
||||
page_request = new ActiveXObject("Msxml2.XMLHTTP")
|
||||
}
|
||||
catch (e){
|
||||
try{
|
||||
page_request = new ActiveXObject("Microsoft.XMLHTTP")
|
||||
}
|
||||
catch (e){}
|
||||
}
|
||||
}
|
||||
else
|
||||
return false
|
||||
page_request.onreadystatechange=function(){ajaxpageclass.loadpage(page_request, divId)}
|
||||
if (this.ajaxbustcache) //if bust caching of external page
|
||||
bustcacheparameter=(pageurl.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
|
||||
page_request.open('GET', pageurl+bustcacheparameter, true)
|
||||
page_request.send(null)
|
||||
}
|
||||
|
||||
ajaxpageclass.loadpage=function(page_request, divId){
|
||||
document.getElementById(divId).innerHTML=this.loadstatustext //Display "fetching page message"
|
||||
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)){
|
||||
document.getElementById(divId).innerHTML=page_request.responseText
|
||||
}
|
||||
}
|
||||
|
||||
ajaxpageclass.bindpages=function(pageinfo, divId, paginateIds){ //Main Constructor function
|
||||
this.pageinfo=pageinfo //store object containing URLs of pages to fetch, selected page number etc
|
||||
this.divId=divId
|
||||
this.paginateIds=paginateIds //array of ids corresponding to the pagination DIVs defined for this pageinstance
|
||||
var initialpage=(pageinfo.selectedpage<pageinfo.page.length)? pageinfo.selectedpage : 0 //set initial page shown
|
||||
this.buildpagination(initialpage)
|
||||
this.selectpage(initialpage)
|
||||
}
|
||||
|
||||
ajaxpageclass.bindpages.prototype={
|
||||
|
||||
buildpagination:function(selectedpage){
|
||||
if (this.pageinfo.page.length==1)
|
||||
var paginateHTML="Page 1 of 1" //Pagination HTML to show when there's only 1 page (no pagination needed)
|
||||
else{ //construct pagimation interface
|
||||
var paginateHTML='<div class="pagination"><ul>\n'
|
||||
paginateHTML+='<li><a href="#previous" rel="'+(selectedpage-1)+'">«</a></li>\n'
|
||||
for (var i=0; i<this.pageinfo.page.length; i++){
|
||||
paginateHTML+='<li><a href="#page'+(i+1)+'" rel="'+i+'">'+(i+1)+'</a></li>\n'
|
||||
}
|
||||
paginateHTML+='<li><a href="#next" rel="'+(selectedpage+1)+'">next »</a></li>\n'
|
||||
paginateHTML+='</ul></div>'
|
||||
}// end construction
|
||||
for (var i=0; i<this.paginateIds.length; i++){ //loop through # of pagination DIVs specified
|
||||
var paginatediv=document.getElementById(this.paginateIds[i]) //reference pagination DIV
|
||||
paginatediv._currentpage=selectedpage //remember current page selected (which will become previous page selected after each page turn)
|
||||
paginatediv.innerHTML=paginateHTML
|
||||
var pageinstance=this
|
||||
paginatediv.onclick=function(e){
|
||||
var targetobj=window.event? window.event.srcElement : e.target
|
||||
if (targetobj.tagName=="A" && targetobj.getAttribute("rel")!=""){
|
||||
if (!/disabled/i.test(targetobj.className)){ //if this pagination link isn't disabled (CSS classname "disabled")
|
||||
pageinstance.selectpage(parseInt(targetobj.getAttribute("rel")))
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
selectpage:function(selectedpage){
|
||||
//replace URL's root domain with dynamic root domain (with or without "www"), for ajax security sake:
|
||||
var modifiedurl=this.pageinfo.page[selectedpage].replace(/^http:\/\/[^\/]+\//i, "http://"+window.location.hostname+"/")
|
||||
ajaxpageclass.connect(modifiedurl, this.divId) //fetch requested page and display it inside DIV
|
||||
if (this.pageinfo.page.length==1) //if this book only containe 1 page
|
||||
return
|
||||
var prevlinkoffset=1
|
||||
for (var i=0; i<this.paginateIds.length; i++){ //loop through # of pagination DIVs specified
|
||||
var paginatediv=document.getElementById(this.paginateIds[i])
|
||||
var paginatelinks=paginatediv.getElementsByTagName("a")
|
||||
paginatelinks[0].className=(selectedpage==0)? "prevnext disabled" : "prevnext" //if current page is 1st page, disable "prev" button
|
||||
paginatelinks[0].setAttribute("rel", selectedpage-1) //update rel attr of "prev" button with page # to go to when clicked on
|
||||
paginatelinks[paginatelinks.length-1].className=(selectedpage==this.pageinfo.page.length-1)? "prevnext disabled" : "prevnext"
|
||||
paginatelinks[paginatelinks.length-1].setAttribute("rel", selectedpage+1)
|
||||
paginatelinks[paginatediv._currentpage+prevlinkoffset].className="" //deselect last clicked on pagination link (previous)
|
||||
paginatelinks[selectedpage+prevlinkoffset].className="currentpage" //select current pagination link
|
||||
paginatediv._currentpage=selectedpage //Update last clicked on link
|
||||
}
|
||||
},
|
||||
|
||||
refresh:function(pageinfo){
|
||||
this.pageinfo=pageinfo
|
||||
var initialpage=(pageinfo.selectedpage<pageinfo.page.length)? pageinfo.selectedpage : 0
|
||||
this.buildpagination(initialpage)
|
||||
this.selectpage(initialpage)
|
||||
}
|
||||
}
|
|
@ -1,158 +0,0 @@
|
|||
function virtualpaginate(className, chunksize, elementType){
|
||||
var elementType=(typeof elementType=="undefined")? "div" : elementType //The type of element used to divide up content into pieces. Defaults to "div"
|
||||
this.pieces=virtualpaginate.collectElementbyClass(className, elementType) //get total number of divs matching class name
|
||||
//Set this.chunksize: 1 if "chunksize" param is undefined, "chunksize" if it's less than total pieces available, or simply total pieces avail (show all)
|
||||
this.chunksize=(typeof chunksize=="undefined")? 1 : (chunksize>0 && chunksize <this.pieces.length)? chunksize : this.pieces.length
|
||||
this.pagecount=Math.ceil(this.pieces.length/this.chunksize) //calculate number of "pages" needed to show the divs
|
||||
this.showpage(-1) //show no pages (aka hide all)
|
||||
this.currentpage=0 //Having hidden all pages, set currently visible page to 1st page
|
||||
this.showpage(this.currentpage) //Show first page
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// PRIVATE: collectElementbyClass(classname)- Returns an array containing DIVs with the specified classname
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
virtualpaginate.collectElementbyClass=function(classname, element){ //Returns an array containing DIVs with specified classname
|
||||
var classnameRE=new RegExp("(^|\\s+)"+classname+"($|\\s+)", "i") //regular expression to screen for classname within element
|
||||
var pieces=[]
|
||||
var alltags=document.getElementsByTagName(element)
|
||||
for (var i=0; i<alltags.length; i++){
|
||||
if (typeof alltags[i].className=="string" && alltags[i].className.search(classnameRE)!=-1)
|
||||
pieces[pieces.length]=alltags[i]
|
||||
}
|
||||
return pieces
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// PUBLIC: showpage(pagenumber)- Shows a page based on parameter passed (0=page1, 1=page2 etc)
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
virtualpaginate.prototype.showpage=function(pagenumber){
|
||||
var totalitems=this.pieces.length //total number of broken up divs
|
||||
var showstartindex=pagenumber*this.chunksize //array index of div to start showing per pagenumber setting
|
||||
var showendindex=showstartindex+this.chunksize-1 //array index of div to stop showing after per pagenumber setting
|
||||
for (var i=0; i<totalitems; i++){
|
||||
if (i>=showstartindex && i<=showendindex)
|
||||
this.pieces[i].style.display="block"
|
||||
else
|
||||
this.pieces[i].style.display="none"
|
||||
}
|
||||
this.currentpage=parseInt(pagenumber)
|
||||
if (this.cpspan) //if <span class="paginateinfo> element is present, update it with the most current info (ie: Page 3/4)
|
||||
this.cpspan.innerHTML='Page '+(this.currentpage+1)+'/'+this.pagecount
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// PRIVATE: paginate_build_() methods- Various methods to create pagination interfaces
|
||||
// paginate_build_selectmenu(paginatedropdown)- Accepts an empty SELECT element and turns it into pagination menu
|
||||
// paginate_build_regularlinks(paginatelinks)- Accepts a collection of links and screens out/ creates pagination out of ones with specific "rel" attr
|
||||
// paginate_build_flatview(flatviewcontainer)- Accepts <span class="flatview"> element and replaces it with sequential pagination links
|
||||
// paginate_build_cpinfo(cpspan)- Accepts <span class="paginateinfo"> element and displays current page info (ie: Page 1/4)
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
virtualpaginate.prototype.paginate_build_selectmenu=function(paginatedropdown, anchortext){
|
||||
var instanceOfBox=this
|
||||
var anchortext=anchortext || new Array()
|
||||
this.selectmenupresent=1
|
||||
for (var i=0; i<this.pagecount; i++){
|
||||
if (typeof anchortext[i]!="undefined") //if custom anchor text for this link exists, use anchor text as each OPTION's text
|
||||
paginatedropdown.options[i]=new Option(anchortext[i], i)
|
||||
else //else, use auto incremented, sequential numbers
|
||||
paginatedropdown.options[i]=new Option("Page "+(i+1)+" of "+this.pagecount, i)
|
||||
}
|
||||
paginatedropdown.selectedIndex=this.currentpage
|
||||
paginatedropdown.onchange=function(){
|
||||
instanceOfBox.showpage(this.selectedIndex)
|
||||
}
|
||||
}
|
||||
|
||||
virtualpaginate.prototype.paginate_build_regularlinks=function(paginatelinks){
|
||||
var instanceOfBox=this
|
||||
for (var i=0; i<paginatelinks.length; i++){
|
||||
var currentpagerel=paginatelinks[i].getAttribute("rel")
|
||||
if (currentpagerel=="previous" || currentpagerel=="next" || currentpagerel=="first" || currentpagerel=="last") //screen for these "rel" values
|
||||
paginatelinks[i].onclick=function(){
|
||||
instanceOfBox.navigate(this.getAttribute("rel"))
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
virtualpaginate.prototype.paginate_build_flatview=function(flatviewcontainer, anchortext){
|
||||
var instanceOfBox=this
|
||||
var flatviewhtml=""
|
||||
var anchortext=anchortext || new Array()
|
||||
for (var i=0; i<this.pagecount; i++){
|
||||
if (typeof anchortext[i]!="undefined") //if custom anchor text for this link exists
|
||||
flatviewhtml+='<a href="#flatview" rel="'+i+'">'+anchortext[i]+'</a> ' //build pagination link using custom anchor text
|
||||
else
|
||||
flatviewhtml+='<a href="#flatview" rel="'+i+'">'+(i+1)+'</a> ' //build pagination link using auto incremented sequential number instead
|
||||
}
|
||||
flatviewcontainer.innerHTML=flatviewhtml
|
||||
this.flatviewlinks=flatviewcontainer.getElementsByTagName("a")
|
||||
for (var i=0; i<this.flatviewlinks.length; i++){
|
||||
this.flatviewlinks[i].onclick=function(){
|
||||
instanceOfBox.flatviewlinks[instanceOfBox.currentpage].className="" //"Unhighlight" last flatview link clicked on...
|
||||
this.className="selected" //while "highlighting" currently clicked on flatview link (setting its class name to "selected"
|
||||
instanceOfBox.showpage(this.getAttribute("rel"))
|
||||
return false
|
||||
}
|
||||
}
|
||||
this.flatviewlinks[this.currentpage].className="selected" //"Highlight" current page
|
||||
this.flatviewpresent=true //indicate flat view links are present
|
||||
}
|
||||
|
||||
virtualpaginate.prototype.paginate_build_cpinfo=function(cpspan){
|
||||
this.cpspan=cpspan
|
||||
cpspan.innerHTML='Page '+(this.currentpage+1)+'/'+this.pagecount
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// PRIVATE: buildpagination()- Create pagination interface by calling one or more of the paginate_build_() functions
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
virtualpaginate.prototype.buildpagination=function(divid, optnavtext){
|
||||
var instanceOfBox=this
|
||||
var paginatediv=document.getElementById(divid)
|
||||
if (this.chunksize==this.pieces.length){ //if user has set to display all pieces at once, no point in creating pagination div
|
||||
paginatediv.style.display="none"
|
||||
return
|
||||
}
|
||||
var paginationcode=paginatediv.innerHTML //Get user defined, "unprocessed" HTML within paginate div
|
||||
if (paginatediv.getElementsByTagName("select").length>0) //if there's a select menu in div
|
||||
this.paginate_build_selectmenu(paginatediv.getElementsByTagName("select")[0], optnavtext)
|
||||
if (paginatediv.getElementsByTagName("a").length>0) //if there are links defined in div
|
||||
this.paginate_build_regularlinks(paginatediv.getElementsByTagName("a"))
|
||||
var allspans=paginatediv.getElementsByTagName("span") //Look for span tags within passed div
|
||||
for (var i=0; i<allspans.length; i++){
|
||||
if (allspans[i].className=="flatview")
|
||||
this.paginate_build_flatview(allspans[i], optnavtext)
|
||||
else if (allspans[i].className=="paginateinfo")
|
||||
this.paginate_build_cpinfo(allspans[i])
|
||||
}
|
||||
this.paginatediv=paginatediv
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// PRIVATE: navigate(keyword)- Calls this.showpage() with the currentpage property preset based on entered keyword
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
virtualpaginate.prototype.navigate=function(keyword){
|
||||
if (this.flatviewpresent)
|
||||
this.flatviewlinks[this.currentpage].className="" //"Unhighlight" previous page (before this.currentpage increments)
|
||||
if (keyword=="previous")
|
||||
this.currentpage=(this.currentpage>0)? this.currentpage-1 : (this.currentpage==0)? this.pagecount-1 : 0
|
||||
else if (keyword=="next")
|
||||
this.currentpage=(this.currentpage<this.pagecount-1)? this.currentpage+1 : 0
|
||||
else if (keyword=="first")
|
||||
this.currentpage=0
|
||||
else if (keyword=="last")
|
||||
this.currentpage=this.pieces.length-1
|
||||
this.showpage(this.currentpage)
|
||||
if (this.selectmenupresent)
|
||||
this.paginatediv.getElementsByTagName("select")[0].selectedIndex=this.currentpage
|
||||
if (this.flatviewpresent)
|
||||
this.flatviewlinks[this.currentpage].className="selected" //"Highlight" current page
|
||||
}
|
|
@ -1,115 +0,0 @@
|
|||
|
||||
/***********************************************
|
||||
* Fixed ToolTip script- © Dynamic Drive (www.dynamicdrive.com)
|
||||
* This notice MUST stay intact for legal use
|
||||
* Visit http://www.dynamicdrive.com/ for full source code
|
||||
***********************************************/
|
||||
|
||||
var tipwidth='150px' //default tooltip width
|
||||
var tipbgcolor='#FFFFFF' //tooltip bgcolor
|
||||
var disappeardelay=150 //tooltip disappear speed onMouseout (in miliseconds)
|
||||
var vertical_offset="3px" //horizontal offset of tooltip from anchor link
|
||||
var horizontal_offset="3px" //horizontal offset of tooltip from anchor link
|
||||
|
||||
/////No further editting needed
|
||||
|
||||
var ie4=document.all
|
||||
var ns6=document.getElementById&&!document.all
|
||||
|
||||
if (ie4||ns6)
|
||||
document.write('<div id="fixedtipdiv" style="visibility:hidden;width:'+tipwidth+';background-color:'+tipbgcolor+'" ></div>')
|
||||
|
||||
function getposOffset(what, offsettype){
|
||||
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
|
||||
var parentEl=what.offsetParent;
|
||||
while (parentEl!=null){
|
||||
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
|
||||
parentEl=parentEl.offsetParent;
|
||||
}
|
||||
return totaloffset;
|
||||
}
|
||||
|
||||
|
||||
function showhide(obj, e, visible, hidden, tipwidth){
|
||||
if (ie4||ns6)
|
||||
dropmenuobj.style.left=dropmenuobj.style.top=-500
|
||||
if (tipwidth!=""){
|
||||
dropmenuobj.widthobj=dropmenuobj.style
|
||||
dropmenuobj.widthobj.width=tipwidth
|
||||
}
|
||||
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
|
||||
obj.visibility=visible
|
||||
else if (e.type=="click")
|
||||
obj.visibility=hidden
|
||||
}
|
||||
|
||||
function iecompattest(){
|
||||
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
|
||||
}
|
||||
|
||||
function clearbrowseredge(obj, whichedge){
|
||||
var edgeoffset=(whichedge=="rightedge")? parseInt(horizontal_offset)*-1 : parseInt(vertical_offset)*-1
|
||||
if (whichedge=="rightedge"){
|
||||
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
|
||||
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
|
||||
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
|
||||
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
|
||||
}
|
||||
else{
|
||||
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
|
||||
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
|
||||
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
|
||||
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
|
||||
}
|
||||
return edgeoffset
|
||||
}
|
||||
|
||||
function fixedtooltip(menucontents, obj, e, tipwidth){
|
||||
if (window.event) event.cancelBubble=true
|
||||
else if (e.stopPropagation) e.stopPropagation()
|
||||
clearhidetip()
|
||||
dropmenuobj=document.getElementById? document.getElementById("fixedtipdiv") : fixedtipdiv
|
||||
dropmenuobj.innerHTML=menucontents
|
||||
|
||||
if (ie4||ns6){
|
||||
showhide(dropmenuobj.style, e, "visible", "hidden", tipwidth)
|
||||
dropmenuobj.x=getposOffset(obj, "left")
|
||||
dropmenuobj.y=getposOffset(obj, "top")
|
||||
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
|
||||
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
|
||||
}
|
||||
}
|
||||
|
||||
//Fixed Tool Tip 2
|
||||
function fixedtooltip2(menucontents, obj, e, tipwidth){
|
||||
if (window.event) event.cancelBubble=true
|
||||
else if (e.stopPropagation) e.stopPropagation()
|
||||
clearhidetip()
|
||||
dropmenuobj=document.getElementById? document.getElementById("fixedtipdiv") : fixedtipdiv
|
||||
dropmenuobj.innerHTML='<table bgcolor=#f1f1f1 width=400px class=des_table><tr><td>'+menucontents+'</td></tr></table>'
|
||||
|
||||
if (ie4||ns6){
|
||||
showhide(dropmenuobj.style, e, "visible", "hidden", tipwidth)
|
||||
dropmenuobj.x=getposOffset(obj, "left")
|
||||
dropmenuobj.y=getposOffset(obj, "top")
|
||||
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
|
||||
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
|
||||
}
|
||||
}
|
||||
|
||||
function hidetip(e){
|
||||
if (typeof dropmenuobj!="undefined"){
|
||||
if (ie4||ns6)
|
||||
dropmenuobj.style.visibility="hidden"
|
||||
}
|
||||
}
|
||||
|
||||
function delayhidetip(){
|
||||
if (ie4||ns6)
|
||||
delayhide=setTimeout("hidetip()",disappeardelay)
|
||||
}
|
||||
|
||||
function clearhidetip(){
|
||||
if (typeof delayhide!="undefined")
|
||||
clearTimeout(delayhide)
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
function LangChange( form ) {
|
||||
|
||||
var newIndex = uichange.lang.selectedIndex;
|
||||
cururl = uichange.lang.options[ newIndex ].value;
|
||||
window.location.assign( cururl );
|
||||
|
||||
}
|
||||
|
||||
function StyleChange( form ) {
|
||||
|
||||
var newIndex = uichange.style.selectedIndex;
|
||||
cururl = uichange.style.options[ newIndex ].value;
|
||||
window.location.assign( cururl );
|
||||
|
||||
}
|
4
upload/js/swfobject.js
Normal file
8
upload/js/swfobject.obj.js
Normal file
|
@ -1,211 +0,0 @@
|
|||
function switchcontent(className, filtertag){
|
||||
this.className=className
|
||||
this.collapsePrev=false //Default: Collapse previous content each time
|
||||
this.persistType="none" //Default: Disable persistence
|
||||
//Limit type of element to scan for on page for switch contents if 2nd function parameter is defined, for efficiency sake (ie: "div")
|
||||
this.filter_content_tag=(typeof filtertag!="undefined")? filtertag.toLowerCase() : ""
|
||||
}
|
||||
|
||||
switchcontent.prototype.setStatus=function(openHTML, closeHTML){ //PUBLIC: Set open/ closing HTML indicator. Optional
|
||||
this.statusOpen=openHTML
|
||||
this.statusClosed=closeHTML
|
||||
}
|
||||
|
||||
switchcontent.prototype.setColor=function(openColor, closeColor){ //PUBLIC: Set open/ closing color of switch header. Optional
|
||||
this.colorOpen=openColor
|
||||
this.colorClosed=closeColor
|
||||
}
|
||||
|
||||
switchcontent.prototype.setPersist=function(bool, days){ //PUBLIC: Enable/ disable persistence. Default is false.
|
||||
if (bool==true){ //if enable persistence
|
||||
if (typeof days=="undefined") //if session only
|
||||
this.persistType="session"
|
||||
else{ //else if non session persistent
|
||||
this.persistType="days"
|
||||
this.persistDays=parseInt(days)
|
||||
}
|
||||
}
|
||||
else
|
||||
this.persistType="none"
|
||||
}
|
||||
|
||||
switchcontent.prototype.collapsePrevious=function(bool){ //PUBLIC: Enable/ disable collapse previous content. Default is false.
|
||||
this.collapsePrev=bool
|
||||
}
|
||||
|
||||
|
||||
switchcontent.prototype.sweepToggle=function(setting){ //PUBLIC: Expand/ contract all contents method. (Values: "contract"|"expand")
|
||||
if (typeof this.headers!="undefined" && this.headers.length>0){ //if there are switch contents defined on the page
|
||||
for (var i=0; i<this.headers.length; i++){
|
||||
if (setting=="expand")
|
||||
this.expandcontent(this.headers[i]) //expand each content
|
||||
else if (setting=="contract")
|
||||
this.contractcontent(this.headers[i]) //contract each content
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switchcontent.prototype.defaultExpanded=function(){
|
||||
var expandedindices=[] //Array to hold indices (position) of content to be expanded by default
|
||||
//Loop through function arguments, and store each one within array
|
||||
//Two test conditions: 1) End of Arguments array, or 2) If "collapsePrev" is enabled, only the first entered index (as only 1 content can be expanded at any time)
|
||||
for (var i=0; (!this.collapsePrev && i<arguments.length) || (this.collapsePrev && i==0); i++)
|
||||
expandedindices[expandedindices.length]=arguments[i]
|
||||
this.expandedindices=expandedindices.join(",") //convert array into a string of the format: "0,2,3" for later parsing by script
|
||||
}
|
||||
|
||||
|
||||
//PRIVATE: Sets color of switch header.
|
||||
|
||||
switchcontent.prototype.togglecolor=function(header, status){
|
||||
if (typeof this.colorOpen!="undefined")
|
||||
header.style.color=status
|
||||
}
|
||||
|
||||
|
||||
//PRIVATE: Sets status indicator HTML of switch header.
|
||||
|
||||
switchcontent.prototype.togglestatus=function(header, status){
|
||||
if (typeof this.statusOpen!="undefined")
|
||||
header.firstChild.innerHTML=status
|
||||
}
|
||||
|
||||
|
||||
//PRIVATE: Contracts a content based on its corresponding header entered
|
||||
|
||||
switchcontent.prototype.contractcontent=function(header){
|
||||
var innercontent=document.getElementById(header.id.replace("-title", "")) //Reference content for this header
|
||||
innercontent.style.display="none"
|
||||
this.togglestatus(header, this.statusClosed)
|
||||
this.togglecolor(header, this.colorClosed)
|
||||
}
|
||||
|
||||
|
||||
//PRIVATE: Expands a content based on its corresponding header entered
|
||||
|
||||
switchcontent.prototype.expandcontent=function(header){
|
||||
var innercontent=document.getElementById(header.id.replace("-title", ""))
|
||||
innercontent.style.display="block"
|
||||
this.togglestatus(header, this.statusOpen)
|
||||
this.togglecolor(header, this.colorOpen)
|
||||
}
|
||||
|
||||
|
||||
switchcontent.prototype.toggledisplay=function(header){
|
||||
var innercontent=document.getElementById(header.id.replace("-title", "")) //Reference content for this header
|
||||
if (innercontent.style.display=="block")
|
||||
this.contractcontent(header)
|
||||
else{
|
||||
this.expandcontent(header)
|
||||
if (this.collapsePrev && typeof this.prevHeader!="undefined" && this.prevHeader.id!=header.id) // If "Collapse Previous" is enabled and there's a previous open content
|
||||
this.contractcontent(this.prevHeader) //Contract that content first
|
||||
}
|
||||
if (this.collapsePrev)
|
||||
this.prevHeader=header //Set current expanded content as the next "Previous Content"
|
||||
}
|
||||
|
||||
|
||||
|
||||
switchcontent.prototype.collectElementbyClass=function(classname){ //Returns an array containing DIVs with specified classname
|
||||
var classnameRE=new RegExp("(^|\\s+)"+classname+"($|\\s+)", "i") //regular expression to screen for classname within element
|
||||
this.headers=[], this.innercontents=[]
|
||||
if (this.filter_content_tag!="") //If user defined limit type of element to scan for to a certain element (ie: "div" only)
|
||||
var allelements=document.getElementsByTagName(this.filter_content_tag)
|
||||
else //else, scan all elements on the page!
|
||||
var allelements=document.all? document.all : document.getElementsByTagName("*")
|
||||
for (var i=0; i<allelements.length; i++){
|
||||
if (typeof allelements[i].className=="string" && allelements[i].className.search(classnameRE)!=-1){
|
||||
if (document.getElementById(allelements[i].id+"-title")!=null){ //if header exists for this inner content
|
||||
this.headers[this.headers.length]=document.getElementById(allelements[i].id+"-title") //store reference to header intended for this inner content
|
||||
this.innercontents[this.innercontents.length]=allelements[i] //store reference to this inner content
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//PRIVATE: init()- Initializes Switch Content function (collapse contents by default unless exception is found)
|
||||
|
||||
switchcontent.prototype.init=function(){
|
||||
var instanceOf=this
|
||||
this.collectElementbyClass(this.className) //Get all headers and its corresponding content based on shared class name of contents
|
||||
if (this.headers.length==0) //If no headers are present (no contents to switch), just exit
|
||||
return
|
||||
//If admin has changed number of days to persist from current cookie records, reset persistence by deleting cookie
|
||||
if (this.persistType=="days" && (parseInt(switchcontent.getCookie(this.className+"_dtrack"))!=this.persistDays))
|
||||
switchcontent.setCookie(this.className+"_d", "", -1) //delete cookie
|
||||
// Get ids of open contents below. Four possible scenerios:
|
||||
// 1) Session only persistence is enabled AND corresponding cookie contains a non blank ("") string
|
||||
// 2) Regular (in days) persistence is enabled AND corresponding cookie contains a non blank ("") string
|
||||
// 3) If there are contents that should be enabled by default (even if persistence is enabled and this IS the first page load)
|
||||
// 4) Default to no contents should be expanded on page load ("" value)
|
||||
var opencontents_ids=(this.persistType=="session" && switchcontent.getCookie(this.className)!="")? ','+switchcontent.getCookie(this.className)+',' : (this.persistType=="days" && switchcontent.getCookie(this.className+"_d")!="")? ','+switchcontent.getCookie(this.className+"_d")+',' : (this.expandedindices)? ','+this.expandedindices+',' : ""
|
||||
for (var i=0; i<this.headers.length; i++){ //BEGIN FOR LOOP
|
||||
if (typeof this.statusOpen!="undefined") //If open/ closing HTML indicator is enabled/ set
|
||||
this.headers[i].innerHTML='<span class="status"></span>'+this.headers[i].innerHTML //Add a span element to original HTML to store indicator
|
||||
if (opencontents_ids.indexOf(','+i+',')!=-1){ //if index "i" exists within cookie string or default-enabled string (i=position of the content to expand)
|
||||
this.expandcontent(this.headers[i]) //Expand each content per stored indices (if ""Collapse Previous" is set, only one content)
|
||||
if (this.collapsePrev) //If "Collapse Previous" set
|
||||
this.prevHeader=this.headers[i] //Indicate the expanded content's corresponding header as the last clicked on header (for logic purpose)
|
||||
}
|
||||
else //else if no indices found in stored string
|
||||
this.contractcontent(this.headers[i]) //Contract each content by default
|
||||
this.headers[i].onclick=function(){instanceOf.toggledisplay(this)}
|
||||
} //END FOR LOOP
|
||||
switchcontent.dotask(window, function(){instanceOf.rememberpluscleanup()}, "unload") //Call persistence method onunload
|
||||
}
|
||||
|
||||
|
||||
//Function to store index of opened ULs relative to other ULs in Tree into cookie:
|
||||
switchcontent.prototype.rememberpluscleanup=function(){
|
||||
//Define array to hold ids of open content that should be persisted
|
||||
//Default to just "none" to account for the case where no contents are open when user leaves the page (and persist that):
|
||||
var opencontents=new Array("none")
|
||||
for (var i=0; i<this.innercontents.length; i++){
|
||||
//If persistence enabled, content in question is expanded, and either "Collapse Previous" is disabled, or if enabled, this is the first expanded content
|
||||
if (this.persistType!="none" && this.innercontents[i].style.display=="block" && (!this.collapsePrev || (this.collapsePrev && opencontents.length<2)))
|
||||
opencontents[opencontents.length]=i //save the index of the opened UL (relative to the entire list of ULs) as an array element
|
||||
this.headers[i].onclick=null //Cleanup code
|
||||
}
|
||||
if (opencontents.length>1) //If there exists open content to be persisted
|
||||
opencontents.shift() //Boot the "none" value from the array, so all it contains are the ids of the open contents
|
||||
if (typeof this.statusOpen!="undefined")
|
||||
this.statusOpen=this.statusClosed=null //Cleanup code
|
||||
if (this.persistType=="session") //if session only cookie set
|
||||
switchcontent.setCookie(this.className, opencontents.join(",")) //populate cookie with indices of open contents: classname=1,2,3,etc
|
||||
else if (this.persistType=="days" && typeof this.persistDays=="number"){ //if persistent cookie set instead
|
||||
switchcontent.setCookie(this.className+"_d", opencontents.join(","), this.persistDays) //populate cookie with indices of open contents
|
||||
switchcontent.setCookie(this.className+"_dtrack", this.persistDays, this.persistDays) //also remember number of days to persist (int)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// A few utility functions below:
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
|
||||
switchcontent.dotask=function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload)
|
||||
var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
|
||||
if (target.addEventListener)
|
||||
target.addEventListener(tasktype, functionref, false)
|
||||
else if (target.attachEvent)
|
||||
target.attachEvent(tasktype, functionref)
|
||||
}
|
||||
|
||||
switchcontent.getCookie=function(Name){
|
||||
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
|
||||
if (document.cookie.match(re)) //if cookie found
|
||||
return document.cookie.match(re)[0].split("=")[1] //return its value
|
||||
return ""
|
||||
}
|
||||
|
||||
switchcontent.setCookie=function(name, value, days){
|
||||
if (typeof days!="undefined"){ //if set persistent cookie
|
||||
var expireDate = new Date()
|
||||
var expstring=expireDate.setDate(expireDate.getDate()+days)
|
||||
document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()
|
||||
}
|
||||
else //else if this is a session only cookie
|
||||
document.cookie = name+"="+value
|
||||
}
|
After Width: | Height: | Size: 260 B |
After Width: | Height: | Size: 251 B |
After Width: | Height: | Size: 178 B |
After Width: | Height: | Size: 181 B |
After Width: | Height: | Size: 180 B |
After Width: | Height: | Size: 180 B |
After Width: | Height: | Size: 104 B |
After Width: | Height: | Size: 125 B |
After Width: | Height: | Size: 136 B |
After Width: | Height: | Size: 105 B |
After Width: | Height: | Size: 132 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 90 B |
After Width: | Height: | Size: 118 B |
After Width: | Height: | Size: 129 B |
After Width: | Height: | Size: 88 B |
BIN
upload/js/ui/css/ui-lightness/images/ui-icons_0078ae_256x240.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
upload/js/ui/css/ui-lightness/images/ui-icons_056b93_256x240.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
upload/js/ui/css/ui-lightness/images/ui-icons_222222_256x240.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
upload/js/ui/css/ui-lightness/images/ui-icons_228ef1_256x240.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
upload/js/ui/css/ui-lightness/images/ui-icons_292724_256x240.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
upload/js/ui/css/ui-lightness/images/ui-icons_75e5f5_256x240.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
upload/js/ui/css/ui-lightness/images/ui-icons_d8e7f3_256x240.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
upload/js/ui/css/ui-lightness/images/ui-icons_e0fdff_256x240.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
upload/js/ui/css/ui-lightness/images/ui-icons_ef8c08_256x240.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
upload/js/ui/css/ui-lightness/images/ui-icons_fcd113_256x240.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
upload/js/ui/css/ui-lightness/images/ui-icons_ffd27a_256x240.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
upload/js/ui/css/ui-lightness/images/ui-icons_ffffff_256x240.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
406
upload/js/ui/css/ui-lightness/jquery-ui-1.7.2.custom.css
vendored
Normal file
|
@ -0,0 +1,406 @@
|
|||
/*
|
||||
* jQuery UI CSS Framework
|
||||
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
*/
|
||||
|
||||
/* Layout helpers
|
||||
----------------------------------*/
|
||||
.ui-helper-hidden { display: none; }
|
||||
.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
|
||||
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
||||
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
||||
.ui-helper-clearfix { display: inline-block; }
|
||||
/* required comment for clearfix to work in Opera \*/
|
||||
* html .ui-helper-clearfix { height:1%; }
|
||||
.ui-helper-clearfix { display:block; }
|
||||
/* end clearfix */
|
||||
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
||||
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-disabled { cursor: default !important; }
|
||||
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* jQuery UI CSS Framework
|
||||
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=5px&bgColorHeader=2191c0&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=75&borderColorHeader=4297d7&fcHeader=eaf5f7&iconColorHeader=d8e7f3&bgColorContent=fcfdfd&bgTextureContent=06_inset_hard.png&bgImgOpacityContent=100&borderColorContent=a6c9e2&fcContent=222222&iconColorContent=0078ae&bgColorDefault=0078ae&bgTextureDefault=02_glass.png&bgImgOpacityDefault=45&borderColorDefault=77d5f7&fcDefault=ffffff&iconColorDefault=e0fdff&bgColorHover=79c9ec&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=448dae&fcHover=026890&iconColorHover=056b93&bgColorActive=333333&bgTextureActive=03_highlight_soft.png&bgImgOpacityActive=50&borderColorActive=77d5f7&fcActive=ffffff&iconColorActive=75e5f5&bgColorHighlight=0099cc&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=00394d&fcHighlight=ffffff&iconColorHighlight=292724&bgColorError=e14f1c&bgTextureError=12_gloss_wave.png&bgImgOpacityError=45&borderColorError=cd0a0a&fcError=ffffff&iconColorError=fcd113&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=75&opacityOverlay=30&bgColorShadow=999999&bgTextureShadow=01_flat.png&bgImgOpacityShadow=55&opacityShadow=45&thicknessShadow=0px&offsetTopShadow=5px&offsetLeftShadow=5px&cornerRadiusShadow=5px
|
||||
*/
|
||||
|
||||
|
||||
/* Component containers
|
||||
----------------------------------*/
|
||||
.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
|
||||
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
|
||||
.ui-widget-content { border: 1px solid #a6c9e2; background: #fcfdfd url(images/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x; color: #222222; }
|
||||
.ui-widget-content a { color: #222222; }
|
||||
.ui-widget-header { border: 1px solid #4297d7; background: #2191c0 url(images/ui-bg_gloss-wave_75_2191c0_500x100.png) 50% 50% repeat-x; color: #eaf5f7; font-weight: bold; }
|
||||
.ui-widget-header a { color: #eaf5f7; }
|
||||
|
||||
/* Interaction states
|
||||
----------------------------------*/
|
||||
.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #77d5f7; background: #0078ae url(images/ui-bg_glass_45_0078ae_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #ffffff; outline: none; }
|
||||
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #ffffff; text-decoration: none; outline: none; }
|
||||
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #448dae; background: #79c9ec url(images/ui-bg_glass_75_79c9ec_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #026890; outline: none; }
|
||||
.ui-state-hover a, .ui-state-hover a:hover { color: #026890; text-decoration: none; outline: none; }
|
||||
.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #77d5f7; background: #333333 url(images/ui-bg_highlight-soft_50_333333_1x100.png) 50% 50% repeat-x; font-weight: normal; color: #ffffff; outline: none; }
|
||||
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #ffffff; outline: none; text-decoration: none; }
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #00394d; background: #0099cc url(images/ui-bg_flat_55_0099cc_40x100.png) 50% 50% repeat-x; color: #ffffff; }
|
||||
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #ffffff; }
|
||||
.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cd0a0a; background: #e14f1c url(images/ui-bg_gloss-wave_45_e14f1c_500x100.png) 50% top repeat-x; color: #ffffff; }
|
||||
.ui-state-error a, .ui-widget-content .ui-state-error a { color: #ffffff; }
|
||||
.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #ffffff; }
|
||||
.ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
||||
.ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; }
|
||||
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_0078ae_256x240.png); }
|
||||
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_0078ae_256x240.png); }
|
||||
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_d8e7f3_256x240.png); }
|
||||
.ui-state-default .ui-icon { background-image: url(images/ui-icons_e0fdff_256x240.png); }
|
||||
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_056b93_256x240.png); }
|
||||
.ui-state-active .ui-icon {background-image: url(images/ui-icons_75e5f5_256x240.png); }
|
||||
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_292724_256x240.png); }
|
||||
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_fcd113_256x240.png); }
|
||||
|
||||
/* positioning */
|
||||
.ui-icon-carat-1-n { background-position: 0 0; }
|
||||
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
||||
.ui-icon-carat-1-e { background-position: -32px 0; }
|
||||
.ui-icon-carat-1-se { background-position: -48px 0; }
|
||||
.ui-icon-carat-1-s { background-position: -64px 0; }
|
||||
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
||||
.ui-icon-carat-1-w { background-position: -96px 0; }
|
||||
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
||||
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
||||
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
||||
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
||||
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
||||
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
||||
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
||||
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
||||
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
||||
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
||||
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
||||
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
||||
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
||||
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
||||
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
||||
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
||||
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
||||
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
||||
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
||||
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
||||
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
||||
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
||||
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
||||
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
||||
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
||||
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
||||
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
||||
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
||||
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
||||
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
||||
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
||||
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
||||
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
||||
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
||||
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
||||
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
||||
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
||||
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
||||
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
||||
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
||||
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
||||
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
||||
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
||||
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
||||
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
||||
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
||||
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
||||
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
||||
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
||||
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
||||
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
||||
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
||||
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
||||
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
||||
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
||||
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
||||
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
||||
.ui-icon-extlink { background-position: -32px -80px; }
|
||||
.ui-icon-newwin { background-position: -48px -80px; }
|
||||
.ui-icon-refresh { background-position: -64px -80px; }
|
||||
.ui-icon-shuffle { background-position: -80px -80px; }
|
||||
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
||||
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
||||
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
||||
.ui-icon-folder-open { background-position: -16px -96px; }
|
||||
.ui-icon-document { background-position: -32px -96px; }
|
||||
.ui-icon-document-b { background-position: -48px -96px; }
|
||||
.ui-icon-note { background-position: -64px -96px; }
|
||||
.ui-icon-mail-closed { background-position: -80px -96px; }
|
||||
.ui-icon-mail-open { background-position: -96px -96px; }
|
||||
.ui-icon-suitcase { background-position: -112px -96px; }
|
||||
.ui-icon-comment { background-position: -128px -96px; }
|
||||
.ui-icon-person { background-position: -144px -96px; }
|
||||
.ui-icon-print { background-position: -160px -96px; }
|
||||
.ui-icon-trash { background-position: -176px -96px; }
|
||||
.ui-icon-locked { background-position: -192px -96px; }
|
||||
.ui-icon-unlocked { background-position: -208px -96px; }
|
||||
.ui-icon-bookmark { background-position: -224px -96px; }
|
||||
.ui-icon-tag { background-position: -240px -96px; }
|
||||
.ui-icon-home { background-position: 0 -112px; }
|
||||
.ui-icon-flag { background-position: -16px -112px; }
|
||||
.ui-icon-calendar { background-position: -32px -112px; }
|
||||
.ui-icon-cart { background-position: -48px -112px; }
|
||||
.ui-icon-pencil { background-position: -64px -112px; }
|
||||
.ui-icon-clock { background-position: -80px -112px; }
|
||||
.ui-icon-disk { background-position: -96px -112px; }
|
||||
.ui-icon-calculator { background-position: -112px -112px; }
|
||||
.ui-icon-zoomin { background-position: -128px -112px; }
|
||||
.ui-icon-zoomout { background-position: -144px -112px; }
|
||||
.ui-icon-search { background-position: -160px -112px; }
|
||||
.ui-icon-wrench { background-position: -176px -112px; }
|
||||
.ui-icon-gear { background-position: -192px -112px; }
|
||||
.ui-icon-heart { background-position: -208px -112px; }
|
||||
.ui-icon-star { background-position: -224px -112px; }
|
||||
.ui-icon-link { background-position: -240px -112px; }
|
||||
.ui-icon-cancel { background-position: 0 -128px; }
|
||||
.ui-icon-plus { background-position: -16px -128px; }
|
||||
.ui-icon-plusthick { background-position: -32px -128px; }
|
||||
.ui-icon-minus { background-position: -48px -128px; }
|
||||
.ui-icon-minusthick { background-position: -64px -128px; }
|
||||
.ui-icon-close { background-position: -80px -128px; }
|
||||
.ui-icon-closethick { background-position: -96px -128px; }
|
||||
.ui-icon-key { background-position: -112px -128px; }
|
||||
.ui-icon-lightbulb { background-position: -128px -128px; }
|
||||
.ui-icon-scissors { background-position: -144px -128px; }
|
||||
.ui-icon-clipboard { background-position: -160px -128px; }
|
||||
.ui-icon-copy { background-position: -176px -128px; }
|
||||
.ui-icon-contact { background-position: -192px -128px; }
|
||||
.ui-icon-image { background-position: -208px -128px; }
|
||||
.ui-icon-video { background-position: -224px -128px; }
|
||||
.ui-icon-script { background-position: -240px -128px; }
|
||||
.ui-icon-alert { background-position: 0 -144px; }
|
||||
.ui-icon-info { background-position: -16px -144px; }
|
||||
.ui-icon-notice { background-position: -32px -144px; }
|
||||
.ui-icon-help { background-position: -48px -144px; }
|
||||
.ui-icon-check { background-position: -64px -144px; }
|
||||
.ui-icon-bullet { background-position: -80px -144px; }
|
||||
.ui-icon-radio-off { background-position: -96px -144px; }
|
||||
.ui-icon-radio-on { background-position: -112px -144px; }
|
||||
.ui-icon-pin-w { background-position: -128px -144px; }
|
||||
.ui-icon-pin-s { background-position: -144px -144px; }
|
||||
.ui-icon-play { background-position: 0 -160px; }
|
||||
.ui-icon-pause { background-position: -16px -160px; }
|
||||
.ui-icon-seek-next { background-position: -32px -160px; }
|
||||
.ui-icon-seek-prev { background-position: -48px -160px; }
|
||||
.ui-icon-seek-end { background-position: -64px -160px; }
|
||||
.ui-icon-seek-first { background-position: -80px -160px; }
|
||||
.ui-icon-stop { background-position: -96px -160px; }
|
||||
.ui-icon-eject { background-position: -112px -160px; }
|
||||
.ui-icon-volume-off { background-position: -128px -160px; }
|
||||
.ui-icon-volume-on { background-position: -144px -160px; }
|
||||
.ui-icon-power { background-position: 0 -176px; }
|
||||
.ui-icon-signal-diag { background-position: -16px -176px; }
|
||||
.ui-icon-signal { background-position: -32px -176px; }
|
||||
.ui-icon-battery-0 { background-position: -48px -176px; }
|
||||
.ui-icon-battery-1 { background-position: -64px -176px; }
|
||||
.ui-icon-battery-2 { background-position: -80px -176px; }
|
||||
.ui-icon-battery-3 { background-position: -96px -176px; }
|
||||
.ui-icon-circle-plus { background-position: 0 -192px; }
|
||||
.ui-icon-circle-minus { background-position: -16px -192px; }
|
||||
.ui-icon-circle-close { background-position: -32px -192px; }
|
||||
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
||||
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
||||
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
||||
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
||||
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
||||
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
||||
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
||||
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
||||
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
||||
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
||||
.ui-icon-circle-check { background-position: -208px -192px; }
|
||||
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
||||
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
||||
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
||||
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
||||
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
||||
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
||||
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
||||
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
||||
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
||||
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
||||
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
||||
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Corner radius */
|
||||
.ui-corner-tl { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; }
|
||||
.ui-corner-tr { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; }
|
||||
.ui-corner-bl { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; }
|
||||
.ui-corner-br { -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; }
|
||||
.ui-corner-top { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; }
|
||||
.ui-corner-bottom { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; }
|
||||
.ui-corner-right { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; }
|
||||
.ui-corner-left { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; }
|
||||
.ui-corner-all { -moz-border-radius: 5px; -webkit-border-radius: 5px; }
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_75_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
|
||||
.ui-widget-shadow { margin: 5px 0 0 5px; padding: 0px; background: #999999 url(images/ui-bg_flat_55_999999_40x100.png) 50% 50% repeat-x; opacity: .45;filter:Alpha(Opacity=45); -moz-border-radius: 5px; -webkit-border-radius: 5px; }/* Accordion
|
||||
----------------------------------*/
|
||||
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
|
||||
.ui-accordion .ui-accordion-li-fix { display: inline; }
|
||||
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
|
||||
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; }
|
||||
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
|
||||
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; }
|
||||
.ui-accordion .ui-accordion-content-active { display: block; }/* Datepicker
|
||||
----------------------------------*/
|
||||
.ui-datepicker { width: 17em; padding: .2em .2em 0; }
|
||||
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
|
||||
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
|
||||
.ui-datepicker .ui-datepicker-prev { left:2px; }
|
||||
.ui-datepicker .ui-datepicker-next { right:2px; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
|
||||
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
|
||||
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
|
||||
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
||||
.ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; }
|
||||
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
||||
.ui-datepicker select.ui-datepicker-month,
|
||||
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
||||
.ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; }
|
||||
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
||||
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
||||
.ui-datepicker td { border: 0; padding: 1px; }
|
||||
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
||||
|
||||
/* with multiple calendars */
|
||||
.ui-datepicker.ui-datepicker-multi { width:auto; }
|
||||
.ui-datepicker-multi .ui-datepicker-group { float:left; }
|
||||
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
|
||||
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
||||
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
||||
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
||||
.ui-datepicker-row-break { clear:both; width:100%; }
|
||||
|
||||
/* RTL support */
|
||||
.ui-datepicker-rtl { direction: rtl; }
|
||||
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
|
||||
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
||||
.ui-datepicker-cover {
|
||||
display: none; /*sorry for IE5*/
|
||||
display/**/: block; /*sorry for IE5*/
|
||||
position: absolute; /*must have*/
|
||||
z-index: -1; /*must have*/
|
||||
filter: mask(); /*must have*/
|
||||
top: -4px; /*must have*/
|
||||
left: -4px; /*must have*/
|
||||
width: 200px; /*must have*/
|
||||
height: 200px; /*must have*/
|
||||
}/* Dialog
|
||||
----------------------------------*/
|
||||
.ui-dialog { position: relative; padding: .2em; width: 300px; }
|
||||
.ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; }
|
||||
.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; }
|
||||
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
|
||||
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
|
||||
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
|
||||
.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
|
||||
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
|
||||
.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; }
|
||||
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
|
||||
.ui-draggable .ui-dialog-titlebar { cursor: move; }
|
||||
/* Progressbar
|
||||
----------------------------------*/
|
||||
.ui-progressbar { height:2em; text-align: left; }
|
||||
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/* Resizable
|
||||
----------------------------------*/
|
||||
.ui-resizable { position: relative;}
|
||||
.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
|
||||
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
|
||||
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0px; }
|
||||
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0px; }
|
||||
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0px; height: 100%; }
|
||||
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0px; height: 100%; }
|
||||
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
|
||||
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
|
||||
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
|
||||
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Slider
|
||||
----------------------------------*/
|
||||
.ui-slider { position: relative; text-align: left; }
|
||||
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
|
||||
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; }
|
||||
|
||||
.ui-slider-horizontal { height: .8em; }
|
||||
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
|
||||
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
|
||||
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
|
||||
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
|
||||
|
||||
.ui-slider-vertical { width: .8em; height: 100px; }
|
||||
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
|
||||
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
||||
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
||||
.ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs
|
||||
----------------------------------*/
|
||||
.ui-tabs { padding: .2em; zoom: 1; }
|
||||
.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; }
|
||||
.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; }
|
||||
.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
||||
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
||||
.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; }
|
||||
.ui-tabs .ui-tabs-hide { display: none !important; }
|
298
upload/js/ui/jquery-ui-1.7.2.custom.min.js
vendored
Normal file
|
@ -1,4 +1,15 @@
|
|||
<?php
|
||||
/*
|
||||
Player Name: ClipBucket Player
|
||||
Description: ClipBucket default player - flv,mp4,f4v,mov,h264,red5
|
||||
Author: Arslan Hassan
|
||||
Author Website: http://clip-bucket.com/
|
||||
ClipBucket Version: 2
|
||||
Version: 1.0
|
||||
Website: http://clip-bucket.com/
|
||||
Player type: global
|
||||
*/
|
||||
|
||||
/**
|
||||
* ClipBucket v2 Player
|
||||
*
|
||||
|
@ -9,34 +20,51 @@
|
|||
*/
|
||||
|
||||
|
||||
|
||||
if(!function_exists('cbplayer'))
|
||||
{
|
||||
|
||||
define("CBV2PLAYER",TRUE);
|
||||
define("AUTOPLAY",false);
|
||||
|
||||
function cbplayer($vdata)
|
||||
function cbplayer($data,$no_video=false)
|
||||
{
|
||||
$vdata = $data['vdetails'];
|
||||
global $swfobj;
|
||||
|
||||
$vid_file = get_video_file($vdata,false,false);
|
||||
$vid_file = get_video_file($vdata,$no_video,false);
|
||||
if($vid_file)
|
||||
{
|
||||
$code = "var flashvars = {\n";
|
||||
$code .= " htmlPage: document.location,\n";
|
||||
if($data['hq'])
|
||||
$code .= "settingsFile: \"".PLAYER_URL."/cbplayer/settings.php?hqid=".$vdata['videoid']."\"\n";
|
||||
else
|
||||
$code .= "settingsFile: \"".PLAYER_URL."/cbplayer/settings.php?vid=".$vdata['videoid']."\"\n";
|
||||
$code .= "};\n";
|
||||
$code .= "var params = {\n";
|
||||
$code .= " allowFullScreen: \"true\"\n";
|
||||
$code .= "};\n";
|
||||
$code .= "swfobject.embedSWF(\"".PLAYER_URL."/cbplayer/videoPlayer.swf\",
|
||||
\"videoPlayer\", \"600\", \"350\", \"9.0.115\",
|
||||
\"".$data['player_div']."\", \"".config('player_width')."\", \"".config('player_height')."\", \"9.0.115\",
|
||||
\"swfobject/expressInstall.swf\", flashvars
|
||||
, params)";
|
||||
return $code;
|
||||
}else{
|
||||
}else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function default_embed_code($vdetails)
|
||||
{
|
||||
$code = '';
|
||||
$code .= '<object width="300" height="250">';
|
||||
$code .= '<param name="movie" value="http://www.youtube.com/v/2dEdVwg7to4&hl=en&fs=1&"></param>';
|
||||
$code .= '<param name="allowFullScreen" value="true"></param>';
|
||||
$code .= '<param name="allowscriptaccess" value="always"></param>';
|
||||
$code .= '<embed src="'.PLAYER_URL.'/cbplayer/videoPlayer.swf?settingsFile='.PLAYER_URL.'/cbplayer/settings.php?vid='.$vdetails['videoid'].'" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="300" height="250"></embed>';
|
||||
$code .= '</object>';
|
||||
|
||||
return $code;
|
||||
}
|
||||
|
||||
register_actions_play_video('cbplayer');
|
||||
|
|
BIN
upload/player/cbplayer/preview.jpg
Normal file
After Width: | Height: | Size: 8.5 KiB |
|
@ -4,7 +4,11 @@
|
|||
*/
|
||||
|
||||
include('../../includes/common.php');
|
||||
$vid = $_GET['vid'];
|
||||
$vid = $_GET['vid'] ;
|
||||
$vid = $vid ? $vid : $_GET['hqid'];
|
||||
if($_GET['hqid'])
|
||||
$hd = 'yes';
|
||||
|
||||
$v = $cbvideo->get_video($vid);
|
||||
header ("content-type: text/xml");
|
||||
echo '<?xml version="1.0" encoding="UTF-8"?>';
|
||||
|
@ -52,7 +56,7 @@ echo '<?xml version="1.0" encoding="UTF-8"?>';
|
|||
|
||||
|
||||
<video>
|
||||
<videoPath value="<?=get_video_file($v,true,true);?>"/>
|
||||
<videoPath value="<?php if($hd=='yes') echo get_hq_video_file($v); else echo get_video_file($v,true,true); ?>"/>
|
||||
<stafImage value="images/ratatouilleStaf.jpg"/>
|
||||
<aspectRatio value="4:3"/>
|
||||
<totalTime value="<?=$v['duration']?>"/>
|
||||
|
|
4
upload/player/flow_player/_notes/dwsync.xml
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<dwsync>
|
||||
<file name="flow_player.php" server="E:/wamp/www/ClipBucket/2.x/2/upload/" local="128989832196527666" remote="128989832190000000" />
|
||||
</dwsync>
|
51
upload/player/flow_player/flow_player.php
Normal file
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
Player Name: Flow Player
|
||||
Description: Flow Player for Clipbucket
|
||||
Author: Arslan Hassan
|
||||
ClipBucket Version: 2
|
||||
Plugin Version: 1.0 - FlowPlayer 3.1.2
|
||||
Website: http://clip-bucket.com/
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* This file is used to instruct ClipBucket
|
||||
* for how to operate JW PLayer
|
||||
* this file is protype
|
||||
* you can get complete instructions
|
||||
* from docs.clip-bucket.com
|
||||
*
|
||||
* @Author : Arslan Hassan
|
||||
* @Script : ClipBucket v2
|
||||
* @License : CBLA
|
||||
* @Since : September 15 2009
|
||||
*/
|
||||
|
||||
|
||||
if(!function_exists('flowplayer'))
|
||||
{
|
||||
|
||||
define("FLOWPLAYER",TRUE);
|
||||
define("AUTOPLAY",false);
|
||||
define("SKIN","default.swf");
|
||||
|
||||
function flowplayer($vdata)
|
||||
{
|
||||
$vid_file = get_video_file($vdata,false,false);
|
||||
$code = '';
|
||||
if($vid_file)
|
||||
{
|
||||
$code .= "swfobject.embedSWF(\"".PLAYER_URL.'/flow_player/flowplayer.swf'."\", \"videoPlayer\", \"500\", \"320\", \"9.0.0\", null, { \n";
|
||||
$code .= "config: \"{'clip': '".BASEURL.'/files/videos/'.$vid_file."' }}\"\n" ;
|
||||
$code .= "} \n";
|
||||
$code .= "); \n";
|
||||
return $code;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
register_actions_play_video('flowplayer');
|
||||
}
|
||||
?>
|
24
upload/player/flow_player/flowplayer-3.1.4.min.js
vendored
Normal file
BIN
upload/player/flow_player/flowplayer.controls.swf
Normal file
BIN
upload/player/flow_player/flowplayer.swf
Normal file
13
upload/player/hd_flv_player/css/midrollformat.css
Normal file
|
@ -0,0 +1,13 @@
|
|||
|
||||
.midroll {
|
||||
color: #FFFFFF;
|
||||
font-family:Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
font-weight: normal;
|
||||
display: block;
|
||||
}
|
||||
.heading{
|
||||
color:#ff9900;
|
||||
font-size:13px;
|
||||
font-weight:bold;
|
||||
}
|
63
upload/player/hd_flv_player/email.php
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
/***************************************************\
|
||||
* PHP 4.1.0+ version of email script. For more
|
||||
* information on the mail() function for PHP, see
|
||||
* http://www.php.net/manual/en/function.mail.php
|
||||
\***************************************************/
|
||||
|
||||
|
||||
// First, set up some variables to serve you in
|
||||
// getting an email. This includes the email this is
|
||||
// sent to (yours) and what the subject of this email
|
||||
// should be. It's a good idea to choose your own
|
||||
// subject instead of allowing the user to. This will
|
||||
// help prevent spam filters from snatching this email
|
||||
// out from under your nose when something unusual is put.
|
||||
|
||||
$to = $_POST["to"];
|
||||
$from = $_POST["from"];
|
||||
$url = $_POST["url"];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$subject = "You have received a video!";
|
||||
|
||||
// variables are sent to this PHP page through
|
||||
// the POST method. $_POST is a global associative array
|
||||
// of variables passed through this method. From that, we
|
||||
// can get the values sent to this page from Flash and
|
||||
// assign them to appropriate variables which can be used
|
||||
// in the PHP mail() function.
|
||||
|
||||
|
||||
// header information not including sendTo and Subject
|
||||
// these all go in one variable. First, include From:
|
||||
$headers = "From: "."<" . $_POST["from"] .">\r\n";
|
||||
// next include a replyto
|
||||
$headers .= "Reply-To: " . $_POST["from"] . "\r\n";
|
||||
// often email servers won't allow emails to be sent to
|
||||
// domains other than their own. The return path here will
|
||||
// often lift that restriction so, for instance, you could send
|
||||
// email to a hotmail account. (hosting provider settings may vary)
|
||||
// technically bounced email is supposed to go to the return-path email
|
||||
$headers .= "Return-path: " . $_POST["from"];
|
||||
|
||||
// now we can add the content of the message to a body variable
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$message = $_POST["note"] . "\n\n";
|
||||
$message .= "Video URL: " . $url;
|
||||
|
||||
|
||||
// once the variables have been defined, they can be included
|
||||
// in the mail function call which will send you an email
|
||||
mail($to, $subject, $message, $headers);
|
||||
|
||||
?>
|
48
upload/player/hd_flv_player/hdflvplayer.plug.php
Normal file
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
Player Name: HD FLV Player
|
||||
Description: HDFLV Player from BALA - hdflvplayer.nte
|
||||
Author: Arslan Hassan
|
||||
Author Website: http://clip-bucket.com/
|
||||
ClipBucket Version: 2
|
||||
Version: 1.0
|
||||
Website: http://hdflvplayer.net/
|
||||
Player type: global
|
||||
*/
|
||||
|
||||
|
||||
|
||||
if(!function_exists('hdflvplayer'))
|
||||
{
|
||||
|
||||
define("HDFLVPLAYER",TRUE);
|
||||
define("AUTOPLAY",false);
|
||||
|
||||
function hdflvplayer($data,$no_video=false)
|
||||
{
|
||||
$vdata = $data['vdetails'];
|
||||
global $swfobj;
|
||||
|
||||
$vid_file = get_video_file($vdata,$no_video,false);
|
||||
if($vid_file)
|
||||
{
|
||||
$swfobj->playerFile = PLAYER_URL.'/hd_flv_player/hdplayer.swf';
|
||||
$swfobj->FlashObj();
|
||||
//Writing Param
|
||||
$swfobj->addParam('allowfullscreen','true');
|
||||
$swfobj->addParam('allowscriptaccess','always');
|
||||
$swfobj->addParam('flashvars','playlistXML=http://localhost/clipbucket/2.x/2/upload/player/hd_flv_player/xml/playlist.xml');
|
||||
|
||||
$swfobj->addVar('file',BASEURL.'/files/videos/'.$vid_file);
|
||||
|
||||
$swfobj->CreatePlayer();
|
||||
return $swfobj->code;
|
||||
}else
|
||||
return false;
|
||||
}
|
||||
|
||||
register_actions_play_video('hdflvplayer');
|
||||
}
|
||||
|
||||
?>
|
BIN
upload/player/hd_flv_player/hdplayer.swf
Normal file
BIN
upload/player/hd_flv_player/images/Thumbs.db
Normal file
BIN
upload/player/hd_flv_player/images/platoon.png
Normal file
After Width: | Height: | Size: 57 KiB |
BIN
upload/player/hd_flv_player/images/preview.jpg
Normal file
After Width: | Height: | Size: 202 KiB |
BIN
upload/player/hd_flv_player/images/video_1.jpg
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
upload/player/hd_flv_player/images/video_2.jpg
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
upload/player/hd_flv_player/images/video_3.jpg
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
upload/player/hd_flv_player/images/video_4.jpg
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
upload/player/hd_flv_player/images/video_5.jpg
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
upload/player/hd_flv_player/images/video_6.jpg
Normal file
After Width: | Height: | Size: 16 KiB |