[eluser]Bainzy[/eluser]
Hey everyone,
Being doing some work on Dove Forum and im currently adding in a ACL system based on a PHP5 ACL system that was posted on nettuts a while ago.
Anyway I have converted it for use in a CI library file and changed some functions to suit my needs.
I am working on the admin panel side of it and currently working on the roles page. Basically the ACL system provides me with all the permissions for a role based on the $roleID. I have a form with lots of radio buttons on it here is the HTML dump :
Code:
<table border="0" cellpadding="0" cellspacing="0" class="table">
<thead>
<tr>
<th></th><th>Allow</th><th>Deny</th><th>Ignore</th></tr>
</thead>
<tbody>
<tr>
<td class="alt">Access Admin System</td><td class="alt"><input type="radio" name="perm_2" value="1" checked="checked" id="perm_2_1" /></td><td class="alt"><input type="radio" name="perm_2" value="0" id="perm_2_0" /></td><td class="alt"><input type="radio" name="perm_2" value="x" id="perm_2_x" /></td></tr>
<tr>
<td>Access Premium Content</td><td><input type="radio" name="perm_7" value="1" checked="checked" id="perm_7_1" /></td><td><input type="radio" name="perm_7" value="0" id="perm_7_0" /></td><td><input type="radio" name="perm_7" value="x" id="perm_7_x" /></td></tr>
<tr>
<td class="alt">Access Site</td><td class="alt"><input type="radio" name="perm_1" value="1" checked="checked" id="perm_1_1" /></td><td class="alt"><input type="radio" name="perm_1" value="0" id="perm_1_0" /></td><td class="alt"><input type="radio" name="perm_1" value="x" id="perm_1_x" /></td></tr>
<tr>
<td>Install Modules</td><td><input type="radio" name="perm_5" value="1" checked="checked" id="perm_5_1" /></td><td><input type="radio" name="perm_5" value="0" id="perm_5_0" /></td><td><input type="radio" name="perm_5" value="x" id="perm_5_x" /></td></tr>
<tr>
<td class="alt">Limited Admin</td><td class="alt"><input type="radio" name="perm_8" value="1" checked="checked" id="perm_8_1" /></td><td class="alt"><input type="radio" name="perm_8" value="0" id="perm_8_0" /></td><td class="alt"><input type="radio" name="perm_8" value="x" id="perm_8_x" /></td></tr>
<tr>
<td>Post Comments</td><td><input type="radio" name="perm_6" value="1" checked="checked" id="perm_6_1" /></td><td><input type="radio" name="perm_6" value="0" id="perm_6_0" /></td><td><input type="radio" name="perm_6" value="x" id="perm_6_x" /></td></tr>
<tr>
<td class="alt">Publish Articles</td><td class="alt"><input type="radio" name="perm_3" value="1" checked="checked" id="perm_3_1" /></td><td class="alt"><input type="radio" name="perm_3" value="0" id="perm_3_0" /></td><td class="alt"><input type="radio" name="perm_3" value="x" id="perm_3_x" /></td></tr>
<tr>
<td>Publish Events</td><td><input type="radio" name="perm_4" value="1" checked="checked" id="perm_4_1" /></td><td><input type="radio" name="perm_4" value="0" id="perm_4_0" /></td><td><input type="radio" name="perm_4" value="x" id="perm_4_x" /></td></tr>
</tbody>
</table>
Now on to my question.
How when i submit this form can i get the value of each radio input, check its value and then update my 'permissions' table where changes have being made.
I am really stuck with this I just cant seem to think of a way to build it into my 'updateRole' function.
Chris