From e2a29a641b72109e4cb1d8b8543a74c913b018cc Mon Sep 17 00:00:00 2001
From: cfoe <cfoe@ispconfig3>
Date: Sat, 25 Aug 2012 10:30:31 -0400
Subject: [PATCH] deactivated settings page for default theme because of the lack of settings for the end-user
---
interface/web/tools/tpl_default.php | 74 ++++--------------------------------
1 files changed, 9 insertions(+), 65 deletions(-)
diff --git a/interface/web/tools/tpl_default.php b/interface/web/tools/tpl_default.php
index fb13b66..c5254c6 100644
--- a/interface/web/tools/tpl_default.php
+++ b/interface/web/tools/tpl_default.php
@@ -28,15 +28,7 @@
*/
-/******************************************
-* Begin Form configuration
-******************************************/
-
-$tform_def_file = "form/tpl_default.tform.php";
-
-/******************************************
-* End Form configuration
-******************************************/
+global $app, $conf;
require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php');
@@ -44,65 +36,17 @@
//* Check permissions for module
$app->auth->check_module_permissions('tools');
-// Loading classes
-$app->uses('tpl,tform,tform_actions');
-$app->load('tform_actions');
+$app->uses('tpl');
-class page_action extends tform_actions {
-
- function onLoad() {
- global $app, $conf, $tform_def_file;
+$app->tpl->newTemplate('listpage.tpl.htm');
+$app->tpl->setInclude('content_tpl', 'templates/tpl_default.htm');
- // Loading template classes and initialize template
- if(!is_object($app->tpl)) $app->uses('tpl');
- if(!is_object($app->tform)) $app->uses('tform');
+$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_tpl_default.lng';
+include($lng_file);
- $app->tpl->newTemplate("tabbed_form.tpl.htm");
+$app->tpl->setVar($wb);
- // Load table definition from file
- $app->tform->loadFormDef($tform_def_file);
-
- // Importing ID
- $this->id = $_SESSION['s']['user']['userid'];
- $_POST['id'] = $_SESSION['s']['user']['userid'];
-
- if(count($_POST) > 1) {
- $this->dataRecord = $_POST;
- $this->onSubmit();
- } else {
- $this->onShow();
- }
- }
-
- function onBeforeInsert() {
- global $app, $conf;
-
- if(!in_array($this->dataRecord['startmodule'],$this->dataRecord['modules'])) {
- $app->tform->errorMessage .= $app->tform->wordbook['startmodule_err'];
- }
- }
-
- function onInsert() {
- die('No inserts allowed.');
- }
-
- function onBeforeUpdate() {
- global $app, $conf;
-
- if($conf['demo_mode'] == true && $this->id <= 3) $app->tform->errorMessage .= 'This function is disabled in demo mode.';
-
- $_SESSION['s']['user']['language'] = $_POST['language'];
- $_SESSION['s']['language'] = $_POST['language'];
-
- if(@is_array($this->dataRecord['modules']) && !in_array($this->dataRecord['startmodule'],$this->dataRecord['modules'])) {
- $app->tform->errorMessage .= $app->tform->wordbook['startmodule_err'];
- }
- }
-
-
-}
-
-$page = new page_action;
-$page->onLoad();
+$app->tpl_defaults();
+$app->tpl->pparse();
?>
--
Gitblit v1.9.1