<?php
/**
 * This file is to get xml code
 *
 * This file is having get xml code
 *
 * PHP version 5.0
 *
 * @category	Anova
 * @package		XmlCode
 * @author 		selvaraj_35ag05
 * @copyright 	Copyright (c) 2009 {@link http://www.agriya.com Agriya Infoway}
 * @license		http://www.agriya.com Agriya Infoway Licence
 * @version		SVN: $Id: $
 * @since 		2008-12-22
 *
 **/
require_once('../common/configs/config.inc.php');
//require_once('common/configs/config_encoder.inc.php');
//require_once('common/configs/config_ans_video.inc.php');
$CFG['lang']['include_files'][] = 'languages/%s/'.$CFG['admin']['index']['anova_module'].'/videoUpload.php';
$CFG['site']['is_module_page'] = $CFG['admin']['index']['anova_module'];
//compulsory
$CFG['mods']['is_include_only']['non_html_header_files'] = true;
$CFG['mods']['is_include_only']['html_header'] = false;
$CFG['html']['is_use_header'] = false;

require_once($CFG['site']['project_path'].'common/application_top.inc.php');
class XmlCode extends FormHandler
	{
		/**
		 * XmlCode::getXmlCode()
		 *
		 * @return
		 */
		public function getXmlCode()
			{
				$player_mode = 'video';
				$file_type = substr($this->fields_arr['file_name'],-3);
				if($file_type == 'AUD')
					{
						$this->LANG['recorder_success'] = $this->LANG['recorder_success_audio'];
						if(chkIsPaymentAllowed() and isset($_SESSION['audio_record_time']))
							$this->CFG['admin']['ans_videos']['capture_second'] = $_SESSION['audio_record_time'];
						$player_mode = 'audio';
					}
				else
					{
						if(chkIsPaymentAllowed() and isset($_SESSION['video_record_time']))
							$this->CFG['admin']['ans_videos']['capture_second'] = $_SESSION['video_record_time'];
					}

				$delete_path = $this->CFG['site']['url'].$this->CFG['admin']['index']['anova_module'].'/deleteCapture.php?fname='.$this->fields_arr['file_name'];
				$upload_path = $this->CFG['site']['url'].$this->CFG['admin']['index']['anova_module'].'/videoUpload.php?rid='.$this->fields_arr['file_name'].'&upload=true';
				//$upload_path = getAnovaUrl('videoupload', '?rid='.$this->fields_arr['file_name'].'&upload=true', '?rid='.$this->fields_arr['file_name'].'&upload=true', 'members');
?>
<SETTINGS>
	<SERVER path="<?php echo $this->CFG['admin']['video']['red5_path'];?>"/>
	<PHP uploadpath="<?php echo $upload_path;?>" deletepath="<?php echo $delete_path;?>" jscall="true"/>
	<STREAM name="newRecord_5" seconds="<?php echo $this->CFG['admin']['ans_videos']['capture_second'];?>" memberID="007" bookName="lucix fox" />
	<VIDEO quality="100" width="160" height="120" framerate="15" bandwidth="0"/>
	<SKIN  url = "<?php echo $this->CFG['site']['url'].$this->CFG['admin']['index']['anova_module'].'/files/flash/'.$player_mode.'_capture/skins/skin.swf';?>"/>
	<PLAYERMODE value = "<?php echo $player_mode;?>"/>
	<TEXT_WAIT text="<?php echo $this->LANG['recorder_wait'];?>"/>
	<TEXT_DISCNT text="<?php echo $this->LANG['recorder_disconnect'];?>"/>
	<TEXT_NOCAM text="<?php echo $this->LANG['recorder_nocam'];?>"/>
	<TEXT_RECFIN text="<?php echo $this->LANG['recorder_success'];?>"/>
	<TEXT_MIN text="<?php echo $this->LANG['recorder_minimum'];?>" />
	<TEXT_BUFFER text="<?php echo $this->LANG['recorder_buffer'];?>"/>
	<STATUSTEST recording="<?php echo $this->LANG['recorder_recording'];?>" playing="<?php echo $this->LANG['recorder_playing'];?>" paused="<?php echo $this->LANG['recorder_paused'];?>" stopped="<?php echo $this->LANG['recorder_stopped'];?>"/>
	<TOOLTIP>
        <TOOL Name="PlayButton" Value="<?php echo $this->LANG['recorder_play'];?>"/>
        <TOOL Name="Stop" Value="<?php echo $this->LANG['recorder_stop'];?>"/>
        <TOOL Name="PauseButton" Value="<?php echo $this->LANG['recorder_pause'];?>"/>
        <TOOL Name="VolumeButton" Value="<?php echo $this->LANG['recorder_volume'];?>"/>
        <TOOL Name="ReplyVideo" Value="<?php echo $this->LANG['recorder_replay'];?>"/>
        <TOOL Name="Close" Value="<?php echo $this->LANG['recorder_close'];?>"/>
        <TOOL Name="Save" Value="<?php echo $this->LANG['recorder_save'];?>"/>
        <TOOL Name="SelectTools" Value="<?php echo $this->LANG['recorder_select_tools'];?>"/>
        <TOOL Name="Record" Value="<?php echo $this->LANG['recorder_record'];?>"/>
        <TOOL Name="RecordAgain" Value="<?php echo $this->LANG['recorder_record_again'];?>"/>
    </TOOLTIP>
</SETTINGS>
<?php
			}
	}
$XmlCode = new XmlCode();
$XmlCode->includeAjaxHeader();

$XmlCode->setFormField('file_name', '');

$XmlCode->setPageBlockShow('get_code_form');
$XmlCode->sanitizeFormInputs($_REQUEST);

//<<<<<-------------------- Code ends----------------------//
//-------------------- Page block templates begins -------------------->>>>>//
if ($XmlCode->isShowPageBlock('get_code_form'))
    {
		$XmlCode->getXmlCode();
	}
//<<<<<-------------------- Page block templates ends -------------------//
$XmlCode->includeAjaxFooter();
?>
