diff --git a/index.php b/index.php index 69ad4e4..0d50e43 100644 --- a/index.php +++ b/index.php @@ -1,19 +1,19 @@ - - - Dashboard Home | <?=$GLOBALS['config']['website_name']?> + + + Dashboard Home | <?=$config['website_name']?>
- Open Management Console + Open Management Console diff --git a/lib/php/forgot.php b/lib/php/forgot.php index 7b823ec..edbd9c6 100644 --- a/lib/php/forgot.php +++ b/lib/php/forgot.php @@ -1,5 +1,5 @@ connect ( ); if ( isset ( $_POST [ 'forgot_email' ] ) ) { //... @@ -13,8 +13,8 @@ - - Password Reset | <?=$GLOBALS['config']['website_name']?> + + Password Reset | <?=$config['website_name']?> diff --git a/lib/php/go.php b/lib/php/go.php index cf014ec..804e7e2 100644 --- a/lib/php/go.php +++ b/lib/php/go.php @@ -1,11 +1,11 @@ connect ( ); $database->prepare ( "SELECT links.URL FROM links WHERE links.ID = :link_id" ); $database->bind ( [ ':link_id' => $link_id ] ); @@ -13,7 +13,7 @@ $result = $database->get_result ( ); if ( $result->rowCount ( ) == 0 ) { http_response_code ( 404 ); - include ( $GLOBALS [ 'config' ] [ 'installation_path' ] . '/lib/errors/404.html' ); + include ( $config [ 'installation_path' ] . '/lib/errors/404.html' ); exit; } else { @@ -24,8 +24,8 @@ - - Redirect in 5 seconds | <?=$GLOBALS['config']['website_name']?> + + Redirect in 5 seconds | <?=$config['website_name']?> @@ -37,7 +37,7 @@ var seconds = 5; function update_timeout(interval) { - document.getElementById("title").innerHTML = "Redirect in " + seconds + " seconds | "; + document.getElementById("title").innerHTML = "Redirect in " + seconds + " seconds | "; document.getElementById("body-timeout").innerHTML = seconds; if (seconds == 0) { window.location.href = ""; diff --git a/lib/php/login.php b/lib/php/login.php index 8f20b5e..c9c58fc 100644 --- a/lib/php/login.php +++ b/lib/php/login.php @@ -1,9 +1,9 @@ - Login | <?=$GLOBALS['config']['website_name']?> + Login | <?=$config['website_name']?> - - + + @@ -71,7 +71,7 @@
- '"> + '">
@@ -81,10 +81,10 @@
- - + + diff --git a/lib/php/manage.php b/lib/php/manage.php index 06cf9fd..bd1fc30 100644 --- a/lib/php/manage.php +++ b/lib/php/manage.php @@ -1,8 +1,8 @@ connect ( ); $database->prepare ( "SELECT links.ID, links.URL FROM links WHERE links.created_by = " . $_SESSION [ 'user_id' ] ); $database->execute ( ); @@ -12,10 +12,10 @@ - Management Panel | <?=$GLOBALS['config']['website_name']?> - + Management Panel | <?=$config['website_name']?> + - + @@ -44,10 +44,10 @@
- - + + diff --git a/lib/php/management/edit.php b/lib/php/management/edit.php index 8783794..89a038b 100644 --- a/lib/php/management/edit.php +++ b/lib/php/management/edit.php @@ -19,7 +19,7 @@ echo ( json_encode ( $response ) ); exit; } - $database = new Database ( $GLOBALS [ 'config' ] [ 'db' ] ); + $database = new Database ( $config [ 'db' ] ); $database->connect ( ); $database->prepare ( "UPDATE `links` SET `URL`=:url WHERE `ID`=:url_id;" ); $database->bind ( [ ':url' => $_POST [ 'url' ], 'url_id' => $_POST [ 'url_id' ] ] ); diff --git a/lib/php/management/insert.php b/lib/php/management/insert.php index 3154a5c..eb69ef1 100644 --- a/lib/php/management/insert.php +++ b/lib/php/management/insert.php @@ -19,7 +19,7 @@ echo ( json_encode ( $response ) ); exit; } - $database = new Database ( $GLOBALS [ 'config' ] [ 'db' ] ); + $database = new Database ( $config [ 'db' ] ); $database->connect ( ); $url = $_POST [ 'url' ]; $database->prepare ( "INSERT INTO `links` ( `URL`, `created_by` ) VALUES ( :url, " . $_SESSION [ 'user_id' ] . " );" ); diff --git a/lib/php/management/logout.php b/lib/php/management/logout.php index badf89d..0b84ba1 100644 --- a/lib/php/management/logout.php +++ b/lib/php/management/logout.php @@ -1,3 +1,3 @@