fix blank page
diff --git a/utils.php b/utils.php
index 6086153..ea2e7e5 100644
--- a/utils.php
+++ b/utils.php
@@ -28,3 +28,30 @@
}
return $string;
}
+
+function template_path(string $lang_cc = null){
+ include "config.php";
+ if (isset($_SESSION["cc"]))
+ $lang_cc = $GLOBALS["cc"];
+ if (isset($GLOBALS["cc"]))
+ $lang_cc = $GLOBALS["cc"];
+ if ($lang_cc)
+ $INCLUDE_STRINGS_PATH = "templates_".$lang_cc;
+ else
+ $INCLUDE_STRINGS_PATH = "templates";
+
+ if (isset($lang_cc) && !empty($lang_cc)) $TEMPLATE = $INCLUDE_STRINGS_PATH."/";
+ else $TEMPLATE = "templates/";
+
+ include $TEMPLATE.'strings.php';
+
+ if(!isset($RUNTIME_ERROR)){
+ include_once 'templates/strings.php';
+ echo $RUNTIME_ERROR->not_found;
+ echo "<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>";
+ echo format($RUNTIME_ERROR->template_not_found, ["template"=>$INCLUDE_STRINGS_PATH, "langcc"=>$LANG_CC]);
+ die();
+ }
+
+ return $TEMPLATE;
+}