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:
@@ -62,7 +62,7 @@ class ApsParser
|
||||
|
||||
private function ManageInstances()
|
||||
{
|
||||
global $lng, $filename, $s, $page, $action;
|
||||
global $lng, $filename, $s, $page, $action, $theme;
|
||||
$Question = false;
|
||||
|
||||
//dont do anything if there is no instance
|
||||
@@ -170,7 +170,7 @@ class ApsParser
|
||||
//create table with contents based on instance status
|
||||
if($Question != true)
|
||||
{
|
||||
global $settings;
|
||||
global $settings, $theme;
|
||||
$Instances = '';
|
||||
|
||||
if((int)$this->userinfo['customers_see_all'] == 1)
|
||||
@@ -317,7 +317,7 @@ class ApsParser
|
||||
|
||||
private function ManagePackages()
|
||||
{
|
||||
global $lng, $filename, $s, $page, $action;
|
||||
global $lng, $filename, $s, $page, $action, $theme;
|
||||
$Question = false;
|
||||
|
||||
if(isset($_POST['save']))
|
||||
@@ -611,7 +611,7 @@ class ApsParser
|
||||
|
||||
private function UploadNewPackages()
|
||||
{
|
||||
global $lng, $filename, $s, $page, $action;
|
||||
global $lng, $filename, $s, $page, $action, $theme;
|
||||
|
||||
//define how many files can be uploaded at once
|
||||
|
||||
@@ -724,7 +724,7 @@ class ApsParser
|
||||
|
||||
private function SearchPackages()
|
||||
{
|
||||
global $lng, $filename, $s, $page, $action;
|
||||
global $lng, $filename, $s, $page, $action, $theme;
|
||||
$Error = 0;
|
||||
$Ids = array();
|
||||
$ShowAll = 0;
|
||||
@@ -852,7 +852,7 @@ class ApsParser
|
||||
|
||||
private function CustomerStatus($CustomerId)
|
||||
{
|
||||
global $lng, $filename, $s, $page, $action;
|
||||
global $lng, $filename, $s, $page, $action, $theme;
|
||||
$Data = '';
|
||||
$Fieldname = '';
|
||||
$Fieldvalue = '';
|
||||
@@ -877,7 +877,7 @@ class ApsParser
|
||||
//skip if parse of xml has failed
|
||||
|
||||
if($Xml == false)continue;
|
||||
$Icon = './images/Classic/default.png';
|
||||
$Icon = 'templates/'.$theme.'/assets/img/default.png';
|
||||
|
||||
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
|
||||
|
||||
@@ -1033,7 +1033,7 @@ class ApsParser
|
||||
|
||||
private function CreatePackageInstance($PackageId, $CustomerId)
|
||||
{
|
||||
global $lng;
|
||||
global $lng, $theme;
|
||||
|
||||
if(!self::IsValidPackageId($PackageId, true))return false;
|
||||
|
||||
@@ -1141,7 +1141,7 @@ class ApsParser
|
||||
|
||||
private function CheckException($Category, $Item, $Value)
|
||||
{
|
||||
global $settings;
|
||||
global $settings, $theme;
|
||||
|
||||
//search for element within system settings
|
||||
|
||||
@@ -1164,7 +1164,7 @@ class ApsParser
|
||||
|
||||
private function CheckSubmappings($ParentMapping, $Url)
|
||||
{
|
||||
global $lng;
|
||||
global $lng, $theme;
|
||||
$Error = array();
|
||||
|
||||
//check for special PHP handler extensions
|
||||
@@ -1243,7 +1243,7 @@ class ApsParser
|
||||
|
||||
private function InstallNewPackage($Filename)
|
||||
{
|
||||
global $lng, $userinfo;
|
||||
global $lng, $userinfo, $theme;
|
||||
|
||||
if(file_exists($Filename)
|
||||
&& $Xml = self::GetXmlFromZip($Filename))
|
||||
@@ -1726,7 +1726,7 @@ class ApsParser
|
||||
|
||||
public function MainHandler($Action)
|
||||
{
|
||||
global $lng, $filename, $s, $page, $action, $Id, $userinfo;
|
||||
global $lng, $filename, $s, $page, $action, $Id, $userinfo, $theme;
|
||||
|
||||
//check for basic functions, classes and permissions
|
||||
|
||||
@@ -2810,7 +2810,7 @@ class ApsParser
|
||||
|
||||
private function ShowPackageInstaller($PackageId, $WrongData, $CustomerId)
|
||||
{
|
||||
global $lng, $filename, $s, $page, $action;
|
||||
global $lng, $filename, $s, $page, $action, $theme;
|
||||
$Data = '';
|
||||
$Fieldname = '';
|
||||
$Fieldvalue = '';
|
||||
@@ -2838,7 +2838,7 @@ class ApsParser
|
||||
|
||||
//icon for package
|
||||
|
||||
$Icon = './images/Classic/default.png';
|
||||
$Icon = 'templates/'.$theme.'/img/default.png';
|
||||
|
||||
if($this->aps_version != '1.0')
|
||||
{
|
||||
@@ -3231,7 +3231,7 @@ class ApsParser
|
||||
|
||||
private function ShowPackageInfo($PackageId, $All = false)
|
||||
{
|
||||
global $lng, $filename, $s, $page, $action, $userinfo;
|
||||
global $lng, $filename, $s, $page, $action, $userinfo, $theme;
|
||||
$Data = '';
|
||||
$Fieldname = '';
|
||||
$Fieldvalue = '';
|
||||
@@ -3245,7 +3245,7 @@ class ApsParser
|
||||
//return if parse of xml file has failed
|
||||
|
||||
if($Xml == false)return false;
|
||||
$Icon = './images/Classic/default.png';
|
||||
$Icon = 'templates/'.$theme.'/img/default.png';
|
||||
|
||||
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
|
||||
|
||||
@@ -3460,7 +3460,7 @@ class ApsParser
|
||||
*/
|
||||
private function InfoBox($Message, $Type = 0)
|
||||
{
|
||||
global $lng, $filename, $s, $page, $action;
|
||||
global $lng, $filename, $s, $page, $action, $theme;
|
||||
//shows a box with informations
|
||||
eval("echo \"" . getTemplate("aps/infobox") . "\";");
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ class db
|
||||
function query($query_str, $unbuffered = false, $suppress_error = false)
|
||||
{
|
||||
|
||||
global $numbqueries;
|
||||
global $numbqueries, $theme;
|
||||
|
||||
if (!mysql_ping($this->link_id))
|
||||
{
|
||||
@@ -349,7 +349,7 @@ class db
|
||||
|
||||
function showerror($errormsg, $mysqlActive = true)
|
||||
{
|
||||
global $filename;
|
||||
global $filename, $theme;
|
||||
|
||||
$text = 'MySQL - Error: ' . str_replace("\n", "\t", $errormsg);
|
||||
if($mysqlActive)
|
||||
|
||||
@@ -26,7 +26,7 @@ class htmlform
|
||||
|
||||
public static function genHTMLForm($data = array())
|
||||
{
|
||||
global $lng;
|
||||
global $lng, $theme;
|
||||
$nob = false;
|
||||
|
||||
self::$_form = '';
|
||||
|
||||
@@ -421,6 +421,8 @@ class paging
|
||||
|
||||
function getHtmlArrowCode($baseurl, $field = '')
|
||||
{
|
||||
global $theme;
|
||||
|
||||
if($field != ''
|
||||
&& isset($this->fields[$field]))
|
||||
{
|
||||
|
||||
@@ -260,7 +260,7 @@ class ticket
|
||||
|
||||
public function sendMail($customerid = - 1, $template_subject = null, $default_subject = null, $template_body = null, $default_body = null)
|
||||
{
|
||||
global $mail;
|
||||
global $mail, $theme;
|
||||
|
||||
// Some checks are to be made here in the future
|
||||
|
||||
@@ -680,13 +680,13 @@ class ticket
|
||||
private function convertLatin1ToHtml($str)
|
||||
{
|
||||
$html_entities = array (
|
||||
"<EFBFBD>" => "Ä",
|
||||
"<EFBFBD>" => "ä",
|
||||
"<EFBFBD>" => "Ö",
|
||||
"<EFBFBD>" => "ö",
|
||||
"<EFBFBD>" => "Ü",
|
||||
"<EFBFBD>" => "ü",
|
||||
"<EFBFBD>" => "ß"
|
||||
"Ä" => "Ä",
|
||||
"ä" => "ä",
|
||||
"Ö" => "Ö",
|
||||
"ö" => "ö",
|
||||
"Ü" => "Ü",
|
||||
"ü" => "ü",
|
||||
"ß" => "ß"
|
||||
/*
|
||||
* @TODO continue this table for all the special-characters
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user