| Topic Archived |
View previous topic :: View next topic |
| Author |
Message |
Phoenix • Many Posts •


Offline Joined: Apr 19, 2004 Posts: 8799 Location: Netizen
|
Posted: Wed Dec 29, 2004 12:36 pm Post subject: Re: CPG-Nuke League for PR1 (and above) |
|
| PHP: |
if (!defined('ADMIN_PAGES')) { exit; } if (!can_admin()) { die('Access Denied'); }
|
_________________ • DonationsPro for DragonflyCMS, SMF, MyBB, vBulletin •
Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
|
|
| Back to top |
|
 |
fcxbytes Newbie


Offline Joined: Sep 02, 2004 Posts: 20
|
Posted: Wed Dec 29, 2004 12:51 pm Post subject: Re: CPG-Nuke League for PR1 (and above) |
|
Good.
And if the file has something like this in the start
| PHP: |
$module_name="League"; get_lang($module_name); include_once('modules/$module_name/constants.php'); include_once('modules/$module_name/util.php'); global $db;
if (!defined('ADMIN_PAGES')) { exit; } if (!can_admin()) { die('Access Denied'); }
|
should it be ordered like this?
| PHP: |
if (!defined('ADMIN_PAGES')) { exit; } if (!can_admin()) { die('Access Denied'); }
$module_name="League"; get_lang($module_name); global $db; include_once('modules/$module_name/constants.php'); include_once('modules/$module_name/util.php');
|
fcxbytes's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/1.3.27/4.0.22/4.3.1/8.2b-CVS
Last edited by fcxbytes on Wed Dec 29, 2004 12:54 pm; edited 1 time in total |
|
| Back to top |
|
 |
fcxbytes Newbie


Offline Joined: Sep 02, 2004 Posts: 20
|
Posted: Wed Dec 29, 2004 12:53 pm Post subject: Re: CPG-Nuke League for PR1 (and above) |
|
Isn't there also a change about how the global variables work?
I suppose the first block of code I posted is correct then.
fcxbytes's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/1.3.27/4.0.22/4.3.1/8.2b-CVS
Last edited by fcxbytes on Wed Dec 29, 2004 12:57 pm; edited 1 time in total |
|
| Back to top |
|
 |
Phoenix • Many Posts •


Offline Joined: Apr 19, 2004 Posts: 8799 Location: Netizen
|
Posted: Wed Dec 29, 2004 12:57 pm Post subject: Re: CPG-Nuke League for PR1 (and above) |
|
yes - needs to be at the top to prevent the file from working.
_________________ • DonationsPro for DragonflyCMS, SMF, MyBB, vBulletin •
Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
|
|
| Back to top |
|
 |
fcxbytes Newbie


Offline Joined: Sep 02, 2004 Posts: 20
|
Posted: Wed Dec 29, 2004 1:29 pm Post subject: Re: CPG-Nuke League for PR1 (and above) |
|
I remind that get() should be replaced with $_GET[''].
| PHP: |
// Is this correct? while (($rows = $db->sql_fetchrow($result))) { $name = getTeamName($rows[tid]); //change to $name = $_GET['TeamName']($rows[tid]);
|
fcxbytes's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/1.3.27/4.0.22/4.3.1/8.2b-CVS
|
|
| Back to top |
|
 |
fcxbytes Newbie


Offline Joined: Sep 02, 2004 Posts: 20
|
Posted: Wed Dec 29, 2004 2:29 pm Post subject: Re: CPG-Nuke League for PR1 (and above) |
|
I have another question concerning Header("Location: address"); .
I know It should be changed to url_redirect(getlink('address'));
// all ok?
fcxbytes's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/1.3.27/4.0.22/4.3.1/8.2b-CVS
|
|
| Back to top |
|
 |
xfsunoles XHTML Specialist


Offline Joined: Apr 30, 2004 Posts: 2502 Location: Melbourne, Florida
|
Posted: Wed Dec 29, 2004 7:30 pm Post subject: Re: CPG-Nuke League for PR1 (and above) |
|
| Code:: |
url_redirect(adminlink('leagueCreate'));
|
_________________

Firefox is my Favorite Browser
xfsunoles's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Apache/1.3.34 (Unix)/4.0.25-standard/4.4.1/CVS
|
|
| Back to top |
|
 |
fcxbytes Newbie


Offline Joined: Sep 02, 2004 Posts: 20
|
Posted: Thu Dec 30, 2004 12:34 am Post subject: Re: CPG-Nuke League for PR1 (and above) |
|
This is my first (huge) job in php.
So far I managed to port some files...
I'm going to drop league.php file here.
Maybe there's a god out there that is interested in checking out my progress and pointing some errors I may have done.
fcxbytes's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/1.3.27/4.0.22/4.3.1/8.2b-CVS
|
|
| Back to top |
|
 |
RedGerry Silver Supporter


Offline Joined: Jun 29, 2004 Posts: 480 Location: Fishcross, Scotland
|
Posted: Wed Jan 19, 2005 5:22 pm Post subject: Re: CPG-Nuke League for PR1 (and above) |
|
I should have an operational version of RG_Sports under Dragonfly in the next couple of weeks.
Questtion? Do I need to submit this to anyone for approval/certification. As far as I can see it meets all the requirements however I'd be happier with someone checking it.
_________________ gerry @ redgerry.com
redgerry.com
clacks.co
123v.com
copseygroup.com
RedGerry's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Suse11.4 - LAMP on zypper - ISPConfig 3
|
|
| Back to top |
|
 |
|
|