<?php
session_start();
include("../check.access.php");
include('../_db.connection.php');
?>
<body bgcolor="#ECE9D8" topmargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0">
<script language="javascript">
<!--
image1 = new Image()
image1.src = "./images/UploadingBar.gif";
//-->
</script>
<div style="position:absolute; top:100px; left:200px; display:none; filter:alpha(Opacity=85);" id="uploading">
	<table bgcolor="#eeeeee" style="border: 1px solid #000000" width="200" height="80">
		<tr>
			<td align="center"><font face="arial" style="font-size: 12;"><b>Uploading Images...</b><br><img src="../images/UploadingBar.gif"></td>
		</tr>
		<tr>
			<td align="center"><font face="arial" style="font-size: 10;">You will be redirected to another page when the images are finished uploading.</td>
		</tr>
	</table>
</div>
<br>
	<table cellpadding="3" cellspacing="0" width="100%">
		<tr>
			<td>
				<table width="100%" cellpadding="3" cellspacing="0">
					<tr>
						<form action="../actions.php?pmode=make_folder&app=hta" method="post">
						<td nowrap><font face="verdana" size="1" color="#333333"><b>Make A New Folder: &nbsp;</td>
						<td><input type="textbox" name="folder_name" style="font-size: 10; width: 75;"></td>
						<td width="100%" style="border-right: 1px solid #CAC7B5;"><input type="submit" value=" Create "></td>
						</form>
						<?
						$folder_result = mysql_query("SELECT * FROM folders WHERE mid = '$mid'", $db);
						$folder_count = mysql_num_rows($folder_result);
							if($folder_count > 0){
						?>
						<script language="javascript">
						function upload() {
							var agree=confirm("Uploading images may take a while depending on your connection speed!");
							if (agree) {
								document.getElementById('uploading').style.display='block';
								//child = window.open('uploading.ani.php', 'Uploading', ['HEIGHT=100', 'WIDTH=250', 'dependent']);
								document.imgupload.action = "../actions.php?pmode=imgupload&app=hta";
								document.imgupload.submit();
							}
							else {
								false
							}
						}			
						</script>
						<form ENCTYPE="multipart/form-data" name="imgupload" method="post">						
						<td nowrap style="border-left: 1px solid #FEFCF1;"><font face="verdana" size="1" color="#333333"><b>&nbsp; Or Upload Images To: &nbsp;</td>
						<td>
						<select name="fid">
						<?
						while($folder = mysql_fetch_object($folder_result)){
						?>
							<option value="<?php echo $folder->folder_id; ?>"><?php echo $folder->name; ?></option>
						<? } ?>
						</select>
						</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td align="center" style="border-top: 1px solid #FEFCF1;border-bottom: 1px solid #CAC7B5"><input type="file" name="image[]" style="width: 400;font-size: 10;"></td>
		</tr>
		<tr>
			<td align="center" style="border-top: 1px solid #FEFCF1;border-bottom: 1px solid #CAC7B5"><input type="file" name="image[]" style="width: 400;font-size: 10;"></td>
		</tr>
		<tr>
			<td align="center" style="border-top: 1px solid #FEFCF1;border-bottom: 1px solid #CAC7B5"><input type="file" name="image[]" style="width: 400;font-size: 10;"></td>
		</tr>
		<tr>
			<td align="center" style="border-top: 1px solid #FEFCF1;border-bottom: 1px solid #CAC7B5"><input type="file" name="image[]" style="width: 400;font-size: 10;"></td>
		</tr>
		<tr>
			<td align="center" style="border-top: 1px solid #FEFCF1;border-bottom: 1px solid #CAC7B5"><input type="file" name="image[]" style="width: 400;font-size: 10;"></td>
		</tr>
		<tr>
			<td align="center" style="border-top: 1px solid #FEFCF1;border-bottom: 1px solid #CAC7B5"><input type="file" name="image[]" style="width: 400;font-size: 10;"></td>
		</tr>
		<tr>
			<td align="center" style="border-top: 1px solid #FEFCF1;border-bottom: 1px solid #CAC7B5"><input type="file" name="image[]" style="width: 400;font-size: 10;"></td>
		</tr>
		<tr>
			<td align="center" style="border-top: 1px solid #FEFCF1;border-bottom: 1px solid #CAC7B5"><input type="file" name="image[]" style="width: 400;font-size: 10;"></td>
		</tr>
		<tr>
			<td align="center" style="border-top: 1px solid #FEFCF1;border-bottom: 1px solid #CAC7B5"><input type="file" name="image[]" style="width: 400;font-size: 10;"></td>
		</tr>
		<tr>
			<td align="right">
				<table width="100%">
					<tr>
						<tr>
						<td><font face="verdana" size="1"><b>Quality: <td>
						<td><input type="radio" name="quality" value="70"><font face="verdana" size="1">High</b></td>
						<td><input type="radio" name="quality" value="60" checked><font face="verdana" size="1">Medium</td>
						<td><input type="radio" name="quality" value="40"><font face="verdana" size="1">Low</td>	
						<td align="right"><input type="reset" value="Clear"> &nbsp; <input type="button" value="Upload" onclick="upload();"></td>
					</tr>
				</table>
			</td>
		</tr>
		</form>
		<? } ?>
	</table>
	
</body>