-
Admin erkannt?
Hallo,
ist es möglich, dass es verschiedene Links im Menü gibt, wenn man sich als Admin (z. B. ID 1) einloggt?
Und dass man zum Beispiel auch, wenn das Bettellink vom Admin aufgerufen wurde, einen eigenen Text sieht, der aber nur bei diesem Link erscheint?
Danke schon mal im Vorraus,
mafiamix
-
RE: Admin erkannt?
Sowas nutze ich auf meinen Testseiten, Voraussetzung ist, dass in der functions.lib.php deine ID bei $admin_id eingetragen ist.
PHP-Code:
<? if ($_SESSION['login'] == 'true') {?>
<?if ($_SESSION['uid'] == $admin_id) {?>
<?menuehead("Menü")?>
Link
Link
<?menuefoot();?>
<? menuehead("Menü"); ?>
Link
Link
<? menuefoot();?>
<? } } ?>
-
RE: Admin erkannt?
OK.
Danke erstmal.
Und wie mach ich das jetzt, dass es bei nem Bettelaufruf anders angezeigt wird, also ein andrer Text?
-
PHP-Code:
<?if ($_GET['ref'] == $admin_id){?>
Hier der Text den nur der Admin sieht
<?}?>
Das von NightX oben kannste übrigens auch noch zusammenfassen, damit es übersichtlicher ist:
PHP-Code:
<? if ($_SESSION['login'] == 'true' && $_SESSION['uid'] == $admin_id) {?>
<?menuehead("Menü")?>
Link
Link
<?menuefoot();?>
<? menuehead("Menü"); ?>
Link
Link
<? menuefoot();?>
<?}?>
-
Sitemenü links
OK.
Danke, habs hinbekommen. :)
Eine Frage hab ich noch...
Ich hab mir das Sitemenü runtergeladen, das dafür gut ist, dass das Menü links und rechts ist.
Jedenfalls hab ich es hochgeladen und die Daten geändert, aber das gesamte Design ist ganz links auf meiner Seite.
Kann mir vielleicht noch jemand sagen, wo der Fehler sein könnte?
Screen
Danke,
mafiamix
-
Ich denke mal du hast irgendwo ein align="left" drin, aber ohne Quelltext kann man da nicht viel sagen!