GIF89a; Mini Shell

Mini Shell

Direktori : /home/serb/public_html/
Upload File :
Current File : /home/serb/public_html/newsletter-signup.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 validate1()
	{
		if(document.subscribe.subName.value=="")

		{
			alert("Enter your Name");
			document.subscribe.subName.focus();
			return false;
		}
		
		if(document.subscribe.emailAddress.value=="")

		{
			alert("Enter your Email Address");
			document.subscribe.emailAddress.focus();
			return false;
		}
		
		
	}
</script>
<script language="javascript">
	function validate2()
	{
		
		if(document.unsub.unsubEmail.value=="")

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





<?
if(($_POST['subName']) && ($_POST['emailAddress']))
{
		
		
		
		
		$sql_insert="INSERT INTO newsletter(id,name,email,status)VALUES('','".$_POST['subName']."','".$_POST['emailAddress']."','a')";
		execute_query($sql_insert);
		?>
        <script language="javascript">
        	
			location.href="newsletter-signup.php?msg=1";
        </script>
        <?
	
}

?>
<?
if($_POST['unsubEmail'])
{
	$sql_query="SELECT * FROM newsletter WHERE email='".$_POST['unsubEmail']."'";
	$res_query=execute_query($sql_query);
	$num_query=mysql_num_rows($res_query);
	if($num_query>0)
	{
		$row_emailid=mysql_fetch_array($res_query);
		$sql_delemail="DELETE FROM newsletter WHERE id='".$row_emailid['id']."'";
		execute_query($sql_delemail);
		?>
        
        <script language="javascript">
        	
			location.href="newsletter-signup.php?del=1";
        </script>
        
	<? } else
	{?>
    		<script language="javascript">
        	
			location.href="newsletter-signup.php?nottmem=1";
        </script>
    <? }
	
}
	?>			

<body>
 <? include "includes/header.php";?>

	<div class="main_bg">
 		<div style="height:32px; width:1000px;">
        	        
        </div>
        <div  style="width:1000px; margin:0 auto;">
        	<div class="menuleft_contain">
            	<? include "includes/escortdetails_leftcontent.php";?>
            </div>
             <div class="acountright_contain">
             		
             	<div class="acccmid1_header">Newsletter</div>
            		<div class="accountrightct_mid">
                		 <div class="small_space"></div>
                         <div class="profile_data">
                                   <div style="width:680px;">
                                   	<table>
                                    	<tr>
                                        	<td class="logintext22">
                                            	Do you want to know the latest news about? Then subscribe our newsletter and be up to date and well informed about what is going in escort business on our website, how about our advertising offers and much more.
                                            
                                            </td>
                                        
                                        </tr>
                                    
                                    </table>
                                   <? if($_GET['msg']==1){ ?>
                  						 <p> Your Newsletter Suscribtion is successfully created</p>
                  						 <? } ?> 
                                          <? if($_GET['del']==1){ ?>
                  						 <p> Your Newsletter Account is successfully Unsubscribe</p>
                  						 <? } ?>
                                         <? if($_GET['nottmem']==1){ ?>
                  						 <p> Your Have No Account for Newsletter</p>
                  						 <? } ?> 
                                   </div>
                                   <br/>
                                   <div class="link_info">
                                   	 
                                   		<div class="subscribe">
                                        <h1>Subscribe</h1>
                                        	<form  action="<?=$_SERVER['PHP_SELF']?>" method="post" enctype="multipart/form-data" name="subscribe" onSubmit="return validate1();">  
                              <input name="submit_form" value="1" type="hidden">
                            		<table border="0" cellpadding="0" cellspacing="6" style="width:290px; margin:0 auto; margin-top:15px;">
                                    	
                                        
                                         <tr>
                                    	<td class="jointext222">Name :</td>
                                        <td><input type="text" style="width:200px;" id="esco_name" class="main_input3333" name="subName"></td>
                                    
                                        </tr>
                                       
                                    <tr height="5"></tr>
                                     <tr>
                                    	<td class="jointext222">Email :</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"></td>
                                        <td><input type="image" src="images/submit.png" style="padding-left:15px;" /> </td>
                                        
                                        </tr>
                                        
                                    </table>
                              </form>
                                        </div>
                                        <div class="unsubscribe">
                                        	<h1>Unsubscribe</h1>
                                            <form  action="<?=$_SERVER['PHP_SELF']?>" method="post" enctype="multipart/form-data" name="unsub" onSubmit="return validate2();">  
                              				<input name="submit_form" value="1" type="hidden">
                                            	<table border="0" cellpadding="0" cellspacing="0">
                                                	<tr height="5"></tr>
                                                    <tr>
                                                    <td width="20"></td>
                                                    	<td class="jointext222" style="text-align:left !important;">Email :</td>
                                                    </tr>
                                                    <tr height="4"></tr>
                                                    <tr>
                                                    <td width="20"></td>
                                                    	<td>
                                                        	<input type="text" id="esco_name" class="unsubtext" name="unsubEmail">
                                                        </td>
                                                    </tr>
                                                    <tr height="5"></tr>
                                                    <tr>
                                                    <td></td>
                                                    <td><input type="image" src="images/submit.png" style="padding-left:15px;" /> </td>
                                                    
                                                    </tr>
                                                    <tr height="5"></tr>
                                                </table>
                                            
                                            </form>
                                        </div>
                                   <br class="spacer" />
                                   </div>
                                  
                                  
                            </div>
                         <br class="spacer" />
                         </div> 
                                            
                     	
              </div>
            	
            <br class="spacer" />
            
        </div>
     <br/>
 </div>


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

./BlackJoker Mini Shell 1.0