millers Posted May 8, 2008 Report Share Posted May 8, 2008 Sveiki es gribetu zinat ka varetu izveidot lai piemeram pie ielagosanas vinjs parbauda vai ir admin,member,guest un pectam uzradas noteiktu adresi piemeram tur guestam sava adrese member sava un adminam sava !! ka to var panaakt ? visvieglakais veids ? ja varat iedodat code.. Link to comment Share on other sites More sharing options...
werd Posted May 8, 2008 Report Share Posted May 8, 2008 Glabā user_level sesijā. Link to comment Share on other sites More sharing options...
millers Posted May 8, 2008 Author Report Share Posted May 8, 2008 nu ja bet ka to izpildiit ar kadu kodu ? Link to comment Share on other sites More sharing options...
andrisp Posted May 8, 2008 Report Share Posted May 8, 2008 Pie ielogošanās, izselektē ar sql kveriju lietotāja datus un pieklabā sesijā (par to kā lietot sesiju, google vai tepat forumā). Pēc tam, kur vajag: if ($_SESSION['user']['level'] == 'blabla') { // daram to } elseif ($_SESSION['user']['level'] == 'desadesa') { // daram ko citu } Link to comment Share on other sites More sharing options...
Aleksejs Posted May 8, 2008 Report Share Posted May 8, 2008 Redzkur bija tēma, kurā kaut ko (man vismaz tā liekās) sakarīgu biju uzrakstījis: http://php.lv/f/index.php?showtopic=10115&...amp;#entry80260 Link to comment Share on other sites More sharing options...
millers Posted May 8, 2008 Author Report Share Posted May 8, 2008 sitam code es vispar piejaukt klat vinju varu ? http://paste.php.lv/7318? Link to comment Share on other sites More sharing options...
Sephy Posted May 8, 2008 Report Share Posted May 8, 2008 tur jau tikai ielogshanas vien ir laikam. tu gribi lai nevar ielogoties ja nav admins vai kaa?! ;D Link to comment Share on other sites More sharing options...
millers Posted May 8, 2008 Author Report Share Posted May 8, 2008 es gribu ta lai var ielagoties visi bet ja ielagojas admins kuram level ir admins tad vinjam kkas cits paradas un ja levels ir members tad cits.. Link to comment Share on other sites More sharing options...
black Posted May 8, 2008 Report Share Posted May 8, 2008 Miller, lūdzu mēģini aprakstīt, ko Tu nesaproti. Mēģināsim palīdzēt. Citādi sanāk tā, ka mēs Tev dodam tikai zivis, bet makšķerēt tā arī neiemācām. Link to comment Share on other sites More sharing options...
iall Posted May 8, 2008 Report Share Posted May 8, 2008 (edited) http://php.lv/f/index.php?showtopic=10199&...amp;#entry81018 - apskaties šeit! Iekš DB lauks user_level - enum("1","2","3") 1. Lietotājs 2. Moderātors 3. Administrātors Ceru ,ka noderēs. Edited May 8, 2008 by iall Link to comment Share on other sites More sharing options...
Recommended Posts