PHP Fehler in der Bannertausch_add

Max791

Grünschnabel
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:

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&uuml;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&uuml;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
 
Allwissend sind wir auch nicht...
Stell mal bitte in der _settings.php das ein:
PHP:
error_reporting(E_ALL ^ E_NOTICE);
Dann sieht man die Fehler :)
 
Code:
Parse error:  parse error, unexpected T_ELSE in webspell/BANNERTAUSCH.php on line 117

Da scheinen mehrere Codeblöcke zu fehlen.
Wo hast du das Script her?
 
Das ist natürlich auch noch dabei! Ich stelle mal das ganze Script rein:

Hier als Download: http://www.fsk-clan-duesseldorf.de/files/bannertausch.rar

Hier die einzelnen Scripts:

Die Bannertausch.php:

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                                  #
#                                                                        #
 ########################################################################
*/

eval ("\$title_bannertausch = \"".gettemplate("title_bannertausch")."\";");
echo $title_bannertausch;

if($tauschID) $only="WHERE tauschID='".$tauschID."'";

$ergebnis=safe_query("SELECT * FROM ".PREFIX."bannertausch ".$only." ORDER BY name");
if(mysql_num_rows($ergebnis)) {
    while($db=mysql_fetch_array($ergebnis)) {
		$banner='<a href="'.$db[websiteadresse].'" target="_blank"><img src="'.$db[banneradresse].'" border="0" alt="'.$db[name].'"></a>';
		
		$name=''.$db[name].'';
		$claninfo=''.$db[claninfo].'';
		
		eval ("\$bannertausch = \"".gettemplate("bannertausch")."\";");
        echo $bannertausch;
	}
}
?>



Die Bannertausch_add.php:
PHP:
<?php
	require_once( 'captcha_functions.php' );
		if (empty($_GET['session_code'])) 
		{ $session_code = md5(round(rand(0,40000))); } 
	else 
		{ $session_code=$_GET['session_code']; }	
	
	$my_captcha = new captcha( $session_code, 'image_temp/' );
/*
 ########################################################################
#                                                                        #
#           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                                  #
#                                                                        #
 ########################################################################
*/

eval ("\$title_bannertausch_add = \"".gettemplate("title_bannertausch_add")."\";");
echo $title_bannertausch_add;

if($_POST['save']) {
	$do = $_GET['do'];
	
	if ($do == 'verify')
	{
		if ($my_captcha->verify( $_POST['password'] ) )
		{

  //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&uuml;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="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&uuml;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';
}

?>


Install.php:

PHP:
<?php
include ("_mysql.php");
mysql_connect($host, $user, $pwd) or die ('FEHLER: Keine Verbindung zu MySQL');
mysql_select_db($db) or die ('FEHLER: Konnte nicht zur Datenbank "'.$db.'" verbinden');

mysql_query("DROP TABLE IF EXISTS ".PREFIX."bannertausch");
mysql_query("CREATE TABLE ".PREFIX."bannertausch (
  tauschID int(11) NOT NULL auto_increment,
  email varchar(255) NOT NULL,
  name varchar(255) NOT NULL,
  banneradresse varchar(255) NOT NULL,
  websiteadresse varchar(255) NOT NULL,
  claninfo varchar(255) NOT NULL,
  PRIMARY KEY  (tauschID)
) TYPE=MyISAM PACK_KEYS=0 AUTO_INCREMENT=0 ");

echo'<center><h2>Bannertausch</h2><br><h2><br><br><h2>Bannertausch Setup Komplett</h2><br><br>ENTFERNEN Sie install.php</center>';
?>


die html Dateien hab ich mal nicht reingemacht! ihr könnt ja unter dem downloadlink nachschauen!!
 
Zurück