PHP interesse |
|
Momenteel heb ik het volgende staan in mijn index.
print <<<ENDHTML
</table></td></tr>
</table>
<br>
<table class="menu" width=100% cellpadding=0 cellspacing=0 align=center>
<tr><td><table width=100% cellpadding=0 cellspacing=0>
<tr><td width=5 class="menuTitle"> <a onClick="showMenu('politiek')">#</a> </td>
<td class="menuTitle"><b>Politieke Partij</b></td></tr>
</table>
<table width=100% cellpadding=0 cellspacing=0 ID="politiek" style="position: absolute; left: -100; top: -100; visibility: hidden;">
<tr><td class="menuLink"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href="../clanlist.php" class="menu">Verkiezing Lijst</a></td></tr>
ENDHTML;
if($data->clanlevel == 0) {
print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clan.php?p=join\" class=\"menu\">Aanmelden</a></td></tr>\n";
if($data->clanlevel == 0)
print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clan.php?p=new\" class=\"menu\">Nieuwe Partij</a></td></tr>\n";
}
else {
print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clan.php?x={$data->clan}\" class=\"menu\">Profiel Overzicht</a></td></tr>\n";
print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clan-donate.php\" class=\"menu\">Doneer Geld</a></td></tr>\n";
print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clanban.php\" class=\"menu\">Verban Leden</a></td></tr>\n";
print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clanlog.php\" class=\"menu\">Partij Logs</a></td></tr>\n";
if($data->clanlevel >= 8 || $data->clanlevel == 6) {
print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clanbank.php\" class=\"menu\">Bank Account</a></td></tr>\n";
print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clanshop.php\" class=\"menu\">Investeringen</a></td></tr>\n";
}
if($data->clanlevel >= 8 || $data->clanlevel == 2)
print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clanhq.php?p=recruits\" class=\"menu\">Aanmeldingen</a></td></tr>\n";
if($data->clanlevel >= 8) {
print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../bescherming.php?p=bes\" class=\"menu\">Bescherming</a></td></tr>\n";
print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clanhq.php?p=members\" class=\"menu\">Partij Leden</a></td></tr>\n";
print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clanhq.php?p=info\" class=\"menu\">Algemene Informatie</a></td></tr>\n";
}
if($data->clanlevel > 0) {
if($data->clanlevel < 9)
print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clan.php?p=quit\" class=\"menu\">Verlaat Partij</a></td></tr>\n";
else
print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clan.php?p=delete\" class=\"menu\">Verwijder Partij</a></td></tr>\n";
}
}
print <<<ENDHTML
</table></td></tr>
</table>
</table></td></tr> </table> <br> <table class="menu" width=100% cellpadding=0 cellspacing=0 align=center> <tr><td><table width=100% cellpadding=0 cellspacing=0> <tr><td width=5 class="menuTitle"> <a onClick="showMenu('politiek')">#</a> </td> <td class="menuTitle"><b>Politieke Partij</b></td></tr> </table> <table width=100% cellpadding=0 cellspacing=0 ID="politiek" style="position: absolute; left: -100; top: -100; visibility: hidden;"> <tr><td class="menuLink"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href="../clanlist.php" class="menu">Verkiezing Lijst</a></td></tr> ENDHTML; if($data->clanlevel == 0) { print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clan.php?p=join\" class=\"menu\">Aanmelden</a></td></tr>\n"; if($data->clanlevel == 0) print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clan.php?p=new\" class=\"menu\">Nieuwe Partij</a></td></tr>\n"; } else { print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clan.php?x={$data->clan}\" class=\"menu\">Profiel Overzicht</a></td></tr>\n"; print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clan-donate.php\" class=\"menu\">Doneer Geld</a></td></tr>\n"; print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clanban.php\" class=\"menu\">Verban Leden</a></td></tr>\n"; print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clanlog.php\" class=\"menu\">Partij Logs</a></td></tr>\n"; if($data->clanlevel >= 8 || $data->clanlevel == 6) { print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clanbank.php\" class=\"menu\">Bank Account</a></td></tr>\n"; print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clanshop.php\" class=\"menu\">Investeringen</a></td></tr>\n"; } if($data->clanlevel >= 8 || $data->clanlevel == 2) print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clanhq.php?p=recruits\" class=\"menu\">Aanmeldingen</a></td></tr>\n"; if($data->clanlevel >= 8) { print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../bescherming.php?p=bes\" class=\"menu\">Bescherming</a></td></tr>\n"; print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clanhq.php?p=members\" class=\"menu\">Partij Leden</a></td></tr>\n"; print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clanhq.php?p=info\" class=\"menu\">Algemene Informatie</a></td></tr>\n"; } if($data->clanlevel > 0) { if($data->clanlevel < 9) print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clan.php?p=quit\" class=\"menu\">Verlaat Partij</a></td></tr>\n"; else print " <tr><td class=\"menuLink\"> <img src='images/item.gif' align='absmiddle' border='0' alt='' style='border: 1px solid black;'> <a href=\"../clan.php?p=delete\" class=\"menu\">Verwijder Partij</a></td></tr>\n"; } } </table></td></tr> </table>
Graag zou ik dit deel alleen willen weergeven wanneer er in de database in de tabel gebruiker - vip op 1 staat. Maar hoe doe ik dit?
Normaal zet ik iets dergelijks als:
if($data->vip == 1 || $data->login == $admin2) {
if($data->vip == 1 || $data->login == $admin2) {
Maar op deze manier werkt het niet.
Wie kan mij aangegeven hoe ik dit toch voor elkaar krijg.
|