Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[Problem] System zgłoszeń


Rekomendowane odpowiedzi

Opublikowano

Witam, mam system zgłoszeń z tego tematu: http://www.mpcforum.pl/topic/293585-tutdownload-system-zgloszen-by-mcnccpl/
 
Wysztko wygląda dobrze ale gdy klikam wyśli to pojawia mi sie pusta strona. A zgłoszenie nie dochodzi na mojego maila.
 
Kod pliku index.php

 

 

 

 

<?php
session_start();
if ($_SERVER['REQUEST_METHOD'] == 'POST')
{
if (isset($_POST['captcha_code'],$_SESSION['random_txt']) && md5($_POST['captcha_code']) == $_SESSION['random_txt'])
{
unset($_POST['captcha_code'],$_SESSION['random_txt']);
}
else
{
$errorcode = file_get_contents('#');
$replace = "##error##";
$errorcode = str_replace($replace, 'The entered code was wrong.', $errorcode);
echo $errorcode;
exit;
}
}
?>
<?php
function ValidateEmail($email)
{
$pattern = '/^([0-9a-z]([-.\w]*[0-9a-z])*@(([0-9a-z])+([-\w]*[0-9a-z])*\.)+[a-z]{2,6})$/i';
return preg_match($pattern, $email);
}

if($_SERVER['REQUEST_METHOD'] == 'POST')
{
$mailto = '[email protected]';
$mailfrom = isset($_POST['email']) ? $_POST['email'] : $mailto;
$subject = 'Otrzymales Zgloszenie :';
$message = 'Dane :';
$success_url = './strona1.html';
$error_url = '#';
$error = '';
$eol = "\n";
$max_filesize = isset($_POST['filesize']) ? $_POST['filesize'] * 1024 : 1024000;
$boundary = md5(uniqid(time()));

$header = 'From: '.$mailfrom.$eol;
$header .= 'Reply-To: '.$mailfrom.$eol;
$header .= 'MIME-Version: 1.0'.$eol;
$header .= 'Content-Type: multipart/mixed; boundary="'.$boundary.'"'.$eol;
$header .= 'X-Mailer: PHP v'.phpversion().$eol;
if (!ValidateEmail($mailfrom))
{
$error .= "The specified email address is invalid!\n<br>";
}

if (!empty($error))
{
$errorcode = file_get_contents($error_url);
$replace = "##error##";
$errorcode = str_replace($replace, $error, $errorcode);
echo $errorcode;
exit;
}

$internalfields = array ("submit", "reset", "send", "captcha_code");
$message .= $eol;
$message .= "IP Address : ";
$message .= $_SERVER['REMOTE_ADDR'];
$message .= $eol;
foreach ($_POST as $key => $value)
{
if (!in_array(strtolower($key), $internalfields))
{
if (!is_array($value))
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol;
}
else
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol;
}
}
}

