You've already forked OpenShorte.old
Moved all configurations away from $GLOBALS to independent variables
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
if ( ! isset ( $_SESSION [ 'user_id' ] ) ) {
|
||||
header ( "Location: " . $GLOBALS [ 'config' ] [ 'installation_path' ] . "/login" );
|
||||
header ( "Location: " . $config [ 'installation_path' ] . "/login" );
|
||||
}
|
||||
$database = new Database ( $GLOBALS [ 'config' ] [ 'db' ] );
|
||||
$database = new Database ( $config [ 'db' ] );
|
||||
$database->connect ( );
|
||||
$database->prepare ( "SELECT links.ID, links.URL FROM links WHERE links.created_by = " . $_SESSION [ 'user_id' ] );
|
||||
$database->execute ( );
|
||||
@@ -12,10 +12,10 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Management Panel | <?=$GLOBALS['config']['website_name']?></title>
|
||||
<link href="<?=$GLOBALS['config']['installation_path']?>/favicon.ico" rel="icon" type="image/x-icon">
|
||||
<title>Management Panel | <?=$config['website_name']?></title>
|
||||
<link href="<?=$config['installation_path']?>/favicon.ico" rel="icon" type="image/x-icon">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/all.css" integrity="sha256-39jKbsb/ty7s7+4WzbtELS4vq9udJ+MDjGTD5mtxHZ0=" crossorigin="anonymous" />
|
||||
<link href="<?=$GLOBALS['config']['installation_path']?>/lib/css/manage.css" rel="stylesheet">
|
||||
<link href="<?=$config['installation_path']?>/lib/css/manage.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -44,10 +44,10 @@
|
||||
<button onclick="insertNewURL()">Insert new URL</button><br>
|
||||
<div id="responsetext"></div>
|
||||
<script>
|
||||
var script_name = "<?=$GLOBALS['config']['installation_path']?>";
|
||||
var script_name = "<?=$config['installation_path']?>";
|
||||
</script>
|
||||
<script src="<?=$GLOBALS['config']['installation_path']?>/lib/js/manage.js"></script>
|
||||
<script src="<?=$GLOBALS['config']['installation_path']?>/lib/js/logout.js"></script>
|
||||
<script src="<?=$config['installation_path']?>/lib/js/manage.js"></script>
|
||||
<script src="<?=$config['installation_path']?>/lib/js/logout.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user