|
From: <txm...@us...> - 2014-06-17 15:00:39
|
Revision: 12615
http://sourceforge.net/p/xoops/svn/12615
Author: txmodxoops
Date: 2014-06-17 15:00:33 +0000 (Tue, 17 Jun 2014)
Log Message:
-----------
- Updated
- Moved templates files in the appropriate subdirectory
- Work in progress
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/abstract.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/htmlsmartycodes.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/admin.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/blocks.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/common.php
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/about.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/pages.php
Removed Paths:
-------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/templates.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/templates.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/abstract.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/abstract.php 2014-06-16 23:34:06 UTC (rev 12614)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/abstract.php 2014-06-17 15:00:33 UTC (rev 12615)
@@ -75,7 +75,9 @@
* @param mixed $table
*/
public function setTable($table) {
- $this->table = $table;
+ //if (is_object($table) && is_a($table, 'TDMCreateTables')) {
+ $this->table = $table;
+ //}
}
/*
@@ -90,8 +92,10 @@
* public function setTables
* @param mixed $tables
*/
- public function setTables($tables) {
- $this->tables = $tables;
+ public function setTables($tables) {
+ //if (is_object($tables) && is_a($tables, 'TDMCreateTables')) {
+ $this->tables = $tables;
+ //}
}
/*
@@ -107,7 +111,9 @@
* @param mixed $fields
*/
public function setFields($fields) {
- $this->fields = $fields;
+ //if (is_object($fields) && is_a($fields, 'TDMCreateFields')) {
+ $this->fields = $fields;
+ //}
}
/*
Deleted: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/templates.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/templates.php 2014-06-16 23:34:06 UTC (rev 12614)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/templates.php 2014-06-17 15:00:33 UTC (rev 12615)
@@ -1,65 +0,0 @@
-<?php
-/*
- You may not change or alter any portion of this comment or credits
- of supporting developers from this source code or any supporting source code
- which is considered copyrighted (c) material of the original comment or credit authors.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-/**
- * tdmcreate module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
- * @package tdmcreate
- * @since 2.5.0
- * @author Txmod Xoops http://www.txmodxoops.org
- * @version $Id: admin_templates.php 12258 2014-01-02 09:33:29Z timgno $
- */
-defined('XOOPS_ROOT_PATH') or die('Restricted access');
-require_once TDMC_PATH . '/class/files/htmlsmartycodes.php';
-class AdminTemplates extends HtmlSmartyCodes
-{
- /*
- * @public function constructor
- * @param null
- */
- public function __construct() {
- $this->tdmcfile = TDMCreateFile::getInstance();
- }
- /*
- * @static function &getInstance
- * @param null
- */
- public static function &getInstance()
- {
- static $instance = false;
- if (!$instance) {
- $instance = new self();
- }
- return $instance;
- }
- /*
- * @public function write
- * @param string $module
- * @param mixed $table
- */
- public function write($module) {
- $this->setModule($module);
- }
- /*
- * @public function render
- * @param null
- */
- public function renderFile($filename) {
- $module = $this->getModule();
- //$filename = $this->getFileName();
- $module_name = $module->getVar('mod_name');
- $language = $this->getLanguage($module_name, 'AM');
- $content = 'Under Construction';
- $this->tdmcfile->create($module_name, 'templates/admin', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
- return $this->tdmcfile->renderFile();
- }
-}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-06-16 23:34:06 UTC (rev 12614)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-06-17 15:00:33 UTC (rev 12615)
@@ -217,9 +217,9 @@
$adminPages->write($module, $table);
$ret[] = $adminPages->renderFile($table_name.'.php');
// Admin Templates File
- $adminTemplates = AdminTemplates::getInstance();
- $adminTemplates->write($module);
- $ret[] = $adminTemplates->renderFile($table_name.'.tpl');
+ $adminTemplatesPages = TemplatesAdminPages::getInstance();
+ $adminTemplatesPages->write($module, $table);
+ $ret[] = $adminTemplatesPages->renderFile($table_name.'.tpl');
}
// Creation of blocks
if ( $table_blocks == 1) {
@@ -229,9 +229,9 @@
$ret[] = $blocksFiles->renderFile($table_name.'.php');
}
// Blocks Templates File
- $blocksTemplates = BlocksTemplates::getInstance();
+ /*$blocksTemplates = BlocksTemplates::getInstance();
$blocksTemplates->write($module, $table);
- $ret[] = $blocksTemplates->renderFile($table_name.'.tpl');
+ $ret[] = $blocksTemplates->renderFile($table_name.'.tpl');*/
// Creation of classes
if ( $table_admin == 1 || $table_user == 1) {
// Class Files
@@ -246,9 +246,9 @@
$userPages->write($module, $table);
$ret[] = $userPages->renderFile($table_name.'.php');
// User Templates File
- $userTemplates = UserTemplates::getInstance();
- $userTemplates->write($module, $table);
- $ret[] = $userTemplates->renderFile($table_name.'.tpl');
+ $userTemplatesPages = TemplatesUserPages::getInstance();
+ $userTemplatesPages->write($module, $table);
+ $ret[] = $userTemplatesPages->renderFile($table_name.'.tpl');
}
/*var_dump($table_name); */
}
@@ -296,6 +296,22 @@
$languageAdmin = LanguageAdmin::getInstance();
$languageAdmin->write($module, $tables, 'admin.php');
$ret[] = $languageAdmin->render();
+ // Templates Index File
+ $adminTemplatesAbout = TemplatesAdminAbout::getInstance();
+ $adminTemplatesAbout->write($module, 'about.tpl');
+ $ret[] = $adminTemplatesAbout->render();
+ // Templates Index File
+ $adminTemplatesIndex = TemplatesAdminIndex::getInstance();
+ $adminTemplatesIndex->write($module, 'index.tpl');
+ $ret[] = $adminTemplatesIndex->render();
+ // Templates Footer File
+ $adminTemplatesFooter = TemplatesAdminFooter::getInstance();
+ $adminTemplatesFooter->write($module, 'footer.tpl');
+ $ret[] = $adminTemplatesFooter->render();
+ // Templates Header File
+ $adminTemplatesHeader = TemplatesAdminHeader::getInstance();
+ $adminTemplatesHeader->write($module, 'header.tpl');
+ $ret[] = $adminTemplatesHeader->render();
}
// Creation of notifications files
if ( $table_notifications == 1 ) {
@@ -348,9 +364,17 @@
// Creation of user files
if ( ($table_user == 1)){
// Templates Index File
- $templatesIndex = TemplatesIndex::getInstance();
- $templatesIndex->write($module, 'index.tpl');
- $ret[] = $templatesIndex->render();
+ $userTemplatesIndex = TemplatesUserIndex::getInstance();
+ $userTemplatesIndex->write($module, 'index.tpl');
+ $ret[] = $userTemplatesIndex->render();
+ // Templates Footer File
+ $userTemplatesFooter = TemplatesUserFooter::getInstance();
+ $userTemplatesFooter->write($module, $table, 'footer.tpl');
+ $ret[] = $userTemplatesFooter->render();
+ // Templates Header File
+ $userTemplatesHeader = TemplatesUserHeader::getInstance();
+ $userTemplatesHeader->write($module, $tables, 'header.tpl');
+ $ret[] = $userTemplatesHeader->render();
// User Footer File
$userFooter = UserFooter::getInstance();
$userFooter->write($module, 'footer.php');
@@ -364,15 +388,7 @@
$userNotificationUpdate = UserNotificationUpdate::getInstance();
$userNotificationUpdate->write($module, 'notification_update.php');
$ret[] = $userNotificationUpdate->render();
- }
- // Templates Footer File
- $templatesFooter = TemplatesFooter::getInstance();
- $templatesFooter->write($module, $table, 'footer.tpl');
- $ret[] = $templatesFooter->render();
- // Templates Header File
- $templatesHeader = TemplatesHeader::getInstance();
- $templatesHeader->write($module, $tables, 'header.tpl');
- $ret[] = $templatesHeader->render();
+ }
// User Index File
$userIndex = UserIndex::getInstance();
$userIndex->write($module, 'index.php');
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/htmlsmartycodes.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/htmlsmartycodes.php 2014-06-16 23:34:06 UTC (rev 12614)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/htmlsmartycodes.php 2014-06-17 15:00:33 UTC (rev 12615)
@@ -23,6 +23,13 @@
class HtmlSmartyCodes extends TDMCreateFile
{
/*
+ * @public function constructor
+ * @param null
+ */
+ public function __construct() {
+ parent::__construct();
+ }
+ /*
* @static function &getInstance
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/admin.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/admin.php 2014-06-16 23:34:06 UTC (rev 12614)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/admin.php 2014-06-17 15:00:33 UTC (rev 12615)
@@ -16,17 +16,17 @@
* @package tdmcreate
* @since 2.5.0
* @author Txmod Xoops http://www.txmodxoops.org
- * @version $Id: language_admin.php 12258 2014-01-02 09:33:29Z timgno $
+ * @version $Id: admin.php 12258 2014-01-02 09:33:29Z timgno $
*/
defined('XOOPS_ROOT_PATH') or die('Restricted access');
-class LanguageAdmin extends TDMCreateFormElements
+class LanguageAdmin extends TDMCreateFile
{
/*
* @public function constructor
* @param null
*/
- public function __construct() {
+ public function __construct() {
parent::__construct();
$this->tdmcfile = TDMCreateFile::getInstance();
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/blocks.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/blocks.php 2014-06-16 23:34:06 UTC (rev 12614)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/blocks.php 2014-06-17 15:00:33 UTC (rev 12615)
@@ -16,7 +16,7 @@
* @package tdmcreate
* @since 2.5.0
* @author Txmod Xoops http://www.txmodxoops.org
- * @version $Id: language_blocks.php 12258 2014-01-02 09:33:29Z timgno $
+ * @version $Id: blocks.php 12258 2014-01-02 09:33:29Z timgno $
*/
defined('XOOPS_ROOT_PATH') or die('Restricted access');
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/about.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/about.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/about.php 2014-06-17 15:00:33 UTC (rev 12615)
@@ -0,0 +1,73 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: 1.91 about.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class TemplatesAdminAbout extends TDMCreateFile
+{
+ /*
+ * @public function constructor
+ * @param null
+ */
+ public function __construct() {
+ $this->tdmcfile = TDMCreateFile::getInstance();
+ }
+ /*
+ * @static function &getInstance
+ * @param string $module
+ * @param string $filename
+ */
+ public static function &getInstance()
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self();
+ }
+ return $instance;
+ }
+ /*
+ * @public function write
+ * @param string $module
+ * @param string $filename
+ */
+ public function write($module, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ }
+ /*
+ * @public function render
+ * @param null
+ */
+ public function render() {
+ $module = $this->getModule();
+ $filename = $this->getFileName();
+ $module_name = strtolower($module->getVar('mod_name'));
+ $content = <<<EOT
+<!-- Header -->
+<{includeq file="db:header.tpl"}>
+<!-- About Page -->
+<div class="top"><{\$about}></div>
+<!-- Footer -->
+<{includeq file="db:footer.tpl"}>
+EOT;
+ $this->tdmcfile->create($module_name, 'templates/admin', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
+ return $this->tdmcfile->renderFile();
+ }
+}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/footer.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/footer.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/footer.php 2014-06-17 15:00:33 UTC (rev 12615)
@@ -0,0 +1,76 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: 1.91 footer.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class TemplatesAdminFooter extends TDMCreateFile
+{
+ /*
+ * @public function constructor
+ * @param null
+ */
+ public function __construct() {
+ $this->tdmcfile = TDMCreateFile::getInstance();
+ }
+ /*
+ * @static function &getInstance
+ * @param string $module
+ * @param string $filename
+ */
+ public static function &getInstance()
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self();
+ }
+ return $instance;
+ }
+ /*
+ * @public function write
+ * @param string $module
+ * @param string $filename
+ */
+ public function write($module, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ }
+ /*
+ * @public function render
+ * @param null
+ */
+ public function render() {
+ $module = $this->getModule();
+ $filename = $this->getFileName();
+ $module_name = strtolower($module->getVar('mod_name'));
+ $support_name = $module->getVar('mod_support_name');
+ $support_url = $module->getVar('mod_support_url');
+ $language = $this->getLanguage($module_name, 'AM');
+ $content = <<<EOT
+<div class='center'>
+ <a href='http://www.xoops.org' title='Visit XOOPS' target='_blank'><img src='<{xoModuleIcons32 xoopsmicrobutton.gif}>' alt='XOOPS' /></a>
+</div>
+<div class='center smallsmall italic pad5'><strong>{$module_name}</strong> <{{$language}MAINTAINEDBY}>
+ <a href='{$support_url}' title='Visit {$support_name}' class='tooltip' rel='external'>{$support_name}</a>
+</div>
+EOT;
+ $this->tdmcfile->create($module_name, 'templates/admin', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
+ return $this->tdmcfile->renderFile();
+ }
+}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/header.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/header.php 2014-06-17 15:00:33 UTC (rev 12615)
@@ -0,0 +1,71 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: 1.91 header.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class TemplatesAdminHeader extends TDMCreateFile
+{
+ /*
+ * @public function constructor
+ * @param null
+ */
+ public function __construct() {
+ $this->tdmcfile = TDMCreateFile::getInstance();
+ }
+ /*
+ * @static function &getInstance
+ * @param string $module
+ * @param string $filename
+ */
+ public static function &getInstance()
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self();
+ }
+ return $instance;
+ }
+ /*
+ * @public function write
+ * @param string $module
+ * @param string $filename
+ */
+ public function write($module, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ }
+ /*
+ * @public function render
+ * @param null
+ */
+ public function render() {
+ $module = $this->getModule();
+ $filename = $this->getFileName();
+ $module_name = strtolower($module->getVar('mod_name'));
+ $content = <<<EOT
+<div class="top">
+<span class="left"><{\$navigation}></span>
+<{if \$buttons}><span class="right"><{\$buttons}> </span><{/if}>
+</div>
+EOT;
+ $this->tdmcfile->create($module_name, 'templates/admin', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
+ return $this->tdmcfile->renderFile();
+ }
+}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/index.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/index.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/index.php 2014-06-17 15:00:33 UTC (rev 12615)
@@ -0,0 +1,73 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: 1.91 index.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class TemplatesAdminIndex extends TDMCreateFile
+{
+ /*
+ * @public function constructor
+ * @param null
+ */
+ public function __construct() {
+ $this->tdmcfile = TDMCreateFile::getInstance();
+ }
+ /*
+ * @static function &getInstance
+ * @param string $module
+ * @param string $filename
+ */
+ public static function &getInstance()
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self();
+ }
+ return $instance;
+ }
+ /*
+ * @public function write
+ * @param string $module
+ * @param string $filename
+ */
+ public function write($module, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ }
+ /*
+ * @public function render
+ * @param null
+ */
+ public function render() {
+ $module = $this->getModule();
+ $filename = $this->getFileName();
+ $module_name = strtolower($module->getVar('mod_name'));
+ $content = <<<EOT
+<!-- Header -->
+<{includeq file="db:header.tpl"}>
+<!-- Index Page -->
+<div class="top"><{\$index}></div>
+<!-- Footer -->
+<{includeq file="db:footer.tpl"}>
+EOT;
+ $this->tdmcfile->create($module_name, 'templates/admin', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
+ return $this->tdmcfile->renderFile();
+ }
+}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/pages.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/pages.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/pages.php 2014-06-17 15:00:33 UTC (rev 12615)
@@ -0,0 +1,130 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: pages.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+require_once TDMC_PATH . '/class/files/htmlsmartycodes.php';
+class TemplatesAdminPages extends HtmlSmartyCodes
+{
+ /*
+ * @public function constructor
+ * @param null
+ */
+ public function __construct() {
+ parent::__construct();
+ $this->tdmcfile = TDMCreateFile::getInstance();
+ }
+ /*
+ * @static function &getInstance
+ * @param null
+ */
+ public static function &getInstance()
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self();
+ }
+ return $instance;
+ }
+ /*
+ * @public function write
+ * @param string $module
+ * @param string $table
+ */
+ public function write($module, $table) {
+ $this->setModule($module);
+ $this->setTable($table);
+ }
+ /*
+ * @public function render
+ * @param null
+ */
+ public function renderFile($filename) {
+ $module = $this->getModule();
+ $table = $this->getTable();
+ $module_name = $module->getVar('mod_name');
+ $table_name = $table->getVar('table_name');
+ $table_fieldname = $table->getVar('table_fieldname');
+ //
+ $stu_module_name = strtoupper($module_name);
+ $language = $this->getLanguage($module_name, 'MA');
+ $content = <<<EOT
+<{include file="db:header.tpl"}>
+<div class="outer">
+ <table class="{$table_name} width100">
+ <thead>
+ <tr class="head">\n
+EOT;
+ $fields = $this->getTableFields($table->getVar('table_id'));
+ foreach(array_keys($fields) as $f)
+ {
+ $field_name = $fields[$f]->getVar('field_name');
+ $lang_fn = $language.strtoupper($field_name);
+ $content .= <<<EOT
+ <th class="center"><{\$smarty.const.{$lang_fn}}></th>\n
+EOT;
+ }
+ $content .= <<<EOT
+ </tr>
+ </thead>
+ <tbody>
+ <{foreach item={$table_fieldname} from=\${$table_name}}>
+ <tr class="<{cycle values='odd, even'}>">\n
+EOT;
+ foreach(array_keys($fields) as $f)
+ {
+ $field_name = $fields[$f]->getVar('field_name');
+ $field_element = $fields[$f]->getVar('field_element');
+ $rp_field_name = $field_name;
+ if(strpos($field_name, '_')) {
+ $str = strpos($field_name, '_');
+ if($str !== false){
+ $rp_field_name = substr($field_name, $str + 1, strlen($field_name));
+ }
+ }
+ if( $field_element == 9 ) {
+ $content .= <<<EOT
+ <td class="center"><img src="<{\$xoops_url}>/uploads/{$module_name}/images/{$table_name}/<{\${$table_fieldname}.{$rp_field_name}}>" alt="{$table_name}"></td>\n
+EOT;
+ } elseif( $field_element == 8 ) {
+ $content .= <<<EOT
+ <td class="center"><span style="background-color: <{\${$table_fieldname}.{$rp_field_name}}>;"> </span></td>\n
+EOT;
+ } else {
+ $content .= <<<EOT
+ <td class="center"><{\${$table_fieldname}.{$rp_field_name}}></td>\n
+EOT;
+ }
+ }
+ $content .= <<<EOT
+ </tr>
+ <{/foreach}>
+ </tbody>
+ </table>
+</div>
+<div class="outer">
+ <div class="center">None</div>
+ <br />
+</div>
+<{include file="db:footer.tpl"}>
+EOT;
+ $this->tdmcfile->create($module_name, 'templates/admin', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
+ return $this->tdmcfile->renderFile();
+ }
+}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/footer.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/footer.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/footer.php 2014-06-17 15:00:33 UTC (rev 12615)
@@ -0,0 +1,109 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: templates_footer.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class TemplatesUserFooter extends HtmlSmartyCodes
+{
+ /*
+ * @public function constructor
+ * @param null
+ */
+ public function __construct() {
+ $this->tdmcfile = TDMCreateFile::getInstance();
+ }
+
+ /*
+ * @static function &getInstance
+ * @param null
+ */
+ public static function &getInstance()
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self();
+ }
+ return $instance;
+ }
+ /*
+ * @public function write
+ * @param string $module
+ * @param mixed $table
+ * @param string $filename
+ */
+ public function write($module, $table, $filename) {
+ $this->setModule($module);
+ $this->setTable($table);
+ $this->setFileName($filename);
+ }
+ /*
+ * @public function render
+ * @param null
+ */
+ public function render() {
+ $module = $this->getModule();
+ $table = $this->getTable();
+ $filename = $this->getFileName();
+ $module_name = $module->getVar('mod_name');
+ $language = $this->getLanguage($module_name, 'MA');
+ $content = <<<EOT
+<{if \$bookmarks != 0}>
+<{include file="db:system_bookmarks.html"}>
+<{/if}>
+\n<{if \$fbcomments != 0}>
+<{include file="db:system_fbcomments.html"}>
+<{/if}>
+\n<div class="left"><{\$copyright}></div>
+EOT;
+ if( $table->getVar('table_name') != null ) {
+ $content .= <<<EOT
+\n<{if \$pagenav != ''}>
+ <div class="right"><{\$pagenav}></div>
+<{/if}>
+<br />
+EOT;
+ }
+ $content .= <<<EOT
+\n<{if \$xoops_isadmin}>
+ <div class="center bold"><a href="<{\$admin}>"><{\$smarty.const.{$language}ADMIN}></a></div>
+<{/if}>
+EOT;
+ if ( ($module->getVar('mod_comments') != 0) && ($table->getVar('table_comments') != 0) ) {
+ $content .= <<<EOT
+\n<div class="pad2 marg2">
+ <{if \$comment_mode == "flat"}>
+ <{include file="db:system_comments_flat.html"}>
+ <{elseif \$comment_mode == "thread"}>
+ <{include file="db:system_comments_thread.html"}>
+ <{elseif \$comment_mode == "nest"}>
+ <{include file="db:system_comments_nest.html"}>
+ <{/if}>
+</div>
+EOT;
+ }
+ if ( ($module->getVar('mod_notifications') != 0) && ($table->getVar('table_notifications') != 0) ) {
+ $content .= <<<EOT
+\n<{include file='db:system_notification_select.html'}>
+EOT;
+ }
+ $this->tdmcfile->create($module_name, 'templates', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
+ return $this->tdmcfile->renderFile();
+ }
+}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/header.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/header.php 2014-06-17 15:00:33 UTC (rev 12615)
@@ -0,0 +1,112 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: templates_header.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class TemplatesUserHeader extends HtmlSmartyCodes
+{
+ /*
+ * @public function constructor
+ * @param null
+ */
+ public function __construct() {
+ $this->tdmcfile = TDMCreateFile::getInstance();
+ }
+
+ /*
+ * @static function &getInstance
+ * @param null
+ */
+ public static function &getInstance()
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self();
+ }
+ return $instance;
+ }
+ /*
+ * @public function write
+ * @param string $module
+ * @param mixed $tables
+ * @param string $filename
+ */
+ public function write($module, $tables, $filename) {
+ $this->setModule($module);
+ $this->setTables($tables);
+ $this->setFileName($filename);
+ }
+ /*
+ * @public function render
+ * @param null
+ */
+ public function render() {
+ $module = $this->getModule();
+ $tables = $this->getTables();
+ $filename = $this->getFileName();
+ $module_name = strtolower($module->getVar('mod_name'));
+ $language = $this->getLanguage($module_name, 'MA');
+ $content = <<<EOT
+<div class="header">
+<span class="left"><b><{\$smarty.const.{$language}TITLE}></b>: </span>
+<span class="left"><{\$smarty.const.{$language}DESC}></span><br />
+</div>
+<div class="head">
+ <{if \$adv != ''}>
+ <div class="center"><{\$adv}></div>
+ <{/if}>
+</div>
+<table class="outer {$module_name}" cellspacing="2" cellpadding="2">
+ <thead>
+ <tr class="center" colspan="2">
+ <th><{\$smarty.const.{$language}TITLE}> - <{\$smarty.const.{$language}DESC}></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr class="center">
+ <td class="center bold pad5">
+ <ul class="menu center fields">
+ <li><a href="<{\${$module_name}_url}>"><{\$smarty.const.{$language}INDEX}></a></li>\n
+EOT;
+ foreach (array_keys($tables) as $i)
+ {
+ $table_name = $tables[$i]->getVar('table_name');
+ $stu_table_name = strtoupper($table_name);
+ $content .= <<<EOT
+ <li> | </li>
+ <li><a href="<{\${$module_name}_url}>/{$table_name}.php"><{\$smarty.const.{$language}{$stu_table_name}}></a></li>\n
+EOT;
+ }
+ $content .= <<<EOT
+ </ul>
+ </td>
+ </tr>
+ <{if \$adv != ''}>
+ <tr class="center"><td class="center bold pad5"><{\$adv}></td></tr>
+ <{else}>
+ <tr class="center"><td class="center bold pad5"> </td></tr>
+ <{/if}>
+ </tbody>
+</table>
+EOT;
+ $this->tdmcfile->create($module_name, 'templates', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
+ return $this->tdmcfile->renderFile();
+ }
+}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/index.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/index.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/index.php 2014-06-17 15:00:33 UTC (rev 12615)
@@ -0,0 +1,77 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: templates_index.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class TemplatesUserIndex extends HtmlSmartyCodes
+{
+ /*
+ * @public function constructor
+ * @param null
+ */
+ public function __construct() {
+ $this->tdmcfile = TDMCreateFile::getInstance();
+ }
+
+ /*
+ * @static function &getInstance
+ * @param null
+ */
+ public static function &getInstance()
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self();
+ }
+ return $instance;
+ }
+ /*
+ * @public function write
+ * @param string $module
+ * @param string $filename
+ */
+ public function write($module, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ }
+ /*
+ * @public function render
+ * @param null
+ */
+ public function render() {
+ $module = $this->getModule();
+ $filename = $this->getFileName();
+ $module_name = $module->getVar('mod_name');
+ $language = $this->getLanguage($module_name, 'MA');
+ $content = <<<EOT
+<{include file="db:header.tpl"}>
+<table class="outer {$module_name}">
+ <tbody>
+ <tr class="left">
+ <td class="pad5"><{\$smarty.const.{$language}INDEX_DESC}></td>
+ </tr>
+ </tbody>
+</table>
+<{include file="db:footer.tpl"}>
+EOT;
+ $this->tdmcfile->create($module_name, 'templates', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
+ return $this->tdmcfile->renderFile();
+ }
+}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/pages.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/pages.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/pages.php 2014-06-17 15:00:33 UTC (rev 12615)
@@ -0,0 +1,133 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: pages.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class TemplatesUserPages extends TDMCreateFile
+{
+ /*
+ * @public function constructor
+ * @param null
+ */
+ public function __construct() {
+ parent::__construct();
+ $this->tdmcfile = TDMCreateFile::getInstance();
+ }
+ /*
+ * @static function &getInstance
+ * @param null
+ */
+ public static function &getInstance()
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self();
+ }
+ return $instance;
+ }
+ /*
+ * @public function write
+ * @param string $module
+ * @param string $table
+ * @param string $filename
+ */
+ public function write($module, $table) {
+ $this->setModule($module);
+ $this->setTable($table);
+ }
+ /*
+ * @public function renderFile
+ * @param string $filename
+ */
+ public function renderFile($filename) {
+ $module = $this->getModule();
+ $table = $this->getTable();
+ $module_name = $module->getVar('mod_name');
+ $table_name = $table->getVar('table_name');
+ $table_fieldname = $table->getVar('table_fieldname');
+ //$filename = $this->getFileName();
+ $language = $this->getLanguage($module_name, 'MA');
+ $content = <<<EOT
+<div class="outer">
+ <table class="{$table_name}" cellpadding="0" cellspacing="0" width="100%">
+ <tr class="head">\n
+EOT;
+ $fields = $this->getTableFields($table->getVar('table_id'));
+ foreach(array_keys($fields) as $f)
+ {
+ $field_name = $fields[$f]->getVar('field_name');
+ if(($f == 0) && ($table->getVar('table_autoincrement') == 1)) {
+ $fpif = $field_name;
+ }
+ if($fields[$f]->getVar('field_main') == 1) {
+ $fpmf = $field_name;
+ }
+ $lang_stu_field_name = $language.strtoupper($field_name);
+ $content .= <<<EOT
+ <th class="center"><{\$smarty.const.{$lang_stu_field_name}}></th>\n
+EOT;
+ }
+ $content .= <<<EOT
+ </tr>
+ <{foreach item={$table_fieldname} from=\${$table_name}}>
+ <tr class="<{cycle values=\'odd, even\'}>">\n
+EOT;
+ foreach(array_keys($fields) as $f)
+ {
+ $field_name = $fields[$f]->getVar('field_name');
+ $field_element = $fields[$f]->getVar('field_element');
+ $rp_field_name = $field_name;
+ if(strpos($field_name, '_')) {
+ $str = strpos($field_name, '_');
+ if($str !== false){
+ $rp_field_name = substr($field_name, $str + 1, strlen($field_name));
+ }
+ }
+ if( $field_element == 9 ) {
+ $content .= <<<EOT
+ <td class="center"><img src="<{\$xoops_url}>/uploads/{$mod_name}/images/{$table_name}/<{\${$table_fieldname}.{$rp_field_name}}>" alt="{$table_name}"></td>\n
+EOT;
+ } elseif( $field_element == 8 ) {
+ $content .= <<<EOT
+ <td class="center"><span style="background-color: <{\${$table_fieldname}.{$rp_field_name}}>;"> </span></td>\n
+EOT;
+ } else {
+ $content .= <<<EOT
+ <td class="center"><{\${$table_fieldname}.{$field_name}}></td>\n
+EOT;
+ }
+ }
+ $content .= <<<EOT
+ </tr>
+ <{/foreach}>
+ </table>
+</div>
+<div class="outer">
+ <div class="center">None</div>
+ <br />
+</div>
+EOT;
+ $content .= <<<EOT
+<{include file="db:footer.tpl"}>
+EOT;
+ $this->tdmcfile->create($module_name, 'templates', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
+ return $this->tdmcfile->renderFile();
+ }
+}
\ No newline at end of file
Deleted: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/templates.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/templates.php 2014-06-16 23:34:06 UTC (rev 12614)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/templates.php 2014-06-17 15:00:33 UTC (rev 12615)
@@ -1,123 +0,0 @@
-<?php
-/*
- You may not change or alter any portion of this comment or credits
- of supporting developers from this source code or any supporting source code
- which is considered copyrighted (c) material of the original comment or credit authors.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-/**
- * tdmcreate module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
- * @package tdmcreate
- * @since 2.5.0
- * @author Txmod Xoops http://www.txmodxoops.org
- * @version $Id: user_templates.php 12258 2014-01-02 09:33:29Z timgno $
- */
-defined('XOOPS_ROOT_PATH') or die('Restricted access');
-
-class UserTemplates extends HtmlSmartyCodes
-{
- /*
- * @public function constructor
- * @param null
- */
- public function __construct() {
- parent::__construct();
- $this->tdmcfile = TDMCreateFile::getInstance();
- }
- /*
- * @static function &getInstance
- * @param null
- */
- public static function &getInstance()
- {
- static $instance = false;
- if (!$instance) {
- $instance = new self();
- }
- return $instance;
- }
- /*
- * @public function write
- * @param string $module
- * @param string $table
- */
- public function write($module, $table) {
- $this->setModule($module);
- $this->setTable($table);
- }
- /*
- * @public function render
- * @param null
- */
- public function renderFile($filename) {
- $module = $this->getModule();
- $table = $this->getTable();
- $module_name = $module->getVar('mod_name');
- $table_name = $table->getVar('table_name');
- $table_fieldname = $table->getVar('table_fieldname');
- //
- $stu_module_name = strtoupper($module_name);
- $language = $this->getLanguage($module_name, 'MA');
- $content = <<<EOT
-<{include file="db:header.tpl"}>
-<div class="outer">
- <table class="{$table_name} width100">
- <thead>
- <tr class="head">\n
-EOT;
- $fields = $this->getTableFields($table->getVar('table_id'));
- foreach(array_keys($fields) as $f)
- {
- $field_name = $fields[$f]->getVar('field_name');
- $lang_fn = $language.strtoupper($field_name);
- $content .= <<<EOT
- <th class="center"><{\$smarty.const.{$lang_fn}}></th>\n
-EOT;
- }
- $content .= <<<EOT
- </tr>
- </thead>
- <tbody>
- <{foreach item={$table_fieldname} from=\${$table_name}}>
- <tr class="<{cycle values='odd, even'}>">\n
-EOT;
- foreach(array_keys($fields) as $f)
- {
- $field_name = $fields[$f]->getVar('field_name');
- $field_element = $fields[$f]->getVar('field_element');
- if( $field_element == 9 ) {
- $content .= <<<EOT
- <td class="center"><img src="<{\$xoops_url}>/uploads/{$module_name}/images/{$table_name}/<{\${$table_fieldname}.{$field_name}}>" alt="{$table_name}"></td>\n
-EOT;
- } elseif( $field_element == 8 ) {
- $content .= <<<EOT
- <td class="center"><span style="background-color: <{\${$table_fieldname}.{$field_name}}>;"> </span></td>\n
-EOT;
- } else {
- $content .= <<<EOT
- <td class="center"><{\${$table_fieldname}.{$field_name}}></td>\n
-EOT;
- }
- }
- $content .= <<<EOT
- </tr>
- <{/foreach}>
- </tbody>
- </table>
-</div>
-<div class="outer">
- <div class="center">None</div>
- <br />
-</div>
-<{include file="db:footer.tpl"}>
-EOT;
- $this->tdmcfile->create($module_name, 'templates', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
- return $this->tdmcfile->renderFile();
- }
-}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/common.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/common.php 2014-06-16 23:34:06 UTC (rev 12614)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/common.php 2014-06-17 15:00:33 UTC (rev 12615)
@@ -48,7 +48,9 @@
$cfi = '/class/files/include/';
$cfl = '/class/files/language/';
$cfs = '/class/files/sql/';
-$cft = '/class/files/templates/';
+$cft = '/class/files/templates/user/';
+$cfta = '/class/files/templates/admin/';
+$cftb = '/class/files/templates/blocks/';
$cfu = '/class/files/user/';
include_once TDMC_PATH . '/class/helper.php';
include_once TDMC_PATH . '/class/session.php';
@@ -60,9 +62,7 @@
include_once TDMC_PATH . $cfa .'menu.php';
include_once TDMC_PATH . $cfa .'pages.php';
include_once TDMC_PATH . $cfa .'permissions.php';
-include_once TDMC_PATH . $cfa .'templates.php';
include_once TDMC_PATH . $cfb .'blocks.php';
-include_once TDMC_PATH . $cfb .'templates.php';
include_once TDMC_PATH . $cfcl .'classes.php';
include_once TDMC_PATH . $cfcl .'helper.php';
include_once TDMC_PATH . $cfcs .'styles.php';
@@ -81,13 +81,18 @@
include_once TDMC_PATH . $cfl .'main.php';
include_once TDMC_PATH . $cfl .'modinfo.php';
include_once TDMC_PATH . $cfs .'mysql.php';
+include_once TDMC_PATH . $cfta .'about.php';
+include_once TDMC_PATH . $cfta .'header.php';
+include_once TDMC_PATH . $cfta .'index.php';
+include_once TDMC_PATH . $cfta .'footer.php';
+include_once TDMC_PATH . $cfta .'pages.php';
include_once TDMC_PATH . $cft .'header.php';
include_once TDMC_PATH . $cft .'index.php';
include_once TDMC_PATH . $cft .'footer.php';
+include_once TDMC_PATH . $cft .'pages.php';
include_once TDMC_PATH . $cfu .'footer.php';
include_once TDMC_PATH . $cfu .'header.php';
include_once TDMC_PATH . $cfu .'index.php';
include_once TDMC_PATH . $cfu .'pages.php';
include_once TDMC_PATH . $cfu .'notification_update.php';
-include_once TDMC_PATH . $cfu .'templates.php';
include_once TDMC_PATH . $cfu .'xoopsversion.php';
\ No newline at end of file
|