Vaupell
02-23-2009, 08:10 PM
Trying to achive :
1) Admin can set usergroups who can acces/use this app, in his cp
2) its stored in a table>colum , ELoptions > Optionallowed
I get the data in php like this
$getpermission=$db->query("SELECT Optionallowed FROM " . TABLE_PREFIX."ELoptions");
$permission=$db->fetch_array($getpermission);
$permissionPOSTER = htmlspecialchars_uni($permission['Optionallowed']);
And i use it in my template like this
<if condition="is_member_of($bbuserinfo, $permissionPOSTER[Optionallowed])">
<a href="Elinks.php?do=input" class="botton">$vbphrase[Btn_new]</a></div>
</if>
and for some reasion this specik one dont work, im pulling 3 other settings the same way
and they work fine, but they also are just 1 = enable 0 = disabled.
This is stored as TEXT in the db due to the "comma's" between the numbers
Since it dint work and only showed the wery first number admin sets in cp
i tryed to display the contents in a table to see what was going on.
and true it only shows the first number all others are ignored
ewen if i try to write a sentence or do anything else only the first character
is enabled..
What am i doing wrong, is it the htmlspecialchars_uni ? i dont get it
should i pull the data with an array instead, ewen with the table only
containing 1 row. :confused:
1) Admin can set usergroups who can acces/use this app, in his cp
2) its stored in a table>colum , ELoptions > Optionallowed
I get the data in php like this
$getpermission=$db->query("SELECT Optionallowed FROM " . TABLE_PREFIX."ELoptions");
$permission=$db->fetch_array($getpermission);
$permissionPOSTER = htmlspecialchars_uni($permission['Optionallowed']);
And i use it in my template like this
<if condition="is_member_of($bbuserinfo, $permissionPOSTER[Optionallowed])">
<a href="Elinks.php?do=input" class="botton">$vbphrase[Btn_new]</a></div>
</if>
and for some reasion this specik one dont work, im pulling 3 other settings the same way
and they work fine, but they also are just 1 = enable 0 = disabled.
This is stored as TEXT in the db due to the "comma's" between the numbers
Since it dint work and only showed the wery first number admin sets in cp
i tryed to display the contents in a table to see what was going on.
and true it only shows the first number all others are ignored
ewen if i try to write a sentence or do anything else only the first character
is enabled..
What am i doing wrong, is it the htmlspecialchars_uni ? i dont get it
should i pull the data with an array instead, ewen with the table only
containing 1 row. :confused: