<?php
/**
 * This file is to get xml code
 *
 * This file is having get xml code
 *
 * PHP version 5.0
 *
 * @category	rayzz
 * @package		Index
 * @author 		senthil_52ag05
 * @copyright 	Copyright (c) 2008 {@link http://www.agriya.com Agriya Infoway}
 * @license		http://www.agriya.com Agriya Infoway Licence
 * @version		SVN: $Id: $
 * @since 		2008-03-12
 *
 **/
require_once('../common/configs/config.inc.php');
$CFG['mods']['include_files'][] = 'common/classes/class_FormHandler.lib.php';
$CFG['site']['is_module_page'] = $CFG['admin']['index']['anova_module'];
$CFG['mods']['is_include_only']['non_html_header_files'] = true;
$CFG['auth']['is_authenticate'] = false;
require_once($CFG['site']['project_path'].'common/application_top.inc.php');
/**
 * XmlCode
 *
 * @package
 * @author selvaraj_35ag05
 * @copyright Copyright (c) 2006
 * @version $Id: $
 * @access public
 **/
class XmlCode extends FormHandler
	{

		/**
		 * XmlCode::setHeaderStart()
		 * clear cache and buffer start
		 *
		 * @return
		 **/
		public function setHeaderStart()
			{
				ob_start();
				header("Pragma: no-cache");
				header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
				header("Expires: 0"); // Date in the past
				header("Content-type: text/xml; charset=iso-8859-1");
			}

		public function setHeaderEnd()
			{
				ob_end_flush();
			}



		public function getXmlCode()
			{
				$qryStr = explode('_', $this->fields_arr['querystring']);
				$file_name = $qryStr[0];
				$mediaType = $qryStr[1];

				$upload_url = $this->CFG['site']['url'].$this->CFG['admin']['index']['anova_module'].'/fileUpload.php?file_name='.$file_name;
				$skin_url = $this->CFG['site']['url'].$this->CFG['admin']['index']['anova_module'].'/files/flash/uploader/rayzz_skin.swf';

				$formatArray = $this->CFG['admin']['ans_videos']['format_arr'];
				$max_file_size = $this->CFG['admin']['ans_videos']['max_size'];
				$title = "All Video files";
				if ($mediaType == 'Audio')
					{
						$formatArray = $this->CFG['admin']['ans_audios']['format_arr'];
						$max_file_size = $this->CFG['admin']['ans_audios']['max_size'];
						$title = "All Audio files";
					}
				$type = '*.'.implode(';*.', $formatArray).';';

?>
<FILE_UPLOADER
TypeDesc="<?php echo $title;?>"
Type="<?php echo $type;?>"
UploadUrl="<?php echo $upload_url;?>"
EndFunction = "onUploadComplete" args=""
MaximumFileSize = "<?php echo $max_file_size;?>">
<Settings>
	<Set Name="SelectedSkin" Value="<?php echo $skin_url;?>"/>
	<Set Name="Headings" Value="(<?php echo $max_file_size;?> KB)(<?php echo implode(', ', $formatArray);?>)"/>
	<Set Name="BrowseButtonText" Value="Browse File"/>
	<Set Name="ShowBitTransferRate" Value="true" Label="Transfer speed :"/>
	<Set Name="ShowEstimatedTime" Value="true" Format="remaining" Label="Estimated Time Left :"/>
	<Set Name="ShowLoadedBytes" Value="true" LoadedFormat="MB" TotalFormat="MB" Label="Bytes Loaded :"/>
</Settings>
<Themes>
	<Item Name="HeaderBg" Color="0xFEA870" Transparen="100"/>
	<Item Name="BaseBg" Color="0x758CFE" Transparen="100"/>
	<Item Name="BrowseButtonBg" Color="0xEF5B03" Transparen="100"/>
	<Item Name="LoaderBg" Color="0xff0000" Transparen="100"/>
	<Item Name="HeaderText" Color="0x000000" Font="Verdana" Size="10" />
	<Item Name="InfoText" Color="0x000000" Font="Verdana" Size="10" />
	<Item Name="EstimatedTimeText" Color="0xff0000" Font="Verdana" Size="10" />
	<Item Name="TransferRateText" Color="0xff0000"  Font="Verdana" Size="10" />
	<Item Name="LoadedBytesText" Color="0xff0000"  Font="Verdana" Size="10" />
</Themes>
</FILE_UPLOADER>
<?php
			}
	}
$XmlCode = new XmlCode();
$XmlCode->setHeaderStart();
$XmlCode->setDBObject($db);
$XmlCode->makeGlobalize($CFG,$LANG);

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

$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->setHeaderEnd();
//require_once($CFG['site']['project_path'].'common/application_bottom.inc.php');
?>