$body = 'This is a multi-part message in MIME format.'.$eol.$eol;
$body .= '--'.$boundary.$eol;
$body .= 'Content-Type: text/plain; charset=ISO-8859-1'.$eol;
$body .= 'Content-Transfer-Encoding: 8bit'.$eol;
$body .= $eol.stripslashes($message).$eol;
if (!empty($_FILES))
{
foreach ($_FILES as $key => $value)
{
if ($_FILES[$key]['error'] == 0 && $_FILES[$key]['size'] <= $max_filesize)
{
$body .= '--'.$boundary.$eol;
$body .= 'Content-Type: '.$_FILES[$key]['type'].'; name='.$_FILES[$key]['name'].$eol;
$body .= 'Content-Transfer-Encoding: base64'.$eol;
$body .= 'Content-Disposition: attachment; filename='.$_FILES[$key]['name'].$eol;
$body .= $eol.chunk_split(base64_encode(file_get_contents($_FILES[$key]['tmp_name']))).$eol;
}
}
}
$body .= '--'.$boundary.'--'.$eol;
mail($mailto, $subject, $body, $header);
header('Location: '.$success_url);
exit;
}
?>
<!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=ISO-8859-1">
<title>System Zgloszen </title>
<meta name="author" content="Mateusz Socko">
<meta name="generator" content="http://www.mcncc.pl">
<style type="text/css">
div#container
{
width: 994px;
position: relative;
margin-top: 0px;
margin-left: auto;
margin-right: auto;
text-align: left;
}
</style>
<style type="text/css">
body
{
text-align: center;
margin: 0;
background-color: #FFFFFF;
color: #000000;
}
</style>
</head>
<body>
<div id="container">
<div id="wb_Form1" style="position:absolute;background-color:#F7F9FC;left:335px;top:91px;width:382px;height:418px;z-index:9">
<form name="Zgloszenie" method="post" action="<?php echo basename(__FILE__); ?>" enctype="multipart/form-data" id="Form1">
<textarea name="Nazwa Gracza :" id="TextArea2" style="position:absolute;left:162px;top:175px;width:198px;height:23px;border:1px #C0C0C0 solid;font-family:Courier New;font-size:13px;z-index:0" rows="0" cols="21"></textarea>
<textarea name="Adres E-Mail" id="TextArea3" style="position:absolute;left:159px;top:223px;width:198px;height:22px;border:1px #C0C0C0 solid;font-family:Courier New;font-size:13px;z-index:1" rows="0" cols="21"></textarea>
<div id="wb_Text3" style="margin:0;padding:0;position:absolute;left:72px;top:228px;width:82px;height:28px;text-align:left;z-index:2;">
<font style="font-size:11px" color="#000000" face="Georgia">Adres e-mail :</font></div>
<div id="wb_Text2" style="margin:0;padding:0;position:absolute;left:62px;top:180px;width:120px;height:14px;text-align:left;z-index:3;">
<font style="font-size:11px" color="#000000" face="Georgia">Twoj nick z gry:</font></div>
<div id="wb_Text4" style="margin:0;padding:0;position:absolute;left:69px;top:262px;width:169px;height:15px;text-align:left;z-index:4;">
<font style="font-size:11px" color="#000000" face="Georgia">Przepisz Tekst</font><font style="font-size:11px" color="#000000" face="Comic Sans MS">:</font></div>
<input type="submit" id="Button1" name="" value="Wyslij" style="position:absolute;left:148px;top:339px;width:96px;height:25px;font-family:Arial;font-size:13px;z-index:5">
<div id="wb_Captcha1" style="margin:0;padding:0;position:absolute;left:161px;top:258px;width:198px;height:36px;text-align:left;z-index:6;">
<img src="captcha1.php" alt="Click for new image" title="Click for new image" style="cursor:pointer;width:100px;height:38px;" onclick="this.src='captcha1.php?'+Math.random()">
<input type="text" id="Captcha1Edit" style="position:absolute;left:105px;top:18px;width:98px;height:18px;border:1px #C0C0C0 solid;font-family:Courier New;font-size:13px;" name="captcha_code" value=""></div>
<div id="wb_Text1" style="margin:0;padding:0;position:absolute;left:24px;top:13px;width:99px;height:14px;text-align:left;z-index:7;">
<font style="font-size:11px" color="#000000" face="Georgia">Opis Problemu:</font></div>
<textarea name="Opis Problemu zglaszajacego :" id="TextArea1" style="position:absolute;left:19px;top:30px;width:349px;height:136px;border:1px #C0C0C0 solid;font-family:Courier New;font-size:13px;z-index:8" rows="7" cols="40"></textarea>
</form>
</div>
<div id="wb_Text5" style="margin:0;padding:0;position:absolute;left:355px;top:695px;width:348px;height:42px;text-align:left;z-index:10;">
<font style="font-size:11px" color="#000000" face="Georgia">All Rights Reserved Wszelkie Prawa Zastrzezone by <a href="http://mcncc.pl">mcncc.pl</a><br>
                           Copyright Mateusz Socko v0.1</font></div>
</div>
</body>
</html>

 

 

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...