Gästebuch anpassen?!

T

Tiger19

Guest
Nabend zusammen

Ich habe mir heute abend ein Gästebuch geladen.
Da ich noch anfänger bin kann ich mir selber noch keins schreiben :/
Ich hab mit dem ersteller vom GB gesprochen und er meinte nur kann daran alles ändern.

Zu meinem problem.
Ich habe auf meiner seite einen geschützen bereich für admins.
Vom dort aus will ich halt GB einträge edit.
(beim newsscript klapts schon)
Nur beim GB komm ich nicht weiter.
Beim gb ist ein ordner bei der admin heßt.
Wie stell ich das jetzt an das ich es instal. und dann vom andmin-berich beiträge löschen und edit. kann? oder weiß einer eine andere möglichkeit /GB / etc.

danke im voraus

mfg.
 
Schreib´den ganzen Quellcode des Skriptes hin.
Das ist so wie es isch anhört ein"Fertig-Skript".
Wo hast du das her? Der Autor, der das Skript geschrieben hat, könnte dir auch weiterhelfen?
 
CODE ----admin.php-------

<?php

require "setup/admindaten.php";
require "setup/dbdaten.php";

include "funkt.inc.php";
db_connect();


$installfile = 'installer.php';
if(file_exists($installfile)) {
$fehlertitel = "installer.php ist noch vorhanden";
$fehlermeldung = "Datei <b>installer.php</b> löschen und admin.php erneut aufrufen";
fehlerausgabe($fehlertitel,$fehlermeldung);
exit;
}


$scriptconf = Get_Systemdaten();
$sektionsmenue = menueoutput();
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
// Aktionen und Menue fuer diese Datei
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
if (isset($_GET['action']) && $_GET['action'] != "") {
$action = $_GET['action'];
}
elseif (isset($_POST['action']) && $_POST['action'] != "") {
$action = $_POST['action'];
}

switch ($action) {
case "logincheck":
logincheck();
break;
case "startseite":
startseite();
break;
case "systemdaten":
systemdaten();
break;
case "systemdatensave":
systemdatensave();
break;
case "admindaten":
admindaten();
break;
case "newadmindatensave":
newadmindatensave();
break;
case "logout":
logout();
break;
default:
login();
break;
}


// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
// Logindateneingabe Formular
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
function login() {
global $scriptconf;
// Meldung wenn falsche Logindaten...
if (isset($_GET['error'])) {
$hinweis = "Logindaten leider falsch...";
}
// Meldung wenn ausgeloggt...
if (isset($_GET['status'])) {
$hinweis = "Sie haben sich ausgeloggt";
}

$sektionstitel = "Administrator Login";

eval("templ_output(\"".tparser("templates/header")."\");");

echo "<form action=\"$scriptconf[URL]/admin.php\" method=\"POST\">";
echo "<input type=\"Hidden\" name=\"action\" value=\"logincheck\">";
eval("templ_output(\"".tparser("templates/logintemplate")."\");");
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
// Logindaten checken und Cookie setzen, oder zurueck zum Login
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
function logincheck() {

global $scriptconf,$adminuser,$adminpass;

$username = $_POST['username'];
$passwort = $_POST['passwort'];
$md5passwort = md5($passwort);

if(($username === $adminuser) && ($md5passwort === $adminpass)) {

setcookie ("Loginuser", "$username", time()+86400);
setcookie ("Loginpass", "$md5passwort", time()+86400);

// Daten OK
header("Location: $scriptconf[URL]/admin.php?action=startseite");
} else {
// Fehler
header("Location: $scriptconf[URL]/admin.php?error=1");
}
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
// Startseite der Administration
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
function startseite() {
passdatencheck();

global $sektionsmenue,$scriptconf, $prefix;

$sektionstitel = "Startseite";

$username = $_COOKIE["Loginuser"];
$aktueller_datum = datumausgabe(1);

eval("templ_output(\"".tparser("templates/header")."\");");
eval("templ_output(\"".tparser("templates/verwaltung")."\");");


$linktab = $prefix . "links";
$result = mysql_query("SELECT COUNT(*) from $linktab");
$rowtotal = mysql_fetch_array($result);

$resultfree = mysql_query("SELECT COUNT(*) from $linktab WHERE free = '0'");
$rowfree = mysql_fetch_array($resultfree);

$linkfrei = $rowfree[0] > 0 ? "<a href=\"$scriptconf[URL]/check.php?action=view\">Freischalten?</a>" : "";

$resultdef = mysql_query("SELECT COUNT(*) from $linktab WHERE def = '1'");
$rowdef = mysql_fetch_array($resultdef);

$linkcheck = $rowdef[0] > 0 ? "<a href=\"$scriptconf[URL]/check.php?action=def\">Prüfen?</a>" : "";

?>
<table width="100%" cellspacing="1" cellpadding="0" border="0" class="tborder">
<tr>
   <td colspan="2" class="thead">Linklistenstatistik</td>
</tr>
<tr>
   <td class="tnormal" width="40%">Anzahl Links insgesamt:</td>
   <td class="tnormal" width="60%"><?php echo $rowtotal[0] ?></td>
</tr>
<tr>
   <td class="tnormal2">Links zum Freischalten</td>
   <td class="tnormal2"><?php echo "$rowfree[0] $linkfrei"; ?></td>
</tr>
<tr>
   <td class="tnormal">Defekte Links</td>
   <td class="tnormal"><?php echo "$rowdef[0] $linkcheck"; ?></td>
</tr>
</table>

<?php
eval("templ_output(\"".tparser("templates/footer")."\");");
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
// Formular Systemdaten aendern
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
function systemdaten() {
passdatencheck();

global $sektionsmenue, $scriptconf;

$sektionstitel = "Systemdaten ändern";

eval("templ_output(\"".tparser("templates/header")."\");");
eval("templ_output(\"".tparser("templates/verwaltung")."\");");

echo "<form action=\"$scriptconf[URL]/admin.php\" method=\"POST\">";
echo "<input type=\"Hidden\" name=\"action\" value=\"systemdatensave\">";

//$URI = getenv("SCRIPT_URI");
//$SCRIPTURI = preg_replace ("/\/admin.php/", "",  $URI);

$outputuserlinks = <<< LISTE1
<select name="NEW_ENTRY" size="1" class="inpu"  style="width: 350px;">
<option value="JA">Ja, Userlinkanmeldungen erlauben</option>
<option value="NEIN">Nein, keine Userlinkanmeldungen erlauben</option>
</select>
LISTE1;
$muster1 = "/value=\"$scriptconf[NEW_ENTRY]\"/m";
$ersetzung1 = "value=\"$scriptconf[NEW_ENTRY]\" SELECTED";
$outputuserlinks = preg_replace($muster1, $ersetzung1, $outputuserlinks);

$outputdatum = <<< LISTE2
<select name="DATEFORMAT" class="inpu"  style="width: 350px;">
<option value="1">Wochentag Tag Monatsname Jahr</option>
<option value="2">Tag.Monat.Jahr</option>
<option value="3">Tagname Abk. Tag. Monat Abk. Jahr</option>
<option value="4">Tag. Monat Abk. Jahr</option>
<option value="5">Jahr-Monat-Tag</option>
</select>
LISTE2;
$muster2 = "/value=\"$scriptconf[DATEFORMAT]\"/m";
$ersetzung2 = "value=\"$scriptconf[DATEFORMAT]\" SELECTED";
$outputdatum = preg_replace($muster2, $ersetzung2, $outputdatum);


?>

<table width="100%" cellspacing="1" cellpadding="0" border="0" class="tborder">
<tr>
   <td colspan="2" class="thead">Systemdaten</td>
</tr>
<tr>
   <td class="tnormal" width="40%">Adminname</td>
   <td class="tnormal" width="60%"><input type="text" class="inpu" style="width: 350px;" name="Adminname" value="<?php echo $scriptconf[Adminname] ?>" size=35 maxlength=150></td>
</tr>
<tr>
   <td class="tnormal2">Adminemail</td>
   <td class="tnormal2"><input type="text" class="inpu" style="width: 350px;" name="Adminemail" value="<?php echo $scriptconf[Adminemail] ?>" size=35 maxlength=150></td>
</tr>
<tr>
   <td class="tnormal">Script URL</td>
   <td class="tnormal"><input type="text" class="inpu" style="width: 350px;" name="URL" value="<?php echo $scriptconf[URL] ?>" size=35 maxlength=150></td>
</tr>
<tr>
   <td class="tnormal2">Userlinks erlauben</td>
   <td class="tnormal2"><?php echo $outputuserlinks ?></td>
</tr>
<tr>
   <td class="tnormal">Datumsformat Linkeintragsdatum</td>
   <td class="tnormal"><?php echo $outputdatum ?></td>
</tr>

<tr>
   <td class="tnormal2" width="40%">Links pro Seite, Useransicht</td>
   <td class="tnormal2" width="60%"><input type="text" class="inpu" style="width: 50px;" name="LPS_USER" value="<?php echo $scriptconf[LPS_USER] ?>" size=5 maxlength=5></td>
</tr>
<tr>
   <td class="tnormal">Links pro Seite, Adminansicht</td>
   <td class="tnormal"><input type="text" class="inpu" style="width: 50px;" name="LPS_ADMIN" value="<?php echo $scriptconf[LPS_ADMIN] ?>" size=5 maxlength=5></td>
</tr>

<tr>
   <td colspan="2" class="tbottom" align="center"><input class="button" type="Submit" value="Daten speichern"></td>
</tr>
</table>
<?php

echo "</form>";

eval("templ_output(\"".tparser("templates/footer")."\");");
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
// Systemdaten speichern
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
function systemdatensave() {

global $prefix;

$Adminname = datensaver($_POST['Adminname']);
$Adminemail = datensaver($_POST['Adminemail']);
$URL = datensaver($_POST['URL']);
$LPS_USER = datensaver($_POST['LPS_USER']);
$LPS_ADMIN = datensaver($_POST['LPS_ADMIN']);
$NEW_ENTRY = datensaver($_POST['NEW_ENTRY']);
$DATEFORMAT = datensaver($_POST['DATEFORMAT']);


$systemdaten =  $prefix . "system";
MYSQL_QUERY("UPDATE $systemdaten SET Wert = '$Adminname' WHERE Name = 'Adminname'");
MYSQL_QUERY("UPDATE $systemdaten SET Wert = '$Adminemail' WHERE Name = 'Adminemail'");
MYSQL_QUERY("UPDATE $systemdaten SET Wert = '$URL' WHERE Name = 'URL'");
MYSQL_QUERY("UPDATE $systemdaten SET Wert = '$LPS_USER' WHERE Name = 'LPS_USER'");
MYSQL_QUERY("UPDATE $systemdaten SET Wert = '$LPS_ADMIN' WHERE Name = 'LPS_ADMIN'");
MYSQL_QUERY("UPDATE $systemdaten SET Wert = '$NEW_ENTRY' WHERE Name = 'NEW_ENTRY'");
MYSQL_QUERY("UPDATE $systemdaten SET Wert = '$DATEFORMAT' WHERE Name = 'DATEFORMAT'");

redirect("admin.php?action=systemdaten", 0);
}



// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
// Formular Admindaten aendern
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
function admindaten() {
passdatencheck();

global $sektionsmenue, $scriptconf;

$sektionstitel = "Formular zum ändern der Administrator Daten";

eval("templ_output(\"".tparser("templates/header")."\");");
eval("templ_output(\"".tparser("templates/verwaltung")."\");");

echo "<form action=\"$scriptconf[URL]/admin.php\" method=\"POST\">";
echo "<input type=\"Hidden\" name=\"action\" value=\"newadmindatensave\">";

eval("templ_output(\"".tparser("templates/admindatentemplate")."\");");

echo "</form>";

eval("templ_output(\"".tparser("templates/footer")."\");");
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
// Neue Admindaten speichern
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
function newadmindatensave() {
passdatencheck();

global $scriptconf, $adminuser, $adminpass;

$oldusername = datensaver($_POST['oldusername']);
$oldpasswort = datensaver($_POST['oldpasswort']);
$testpasswortvergleich = md5($oldpasswort);

$newusername = datensaver($_POST['newusername']);
$newpasswort = datensaver($_POST['newpasswort']);

$laengeuser = strlen($newusername);
$laengepass = strlen($newpasswort);

//-----------------------------------------------------------------//
// Fehlerbehandlung
$fehlermeldung = "";
$fehler_gefunden = "";

$errormeldung = "<li>Der Wert des Feldes\"Jetziger Username\" stimmt nicht mit dem vorhandenen, in der Passwortdatei gespeicherten Wert überein! \n";
if ($oldusername !== $adminuser) {
$fehlermeldung = $fehlermeldung.$errormeldung;
$fehler_gefunden = 1; }

$errormeldung = "<li>Der Wert des Feldes\"Jetziges Passwort\" stimmt nicht mit dem vorhandenen, in der Passwortdatei gespeicherten Wert überein! \n";
if ($testpasswortvergleich !==  $adminpass) {
$fehlermeldung = $fehlermeldung.$errormeldung;
$fehler_gefunden = 1; }

// Prüfung auf unerlaubte Zeichen
$errormeldung = "<li>Das Feld \"Neuer Username\" enthält unerlaubte Zeichen. Nur a-z A-Z Umlaute äöüßÄÖÜ sowie 0 - 9 der Unterstrich, Bindestrich und Punkt . sind erlaubt. \n";

if (preg_match ("/[^_\.A-Za-z0-9ÄÖÜäöüß-]/", $newusername)) {
$fehlermeldung = $fehlermeldung.$errormeldung;
$fehler_gefunden = 1; }

// Prüfung auf unerlaubte Zeichen
$errormeldung = "<li>Das Feld \"Neues Passwort\" enthält unerlaubte Zeichen. Nur a-z A-Z Umlaute äöüßÄÖÜ sowie 0 - 9 der Unterstrich, Bindestrich und Punkt . sind erlaubt. \n";

if (preg_match ("/[^_\.A-Za-z0-9ÄÖÜäöüß-]/", $newpasswort)) {
$fehlermeldung = $fehlermeldung.$errormeldung;
$fehler_gefunden = 1; }

// Prüfung auf bestimmte Minimal und Maximallänge
$errormeldung = "<li>Das Feld \"Neuer Username\" wurde nicht korrekt ausgefüllt. Mindestens 5 Zeichen muß, aber höchstens 15 Zeichen lang darf der Inhalt dieses Feldes sein. <b>Sie haben $laengeuser Zeichen eingetragen.</b> \n";
if ((strlen($newusername) < 4 || strlen($newusername) > 15 )) {
$fehlermeldung = $fehlermeldung.$errormeldung;
$fehler_gefunden = 1; }

// Prüfung auf bestimmte Minimal und Maximallänge
$errormeldung = "<li>Das Feld \"Neues Passwort\" wurde nicht korrekt ausgefüllt. Mindestens 5 Zeichen muß, aber höchstens 15 Zeichen lang darf der Inhalt dieses Feldes sein. <b>Sie haben $laengepass Zeichen eingetragen.</b>\n";
if ((strlen($newpasswort) < 4 || strlen($newpasswort) > 15 )) {
$fehlermeldung = $fehlermeldung.$errormeldung;
$fehler_gefunden = 1; }

// Wenn Fehler - dann aufruf der Fehlerfunktion...
if ($fehler_gefunden) {
$fehlertitel = "Fehler beim Administratordaten ändern";
fehlerausgabe($fehlertitel,$fehlermeldung);
exit;
}
$newpasswortsave = md5($newpasswort);

$fp = fopen("setup/admindaten.php","w");
flock($fp, 2);
fputs($fp, "<?php\n");
fputs($fp, "\$adminuser = \"$newusername\";\n");
fputs($fp, "\$adminpass = \"$newpasswortsave\";\n");
fputs($fp, "?>\n");
fclose($fp);


$aktueller_datum = datumausgabe(1);

$betreff = "Passwortänderung";

// Mail senden
$message = "Hallo $scriptconf[Adminname],
anbei erhalten Sie die Informationen zu der am $aktueller_datum durchgefuehrten Passwortaenderung.
Neuer Username:  $newusername
Neues Passwort:  $newpasswort";

$header="From: $scriptconf[Adminname] <$scriptconf[Adminemail]>\n";
$header .= "Reply-To: $scriptconf[Adminname] <$scriptconf[Adminemail]>\n";
mail($scriptconf[Adminemail],$betreff,$message,$header);


setcookie ("Loginuser", "$newusername", time()+86400);
setcookie ("Loginpass", "$newpasswortsave", time()+86400);

redirect("$scriptconf[URL]/admin.php?action=startseite", 2);
}

MYSQL_CLOSE();
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
// Ausloggen
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
function logout() {
global $scriptconf;
setcookie ("Loginuser", "", time()-86400);
setcookie ("Loginpass", "", time()-86400);

header("Location: $scriptconf[URL]/admin.php?status=1");
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
?>




CODE ----index.php-----

<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="generator" content="Microsoft FrontPage 6.0">
<meta name="author" content="Jürgen Asendorf">
<meta name="keywords"
content="DarkSide-4you.de">
<meta name="description"
<meta name="expires" content="20 days">
<meta name="revisit" content="after 21 days">
<meta name="page-type" content="DarkSide-4you">
<meta name="robots" content="INDEX,FOLLOW">
<title>DarkSide-4you.de</title>
<script language="JavaScript">
<!--

/* Hier alle am Mouseover beteiligten Grafiken vorladen*/
button01= new Image();
button01.src = "http://www.darkside-4you.de/images/button_d.jpg";
button02= new Image();
button02.src = "http://www.darkside-4you.de/images/button_over_d.jpg";



//--></script>
<link rel="stylesheet" type="text/css" href="http://www.darkside-4you.de/format.css" >
<script>
<!--
function BlurLinks(){
lnks=document.getElementsByTagName('a');
for(i=0;i<lnks.length;i++){
lnks[i].onfocus=new Function("if(this.blur)this.blur()");
}
}

onload=BlurLinks;
-->
</script>

                                           

<img border="0" src="http://www.darkside-4you.de/images/head.gif" width="781" height="123">
<body background=""  text="#CCCCCC"  bgcolor="#000000"   topmargin="20" marginheight="20"  leftmargin="0" marginwidth="0"><table bgcolor="#4D5762" border="0"  cellpadding="0" cellspacing="0"  width="100%" height="98%" >
<tr>
<td  valign="top"  width="100%" ><img src="http://www.darkside-4you.de/images/space_black.gif" width="100%" height="1" border="0" alt=""></td>
<tr>
<td valign="top" width="100%" height="100%"><table border="0" cellpadding="0" cellspacing="2"  width="100%" height="100%"  >
<tr><td  valign="top" width="20" ><img src="http://www.darkside-4you.de/images/space_trans.gif" width="8" height="8" border="0" alt=""></td>


<!-- beginn menue-->
<td  background="http://www.darkside-4you.de/images/back_tv.gif"   valign="top"   width="150" height="100%" style="border:solid 1px black">
<br>
<!-- Menü 1-->
<table bgcolor="black"  border="0"  cellpadding="0" cellspacing="0"  width="150" >
<tr>
<td  width="150" >
<table  width="150" id="linksmenu" border="0" cellpadding="0" cellspacing="1" >
<tr>
<td   width="150" class="rubrik" bgcolor="#4D5762" >::: Navigation</td>
</tr>
<tr>
<td   width="150"  ><a href="index.html"  >  » <font color="#CCCCCC">Home</font></a></td>
</tr>
<tr>
<td  width="150"  ><a href="index.html"  >  » News</a></td>
</tr>
<tr>
<td  width="150"  ><a href="index.html"  >  » Newsarchiv</a></td>
</tr>
<tr>
<td  width="150"  ><a href="index.html"  >  » Forum</a></td>
</tr><tr>
<td  width="150"  ><a href="index.html"  >  » Poll</a></td>
</tr>
<tr>
<td  width="150" ><a href="index.html"  >   » Gästebuch</a></td>
</tr>
<tr>
<td  width="150"  ><a href="index.html"  >  » <i><b><u><font color="#0000FF">Link</font></u></b></i></a></td>
</tr>


</table>
</td>
</tr>
</table>
<br>

<!-- Menü 2-->

<table bgcolor="black"  border="0"  cellpadding="0" cellspacing="0"  width="150" >
<tr>
<td  width="150" >
<table  width="150" id="linksmenu" border="0" cellpadding="0" cellspacing="1" >
<tr>
<td   width="150" class="rubrik" bgcolor="#4D5762" >::: Games</td>
</tr>
<tr>
<td   width="150"  ><a href="http://www.darkside-4you.de/games/counter-strike.html"  >  » Counter-Strike</a></td>
</tr>
<tr>
<td  width="150"  ><a href="http://www.darkside-4you.de/games/battlefield.html"  >  » Battlefield</a></td>
</tr>
<tr>
<td  width="150"  ><a href="http://www.darkside-4you.de/games/splinter-cell.html"  >  » Splinter Cell</a></td>
</tr>
<tr>
<td  width="150"  ><a href="http://www.darkside-4you.de/games/empire-earth.html"  >  » Empire Earth</a></td>
</tr>

</table>
</td>
</tr>
</table>
<br>

<!-- Menü 3-->
<table bgcolor="black"  border="0"  cellpadding="0" cellspacing="0"  width="150" >
<tr>
<td  width="150" >
<table  width="150" id="linksmenu" border="0" cellpadding="0" cellspacing="1" >
<tr>
<td   width="150" class="rubrik" bgcolor="#4D5762" >::: System</td>
</tr>
<tr>
<td   width="150"  ><a href="http://www.darkside-4you.de/about_us/about_us.html"  >  » about us</a></td>
</tr>
<tr>
<td   width="150"  ><a href="http://www.darkside-4you.de/Jobs/jobs.html"  >  » Kontakt</a></td>
</tr>
<tr>
<td   width="150"  ><a href="http://www.darkside-4you.de/cgi-bin/mailer/mailer.cgi"  >  » Danksargungen</a></td>
</tr>
<tr>
<td   width="150"  ><a href="index.html"  >  » Bug/Fehler melden</a></td>
</tr>
</table>
</td>
</tr>
</table>

<!--Ende Menue linke Seite-->
</td>


<td valign="top"   ><img src="http://www.darkside-4you.de/images/space_trans.gif" width="30" height="1" border="0" alt=""></td><td valign="top"  >
 <p align="center"><span style="font-size: 14pt">:::Links</span></p>
<hr noshade size="1"width="100%" height="1">
<p><?php

require "setup/dbdaten.php";
include "funkt.inc.php";
db_connect();

$scriptconf = Get_Systemdaten();
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
// Aktionen und Menue fuer diese Datei
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
if (isset($_GET['action']) && $_GET['action'] != "") {
$action = $_GET['action'];
}
elseif (isset($_POST['action']) && $_POST['action'] != "") {
$action = $_POST['action'];
}

switch ($action) {
case "ll":
ll();
break;
default:
start();
break;
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
// Startseite der Linkliste
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
function start() {

global $scriptconf, $prefix;
$sektionstitel = "Kategorienliste";
$titelzeile = "Kategorien";

if ($scriptconf[NEW_ENTRY] === 'JA') {
$addlink = "<a href=\"$scriptconf[URL]/service.php?action=nl\">Link anmelden</a>";
} else {
$addlink = "";
}

$linktab = $prefix . "links";  
$topcat = $prefix . "topcat";

$query = "SELECT c.id, c.text, Count(d.katid) total, c.ktext
FROM  $topcat c
LEFT JOIN $linktab d
ON c.id = d.katid AND d.free = 1
WHERE c.akt = 1
GROUP BY c.id
ORDER BY c.rf ASC";

$result = mysql_query($query) or indexerror(__LINE__,__FILE__,"Kann Daten nicht abfragen.<br><b>Query:</b> $query ",mysql_error());
$reihen = mysql_num_rows($result);
if (mysql_num_rows($result)) {

eval("templ_output(\"".tparser("templates/listheader")."\");");

$zahl = 0;
while($spalte= mysql_fetch_row ($result)) {
$zahl++;

$linkout_or_text = $spalte[2] > 0 ? "<a href=\"$scriptconf[URL]/index.php?action=ll&kat=$spalte[0]\">$spalte[1]</a>" : "<b>$spalte[1]</b>";

if ($zahl == 1) {
$cssclass = $cssclass === "tnormal" ? "tnormal2" : "tnormal";
$trout .= <<< TC
<tr>\n
<td width="50%" class="$cssclass" valign="top"><img src="images/kat.gif" width=10 height=10 border=0 alt=""> $linkout_or_text [$spalte[2]]<br>$spalte[3]</td>\n
TC;
}
if ($zahl == 2) {
$cssclass = $cssclass === "tnormal" ? "tnormal" : "tnormal2";
$trout .= <<< TC
<td width="50%" class="$cssclass"  valign="top"><img src="images/kat.gif" width=10 height=10 border=0 alt=""> $linkout_or_text [$spalte[2]]<br>$spalte[3]</td>\n
</tr>\n
TC;
$zahl = 0;
}
}
if ($zahl == 1) {
$cssclass = $cssclass === "tnormal" ? "tnormal" : "tnormal2";
$trout .= "<td width=\"50%\" class=\"$cssclass\"> </td>\n</tr>\n";
}

// ende if
} else {
eval("templ_output(\"".tparser("templates/listheader")."\");");

$trout = "
<tr>
<td class=\"tnormal\" colspan=\"2\">Noch keine Kategorien vorhanden</td>
</tr>
";
}

?>
<table width="100%" cellspacing="1" cellpadding="2" border="0" class="tborder">
<?php
echo $trout;
?>
</table>
<?php

eval("templ_output(\"".tparser("templates/listfooter")."\");");
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
// Links der gewaehlten Kategorie ausgeben
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
function ll() {

global $scriptconf,$prefix;
$los = $_GET['los'];
$kat = $_GET['kat'];

if ($scriptconf[NEW_ENTRY] === 'JA') {
$addlink = "<a href=\"$scriptconf[URL]/service.php?action=nl\">Link anmelden</a>";
} else {
$addlink = "";
}

$kat = preg_replace ("/[^0-9]/", "",  $kat);

$topcat = $prefix . "topcat";
$rowtitel = mysql_query("SELECT text FROM $topcat WHERE id = '$kat'");
$rowtitelout = mysql_fetch_array($rowtitel);  

// Startzahl
if(!isset($los)) {
$los = 0;
}

$linktab = $prefix . "links";
$resultcount = mysql_query("SELECT COUNT(*) from $linktab WHERE katid = '$kat' AND free = '1'");
$rowsub = mysql_fetch_array($resultcount);  
$linksgesamt = $rowsub[0];

if ($linksgesamt > 0) {

$resultlink = mysql_query("SELECT * FROM $linktab WHERE katid = '$kat' AND free = '1' LIMIT $los, $scriptconf[LPS_USER]");

// Navi Anfang
$linkquerystandard = "$scriptconf[URL]/index.php?action=ll&kat=$kat&anz=$linksgesamt";
$linkquerystandardhome = "<a href=\"$scriptconf[URL]/index.php\">Kategorienliste</a>";

$treffer =  $linksgesamt;
if ($treffer <= $scriptconf[LPS_USER])
{
$navigationslinks = "";
}

$navlinks_pro_seite = 10 * $scriptconf[LPS_USER];
$linienzahl2 = $los - $los % $navlinks_pro_seite;
$linienzahl1 = $linienzahl2 - $navlinks_pro_seite;
$linienzahl3 = $linienzahl2 + $navlinks_pro_seite;

if ($linienzahl1 < 0) {
$backlink = "";
} else {

$backlink .= " <a href=\"$linkquerystandard&los=$linienzahl1\">Zurück</a> \n";
}

if ($linienzahl3 > $treffer) {
$forwardlink .= "";
} else {
$forwardlink .= " <a href=\"$linkquerystandard&los=$linienzahl3\">Nächste</a> \n";
}
$navigationslinks .= "$backlink \n";
for ($i=$linienzahl2; $i<$linienzahl3; $i += $scriptconf[LPS_USER]) {
if ($i >= $treffer) {
break;
}
$seitennummer = $i/$scriptconf[LPS_USER]+1;
if ( $i != $los ) {
$navigationslinks .=  "<a href=\"$linkquerystandard&los=$i\">$seitennummer</a> \n";
} else {
$navigationslinks .=  "<b>[$seitennummer]</b> \n";
}
}
$navigationslinks .=  $forwardlink;
// Navi Ende

$linksezmz = $linksgesamt > 1 ? "Links" : "Link";

$sektionstitel = "Kategorie: $rowtitelout[0]";
$titelzeile = "$linksgesamt $linksezmz in der Kategorie: $rowtitelout[0]";

eval("templ_output(\"".tparser("templates/listheader")."\");");

$topcatselect = Gen_userjump($kat);

eval("templ_output(\"".tparser("templates/blaettern_oben")."\");");
echo hole_userlinkeintrag($resultlink);
eval("templ_output(\"".tparser("templates/blaettern_unten")."\");");

} else {
fehlerausgabeindex("Fehler","<span class=\"tippred\">Keine Daten zur ID gefunden</span>");
}
eval("templ_output(\"".tparser("templates/listfooter")."\");");
}

MYSQL_CLOSE();
?>

</p>
</p>
<p> 
</p>
<p> 
</p>
<p> 
</p>
<p> 
</p>
<p> 
</p>
<p>
  </hr>
</p>
<div align="center">© 2004 - 2005 by DarkSide-4you.de</div>

</td><td  valign="top"  ><img src="http://www.darkside-4you.de/images/space_trans.gif" width="30" height="1" border="0" alt="" ></td>
</tr>
</table></td>
</tr>



</tr>
<tr>
<td valign="bottom"  width="100%" ><img src="http://www.darkside-4you.de/images/space_black.gif" width="100%" height="1" border="0" alt=""></td>
</tr>
</table>
</body>
</html>




dan hab ich noch:

-check.php
-go.php
-verwaltung.php
-links.php
-service.php
-funkt.inc.php



----
jo das ist nen "fertig script" wie gesagt lern ja noch
wink.gif
 
Welche PHP Version benutzt du?

Das bekommst du so heraus: Schreib´ ein Skript mit folgendem Inhalt und lade es auf den Server und rufe es auf.

CODE
<?php
phpinfo();
?>

 
PHP Version 4.3.0
Linux s165 2.4.25 #1 Die Feb 24 10:55:14 CET 2004 i686


Sag mal hast ihrgendwie icq msn oder irc ?
wennde bereit bist mir etwas zu helfen
 
Wo hast du das Skript her? Frage mal da nach wie man das Gästebuch administriert.

Wenn nicht ich könnte dir dieses Gästebuch empfehlen. Auf der Seite habe ich es auf der Schnelle nichts gefunden.
mad.gif

Ich könnte dir das gezippte Gästebuch an deine email Adresse schicken, wenn du willst.
Ich schicke keinen gezippten Virus.

Wenn nicht, kannst du auf der Homepage nach dem Gästebuch suchen. Das Gästebuch ist im Ordner "_php2" und dort im Ordner "gaestebuch".

Du musst nur die Werte in der config.php anpassen. Sprich diese offline bei dir öffnen und die MySQL Daten eingeben. Die ganzen Seiten hochladen. Dann als erstes die setup.php ausführen.
Die index.php ist das Gästebuch.

Oder:

Ich könnte den Quellcode hier posten.

 
also von mir aus kannst mir das schicken ( badtiger33@web.de )
wäre echt super von dir.
 
Zurück
Oben