summaryrefslogtreecommitdiffstats
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/db.inc.php7
-rw-r--r--includes/header.php1
-rw-r--r--includes/mapclass.php14
3 files changed, 12 insertions, 10 deletions
diff --git a/includes/db.inc.php b/includes/db.inc.php
index 6cd3f01..e1db0ee 100644
--- a/includes/db.inc.php
+++ b/includes/db.inc.php
@@ -1,11 +1,6 @@
<?php
-
-global $mysqlid;
$db_host = "db2894.perfora.net";
$db_user = "dbo362854667";
$db_name = "db362854667";
$db_pass = "mazes4me";
-$mysqlid = @mysql_connect($db_host,$db_user, $db_pass) or die("Cannot connect to database.");
-@mysql_select_db($db_name, $mysqlid) or die("Invalid database.");
-
-?>
+?> \ No newline at end of file
diff --git a/includes/header.php b/includes/header.php
index 136c2eb..44d028e 100644
--- a/includes/header.php
+++ b/includes/header.php
@@ -10,6 +10,7 @@ function htmlHeader($css = array(), $title = 'Pathery', $desc = '', $scripts = a
<link href="css/page.css?v=011013" rel="stylesheet" type="text/css" />
<link href="css/maps.css?v=122612" rel="stylesheet" type="text/css" />
+ <link rel="image_src" type="image/png" href="/images/linkdsp.png" />
<?php
foreach ($css as $c) {
echo " <link href=\"css/$c.css\" rel=\"stylesheet\" type=\"text/css\" />\n";
diff --git a/includes/mapclass.php b/includes/mapclass.php
index 9e91d3f..bc5a6e5 100644
--- a/includes/mapclass.php
+++ b/includes/mapclass.php
@@ -43,8 +43,15 @@ class map {
public function __construct($code = NULL, $mapID = NULL) {
//TODO: Use new code by default.
if ($mapID !== NULL) $this->ID = $mapID;
- if ($code !== NULL) $this->applyMapFromOldCode($code);
- //$this->applyMapFromCode($code);
+ if ($code !== NULL) {
+ $dimensions = explode('.', explode(':', $code)[0])[0];
+ if (strpos($dimensions, 'x') == true) {
+ $this->applyMapFromOldCode($code);
+ } else {
+ $this->applyMapFromCode($code);
+ }
+ }
+
}
public function applyMapFromOldCode($code) {
@@ -218,8 +225,7 @@ class map {
//Outputs the new code.
public function getCode() {
//If we already have the code on hand...
- if ($this->code)
- return $this->code;
+ //if ($this->code) return $this->code;
//Otherwise we need to build the code:
$headers[0] = $this->width;
$headers[1] = $this->height;