GIF89a; Mini Shell

Mini Shell

Direktori : /home/serb/www/admin/
Upload File :
Current File : /home/serb/www/admin/edit_featuredad.php

<?
include("sessionout.php");
 include("../lib/globals.php");
 include("../lib/common.php");
 include("../lib/functions.php");
 include("../lib/SimpleImage.php");
 $id=$_POST["id"];
 $sb=$_POST["Submit"];
 if($sb=="Process")
	{	
		if($_FILES['ad_image1']['name'])
		{
			$manu_imagename1=time().$_FILES['ad_image1']['name'];
			move_uploaded_file($_FILES['ad_image1']['tmp_name'],'../avtar/'.$manu_imagename1);
			
			$image2= new SimpleImage();
			$image2->load('../avtar/'.$manu_imagename1);
			$image2->resizeToWidth(250);
			$image2->resizeToHeight(350);
			$image2->save('../thubigg/'.$manu_imagename1);
			
		}
		else
		{
			$manu_imagename1=$_POST['img1'];
		}
		
		if($_POST['picid1'])
		{
			$pics1_insert="UPDATE escort_photo SET picture='$manu_imagename1' where id='".$_POST['picid1']."'";
			execute_query($pics1_insert);
		}
		
		
		
		    if($_FILES['ad_image2']['tmp_name'])
						 {
							$manu_imagename11=time().$_FILES['ad_image2']['name'];
							move_uploaded_file($_FILES['ad_image2']['tmp_name'],'../avtar/'.$manu_imagename11);
							
							
							$image2= new SimpleImage();
							$image2->load('../avtar/'.$manu_imagename11);
							$image2->resizeToWidth(250);
							$image2->resizeToHeight(350);
							$image2->save('../thubigg/'.$manu_imagename11);
						 }
					else
			
					{
				
						$manu_imagename11=$_POST['img2'];
				
					}
					
				if($_POST['picid2'])
				{
					$pics2_insert="UPDATE escort_photo SET picture='$manu_imagename11' where id='".$_POST['picid2']."'";
					execute_query($pics2_insert);
				}	
					
					
					
					
		if($_FILES['ad_image3']['tmp_name'])
						 {
							$manu_imagename12=time().$_FILES['ad_image3']['name'];
							move_uploaded_file($_FILES['ad_image3']['tmp_name'],'../avtar/'.$manu_imagename12);
							
							$image2= new SimpleImage();
							$image2->load('../avtar/'.$manu_imagename12);
							$image2->resizeToWidth(250);
							$image2->resizeToHeight(350);
							$image2->save('../thubigg/'.$manu_imagename12);
						 }
					else
			
					{
				
						$manu_imagename12=$_POST['img3'];
				
					}
					
					if($_POST['picid3'])
						{
							$pics3_insert="UPDATE escort_photo SET picture='$manu_imagename12' where id='".$_POST['picid3']."'";
							execute_query($pics3_insert);
						}	
					
					
					
					
		if($_FILES['ad_image4']['tmp_name'])
						 {
							$manu_imagename13=time().$_FILES['ad_image4']['name'];
							move_uploaded_file($_FILES['ad_image4']['tmp_name'],'../avtar/'.$manu_imagename13);
							
							$image2= new SimpleImage();
							$image2->load('../avtar/'.$manu_imagename13);
							$image2->resizeToWidth(250);
							$image2->resizeToHeight(350);
							$image2->save('../thubigg/'.$manu_imagename13);
						 }
					else
			
					{
				
						$manu_imagename13=$_POST['img4'];
				
					}
					
					if($_POST['picid4'])
					 {
						$pics4_insert="UPDATE escort_photo SET picture='$manu_imagename13' where id='".$_POST['picid4']."'";
						execute_query($pics4_insert);
			          }	
					
					
					
					
					
					
					$desp=addslashes($_POST['ad_desp']);
					$date=date('Y-m-d');
		
		$insert_sql="update escort_details set description='$desp',tel_national='".$_POST['phNumber']."',email='".$_POST['emailAddress']."',updatedate='$date' WHERE id='".$_POST['ad_id']."'";
		execute_query($insert_sql);
		
   		
		
		
		
?>
	<script>
		window.location.href="list_featured.php";
	</script>
<?
	}
	$sel="select * from escort_details where id='".$_GET['id']."'";
	$res=execute_query($sel);
	$row=mysql_fetch_array($res);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Escortservice</title>
<link href="../style.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../validator/frm_validator.js"></script>
<script>
    function validate4()
	{
	   if(frmValidate('f1','country','country','YES','')== false)
	   {
	     return false;
	   }
	   if(frmValidate('f1','state','state','YES','')== false)
	   {
	     return false;
	   }
    } 
