elflacodepr Posted February 8, 2009 Share Posted February 8, 2009 The phase of the project is code the Admin Panel: My first question is: I've made different levels of administratives rights, what will be the best way to show the correct panel depending on user level? (Administrators, Moderators..etc) Second: I want to populate a drop down box with a color array/list, how would I do such thing? Will be possible to populate it with color example?.....I'm using this color list:http://www.phpfreaks.com/forums/index.php/topic,115201.0.html and Third: Which encryption method is recommended? MD5 or Sha1? If it's possible can you post an example? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/144274-few-questions/ Share on other sites More sharing options...
printf Posted February 8, 2009 Share Posted February 8, 2009 You will need (2) tables 1 user table contains user related information... user id group id other groups usename password reg date last login birth day .... 2 group table, relationship shared with the user table using group id group id group name editing permissions posting permissions upload permissions ..... The other question... echo "<select name='colors'>"; foreach ( $colors AS $k => $v ) { echo "<option value='" . $v . "'>" . $k . "</option>\n"; } echo '</select>'; Quote Link to comment https://forums.phpfreaks.com/topic/144274-few-questions/#findComment-757137 Share on other sites More sharing options...
printf Posted February 8, 2009 Share Posted February 8, 2009 Forgot to answer the last question... For me md5() with a inline salt is good enough for most password schemes. Quote Link to comment https://forums.phpfreaks.com/topic/144274-few-questions/#findComment-757142 Share on other sites More sharing options...
elflacodepr Posted February 8, 2009 Author Share Posted February 8, 2009 I got lost with this part...I just include the file and this script will make the rest? echo "<select name='colors'>"; foreach ( $colors AS $k => $v ) { echo "<option value='" . $v . "'>" . $k . "</option>\n"; } echo '</select>'; Also, in this part I will "write" stuff like TRUE or FALSE? or theres a better way? group id group name editing permissions posting permissions upload permissions Quote Link to comment https://forums.phpfreaks.com/topic/144274-few-questions/#findComment-757146 Share on other sites More sharing options...
printf Posted February 8, 2009 Share Posted February 8, 2009 Like so... include the other page you linked to like so... <?php // path and file name where that colors array file is located include_once './colors.php'; echo "<select name='colors'>"; foreach ( $colors AS $k => $v ) { echo "<option value='" . $v . "'>" . $k . "</option>\n"; } echo '</select>'; ?> Quote Link to comment https://forums.phpfreaks.com/topic/144274-few-questions/#findComment-757150 Share on other sites More sharing options...
funkyres Posted February 8, 2009 Share Posted February 8, 2009 For encryption - I do add the username + salt + password. That way when 27 different users all think xyzzy (or plugh ... ) is a good password, the hash is different. If you don't require case sensitive login, remember to strtolower on the login before making/validating the hash. Also it means they can't change their username w/o a password reset, but that's life. Using the username with the salt when making a hash avoids situations where an sql injection that dumps the hashes allows the cracker to try the most common passwords with the accounts that have an identical hashes, because identical passwords won't have identical hash. As far as which to use - do a double md5 or double sha1 - doesn't matter. Quote Link to comment https://forums.phpfreaks.com/topic/144274-few-questions/#findComment-757161 Share on other sites More sharing options...
Prismatic Posted February 8, 2009 Share Posted February 8, 2009 Don't confuse encryption with hashing. Encryption is usually a 2 way process... Quote Link to comment https://forums.phpfreaks.com/topic/144274-few-questions/#findComment-757183 Share on other sites More sharing options...
elflacodepr Posted February 8, 2009 Author Share Posted February 8, 2009 Alright guys, thanks! Quote Link to comment https://forums.phpfreaks.com/topic/144274-few-questions/#findComment-757560 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.