[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Permissions
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Friday 31 May 2002 12:30 pm, Adam \"Tauvix\" Debus wrote:
> Hi Hitesh,
>
> Do I have to have a seperate permissions bit for every function I want
> to make user callable?
>
> For example, I've got the shreport function, and then I want to have a
> runreport funcation that is called by the form on the shreport page...
>
I would recommend doing something like this to keep from having to register
another perm bit..
...
sub ShowReport {
if($cgi->param('_done')) {
ShowReportRun();
} else {
ShowReportPage();
}
return();
}
sub ShowReportRun {
<code to run the report>
}
sub ShowReportPage {
<output the html template>
}
...
Then on your html page have the submit button look like this:
<input type="submit" name="_done" value="Run Report">
I'm converting everything to work like this right now.. should make things
much cleaner...
> Adam "Tauvix" Debus
> Network Administrator, ReachONE Internet
> adam@reachone.com
- --
+---------------------------------+----------------------------+
| Hitesh Patel | Voice: (541) 759-3126 |
| Network Engineering Manager | Fax: (541) 759-3214 |
| Preferred Communications Inc. | Email: hitesh@pciwest.net |
+---------------------------------+----------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE8+axMCws8KqPtd2URAneYAJ934F+1AnMR8KjD3EmmNwgdTBK3rwCfUkdK
/iBvB40Y7cHunmS41lsA78U=
=IMQh
-----END PGP SIGNATURE-----
- References:
- Permissions
- From: "Adam \"Tauvix\" Debus" <northstar@delsol.net>