<?php
/**
 * Pro Super Slider
 *This program is free software: you can redistribute it and/or modify it under the terms
 *of the GNU General Public License as published by the Free Software Foundation,
 *either version 3 of the License, or (at your option) any later version.
 *
 *This program is distributed in the hope that it will be useful,
 *but WITHOUT ANY WARRANTY; without even the implied warranty of
 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *GNU General Public License for more details.
 *
 *You should have received a copy of the GNU General Public License
 *along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *@author ProJoom
 *@copyright (C) 2008 - 2012 ProJoom
 *@link http://www.projoom.com/extensions/pro-super-slider.html Official website
 **/
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
JHtml::_('behavior.tooltip');
JHTML::_('script', 'system/multiselect.js', false, true);
$user = JFactory::getUser();
$userId = $user->get('id');
$basepath = base64_encode(JPATH_ROOT);
$xml = "<xml>
	<uploadTool>
		<configuration>
			<maxFileSize>0</maxFileSize>
			<allowedFileTypes>images</allowedFileTypes>
			<phpVariables>dest=" . $basepath . "</phpVariables>
		</configuration>
		<skin>
			<backgroundColor>0xFFFFFF</backgroundColor>
			<textColor>0x000000</textColor>
			<buttonColor>0x0066FF</buttonColor>
			<buttonTextColor>0xFFFF00</buttonTextColor>
			<buttonDownTextColor>0x666666</buttonDownTextColor>
			<loadbarColor>0x00CC00</loadbarColor>
			<lineColor>0x000000</lineColor>
		</skin>
		<text>
			<add>Add files</add>
			<deleteAll>Empty Queue</deleteAll>
			<upload>Upload Files</upload>
			<cancel>Cancel</cancel>
			<file>file</file>
			<files>files</files>
			<filename>Filename</filename>
			<size>Size</size>
			<progress>Progress</progress>
			<remaining>remaining</remaining>
			<timeleft>Time left</timeleft>
			<speed>Speed</speed>
			<min>min</min>
		</text>
	</uploadTool>
</xml>";

if (!is_file(JPATH_ROOT . "/administrator/components/com_novass/views/uploader/up.xml")) {
    JFile::write(JPATH_ROOT . "/administrator/components/com_novass/views/uploader/up.xml", $xml);
}

?>
<table class="adminlist">
	<thead>
		<tr>
			<th colspan="2" width="5%" nowrap="nowrap">
				Image Uploader
			</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td width="60%" align="center">
				<div align="center">
				<object style="outline:none;" type="application/x-shockwave-flash" id="pjup" data="<?php echo JURI::root();?>administrator/components/com_novass/views/uploader/pjup.swf" width="500" height="300">
                <param name="movie" value="<?php echo JURI::root();?>administrator/components/com_novass/views/uploader/pjup.swf?<?php echo rand(1, 999);?>" />
				<param name="wmode" value="transparent" />
				<param name="base" value="<?php echo JURI::root(); ?>" />
				</object>
				</div>
			</td>
			<td width="40%">
			<p valign="center">Note : The images will be uploaded in /images/pss folder.<br />
			If you want to manage the uploaded pictures (delete, preview, etc.) use the Media Manager.</p>
			</td>
		</tr>
	</tbody>
	<tfoot>
		<tr>
			<td colspan="13">
				<center><a href="http://www.joompower.com/" target="_blank" title="ProJoom Super Slider">ProJoom Super Slider</a> &copy; ProJoom 2012</center>
			</td>
		</tr>
	</tfoot>
</table>
