<?php
//zOOm Gallery//
/** 
-----------------------------------------------------------------------
|  zOOm Image Gallery! by Mike de Boer - a multi-gallery component    |
-----------------------------------------------------------------------

-----------------------------------------------------------------------
|                                                                     |
| Date: January, 2004                                                 |
| Author: Mike de Boer, <http://www.mikedeboer.nl>                    |
| Copyright: copyright (C) 2004 by Mike de Boer                       |
| Description: zOOm Image Gallery, a multi-gallery component for      |
|              Mambo based on RSGallery by Ronald Smit. It's the most |
|              feature-rich gallery component for Mambo!              |
| Filename: upl_dragndrop.php                                         |
| Version: 2.0                                                        |
|                                                                     |
-----------------------------------------------------------------------
**/
// MOS Intruder Alerts
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
$zoom->createSubmitScript("JUploadForm");
if (!isset($catid)){
	echo "<p align=\"center\"><h3>"._ZOOM_INFO_CHECKCAT."</h3></p>";
}else{
	$theId = $_REQUEST['catid'];
	$theUid = $_REQUEST['uid'];
}
$zoom->createFormControlScript("JUploadForm");
?>
<div align="center">
 <form name="JUploadForm" method="post" action="index<?php echo ($zoom->_isBackend) ? "2" : "";?>.php?option=com_zoom&Itemid=<?php echo $Itemid;?>&page=upload&formtype=dragndrop">
  <input type="hidden" name="uid" value="<?php echo $zoom->_CurrUID;?>">
	<?php
		echo "<p>"._ZOOM_FORM_INGALLERY.": \n";
		echo $zoom->createCatDropdown('catid','<OPTION value="">---&nbsp;'._ZOOM_PICK.'&nbsp;---</OPTION>', 1,$catid).'</p>';
	?>
</div>
 <applet 
  code="JUpload/startup.class"
  archive="<?php echo $mosConfig_live_site;?>/components/com_zoom/admin/JUpload.jar"
  width="700"
  height="300"
  name="JUpload"
  alt="JUpload applet">

 <!-- Java Plug-In Options -->
 <param name="progressbar" value="true">
 <param name="boxmessage" value="Loading JUpload Applet ...">
 <param name="boxbgcolor" value="#c0c0c0">

 <!-- Target links -->
 <param name="actionURL" value="<?php echo ($zoom->_isBackend) ? "../" : $mosConfig_live_site."/";?>components/com_zoom/save_dnd.php?catid=<?php echo $theId;?>&uid=<?php echo $theUid;?>">
 <param name="imageURL" value="<?php echo $mosConfig_live_site;?>/components/com_zoom/images/zoom_dragndrop.gif">

 <!-- Colors -->
 <param name="backgroundColor" value="#c0c0c0">
 <param name="mainSplitpaneLocation" value="320">

 <!-- Switches -->
 <param name="checkResponse" value="true">
 <param name="showSuccessDialog" value="true">
 <param name="hideShowAll" value="true"> 
 <param name="showPicturePreview" value="true">
 <param name="addWindowTitle" value="<?php echo _ZOOM_ADD;?>">
 <param name="customFileFilter" value="true">
 <param name="customFileFilterDescription" value="<?php echo _ZOOM_FORM_IMAGEFILTER;?>">
 <param name="customFileFilterExtensions" value="<?php echo $zoom->acceptableFormatCommaSep();?>">
 <param name="includeFormFields" value="catid,uid,name,setFilename,keywords,descr,mospath">
 <param name="labelAdd" value="<?php echo _ZOOM_BUTTON_ADDIMAGES;?>">
 <param name="labelRemove" value="<?php echo _ZOOM_BUTTON_REMIMAGES;?>">
 <param name="labelUpload" value="<?php echo _ZOOM_BUTTON_UPLOAD;?>">
 <param name="checkJavaVersion" value="true">
 <param name="checkJavaVersionGotoURL" value="http://java.sun.com/j2se/downloads.html">
 Your browser does not support applets. Or you have disabled applet in your options.
 To use this applet, please install the newest version of Sun's java. You can get it from <a href="http://www.java.com/">java.com</a>

 </applet>
 <table border="0" cellpadding="0" cellspacing="0">
	<tr><td colspan="2">&nbsp;</td></tr>
	<tr><td colspan="2" align="center"><font color="red"><?php echo _ZOOM_A_MESS_NOJAVA; ?></font>
		</td>
	</tr>	
	<tr><td colspan="2">&nbsp;</td></tr>	
	<tr>
		<td><?php echo _ZOOM_NAME;?>:&nbsp;</td>
		<td>
			<input type="text" name="name" size="50" value="<?php echo $zoom->_CONFIG['tempName'];?>" class="inputbox" />
		</td>
	</tr>	
	<tr><td colspan="2">&nbsp;</td></tr>	
	<tr>
		<?php if($zoom->_CONFIG['autonumber']) echo "<script>toggleDisabled('name');</script>";?>
		<td>&nbsp;</td>
		<td>
			<input type="checkbox" name="setFilename" value="1" onclick="toggleDisabled('name')"<?php if($zoom->_CONFIG['autonumber']) echo " checked";?> />
			<?php echo _ZOOM_FORM_SETFILENAME;?>
		</td>
	</tr>	
	<tr><td colspan="2">&nbsp;</td></tr>	
	<tr>
		<td valign="center"><?php echo _ZOOM_KEYWORDS;?>:&nbsp;</td>
		<td valign="center">
			<input type="text" name="keywords" size="50" value="" class="inputbox" />
		</td>
	</tr>	
	<tr><td colspan="2">&nbsp;</td></tr>	
	<tr>
		<td><?php echo _ZOOM_DESCRIPTION;?>:&nbsp;</td>
    	<td>
        	<textarea class="inputbox" cols="50" rows="5" name="descr">
        	<?php echo $zoom->_CONFIG['tempDescr'];?></textarea>
        	<input type="hidden" name="mospath" value="<?php echo $mosConfig_absolute_path;?>" />
    	</td>
	</tr>
 </table>
</form>