anonīms Posted August 24, 2010 Report Share Posted August 24, 2010 http://paste.php.lv/82e67198f514ec55171b265d7f61da1e/nonum Izmantoju šādu lietiņu, bet tagad ir parādījusies problēma, jo vēlos izmantot FLAG_1 (cipars, ne burts). Kaut arī access ir uz 1, bet sistēma uzskata, ka nav. - Kā to varētu labot? Quote Link to comment Share on other sites More sharing options...
marrtins Posted August 24, 2010 Report Share Posted August 24, 2010 Gan jau šādi: .. strpos($perms, (string)$v) .. Quote Link to comment Share on other sites More sharing options...
Kavacky Posted August 24, 2010 Report Share Posted August 24, 2010 (edited) Pirmkārt jau, šitāda flagu sistēma liekas creepy. Kāpēc tur kaut ko definēt? $user_flags = 'abcdfghhij'; $flag = 'x'; function hasAccess($flag, $user_flags) { return strstr($user_flags, $flag); } Edited August 24, 2010 by Kavacky Quote Link to comment Share on other sites More sharing options...
anonīms Posted August 24, 2010 Author Report Share Posted August 24, 2010 ugu. Un kur tu biji visus šos laikus? :D Strādā, strādā... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.