Advertisement
Guest User

php tilsalgi.dk

a guest
Jun 4th, 2013
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.71 KB | None | 0 0
  1. <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
  2.  
  3.  
  4. <?php
  5. if(isset($_COOKIE['adresse'])) {
  6.     echo $_COOKIE['adresse'];
  7. }
  8.  
  9. include 'postnummere.php';
  10. $time = time()+3600;
  11. $url_egedal = "<meta http-equiv='refresh' content='0;url=http://www.tilsalgi.dk/brugtmarked-i-egedal'>";
  12. ?>
  13.  
  14.  
  15.  
  16. <center>
  17.   <p>&nbsp;</p>
  18.   <p>&nbsp;</p>
  19.   <p>&nbsp;</p>
  20.   <img src="http://www.tilsalgi.dk/images/web_assets/logo_mobile.png" /><p>&nbsp;</p><p>&nbsp;</p>
  21.  
  22. <table width="300" border="0" cellspacing="0" cellpadding="0">
  23.   <tr>
  24.     <td align="center">
  25.     <b><h2>Indtast dit postnummer</h2>
  26.     </b>
  27.     <i>Huskes automatisk til næste besøg</i>
  28.    
  29.     <form name="form" method="post">
  30.      
  31.      
  32.       <input name="postnr" type="text"  size="10" maxlength="4">
  33.      
  34.      
  35.         <input type="submit"  value="OK">
  36.      
  37.   </form></td>
  38.   </tr>
  39. </table>
  40.  
  41.  
  42. </center>
  43.  
  44.  
  45. <?php
  46.  
  47. //sammenligning af postkoder og redirection
  48. if (isset($_POST['postnr'])) {  
  49.  
  50.         if(in_array($_POST['postnr'], $egedal_kom)) {
  51.    
  52.             setcookie("adresse","$url_egedal",$time);
  53.            
  54.             echo "<meta http-equiv='refresh' content='0;url=http://www.tilsalgi.dk/brugtmarked-i-egedal'>";
  55.             }
  56.  
  57.              
  58.              
  59.              
  60.              
  61.              
  62.  
  63.         elseif(in_array($_POST['postnr'], $ballerup_kom)) {
  64.  
  65.            
  66.             echo "<meta http-equiv='refresh' content='0;url=http://www.tilsalgi.dk/brugtmarked-i-ballerup'>";
  67.             }
  68.        
  69.         elseif(in_array($_POST['postnr'], $kobenhavn_kom)) {
  70.  
  71.            
  72.             echo "<meta http-equiv='refresh' content='0;url=http://www.tilsalgi.dk/brugtmarked-i-kobenhavn'>";
  73.             }
  74.        
  75.        
  76.         else
  77.             {
  78.             echo "<meta http-equiv='refresh' content='0;url=http://tilsalgi.dk/ejfundet.php'>";
  79.            
  80.             }
  81.            
  82.     }
  83.            
  84.            
  85.            
  86.  
  87.  
  88. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement