📄 index.php
字号:
<?php$output = "<HTML><BODY>\n";global $HTTP_POST_VARS, $HTTP_GET_VARS;require ("Drivers/mySQL.php");require("conf.php");$DB = new sql_driver;$DB->param['sql_database'] = $CONF['database'];$DB->param['sql_user'] = $CONF['login'];$DB->param['sql_pass'] = $CONF['password'];$DB->param['sql_host'] = $CONF['host_name'];$DB->connect();$output .= "<center><Font size = +2>PHP Ladder System</font></center><BR>\n";$output .= "<A HREF=\"index.php?action=main\">Home</a>\n";$output .= "<A HREF=\"index.php?action=report&code=0\">Report a game</a>\n";$output .= "<A HREF=\"index.php?action=register&code=0\">add user (temp until signups added)</a>\n";$output .= "<A HREF=\"index.php?action=viewLadder\">View Ladder</a><BR><BR>\n";//decide what to do//default is view main page. $action = $HTTP_GET_VARS['action'];$choice = array( "main" => "mainpage", "viewLadder" => "viewLadder", "report" => "reportGame", "register" => "register", );// Check to make sure the array key exits..if (! isset($choice[ $action ]) ){ $action = "main";}$whatToDo = $choice[ $action];require ("Sources/".$whatToDo.".php");$output .= "</BODY></HTML>";print($output);?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -