Implementing the whole template system using Smarty. This commit includes movements of ROOT/js, ROOT/images, etc. to theme specific directories like templates/<THEME>/. If you are attemping to use your own templates you won't need to modify Froxlor's core files. This commit may require additional work.

Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
This commit is contained in:
Arnold Bechtoldt
2012-08-14 23:08:25 +02:00
parent 6d0d1ae015
commit 601bf68d09
618 changed files with 15381 additions and 643 deletions

View File

@@ -22,7 +22,7 @@
*/
function getRedirectCodesArray()
{
global $db;
global $db, $theme;
$sql = "SELECT * FROM `".TABLE_PANEL_REDIRECTCODES."` WHERE `enabled` = '1' ORDER BY `id` ASC";
$result = $db->query($sql);
@@ -44,7 +44,7 @@ function getRedirectCodesArray()
*/
function getRedirectCodes()
{
global $db, $lng;
global $db, $lng, $theme;
$sql = "SELECT * FROM `".TABLE_PANEL_REDIRECTCODES."` WHERE `enabled` = '1' ORDER BY `id` ASC";
$result = $db->query($sql);
@@ -68,7 +68,7 @@ function getRedirectCodes()
*/
function getDomainRedirectCode($domainid = 0)
{
global $db;
global $db, $theme;
$code = '';
if($domainid > 0)
@@ -98,7 +98,7 @@ function getDomainRedirectCode($domainid = 0)
*/
function getDomainRedirectId($domainid = 0)
{
global $db;
global $db, $theme;
$code = 1;
if($domainid > 0)
@@ -128,10 +128,10 @@ function getDomainRedirectId($domainid = 0)
*/
function addRedirectToDomain($domainid = 0, $redirect = 1)
{
global $db;
global $db, $theme;
if($domainid > 0)
{
$db->query("INSERT INTO `".TABLE_PANEL_DOMAINREDIRECTS."`
$db->query("INSERT INTO `".TABLE_PANEL_DOMAINREDIRECTS."`
SET `rid` = '".(int)$redirect."', `did` = '".(int)$domainid."'");
}
}
@@ -147,7 +147,7 @@ function addRedirectToDomain($domainid = 0, $redirect = 1)
*/
function updateRedirectOfDomain($domainid = 0, $redirect = false)
{
global $db;
global $db, $theme;
if($redirect == false)
{
@@ -158,7 +158,7 @@ function updateRedirectOfDomain($domainid = 0, $redirect = false)
{
$db->query("DELETE FROM `".TABLE_PANEL_DOMAINREDIRECTS."`
WHERE `did` = '".(int)$domainid."'");
$db->query("INSERT INTO `".TABLE_PANEL_DOMAINREDIRECTS."`
$db->query("INSERT INTO `".TABLE_PANEL_DOMAINREDIRECTS."`
SET `rid` = '".(int)$redirect."', `did` = '".(int)$domainid."'");
}
}
}

View File

@@ -34,7 +34,7 @@
function ask_yesno($text, $yesfile, $params = array(), $targetname = '', $back_nr = 1)
{
global $userinfo, $db, $s, $header, $footer, $lng;
global $userinfo, $db, $s, $header, $footer, $lng, $theme;
$hiddenparams = '';
@@ -58,7 +58,7 @@ function ask_yesno($text, $yesfile, $params = array(), $targetname = '', $back_n
function ask_yesno_withcheckbox($text, $chk_text, $yesfile, $params = array(), $targetname = '', $show_checkbox = true)
{
global $userinfo, $db, $s, $header, $footer, $lng;
global $userinfo, $db, $s, $header, $footer, $lng, $theme;
$hiddenparams = '';

View File

@@ -32,7 +32,7 @@
function makeyesno($name, $yesvalue, $novalue = '', $yesselected = '', $disabled = false)
{
global $lng;
global $lng, $theme;
if($disabled) {
$d = ' disabled="disabled"';

View File

@@ -38,7 +38,7 @@
function redirectTo($destination, $get_variables = array(), $isRelative = false)
{
global $s;
global $s, $theme;
if(is_array($get_variables))
{

View File

@@ -28,7 +28,7 @@
function standard_error($errors = '', $replacer = '')
{
global $db, $userinfo, $s, $header, $footer, $lng;
global $db, $userinfo, $s, $header, $footer, $lng, $theme;
$_SESSION['requestData'] = $_POST;
$replacer = htmlentities($replacer);

View File

@@ -27,7 +27,7 @@
function standard_success($success_message = '', $replacer = '', $params = array())
{
global $s, $header, $footer, $lng;
global $s, $header, $footer, $lng, $theme;
if(isset($lng['success'][$success_message]))
{