hej udvikler jeg har et problem med min kontaktformel/batalings menu
jeg har en php fil som sender folk hen til at web site når de har indtastet deres op lysninger men kan ikke includere denne php fil
Betal2.php
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Contact Us</title>
- <script src="lite_validation.js"></script>
- <script>
- required.add('Navn','NOT_EMPTY','Navn');
- required.add('Email','EMAIL','Email');
- required.add('Steam','NOT_EMPTY','Steam');
- required.add('Produkt','NOT_EMPTY','Produkt');
- required.add('Server','NOT_EMPTY','Server')
- </script>
- <link rel="stylesheet" type="text/css" href="lite_styles.css">
- </head>
- <body>
- <form name="contactformlite" method="post" action="lite_process.php" onsubmit="return validate.check(this)">
- <table width="400px" class="cflite">
- <tr>
- <td colspan="2">
- <p style="text-align:center">Udfyld venligst alle felter</p>
- </td>
- </tr>
- <tr>
- <td width="73" valign="top" class="cflite_td">
- <label for="Navn" class="required">Navn<span class="required_star"> * </span></label>
- </td>
- <td width="315" valign="top" class="cflite_td">
- <input type="text" name="Navn" id="Navn" maxlength="80" style="width:250px"></td>
- </tr>
- <tr>
- <td valign="top" class="cflite_td">
- <label for="Email" class="required">Email
- <span class="required_star">* </span></label>
- </td>
- <td valign="top" class="cflite_td">
- <input type="text" name="Email" id="Email" maxlength="100" style="width:250px"></td>
- </tr>
- <tr>
- <td valign="top" class="cflite_td">
- <label for="Steam" class="required">Steam ID<span class="required_star"> * </span></label>
- </td>
- <td valign="top" class="cflite_td">
- <input type="text" name="Steam" id="Steam" maxlength="80" style="width:250px"></td>
- </tr>
- <tr>
- <td valign="top" class="cflite_td"><label for="Produkt" class="required">Produkt<span class="required_star"> * </span></label></td>
- <td valign="top" class="cflite_td">
- <select size="1" name="Produkt" id="Produkt" style="width:252px;">
- <option value="bronze">Bronze</option>
- <option value="silver">Silver</option>
- <option value="gold">Gold</option>
- </select></td>
- </tr>
- <td valign="top" class="cflite_td"><label for="Server" class="required">Server<span class="required_star"> * </span></label></td>
- <td valign="top" class="cflite_td">
- <select size="1" name="Server" id="Server" style="width:252px;">
- <option value="s1">Ba Jail</option>
- <option value="s2">Surf</option>
- <option value="s3">Deathrun</option>
- <option value="s4">Hoejhus</option>
- <option value="s5">Zombie</option>
- <option value="s6">Hide'N'Seek</option>
- <option value="s7">Death Match</option>
- <option value="s8">Multi Game</option>
- </select></td>
- </tr>
- <tr>
- <td colspan="2" style="text-align:center" class="cflite_td">
- <p>
- <input type="submit" value=" Køb ">
- <br />
- </p></td>
- </tr>
- </table>
- </form>
-
- </body>
- </html>
lite_process.php
- <?php
- if(isset($_POST['Email'])) {
-
- include 'lite_settings.php';
- include 'betal.php';
-
- function died($error) {
- echo "Sorry, but there were error(s) found with the form you submitted. ";
- echo "These errors appear below.<br /><br />";
- echo $error."<br /><br />";
- echo "Please go back and fix these errors.<br /><br />";
- die();
- }
-
- if(!isset($_POST['Navn']) ||
- !isset($_POST['Email']) ||
- !isset($_POST['Steam']) ||
- !isset($_POST['Produkt']) ||
- !isset($_POST['Server'])) {
- died('We are sorry, but there appears to be a problem with the form you submitted.');
- }
-
- $navn = $_POST['Navn']; // required
- $email = $_POST['Email']; // required
- $steam = $_POST['Steam']; // required
- $produkt = $_POST['Produkt']; // required
- $server = $_POST['Server']; // required
-
- $error_message = "felj";
- $email_exp = "^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$";
- if(!eregi($email_exp,$email)) {
- $error_message .= 'Den Email du intastede er ikke sandt<br />';
- }
- if(strlen($navn) < 2) {
- $error_message .= 'Det Navn du intastede er ikke sandt<br />';
- }
- if(strlen($produkt) < 2) {
- $error_message .= 'The Comments you entered do not appear to be valid.<br />';
- }
- }
- if(strlen($server) < 2) {
- $error_message .= 'The Comments you entered do not appear to be valid.<br />';
- }
-
- if(strlen($error_message) > 4) {
- died($error_message);
- }
- $email_message = "Ud fyld venligst alt.\r\n";
-
- function clean_string($string) {
- $bad = array("content-type","bcc:","to:","cc:","href");
- return str_replace($bad,"",$string);
- }
-
- $email_message .= "Navn: ".clean_string($navn)."\r\n";
- $email_message .= "Email: ".clean_string($email)."\r\n";
- $email_message .= "Steam: ".clean_string($steam)."\r\n";
- $email_message .= "Produkt: ".clean_string($produkt)."\r\n";
- $email_message .= "Server: ".clean_string($server)."\r\n";
-
- $headers = 'From: '.$email."\r\n".
- 'Reply-To: '.$email."\r\n" .
- 'X-Mailer: PHP/' . phpversion();
- @mail($email_to, $email_subject, $email_message, $headers);
- header("Location: $thankyou");
- ?>
- <script>location.replace('<?php echo $thankyou;?>')</script>
- <?
-
- ?>
lite_settings.php
- <?php
-
- $email_to = "nav26sdn@gmail.com"; // your email address
- $email_subject = "[Umbrella] kontakt"; // email subject line
- $thankyou = "http://umbrella-gaming.dk"; // thank you page
-
- ?>
betal.php
- <?php
- if($_POST) //Formularen er blevet sendt
- {
- //Normalisere input så det er små bogstaver og ingen overflødig mellemrum, hvis nogen prøver at sende uønsket data
- $server = strtolower(trim($_POST['Produkt']));
- $serviceTier = strtolower(trim($_POST['Server']));
-
- $relations = array(
- 's1' => array(
- 'bronze' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Name=&TransactionEmail_Subject=K%C3%B8b+af+Umbrella+Bronze+p%C3%A5+S1&TransactionEmail_Message=Dette+produgt+er+Umbrella+Bronze+p%C3%A5+S1%0d%0a%0d%0aHUSK:+L%C3%A6s+betingelserne+inden+k%C3%B8b!&TransactionEmail_Amount=39,00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0&action=validate',
- 'silver' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Name=&TransactionEmail_Subject=K%C3%B8b+af+Umbrella+Silver+p%C3%A5+S1&TransactionEmail_Message=Dette+produkt+er+Umbrella+Silver+p%C3%A5+S1%0d%0a%0d%0aHUSK:+L%C3%A6s+betingelserne+inden+k%C3%B8b!&TransactionEmail_Amount=49,00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0&action=validate',
- 'gold' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Name=&TransactionEmail_Subject=K%C3%B8b+af+Umbrella+Gold+p%C3%A5+S1&TransactionEmail_Message=Dette+produkt+er+Umbrella+Gold+p%C3%A5+S1%0d%0a%0d%0aHUSK:+L%C3%A6s+betingelserne+inden+k%C3%B8b!&TransactionEmail_Amount=99,00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0&action=validate'
- ),
- 's2' => array(
- 'bronze' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Name=&TransactionEmail_Subject=K%C3%B8b+af+Umbrella+Bronze+p%C3%A5+S2&TransactionEmail_Message=Dette+produkt+er+Umbrella+Bronze+p%C3%A5+S2%0d%0a%0d%0aHUSK:+L%C3%A6s+betingelserne+inden+k%C3%B8b!&TransactionEmail_Amount=39,00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0&action=validate',
- 'silver' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Name=&TransactionEmail_Subject=K%C3%B8b+af+Umbrella+Silver+p%C3%A5+S2&TransactionEmail_Message=Dette+produkt+er+Umbrella+Silver+p%C3%A5+S2%0d%0a%0d%0aHUSK:+L%C3%A6s+betingelserne+inden+k%C3%B8b!&TransactionEmail_Amount=49,00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0&action=validate',
- 'gold' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Name=&TransactionEmail_Subject=K%C3%B8b+af+Umbrella+Gold+p%C3%A5+S2&TransactionEmail_Message=Dette+produkt+er+Umbrella+Gold+p%C3%A5+S2%0d%0a%0d%0aHUSK:+L%C3%A6s+betingelserne+inden+k%C3%B8b!&TransactionEmail_Amount=99,00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0&action=validate'
- ),
- 's3' => array(
- 'bronze' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Bronce+p%c3%a5+S3&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Death-Run+Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=40%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire',
- 'silver' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Silver+p%c3%a5+S3&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Death-Run+Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=50%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire',
- 'gold' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Gold+p%c3%a5+S3&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Death-Run+Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=100%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire'
- ),
- 's4' => array(
- 'bronze' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Bronce+p%c3%a5+S4&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Hoejhus++Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=40%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire',
- 'silver' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Silver+p%c3%a5+S4&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Hoejhus++Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=50%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire',
- 'gold' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Gold+p%c3%a5+S4&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Hoejhus++Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=100%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire'
- ),
- 's5' => array(
- 'bronze' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Bronce+p%c3%a5+S5&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Zombie+Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=40%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire',
- 'silver' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Silver+p%c3%a5+S5&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Zombie+Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=50%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire',
- 'gold' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Gold+p%c3%a5+S5&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Zombie+Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=100%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire'
- ),
- 's6' => array(
- 'bronze' => 'https://google.dk',
- 'silver' => 'https://google.dk',
- 'gold' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Gold+p%c3%a5+S5&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Zombie+Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=100%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire'
- ),
- 's7' => array(
- 'bronze' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Bronce+p%c3%a5+S5&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Zombie+Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=40%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire',
- 'silver' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Silver+p%c3%a5+S5&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Zombie+Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=50%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire',
- 'gold' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Gold+p%c3%a5+S5&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Zombie+Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=100%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire'
- ),
- 's8' => array(
- 'bronze' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Bronce+p%c3%a5+S5&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Zombie+Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=40%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire',
- 'silver' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Silver+p%c3%a5+S5&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Zombie+Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=50%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire',
- 'gold' => 'https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=umbrella-schuco%40hotmail.com&TransactionEmail_Subject=K%c3%b8b+af+Umbrella+Gold+p%c3%a5+S5&TransactionEmail_Message=Husk+at+l%c3%a6se+betingelserne%0d%0aDette+er+Zombie+Serveren%0d%0a%0d%0aMed+venlig+hilsen%0d%0aX-Umbrella%0d%0awww.x-umbrella.tk&TransactionEmail_Amount=100%2c00&TransactionEmail_Currency=DKK&TransactionEmail_AllowChange=0">Betal med ewire'
- )
- );
-
- //Valider data
- if(!preg_match('/s[1-8]{1}/', $produkt) ||
- !preg_match('/bronze|silver|gold/',$server))
- {
- echo '<span style="color:red;font-size:20px;">Der opstod en fejl, prøv igen</span>';
- }
- else {
- //Data bestod validering, send til ewire
- header('Location: '.$relations[$produkt][$server]);
- }
- }
- ?>
og denne kode "batal.php"her skal jeg have smidt ind i stedet for at den går hen på siden
http://umbrella-gaming.dk som i lite_setting.php