My php script is in dire need of a rewrite/recoding
I would like to keep the same design i have now as much as possible unless you see something better that fits.
The current script i am guessing is at least 8/9 yrs old. it has alot of new updates and recoding done already. The biggest flaw that was in the script is fixed and that was it required registered globals to be on. the script works with it off now.
with the recoding i am hoping to make the code faster, cleaner and more efficent. The script currently uses alot of includes to get stuff to show/appear.
example…
the index.php for the front page stuff and the admin.php for the back end stuff are set up like this
(this is only a breif bit of the code)
[code]
<?php
include(“config.php”);
//FIND OUT THE LANGUAGE
if($_POST[“setlanguage”]) {
setcookie(“language”);
setcookie(“language”,$_POST[“setlanguage”],time()+1209600,””,””,””);
$lang = “./lang/”.$_POST[“setlanguage”].”.ini”;
$llang = $_POST[“setlanguage”];
} elseif($_COOKIE[“language”]) {
$lang = “./lang/”.$_COOKIE[“language”].”.ini”;
$llang = $_COOKIE[“language”];
} else {
$l_array = explode(“-“,$lang_array[0]);
$llang = $l_array[0];
$lang = “./lang/”.$l_array[0].”.ini”;
}
$opt = isset($_POST[‘opt’])?$_POST[‘opt’]:$_GET[‘opt’];
$sid = $_GET[‘sid’];
$tid = $_GET[‘tid’];
$divid = $_GET[‘divid’];
$pid = $_GET[‘pid’];
$type = $_GET[‘type’];
$id = $_GET[‘id’];
$order = $_GET[‘order’];
$season = $_GET[‘season’];
$lid = $_GET[‘lid’];
$sgame = $_GET[‘sgame’];
$pdate = $_GET[‘pdate’];
include(“./menu.php”);
switch($opt) {
case “reglog”:
include(“admin_reglog.php”);
$output .= ‘<table bgcolor=”#ffffff” align=”center” width=”900″><tr><td>’.registration_log().'</td></tr></table>’;
break;
case “playerlist”:
include(“playerlist.php”);
$output .= get_players($pid);
break;
//VIEW TEAM
case “viewteam”:
include(“team.php”);
$output .= view_team($id,$divid,$sid,$order);
break;
//TEAM ROSTER
case “teamroster”:
include(“teamroster.php”);
$output .= teamroster($id,$sid,$divid);
break;
//TEAM SCHEDULE
case “teamschedule”:
include(“teamschedule.php”);
$output .= teamschedule($id,$sid);
break;
[/code]
each one of these brings up the required page of the php code which also looks for an include of the html/php page where its displayed.
I am hoping to make it in this format
http://www.theufhl.com/____________
instead of
http://www.theufhl.com?opt=___________
there is no time frame on this and some hockey knowledge is preferred, but not required.
also if you think we need to add/change stuff to the database i am game as well.. I want to make the most out of this script.