</script>
<script language="javascript">



        function validate()



        {

              			
				if(document.f1.ad_image1.value!=""){
					
				   var str = document.f1.ad_image1.value;
				   var lower = str.toLowerCase();
				   var newStr = lower.substring(lower.length-4, lower.length);
				   //alert(newStr);
				   if((newStr!=".jpg")&&(newStr!=".jpeg")&&(newStr!=".png")&&(newStr!=".bmp")){
				   alert("You cannot upload executable files...! Please upload files in jpg or jpeg or png extension.");
				   document.f1.ad_image1.focus();
				   return (false);
					}
				}
					
					
				   
				  if(document.f1.ad_image1.value!=""){
					
				   var str = document.f1.ad_image1.value;
				   var lower = str.toLowerCase();
				   var newStr = lower.substring(lower.length-4, lower.length);
				   //alert(newStr);
				   if((newStr!=".jpg")&&(newStr!=".jpeg")&&(newStr!=".png")&&(newStr!=".bmp")){
				   alert("You cannot upload executable files...! Please upload files in jpg or jpeg or png extension.");
				   document.f1.ad_image1.focus();
				   return (false);
					}
				  }
				  
				  if(document.f1.ad_image3.value!=""){
				   
				   
				   var str = document.f1.ad_image3.value;
				   var lower = str.toLowerCase();
				   var newStr = lower.substring(lower.length-4, lower.length);
				   //alert(newStr);
				   if((newStr!=".jpg")&&(newStr!=".jpeg")&&(newStr!=".png")&&(newStr!=".bmp")){
				   alert("You cannot upload executable files...! Please upload files in jpg or jpeg or png extension.");
				   document.f1.ad_image3.focus();
				   return (false);
					}
				   }
				   
				   
				  if(document.f1.ad_image4.value!=""){	   	
				  
				   var str = document.f1.ad_image4.value;
				   var lower = str.toLowerCase();
				   var newStr = lower.substring(lower.length-4, lower.length);
				   //alert(newStr);
				   if((newStr!=".jpg")&&(newStr!=".jpeg")&&(newStr!=".png")&&(newStr!=".bmp")){
				   alert("You cannot upload executable files...! Please upload files in jpg or jpeg or png extension.");
				   document.f1.ad_image4.focus();
				   return (false);
					}
					 }
					 
					 if(document.f1.ad_image5.value!=""){	   	
				  
				   var str = document.f1.ad_image5.value;
				   var lower = str.toLowerCase();
				   var newStr = lower.substring(lower.length-4, lower.length);
				   //alert(newStr);
				   if((newStr!=".jpg")&&(newStr!=".jpeg")&&(newStr!=".png")&&(newStr!=".bmp")){
				   alert("You cannot upload executable files...! Please upload files in jpg or jpeg or png extension.");
				   document.f1.ad_image5.focus();
				   return (false);
					}
					 }
					 if(document.f1.ad_image6.value!=""){	   	
				  
				   var str = document.f1.ad_image6.value;
				   var lower = str.toLowerCase();
				   var newStr = lower.substring(lower.length-4, lower.length);
				   //alert(newStr);
				   if((newStr!=".jpg")&&(newStr!=".jpeg")&&(newStr!=".png")&&(newStr!=".bmp")){
				   alert("You cannot upload executable files...! Please upload files in jpg or jpeg or png extension.");
				   document.f1.ad_image6.focus();
				   return (false);
					}
					 }
					 
					 if(document.f1.ad_image7.value!=""){	   	
				  
				   var str = document.f1.ad_image7.value;
				   var lower = str.toLowerCase();
				   var newStr = lower.substring(lower.length-4, lower.length);
				   //alert(newStr);
				   if((newStr!=".jpg")&&(newStr!=".jpeg")&&(newStr!=".png")&&(newStr!=".bmp")){
				   alert("You cannot upload executable files...! Please upload files in jpg or jpeg or png extension.");
				   document.f1.ad_image7.focus();
				   return (false);
					}
					 }
					 
					 if(document.f1.ad_image8.value!=""){	   	
				  
				   var str = document.f1.ad_image8.value;
				   var lower = str.toLowerCase();
				   var newStr = lower.substring(lower.length-4, lower.length);
				   //alert(newStr);
				   if((newStr!=".jpg")&&(newStr!=".jpeg")&&(newStr!=".png")&&(newStr!=".bmp")){
				   alert("You cannot upload executable files...! Please upload files in jpg or jpeg or png extension.");
				   document.f1.ad_image8.focus();
				   return (false);
					}
					 }

                /*if(document.adpost.veri_image.value=="")



                {

                        

                        alert("Select Your Verification Image");



                        document.adpost.veri_image.focus();



                        return false;

                        



                }*/



        }



