<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
// +----------------------------------------------------------------------+
// | PHP version 4/5                                                      |
// +----------------------------------------------------------------------+
// | Copyright (c) 2005-2006 ARMIA INC                                    |
// +----------------------------------------------------------------------+
// | This source file is a part of iScripts EasyCreate 1.1                 |
// +----------------------------------------------------------------------+
// | Authors: sudheesh<sudheesh@armia.com>        		              	  |
// |          									                          |
// +----------------------------------------------------------------------+
  include "../includes/session.php";
  include "../includes/config.php";
  include "../includes/function.php";
  $currentloc="../";
  include "../includes/applicationheader.php";
?>
	<SCRIPT>
	  window.name="targ";
	  function checkNumber(t) {
	   t.value= parseInt(t.value);
		if(t.value.length == 0 ||  isNaN(t.value) || t.value.substr(0,1) == " " || parseInt(t.value) < 0) {
			t.value="";
			alert("Please Enter numeric value");
		}
		
		
      }
	  function canceltblpro(){
	  returnValue = new Object();
	  returnValue.url = "";
	        window.close();
	  }
	  function savetblpro(){
			returnValue = new Object();
			if(document.getElementById("btnuploadtype").value=="Upload"){
			    //location.href="uploadimage.php";
				returnValue.url = "uploadimage.php";
			}else if(document.getElementById("btnuploadtype").value=="Select from system gallery"){
				// location.href="ourgallery.php";
				returnValue.url = "ourgallerynew.php";	
			}else{
			    //location.href="usergallery.php";
			   returnValue.url = "usergallery.php";
			   //alert("your gallery");
			}
			window.close();
			
	  }
	  function setclrvalue(x){
	   document.getElementById("bgtd").style.backgroundColor=x;
	   document.getElementById("tbgclr").value=x;
	  }
	  function setbrdclrvalue(x){
	   document.getElementById("bordertd").style.backgroundColor=x; 
	   document.getElementById("tborderclr").value=x;
	  }
	  function changecolor(currentid){
	           winname="Problem22333"+currentid;
			   winurl="clrpallet.htm";
			   //alert(winurl);
			   window.open(winurl,winname,'width=400,height=560,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no');
	  } 
	  function changecolor1(currentid){
	           winname="Problem22"+currentid;
			   winurl="clrpallet1.htm";
			   //alert(winurl);
			   window.open(winurl,winname,'width=400,height=560,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no');
	  } 
	  
	  
	  function checkupload(){
	  
		document.getElementById("btnuploadtype").value="Upload";
	  }	
	  function checkourgallery(){
	    document.getElementById("btnuploadtype").value="Select from system gallery";
	  }
	  function checkyourgallery(){
	    document.getElementById("btnuploadtype").value="Select from your gallery";
	  }
	</SCRIPT>
<body>
<table width="100%" cellpadding=2 cellpadding=2>
 <tr>
   
    <td class=errormessage align=center>
	<?php
	 if(!validateSizePerUser($_SESSION["session_userid"],$size_per_user,$allowed_space,"../")) {
           echo "The space taken by you has exceeded the allowed limit.<br>(Space taken by you: " . human_read($size_per_user) . " <br>Allowed space: " . human_read($allowed_space) . ")<br>Delete 
		   unused images or any/all of the sites created by you to proceed further.<br>&nbsp;<br>";
		   exit;
     }
	?>
	</td>
   </tr>
   <tr>
      <td>
	                  <FIELDSET>
					      <legend class=maintextbold>Select Image</legend>
						    <table>
							      <form nameimageproper method=post>
							      <tr>
								     <td><input id=uptype name=uptype type=radio class=raiobutton checked onclick="checkupload()"; value="0"></td>
								     <td class=maintext>Upload Your Image</td>
								  </tr>
								  <tr>
								     <td><input id=uptype  name=uptype type=radio class=raiobutton onclick="checkourgallery()"; value="1"></td>
								     <td class=maintext>Select from system gallery</td>
								  </tr>
								  <tr>
								     <td><input id=uptype name=uptype type=radio class=raiobutton onclick="checkyourgallery()"; value="2"></td>
								     <td class=maintext>Select from your gallery</td>
								  </tr>
								
								  <tr>
								    <td colspan=4 align=center><input id=btnuploadtype  name=btnuploadtype class=button  type=button value="Upload" onclick="savetblpro();">
									<input class=button  type=button value="Cancel" onclick="canceltblpro();"></td>
								  </tr>
								 
								  </form>
							  </table>
						  
						  
					  </FIELDSET>
	  </td>
	</tr>
</table>	  				  	  
<?php
  include "./includes/editorfooter.php";
?>  

