1

(12 replies, posted in Programming)

Hey i wrote some code to do the very same thing on my site www.dematrix.net. but what i did was in the accounts table i had 2 fields one named status and the other named expire (the timestamp for when the user should be removed). When a member logged in it changed to 1 and when they loggedout it changed to 0. on the members only page i did the following:

$begin = time();
$expire = $begin + 600;

$sql = "UPDATE accounts SET expire = $expire WHERE username = '$_SESSION[membername]'";
$res = mysql_query($sql);

yea i was thinking about doing it the other way around too cuz it will also be easier that way but i think i will adjust the code so that it works as though someone was logged in for general use but with an admin part, then put that in the members only area.

hey rickard do you have any such scripts propably from when you were creating the full version of the forum.

exactly paul. so do u know if there are any scripts available for download that are like that?

I don't know if anyone has done this as yet but what i want is to make punBB simpler so that websites that have a members only area don't need to have people visiting the forum as though it was a separate website and logining again. it just needs to give all options to the regular members and send the admin to the admin pages if their membertype is at the admin level. Also with only one skin.