aboutsummaryrefslogtreecommitdiff
path: root/app/class/config.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/class/config.php')
-rw-r--r--app/class/config.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/app/class/config.php b/app/class/config.php
index 00c03ae..75081f4 100644
--- a/app/class/config.php
+++ b/app/class/config.php
@@ -5,6 +5,7 @@
abstract class Config
{
protected static $arttable = 'mystore';
+ protected static $domain = '';
protected static $color4;
protected static $fontsize = 15;
protected static $basepath = '';
@@ -76,6 +77,22 @@ abstract class Config
return (file_exists($path));
}
+ /**
+ * Calculate Domain name
+ */
+ public static function getdomain()
+ {
+ self::$domain = $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'];
+ }
+
+ /**
+ * Verify Domain name
+ */
+ public static function checkdomain()
+ {
+ return (self::$domain === $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST']);
+ }
+
// ________________________________________ G E T _______________________________________
public static function arttable()
@@ -83,6 +100,11 @@ abstract class Config
return self::$arttable;
}
+ public static function domain()
+ {
+ return self::$domain;
+ }
+
public static function color4()
{
return self::$color4;
@@ -177,6 +199,11 @@ abstract class Config
self::$arttable = strip_tags($arttable);
}
+ public static function setdomain($domain)
+ {
+ self::$domain = strip_tags(strtolower($domain));
+ }
+
public static function setcolor4($color4)
{
if (strlen($color4) <= 8) {