Kannst du auch selber xD
http://thegear.th.funpic.de/cap/captcha/captcha.php
Moderator: frameguard
Warning: imagettftext(): Could not find/open font in /var/www/s23b224/html/cap/captcha/captcha.php on line 32<?php<?php
function url2link($text, $target = "_blank", $maxchars = 25, $leftchars = 20, $rightchars = 5, $fill = "...") {
return preg_replace("!((http|https|ftp)://[\w\.]{2,}[/\w\-\.\?\&\=\#\:]*[/\w\-\?\&\=\#\:]{1,})!e",
"'<a href=\"\\1\" target=\"$target\" title=\"\\1\">'
.(strlen('\\1')>=$maxchars ? substr('\\1',0,$leftchars).'$fill'.substr('\\1',strlen('\\1')-$rightchars,$rightchars):'\\1').'</a>'", $text);
}
echo url2link($thetext)
?>
<?php require_once('../../Connections/testverbindung.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO guestbook (name, entry, email, hompage) VALUES (%s, %s, %s, %s)",
GetSQLValueString($_POST['name'], "text"),
GetSQLValueString($_POST['entry'], "text"),
GetSQLValueString($_POST['email'], "text"),
GetSQLValueString($_POST['hompage'], "text"));
mysql_select_db($database_testverbindung, $testverbindung);
$Result1 = mysql_query($insertSQL, $testverbindung) or die(mysql_error());
$insertGoTo = "../the_blogs/stefan.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
mysql_select_db($database_testverbindung, $testverbindung);
$query_stefan_guestbook = "SELECT * FROM guestbook ORDER BY ID DESC";
$stefan_guestbook = mysql_query($query_stefan_guestbook, $testverbindung) or die(mysql_error());
$row_stefan_guestbook = mysql_fetch_assoc($stefan_guestbook);
$totalRows_stefan_guestbook = mysql_num_rows($stefan_guestbook);
mysql_select_db($database_testverbindung, $testverbindung);
$query_links = "SELECT * FROM links ORDER BY links ASC";
$links = mysql_query($query_links, $testverbindung) or die(mysql_error());
$row_links = mysql_fetch_assoc($links);
$totalRows_links = mysql_num_rows($links);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/master.dwt" codeOutsideHTMLIsLocked="false" -->
<head><meta name="Keywords" content="blogs deR_onny Halle/Saale Halle (Saale) Webdesign Web Design Academic Texts Papers " />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>slick visual poetry</title>
<script type="text/javascript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<meta name="Keywords" content="Halle Saale Halle/Saale (Saale) Webdesign Web Design Blog" />
<link href="../../svp.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
#blende_links {
position:absolute;
left:848px;
top:557px;
width:221px;
height:17px;
z-index:501;
background-color: #FFFFFF;
}
.Stil4 {font-size: 12}
.Stil5 {font-size: 12px}
-->
</style>
</head>
<body onload="MM_preloadImages('../pics/blogs_hover.png')">
<div id="navigation">
<p class="Stil5"><span class="Stil2"><a href="../../index.php" target="_self" class="Stil17" onmouseover="MM_swapImage('Image12','','../pics/blogs_hover.png',1)" onmouseout="MM_swapImgRestore()">home<br />
</a><a href="../academic/academic_texts.php" target="_self" class="Stil17" onmouseover="MM_swapImage('Image7','','../pics/studies_hover.png',1)" onmouseout="MM_swapImgRestore()">academic texts<br />
</a><a href="../admin_surface/log_in.php" target="_self" onmouseover="MM_swapImage('Image11','','../pics/member_hover.png',1)" onmouseout="MM_swapImgRestore()">members' login<br />
</a><a href="../portfolio.html" target="_blank">portfolio <br />
</a><a href="../youtubes.php" target="_self">favourite youTubes<br />
</a></span><a href="../music/slick-visual-music.html" target="_self" class="Stil2">music<br />
</a><a href="../disclaimer.php" target="_self" class="Stil2">disclaimer</a></p>
</div>
<div id="blende_links"></div>
<p> </p>
<div class="Stil23" id="link_header">
<p class="Stil25">hyperlinks 2 love <br />
<span class="Stil4"><br />
We hope you will like he following links: </span></p>
</div>
<p> </p>
<div id="nfo"><!-- InstanceBeginEditable name="entry" --><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image13','','../pics/ronnys_blog_hover.png',1)"></a>
<p style="font-size: 14px; font-family: Geneva, Arial, Helvetica, sans-serif; color: #E0DFE3"><a href="../the_blogs/ronny.php" target="_self" style="font-weight: bold">ronny's blog</a></p>
<p style="font-size: 14px; font-family: Geneva, Arial, Helvetica, sans-serif; color: #E0DFE3"><a href="../the_blogs/stefan.php" target="_self" style="font-weight: bold">stefan's blog</a></p>
<!-- InstanceEndEditable -->
<p><span class="Stil17"><span class="Stil25 Stil20"><strong>designed for:</strong></span><br />
</span><a href="http://www.opera.com/download/" target="_blank"><img src="../pics/opera.png" alt="opera" width="30" height="30" /></a><a href="http://filehippo.com/download_firefox/" target="_blank"> <img src="../pics/firefox.png" alt="firefox" width="30" height="30" /><br />
</a><span class="Stil17"><span class="Stil18"><span class="Stil22"><br />
<span class="Stil25"><strong>visitors:</strong></span></span><br />
</span><a href="http://www.blogcounter.de/" id="bclink" title="kostenloser Counter fuer Weblogs"><span id="bccount" style="font-size:8px">kostenloser Counter</span></a></span>
<script type="text/javascript" src="http://track.blogcounter.de/js.php?user=bloggin_till_infinity&style=1"></script>
</p>
</div>
<div id="header"><!-- InstanceBeginEditable name="what" --><span style="font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 36px; font-weight: bold"><span style="color: #996633">l</span>eave <span style="color: #996633">a</span> <span style="color: #996633">r</span>emark </span><!-- InstanceEndEditable --></div>
<div id="content"><!-- InstanceBeginEditable name="content" -->
<div id="in_content">
<p> </p>
<form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
<table align="left">
<tr valign="baseline">
<td nowrap="nowrap" align="right">name:</td>
<td><input type="text" name="name" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right" valign="top">entry:</td>
<td><textarea name="entry" cols="30" rows="5"></textarea> </td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">email:</td>
<td><input type="text" name="email" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">hompage:</td>
<td><input type="text" name="hompage" value="http://" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">password</td>
<td><input type="text" name="sicherheitscode" size="5"></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"> </td>
<td><img src="../../captcha/captcha.php" alt="captcha" border="0" title="Sicherheitscode" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"> </td>
<td><input name="submit" type="submit" value="Datensatz einfügen" /></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1" />
</form>
<p> </p>
</div>
<!-- InstanceEndEditable --></div>
<div id="what"><!-- InstanceBeginEditable name="what_is_it?" --><span style="font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 16px; font-weight: bold; color: #666666">back to:</span> <!-- InstanceEndEditable --></div>
<div id="hyperlinks"><!-- InstanceBeginEditable name="gals" -->
<table border="0">
<?php do { ?>
<tr>
<td><?php echo url2link ($row_links['links']); ?></td>
</tr>
<?php } while ($row_links = mysql_fetch_assoc($links)); ?>
</table>
<!-- InstanceEndEditable --></div>
</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result($stefan_guestbook);
mysql_free_result($links);
?><? php session_start();
function encrypt($string, $key)
{
$result = '';
for($i=0; $i<strlen($string); $i++)
{
$char = substr($string, $i, 1);
$keychar = substr($key, ($i % strlen($key))-1, 1);
$char = chr(ord($char)+ord($keychar));
$result.=$char;
}
return base64_encode($result);
}
$sicherheits_eingabe = encrypt($_POST["sicherheitscode"], '8t3479u97'); // key sollte ident sein mit captcha.php
$sicherheits_eingabe = str_replace("=", "", $sicherheits_eingabe);
if(isset($_SESSION['captcha_spam']) && $sicherheits_eingabe == $_SESSION['captcha_spam'])
{
unset($_SESSION['captcha_spam']);
}
else
{
die("Falscher Sicherheitscode!");
}$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO guestbook (name, entry, email, hompage) VALUES (%s, %s, %s, %s)",
GetSQLValueString($_POST['name'], "text"),
GetSQLValueString($_POST['entry'], "text"),
GetSQLValueString($_POST['email'], "text"),
GetSQLValueString($_POST['hompage'], "text"));
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if(isset($_SESSION['captcha_spam']) && $sicherheits_eingabe == $_SESSION['captcha_spam'])
{
unset($_SESSION['captcha_spam']);
}
else
{
die("Falscher Sicherheitscode!");
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO guestbook (name, entry, email, hompage) VALUES (%s, %s, %s, %s)",
GetSQLValueString($_POST['name'], "text"),
GetSQLValueString($_POST['entry'], "text"),
GetSQLValueString($_POST['email'], "text"),
GetSQLValueString($_POST['hompage'], "text"));
frameguard hat geschrieben:Eine Möglichkeit fällt mir dazu noch ein. Im Codeteil:$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO guestbook (name, entry, email, hompage) VALUES (%s, %s, %s, %s)",
GetSQLValueString($_POST['name'], "text"),
GetSQLValueString($_POST['entry'], "text"),
GetSQLValueString($_POST['email'], "text"),
GetSQLValueString($_POST['hompage'], "text"));
könntest Du das IF vom Captcha direkt zwischen die beiden If's setzen:$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if(isset($_SESSION['captcha_spam']) && $sicherheits_eingabe == $_SESSION['captcha_spam'])
{
unset($_SESSION['captcha_spam']);
}
else
{
die("Falscher Sicherheitscode!"); // sofortige Meldung: falscher Sicherheitscode bei Seitenvorschau
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO guestbook (name, entry, email, hompage) VALUES (%s, %s, %s, %s)",
GetSQLValueString($_POST['name'], "text"),
GetSQLValueString($_POST['entry'], "text"),
GetSQLValueString($_POST['email'], "text"),
GetSQLValueString($_POST['hompage'], "text"));
<?php
function url2link($text, $target = "_blank", $maxchars = 25, $leftchars = 20, $rightchars = 5, $fill = "...") {
return preg_replace("!((http|https|ftp)://[\w\.]{2,}[/\w\-\.\?\&\=\#\:]*[/\w\-\?\&\=\#\:]{1,})!e",
"'<a href=\"\\1\" target=\"$target\" title=\"\\1\">'
.(strlen('\\1')>=$maxchars ? substr('\\1',0,$leftchars).'$fill'.substr('\\1',strlen('\\1')-$rightchars,$rightchars):'\\1').'</a>'", $text);
}
echo url2link($thetext)
?>
<?php require_once('../../Connections/testverbindung.php'); ?>
<?php session_start();
function encrypt($string, $key)
{
$result = '';
for($i=0; $i<strlen($string); $i++)
{
$char = substr($string, $i, 1);
$keychar = substr($key, ($i % strlen($key))-1, 1);
$char = chr(ord($char)+ord($keychar));
$result.=$char;
}
return base64_encode($result);
}
$sicherheits_eingabe = encrypt($_POST["sicherheitscode"], '8t3479u97'); // key sollte ident sein mit captcha.php
$sicherheits_eingabe = str_replace("=", "", $sicherheits_eingabe);
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
// nach Eingabe von richtigem/falschen Sicherheitscode stets Anzeige "falscher Sicherheitscode", kein Eintrag ins GB
return $theValue;
}
//"falscher Sicherheitscode" läd sofort
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}// sofortige Meldung: falscher Sicherheitscode bei Seitenvorschau
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO guestbook (name, entry, email, hompage) VALUES (%s, %s, %s, %s)",
GetSQLValueString($_POST['name'], "text"),
GetSQLValueString($_POST['entry'], "text"),
GetSQLValueString($_POST['email'], "text"),
GetSQLValueString($_POST['hompage'], "text"));
mysql_select_db($database_testverbindung, $testverbindung);
$Result1 = mysql_query($insertSQL, $testverbindung) or die(mysql_error());
$insertGoTo = "../the_blogs/stefan.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
// "falscher Sicherheitscode" wird angezeigt, aber Eintragung erfolgt trotzdem (auch ohne code)
header(sprintf("Location: %s", $insertGoTo));
}
//"falscher Sicherheitscode" läd als erstes bei Seitenvorschau
mysql_select_db($database_testverbindung, $testverbindung);
$query_stefan_guestbook = "SELECT * FROM guestbook ORDER BY ID DESC";
$stefan_guestbook = mysql_query($query_stefan_guestbook, $testverbindung) or die(mysql_error());
$row_stefan_guestbook = mysql_fetch_assoc($stefan_guestbook);
$totalRows_stefan_guestbook = mysql_num_rows($stefan_guestbook);
// auch wenn es unwahrscheinlich schien habe ich es auch mal hier versucht. Auch ohne Erfolg:es wurde gleich bei Voschau "falscher Sicherheitscode" angezeigt.
mysql_select_db($database_testverbindung, $testverbindung);
$query_links = "SELECT * FROM links ORDER BY links ASC";
$links = mysql_query($query_links, $testverbindung) or die(mysql_error());
$row_links = mysql_fetch_assoc($links);
$totalRows_links = mysql_num_rows($links);
?><?php
session_start();
error_reporting(E_ALL);
function [...]Mitglieder in diesem Forum: 0 Mitglieder und 0 Gäste