Hallo,
Ich habe ein addon für meinen Clan zum Bannertauschen!
Wenn ich jetzt aber einen Hinzufügen möchte kommt folgender Fehler:
http://www.tft-multigaming.de/index.php?site=bannertausch_add
Es ist verzerrt und es Wird nichts angezeigt!
Nun möchte ich euch um Hilfe bitten um den Fehler zu finden:
Hier der Code:
Es ist außerdem für Webspell
Ich habe ein addon für meinen Clan zum Bannertauschen!
Wenn ich jetzt aber einen Hinzufügen möchte kommt folgender Fehler:
http://www.tft-multigaming.de/index.php?site=bannertausch_add
Es ist verzerrt und es Wird nichts angezeigt!
Nun möchte ich euch um Hilfe bitten um den Fehler zu finden:
Hier der Code:
PHP:
<?php
/*
########################################################################
# #
# Version 4 / / / #
# -----------__---/__---__------__----__---/---/- #
# | /| / /___) / ) (_ ` / ) /___) / / #
# _|/_|/__(___ _(___/_(__)___/___/_(___ _/___/___ #
# Free Content / Management System #
# / #
# #
# #
# Copyright 2005-2006 by webspell.org / webspell.info #
# #
# visit webSPELL.org, webspell.info to get webSPELL for free #
# - Script runs under the GNU GENERAL PUBLIC LICENCE #
# - It's NOT allowed to remove this copyright-tag #
# -- http://www.fsf.org/licensing/licenses/gpl.html #
# #
# Code based on WebSPELL Clanpackage (Michael Gruber - webspell.at), #
# Far Development by Development Team - webspell.org / webspell.info #
# #
# visit webspell.org / webspell.info #
# #
# visit www.webspell.de for addons #
# #
########################################################################
*/
//register_globals = off
$name = $_POST['name'];
$websiteadresse = $_POST['websiteadresse'];
$banneradresse =$_POST['banneradresse'];
$email = $_POST['email'];
$claninfo = $_POST['claninfo'];
// prüfung username
$ergebnis = safe_query("SELECT * FROM ".PREFIX."bannertausch WHERE name = '$name' ");
$num = mysql_num_rows($ergebnis);
if($num) $error[]="Clanname wird bereits verwendet!";
// activation key
if ($email_activation) {
$activation_key = '';
for($i=1; $i<=15; $i++) {
switch(mt_rand(0,1)) {
case 0: $activation_key .= chr(mt_rand(65,90)); break;
case 1: $activation_key .= strtolower(chr(mt_rand(65,90))); break;
}
}
} else {
$activation_key = '';
}
if(is_array($error)) {
echo'<b>Es sind einige Probleme aufgetreten!</b><br><br>';
foreach($error as $err) {
echo'<li>'.$err.'</li>';
}
echo'<br><br><input type="button" class="button" onClick="javascript:history.back()" value="zurück">';
}
else {
// insert in db
safe_query("INSERT INTO ".PREFIX."bannertausch (name, websiteadresse, banneradresse, email, claninfo)
values('$name', '$websiteadresse', '$banneradresse', '$email', '$claninfo')");
if($email_activation) {
// mail an user
$ToEmail = $email;
$ToName = $name;
$header = "Bannertausch Informationen: ".PAGETITLE;
$Message = 'Bannertausch Informationen
Ihre Eingabe war erfolgreich.
Bitte verlinkt uns jetzt auch!
Vielen Dank für Ihren Eintrag.
Bevor Sie sich einloggen können, haben Sie Ihren Account zu aktivieren.
Dies können Sie hier tun: http://'.$hp_url.'?site=bannertausch&activation_key='.$activation_key.'
'.PAGETITLE.' - '.$hp_url;
if(mail($ToEmail,$header, $Message, "Von:".$admin_email."\r\nX-Mailer: PHP/" . phpversion())) echo'Ihre Bannertausch-Anmeldung war erfolgreich,<br> Sie werden gleich eine Informationsmail erhalten.<meta http-equiv="refresh" content="5;URL=index.php?site=bannertausch">';
else 'Nachricht konnte nicht versendet werden. Bitte kontaktieren Sie den Webmaster.
<meta http-equiv="refresh" content="3;URL=index.php?site=bannertausch_add">';
} else {
// mail an user
$ToEmail = $email;
$ToName = $name;
$header = "Bannertausch Informationen: ".PAGETITLE;
$Message = 'Bannertausch Informationen
Ihre Eingabe war erfolgreich.
Bitte verlinkt uns jetzt auch!
Vielen Dank für Ihren Eintrag
'.PAGETITLE.' - '.$hp_url;
if(mail($ToEmail,$header, $Message, "Von:".$admin_email."\r\nX-Mailer: PHP/" . phpversion())) echo'Ihre Bannertausch-Anmeldung war erfolgreich,<br> Sie werden gleich eine Informationsmail erhalten.<meta http-equiv="refresh" content="5;URL=index.php?site=bannertausch">';
else 'Nachricht konnte nicht versendet werden. Bitte kontaktieren Sie den Webmaster.
<meta http-equiv="refresh" content="3;URL=index.php?site=bannertausch_add">';
}
}
else{
echo '<script type="text/javascript">
alert("Ihre Code-Bestätigung ist ungültig!\nBitte versuchen Sie es noch einmal.");
</script>
';
echo '<meta http-equiv="refresh" content="0;URL=index.php?site=bannertausch_add">';
}
else {
if (!is_null($_GET['activation_key'])) {
$activation_key = $_GET['activation_key'];
safe_query("UPDATE ".PREFIX."tausch SET activation_key='' WHERE activation_key='$activation_key'");
echo 'Ihr Account wurde erfolgreich aktiviert.';
} else {
$bg1=BG_1;
$bg2=BG_2;
$bg3=BG_3;
$bg4=BG_4;
$pic_url = $my_captcha->get_pic( 4 );
if($email_activation) $emailinfo=' <i>(zur Banner-Aktivierung notwendig)</i>';
else $emailinfo='';
eval ("\$bannertausch_add = \"".gettemplate("bannertausch_add")."\";");
echo $bannertausch_add;
}
}
if($_POST['save']) {
include("_mysql.php");
include("_settings.php");
include('_functions.php');
if(!ispageadmin($userID)) die('Zugriff verweigert.');
safe_query("INSERT INTO ".PREFIX."linkus ( name ) VALUES( '".$_POST['name']."' ) ");
$id=mysql_insert_id();
$banner = $_FILES['banner'];
$filepath = "./images/linkus/";
if ($banner[name] != "") {
move_uploaded_file($banner[tmp_name], $filepath.$banner[name]);
@chmod($filepath.$banner[name], 0755);
$file_ext=strtolower(substr($banner[name], strrpos($banner[name], ".")));
$file=$id.$file_ext;
if(file_exists($filepath.$file)) @unlink($filepath.$file);
rename($filepath.$banner[name], $filepath.$file);
safe_query("UPDATE ".PREFIX."linkus SET file='$file' WHERE bannerID='$id' ");
}
header("Location: index.php?site=linkus");
}
elseif($_POST['saveedit']) {
include("_mysql.php");
include("_settings.php");
include('_functions.php');
if(!ispageadmin($userID)) die('Zugriff verweigert.');
$date=mktime(0,0,0,$month,$day,$year);
safe_query("UPDATE ".PREFIX."linkus SET name='".$_POST['name']."' WHERE bannerID='".$_POST['bannerID']."'");
$filepath = "./images/linkus/";
$id=$_POST['bannerID'];
$banner = $_FILES[banner];
if ($banner[name] != "") {
move_uploaded_file($banner[tmp_name], $filepath.$banner[name]);
@chmod($filepath.$banner[name], 0755);
$file_ext=strtolower(substr($banner[name], strrpos($banner[name], ".")));
$file=$id.$file_ext;
if(file_exists($filepath.$file)) @unlink($filepath.$file);
rename($filepath.$banner[name], $filepath.$file);
safe_query("UPDATE ".PREFIX."linkus SET file='$file' WHERE bannerID='$id' ");
}
header("Location: index.php?site=linkus");
}
elseif($_GET['delete']) {
include("_mysql.php");
include("_settings.php");
include('_functions.php');
if(!ispageadmin($userID)) die('Zugriff verweigert.');
$bannerID = $_GET['bannerID'];
$filepath = "./images/linkus/";
safe_query("DELETE FROM ".PREFIX."linkus WHERE bannerID='$bannerID'");
if(file_exists($filepath.$bannerID.'.jpg')) @unlink($filepath.$bannerID.'.jpg');
if(file_exists($filepath.$bannerID.'.gif')) @unlink($filepath.$bannerID.'.gif');
header("Location: index.php?site=linkus");
}
eval ("\$title_tauschbanner = \"".gettemplate("title_tauschbanner")."\";");
echo $title_tauschbanner;
if($_GET['action']=="new") {
if(ispageadmin($userID)) {
$bg1=BG_1;
eval ("\$linkus_new = \"".gettemplate("linkus_new")."\";");
echo $linkus_new;
}
else redirect('index.php?site=linkus', 'Zugriff verweigert!');
}
elseif($_GET['action']=="edit") {
if(ispageadmin($userID)) {
$bannerID = $_GET['bannerID'];
$ds=mysql_fetch_array(safe_query("SELECT * FROM ".PREFIX."linkus WHERE bannerID='$bannerID'"));
$name=$ds[name];
$banner='<img src="http://www.tutorials.de/forum/images/linkus/'.$ds[file].'">';
$bg1=BG_1;
eval ("\$linkus_edit = \"".gettemplate("linkus_edit")."\";");
echo $linkus_edit;
}
else redirect('index.php?site=linkus', 'Zugriff verweigert!');
}
else {
$filepath = "./images/linkus/";
$filepath2 = "/images/linkus/";
if(ispageadmin($userID)) echo'<input type="button" class="button" onClick="MM_goToURL(\'parent\',\'index.php?site=linkus&action=new\');return document.MM_returnValue" value="Banner hinzufügen"><br><br>';
$ergebnis=safe_query("SELECT * FROM ".PREFIX."linkus ORDER BY name");
if(mysql_num_rows($ergebnis)) {
$i=1;
while($ds=mysql_fetch_array($ergebnis)) {
if($i%2) $bg1=BG_1;
else $bg1=BG_2;
$name=$ds[name];
$fileinfo=getimagesize($filepath.$ds[file]);
if($fileinfo[0]>$picsize_l) $width=' width="'.$picsize_l.'"';
else $width='';
if($fileinfo[1]>$picsize_h) $height=' height="'.$picsize_h.'"';
else $height='';
$banner='<img src="'.$filepath.$ds[file].'" border="0"'.$width.$height.'>';
$code = '<a href="http://'.$hp_url.'" target="_blank"><img src="http://'.$hp_url.$filepath2.$ds[file].'" border="0" alt="'.$myclantag.'"></a>';
if(isclanwaradmin($userID))
$adminaction='<hr noshade size="1" color="'.BORDER.'"><input type="button" class="button" onClick="MM_goToURL(\'parent\',\'index.php?site=linkus&action=edit&bannerID='.$ds[bannerID].'\');return document.MM_returnValue" value="bearbeiten">
<input type="button" class="button" onClick="MM_confirm(\'Diesen Banner wirklich entfernen?\', \'linkus.php?delete=true&bannerID='.$ds[bannerID].'\')" value="entfernen">';
eval ("\$linkus = \"".gettemplate("linkus")."\";");
echo $linkus;
$i++;
}
}
else echo'Keine Banner vorhanden';
}
?>
Es ist außerdem für Webspell