FORUMS: list search recent posts


COW Forums : Web Design

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
mark cookmanclient_area
by on Jul 24, 2006 at 5:00:10 pm

Never thought I would have the foggiest idea about php but thanks, I have had great education and fun customising the php script generously handed out a year or so ago.

I'm trying to hack it so the Admin user logs in and goes straight into the adduser section, (as if he had already clicked "admin" and the subsequent "add a user" links on main Admin page.)
I think the tweak needs to go into client_area/admin/index.php file

If you have time for a hint it would be great.
kind regards

Return to posts index

Curtis ThompsonRe: client_area
by on Jul 24, 2006 at 5:10:34 pm


ooh - do you mean the client area thing that i wrote and made available here? if so, then it's pretty easy to redirect - in login.php, you can change this:

// buh-bye
redirectUser($goto_url, "$URL_ROOT/index.$PHP_FILE_EXTENSION");

to something like this:

// buh-bye
$goto_url = ($username == "admin") ? "$URL_ADMIN_ROOT/index.$PHP_FILE_EXTENSION?action=adduser" : $goto_url;
redirectUser($goto_url, "$URL_ROOT/index.$PHP_FILE_EXTENSION");

where the "admin" in quotes would be the username of your admin (which probably is admin, but it could be changed - always better to not use the common "admin" as a login for an admin anyway as it just gives a leg up to people trying to crack admin accounts)

if that's not what you're referring to then lemme know! :-)


Return to posts index

mark cookmanRe: client_area :-)
by on Jul 24, 2006 at 6:11:08 pm

Ahhh yes, that works great! You are a saint .....
I have been mistakenly creeping through the admin/index.php for two days using trial and error.

Thanks SO much.

Return to posts index

Curtis ThompsonRe: client_area :-)
by on Jul 24, 2006 at 6:27:07 pm


no problem! :-)

btw - for reference in case it was confusing, this code snippet:

$something = ($something_else) ? "yes" : "no";

is just a shortcut way of doing an if/else block - the if/else long way would be like this:

if ($something_else) {
    $something = "yes";
} else {
    $something = "no";

much quicker the former way... :-)


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 All Rights Reserved