daGrevis Posted November 15, 2010 Report Share Posted November 15, 2010 Sveiki, Divi līdzīgi skripti. 1) http://paste.php.lv/d34c00d06ca94ece9cca2d8a7029a39e?lang=php (bez kļūdas); 2) http://paste.php.lv/a970e692c2995682cacf8de7de5fb27e?lang=php (ar kļūdu). Pirms tam tiek iekļautas visas minētās funkcijas, attiecīgās funkcijas, kas varētu interesēt: function get__level( $id ) { $query = mysql_query(" SELECT `level` FROM `users` WHERE `id` = '{$id}' LIMIT 1 ") or exit( mysql_error() ); $result = mysql_result( $query, 0 ); return $result; } function format__level( $user_id ) { switch( get__level( $user_id ) ) { case 1: return '<span style="color: black;">' . get__username( $user_id ) . '</span>'; case 2: return '<span style="color: #cc6600;"><strong>' . get__username( $user_id ) . '</strong></span>'; case 3: return '<span style="color: #009900;"><strong>' . get__username( $user_id ) . '</strong></span>'; case 4: return '<span style="color: #800000;"><strong>' . get__username( $user_id ) . '</strong></span>'; } } Quote Link to comment Share on other sites More sharing options...
daGrevis Posted November 15, 2010 Author Report Share Posted November 15, 2010 (edited) Doh! Atrisināju. Dzēsiet! P.S. Ienīstu neuzmanības kļūdas. Hāh, 666 posts tieši! xD xD Edited November 15, 2010 by daGrevis Quote Link to comment Share on other sites More sharing options...
Kavacky Posted November 16, 2010 Report Share Posted November 16, 2010 Heil Satan! 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.