Schmakus
29.05.2009, 12:12
Hallo!
Ich habe nun schon tausend - naja nicht gerade tausend - scripte versucht in mein php sript einzufügen, aber es will nicht klappen ein Captcha reinzubekommen!
Mein PHP Script habe ich vor langen von einem Bekannten programmieren lassen, der für mich aber momentan nicht greifbar ist!
Kann mit jemand einen Spamschutz in mein Script einbauen oder hat jemand einen Tip? :confused:? Meine Bilder werden mit hunderten Einträge zugemüllt :skull::skull:!
Hier das Script:
<?php include "include/header.php"; ?>
<!--Tabelle Oben-->
<tr>
<td height="104" colspan="2" align="right" class="head"><img src="gfx/media_pics.gif" class="head"></td>
</tr>
<!--Tabelle Mitte-->
<tr>
<td colspan="2" class="mitte">
<!-- Eingabe Bereich -->
<table>
<tr>
<td class="mittenews">
<!-- Übersicht News-Einträge -->
<div class="newshead">
<table border="0" cellspacing="0">
<!-- Anzeige Galerieinhalt (Pics) -->
<?php
// Einstellungen
$path_galeries="galeries/"; // unbedingt mit einem Backslash am Ende!!!
$dirname_thumbs="thumbs";
$picsperrow=3;
$settings["mysql_user"]="user";
$settings["mysql_password"]="pass";
$settings["mysql_database"]="database";
$settings["mysql_table"]="table";
// =============
include("include/smilies.inc.php");
$connection=mysql_connect("localhost",$settings["mysql_user"],$settings["mysql_password"]);
$firstPic="";
if(isset($_GET["galerie"]) && !empty($_GET["galerie"])) { $path_galeries=$_GET["galerie"]."/"; }
$verzeichnis=opendir($path_galeries);
$eintrag=readdir($verzeichnis);
$eintrag=readdir($verzeichnis);
$eintrag=readdir($verzeichnis);
if(isset($_GET["galerie"]) && !empty($_GET["galerie"])) {
if(stristr($eintrag,"jpg") || stristr($eintrag,"jpeg")) {
$firstPic=$eintrag;
}
$rowZZ=1;
echo "<a href=\"pics.php\">Übersicht</a><br /><br />";
echo "<font class=\"pichead\"></div><b>".$_GET["datum"]."</b> :: ".$_GET["title"]." </font><table cellspacing=\"1\"><tr>";
while($eintrag) {
if(stristr($eintrag,"jpg") || stristr($eintrag,"jpeg")) {
$SQLstring="SELECT ID: [ID filtered]
$SQLresult = mysql_db_query($settings["mysql_database"], $SQLstring, $connection);
$comments=mysql_num_rows($SQLresult);
echo "<td align=\"center\"><a href=\"showpic.php?pic=".$eintrag."&galerie=".$_GET["galerie"]."&datum=".$_GET["datum"]."&title=".$_GET["title"]."\"><img src=\"".$path_galeries.$dirname_thumbs."/".$eintrag."\" witdh=\"60\" alt=\"\" class=\"thump\" /></a><br />";
if($comments!=0) { echo "(".$comments.")"; }
echo "</td><td></td>";
if($rowZZ>=$picsperrow) { echo "</tr><tr>"; $rowZZ=1; } else { $rowZZ++; }
}
$eintrag=readdir($verzeichnis);
}
echo "</tr></table>";
} else {
?>
<script language="JavaScript">
document.location.href="pics.php";
</script>
<?php
}
?>
</td>
</div></td>
<td style="width:5px;"> *</td>
<td class="mittenews1">
<div class="news">
<!-- Anzeige Pic groß -->
<?php
// Neuer Kommentar eintragen
if($_POST["scriptaction"]=="Hinzufügen") {
$SQLstring="INSERT INTO ".$settings["mysql_table"]." (path,comment,comment_name,comment_time) VALUES ('".$_GET["galerie"]."/".$_POST["pic"]."','".$_POST["commentText"]."','".$_POST["commentName"]."','".time()."')";
$SQLresult = mysql_db_query($settings["mysql_database"], $SQLstring, $connection);
}
// Ausgabe Bild & Kommentare
if(!empty($_POST["pic"])) { $_GET["pic"]=$_POST["pic"]; }
if(empty($_GET["pic"])) { $_GET["pic"]=$firstPic; }
if(!empty($_GET["pic"])) {
echo "<div class=\"notrans\"><a href=\"".$_GET["galerie"]."/".$_GET["pic"]."\" rel=\"lightbox\"><img src=\"".$_GET["galerie"]."/".$_GET["pic"]."\" width=\"265\" align=\"center\" alt=\"\" class=\"piclinks\"/></a></div><br /><table>";
$SQLstring="SELECT * FROM ".$settings["mysql_table"]." WHERE path='".$_GET["galerie"]."/".$_GET["pic"]."' ORDER BY ID: [ID filtered]
$SQLresult = mysql_db_query($settings["mysql_database"], $SQLstring, $connection);
$data=mysql_fetch_object($SQLresult);
while($data) {
echo "<tr><td><b>".$data->comment_name."</b> schrieb am ".date("d.m.Y",$data->comment_time).":</td></tr>";
echo "<tr><td><i>".smilieReplace(0,$data->comment)."</i></td></tr>";
echo "<tr><td>*</td></tr>";
$data=mysql_fetch_object($SQLresult);
}
echo "</table>";
echo "<form action=\"showpic.php?pic=".$_GET["pic"]."&galerie=".$_GET["galerie"]."&datum=".$_GET["datum"]."&title=".$_GET["title"]."\" method=\"post\" name=\"commentForm\"> <input type=\"hidden\" name=\"pic\" value=\"".$_GET["pic"]."\" />";
?>
<b>Neuer Kommentar...</b>
<table>
<tr>
<td>Name:</td>
<td><input type="text" name="commentName" value="" size="23" maxlength="255" /></td>
</tr>
<tr>
<td>Kommentar:</td>
<td><textarea name="commentText" cols="21" rows="3"></textarea></td>
</tr>
<tr>
<td></td>
<td><?php echo smilieMenue(8,0,2); ?></td>
</tr>
<tr>
<td colspan="2" align="right"><input type="submit" name="scriptaction" value="Hinzufügen" /></td>
</tr>
</table>
</form>
<?php } ?>
</div></td>
</tr>
</table>
<!-- Eingabe Bereich Ende -->
</td>
</tr>
<?php include "include/footer.php"; ?>
Danke im Voraus!
Ich habe nun schon tausend - naja nicht gerade tausend - scripte versucht in mein php sript einzufügen, aber es will nicht klappen ein Captcha reinzubekommen!
Mein PHP Script habe ich vor langen von einem Bekannten programmieren lassen, der für mich aber momentan nicht greifbar ist!
Kann mit jemand einen Spamschutz in mein Script einbauen oder hat jemand einen Tip? :confused:? Meine Bilder werden mit hunderten Einträge zugemüllt :skull::skull:!
Hier das Script:
<?php include "include/header.php"; ?>
<!--Tabelle Oben-->
<tr>
<td height="104" colspan="2" align="right" class="head"><img src="gfx/media_pics.gif" class="head"></td>
</tr>
<!--Tabelle Mitte-->
<tr>
<td colspan="2" class="mitte">
<!-- Eingabe Bereich -->
<table>
<tr>
<td class="mittenews">
<!-- Übersicht News-Einträge -->
<div class="newshead">
<table border="0" cellspacing="0">
<!-- Anzeige Galerieinhalt (Pics) -->
<?php
// Einstellungen
$path_galeries="galeries/"; // unbedingt mit einem Backslash am Ende!!!
$dirname_thumbs="thumbs";
$picsperrow=3;
$settings["mysql_user"]="user";
$settings["mysql_password"]="pass";
$settings["mysql_database"]="database";
$settings["mysql_table"]="table";
// =============
include("include/smilies.inc.php");
$connection=mysql_connect("localhost",$settings["mysql_user"],$settings["mysql_password"]);
$firstPic="";
if(isset($_GET["galerie"]) && !empty($_GET["galerie"])) { $path_galeries=$_GET["galerie"]."/"; }
$verzeichnis=opendir($path_galeries);
$eintrag=readdir($verzeichnis);
$eintrag=readdir($verzeichnis);
$eintrag=readdir($verzeichnis);
if(isset($_GET["galerie"]) && !empty($_GET["galerie"])) {
if(stristr($eintrag,"jpg") || stristr($eintrag,"jpeg")) {
$firstPic=$eintrag;
}
$rowZZ=1;
echo "<a href=\"pics.php\">Übersicht</a><br /><br />";
echo "<font class=\"pichead\"></div><b>".$_GET["datum"]."</b> :: ".$_GET["title"]." </font><table cellspacing=\"1\"><tr>";
while($eintrag) {
if(stristr($eintrag,"jpg") || stristr($eintrag,"jpeg")) {
$SQLstring="SELECT ID: [ID filtered]
$SQLresult = mysql_db_query($settings["mysql_database"], $SQLstring, $connection);
$comments=mysql_num_rows($SQLresult);
echo "<td align=\"center\"><a href=\"showpic.php?pic=".$eintrag."&galerie=".$_GET["galerie"]."&datum=".$_GET["datum"]."&title=".$_GET["title"]."\"><img src=\"".$path_galeries.$dirname_thumbs."/".$eintrag."\" witdh=\"60\" alt=\"\" class=\"thump\" /></a><br />";
if($comments!=0) { echo "(".$comments.")"; }
echo "</td><td></td>";
if($rowZZ>=$picsperrow) { echo "</tr><tr>"; $rowZZ=1; } else { $rowZZ++; }
}
$eintrag=readdir($verzeichnis);
}
echo "</tr></table>";
} else {
?>
<script language="JavaScript">
document.location.href="pics.php";
</script>
<?php
}
?>
</td>
</div></td>
<td style="width:5px;"> *</td>
<td class="mittenews1">
<div class="news">
<!-- Anzeige Pic groß -->
<?php
// Neuer Kommentar eintragen
if($_POST["scriptaction"]=="Hinzufügen") {
$SQLstring="INSERT INTO ".$settings["mysql_table"]." (path,comment,comment_name,comment_time) VALUES ('".$_GET["galerie"]."/".$_POST["pic"]."','".$_POST["commentText"]."','".$_POST["commentName"]."','".time()."')";
$SQLresult = mysql_db_query($settings["mysql_database"], $SQLstring, $connection);
}
// Ausgabe Bild & Kommentare
if(!empty($_POST["pic"])) { $_GET["pic"]=$_POST["pic"]; }
if(empty($_GET["pic"])) { $_GET["pic"]=$firstPic; }
if(!empty($_GET["pic"])) {
echo "<div class=\"notrans\"><a href=\"".$_GET["galerie"]."/".$_GET["pic"]."\" rel=\"lightbox\"><img src=\"".$_GET["galerie"]."/".$_GET["pic"]."\" width=\"265\" align=\"center\" alt=\"\" class=\"piclinks\"/></a></div><br /><table>";
$SQLstring="SELECT * FROM ".$settings["mysql_table"]." WHERE path='".$_GET["galerie"]."/".$_GET["pic"]."' ORDER BY ID: [ID filtered]
$SQLresult = mysql_db_query($settings["mysql_database"], $SQLstring, $connection);
$data=mysql_fetch_object($SQLresult);
while($data) {
echo "<tr><td><b>".$data->comment_name."</b> schrieb am ".date("d.m.Y",$data->comment_time).":</td></tr>";
echo "<tr><td><i>".smilieReplace(0,$data->comment)."</i></td></tr>";
echo "<tr><td>*</td></tr>";
$data=mysql_fetch_object($SQLresult);
}
echo "</table>";
echo "<form action=\"showpic.php?pic=".$_GET["pic"]."&galerie=".$_GET["galerie"]."&datum=".$_GET["datum"]."&title=".$_GET["title"]."\" method=\"post\" name=\"commentForm\"> <input type=\"hidden\" name=\"pic\" value=\"".$_GET["pic"]."\" />";
?>
<b>Neuer Kommentar...</b>
<table>
<tr>
<td>Name:</td>
<td><input type="text" name="commentName" value="" size="23" maxlength="255" /></td>
</tr>
<tr>
<td>Kommentar:</td>
<td><textarea name="commentText" cols="21" rows="3"></textarea></td>
</tr>
<tr>
<td></td>
<td><?php echo smilieMenue(8,0,2); ?></td>
</tr>
<tr>
<td colspan="2" align="right"><input type="submit" name="scriptaction" value="Hinzufügen" /></td>
</tr>
</table>
</form>
<?php } ?>
</div></td>
</tr>
</table>
<!-- Eingabe Bereich Ende -->
</td>
</tr>
<?php include "include/footer.php"; ?>
Danke im Voraus!