Alleen voor admin

Gestart doorSmiegles34 reacties153 weergaven

35 berichten · pagina 1 van 3

Smiegles

Lid · Topicstarter

Berichten
4.912
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
He
ik wil een Link op me site maar die moet alleen zichtbaar zijn voor admins

Dit heb ik nu

[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR]rang [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]2[/COLOR][COLOR= #007700]){[/COLOR] ?>
echo <a href=".ban.php" target="_self"><b>bannen</b></a>;
[COLOR= #0000BB]<?php[/COLOR] [COLOR= #007700]}[/COLOR] ?>


Kan iemand Mij verder helpen?

bij voorbaat dank
0
Berichten
15.446
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
waarom sluit je php af tussendoor?

[COLOR= #0000BB]<?php[/COLOR] 
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR]is_auth[COLOR= #007700]([/COLOR][COLOR= #0000BB]2[/COLOR][COLOR= #007700])){[/COLOR] 
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<a href=".ban.php" target="_self"><b>bannen</b></a>[/COLOR][COLOR= #007700];
 }[/COLOR] ?>
0
Smiegles

Lid · Topicstarter

Berichten
4.912
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Parse error: syntax error, unexpected { in /home/smiegles/domains/smiegles.nl/public_html/pagina.php on line 13

Dit is het gehele Script

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]config.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]style.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uid[/COLOR][COLOR= #007700]])) {[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]U bent niet ingelogd.[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]
<a href="uitloggen.php" title="logout">Uitloggen</a> <a href="leden.php" title="ledenlijst">ledenlijst</a> <a href="pagina.php" title="home">home</a><br />
[/COLOR][COLOR= #007700]; 
}[/COLOR]
?>

<?phpif(is_auth(2)){ 
echo <a href="ban.php" target="_self"><b>bannen</b></a>;
 } ?>
0
Berichten
1.674
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]config.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]style.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uid[/COLOR][COLOR= #007700]])) {[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]U bent niet ingelogd.[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]
<a href="uitloggen.php" title="logout">Uitloggen</a> <a href="leden.php" title="ledenlijst">ledenlijst</a> <a href="pagina.php" title="home">home</a><br />
[/COLOR][COLOR= #007700]; 
}[/COLOR]
?>

[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR]is_auth[COLOR= #007700]([/COLOR][COLOR= #0000BB]2[/COLOR][COLOR= #007700])){[/COLOR] 
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<a href="ban.php" target="_self"><b>bannen</b></a>[/COLOR][COLOR= #007700];
 }[/COLOR] ?>
0
Smiegles

Lid · Topicstarter

Berichten
4.912
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Fatal error: Call to undefined function is_auth() in /home/smiegles/domains/smiegles.nl/public_html/pagina.php on line 13

Krijg ik dan
0
Berichten
1.674
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]config.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]style.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uid[/COLOR][COLOR= #007700]])) {[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]U bent niet ingelogd.[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]
<a href="uitloggen.php" title="logout">Uitloggen</a> <a href="leden.php" title="ledenlijst">ledenlijst</a> <a href="pagina.php" title="home">home</a><br />
[/COLOR][COLOR= #007700]; 
}[/COLOR]
?>

[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR]is_auth[COLOR= #007700]([/COLOR][COLOR= #0000BB]2[/COLOR][COLOR= #007700]))[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<a href="ban.php" target="_self"><b>bannen</b></a>[/COLOR][COLOR= #007700];
 }[/COLOR] ?>
0
Smiegles

Lid · Topicstarter

Berichten
4.912
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Parse error: syntax error, unexpected } in /home/smiegles/domains/smiegles.nl/public_html/pagina.php on line 15

Krijg ik dan
0
Berichten
1.674
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Mmm, wacht...

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]config.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]style.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uid[/COLOR][COLOR= #007700]])) {[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]U bent niet ingelogd.[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]
<a href="uitloggen.php" title="logout">Uitloggen</a> <a href="leden.php" title="ledenlijst">ledenlijst</a> <a href="pagina.php" title="home">home</a><br />
[/COLOR][COLOR= #007700]; 
}[/COLOR]
?>

[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR]is_auth[COLOR= #007700]([/COLOR][COLOR= #0000BB]2[/COLOR][COLOR= #007700]))[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<a href="ban.php" target="_self"><b>bannen</b></a>[/COLOR][COLOR= #007700];[/COLOR]
  ?>


Werkt ie zo wel? Ik kijk zelf trouwens even of de function is_auth wel werkt..
0
Smiegles

Lid · Topicstarter

Berichten
4.912
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
hoe zie je dat?
0
Berichten
1.674
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Mmm, googleen.
Maar werkt ie?
0
Smiegles

Lid · Topicstarter

Berichten
4.912
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Fatal error: Call to undefined function is_auth() in /home/smiegles/domains/smiegles.nl/public_html/pagina.php on line 13

die foutmelding krijg ik
Ik heb niet zoveel verstand van php
dus ik zou niet weten hoe je dat aan zet of hoe dan ook
0
Berichten
15.446
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
verander het dan weer terug in if(rang > 2)
0
Berichten
1.674
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Aha, is_auth werkt niet. Ik zoek ffe andere voor je op.
0
Smiegles

Lid · Topicstarter

Berichten
4.912
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dankjewel
0
Berichten
1.674
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
@Marjolein toch, wat een slechte code is_auth geven..
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren