Location: PHPKode > projects > Netautor Professional > netautor/napro4/appl/mediapool/mp_index_upload.php
<?php
/* +----------------------------------------------------------------------+
   | Netautor Professional Application Server                             |
   +----------------------------------------------------------------------+
   | Copyright (C) 1998-2005 digiconcept GmbH. <www.digiconcept.net>      |
   +----------------------------------------------------------------------+
   | This file is subject to license, that is bundled with this package   |
   | in the file LICENSE.TXT, and is available at through the             |
   | world-wide-web at http://www.netautor.com/license/                   |
   |                                                                      |
   | If you did not receive a copy of the license and are unable to       |
   | obtain it through the world-wide-web, please send a note to          |
   | hide@address.com so we can mail you a copy.                      |
   +----------------------------------------------------------------------+
   | Authors: Stefan Rottensteiner <hide@address.com>    |
   |          Marek  Kadziela      <hide@address.com>	      |
   |          Gregor Wollner                                              |
   |          Christian Unger                                             |
   |          Helli  Kleinhans  									      |
   +----------------------------------------------------------------------+*/

   /**
    * @version	$Revision: 1.11 $
	*/

	require_once('../../include/init.inc');

	if(!$USER->check_feature('Admin') && !$USER->check_feature('ac_mediapool'))
	{
		$USER->login_call();
	}

	$LOCALE->textdomain('mediapool');

	$location_path		= strval($_POST['location_path']);
	$location_folder	= strval($_POST['location_folder']);
	$files_mask			= strval($_POST['files_mask']);
	$file_name			= strval($_POST['file_name']);

	//	include necessary functions
	includeNaPro('filetype,file');

?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>
<head>
	<title>/digiconcept/netautor/mediapool/upload.index</title>
	<link href="../../include/netautor.css" rel="stylesheet" type="text/css" src="../include/netautor.css">
</head>
<script language="JavaScript" type="text/javascript">
<!--
	function mp_startUpload(){
		var up	= document.getElementById('location_path');
		var ul	= document.getElementById('location_folder');
		var fr  = document.getElementById('mp_iframe');
		
		var	DEF_UPLOAD_PATH	= up.options[up.selectedIndex].value+ul.options[ul.selectedIndex].value;
		document.frames['mp_iframe'].document.mp_startUpload(DEF_UPLOAD_PATH);
	}
//-->
</script>
<body bgcolor="#ffffff" class="imagepool">
<form	method="post" >
<img src="../../grafik/imgpool_head.jpg" width="700" height="57"><br>
<img src="../../grafik/imgpool_head_upload.gif" width="700" height="60"><br>
<table width="700" height="33" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td width="500" height="32" align="left" valign="center" style="background-color:#D4D4D4;">
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td align="left" valign="center" class="text">
						<img src="../../grafik/pixel.gif" width="14" height="1"><br>
					</td>
					<td align="left" valign="center" class="text">
						<?php echo( $LOCALE->gettext('file_save_to') ); ?>&nbsp;&nbsp;<br>
					</td>
					<td align="left" valign="center" class="text">
						<?php
							$temp	=	$GLOBALS['USER']->get_feature_value('display_path');
							foreach ($temp as $index => $data)
							{ 
								if (strpos($data,'='))
								{
									list($name,$path) = explode('=',$data);
								}
								else 
								{
									$name = $path = $data;
								}
								$display_paths[ $name ] = $path;
							}
						?>
						<?php if(!empty($display_paths)):?>
							<select class="select" onChange="this.form.submit();" name="location_path" id="location_path" >
								<?php
									foreach ($display_paths as $name => $path )
									{
										if (empty($location_path)) $location_path = $path;
										if ($path == $location_path)
										{
											$selected		= 'selected';
											$location_name	= $name;
										}
										else
										{
											$selected 	= '';
										}
										
										echo "<option $selected value='{$path}'>{$name}</option>";
									}
								?>
							</select>
						<?php endif; ?>					</td>
					<td align="left" valign="center" class="text">
						<?php
						if (!empty($location_path))
						{
							$location_path = str_replace('\\','/',$location_path);
							if (substr($location_path,-1) != '/') $location_path.='/';
							$dirs = File_getDirs($location_path);
							if (!empty($dirs))
							{
							?>
							<select class="select" name="location_folder" id="location_folder" >
								<option></option>
							<?php
								foreach ($dirs as $index => $text )
								{
									$value 		= $text;
									$selected	= ($location_folder == $value ? 'selected' : '' );
								?><option <?php echo $selected; ?> value="<?php echo $value; ?>"><?php echo $text; ?></option>
								<?php
								}
							?>
							</select>							
							<?php 
							}
						}
						?>
					</td>
				</tr>
			</table>
		</td>
		<td width="200" height="32" align="right" valign="center" style="background-color:#D4D4D4;">
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td align="left" valign="center" class="text">
						<br>
					</td>
					<td align="left" valign="center" class="text">
						<img src="../../grafik/pixel.gif" width="21" height="1"><br>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td colspan="2" width="700" height="1" style="background-color:#A7A7A7;">
			<img src="../../grafik/pixel.gif" width="700" height="1"><br>
		</td>
	</tr>
</table>
<table width="700" border="0" cellspacing="0" cellpadding="0">
	<tr height="22">
		<td width="24" align="left" valign="center" class="imgpooltd12">
			<img src="../../grafik/pixel.gif" width="24" height="1"><br>
		</td>
		<td width="78" align="center" valign="center" class="imgpooltd11">
			<img src="../../grafik/pixel.gif" width="78" height="1"><br>
		</td>
		<td width="522" align="left" valign="center" class="imgpooltd12">
			<span class="text">
			<img src="../../grafik/pixel.gif" width="12" height="1"><?php echo( $LOCALE->gettext('file_name') ); ?><br>
			</span>
			<img src="../../grafik/pixel.gif" width="522" height="1"><br>
		</td>
		<td width="76" align="center" valign="center" class="imgpooltd11">
			<img src="../../grafik/pixel.gif" width="76" height="1"><br>
		</td>
	</tr>
</table>
<iframe 	src			="mp_upload.php" 
			name		="mp_iframe" 
			id			="mp_iframe" 
			marginwidth	="0" 
			marginheight="0" 
			width		="700" 
			height		="287" 
			frameborder	="0"><b>Sorry, but your browser does not support the IFRAME Tag !</b></iframe>
<table width="700" height="41" border="0" cellspacing="0" cellpadding="0">
	<tr height="1">
		<td width="700" height="1" align="center" valign="center" style="background-color:#CBCBCB;">
			<img src="../../grafik/pixel.gif" width="700" height="1"><br>
		</td>
	</tr>
	<tr height="40">
		<td width="700" height="40" align="center" valign="center" class="bgstripes">
			<input type="button" value="<?php echo( $LOCALE->gettext('button_cancel_upload') ); ?>" class="new" 	onClick="document.location.href='mp_main.php';">
			<input type="button" value="<?php echo( $LOCALE->gettext('button_start_upload') ); ?>" 	class="create" 	onClick="mp_startUpload();"><br>
			<img src="../../grafik/pixel.gif" width="700" height="1"><br>
		</td>
	</tr>
</table>
</form>
</body>
</html>
Return current item: Netautor Professional