Bekomm es nicht hin.

Hier werden Probleme rund um das Zahlen Captcha behandelt

Moderator: frameguard

Bekomm es nicht hin.

Beitragvon macom » 17.01.2007, 19:35

Habs mit dem rechencode versucht und konnte aber ohne das ich was eingeben habe einen eintrag ins gästebuch machen. Kann mir jemand helfen wie ich das einzuügen habe

neu.html
Code: Alles auswählen
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
   <title>Gästebuch - Neuer Eintrag</title>
   <link rel="STYLESHEET" type="text/css" href="style.css">
   <script language="JavaScript">
      function CheckForm() {
         if (document.newentry.fname.value == "") {
            alert ("Bitte den Namen eingeben!");
            document.newentry.fname.focus();
            return false;
         }
         if (document.newentry.fmail.value == "") {
            alert ("Bitte die E-Mailadresse eingeben!");
            document.newentry.fmail.focus();
            return false;
         }
      }
      
      function ViewBig(wname,theFile) {
         wname = window.open(theFile,"Hilfe","width=250,height=475,scrollbars");
         wname.focus();
      }   
   </script>


<body bgcolor="#ffffff">
   <table cellpadding="0" cellspacing="0" border="0" width="75%" align="center">
   <tr>
      <td colspan="3" class="wag"><img src="images/pixel.gif" width="1" height="1" alt="" border="0"></td>
   </tr>
   <tr>
      <td class="wag"><img src="images/pixel.gif" width="1" height="1" alt="" border="0"></td>
      <td align="center" valign="middle" width="100%"><h1>Neuer Eintrag</h1></td>
      <td class="wag"><img src="images/pixel.gif" width="1" height="1" alt="" border="0"></td>
   </tr>
   <tr>
      <td colspan="3" class="wag"><img src="images/pixel.gif" width="1" height="1" alt="" border="0"></td>
   </tr>
   </table>

   <form action="neu.php" method="post" name="newentry" onSubmit="return CheckForm();" enctype="multipart/form-data">
   <input type="hidden" name="MAX_FILE_SIZE" value="100000">
   <p>
   <table cellpadding="0" cellspacing="0" border="0" width="75%" align="center">
   <tr>
      <td colspan="4" class="wag"><img src="images/pixel.gif" width="1" height="1" alt="" border="0"></td>
   </tr>
   <tr>
      <td class="wag" width="1"><img src="images/pixel.gif" width="1" height="1" alt="" border="0"></td>
   <td colspan="2"><table cellpadding="0" cellspacing="0" border="0" width="52%" align="center">
<tr>
<td colspan="3"><img src="images/pixel.gif" width="1" height="5" alt="" border="0"></td>
</tr>
<tr>
<td width="13%" align="right" class="label">Name</td>
<td width="4%">&nbsp;</td>
<td width="58%"><input name="fname" size="40"></td>
</tr>
<tr>
<td colspan="3"><img src="images/pixel.gif" width="1" height="5" alt="" border="0"></td>
</tr>
<tr>
<td class="label" align="right">E-Mail</td>
<td>&nbsp;</td>
<td><input name="fmail" size="40"></td>
</tr>
<tr>
<td colspan="3"><img src="images/pixel.gif" width="1" height="5" alt="" border="0"></td>
</tr>
<tr>
<td class="label" align="right">Homepage</td>
<td>&nbsp;</td>
<td><input name="furl" size="40"></td>
</tr>
<tr>
<td colspan="3"><img src="images/pixel.gif" width="1" height="5" alt="" border="0"></td>
</tr>
<tr>
<td class="label" align="right">Überschrift</td>
<td>&nbsp;</td>
<td><input name="fthema" size="40"></td>
</tr>
<tr>
<td colspan="3"><img src="images/pixel.gif" width="1" height="5" alt="" border="0"></td>
</tr>
<tr>
<td class="label" align="right">Bild</td>
<td>&nbsp;</td>
<td><p>
<input name="fbild" type="file">
</p></td>
</tr>
<tr>
<td colspan="3"><img src="images/pixel.gif" width="1" height="5" alt="" border="0"></td>
</tr>

<td height="19">
<tr>
<td class="label" align="right">&nbsp;</td>
<td>&nbsp;</td>
<td class="message">Es werden nur Bilder von maximal 100kB Gr&ouml;&szlig;e vom
Typ gif/jpg/png angenommen</td>
</tr>
<tr>
<td colspan="3"><img src="images/pixel.gif" width="1" height="5" alt="" border="0"></td>
</tr>
<tr>
<td height="83" align="right" class="label">Beitrag<br>
<br>
<div align="center"> <a href="javascript:ViewBig('Pizza','hilfe.htm')"><img src="smileys/smiley1.gif" width="12" height="12" border="0"></a> <br>
<a href="javascript:ViewBig('Pizza','hilfe.htm')"><font size="-2">Smileys</font></a></div></td>
<td>&nbsp;</td>
<td><p>
<textarea name="ftext" cols="38" rows="10"></textarea>