</script> 
</head>
<body>
<table width="790" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="left" valign="top"><table width="790" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="left" valign="top" class="td1"><table width="790" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="343" align="left" valign="top">&nbsp;</td>
            <td width="447" align="left" valign="top">&nbsp;</td>
          </tr>
          <tr>
			<td height="38" align="right" valign="middle" class="topnav"><p style="margin-left:23px;"><img src="img/logo.png" alt="" /></p></td>
           <td align="center" valign="middle" class="footer-link">Administrator Control Panel</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td align="left" valign="top" class="td2">&nbsp;</td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td align="center" valign="top" class="td3"><table width="780" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="5"></td>
      </tr>
      <tr>
        <td align="center" valign="top" class="td4"><table width="768" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="6"></td>
            </tr>
          <tr>
            <td align="center" valign="top" class="td5">&nbsp;</td>
          </tr>
          <tr>
            <td align="center" valign="top" class="td9"><table width="751" border="0" align="center" class="bordermain">
              <tr>
                <td><? include("menu.php");?></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td align="center">
				<form action="<? print $_SERVER['PHP_SELF'];?>" method="post" enctype="multipart/form-data" name="f1" onSubmit="return validate();" >
				<table width="735" border="0" align="center" cellspacing="1" class="Table4">
                  <tr>
                    <td colspan="2" align="center" class="tblHeader2">Edit Ad</td>
                  </tr>
                  <tr class="mouseOver">
                    <td align="right">&nbsp;</td>
                    <td align="left" >&nbsp;</td>
                  </tr>
                   
                 
                  
                  
                  
                 
                   <tr class="mouseOver">
                    <td align="right">&nbsp;</td>
                    <td align="left" >&nbsp;</td>
                  </tr>
                   <tr class="mouseOver">
                    <td width="33%" align="right" ><strong>Description: &nbsp;</strong></td>
                    <td width="67%" align="left" >
                    	<textarea name="ad_desp" style="width:350px; height:200px;"><?=$row['description']?></textarea>
                    </td>
                  </tr>
                  <tr class="mouseOver">
                    <td align="right">&nbsp;</td>
                    <td align="left" >&nbsp;</td>
                  </tr>
                  
                 <!-- <tr class="mouseOver">
                    <td width="33%" align="right"><strong>New Image1 &nbsp;</strong></td>
                    <td width="67%" align="left">
                    	<input type="file" name="ad_image1"  />
                    </td>
                  </tr>
                  <tr class="mouseOver">
                    <td width="33%" align="right" ><strong>Current Image1: &nbsp;</strong></td>
                    <td width="67%" align="left" >
                    	<input type="hidden" name="ad_banner1" value="<?=$row['image1']?>"  />
                    	<img src="../avtar/<?=$row['image1']?>" height="100px;" width="150px" />
                    </td>
                  </tr>
                  <tr class="mouseOver">
                    <td align="right">&nbsp;</td>
                    <td align="left" >&nbsp;</td>
                  </tr>
                 
                  <tr class="mouseOver">
                    <td width="33%" align="right"><strong>New Image2 &nbsp;</strong></td>
                    <td width="67%" align="left">
                    	<input type="file" name="ad_image2"  />
                    </td>
                  </tr>
                  <tr class="mouseOver">
                    <td width="33%" align="right" ><strong>Current Image2: &nbsp;</strong></td>
                    <td width="67%" align="left" >
                    	<input type="hidden" name="img2" value="<?=$row['image2'] ?>" />
                    	<img src="../avtar/<?=$row['image2'] ?>" height="100px;" width="150px" />
                    </td>
                  </tr>
                 
                  <tr class="mouseOver">
                    <td align="right">&nbsp;</td>
                    <td align="left" >&nbsp;</td>
                  </tr>
                 
						
                  <tr class="mouseOver">
                    <td width="33%" align="right"><strong>New Image3 &nbsp;</strong></td>
                    <td width="67%" align="left">
                    	<input type="file" name="ad_image3"  />
                    </td>
                  </tr>
                  <tr class="mouseOver">
                    <td width="33%" align="right" ><strong>Current Image3: &nbsp;</strong></td>
                    <td width="67%" align="left" >
                    	<input type="hidden" name="img3" value="<?=$row['image3']?>"  />
                    	<img src="../avtar/<?=$row['image3']?>" height="100px;" width="150px" />
                    </td>
                  </tr>
                 
                  <tr class="mouseOver">
                    <td align="right">&nbsp;</td>
                    <td align="left" >&nbsp;</td>
                  </tr>
                
						
                  <tr class="mouseOver">
                    <td width="33%" align="right"><strong>New Image4 &nbsp;</strong></td>
                    <td width="67%" align="left">
                    	<input type="file" name="ad_image4"  />
                    </td>
                  </tr>
                  <tr class="mouseOver">
                    <td width="33%" align="right" ><strong>Current Image4: &nbsp;</strong></td>
                    <td width="67%" align="left" >
                    	<input type="hidden" name="img4" value="<?=$row['image4']?>"  />
                    	<img src="../avtar/<?=$row['image4']?>" height="100px;" width="150px" />
                    </td>
                  </tr>-->
                 
                  <tr class="mouseOver">
                    <td align="right">&nbsp;</td>
                    <td align="left" ></td>
                  </tr>               
                  <tr class="mouseOver">
                    <td width="22%" align="right"><strong>Phone Number:</strong> &nbsp;</td>
                    <td width="78%" align="left">
                     &nbsp;<input name="phNumber" type="text" class="content" id="eng_menu" size="50" value="<?=$row['tel_national']?>" />
                    </td>
                  </tr>
                  <tr class="mouseOver">
                    <td align="right">&nbsp;</td>
                    <td align="left" ></td>
                  </tr>               
                  <tr class="mouseOver">
                    <td width="22%" align="right"><strong>Email:</strong> &nbsp;</td>
                    <td width="78%" align="left">
                     &nbsp;<input name="emailAddress" type="text" class="content" id="eng_menu" size="50" value="<?=$row['email']?>" />
                    </td>
                  </tr>
                   <tr class="mouseOver">
                    <td align="right">&nbsp;</td>
                    <td align="left" >&nbsp;</td>
                  </tr>
                  <?
					$sql_image="SELECT * FROM escort_photo WHERE postid='".$_GET["id"]."'";
					$res_image=execute_query($sql_image);
					$num_image=mysql_num_rows($res_image);
					if($num_image>0)
					 {
						 $ctt=1;
						while($row_image=mysql_fetch_array($res_image))
						{
					 ?>
					 
						 <tr class="mouseOver">							
							<td align="left" valign="top" class="gtext"><strong></strong></td>
							<td align="left" class="gtext">
                            <img src="../avtar/<?=$row_image['picture']?>" height="180px" width="150px" />
                            <input type="file" name="ad_image<?=$ctt?>"  />
                            <input type="hidden" name="img<?=$ctt?>" value="<?=$row_image['picture']?>"  />
                            <input type="hidden" name="picid<?=$ctt?>" value="<?=$row_image['id']?>"  />
                            </td>
							
						  </tr>
						 
							  <tr class="mouseOver" height="5"></tr>
						  <?
						   $ctt=$ctt+1;
				         }
				
				
				
					 }?> 
                 
                 
                  <tr class="mouseOver">
                    <td align="right">&nbsp;</td>
                    <td align="left" >&nbsp;</td>
                  </tr>
                  <tr class="mouseOver">
                    <td align="right">
                    	<input type="hidden" name="ad_id" value="<?=$_GET['id'] ?>" />
                        <input type="hidden" name="ad_img1" value="<?=$row['image1']?>" />
                        <!--<input type="hidden" name="ad_img2" value="<?=$row['user_image2']?>" />
                        <input type="hidden" name="ad_img3" value="<?=$row['user_image3']?>" />
                        <input type="hidden" name="ad_img4" value="<?=$row['user_image4']?>" />-->
                        <input name="Submit" type="submit" class="butn3" value="Process" />
                    	&nbsp;
                    </td>
                    <td align="left" >&nbsp;
                        <input name="Submit2" type="reset" class="butn3" value="Reset" /></td>
                  </tr>
                  <tr class="mouseOver">
                    <td align="right">&nbsp;</td>
                    <td align="left" >&nbsp;</td>
                  </tr>
                </table>
				</form>	
				</td>
                </tr>
              
            </table>
			
			</td>
          </tr>
          <tr>
            <td width="232" align="center" valign="top" class="td5">&nbsp;</td>
            </tr>
          <tr>
            <td height="6"></td>
            </tr>
        </table></td>
      </tr>
      
    </table></td>
  </tr>
  <tr>
    <td align="center" valign="top" class="td3"><table width="780" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="center" valign="top" class="footer-bac">
		<p style="text-align:center; padding:35px 0 5px 0px;"><a href="main.php" class="footer-link">Administrator Control Panel </a></p>
		<p class="footer-text1" style="text-align:center;">Escortservice</p>
		</td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>

./BlackJoker Mini Shell 1.0