<td width="7%">&nbsp;</td>
<td width="15%">&nbsp;</td>

<td width="1%">&nbsp;</td>
<td width="1%">&nbsp;</td><td width="1%"></p>
<p align="center">
<tr>
<td colspan="2">&nbsp;</td>
</tr>

<p></p>
<tr>
<td colspan="3"><img src="images/pixel.gif" width="1" height="5" alt="" border="0"></td>
</tr>
</table>
<p align="center"><tr>
<td>&nbsp;</td>
<td><div align="center"></div></td>
</tr><tr><td class="wag" width="1">&nbsp;</td>
   </tr>
   <tr>
      <td class="wag" width="1"><div align="center"><img src="images/pixel.gif" width="1" height="1" alt="" border="0"></div></td>
      <td align="center"><div align="center">
<input type="Submit" value="Senden">
</div>
</form></td>
      <td align="center"><form name="fansehen" action="ansehen.php" method="get">
               <input type="submit" value="Abbrechen">
               </form></td>
      <td class="wag" width="1"><img src="images/pixel.gif" width="1" height="1" alt="" border="0"></td>
   </tr>
   <tr>
      <td colspan="4" class="wag"><img src="images/pixel.gif" width="1" height="1" alt="" border="0"></td>
   </tr>
   
</body>
</html>


neu.php
Code: Alles auswählen
<?php

/* ansehen.php */

/* **** Gästebuch 3.0 **** */
/* (c) by Kai Müller, 2002 */
/*    mail@kaimueller.de   */
/* *********************** */

/* Dieses Modul legt neue Beiträge an, */
/* es verwendet neu.htm als Template */


function handleupload($filetype) {
   global $HTTP_POST_FILES;
   global $default_bild;
   global $bilder_pfad;

   if (is_uploaded_file($HTTP_POST_FILES['fbild']['tmp_name'])) {
      $timestamp  = date("Y-m-d-H-i-s");
      switch ($filetype) {
         case "image/gif":
            $endung = "gif";
            break;
         case "image/pjpeg":
            $endung = "jpg";
            break;
         case "image/x-png":
            $endung = "png";
            break;
         default:
            $endung = "none";
            break;
      }
      if ($endung != "none") {
         $realname = "image-".$timestamp.".".$endung;
         if (copy($HTTP_POST_FILES['fbild']['tmp_name'], $bilder_pfad.$realname)) {
            unlink ($HTTP_POST_FILES['fbild']['tmp_name']);
         }
         return $realname;
      }
      else {
         return $default_bild;
      }
   }
   else {
      return $default_bild;
   }
}


include ('base.inc');

if (isset($fname)) {

   $fbild_temp = handleupload($fbild_type);
   if (!(isset($ftext))) $ftext = $default_text;
   else if (($ftext=="")) $ftext = $default_text;
   if (!(isset($fthema))) $fthema = $default_thema;
   else if (($fthema=="")) $fthema = $default_thema;
   if (!(isset($furl))) $furl = $default_url;
   else {
      if (($furl=="")) $furl = $default_url;
      else if (!(eregi("http://",$furl))) $furl = "http://".$furl;
   }
   $jetzt  = date("Y-m-d H-i");
   $ip = getenv ("REMOTE_ADDR");
   $datei = fopen($dateiname,"ab");
   $ftext_temp = input_parser($ftext);
   $fname_temp = input_parser($fname);
   $fthema_temp = input_parser($fthema);
   $server = $SERVER_NAME;
   $tempwriter = $fname_temp.$divider.$fmail.$divider.$jetzt.$divider.$ip.$divider.$furl.$divider.$fthema_temp.$divider.$fbild_temp.$divider.$ftext_temp."\n";
      
   fwrite($datei,$tempwriter);
   fclose($datei);
   if($admin_email) @mail($admin_email, $admin_text, $fname." schrieb am ".$jetzt." auf ".$server.":\nZum Thema: ".$fthema."\nFolgenden Text:\n".$ftext, "From: ".$fmail."\nReply-To:".$fmail."\nX-Mailer: PHP");
      
   defaultform ('neusuccess');
}
else defaultform ('neuerror');

?>
macom
 
Beiträge: 1
Registriert: 17.01.2007, 19:29

Zurück zu Zahlen Captcha

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 0 Gäste

cron