You can subscribe to this list here.
| 2012 |
Jan
|
Feb
(214) |
Mar
(139) |
Apr
(198) |
May
(187) |
Jun
(151) |
Jul
(210) |
Aug
(169) |
Sep
(58) |
Oct
(53) |
Nov
(54) |
Dec
(301) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2013 |
Jan
(348) |
Feb
(178) |
Mar
(219) |
Apr
(154) |
May
(117) |
Jun
(194) |
Jul
(61) |
Aug
(132) |
Sep
(121) |
Oct
(110) |
Nov
(11) |
Dec
(18) |
| 2014 |
Jan
(34) |
Feb
(50) |
Mar
(82) |
Apr
(98) |
May
(39) |
Jun
(111) |
Jul
(67) |
Aug
(36) |
Sep
(33) |
Oct
(26) |
Nov
(53) |
Dec
(44) |
| 2015 |
Jan
(29) |
Feb
(47) |
Mar
(25) |
Apr
(19) |
May
(23) |
Jun
(20) |
Jul
(49) |
Aug
(7) |
Sep
(10) |
Oct
(10) |
Nov
(4) |
Dec
(25) |
| 2016 |
Jan
(8) |
Feb
(7) |
Mar
(1) |
Apr
|
May
(3) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(7) |
Dec
(5) |
| 2017 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(15) |
Jun
|
Jul
(18) |
Aug
(24) |
Sep
|
Oct
(14) |
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
(22) |
Mar
|
Apr
(11) |
May
(1) |
Jun
(17) |
Jul
(2) |
Aug
(2) |
Sep
|
Oct
(6) |
Nov
(5) |
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <be...@us...> - 2014-06-14 13:32:10
|
Revision: 12592
http://sourceforge.net/p/xoops/svn/12592
Author: beckmi
Date: 2014-06-14 13:32:08 +0000 (Sat, 14 Jun 2014)
Log Message:
-----------
Adding icons
Added Paths:
-----------
XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/32/playlist.png
XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/32/upload.png
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/32/playlist.png
===================================================================
(Binary files differ)
Index: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/32/playlist.png
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/32/playlist.png 2014-06-14 13:04:04 UTC (rev 12591)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/32/playlist.png 2014-06-14 13:32:08 UTC (rev 12592)
Property changes on: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/32/playlist.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/32/upload.png
===================================================================
(Binary files differ)
Index: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/32/upload.png
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/32/upload.png 2014-06-14 13:04:04 UTC (rev 12591)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/32/upload.png 2014-06-14 13:32:08 UTC (rev 12592)
Property changes on: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/32/upload.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
|
|
From: <txm...@us...> - 2014-06-14 13:04:14
|
Revision: 12591
http://sourceforge.net/p/xoops/svn/12591
Author: txmodxoops
Date: 2014-06-14 13:04:04 +0000 (Sat, 14 Jun 2014)
Log Message:
-----------
- Fixed bugs
- Updated
- Work in progress
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/modinfo.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/xoopsversion.php
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/blocks/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/blocks/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/index.html
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php 2014-06-14 12:33:34 UTC (rev 12590)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php 2014-06-14 13:04:04 UTC (rev 12591)
@@ -19,16 +19,16 @@
* @version $Id: building.php 12258 2014-01-02 09:33:29Z timgno $
*/
include 'header.php';
-$op = TDMCreateRequest::getString('op', 'default');
-$mid = TDMCreateRequest::getInt('mod_id');
-$repObj = $tdmcreate->getHandler('modules')->get( $mid );
+$op = XoopsRequest::getString('op', 'default');
+$mid = XoopsRequest::getInt('mod_id');
+$moduleObj = $tdmcreate->getHandler('modules')->get( $mid );
//
switch ($op) {
case 'build':
$template_main = 'building.tpl';
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('building.php'));
// Get var module name
- $mod_name = $repObj->getVar('mod_name');
+ $mod_name = $moduleObj->getVar('mod_name');
// Directories for copy from to
$from_dir = TDMC_UPLOAD_REPOSITORY_PATH.'/'.strtolower($mod_name);
$to_dir = XOOPS_ROOT_PATH.'/modules/'.strtolower($mod_name);
@@ -48,7 +48,7 @@
$handler->getPath( TDMC_PATH );
$handler->getUploadPath( TDMC_UPLOAD_PATH );
// Creation of the structure of folders and files
- $base_architecture = $handler->createBaseFoldersFiles( $repObj );
+ $base_architecture = $handler->createBaseFoldersFiles( $moduleObj );
if($base_architecture !== false) {
$GLOBALS['xoopsTpl']->assign('base_architecture', true);
} else {
@@ -56,7 +56,7 @@
}
// Get files
$build = array();
- $files = $handler->createFilesToBuilding( $repObj );
+ $files = $handler->createFilesToBuilding( $moduleObj );
foreach($files as $file) {
if($file) {
$build['list'] = $file;
@@ -67,7 +67,7 @@
// Directory to saved all files
$GLOBALS['xoopsTpl']->assign('building_directory', sprintf(_AM_TDMCREATE_BUILDING_DIRECTORY, str_replace(' ', '', strtolower($mod_name))));
// Copy this module in root modules
- if ( $repObj->getVar('mod_inroot_copy') == 1 ) {
+ if ( $moduleObj->getVar('mod_inroot_copy') == 1 ) {
TDMCreate_copyr($from_dir, $to_dir);
}
break;
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-06-14 12:33:34 UTC (rev 12590)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-06-14 13:04:04 UTC (rev 12591)
@@ -22,8 +22,6 @@
// Recovered value of arguments op in the URL $
$op = XoopsRequest::getString('op', 'list');
// Get fields Variables
-/*$field_id = TDMCreate_CleanVars($_REQUEST, 'field_id');*/
-$table_name = TDMCreate_CleanVars($_REQUEST, 'table_name', '', 'string');
$field_mid = TDMCreate_CleanVars($_REQUEST, 'field_mid');
$field_tid = TDMCreate_CleanVars($_REQUEST, 'field_tid');
$field_numb = TDMCreate_CleanVars($_REQUEST, 'field_numb');
@@ -37,12 +35,12 @@
$field_tid = $session_field->getSession('table_id');
$field_mid = $session_field->getSession('table_mid');
$field_name = $session_field->getSession('table_fieldname');
-$field_numb = $session_field->getSession('table_nbfields');
-$field_tid = $_SESSION['table_id'];
-$field_mid = $_SESSION['table_mid'];
-$table_name = $_SESSION['table_name'];
-$field_name = $_SESSION['table_fieldname'];
-$field_numb = $_SESSION['table_nbfields'];*/
+$field_numb = $session_field->getSession('table_nbfields');*/
+if(isset($_SESSION['session_table_name']) && !empty($_SESSION['session_table_name'])) {
+ $table_name = $_SESSION['session_table_name'];
+} else {
+ $table_name = TDMCreate_CleanVars($_REQUEST, 'table_name', '', 'string');
+}
//
switch ($op)
{
@@ -146,7 +144,12 @@
}
} else {
$GLOBALS['xoopsTpl']->assign('error', _AM_TDMCREATE_THEREARENT_FIELDS);
- }
+ }
+ var_dump($table_name);
+ var_dump($field_mid);
+ var_dump($field_tid);
+ var_dump($field_numb);
+ var_dump($field_name);
break;
case 'new':
@@ -163,6 +166,7 @@
$form = $fieldsObj->getForm($field_mid, $field_tid, $field_numb, $field_name);
$GLOBALS['xoopsTpl']->assign('form', $form->render());
+ var_dump($table_name);
var_dump($field_mid);
var_dump($field_tid);
var_dump($field_numb);
@@ -226,14 +230,16 @@
}
//
if ($fieldsObj->isNew()) {
- redirect_header('fields.php', 2, sprintf(_AM_TDMCREATE_FIELD_FORM_SAVED_OK, $_REQUEST['table_name']));
+ redirect_header('fields.php', 2, sprintf(_AM_TDMCREATE_FIELD_FORM_SAVED_OK, $table_name));
} else {
- redirect_header('fields.php', 2, sprintf(_AM_TDMCREATE_FIELD_FORM_UPDATED_OK, $_REQUEST['table_name']));
+ redirect_header('fields.php', 2, sprintf(_AM_TDMCREATE_FIELD_FORM_UPDATED_OK, $table_name));
}
//
$GLOBALS['xoopsTpl']->assign('error', $fieldsObj->getHtmlErrors());
$form = $fieldsObj->getForm($field_mid, $field_tid, $field_numb);
$GLOBALS['xoopsTpl']->assign('form', $form->render());
+
+ unset($_SESSION['session_table_name']);
break;
case 'edit':
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-06-14 12:33:34 UTC (rev 12590)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-06-14 13:04:04 UTC (rev 12591)
@@ -206,8 +206,10 @@
} else {
redirect_header('tables.php', 5, sprintf(_AM_TDMCREATE_TABLE_FORM_UPDATED_OK, $_POST['table_name']));
}
- }
+ }
+ $_SESSION['session_table_name'] = $_POST['table_name'];
+
$GLOBALS['xoopsTpl']->assign('error', $obj->getHtmlErrors());
$form = $obj->getForm();
$GLOBALS['xoopsTpl']->assign('form', $form->render());
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-06-14 12:33:34 UTC (rev 12590)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-06-14 13:04:04 UTC (rev 12591)
@@ -162,7 +162,7 @@
* @param object $form
* @param string $type
* @param integer $id
- * @param string $field_name
+ * @param string $f_name
* @param string $field_mid
* @param string $field_tid
* @param object $field
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-14 12:33:34 UTC (rev 12590)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-06-14 13:04:04 UTC (rev 12591)
@@ -109,18 +109,20 @@
$this->structure->makeDir($targetDirectory);
// Copied of index.html file in "root module" folder
$this->structure->copyFile('', $indexFile, 'index.html');
- if ( $table_admin == 1) {
- // Creation of "admin" folder and index.html file
- $this->structure->makeDirAndCopyFile('admin', $indexFile, 'index.html');
+ if(is_object($tables)) {
+ if ( $table_admin == 1) {
+ // Creation of "admin" folder and index.html file
+ $this->structure->makeDirAndCopyFile('admin', $indexFile, 'index.html');
+ }
+ if ( $table_blocks == 1) {
+ // Creation of "blocks" folder and index.html file
+ $this->structure->makeDirAndCopyFile('blocks', $indexFile, 'index.html');
+ }
+ if ( $table_name != null) {
+ // Creation of "class" folder and index.html file
+ $this->structure->makeDirAndCopyFile('class', $indexFile, 'index.html');
+ }
}
- if ( $table_blocks == 1) {
- // Creation of "blocks" folder and index.html file
- $this->structure->makeDirAndCopyFile('blocks', $indexFile, 'index.html');
- }
- if ( $table_name != null) {
- // Creation of "class" folder and index.html file
- $this->structure->makeDirAndCopyFile('class', $indexFile, 'index.html');
- }
// Creation of "assets" folder and index.html file
$this->structure->makeDirAndCopyFile('assets', $indexFile, 'index.html');
// Creation of "css" folder and index.html file
@@ -160,22 +162,24 @@
$this->structure->makeDirAndCopyFile('language/'.$GLOBALS['xoopsConfig']['language'], $indexFile, 'index.html');
// Creation of "language/local_language/help" folder and index.html file
$this->structure->makeDirAndCopyFile('language/'.$GLOBALS['xoopsConfig']['language']. '/help', $indexFile, 'index.html');
- if (( $table_user == 1) || ( $table_admin == 1 )) {
- // Creation of "templates" folder and index.html file
- $this->structure->makeDirAndCopyFile('templates', $indexFile, 'index.html');
+ if(is_object($tables)) {
+ if (( $table_user == 1) || ( $table_admin == 1 )) {
+ // Creation of "templates" folder and index.html file
+ $this->structure->makeDirAndCopyFile('templates', $indexFile, 'index.html');
+ }
+ if ( $table_admin == 1 ) {
+ // Creation of "templates/admin" folder and index.html file
+ $this->structure->makeDirAndCopyFile('templates/admin', $indexFile, 'index.html');
+ }
+ if ( $table_blocks == 1 ) {
+ // Creation of "templates/blocks" folder and index.html file
+ $this->structure->makeDirAndCopyFile('templates/blocks', $indexFile, 'index.html');
+ }
+ if ( $table_name != null ) {
+ // Creation of "sql" folder and index.html file
+ $this->structure->makeDirAndCopyFile('sql', $indexFile, 'index.html');
+ }
}
- if ( $table_admin == 1 ) {
- // Creation of "templates/admin" folder and index.html file
- $this->structure->makeDirAndCopyFile('templates/admin', $indexFile, 'index.html');
- }
- if ( $table_blocks == 1 ) {
- // Creation of "templates/blocks" folder and index.html file
- $this->structure->makeDirAndCopyFile('templates/blocks', $indexFile, 'index.html');
- }
- if ( $table_name != null ) {
- // Creation of "sql" folder and index.html file
- $this->structure->makeDirAndCopyFile('sql', $indexFile, 'index.html');
- }
}
/*
@@ -192,7 +196,7 @@
$tables = $this->tdmcreate->getHandler('tables')->getObjects($criteria_tables);
unset($criteria_tables);
$ret = array();
- //
+ //
foreach (array_keys($tables) as $t)
{
$table_mid = $tables[$t]->getVar('table_mid');
@@ -250,136 +254,156 @@
}
/*var_dump($table_name); */
}
- // Creation of blocks language file
- if ( $table_blocks == 1) {
- // Language Blocks File
- $languageBlocks = LanguageBlocks::getInstance();
- $languageBlocks->write($module, $tables, 'blocks.php');
- $ret[] = $languageBlocks->render();
- }
+ if(is_object($tables)) {
+ // Creation of blocks language file
+ if ( $table_blocks == 1) {
+ // Language Blocks File
+ $languageBlocks = LanguageBlocks::getInstance();
+ $languageBlocks->write($module, $tables, 'blocks.php');
+ $ret[] = $languageBlocks->render();
+ }
+ }
+ if(is_object($tables)) {
+ // Language Modinfo File
+ $languageModinfo = LanguageModinfo::getInstance();
+ $languageModinfo->write($module, $table, $tables, 'modinfo.php');
+ $ret[] = $languageModinfo->render();
+ } else {
+ $table = null; $tables = array();
+ // Language Modinfo File
+ $languageModinfo = LanguageModinfo::getInstance();
+ $languageModinfo->write($module, $table, $tables, 'modinfo.php');
+ $ret[] = $languageModinfo->render();
+ }
// Language Modinfo File
$languageModinfo = LanguageModinfo::getInstance();
$languageModinfo->write($module, $table, $tables, 'modinfo.php');
- $ret[] = $languageModinfo->render();
- // Creation of admin files
- if ( $table_admin == 1) {
- // Admin Header File
- $adminHeader = AdminHeader::getInstance();
- $adminHeader->write($module, $table, $tables, 'header.php');
- $ret[] = $adminHeader->render();
- // Admin Index File
- $adminIndex = AdminIndex::getInstance();
- $adminIndex->write($module, $tables, 'index.php');
- $ret[] = $adminIndex->render();
- // Admin Menu File
- $adminMenu = AdminMenu::getInstance();
- $adminMenu->write($module, $tables, 'menu.php');
- $ret[] = $adminMenu->render();
- // Creation of admin permission file
- if (( $table_permissions == 1)) {
- // Admin Permissions File
- $adminPermissions = AdminPermissions::getInstance();
- $adminPermissions->write($module, $tables, 'permissions.php');
- $ret[] = $adminPermissions->render();
+ $ret[] = $languageModinfo->render();
+ if(is_object($tables)) {
+ // Creation of admin files
+ if ( $table_admin == 1) {
+ // Admin Header File
+ $adminHeader = AdminHeader::getInstance();
+ $adminHeader->write($module, $table, $tables, 'header.php');
+ $ret[] = $adminHeader->render();
+ // Admin Index File
+ $adminIndex = AdminIndex::getInstance();
+ $adminIndex->write($module, $tables, 'index.php');
+ $ret[] = $adminIndex->render();
+ // Admin Menu File
+ $adminMenu = AdminMenu::getInstance();
+ $adminMenu->write($module, $tables, 'menu.php');
+ $ret[] = $adminMenu->render();
+ // Creation of admin permission file
+ if (( $table_permissions == 1)) {
+ // Admin Permissions File
+ $adminPermissions = AdminPermissions::getInstance();
+ $adminPermissions->write($module, $tables, 'permissions.php');
+ $ret[] = $adminPermissions->render();
+ }
+ // Admin Aboutr File
+ $adminAbout = AdminAbout::getInstance();
+ $adminAbout->write($module, 'about.php');
+ $ret[] = $adminAbout->render();
+ // Admin Footer File
+ $adminFooter = AdminFooter::getInstance();
+ $adminFooter->write($module, 'footer.php');
+ $ret[] = $adminFooter->render();
+ // Language Admin File
+ $languageAdmin = LanguageAdmin::getInstance();
+ $languageAdmin->write($module, $tables, 'admin.php');
+ $ret[] = $languageAdmin->render();
+ }
+ // Creation of notifications files
+ if ( $table_notifications == 1 ) {
+ // Include Notifications File
+ $includeNotifications = IncludeNotifications::getInstance();
+ $includeNotifications->write($module, $table, 'notifications.php');
+ $ret[] = $includeNotifications->render();
}
- // Admin Aboutr File
- $adminAbout = AdminAbout::getInstance();
- $adminAbout->write($module, 'about.php');
- $ret[] = $adminAbout->render();
- // Admin Footer File
- $adminFooter = AdminFooter::getInstance();
- $adminFooter->write($module, 'footer.php');
- $ret[] = $adminFooter->render();
- // Language Admin File
- $languageAdmin = LanguageAdmin::getInstance();
- $languageAdmin->write($module, $tables, 'admin.php');
- $ret[] = $languageAdmin->render();
- }
- // Creation of notifications files
- if ( $table_notifications == 1 ) {
- // Include Notifications File
- $includeNotifications = IncludeNotifications::getInstance();
- $includeNotifications->write($module, $table, 'notifications.php');
- $ret[] = $includeNotifications->render();
}
// Include Install File
$includeInstall = IncludeInstall::getInstance();
$includeInstall->write($module, $tables, 'install.php');
$ret[] = $includeInstall->render();
- // Creation of sql file
- if ( $table_name != null) {
- // Sql File
- $sqlFile = SqlFile::getInstance();
- $sqlFile->write($module, $tables, 'mysql.sql');
- $ret[] = $sqlFile->render();
+ if(is_object($tables)) {
+ // Creation of sql file
+ if ( $table_name != null) {
+ // Sql File
+ $sqlFile = SqlFile::getInstance();
+ $sqlFile->write($module, $tables, 'mysql.sql');
+ $ret[] = $sqlFile->render();
+ }
+ // Creation of search file
+ if ( $table_search == 1) {
+ // Include Search File
+ $includeSearch = IncludeSearch::getInstance();
+ $includeSearch->write($module, $table, 'search.php');
+ $ret[] = $includeSearch->render();
+ }
}
- // Creation of search file
- if ( $table_search == 1) {
- // Include Search File
- $includeSearch = IncludeSearch::getInstance();
- $includeSearch->write($module, $table, 'search.php');
- $ret[] = $includeSearch->render();
- }
// Creation of comments files
- if ( $table->getVar('table_comments') == 1) {
- // Include Comments File
- $includeComments = IncludeComments::getInstance();
- $includeComments->write($module, $table);
- $ret[] = $includeComments->renderCommentsIncludes($module, 'comment_edit');
- // Include Comments File
- $includeComments = IncludeComments::getInstance();
- $includeComments->write($module, $table);
- $ret[] = $includeComments->renderCommentsIncludes($module, 'comment_delete');
- // Include Comments File
- $includeComments = IncludeComments::getInstance();
- $includeComments->write($module, $table);
- $ret[] = $includeComments->renderCommentsIncludes($module, 'comment_post');
- // Include Comments File
- $includeComments = IncludeComments::getInstance();
- $includeComments->write($module, $table);
- $ret[] = $includeComments->renderCommentsIncludes($module, 'comment_reply');
- // Include Comments File
- $includeComments = IncludeComments::getInstance();
- $includeComments->write($module, $table);
- $ret[] = $includeComments->renderCommentsNew($module, 'comment_new');
+ if(is_object($tables)) {
+ if ( $table->getVar('table_comments') == 1) {
+ // Include Comments File
+ $includeComments = IncludeComments::getInstance();
+ $includeComments->write($module, $table);
+ $ret[] = $includeComments->renderCommentsIncludes($module, 'comment_edit');
+ // Include Comments File
+ $includeComments = IncludeComments::getInstance();
+ $includeComments->write($module, $table);
+ $ret[] = $includeComments->renderCommentsIncludes($module, 'comment_delete');
+ // Include Comments File
+ $includeComments = IncludeComments::getInstance();
+ $includeComments->write($module, $table);
+ $ret[] = $includeComments->renderCommentsIncludes($module, 'comment_post');
+ // Include Comments File
+ $includeComments = IncludeComments::getInstance();
+ $includeComments->write($module, $table);
+ $ret[] = $includeComments->renderCommentsIncludes($module, 'comment_reply');
+ // Include Comments File
+ $includeComments = IncludeComments::getInstance();
+ $includeComments->write($module, $table);
+ $ret[] = $includeComments->renderCommentsNew($module, 'comment_new');
+ }
+ // Creation of user files
+ if ( ($table_user == 1)){
+ // Templates Index File
+ $templatesIndex = TemplatesIndex::getInstance();
+ $templatesIndex->write($module, 'index.tpl');
+ $ret[] = $templatesIndex->render();
+ // User Footer File
+ $userFooter = UserFooter::getInstance();
+ $userFooter->write($module, 'footer.php');
+ $ret[] = $userFooter->render();
+ // User Header File
+ $userHeader = UserHeader::getInstance();
+ $userHeader->write($module, 'header.php');
+ $ret[] = $userHeader->render();
+ // User Notification Update File
+ if ( ($table_notifications == 1 )){
+ $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');
+ $ret[] = $userIndex->render();
+ // Language Main File
+ $languageMain = LanguageMain::getInstance();
+ $languageMain->write($module, $table, $tables, 'main.php');
+ $ret[] = $languageMain->render();
+ }
}
- // Creation of user files
- if ( ($table_user == 1)){
- // Templates Index File
- $templatesIndex = TemplatesIndex::getInstance();
- $templatesIndex->write($module, 'index.tpl');
- $ret[] = $templatesIndex->render();
- // User Footer File
- $userFooter = UserFooter::getInstance();
- $userFooter->write($module, 'footer.php');
- $ret[] = $userFooter->render();
- // User Header File
- $userHeader = UserHeader::getInstance();
- $userHeader->write($module, 'header.php');
- $ret[] = $userHeader->render();
- // User Notification Update File
- if ( ($table_notifications == 1 )){
- $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');
- $ret[] = $userIndex->render();
- // Language Main File
- $languageMain = LanguageMain::getInstance();
- $languageMain->write($module, $table, $tables, 'main.php');
- $ret[] = $languageMain->render();
- }
// Class Helper File
$classHelper = ClassHelper::getInstance();
$classHelper->write($module, 'helper.php');
@@ -408,10 +432,18 @@
$includeJquery = IncludeJquery::getInstance();
$includeJquery->write($module, 'functions.js');
$ret[] = $includeJquery->render();
- // User Xoops Version File
- $userXoopsVersion = UserXoopsVersion::getInstance();
- $userXoopsVersion->write($module, $table, $tables, 'xoops_version.php');
- $ret[] = $userXoopsVersion->render();
+ if(is_object($tables)) {
+ // User Xoops Version File
+ $userXoopsVersion = UserXoopsVersion::getInstance();
+ $userXoopsVersion->write($module, $table, $tables, 'xoops_version.php');
+ $ret[] = $userXoopsVersion->render();
+ } else {
+ $table = null; $tables = array();
+ // User Xoops Version File
+ $userXoopsVersion = UserXoopsVersion::getInstance();
+ $userXoopsVersion->write($module, $table, $tables, 'xoops_version.php');
+ $ret[] = $userXoopsVersion->render();
+ }
// Return Array
return $ret;
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/modinfo.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/modinfo.php 2014-06-14 12:33:34 UTC (rev 12590)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/modinfo.php 2014-06-14 13:04:04 UTC (rev 12591)
@@ -56,39 +56,37 @@
$this->setTables($tables);
}
/*
- * @public function render
- * @param null
+ * @public function getHead
+ * @param string $language
+ * @param string $module
*/
- public function render() {
- $module = $this->getModule();
- $table = $this->getTable();
- $tables = $this->getTables();
- $filename = $this->getFileName();
- $module_name = $module->getVar('mod_name');
- $module_description = $module->getVar('mod_description');
- $table_name = $table->getVar('table_name');
- $table_fieldname = $table->getVar('table_fieldname');
- $table_nbfields = $table->getVar('table_nbfields');
- $table_image = $table->getVar('table_image');
- $table_permissions = $table->getVar('table_permissions');
- $language = $this->getLanguage($module_name, 'MI');
- $content = $this->getHeaderFilesComments($module, $filename);
+ public function getHead($language, $module) {
+ $ret = <<<EOT
+// Head
+define('{$language}NAME', "{$module->getVar('module_name')}");
+define('{$language}DESC', "{$module->getVar('mod_description')}");\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getMenu
+ * @param string $language
+ * @param array $tables
+ */
+ public function getMenu($language, $tables) {
$menu = 1;
- $content .= <<<EOT
-\n// Admin
-define('{$language}NAME', "{$module_name}");
-define('{$language}DESC', "{$module_description}");
+ $ret = <<<EOT
//Menu
-define('{$language}ADMENU{$menu}', "Home");\n
+define('{$language}ADMENU{$menu}', "Dashboard");\n
EOT;
foreach (array_keys($tables) as $i)
{
$menu++;
- $table_name = str_replace('_', ' ', $tables[$i]->getVar('table_name'));
- $table_name = ucfirst($table_name);
+ $ucf_table_name = ucfirst(str_replace('_', ' ', $tables[$i]->getVar('table_name')));
+ $table_permissions = $tables[$i]->getVar('table_permissions');
$content .= <<<EOT
-define('{$language}ADMENU{$menu}', "{$table_name}");\n
+define('{$language}ADMENU{$menu}', "{$ucf_table_name}");\n
EOT;
}
if ( $table_permissions != 0 ) {
@@ -102,45 +100,77 @@
define('{$language}ADMENU{$menu}', "About");\n
EOT;
unset( $menu );
- $content .= <<<EOT
+ return $ret;
+ }
+ /*
+ * @public function getAdmin
+ * @param string $language
+ */
+ public function getAdmin($language) {
+ $ret = <<<EOT
+// Admin
+define('{$language}ADMINPAGER', "Admin pager");
+define('{$language}ADMINPAGER_DESC', "Admin per page list");\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getBlocks
+ * @param string $language
+ * @param array $tables
+ */
+ public function getBlocks($language, $tables) {
+ $ret = <<<EOT
//Blocks\n
EOT;
foreach (array_keys($tables) as $i)
{
$table_name = $tables[$i]->getVar('table_name');
- $language1 = $language.'_'.strtoupper($table_name).'';
+ $language1 = $language.'_'.strtoupper($table_name);
$table_name = str_replace("_", " ", ucfirst($table_name));
if ( $tables[$i]->getVar('table_blocks') == 1 ) {
- $content .= <<<EOT
+ $ret .= <<<EOT
define('{$language1}BLOCK', "{$table_name} block");\n
EOT;
}
}
- $content .= <<<EOT
+ return $ret;
+ }
+ /*
+ * @public function getUser
+ * @param string $language
+ */
+ public function getUser($language) {
+ $ret = <<<EOT
+// User
+define('{$language}USERPAGER', "User pager");
+define('{$language}USERPAGER_DESC', "User per page list");\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getConfig
+ * @param string $language
+ * @param string $table_image
+ */
+ public function getConfig($language, $table) {
+ $ret = <<<EOT
//Config
define('{$language}EDITOR', "Editor");
define('{$language}EDITOR_DESC', "Select the Editor to use");
define('{$language}KEYWORDS', "Keywords");
define('{$language}KEYWORDS_DESC', "Insert here the keywords (separate by comma)");\n
EOT;
- if ( $table_name != '' ) {
- $content .= <<<EOT
-define('{$language}ADMINPAGER', "Admin pager");
-define('{$language}ADMINPAGER_DESC', "Admin per page list");
-define('{$language}USERPAGER', "User pager");
-define('{$language}USERPAGER_DESC', "User per page list");\n
-EOT;
- }
- if ( $table_image != '' )
+ if ( $table->getVar('table_image') != '' )
{
- $content .= <<<EOT
+ $ret .= <<<EOT
define('{$language}MAXSIZE', "Max size");
define('{$language}MAXSIZE_DESC', "Set a number of max size uploads file in byte");
define('{$language}MIMETYPES', "Mime Types");
define('{$language}MIMETYPES_DESC', "Set the mime types selected");\n
EOT;
}
- $content .= <<<EOT
+ $ret .= <<<EOT
define('{$language}IDPAYPAL', "Paypal ID");
define('{$language}IDPAYPAL_DESC', "Insert here your PayPal ID for donactions.");
define('{$language}ADVERTISE', "Advertisement Code");
@@ -150,9 +180,15 @@
define('{$language}FBCOMMENTS', "Facebook comments");
define('{$language}FBCOMMENTS_DESC', "Allow Facebook comments in the form");\n
EOT;
- if ( $table->getVar('table_notifications') == 1 )
- {
- $content .= <<<EOT
+ return $ret;
+ }
+ /*
+ * @public function getNotifications
+ * @param string $language
+ * @param mixed $table
+ */
+ public function getNotifications($language) {
+ $ret = <<<EOT
// Notifications
define('{$language}GLOBAL_NOTIFY', "Allow Facebook comments in the form");
define('{$language}GLOBAL_NOTIFY_DESC', "Allow Facebook comments in the form");
@@ -193,16 +229,52 @@
define('{$language}FILE_APPROVE_NOTIFY_DESC', "Allow Facebook comments in the form");
define('{$language}FILE_APPROVE_NOTIFY_SUBJECT', "Allow Facebook comments in the form");\n
EOT;
- }
- if ( $table_permissions != 0 ) {
- $content .= <<<EOT
+ return $ret;
+ }
+ /*
+ * @public function getPermissions
+ * @param string $language
+ */
+ public function getPermissions($language) {
+ $ret = <<<EOT
// Permissions Groups
define('{$language}GROUPS', "Groups access");
define('{$language}GROUPS_DESC', "Select general access permission for groups.");
define('{$language}ADMINGROUPS', "Admin Group Permissions");
define('{$language}ADMINGROUPS_DESC', "Which groups have access to tools and permissions page");
EOT;
+ return $ret;
+ }
+ /*
+ * @public function render
+ * @param null
+ */
+ public function render() {
+ $module = $this->getModule();
+ $table = $this->getTable();
+ $tables = $this->getTables();
+ $filename = $this->getFileName();
+ $module_name = $module->getVar('mod_name');
+ $language = $this->getLanguage($module_name, 'MI');
+ $content = $this->getHeaderFilesComments($module, $filename);
+ $content .= $this->getHead($language, $module);
+ $content .= $this->getAdmin($language);
+ $content .= $this->getUser($language);
+ if(is_object($tables)) {
+ $content .= $this->getMenu($language, $tables);
+ $content .= $this->getBlocks($language, $tables);
+ }
+ if(is_object($table)) {
+ $content .= $this->getConfig($language, $table);
+ if ( $table->getVar('table_notifications') == 1 )
+ {
+ $content .= $this->getNotifications($language);
+ }
+ if ( $table->getVar('table_permissions') != 0 ) {
+ $content .= $this->getPermissions($language);
+ }
}
+ //
$this->tdmcfile->create($module_name, 'language/'.$GLOBALS['xoopsConfig']['language'], $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
return $this->tdmcfile->renderFile();
}
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/index.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/index.html (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/admin/index.html 2014-06-14 13:04:04 UTC (rev 12591)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/blocks/index.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/blocks/index.html (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/blocks/index.html 2014-06-14 13:04:04 UTC (rev 12591)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/index.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/index.html (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/user/index.html 2014-06-14 13:04:04 UTC (rev 12591)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/xoopsversion.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/xoopsversion.php 2014-06-14 12:33:34 UTC (rev 12590)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/xoopsversion.php 2014-06-14 13:04:04 UTC (rev 12591)
@@ -85,7 +85,7 @@
* @private function getXoopsVersionHeader
* @param string $language
*/
- private function getXoopsVersionHeader($module, $language)
+ private function getXoopsVersionHeader($module, $table, $language)
{
$date = date('D Y/m/d G:i:s');
$ret = <<<EOT
@@ -133,12 +133,19 @@
'module_website_url' => "{$module->getVar('mod_website_url')}",
'module_website_name' => "{$module->getVar('mod_website_name')}",
'release' => "{$module->getVar('mod_release')}",
- 'module_status' => "{$module->getVar('mod_status')}",\n
+ 'module_status' => "{$module->getVar('mod_status')}",
+ // Admin system menu
+ 'system_menu' => 1,\n
EOT;
- if ( $module->getVar('mod_admin') == 1 ) {
+ if(is_object($table)) {
+ $table_admin = $table->getVar('table_admin');
+ $table_user = $table->getVar('table_user');
+ } else {
+ $table_admin = null;
+ $table_user = null;
+ }
+ if ( $module->getVar('mod_admin') == 1 && $table_admin == 1 ) {
$ret .= <<<EOT
- // Admin system menu
- 'system_menu' => 1,
// Admin things
'hasAdmin' => 1,
'adminindex' => "admin/index.php",
@@ -152,7 +159,7 @@
'hasAdmin' => 0,\n
EOT;
}
- if ( $module->getVar('mod_user') == 1 ) {
+ if ( $module->getVar('mod_user') == 1 && $table_user == 1 ) {
$ret .= <<<EOT
// Menu
'hasMain' => 1,
@@ -174,9 +181,8 @@
* @private function getXoopsVersionMySQL
* @param string $module_name
*/
- private function getXoopsVersionMySQL($module_name)
+ private function getXoopsVersionMySQL($module_name, $table)
{
- $table = $this->getTable();
$table_name = $table->getVar('table_name');
$stl_mod_name = strtolower($module_name);
$j = 1;
@@ -271,10 +277,9 @@
* @param string $module_name
* @param string $language
*/
- private function getXoopsVersionBlocks($module_name, $language)
+ private function getXoopsVersionBlocks($module_name, $table, $language)
{
$stl_mod_name = strtolower($module_name);
- $tables = $this->getTables();
$ret = '';
$ret .= <<<EOT
\n//Blocks
@@ -303,11 +308,10 @@
* @param string $module_name
* @param string $language
*/
- private function getXoopsVersionConfig($module, $language)
+ private function getXoopsVersionConfig($module, $table, $language)
{
$module_name = $module->getVar('mod_name');
- $stl_mod_name = strtolower($module_name);
- $table = $this->getTable();
+ $stl_mod_name = strtolower($module_name);
$ret = <<<EOT
\n// Config
xoops_load('xoopseditorhandler');
@@ -589,23 +593,28 @@
$filename = $this->getFileName();
$module_name = $module->getVar('mod_name');
$language = $this->getLanguage($module_name, 'MI');
- $content = $this->getHeaderFilesComments($module, $filename);
- $content .= $this->getXoopsVersionHeader($module, $language);
- $content .= $this->getXoopsVersionMySQL($module_name);
- if ($table->getVar('table_search') == 1) {
- $content .= $this->getXoopsVersionSearch($module);
+ $content = $this->getHeaderFilesComments($module, $filename);
+ if(is_object($table)) {
+ $content .= $this->getXoopsVersionHeader($module, $table, $language);
+ $content .= $this->getXoopsVersionMySQL($module_name, $table);
+ if ($table->getVar('table_search') == 1) {
+ $content .= $this->getXoopsVersionSearch($module);
+ }
+ if ($table->getVar('table_comments') == 1) {
+ $content .= $this->getXoopsVersionComments($module);
+ }
+ $content .= $this->getXoopsVersionTemplates($module_name);
+ if ($table->getVar('table_blocks') == 1) {
+ $content .= $this->getXoopsVersionBlocks($module_name, $table, $language);
+ }
+ $content .= $this->getXoopsVersionConfig($module, $table, $language);
+ if ($table->getVar('table_notifications') == 1) {
+ $content .= $this->getXoopsVersionNotifications($module, $language, $filename);
+ }
+ } else {
+ $table = null;
+ $content .= $this->getXoopsVersionHeader($module, $table, $language);
}
- if ($table->getVar('table_comments') == 1) {
- $content .= $this->getXoopsVersionComments($module);
- }
- $content .= $this->getXoopsVersionTemplates($module_name);
- if ($table->getVar('table_blocks') == 1) {
- $content .= $this->getXoopsVersionBlocks($module_name, $language);
- }
- $content .= $this->getXoopsVersionConfig($module, $language);
- if ($table->getVar('table_notifications') == 1) {
- $content .= $this->getXoopsVersionNotifications($module, $language, $filename);
- }
$this->tdmcfile->create($module_name, '/', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
return $this->tdmcfile->renderFile();
}
|
|
From: <be...@us...> - 2014-06-14 12:33:38
|
Revision: 12590
http://sourceforge.net/p/xoops/svn/12590
Author: beckmi
Date: 2014-06-14 12:33:34 +0000 (Sat, 14 Jun 2014)
Log Message:
-----------
Renaming folders
Added Paths:
-----------
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads/
Removed Paths:
-------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/
|
|
From: <be...@us...> - 2014-06-14 12:31:24
|
Revision: 12589
http://sourceforge.net/p/xoops/svn/12589
Author: beckmi
Date: 2014-06-14 12:31:19 +0000 (Sat, 14 Jun 2014)
Log Message:
-----------
Renaming folders
Added Paths:
-----------
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/language/pt-br_utf8/
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/language/pt-br_utf8/main.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/blocks/
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/blocks/index.html
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/blocks/tdmdownloads_block_new.html
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/index.html
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_brokenfile.html
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_download.html
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_index.html
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_modfile.html
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_ratefile.html
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_singlefile.html
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_viewcat.html
Removed Paths:
-------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/TDMDownloads/
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap2/
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/language/pt-br_utf8/main.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/language/pt-br_utf8/main.php (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/language/pt-br_utf8/main.php 2014-06-14 12:31:19 UTC (rev 12589)
@@ -0,0 +1,30 @@
+<?php
+
+//Nav Menu
+define("THEME_HOME", "Início");
+define("THEME_MODULE1", "Sobre");
+define("THEME_MODULE2", "Notícias");
+define("THEME_MODULE3", "Fórum");
+define("THEME_MODULE4", "Contato");
+define("THEME_SEARCH_TEXT", "Buscar no site...");
+define("THEME_SEARCH_BUTTON", "Buscar");
+
+//Slider
+define("THEME_READMORE", "Leia Mais");
+
+//Home Message
+define("THEME_ABOUTUS", "Sobre Nós");
+define("THEME_LEARNINGMORE", "Continue Lendo...");
+
+//NewBB
+define("THEME_NEWBB_TOPIC", "Mais");
+define("THEME_FORUM_SPONSORBY", "Patrocinado por.: ");
+define("THEME_GOTOTHEFORUM", "Ir ao Fórum");
+define("THEME_FORUM_DESCRIPTION", "Descrição");
+define("THEME_NEWBB_SEARCH_FORUM", "Buscar no Fórum...");
+define("THEME_NEWBB_SEARCH_TOPIC", "Buscar no Tópico...");
+define("THEME_FORUM_DESC", "Sobre este fórum");
+
+//Block login
+define("THEME_LOGIN", "Nome de Usuário");
+define("THEME_PASS", "Digite sua Senha");
Property changes on: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/language/pt-br_utf8/main.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/blocks/index.html
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/blocks/index.html (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/blocks/index.html 2014-06-14 12:31:19 UTC (rev 12589)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/blocks/tdmdownloads_block_new.html
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/blocks/tdmdownloads_block_new.html (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/blocks/tdmdownloads_block_new.html 2014-06-14 12:31:19 UTC (rev 12589)
@@ -0,0 +1,16 @@
+<ul class="list-unstyled tdm-new-download-block">
+<{foreachq item=downloads from=$block}>
+<li><i class="glyphicon glyphicon-cloud-download"></i>
+<a title="<{$downloads.title}>" href="<{$xoops_url}>/modules/TDMDownloads/singlefile.php?lid=<{$downloads.lid}>">
+ <{$downloads.title}>
+</a>
+
+<{if $downloads.inforation}>
+ <{$smarty.const._MB_TDMDOWNLOADS_SUBMITDATE}><{$downloads.date}>
+ <{$smarty.const._MB_TDMDOWNLOADS_SUBMITTER}><{$downloads.submitter}>
+ <{$smarty.const._MB_TDMDOWNLOADS_REATING}><{$downloads.rating}>
+ <{$smarty.const._MB_TDMDOWNLOADS_HITS}><{$downloads.hits}>
+<{/if}>
+</li>
+<{/foreach}>
+</ul>
\ No newline at end of file
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/index.html
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/index.html (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/index.html 2014-06-14 12:31:19 UTC (rev 12589)
@@ -0,0 +1 @@
+<script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_brokenfile.html
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_brokenfile.html (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_brokenfile.html 2014-06-14 12:31:19 UTC (rev 12589)
@@ -0,0 +1,16 @@
+<div class="tdmdownloads">
+
+<div class="breadcrumb"><{$navigation}></div>
+
+<div class="alert alert-warning">
+ <ul>
+ <li><{$smarty.const._MD_TDMDOWNLOADS_BROKENFILE_FORSECURITY}></li>
+ <li><{$smarty.const._MD_TDMDOWNLOADS_BROKENFILE_THANKSFORHELP}></li>
+ </ul>
+</div>
+
+<{if $message_erreur != ''}>
+ <div class="alert alert-error"><{$message_erreur}></div>
+<{/if}>
+<div class="form-group"><{$themeForm}></div>
+</div>
\ No newline at end of file
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_download.html
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_download.html (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_download.html 2014-06-14 12:31:19 UTC (rev 12589)
@@ -0,0 +1,43 @@
+<div class="col-sm-4 col-md-4 tdm-minibox">
+<{if $show_screenshot == true}>
+ <{if $down.logourl != ''}>
+ <div class="tdm-download-logo">
+ <img src="<{$down.logourl}>" alt="<{$down.title}>">
+ </div>
+ <{else}>
+
+ <div class="tdm-download-logo">
+ <img src="<{$xoops_imageurl}>images/tdm-no-image.jpg" alt="<{$title}>">
+ </div>
+ <{/if}>
+<{/if}>
+
+<a class="tdm-title" title="<{$down.title}>" href="<{$xoops_url}>/modules/TDMDownloads/singlefile.php?cid=<{$down.cid}>&lid=<{$down.id}>">
+ <{$down.title}>
+</a>
+<!--
+<{if $down.new}><{$down.new}><{/if}>
+
+<{if $down.pop}><{$down.pop}><{/if}>
+-->
+<div class="row tdm-download-data">
+ <div class="col-md-5"><span class="glyphicon glyphicon-calendar" title="<{$smarty.const._MD_TDMDOWNLOADS_INDEX_SUBMITDATE}>"></span> <{$down.updated}></div>
+ <div class="col-md-7"><span class="glyphicon glyphicon-user" title="<{$smarty.const._MD_TDMDOWNLOADS_INDEX_SUBMITTER}>"></span> <{$down.submitter}></div>
+</div>
+
+<div class="tdm-short-description">
+ <{$down.description_short}>
+</div><!-- .tdm-short-description -->
+
+<a class="btn btn-primary col-md-9" title="<{$down.title}>" href="<{$xoops_url}>/modules/TDMDownloads/singlefile.php?cid=<{$down.cid}>&lid=<{$down.id}>">
+ <{$smarty.const._MD_TDMDOWNLOADS_MOREDETAILS}>
+</a>
+
+<{if $down.perm_download != ""}>
+ <a title="<{$smarty.const._MD_TDMDOWNLOADS_INDEX_DLNOW}>" href="visit.php?cid=<{$down.cid}>&lid=<{$down.id}>" class="btn btn-success btn-xs tdm-download-btn col-md-2 pull-right">
+ <span class="glyphicon glyphicon-cloud-download"></span>
+ </a>
+<{/if}>
+
+<!-- <{$down.adminlink}> -->
+</div><!-- .tdm-minibox -->
\ No newline at end of file
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_index.html
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_index.html (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_index.html 2014-06-14 12:31:19 UTC (rev 12589)
@@ -0,0 +1,126 @@
+<div class="tdmdownloads">
+<{if count($categories) gt 0}>
+
+<div class="tdm-category row">
+ <{foreach item=category from=$categories}>
+ <div class="col-xs-6 col-sm-4 col-md-2 tdm-category-list">
+ <a class="btn btn-primary btn-md" title="<{$category.title}>" href="<{$xoops_url}>/modules/TDMDownloads/viewcat.php?cid=<{$category.id}>">
+ <{$category.title}>
+ </a>
+
+ <{if $category.image != ""}>
+ <a title="<{$category.title}>" href="<{$xoops_url}>/modules/TDMDownloads/viewcat.php?cid=<{$category.id}>" class="tdm-category-image">
+ <img class="<{$img_float}>" src="<{$category.image}>" alt="<{$category.title}>">
+ </a>
+ <{/if}>
+
+ <!-- Category Description -->
+ <div class="aligncenter">
+ <{if $category.description_main != ""}>
+ <button class="btn btn-success btn-xs" data-toggle="modal" data-target="#myModal">+</button>
+ <{else}>
+ <button class="btn btn-xs disabled" data-toggle="modal" data-target="#myModal">+</button>
+ <{/if}>
+ </div>
+
+ <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header"><h4 class="modal-title aligncenter"><{$category.title}></h4></div>
+ <div class="modal-body">
+ <{$category.description_main}>
+ </div>
+ <div class="modal-footer">
+ <a title="<{$category.title}>" href="<{$xoops_url}>/modules/TDMDownloads/viewcat.php?cid=<{$category.id}>" class="pull-left btn btn-success">
+ There are <strong><{$category.totaldownloads}></strong> files in this category!
+ </a>
+ <button type="button" class="btn btn-default" data-dismiss="modal">×</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ <!-- End Category Description -->
+
+ <{if $category.subcategories != ""}>
+ <{$smarty.const._MD_TDMDOWNLOADS_INDEX_SCAT}>
+ <ul><{$category.subcategories}></ul>
+
+ <{/if}>
+ </div><!-- .tdm-category-list -->
+ <{/foreach}>
+</div><!-- .tdm-category -->
+
+<div class="aligncenter">
+ <a title="<{$smarty.const._MD_TDMDOWNLOADS_RSS}>" href="<{$xoops_url}>/modules/TDMDownloads/rss.php?cid=0">
+ <img src="images/rss.gif" alt="<{$smarty.const._MD_TDMDOWNLOADS_RSS}>">
+ </a>
+</div>
+
+<div class="tdm-downloads-info row">
+<{if $bl_affichage==1}>
+<div class="col-md-12"><h2><{$smarty.const._MD_TDMDOWNLOADS_INDEX_BLNAME}>:</h1></div>
+<div class="col-sm-4 col-md-4">
+ <{if $bl_date != ""}>
+ <h3 class="tdm-title"><span class="glyphicon glyphicon-calendar"></span> <{$smarty.const._MD_TDMDOWNLOADS_INDEX_BLDATE}></h3>
+ <ul class="list-unstyled">
+ <{foreach item=bl_date from=$bl_date}>
+ <li>
+ <a title="<{$bl_date.title}>" href="<{$xoops_url}>/modules/TDMDownloads/singlefile.php?cid=<{$bl_date.cid}>&lid=<{$bl_date.id}>"><{$bl_date.title}></a> (<{$bl_date.date}>)
+ </li>
+ <{/foreach}>
+ </ul>
+</div>
+<{/if}>
+
+<{if $bl_pop != ""}>
+<div class="col-sm-4 col-md-4">
+ <h3 class="tdm-title"><span class="glyphicon glyphicon-star"></span> <{$smarty.const._MD_TDMDOWNLOADS_INDEX_BLPOP}></h3>
+ <ul class="list-unstyled">
+ <{foreach item=bl_pop from=$bl_pop}>
+ <li>
+ <a title="<{$bl_pop.title}>" href="<{$xoops_url}>/modules/TDMDownloads/singlefile.php?cid=<{$bl_pop.cid}>&lid=<{$bl_pop.id}>"><{$bl_pop.title}></a> (<{$bl_pop.hits}>)
+ </li>
+ <{/foreach}>
+ </ul>
+</div>
+<{/if}>
+
+<{if $bl_rating != ""}>
+<div class="col-sm-4 col-md-4">
+ <h3 class="tdm-title"><span class="glyphicon glyphicon-thumbs-up"></span> <{$smarty.const._MD_TDMDOWNLOADS_INDEX_BLRATING}></h3>
+ <ul class="list-unstyled">
+ <{foreach item=bl_rating from=$bl_rating}>
+ <li>
+ <a title="<{$bl_rating.title}>" href="<{$xoops_url}>/modules/TDMDownloads/singlefile.php?cid=<{$bl_rating.cid}>&lid=<{$bl_rating.id}>"><{$bl_rating.title}></a> (<{$bl_rating.rating}>)
+ </li>
+ <{/foreach}>
+ </ul>
+</div>
+<{/if}>
+
+<{/if}>
+
+<div class="clearfix"></div>
+<div class="col-md-12">
+ <h4 class="aligncenter"><{$lang_thereare}></h4>
+</div>
+
+<{/if}>
+</div><!-- .downloads-info -->
+
+<{if $show_latest_files}>
+<div class="row">
+ <{if $file != ""}>
+ <div class="col-md-12">
+ <h1><{$smarty.const._MD_TDMDOWNLOADS_INDEX_LATESTLIST}>:</h1>
+ </div>
+ <{section name=i loop=$file}>
+ <{include file="db:tdmdownloads_download.html" down=$file[i]}>
+ <{/section}>
+ <{/if}>
+</div>
+<{/if}>
+
+</div><!-- .tdmdownloads -->
+
+<{include file="db:system_notification_select.html"}>
\ No newline at end of file
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_modfile.html
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_modfile.html (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_modfile.html 2014-06-14 12:31:19 UTC (rev 12589)
@@ -0,0 +1,11 @@
+<div class="tdmdownloads">
+
+<div class="breadcrumb"><{$navigation}></div>
+
+<{if $message_erreur != ''}>
+ <div class="alert alert-error"><{$message_erreur}></div>
+<{/if}>
+
+<div class="tdm-modify-file"><{$themeForm}></div>
+
+</div>
\ No newline at end of file
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_ratefile.html
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_ratefile.html (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_ratefile.html 2014-06-14 12:31:19 UTC (rev 12589)
@@ -0,0 +1,18 @@
+<div class="tdmdownloads">
+
+<div class="breadcrumb"><{$navigation}></div>
+
+<div class="alert alert-success">
+ <ul>
+ <li><{$smarty.const._MD_TDMDOWNLOADS_RATEFILE_VOTEONCE}></li>
+ <li><{$smarty.const._MD_TDMDOWNLOADS_RATEFILE_RATINGSCALE}></li>
+ <li><{$smarty.const._MD_TDMDOWNLOADS_RATEFILE_BEOBJECTIVE}></li>
+ <li><{$smarty.const._MD_TDMDOWNLOADS_RATEFILE_DONOTVOTE}></li>
+ </ul>
+</div>
+
+<{if $message_erreur != ''}>
+ <div class="alert alert-error"><{$message_erreur}></div>
+<{/if}>
+<div class="form-group"><{$themeForm}></div>
+</div>
\ No newline at end of file
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_singlefile.html
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_singlefile.html (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_singlefile.html 2014-06-14 12:31:19 UTC (rev 12589)
@@ -0,0 +1,104 @@
+<div class="tdmdownloads">
+
+<div class="breadcrumb"><{$navigation}></div>
+
+<!-- <{if $new || $pop}><{$new}><{$pop}><{/if}> -->
+
+<h1 class="tdm-title"><{$title}> <label class="label label-success">v <{$version}></label></h1>
+<div class="tdm-download-data row">
+<{if $show_screenshot == true}>
+ <{if $logourl != ""}>
+ <div class="tdm-screenshot-single col-xs-8 col-sm-8 col-md-8">
+ <img src="<{$logourl}>" alt="<{$title}>">
+ </div>
+ <{else}>
+ <div class="tdm-screenshot-single col-xs-8 col-sm-8 col-md-8">
+ <img src="<{$xoops_imageurl}>images/tdm-no-image.jpg" alt="<{$title}>">
+ </div>
+ <{/if}>
+<{/if}>
+
+<div class="col-sm-4 col-md-4">
+<ul class="list-unstyled tdm-download-details">
+ <li><{$smarty.const._MD_TDMDOWNLOADS_SINGLEFILE_DATEPROP}> <{$date}></li}>
+
+ <li><{$smarty.const._MD_TDMDOWNLOADS_SINGLEFILE_AUTHOR}> <{$author}></li}>
+
+ <li><{$hits}></li}>
+
+ <li><{$smarty.const._MD_TDMDOWNLOADS_SINGLEFILE_RATING}>: <{$rating}> <{$votes}></li}>
+
+ <{if $commentsnav != ""}>
+ <li><{$nb_comments}></li}>
+ <{/if}>
+
+ <{if $sup_aff == true}>
+ <{foreach item=champ from=$champ_sup}>
+ <li><{$champ.data}></li>
+ <{/foreach}>
+ <{/if}>
+
+
+ <{if $perm_vote != ""}>
+ <li><a class="btn btn-xs btn-primary" href="<{$xoops_url}>/modules/TDMDownloads/ratefile.php?lid=<{$lid}>" title="<{$smarty.const._MD_TDMDOWNLOADS_SINGLEFILE_RATHFILE}>"><{$smarty.const._MD_TDMDOWNLOADS_SINGLEFILE_RATHFILE}></a></li>
+ <{/if}>
+
+ <{if $perm_modif != ""}>
+ <li><a class="btn btn-xs btn-primary" href="<{$xoops_url}>/modules/TDMDownloads/modfile.php?lid=<{$lid}>" title="<{$smarty.const._MD_TDMDOWNLOADS_SINGLEFILE_MODIFY}>"><{$smarty.const._MD_TDMDOWNLOADS_SINGLEFILE_MODIFY}></a></li>
+ <{/if}>
+
+ <li><a class="btn btn-xs btn-primary" href="<{$xoops_url}>/modules/TDMDownloads/brokenfile.php?lid=<{$lid}>" title="<{$smarty.const._MD_TDMDOWNLOADS_SINGLEFILE_REPORTBROKEN}>"><{$smarty.const._MD_TDMDOWNLOADS_SINGLEFILE_REPORTBROKEN}></a></li>
+
+ <!--<li><{$tellafriend_texte}></li>-->
+
+ <{if $perm_download != ""}>
+ <li><a class="btn btn-md btn-success" href="visit.php?cid=<{$cid}>&lid=<{$lid}>" target="_blank" title="Download"><{$smarty.const._MD_TDMDOWNLOADS_INDEX_DLNOW}></a></li>
+ <{else}>
+ <li>
+ <div class="alert alert-danger alert-dismissable">
+ <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
+ <{$smarty.const._MD_TDMDOWNLOADS_SINGLEFILE_NOPERM}>
+ </div>
+ </li>
+ <{/if}>
+
+ <{if $adminlink}>
+ <li class="text-center"><{$adminlink}></li>
+ <{/if}>
+</ul>
+</div>
+</div><!-- .tdm-download-data -->
+
+<div class="text-center">
+ <a class="big-info-icon-link" title="Info" data-toggle="collapse" href="#tdm-description"><span class="glyphicon glyphicon-info-sign"></span></a>
+</div>
+<div class="collapse" id="tdm-description">
+ <{$description}>
+</div>
+
+<{if $paypal}>
+ <{$paypal}>
+<{/if}>
+
+<{if $tags}>
+ <{include file="db:tag_bar.html"}>
+<{/if}>
+
+<{if $show_social}>
+ <div class='shareaholic-canvas' data-app='share_buttons' data-app-id='482507'></div>
+<{/if}>
+</div><!-- .tdmdownloads -->
+
+<!-- <{$commentsnav}> -->
+
+<{$lang_notice}>
+
+<{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}>
+
+<{include file="db:system_notification_select.html"}>
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_viewcat.html
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_viewcat.html (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap/modules/tdmdownloads2/tdmdownloads_viewcat.html 2014-06-14 12:31:19 UTC (rev 12589)
@@ -0,0 +1,131 @@
+<div class="tdmdownloads">
+<div class="breadcrumb"><{$category_path}></div>
+
+<{if $cat_description != ""}>
+ <blockquote>
+ <small><{$cat_description}></small>
+ </blockquote>
+<{/if}>
+
+<{foreach item=category from=$subcategories}>
+<a title="<{$category.title}>" href="<{$xoops_url}>/modules/TDMDownloads/viewcat.php?cid=<{$category.id}>"><{$category.title}></a>
+<a title="<{$category.title}>" href="<{$xoops_url}>/modules/TDMDownloads/viewcat.php?cid=<{$category.id}>"><{$category.totaldownloads}></a>
+
+<{if $category.image != ""}>
+ <a title="<{$category.title}>" href="<{$xoops_url}>/modules/TDMDownloads/viewcat.php?cid=<{$category.id}>">
+ <img class="<{$img_float}>" src="<{$category.image}>" alt="<{$category.title}>">
+ </a>
+<{/if}>
+
+<{$category.description_main}>
+
+<{if $category.subcategories != ""}>
+ <{$smarty.const._MD_TDMDOWNLOADS_INDEX_SCAT}><ul><{$category.subcategories}>
+<{/if}>
+<{/foreach}>
+
+<a title="<{$smarty.const._MD_TDMDOWNLOADS_RSS}>" href="<{$xoops_url}>/modules/TDMDownloads/rss.php?cid=<{$category_id}>">
+ <img src="images/rss.gif" alt="<{$smarty.const._MD_TDMDOWNLOADS_RSS}>">
+</a>
+
+<div class="tdm-downloads-info row">
+<{if $bl_affichage==1}>
+<div class="col-md-12"><h2><{$smarty.const._MD_TDMDOWNLOADS_INDEX_BLNAME}>:</h1></div>
+<div class="col-sm-4 col-md-4">
+ <{if $bl_date != ""}>
+ <h3 class="tdm-title"><span class="glyphicon glyphicon-calendar"></span> <{$smarty.const._MD_TDMDOWNLOADS_INDEX_BLDATE}></h3>
+ <ul class="list-unstyled">
+ <{foreach item=bl_date from=$bl_date}>
+ <li>
+ <a title="<{$bl_date.title}>" href="<{$xoops_url}>/modules/TDMDownloads/singlefile.php?cid=<{$bl_date.cid}>&lid=<{$bl_date.id}>"><{$bl_date.title}></a> (<{$bl_date.date}>)
+ </li>
+ <{/foreach}>
+ </ul>
+</div>
+<{/if}>
+<{if $bl_pop != ""}>
+<div class="col-sm-4 col-md-4">
+ <h3 class="tdm-title"><span class="glyphicon glyphicon-star"></span> <{$smarty.const._MD_TDMDOWNLOADS_INDEX_BLPOP}></h3>
+ <ul class="list-unstyled">
+ <{foreach item=bl_pop from=$bl_pop}>
+ <li>
+ <a title="<{$bl_pop.title}>" href="<{$xoops_url}>/modules/TDMDownloads/singlefile.php?cid=<{$bl_pop.cid}>&lid=<{$bl_pop.id}>"><{$bl_pop.title}></a> (<{$bl_pop.hits}>)
+ </li>
+ <{/foreach}>
+ </ul>
+</div>
+<{/if}>
+<{if $bl_rating != ""}>
+<div class="col-sm-4 col-md-4">
+ <h3 class="tdm-title"><span class="glyphicon glyphicon-thumbs-up"></span> <{$smarty.const._MD_TDMDOWNLOADS_INDEX_BLRATING}></h3>
+ <ul class="list-unstyled">
+ <{foreach item=bl_rating from=$bl_rating}>
+ <li>
+ <a title="<{$bl_rating.title}>" href="<{$xoops_url}>/modules/TDMDownloads/singlefile.php?cid=<{$bl_rating.cid}>&lid=<{$bl_rating.id}>"><{$bl_rating.title}></a> (<{$bl_rating.rating}>)
+ </li>
+ <{/foreach}>
+ </ul>
+</div>
+<{/if}>
+<{/if}>
+<div class="clearfix"></div>
+<div class="col-md-12"><p class="text-muted text-right"><small><em><{$lang_thereare}></em></small></p></div>
+</div><!-- .downloads-info -->
+
+<div class="row order-by">
+<{if $navigation == true}>
+ <div class="col-md-12"><h3 class="tdm-title"><{$smarty.const._MD_TDMDOWNLOADS_CAT_SORTBY}></h3></div>
+ <div class="col-xs-3 col-sm-3 col-md-3">
+ <{$smarty.const._MD_TDMDOWNLOADS_CAT_TITLE}>
+ <a title="<{$smarty.const._MD_TDMDOWNLOADS_CAT_TITLEATOZ}>" href="<{$xoops_url}>/modules/TDMDownloads/viewcat.php?cid=<{$category_id}>&sort=title&order=ASC">
+ <span class="glyphicon glyphicon glyphicon-collapse-up"></span>
+ </a>
+
+ <a title="<{$smarty.const._MD_TDMDOWNLOADS_CAT_TITLEZTOA}>" href="<{$xoops_url}>/modules/TDMDownloads/viewcat.php?cid=<{$category_id}>&sort=title&order=DESC">
+ <span class="glyphicon glyphicon glyphicon-collapse-down"></span>
+ </a>
+ </div>
+
+ <div class="col-xs-3 col-sm-3 col-md-3">
+ <{$smarty.const._MD_TDMDOWNLOADS_CAT_DATE}>
+ <a title="<{$smarty.const._MD_TDMDOWNLOADS_CAT_DATEOLD}>" href="<{$xoops_url}>/modules/TDMDownloads/viewcat.php?cid=<{$category_id}>&sort=date&order=ASC">
+ <span class="glyphicon glyphicon glyphicon-collapse-up"></span>
+ </a>
+ <a title="<{$smarty.const._MD_TDMDOWNLOADS_CAT_DATENEW}>" href="<{$xoops_url}>/modules/TDMDownloads/viewcat.php?cid=<{$category_id}>&sort=date&order=DESC">
+ <span class="glyphicon glyphicon glyphicon-collapse-down"></span>
+ </a>
+ </div>
+
+ <div class="col-xs-3 col-sm-3 col-md-3">
+ <{$smarty.const._MD_TDMDOWNLOADS_CAT_RATING}>
+ <a title="<{$smarty.const._MD_TDMDOWNLOADS_CAT_RATINGLTOH}>" href="<{$xoops_url}>/modules/TDMDownloads/viewcat.php?cid=<{$category_id}>&sort=rating&order=ASC">
+ <span class="glyphicon glyphicon glyphicon-collapse-up"></span>
+ </a>
+ <a title="<{$smarty.const._MD_TDMDOWNLOADS_CAT_RATINGHTOL}>" href="<{$xoops_url}>/modules/TDMDownloads/viewcat.php?cid=<{$category_id}>&sort=rating&order=DESC">
+ <span class="glyphicon glyphicon glyphicon-collapse-down"></span>
+ </a>
+ </div>
+
+ <div class="col-xs-3 col-sm-3 col-md-3">
+ <{$smarty.const._MD_TDMDOWNLOADS_CAT_POPULARITY}>
+ <a title="<{$smarty.const._MD_TDMDOWNLOADS_CAT_POPULARITYLTOM}>" href="<{$xoops_url}>/modules/TDMDownloads/viewcat.php?cid=<{$category_id}>&sort=hits&order=ASC">
+ <span class="glyphicon glyphicon glyphicon-collapse-up"></span>
+ </a>
+ <a title="<{$smarty.const._MD_TDMDOWNLOADS_CAT_POPULARITYMTOL}>" href="<{$xoops_url}>/modules/TDMDownloads/viewcat.php?cid=<{$category_id}>&sort=hits&order=DESC">
+ <span class="glyphicon glyphicon glyphicon-collapse-down"></span>
+ </a>
+ </div>
+
+ <div class="clearfix"></div>
+ <div class="col-md-12"><p class="text-center text-muted"><{$affichage_tri}></p></div>
+<{/if}>
+</div><!-- .tdm-order-by -->
+
+<{if $file != ""}>
+ <h3 class="tdm-title"><{$smarty.const._MD_TDMDOWNLOADS_CAT_LIST}>:</h3>
+ <{section name=i loop=$file}><{include file="db:tdmdownloads_download.html" down=$file[i]}><{/section}>
+ <{if $pagenav != ''}><{$pagenav}><{/if}>
+<{/if}>
+</div><!-- .tdmdownloads -->
+
+<{include file="db:system_notification_select.html"}>
\ No newline at end of file
|
|
From: <be...@us...> - 2014-06-14 12:09:22
|
Revision: 12588
http://sourceforge.net/p/xoops/svn/12588
Author: beckmi
Date: 2014-06-14 12:09:15 +0000 (Sat, 14 Jun 2014)
Log Message:
-----------
Renaming folder Part1
Added Paths:
-----------
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xbootstrap2/
Removed Paths:
-------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/
|
|
From: <be...@us...> - 2014-06-14 08:22:32
|
Revision: 12587
http://sourceforge.net/p/xoops/svn/12587
Author: beckmi
Date: 2014-06-14 08:22:16 +0000 (Sat, 14 Jun 2014)
Log Message:
-----------
adding latest files from github (Luciorota)
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/admin/about.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_footer.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_header.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/categories.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/clone.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/images.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/import.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/index.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/indexpage.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/menu.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/mimetypes.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/mirrors.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/permissions.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/ratings.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/reviews.php
XoopsModules/wfdownloads/trunk/wfdownloads/blocks/top.php
XoopsModules/wfdownloads/trunk/wfdownloads/blocks/top_by_cat.php
XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/breadcrumb.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/category.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/dbupdater.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/img_uploader.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/ip_log.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/mimetype.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/mirror.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/modification.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/multicolumnsthemeform.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/rating.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/report.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/request.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/review.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/session.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/tree.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/wfdownloads.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/wfdownloads_lists.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/xoopstree.php
XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
XoopsModules/wfdownloads/trunk/wfdownloads/docs/history.txt
XoopsModules/wfdownloads/trunk/wfdownloads/docs/license.txt
XoopsModules/wfdownloads/trunk/wfdownloads/include/comment_functions.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/common.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/constants.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/directorychecker.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/filechecker.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/notification.inc.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/search.inc.php
XoopsModules/wfdownloads/trunk/wfdownloads/index.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/blocks.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/common.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/directorychecker.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/filechecker.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/help/help.html
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/help/help3.html
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/help/help4.html
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/help/help5.html
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/help/help6.html
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/help/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/help/install.html
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/help/tips_tricks.html
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php
XoopsModules/wfdownloads/trunk/wfdownloads/mirror.php
XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php
XoopsModules/wfdownloads/trunk/wfdownloads/ratefile.php
XoopsModules/wfdownloads/trunk/wfdownloads/review.php
XoopsModules/wfdownloads/trunk/wfdownloads/rss.php
XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php
XoopsModules/wfdownloads/trunk/wfdownloads/sql/mysql.sql
XoopsModules/wfdownloads/trunk/wfdownloads/submit.php
XoopsModules/wfdownloads/trunk/wfdownloads/topten.php
XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php
XoopsModules/wfdownloads/trunk/wfdownloads/visit.php
XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
Added Paths:
-----------
XoopsModules/wfdownloads/trunk/wfdownloads/assets/
XoopsModules/wfdownloads/trunk/wfdownloads/assets/css/
XoopsModules/wfdownloads/trunk/wfdownloads/assets/css/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/assets/css/module.css
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/VeraBd.ttf
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/blank.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/brokenimg.png
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/category/
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/category/blank.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/category/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/category/thumbs/
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/category/thumbs/blank.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/category/thumbs/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/down.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/approve.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/arrow.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/close12.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/delete.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/disabled.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/down.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/download.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/download1.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/download2.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/download3.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/download4.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/downloads.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/downloads02.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/downloads03.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/edit.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/forum.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/ignore.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/ignore.png
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/link.png
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/newred.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/off.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/on.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/open12.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/pop.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/rate0.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/rate1.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/rate2.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/rate3.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/rate4.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/rate5.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/reviews.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/rss.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/statistics.png
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/update.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon/world_link.png
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon32/
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon32/database_go.png
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon32/editcopy.png
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/icon32/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/loadingAnimation.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/logo-en.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/logo.png
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/module_logo.png
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/screenshots/
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/screenshots/blank.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/screenshots/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/screenshots/thumbs/
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/screenshots/thumbs/blank.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/screenshots/thumbs/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/size2.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/images/up.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/magnific/
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/magnific/jquery.magnific-popup.min.js
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/magnific/magnific-popup.css
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/mediaelement/
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/mediaelement/README.md
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/mediaelement/build/
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/mediaelement/build/DO NOT CHANGE THESE FILES. USE -src- FOLDER.txt
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/mediaelement/build/background.png
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/mediaelement/build/bigplay.png
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/mediaelement/build/bigplay.svg
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/mediaelement/build/controls-ted.png
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/mediaelement/build/controls-wmp-bg.png
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/mediaelement/build/controls-wmp.png
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/mediaelement/build/controls.png
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/mediaelement/build/controls.svg
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/mediaelement/build/flashmediaelement-cdn.swf
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/mediaelement/build/flashmediaelement.swf
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/mediaelement/build/loading.gif
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/mediaelement/build/mediaelement-and-player.min.js
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/mediaelement/build/mediaelement.min.js
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/mediaelement/build/mediaelementplayer.min.css
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/mediaelement/build/mediaelementplayer.min.js
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/mediaelement/build/mejs-skins.css
XoopsModules/wfdownloads/trunk/wfdownloads/assets/js/mediaelement/build/silverlightmediaelement.xap
XoopsModules/wfdownloads/trunk/wfdownloads/include/oninstall.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/onuninstall.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/onupdate.php
XoopsModules/wfdownloads/trunk/wfdownloads/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_categorieslist.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_downloadslist.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_ip_logslist.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_mimetypeslist.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_mirrorslist.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_permissions.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_ratingslist.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_reportsmodificationslist.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_reviewslist.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/blocks/wfdownloads_block_new.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/blocks/wfdownloads_block_top.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/blocks/wfdownloads_block_top_by_cat.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_brokenfile.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_common_breadcrumb.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_common_letterschoice.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_disclaimer.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_download.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_footer.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_header.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_index.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_mirrors.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_newlistindex.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_ratefile.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_reviews.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_singlefile.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_submit.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_topten.tpl
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_viewcat.tpl
Removed Paths:
-------------
XoopsModules/wfdownloads/trunk/wfdownloads/class/object.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/uploader.php
XoopsModules/wfdownloads/trunk/wfdownloads/images/
XoopsModules/wfdownloads/trunk/wfdownloads/include/module.php
XoopsModules/wfdownloads/trunk/wfdownloads/js/
XoopsModules/wfdownloads/trunk/wfdownloads/module.css
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_categorieslist.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_downloadslist.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_ip_logslist.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_mimetypeslist.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_mirrorslist.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_permissions.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_ratingslist.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_reportsmodificationslist.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_reviewslist.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/blocks/wfdownloads_block_new.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/blocks/wfdownloads_block_top.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/blocks/wfdownloads_block_top_by_cat.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_brokenfile.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_common_breadcrumb.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_common_letterschoice.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_disclaimer.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_download.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_footer.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_header.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_index.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_mirrors.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_newlistindex.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_ratefile.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_reviews.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_singlefile.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_submit.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_topten.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_viewcat.html
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/about.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/about.php 2014-06-14 08:16:24 UTC (rev 12586)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/about.php 2014-06-14 08:22:16 UTC (rev 12587)
@@ -1,30 +1,30 @@
-<?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.
- */
-/**
- * Wfdownloads module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
- * @package wfdownload
- * @since 3.23
- * @author Xoops Development Team
- * @version svn:$id$
- */
-include_once dirname(__FILE__) . '/admin_header.php';
-
-xoops_cp_header();
-
-$aboutAdmin = new ModuleAdmin();
-
-echo $aboutAdmin->addNavigation('about.php');
-echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);
-
-include 'admin_footer.php';
+<?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.
+ */
+/**
+ * Wfdownloads module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package wfdownload
+ * @since 3.23
+ * @author Xoops Development Team
+ * @version svn:$id$
+ */
+include_once dirname(__FILE__) . '/admin_header.php';
+
+xoops_cp_header();
+
+$aboutAdmin = new ModuleAdmin();
+
+echo $aboutAdmin->addNavigation('about.php');
+echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);
+
+include 'admin_footer.php';
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_footer.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_footer.php 2014-06-14 08:16:24 UTC (rev 12586)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_footer.php 2014-06-14 08:22:16 UTC (rev 12587)
@@ -1,28 +1,28 @@
-<?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.
- */
-/**
- * Wfdownloads module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
- * @package wfdownload
- * @since 3.23
- * @author Xoops Development Team
- * @version svn:$id$
- */
-echo "<div class='adminfooter'>\n";
-echo " <div style='text-align: center;'>\n";
-echo " <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n";
-echo " </div>\n";
-echo "" . _AM_MODULEADMIN_ADMIN_FOOTER . "\n";
-echo "</div>";
-
-xoops_cp_footer();
+<?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.
+ */
+/**
+ * Wfdownloads module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package wfdownload
+ * @since 3.23
+ * @author Xoops Development Team
+ * @version svn:$id$
+ */
+echo "<div class='adminfooter'>\n";
+echo " <div style='text-align: center;'>\n";
+echo " <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n";
+echo " </div>\n";
+echo "" . _AM_MODULEADMIN_ADMIN_FOOTER . "\n";
+echo "</div>";
+
+xoops_cp_footer();
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_header.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_header.php 2014-06-14 08:16:24 UTC (rev 12586)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_header.php 2014-06-14 08:22:16 UTC (rev 12587)
@@ -1,40 +1,40 @@
-<?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.
- */
-/**
- * Wfdownloads module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
- * @package wfdownload
- * @since 3.23
- * @author Xoops Development Team
- * @version svn:$id$
- */
-include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php';
-include_once dirname(dirname(__FILE__)) . '/include/common.php';
-
-// Include xoops admin header
-include_once XOOPS_ROOT_PATH . '/include/cp_header.php';
-
-$pathIcon16 = XOOPS_URL . '/' . $wfdownloads->getModule()->getInfo('icons16');
-$pathIcon32 = XOOPS_URL . '/' . $wfdownloads->getModule()->getInfo('icons32');
-$pathModuleAdmin = XOOPS_ROOT_PATH . '/' . $wfdownloads->getModule()->getInfo('dirmoduleadmin');
-require_once $pathModuleAdmin . '/moduleadmin/moduleadmin.php';
-
-// Load language files
-xoops_loadLanguage('admin', $wfdownloads->getModule()->dirname());
-xoops_loadLanguage('modinfo', $wfdownloads->getModule()->dirname());
-xoops_loadLanguage('main', $wfdownloads->getModule()->dirname());
-
-if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
- include_once(XOOPS_ROOT_PATH . '/class/template.php');
- $xoopsTpl = new XoopsTpl();
-}
+<?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.
+ */
+/**
+ * Wfdownloads module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package wfdownload
+ * @since 3.23
+ * @author Xoops Development Team
+ * @version svn:$id$
+ */
+include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php';
+include_once dirname(dirname(__FILE__)) . '/include/common.php';
+
+// Include xoops admin header
+include_once XOOPS_ROOT_PATH . '/include/cp_header.php';
+
+$pathIcon16 = XOOPS_URL . '/' . $wfdownloads->getModule()->getInfo('icons16');
+$pathIcon32 = XOOPS_URL . '/' . $wfdownloads->getModule()->getInfo('icons32');
+$pathModuleAdmin = XOOPS_ROOT_PATH . '/' . $wfdownloads->getModule()->getInfo('dirmoduleadmin');
+require_once $pathModuleAdmin . '/moduleadmin/moduleadmin.php';
+
+// Load language files
+xoops_loadLanguage('admin', $wfdownloads->getModule()->dirname());
+xoops_loadLanguage('modinfo', $wfdownloads->getModule()->dirname());
+xoops_loadLanguage('main', $wfdownloads->getModule()->dirname());
+
+if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
+ include_once(XOOPS_ROOT_PATH . '/class/template.php');
+ $xoopsTpl = new XoopsTpl();
+}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/categories.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/categories.php 2014-06-14 08:16:24 UTC (rev 12586)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/categories.php 2014-06-14 08:22:16 UTC (rev 12587)
@@ -21,6 +21,24 @@
$currentFile = basename(__FILE__);
include_once dirname(__FILE__) . '/admin_header.php';
+// Check directories
+if (!is_dir($wfdownloads->getConfig('uploaddir'))) {
+ redirect_header('index.php', 4, _AM_WFDOWNLOADS_ERROR_UPLOADDIRNOTEXISTS);
+ exit();
+}
+if (!is_dir(XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('mainimagedir'))) {
+ redirect_header('index.php', 4, _AM_WFDOWNLOADS_ERROR_MAINIMAGEDIRNOTEXISTS);
+ exit();
+}
+if (!is_dir(XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('screenshots'))) {
+ redirect_header('index.php', 4, _AM_WFDOWNLOADS_ERROR_SCREENSHOTSDIRNOTEXISTS);
+ exit();
+}
+if (!is_dir(XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('catimage'))) {
+ redirect_header('index.php', 4, _AM_WFDOWNLOADS_ERROR_CATIMAGEDIRNOTEXISTS);
+ exit();
+}
+
$op = WfdownloadsRequest::getString('op', 'categories.list');
switch ($op) {
case "category.move":
@@ -34,8 +52,8 @@
include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
$sform = new XoopsThemeForm(_AM_WFDOWNLOADS_CCATEGORY_MOVE, "move", xoops_getenv('PHP_SELF'));
- $categories = $wfdownloads->getHandler('category')->getObjects();
- $mytree = new XoopsObjectTree($categories, "cid", "pid");
+ $categoryObjs = $wfdownloads->getHandler('category')->getObjects();
+ $mytree = new XoopsObjectTree($categoryObjs, "cid", "pid");
$sform->addElement(new XoopsFormLabel(_AM_WFDOWNLOADS_BMODIFY, $mytree->makeSelBox('target', 'title')));
$create_tray = new XoopsFormElementTray('', '');
$create_tray -> addElement(new XoopsFormHidden('source', $cid));
@@ -73,10 +91,10 @@
case "addCat" :
$cid = WfdownloadsRequest::getInt('cid', 0, 'POST');
$pid = WfdownloadsRequest::getInt('pid', 0, 'POST');
- $weight = (isset($_POST["weight"]) && $_POST["weight"] > 0) ? (int)$_POST["weight"] : 0;
+ $weight = (isset($_POST["weight"]) && $_POST["weight"] > 0) ? (int) $_POST["weight"] : 0;
$down_groups = isset($_POST['groups']) ? $_POST['groups'] : array();
$up_groups = isset($_POST['up_groups']) ? $_POST['up_groups'] : array();
- $spotlighthis = (isset($_POST["lid"])) ? (int)$_POST["lid"] : 0;
+ $spotlighthis = (isset($_POST["lid"])) ? (int) $_POST["lid"] : 0;
$spotlighttop = (isset($_POST["spotlighttop"]) && ($_POST["spotlighttop"] == 1)) ? 1 : 0;
include_once XOOPS_ROOT_PATH.'/class/uploader.php';
@@ -98,45 +116,43 @@
} else {
$imgurl = (isset($_POST["imgurl"]) && $_POST["imgurl"] != "blank.png") ? $myts -> addslashes($_POST["imgurl"]) : "";
}
- // Formulize module support (2006/05/04) jpc
- if (wfdownloads_checkModule('formulize') < 300) {
- $formulize_fid = (isset($_POST["formulize_fid"])) ? (int)$_POST["formulize_fid"] : 0;
- }
if (!$cid) {
- $category = $wfdownloads->getHandler('category')->create();
+ $categoryObj = $wfdownloads->getHandler('category')->create();
} else {
- $category = $wfdownloads->getHandler('category')->get($cid);
- $childcats = $wfdownloads->getHandler('category')->getChildCats($category);
+ $categoryObj = $wfdownloads->getHandler('category')->get($cid);
+ $childcats = $wfdownloads->getHandler('category')->getChildCats($categoryObj);
if ($pid == $cid || in_array($pid, array_keys($childcats))) {
- $category->setErrors(_AM_WFDOWNLOADS_CCATEGORY_CHILDASPARENT);
+ $categoryObj->setErrors(_AM_WFDOWNLOADS_CCATEGORY_CHILDASPARENT);
}
}
- $category->setVar('title', $_POST["title"]);
- $category->setVar('pid', $pid);
- $category->setVar('weight', $weight);
- $category->setVar('imgurl', $imgurl);
- $category->setVar('description', $_POST["description"]);
- $category->setVar('summary', $_POST["summary"]);
- $category->setVar('dohtml', isset($_POST['dohtml']));
- $category->setVar('dosmiley', isset($_POST['dosmiley']));
- $category->setVar('doxcode', isset($_POST['doxcode']));
- $category->setVar('doimage', isset($_POST['doimage']));
- $category->setVar('dobr', isset($_POST['dobr']));
- // Formulize module support (2006/05/04) jpc
+ $categoryObj->setVar('title', $_POST["title"]);
+ $categoryObj->setVar('pid', $pid);
+ $categoryObj->setVar('weight', $weight);
+ $categoryObj->setVar('imgurl', $imgurl);
+ $categoryObj->setVar('description', $_POST["description"]);
+ $categoryObj->setVar('summary', $_POST["summary"]);
+ $categoryObj->setVar('dohtml', isset($_POST['dohtml']));
+ $categoryObj->setVar('dosmiley', isset($_POST['dosmiley']));
+ $categoryObj->setVar('doxcode', isset($_POST['doxcode']));
+ $categoryObj->setVar('doimage', isset($_POST['doimage']));
+ $categoryObj->setVar('dobr', isset($_POST['dobr']));
+// Formulize module support (2006/05/04) jpc - start
if (wfdownloads_checkModule('formulize')) {
- $category->setVar('formulize_fid', $formulize_fid);
+ $formulize_fid = (isset($_POST["formulize_fid"])) ? (int) $_POST["formulize_fid"] : 0;
+ $categoryObj->setVar('formulize_fid', $formulize_fid);
}
- $category->setVar('spotlighthis', $spotlighthis);
- $category->setVar('spotlighttop', $spotlighttop);
+// Formulize module support (2006/05/04) jpc - end
+ $categoryObj->setVar('spotlighthis', $spotlighthis);
+ $categoryObj->setVar('spotlighttop', $spotlighttop);
- if (!$wfdownloads->getHandler('category')->insert($category)) {
- echo $category->getHtmlErrors();
+ if (!$wfdownloads->getHandler('category')->insert($categoryObj)) {
+ echo $categoryObj->getHtmlErrors();
}
if (!$cid) {
if ($cid == 0) {
- $newid = (int)$category->getVar('cid');
+ $newid = (int) $categoryObj->getVar('cid');
}
wfdownloads_savePermissions($down_groups, $newid, 'WFDownCatPerm');
wfdownloads_savePermissions($up_groups, $newid, 'WFUpCatPerm');
@@ -159,12 +175,12 @@
case "del" :
$cid = WfdownloadsRequest::getInt('cid', 0);
$ok = WfdownloadsRequest::getBool('ok', false, 'POST');
- $categories = $wfdownloads->getHandler('category')->getObjects();
- $mytree = new XoopsObjectTree($categories, "cid", "pid");
+ $categoryObjs = $wfdownloads->getHandler('category')->getObjects();
+ $mytree = new XoopsObjectTree($categoryObjs, "cid", "pid");
if ($ok == true) {
// get all subcategories under the specified category
$arr = $mytree -> getAllChild($cid);
- foreach($arr as $child) {
+ foreach ($arr as $child) {
// get all category ids
$cids[] = $child->getVar('cid');
}
@@ -182,7 +198,7 @@
$wfdownloads->getHandler('report')->deleteAll($download_criteria);
$wfdownloads->getHandler('download')->deleteAll($download_criteria);
foreach (array_keys($downloads) as $lid) {
- xoops_comment_delete($wfdownloads->getModule()->mid(), (int)$lid);
+ xoops_comment_delete($wfdownloads->getModule()->mid(), (int) $lid);
}
// all downloads for each category is deleted, now delete the category data
@@ -215,11 +231,11 @@
echo $adminMenu->renderButton();
if (isset($_REQUEST['cid'])) {
- $category = $wfdownloads->getHandler('category')->get($_REQUEST['cid']);
+ $categoryObj = $wfdownloads->getHandler('category')->get($_REQUEST['cid']);
} else {
- $category = $wfdownloads->getHandler('category')->create();
+ $categoryObj = $wfdownloads->getHandler('category')->create();
}
- $form = $category->getForm();
+ $form = $categoryObj->getForm();
$form -> display();
include 'admin_footer.php';
@@ -241,7 +257,7 @@
$sorted_categories = wfdownloads_sortCategories();
$GLOBALS['xoopsTpl']->assign('sorted_categories', $sorted_categories);
$GLOBALS['xoopsTpl']->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML() );
- $GLOBALS['xoopsTpl']->display("db:{$wfdownloads->getModule()->dirname()}_admin_categorieslist.html");
+ $GLOBALS['xoopsTpl']->display("db:{$wfdownloads->getModule()->dirname()}_admin_categorieslist.tpl");
} else {
redirect_header("{$currentFile}?op=category.add", 1, _AM_WFDOWNLOADS_CCATEGORY_NOEXISTS);
}
@@ -256,13 +272,13 @@
if (isset($_POST['new_weights']) && count($_POST['new_weights']) > 0) {
$new_weights = $_POST['new_weights'];
$ids = array();
- foreach ($new_weights as $cid => $new_weight ) {
- $category = $wfdownloads->getHandler('category')->get($cid);
- $category->setVar('weight', $new_weight);
- if (!$wfdownloads->getHandler('category')->insert($category)) {
- redirect_header($currentFile, 3, $category->getErrors());
+ foreach ($new_weights as $cid => $new_weight) {
+ $categoryObj = $wfdownloads->getHandler('category')->get($cid);
+ $categoryObj->setVar('weight', $new_weight);
+ if (!$wfdownloads->getHandler('category')->insert($categoryObj)) {
+ redirect_header($currentFile, 3, $categoryObj->getErrors());
}
- unset($category);
+ unset($categoryObj);
}
redirect_header($currentFile, 1, _AM_WFDOWNLOADS_CATEGORIES_REORDERED);
exit();
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/clone.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/clone.php 2014-06-14 08:16:24 UTC (rev 12586)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/clone.php 2014-06-14 08:22:16 UTC (rev 12587)
@@ -1,171 +1,179 @@
-<?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.
- */
-/**
- * Wfdownloads module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
- * @package wfdownload
- * @since 3.23
- * @author Xoops Development Team
- * @version svn:$id$
- */
-$currentFile = basename(__FILE__);
-include_once dirname(__FILE__) . '/admin_header.php';
-
-if (@$_POST['op'] == 'submit') {
- if (!$GLOBALS['xoopsSecurity']->check()) {
- redirect_header($currentFile, 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
- exit();
- }
-
- $cloneDirname = $_POST['clonedirname'];
-
- // Check if name is valid
- if (empty($cloneDirname) || preg_match('/[^a-zA-Z0-9\_\-]/', $cloneDirname)) {
- redirect_header($currentFile, 3, sprintf(_AM_WFDOWNLOADS_CLONE_INVALIDNAME, $cloneDirname));
- exit();
- }
- // Check wether the cloned module exists or not
- if ($cloneDirname && is_dir(XOOPS_ROOT_PATH . '/modules/' . $cloneDirname)) {
- redirect_header($currentFile, 3, sprintf(_AM_WFDOWNLOADS_CLONE_EXISTS, $cloneDirname));
- }
-
- $patterns = array(
- strtolower(WFDOWNLOADS_DIRNAME) => strtolower($cloneDirname),
- strtoupper(WFDOWNLOADS_DIRNAME) => strtoupper($cloneDirname),
- ucfirst(strtolower(WFDOWNLOADS_DIRNAME)) => ucfirst(strtolower($cloneDirname))
- );
-
- $patKeys = array_keys($patterns);
- $patValues = array_values($patterns);
- wfdownloads_cloneFileDir(WFDOWNLOADS_ROOT_PATH);
- $logocreated = wfdownloads_createLogo(strtolower($cloneDirname));
-
- $message = "";
- if (is_dir(XOOPS_ROOT_PATH . '/modules/' . strtolower($cloneDirname))) {
- $message .= sprintf(
- _AM_WFDOWNLOADS_CLONE_CONGRAT,
- "<a href='" . XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=installlist'>" . ucfirst(strtolower($cloneDirname)) . "</a>"
- ) . "<br />\n";
- if (!$logocreated) {
- $message .= _AM_WFDOWNLOADS_CLONE_IMAGEFAIL;
- }
- } else {
- $message .= _AM_WFDOWNLOADS_CLONE_FAIL;
- }
-
- wfdownloads_xoops_cp_header();
- $indexAdmin = new ModuleAdmin();
- echo $indexAdmin->addNavigation($currentFile);
- echo $message;
- include 'admin_footer.php';
- exit();
-
-} else {
- wfdownloads_xoops_cp_header();
- $indexAdmin = new ModuleAdmin();
- echo $indexAdmin->addNavigation($currentFile);
- include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
- $form = new XoopsThemeForm(sprintf(
- _AM_WFDOWNLOADS_CLONE_TITLE,
- $wfdownloads->getModule()->getVar('name', 'E')
- ), 'clone', $currentFile, 'post', true);
- $cloneDirname_text = new XoopsFormText(_AM_WFDOWNLOADS_CLONE_NAME, 'clonedirname', 20, 20, '');
- $cloneDirname_text->setDescription(_AM_WFDOWNLOADS_CLONE_NAME_DSC);
- $form->addElement($cloneDirname_text, true);
- $form->addElement(new XoopsFormHidden('op', 'submit'));
- $form->addElement(new XoopsFormButton('', '', _SUBMIT, 'submit'));
- $form->display();
- include 'admin_footer.php';
- exit();
-}
-
-// recursive clonning script
-function wfdownloads_cloneFileDir($path)
-{
- global $patKeys;
- global $patValues;
-
- $newPath = str_replace($patKeys[0], $patValues[0], $path);
-
- if (is_dir($path)) {
- // create new dir
- mkdir($newPath);
- // check all files in dir, and process it
- if ($handle = opendir($path)) {
- while ($file = readdir($handle)) {
- if ($file != '.' && $file != '..' && $file != '.svn') {
- wfdownloads_cloneFileDir("{$path}/{$file}");
- }
- }
- closedir($handle);
- }
- } else {
- if (preg_match('/(.jpg|.gif|.png|.zip|.ttf)$/i', $path)) {
- // image
- copy($path, $newPath);
- } else {
- // file, read it
- $content = file_get_contents($path);
- $content = str_replace($patKeys, $patValues, $content);
- file_put_contents($newPath, $content);
- }
- }
-}
-
-function wfdownloads_createLogo($dirname)
-{
- $wfdownloads = WfdownloadsWfdownloads::getInstance();
- // Check extension/functions
- if (!extension_loaded("gd")) {
- return false;
- } else {
- $required_functions = array(
- "imagecreatetruecolor",
- "imagecolorallocate",
- "imagefilledrectangle",
- "imagejpeg",
- "imagedestroy",
- "imageftbbox"
- );
- foreach ($required_functions as $func) {
- if (!function_exists($func)) {
- return false;
- }
- }
- }
- // Check original image/font
- if (!file_exists($imageBase = XOOPS_ROOT_PATH . "/modules/" . $dirname . "/images/module_logo.png")) {
- return false;
- }
- if (!file_exists($font = XOOPS_ROOT_PATH . "/modules/" . $wfdownloads->getModule()->dirname() . "/images/VeraBd.ttf")) {
- return false;
- }
- // Create image
- $imageModule = imagecreatefrompng($imageBase);
- // Erase old text
- $greyColor = imagecolorallocate($imageModule, 237, 237, 237);
- imagefilledrectangle($imageModule, 5, 35, 85, 46, $greyColor);
- // Write text
- $textColor = imagecolorallocate($imageModule, 0, 0, 0);
- $space_to_border = (80 - strlen($dirname) * 6.5) / 2;
- imagefttext($imageModule, 8.5, 0, $space_to_border, 45, $textColor, $font, ucfirst($dirname), array());
- // Set transparency color
- $whiteColor = imagecolorallocatealpha($imageModule, 255, 255, 255, 127);
- imagefill($imageModule, 0, 0, $whiteColor);
- imagecolortransparent($imageModule, $whiteColor);
- // Save new image
- imagepng($imageModule, XOOPS_ROOT_PATH . "/modules/" . $dirname . "/images/module_logo.png");
- imagedestroy($imageModule);
-
- return true;
-}
+<?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.
+ */
+/**
+ * Wfdownloads module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package wfdownload
+ * @since 3.23
+ * @author Xoops Development Team
+ * @version svn:$id$
+ */
+$currentFile = basename(__FILE__);
+include_once dirname(__FILE__) . '/admin_header.php';
+
+if (@$_POST['op'] == 'submit') {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header($currentFile, 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ exit();
+ }
+
+ $cloneDirname = $_POST['clonedirname'];
+
+ // Check if name is valid
+ if (empty($cloneDirname) || preg_match('/[^a-zA-Z0-9\_\-]/', $cloneDirname)) {
+ redirect_header($currentFile, 3, sprintf(_AM_WFDOWNLOADS_CLONE_INVALIDNAME, $cloneDirname));
+ exit();
+ }
+ // Check wether the cloned module exists or not
+ if ($cloneDirname && is_dir(XOOPS_ROOT_PATH . '/modules/' . $cloneDirname)) {
+ redirect_header($currentFile, 3, sprintf(_AM_WFDOWNLOADS_CLONE_EXISTS, $cloneDirname));
+ }
+
+ $patterns = array(
+ strtolower(WFDOWNLOADS_DIRNAME) => strtolower($cloneDirname),
+ strtoupper(WFDOWNLOADS_DIRNAME) => strtoupper($cloneDirname),
+ ucfirst(strtolower(WFDOWNLOADS_DIRNAME)) => ucfirst(strtolower($cloneDirname))
+ );
+
+ $patKeys = array_keys($patterns);
+ $patValues = array_values($patterns);
+ wfdownloads_cloneFileDir(WFDOWNLOADS_ROOT_PATH);
+ $logocreated = wfdownloads_createLogo(strtolower($cloneDirname));
+
+ $message = "";
+ if (is_dir(XOOPS_ROOT_PATH . '/modules/' . strtolower($cloneDirname))) {
+ $message .= sprintf(
+ _AM_WFDOWNLOADS_CLONE_CONGRAT,
+ "<a href='" . XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=installlist'>" . ucfirst(strtolower($cloneDirname)) . "</a>"
+ ) . "<br />\n";
+ if (!$logocreated) {
+ $message .= _AM_WFDOWNLOADS_CLONE_IMAGEFAIL;
+ }
+ } else {
+ $message .= _AM_WFDOWNLOADS_CLONE_FAIL;
+ }
+
+ wfdownloads_xoops_cp_header();
+ $indexAdmin = new ModuleAdmin();
+ echo $indexAdmin->addNavigation($currentFile);
+ echo $message;
+ include 'admin_footer.php';
+ exit();
+
+} else {
+ wfdownloads_xoops_cp_header();
+ $indexAdmin = new ModuleAdmin();
+ echo $indexAdmin->addNavigation($currentFile);
+ include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
+ $form = new XoopsThemeForm(sprintf(
+ _AM_WFDOWNLOADS_CLONE_TITLE,
+ $wfdownloads->getModule()->getVar('name', 'E')
+ ), 'clone', $currentFile, 'post', true);
+ $cloneDirname_text = new XoopsFormText(_AM_WFDOWNLOADS_CLONE_NAME, 'clonedirname', 20, 20, '');
+ $cloneDirname_text->setDescription(_AM_WFDOWNLOADS_CLONE_NAME_DSC);
+ $form->addElement($cloneDirname_text, true);
+ $form->addElement(new XoopsFormHidden('op', 'submit'));
+ $form->addElement(new XoopsFormButton('', '', _SUBMIT, 'submit'));
+ $form->display();
+ include 'admin_footer.php';
+ exit();
+}
+
+// recursive clonning script
+/**
+ * @param $path
+ */
+function wfdownloads_cloneFileDir($path)
+{
+ global $patKeys;
+ global $patValues;
+
+ $newPath = str_replace($patKeys[0], $patValues[0], $path);
+
+ if (is_dir($path)) {
+ // create new dir
+ mkdir($newPath);
+ // check all files in dir, and process it
+ if ($handle = opendir($path)) {
+ while ($file = readdir($handle)) {
+ if ($file != '.' && $file != '..' && $file != '.svn') {
+ wfdownloads_cloneFileDir("{$path}/{$file}");
+ }
+ }
+ closedir($handle);
+ }
+ } else {
+ if (preg_match('/(.jpg|.gif|.png|.zip|.ttf)$/i', $path)) {
+ // image
+ copy($path, $newPath);
+ } else {
+ // file, read it
+ $content = file_get_contents($path);
+ $content = str_replace($patKeys, $patValues, $content);
+ file_put_contents($newPath, $content);
+ }
+ }
+}
+
+/**
+ * @param $dirname
+ *
+ * @return bool
+ */
+function wfdownloads_createLogo($dirname)
+{
+ $wfdownloads = WfdownloadsWfdownloads::getInstance();
+ // Check extension/functions
+ if (!extension_loaded("gd")) {
+ return false;
+ } else {
+ $required_functions = array(
+ "imagecreatetruecolor",
+ "imagecolorallocate",
+ "imagefilledrectangle",
+ "imagejpeg",
+ "imagedestroy",
+ "imageftbbox"
+ );
+ foreach ($required_functions as $func) {
+ if (!function_exists($func)) {
+ return false;
+ }
+ }
+ }
+ // Check original image/font
+ if (!file_exists($imageBase = XOOPS_ROOT_PATH . "/modules/" . $dirname . "/assets/images/module_logo.png")) {
+ return false;
+ }
+ if (!file_exists($font = XOOPS_ROOT_PATH . "/modules/" . $wfdownloads->getModule()->dirname() . "/assets/images/VeraBd.ttf")) {
+ return false;
+ }
+ // Create image
+ $imageModule = imagecreatefrompng($imageBase);
+ // Erase old text
+ $greyColor = imagecolorallocate($imageModule, 237, 237, 237);
+ imagefilledrectangle($imageModule, 5, 35, 85, 46, $greyColor);
+ // Write text
+ $textColor = imagecolorallocate($imageModule, 0, 0, 0);
+ $space_to_border = (80 - strlen($dirname) * 6.5) / 2;
+ imagefttext($imageModule, 8.5, 0, $space_to_border, 45, $textColor, $font, ucfirst($dirname), array());
+ // Set transparency color
+ $whiteColor = imagecolorallocatealpha($imageModule, 255, 255, 255, 127);
+ imagefill($imageModule, 0, 0, $whiteColor);
+ imagecolortransparent($imageModule, $whiteColor);
+ // Save new image
+ imagepng($imageModule, XOOPS_ROOT_PATH . "/modules/" . $dirname . "/assets/images/module_logo.png");
+ imagedestroy($imageModule);
+
+ return true;
+}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php 2014-06-14 08:16:24 UTC (rev 12586)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php 2014-06-14 08:22:16 UTC (rev 12587)
@@ -21,10 +21,23 @@
$currentFile = basename(__FILE__);
include_once dirname(__FILE__) . '/admin_header.php';
+// Check directories
if (!is_dir($wfdownloads->getConfig('uploaddir'))) {
redirect_header('index.php', 4, _AM_WFDOWNLOADS_ERROR_UPLOADDIRNOTEXISTS);
exit();
}
+if (!is_dir(XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('mainimagedir'))) {
+ redirect_header('index.php', 4, _AM_WFDOWNLOADS_ERROR_MAINIMAGEDIRNOTEXISTS);
+ exit();
+}
+if (!is_dir(XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('screenshots'))) {
+ redirect_header('index.php', 4, _AM_WFDOWNLOADS_ERROR_SCREENSHOTSDIRNOTEXISTS);
+ exit();
+}
+if (!is_dir(XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('catimage'))) {
+ redirect_header('index.php', 4, _AM_WFDOWNLOADS_ERROR_CATIMAGEDIRNOTEXISTS);
+ exit();
+}
$op = WfdownloadsRequest::getString('op', 'downloads.list');
switch ($op) {
@@ -41,8 +54,8 @@
$lid = WfdownloadsRequest::getInt('lid', 0);
- $category_count = $wfdownloads->getHandler('category')->getCount();
- if ($category_count) {
+ $categoriesCount = $wfdownloads->getHandler('category')->getCount();
+ if ($categoriesCount) {
// Allowed mimetypes list
echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_WFDOWNLOADS_FILE_ALLOWEDAMIME . "</legend>\n";
echo "<div style='padding: 8px;'>\n";
@@ -54,59 +67,73 @@
echo "</fieldset><br />\n";
if ($lid) {
- if (!$download = $wfdownloads->getHandler('download')->get($lid)) {
+ // edit download
+ if (!$downloadObj = $wfdownloads->getHandler('download')->get($lid)) {
redirect_header($currentFile, 4, _AM_WFDOWNLOADS_DOWN_ERROR_FILENOTFOUND);
exit();
}
- $cid = $download->getVar('cid');
- if (!$category = $wfdownloads->getHandler('category')->get($cid)) {
+ $cid = $downloadObj->getVar('cid');
+ if (!$categoryObj = $wfdownloads->getHandler('category')->get($cid)) {
redirect_header($currentFile, 4, _AM_WFDOWNLOADS_DOWN_ERROR_CATEGORYNOTFOUND);
exit();
}
- $title = preg_replace("/{category}/", $category->getVar('title'), _AM_WFDOWNLOADS_FFS_EDITDOWNLOADTITLE);
+ $title = preg_replace("/{category}/", $categoryObj->getVar('title'), _AM_WFDOWNLOADS_FILE_EDIT);
+ $title12 = preg_replace("/{category}/", $categoryObj->getVar('title'), _AM_WFDOWNLOADS_FFS_1STEP);
+ $title22 = preg_replace("/{category}/", $categoryObj->getVar('title'), _AM_WFDOWNLOADS_FFS_EDITDOWNLOADTITLE);
} else {
- $download = $wfdownloads->getHandler('download')->create();
+ // create download
+ $downloadObj = $wfdownloads->getHandler('download')->create();
$cid = WfdownloadsRequest::getInt('cid', 0, 'POST');
- $category = $wfdownloads->getHandler('category')->get($cid);
- $download->setVar('cid', $cid);
- $title = preg_replace("/{category}/", $category->getVar('title'), _AM_WFDOWNLOADS_FFS_DOWNLOADTITLE);
+ $categoryObj = $wfdownloads->getHandler('category')->get($cid);
+ $downloadObj->setVar('cid', $cid);
+ $title = preg_replace("/{category}/", $categoryObj->getVar('title'), _AM_WFDOWNLOADS_FILE_CREATE);
+ $title12 = preg_replace("/{category}/", $categoryObj->getVar('title'), _AM_WFDOWNLOADS_FFS_1STEP);
+ $title22 = preg_replace("/{category}/", $categoryObj->getVar('title'), _AM_WFDOWNLOADS_FFS_DOWNLOADTITLE);
}
- // Added Formulize module support (2006/05/04) jpc - start
+// Formulize module support (2006/05/04) jpc - start
if (!wfdownloads_checkModule('formulize')) {
- $sform = $download->getAdminForm($title);
- } elseif ((isset($_POST['submit_category']) && !empty($_POST['submit_category'])) || $lid) {
- $fid = $category->getVar('formulize_fid');
+ // one step form: 1st step
+ $sform = $downloadObj->getAdminForm($title);
+ } elseif ((isset($_POST['submit_category']) && !empty($_POST['submit_category']))) {
+ // two steps form: 2nd step
+ $fid = $categoryObj->getVar('formulize_fid');
$customArray = array();
if ($fid) {
include_once XOOPS_ROOT_PATH . "/modules/formulize/include/formdisplay.php";
include_once XOOPS_ROOT_PATH . "/modules/formulize/include/functions.php";
$customArray['fid'] = $fid;
- $customArray['formulize_mgr'] =& xoops_getmodulehandler('elements', 'formulize');
+ $customArray['formulize_mgr'] = xoops_getmodulehandler('elements', 'formulize');
$customArray['groups'] = $xoopsUser ? $xoopsUser->getGroups() : array(0 => XOOPS_GROUP_ANONYMOUS);
- $customArray['prevEntry'] = getEntryValues(
- $download->getVar('formulize_idreq'),
+ $customArray['prevEntry'] = getEntryValues( // is a Formulize function
+ $downloadObj->getVar('formulize_idreq'),
$customArray['formulize_mgr'],
$customArray['groups'],
- $fid
+ $fid,
+ null,
+ null,
+ null,
+ null,
+ null
);
- $customArray['entry'] = $download->getVar('formulize_idreq');
+ $customArray['entry'] = $downloadObj->getVar('formulize_idreq');
$customArray['go_back'] = "";
$customArray['parentLinks'] = "";
if (wfdownloads_checkModule('formulize') < 300) {
- $owner = getEntryOwner($entry);
+ $owner = getEntryOwner($customArray['entry']); // is a Formulize function
} else {
- $owner = getEntryOwner($entry, $fid);
+ $owner = getEntryOwner($customArray['entry'], $fid); // is a Formulize function
}
$ownerGroups = $member_handler->getGroupsByUser($owner, false);
$customArray['owner_groups'] = $ownerGroups;
}
- $sform = $download->getAdminForm($title, $customArray);
+ $sform = $downloadObj->getAdminForm($title22, $customArray);
} else {
- $sform = $download->getCategoryForm();
+ // two steps form: 1st step
+ $sform = $downloadObj->getCategoryForm($title12);
}
+// Formulize module support (2006/05/04) jpc - end
$sform->display();
- // Added Formulize module support (2006/05/04) jpc - end
} else {
redirect_header('categories.php', 1, _AM_WFDOWNLOADS_CCATEGORY_NOEXISTS);
exit();
@@ -243,10 +270,10 @@
if ($lid > 0) {
$thisIsANewRecord = false; /* Added by Lankford on 2007/3/21 */
- $download = $wfdownloads->getHandler('download')->get($lid);
+ $downloadObj = $wfdownloads->getHandler('download')->get($lid);
} else {
$thisIsANewRecord = true; /* Added by Lankford on 2007/3/21 */
- $download = $wfdownloads->getHandler('download')->create();
+ $downloadObj = $wfdownloads->getHandler('download')->create();
}
// Define URL
if (empty($_FILES['userfile']['name'])) {
@@ -255,7 +282,7 @@
$filename = '';
$filetype = '';
// Get size from form
- $size = (empty($_POST['size']) || !is_numeric($_POST['size'])) ? 0 : (int)$_POST["size"];
+ $size = (empty($_POST['size']) || !is_numeric($_POST['size'])) ? 0 : (int) $_POST["size"];
} else {
$url = ($_POST["url"] != "http://") ? $_POST['url'] : '';
$filename = $_POST['filename'];
@@ -265,8 +292,8 @@
$size = @filesize($filePath);
}
$title = trim($_POST['title']);
- $download->setVar('filename', $filename);
- $download->setVar('filetype', $filetype);
+ $dow...
[truncated message content] |
|
From: <be...@us...> - 2014-06-14 08:16:39
|
Revision: 12586
http://sourceforge.net/p/xoops/svn/12586
Author: beckmi
Date: 2014-06-14 08:16:24 +0000 (Sat, 14 Jun 2014)
Log Message:
-----------
Reverting to 12444
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/admin/menu.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/multicolumnsthemeform.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/object.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/request.php
XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
XoopsModules/wfdownloads/trunk/wfdownloads/docs/credits.txt
XoopsModules/wfdownloads/trunk/wfdownloads/docs/history.txt
XoopsModules/wfdownloads/trunk/wfdownloads/docs/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/docs/install.txt
XoopsModules/wfdownloads/trunk/wfdownloads/docs/lang_diff.txt
XoopsModules/wfdownloads/trunk/wfdownloads/docs/license.txt
XoopsModules/wfdownloads/trunk/wfdownloads/docs/readme.txt
XoopsModules/wfdownloads/trunk/wfdownloads/images/VeraBd.ttf
XoopsModules/wfdownloads/trunk/wfdownloads/images/blank.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/brokenimg.png
XoopsModules/wfdownloads/trunk/wfdownloads/images/category/blank.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/category/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/images/category/thumbs/blank.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/category/thumbs/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/images/down.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/approve.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/arrow.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/close12.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/delete.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/disabled.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/down.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/download.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/download1.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/download2.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/download3.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/download4.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/downloads.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/downloads02.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/downloads03.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/edit.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/forum.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/ignore.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/ignore.png
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/link.png
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/newred.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/off.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/on.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/open12.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/pop.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/rate0.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/rate1.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/rate2.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/rate3.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/rate4.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/rate5.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/reviews.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/rss.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/statistics.png
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/update.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/world_link.png
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon32/database_go.png
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon32/editcopy.png
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon32/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/images/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/images/loadingAnimation.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/logo-en.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/logo.png
XoopsModules/wfdownloads/trunk/wfdownloads/images/module_logo.png
XoopsModules/wfdownloads/trunk/wfdownloads/images/screenshots/blank.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/screenshots/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/images/screenshots/thumbs/blank.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/screenshots/thumbs/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/images/size2.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/up.gif
XoopsModules/wfdownloads/trunk/wfdownloads/include/constants.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/search.inc.php
XoopsModules/wfdownloads/trunk/wfdownloads/js/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/js/jquery.ThickBox/loadingAnimation.gif
XoopsModules/wfdownloads/trunk/wfdownloads/js/jquery.ThickBox/thickbox-compressed.js
XoopsModules/wfdownloads/trunk/wfdownloads/js/jquery.ThickBox/thickbox.css
XoopsModules/wfdownloads/trunk/wfdownloads/js/jquery.ThickBox/thickbox.js
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/README.md
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/DO NOT CHANGE THESE FILES. USE -src- FOLDER.txt
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/background.png
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/bigplay.png
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/bigplay.svg
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/controls-ted.png
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/controls-wmp-bg.png
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/controls-wmp.png
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/controls.png
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/controls.svg
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/flashmediaelement-cdn.swf
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/flashmediaelement.swf
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/loading.gif
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/mediaelement-and-player.min.js
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/mediaelement.min.js
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/mediaelementplayer.min.css
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/mediaelementplayer.min.js
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/mejs-skins.css
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/silverlightmediaelement.xap
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/blocks.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/directorychecker.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/filechecker.php
XoopsModules/wfdownloads/trunk/wfdownloads/sql/mysql.sql
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_categorieslist.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_downloadslist.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_ip_logslist.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_mimetypeslist.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_mirrorslist.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_permissions.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_ratingslist.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_reportsmodificationslist.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_reviewslist.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/blocks/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/blocks/wfdownloads_block_new.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/blocks/wfdownloads_block_top.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/blocks/wfdownloads_block_top_by_cat.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_brokenfile.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_common_breadcrumb.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_common_letterschoice.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_disclaimer.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_download.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_footer.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_header.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_index.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_mirrors.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_newlistindex.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_ratefile.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_reviews.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_singlefile.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_submit.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_topten.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_viewcat.html
XoopsModules/wfdownloads/trunk/wfdownloads/uploads/index.html
Added Paths:
-----------
XoopsModules/wfdownloads/trunk/wfdownloads/admin/
XoopsModules/wfdownloads/trunk/wfdownloads/blocks/
XoopsModules/wfdownloads/trunk/wfdownloads/blocks/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/blocks/top.php
XoopsModules/wfdownloads/trunk/wfdownloads/blocks/top_by_cat.php
XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/
XoopsModules/wfdownloads/trunk/wfdownloads/comment_delete.php
XoopsModules/wfdownloads/trunk/wfdownloads/comment_edit.php
XoopsModules/wfdownloads/trunk/wfdownloads/comment_new.php
XoopsModules/wfdownloads/trunk/wfdownloads/comment_post.php
XoopsModules/wfdownloads/trunk/wfdownloads/comment_reply.php
XoopsModules/wfdownloads/trunk/wfdownloads/docs/
XoopsModules/wfdownloads/trunk/wfdownloads/footer.php
XoopsModules/wfdownloads/trunk/wfdownloads/header.php
XoopsModules/wfdownloads/trunk/wfdownloads/images/
XoopsModules/wfdownloads/trunk/wfdownloads/include/
XoopsModules/wfdownloads/trunk/wfdownloads/index.php
XoopsModules/wfdownloads/trunk/wfdownloads/js/
XoopsModules/wfdownloads/trunk/wfdownloads/language/
XoopsModules/wfdownloads/trunk/wfdownloads/mirror.php
XoopsModules/wfdownloads/trunk/wfdownloads/module.css
XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php
XoopsModules/wfdownloads/trunk/wfdownloads/notification_update.php
XoopsModules/wfdownloads/trunk/wfdownloads/ratefile.php
XoopsModules/wfdownloads/trunk/wfdownloads/review.php
XoopsModules/wfdownloads/trunk/wfdownloads/rss.php
XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php
XoopsModules/wfdownloads/trunk/wfdownloads/sql/
XoopsModules/wfdownloads/trunk/wfdownloads/submit.php
XoopsModules/wfdownloads/trunk/wfdownloads/templates/
XoopsModules/wfdownloads/trunk/wfdownloads/topten.php
XoopsModules/wfdownloads/trunk/wfdownloads/uploads/
XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php
XoopsModules/wfdownloads/trunk/wfdownloads/visit.php
XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
Property Changed:
----------------
XoopsModules/wfdownloads/trunk/wfdownloads/images/VeraBd.ttf
XoopsModules/wfdownloads/trunk/wfdownloads/images/blank.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/brokenimg.png
XoopsModules/wfdownloads/trunk/wfdownloads/images/category/blank.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/category/thumbs/blank.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/down.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/approve.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/arrow.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/close12.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/delete.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/disabled.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/down.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/download.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/download1.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/download2.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/download3.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/download4.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/downloads.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/downloads02.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/downloads03.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/edit.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/forum.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/ignore.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/ignore.png
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/link.png
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/newred.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/off.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/on.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/open12.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/pop.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/rate0.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/rate1.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/rate2.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/rate3.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/rate4.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/rate5.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/reviews.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/rss.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/statistics.png
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/update.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon/world_link.png
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon32/database_go.png
XoopsModules/wfdownloads/trunk/wfdownloads/images/icon32/editcopy.png
XoopsModules/wfdownloads/trunk/wfdownloads/images/loadingAnimation.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/logo-en.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/logo.png
XoopsModules/wfdownloads/trunk/wfdownloads/images/module_logo.png
XoopsModules/wfdownloads/trunk/wfdownloads/images/screenshots/blank.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/screenshots/thumbs/blank.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/size2.gif
XoopsModules/wfdownloads/trunk/wfdownloads/images/up.gif
XoopsModules/wfdownloads/trunk/wfdownloads/js/jquery.ThickBox/loadingAnimation.gif
XoopsModules/wfdownloads/trunk/wfdownloads/js/jquery.ThickBox/thickbox-compressed.js
XoopsModules/wfdownloads/trunk/wfdownloads/js/jquery.ThickBox/thickbox.js
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/background.png
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/bigplay.png
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/controls-ted.png
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/controls-wmp-bg.png
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/controls-wmp.png
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/controls.png
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/flashmediaelement-cdn.swf
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/flashmediaelement.swf
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/loading.gif
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/mediaelement-and-player.min.js
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/mediaelement.min.js
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/mediaelementplayer.min.js
XoopsModules/wfdownloads/trunk/wfdownloads/js/mediaelement/build/silverlightmediaelement.xap
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/menu.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/menu.php 2014-05-28 22:48:37 UTC (rev 12555)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/menu.php 2014-06-14 08:16:24 UTC (rev 12586)
@@ -31,55 +31,55 @@
$adminmenu[$i]["title"] = _MI_WFDOWNLOADS_MENU_HOME;
$adminmenu[$i]['link'] = "admin/index.php";
$adminmenu[$i]["icon"] = $pathIcon32 . '/home.png';
-$i++;
+++$i;
$adminmenu[$i]['title'] = _MI_WFDOWNLOADS_MENU_CATEGORIES;
$adminmenu[$i]['link'] = "admin/categories.php";
$adminmenu[$i]["icon"] = $pathIcon32 . '/category.png';
-$i++;
+++$i;
$adminmenu[$i]['title'] = _MI_WFDOWNLOADS_MENU_DOWNLOADS;
$adminmenu[$i]['link'] = "admin/downloads.php";
$adminmenu[$i]["icon"] = $pathIcon32 . '/download.png';
-$i++;
+++$i;
$adminmenu[$i]['title'] = _MI_WFDOWNLOADS_MENU_REVIEWS;
$adminmenu[$i]['link'] = "admin/reviews.php";
$adminmenu[$i]["icon"] = $pathIcon32 . '/translations.png';
-$i++;
+++$i;
$adminmenu[$i]['title'] = _MI_WFDOWNLOADS_MENU_RATINGS;
$adminmenu[$i]['link'] = "admin/ratings.php";
$adminmenu[$i]["icon"] = $pathIcon32 . '/button_ok.png';
-$i++;
+++$i;
$adminmenu[$i]['title'] = _MI_WFDOWNLOADS_MENU_REPORTSMODIFICATIONS;
$adminmenu[$i]['link'] = "admin/reportsmodifications.php";
$adminmenu[$i]["icon"] = $pathIcon32 . '/alert.png';
-$i++;
+++$i;
$adminmenu[$i]['title'] = _MI_WFDOWNLOADS_MENU_MIRRORS;
$adminmenu[$i]['link'] = "admin/mirrors.php";
$adminmenu[$i]["icon"] = $pathIcon32 . '/list.png';
-$i++;
+++$i;
$adminmenu[$i]['title'] = _MI_WFDOWNLOADS_MENU_INDEXPAGE;
$adminmenu[$i]['link'] = "admin/indexpage.php";
$adminmenu[$i]["icon"] = $pathIcon32 . '/index.png';
-$i++;
+++$i;
$adminmenu[$i]['title'] = _MI_WFDOWNLOADS_MENU_IMAGES;
$adminmenu[$i]['link'] = "admin/images.php";
$adminmenu[$i]["icon"] = $pathIcon32 . '/photo.png';
-$i++;
+++$i;
$adminmenu[$i]['title'] = _MI_WFDOWNLOADS_MENU_MIMETYPES;
$adminmenu[$i]['link'] = "admin/mimetypes.php";
$adminmenu[$i]["icon"] = $pathIcon32 . '/type.png';
-$i++;
+++$i;
$adminmenu[$i]['title'] = _MI_WFDOWNLOADS_MENU_PERMISSIONS;
$adminmenu[$i]['link'] = "admin/permissions.php";
$adminmenu[$i]["icon"] = $pathIcon32 . '/permissions.png';
-$i++;
+++$i;
$adminmenu[$i]['title'] = _MI_WFDOWNLOADS_MENU_IMPORT;
$adminmenu[$i]['link'] = "admin/import.php";
$adminmenu[$i]["icon"] = './images/icon32/database_go.png';
-$i++;
+++$i;
$adminmenu[$i]['title'] = _MI_WFDOWNLOADS_MENU_CLONE;
$adminmenu[$i]['link'] = "admin/clone.php";
$adminmenu[$i]["icon"] = './images/icon32/editcopy.png';
-$i++;
+++$i;
$adminmenu[$i]['title'] = _MI_WFDOWNLOADS_MENU_ABOUT;
$adminmenu[$i]['link'] = "admin/about.php";
$adminmenu[$i]["icon"] = $pathIcon32 . '/about.png';
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php 2014-05-28 22:48:37 UTC (rev 12555)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php 2014-06-14 08:16:24 UTC (rev 12586)
@@ -61,14 +61,12 @@
redirect_header($currentFile, 1, _AM_WFDOWNLOADS_BROKEN_FILEIGNORED);
break;
-
-
case "modification.show":
$requestid = WfdownloadsRequest::getInt('requestid', 0);
$modification = $wfdownloads->getHandler('modification')->get($requestid);
$modify_user = new XoopsUser($modification->getVar('modifysubmitter'));
- $modifyname = XoopsUserUtility::getUnameFromId((int)$modify_user->getVar('uid'));
+ $modifyname = XoopsUserUtility::getUnameFromId((int) $modify_user->getVar('uid'));
$modifyemail = $modify_user->getVar('email');
$download = $wfdownloads->getHandler('download')->get($modification->getVar('lid'));
@@ -208,12 +206,12 @@
$modificationFormElement = new XoopsFormLabel('', $modificationContent);
$mcform->addElement($downloadFormElement, false, $i, 1);
$mcform->addElement($modificationFormElement, false, $i, 2);
- $i++;
+ ++$i;
}
$button_tray = new XoopsFormElementTray('', '');
$button_tray->addElement(new XoopsFormHidden('requestid', $requestid));
- $button_tray->addElement(new XoopsFormHidden('lid', (int)$modification->getVar('lid')));
+ $button_tray->addElement(new XoopsFormHidden('lid', (int) $modification->getVar('lid')));
$hidden = new XoopsFormHidden('op', 'modification.change');
$button_tray->addElement($hidden);
if (!$modification->isNew()) {
@@ -230,7 +228,7 @@
$mcform->addElement($button_tray, false, $i, 2);
$mcform->display();
-
+
xoops_cp_footer();
exit();
break;
Added: XoopsModules/wfdownloads/trunk/wfdownloads/blocks/index.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/blocks/index.html (rev 0)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/blocks/index.html 2014-06-14 08:16:24 UTC (rev 12586)
@@ -0,0 +1 @@
+<script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/wfdownloads/trunk/wfdownloads/blocks/top.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/blocks/top.php (rev 0)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/blocks/top.php 2014-06-14 08:16:24 UTC (rev 12586)
@@ -0,0 +1,82 @@
+<?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.
+ */
+/**
+ * Wfdownloads module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package wfdownload
+ * @since 3.23
+ * @author Xoops Development Team
+ * @version svn:$id$
+ */
+
+/**
+ * Function: b_mydownloads_top_show
+ * Input : $options[0] = date for the most recent downloads
+ * hits for the most popular downloads
+ * $block['content'] = The optional above content
+ * $options[1] = How many downloads are displayes
+ * Output : Returns the most recent or most popular downloads
+ */
+defined("XOOPS_ROOT_PATH") or die('XOOPS root path not defined');
+include_once dirname(dirname(__FILE__)) . '/include/common.php';
+function wfdownloads_top_show($options)
+{
+ global $xoopsUser;
+ $wfdownloads = WfdownloadsWfdownloads::getInstance();
+
+ $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0 => XOOPS_GROUP_ANONYMOUS);
+ $gperm_handler = xoops_gethandler('groupperm');
+ $allowedDownCategoriesIds = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $wfdownloads->getModule()->mid());
+
+ $block = array();
+
+ // get downloads
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('cid', '(' . implode(',', $allowedDownCategoriesIds) . ')', 'IN'));
+ $criteria->add(new Criteria('offline', false));
+ $criteria->setSort($options[0]);
+ $criteria->setOrder('DESC');
+ $criteria->setLimit($options[1]);
+ $downloads = $wfdownloads->getHandler('download')->getObjects($criteria);
+
+ foreach (array_keys($downloads) as $i) {
+ $download = $downloads[$i]->toArray();
+ if (!in_array((int)$download['cid'], $allowedDownCategoriesIds)) {
+ continue;
+ }
+ $download['title'] = xoops_substr($download['title'], 0, ($options[2] - 1));
+ $download['id'] = (int)$download['lid'];
+ if ($options[0] == 'published') {
+ $download['date'] = formatTimestamp($download['published'], $wfdownloads->getConfig('dateformat'));
+ } else {
+ $download['date'] = formatTimestamp($download['date'], $wfdownloads->getConfig('dateformat'));
+ }
+ $download['dirname'] = $wfdownloads->getModule()->dirname();
+ $block['downloads'][] = $download;
+ }
+
+ return $block;
+}
+
+function wfdownloads_top_edit($options)
+{
+ $form = "" . _MB_WFDOWNLOADS_DISP . " ";
+ $form .= "<input type='hidden' name='options[]' value='" . ($options[0] == 'published') ? 'published' : 'hits' . "' />";
+ $form .= "<input type='text' name='options[]' value='" . $options[1] . "' /> " . _MB_WFDOWNLOADS_FILES . "";
+ $form .= "<br />";
+ $form
+ .=
+ "" . _MB_WFDOWNLOADS_CHARS . " <input type='text' name='options[]' value='" . $options[2] . "' /> " . _MB_WFDOWNLOADS_LENGTH . "";
+
+ return $form;
+}
Property changes on: XoopsModules/wfdownloads/trunk/wfdownloads/blocks/top.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/wfdownloads/trunk/wfdownloads/blocks/top_by_cat.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/blocks/top_by_cat.php (rev 0)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/blocks/top_by_cat.php 2014-06-14 08:16:24 UTC (rev 12586)
@@ -0,0 +1,94 @@
+<?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.
+ */
+/**
+ * Wfdownloads module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package wfdownload
+ * @since 3.23
+ * @author Xoops Development Team
+ * @version svn:$id$
+ */
+
+/**
+ * Function: b_mydownloads_top_by_cat_show
+ * Input : $options[0] = date for the most recent downloads
+ * hits for the most popular downloads
+ * $block['content'] = The optional above content
+ * $options[1] = How many downloads are displayes
+ * Output : Returns the most recent or most popular downloads
+ */
+defined("XOOPS_ROOT_PATH") or die('XOOPS root path not defined');
+include_once dirname(dirname(__FILE__)) . '/include/common.php';
+function wfdownloads_top_by_cat_show($options)
+{
+ global $xoopsUser;
+ $wfdownloads = WfdownloadsWfdownloads::getInstance();
+
+ $gperm_handler = xoops_gethandler('groupperm');
+ $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0 => XOOPS_GROUP_ANONYMOUS);
+ $allowedDownCategoriesIds = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $wfdownloads->getModule()->mid());
+
+ $block = array();
+
+ // get downloads
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('cid', '(' . implode(',', $allowedDownCategoriesIds) . ')', 'IN'));
+ $criteria->add(new Criteria('offline', false));
+ $criteria->setSort('date');
+ $criteria->setOrder('DESC');
+ $criteria->setLimit($options[1]);
+ $downloads = $wfdownloads->getHandler('download')->getObjects($criteria);
+
+ foreach (array_keys($downloads) as $i) {
+ $download = $downloads[$i]->toArray();
+ if (!in_array((int)$download['cid'], $allowedDownCategoriesIds)) {
+ continue;
+ }
+ $download['title'] = xoops_substr($download['title'], 0, ($options[2] - 1));
+ $download['id'] = (int)$download['lid'];
+ if ($options[0] == 'published') {
+ $download['date'] = formatTimestamp($download['published'], $wfdownloads->getConfig('dateformat'));
+ } else {
+ $download['date'] = formatTimestamp($download['date'], $wfdownloads->getConfig('dateformat'));
+ }
+ $download['dirname'] = $wfdownloads->getModule()->dirname();
+ $block['downloads'][] = $download;
+ }
+
+ $allsubcats_linked_totop = $wfdownloads->getHandler('category')->getAllSubcatsTopParentCid();
+
+ foreach ($wfdownloads->getHandler('category')->topCategories as $cid) {
+ $block['topcats'][$cid]['title'] = $wfdownloads->getHandler('category')->allCategories[$cid]->getVar('title');
+ $block['topcats'][$cid]['cid'] = $cid;
+ $block['topcats'][$cid]['imgurl'] = $wfdownloads->getHandler('category')->allCategories[$cid]->getVar('imgurl');
+ }
+
+ foreach ($block['downloads'] as $key => $value) {
+ $block['topcats'][$allsubcats_linked_totop[$value['cid']]]['downloads'][] = $value;
+ }
+
+ return $block;
+}
+
+function wfdownloads_top_by_cat_edit($options)
+{
+ $form = "" . _MB_WFDOWNLOADS_DISP . " ";
+ $form .= "<input type='hidden' name='options[]' value='" . ($options[0] == 'published') ? 'published' : 'hits' . "' />";
+ $form .= "<input type='text' name='options[]' value='" . $options[1] . "' /> " . _MB_WFDOWNLOADS_FILES . "";
+ $form .= "<br />";
+ $form
+ .=
+ "" . _MB_WFDOWNLOADS_CHARS . " <input type='text' name='options[]' value='" . $options[2] . "' /> " . _MB_WFDOWNLOADS_LENGTH . "";
+
+ return $form;
+}
Property changes on: XoopsModules/wfdownloads/trunk/wfdownloads/blocks/top_by_cat.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php (rev 0)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php 2014-06-14 08:16:24 UTC (rev 12586)
@@ -0,0 +1,195 @@
+<?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.
+ */
+/**
+ * Wfdownloads module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package wfdownload
+ * @since 3.23
+ * @author Xoops Development Team
+ * @version svn:$id$
+ */
+$currentFile = basename(__FILE__);
+include 'header.php';
+
+$lid = WfdownloadsRequest::getInt('lid', 0);
+$download = $wfdownloads->getHandler('download')->get($lid);
+if (empty($download)) {
+ redirect_header('index.php', 3, _CO_WFDOWNLOADS_ERROR_NODOWNLOAD);
+}
+$cid = WfdownloadsRequest::getInt('cid', $download->getVar('cid'));
+$category = $wfdownloads->getHandler('category')->get($cid);
+if (empty($category)) {
+ redirect_header('index.php', 3, _CO_WFDOWNLOADS_ERROR_NOCATEGORY);
+}
+
+// Download not published, expired or taken offline - redirect
+if (
+ $download->getVar('published') == 0 ||
+ $download->getVar('published') > time() ||
+ $download->getVar('offline') == true ||
+ ($download->getVar('expired') == true && $download->getVar('expired') < time()) ||
+ $download->getVar('status') == _WFDOWNLOADS_STATUS_WAITING) {
+ redirect_header('index.php', 3, _MD_WFDOWNLOADS_NODOWNLOAD);
+}
+
+// Check permissions
+if ($wfdownloads->getConfig('enable_brokenreports') == false && !wfdownloads_userIsAdmin()) {
+ redirect_header('index.php', 3, _NOPERM);
+}
+
+// Breadcrumb
+include_once XOOPS_ROOT_PATH . "/class/tree.php";
+$categoriesTree = new XoopsObjectTree($wfdownloads->getHandler('category')->getObjects(), 'cid', 'pid');
+$breadcrumb = new WfdownloadsBreadcrumb();
+$breadcrumb->addLink($wfdownloads->getModule()->getVar('name'), WFDOWNLOADS_URL);
+foreach (array_reverse($categoriesTree->getAllParent($cid)) as $parentCategory) {
+ $breadcrumb->addLink($parentCategory->getVar('title'), "viewcat.php?cid=" . $parentCategory->getVar('cid'));
+}
+$breadcrumb->addLink($category->getVar('title'), "viewcat.php?cid={$cid}");
+$breadcrumb->addLink($download->getVar('title'), "singlefile.php?lid={$lid}");
+
+
+$op = WfdownloadsRequest::getString('op', 'report.add');
+switch ($op) {
+ case "report.add" :
+ default :
+ // Get report sender 'uid'
+ $senderUid = is_object($xoopsUser) ? (int)$xoopsUser->getVar('uid') : 0;
+ $senderIp = getenv('REMOTE_ADDR');
+
+ if (!empty($_POST['submit'])) {
+ // Check if REG user is trying to report twice
+ $criteria = new Criteria('lid', $lid);
+ $reportsCount = $wfdownloads->getHandler('report')->getCount($criteria);
+ if ($reportsCount > 0) {
+ redirect_header('index.php', 2, _MD_WFDOWNLOADS_ALREADYREPORTED);
+ } else {
+ $report = $wfdownloads->getHandler('report')->create();
+ $report->setVar('lid', $lid);
+ $report->setVar('sender', $senderUid);
+ $report->setVar('ip', $senderIp);
+ $report->setVar('date', time());
+ $report->setVar('confirmed', 0);
+ $report->setVar('acknowledged', 0);
+ if ($wfdownloads->getHandler('report')->insert($report)) {
+ // All is well
+ // Send notification
+ $tags = array();
+ $tags['BROKENREPORTS_URL'] = WFDOWNLOADS_URL . '/admin/reportsmodifications.php?op=reports.modifications.list';
+ $notification_handler->triggerEvent('global', 0, 'file_broken', $tags);
+
+ // Send email to the owner of the download stating that it is broken
+ $user = $member_handler->getUser($download->getVar('submitter'));
+ $subdate = formatTimestamp($download->getVar('published'), $wfdownloads->getConfig('dateformat'));
+ $cid = $download->getVar('cid');
+ $title = $download->getVar('title');
+ $subject = _MD_WFDOWNLOADS_BROKENREPORTED;
+
+ $xoopsMailer = & getMailer();
+ $xoopsMailer->useMail();
+ $template_dir = WFDOWNLOADS_ROOT_PATH . "/language/" . $xoopsConfig['language'] . "/mail_template";
+
+ $xoopsMailer->setTemplateDir($template_dir);
+ $xoopsMailer->setTemplate('filebroken_notify.tpl');
+ $xoopsMailer->setToEmails($user->email());
+ $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
+ $xoopsMailer->setFromName($xoopsConfig['sitename']);
+ $xoopsMailer->assign("X_UNAME", $user->uname());
+ $xoopsMailer->assign("SITENAME", $xoopsConfig['sitename']);
+ $xoopsMailer->assign("X_ADMINMAIL", $xoopsConfig['adminmail']);
+ $xoopsMailer->assign('X_SITEURL', XOOPS_URL . '/');
+ $xoopsMailer->assign("X_TITLE", $title);
+ $xoopsMailer->assign("X_SUB_DATE", $subdate);
+ $xoopsMailer->assign('X_DOWNLOAD', WFDOWNLOADS_URL . "/singlefile.php?cid={$cid}&lid={$lid}");
+ $xoopsMailer->setSubject($subject);
+ $xoopsMailer->send();
+ redirect_header('index.php', 2, _MD_WFDOWNLOADS_BROKENREPORTED);
+ exit();
+ } else {
+ echo $report->getHtmlErrors();
+ }
+ }
+ } else {
+ $xoopsOption['template_main'] = "{$wfdownloads->getModule()->dirname()}_brokenfile.html";
+ include XOOPS_ROOT_PATH . '/header.php';
+
+ // Begin Main page Heading etc
+ $catarray['imageheader'] = wfdownloads_headerImage();
+ $xoopsTpl->assign('catarray', $catarray);
+
+ $xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js');
+ $xoTheme->addScript(WFDOWNLOADS_URL . '/js/jquery.ThickBox/thickbox-compressed.js');
+ $xoTheme->addStylesheet(WFDOWNLOADS_URL . '/js/jquery.ThickBox/thickbox.css');
+ $xoTheme->addStylesheet(WFDOWNLOADS_URL . '/module.css');
+
+ $xoopsTpl->assign('wfdownloads_url', WFDOWNLOADS_URL . '/');
+
+ // Breadcrumb
+ $breadcrumb->addLink(_MD_WFDOWNLOADS_REPORTBROKEN, '');
+ $xoopsTpl->assign('wfdownloads_breadcrumb', $breadcrumb->render());
+
+ // Generate form
+ include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
+ $sform = new XoopsThemeForm(_MD_WFDOWNLOADS_RATETHISFILE, 'reportform', xoops_getenv('PHP_SELF'));
+ $sform->addElement(new XoopsFormHidden('lid', $lid));
+ $sform->addElement(new XoopsFormHidden('cid', $cid));
+ $sform->addElement(new XoopsFormHidden('uid', $senderUid));
+ $button_tray = new XoopsFormElementTray('', '');
+ $submit_button = new XoopsFormButton('', 'submit', _MD_WFDOWNLOADS_SUBMITBROKEN, 'submit');
+ $button_tray->addElement($submit_button);
+ $cancel_button = new XoopsFormButton('', '', _CANCEL, 'button');
+ $cancel_button->setExtra('onclick="history.go(-1)"');
+ $button_tray->addElement($cancel_button);
+ $sform->addElement($button_tray);
+ $xoopsTpl->assign('reportform', $sform->render());
+ $xoopsTpl->assign(
+ 'download',
+ array('lid' => $lid, 'cid' => $cid, 'title' => $download->getVar('title'), 'description' => $download->getVar('description'))
+ );
+
+ $criteria = new Criteria('lid', $lid);
+ $reports = $wfdownloads->getHandler('report')->getObjects($criteria);
+ //print_r($reports);
+ if (count($reports) > 0) {
+ $report = $reports[0];
+
+ $broken['title'] = trim($download->getVar('title'));
+ $broken['id'] = $report->getVar('reportid');
+ $broken['reporter'] = XoopsUserUtility::getUnameFromId((int)$report->getVar('sender'));
+ $broken['date'] = formatTimestamp($report->getVar('published'), $wfdownloads->getConfig('dateformat'));
+ $broken['acknowledged'] = ($report->getVar('acknowledged') == 1) ? _YES : _NO;
+ $broken['confirmed'] = ($report->getVar('confirmed') == 1) ? _YES : _NO;
+
+ $xoopsTpl->assign('brokenreportexists', true);
+ $xoopsTpl->assign('broken', $broken);
+ $xoopsTpl->assign('brokenreport', true); // this definition is not removed for backward compatibility issues
+ } else {
+ // file info
+ $down['title'] = trim($download->getVar('title'));
+ $down['homepage'] = $myts->makeClickable(formatURL(trim($download->getVar('homepage'))));
+ $time = ($download->getVar('updated') != false) ? $download->getVar('updated') : $download->getVar('published');
+ $down['updated'] = formatTimestamp($time, $wfdownloads->getConfig('dateformat'));
+ $is_updated = ($download->getVar('updated') != false) ? _MD_WFDOWNLOADS_UPDATEDON : _MD_WFDOWNLOADS_SUBMITDATE;
+ $down['publisher'] = XoopsUserUtility::getUnameFromId((int)$download->getVar('submitter'));
+
+ $xoopsTpl->assign('brokenreportexists', false);
+ $xoopsTpl->assign('file_id', $lid);
+ $xoopsTpl->assign('lang_subdate', $is_updated);
+ $xoopsTpl->assign('is_updated', $download->getVar('updated'));
+ $xoopsTpl->assign('lid', $lid);
+ $xoopsTpl->assign('down', $down);
+ }
+ include 'footer.php';
+ }
+ break;
+}
Property changes on: XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/multicolumnsthemeform.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/multicolumnsthemeform.php 2014-05-28 22:48:37 UTC (rev 12555)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/multicolumnsthemeform.php 2014-06-14 08:16:24 UTC (rev 12586)
@@ -1,237 +1,238 @@
-<?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.
- */
-/**
- * WfdownloadsMulticolumnsThemeForm Class
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @author lucio <luc...@gm...>
- * @package Wfdownloads
- * @since 3.23
- * @version $Id:$
- */
-
-defined('XOOPS_ROOT_PATH') or die('Restricted access');
-
-xoops_load('XoopsForm');
-
-/**
- * Form that will output formatted as a HTML table
- *
- * No styles and no JavaScript to check for required fields.
- */
-class WfdownloadsMulticolumnsThemeForm extends XoopsForm
-{
- /**
- * number of two-dimensional array (matrix) rows
- *
- * @var int
- */
- var $_rows = 0;
-
- /**
- * return number of rows
- *
- * @return int
- */
- public function getCountRows()
- {
- return $this->_rows;
- }
-
- /**
- * number of two-dimensional array (matrix) columns
- *
- * @var int
- */
- var $_columns = 0;
-
- /**
- * return number of columns
- *
- * @return int
- */
- public function getCountColumns()
- {
- return $this->_columns;
- }
-
- /**
- * two-dimensional array (matrix) of {@link XoopsFormElement} objects
- *
- * @var array
- */
- var $_elements = array();
-
- /**
- * mono-dimensional array of column titles
- *
- * @var array
- */
- var $_titles = array();
-
- /**
- * Add an element to the form
- *
- * @param object $ &$formElement reference to a {@link XoopsFormElement}
- * @param bool $required is this a "required" element?
- * @param int $row two-dimensional array (matrix) row (0 first key)
- * @param int $column two-dimensional array (matrix) column (0 first key)
- */
- public function addElement($formElement, $required = false, $row = null, $column = null)
- {
- if (is_null($row))
- $row = $this->_rows;
- if (is_null($column))
- $column = ($this->_columns == 0) ? $this->_columns : $this->_columns - 1; // add new element as new row of the last column
- if (is_string($formElement)) {
- $this->_elements[$row][$column] = $formElement;
- if ($row >= $this->_rows)
- $this->_rows = $row + 1;
- if ($column >= $this->_columns)
- $this->_columns = $column + 1;
- } elseif (is_subclass_of($formElement, 'xoopsformelement')) {
- $this->_elements[$row][$column] = &$formElement;
- if ($row >= $this->_rows)
- $this->_rows = $row + 1;
- if ($column >= $this->_columns)
- $this->_columns = $column + 1;
- if (! $formElement->isContainer()) {
- if ($required) {
- $formElement->_required = true;
- $this->_required[] = &$formElement;
- }
- } else {
- $required_elements = &$formElement->getRequired();
- $count = count($required_elements);
- for ($i = 0; $i < $count; $i ++) {
- $this->_required[] = &$required_elements[$i];
- }
- }
- }
- }
-
- public function addRow($elements)
- {
- foreach ($elements as $key => $element) {
- $this->addElement($element, false, $this->_rows, $key);
- }
- }
-
- public function addColumn($elements)
- {
- foreach ($elements as $key => $element) {
- $this->addElement($element, false, $key, $this->_columns);
- }
- }
-
- public function addForm($form)
- {
- foreach ($form->getElements() as $element) {
- $this->addElement($element, $element->isRequired(), $key, $this->_columns);
- }
- }
-
- public function setTitles($titles)
- {
- if (is_array($titles)) {
- foreach($titles as $key => $title) {
- $this->_titles[$key] = $title;
- }
- } else {
- $this->_title = $titles;
- }
- }
-
- /**
- * create HTML to output the form as a theme-enabled table with validation.
- *
- * YOU SHOULD AVOID TO USE THE FOLLOWING Nocolspan METHOD, IT WILL BE REMOVED
- *
- * To use the noColspan simply use the following example:
- *
- * $colspan = new XoopsFormDhtmlTextArea( '', 'key', $value, '100%', '100%' );
- * $colspan->setNocolspan();
- * $form->addElement( $colspan );
- *
- * @return string
- */
- function render()
- {
- $ele_name = $this->getName();
- $ret = "";
- $ret .= "<form name='{$ele_name}' id='{$ele_name}' action='{$this->getAction()}' method='{$this->getMethod()}' onsubmit='return xoopsFormValidate_{$ele_name}();' {$this->getExtra()} >" . NWLINE;
- $ret .= "<table width='100%' class='outer' cellspacing='1'>" . NWLINE;
- $ret .= "<tr><th colspan='{$this->_columns}'>{$this->getTitle()}</th></tr>" . NWLINE;
- if (count($this->_titles) > 0) {
- $ret .= "<tr>";
- for ($column = 0; $column < $this->_columns; $column++) {
- $ret .= "<th>";
- $ret .= (isset($this->_titles[$column])) ? "{$this->_titles[$column]}" : " ";
- $ret .= "</th>" . NWLINE;
- }
- $ret .= "</tr>";
- }
- $hidden = '';
- $class = 'even';
- for ($row = 0; $row < $this->_rows; $row++) {
- $ret .= "<tr>";
- for ($column = 0; $column < $this->_columns; $column++) {
- $ret .= "<td class='{$class}'>";
- if (isset($this->_elements[$row][$column])) {
- $ele = $this->_elements[$row][$column];
- } else {
- $ele = ' ';
- }
- if (!is_object($ele)) {
- $ret .= $ele;
- } else if (!$ele->isHidden()) {
- if (!$ele->getNocolspan()) {
- //$ret .= '<tr valign="top" align="left"><td class="head">';
- if (($caption = $ele->getCaption()) != '') {
- $ret .= "<div class='xoops-form-element-caption" . ($ele->isRequired() ? '-required' : '') . "'>";
- $ret .= "<span class='caption-text'>{$caption}</span>";
- $ret .= "<span class='caption-marker'>*</span>";
- $ret .= "</div>";
- }
- if (($desc = $ele->getDescription()) != '') {
- $ret .= "<div class='xoops-form-element-help'>{$desc}</div>";
- }
- //$ret .= '</td><td class="' . $class . '">';
- $ret .= $ele->render();
- //$ret .= '</td></tr>' . NWLINE;
- } else {
- //$ret .= '<tr valign="top" align="left"><td class="head" colspan="2">';
- if (($caption = $ele->getCaption()) != '') {
- $ret .= "<div class='xoops-form-element-caption" . ($ele->isRequired() ? '-required' : '') . "'>";
- $ret .= "<span class='caption-text'>{$caption}</span>";
- $ret .= "<span class='caption-marker'>*</span>";
- $ret .= "</div>";
- }
- //$ret .= '</td></tr>' . NWLINE;
- //$ret .= '<tr valign="top" align="left"><td class="' . $class . '" colspan="' . $this->_columns . '">';
- $ret .= $ele->render();
- //$ret .= '</td></tr>' . NWLINE;
- }
- } else {
- $hidden .= $ele->render();
- }
- $ret .= "</td>";
- }
- $ret .= "</tr>";
- }
- $ret .= "</table>" . NWLINE;
- $ret .= "{$hidden}" . NWLINE;
- $ret .= "</form>" . NWLINE;
- $ret .= $this->renderValidationJS(true);
- return $ret;
- }
-}
\ No newline at end of file
+<?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.
+ */
+/**
+ * WfdownloadsMulticolumnsThemeForm Class
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @author lucio <luc...@gm...>
+ * @package Wfdownloads
+ * @since 3.23
+ * @version $Id:$
+ */
+
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+xoops_load('XoopsForm');
+
+/**
+ * Form that will output formatted as a HTML table
+ *
+ * No styles and no JavaScript to check for required fields.
+ */
+class WfdownloadsMulticolumnsThemeForm extends XoopsForm
+{
+ /**
+ * number of two-dimensional array (matrix) rows
+ *
+ * @var int
+ */
+ var $_rows = 0;
+
+ /**
+ * return number of rows
+ *
+ * @return int
+ */
+ public function getCountRows()
+ {
+ return $this->_rows;
+ }
+
+ /**
+ * number of two-dimensional array (matrix) columns
+ *
+ * @var int
+ */
+ var $_columns = 0;
+
+ /**
+ * return number of columns
+ *
+ * @return int
+ */
+ public function getCountColumns()
+ {
+ return $this->_columns;
+ }
+
+ /**
+ * two-dimensional array (matrix) of {@link XoopsFormElement} objects
+ *
+ * @var array
+ */
+ var $_elements = array();
+
+ /**
+ * mono-dimensional array of column titles
+ *
+ * @var array
+ */
+ var $_titles = array();
+
+ /**
+ * Add an element to the form
+ *
+ * @param object $ &$formElement reference to a {@link XoopsFormElement}
+ * @param bool $required is this a "required" element?
+ * @param int $row two-dimensional array (matrix) row (0 first key)
+ * @param int $column two-dimensional array (matrix) column (0 first key)
+ */
+ public function addElement($formElement, $required = false, $row = null, $column = null)
+ {
+ if (is_null($row))
+ $row = $this->_rows;
+ if (is_null($column))
+ $column = ($this->_columns == 0) ? $this->_columns : $this->_columns - 1; // add new element as new row of the last column
+ if (is_string($formElement)) {
+ $this->_elements[$row][$column] = $formElement;
+ if ($row >= $this->_rows)
+ $this->_rows = $row + 1;
+ if ($column >= $this->_columns)
+ $this->_columns = $column + 1;
+ } elseif (is_subclass_of($formElement, 'xoopsformelement')) {
+ $this->_elements[$row][$column] = &$formElement;
+ if ($row >= $this->_rows)
+ $this->_rows = $row + 1;
+ if ($column >= $this->_columns)
+ $this->_columns = $column + 1;
+ if (! $formElement->isContainer()) {
+ if ($required) {
+ $formElement->_required = true;
+ $this->_required[] = &$formElement;
+ }
+ } else {
+ $required_elements = &$formElement->getRequired();
+ $count = count($required_elements);
+ for ($i = 0; $i < $count; ++$i) {
+ $this->_required[] = &$required_elements[$i];
+ }
+ }
+ }
+ }
+
+ public function addRow($elements)
+ {
+ foreach ($elements as $key => $element) {
+ $this->addElement($element, false, $this->_rows, $key);
+ }
+ }
+
+ public function addColumn($elements)
+ {
+ foreach ($elements as $key => $element) {
+ $this->addElement($element, false, $key, $this->_columns);
+ }
+ }
+
+ public function addForm($form)
+ {
+ foreach ($form->getElements() as $element) {
+ $this->addElement($element, $element->isRequired(), $key, $this->_columns);
+ }
+ }
+
+ public function setTitles($titles)
+ {
+ if (is_array($titles)) {
+ foreach ($titles as $key => $title) {
+ $this->_titles[$key] = $title;
+ }
+ } else {
+ $this->_title = $titles;
+ }
+ }
+
+ /**
+ * create HTML to output the form as a theme-enabled table with validation.
+ *
+ * YOU SHOULD AVOID TO USE THE FOLLOWING Nocolspan METHOD, IT WILL BE REMOVED
+ *
+ * To use the noColspan simply use the following example:
+ *
+ * $colspan = new XoopsFormDhtmlTextArea( '', 'key', $value, '100%', '100%' );
+ * $colspan->setNocolspan();
+ * $form->addElement( $colspan );
+ *
+ * @return string
+ */
+ function render()
+ {
+ $ele_name = $this->getName();
+ $ret = "";
+ $ret .= "<form name='{$ele_name}' id='{$ele_name}' action='{$this->getAction()}' method='{$this->getMethod()}' onsubmit='return xoopsFormValidate_{$ele_name}();' {$this->getExtra()} >" . NWLINE;
+ $ret .= "<table width='100%' class='outer' cellspacing='1'>" . NWLINE;
+ $ret .= "<tr><th colspan='{$this->_columns}'>{$this->getTitle()}</th></tr>" . NWLINE;
+ if (count($this->_titles) > 0) {
+ $ret .= "<tr>";
+ for ($column = 0; $column < $this->_columns; ++$column) {
+ $ret .= "<th>";
+ $ret .= (isset($this->_titles[$column])) ? "{$this->_titles[$column]}" : " ";
+ $ret .= "</th>" . NWLINE;
+ }
+ $ret .= "</tr>";
+ }
+ $hidden = '';
+ $class = 'even';
+ for ($row = 0; $row < $this->_rows; ++$row) {
+ $ret .= "<tr>";
+ for ($column = 0; $column < $this->_columns; ++$column) {
+ $ret .= "<td class='{$class}'>";
+ if (isset($this->_elements[$row][$column])) {
+ $ele = $this->_elements[$row][$column];
+ } else {
+ $ele = ' ';
+ }
+ if (!is_object($ele)) {
+ $ret .= $ele;
+ } elseif (!$ele->isHidden()) {
+ if (!$ele->getNocolspan()) {
+ //$ret .= '<tr valign="top" align="left"><td class="head">';
+ if (($caption = $ele->getCaption()) != '') {
+ $ret .= "<div class='xoops-form-element-caption" . ($ele->isRequired() ? '-required' : '') . "'>";
+ $ret .= "<span class='caption-text'>{$caption}</span>";
+ $ret .= "<span class='caption-marker'>*</span>";
+ $ret .= "</div>";
+ }
+ if (($desc = $ele->getDescription()) != '') {
+ $ret .= "<div class='xoops-form-element-help'>{$desc}</div>";
+ }
+ //$ret .= '</td><td class="' . $class . '">';
+ $ret .= $ele->render();
+ //$ret .= '</td></tr>' . NWLINE;
+ } else {
+ //$ret .= '<tr valign="top" align="left"><td class="head" colspan="2">';
+ if (($caption = $ele->getCaption()) != '') {
+ $ret .= "<div class='xoops-form-element-caption" . ($ele->isRequired() ? '-required' : '') . "'>";
+ $ret .= "<span class='caption-text'>{$caption}</span>";
+ $ret .= "<span class='caption-marker'>*</span>";
+ $ret .= "</div>";
+ }
+ //$ret .= '</td></tr>' . NWLINE;
+ //$ret .= '<tr valign="top" align="left"><td class="' . $class . '" colspan="' . $this->_columns . '">';
+ $ret .= $ele->render();
+ //$ret .= '</td></tr>' . NWLINE;
+ }
+ } else {
+ $hidden .= $ele->render();
+ }
+ $ret .= "</td>";
+ }
+ $ret .= "</tr>";
+ }
+ $ret .= "</table>" . NWLINE;
+ $ret .= "{$hidden}" . NWLINE;
+ $ret .= "</form>" . NWLINE;
+ $ret .= $this->renderValidationJS(true);
+
+ return $ret;
+ }
+}...
[truncated message content] |
|
From: <be...@us...> - 2014-06-14 05:07:49
|
Revision: 12585
http://sourceforge.net/p/xoops/svn/12585
Author: beckmi
Date: 2014-06-14 05:07:43 +0000 (Sat, 14 Jun 2014)
Log Message:
-----------
Updating xBootstrap to 1.02 Final (Angelo Rocha)
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/docs/changelog.txt
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/js/js.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/pm/pm_viewpmsg.html
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/publisher/xoops_and_module_changes/class/pagenav.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/system/blocks/system_block_login.html
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/system/blocks/system_block_newusers.html
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/style.css
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/theme.html
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/theme.ini
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/tpl/nav-menu.html
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/tpl/slider.html
Added Paths:
-----------
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/images/code.png
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/language/
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/language/english/
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/language/english/main.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/language/index.html
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/newbb/
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/newbb/index.html
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/newbb/newbb_index.html
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/system/blocks/system_block_search.html
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/system/blocks/system_block_topusers.html
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/shot.gif
Removed Paths:
-------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/lang/
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/samples/
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/shot.png
XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/template.html
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/docs/changelog.txt
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/docs/changelog.txt 2014-06-13 17:49:48 UTC (rev 12584)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/docs/changelog.txt 2014-06-14 05:07:43 UTC (rev 12585)
@@ -1,3 +1,28 @@
+1.02 2014-06-08 Final
+--------------------
+- Update pt-br lang (Angelo Rocha)
+- Add XOOPS Banners Support (Angelo Rocha)
+
+1.02 2014-06-08 Beta 2
+--------------------
+- Newbb index finished (Angelo Rocha)
+- Add Newbb viewtopic template (Angelo Rocha)
+- Add Newbb viewforum template (Angelo Rocha)
+
+1.02 2014-06-04 Beta 1
+--------------------
+- Add newbb template - Developing... (Angelo Rocha)
+- Add language support (Angelo Rocha)
+- Some bug fix in PM template (Angelo Rocha)
+- Add search block template (Angelo Rocha)
+- Add new users template (Angelo Rocha)
+- Add top users template (Angelo Rocha)
+- Add XOOPS Code Style (Angelo Rocha)
+- Add XOOPS Quote Style (Angelo Rocha)
+- Add search block template (Angelo Rocha)
+- Add shot theme in block of theme select (Angelo Rocha)
+- Add top search box (Angelo Rocha)
+
1.01.3 2014-03-30
--------------------
- Add reads count in publisher template (Angelo Rocha)
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/images/code.png
===================================================================
(Binary files differ)
Index: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/images/code.png
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/images/code.png 2014-06-13 17:49:48 UTC (rev 12584)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/images/code.png 2014-06-14 05:07:43 UTC (rev 12585)
Property changes on: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/images/code.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/js/js.js
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/js/js.js 2014-06-13 17:49:48 UTC (rev 12584)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/js/js.js 2014-06-14 05:07:43 UTC (rev 12585)
@@ -7,4 +7,12 @@
)
)
document.getElementsByTagName("head")[0].appendChild(msViewportStyle)
-}
\ No newline at end of file
+}
+
+jQuery(document).ready(function($) {
+ $('.carousel').carousel({
+ interval: 5000,
+ pause: "hover",
+ wrap: true
+ })
+});
\ No newline at end of file
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/language/english/main.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/language/english/main.php (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/language/english/main.php 2014-06-14 05:07:43 UTC (rev 12585)
@@ -0,0 +1,30 @@
+<?php
+
+//Nav Menu
+define("THEME_HOME", "Home");
+define("THEME_MODULE1", "About");
+define("THEME_MODULE2", "News");
+define("THEME_MODULE3", "Forum");
+define("THEME_MODULE4", "Contact");
+define("THEME_SEARCH_TEXT", "Search here...");
+define("THEME_SEARCH_BUTTON", "Go");
+
+//Slider
+define("THEME_READMORE", "Read More");
+
+//Home Message
+define("THEME_ABOUTUS", "About Us");
+define("THEME_LEARNINGMORE", "Learning More...");
+
+//NewBB
+define("THEME_NEWBB_TOPIC", "More");
+define("THEME_FORUM_SPONSORBY", "Sponsor By.: ");
+define("THEME_GOTOTHEFORUM", "Go to Forum");
+define("THEME_FORUM_DESCRIPTION", "Description");
+define("THEME_NEWBB_SEARCH_FORUM", "Search in forum...");
+define("THEME_NEWBB_SEARCH_TOPIC", "Search in topic...");
+define("THEME_FORUM_DESC", "About This Forum");
+
+//Block login
+define("THEME_LOGIN", "Your Username");
+define("THEME_PASS", "Your Password");
Property changes on: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/language/english/main.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/language/index.html
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/language/index.html (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/language/index.html 2014-06-14 05:07:43 UTC (rev 12585)
@@ -0,0 +1 @@
+<script>history.go(-1);</script>
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/newbb/index.html
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/newbb/index.html (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/newbb/index.html 2014-06-14 05:07:43 UTC (rev 12585)
@@ -0,0 +1 @@
+<script>history.go(-1);</script>
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/newbb/newbb_index.html
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/newbb/newbb_index.html (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/newbb/newbb_index.html 2014-06-14 05:07:43 UTC (rev 12585)
@@ -0,0 +1,310 @@
+<div class="newbb">
+
+<div class="jumbotron newbb-header">
+<h3>
+ <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/index.php" title="<{$index_title}>">
+ <{$index_title}>
+ </a>
+</h3>
+
+<p><{$index_desc}></p>
+<div class="text-right"><{includeq file="db:newbb_index_menu.html"}></div>
+
+<div class="newbb-header-icons hidden-xs">
+<{if $viewer_level gt 1}>
+<div>
+ <strong><{$smarty.const._MD_TOPIC}>:</strong>
+ <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/list.topic.php?status=active#admin" title="<{$smarty.const._MD_TYPE_ADMIN}>" class="btn btn-xs btn-primary">
+ <{$smarty.const._MD_TYPE_ADMIN}>
+ </a>
+
+ <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/list.topic.php?status=pending#admin" title="<{$smarty.const._MD_TYPE_PENDING}>" class="btn btn-xs btn-primary">
+ <{if $wait_new_topic}><span class="badge"><{$wait_new_topic}></span><{/if}> <{$smarty.const._MD_TYPE_PENDING}>
+ </a>
+
+ <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/list.topic.php?status=deleted#admin" title="<{$smarty.const._MD_TYPE_DELETED}>" class="btn btn-xs btn-danger">
+ <{if $delete_topic}><span class="badge"><{$delete_topic}></span><{/if}> <{$smarty.const._MD_TYPE_DELETED}>
+ </a>
+</div>
+<div>
+ <strong><{$smarty.const._MD_POST2}>:</strong>
+ <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewpost.php?status=active#admin" title="<{$smarty.const._MD_TYPE_ADMIN}>" class="btn btn-xs btn-primary">
+ <{$smarty.const._MD_TYPE_ADMIN}>
+ </a>
+
+ <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewpost.php?status=pending#admin" title="<{$smarty.const._MD_TYPE_PENDING}>" class="btn btn-xs btn-primary">
+ <{if $wait_new_post}>(<font color="red"><{$wait_new_post}></font>)<{/if}> <{$smarty.const._MD_TYPE_PENDING}>
+ </a>
+
+ <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewpost.php?status=deleted#admin" title="<{$smarty.const._MD_TYPE_DELETED}>" class="btn btn-xs btn-primary">
+ <{if $delete_post}>(<font color="red"><{$delete_post}></font>)<{/if}> <{$smarty.const._MD_TYPE_DELETED}>
+ </a>
+
+ <{if $report_post}>
+ <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/admin/admin_report.php" title="<{$report_post}>" class="btn btn-xs btn-primary">
+ <{$report_post}>
+ </a>
+ <{/if}>
+
+ <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/moderate.php" title="<{$smarty.const._MD_TYPE_SUSPEND}>" class="btn btn-xs btn-primary">
+ <{$smarty.const._MD_TYPE_SUSPEND}>
+ </a>
+
+ <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/admin/index.php" title="<{$smarty.const._MD_ADMINCP}>" class="btn btn-xs btn-primary">
+ <{$smarty.const._MD_ADMINCP}>
+ </a>
+</div>
+<{/if}>
+</div><!-- .newbb-header-icons -->
+</div><!-- .newbb-header -->
+
+<div class="panel-group xoops-newbb-category-list" id="accordion">
+<{foreachq item=category from=$categories}><!-- Forum categories -->
+ <div class="panel panel-default mb10">
+ <div class="panel-heading">
+ <h4 class="panel-title xoops-mewbb-forum-title">
+ <{if $category.forums}>
+ <a data-toggle="collapse" data-parent="#accordion" href="#<{$category.cat_element_id}>" title="<{$smarty.const.THEME_NEWBB_TOPIC}>">
+ <span class="glyphicon glyphicon-plus-sign"></span>
+ </a>
+ <{/if}>
+ <{if $category.cat_image}>
+ <img src="<{$category.cat_image}>" alt="<{$category.cat_title}>">
+ <{/if}>
+
+ <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/index.php?cat=<{$category.cat_id}>" title="<{$category.cat_title}>">
+ <{$category.cat_title}>
+ </a>
+
+ <{if $category.cat_sponsor}>
+ <a href="<{$category.cat_sponsor.link}>" title="<{$smarty.const.THEME_FORUM_SPONSORBY}> <{$category.cat_sponsor.title}>" target="_blank" class="pull-right btn btn-xs btn-success">
+ <{$category.cat_sponsor.title}>
+ </a>
+ <{/if}>
+
+ <{if $category.cat_description}>
+ <a href="#forum-desc-<{$category.cat_element_id}>" title="<{$smarty.const.THEME_FORUM_DESCRIPTION}>" data-toggle="modal" data-target="#forum-desc-<{$category.cat_element_id}>" class="btn btn-xs btn-info pull-right">
+ <span class="glyphicon glyphicon-info-sign"></span>
+ </a>
+ <{/if}>
+ </h4>
+<{if $category.cat_description}>
+<div class="modal fade" id="forum-desc-<{$category.cat_element_id}>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title" id="myModalLabel"><{$category.cat_title}></h4>
+ </div>
+ <div class="modal-body">
+ <p><{$category.cat_description}></p>
+ </div>
+ <div class="modal-footer">
+ <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/index.php?cat=<{$category.cat_id}>" title="<{$smarty.const.THEME_GOTOTHEFORUM}>" class="btn btn-default">
+ <{$smarty.const.THEME_GOTOTHEFORUM}>
+ </a>
+ </div>
+ </div>
+ </div>
+</div>
+<{/if}>
+ </div><!-- .panel-heading -->
+
+<div id="<{$category.cat_element_id}>" class="panel-collapse collapse <{if $subforum_display == 'expand'}>in<{/if}>">
+ <div class="panel-body">
+ <{if $category.forums}>
+ <div class="row hidden-xs">
+ <{if $subforum_display == "expand"}>
+ <div class="col-sm-6 col-md-6"><strong><{$smarty.const._MD_FORUM}></strong></div>
+ <{else}>
+ <div class="col-sm-6 col-md-6"><strong><{$smarty.const._MD_FORUM}></strong></div>
+ <{/if}>
+ <div class="col-sm-1 col-md-1"><strong><{$smarty.const._MD_TOPICS}></strong></div>
+ <div class="col-sm-1 col-md-1"><strong><{$smarty.const._MD_POSTS}></strong></div>
+ <div class="col-sm-4 col-md-4"><strong><{$smarty.const._MD_LASTPOST}></strong></div>
+ </div>
+ <{/if}>
+ <{foreachq item=forum from=$category.forums}>
+ <div class="row xoops-newbb-list-foruns mb10">
+ <div class="col-sm-6 col-md-6">
+ <{if $forum.subforum}>
+ <div class="<{if $forum.forum_read eq 1 }>forum-read<{else}>forum-new2<{/if}> pull-left">
+ <{$forum.forum_folder}>
+ </div>
+ <{else}>
+ <div class="<{if $forum.forum_read eq 1 }>forum-read<{else}>forum-new2<{/if}> pull-left">
+ <{$forum.forum_folder}>
+ </div>
+ <{/if}>
+
+ <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewforum.php?forum=<{$forum.forum_id}>" title="<{$forum.forum_name}>">
+ <{$forum.forum_name}>
+ </a>
+
+ <{if $rss_enable}>
+ <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/rss.php?f=<{$forum.forum_id}>" target="_blank" title="RSS feed" class="pull-right btn btn-xs btn-warning">
+ RSS
+ </a>
+ <{/if}>
+ <!-- Forum description -->
+ <{if $forum.forum_desc != ""}>
+ <button class="btn btn-primary btn-xs pull-right" data-toggle="modal" data-target="#forumDesc-<{$forum.forum_id}>"><span class="glyphicon glyphicon-info-sign"></span></button>
+
+ <div class="modal fade" id="forumDesc-<{$forum.forum_id}>" tabindex="-1" role="dialog" aria-labelledby="ForumDescription" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title" id="ForumDescription"><{$smarty.const.THEME_FORUM_DESC}>: <{$category.cat_title}> - <{$forum.forum_name}></h4>
+ </div>
+ <div class="modal-body">
+ <{$forum.forum_desc}>
+ </div>
+ <div class="modal-footer">
+ <{if $forum.forum_moderators}>
+ <div class="pull-left"><span class="label label-info"><{$smarty.const._MD_MODERATOR}>: <{$forum.forum_moderators}></span></div>
+ <{/if}>
+ <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/index.php?cat=<{$category.cat_id}>" class="btn btn-default" title="<{$xoops_url}>/modules/<{$xoops_dirname}>/index.php?cat=<{$category.cat_id}>">
+ <{$smarty.const.THEME_GOTOTHEFORUM}>
+ </a>
+ </div>
+ </div>
+ </div>
+ </div>
+ <{/if}>
+ <!-- End forum description-->
+ </div>
+
+ <div class="col-sm-1 col-md-1 text-center hidden-xs">
+ <{if $stats[$forum.forum_id].topic.day}>
+ <strong><{$stats[$forum.forum_id].topic.day}></strong>/
+ <{/if}>
+ <{$forum.forum_topics}>
+ </div>
+
+ <div class="col-sm-1 col-md-1 text-center hidden-xs">
+ <{if $stats[$forum.forum_id].post.day}>
+ <strong><{$stats[$forum.forum_id].post.day}></strong>/
+ <{/if}>
+ <{$forum.forum_posts}>
+ </div>
+
+ <div class="col-sm-4 col-md-4 hidden-xs">
+ <{if $forum.forum_lastpost_subject}>
+ <{$forum.forum_lastpost_time}> <{$smarty.const._MD_BY}> <{$forum.forum_lastpost_user}>
+ <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewtopic.php?post_id=<{$forum.forum_lastpost_id}>">
+ <{$forum.forum_lastpost_subject}>
+ <{$forum.forum_lastpost_icon}>
+ </a>
+ <{else}>
+ <{$smarty.const._AM_NEWBB_NOTOPIC}>
+ <{/if}>
+
+ <{if $forum.subforum}>
+ <{$smarty.const._MD_SUBFORUMS}><{$img_subforum}>
+ <{foreachq item=subforum from=$forum.subforum}>
+ [<a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewforum.php?forum=<{$subforum.forum_id}>"><{$subforum.forum_name}></a>]
+ <{/foreach}>
+ <{/if}>
+ </div>
+ </div>
+ <{/foreach}>
+ </div><!-- .panel-body -->
+ </div><!-- .panel-collapse .collapse -->
+ </div><!-- .panel .panel-default -->
+<{/foreach}><!-- End Forum Categories -->
+</div><!-- .panel-group -->
+
+<div class="row mb10">
+ <div class="col-md-12">
+ <{$img_forum_new}> = <{$smarty.const._MD_NEWPOSTS}>
+ <{$img_forum}> = <{$smarty.const._MD_NONEWPOSTS}>
+ </div>
+</div>
+
+<div class="row">
+ <div class="col-md-8 mb10">
+ <form class="input-group" action="<{$xoops_url}>/modules/<{$xoops_dirname}>/search.php" method="post" name="search" id="search" role="search">
+ <input name="term" id="term" type="text" class="form-control" placeholder="<{$smarty.const.THEME_NEWBB_SEARCH_FORUM}>">
+ <input type="hidden" name="forum" id="forum" value="all">
+ <input type="hidden" name="sortby" id="sortby" value="p.post_time desc">
+ <input type="hidden" name="searchin" id="searchin" value="both">
+
+ <span class="input-group-btn">
+ <button class="btn btn-primary" type="submit" id="submit"><{$smarty.const._MD_SEARCH}></button>
+ </span>
+ </form>
+ </div>
+ <div class="col-md-4">
+ <a class="btn btn-primary btn-block" href="<{$xoops_url}>/modules/<{$xoops_dirname}>/search.php"><{$smarty.const._MD_ADVSEARCH}></a>
+ </div>
+</div>
+
+<{if $currenttime}>
+<div class="row">
+ <div class="col-lg-12"><h3 class="nompl"><{$online.statistik}> <{$smarty.const._MD_NEWBB_STATS}></h3></div>
+ <div class="col-sm-6 col-md-6">
+ <ul class="list-unstyled lw30">
+ <li><{$currenttime}></li>
+ <li><{$lastvisit}></li>
+
+ <li><{$smarty.const._MD_TOTALTOPICSC}>
+ <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/list.topic.php" title="<{$smarty.const._MD_ALL}>">
+ <{$stats[0].topic.total}>
+ </a></li>
+
+ <li><{$smarty.const._MD_TOTALPOSTSC}>
+ <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewpost.php" title="<{$smarty.const._MD_ALLPOSTS}>">
+ <{$stats[0].post.total}>
+ </a></li>
+ <{if $stats[0].digest.total}>
+ <li><{$smarty.const._MD_TOTALDIGESTSC}>
+ <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/list.topic.php?status=digest" title="<{$smarty.const._MD_TOTALDIGESTSC}>">
+ <{$stats[0].digest.total}>
+ </a></li>
+ <{/if}>
+
+ <li><a class="btn btn-xs btn-primary" href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewpost.php?status=new" title="<{$smarty.const._MD_VIEW_NEWPOSTS}>">
+ <{$smarty.const._MD_VIEW_NEWPOSTS}>
+ </a></li>
+ </ul>
+ </div>
+
+ <div class="col-sm-6 col-md-6">
+ <ul class="list-unstyled lw30">
+ <{if $userstats}>
+ <li><{*$userstats.lastvisit*}>
+ <{$userstats.lastpost}></li>
+ <{/if}>
+
+ <li><{$smarty.const._MD_TODAYTOPICSC}> <{$stats[0].topic.day|default:0}></li>
+ <li><{$smarty.const._MD_TODAYPOSTSC}> <{$stats[0].post.day|default:0}></li>
+
+ <{if $userstats}>
+ <li><{$userstats.topics}> | <{$userstats.posts}></li>
+ <{if $userstats.digests}>
+ <li><{$userstats.digests}></li>
+ <{/if}>
+ <{/if}>
+ </ul>
+ </div>
+
+</div>
+<{/if}>
+
+<{if $online}>
+ <{includeq file="db:newbb_online.html"}>
+<{/if}>
+
+<ul class="list-unstyled">
+<li><a title="NewBB" href="http://www.simple-xoops.de" class="btn btn-xs btn-success">NewBB Version <{$version/100}></a></li>
+<{if $rss_button}>
+ <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/rss.php?c=<{$viewcat}>" target="_blank" title="RSS FEED">
+ <{$rss_button}>
+ </a>
+<{/if}>
+</ul>
+
+<{includeq file='db:newbb_notification_select.html'}>
+
+</div><!-- .xoops-newbb -->
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/pm/pm_viewpmsg.html
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/pm/pm_viewpmsg.html 2014-06-13 17:49:48 UTC (rev 12584)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/pm/pm_viewpmsg.html 2014-06-14 05:07:43 UTC (rev 12585)
@@ -89,8 +89,8 @@
</div><!-- .xoops-message-header -->
<{if $total_messages == 0}>
-<div class="clearfix"></div>
-<div class="container">
+
+<div class="col-md-12">
<div class="alert alert-warning">
<{$smarty.const._PM_YOUDONTHAVE}>
</div>
@@ -156,4 +156,4 @@
<{if $pagenav}>
<{$pagenav}>
-<{/if}>
\ No newline at end of file
+<{/if}>
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/publisher/xoops_and_module_changes/class/pagenav.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/publisher/xoops_and_module_changes/class/pagenav.php 2014-06-13 17:49:48 UTC (rev 12584)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/publisher/xoops_and_module_changes/class/pagenav.php 2014-06-14 05:07:43 UTC (rev 12585)
@@ -17,7 +17,7 @@
* @version $Id$
*/
-defined('XOOPS_ROOT_PATH') || die('Restricted access');
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
class XoopsPageNav
{
@@ -185,3 +185,4 @@
}
}
+?>
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/system/blocks/system_block_login.html
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/system/blocks/system_block_login.html 2014-06-13 17:49:48 UTC (rev 12584)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/system/blocks/system_block_login.html 2014-06-14 05:07:43 UTC (rev 12585)
@@ -2,12 +2,12 @@
<form action="<{xoAppUrl user.php}>" method="post" role="form">
<div class="form-group">
<{$block.lang_username}>
- <input class="form-control" type="text" name="uname" placeholder="Your Login">
+ <input class="form-control" type="text" name="uname" placeholder="<{$smarty.const.THEME_LOGIN}>">
</div>
<div class="form-group">
<{$block.lang_password}>
- <input class="form-control" type="password" name="pass" placeholder="Your Password">
+ <input class="form-control" type="password" name="pass" placeholder="<{$smarty.const.THEME_PASS}>">
</div>
<div class="checkbox">
@@ -26,4 +26,4 @@
<a class="btn btn-info btn-xs btn-block" href="<{xoAppUrl user.php#lost}>" title="<{$block.lang_lostpass}>"><{$block.lang_lostpass}></a>
<a class="btn btn-info btn-xs btn-block" href="<{xoAppUrl register.php}>" title="<{$block.lang_registernow}>"><{$block.lang_registernow}></a>
-</div>
\ No newline at end of file
+</div>
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/system/blocks/system_block_newusers.html
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/system/blocks/system_block_newusers.html 2014-06-13 17:49:48 UTC (rev 12584)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/system/blocks/system_block_newusers.html 2014-06-14 05:07:43 UTC (rev 12585)
@@ -1,21 +1,13 @@
-<div class="newusers container">
- <{foreach item=user from=$block.users}>
- <div class="row user">
- <div class="col-xs-2 col-sm-2 col-md-2 col-lg-2">
- <{if $user.avatar != ""}>
- <img src="<{$user.avatar}>" alt="<{$user.name}>" class="img-responsive">
- <{else}>
- <img src="<{$xoops_imageurl}>images/blank.gif" alt="<{$user.name}>" class="img-responsive">
- <{/if}>
- </div>
-
- <div class="col-xs-4 col-sm-4 col-md-4 col-lg-5">
- <a href="<{$xoops_url}>/userinfo.php?uid=<{$user.id}>" title="<{$user.name}>"><{$user.name}></a>
- </div>
-
- <div class="col-xs-4 col-sm-4 col-md-4 col-lg-5">
- <{$user.joindate}>
- </div>
- </div>
- <{/foreach}>
-</div>
\ No newline at end of file
+<{foreach item=user from=$block.users}>
+<ul class="userblock list-unstyled">
+ <{if $user.avatar != ""}>
+ <li class="avatar-image"><img src="<{$user.avatar}>" alt="<{$user.name}>" class="img-circle"></li>
+ <{else}>
+ <li class="avatar-image"><img src="<{$xoops_imageurl}>images/blank.gif" alt="<{$user.name}>" class="img-circle"></li>
+ <{/if}>
+
+ <li class="user-name"><a href="<{$xoops_url}>/userinfo.php?uid=<{$user.id}>" title="<{$user.name}>"><{$user.name}></a></li>
+
+ <li class="join-date text-right hidden-sm join-date"><{$user.joindate}></li>
+</ul>
+<{/foreach}>
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/system/blocks/system_block_search.html
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/system/blocks/system_block_search.html (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/system/blocks/system_block_search.html 2014-06-14 05:07:43 UTC (rev 12585)
@@ -0,0 +1,30 @@
+<div class="text-center">
+
+ <form role="search" action="<{xoAppUrl search.php}>" method="get">
+
+ <div class="input-group">
+
+ <input class="form-control" type="text" name="query" placeholder="<{$smarty.const.THEME_SEARCH_TEXT}>">
+
+ <input type="hidden" name="action" value="results">
+
+ <span class="input-group-btn">
+
+ <button class="btn btn-primary" type="submit">
+
+ <span class="glyphicon glyphicon-search"></span>
+
+ </button>
+
+ </span>
+
+ </div>
+
+ </form>
+
+ <p class="text-right">
+ <a href="<{xoAppUrl search.php}>" title="<{$block.lang_advsearch}>">
+ <{$block.lang_advsearch}>
+ </a>
+ </p>
+</div>
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/system/blocks/system_block_topusers.html
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/system/blocks/system_block_topusers.html (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/modules/system/blocks/system_block_topusers.html 2014-06-14 05:07:43 UTC (rev 12585)
@@ -0,0 +1,21 @@
+<{foreach item=user from=$block.users}>
+
+<ul class="userblock list-unstyled">
+
+ <{if $user.avatar != ""}>
+ <li class="avatar-image">
+ <img src="<{$user.avatar}>" alt="<{$user.name}>" class="img-circle">
+ <span class="badge pull-right"><{$user.rank}></span>
+ </li>
+ <{else}>
+ <li class="avatar-image">
+ <img src="<{$xoops_imageurl}>images/blank.gif" alt="<{$user.name}>" class="img-circle">
+ <span class="badge pull-right"><{$user.rank}></span>
+ </li>
+ <{/if}>
+
+ <li class="user-name"><a href="<{$xoops_url}>/userinfo.php?uid=<{$user.id}>" title="<{$user.name}>"><{$user.name}></a></li>
+
+ <li class="join-date text-right"><{$user.posts}></li>
+</ul>
+<{/foreach}>
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/shot.gif
===================================================================
(Binary files differ)
Index: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/shot.gif
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/shot.gif 2014-06-13 17:49:48 UTC (rev 12584)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/shot.gif 2014-06-14 05:07:43 UTC (rev 12585)
Property changes on: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/shot.gif
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Deleted: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/shot.png
===================================================================
(Binary files differ)
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/style.css
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/style.css 2014-06-13 17:49:48 UTC (rev 12584)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/style.css 2014-06-14 05:07:43 UTC (rev 12585)
@@ -30,6 +30,7 @@
* 4.9. eXtgallery Module
* 4.10. TDMDownloads
* 4.11. XOOPS Tube
+ * 4.12. NewBB Module
* 5. Useful Classes
**/
@@ -51,16 +52,21 @@
div.slideshow .item img{display:inline-block;}
div.maincontainer{margin-top:20px; margin-bottom:20px;}
-div.home-message{background: #FFF; padding-top:5px; border-left: 3px solid #9C6; margin-top:-60px; position:relative; z-index:5;}
+div.home-message{background: #FAFAFA; padding-top:5px; border-left: 3px solid #9C6; margin-top:-60px; position:relative; z-index:5;}
div.bottom-blocks{background: url(images/cover.jpg) 50% 50% no-repeat fixed; background-size:cover; margin-top: 20px; padding: 20px 0 20px 0;}
footer.footer{background:#111; color:#EAEAEA;}
footer.footer > h3{font-size:0.9em; margin:0; line-height:inherit; max-width:960px; margin:0 auto 0 auto; padding:10px 0 10px 0; text-align:center; position:relative;}
footer.footer > h3 > a.credits{position:absolute; top:3px; right:10px;}
+.xoops-banner{position: relative; top: 40px;}
+.xoops-banner *{max-width: 100%;}
+
/* 2. XOOPS Codes */
.xoopsQuote{padding:10px 20px; margin:0 0 20px;border-left:5px solid #eeeeee; font-style:italic;}
-.xoopsCode {background: #FAFAFA; padding: 5px; overflow-x: scroll; border: 1px solid #EEE;}
+.xoopsCode {background:url(images/code.png); overflow-x: auto; border: 1px solid #EEE; padding-left: 10px}
+.xoopsCode code{background-color: transparent; line-height: 25px; position: relative;}
+.xoopsCode code > span{position: relative; z-index: 5;}
/* 3. XOOPS Blocks*/
div.xoops-side-blocks > aside{margin-bottom:20px;}
@@ -114,11 +120,20 @@
div.xoops-theme-select{text-align:center;}
div.xoops-theme-select form select{border:1px solid #D6D6D6; width:100%;}
+div.xoops-theme-select img {max-width: 100%;}
-div.newusers > .row.user{margin-bottom:10px; border-bottom:1px solid #D6D6D6; padding-top:5px;}
-div.newusers > .row.user > [class*="col-"]{padding:0; text-align:center;}
-div.newusers > .row.user:nth-child(odd){background:#EEE;}
+ul.userblock{border-bottom:1px solid #EEE; margin-bottom: 0; padding: 5px 0 5px 0;}
+ul.userblock:nth-child(odd){background: #F9F9F9;}
+ul.userblock:hover{background: #EEE;}
+ul.userblock:last-child{border-bottom: none;}
+ul.userblock > li{display: inline-block; position: relative;}
+ul.userblock > li.avatar-image{max-width: 20%;}
+ul.userblock > li.avatar-image img{max-width: 100%;}
+ul.userblock > li.user-name{padding: 0 0 0 10px; width: 49%;}
+ul.userblock > li.join-date{padding: 0 5px 0 0; width: 9%;}
+ul.userblock > li span.badge{background: #47A447; position: absolute; bottom: 0; right: 0;}
+
/* 4.4. System Comments */
div.xoops-comment-body{margin-top:20px;}
div.xoops-comment-template{margin-bottom:20px;}
@@ -297,6 +312,23 @@
.xoopstube-video-play{}
.xoopstube-video-play embed{max-width: 100%;}
+/* 4.12. NewBB Module */
+.newbb{}
+.newbb-header{}
+.newbb-menu{}
+.newbb-header-icons{}
+.newbb-header-icons div{margin-bottom: 10px;}
+.xoops-newbb-category-list{}
+.xoops-newbb-category-list a.pull-right{margin-left: 5px}
+.xoops-newbb-list-foruns{border-bottom: 1px solid #EAEAEA; padding-bottom: 5px;}
+.xoops-newbb-list-foruns:last-child{border-bottom: none;}
+
+.xoops-newbb-viewtopic{}
+.xoops-newbb-viewtopic table{max-width: 100%; border: 1px solid #000;}
+
+.xoops-mewbb-forum-title{}
+.xoops-mewbb-forum-title a.btn{color: #FFF;}
+
/* 5. Useful Classes */
.big-info-icon-link{color:#333; font-size:1.8em; margin:10px 0 10px 0; display:inline-table; cursor:pointer;}
.xoops-default-title{font-size:1.3em; margin:0; line-height:inherit;}
@@ -307,8 +339,17 @@
.generic-pagination .xo-pagact{background:#09C; color:#FFF; border:1px solid #EEE; padding:5px; border-radius:5px;}
div.order-by{font-size:1.2em;}
div.order-by a{color:#999; font-size:1.2em;}
+.mb10{margin-bottom: 10px;} /* Only Add Margin Bottom of 10px */
+.lw30{line-height: 30px;} /* Only Add Line Height 30px */
+.nompl{margin: 0; padding: 0; line-height: inherit;}/* No margin, paddind and lineweight -> use in title tags if necessary... */
+/* Media Queries */
+@media (min-width:320px) and (max-width:768px){
+ .xoops-banner{top: 0;}
+ .xoops-banner.pull-right{float: none !important;}
+}
+
/* bla, bla, bla */
.aligncenter{text-align:center; margin-left:auto; margin-right:auto;}
.alignleft{text-align:left; float:left;}
-.alignright{text-align:right; float:right;}
\ No newline at end of file
+.alignright{text-align:right; float:right;}
Deleted: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/template.html
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/template.html 2014-06-13 17:49:48 UTC (rev 12584)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/template.html 2014-06-14 05:07:43 UTC (rev 12585)
@@ -1,131 +0,0 @@
-<!doctype html>
-<html class="no-js" lang="pt-br">
-<head>
-<meta charset="utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<!-- disable zoom in mobile devices:
-<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
--->
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
-<link rel="stylesheet" type="text/css" href="css/reset.css">
-<link rel="stylesheet" type="text/css" href="style.css">
-<script src="js/jquery-1.10.2.js"></script>
-<script src="js/bootstrap.min.js"></script>
-<script src="js/modernizr.custom.95845.js"></script>
-<script src="js/js.js"></script>
-<title>XOOPS Responsive Layout</title>
-</head>
-<body>
-<div class="navbar-wrapper">
- <div class="navbar navbar-inverse navbar-static-top global-nav">
- <div class="container">
- <div class="navbar-header">
- <button data-target=".navbar-collapse" data-toggle="collapse" class="navbar-toggle" type="button">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- <a href="javascript:;" class="navbar-brand xlogo"><img src="images/logo.png" alt=""></a>
- </div>
- <div class="navbar-collapse collapse">
- <ul class="nav navbar-nav">
- <li class="active"><a href="#">Home</a></li>
- <li><a href="#about">About</a></li>
- <li class="dropdown"> <a data-toggle="dropdown" class="dropdown-toggle" href="javascript:;">News <b class="caret"></b></a>
- <ul class="dropdown-menu">
- <li><a href="javascript:;">Topic 1</a></li>
- <li><a href="javascript:;">Topic 2</a></li>
- <li><a href="javascript:;">Topic 3</a></li>
- <li><a href="javascript:;">Topic 4</a></li>
- <li><a href="javascript:;">Topic 5</a></li>
- </ul>
- </li>
- <li><a href="javascript:;">Contact</a></li>
- </ul>
- </div>
- </div>
- </div>
-</div><!-- .navbar-wrapper -->
-
-<div class="carousel slide" id="myCarousel">
- <!-- Indicators -->
- <ol class="carousel-indicators">
- <li class="active" data-slide-to="0" data-target="#myCarousel"></li>
- <li data-slide-to="1" data-target="#myCarousel" class=""></li>
- <li data-slide-to="2" data-target="#myCarousel" class=""></li>
- </ol>
- <div class="carousel-inner">
- <div class="item active"> <img alt="First slide" src="images/slider.png">
- <div class="container">
- <div class="carousel-caption">
- <h1>Lorem ipsum dolor sit amet</h1>
- <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
- <p><a href="javascript:;" class="btn btn-large btn-primary">Read More</a></p>
- </div>
- </div>
- </div>
- <div class="item"> <img alt="First slide" src="images/slider.png">
- <div class="container">
- <div class="carousel-caption">
- <h1>Lorem ipsum dolor sit amet</h1>
- <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
- <p><a href="javascript:;" class="btn btn-large btn-primary">Read More</a></p>
- </div>
- </div>
- </div>
- <div class="item"> <img alt="First slide" src="images/slider.png">
- <div class="container">
- <div class="carousel-caption">
- <h1>Lorem ipsum dolor sit amet</h1>
- <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
- <p><a href="javascript:;" class="btn btn-large btn-primary">Read More</a></p>
- </div>
- </div>
- </div>
- </div>
- <a class="left carousel-control" href="#myCarousel" data-slide="prev"> <span class="icon-prev"></span> </a> <a data-slide="next" href="#myCarousel" class="right carousel-control"> <span class="icon-next"></span> </a>
-</div><!-- .carousel -->
-
-<div class="container maincontainer">
-<div class="aligncenter home-message">
- <h2>About Us</h2>
- <p class="lead">Ut auctor elit mi, non adipiscing quam accumsan sed. Vivamus consequat massa eget purus volutpat, et placerat elit pharetra. Maecenas quis mauris eros. Morbi consequat mattis diam, a laoreet est egestas id.</p>
- <p><a href="javascript:;" class="btn btn-md btn-success">Learn More...</a></p>
-</div>
-
-<div class="row">
-<div class="col-md-8 col-sm-8 content-area">
-Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur a metus ac augue tempus sagittis. Etiam ullamcorper, enim quis rutrum luctus, dui quam auctor ante, eu consequat sem ipsum tincidunt lacus. Sed est dolor, dictum in egestas ac, accumsan eu lorem! Nulla sagittis libero nec massa aliquet, vitae molestie felis consequat. Pellentesque sodales bibendum ipsum, eu cursus velit rutrum eget
-</div><!-- .content-area -->
-
-<div class="col-md-4 col-sm-4 sidebar-blocks">
- <aside>
- <h3>Lorem ipsum dolor</h3>
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur a metus ac augue tempus sagittis. Etiam ullamcorper, enim quis rutrum luctus, dui quam auctor ante, eu consequat sem ipsum tincidunt lacus.
- </aside>
-</div><!-- .sidebar-blocks -->
-</div>
-</div><!-- .maincontainer -->
-
-<div class="bottom-blocks">
- <div class="container">
- <div class="row">
- <aside class="col-sm-4 col-md-4">
- <h3>Lorem ipsum dolor</h3>
- Phasellus iaculis feugiat leo, vitae sodales dolor elementum eu. Duis eu feugiat risus, sit amet aliquet nisl. Suspendisse potenti. Phasellus magna tortor, tempor sed turpis ut, eleifend mollis risus? Phasellus lacinia molestie felis sed dictum. </aside>
- <aside class="col-sm-4 col-md-4">
- <h3>Lorem ipsum dolor</h3>
- Phasellus iaculis feugiat leo, vitae sodales dolor elementum eu. Duis eu feugiat risus, sit amet aliquet nisl. Suspendisse potenti. Phasellus magna tortor, tempor sed turpis ut, eleifend mollis risus? Phasellus lacinia molestie felis sed dictum. </aside>
- <aside class="col-sm-4 col-md-4">
- <h3>Lorem ipsum dolor</h3>
- Phasellus iaculis feugiat leo, vitae sodales dolor elementum eu. Duis eu feugiat risus, sit amet aliquet nisl. Suspendisse potenti. Phasellus magna tortor, tempor sed turpis ut, eleifend mollis risus? Phasellus lacinia molestie felis sed dictum. </aside>
- </div>
- </div>
-</div><!-- .bottom-blocks -->
-
-<footer class="footer">
-<h3>© 2014 - XOOPS Project - All rights reserveds</h3>
-</footer>
-</body>
-</html>
\ No newline at end of file
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/theme.html
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/theme.html 2014-06-13 17:49:48 UTC (rev 12584)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/theme.html 2014-06-14 05:07:43 UTC (rev 12585)
@@ -48,10 +48,17 @@
<div class="container maincontainer">
<{if $xoops_dirname == "system"}>
- <div class="aligncenter home-message">
- <h2>About Us</h2>
- <p class="lead"><{$xoops_meta_description}></p>
- <p><a href="javascript:;" class="btn btn-md btn-success">Learn More...</a></p>
+ <div class="aligncenter home-message row">
+ <div class="<{if $xoops_banner != ""}>col-md-6<{else}>col-md-12<{/if}>">
+ <h2><{$smarty.const.THEME_ABOUTUS}></h2>
+
+ <p class="lead"><{$xoops_meta_description}></p>
+
+ <p><a href="javascript:;" class="btn btn-md btn-success"><{$smarty.const.THEME_LEARNINGMORE}></a></p>
+ </div>
+
+ <{if $xoops_banner != ""}><div class="col-md-6"><div class="xoops-banner pull-right"><{$xoops_banner}></div></div><{/if}>
+
</div><!-- .home-message -->
<{/if}>
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/theme.ini
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/theme.ini 2014-06-13 17:49:48 UTC (rev 12584)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/theme.ini 2014-06-14 05:07:43 UTC (rev 12585)
@@ -17,6 +17,6 @@
Licence="GPL v3"
-thumbnail="shot.png"
+thumbnail="shot.gif"
-screenshot="screenshot.png"
\ No newline at end of file
+screenshot="screenshot.png"
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/tpl/nav-menu.html
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/tpl/nav-menu.html 2014-06-13 17:49:48 UTC (rev 12584)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/tpl/nav-menu.html 2014-06-14 05:07:43 UTC (rev 12585)
@@ -7,12 +7,15 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
- <a href="<{$xoops_url}>" class="navbar-brand xlogo"><img src="<{$xoops_imageurl}>images/logo.png" alt=""></a> </div>
+ <a href="<{$xoops_url}>" class="navbar-brand xlogo" title="<{$xoops_sitename}>">
+ <img src="<{$xoops_imageurl}>images/logo.png" alt="<{$xoops_sitename}>">
+ </a>
+ </div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
- <li class="active"><a href="<{$xoops_url}>">Home</a></li>
- <li><a href="javascript:;">About</a></li>
- <li class="dropdown"> <a data-toggle="dropdown" class="dropdown-toggle" href="javascript:;">News <b class="caret"></b></a>
+ <li class="active"><a href="<{$xoops_url}>"><{$smarty.const.THEME_HOME}></a></li>
+ <li><a href="javascript:;"><{$smarty.const.THEME_MODULE1}></a></li>
+ <li class="dropdown"> <a data-toggle="dropdown" class="dropdown-toggle" href="javascript:;"><{$smarty.const.THEME_MODULE2}><b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="javascript:;">Topic 1</a></li>
<li><a href="javascript:;">Topic 2</a></li>
@@ -21,9 +24,17 @@
<li><a href="javascript:;">Topic 5</a></li>
</ul>
</li>
- <li><a href="<{$xoops_url}>/modules/contact">Contact</a></li>
+ <li><a href="<{$xoops_url}>/modules/newbb"><{$smarty.const.THEME_MODULE3}></a></li>
+ <li><a href="<{$xoops_url}>/modules/contact"><{$smarty.const.THEME_MODULE4}></a></li>
</ul>
+ <form class="navbar-form navbar-right" role="search" action="<{xoAppUrl search.php}>" method="get">
+ <div class="form-group">
+ <input type="text" name="query" class="form-control" placeholder="<{$smarty.const.THEME_SEARCH_TEXT}>">
+ <input type="hidden" name="action" value="results">
+ </div>
+ <button class="btn btn-primary" type="submit"><{$smarty.const.THEME_SEARCH_BUTTON}></button>
+ </form>
</div>
</div>
</div>
-</div><!-- .navbar-wrapper -->
\ No newline at end of file
+</div><!-- .navbar-wrapper -->
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/tpl/slider.html
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/tpl/slider.html 2014-06-13 17:49:48 UTC (rev 12584)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/themes/xBootstrap/tpl/slider.html 2014-06-14 05:07:43 UTC (rev 12585)
@@ -10,18 +10,18 @@
<div class="carousel-caption hidden-xs">
<h1>Lorem ipsum dolor sit amet</h1>
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
- <p><a href="javascript:;" class="btn btn-large btn-primary">Read More</a></p>
+ <p><a href="javascript:;" class="btn btn-large btn-primary"><{$smarty.const.THEME_READMORE}></a></p>
</div>
</div>
<div class="item"> <img alt="XOOPS" src="<{$xoops_imageurl}>images/slider2.jpg">
<div class="carousel-caption hidden-xs">
<h1>Lorem ipsum dolor sit amet</h1>
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
- <p><a href="javascript:;" class="btn btn-large btn-primary">Read More</a></p>
+ <p><a href="javascript:;" class="btn btn-large btn-primary"><{$smarty.const.THEME_READMORE}></a></p>
</div>
</div>
</div>
<a class="left carousel-control" href="#myCarousel" data-slide="prev"><span class="icon-prev"></span></a>
<a data-slide="next" href="#myCarousel" class="right carousel-control"><span class="icon-next"></span></a>
</div><!-- .carousel -->
-<{/if}>
\ No newline at end of file
+<{/if}>
|
|
From: <luc...@us...> - 2014-06-13 17:49:54
|
Revision: 12584
http://sourceforge.net/p/xoops/svn/12584
Author: luciorota
Date: 2014-06-13 17:49:48 +0000 (Fri, 13 Jun 2014)
Log Message:
-----------
add my latest from github
Added Paths:
-----------
XoopsModules/wfdownloads/trunk/admin/
XoopsModules/wfdownloads/trunk/admin/about.php
XoopsModules/wfdownloads/trunk/admin/admin_footer.php
XoopsModules/wfdownloads/trunk/admin/admin_header.php
XoopsModules/wfdownloads/trunk/admin/categories.php
XoopsModules/wfdownloads/trunk/admin/clone.php
XoopsModules/wfdownloads/trunk/admin/downloads.php
XoopsModules/wfdownloads/trunk/admin/images.php
XoopsModules/wfdownloads/trunk/admin/import.php
XoopsModules/wfdownloads/trunk/admin/index.html
XoopsModules/wfdownloads/trunk/admin/index.php
XoopsModules/wfdownloads/trunk/admin/indexpage.php
XoopsModules/wfdownloads/trunk/admin/menu.php
XoopsModules/wfdownloads/trunk/admin/mimetypes.php
XoopsModules/wfdownloads/trunk/admin/mirrors.php
XoopsModules/wfdownloads/trunk/admin/permissions.php
XoopsModules/wfdownloads/trunk/admin/ratings.php
XoopsModules/wfdownloads/trunk/admin/reportsmodifications.php
XoopsModules/wfdownloads/trunk/admin/reviews.php
XoopsModules/wfdownloads/trunk/assets/
XoopsModules/wfdownloads/trunk/assets/css/
XoopsModules/wfdownloads/trunk/assets/css/index.html
XoopsModules/wfdownloads/trunk/assets/css/module.css
XoopsModules/wfdownloads/trunk/assets/images/
XoopsModules/wfdownloads/trunk/assets/images/VeraBd.ttf
XoopsModules/wfdownloads/trunk/assets/images/blank.gif
XoopsModules/wfdownloads/trunk/assets/images/brokenimg.png
XoopsModules/wfdownloads/trunk/assets/images/category/
XoopsModules/wfdownloads/trunk/assets/images/category/blank.gif
XoopsModules/wfdownloads/trunk/assets/images/category/index.html
XoopsModules/wfdownloads/trunk/assets/images/category/thumbs/
XoopsModules/wfdownloads/trunk/assets/images/category/thumbs/blank.gif
XoopsModules/wfdownloads/trunk/assets/images/category/thumbs/index.html
XoopsModules/wfdownloads/trunk/assets/images/down.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/
XoopsModules/wfdownloads/trunk/assets/images/icon/approve.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/arrow.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/close12.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/delete.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/disabled.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/down.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/download.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/download1.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/download2.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/download3.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/download4.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/downloads.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/downloads02.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/downloads03.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/edit.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/forum.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/ignore.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/ignore.png
XoopsModules/wfdownloads/trunk/assets/images/icon/index.html
XoopsModules/wfdownloads/trunk/assets/images/icon/link.png
XoopsModules/wfdownloads/trunk/assets/images/icon/newred.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/off.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/on.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/open12.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/pop.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/rate0.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/rate1.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/rate2.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/rate3.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/rate4.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/rate5.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/reviews.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/rss.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/statistics.png
XoopsModules/wfdownloads/trunk/assets/images/icon/update.gif
XoopsModules/wfdownloads/trunk/assets/images/icon/world_link.png
XoopsModules/wfdownloads/trunk/assets/images/icon32/
XoopsModules/wfdownloads/trunk/assets/images/icon32/database_go.png
XoopsModules/wfdownloads/trunk/assets/images/icon32/editcopy.png
XoopsModules/wfdownloads/trunk/assets/images/icon32/index.html
XoopsModules/wfdownloads/trunk/assets/images/index.html
XoopsModules/wfdownloads/trunk/assets/images/loadingAnimation.gif
XoopsModules/wfdownloads/trunk/assets/images/logo-en.gif
XoopsModules/wfdownloads/trunk/assets/images/logo.png
XoopsModules/wfdownloads/trunk/assets/images/module_logo.png
XoopsModules/wfdownloads/trunk/assets/images/screenshots/
XoopsModules/wfdownloads/trunk/assets/images/screenshots/blank.gif
XoopsModules/wfdownloads/trunk/assets/images/screenshots/index.html
XoopsModules/wfdownloads/trunk/assets/images/screenshots/thumbs/
XoopsModules/wfdownloads/trunk/assets/images/screenshots/thumbs/blank.gif
XoopsModules/wfdownloads/trunk/assets/images/screenshots/thumbs/index.html
XoopsModules/wfdownloads/trunk/assets/images/size2.gif
XoopsModules/wfdownloads/trunk/assets/images/up.gif
XoopsModules/wfdownloads/trunk/assets/index.html
XoopsModules/wfdownloads/trunk/assets/js/
XoopsModules/wfdownloads/trunk/assets/js/index.html
XoopsModules/wfdownloads/trunk/assets/js/magnific/
XoopsModules/wfdownloads/trunk/assets/js/magnific/jquery.magnific-popup.min.js
XoopsModules/wfdownloads/trunk/assets/js/magnific/magnific-popup.css
XoopsModules/wfdownloads/trunk/assets/js/mediaelement/
XoopsModules/wfdownloads/trunk/assets/js/mediaelement/README.md
XoopsModules/wfdownloads/trunk/assets/js/mediaelement/build/
XoopsModules/wfdownloads/trunk/assets/js/mediaelement/build/DO NOT CHANGE THESE FILES. USE -src- FOLDER.txt
XoopsModules/wfdownloads/trunk/assets/js/mediaelement/build/background.png
XoopsModules/wfdownloads/trunk/assets/js/mediaelement/build/bigplay.png
XoopsModules/wfdownloads/trunk/assets/js/mediaelement/build/bigplay.svg
XoopsModules/wfdownloads/trunk/assets/js/mediaelement/build/controls-ted.png
XoopsModules/wfdownloads/trunk/assets/js/mediaelement/build/controls-wmp-bg.png
XoopsModules/wfdownloads/trunk/assets/js/mediaelement/build/controls-wmp.png
XoopsModules/wfdownloads/trunk/assets/js/mediaelement/build/controls.png
XoopsModules/wfdownloads/trunk/assets/js/mediaelement/build/controls.svg
XoopsModules/wfdownloads/trunk/assets/js/mediaelement/build/flashmediaelement-cdn.swf
XoopsModules/wfdownloads/trunk/assets/js/mediaelement/build/flashmediaelement.swf
XoopsModules/wfdownloads/trunk/assets/js/mediaelement/build/loading.gif
XoopsModules/wfdownloads/trunk/assets/js/mediaelement/build/mediaelement-and-player.min.js
XoopsModules/wfdownloads/trunk/assets/js/mediaelement/build/mediaelement.min.js
XoopsModules/wfdownloads/trunk/assets/js/mediaelement/build/mediaelementplayer.min.css
XoopsModules/wfdownloads/trunk/assets/js/mediaelement/build/mediaelementplayer.min.js
XoopsModules/wfdownloads/trunk/assets/js/mediaelement/build/mejs-skins.css
XoopsModules/wfdownloads/trunk/assets/js/mediaelement/build/silverlightmediaelement.xap
XoopsModules/wfdownloads/trunk/blocks/
XoopsModules/wfdownloads/trunk/blocks/index.html
XoopsModules/wfdownloads/trunk/blocks/top.php
XoopsModules/wfdownloads/trunk/blocks/top_by_cat.php
XoopsModules/wfdownloads/trunk/brokenfile.php
XoopsModules/wfdownloads/trunk/class/
XoopsModules/wfdownloads/trunk/class/breadcrumb.php
XoopsModules/wfdownloads/trunk/class/category.php
XoopsModules/wfdownloads/trunk/class/dbupdater.php
XoopsModules/wfdownloads/trunk/class/download.php
XoopsModules/wfdownloads/trunk/class/img_uploader.php
XoopsModules/wfdownloads/trunk/class/index.html
XoopsModules/wfdownloads/trunk/class/ip_log.php
XoopsModules/wfdownloads/trunk/class/mimetype.php
XoopsModules/wfdownloads/trunk/class/mirror.php
XoopsModules/wfdownloads/trunk/class/modification.php
XoopsModules/wfdownloads/trunk/class/multicolumnsthemeform.php
XoopsModules/wfdownloads/trunk/class/rating.php
XoopsModules/wfdownloads/trunk/class/report.php
XoopsModules/wfdownloads/trunk/class/request.php
XoopsModules/wfdownloads/trunk/class/review.php
XoopsModules/wfdownloads/trunk/class/session.php
XoopsModules/wfdownloads/trunk/class/tree.php
XoopsModules/wfdownloads/trunk/class/wfdownloads.php
XoopsModules/wfdownloads/trunk/class/wfdownloads_lists.php
XoopsModules/wfdownloads/trunk/class/xoopstree.php
XoopsModules/wfdownloads/trunk/comment_delete.php
XoopsModules/wfdownloads/trunk/comment_edit.php
XoopsModules/wfdownloads/trunk/comment_new.php
XoopsModules/wfdownloads/trunk/comment_post.php
XoopsModules/wfdownloads/trunk/comment_reply.php
XoopsModules/wfdownloads/trunk/docs/
XoopsModules/wfdownloads/trunk/docs/changelog.txt
XoopsModules/wfdownloads/trunk/docs/credits.txt
XoopsModules/wfdownloads/trunk/docs/history.txt
XoopsModules/wfdownloads/trunk/docs/index.html
XoopsModules/wfdownloads/trunk/docs/install.txt
XoopsModules/wfdownloads/trunk/docs/lang_diff.txt
XoopsModules/wfdownloads/trunk/docs/license.txt
XoopsModules/wfdownloads/trunk/docs/readme.txt
XoopsModules/wfdownloads/trunk/footer.php
XoopsModules/wfdownloads/trunk/header.php
XoopsModules/wfdownloads/trunk/include/
XoopsModules/wfdownloads/trunk/include/comment_functions.php
XoopsModules/wfdownloads/trunk/include/common.php
XoopsModules/wfdownloads/trunk/include/constants.php
XoopsModules/wfdownloads/trunk/include/directorychecker.php
XoopsModules/wfdownloads/trunk/include/filechecker.php
XoopsModules/wfdownloads/trunk/include/functions.php
XoopsModules/wfdownloads/trunk/include/index.html
XoopsModules/wfdownloads/trunk/include/notification.inc.php
XoopsModules/wfdownloads/trunk/include/oninstall.php
XoopsModules/wfdownloads/trunk/include/onuninstall.php
XoopsModules/wfdownloads/trunk/include/onupdate.php
XoopsModules/wfdownloads/trunk/include/search.inc.php
XoopsModules/wfdownloads/trunk/index.html
XoopsModules/wfdownloads/trunk/index.php
XoopsModules/wfdownloads/trunk/language/
XoopsModules/wfdownloads/trunk/language/english/
XoopsModules/wfdownloads/trunk/language/english/admin.php
XoopsModules/wfdownloads/trunk/language/english/blocks.php
XoopsModules/wfdownloads/trunk/language/english/common.php
XoopsModules/wfdownloads/trunk/language/english/directorychecker.php
XoopsModules/wfdownloads/trunk/language/english/filechecker.php
XoopsModules/wfdownloads/trunk/language/english/help/
XoopsModules/wfdownloads/trunk/language/english/help/help.html
XoopsModules/wfdownloads/trunk/language/english/help/help3.html
XoopsModules/wfdownloads/trunk/language/english/help/help4.html
XoopsModules/wfdownloads/trunk/language/english/help/help5.html
XoopsModules/wfdownloads/trunk/language/english/help/help6.html
XoopsModules/wfdownloads/trunk/language/english/help/index.html
XoopsModules/wfdownloads/trunk/language/english/help/install.html
XoopsModules/wfdownloads/trunk/language/english/help/tips_tricks.html
XoopsModules/wfdownloads/trunk/language/english/index.html
XoopsModules/wfdownloads/trunk/language/english/mail_template/
XoopsModules/wfdownloads/trunk/language/english/mail_template/category_filemodified_notify.tpl
XoopsModules/wfdownloads/trunk/language/english/mail_template/category_filesubmit_notify.tpl
XoopsModules/wfdownloads/trunk/language/english/mail_template/category_newfile_notify.tpl
XoopsModules/wfdownloads/trunk/language/english/mail_template/file_approve_notify.tpl
XoopsModules/wfdownloads/trunk/language/english/mail_template/file_filemodified_notify.tpl
XoopsModules/wfdownloads/trunk/language/english/mail_template/filebroken_notify.tpl
XoopsModules/wfdownloads/trunk/language/english/mail_template/global_filebroken_notify.tpl
XoopsModules/wfdownloads/trunk/language/english/mail_template/global_filemodified_notify.tpl
XoopsModules/wfdownloads/trunk/language/english/mail_template/global_filemodify_notify.tpl
XoopsModules/wfdownloads/trunk/language/english/mail_template/global_filesubmit_notify.tpl
XoopsModules/wfdownloads/trunk/language/english/mail_template/global_newcategory_notify.tpl
XoopsModules/wfdownloads/trunk/language/english/mail_template/global_newfile_notify.tpl
XoopsModules/wfdownloads/trunk/language/english/mail_template/index.html
XoopsModules/wfdownloads/trunk/language/english/main.php
XoopsModules/wfdownloads/trunk/language/english/modinfo.php
XoopsModules/wfdownloads/trunk/language/index.html
XoopsModules/wfdownloads/trunk/mirror.php
XoopsModules/wfdownloads/trunk/newlist.php
XoopsModules/wfdownloads/trunk/notification_update.php
XoopsModules/wfdownloads/trunk/ratefile.php
XoopsModules/wfdownloads/trunk/review.php
XoopsModules/wfdownloads/trunk/rss.php
XoopsModules/wfdownloads/trunk/singlefile.php
XoopsModules/wfdownloads/trunk/sql/
XoopsModules/wfdownloads/trunk/sql/index.html
XoopsModules/wfdownloads/trunk/sql/mysql.sql
XoopsModules/wfdownloads/trunk/submit.php
XoopsModules/wfdownloads/trunk/templates/
XoopsModules/wfdownloads/trunk/templates/admin/
XoopsModules/wfdownloads/trunk/templates/admin/index.html
XoopsModules/wfdownloads/trunk/templates/admin/wfdownloads_admin_categorieslist.tpl
XoopsModules/wfdownloads/trunk/templates/admin/wfdownloads_admin_downloadslist.tpl
XoopsModules/wfdownloads/trunk/templates/admin/wfdownloads_admin_ip_logslist.tpl
XoopsModules/wfdownloads/trunk/templates/admin/wfdownloads_admin_mimetypeslist.tpl
XoopsModules/wfdownloads/trunk/templates/admin/wfdownloads_admin_mirrorslist.tpl
XoopsModules/wfdownloads/trunk/templates/admin/wfdownloads_admin_permissions.tpl
XoopsModules/wfdownloads/trunk/templates/admin/wfdownloads_admin_ratingslist.tpl
XoopsModules/wfdownloads/trunk/templates/admin/wfdownloads_admin_reportsmodificationslist.tpl
XoopsModules/wfdownloads/trunk/templates/admin/wfdownloads_admin_reviewslist.tpl
XoopsModules/wfdownloads/trunk/templates/blocks/
XoopsModules/wfdownloads/trunk/templates/blocks/index.html
XoopsModules/wfdownloads/trunk/templates/blocks/wfdownloads_block_new.tpl
XoopsModules/wfdownloads/trunk/templates/blocks/wfdownloads_block_top.tpl
XoopsModules/wfdownloads/trunk/templates/blocks/wfdownloads_block_top_by_cat.tpl
XoopsModules/wfdownloads/trunk/templates/index.html
XoopsModules/wfdownloads/trunk/templates/wfdownloads_brokenfile.tpl
XoopsModules/wfdownloads/trunk/templates/wfdownloads_common_breadcrumb.tpl
XoopsModules/wfdownloads/trunk/templates/wfdownloads_common_letterschoice.tpl
XoopsModules/wfdownloads/trunk/templates/wfdownloads_disclaimer.tpl
XoopsModules/wfdownloads/trunk/templates/wfdownloads_download.tpl
XoopsModules/wfdownloads/trunk/templates/wfdownloads_footer.tpl
XoopsModules/wfdownloads/trunk/templates/wfdownloads_header.tpl
XoopsModules/wfdownloads/trunk/templates/wfdownloads_index.tpl
XoopsModules/wfdownloads/trunk/templates/wfdownloads_mirrors.tpl
XoopsModules/wfdownloads/trunk/templates/wfdownloads_newlistindex.tpl
XoopsModules/wfdownloads/trunk/templates/wfdownloads_ratefile.tpl
XoopsModules/wfdownloads/trunk/templates/wfdownloads_reviews.tpl
XoopsModules/wfdownloads/trunk/templates/wfdownloads_singlefile.tpl
XoopsModules/wfdownloads/trunk/templates/wfdownloads_submit.tpl
XoopsModules/wfdownloads/trunk/templates/wfdownloads_topten.tpl
XoopsModules/wfdownloads/trunk/templates/wfdownloads_viewcat.tpl
XoopsModules/wfdownloads/trunk/topten.php
XoopsModules/wfdownloads/trunk/uploads/
XoopsModules/wfdownloads/trunk/uploads/index.html
XoopsModules/wfdownloads/trunk/viewcat.php
XoopsModules/wfdownloads/trunk/visit.php
XoopsModules/wfdownloads/trunk/xoops_version.php
Added: XoopsModules/wfdownloads/trunk/admin/about.php
===================================================================
--- XoopsModules/wfdownloads/trunk/admin/about.php (rev 0)
+++ XoopsModules/wfdownloads/trunk/admin/about.php 2014-06-13 17:49:48 UTC (rev 12584)
@@ -0,0 +1,30 @@
+<?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.
+ */
+/**
+ * Wfdownloads module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package wfdownload
+ * @since 3.23
+ * @author Xoops Development Team
+ * @version svn:$id$
+ */
+include_once dirname(__FILE__) . '/admin_header.php';
+
+xoops_cp_header();
+
+$aboutAdmin = new ModuleAdmin();
+
+echo $aboutAdmin->addNavigation('about.php');
+echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);
+
+include 'admin_footer.php';
Added: XoopsModules/wfdownloads/trunk/admin/admin_footer.php
===================================================================
--- XoopsModules/wfdownloads/trunk/admin/admin_footer.php (rev 0)
+++ XoopsModules/wfdownloads/trunk/admin/admin_footer.php 2014-06-13 17:49:48 UTC (rev 12584)
@@ -0,0 +1,28 @@
+<?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.
+ */
+/**
+ * Wfdownloads module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package wfdownload
+ * @since 3.23
+ * @author Xoops Development Team
+ * @version svn:$id$
+ */
+echo "<div class='adminfooter'>\n";
+echo " <div style='text-align: center;'>\n";
+echo " <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n";
+echo " </div>\n";
+echo "" . _AM_MODULEADMIN_ADMIN_FOOTER . "\n";
+echo "</div>";
+
+xoops_cp_footer();
Added: XoopsModules/wfdownloads/trunk/admin/admin_header.php
===================================================================
--- XoopsModules/wfdownloads/trunk/admin/admin_header.php (rev 0)
+++ XoopsModules/wfdownloads/trunk/admin/admin_header.php 2014-06-13 17:49:48 UTC (rev 12584)
@@ -0,0 +1,40 @@
+<?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.
+ */
+/**
+ * Wfdownloads module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package wfdownload
+ * @since 3.23
+ * @author Xoops Development Team
+ * @version svn:$id$
+ */
+include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php';
+include_once dirname(dirname(__FILE__)) . '/include/common.php';
+
+// Include xoops admin header
+include_once XOOPS_ROOT_PATH . '/include/cp_header.php';
+
+$pathIcon16 = XOOPS_URL . '/' . $wfdownloads->getModule()->getInfo('icons16');
+$pathIcon32 = XOOPS_URL . '/' . $wfdownloads->getModule()->getInfo('icons32');
+$pathModuleAdmin = XOOPS_ROOT_PATH . '/' . $wfdownloads->getModule()->getInfo('dirmoduleadmin');
+require_once $pathModuleAdmin . '/moduleadmin/moduleadmin.php';
+
+// Load language files
+xoops_loadLanguage('admin', $wfdownloads->getModule()->dirname());
+xoops_loadLanguage('modinfo', $wfdownloads->getModule()->dirname());
+xoops_loadLanguage('main', $wfdownloads->getModule()->dirname());
+
+if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
+ include_once(XOOPS_ROOT_PATH . '/class/template.php');
+ $xoopsTpl = new XoopsTpl();
+}
Added: XoopsModules/wfdownloads/trunk/admin/categories.php
===================================================================
--- XoopsModules/wfdownloads/trunk/admin/categories.php (rev 0)
+++ XoopsModules/wfdownloads/trunk/admin/categories.php 2014-06-13 17:49:48 UTC (rev 12584)
@@ -0,0 +1,287 @@
+<?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.
+ */
+/**
+ * Wfdownloads module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package wfdownload
+ * @since 3.23
+ * @author Xoops Development Team
+ * @version svn:$id$
+ */
+$currentFile = basename(__FILE__);
+include_once dirname(__FILE__) . '/admin_header.php';
+
+// Check directories
+if (!is_dir($wfdownloads->getConfig('uploaddir'))) {
+ redirect_header('index.php', 4, _AM_WFDOWNLOADS_ERROR_UPLOADDIRNOTEXISTS);
+ exit();
+}
+if (!is_dir(XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('mainimagedir'))) {
+ redirect_header('index.php', 4, _AM_WFDOWNLOADS_ERROR_MAINIMAGEDIRNOTEXISTS);
+ exit();
+}
+if (!is_dir(XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('screenshots'))) {
+ redirect_header('index.php', 4, _AM_WFDOWNLOADS_ERROR_SCREENSHOTSDIRNOTEXISTS);
+ exit();
+}
+if (!is_dir(XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('catimage'))) {
+ redirect_header('index.php', 4, _AM_WFDOWNLOADS_ERROR_CATIMAGEDIRNOTEXISTS);
+ exit();
+}
+
+$op = WfdownloadsRequest::getString('op', 'categories.list');
+switch ($op) {
+ case "category.move":
+ case "move":
+ $ok = WfdownloadsRequest::getBool('ok', false, 'POST');
+ if ($ok == false) {
+ $cid = WfdownloadsRequest::getInt('cid', 0);
+
+ wfdownloads_xoops_cp_header();
+
+ include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
+ $sform = new XoopsThemeForm(_AM_WFDOWNLOADS_CCATEGORY_MOVE, "move", xoops_getenv('PHP_SELF'));
+
+ $categoryObjs = $wfdownloads->getHandler('category')->getObjects();
+ $mytree = new XoopsObjectTree($categoryObjs, "cid", "pid");
+ $sform->addElement(new XoopsFormLabel(_AM_WFDOWNLOADS_BMODIFY, $mytree->makeSelBox('target', 'title')));
+ $create_tray = new XoopsFormElementTray('', '');
+ $create_tray -> addElement(new XoopsFormHidden('source', $cid));
+ $create_tray -> addElement(new XoopsFormHidden('ok', true));
+ $create_tray -> addElement(new XoopsFormHidden('op', 'category.move'));
+ $butt_save = new XoopsFormButton('', '', _AM_WFDOWNLOADS_BMOVE, 'submit');
+ $butt_save -> setExtra('onclick="this.form.elements.op.value=\'category.move\'"');
+ $create_tray -> addElement($butt_save);
+ $butt_cancel = new XoopsFormButton('', '', _AM_WFDOWNLOADS_BCANCEL, 'submit');
+ $butt_cancel -> setExtra('onclick="this.form.elements.op.value=\'cancel\'"');
+ $create_tray -> addElement($butt_cancel);
+ $sform -> addElement($create_tray);
+ $sform -> display();
+ xoops_cp_footer();
+ } else {
+ $source = WfdownloadsRequest::getInt('source', 0, 'POST');
+ $target = WfdownloadsRequest::getInt('target', 0, 'POST');
+ if ($target == $source) {
+ redirect_header($currentFile . "?op=category.move&ok=0&cid={$source}", 5, _AM_WFDOWNLOADS_CCATEGORY_MODIFY_FAILED);
+ }
+ if (!$target) {
+ redirect_header($currentFile . "?op=category.move&ok=0&cid={$source}", 5, _AM_WFDOWNLOADS_CCATEGORY_MODIFY_FAILEDT);
+ }
+ $result = $wfdownloads->getHandler('download')->updateAll("cid", $target, new Criteria("cid", $source), true);
+ if (!$result) {
+ $error = _AM_WFDOWNLOADS_DBERROR;
+ trigger_error($error, E_USER_ERROR);
+ }
+ redirect_header($currentFile, 1, _AM_WFDOWNLOADS_CCATEGORY_MODIFY_MOVED);
+ exit();
+ }
+ break;
+
+ case "category.save" :
+ case "addCat" :
+ $cid = WfdownloadsRequest::getInt('cid', 0, 'POST');
+ $pid = WfdownloadsRequest::getInt('pid', 0, 'POST');
+ $weight = (isset($_POST["weight"]) && $_POST["weight"] > 0) ? (int) $_POST["weight"] : 0;
+ $down_groups = isset($_POST['groups']) ? $_POST['groups'] : array();
+ $up_groups = isset($_POST['up_groups']) ? $_POST['up_groups'] : array();
+ $spotlighthis = (isset($_POST["lid"])) ? (int) $_POST["lid"] : 0;
+ $spotlighttop = (isset($_POST["spotlighttop"]) && ($_POST["spotlighttop"] == 1)) ? 1 : 0;
+
+ include_once XOOPS_ROOT_PATH.'/class/uploader.php';
+ $allowedMimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png');
+ $maxFileSize = $wfdownloads->getConfig('maxfilesize');
+ $maxImgWidth = $wfdownloads->getConfig('maximgwidth');
+ $maxImgHeight = $wfdownloads->getConfig('maximgheight');
+ $uploadDirectory = XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('catimage');
+ $uploader = new XoopsMediaUploader($uploadDirectory, $allowedMimetypes, $maxFileSize, $maxImgWidth, $maxImgHeight);
+ if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
+ $uploader->setTargetFileName('wfdownloads_' . uniqid(time()) . '--' . strtolower($_FILES['uploadfile']['name']));
+ $uploader->fetchMedia($_POST['xoops_upload_file'][0]);
+ if (!$uploader->upload()) {
+ $errors = $uploader->getErrors();
+ redirect_header("javascript:history.go(-1)",3, $errors);
+ } else {
+ $imgurl = $uploader->getSavedFileName();
+ }
+ } else {
+ $imgurl = (isset($_POST["imgurl"]) && $_POST["imgurl"] != "blank.png") ? $myts -> addslashes($_POST["imgurl"]) : "";
+ }
+
+ if (!$cid) {
+ $categoryObj = $wfdownloads->getHandler('category')->create();
+ } else {
+ $categoryObj = $wfdownloads->getHandler('category')->get($cid);
+ $childcats = $wfdownloads->getHandler('category')->getChildCats($categoryObj);
+ if ($pid == $cid || in_array($pid, array_keys($childcats))) {
+ $categoryObj->setErrors(_AM_WFDOWNLOADS_CCATEGORY_CHILDASPARENT);
+ }
+ }
+
+ $categoryObj->setVar('title', $_POST["title"]);
+ $categoryObj->setVar('pid', $pid);
+ $categoryObj->setVar('weight', $weight);
+ $categoryObj->setVar('imgurl', $imgurl);
+ $categoryObj->setVar('description', $_POST["description"]);
+ $categoryObj->setVar('summary', $_POST["summary"]);
+ $categoryObj->setVar('dohtml', isset($_POST['dohtml']));
+ $categoryObj->setVar('dosmiley', isset($_POST['dosmiley']));
+ $categoryObj->setVar('doxcode', isset($_POST['doxcode']));
+ $categoryObj->setVar('doimage', isset($_POST['doimage']));
+ $categoryObj->setVar('dobr', isset($_POST['dobr']));
+// Formulize module support (2006/05/04) jpc - start
+ if (wfdownloads_checkModule('formulize')) {
+ $formulize_fid = (isset($_POST["formulize_fid"])) ? (int) $_POST["formulize_fid"] : 0;
+ $categoryObj->setVar('formulize_fid', $formulize_fid);
+ }
+// Formulize module support (2006/05/04) jpc - end
+ $categoryObj->setVar('spotlighthis', $spotlighthis);
+ $categoryObj->setVar('spotlighttop', $spotlighttop);
+
+ if (!$wfdownloads->getHandler('category')->insert($categoryObj)) {
+ echo $categoryObj->getHtmlErrors();
+ }
+ if (!$cid) {
+ if ($cid == 0) {
+ $newid = (int) $categoryObj->getVar('cid');
+ }
+ wfdownloads_savePermissions($down_groups, $newid, 'WFDownCatPerm');
+ wfdownloads_savePermissions($up_groups, $newid, 'WFUpCatPerm');
+ // Notify of new category
+ $tags = array();
+ $tags['CATEGORY_NAME'] = $_POST['title'];
+ $tags['CATEGORY_URL'] = WFDOWNLOADS_URL . '/viewcat.php?cid=' . $newid;
+ $notification_handler = & xoops_gethandler('notification');
+ $notification_handler -> triggerEvent('global', 0, 'new_category', $tags);
+ $database_mess = _AM_WFDOWNLOADS_CCATEGORY_CREATED;
+ } else {
+ $database_mess = _AM_WFDOWNLOADS_CCATEGORY_MODIFIED;
+ wfdownloads_savePermissions($down_groups, $cid, 'WFDownCatPerm');
+ wfdownloads_savePermissions($up_groups, $cid, 'WFUpCatPerm');
+ }
+ redirect_header($currentFile, 1, $database_mess);
+ break;
+
+ case "category.delete" :
+ case "del" :
+ $cid = WfdownloadsRequest::getInt('cid', 0);
+ $ok = WfdownloadsRequest::getBool('ok', false, 'POST');
+ $categoryObjs = $wfdownloads->getHandler('category')->getObjects();
+ $mytree = new XoopsObjectTree($categoryObjs, "cid", "pid");
+ if ($ok == true) {
+ // get all subcategories under the specified category
+ $arr = $mytree -> getAllChild($cid);
+ foreach ($arr as $child) {
+ // get all category ids
+ $cids[] = $child->getVar('cid');
+ }
+ $cids[] = $cid;
+
+ $criteria = new Criteria("cid", "(" . implode(',', $cids) . ")", "IN");
+
+ //get list of downloads in these subcategories
+ $downloads = $wfdownloads->getHandler('download')->getList($criteria);
+
+ $download_criteria = new Criteria("lid", "(" . implode(',', array_keys($downloads)) . ")", "IN");
+
+ // now for each download, delete the text data and vote data associated with the download
+ $wfdownloads->getHandler('rating')->deleteAll($download_criteria);
+ $wfdownloads->getHandler('report')->deleteAll($download_criteria);
+ $wfdownloads->getHandler('download')->deleteAll($download_criteria);
+ foreach (array_keys($downloads) as $lid) {
+ xoops_comment_delete($wfdownloads->getModule()->mid(), (int) $lid);
+ }
+
+ // all downloads for each category is deleted, now delete the category data
+ $wfdownloads->getHandler('category')->deleteAll($criteria);
+ $error = _AM_WFDOWNLOADS_DBERROR;
+
+ foreach ($cids as $cid) {
+ xoops_groupperm_deletebymoditem ($wfdownloads->getModule()->mid(), 'WFDownCatPerm', $cid);
+ xoops_groupperm_deletebymoditem ($wfdownloads->getModule() -> mid(), 'WFUpCatPerm', $cid);
+ }
+
+ redirect_header($currentFile, 1, _AM_WFDOWNLOADS_CCATEGORY_DELETED);
+ exit();
+ } else {
+ wfdownloads_xoops_cp_header();
+ xoops_confirm(array('op' => 'category.delete', 'cid' => $cid, 'ok' => true), $currentFile, _AM_WFDOWNLOADS_CCATEGORY_AREUSURE);
+ xoops_cp_footer();
+ }
+ break;
+
+ case "category.add" :
+ case "category.edit" :
+ case "modCat":
+ wfdownloads_xoops_cp_header();
+ $indexAdmin = new ModuleAdmin();
+ echo $indexAdmin->addNavigation($currentFile);
+
+ $adminMenu = new ModuleAdmin();
+ $adminMenu->addItemButton(_MI_WFDOWNLOADS_MENU_CATEGORIES, "{$currentFile}?op=categories.list", 'list');
+ echo $adminMenu->renderButton();
+
+ if (isset($_REQUEST['cid'])) {
+ $categoryObj = $wfdownloads->getHandler('category')->get($_REQUEST['cid']);
+ } else {
+ $categoryObj = $wfdownloads->getHandler('category')->create();
+ }
+ $form = $categoryObj->getForm();
+ $form -> display();
+
+ include 'admin_footer.php';
+ break;
+
+ case 'categories.list' :
+ case 'main' :
+ default :
+ wfdownloads_xoops_cp_header();
+ $indexAdmin = new ModuleAdmin();
+ echo $indexAdmin->addNavigation($currentFile);
+
+ $adminMenu = new ModuleAdmin();
+ $adminMenu->addItemButton(_AM_WFDOWNLOADS_CCATEGORY_CREATENEW, "{$currentFile}?op=category.add", 'add');
+ echo $adminMenu->renderButton();
+
+ $totalCategories = wfdownloads_categoriesCount();
+ if ($totalCategories > 0) {
+ $sorted_categories = wfdownloads_sortCategories();
+ $GLOBALS['xoopsTpl']->assign('sorted_categories', $sorted_categories);
+ $GLOBALS['xoopsTpl']->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML() );
+ $GLOBALS['xoopsTpl']->display("db:{$wfdownloads->getModule()->dirname()}_admin_categorieslist.tpl");
+ } else {
+ redirect_header("{$currentFile}?op=category.add", 1, _AM_WFDOWNLOADS_CCATEGORY_NOEXISTS);
+ }
+ include 'admin_footer.php';
+ break;
+
+ case 'categories.reorder' :
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors() ));
+ }
+
+ if (isset($_POST['new_weights']) && count($_POST['new_weights']) > 0) {
+ $new_weights = $_POST['new_weights'];
+ $ids = array();
+ foreach ($new_weights as $cid => $new_weight) {
+ $categoryObj = $wfdownloads->getHandler('category')->get($cid);
+ $categoryObj->setVar('weight', $new_weight);
+ if (!$wfdownloads->getHandler('category')->insert($categoryObj)) {
+ redirect_header($currentFile, 3, $categoryObj->getErrors());
+ }
+ unset($categoryObj);
+ }
+ redirect_header($currentFile, 1, _AM_WFDOWNLOADS_CATEGORIES_REORDERED);
+ exit();
+ }
+ break;
+}
Added: XoopsModules/wfdownloads/trunk/admin/clone.php
===================================================================
--- XoopsModules/wfdownloads/trunk/admin/clone.php (rev 0)
+++ XoopsModules/wfdownloads/trunk/admin/clone.php 2014-06-13 17:49:48 UTC (rev 12584)
@@ -0,0 +1,179 @@
+<?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.
+ */
+/**
+ * Wfdownloads module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package wfdownload
+ * @since 3.23
+ * @author Xoops Development Team
+ * @version svn:$id$
+ */
+$currentFile = basename(__FILE__);
+include_once dirname(__FILE__) . '/admin_header.php';
+
+if (@$_POST['op'] == 'submit') {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header($currentFile, 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ exit();
+ }
+
+ $cloneDirname = $_POST['clonedirname'];
+
+ // Check if name is valid
+ if (empty($cloneDirname) || preg_match('/[^a-zA-Z0-9\_\-]/', $cloneDirname)) {
+ redirect_header($currentFile, 3, sprintf(_AM_WFDOWNLOADS_CLONE_INVALIDNAME, $cloneDirname));
+ exit();
+ }
+ // Check wether the cloned module exists or not
+ if ($cloneDirname && is_dir(XOOPS_ROOT_PATH . '/modules/' . $cloneDirname)) {
+ redirect_header($currentFile, 3, sprintf(_AM_WFDOWNLOADS_CLONE_EXISTS, $cloneDirname));
+ }
+
+ $patterns = array(
+ strtolower(WFDOWNLOADS_DIRNAME) => strtolower($cloneDirname),
+ strtoupper(WFDOWNLOADS_DIRNAME) => strtoupper($cloneDirname),
+ ucfirst(strtolower(WFDOWNLOADS_DIRNAME)) => ucfirst(strtolower($cloneDirname))
+ );
+
+ $patKeys = array_keys($patterns);
+ $patValues = array_values($patterns);
+ wfdownloads_cloneFileDir(WFDOWNLOADS_ROOT_PATH);
+ $logocreated = wfdownloads_createLogo(strtolower($cloneDirname));
+
+ $message = "";
+ if (is_dir(XOOPS_ROOT_PATH . '/modules/' . strtolower($cloneDirname))) {
+ $message .= sprintf(
+ _AM_WFDOWNLOADS_CLONE_CONGRAT,
+ "<a href='" . XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=installlist'>" . ucfirst(strtolower($cloneDirname)) . "</a>"
+ ) . "<br />\n";
+ if (!$logocreated) {
+ $message .= _AM_WFDOWNLOADS_CLONE_IMAGEFAIL;
+ }
+ } else {
+ $message .= _AM_WFDOWNLOADS_CLONE_FAIL;
+ }
+
+ wfdownloads_xoops_cp_header();
+ $indexAdmin = new ModuleAdmin();
+ echo $indexAdmin->addNavigation($currentFile);
+ echo $message;
+ include 'admin_footer.php';
+ exit();
+
+} else {
+ wfdownloads_xoops_cp_header();
+ $indexAdmin = new ModuleAdmin();
+ echo $indexAdmin->addNavigation($currentFile);
+ include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
+ $form = new XoopsThemeForm(sprintf(
+ _AM_WFDOWNLOADS_CLONE_TITLE,
+ $wfdownloads->getModule()->getVar('name', 'E')
+ ), 'clone', $currentFile, 'post', true);
+ $cloneDirname_text = new XoopsFormText(_AM_WFDOWNLOADS_CLONE_NAME, 'clonedirname', 20, 20, '');
+ $cloneDirname_text->setDescription(_AM_WFDOWNLOADS_CLONE_NAME_DSC);
+ $form->addElement($cloneDirname_text, true);
+ $form->addElement(new XoopsFormHidden('op', 'submit'));
+ $form->addElement(new XoopsFormButton('', '', _SUBMIT, 'submit'));
+ $form->display();
+ include 'admin_footer.php';
+ exit();
+}
+
+// recursive clonning script
+/**
+ * @param $path
+ */
+function wfdownloads_cloneFileDir($path)
+{
+ global $patKeys;
+ global $patValues;
+
+ $newPath = str_replace($patKeys[0], $patValues[0], $path);
+
+ if (is_dir($path)) {
+ // create new dir
+ mkdir($newPath);
+ // check all files in dir, and process it
+ if ($handle = opendir($path)) {
+ while ($file = readdir($handle)) {
+ if ($file != '.' && $file != '..' && $file != '.svn') {
+ wfdownloads_cloneFileDir("{$path}/{$file}");
+ }
+ }
+ closedir($handle);
+ }
+ } else {
+ if (preg_match('/(.jpg|.gif|.png|.zip|.ttf)$/i', $path)) {
+ // image
+ copy($path, $newPath);
+ } else {
+ // file, read it
+ $content = file_get_contents($path);
+ $content = str_replace($patKeys, $patValues, $content);
+ file_put_contents($newPath, $content);
+ }
+ }
+}
+
+/**
+ * @param $dirname
+ *
+ * @return bool
+ */
+function wfdownloads_createLogo($dirname)
+{
+ $wfdownloads = WfdownloadsWfdownloads::getInstance();
+ // Check extension/functions
+ if (!extension_loaded("gd")) {
+ return false;
+ } else {
+ $required_functions = array(
+ "imagecreatetruecolor",
+ "imagecolorallocate",
+ "imagefilledrectangle",
+ "imagejpeg",
+ "imagedestroy",
+ "imageftbbox"
+ );
+ foreach ($required_functions as $func) {
+ if (!function_exists($func)) {
+ return false;
+ }
+ }
+ }
+ // Check original image/font
+ if (!file_exists($imageBase = XOOPS_ROOT_PATH . "/modules/" . $dirname . "/assets/images/module_logo.png")) {
+ return false;
+ }
+ if (!file_exists($font = XOOPS_ROOT_PATH . "/modules/" . $wfdownloads->getModule()->dirname() . "/assets/images/VeraBd.ttf")) {
+ return false;
+ }
+ // Create image
+ $imageModule = imagecreatefrompng($imageBase);
+ // Erase old text
+ $greyColor = imagecolorallocate($imageModule, 237, 237, 237);
+ imagefilledrectangle($imageModule, 5, 35, 85, 46, $greyColor);
+ // Write text
+ $textColor = imagecolorallocate($imageModule, 0, 0, 0);
+ $space_to_border = (80 - strlen($dirname) * 6.5) / 2;
+ imagefttext($imageModule, 8.5, 0, $space_to_border, 45, $textColor, $font, ucfirst($dirname), array());
+ // Set transparency color
+ $whiteColor = imagecolorallocatealpha($imageModule, 255, 255, 255, 127);
+ imagefill($imageModule, 0, 0, $whiteColor);
+ imagecolortransparent($imageModule, $whiteColor);
+ // Save new image
+ imagepng($imageModule, XOOPS_ROOT_PATH . "/modules/" . $dirname . "/assets/images/module_logo.png");
+ imagedestroy($imageModule);
+
+ return true;
+}
Added: XoopsModules/wfdownloads/trunk/admin/downloads.php
===================================================================
--- XoopsModules/wfdownloads/trunk/admin/downloads.php (rev 0)
+++ XoopsModules/wfdownloads/trunk/admin/downloads.php 2014-06-13 17:49:48 UTC (rev 12584)
@@ -0,0 +1,989 @@
+<?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.
+ */
+/**
+ * Wfdownloads module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package wfdownload
+ * @since 3.23
+ * @author Xoops Development Team
+ * @version svn:$id$
+ */
+$currentFile = basename(__FILE__);
+include_once dirname(__FILE__) . '/admin_header.php';
+
+// Check directories
+if (!is_dir($wfdownloads->getConfig('uploaddir'))) {
+ redirect_header('index.php', 4, _AM_WFDOWNLOADS_ERROR_UPLOADDIRNOTEXISTS);
+ exit();
+}
+if (!is_dir(XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('mainimagedir'))) {
+ redirect_header('index.php', 4, _AM_WFDOWNLOADS_ERROR_MAINIMAGEDIRNOTEXISTS);
+ exit();
+}
+if (!is_dir(XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('screenshots'))) {
+ redirect_header('index.php', 4, _AM_WFDOWNLOADS_ERROR_SCREENSHOTSDIRNOTEXISTS);
+ exit();
+}
+if (!is_dir(XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('catimage'))) {
+ redirect_header('index.php', 4, _AM_WFDOWNLOADS_ERROR_CATIMAGEDIRNOTEXISTS);
+ exit();
+}
+
+$op = WfdownloadsRequest::getString('op', 'downloads.list');
+switch ($op) {
+ case "download.edit" :
+ case "download.add" :
+ case "Download" :
+ wfdownloads_xoops_cp_header();
+ $indexAdmin = new ModuleAdmin();
+ echo $indexAdmin->addNavigation($currentFile);
+
+ $adminMenu = new ModuleAdmin();
+ $adminMenu->addItemButton(_MI_WFDOWNLOADS_MENU_DOWNLOADS, "{$currentFile}?op=downloads.list", 'list');
+ echo $adminMenu->renderButton();
+
+ $lid = WfdownloadsRequest::getInt('lid', 0);
+
+ $categoriesCount = $wfdownloads->getHandler('category')->getCount();
+ if ($categoriesCount) {
+ // Allowed mimetypes list
+ echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_WFDOWNLOADS_FILE_ALLOWEDAMIME . "</legend>\n";
+ echo "<div style='padding: 8px;'>\n";
+ $criteria = new Criteria("mime_admin", true);
+ $mimetypes = $wfdownloads->getHandler('mimetype')->getList($criteria);
+ $allowMimetypes = implode(' | ', $mimetypes);
+ echo $allowMimetypes;
+ echo "</div>\n";
+ echo "</fieldset><br />\n";
+
+ if ($lid) {
+ // edit download
+ if (!$downloadObj = $wfdownloads->getHandler('download')->get($lid)) {
+ redirect_header($currentFile, 4, _AM_WFDOWNLOADS_DOWN_ERROR_FILENOTFOUND);
+ exit();
+ }
+ $cid = $downloadObj->getVar('cid');
+ if (!$categoryObj = $wfdownloads->getHandler('category')->get($cid)) {
+ redirect_header($currentFile, 4, _AM_WFDOWNLOADS_DOWN_ERROR_CATEGORYNOTFOUND);
+ exit();
+ }
+ $title = preg_replace("/{category}/", $categoryObj->getVar('title'), _AM_WFDOWNLOADS_FILE_EDIT);
+ $title12 = preg_replace("/{category}/", $categoryObj->getVar('title'), _AM_WFDOWNLOADS_FFS_1STEP);
+ $title22 = preg_replace("/{category}/", $categoryObj->getVar('title'), _AM_WFDOWNLOADS_FFS_EDITDOWNLOADTITLE);
+ } else {
+ // create download
+ $downloadObj = $wfdownloads->getHandler('download')->create();
+ $cid = WfdownloadsRequest::getInt('cid', 0, 'POST');
+ $categoryObj = $wfdownloads->getHandler('category')->get($cid);
+ $downloadObj->setVar('cid', $cid);
+ $title = preg_replace("/{category}/", $categoryObj->getVar('title'), _AM_WFDOWNLOADS_FILE_CREATE);
+ $title12 = preg_replace("/{category}/", $categoryObj->getVar('title'), _AM_WFDOWNLOADS_FFS_1STEP);
+ $title22 = preg_replace("/{category}/", $categoryObj->getVar('title'), _AM_WFDOWNLOADS_FFS_DOWNLOADTITLE);
+ }
+
+// Formulize module support (2006/05/04) jpc - start
+ if (!wfdownloads_checkModule('formulize')) {
+ // one step form: 1st step
+ $sform = $downloadObj->getAdminForm($title);
+ } elseif ((isset($_POST['submit_category']) && !empty($_POST['submit_category']))) {
+ // two steps form: 2nd step
+ $fid = $categoryObj->getVar('formulize_fid');
+ $customArray = array();
+ if ($fid) {
+ include_once XOOPS_ROOT_PATH . "/modules/formulize/include/formdisplay.php";
+ include_once XOOPS_ROOT_PATH . "/modules/formulize/include/functions.php";
+ $customArray['fid'] = $fid;
+ $customArray['formulize_mgr'] = xoops_getmodulehandler('elements', 'formulize');
+ $customArray['groups'] = $xoopsUser ? $xoopsUser->getGroups() : array(0 => XOOPS_GROUP_ANONYMOUS);
+ $customArray['prevEntry'] = getEntryValues( // is a Formulize function
+ $downloadObj->getVar('formulize_idreq'),
+ $customArray['formulize_mgr'],
+ $customArray['groups'],
+ $fid,
+ null,
+ null,
+ null,
+ null,
+ null
+ );
+ $customArray['entry'] = $downloadObj->getVar('formulize_idreq');
+ $customArray['go_back'] = "";
+ $customArray['parentLinks'] = "";
+ if (wfdownloads_checkModule('formulize') < 300) {
+ $owner = getEntryOwner($customArray['entry']); // is a Formulize function
+ } else {
+ $owner = getEntryOwner($customArray['entry'], $fid); // is a Formulize function
+ }
+ $ownerGroups = $member_handler->getGroupsByUser($owner, false);
+ $customArray['owner_groups'] = $ownerGroups;
+ }
+ $sform = $downloadObj->getAdminForm($title22, $customArray);
+ } else {
+ // two steps form: 1st step
+ $sform = $downloadObj->getCategoryForm($title12);
+ }
+// Formulize module support (2006/05/04) jpc - end
+ $sform->display();
+ } else {
+ redirect_header('categories.php', 1, _AM_WFDOWNLOADS_CCATEGORY_NOEXISTS);
+ exit();
+ }
+
+ // Vote data list/manager
+ if ($lid) {
+ $votes_count = $wfdownloads->getHandler('rating')->getCount();
+
+ $registeredCriteria = new CriteriaCompo(new Criteria('lid', $lid));
+ $registeredCriteria->add(new Criteria('ratinguser', 0, '>'));
+ $votesreg = $wfdownloads->getHandler('rating')->getCount($registeredCriteria);
+ $registeredCriteria->setSort('ratingtimestamp');
+ $registeredCriteria->setOrder('DESC');
+ $regvotes = $wfdownloads->getHandler('rating')->getObjects($registeredCriteria);
+
+ $anonymousCriteria = new CriteriaCompo(new Criteria('lid', $lid));
+ $anonymousCriteria->add(new Criteria('ratinguser', 0, '='));
+ $votesanon = $wfdownloads->getHandler('rating')->getCount($anonymousCriteria);
+ $anonymousCriteria->setSort('ratingtimestamp');
+ $anonymousCriteria->setOrder('DESC');
+
+ echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_WFDOWNLOADS_VOTE_RATINGINFOMATION . "</legend>\n";
+ echo "<div style='padding: 8px;'><b>" . _AM_WFDOWNLOADS_VOTE_TOTALVOTES . "</b>{$votes_count}<br /><br />\n";
+
+ printf(_AM_WFDOWNLOADS_VOTE_REGUSERVOTES, $votesreg);
+
+ echo "<br />";
+
+ printf(_AM_WFDOWNLOADS_VOTE_ANONUSERVOTES, $votesanon);
+
+ echo "
+ </div>\n
+ <table width='100%' cellspacing='1' cellpadding='2' class='outer'>\n
+ <tr>\n
+ <th>" . _AM_WFDOWNLOADS_VOTE_USER . "</td>\n
+ <th>" . _AM_WFDOWNLOADS_VOTE_IP . "</td>\n
+ <th>" . _AM_WFDOWNLOADS_VOTE_RATING . "</td>\n
+ <th>" . _AM_WFDOWNLOADS_VOTE_USERAVG . "</td>\n
+ <th>" . _AM_WFDOWNLOADS_VOTE_TOTALRATE . "</td>\n
+ <th>" . _AM_WFDOWNLOADS_VOTE_DATE . "</td>\n
+ <th>" . _AM_WFDOWNLOADS_MINDEX_ACTION . "</td>\n
+ </tr>\n
+ ";
+
+ if ($votesreg == 0) {
+ echo "<tr><td colspan='7' class='even'><b>" . _AM_WFDOWNLOADS_VOTE_NOREGVOTES . "</b></td></tr>";
+ } else {
+ foreach (array_keys($regvotes) as $i) {
+ $uids[] = $regvotes[$i]->getVar('ratinguser');
+ }
+
+ $criteria = new Criteria("ratinguser", "(" . implode(',', $uids) . ")", "IN");
+ $criteria->setGroupby("ratinguser");
+ $userRatings = $wfdownloads->getHandler('rating')->getUserAverage($criteria);
+
+ foreach (array_keys($regvotes) as $i) {
+ $formatted_date = XoopsLocal::formatTimestamp($regvotes[$i]->getVar('ratingtimestamp'), 'l');
+ $userAvgRating = isset($userRatings[$regvotes[$i]->getVar('ratinguser')]) ? $userRatings[$regvotes[$i]->getVar(
+ 'ratinguser'
+ )]["avg"] : 0;
+ $userVotes = isset($userRatings[$regvotes[$i]->getVar('ratinguser')]) ? $userRatings[$regvotes[$i]->getVar(
+ 'ratinguser'
+ )]["count"] : 0;
+ $ratingUserName = XoopsUser :: getUnameFromId($regvotes[$i]->getVar('ratinguser'));
+
+ echo "
+ <tr><td class='head'>$ratingUserName</td>\n
+ <td class='even'>" . $regvotes[$i]->getVar('ratinghostname') . "</th>\n
+ <td class='even'>" . $regvotes[$i]->getVar('rating') . "</th>\n
+ <td class='even'>$userAvgRating</th>\n
+ <td class='even'>$userVotes</th>\n
+ <td class='even'>$formatted_date</th>\n
+ <td class='even'>\n
+ <a href='{$currentFile}?op=vote.delete&lid={$lid}&rid=" . $regvotes[$i]->getVar('ratingid') . "'>"
+ . $imagearray['deleteimg'] . "</a>\n
+ </th></tr>\n
+ ";
+ }
+ }
+ echo "
+ </table>\n
+ <br />\n
+ <table width='100%' cellspacing='1' cellpadding='2' class='outer'>\n
+ <tr>\n
+ <th>" . _AM_WFDOWNLOADS_VOTE_USER . "</td>\n
+ <th>" . _AM_WFDOWNLOADS_VOTE_IP . "</td>\n
+ <th>" . _AM_WFDOWNLOADS_VOTE_RATING . "</td>\n
+ <th>" . _AM_WFDOWNLOADS_VOTE_USERAVG . "</td>\n
+ <th>" . _AM_WFDOWNLOADS_VOTE_TOTALRATE . "</td>\n
+ <th>" . _AM_WFDOWNLOADS_VOTE_DATE . "</td>\n
+ <th>" . _AM_WFDOWNLOADS_MINDEX_ACTION . "</td>\n
+ </tr>\n
+ ";
+ if ($votesanon == 0) {
+ echo "<tr><td colspan='7' class='even'><b>" . _AM_WFDOWNLOADS_VOTE_NOUNREGVOTES . "</b></td></tr>";
+ } else {
+ $criteria = new Criteria('ratinguser', 0);
+ $userRatings = $wfdownloads->getHandler('rating')->getUserAverage($criteria);
+ $anonymousVotes = $wfdownloads->getHandler('rating')->getObjects($anonymousCriteria);
+
+ foreach (array_keys($anonymousVotes) as $i) {
+ $formatted_date = XoopsLocal::formatTimestamp($anonymousVotes[$i]->getVar('ratingtimestamp'), 'l');
+ $userAvgRating = isset($userRatings['avg']) ? $userRatings["avg"] : 0;
+ $userVotes = isset($userRatings['count']) ? $userRatings["count"] : 0;
+
+ $ratingUserName = $GLOBALS['xoopsConfig']['anonymous'];
+
+ echo "
+ <tr><td class='head'>$ratingUserName</td>\n
+ <td class='even'>" . $anonymousVotes[$i]->getVar('ratinghostname') . "</th>\n
+ <td class='even'>" . $anonymousVotes[$i]->getVar('rating') . "</th>\n
+ <td class='even'>$userAvgRating</th>\n
+ <td class='even'>$userVotes</th>\n
+ <td class='even'>$formatted_date</th>\n
+ <td class='even'>\n
+ <a href='{$currentFile}?op=vote.delete&lid={$lid}&rid=" . $anonymousVotes[$i]->getVar('ratingid') . "'>"
+ . $imagearray['deleteimg'] . "</a>\n
+ </th></tr>\n
+ ";
+ }
+ }
+ echo "</table>\n";
+ echo "</fieldset>\n";
+ }
+ include 'admin_footer.php';
+ break;
+
+ case "download.save" :
+ case "addDownload" :
+ $lid = WfdownloadsRequest::getInt('lid', 0, 'POST');
+ $cid = WfdownloadsRequest::getInt('cid', 0, 'POST');
+ $status = WfdownloadsRequest::getInt('status', _WFDOWNLOADS_STATUS_UPDATED, 'POST');
+
+ if ($lid > 0) {
+ $thisIsANewRecord = false; /* Added by Lankford on 2007/3/21 */
+ $downloadObj = $wfdownloads->getHandler('download')->get($lid);
+ } else {
+ $thisIsANewRecord = true; /* Added by Lankford on 2007/3/21 */
+ $downloadObj = $wfdownloads->getHandler('download')->create();
+ }
+ // Define URL
+ if (empty($_FILES['userfile']['name'])) {
+ if ($_POST['url'] && $_POST['url'] != "" && $_POST['url'] != "http://") {
+ $url = ($_POST['url'] != "http://") ? $_POST['url'] : '';
+ $filename = '';
+ $filetype = '';
+ // Get size from form
+ $size = (empty($_POST['size']) || !is_numeric($_POST['size'])) ? 0 : (int) $_POST["size"];
+ } else {
+ $url = ($_POST["url"] != "http://") ? $_POST['url'] : '';
+ $filename = $_POST['filename'];
+ $filetype = $_POST['filetype'];
+ $filePath = $wfdownloads->getConfig('uploaddir') . '/' . $filename;
+ // Get size from filesystem
+ $size = @filesize($filePath);
+ }
+ $title = trim($_POST['title']);
+ $downloadObj->setVar('filename', $filename);
+ $downloadObj->setVar('filetype', $filetype);
+ } else {
+ $down = wfdownloads_uploading($_FILES, $wfdownloads->getConfig('uploaddir'), '', $currentFile, 0, false, true);
+ $url = ($_POST['url'] != "http://") ? $_POST["url"] : '';
+ $size = $down['size'];
+ $title = $_FILES['userfile']['name'];
+
+ $ext = rtrim(strrchr($title, '.'), '.');
+ $title = str_replace($ext, '', $title);
+ $title = (isset($_POST['title_checkbox']) && $_POST['title_checkbox'] == 1) ? $title : trim($_POST['title']);
+
+ $filename = $down['filename'];
+ $filetype = $_FILES['userfile']['type'];
+ $downloadObj->setVar('filename', $filename);
+ $downloadObj->setVar('filetype', $filetype);
+ }
+ // Get data from form
+ $screenshot = ($_POST['screenshot'] != 'blank.png') ? $_POST['screenshot'] : '';
+ $screenshot2 = ($_POST['screenshot2'] != 'blank.png') ? $_POST['screenshot2'] : '';
+ $screenshot3 = ($_POST['screenshot3'] != 'blank.png') ? $_POST['screenshot3'] : '';
+ $screenshot4 = ($_POST['screenshot4'] != 'blank.png') ? $_POST['screenshot4'] : '';
+
+ if (!empty($_POST['homepage']) || $_POST['homepage'] != "http://") {
+ $downloadObj->setVar('homepage', trim($_POST['homepage']));
+ $downloadObj->setVar('homepagetitle', trim($_POST['homepagetitle']));
+ }
+
+ $version = !empty($_POST['version']) ? trim($_POST['version']) : 0;
+
+ /* Added by Lankford on 2007/3/21 */
+ // Here, I want to know if:
+ // a) Are they actually changing the value of version, or is it the same?
+ // b) Are they actually modifying the record, or is this a new one?
+ // If both conditions are true, then trigger all three notifications related to modified records.
+ if (!$thisIsANewRecord && ($downloadObj->getVar('version') != $version)) {
+ // Trigger the three events related to modified files (one for the file, category, and global event categories respectively)
+ $tags = array();
+ $tags['FILE_NAME'] = $title;
+ $tags['FILE_URL'] = WFDOWNLOADS_URL . "/singlefile.php?cid={$cid}&lid={$lid}";
+ $categoryObj = $wfdownload...
[truncated message content] |
|
From: <luc...@us...> - 2014-06-13 17:45:32
|
Revision: 12583
http://sourceforge.net/p/xoops/svn/12583
Author: luciorota
Date: 2014-06-13 17:45:27 +0000 (Fri, 13 Jun 2014)
Log Message:
-----------
delete old wfdownloads, i will commite newer asap
Removed Paths:
-------------
XoopsModules/wfdownloads/trunk/wfdownloads/admin/
XoopsModules/wfdownloads/trunk/wfdownloads/blocks/
XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/
XoopsModules/wfdownloads/trunk/wfdownloads/comment_delete.php
XoopsModules/wfdownloads/trunk/wfdownloads/comment_edit.php
XoopsModules/wfdownloads/trunk/wfdownloads/comment_new.php
XoopsModules/wfdownloads/trunk/wfdownloads/comment_post.php
XoopsModules/wfdownloads/trunk/wfdownloads/comment_reply.php
XoopsModules/wfdownloads/trunk/wfdownloads/docs/
XoopsModules/wfdownloads/trunk/wfdownloads/footer.php
XoopsModules/wfdownloads/trunk/wfdownloads/header.php
XoopsModules/wfdownloads/trunk/wfdownloads/images/
XoopsModules/wfdownloads/trunk/wfdownloads/include/
XoopsModules/wfdownloads/trunk/wfdownloads/index.php
XoopsModules/wfdownloads/trunk/wfdownloads/js/
XoopsModules/wfdownloads/trunk/wfdownloads/language/
XoopsModules/wfdownloads/trunk/wfdownloads/mirror.php
XoopsModules/wfdownloads/trunk/wfdownloads/module.css
XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php
XoopsModules/wfdownloads/trunk/wfdownloads/notification_update.php
XoopsModules/wfdownloads/trunk/wfdownloads/ratefile.php
XoopsModules/wfdownloads/trunk/wfdownloads/review.php
XoopsModules/wfdownloads/trunk/wfdownloads/rss.php
XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php
XoopsModules/wfdownloads/trunk/wfdownloads/sql/
XoopsModules/wfdownloads/trunk/wfdownloads/submit.php
XoopsModules/wfdownloads/trunk/wfdownloads/templates/
XoopsModules/wfdownloads/trunk/wfdownloads/topten.php
XoopsModules/wfdownloads/trunk/wfdownloads/uploads/
XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php
XoopsModules/wfdownloads/trunk/wfdownloads/visit.php
XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
Deleted: XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php 2014-06-13 14:25:54 UTC (rev 12582)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php 2014-06-13 17:45:27 UTC (rev 12583)
@@ -1,195 +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.
- */
-/**
- * Wfdownloads module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
- * @package wfdownload
- * @since 3.23
- * @author Xoops Development Team
- * @version svn:$id$
- */
-$currentFile = basename(__FILE__);
-include 'header.php';
-
-$lid = WfdownloadsRequest::getInt('lid', 0);
-$download = $wfdownloads->getHandler('download')->get($lid);
-if (empty($download)) {
- redirect_header('index.php', 3, _CO_WFDOWNLOADS_ERROR_NODOWNLOAD);
-}
-$cid = WfdownloadsRequest::getInt('cid', $download->getVar('cid'));
-$category = $wfdownloads->getHandler('category')->get($cid);
-if (empty($category)) {
- redirect_header('index.php', 3, _CO_WFDOWNLOADS_ERROR_NOCATEGORY);
-}
-
-// Download not published, expired or taken offline - redirect
-if (
- $download->getVar('published') == 0 ||
- $download->getVar('published') > time() ||
- $download->getVar('offline') == true ||
- ($download->getVar('expired') == true && $download->getVar('expired') < time()) ||
- $download->getVar('status') == _WFDOWNLOADS_STATUS_WAITING) {
- redirect_header('index.php', 3, _MD_WFDOWNLOADS_NODOWNLOAD);
-}
-
-// Check permissions
-if ($wfdownloads->getConfig('enable_brokenreports') == false && !wfdownloads_userIsAdmin()) {
- redirect_header('index.php', 3, _NOPERM);
-}
-
-// Breadcrumb
-include_once XOOPS_ROOT_PATH . "/class/tree.php";
-$categoriesTree = new XoopsObjectTree($wfdownloads->getHandler('category')->getObjects(), 'cid', 'pid');
-$breadcrumb = new WfdownloadsBreadcrumb();
-$breadcrumb->addLink($wfdownloads->getModule()->getVar('name'), WFDOWNLOADS_URL);
-foreach (array_reverse($categoriesTree->getAllParent($cid)) as $parentCategory) {
- $breadcrumb->addLink($parentCategory->getVar('title'), "viewcat.php?cid=" . $parentCategory->getVar('cid'));
-}
-$breadcrumb->addLink($category->getVar('title'), "viewcat.php?cid={$cid}");
-$breadcrumb->addLink($download->getVar('title'), "singlefile.php?lid={$lid}");
-
-
-$op = WfdownloadsRequest::getString('op', 'report.add');
-switch ($op) {
- case "report.add" :
- default :
- // Get report sender 'uid'
- $senderUid = is_object($xoopsUser) ? (int)$xoopsUser->getVar('uid') : 0;
- $senderIp = getenv('REMOTE_ADDR');
-
- if (!empty($_POST['submit'])) {
- // Check if REG user is trying to report twice
- $criteria = new Criteria('lid', $lid);
- $reportsCount = $wfdownloads->getHandler('report')->getCount($criteria);
- if ($reportsCount > 0) {
- redirect_header('index.php', 2, _MD_WFDOWNLOADS_ALREADYREPORTED);
- } else {
- $report = $wfdownloads->getHandler('report')->create();
- $report->setVar('lid', $lid);
- $report->setVar('sender', $senderUid);
- $report->setVar('ip', $senderIp);
- $report->setVar('date', time());
- $report->setVar('confirmed', 0);
- $report->setVar('acknowledged', 0);
- if ($wfdownloads->getHandler('report')->insert($report)) {
- // All is well
- // Send notification
- $tags = array();
- $tags['BROKENREPORTS_URL'] = WFDOWNLOADS_URL . '/admin/reportsmodifications.php?op=reports.modifications.list';
- $notification_handler->triggerEvent('global', 0, 'file_broken', $tags);
-
- // Send email to the owner of the download stating that it is broken
- $user = $member_handler->getUser($download->getVar('submitter'));
- $subdate = formatTimestamp($download->getVar('published'), $wfdownloads->getConfig('dateformat'));
- $cid = $download->getVar('cid');
- $title = $download->getVar('title');
- $subject = _MD_WFDOWNLOADS_BROKENREPORTED;
-
- $xoopsMailer = & getMailer();
- $xoopsMailer->useMail();
- $template_dir = WFDOWNLOADS_ROOT_PATH . "/language/" . $xoopsConfig['language'] . "/mail_template";
-
- $xoopsMailer->setTemplateDir($template_dir);
- $xoopsMailer->setTemplate('filebroken_notify.tpl');
- $xoopsMailer->setToEmails($user->email());
- $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
- $xoopsMailer->setFromName($xoopsConfig['sitename']);
- $xoopsMailer->assign("X_UNAME", $user->uname());
- $xoopsMailer->assign("SITENAME", $xoopsConfig['sitename']);
- $xoopsMailer->assign("X_ADMINMAIL", $xoopsConfig['adminmail']);
- $xoopsMailer->assign('X_SITEURL', XOOPS_URL . '/');
- $xoopsMailer->assign("X_TITLE", $title);
- $xoopsMailer->assign("X_SUB_DATE", $subdate);
- $xoopsMailer->assign('X_DOWNLOAD', WFDOWNLOADS_URL . "/singlefile.php?cid={$cid}&lid={$lid}");
- $xoopsMailer->setSubject($subject);
- $xoopsMailer->send();
- redirect_header('index.php', 2, _MD_WFDOWNLOADS_BROKENREPORTED);
- exit();
- } else {
- echo $report->getHtmlErrors();
- }
- }
- } else {
- $xoopsOption['template_main'] = "{$wfdownloads->getModule()->dirname()}_brokenfile.html";
- include XOOPS_ROOT_PATH . '/header.php';
-
- // Begin Main page Heading etc
- $catarray['imageheader'] = wfdownloads_headerImage();
- $xoopsTpl->assign('catarray', $catarray);
-
- $xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js');
- $xoTheme->addScript(WFDOWNLOADS_URL . '/js/jquery.ThickBox/thickbox-compressed.js');
- $xoTheme->addStylesheet(WFDOWNLOADS_URL . '/js/jquery.ThickBox/thickbox.css');
- $xoTheme->addStylesheet(WFDOWNLOADS_URL . '/module.css');
-
- $xoopsTpl->assign('wfdownloads_url', WFDOWNLOADS_URL . '/');
-
- // Breadcrumb
- $breadcrumb->addLink(_MD_WFDOWNLOADS_REPORTBROKEN, '');
- $xoopsTpl->assign('wfdownloads_breadcrumb', $breadcrumb->render());
-
- // Generate form
- include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
- $sform = new XoopsThemeForm(_MD_WFDOWNLOADS_RATETHISFILE, 'reportform', xoops_getenv('PHP_SELF'));
- $sform->addElement(new XoopsFormHidden('lid', $lid));
- $sform->addElement(new XoopsFormHidden('cid', $cid));
- $sform->addElement(new XoopsFormHidden('uid', $senderUid));
- $button_tray = new XoopsFormElementTray('', '');
- $submit_button = new XoopsFormButton('', 'submit', _MD_WFDOWNLOADS_SUBMITBROKEN, 'submit');
- $button_tray->addElement($submit_button);
- $cancel_button = new XoopsFormButton('', '', _CANCEL, 'button');
- $cancel_button->setExtra('onclick="history.go(-1)"');
- $button_tray->addElement($cancel_button);
- $sform->addElement($button_tray);
- $xoopsTpl->assign('reportform', $sform->render());
- $xoopsTpl->assign(
- 'download',
- array('lid' => $lid, 'cid' => $cid, 'title' => $download->getVar('title'), 'description' => $download->getVar('description'))
- );
-
- $criteria = new Criteria('lid', $lid);
- $reports = $wfdownloads->getHandler('report')->getObjects($criteria);
- //print_r($reports);
- if (count($reports) > 0) {
- $report = $reports[0];
-
- $broken['title'] = trim($download->getVar('title'));
- $broken['id'] = $report->getVar('reportid');
- $broken['reporter'] = XoopsUserUtility::getUnameFromId((int)$report->getVar('sender'));
- $broken['date'] = formatTimestamp($report->getVar('published'), $wfdownloads->getConfig('dateformat'));
- $broken['acknowledged'] = ($report->getVar('acknowledged') == 1) ? _YES : _NO;
- $broken['confirmed'] = ($report->getVar('confirmed') == 1) ? _YES : _NO;
-
- $xoopsTpl->assign('brokenreportexists', true);
- $xoopsTpl->assign('broken', $broken);
- $xoopsTpl->assign('brokenreport', true); // this definition is not removed for backward compatibility issues
- } else {
- // file info
- $down['title'] = trim($download->getVar('title'));
- $down['homepage'] = $myts->makeClickable(formatURL(trim($download->getVar('homepage'))));
- $time = ($download->getVar('updated') != false) ? $download->getVar('updated') : $download->getVar('published');
- $down['updated'] = formatTimestamp($time, $wfdownloads->getConfig('dateformat'));
- $is_updated = ($download->getVar('updated') != false) ? _MD_WFDOWNLOADS_UPDATEDON : _MD_WFDOWNLOADS_SUBMITDATE;
- $down['publisher'] = XoopsUserUtility::getUnameFromId((int)$download->getVar('submitter'));
-
- $xoopsTpl->assign('brokenreportexists', false);
- $xoopsTpl->assign('file_id', $lid);
- $xoopsTpl->assign('lang_subdate', $is_updated);
- $xoopsTpl->assign('is_updated', $download->getVar('updated'));
- $xoopsTpl->assign('lid', $lid);
- $xoopsTpl->assign('down', $down);
- }
- include 'footer.php';
- }
- break;
-}
Deleted: XoopsModules/wfdownloads/trunk/wfdownloads/comment_delete.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/comment_delete.php 2014-06-13 14:25:54 UTC (rev 12582)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/comment_delete.php 2014-06-13 17:45:27 UTC (rev 12583)
@@ -1,22 +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.
- */
-/**
- * Wfdownloads module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
- * @package wfdownload
- * @since 3.23
- * @author Xoops Development Team
- * @version svn:$id$
- */
-include '../../mainfile.php';
-include XOOPS_ROOT_PATH . '/include/comment_delete.php';
Deleted: XoopsModules/wfdownloads/trunk/wfdownloads/comment_edit.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/comment_edit.php 2014-06-13 14:25:54 UTC (rev 12582)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/comment_edit.php 2014-06-13 17:45:27 UTC (rev 12583)
@@ -1,22 +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.
- */
-/**
- * Wfdownloads module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
- * @package wfdownload
- * @since 3.23
- * @author Xoops Development Team
- * @version svn:$id$
- */
-include '../../mainfile.php';
-include XOOPS_ROOT_PATH . '/include/comment_edit.php';
Deleted: XoopsModules/wfdownloads/trunk/wfdownloads/comment_new.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/comment_new.php 2014-06-13 14:25:54 UTC (rev 12582)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/comment_new.php 2014-06-13 17:45:27 UTC (rev 12583)
@@ -1,30 +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.
- */
-/**
- * Wfdownloads module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
- * @package wfdownload
- * @since 3.23
- * @author Xoops Development Team
- * @version svn:$id$
- */
-$currentFile = basename(__FILE__);
-include 'header.php';
-
-$com_itemid = WfdownloadsRequest::getInt('com_itemid', 0);
-if ($com_itemid > 0) {
- // Get file title
- $download = $wfdownloads->getHandler('download')->get($com_itemid);
- $com_replytitle = $download->getVar('title');
- include XOOPS_ROOT_PATH . '/include/comment_new.php';
-}
Deleted: XoopsModules/wfdownloads/trunk/wfdownloads/comment_post.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/comment_post.php 2014-06-13 14:25:54 UTC (rev 12582)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/comment_post.php 2014-06-13 17:45:27 UTC (rev 12583)
@@ -1,22 +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.
- */
-/**
- * Wfdownloads module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
- * @package wfdownload
- * @since 3.23
- * @author Xoops Development Team
- * @version svn:$id$
- */
-include '../../mainfile.php';
-include XOOPS_ROOT_PATH . '/include/comment_post.php';
Deleted: XoopsModules/wfdownloads/trunk/wfdownloads/comment_reply.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/comment_reply.php 2014-06-13 14:25:54 UTC (rev 12582)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/comment_reply.php 2014-06-13 17:45:27 UTC (rev 12583)
@@ -1,22 +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.
- */
-/**
- * Wfdownloads module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
- * @package wfdownload
- * @since 3.23
- * @author Xoops Development Team
- * @version svn:$id$
- */
-include '../../mainfile.php';
-include XOOPS_ROOT_PATH . '/include/comment_reply.php';
Deleted: XoopsModules/wfdownloads/trunk/wfdownloads/footer.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/footer.php 2014-06-13 14:25:54 UTC (rev 12582)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/footer.php 2014-06-13 17:45:27 UTC (rev 12583)
@@ -1,32 +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.
- */
-/**
- * Wfdownloads module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
- * @package wfdownload
- * @since 3.23
- * @author Xoops Development Team
- * @version svn:$id$
- */
-// Module info/menu
-$moduleInfo = $wfdownloads->getModule()->getInfo();
-//$xoopsTpl->assign('wfdownloadModuleInfo', $moduleInfo); // huge array but useful?
-$xoopsTpl->assign('wfdownloadModuleInfoSub', $moduleInfo['sub']);
-// Module admin
-$xoopsTpl->assign("isAdmin", $wfdownloads_isAdmin);
-$xoopsTpl->assign("wfdownloads_adminpage", "<a href='" . WFDOWNLOADS_URL . "/admin/index.php'>" . _MD_WFDOWNLOADS_ADMIN_PAGE . "</a>");
-// Extra info
-$xoopsTpl->assign('wfdownloads_url', WFDOWNLOADS_URL . '/'); // this definition is not removed for backward compatibility issues
-$xoopsTpl->assign("ref_smartfactory","WFDownloads is developed by The SmartFactory (http://www.smartfactory.ca), a division of InBox Solutions (http://www.inboxsolutions.net)");
-
-include_once XOOPS_ROOT_PATH . '/footer.php';
Deleted: XoopsModules/wfdownloads/trunk/wfdownloads/header.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/header.php 2014-06-13 14:25:54 UTC (rev 12582)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/header.php 2014-06-13 17:45:27 UTC (rev 12583)
@@ -1,26 +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.
- */
-/**
- * Wfdownloads module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
- * @package wfdownload
- * @since 3.23
- * @author Xoops Development Team
- * @version svn:$id$
- */
-include_once dirname(dirname(dirname(__FILE__))) . '/mainfile.php';
-include_once dirname(__FILE__) . '/include/common.php';
-
-// uncomment the below line only if you are using Protector 3.x module
-// and you trust your users when uploading files, it is recommended to not allow anonymous uploads if you do so!!
-//define('PROTECTOR_SKIP_FILESCHECKER', true);
Deleted: XoopsModules/wfdownloads/trunk/wfdownloads/index.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/index.php 2014-06-13 14:25:54 UTC (rev 12582)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/index.php 2014-06-13 17:45:27 UTC (rev 12583)
@@ -1,266 +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.
- */
-/**
- * Wfdownloads module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
- * @package wfdownload
- * @since 3.23
- * @author Xoops Development Team
- * @version svn:$id$
- */
-$currentFile = pathinfo(__FILE__, PATHINFO_BASENAME);
-include 'header.php';
-
-$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0 => XOOPS_GROUP_ANONYMOUS);
-
-// Check if submission is allowed
-$isSubmissionAllowed = false;
-if (is_object($xoopsUser)
- && ($wfdownloads->getConfig('submissions') == _WFDOWNLOADS_SUBMISSIONS_DOWNLOAD
- || $wfdownloads->getConfig('submissions') == _WFDOWNLOADS_SUBMISSIONS_BOTH)
-) {
- // if user is a registered user
- $groups = $xoopsUser->getGroups();
- if (count(array_intersect($wfdownloads->getConfig('submitarts'), $groups)) > 0) {
- $isSubmissionAllowed = true;
- }
-} else {
- // if user is anonymous
- if ($wfdownloads->getConfig('anonpost') == _WFDOWNLOADS_ANONPOST_DOWNLOAD || $wfdownloads->getConfig('anonpost') == _WFDOWNLOADS_ANONPOST_BOTH) {
- $isSubmissionAllowed = true;
- }
-}
-
-// Get download/upload permissions
-$allowedDownCategoriesIds = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $wfdownloads->getModule()->mid());
-$allowedUpCategoriesIds = $gperm_handler->getItemIds('WFUpCatPerm', $groups, $wfdownloads->getModule()->mid());
-
-$xoopsOption['template_main'] = "{$wfdownloads->getModule()->dirname()}_index.html";
-include XOOPS_ROOT_PATH . '/header.php';
-
-$xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js');
-$xoTheme->addScript(WFDOWNLOADS_URL . '/js/jquery.ThickBox/thickbox-compressed.js');
-$xoTheme->addStylesheet(WFDOWNLOADS_URL . '/js/jquery.ThickBox/thickbox.css');
-$xoTheme->addStylesheet(WFDOWNLOADS_URL . '/module.css');
-
-$xoopsTpl->assign('wfdownloads_url', WFDOWNLOADS_URL . '/');
-
-// Breadcrumb
-$breadcrumb = new WfdownloadsBreadcrumb();
-$breadcrumb->addLink($wfdownloads->getModule()->getVar('name'), WFDOWNLOADS_URL);
-
-$xoopsTpl->assign('module_home', wfdownloads_module_home(false)); // this definition is not removed for backward compatibility issues
-$xoopsTpl->assign('wfdownloads_breadcrumb', $breadcrumb->render());
-
-$cat_criteria = new CriteriaCompo();
-$cat_criteria->setSort('weight ASC, title');
-$categories = $wfdownloads->getHandler('category')->getObjects($cat_criteria);
-unset($cat_criteria);
-
-$categoriesTree = new XoopsObjectTree($categories, "cid", "pid");
-
-// Generate content header
-$sql = "SELECT * FROM " . $xoopsDB->prefix('wfdownloads_indexpage') . " ";
-$head_arr = $xoopsDB->fetchArray($xoopsDB->query($sql));
-$catarray['imageheader'] = wfdownloads_headerImage();
-$catarray['indexheaderalign'] = $head_arr['indexheaderalign'];
-$catarray['indexfooteralign'] = $head_arr['indexfooteralign'];
-$html = ($head_arr['nohtml']) ? 1 : 0;
-$smiley = ($head_arr['nosmiley']) ? 1 : 0;
-$xcodes = ($head_arr['noxcodes']) ? 1 : 0;
-$images = ($head_arr['noimages']) ? 1 : 0;
-$breaks = ($head_arr['nobreak']) ? 1 : 0;
-$catarray['indexheader'] = $myts->displayTarea($head_arr['indexheader'], $html, $smiley, $xcodes, $images, $breaks);
-$catarray['indexfooter'] = $myts->displayTarea($head_arr['indexfooter'], $html, $smiley, $xcodes, $images, $breaks);
-$catarray['letters'] = wfdownloads_lettersChoice();
-$catarray['toolbar'] = wfdownloads_toolbar();
-$xoopsTpl->assign('catarray', $catarray);
-
-// Begin Main page download info
-$chcount = 0;
-$countin = 0;
-
-$listings = wfdownloads_getTotalDownloads($allowedDownCategoriesIds);
-
-// Get total amount of categories
-$total_cat = count($allowedDownCategoriesIds);
-// Get all main categories
-$mainCategories = $categoriesTree->getFirstChild(0);
-$count = 0;
-
-// Comparison functions for uasort()
-function categoriesCompareCid($category_a, $category_b)
-{
- if ($category_a->getVar('cid') == $category_b->getVar('cid')) {
- return 0;
- }
- return ($category_a->getVar('cid') < $category_b->getVar('cid')) ? -1 : 1;
-}
-
-function categoriesCompareTitle($category_a, $category_b)
-{
- if ($category_a->getVar('title') == $category_b->getVar('title')) {
- return 0;
- }
- return ($category_a->getVar('title') < $category_b->getVar('title')) ? -1 : 1;
-}
-
-function categoriesCompareWeight($category_a, $category_b)
-{
- if ($category_a->getVar('weight') == $category_b->getVar('weight')) {
- return 0;
- }
- return ($category_a->getVar('weight') < $category_b->getVar('weight')) ? -1 : 1;
-}
-
-// Foreach main category
-foreach (array_keys($mainCategories) as $i) {
- if (in_array($mainCategories[$i]->getVar('cid'), $allowedDownCategoriesIds)) {
- // Get this category image
- // Get this category subcategories
- $allSubcategories = $categoriesTree->getAllChild($mainCategories[$i]->getVar('cid'));
-
- // Sort subcategories by: cid or title or weight
- switch ($wfdownloads->getConfig('subcatssortby')) {
- case 'cid' :
- uasort($allSubcategories, 'categoriesCompareCid');
- break;
- case 'title' :
- uasort($allSubcategories, 'categoriesCompareTitle');
- break;
- case 'weight' :
- default :
- uasort($allSubcategories, 'categoriesCompareWeight');
- break;
- }
-
- // Get this category indicator image
- $publishdate = isset($listings['published'][$mainCategories[$i]->getVar('cid')]) ? $listings['published'][$mainCategories[$i]->getVar('cid')]
- : 0;
- if (count($allSubcategories) > 0) {
- // Foreach subcategory
- foreach (array_keys($allSubcategories) as $k) {
- if (in_array($allSubcategories[$k]->getVar('cid'), $allowedDownCategoriesIds)) {
- $publishdate = (isset($listings['published'][$allSubcategories[$k]->getVar('cid')]) AND
- $listings['published'][$allSubcategories[$k]->getVar('cid')] > $publishdate)
- ? $listings['published'][$allSubcategories[$k]->getVar('cid')] : $publishdate;
- }
- }
- }
- $isNewImage = wfdownloads_isNewImage($publishdate);
- if (($mainCategories[$i]->getVar('imgurl') != "")
- && is_file(
- XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('catimage') . '/' . $mainCategories[$i]->getVar('imgurl')
- )
- ) {
- if ($wfdownloads->getConfig('usethumbs') && function_exists('gd_info')) {
- $imageURL = wfdownloads_createThumb(
- $mainCategories[$i]->getVar('imgurl'),
- $wfdownloads->getConfig('catimage'),
- "thumbs",
- $wfdownloads->getConfig('cat_imgwidth'),
- $wfdownloads->getConfig('cat_imgheight'),
- $wfdownloads->getConfig('imagequality'),
- $wfdownloads->getConfig('updatethumbs'),
- $wfdownloads->getConfig('keepaspect')
- );
- } else {
- $imageURL = XOOPS_URL . '/' . $wfdownloads->getConfig('catimage') . '/' . $mainCategories[$i]->getVar('imgurl');
- }
- } else {
- $imageURL = $isNewImage['image'];
- }
-
- // Get this category subcategories id and title
- $subcategories = array();
- $count++;
- $download_count = isset($listings['count'][$mainCategories[$i]->getVar('cid')]) ? $listings['count'][$mainCategories[$i]->getVar('cid')] : 0;
- // modified July 5 2006 by Freeform Solutions (jwe)
- // make download count recursive, to include all sub categories that the user has permission to view
- //$allSubcategories = $categoriesTree->getAllChild($mainCategories[$i]->getVar('cid'));
- if (count($allSubcategories) > 0) {
- foreach (array_keys($allSubcategories) as $k) {
- if (in_array($allSubcategories[$k]->getVar('cid'), $allowedDownCategoriesIds)) {
- $download_count += isset($listings['count'][$allSubcategories[$k]->getVar('cid')])
- ? $listings['count'][$allSubcategories[$k]->getVar('cid')] : 0;
- if ($wfdownloads->getConfig('subcats') == 1 AND $allSubcategories[$k]->getVar('pid') == $mainCategories[$i]->getVar('cid')) {
- // if we are collecting subcat info for displaying, and this subcat is a first level child...
- $subcategories[] = array(
- 'id' => $allSubcategories[$k]->getVar('cid'), // this definition is not removed for backward compatibility issues
- 'cid' => $allSubcategories[$k]->getVar('cid'),
- 'allowed_download' => in_array($allSubcategories[$k]->getVar('cid'), $allowedDownCategoriesIds),
- 'allowed_upload' => ($isSubmissionAllowed && in_array($allSubcategories[$k]->getVar('cid'), $allowedUpCategoriesIds)),
- 'title' => $allSubcategories[$k]->getVar('title')
- );
- }
- }
- }
- }
-
- if ($wfdownloads->getConfig('subcats') != true) {
- unset($subcategories);
- $xoopsTpl->append(
- 'categories',
- array(
- 'image' => $imageURL, // this definition is not removed for backward compatibility issues
- 'image_URL' => $imageURL,
- 'days' => $isNewImage['days'],
- 'id' => (int)$mainCategories[$i]->getVar('cid'), // this definition is not removed for backward compatibility issues
- 'cid' => (int)$mainCategories[$i]->getVar('cid'),
- 'allowed_download' => in_array($mainCategories[$i]->getVar('cid'), $allowedDownCategoriesIds),
- 'allowed_upload' => ($isSubmissionAllowed && in_array($mainCategories[$i]->getVar('cid'), $allowedUpCategoriesIds)),
- 'title' => $mainCategories[$i]->getVar('title'),
- 'summary' => $mainCategories[$i]->getVar('summary'),
- 'totaldownloads' => (int)$download_count, // this definition is not removed for backward compatibility issues
- 'downloads_count' => (int)$download_count,
- 'count' => (int)$count,
- 'alttext' => $isNewImage['alttext']
- )
- );
- } else {
- $xoopsTpl->append(
- 'categories',
- array(
- 'image' => $imageURL, // this definition is not removed for backward compatibility issues
- 'image_URL' => $imageURL,
- 'days' => $isNewImage['days'],
- 'id' => (int)$mainCategories[$i]->getVar('cid'), // this definition is not removed for backward compatibility issues
- 'cid' => (int)$mainCategories[$i]->getVar('cid'),
- 'allowed_download' => in_array($mainCategories[$i]->getVar('cid'), $allowedDownCategoriesIds),
- 'allowed_upload' => ($isSubmissionAllowed && in_array($mainCategories[$i]->getVar('cid'), $allowedUpCategoriesIds)),
- 'title' => $mainCategories[$i]->getVar('title'),
- 'summary' => $mainCategories[$i]->getVar('summary'),
- 'subcategories' => $subcategories,
- 'totaldownloads' => (int)$download_count, // this definition is not removed for backward compatibility issues
- 'downloads_count' => (int)$download_count,
- 'count' => (int)$count,
- 'alttext' => $isNewImage['alttext']
- )
- );
- }
- }
-}
-$lang_ThereAre = $count != 1 ? _MD_WFDOWNLOADS_THEREARE : _MD_WFDOWNLOADS_THEREIS;
-
-$xoopsTpl->assign('lang_thereare', sprintf($lang_ThereAre, $count, array_sum($listings['count'])));
-
-if ($wfdownloads->getConfig('enablerss') == true) {
- $rsslink_URL = WFDOWNLOADS_URL . "/rss.php";
- $xoopsTpl->assign('full_rssfeed_URL', $rsslink_URL);
- $rsslink = "<a href='" . $rsslink_URL . "' title='" . _MD_WFDOWNLOADS_LEGENDTEXTRSS . "'>";
- $rsslink.= "<img src='" . WFDOWNLOADS_URL . "/images/icon/rss.gif' border='0' alt='" . _MD_WFDOWNLOADS_LEGENDTEXTRSS . "' title='" . _MD_WFDOWNLOADS_LEGENDTEXTRSS . "'>";
- $rsslink.= "</a>";
- $xoopsTpl->assign('full_rssfeed_link', $rsslink); // this definition is not removed for backward compatibility issues
-}
-
-include 'footer.php';
Deleted: XoopsModules/wfdownloads/trunk/wfdownloads/mirror.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/mirror.php 2014-06-13 14:25:54 UTC (rev 12582)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/mirror.php 2014-06-13 17:45:27 UTC (rev 12583)
@@ -1,258 +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.
- */
-/**
- * Wfdownloads module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
- * @package wfdownload
- * @since 3.23
- * @author Xoops Development Team
- * @version svn:$id$
- */
-$currentFile = basename(__FILE__);
-include 'header.php';
-
-$lid = WfdownloadsRequest::getInt('lid', 0);
-$download = $wfdownloads->getHandler('download')->get($lid);
-if (empty($download)) {
- redirect_header('index.php', 3, _CO_WFDOWNLOADS_ERROR_NODOWNLOAD);
-}
-$cid = WfdownloadsRequest::getInt('cid', $download->getVar('cid'));
-$category = $wfdownloads->getHandler('category')->get($cid);
-if (empty($category)) {
- redirect_header('index.php', 3, _CO_WFDOWNLOADS_ERROR_NOCATEGORY);
-}
-
-// Download not published, expired or taken offline - redirect
-if (
- $download->getVar('published') == 0 ||
- $download->getVar('published') > time() ||
- $download->getVar('offline') == true ||
- ($download->getVar('expired') != 0 && $download->getVar('expired') < time()) ||
- $download->getVar('status') == _WFDOWNLOADS_STATUS_WAITING) {
- redirect_header('index.php', 3, _MD_WFDOWNLOADS_NODOWNLOAD);
-}
-
-// Check permissions
-if ($wfdownloads->getConfig('enable_mirrors') == false && !wfdownloads_userIsAdmin()) {
- redirect_header('index.php', 3, _NOPERM);
-}
-$userGroups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0 => XOOPS_GROUP_ANONYMOUS);
-if (!$gperm_handler->checkRight('WFDownCatPerm', $cid, $userGroups, $wfdownloads->getModule()->mid())) {
- redirect_header('index.php', 3, _NOPERM);
-}
-
-// Breadcrumb
-include_once XOOPS_ROOT_PATH . "/class/tree.php";
-$categoriesTree = new XoopsObjectTree($wfdownloads->getHandler('category')->getObjects(), 'cid', 'pid');
-$breadcrumb = new WfdownloadsBreadcrumb();
-$breadcrumb->addLink($wfdownloads->getModule()->getVar('name'), WFDOWNLOADS_URL);
-foreach (array_reverse($categoriesTree->getAllParent($cid)) as $parentCategory) {
- $breadcrumb->addLink($parentCategory->getVar('title'), "viewcat.php?cid=" . $parentCategory->getVar('cid'));
-}
-$breadcrumb->addLink($category->getVar('title'), "viewcat.php?cid={$cid}");
-$breadcrumb->addLink($download->getVar('title'), "singlefile.php?lid={$lid}");
-
-$op = WfdownloadsRequest::getString('op', 'mirror.add');
-switch ($op) {
- case "mirrors.list" :
- case "list" : // this case is not removed for backward compatibility issues
- $start = WfdownloadsRequest::getInt('start', 0);
-
- $xoopsOption['template_main'] = "{$wfdownloads->getModule()->dirname()}_mirrors.html";
- include XOOPS_ROOT_PATH . '/header.php';
-
- $xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js');
- $xoTheme->addScript(WFDOWNLOADS_URL . '/js/jquery.ThickBox/thickbox-compressed.js');
- $xoTheme->addStylesheet(WFDOWNLOADS_URL . '/js/jquery.ThickBox/thickbox.css');
- $xoTheme->addStylesheet(WFDOWNLOADS_URL . '/module.css');
-
- $xoopsTpl->assign('wfdownloads_url', WFDOWNLOADS_URL . '/');
-
- // Generate content header
- $sql = "SELECT * FROM " . $xoopsDB->prefix('wfdownloads_indexpage') . " ";
- $head_arr = $xoopsDB->fetchArray($xoopsDB->query($sql));
- $catarray['imageheader'] = wfdownloads_headerImage();
- $xoopsTpl->assign('catarray', $catarray);
- $xoopsTpl->assign('category_path', $wfdownloads->getHandler('category')->getNicePath($cid));
- $xoopsTpl->assign('category_id', $cid);
-
- // Breadcrumb
- $breadcrumb->addLink(_CO_WFDOWNLOADS_MIRRORS_LIST, '');
- $xoopsTpl->assign('wfdownloads_breadcrumb', $breadcrumb->render());
-
- // Count mirrors
- $criteria = new CriteriaCompo(new Criteria("lid", $lid));
- $criteria->add(new Criteria("submit", 1)); // true
- $mirrorsCount = $wfdownloads->getHandler('mirror')->getCount($criteria);
-
- // Get mirrors
- $criteria->setSort('date');
- $criteria->setLimit(5);
- $criteria->setStart($start);
- $mirrors = $wfdownloads->getHandler('mirror')->getObjects($criteria);
-
- $download_array = $download->toArray();
- $xoopsTpl->assign('down_arr', $download_array);
-
- $add_mirror = false;
- if (!is_object($xoopsUser)
- && ($wfdownloads->getConfig('anonpost') == _WFDOWNLOADS_ANONPOST_MIRROR
- || $wfdownloads->getConfig('anonpost') == _WFDOWNLOADS_ANONPOST_BOTH)
- && ($wfdownloads->getConfig('submissions') == _WFDOWNLOADS_SUBMISSIONS_MIRROR
- || $wfdownloads->getConfig('submissions') == _WFDOWNLOADS_SUBMISSIONS_BOTH)
- ) {
- $add_mirror = true;
- } elseif (is_object($xoopsUser)
- && ($wfdownloads->getConfig('submissions') == _WFDOWNLOADS_SUBMISSIONS_MIRROR
- || $wfdownloads->getConfig('submissions') == _WFDOWNLOADS_SUBMISSIONS_BOTH
- || $xoopsUser->isAdmin())
- ) {
- $add_mirror = true;
- }
-
- foreach ($mirrors as $mirror) {
- $mirror_array = $mirror->toArray();
- if ($wfdownloads->getConfig('enable_onlinechk') == 1) {
- $serverURL = str_replace('http://', '', trim($mirror_array['homeurl']));
- $mirror_array['isonline'] = wfdownloads_mirrorOnline($serverURL);
- } else {
- $mirror_array['isonline'] = 2;
- }
- $mirror_array['add_mirror'] = $add_mirror;
- $mirror_array['date'] = formatTimestamp($mirror_array['date'], $wfdownloads->getConfig('dateformat'));
- $mirror_array['submitter'] = XoopsUserUtility::getUnameFromId($mirror_array['uid']);
- $xoopsTpl->append('down_mirror', $mirror_array);
- }
- $xoopsTpl->assign('lang_mirror_found', sprintf(_MD_WFDOWNLOADS_MIRROR_TOTAL, $mirrorsCount));
-
- include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
- $pagenav = new XoopsPageNav($mirrorsCount, 5, $start, 'start', "op=mirrors.list&cid={$cid}&lid={$lid}", 1);
- $navbar['navbar'] = $pagenav->renderNav();
- $xoopsTpl->assign('navbar', $navbar);
-
- $xoopsTpl->assign('categoryPath', $pathstring . " > " . $download_array['title']);
- $xoopsTpl->assign('module_home', wfdownloads_module_home(true));
-
- include 'footer.php';
- break;
-
- case "mirror.add" :
- default :
- // Check if ANONYMOUS user can post mirrors
- if (!is_object($xoopsUser)
- && ($wfdownloads->getConfig('anonpost') == _WFDOWNLOADS_ANONPOST_NONE
- || $wfdownloads->getConfig('anonpost') == _WFDOWNLOADS_ANONPOST_DOWNLOAD)
- ) {
- redirect_header(XOOPS_URL . '/user.php', 1, _MD_WFDOWNLOADS_MUSTREGFIRST);
- exit();
- }
- // Check if user can submit mirrors
- if (is_object($xoopsUser)
- && ($wfdownloads->getConfig('submissions') == _WFDOWNLOADS_SUBMISSIONS_NONE
- || $wfdownloads->getConfig('submissions') == _WFDOWNLOADS_SUBMISSIONS_DOWNLOAD)
- && !$xoopsUser->isAdmin()
- ) {
- redirect_header('index.php', 1, _MD_WFDOWNLOADS_MIRROR_NOTALLOWESTOSUBMIT);
- exit();
- }
-
- // Get mirror poster 'uid'
- $mirroruserUid = is_object($xoopsUser) ? (int)$xoopsUser->getVar('uid') : 0;
-
- if (!empty($_POST['submit'])) {
- $mirror = $wfdownloads->getHandler('mirror')->create();
- $mirror->setVar('title', trim($_POST['title']));
- $mirror->setVar('homeurl', formatURL(trim($_POST['homeurl'])));
- $mirror->setVar('location', trim($_POST['location']));
- $mirror->setVar('continent', trim($_POST['continent']));
- $mirror->setVar('downurl', trim($_POST['downurl']));
- $mirror->setVar('lid', (int)$_POST['lid']);
- $mirror->setVar('uid', $mirroruserUid);
- $mirror->setVar('date', time());
- if (($wfdownloads->getConfig('autoapprove') == _WFDOWNLOADS_AUTOAPPROVE_NONE
- || $wfdownloads->getConfig('autoapprove') == _WFDOWNLOADS_AUTOAPPROVE_DOWNLOAD)
- && !$wfdownloads_isAdmin
- ) {
- $approve = false;
- } else {
- $approve = true;
- }
- $submit = ($approve) ? true : false;
- $mirror->setVar('submit', $submit);
-
- if (!$wfdownloads->getHandler('mirror')->insert($mirror)) {
- redirect_header('index.php', 3, _MD_WFDOWNLOADS_ERROR_CREATEMIRROR);
- } else {
- $database_mess = ($approve) ? _MD_WFDOWNLOADS_ISAPPROVED : _MD_WFDOWNLOADS_ISNOTAPPROVED;
- redirect_header('index.php', 2, $database_mess);
- }
- } else {
- include XOOPS_ROOT_PATH . '/header.php';
-
- $xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js');
- $xoTheme->addScript(WFDOWNLOADS_URL . '/js/jquery.ThickBox/thickbox-compressed.js');
- $xoTheme->addStylesheet(WFDOWNLOADS_URL . '/js/jquery.ThickBox/thickbox.css');
- $xoTheme->addStylesheet(WFDOWNLOADS_URL . '/module.css');
-
- $xoopsTpl->assign('wfdownloads_url', WFDOWNLOADS_URL . '/');
-
- // Breadcrumb
- $breadcrumb->addLink(_MD_WFDOWNLOADS_ADDMIRROR, '');
- echo $breadcrumb->render();
-
- echo "<div align='center'>" . wfdownloads_headerImage() . "</div><br />\n";
- echo "<div>" . _MD_WFDOWNLOADS_MIRROR_SNEWMNAMEDESC . "</div>\n";
-
- // Generate form
- include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
- $sform = new XoopsThemeForm(_MD_WFDOWNLOADS_MIRROR_SUBMITMIRROR, 'mirrorform', xoops_getenv('PHP_SELF'));
- $title_text = new XoopsFormText(_MD_WFDOWNLOADS_MIRROR_HOMEURLTITLE, 'title', 50, 255);
- $title_text->setDescription(_MD_WFDOWNLOADS_MIRROR_HOMEURLTITLE_DESC);
- $sform->addElement($title_text, true);
- $homeurl_text = new XoopsFormText(_MD_WFDOWNLOADS_MIRROR_HOMEURL, 'homeurl', 50, 255);
- $homeurl_text->setDescription(_MD_WFDOWNLOADS_MIRROR_HOMEURL_DESC);
- $sform->addElement($homeurl_text, true);
- $location_text = new XoopsFormText(_MD_WFDOWNLOADS_MIRROR_LOCATION, 'location', 50, 255);
- $location_text->setDescription(_MD_WFDOWNLOADS_MIRROR_LOCATION_DESC);
- $sform->addElement($location_text, true);
- $continent_select = new XoopsFormSelect(_MD_WFDOWNLOADS_MIRROR_CONTINENT, 'continent');
- $continent_select->addOptionArray(
- array(
- _MD_WFDOWNLOADS_CONT1 => _MD_WFDOWNLOADS_CONT1,
- _MD_WFDOWNLOADS_CONT2 => _MD_WFDOWNLOADS_CONT2,
- _MD_WFDOWNLOADS_CONT3 => _MD_WFDOWNLOADS_CONT3,
- _MD_WFDOWNLOADS_CONT4 => _MD_WFDOWNLOADS_CONT4,
- _MD_WFDOWNLOADS_CONT5 => _MD_WFDOWNLOADS_CONT5,
- _MD_WFDOWNLOADS_CONT6 => _MD_WFDOWNLOADS_CONT6,
- _MD_WFDOWNLOADS_CONT7 => _MD_WFDOWNLOADS_CONT7
- )
- );
- $sform->addElement($continent_select);
- $downurl_text = new XoopsFormText(_MD_WFDOWNLOADS_MIRROR_DOWNURL, 'downurl', 50, 255);
- $downurl_text->setDescription(_MD_WFDOWNLOADS_MIRROR_DOWNURL_DESC);
- $sform->addElement($downurl_text, true);
- $sform->addElement(new XoopsFormHidden('lid', $lid));
- $sform->addElement(new XoopsFormHidden('cid', $cid));
- $sform->addElement(new XoopsFormHidden('uid', $mirroruserUid));
- $button_tray = new XoopsFormElementTray('', '');
- $submit_button = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
- $button_tray->addElement($submit_button);
- $cancel_button = new XoopsFormButton('', '', _CANCEL, 'button');
- $cancel_button->setExtra('onclick="history.go(-1)"');
- $button_tray->addElement($cancel_button);
- $sform->addElement($button_tray);
- $sform->display();
- include 'footer.php';
- }
- break;
-}
Deleted: XoopsModules/wfdownloads/trunk/wfdownloads/module.css
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/module.css 2014-06-13 14:25:54 UTC (rev 12582)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/module.css 2014-06-13 17:45:27 UTC (rev 12583)
@@ -1,553 +0,0 @@
-/*
- 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.
- */
-/**
- * Wfdownloads 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 wfdownload
- * @since 3.23
- * @author WF-Sections, Xoops Development Team, luciorota
- * @version svn:$Id$
- */
-.wfdownloads_headertable {
- padding: 0;
- border-bottom: 1px solid;
- margin: 0 0 10px;
-}
-
-.wfdownloads_modulename {
- font-size: 10px;
- text-align: left;
- font-weight: bold;
- padding-right: 0.3em;
- line-height: 18px;
-}
-
-.wfdownloads_breadcrumb {
- font-size: 10px;
- line-height: 18px;
-}
-
-.wfdownloads_infotitle {
- margin-top: 8px;
- margin-bottom: 8px;
- font-size: 250%;
- line-height: 250%;
- font-weight: bold;
- display: block;
-}
-
-.wfdownloads_infotext {
- margin-bottom: 8px;
- line-height: 130%;
- display: block;
-}
-
-.wfdownloads_adminlinks {
- padding-top: 15px;
- padding-bottom: 5px;
- font-size: 10px;
- text-align: center;
- line-height: 18px;
-}
-
-.wfdownloads_indexfooter {
- font-size: 10px;
- font-weight: bold;
- text-align: center;
- padding: 10px;
-}
-
-.wfdownloads_itemfooter {
- font-size: 10px;
- font-weight: bold;
- text-align: center;
- padding: 10px;
-}
-
-ul {
- padding: 2px;
- list-style: disc;
- text-align: left;
-}
-
-li {
- margin-left: 5px;
- color: #2F5376;
-}
-
-h4 {
- font-size: 14px;
- text-decoration: underline;
-}
-
-.wfdownloads_container {
- height: 100%;
- display: table;
- width: 100%;
- margin: 0 auto;
- border: none;
-}
-
-.wfdownloads_static {
- position: static;
- clear: both;
-}
-
-/* ---------- global ---------- */
-.wfdownloads_pagenav {
- text-align: right;
-}
-
-.wfdownloads_copyright {
- text-align: center;
-}
-
-/* ---------- header.html ---------- */
-.wfdownloads_head_catimgheader {
- text-align: center;
-}
-
-.wfdownloads_head_downimgheader {
- text-align: center;
-}
-
-.wfdownloads_head_imgheader {
- text-align: center;
-}
-
-.wfdownloads_head_catindexheader {
- /* text-align: center; do not uncomment (will stop index alignment option working) */
-}
-
-.wfdownloads_head_catletters {
- text-align: center;
- font-size: 80%;
-}
-
-.wfdownloads_head_cattoolbar {
- text-align: center;
-}
-
-/* ---------- footer.html ---------- */
-.wfdownloads_foot_commentnav {
- text-align: center;
- padding: 3px;
- margin: 3px;
-}
-
-.wfdownloads_foot_comments {
- padding: 3px;
- margin: 3px;
-}
-
-/* ---------- newlist.html ---------- */
-.wfdownloads_newlist_top {
- text-align: center;
- width: 100%;
-}
-
-.wfdownloads_newlist_top fieldset {
- text-align: center;
- border: 1px solid silver;
- width: 450px;
-}
-
-.wfdownloads_newlist_totallast {
- text-align: center;
- width: 100%;
- font-weight: bold;
- font-size: large;
-}
-
-/* ---------- disclaimer.html ---------- */
-.wfdownloads_disc_imghead {
- text-align: center;
-}
-
-.wfdownloads_disc_disclaimer {
- text-align: center;
-}
-
-.wfdownloads_disc_discform {
- text-align: center;
-}
-
-/* ---------- ratefile.html ---------- */
-.wfdownloads_rate_imghead {
- text-align: center;
-}
-
-/* ---------- viewcat.html ---------- */
-.wfdownloads_view_top {
-}
-
-.wfdownloads_view_subs {
- border: 0;
- padding: 0;
- margin: 0;
-}
-
-.wfdownloads_view_subs h3 {
- text-align: center;
- width: 100%;
- background-color: #BEC8D1;
-}
-
-.wfdownloads_view_subs fieldset {
-}
-
-.wfdownloads_view_subslist {
- text-align: left;
- vertical-align: middle;
- width: 90%;
-}
-
-.wfdownloads_view_catpath {
- text-align: left;
- margin-left: 5px;
- padding: 0;
- font-weight: bold;
-}
-
-.wfdownloads_view_sortlist {
- text-align: center;
- font-size: small;
-}
-
-/* ---------- download.html ---------- */
-.wfdownloads_down_title {
- padding-top: 2.0em
-}
-
-.wfdownloads_down_top_r {
- float: right;
- margin-right: 10px;
- position: relative;
-}
-
-.wfdownloads_down_top_l {
- float: left;
-}
-
-.wfdownloads_down_main_l {
- width: 74%;
- float: left;
- height: 100%;
- position: relative;
- display: table;
-}
-
-.wfdownloads_down_main_l p {
- padding-top: 10px;
- margin: 0;
-}
-
-.wfdownloads_down_viewdetails {
- text-align: right;
-}
-
-.wfdownloads_down_main_r {
- width: 25%;
- height: 100%;
- float: right;
- position: relative;
- display: table;
-}
-
-.wfdownloads_down_main_r p {
- padding-top: 10px;
- margin: 0;
-}
-
-.wfdownloads_down_info_top {
- margin-left: 10px;
- margin-right: 10px;
- padding: 4px;
- background-color: silver;
- border-color: #999999;
- font-size: .8em;
-}
-
-.wfdownloads_down_info_bottom {
- margin-left: 10px;
- margin-right: 10px;
- padding: 4px;
- font-size: .8em;
-}
-
-.wfdownloads_down_main_b {
- text-align: center;
-}
-
-.wfdownloads_down_main_bottom {
- width: 100%;
- position: relative;
- text-align: center;
-}
-
-.wfdownloads_down_main_bottom2 {
- text-align: center;
- background-color: silver;
- width: 100%;
- position: relative;
- line-height: 150%;
-}
-
-.wfdownloads_down_custom {
- width: 100%;
- position: relative;
- text-align: center;
-}
-
-/* ---------- singlefile.html ---------- */
-.wfdownloads_single_title {
- padding-top: 2.0em
-}
-
-.wfdownloads_single_title a {
- color: #32529C;
- background-color: inherit;
- font-weight: bold;
- text-decoration: none;
-}
-
-.wfdownloads_single_title a:hover {
- color: #666;
- background-color: inherit;
- text-decoration: none;
-}
-
-.wfdownloads_single_top_r {
- float: right;
- margin-right: 10px;
- position: relative;
-}
-
-.wfdownloads_single_top_l {
- float: left;
-}
-
-.wfdownloads_single_main_l {
- width: 74%;
- height: 100%;
- float: left;
- position: relative;
- display: table;
-}
-
-.wfdownloads_single_main_l p {
- padding-top: 10px;
- margin: 0;
-}
-
-.wfdownloads_single_main_r {
- width: 25%;
- float: right;
- display: table-column;
-}
-
-.wfdownloads_single_info_top {
- margin-left: 10px;
- margin-right: 10px;
- padding: 4px;
- background-color: silver;
- border-color: #999999;
- color: #333;
- font-size: .8em;
-}
-
-.wfdownloads_single_info_dtimes {
- margin-left: 4px;
-}
-
-.wfdownloads_single_main_custom {
- width: 100%;
- position: relative;
- text-align: center;
-}
-
-.wfdownloads_single_main_bottom {
- text-align: center;
- background-color: silver;
- width: 100%;
- position: relative;
- float: bottom;
-}
-
-.wfdownloads_single_userrev {
- padding: 3px;
- margin: 3px;
-}
-
-.wfdownloads_single_usermir {
- padding: 3px;
- margin: 3px;
-}
-
-/* ---------- mirrors.html ---------- */
-.wfdownloads_mirrors_head, .wfdownloads_mirrors_head2, .wfdownloads_mirrors_head3 {
- border-bottom: 2px solid #000000;
- border-left: 1px solid #000000;
- background-color: #BEC8D1;
- text-align: left;
- font-family: Verdana, sans-serif;
- font-weight: bold;
- font-size: 14px;
- color: #404040;
-}
-
-.wfdownloads_mirrors_head4 {
- border-bottom: 2px solid #000000;
- border-left: 1px solid #000000;
- background-color: #BEC8D1;
- text-align: center;
- font-weight: bold;
- font-size: 14px;
- color: #404040;
- width: 50px;
-}
-
-.wfdownloads_mirrors_head5 {
- border-bottom: 2px solid #000000;
- border-left: 0 solid #000000;
- background-color: #BEC8D1;
- text-align: center;
- font-weight: bold;
- font-size: 14px;
- color: #404040;
- width: 30px;
-}
-
-tr.wfdownloads_mirrors_elist {
- line-height: 25px;
-}
-
-.wfdownloads_mirrors_list, .wfdownloads_mirrors_list2, .wfdownloads_mirrors_list3 {
- text-align: left;
- border-right: 1px solid #000000;
-}
-
-.wfdownloads_mirrors_list4, .wfdownloads_mirrors_list5 {
- text-align: center;
- vertical-align: middle;
-}
-
-.wfdownloads_mirrors_found {
-}
-
-table.wfdownloads_mirrors {
- width: 95%;
- padding: 10px 10px 10px 10px;
- border: 1px #000000 solid;
- border-collapse: collapse;
- border-spacing: 0;
-}
-
-tr.wfdownloads_mirrors_end {
- background-color: #BEC8D1;
-}
-
-.wfdownloads_mirrors_foot, .wfdownloads_mirrors_foot a {
- border-top: 2px solid #000000;
- font-weight: bold;
-}
-
-.wfdownloads_mirrors_bottom {
- font-weight: bold;
-}
-
-/* ---------- reviews.html ---------- */
-.wfdownloads_reviews_title {
-}
-
-.wfdownloads_reviews_desc {
-}
-
-.wfdownloads_reviews_catpath {
-}
-
-.wfdownloads_reviews_found {
- width: 90%;
- text-align: center;
-}
-
-.wfdownloads_reviews_revfound {
- text-align: left;
-}
-
-.wfdownloads_reviews_addrev {
- text-align: right;
-}
-
-.wfdownloads_reviews_reviewlist {
- padding: 10px 10px 10px 10px;
- border: 1px #000000 solid;
- border-collapse: collapse;
- width: 95%;
-}
-
-.wfdownloads_reviews_reviewer {
- text-align: left;
- width: 80%;
- background-color: #BEC8D1;
- /* border-right: 1px solid #000000; */
- border-bottom: 2px solid #000000;
-}
-
-.wfdownloads_reviews_reviewdate {
- text-align: right;
- width: 15%;
- background-color: #BEC8D1;
- border-bottom: 2px solid #000000;
-}
-
-.wfdownloads_reviews_revlistleft {
- text-align: left;
- border-right: 1px solid #000000;
- width: 120px;
-}
-
-.wfdownloads_reviews_revlistright {
- text-align: left;
-}
-
-.wfdownloads_reviews_revlistreview {
- position: absolute;
- top: 0;
- left: 125px;
- width: 90%;
-}
-
-.wfdownloads_reviews_revlisttitle {
- margin-left: 10px;
- margin-right: 10px;
- padding: 4px;
- font-weight: bold;
- color: #0000CC;
-}
-
-.wfdownloads_reviews_revlistrev {
-}
-
-.wfdownloads_reviews_foot {
- background-color: #BEC...
[truncated message content] |
|
From: <txm...@us...> - 2014-06-13 14:25:56
|
Revision: 12582
http://sourceforge.net/p/xoops/svn/12582
Author: txmodxoops
Date: 2014-06-13 14:25:54 +0000 (Fri, 13 Jun 2014)
Log Message:
-----------
- Updated
- Min Version of Xoops: 2.5.7 -> for xoopsrequest.php class
- Fixed many bugs
- Work in progress
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/common.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/common.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/fields.tpl
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/xoops_version.php
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/classes/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/classes/classes.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/classes/formelements.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/classes/helper.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/classes/index.html
Removed Paths:
-------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-06-13 14:03:12 UTC (rev 12581)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-06-13 14:25:54 UTC (rev 12582)
@@ -20,7 +20,7 @@
*/
include 'header.php';
// Recovered value of arguments op in the URL $
-$op = TDMCreateRequest::getString('op', 'list');
+$op = XoopsRequest::getString('op', 'list');
// Get fields Variables
/*$field_id = TDMCreate_CleanVars($_REQUEST, 'field_id');*/
$table_name = TDMCreate_CleanVars($_REQUEST, 'table_name', '', 'string');
@@ -28,19 +28,29 @@
$field_tid = TDMCreate_CleanVars($_REQUEST, 'field_tid');
$field_numb = TDMCreate_CleanVars($_REQUEST, 'field_numb');
$field_name = TDMCreate_CleanVars($_REQUEST, 'field_name', '', 'string');/**/
-$field_id = TDMCreateRequest::getInt('field_id');
-/*$field_mid = TDMCreateRequest::getInt('field_mid');
-$field_tid = TDMCreateRequest::getInt('field_tid');
-$field_numb = TDMCreateRequest::getInt('field_numb');
-$field_name = TDMCreateRequest::getString('field_name', '');*/
+/*$field_mid = XoopsRequest::getInt('field_mid');
+$field_tid = XoopsRequest::getInt('field_tid');
+$field_numb = XoopsRequest::getInt('field_numb');
+$field_name = XoopsRequest::getString('field_name', '');*/
+/*$session_field = TDMCreateSession::getInstance();
+$table_name = $session_field->getSession('table_name');
+$field_tid = $session_field->getSession('table_id');
+$field_mid = $session_field->getSession('table_mid');
+$field_name = $session_field->getSession('table_fieldname');
+$field_numb = $session_field->getSession('table_nbfields');
+$field_tid = $_SESSION['table_id'];
+$field_mid = $_SESSION['table_mid'];
+$table_name = $_SESSION['table_name'];
+$field_name = $_SESSION['table_fieldname'];
+$field_numb = $_SESSION['table_nbfields'];*/
//
switch ($op)
{
case 'list':
default:
- $start = TDMCreateRequest::getInt('start', 0);
- $limit = TDMCreateRequest::getInt('limit', $tdmcreate->getConfig('tables_adminpager'));
- //$limit = TDMCreateRequest::getInt('limit', $tdmcreate->getConfig('fields_adminpager'));
+ $start = XoopsRequest::getInt('start', 0);
+ $limit = XoopsRequest::getInt('limit', $tdmcreate->getConfig('tables_adminpager'));
+ //$limit = XoopsRequest::getInt('limit', $tdmcreate->getConfig('fields_adminpager'));
// Define main template
$template_main = 'fields.tpl';
$GLOBALS['xoTheme']->addStylesheet( 'modules/TDMCreate/assets/css/admin/style.css' );
@@ -152,6 +162,11 @@
$fieldsObj =& $tdmcreate->getHandler('fields')->create();
$form = $fieldsObj->getForm($field_mid, $field_tid, $field_numb, $field_name);
$GLOBALS['xoopsTpl']->assign('form', $form->render());
+
+ var_dump($field_mid);
+ var_dump($field_tid);
+ var_dump($field_numb);
+ var_dump($field_name);
break;
case 'save':
@@ -159,109 +174,66 @@
if ( !$GLOBALS['xoopsSecurity']->check() ) {
redirect_header('fields.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
- $fieldelement_fid = TDMCreateRequest::getInt('fieldelement_fid');
+ $fieldelement_fid = XoopsRequest::getInt('fieldelement_fid');
+ // Fields Handler
+ $fields = $tdmcreate->getHandler('fields');
+ // Fields Elements Handler
+ $fieldelements = $tdmcreate->getHandler('fieldelements');
+ // Set Variables
+ foreach ($_POST['field_id'] as $key => $value)
+ {
+ switch($value){
+ case 'new':
+ $fieldsObj =& $fields->create();
+ $fieldelementObj =& $fieldelements->create();
+ break;
+ case 'edit':
+ $fieldsObj =& $fields->get($value);
+ $fieldelementObj =& $fieldelements->get($fieldelement_fid);
+ break;
+ }
+ // Set Data
+ $fieldsObj->setVar( 'field_mid', $field_mid );
+ $fieldsObj->setVar( 'field_tid', $field_tid );
+ $fieldsObj->setVar( 'field_numb', $field_numb );
+ $fieldsObj->setVar( 'field_name', (isset($_POST['field_name'][$key]) ? $_POST['field_name'][$key] : '') );
+ $fieldsObj->setVar( 'field_type', (isset($_POST['field_type'][$key]) ? $_POST['field_type'][$key] : '') );
+ $fieldsObj->setVar( 'field_value', (isset($_POST['field_value'][$key]) ? $_POST['field_value'][$key] : '') );
+ $fieldsObj->setVar( 'field_attribute', (isset($_POST['field_attribute'][$key]) ? $_POST['field_attribute'][$key] : '') );
+ $fieldsObj->setVar( 'field_null', (isset($_POST['field_null'][$key]) ? $_POST['field_null'][$key] : '') );
+ $fieldsObj->setVar( 'field_default', (isset($_POST['field_default'][$key]) ? $_POST['field_default'][$key] : '') );
+ $fieldsObj->setVar( 'field_key', (isset($_POST['field_key'][$key]) ? $_POST['field_key'][$key] : '') );
+ $fieldsObj->setVar( 'field_element', (isset($_POST['field_element'][$key]) ? $_POST['field_element'][$key] : '') );
+ $fieldsObj->setVar( 'field_parent', (($key == isset($_REQUEST['field_parent'])) ? 1 : 0) );
+ $fieldsObj->setVar( 'field_inlist', ((isset($_REQUEST['field_inlist'][$key]) == 1) ? 0 : 1) );
+ $fieldsObj->setVar( 'field_inform', ((isset($_REQUEST['field_inform'][$key]) == 1) ? 0 : 1) );
+ $fieldsObj->setVar( 'field_admin', ((isset($_REQUEST['field_admin'][$key]) == 1) ? 0 : 1) );
+ $fieldsObj->setVar( 'field_user', ((isset($_REQUEST['field_user'][$key]) == 1) ? 0 : 1) );
+ $fieldsObj->setVar( 'field_block', ((isset($_REQUEST['field_block'][$key]) == 1) ? 0 : 1) );
+ $fieldsObj->setVar( 'field_main', (($key == isset($_REQUEST['field_main'])) ? 1 : 0) );
+ $fieldsObj->setVar( 'field_search', ((isset($_REQUEST['field_search'][$key]) == 1) ? 0 : 1) );
+ $fieldsObj->setVar( 'field_required', ((isset($_REQUEST['field_required'][$key]) == 1) ? 0 : 1) );
+ // Insert Data
+ $tdmcreate->getHandler('fields')->insert($fieldsObj);
+ }
+ $fieldelementObj->setVar( 'fieldelement_mid', $field_mid );
+ $fieldelementObj->setVar( 'fieldelement_tid', $field_tid );
+ $fieldelementObj->setVar( 'fieldelement_name', 'Table : '.ucfirst($table_name) );
+ $fieldelementObj->setVar( 'fieldelement_value', 'XoopsFormTables-'.ucfirst($table_name) );
+ // Insert new field element id for table name
+ if (!$tdmcreate->getHandler('fieldelements')->insert($fieldelementObj) ) {
+ $GLOBALS['xoopsTpl']->assign('error', $fieldelementObj->getHtmlErrors() . ' Field element');
+ }
//
- if (isset($field_id)) {
- $fieldsObj =& $tdmcreate->getHandler('fields')->get($field_tid);
- if (isset($fieldelement_fid)) {
- $fieldelementObj =& $tdmcreate->getHandler('fieldelements')->get($fieldelement_fid);
- }
+ if ($fieldsObj->isNew()) {
+ redirect_header('fields.php', 2, sprintf(_AM_TDMCREATE_FIELD_FORM_SAVED_OK, $_REQUEST['table_name']));
} else {
- $fieldsObj =& $tdmcreate->getHandler('fields')->create();
- $fieldelementObj =& $tdmcreate->getHandler('fieldelements')->create();
+ redirect_header('fields.php', 2, sprintf(_AM_TDMCREATE_FIELD_FORM_UPDATED_OK, $_REQUEST['table_name']));
}
- //
- if ($fieldsObj->isNew()) {
- for( $i = 1; $i <= $field_numb; $i++ ) {
- //
- $fieldsObj->setVar( 'field_mid', $field_mid );
- $fieldsObj->setVar( 'field_tid', $field_tid );
- $fieldsObj->setVar( 'field_numb', $field_numb );
- $fieldsObj->setVar( 'field_name', (isset($_POST['field_name'][$i]) ? $_POST['field_name'][$i] : '') );
- $fieldsObj->setVar( 'field_type', (isset($_POST['field_type'][$i]) ? $_POST['field_type'][$i] : '') );
- $fieldsObj->setVar( 'field_value', (isset($_POST['field_value'][$i]) ? $_POST['field_value'][$i] : '') );
- $fieldsObj->setVar( 'field_attribute', (isset($_POST['field_attribute'][$i]) ? $_POST['field_attribute'][$i] : '') );
- $fieldsObj->setVar( 'field_null', (isset($_POST['field_null'][$i]) ? $_POST['field_null'][$i] : '') );
- $fieldsObj->setVar( 'field_default', (isset($_POST['field_default'][$i]) ? $_POST['field_default'][$i] : '') );
- $fieldsObj->setVar( 'field_key', (isset($_POST['field_key'][$i]) ? $_POST['field_key'][$i] : '') );
- $fieldsObj->setVar( 'field_element', (isset($_POST['field_element'][$i]) ? $_POST['field_element'][$i] : '') );
- $fieldsObj->setVar( 'field_parent', (($i == isset($_REQUEST['field_parent'])) ? '1' : '0') );
- $fieldsObj->setVar( 'field_inlist', ((isset($_REQUEST['field_inlist'][$i]) == 1) ? '1' : '0') );
- $fieldsObj->setVar( 'field_inform', ((isset($_REQUEST['field_inform'][$i]) == 1) ? '1' : '0') );
- $fieldsObj->setVar( 'field_admin', ((isset($_REQUEST['field_admin'][$i]) == 1) ? '1' : '0') );
- $fieldsObj->setVar( 'field_user', ((isset($_REQUEST['field_user'][$i]) == 1) ? '1' : '0') );
- $fieldsObj->setVar( 'field_block', ((isset($_REQUEST['field_block'][$i]) == 1) ? '1' : '0') );
- $fieldsObj->setVar( 'field_main', (($i == isset($_REQUEST['field_main'])) ? '1' : '0') );
- $fieldsObj->setVar( 'field_search', ((isset($_REQUEST['field_search'][$i]) == 1) ? '1' : '0') );
- $fieldsObj->setVar( 'field_required', ((isset($_REQUEST['field_required'][$i]) == 1) ? '1' : '0') );
- // Insert Data
- $tdmcreate->getHandler('fields')->insert($fieldsObj);
- }
- redirect_header('fields.php', 2, sprintf(_AM_TDMCREATE_FIELD_FORM_SAVED_OK, $table_name));
- $GLOBALS['xoopsTpl']->assign('error', $fieldsObj->getHtmlErrors());
- $form = $fieldsObj->getForm($field_mid, $field_tid, $field_numb);
- $GLOBALS['xoopsTpl']->assign('form', $form->render());
-
- $fieldelementObj->setVar( 'fieldelement_mid', $field_mid );
- $fieldelementObj->setVar( 'fieldelement_tid', $field_tid );
- $fieldelementObj->setVar( 'fieldelement_name', 'Table : '.ucfirst($table_name) );
- $fieldelementObj->setVar( 'fieldelement_value', 'XoopsFormTables-'.ucfirst($table_name) );
- // Insert new field element id for table name
- if (!$tdmcreate->getHandler('fieldelements')->insert($fieldelementObj) ) {
- $GLOBALS['xoopsTpl']->assign('error', $fieldelementObj->getHtmlErrors() . ' Field element');
- }
- } else {
- foreach($field_id as $id => $value)
- {
- switch($value){
- case 'new':
- $fieldsObj = $tdmcreate->getHandler('fields')->create();
- $fieldelementObj =& $tdmcreate->getHandler('fieldelements')->create();
- $isNew = true;
- break;
- default:
- $fieldsObj = $tdmcreate->getHandler('fields')->get($value);
- $fieldelementObj =& $tdmcreate->getHandler('fieldelements')->get($fieldelement_fid);
- break;
- }
- // Set Data
- $fieldsObj->setVar( 'field_mid', $field_mid[$id]);
- $fieldsObj->setVar( 'field_tid', $field_tid[$id]);
- $fieldsObj->setVar( 'field_numb', $field_numb[$id]);
- $fieldsObj->setVar( 'field_name', $field_name[$id]);
- $fieldsObj->setVar( 'field_type', $field_type[$id]);
- $fieldsObj->setVar( 'field_value', $field_value[$id]);
- $fieldsObj->setVar( 'field_attribute', $field_attribute[$id]);
- $fieldsObj->setVar( 'field_null', $field_null[$id]);
- $fieldsObj->setVar( 'field_default', $field_default[$id]);
- $fieldsObj->setVar( 'field_key', $field_key[$id]);
- $fieldsObj->setVar( 'field_element', $field_element[$id]);
- $fieldsObj->setVar( 'field_parent', $id == $field_parent[$id]);
- $fieldsObj->setVar( 'field_inlist', $field_inlist[$id]);
- $fieldsObj->setVar( 'field_inform', $field_inform[$id]);
- $fieldsObj->setVar( 'field_admin', $field_admin[$id]);
- $fieldsObj->setVar( 'field_user', $field_user[$id]);
- $fieldsObj->setVar( 'field_block', $field_block[$id]);
- $fieldsObj->setVar( 'field_main', $id == $field_main[$id]);
- $fieldsObj->setVar( 'field_search', $field_search[$id]);
- $fieldsObj->setVar( 'field_required', $field_required[$id]);
- // Insert Data
- $tdmcreate->getHandler('fields')->insert($fieldsObj);
- }
- redirect_header('fields.php', 2, sprintf(_AM_TDMCREATE_FIELD_FORM_UPDATED_OK, $table_name));
- $GLOBALS['xoopsTpl']->assign('error', $fieldsObj->getHtmlErrors());
- $form = $fieldsObj->getForm($field_mid, $field_tid, $field_numb);
- $GLOBALS['xoopsTpl']->assign('form', $form->render());
-
- $fieldelementObj->setVar( 'fieldelement_mid', $field_mid );
- $fieldelementObj->setVar( 'fieldelement_tid', $field_tid );
- $fieldelementObj->setVar( 'fieldelement_name', $_REQUEST['fieldelement_name'] );
- $fieldelementObj->setVar( 'fieldelement_value', $_REQUEST['fieldelement_value'] );
- // Insert new field element id for table name
- if (!$tdmcreate->getHandler('fieldelements')->insert($fieldelementObj) ) {
- $GLOBALS['xoopsTpl']->assign('error', $fieldelementObj->getHtmlErrors() . ' Field element');
- }
- }
+ //
+ $GLOBALS['xoopsTpl']->assign('error', $fieldsObj->getHtmlErrors());
+ $form = $fieldsObj->getForm($field_mid, $field_tid, $field_numb);
+ $GLOBALS['xoopsTpl']->assign('form', $form->render());
break;
case 'edit':
@@ -274,17 +246,16 @@
$GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
$fieldsObj = $tdmcreate->getHandler('fields')->get( $field_tid );
- $form = $fieldsObj->getForm(null, $field_tid);
+ $form = $fieldsObj->getForm(null, $field_tid, $field_numb);
$GLOBALS['xoopsTpl']->assign('form', $form->render());
-
- var_dump($field_id);
- var_dump($field_mid);
+
var_dump($field_tid);
var_dump($field_numb);
break;
case 'drag':
$side = TDMCreate_CleanVars( $_POST, 'field_id', 0, 'int' );
+ $field_id = XoopsRequest::getInt('field_id');
if ( $field_id > 0 ) {
$fieldsObj = $tdmcreate->getHandler('fields')->get( $field_id );
$fieldsObj->setVar('field_id', $side);
@@ -313,59 +284,57 @@
break;
case 'display':
+ // Get the list of fields
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('field_tid', $field_tid));
+ $fields = $tdmcreate->getHandler('fields')->getObjects($criteria);
$fieldsObj =& $tdmcreate->getHandler('fields')->get($field_id);
if (isset($_GET['field_tid'])) {
if (isset($_GET['field_parent'])) {
- /*$fld_parent = intval($_GET['field_parent']);
- $field_parent = ($fld_parent == 1) ? 0 : 1;
- $fieldsObj->setVar('field_parent', $field_parent);*/
- for( $i = 1; $i <= $field_numb; $i++ ) {
- $fld_parent = intval($_GET['field_parent'][$i]);
- $field_parent = ($i == $fld_parent) ? '1' : '0';
+ foreach ($fields as $field) {
+ $fld_parent = $field->getVar('field_parent');
+ $field_parent = ($field->getVar('field_id') == $fld_parent) ? '1' : '0';
$fieldsObj->setVar('field_parent', $field_parent);
}
} elseif (isset($_GET['field_inlist'])) {
$fld_inlist = intval($_GET['field_inlist']);
- $field_inlist = ($fld_inlist == 1) ? 0 : 1;
+ $field_inlist = ($fld_inlist == 1) ? '0' : '1';
$fieldsObj->setVar('field_inlist', $field_inlist);
} elseif (isset($_GET['field_inform'])) {
$fld_inform = intval($_GET['field_inform']);
- $field_inform = ($fld_inform == 1) ? 0 : 1;
+ $field_inform = ($fld_inform == 1) ? '0' : '1';
$fieldsObj->setVar('field_inform', $field_inform);
} elseif (isset($_GET['field_admin'])) {
$fld_admin = intval($_GET['field_admin']);
- $field_admin = ($fld_admin == 1) ? 0 : 1;
+ $field_admin = ($fld_admin == 1) ? '0' : '1';
$fieldsObj->setVar('field_admin', $field_admin);
} elseif (isset($_GET['field_user'])) {
$fld_user = intval($_GET['field_user']);
- $field_user = ($fld_user == 1) ? 0 : 1;
+ $field_user = ($fld_user == 1) ? '0' : '1';
$fieldsObj->setVar('field_user', $field_user);
} elseif (isset($_GET['field_block'])) {
$fld_block = intval($_GET['field_block']);
- $field_block = ($fld_block == 1) ? 0 : 1;
+ $field_block = ($fld_block == 1) ? '0' : '1';
$fieldsObj->setVar('field_block', $field_block);
- } elseif (isset($_GET['field_main'])) {
- /*$fld_main = intval($_GET['field_main']);
- $field_main = ($fld_main == 1) ? 0 : 1;
- $fieldsObj->setVar('field_main', $field_main);*/
- for( $i = 1; $i <= $field_numb; $i++ ) {
- $fld_main = intval($_GET['field_main'][$i]);
- $field_main = ($i == $fld_main) ? '1' : '0';
+ } elseif (isset($_GET['field_main'])) {
+ foreach ($fields as $field) {
+ $fld_main = $field->getVar('field_main');
+ $field_main = ($field->getVar('field_id') == $fld_main) ? '1' : '0';
$fieldsObj->setVar('field_main', $field_main);
}
} elseif (isset($_GET['field_search'])) {
$fld_search = intval($_GET['field_search']);
- $field_search = ($fld_search == 1) ? 0 : 1;
+ $field_search = ($fld_search == 1) ? '0' : '1';
$fieldsObj->setVar('field_search', $field_search);
} elseif (isset($_GET['field_required'])) {
$fld_required = intval($_GET['field_required']);
- $field_required = ($fld_required == 1) ? 0 : 1;
+ $field_required = ($fld_required == 1) ? '0' : '1';
$fieldsObj->setVar('field_required', $field_required);
}
if ($tdmcreate->getHandler('fields')->insert($fieldsObj, true)) {
- redirect_header('fields.php', 1, _AM_TDMCREATE_TOGGLE_SUCCESS);
+ redirect_header('fields.php', 3, _AM_TDMCREATE_TOGGLE_SUCCESS);
} else {
- redirect_header('fields.php', 1, _AM_TDMCREATE_TOGGLE_FAILED);
+ redirect_header('fields.php', 3, _AM_TDMCREATE_TOGGLE_FAILED);
}
}
break;
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php 2014-06-13 14:03:12 UTC (rev 12581)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php 2014-06-13 14:25:54 UTC (rev 12582)
@@ -20,16 +20,16 @@
*/
include 'header.php';
// Recovered value of argument op in the URL $
-$op = TDMCreateRequest::getString('op', 'list');
+$op = XoopsRequest::getString('op', 'list');
//
-$mod_id = TDMCreateRequest::getInt('mod_id');
+$mod_id = XoopsRequest::getInt('mod_id');
//
switch ($op)
{
case 'list':
default:
- $start = TDMCreateRequest::getInt('start', 0);
- $limit = TDMCreateRequest::getInt('limit', $tdmcreate->getConfig('modules_adminpager'));
+ $start = XoopsRequest::getInt('start', 0);
+ $limit = XoopsRequest::getInt('limit', $tdmcreate->getConfig('modules_adminpager'));
// Define main template
$template_main = 'modules.tpl';
$GLOBALS['xoTheme']->addScript('modules/TDMCreate/assets/js/functions.js');
@@ -198,12 +198,12 @@
break;
case 'display':
- $mod_admin = TDMCreateRequest::getInt('mod_admin');
- $mod_user = TDMCreateRequest::getInt('mod_user');
- $mod_search = TDMCreateRequest::getInt('mod_search');
- $mod_comments = TDMCreateRequest::getInt('mod_comments');
- $mod_notifications = TDMCreateRequest::getInt('mod_notifications');
- $mod_permissions = TDMCreateRequest::getInt('mod_permissions');
+ $mod_admin = XoopsRequest::getInt('mod_admin');
+ $mod_user = XoopsRequest::getInt('mod_user');
+ $mod_search = XoopsRequest::getInt('mod_search');
+ $mod_comments = XoopsRequest::getInt('mod_comments');
+ $mod_notifications = XoopsRequest::getInt('mod_notifications');
+ $mod_permissions = XoopsRequest::getInt('mod_permissions');
if ( $mod_id > 0 ) {
$obj =& $tdmcreate->getHandler('modules')->get($mod_id);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-06-13 14:03:12 UTC (rev 12581)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-06-13 14:25:54 UTC (rev 12582)
@@ -20,22 +20,22 @@
*/
include 'header.php';
// Recovered value of arguments op in the URL $
-$op = TDMCreateRequest::getString('op', 'list');
+$op = XoopsRequest::getString('op', 'list');
//
-$mod_id = TDMCreateRequest::getInt('mod_id');
+$mod_id = XoopsRequest::getInt('mod_id');
//
-$table_id = TDMCreateRequest::getInt('table_id');
-$table_mid = TDMCreateRequest::getInt('table_mid');
-$table_nbfields = TDMCreateRequest::getInt('table_nbfields');
-$table_fieldname = TDMCreateRequest::getString('table_fieldname', '');
+$table_id = XoopsRequest::getInt('table_id');
+$table_mid = XoopsRequest::getInt('table_mid');
+$table_nbfields = XoopsRequest::getInt('table_nbfields');
+$table_fieldname = XoopsRequest::getString('table_fieldname', '');
//
switch ($op)
{
case 'list':
default:
- $start = TDMCreateRequest::getInt('start', 0);
- $limit = TDMCreateRequest::getInt('limit', $tdmcreate->getConfig('modules_adminpager'));
- //$limit = TDMCreateRequest::getInt('limit', $tdmcreate->getConfig('tables_adminpager'));
+ $start = XoopsRequest::getInt('start', 0);
+ $limit = XoopsRequest::getInt('limit', $tdmcreate->getConfig('modules_adminpager'));
+ //$limit = XoopsRequest::getInt('limit', $tdmcreate->getConfig('tables_adminpager'));
// Define main template
$template_main = 'tables.tpl';
$GLOBALS['xoTheme']->addStylesheet( 'modules/TDMCreate/assets/css/admin/style.css' );
@@ -195,7 +195,12 @@
if( $tdmcreate->getHandler('tables')->insert($obj) ) {
if( $obj->isNew() ) {
- $table_iid = $GLOBALS['xoopsDB']->getInsertId();
+ $table_iid = $GLOBALS['xoopsDB']->getInsertId();
+ /*$_SESSION['table_id'] = $GLOBALS['xoopsDB']->getInsertId();
+ $_SESSION['table_mid'] = $table_mid;
+ $_SESSION['table_name'] = $_POST['table_name'];
+ $_SESSION['table_fieldname'] = $table_fieldname;
+ $_SESSION['table_nbfields'] = $table_nbfields;*/
$table_action = '&field_mid='.$table_mid.'&field_tid='.$table_iid.'&field_numb='.$table_nbfields.'&field_name='.$table_fieldname;
redirect_header('fields.php?op=new'.$table_action, 5, sprintf(_AM_TDMCREATE_TABLE_FORM_SAVED_OK, $_POST['table_name']));
} else {
@@ -238,14 +243,14 @@
break;
case 'display':
- $table_blocks = TDMCreateRequest::getInt('table_blocks');
- $table_admin = TDMCreateRequest::getInt('table_admin');
- $table_user = TDMCreateRequest::getInt('table_user');
- $table_submenu = TDMCreateRequest::getInt('table_submenu');
- $table_search = TDMCreateRequest::getInt('table_search');
- $table_comments = TDMCreateRequest::getInt('table_comments');
- $table_notifications = TDMCreateRequest::getInt('table_notifications');
- $table_permissions = TDMCreateRequest::getInt('table_permissions');
+ $table_blocks = XoopsRequest::getInt('table_blocks');
+ $table_admin = XoopsRequest::getInt('table_admin');
+ $table_user = XoopsRequest::getInt('table_user');
+ $table_submenu = XoopsRequest::getInt('table_submenu');
+ $table_search = XoopsRequest::getInt('table_search');
+ $table_comments = XoopsRequest::getInt('table_comments');
+ $table_notifications = XoopsRequest::getInt('table_notifications');
+ $table_permissions = XoopsRequest::getInt('table_permissions');
if ( $table_id > 0 ) {
$obj =& $tdmcreate->getHandler('tables')->get($table_id);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-06-13 14:03:12 UTC (rev 12581)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-06-13 14:25:54 UTC (rev 12582)
@@ -41,8 +41,9 @@
$this->tdmcreate = TDMCreate::getInstance();
$this->initVar('field_id', XOBJ_DTYPE_INT);
$this->initVar('field_mid', XOBJ_DTYPE_INT);
- $this->initVar('field_tid', XOBJ_DTYPE_INT);
- $this->initVar('field_name', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('field_tid', XOBJ_DTYPE_INT);
+ $this->initVar('field_numb', XOBJ_DTYPE_INT);
+ $this->initVar('field_name', XOBJ_DTYPE_TXTBOX);
$this->initVar('field_type', XOBJ_DTYPE_TXTBOX);
$this->initVar('field_value', XOBJ_DTYPE_TXTBOX);
$this->initVar('field_attribute', XOBJ_DTYPE_TXTBOX);
@@ -85,7 +86,7 @@
}
return $instance;
}
-
+
/*
* @public function getForm
*
@@ -101,14 +102,11 @@
$action = $_SERVER['REQUEST_URI'];
}
$isNew = $this->isNew();
- $title = $isNew ? sprintf(_AM_TDMCREATE_FIELD_ADD) : sprintf(_AM_TDMCREATE_FIELD_EDIT);
-
+ $title = $isNew ? sprintf(_AM_TDMCREATE_FIELD_ADD) : sprintf(_AM_TDMCREATE_FIELD_EDIT);
+
$field_mid = $isNew ? $f_mid : $this->getVar('field_mid');
$field_tid = $isNew ? $f_tid : $this->getVar('field_tid');
- // Get the list of fields
- $criteria = new CriteriaCompo();
- $criteria->add(new Criteria('field_tid', $f_tid));
- $field_numb = $isNew ? $f_numb : $this->tdmcreate->getHandler('fields')->getCount($criteria); //$this->getVar('field_numb')
+ $field_numb = $isNew ? $f_numb : $this->getVar('field_numb');
$form = new TDMCreateThemeForm(null, 'form', $action, 'post', true);
$form->setExtra('enctype="multipart/form-data"');
@@ -129,225 +127,25 @@
$form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_PARAMETERS.'</th>'));
$form->addElement(new TDMCreateFormLabel('</tr></thead>'));
$form->addElement(new TDMCreateFormLabel('<tbody>'));
- $fields = $this->tdmcreate->getHandler('fields')->getObjects($criteria);
- unset($criteria);
- //var_dump($field_numb);
- $class = '';
+ //
if($isNew) {
- for($i = 1; $i <= $field_numb; $i++)
- {
- $form->addElement(new XoopsFormHidden('field_id['.$i.']', 'new'));
- $form->addElement(new XoopsFormHidden('field_mid', $field_mid));
- $form->addElement(new XoopsFormHidden('field_tid', $field_tid));
- $form->addElement(new XoopsFormHidden('field_numb', $field_numb));
-
- $class = ($class == 'even') ? 'odd' : 'even';
- $form->addElement(new TDMCreateFormLabel('<tr class="'.$class.'">'));
- // Index ID
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$i.'</td>'));
- // Field Name
- $this_field_name = $isNew ? (!empty($f_name) ? $f_name . '_' : '') : $this->getVar('field_name');
- $field_name = new XoopsFormText(_AM_TDMCREATE_FIELD_NAME, 'field_name['.$i.']', 15, 255, $this_field_name);
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_name->render().'</td>'));
- // Field Type
- $fieldtype_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_type['.$i.']', $this->getVar('field_type'));
- $fieldtype_select->addOptionArray($this->tdmcreate->getHandler('fieldtype')->getList());
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$fieldtype_select->render().'</td>'));
- // Field Value
- $field_value = new XoopsFormText(_AM_TDMCREATE_FIELD_VALUE, 'field_value['.$i.']', 5, 20, $this->getVar('field_value'));
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_value->render().'</td>'));
- // Field Attributes
- $field_attributes_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_attribute['.$i.']', $this->getVar('field_attribute'));
- $field_attributes_select->addOptionArray($this->tdmcreate->getHandler('fieldattributes')->getList());
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_attributes_select->render().'</td>'));
- // Field Null
- $field_null_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_NULL, 'field_null['.$i.']', $this->getVar('field_null'));
- $field_null_select->addOptionArray($this->tdmcreate->getHandler('fieldnull')->getList());
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_null_select->render().'</td>'));
- // Field Default
- $field_default = new XoopsFormText(_AM_TDMCREATE_FIELD_DEFAULT, 'field_default['.$i.']', 15, 25, $this->getVar('field_default'));
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_default->render().'</td>'));
- // Field Key
- $field_key_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_KEY, 'field_key['.$i.']', $this->getVar('field_key'));
- $field_key_select->addOptionArray($this->tdmcreate->getHandler('fieldkey')->getList());
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_key_select->render().'</td>'));
- // Field Void
- $table_autoincrement = $this->tdmcreate->getHandler('tables')->get($f_tid);
- if( ($i == 1) && ($table_autoincrement->getVar('table_autoincrement') == 1)) {
- $form->addElement(new TDMCreateFormLabel('<td> </td></tr>'));
- } else {
- // Box header row
- $parameters_tray = new XoopsFormElementTray('', '<br />');
- /*$parameters_header = new TDMCreateFormLabel('<div class="portlet"><div class="portlet-header">_AM_TDMCREATE_FIELD_PARAMETERS_LIST</div></div>')
- $parameters_tray->addElement($parameters_header); */
- // Field Elements
- $criteria_element = new CriteriaCompo();
- $criteria_element->add(new Criteria('fieldelement_tid', 0));
- $criteria_table = new CriteriaCompo();
- $criteria_table->add(new Criteria('fieldelement_mid', $field_mid));
- $field_elements_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element['.$i.']', $this->getVar('field_element'));
- $field_elements_select->addOptionArray($this->tdmcreate->getHandler('fieldelements')->getList($criteria_element));
- $field_elements_select->addOptionArray($this->tdmcreate->getHandler('fieldelements')->getList($criteria_table));
- unset($criteria_element); unset($criteria_table);
- $parameters_tray->addElement($field_elements_select);
-
- $field_parent = $isNew ? ( $i == 1 ? 1 : 0 ) : $this->getVar('field_parent');
- $check_field_parent = new XoopsFormCheckBox(' ', 'field_parent', $field_parent);
- $check_field_parent->addOption($i, _AM_TDMCREATE_FIELD_PARENT );
- $parameters_tray->addElement($check_field_parent);
-
- $field_inlist = $isNew ? 0 : $this->getVar('field_inlist');
- $check_field_inlist = new XoopsFormCheckBox(' ', 'field_inlist['.$i.']', $field_inlist);
- $check_field_inlist->addOption(1, _AM_TDMCREATE_FIELD_INLIST);
- $parameters_tray->addElement($check_field_inlist);
-
- $field_inform = $isNew ? 0 : $this->getVar('field_inform');
- $check_field_inform = new XoopsFormCheckBox(' ', 'field_inform['.$i.']', $field_inform);
- $check_field_inform->addOption(1, _AM_TDMCREATE_FIELD_INFORM);
- $parameters_tray->addElement($check_field_inform);
-
- $field_admin = $isNew ? 0 : $this->getVar('field_admin');
- $check_field_admin = new XoopsFormCheckBox(' ', 'field_admin['.$i.']', $field_admin);
- $check_field_admin->addOption(1, _AM_TDMCREATE_FIELD_ADMIN);
- $parameters_tray->addElement($check_field_admin);
-
- $field_user = $isNew ? 0 : $this->getVar('field_user');
- $check_field_user = new XoopsFormCheckBox(' ', 'field_user['.$i.']', $field_user);
- $check_field_user->addOption(1, _AM_TDMCREATE_FIELD_USER);
- $parameters_tray->addElement($check_field_user);
-
- $field_block = $isNew ? 0 : $this->getVar('field_block');
- $check_field_block = new XoopsFormCheckBox('', 'field_block['.$i.']', $field_block);
- $check_field_block->addOption(1, _AM_TDMCREATE_FIELD_BLOCK);
- $parameters_tray->addElement($check_field_block);
-
- $field_main = $isNew ? ( $i == 1 ? 1 : 0 ) : $this->getVar('field_main');
- $check_field_main = new XoopsFormRadio('', 'field_main', $field_main);
- $check_field_main->addOption('', _AM_TDMCREATE_FIELD_MAINFIELD );
- $parameters_tray->addElement($check_field_main);
-
- $field_search = $isNew ? 0 : $this->getVar('field_search');
- $check_field_search = new XoopsFormCheckBox(' ', 'field_search['.$i.']', $field_search);
- $check_field_search->addOption(1, _AM_TDMCREATE_FIELD_SEARCH);
- $parameters_tray->addElement($check_field_search);
-
- $field_required = $isNew ? 0 : $this->getVar('field_required');
- $check_field_required = new XoopsFormCheckBox(' ', 'field_required['.$i.']', $field_required);
- $check_field_required->addOption(1, _AM_TDMCREATE_FIELD_REQUIRED);
- $parameters_tray->addElement($check_field_required);
- $form->addElement(new TDMCreateFormLabel('<td><div class="portlet"><div class="portlet-header">'._AM_TDMCREATE_FIELD_PARAMETERS_LIST.'</div><div class="portlet-content">'.$parameters_tray->render().'</div></div></td></tr>'));
- }
+ for($i = 1; $i <= $f_numb; $i++) {
+ $this->getFormElements($form, $isNew, 'new', $i, $f_name, $field_mid, $field_tid, $this);
}
} else {
- $id = 1;
- foreach ($fields as $field)
- {
- $form->addElement(new XoopsFormHidden('field_id['.$id.']', $field->getVar('field_id')));
- $form->addElement(new XoopsFormHidden('field_mid', $field_mid));
- $form->addElement(new XoopsFormHidden('field_tid', $field_tid));
- $form->addElement(new XoopsFormHidden('field_numb', $field_numb));
-
- $class = ($class == 'even') ? 'odd' : 'even';
- $form->addElement(new TDMCreateFormLabel('<tr class="'.$class.'">'));
- // Index ID
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$id.'</td>'));
- // Field Name
- $this_field_name = $isNew ? (!empty($f_name) ? $f_name . '_' : '') : $field->getVar('field_name');
- $field_name = new XoopsFormText(_AM_TDMCREATE_FIELD_NAME, 'field_name['.$id.']', 15, 255, $this_field_name);
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_name->render().'</td>'));
- // Field Type
- $fieldtype_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_type['.$id.']', $field->getVar('field_type'));
- $fieldtype_select->addOptionArray($this->tdmcreate->getHandler('fieldtype')->getList());
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$fieldtype_select->render().'</td>'));
- // Field Value
- $field_value = new XoopsFormText(_AM_TDMCREATE_FIELD_VALUE, 'field_value['.$id.']', 5, 20, $field->getVar('field_value'));
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_value->render().'</td>'));
- // Field Attributes
- $field_attributes_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_attribute['.$id.']', $field->getVar('field_attribute'));
- $field_attributes_select->addOptionArray($this->tdmcreate->getHandler('fieldattributes')->getList());
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_attributes_select->render().'</td>'));
- // Field Null
- $field_null_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_NULL, 'field_null['.$id.']', $field->getVar('field_null'));
- $field_null_select->addOptionArray($this->tdmcreate->getHandler('fieldnull')->getList());
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_null_select->render().'</td>'));
- // Field Default
- $field_default = new XoopsFormText(_AM_TDMCREATE_FIELD_DEFAULT, 'field_default['.$id.']', 15, 25, $field->getVar('field_default'));
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_default->render().'</td>'));
- // Field Key
- $field_key_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_KEY, 'field_key['.$id.']', $field->getVar('field_key'));
- $field_key_select->addOptionArray($this->tdmcreate->getHandler('fieldkey')->getList());
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_key_select->render().'</td>'));
- // Field Void
- $table_autoincrement = $this->tdmcreate->getHandler('tables')->get($f_tid);
- if( ($id == 1) && ($table_autoincrement->getVar('table_autoincrement') == 1)) {
- $form->addElement(new TDMCreateFormLabel('<td> </td></tr>'));
- } else {
- // Box header row
- $parameters_tray = new XoopsFormElementTray('', '<br />');
- /*$parameters_header = new TDMCreateFormLabel('<div class="portlet"><div class="portlet-header">_AM_TDMCREATE_FIELD_PARAMETERS_LIST</div></div>')
- $parameters_tray->addElement($parameters_header); */
- // Field Elements
- $criteria_element = new CriteriaCompo();
- $criteria_element->add(new Criteria('fieldelement_tid', 0));
- $criteria_table = new CriteriaCompo();
- $criteria_table->add(new Criteria('fieldelement_mid', $field_mid));
- $field_elements_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element['.$id.']', $field->getVar('field_element'));
- $field_elements_select->addOptionArray($this->tdmcreate->getHandler('fieldelements')->getList($criteria_element));
- $field_elements_select->addOptionArray($this->tdmcreate->getHandler('fieldelements')->getList($criteria_table));
- unset($criteria_element); unset($criteria_table);
- $parameters_tray->addElement($field_elements_select);
-
- $field_parent = $isNew ? ( $id == 1 ? 1 : 0 ) : $field->getVar('field_parent');
- $check_field_parent = new XoopsFormCheckBox(' ', 'field_parent', $field_parent);
- $check_field_parent->addOption($id, _AM_TDMCREATE_FIELD_PARENT );
- $parameters_tray->addElement($check_field_parent);
-
- $field_inlist = $isNew ? 0 : $field->getVar('field_inlist');
- $check_field_inlist = new XoopsFormCheckBox(' ', 'field_inlist['.$id.']', $field_inlist);
- $check_field_inlist->addOption(1, _AM_TDMCREATE_FIELD_INLIST);
- $parameters_tray->addElement($check_field_inlist);
-
- $field_inform = $isNew ? 0 : $field->getVar('field_inform');
- $check_field_inform = new XoopsFormCheckBox(' ', 'field_inform['.$id.']', $field_inform);
- $check_field_inform->addOption(1, _AM_TDMCREATE_FIELD_INFORM);
- $parameters_tray->addElement($check_field_inform);
-
- $field_admin = $isNew ? 0 : $field->getVar('field_admin');
- $check_field_admin = new XoopsFormCheckBox(' ', 'field_admin['.$id.']', $field_admin);
- $check_field_admin->addOption(1, _AM_TDMCREATE_FIELD_ADMIN);
- $parameters_tray->addElement($check_field_admin);
-
- $field_user = $isNew ? 0 : $field->getVar('field_user');
- $check_field_user = new XoopsFormCheckBox(' ', 'field_user['.$id.']', $field_user);
- $check_field_user->addOption(1, _AM_TDMCREATE_FIELD_USER);
- $parameters_tray->addElement($check_field_user);
-
- $field_block = $isNew ? 0 : $field->getVar('field_block');
- $check_field_block = new XoopsFormCheckBox('', 'field_block['.$id.']', $field_block);
- $check_field_block->addOption(1, _AM_TDMCREATE_FIELD_BLOCK);
- $parameters_tray->addElement($check_field_block);
-
- $field_main = $isNew ? ( $id == 1 ? 1 : 0 ) : $field->getVar('field_main');
- $check_field_main = new XoopsFormRadio('', 'field_main', $field_main);
- $check_field_main->addOption('', _AM_TDMCREATE_FIELD_MAINFIELD );
- $parameters_tray->addElement($check_field_main);
-
- $field_search = $isNew ? 0 : $field->getVar('field_search');
- $check_field_search = new XoopsFormCheckBox(' ', 'field_search['.$id.']', $field_search);
- $check_field_search->addOption(1, _AM_TDMCREATE_FIELD_SEARCH);
- $parameters_tray->addElement($check_field_search);
-
- $field_required = $isNew ? 0 : $field->getVar('field_required');
- $check_field_required = new XoopsFormCheckBox(' ', 'field_required['.$id.']', $field_required);
- $check_field_required->addOption(1, _AM_TDMCREATE_FIELD_REQUIRED);
- $parameters_tray->addElement($check_field_required);
- $form->addElement(new TDMCreateFormLabel('<td><div class="portlet"><div class="portlet-header">'._AM_TDMCREATE_FIELD_PARAMETERS_LIST.'</div><div class="portlet-content">'.$parameters_tray->render().'</div></div></td></tr>'));
- }
- $id++;
+ // Get the list of fields
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('field_tid', $field_tid));
+ $fields = $this->tdmcreate->getHandler('fields')->getObjects($criteria);
+ unset($criteria);
+ $i = 1;
+ foreach ($fields as $field) {
+ $this->getFormElements($form, $isNew, 'edit', $i, null, $field_mid, $field_tid, $field);
+ $i++;
}
- unset($id);
- }
-
+ unset($i);
+ }
+ // Send Form Data
$form->addElement(new TDMCreateFormLabel('</tbody>'));
$form->addElement(new TDMCreateFormLabel('<tfoot><tr>'));
$form_hidden = new XoopsFormHidden('op', 'save');
@@ -356,7 +154,121 @@
$form->addElement(new TDMCreateFormLabel('<td>'.$form_button->render().'</td>'));
$form->addElement(new TDMCreateFormLabel('</tr></tfoot></table>'));
return $form;
- }
+ }
+
+ /*
+ * @private function getFormElements
+ *
+ * @param object $form
+ * @param string $type
+ * @param integer $id
+ * @param string $field_name
+ * @param string $field_mid
+ * @param string $field_tid
+ * @param object $field
+ * @param string $class
+ */
+ private function getFormElements($form, $isNew, $type, $id, $f_name = null, $field_mid, $field_tid, $field, $class = 'even')
+ {
+ $form->addElement(new XoopsFormHidden('field_id['.$id.']', $type));
+ $form->addElement(new XoopsFormHidden('field_mid', $field_mid));
+ $form->addElement(new XoopsFormHidden('field_tid', $field_tid));
+
+ $class = ($class == 'even') ? 'odd' : 'even';
+ $form->addElement(new TDMCreateFormLabel('<tr class="'.$class.'">'));
+ // Index ID
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$id.'</td>'));
+ // Field Name
+ $this_field_name = $isNew ? (!empty($f_name) ? $f_name . '_' : '') : $field->getVar('field_name');
+ $field_name = new XoopsFormText(_AM_TDMCREATE_FIELD_NAME, 'field_name['.$id.']', 15, 255, $this_field_name);
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_name->render().'</td>'));
+ // Field Type
+ $fieldtype_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_type['.$id.']', $field->getVar('field_type'));
+ $fieldtype_select->addOptionArray($this->tdmcreate->getHandler('fieldtype')->getList());
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$fieldtype_select->render().'</td>'));
+ // Field Value
+ $field_value = new XoopsFormText(_AM_TDMCREATE_FIELD_VALUE, 'field_value['.$id.']', 5, 20, $field->getVar('field_value'));
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_value->render().'</td>'));
+ // Field Attributes
+ $field_attributes_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_attribute['.$id.']', $field->getVar('field_attribute'));
+ $field_attributes_select->addOptionArray($this->tdmcreate->getHandler('fieldattributes')->getList());
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_attributes_select->render().'</td>'));
+ // Field Null
+ $field_null_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_NULL, 'field_null['.$id.']', $field->getVar('field_null'));
+ $field_null_select->addOptionArray($this->tdmcreate->getHandler('fieldnull')->getList());
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_null_select->render().'</td>'));
+ // Field Default
+ $field_default = new XoopsFormText(_AM_TDMCREATE_FIELD_DEFAULT, 'field_default['.$id.']', 15, 25, $field->getVar('field_default'));
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_default->render().'</td>'));
+ // Field Key
+ $field_key_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_KEY, 'field_key['.$id.']', $field->getVar('field_key'));
+ $field_key_select->addOptionArray($this->tdmcreate->getHandler('fieldkey')->getList());
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_key_select->render().'</td>'));
+ // Field Void
+ $table_autoincrement = $this->tdmcreate->getHandler('tables')->get($field_tid);
+ if( ($id == 1) && ($table_autoincrement->getVar('table_autoincrement') == 1)) {
+ $form->addElement(new TDMCreateFormLabel('<td> </td></tr>'));
+ } else {
+ // Box header row
+ $parameters_tray = new XoopsFormElementTray('', '<br />');
+ // Field Elements
+ $criteria_element = new CriteriaCompo();
+ $criteria_element->add(new Criteria('fieldelement_tid', 0));
+ $criteria_table = new CriteriaCompo();
+ $criteria_table->add(new Criteria('fieldelement_mid', $field_mid));
+ $field_elements_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element['.$id.']', $field->getVar('field_element'));
+ $field_elements_select->addOptionArray($this->tdmcreate->getHandler('fieldelements')->getList($criteria_element));
+ $field_elements_select->addOptionArray($this->tdmcreate->getHandler('fieldelements')->getList($criteria_table));
+ unset($criteria_element); unset($criteria_table);
+ $parameters_tray->addElement($field_elements_select);
+
+ $field_parent = $isNew ? ( $id == 1 ? 1 : 0 ) : $field->getVar('field_parent');
+ $check_field_parent = new XoopsFormCheckBox(' ', 'field_parent', $field_parent);
+ $check_field_parent->addOption($id, _AM_TDMCREATE_FIELD_PARENT );
+ $parameters_tray->addElement($check_field_parent);
+
+ $field_inlist = $isNew ? 0 : $field->getVar('field_inlist');
+ $check_field_inlist = new XoopsFormCheckBox(' ', 'field_inlist['.$id.']', $field_inlist);
+ $check_field_inlist->addOption(1, _AM_TDMCREATE_FIELD_INLIST);
+ $parameters_tray->addElement($check_field_inlist);
+
+ $field_inform = $isNew ? 0 : $field->getVar('field_inform');
+ $check_field_inform = new XoopsFormCheckBox(' ', 'field_inform['.$id.']', $field_inform);
+ $check_field_inform->addOption(1, _AM_TDMCREATE_FIELD_INFORM);
+ $parameters_tray->addElement($check_field_inform);
+
+ $field_admin = $isNew ? 0 : $field->getVar('field_admin');
+ $check_field_admin = new XoopsFormCheckBox(' ', 'field_admin['.$id.']', $field_admin);
+ $check_field_admin->addOption(1, _AM_TDMCREATE_FIELD_ADMIN);
+ $parameters_tray->addElement($check_field_admin);
+
+ $field_user = $isNew ? 0 : $field->getVar('field_user');
+ $check_field_user = new XoopsFormCheckBox(' ', 'field_user['.$id.']', $field_user);
+ $check_field_user->addOption(1, _AM_TDMCREATE_FIELD_USER);
+ $parameters_tray->addElement($check_field_user);
+
+ $field_block = $isNew ? 0 : $field->getVar('field_block');
+ $check_field_block = new XoopsFormCheckBox('', 'field_block['.$id.']', $field_block);
+ $check_field_block->addOption(1, _AM_TDMCREATE_FIELD_BLOCK);
+ $parameters_tray->addElement($check_field_block);
+
+ $field_main = $isNew ? ( $id == 1 ? 1 : 0 ) : $field->getVar('field_main');
+ $check_field_main = new XoopsFormRadio('', 'field_main', $field_main);
+ $check_field_main->addOption('', _AM_TDMCREATE_FIELD_MAINFIELD );
+ $parameters_tray->addElement($check_field_main);
+
+ $field_search = $isNew ? 0 : $field->getVar('field_search');
+ $check_field_search = new XoopsFormCheckBox(' ', 'field_search['.$id.']', $field_search);
+ $check_field_search->addOption(1, _AM_TDMCREATE_FIELD_SEARCH);
+ $parameters_tray->addElement($check_field_search);
+
+ $field_required = $isNew ? 0 : $field->getVar('field_required');
+ $check_field_required = new XoopsFormCheckBox(' ', 'field_required['.$id.']', $field_required);
+ $check_field_required->addOption(1, _AM_TDMCREATE_FIELD_REQUIRED);
+ $parameters_tray->addElement($check_field_required);
+ $form->addElement(new TDMCreateFormLabel('<td><div class="portlet"><div class="portlet-header">'._AM_TDMCREATE_FIELD_PARAMETERS_LIST.'</div><div class="portlet-content">'.$parameters_tray->render().'</div></div></td></tr>'));
+ }
+ }
}
/*
* @Class TDMCreateFieldsHandler
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/header.php 2014-06-13 14:03:12 UTC (rev 12581)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/header.php 2014-06-13 14:25:54 UTC (rev 12582)
@@ -76,18 +76,16 @@
EOT;
if ( $table->getVar('table_name') != '' ) {
$content .= <<<EOT
-include_once \$thisPath.'/class/helper.php';
-// Get instance
-\${$stl_mod_name}Helper = {$ucfmod_name}Helper::getInstance();\n
+// Get instance of module
+\${$stl_mod_name} = {$ucfmod_name}Helper::getInstance();\n
EOT;
}
$content .= <<<EOT
-\$thisModule = \$GLOBALS['xoopsModule']->getVar('dirname');
-
+//
\$sysPathIcon16 = '../' . \$xoopsModule->getInfo('sysicons16');
\$sysPathIcon32 = '../' . \$xoopsModule->getInfo('sysicons32');
\$pathModuleAdmin = \$GLOBALS['xoopsModule']->getInfo('dirmoduleadmin');
-
+//
\$modPathIcon16 = \$xoopsModule->getInfo('modicons16');
\$modPathIcon32 = \$xoopsModule->getInfo('modicons32');
//\n
@@ -96,7 +94,7 @@
{
$table_name = $tables[$i]->getVar('table_name');
$content .= <<<EOT
-\${$table_name}Handler =& xoops_getModuleHandler('{$table_name}', \$thisModule);\n
+\${$table_name}Handler =& \${$stl_mod_name}->getHandler('{$table_name}');\n
EOT;
}
$content .=<<<EOT
@@ -114,9 +112,8 @@
\$xoopsTpl->assign('modPathIcon32', \$modPathIcon32);
//Load languages
-xoops_loadLanguage('admin', \$thisModule);
-xoops_loadLanguage('modinfo', \$thisModule);
-xoops_loadLanguage('main', \$thisModule);
+xoops_loadLanguage('admin');
+xoops_loadLanguage('modinfo');
// Local admin menu class
if ( file_exists(\$GLOBALS['xoops']->path(\$pathModuleAdmin.'/moduleadmin.php'))){
include_once \$GLOBALS['xoops']->path(\$pathModuleAdmin.'/moduleadmin.php');
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-13 14:03:12 UTC (rev 12581)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-06-13 14:25:54 UTC (rev 12582)
@@ -380,6 +380,10 @@
$languageMain->write($module, $table, $tables, 'main.php');
$ret[] = $languageMain->render();
}
+ // Class Helper File
+ $classHelper = ClassHelper::getInstance();
+ $classHelper->write($module, 'helper.php');
+ $ret[] = $classHelper->render();
// Css Styles File
$cssStyles = CssStyles::getInstance($module, 'style.css');
$cssStyles->write($module, 'style.css');
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/classes/classes.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/classes/classes.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/classes/classes.php 2014-06-13 14:25:54 UTC (rev 12582)
@@ -0,0 +1,322 @@
+<?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: class_files.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+require_once 'formelements.php';
+class ClassFiles extends TDMCreateFormElements
+{
+ /*
+ * @var string
+ */
+ private $formelements = null;
+
+ /*
+ * @public function constructor
+ * @param null
+ */
+ public function __construct() {
+ parent::__construct();
+ $this->tdmcfile = TDMCreateFile::getInstance();
+ $this->formelements = TDMCreateFormElements::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 mixed $tables
+ */
+ public function write($module, $table, $tables) {
+ $this->setModule($module);
+ $this->setTable($table);
+ $this->setTables($tables);
+ }
+ /*
+ * @public function getInitVar
+ * @param string $field_name
+ * @param string $type
+ */
+ public function getInitVar($field_name, $type = 'INT') {
+ $ret = <<<EOT
+ \$this->initVar('{$field_name}', XOBJ_DTYPE_{$type});\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getInitVars
+ * @param array $fields
+ */
+ public function getInitVars($fields) {
+ $ret = '';
+ // Creation of the initVar functions list
+ foreach (array_keys($fields) as $f)
+ {
+ $field_name = $fields[$f]->getVar('field_name');
+ $field_type = $fields[$f]->getVar('field_type');
+ switch($field_type) {
+ case 'INT':
+ case 'TINYINT':
+ case 'MEDIUMINT':
+ case 'SMALLINT':
+ $ret .= $this->getInitVar($field_name, 'INT');
+ break;
+ case 'CHAR':
+ case 'VARCHAR':
+ $ret .= $this->getInitVar($field_name, 'TXTBOX');
+ break;
+ case 'TEXT':
+ case 'TINYTEXT':
+ case 'MEDIUMTEXT':
+ case 'LONGTEXT':
+ $ret .= $this->getInitVar($field_name, 'TXTAREA');
+ break;
+ case 'FLOAT':
+ $ret .= $this->getInitVar($field_name, 'FLOAT');
+ break;
+ case 'DECIMAL':
+ case 'DOUBLE':
+ $ret .= $this->getInitVar($field_name, 'DECIMAL');
+ break;
+ case 'ENUM':
+ $ret .= $this->getInitVar($field_name, 'ENUM');
+ break;
+ case 'EMAIL':
+ $ret .= $this->getInitVar($field_name, 'EMAIL');
+ break;
+ case 'URL':
+ $ret .= $this->getInitVar($field_name, 'URL');
+ break;
+ case 'DATE':
+ case 'DATETIME':
+ case 'TIMESTAMP':
+ case 'TIME':
+ case 'YEAR':
+ $ret .= $this->getInitVar($field_name, 'LTIME');
+ break;
+ }
+ }
+ return $ret;
+ }
+ /*
+ * @public function getHeadClass
+ * @param string $module_name
+ * @param string $table_name
+ * @param array $fields
+ */
+ public function getHeadClass($module_name, $table_name, $fields) {
+ $ucf_module_name = ucfirst($module_name);
+ $ucf_table_name = ucfirst($table_name);
+ $ret = <<<EOT
+\ndefined('XOOPS_ROOT_PATH') or die("Restricted access");
+/*
+ * Class Object {$ucf_module_name}{$ucf_table_name}
+ */
+class {$ucf_module_name}{$ucf_table_name} extends XoopsObject
+{
+ /*
+ * Constructor
+ *
+ * @param null
+ */
+ public function __construct()
+ {
+ \$this->XoopsObject();
+{$this->getInitVars($fields)}\t}
+ /*
+ * @static function &getInstance
+ * @param null
+ */
+ public static function &getInstance()
+ {
+ static \$instance = false;
+ if (!\$instance) {
+ \$instance = new self();
+ }
+ return \$instance;
+ }\n
+EOT;
+ return $ret;
+ }
+
+ /*
+ * @public function getHeadFunctionForm
+ * @param string $module
+ * @param string $table
+ */
+ public function getHeadFunctionForm($module, $table)
+ {
+ $module_name = strtolower($module->getVar('mod_name'));
+ $lang_add = $this->getLanguage($module_name, 'AM', 'ADD');
+ $lang_edit = $this->getLanguage($module_name, 'AM', 'EDIT');
+ $this->formelements->initForm($module, $table);
+ $ret = <<<EOT
+ /*
+ * Get form
+ *
+ * @param mixed \$action
+ */
+ public function getForm(\$action = false)
+ {
+ if (\$action === false) {
+ \$action = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_ENCODED);
+ }
+
+ \$title = \$this->isNew() ? sprintf({$lang_add}) : sprintf({$lang_edit});
+
+ xoops_load('XoopsFormLoader');
+ \$form = new XoopsThemeForm(\$title, 'form', \$action, 'post', true);
+ \$form->setExtra('enctype="multipart/form-data"');\n
+{$this->formelements->renderElements()}\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getPermissionsInFunctionForm
+ * @param string $module_name
+ * @param string $fpif
+ */
+ public function getPermissionsInFunctionForm($module_name, $fpif) {
+ $perm_approve = $this->getLanguage($module_name, 'AM', 'PERMISSIONS_APPROVE');
+ $perm_submit = $this->getLanguage($module_name, 'AM', 'PERMISSIONS_SUBMIT');
+ $perm_view = $this->getLanguage($module_name, 'AM', 'PERMISSIONS_VIEW');
+ $ret = <<<EOT
+ // Permissions
+ \$member_handler = & xoops_gethandler ( 'member' );
+ \$group_list = &\$member_handler->getGroupList();
+ \$gperm_handler = &xoops_gethandler ( 'groupperm' );
+ \$full_list = array_keys ( \$group_list );
+ global \$xoopsModule;
+ if ( !\$this->isNew() ) {
+ \$groups_ids_approve = \$gperm_handler->getGroupIds ( '{$module_name}_approve', \$this->getVar ( '{$fpif}' ), \$xoopsModule->getVar ( 'mid' ) );
+ \$groups_ids_submit = \$gperm_handler->getGroupIds ( '{$module_name}_submit', \$this->getVar ( '{$fpif}' ), \$xoopsModule->getVar ( 'mid' ) );
+ \$groups_ids_view = \$gperm_handler->getGroupIds ( '{$module_name}_view', \$this->getVar ( '{$fpif}' ), \$xoopsModule->getVar ( 'mid' ) );
+ \$groups_ids_approve = array_values ( \$groups_ids_approve );
+ \$groups_can_approve_checkbox = new XoopsFormCheckBox ( {$perm_approve}, 'groups_approve[]', \$groups_ids_approve );
+ \$groups_ids_submit = array_values ( \$groups_ids_submit );
+ \$groups_can_submit_checkbox = new XoopsFormCheckBox ( {$perm_submit}, 'groups_submit[]', \$groups_ids_submit );
+ \$groups_ids_view = array_values ( \$groups_ids_view );
+ \$groups_can_view_checkbox = new XoopsFormCheckBox ( {$perm_view}, 'groups_view[]', \$groups_ids_view );
+ } else {
+ \$groups_can_approve_checkbox = new XoopsFormCheckBox ( {$perm_approve}, 'gr...
[truncated message content] |
|
From: <be...@us...> - 2014-06-13 14:03:22
|
Revision: 12581
http://sourceforge.net/p/xoops/svn/12581
Author: beckmi
Date: 2014-06-13 14:03:12 +0000 (Fri, 13 Jun 2014)
Log Message:
-----------
Renaming the directory
Added Paths:
-----------
XoopsModules/xnewsletter/branches/mamba/xnewsletter/
Removed Paths:
-------------
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/
|
|
From: <be...@us...> - 2014-06-13 13:47:33
|
Revision: 12580
http://sourceforge.net/p/xoops/svn/12580
Author: beckmi
Date: 2014-06-13 13:47:07 +0000 (Fri, 13 Jun 2014)
Log Message:
-----------
Modified Paths:
--------------
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/about.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/accounts.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/admin_footer.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/admin_header.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/attachment.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/bmh.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/bmh_callback_database.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/cat.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/catsubscr.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/import.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/index.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/letter.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/mailinglist.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/maintenance.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/menu.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/protocol.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/sendletter.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/subscr.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/task.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/assets/css/module.css
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/assets/css/style.css
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/blocks/blocks_catsubscr.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/blocks/blocks_letter.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/blocks/blocks_subscrinfo.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/breadcrumb.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/request.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/session.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/xnewsletter.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/cron.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/docs/changelog.txt
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/docs/readme.txt
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/footer.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/header.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/include/common.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/include/config.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/include/constants.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/include/functions.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/include/install.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/include/mailinglist.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/include/module.css
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/include/onupdate.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/include/phpmailer_bmh/class.phpmailer-bmh.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/include/search.inc.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/include/task.inc.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/index.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/language/english/admin.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/language/english/blocks.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/language/english/common.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/language/english/help/help.html
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/language/english/help/help2.html
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/language/english/main.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/language/english/modinfo.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/language/english/templates/xoops.tpl
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/letter.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/plugins/csv.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/plugins/evennews.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/plugins/rmbulletin.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/plugins/smartpartner.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/plugins/subscribers.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/plugins/weblinks.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/plugins/xoopsuser.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/print.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/protocol.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/sendletter.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/sql/mysql.sql
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/subscription.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/templates/blocks/xNewsletter_catsubscr_block_day.tpl
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/templates/blocks/xNewsletter_catsubscr_block_recent.tpl
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/templates/blocks/xNewsletter_letter_block_day.tpl
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/templates/blocks/xNewsletter_letter_block_random.tpl
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/templates/blocks/xNewsletter_letter_block_recent.tpl
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/templates/blocks/xNewsletter_subscrinfo_block.tpl
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/templates/xNewsletter_common_breadcrumb.tpl
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/templates/xNewsletter_index.tpl
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/templates/xNewsletter_index_list_letters.tpl
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/templates/xNewsletter_letter.tpl
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/templates/xNewsletter_letter_list_letters.tpl
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/templates/xNewsletter_letter_list_subscrs.tpl
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/templates/xNewsletter_letter_preview.tpl
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/templates/xNewsletter_print.tpl
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/templates/xNewsletter_protocol.tpl
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/templates/xNewsletter_subscription.tpl
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/templates/xNewsletter_subscription_list_subscriptions.tpl
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/templates/xNewsletter_subscription_result.tpl
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/xoops_version.php
Added Paths:
-----------
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/assets/images/logo.png
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/accounts.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/attachment.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/bmh.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/cat.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/catsubscr.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/import.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/letter.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/mailinglist.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/protocol.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/subscr.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/task.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/template.php
Removed Paths:
-------------
XoopsModules/xnewsletter/branches/mamba/xNewsletter/
XoopsModules/xnewsletter/branches/mamba/xnewsletter/
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/assets/images/xNewsletter.png
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/xNewsletter_accounts.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/xNewsletter_attachment.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/xNewsletter_bmh.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/xNewsletter_cat.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/xNewsletter_catsubscr.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/xNewsletter_import.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/xNewsletter_letter.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/xNewsletter_mailinglist.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/xNewsletter_protocol.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/xNewsletter_subscr.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter2/class/xNewsletter_task.php
Modified: XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/about.php
===================================================================
--- XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/about.php 2014-06-02 08:21:11 UTC (rev 12560)
+++ XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/about.php 2014-06-13 13:47:07 UTC (rev 12580)
@@ -19,18 +19,18 @@
* ---------------------------------------------------------------------------
* @copyright Goffy ( wedega.com )
* @license GPL 2.0
- * @package xNewsletter
+ * @package xnewsletter
* @author Goffy ( web...@we... )
*
* Version : $Id $
* ****************************************************************************
*/
-include "admin_header.php";
+include_once dirname(__FILE__) . '/admin_header.php';
xoops_cp_header();
//global $indexAdmin;
echo $indexAdmin->addNavigation("about.php");
echo $indexAdmin->renderabout('9P3B3FXKF868J', false);
-include "admin_footer.php";
+include_once dirname(__FILE__) . '/admin_footer.php';
Modified: XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/accounts.php
===================================================================
--- XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/accounts.php 2014-06-02 08:21:11 UTC (rev 12560)
+++ XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/accounts.php 2014-06-13 13:47:07 UTC (rev 12580)
@@ -19,38 +19,35 @@
* ---------------------------------------------------------------------------
* @copyright Goffy ( wedega.com )
* @license GPL 2.0
- * @package xNewsletter
+ * @package xnewsletter
* @author Goffy ( web...@we... )
*
* Version : $Id $
* ****************************************************************************
*/
-include "admin_header.php";
+$currentFile = basename(__FILE__);
+include_once dirname(__FILE__) . '/admin_header.php';
xoops_cp_header();
-//global $indexAdmin;
// We recovered the value of the argument op in the URL$
-$op = xNewsletter_CleanVars($_REQUEST, 'op', 'list', 'string');
-$save_and_check = xNewsletter_CleanVars($_REQUEST, 'save_and_check', 'none', 'string');
-$accounts_id = xNewsletter_CleanVars($_REQUEST, 'accounts_id', 0, 'int');
-$post = xNewsletter_CleanVars($_REQUEST, 'post', '', 'string');
+$op = XnewsletterRequest::getString('op', 'list');
+$save_and_check = XnewsletterRequest::getString('save_and_check', 'none');
+$accounts_id = XnewsletterRequest::getInt('accounts_id', 0);
+$post = XnewsletterRequest::getString('post', '');
if ($post == "" && $op == "save_accounts" && $save_and_check =="none" ) $op = "edit_account";
switch ($op) {
case "check_account" :
- $img_ok = "<img src='" . XNEWSLETTER_ICONS_URL . "/xn_ok.png' alt='" . _AM_XNEWSLETTER_OK . "' title='"._AM_XNEWSLETTER_OK . "' /> ";
- $img_failed = "<img src='" . XNEWSLETTER_ICONS_URL . "/xn_failed.png' alt='" . _AM_XNEWSLETTER_FAILED . "' title='" . _AM_XNEWSLETTER_FAILED . "' /> ";
-
- echo $indexAdmin->addNavigation("accounts.php");
- $indexAdmin->addItemButton(_AM_XNEWSLETTER_ACCOUNTSLIST, 'accounts.php?op=list', 'list');
+ echo $indexAdmin->addNavigation($currentFile);
+ $indexAdmin->addItemButton(_AM_XNEWSLETTER_ACCOUNTSLIST, '?op=list', 'list');
echo $indexAdmin->renderButton();
-
+ //
if ($accounts_id == 0) {
- redirect_header("accounts.php", 3, _AM_XNEWSLETTER_ERROR_NO_VALID_ID);
+ redirect_header($currentFile, 3, _AM_XNEWSLETTER_ERROR_NO_VALID_ID);
} else {
- $accountObj =& $xnewsletter->getHandler('xNewsletter_accounts')->get($accounts_id);
+ $accountObj = $xnewsletter->getHandler('accounts')->get($accounts_id);
}
$mailhost = $accountObj->getVar("accounts_server_in");
@@ -75,42 +72,42 @@
$accounts_hardbox = $accountObj->getVar("accounts_hardbox"); $accounts_hardbox_ok = 0;
$accounts_softbox = $accountObj->getVar("accounts_softbox"); $accounts_softbox_ok = 0;
- $command = $mailhost.":".$port;
+ $command = $mailhost . ":" . $port;
if ($service !='') $command .= '/' . $service;
if ($service_option !='') $command .= '/' . $service_option;
echo "<table class='outer width100' cellspacing='1'>
<tr>
<th class='center width5'></th>
- <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_CHECK."</th>
- <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_CHECK_INFO."</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ACCOUNTS_CHECK . "</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ACCOUNTS_CHECK_INFO . "</th>
</tr>";
$mbox = @imap_open("{" . $command . "}", $accounts_username, $accounts_password); // or die ("can't connect: " . imap_last_error());
if ($mbox === false) {
echo "<tr>";
- echo "<td class='center width5'>".$img_failed."</td>";
- echo "<td class='left'>"._AM_XNEWSLETTER_ACCOUNTS_CHECK_OPEN_MAILBOX._AM_XNEWSLETTER_ACCOUNTS_CHECK_FAILED."</td>";
- echo "<td class='left'>".imap_last_error()."</td>";
+ echo "<td class='center width5'>" . XNEWSLETTER_IMG_FAILED . "</td>";
+ echo "<td class='left'>" . _AM_XNEWSLETTER_ACCOUNTS_CHECK_OPEN_MAILBOX._AM_XNEWSLETTER_ACCOUNTS_CHECK_FAILED . "</td>";
+ echo "<td class='left'>" . imap_last_error() . "</td>";
echo "</tr>";
} else {
echo "<tr>";
- echo "<td class='center width5'>".$img_ok."</td>";
- echo "<td class='left'>"._AM_XNEWSLETTER_ACCOUNTS_CHECK_OPEN_MAILBOX._AM_XNEWSLETTER_ACCOUNTS_CHECK_OK."</td>";
+ echo "<td class='center width5'>" . XNEWSLETTER_IMG_OK . "</td>";
+ echo "<td class='left'>" . _AM_XNEWSLETTER_ACCOUNTS_CHECK_OPEN_MAILBOX._AM_XNEWSLETTER_ACCOUNTS_CHECK_OK . "</td>";
echo "<td class='left'></td>";
echo "</tr>";
- $folders = imap_listmailbox($mbox, "{".$command."}", "*");
+ $folders = imap_listmailbox($mbox, "{" . $command . "}", "*");
if ($folders == false) {
echo "<tr>";
- echo "<td class='center width5'>".$img_failed."</td>";
- echo "<td class='left'>"._AM_XNEWSLETTER_ACCOUNTS_CHECK_OPEN_FOLDERS._AM_XNEWSLETTER_ACCOUNTS_CHECK_FAILED."</td>";
- echo "<td class='left'>".imap_last_error()."</td>";
+ echo "<td class='center width5'>" . XNEWSLETTER_IMG_FAILED . "</td>";
+ echo "<td class='left'>" . _AM_XNEWSLETTER_ACCOUNTS_CHECK_OPEN_FOLDERS._AM_XNEWSLETTER_ACCOUNTS_CHECK_FAILED . "</td>";
+ echo "<td class='left'>" . imap_last_error() . "</td>";
echo "</tr>";
} else {
echo "<tr>";
- echo "<td class='center width5'>".$img_ok."</td>";
- echo "<td class='left'>"._AM_XNEWSLETTER_ACCOUNTS_CHECK_OPEN_FOLDERS._AM_XNEWSLETTER_ACCOUNTS_CHECK_OK."</td>";
+ echo "<td class='center width5'>" . XNEWSLETTER_IMG_OK . "</td>";
+ echo "<td class='left'>" . _AM_XNEWSLETTER_ACCOUNTS_CHECK_OPEN_FOLDERS._AM_XNEWSLETTER_ACCOUNTS_CHECK_OK . "</td>";
echo "<td class='left'>";
if (is_array($folders)) {
reset ($folders);
@@ -118,15 +115,15 @@
$foldercreated = 0;
while (list( $key, $val) = each ($folders)) {
echo "($key) ";
- echo imap_utf7_decode (str_replace("{".$command."}","",$val)) . "<br>\n";
- if ("{".$command."}".$accounts_inbox == $val) $accounts_inbox_ok = 1;
- if ("{".$command."}".$accounts_hardbox == $val) {
+ echo imap_utf7_decode (str_replace("{" . $command . "}", "", $val)) . "<br>\n";
+ if ("{" . $command . "}" . $accounts_inbox == $val) $accounts_inbox_ok = 1;
+ if ("{" . $command . "}" . $accounts_hardbox == $val) {
$accounts_hardbox_ok = 1;
} else {
@imap_createmailbox($mbox, imap_utf7_encode('{'.$command.'}' . $accounts_hardbox));
$foldercreated = 1;
}
- if ("{".$command."}".$accounts_softbox == $val) {
+ if ("{" . $command . "}" . $accounts_softbox == $val) {
$accounts_softbox_ok = 1;
} else {
@imap_createmailbox($mbox, imap_utf7_encode('{' . $command . '}' . $accounts_softbox));
@@ -136,8 +133,8 @@
if ($foldercreated == 1) {
$folders_recheck = imap_listmailbox($mbox, "{" . $command . "}", "*");
while (list( $key, $val) = each ($folders_recheck)) {
- if ("{".$command."}".$accounts_hardbox == $val) $accounts_hardbox_ok = 1;
- if ("{".$command."}".$accounts_softbox == $val) $accounts_softbox_ok = 1;
+ if ("{" . $command . "}" . $accounts_hardbox == $val) $accounts_hardbox_ok = 1;
+ if ("{" . $command . "}" . $accounts_softbox == $val) $accounts_softbox_ok = 1;
}
}
}
@@ -147,36 +144,36 @@
echo "<tr>";
if ($accountObj->getVar("accounts_use_bmh") == '1') {
if ($accounts_inbox_ok == 1 && $accounts_hardbox_ok == 1 && $accounts_softbox_ok == 1) {
- echo "<td class='center width5'>" . $img_ok . "</td>";
+ echo "<td class='center width5'>" . XNEWSLETTER_IMG_OK . "</td>";
} else {
- echo "<td class='center width5'>" . $img_failed . "</td>";
+ echo "<td class='center width5'>" . XNEWSLETTER_IMG_FAILED . "</td>";
}
echo "<td class='left'>" . _AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH . "</td>";
echo "<td class='left'>";
echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH_INBOX . " ";
if ($accounts_inbox_ok == 1) {
- echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_OK . $img_ok;
+ echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_OK . XNEWSLETTER_IMG_OK;
} else {
- echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_FAILED . $img_failed;
+ echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_FAILED . XNEWSLETTER_IMG_FAILED;
}
echo "<br />";
echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH_HARDBOX." ";
if ($accounts_hardbox_ok == 1) {
- echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_OK . $img_ok;
+ echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_OK . XNEWSLETTER_IMG_OK;
} else {
- echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_FAILED . $img_failed;
+ echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_FAILED . XNEWSLETTER_IMG_FAILED;
}
echo "<br />";
echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH_SOFTBOX . " ";
if ($accounts_softbox_ok == 1) {
- echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_OK . $img_ok;
+ echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_OK . XNEWSLETTER_IMG_OK;
} else {
- echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_FAILED . $img_failed;
+ echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_FAILED . XNEWSLETTER_IMG_FAILED;
}
echo "<br />";
echo "</td>";
} else {
- echo "<td class='center width5'>" . $img_ok . "</td>";
+ echo "<td class='center width5'>" . XNEWSLETTER_IMG_OK . "</td>";
echo "<td class='left'>" . _AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH._AM_XNEWSLETTER_ACCOUNTS_CHECK_SKIPPED . "</td>";
echo "<td class='center'></td>";
}
@@ -189,64 +186,64 @@
case "list":
default:
- echo $indexAdmin->addNavigation('accounts.php') ;
- $indexAdmin->addItemButton(_AM_XNEWSLETTER_NEWACCOUNTS, 'accounts.php?op=new_account', 'add');
+ echo $indexAdmin->addNavigation($currentFile) ;
+ $indexAdmin->addItemButton(_AM_XNEWSLETTER_NEWACCOUNTS, '?op=new_account', 'add');
echo $indexAdmin->renderButton();
-
- $limit = $GLOBALS['xoopsModuleConfig']['adminperpage'];
- $criteria = new CriteriaCompo();
- $criteria->setSort("accounts_id ASC, accounts_type");
- $criteria->setOrder("ASC");
- $numrows = $xnewsletter->getHandler('xNewsletter_accounts')->getCount();
- $start = xNewsletter_CleanVars ( $_REQUEST, 'start', 0, 'int' );
- $criteria->setStart($start);
- $criteria->setLimit($limit);
- $accounts_arr = $xnewsletter->getHandler('xNewsletter_accounts')->getall($criteria);
- if ($numrows > $limit) {
+ //
+ $limit = $xnewsletter->getConfig('adminperpage');
+ $accountsCriteria = new CriteriaCompo();
+ $accountsCriteria->setSort("accounts_id ASC, accounts_type");
+ $accountsCriteria->setOrder("ASC");
+ $accountsCount = $xnewsletter->getHandler('accounts')->getCount();
+ $start = XnewsletterRequest::getInt('start', 0);
+ $accountsCriteria->setStart($start);
+ $accountsCriteria->setLimit($limit);
+ $accountsObjs = $xnewsletter->getHandler('accounts')->getAll($accountsCriteria);
+ if ($accountsCount > $limit) {
include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
- $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=list');
+ $pagenav = new XoopsPageNav($accountsCount, $limit, $start, 'start', 'op=list');
$pagenav = $pagenav->renderNav(4);
} else {
$pagenav = '';
}
// View Table
- if ($numrows > 0) {
+ if ($accountsCount > 0) {
echo "<table class='outer width100' cellspacing='1'>
<tr>
- <th class='center width2'>"._AM_XNEWSLETTER_ACCOUNTS_ID."</th>
- <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_TYPE."</th>
- <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_NAME."</th>
- <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_YOURNAME."</th>
- <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_YOURMAIL."</th>
- <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_DEFAULT."</th>
- <th class='center width10'>"._AM_XNEWSLETTER_FORMACTION."</th>
+ <th class='center width2'>" . _AM_XNEWSLETTER_ACCOUNTS_ID . "</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ACCOUNTS_TYPE . "</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ACCOUNTS_NAME . "</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ACCOUNTS_YOURNAME . "</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ACCOUNTS_YOURMAIL . "</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ACCOUNTS_DEFAULT . "</th>
+ <th class='center width10'>"._AM_XNEWSLETTER_FORMACTION . "</th>
</tr>";
$class = "odd";
- foreach (array_keys($accounts_arr) as $i) {
+ foreach ($accountsObjs as $accounts_id => $accountsObj) {
echo "<tr class='".$class."'>";
$class = ($class == "even") ? "odd" : "even";
- echo "<td class='center'>".$i."</td>";
+ echo "<td class='center'>" . $accounts_id . "</td>";
$arr_accounts_type=array(
- _AM_XNEWSLETTER_ACCOUNTS_TYPE_VAL_PHP_MAIL=>_AM_XNEWSLETTER_ACCOUNTS_TYPE_PHPMAIL,
- _AM_XNEWSLETTER_ACCOUNTS_TYPE_VAL_PHP_SENDMAIL=>_AM_XNEWSLETTER_ACCOUNTS_TYPE_PHPSENDMAIL,
- _AM_XNEWSLETTER_ACCOUNTS_TYPE_VAL_POP3=>_AM_XNEWSLETTER_ACCOUNTS_TYPE_POP3,
- _AM_XNEWSLETTER_ACCOUNTS_TYPE_VAL_SMTP=>_AM_XNEWSLETTER_ACCOUNTS_TYPE_SMTP,
- _AM_XNEWSLETTER_ACCOUNTS_TYPE_VAL_GMAIL=>_AM_XNEWSLETTER_ACCOUNTS_TYPE_GMAIL);
- echo "<td class='center'>". $arr_accounts_type[$accounts_arr[$i]->getVar("accounts_type")]."</td>";
- echo "<td class='center'>".$accounts_arr[$i]->getVar("accounts_name")."</td>";
- echo "<td class='center'>".$accounts_arr[$i]->getVar("accounts_yourname")."</td>";
- echo "<td class='center'>".$accounts_arr[$i]->getVar("accounts_yourmail")."</td>";
- $verif_accounts_default = ( $accounts_arr[$i]->getVar("accounts_default") == 1 ) ? _YES : _NO;
- echo "<td class='center'>".$verif_accounts_default."</td>";
+ _AM_XNEWSLETTER_ACCOUNTS_TYPE_VAL_PHP_MAIL => _AM_XNEWSLETTER_ACCOUNTS_TYPE_PHPMAIL,
+ _AM_XNEWSLETTER_ACCOUNTS_TYPE_VAL_PHP_SENDMAIL => _AM_XNEWSLETTER_ACCOUNTS_TYPE_PHPSENDMAIL,
+ _AM_XNEWSLETTER_ACCOUNTS_TYPE_VAL_POP3 => _AM_XNEWSLETTER_ACCOUNTS_TYPE_POP3,
+ _AM_XNEWSLETTER_ACCOUNTS_TYPE_VAL_SMTP => _AM_XNEWSLETTER_ACCOUNTS_TYPE_SMTP,
+ _AM_XNEWSLETTER_ACCOUNTS_TYPE_VAL_GMAIL => _AM_XNEWSLETTER_ACCOUNTS_TYPE_GMAIL);
+ echo "<td class='center'>" . $arr_accounts_type[$accountsObj->getVar("accounts_type")] . "</td>";
+ echo "<td class='center'>" . $accountsObj->getVar("accounts_name") . "</td>";
+ echo "<td class='center'>" . $accountsObj->getVar("accounts_yourname") . "</td>";
+ echo "<td class='center'>" . $accountsObj->getVar("accounts_yourmail") . "</td>";
+ $verif_accounts_default = ($accountsObj->getVar("accounts_default") == 1) ? _YES : _NO;
+ echo "<td class='center'>" . $verif_accounts_default . "</td>";
echo "<td class='center width5'>";
- echo " <a href='accounts.php?op=edit_account&accounts_id=".$i."'><img src=".XNEWSLETTER_ICONS_URL."/xn_edit.png alt='"._EDIT."' title='"._EDIT."' /></a>";
- echo " <a href='accounts.php?op=delete_account&accounts_id=".$i."'><img src=".XNEWSLETTER_ICONS_URL."/xn_delete.png alt='"._DELETE."' title='"._DELETE."' /></a>";
- if ($accounts_arr[$i]->getVar("accounts_type") != _AM_XNEWSLETTER_ACCOUNTS_TYPE_VAL_PHP_MAIL && $accounts_arr[$i]->getVar("accounts_type") != _AM_XNEWSLETTER_ACCOUNTS_TYPE_VAL_PHP_SENDMAIL) {
- echo " <a href='accounts.php?op=check_account&accounts_id=".$i."'><img src=".XNEWSLETTER_ICONS_URL."/xn_check.png alt='"._AM_XNEWSLETTER_ACCOUNTS_TYPE_CHECK."' title='"._AM_XNEWSLETTER_ACCOUNTS_TYPE_CHECK."' /></a>";
+ echo " <a href='?op=edit_account&accounts_id=" . $accounts_id . "'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_edit.png alt='" . _EDIT . "' title='"._EDIT . "' /></a>";
+ echo " <a href='?op=delete_account&accounts_id=" . $accounts_id . "'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_delete.png alt='" . _DELETE . "' title='" . _DELETE . "' /></a>";
+ if ($accountsObj->getVar("accounts_type") != _AM_XNEWSLETTER_ACCOUNTS_TYPE_VAL_PHP_MAIL && $accountsObj->getVar("accounts_type") != _AM_XNEWSLETTER_ACCOUNTS_TYPE_VAL_PHP_SENDMAIL) {
+ echo " <a href='?op=check_account&accounts_id=". $accounts_id . "'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_check.png alt='" . _AM_XNEWSLETTER_ACCOUNTS_TYPE_CHECK . "' title='" . _AM_XNEWSLETTER_ACCOUNTS_TYPE_CHECK . "' /></a>";
}
echo "</td>";
echo "</tr>";
@@ -256,21 +253,21 @@
} else {
echo "<table class='outer width100' cellspacing='1'>
<tr>
- <th class='center width2'>"._AM_XNEWSLETTER_ACCOUNTS_ID."</th>
- <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_TYPE."</th>
- <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_NAME."</th>
- <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_YOURNAME."</th>
- <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_YOURMAIL."</th>
- <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_USERNAME."</th>
- <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_PASSWORD."</th>
- <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_SERVER_IN."</th>
- <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_PORT_IN."</th>
- <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_SECURETYPE_IN."</th>
- <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_SERVER_OUT."</th>
- <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_PORT_OUT."</th>
- <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_SECURETYPE_OUT."</th>
- <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_DEFAULT."</th>
- <th class='center width10'>"._AM_XNEWSLETTER_FORMACTION."</th>
+ <th class='center width2'>" . _AM_XNEWSLETTER_ACCOUNTS_ID . "</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ACCOUNTS_TYPE . "</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ACCOUNTS_NAME . "</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ACCOUNTS_YOURNAME . "</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ACCOUNTS_YOURMAIL . "</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ACCOUNTS_USERNAME . "</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ACCOUNTS_PASSWORD . "</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ACCOUNTS_SERVER_IN . "</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ACCOUNTS_PORT_IN . "</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ACCOUNTS_SECURETYPE_IN . "</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ACCOUNTS_SERVER_OUT . "</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ACCOUNTS_PORT_OUT . "</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ACCOUNTS_SECURETYPE_OUT . "</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ACCOUNTS_DEFAULT . "</th>
+ <th class='center width10'>" . _AM_XNEWSLETTER_FORMACTION . "</th>
</tr>";
echo "</table><br /><br />";
}
@@ -278,34 +275,35 @@
break;
case "new_account":
- echo $indexAdmin->addNavigation("accounts.php");
- $indexAdmin->addItemButton(_AM_XNEWSLETTER_ACCOUNTSLIST, 'accounts.php?op=list', 'list');
+ echo $indexAdmin->addNavigation($currentFile);
+ $indexAdmin->addItemButton(_AM_XNEWSLETTER_ACCOUNTSLIST, '?op=list', 'list');
echo $indexAdmin->renderButton();
- $accountObj = $xnewsletter->getHandler('xNewsletter_accounts')->create();
- $accountObj = xNewsletter_setPost($accountObj, $_POST);
+ //
+ $accountObj = $xnewsletter->getHandler('accounts')->create();
+ $accountObj = xnewsletter_setPost($accountObj, $_POST);
$form = $accountObj->getForm();
$form->display();
break;
case "save_accounts":
if ( !$GLOBALS["xoopsSecurity"]->check() ) {
- redirect_header("accounts.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
+ redirect_header($currentFile, 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
}
- $accountObj =& $xnewsletter->getHandler('xNewsletter_accounts')->get($accounts_id);
+ $accountObj = $xnewsletter->getHandler('accounts')->get($accounts_id);
$_POST['accounts_id'] = $accounts_id;
- $accountObj = xNewsletter_setPost($accountObj, $_POST);
+ $accountObj = xnewsletter_setPost($accountObj, $_POST);
- $criteria = new CriteriaCompo();
- $criteria->add(new Criteria("accounts_default", 1));
- $count_accounts_default = $xnewsletter->getHandler('xNewsletter_accounts')->getCount($criteria);
+ $accountsCriteria = new CriteriaCompo();
+ $accountsCriteria->add(new Criteria("accounts_default", 1));
+ $count_accounts_default = $xnewsletter->getHandler('accounts')->getCount($accountsCriteria);
if ($count_accounts_default > 0) {
if ($accountObj->getVar("accounts_default") == 1) {
global $xoopsDB;
$verif_accounts_default = "1";
//reset old accounts_default
$sql = "UPDATE `{$xoopsDB->prefix("xnewsletter_accounts")}` SET `accounts_default` = '0'";
- $result= $xoopsDB->query($sql) || die ("MySQL-Error: " . mysql_error());
+ if(!$result = $xoopsDB->query($sql)) die ("MySQL-Error: " . mysql_error());
} else {
$verif_accounts_default = "0";
}
@@ -314,11 +312,11 @@
}
$accountObj->setVar("accounts_default", $verif_accounts_default);
if ($accountObj->getVar("accounts_yourmail") != "" && $accountObj->getVar("accounts_yourmail") != _AM_XNEWSLETTER_ACCOUNTS_TYPE_YOUREMAIL ) {
- if ($xnewsletter->getHandler('xNewsletter_accounts')->insert($accountObj)) {
+ if ($xnewsletter->getHandler('accounts')->insert($accountObj)) {
if ($save_and_check == 'none') {
- redirect_header("accounts.php?op=list", 2, _AM_XNEWSLETTER_FORMOK);
+ redirect_header("?op=list", 2, _AM_XNEWSLETTER_FORMOK);
} else {
- redirect_header("accounts.php?op=check_account&accounts_id={$accountObj->getVar("accounts_id")}", 2, _AM_XNEWSLETTER_FORMOK);
+ redirect_header("?op=check_account&accounts_id={$accountObj->getVar("accounts_id")}", 2, _AM_XNEWSLETTER_FORMOK);
}
}
} else {
@@ -331,32 +329,33 @@
break;
case "edit_account":
- echo $indexAdmin->addNavigation("accounts.php");
- $indexAdmin->addItemButton(_AM_XNEWSLETTER_NEWACCOUNTS, 'accounts.php?op=new_account', 'add');
- $indexAdmin->addItemButton(_AM_XNEWSLETTER_ACCOUNTSLIST, 'accounts.php?op=list', 'list');
+ echo $indexAdmin->addNavigation($currentFile);
+ $indexAdmin->addItemButton(_AM_XNEWSLETTER_NEWACCOUNTS, '?op=new_account', 'add');
+ $indexAdmin->addItemButton(_AM_XNEWSLETTER_ACCOUNTSLIST, '?op=list', 'list');
echo $indexAdmin->renderButton();
- $accountObj = $xnewsletter->getHandler('xNewsletter_accounts')->get($accounts_id);
+ //
+ $accountObj = $xnewsletter->getHandler('accounts')->get($accounts_id);
if (!empty($_POST)) {
- xNewsletter_setPost($accountObj, $_POST);
+ xnewsletter_setPost($accountObj, $_POST);
}
$form = $accountObj->getForm();
$form->display();
break;
case "delete_account":
- $accountObj = $xnewsletter->getHandler('xNewsletter_accounts')->get($accounts_id);
+ $accountObj = $xnewsletter->getHandler('accounts')->get($accounts_id);
if (isset($_POST["ok"]) && $_POST["ok"] == "1") {
if ( !$GLOBALS["xoopsSecurity"]->check() ) {
- redirect_header("accounts.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
+ redirect_header($currentFile, 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
}
- if ($xnewsletter->getHandler('xNewsletter_accounts')->delete($accountObj)) {
- redirect_header("accounts.php", 3, _AM_XNEWSLETTER_FORMDELOK);
+ if ($xnewsletter->getHandler('accounts')->delete($accountObj)) {
+ redirect_header($currentFile, 3, _AM_XNEWSLETTER_FORMDELOK);
} else {
echo $accountObj->getHtmlErrors();
}
} else {
- xoops_confirm(array("ok" => 1, "accounts_id" => $accounts_id, "op" => "delete_account"), "accounts.php", sprintf(_AM_XNEWSLETTER_FORMSUREDEL, $accountObj->getVar("accounts_name")));
+ xoops_confirm(array("ok" => 1, "accounts_id" => $accounts_id, "op" => "delete_account"), $currentFile, sprintf(_AM_XNEWSLETTER_FORMSUREDEL, $accountObj->getVar("accounts_name")));
}
break;
}
-include "admin_footer.php";
+include_once dirname(__FILE__) . '/admin_footer.php';
Modified: XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/admin_footer.php
===================================================================
--- XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/admin_footer.php 2014-06-02 08:21:11 UTC (rev 12560)
+++ XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/admin_footer.php 2014-06-13 13:47:07 UTC (rev 12580)
@@ -19,7 +19,7 @@
* ---------------------------------------------------------------------------
* @copyright Goffy ( wedega.com )
* @license GPL 2.0
- * @package xNewsletter
+ * @package xnewsletter
* @author Goffy ( web...@we... )
*
* Version : $Id $
Modified: XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/admin_header.php
===================================================================
--- XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/admin_header.php 2014-06-02 08:21:11 UTC (rev 12560)
+++ XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/admin_header.php 2014-06-13 13:47:07 UTC (rev 12580)
@@ -19,7 +19,7 @@
* ---------------------------------------------------------------------------
* @copyright Goffy ( wedega.com )
* @license GPL 2.0
- * @package xNewsletter
+ * @package xnewsletter
* @author Goffy ( web...@we... )
*
* Version : $Id $
@@ -31,27 +31,16 @@
// Include xoops admin header
include_once XOOPS_ROOT_PATH . "/include/cp_functions.php";
-/*
-$pathIcon16 = XOOPS_URL . '/' . $xnewsletter->getModule()->getInfo('icons16');
-$pathIcon32 = XOOPS_URL . '/' . $xnewsletter->getModule()->getInfo('icons32');
-$pathModuleAdmin = XOOPS_ROOT_PATH . '/' . $xnewsletter->getModule()->getInfo('dirmoduleadmin');
-require_once $pathModuleAdmin . '/moduleadmin/moduleadmin.php';
-*/
-//$dirname = basename(dirname(dirname(__FILE__)));
-
-//include_once XOOPS_ROOT_PATH . "/modules/" . $xnewsletter->getModule()->dirname() . "/include/functions.php";
-//include_once XOOPS_ROOT_PATH . "/modules/" . $xnewsletter->getModule()->dirname() . "/include/config.php";
-
-//$module_handler =& xoops_gethandler('module');
-$xoopsModule = $xnewsletter->getModule();
-
//Load languages
xoops_loadLanguage('admin', $xnewsletter->getModule()->dirname());
xoops_loadLanguage('modinfo', $xnewsletter->getModule()->dirname());
xoops_loadLanguage('main', $xnewsletter->getModule()->dirname());
-if (!xNewsletter_checkModuleAdmin()) {
+define('XNEWSLETTER_IMG_OK', "<img src='" . XNEWSLETTER_ICONS_URL . "/xn_ok.png' alt='" . _AM_XNEWSLETTER_OK . "' title='"._AM_XNEWSLETTER_OK . "' /> ");
+define('XNEWSLETTER_IMG_FAILED', "<img src='" . XNEWSLETTER_ICONS_URL . "/xn_failed.png' alt='" . _AM_XNEWSLETTER_FAILED . "' title='" . _AM_XNEWSLETTER_FAILED . "' /> ");
+
+if (!xnewsletter_checkModuleAdmin()) {
xoops_cp_header();
echo xoops_error(_AM_XNEWSLETTER_NOFRAMEWORKS);
xoops_cp_footer();
Modified: XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/attachment.php
===================================================================
--- XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/attachment.php 2014-06-02 08:21:11 UTC (rev 12560)
+++ XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/attachment.php 2014-06-13 13:47:07 UTC (rev 12580)
@@ -19,78 +19,80 @@
* ---------------------------------------------------------------------------
* @copyright Goffy ( wedega.com )
* @license GNU General Public License 2.0
- * @package xNewsletter
+ * @package xnewsletter
* @author Goffy ( web...@we... )
*
* Version : $Id $
* ****************************************************************************
*/
-include "admin_header.php";
+$currentFile = basename(__FILE__);
+include_once dirname(__FILE__) . '/admin_header.php';
xoops_cp_header();
-//global $pathIcon, $indexAdmin;
// We recovered the value of the argument op in the URL$
-$op = xNewsletter_CleanVars($_REQUEST, 'op', 'list', 'string');
-$attachment_id = xNewsletter_CleanVars($_REQUEST, 'attachment_id', 0, 'int');
+$op = XnewsletterRequest::getString('op', 'list');
+$attachment_id = XnewsletterRequest::getInt('attachment_id', 0);
switch ($op) {
case "list" :
default :
- echo $indexAdmin->addNavigation('attachment.php');
- $indexAdmin->addItemButton(_AM_XNEWSLETTER_NEWATTACHMENT, 'attachment.php?op=new_attachment', 'add');
+ echo $indexAdmin->addNavigation($currentFile);
+ $indexAdmin->addItemButton(_AM_XNEWSLETTER_NEWATTACHMENT, '?op=new_attachment', 'add');
echo $indexAdmin->renderButton();
- $limit = $GLOBALS['xoopsModuleConfig']['adminperpage'];
- $criteria = new CriteriaCompo();
- $criteria->setSort("attachment_letter_id DESC, attachment_id");
- $criteria->setOrder("DESC");
- $numrows = $xnewsletter->getHandler('xNewsletter_attachment')->getCount();
- $start = xNewsletter_CleanVars ( $_REQUEST, 'start', 0, 'int' );
- $criteria->setStart($start);
- $criteria->setLimit($limit);
- $attachment_arr = $xnewsletter->getHandler('xNewsletter_attachment')->getall($criteria);
- if ($numrows > $limit) {
+ //
+ $limit = $xnewsletter->getConfig('adminperpage');
+ $attachmentCriteria = new CriteriaCompo();
+ $attachmentCriteria->setSort("attachment_letter_id DESC, attachment_id");
+ $attachmentCriteria->setOrder("DESC");
+ $attachmentsCount = $xnewsletter->getHandler('attachment')->getCount();
+ $start = XnewsletterRequest::getInt('start', 0);
+ $attachmentCriteria->setStart($start);
+ $attachmentCriteria->setLimit($limit);
+ $attachmentObjs = $xnewsletter->getHandler('attachment')->getAll($attachmentCriteria);
+ if ($attachmentsCount > $limit) {
include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
- $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=list');
+ $pagenav = new XoopsPageNav($attachmentsCount, $limit, $start, 'start', 'op=list');
$pagenav = $pagenav->renderNav(4);
} else {
$pagenav = '';
}
// View Table
- if ($numrows>0) {
+ if ($attachmentsCount>0) {
echo "
<table class='outer width100' cellspacing='1'>
<tr>
- <th class='center width2'>"._AM_XNEWSLETTER_ATTACHMENT_ID."</th>
- <th class='center'>"._AM_XNEWSLETTER_ATTACHMENT_LETTER_ID."</th>
- <th class='center'>"._AM_XNEWSLETTER_ATTACHMENT_NAME."</th>
- <th class='center'>"._AM_XNEWSLETTER_ATTACHMENT_TYPE."</th>
- <th class='center'>"._AM_XNEWSLETTER_ATTACHMENT_SUBMITTER."</th>
- <th class='center'>"._AM_XNEWSLETTER_ATTACHMENT_CREATED."</th>
- <th class='center width5'>"._AM_XNEWSLETTER_FORMACTION."</th>
+ <th class='center width2'>" . _AM_XNEWSLETTER_ATTACHMENT_ID . "</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ATTACHMENT_LETTER_ID . "</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ATTACHMENT_NAME . "</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ATTACHMENT_TYPE . "</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ATTACHMENT_SUBMITTER . "</th>
+ <th class='center'>" . _AM_XNEWSLETTER_ATTACHMENT_CREATED . "</th>
+ <th class='center width5'>" . _AM_XNEWSLETTER_FORMACTION . "</th>
</tr>
";
$class = "odd";
- foreach (array_keys($attachment_arr) as $i) {
+ foreach ($attachmentObjs as $attachment_id => $attachmentObj) {
echo "<tr class='" . $class . "'>";
$class = ($class == "even") ? "odd" : "even";
- echo "<td class='center'>".$i."</td>";
+ echo "<td class='center'>" . $attachment_id . "</td>";
- $letter =& $xnewsletter->getHandler('xNewsletter_letter')->get($attachment_arr[$i]->getVar("attachment_letter_id"));
+ $letter =& $xnewsletter->getHandler('letter')->get($attachmentObj->getVar("attachment_letter_id"));
$title_letter = $letter->getVar("letter_title");
echo "<td class='center'>" . $title_letter . "</td>";
- echo "<td class='center'>" . $attachment_arr[$i]->getVar("attachment_name") . "</td>";
- echo "<td class='center'>" .$attachment_arr[$i]->getVar("attachment_type")."</td>";
- echo "<td class='center'>" . XoopsUser::getUnameFromId($attachment_arr[$i]->getVar("attachment_submitter"), "S") . "</td>";
- echo "<td class='center'>" . formatTimeStamp($attachment_arr[$i]->getVar("attachment_created"), "S") . "</td>";
+ echo "<td class='center'>" . $attachmentObj->getVar("attachment_name") . "</td>";
+ echo "<td class='center'>" . $attachmentObj->getVar("attachment_type") . "</td>";
+ echo "<td class='center'>" . XoopsUser::getUnameFromId($attachmentObj->getVar("attachment_submitter"), "S") . "</td>";
+ echo "<td class='center'>" . formatTimeStamp($attachmentObj->getVar("attachment_created"), "S") . "</td>";
echo "
<td class='center width5' nowrap='nowrap'>
- <a href='attachment.php?op=edit_attachment&attachment_id=" . $i . "'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_edit.png alt='" . _EDIT . "' title='" . _EDIT . "' /></a>
- <a href='attachment.php?op=delete_attachment&attachment_id=" . $i . "'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_delete.png alt='" . _DELETE . "' title='" . _DELETE . "' /></a>
+ <a href='?op=edit_attachment&attachment_id=" . $attachment_id . "'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_edit.png alt='" . _EDIT . "' title='" . _EDIT . "' /></a>
+
+ <a href='?op=delete_attachment&attachment_id=" . $attachment_id . "'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_delete.png alt='" . _DELETE . "' title='" . _DELETE . "' /></a>
</td>
";
echo "</tr>";
@@ -115,65 +117,61 @@
break;
case "new_attachment" :
- echo $indexAdmin->addNavigation("attachment.php");
- $indexAdmin->addItemButton(_AM_XNEWSLETTER_ATTACHMENTLIST, 'attachment.php?op=list', 'list');
+ echo $indexAdmin->addNavigation($currentFile);
+ $indexAdmin->addItemButton(_AM_XNEWSLETTER_ATTACHMENTLIST, '?op=list', 'list');
echo $indexAdmin->renderButton();
-
- $obj =& $xnewsletter->getHandler('xNewsletter_attachment')->create();
- $form = $obj->getForm();
+ //
+ $attachmentObj = $xnewsletter->getHandler('attachment')->create();
+ $form = $attachmentObj->getForm();
$form->display();
break;
case "save_attachment" :
if (!$GLOBALS["xoopsSecurity"]->check()) {
- redirect_header("attachment.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
+ redirect_header($currentFile, 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
}
- $obj =& $xnewsletter->getHandler('xNewsletter_attachment')->get($attachment_id);
- //Form attachment_letter_id
- $obj->setVar("attachment_letter_id", xNewsletter_CleanVars($_REQUEST, "attachment_letter_id", 0, "int"));
- //Form attachment_name
- $obj->setVar("attachment_name", xNewsletter_CleanVars($_REQUEST, "attachment_name", "", "string"));
- //Form attachment_type
- $obj->setVar("attachment_type", xNewsletter_CleanVars($_REQUEST, "attachment_type", 0, "int"));
- //Form attachment_submitter
- $obj->setVar("attachment_submitter", xNewsletter_CleanVars($_REQUEST, "attachment_submitter", 0, "int"));
- //Form attachment_created
- $obj->setVar("attachment_created", xNewsletter_CleanVars($_REQUEST, "attachment_created", time(), "int"));
+ $attachmentObj = $xnewsletter->getHandler('attachment')->get($attachment_id);
+ $attachmentObj->setVar("attachment_letter_id", XnewsletterRequest::getInt('attachment_letter_id', 0));
+ $attachmentObj->setVar("attachment_name", XnewsletterRequest::getString('attachment_name', ''));
+ $attachmentObj->setVar("attachment_type", XnewsletterRequest::getInt('attachment_type', 0));
+ $attachmentObj->setVar("attachment_submitter", XnewsletterRequest::getInt('attachment_submitter', 0));
+ $attachmentObj->setVar("attachment_created", XnewsletterRequest::getInt('attachment_created', time()));
- if ($xnewsletter->getHandler('xNewsletter_attachment')->insert($obj)) {
- redirect_header("attachment.php?op=list", 2, _AM_XNEWSLETTER_FORMOK);
+ if ($xnewsletter->getHandler('attachment')->insert($attachmentObj)) {
+ redirect_header("?op=list", 2, _AM_XNEWSLETTER_FORMOK);
}
- echo $obj->getHtmlErrors();
- $form =& $obj->getForm();
+ echo $attachmentObj->getHtmlErrors();
+ $form = $attachmentObj->getForm();
$form->display();
break;
case "edit_attachment" :
- echo $indexAdmin->addNavigation("attachment.php");
- $indexAdmin->addItemButton(_AM_XNEWSLETTER_NEWATTACHMENT, 'attachment.php?op=new_attachment', 'add');
- $indexAdmin->addItemButton(_AM_XNEWSLETTER_ATTACHMENTLIST, 'attachment.php?op=list', 'list');
+ echo $indexAdmin->addNavigation($currentFile);
+ $indexAdmin->addItemButton(_AM_XNEWSLETTER_NEWATTACHMENT, '?op=new_attachment', 'add');
+ $indexAdmin->addItemButton(_AM_XNEWSLETTER_ATTACHMENTLIST, '?op=list', 'list');
echo $indexAdmin->renderButton();
- $obj = $xnewsletter->getHandler('xNewsletter_attachment')->get($attachment_id);
- $form = $obj->getForm();
+ //
+ $attachmentObj = $xnewsletter->getHandler('attachment')->get($attachment_id);
+ $form = $attachmentObj->getForm();
$form->display();
break;
case "delete_attachment" :
- $obj =& $xnewsletter->getHandler('xNewsletter_attachment')->get($attachment_id);
+ $attachmentObj = $xnewsletter->getHandler('attachment')->get($attachment_id);
if (isset($_POST["ok"]) && $_POST["ok"] == 1) {
if (!$GLOBALS["xoopsSecurity"]->check()) {
- redirect_header("attachment.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
+ redirect_header($currentFile, 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
}
- if ($xnewsletter->getHandler('xNewsletter_attachment')->delete($obj)) {
- redirect_header("attachment.php", 3, _AM_XNEWSLETTER_FORMDELOK);
+ if ($xnewsletter->getHandler('attachment')->delete($attachmentObj)) {
+ redirect_header($currentFile, 3, _AM_XNEWSLETTER_FORMDELOK);
} else {
- echo $obj->getHtmlErrors();
+ echo $attachmentObj->getHtmlErrors();
}
} else {
- xoops_confirm(array("ok" => 1, "attachment_id" => $attachment_id, "op" => "delete_attachment"), $_SERVER["REQUEST_URI"], sprintf(_AM_XNEWSLETTER_FORMSUREDEL, $obj->getVar("attachment_letter_id")));
+ xoops_confirm(array("ok" => 1, "attachment_id" => $attachment_id, "op" => "delete_attachment"), $_SERVER["REQUEST_URI"], sprintf(_AM_XNEWSLETTER_FORMSUREDEL, $attachmentObj->getVar("attachment_letter_id")));
}
break;
}
-include "admin_footer.php";
+include_once dirname(__FILE__) . '/admin_footer.php';
Modified: XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/bmh.php
===================================================================
--- XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/bmh.php 2014-06-02 08:21:11 UTC (rev 12560)
+++ XoopsModules/xnewsletter/branches/mamba/xnewsletter2/admin/bmh.php 2014-06-13 13:47:07 UTC (rev 12580)
@@ -19,137 +19,132 @@
* ---------------------------------------------------------------------------
* @copyright Goffy ( wedega.com )
* @license GNU General Public License 2.0
- * @package xNewsletter
+ * @package xnewsletter
* @author Goffy ( web...@we... )
*
* Version : $Id $
* ****************************************************************************
*/
-include "admin_header.php";
+$currentFile = basename(__FILE__);
+include_once dirname(__FILE__) . '/admin_header.php';
xoops_cp_header();
-//global $indexAdmin;
// We recovered the value of the argument op in the URL$
-$op = xNewsletter_CleanVars($_REQUEST, 'op', 'list', 'string');
-$bmh_id = xNewsletter_CleanVars($_REQUEST, 'bmh_id', 0, 'int');
-$bmh_measure = xNewsletter_CleanVars($_REQUEST, 'bmh_measure', 0, 'int');
-$filter = xNewsletter_CleanVars($_REQUEST, 'bmh_measure_filter', _AM_XNEWSLETTER_BMH_MEASURE_VAL_ALL, 'int');
+$op = XnewsletterRequest::getString('op', 'list');
+$bmh_id = XnewsletterRequest::getInt('bmh_id', 0);
+$bmh_measure = XnewsletterRequest::getInt('bmh_measure', 0);
+$filter = XnewsletterRequest::getInt('bmh_measure_filter', _AM_XNEWSLETTER_BMH_MEASURE_VAL_ALL);
-switch ($op)
-{
-case "bmh_delsubscr":
+switch ($op) {
+ case "bmh_delsubscr":
+ if ((isset($_POST["ok"]) && $_POST["ok"] == 1)) {
+ $count_err = 0;
- if ( (isset($_POST["ok"]) && $_POST["ok"] == 1) ) {
- $count_err = 0;
+ $bmhObj = $xnewsletter->getHandler('bmh')->get($bmh_id);
+ $bmh_email = $bmhObj->getVar("bmh_email");
- $obj_bmh =& $xnewsletter->getHandler('xNewsletter_bmh')->get($bmh_id);
- $bmh_email = $obj_bmh->getVar("bmh_email");
+ $sql = "SELECT subscr_id FROM " . $xoopsDB->prefix("xnewsletter_subscr") . " WHERE (";
+ $sql .= "subscr_email='" . $bmh_email . "'";
+ $sql .= ") LIMIT 1;";
+ if ( $user = $xoopsDB->query($sql) ) {
+ $row_user = $xoopsDB->fetchRow($user);
+ $subscr_id = intval($row_user[0]);
+ }
+ if ($subscr_id == 0) {
+ //set bmh_measure for all entries in bmh with this email
+ $sql_upd_measure = "UPDATE " . $xoopsDB->prefix("xnewsletter_bmh") . " SET `bmh_measure` = '" . _AM_XNEWSLETTER_BMH_MEASURE_VAL_NOTHING . "'";
+ $sql_upd_measure .=" WHERE ((`" . $xoopsDB->prefix("xnewsletter_bmh") . "`.`bmh_email` ='" . $bmh_email . "') AND (`" . $xoopsDB->prefix("xnewsletter_bmh") . "`.`bmh_measure` ='0'))";
+ $xoopsDB->query($sql_upd_measure);
+ redirect_header("?op=list", 5, _AM_XNEWSLETTER_BMH_ERROR_NO_SUBSCRID);
+ }
+ $subscrObj = $xnewsletter->getHandler('subscr')->get($subscr_id);
- $sql = "SELECT subscr_id FROM " . $xoopsDB->prefix("xnewsletter_subscr") . " WHERE (";
- $sql .= "subscr_email='" . $bmh_email . "'";
- $sql .= ") LIMIT 1;";
- if ( $user = $xoopsDB->query($sql) ) {
- $row_user = $xoopsDB->fetchRow($user);
- $subscr_id = intval($row_user[0]);
- }
- if ($subscr_id == 0) {
- //set bmh_measure for all entries in bmh with this email
- $sql_upd_measure = "UPDATE ".$xoopsDB->prefix("xnewsletter_bmh")." SET `bmh_measure` = '"._AM_XNEWSLETTER_BMH_MEASURE_VAL_NOTHING."'";
- $sql_upd_measure .=" WHERE ((`".$xoopsDB->prefix("xnewsletter_bmh")."`.`bmh_email` ='".$bmh_email."') AND (`".$xoopsDB->prefix("xnewsletter_bmh")."`.`bmh_measure` ='0'))";
- $xoopsDB->query($sql_upd_measure);
- redirect_header("bmh.php?op=list", 5, _AM_XNEWSLETTER_BMH_ERROR_NO_SUBSCRID);
- }
- $obj_subscr =& $xnewsletter->getHandler('xNewsletter_subscr')->get($subscr_id);
+ // delete subscriber
+ if (!$xnewsletter->getHandler('subscr')->delete($subscrObj,true)) {
+ $actionprot_err = $subscrObj->getHtmlErrors()."<br/><br/><br/>";
+ ++$count_err;
+ }
- // delete subscriber
- if (!$xnewsletter->getHandler('xNewsletter_subscr')->delete($obj_subscr,true)) {
- $actionprot_err = $obj_subscr->getHtmlErrors()."<br/><br/><br/>";
- ++$count_err;
- }
+ //delete subscription
+ $catsubscrCriteria = new CriteriaCompo();
+ $catsubscrCriteria->add(new Criteria('catsubscr_subscrid', $subscr_id));
+ $catsubscrsCount = $xnewsletter->getHandler('catsubscr')->getCount($catsubscrCriteria);
+ if ($catsubscrsCount > 0) {
+ $catsubscrObjs = $xnewsletter->getHandler('catsubscr')->getAll($catsubscrCriteria);
+ foreach ($catsubscrObjs as $catsubscr_id => $catsubscrObj) {
+ $catsubscrObj = $xnewsletter->getHandler('catsubscr')->get($catsubscrObj->getVar("catsubscr_id"));
+ $catObj = $xnewsletter->getHandler('cat')->get($catsubscrObj->getVar("catsubscr_catid"));
+ $cat_mailinglist = $catObj->getVar("cat_mailinglist");
- //delete subscription
- $crit_catsubscr = new CriteriaCompo();
- $crit_catsubscr->add(new Criteria('catsubscr_subscrid', $subscr_id));
- $numrows_catsubscr = $xnewsletter->getHandler('xNewsletter_catsubscr')->getCount($crit_catsubscr);
- if ($numrows_catsubscr > 0) {
- $catsubscr_arr = $xnewsletter->getHandler('xNewsletter_catsubscr')->getall($crit_catsubscr);
- foreach (array_keys($catsubscr_arr) as $cat) {
- $obj_catsubscr =& $xnewsletter->getHandler('xNewsletter_catsubscr')->get($catsubscr_arr[$cat]->getVar("catsubscr_id"));
- $obj_cat =& $xnewsletter->getHandler('xNewsletter_cat')->get($catsubscr_arr[$cat]->getVar("catsubscr_catid"));
- $cat_mailinglist = $obj_cat->getVar("cat_mailinglist");
+ if ($xnewsletter->getHandler('catsubscr...
[truncated message content] |
|
From: <txm...@us...> - 2014-06-11 15:51:25
|
Revision: 12579
http://sourceforge.net/p/xoops/svn/12579
Author: txmodxoops
Date: 2014-06-11 15:51:20 +0000 (Wed, 11 Jun 2014)
Log Message:
-----------
- Fixed many bugs
- Updated
- Work in progress
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/blocks.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/modinfo.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/install.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/xoops_version.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-06-11 14:50:43 UTC (rev 12578)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-06-11 15:51:20 UTC (rev 12579)
@@ -52,6 +52,7 @@
$GLOBALS['xoopsTpl']->assign('tdmc_url', TDMC_URL);
$GLOBALS['xoopsTpl']->assign('tdmc_icons_url', TDMC_ICONS_URL);
$GLOBALS['xoopsTpl']->assign('tdmc_upload_url', TDMC_UPLOAD_URL);
+ $GLOBALS['xoopsTpl']->assign('tdmc_upload_imgtab_url', TDMC_UPLOAD_IMGTAB_URL);
$GLOBALS['xoopsTpl']->assign('modPathIcon16', $modPathIcon16);
$GLOBALS['xoopsTpl']->assign('sysPathIcon32', $sysPathIcon32);
//var_dump($sysPathIcon32);
@@ -160,35 +161,19 @@
}
$fieldelement_fid = TDMCreateRequest::getInt('fieldelement_fid');
//
- if (isset($field_tid)) {
- //$fieldsObj =& $tdmcreate->getHandler('fields')->get($field_tid);
+ if (isset($field_id)) {
+ $fieldsObj =& $tdmcreate->getHandler('fields')->get($field_tid);
if (isset($fieldelement_fid)) {
$fieldelementObj =& $tdmcreate->getHandler('fieldelements')->get($fieldelement_fid);
}
} else {
- //$fieldsObj =& $tdmcreate->getHandler('fields')->create();
+ $fieldsObj =& $tdmcreate->getHandler('fields')->create();
$fieldelementObj =& $tdmcreate->getHandler('fieldelements')->create();
}
- // Set Variables
- $isNew = false;
- if ($field_numb > 0) {
- $fields =& $tdmcreate->getHandler('fields')->get($field_tid);
- foreach($field_id as $i => $value)
- {
- switch($value){
- case 'new':
- $fieldsObj = $tdmcreate->getHandler('fields')->create();
- $fieldelementObj =& $tdmcreate->getHandler('fieldelements')->create();
- $isNew = true;
- break;
- default:
- $fieldsObj = $tdmcreate->getHandler('fields')->get($value);
- $fieldelementObj =& $tdmcreate->getHandler('fieldelements')->get($fieldelement_fid);
- break;
- }
- //}
- //for( $i = 1; $i <= $field_numb; $i++ ) {
- // Set Data
+ //
+ if ($fieldsObj->isNew()) {
+ for( $i = 1; $i <= $field_numb; $i++ ) {
+ //
$fieldsObj->setVar( 'field_mid', $field_mid );
$fieldsObj->setVar( 'field_tid', $field_tid );
$fieldsObj->setVar( 'field_numb', $field_numb );
@@ -199,7 +184,7 @@
$fieldsObj->setVar( 'field_null', (isset($_POST['field_null'][$i]) ? $_POST['field_null'][$i] : '') );
$fieldsObj->setVar( 'field_default', (isset($_POST['field_default'][$i]) ? $_POST['field_default'][$i] : '') );
$fieldsObj->setVar( 'field_key', (isset($_POST['field_key'][$i]) ? $_POST['field_key'][$i] : '') );
- $fieldsObj->setVar( 'field_element', (isset($_POST['field_element'][$i]) ? $_POST['field_element'][$i] : '') );
+ $fieldsObj->setVar( 'field_element', (isset($_POST['field_element'][$i]) ? $_POST['field_element'][$i] : '') );
$fieldsObj->setVar( 'field_parent', (($i == isset($_REQUEST['field_parent'])) ? '1' : '0') );
$fieldsObj->setVar( 'field_inlist', ((isset($_REQUEST['field_inlist'][$i]) == 1) ? '1' : '0') );
$fieldsObj->setVar( 'field_inform', ((isset($_REQUEST['field_inform'][$i]) == 1) ? '1' : '0') );
@@ -211,33 +196,77 @@
$fieldsObj->setVar( 'field_required', ((isset($_REQUEST['field_required'][$i]) == 1) ? '1' : '0') );
// Insert Data
$tdmcreate->getHandler('fields')->insert($fieldsObj);
- }
- }
- $fieldelementObj->setVar( 'fieldelement_mid', $field_mid );
- $fieldelementObj->setVar( 'fieldelement_tid', $field_tid );
- $fieldelementObj->setVar( 'fieldelement_name', 'Table : '.ucfirst($table_name) );
- $fieldelementObj->setVar( 'fieldelement_value', 'XoopsFormTables-'.ucfirst($table_name) );
- // Insert new field element id for table name
- if (!$tdmcreate->getHandler('fieldelements')->insert($fieldelementObj) ) {
- $GLOBALS['xoopsTpl']->assign('error', $fieldelementObj->getHtmlErrors() . ' Field element');
- }
- //
- if ($isNew) {
+ }
redirect_header('fields.php', 2, sprintf(_AM_TDMCREATE_FIELD_FORM_SAVED_OK, $table_name));
+ $GLOBALS['xoopsTpl']->assign('error', $fieldsObj->getHtmlErrors());
+ $form = $fieldsObj->getForm($field_mid, $field_tid, $field_numb);
+ $GLOBALS['xoopsTpl']->assign('form', $form->render());
+
+ $fieldelementObj->setVar( 'fieldelement_mid', $field_mid );
+ $fieldelementObj->setVar( 'fieldelement_tid', $field_tid );
+ $fieldelementObj->setVar( 'fieldelement_name', 'Table : '.ucfirst($table_name) );
+ $fieldelementObj->setVar( 'fieldelement_value', 'XoopsFormTables-'.ucfirst($table_name) );
+ // Insert new field element id for table name
+ if (!$tdmcreate->getHandler('fieldelements')->insert($fieldelementObj) ) {
+ $GLOBALS['xoopsTpl']->assign('error', $fieldelementObj->getHtmlErrors() . ' Field element');
+ }
} else {
+ foreach($field_id as $id => $value)
+ {
+ switch($value){
+ case 'new':
+ $fieldsObj = $tdmcreate->getHandler('fields')->create();
+ $fieldelementObj =& $tdmcreate->getHandler('fieldelements')->create();
+ $isNew = true;
+ break;
+ default:
+ $fieldsObj = $tdmcreate->getHandler('fields')->get($value);
+ $fieldelementObj =& $tdmcreate->getHandler('fieldelements')->get($fieldelement_fid);
+ break;
+ }
+ // Set Data
+ $fieldsObj->setVar( 'field_mid', $field_mid[$id]);
+ $fieldsObj->setVar( 'field_tid', $field_tid[$id]);
+ $fieldsObj->setVar( 'field_numb', $field_numb[$id]);
+ $fieldsObj->setVar( 'field_name', $field_name[$id]);
+ $fieldsObj->setVar( 'field_type', $field_type[$id]);
+ $fieldsObj->setVar( 'field_value', $field_value[$id]);
+ $fieldsObj->setVar( 'field_attribute', $field_attribute[$id]);
+ $fieldsObj->setVar( 'field_null', $field_null[$id]);
+ $fieldsObj->setVar( 'field_default', $field_default[$id]);
+ $fieldsObj->setVar( 'field_key', $field_key[$id]);
+ $fieldsObj->setVar( 'field_element', $field_element[$id]);
+ $fieldsObj->setVar( 'field_parent', $id == $field_parent[$id]);
+ $fieldsObj->setVar( 'field_inlist', $field_inlist[$id]);
+ $fieldsObj->setVar( 'field_inform', $field_inform[$id]);
+ $fieldsObj->setVar( 'field_admin', $field_admin[$id]);
+ $fieldsObj->setVar( 'field_user', $field_user[$id]);
+ $fieldsObj->setVar( 'field_block', $field_block[$id]);
+ $fieldsObj->setVar( 'field_main', $id == $field_main[$id]);
+ $fieldsObj->setVar( 'field_search', $field_search[$id]);
+ $fieldsObj->setVar( 'field_required', $field_required[$id]);
+ // Insert Data
+ $tdmcreate->getHandler('fields')->insert($fieldsObj);
+ }
redirect_header('fields.php', 2, sprintf(_AM_TDMCREATE_FIELD_FORM_UPDATED_OK, $table_name));
- }
- //
- $GLOBALS['xoopsTpl']->assign('error', $fieldsObj->getHtmlErrors());
- $form = $fieldsObj->getForm($field_mid, $field_tid, $field_numb);
- $GLOBALS['xoopsTpl']->assign('form', $form->render());
+ $GLOBALS['xoopsTpl']->assign('error', $fieldsObj->getHtmlErrors());
+ $form = $fieldsObj->getForm($field_mid, $field_tid, $field_numb);
+ $GLOBALS['xoopsTpl']->assign('form', $form->render());
+
+ $fieldelementObj->setVar( 'fieldelement_mid', $field_mid );
+ $fieldelementObj->setVar( 'fieldelement_tid', $field_tid );
+ $fieldelementObj->setVar( 'fieldelement_name', $_REQUEST['fieldelement_name'] );
+ $fieldelementObj->setVar( 'fieldelement_value', $_REQUEST['fieldelement_value'] );
+ // Insert new field element id for table name
+ if (!$tdmcreate->getHandler('fieldelements')->insert($fieldelementObj) ) {
+ $GLOBALS['xoopsTpl']->assign('error', $fieldelementObj->getHtmlErrors() . ' Field element');
+ }
+ }
break;
case 'edit':
// Define main template
$template_main = 'fields.tpl';
- $GLOBALS['xoTheme']->addStylesheet( 'modules/TDMCreate/assets/css/admin/style.css' );
- $GLOBALS['xoTheme']->addScript('modules/TDMCreate/assets/js/fields.js');
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('fields.php'));
$adminMenu->addItemButton(_AM_TDMCREATE_ADD_TABLE, 'tables.php?op=new', 'add');
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php', 'list');
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-06-11 14:50:43 UTC (rev 12578)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-06-11 15:51:20 UTC (rev 12579)
@@ -46,7 +46,7 @@
$GLOBALS['xoopsTpl']->assign('tdmc_url', TDMC_URL);
$GLOBALS['xoopsTpl']->assign('tdmc_icons_url', TDMC_ICONS_URL);
$GLOBALS['xoopsTpl']->assign('tdmc_upload_imgmod_url', TDMC_UPLOAD_IMGMOD_URL);
- //$GLOBALS['xoopsTpl']->assign('tdmc_upload_imgtab_url', TDMC_UPLOAD_IMGTAB_URL);
+ $GLOBALS['xoopsTpl']->assign('tdmc_upload_imgtab_url', TDMC_UPLOAD_IMGTAB_URL);
$GLOBALS['xoopsTpl']->assign('modPathIcon16', $modPathIcon16);
$GLOBALS['xoopsTpl']->assign('sysPathIcon32', $sysPathIcon32);
// Get the list of modules
@@ -171,7 +171,7 @@
$uploader = new XoopsMediaUploader($uploaddir, $tdmcreate->getConfig('mimetypes'),
$tdmcreate->getConfig('maxsize'), null, null);
if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
- $extension = preg_replace( '/^.+\.([^.]+)$/sU' , '\\1' , $_FILES['table_image']['name']);
+ $extension = preg_replace( '/^.+\.([^.]+)$/sU' , '\\1' , $_FILES['attachedfile']['name']);
$name_img = $_POST['table_name'].'.'.$extension;
$uploader->setPrefix($name_img);
$uploader->fetchMedia($_POST['xoops_upload_file'][0]);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-06-11 14:50:43 UTC (rev 12578)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-06-11 15:51:20 UTC (rev 12579)
@@ -132,113 +132,222 @@
$fields = $this->tdmcreate->getHandler('fields')->getObjects($criteria);
unset($criteria);
//var_dump($field_numb);
- $class = ''; $id = 1;
- foreach ($fields as $field)
- {
- $form->addElement(new XoopsFormHidden('field_id['.$id.']', $field->getVar('field_id')));
- $form->addElement(new XoopsFormHidden('field_mid', $field_mid));
- $form->addElement(new XoopsFormHidden('field_tid', $field_tid));
- $form->addElement(new XoopsFormHidden('field_numb', $field_numb));
+ $class = '';
+ if($isNew) {
+ for($i = 1; $i <= $field_numb; $i++)
+ {
+ $form->addElement(new XoopsFormHidden('field_id['.$i.']', 'new'));
+ $form->addElement(new XoopsFormHidden('field_mid', $field_mid));
+ $form->addElement(new XoopsFormHidden('field_tid', $field_tid));
+ $form->addElement(new XoopsFormHidden('field_numb', $field_numb));
- $class = ($class == 'even') ? 'odd' : 'even';
- $form->addElement(new TDMCreateFormLabel('<tr class="'.$class.'">'));
- // Index ID
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$id.'</td>'));
- // Field Name
- $this_field_name = $isNew ? (!empty($f_name) ? $f_name . '_' : '') : $field->getVar('field_name');
- $field_name = new XoopsFormText(_AM_TDMCREATE_FIELD_NAME, 'field_name['.$id.']', 15, 255, $this_field_name);
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_name->render().'</td>'));
- // Field Type
- $fieldtype_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_type['.$id.']', $field->getVar('field_type'));
- $fieldtype_select->addOptionArray($this->tdmcreate->getHandler('fieldtype')->getList());
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$fieldtype_select->render().'</td>'));
- // Field Value
- $field_value = new XoopsFormText(_AM_TDMCREATE_FIELD_VALUE, 'field_value['.$id.']', 5, 20, $field->getVar('field_value'));
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_value->render().'</td>'));
- // Field Attributes
- $field_attributes_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_attribute['.$id.']', $field->getVar('field_attribute'));
- $field_attributes_select->addOptionArray($this->tdmcreate->getHandler('fieldattributes')->getList());
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_attributes_select->render().'</td>'));
- // Field Null
- $field_null_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_NULL, 'field_null['.$id.']', $field->getVar('field_null'));
- $field_null_select->addOptionArray($this->tdmcreate->getHandler('fieldnull')->getList());
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_null_select->render().'</td>'));
- // Field Default
- $field_default = new XoopsFormText(_AM_TDMCREATE_FIELD_DEFAULT, 'field_default['.$id.']', 15, 25, $field->getVar('field_default'));
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_default->render().'</td>'));
- // Field Key
- $field_key_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_KEY, 'field_key['.$id.']', $field->getVar('field_key'));
- $field_key_select->addOptionArray($this->tdmcreate->getHandler('fieldkey')->getList());
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_key_select->render().'</td>'));
- // Field Void
- $table_autoincrement = $this->tdmcreate->getHandler('tables')->get($f_tid);
- if( ($id == 1) && ($table_autoincrement->getVar('table_autoincrement') == 1)) {
- $form->addElement(new TDMCreateFormLabel('<td> </td></tr>'));
- } else {
- // Box header row
- $parameters_tray = new XoopsFormElementTray('', '<br />');
- /*$parameters_header = new TDMCreateFormLabel('<div class="portlet"><div class="portlet-header">_AM_TDMCREATE_FIELD_PARAMETERS_LIST</div></div>')
- $parameters_tray->addElement($parameters_header); */
- // Field Elements
- $criteria_element = new CriteriaCompo();
- $criteria_element->add(new Criteria('fieldelement_tid', 0));
- $criteria_table = new CriteriaCompo();
- $criteria_table->add(new Criteria('fieldelement_mid', $field_mid));
- $field_elements_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element['.$id.']', $field->getVar('field_element'));
- $field_elements_select->addOptionArray($this->tdmcreate->getHandler('fieldelements')->getList($criteria_element));
- $field_elements_select->addOptionArray($this->tdmcreate->getHandler('fieldelements')->getList($criteria_table));
- unset($criteria_element); unset($criteria_table);
- $parameters_tray->addElement($field_elements_select);
-
- $field_parent = $isNew ? ( $id == 1 ? 1 : 0 ) : $field->getVar('field_parent');
- $check_field_parent = new XoopsFormCheckBox(' ', 'field_parent', $field_parent);
- $check_field_parent->addOption($id, _AM_TDMCREATE_FIELD_PARENT );
- $parameters_tray->addElement($check_field_parent);
+ $class = ($class == 'even') ? 'odd' : 'even';
+ $form->addElement(new TDMCreateFormLabel('<tr class="'.$class.'">'));
+ // Index ID
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$i.'</td>'));
+ // Field Name
+ $this_field_name = $isNew ? (!empty($f_name) ? $f_name . '_' : '') : $this->getVar('field_name');
+ $field_name = new XoopsFormText(_AM_TDMCREATE_FIELD_NAME, 'field_name['.$i.']', 15, 255, $this_field_name);
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_name->render().'</td>'));
+ // Field Type
+ $fieldtype_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_type['.$i.']', $this->getVar('field_type'));
+ $fieldtype_select->addOptionArray($this->tdmcreate->getHandler('fieldtype')->getList());
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$fieldtype_select->render().'</td>'));
+ // Field Value
+ $field_value = new XoopsFormText(_AM_TDMCREATE_FIELD_VALUE, 'field_value['.$i.']', 5, 20, $this->getVar('field_value'));
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_value->render().'</td>'));
+ // Field Attributes
+ $field_attributes_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_attribute['.$i.']', $this->getVar('field_attribute'));
+ $field_attributes_select->addOptionArray($this->tdmcreate->getHandler('fieldattributes')->getList());
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_attributes_select->render().'</td>'));
+ // Field Null
+ $field_null_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_NULL, 'field_null['.$i.']', $this->getVar('field_null'));
+ $field_null_select->addOptionArray($this->tdmcreate->getHandler('fieldnull')->getList());
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_null_select->render().'</td>'));
+ // Field Default
+ $field_default = new XoopsFormText(_AM_TDMCREATE_FIELD_DEFAULT, 'field_default['.$i.']', 15, 25, $this->getVar('field_default'));
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_default->render().'</td>'));
+ // Field Key
+ $field_key_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_KEY, 'field_key['.$i.']', $this->getVar('field_key'));
+ $field_key_select->addOptionArray($this->tdmcreate->getHandler('fieldkey')->getList());
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_key_select->render().'</td>'));
+ // Field Void
+ $table_autoincrement = $this->tdmcreate->getHandler('tables')->get($f_tid);
+ if( ($i == 1) && ($table_autoincrement->getVar('table_autoincrement') == 1)) {
+ $form->addElement(new TDMCreateFormLabel('<td> </td></tr>'));
+ } else {
+ // Box header row
+ $parameters_tray = new XoopsFormElementTray('', '<br />');
+ /*$parameters_header = new TDMCreateFormLabel('<div class="portlet"><div class="portlet-header">_AM_TDMCREATE_FIELD_PARAMETERS_LIST</div></div>')
+ $parameters_tray->addElement($parameters_header); */
+ // Field Elements
+ $criteria_element = new CriteriaCompo();
+ $criteria_element->add(new Criteria('fieldelement_tid', 0));
+ $criteria_table = new CriteriaCompo();
+ $criteria_table->add(new Criteria('fieldelement_mid', $field_mid));
+ $field_elements_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element['.$i.']', $this->getVar('field_element'));
+ $field_elements_select->addOptionArray($this->tdmcreate->getHandler('fieldelements')->getList($criteria_element));
+ $field_elements_select->addOptionArray($this->tdmcreate->getHandler('fieldelements')->getList($criteria_table));
+ unset($criteria_element); unset($criteria_table);
+ $parameters_tray->addElement($field_elements_select);
+
+ $field_parent = $isNew ? ( $i == 1 ? 1 : 0 ) : $this->getVar('field_parent');
+ $check_field_parent = new XoopsFormCheckBox(' ', 'field_parent', $field_parent);
+ $check_field_parent->addOption($i, _AM_TDMCREATE_FIELD_PARENT );
+ $parameters_tray->addElement($check_field_parent);
+
+ $field_inlist = $isNew ? 0 : $this->getVar('field_inlist');
+ $check_field_inlist = new XoopsFormCheckBox(' ', 'field_inlist['.$i.']', $field_inlist);
+ $check_field_inlist->addOption(1, _AM_TDMCREATE_FIELD_INLIST);
+ $parameters_tray->addElement($check_field_inlist);
- $field_inlist = $isNew ? 0 : $field->getVar('field_inlist');
- $check_field_inlist = new XoopsFormCheckBox(' ', 'field_inlist['.$id.']', $field_inlist);
- $check_field_inlist->addOption(1, _AM_TDMCREATE_FIELD_INLIST);
- $parameters_tray->addElement($check_field_inlist);
-
- $field_inform = $isNew ? 0 : $field->getVar('field_inform');
- $check_field_inform = new XoopsFormCheckBox(' ', 'field_inform['.$id.']', $field_inform);
- $check_field_inform->addOption(1, _AM_TDMCREATE_FIELD_INFORM);
- $parameters_tray->addElement($check_field_inform);
+ $field_inform = $isNew ? 0 : $this->getVar('field_inform');
+ $check_field_inform = new XoopsFormCheckBox(' ', 'field_inform['.$i.']', $field_inform);
+ $check_field_inform->addOption(1, _AM_TDMCREATE_FIELD_INFORM);
+ $parameters_tray->addElement($check_field_inform);
- $field_admin = $isNew ? 0 : $field->getVar('field_admin');
- $check_field_admin = new XoopsFormCheckBox(' ', 'field_admin['.$id.']', $field_admin);
- $check_field_admin->addOption(1, _AM_TDMCREATE_FIELD_ADMIN);
- $parameters_tray->addElement($check_field_admin);
+ $field_admin = $isNew ? 0 : $this->getVar('field_admin');
+ $check_field_admin = new XoopsFormCheckBox(' ', 'field_admin['.$i.']', $field_admin);
+ $check_field_admin->addOption(1, _AM_TDMCREATE_FIELD_ADMIN);
+ $parameters_tray->addElement($check_field_admin);
- $field_user = $isNew ? 0 : $field->getVar('field_user');
- $check_field_user = new XoopsFormCheckBox(' ', 'field_user['.$id.']', $field_user);
- $check_field_user->addOption(1, _AM_TDMCREATE_FIELD_USER);
- $parameters_tray->addElement($check_field_user);
+ $field_user = $isNew ? 0 : $this->getVar('field_user');
+ $check_field_user = new XoopsFormCheckBox(' ', 'field_user['.$i.']', $field_user);
+ $check_field_user->addOption(1, _AM_TDMCREATE_FIELD_USER);
+ $parameters_tray->addElement($check_field_user);
- $field_block = $isNew ? 0 : $field->getVar('field_block');
- $check_field_block = new XoopsFormCheckBox('', 'field_block['.$id.']', $field_block);
- $check_field_block->addOption(1, _AM_TDMCREATE_FIELD_BLOCK);
- $parameters_tray->addElement($check_field_block);
+ $field_block = $isNew ? 0 : $this->getVar('field_block');
+ $check_field_block = new XoopsFormCheckBox('', 'field_block['.$i.']', $field_block);
+ $check_field_block->addOption(1, _AM_TDMCREATE_FIELD_BLOCK);
+ $parameters_tray->addElement($check_field_block);
- $field_main = $isNew ? ( $id == 1 ? 1 : 0 ) : $field->getVar('field_main');
- $check_field_main = new XoopsFormRadio('', 'field_main', $field_main);
- $check_field_main->addOption('', _AM_TDMCREATE_FIELD_MAINFIELD );
- $parameters_tray->addElement($check_field_main);
+ $field_main = $isNew ? ( $i == 1 ? 1 : 0 ) : $this->getVar('field_main');
+ $check_field_main = new XoopsFormRadio('', 'field_main', $field_main);
+ $check_field_main->addOption('', _AM_TDMCREATE_FIELD_MAINFIELD );
+ $parameters_tray->addElement($check_field_main);
- $field_search = $isNew ? 0 : $field->getVar('field_search');
- $check_field_search = new XoopsFormCheckBox(' ', 'field_search['.$id.']', $field_search);
- $check_field_search->addOption(1, _AM_TDMCREATE_FIELD_SEARCH);
- $parameters_tray->addElement($check_field_search);
+ $field_search = $isNew ? 0 : $this->getVar('field_search');
+ $check_field_search = new XoopsFormCheckBox(' ', 'field_search['.$i.']', $field_search);
+ $check_field_search->addOption(1, _AM_TDMCREATE_FIELD_SEARCH);
+ $parameters_tray->addElement($check_field_search);
- $field_required = $isNew ? 0 : $field->getVar('field_required');
- $check_field_required = new XoopsFormCheckBox(' ', 'field_required['.$id.']', $field_required);
- $check_field_required->addOption(1, _AM_TDMCREATE_FIELD_REQUIRED);
- $parameters_tray->addElement($check_field_required);
- $form->addElement(new TDMCreateFormLabel('<td><div class="portlet"><div class="portlet-header">'._AM_TDMCREATE_FIELD_PARAMETERS_LIST.'</div><div class="portlet-content">'.$parameters_tray->render().'</div></div></td></tr>'));
+ $field_required = $isNew ? 0 : $this->getVar('field_required');
+ $check_field_required = new XoopsFormCheckBox(' ', 'field_required['.$i.']', $field_required);
+ $check_field_required->addOption(1, _AM_TDMCREATE_FIELD_REQUIRED);
+ $parameters_tray->addElement($check_field_required);
+ $form->addElement(new TDMCreateFormLabel('<td><div class="portlet"><div class="portlet-header">'._AM_TDMCREATE_FIELD_PARAMETERS_LIST.'</div><div class="portlet-content">'.$parameters_tray->render().'</div></div></td></tr>'));
+ }
}
- $id++;
+ } else {
+ $id = 1;
+ foreach ($fields as $field)
+ {
+ $form->addElement(new XoopsFormHidden('field_id['.$id.']', $field->getVar('field_id')));
+ $form->addElement(new XoopsFormHidden('field_mid', $field_mid));
+ $form->addElement(new XoopsFormHidden('field_tid', $field_tid));
+ $form->addElement(new XoopsFormHidden('field_numb', $field_numb));
+
+ $class = ($class == 'even') ? 'odd' : 'even';
+ $form->addElement(new TDMCreateFormLabel('<tr class="'.$class.'">'));
+ // Index ID
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$id.'</td>'));
+ // Field Name
+ $this_field_name = $isNew ? (!empty($f_name) ? $f_name . '_' : '') : $field->getVar('field_name');
+ $field_name = new XoopsFormText(_AM_TDMCREATE_FIELD_NAME, 'field_name['.$id.']', 15, 255, $this_field_name);
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_name->render().'</td>'));
+ // Field Type
+ $fieldtype_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_type['.$id.']', $field->getVar('field_type'));
+ $fieldtype_select->addOptionArray($this->tdmcreate->getHandler('fieldtype')->getList());
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$fieldtype_select->render().'</td>'));
+ // Field Value
+ $field_value = new XoopsFormText(_AM_TDMCREATE_FIELD_VALUE, 'field_value['.$id.']', 5, 20, $field->getVar('field_value'));
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_value->render().'</td>'));
+ // Field Attributes
+ $field_attributes_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_attribute['.$id.']', $field->getVar('field_attribute'));
+ $field_attributes_select->addOptionArray($this->tdmcreate->getHandler('fieldattributes')->getList());
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_attributes_select->render().'</td>'));
+ // Field Null
+ $field_null_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_NULL, 'field_null['.$id.']', $field->getVar('field_null'));
+ $field_null_select->addOptionArray($this->tdmcreate->getHandler('fieldnull')->getList());
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_null_select->render().'</td>'));
+ // Field Default
+ $field_default = new XoopsFormText(_AM_TDMCREATE_FIELD_DEFAULT, 'field_default['.$id.']', 15, 25, $field->getVar('field_default'));
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_default->render().'</td>'));
+ // Field Key
+ $field_key_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_KEY, 'field_key['.$id.']', $field->getVar('field_key'));
+ $field_key_select->addOptionArray($this->tdmcreate->getHandler('fieldkey')->getList());
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_key_select->render().'</td>'));
+ // Field Void
+ $table_autoincrement = $this->tdmcreate->getHandler('tables')->get($f_tid);
+ if( ($id == 1) && ($table_autoincrement->getVar('table_autoincrement') == 1)) {
+ $form->addElement(new TDMCreateFormLabel('<td> </td></tr>'));
+ } else {
+ // Box header row
+ $parameters_tray = new XoopsFormElementTray('', '<br />');
+ /*$parameters_header = new TDMCreateFormLabel('<div class="portlet"><div class="portlet-header">_AM_TDMCREATE_FIELD_PARAMETERS_LIST</div></div>')
+ $parameters_tray->addElement($parameters_header); */
+ // Field Elements
+ $criteria_element = new CriteriaCompo();
+ $criteria_element->add(new Criteria('fieldelement_tid', 0));
+ $criteria_table = new CriteriaCompo();
+ $criteria_table->add(new Criteria('fieldelement_mid', $field_mid));
+ $field_elements_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element['.$id.']', $field->getVar('field_element'));
+ $field_elements_select->addOptionArray($this->tdmcreate->getHandler('fieldelements')->getList($criteria_element));
+ $field_elements_select->addOptionArray($this->tdmcreate->getHandler('fieldelements')->getList($criteria_table));
+ unset($criteria_element); unset($criteria_table);
+ $parameters_tray->addElement($field_elements_select);
+
+ $field_parent = $isNew ? ( $id == 1 ? 1 : 0 ) : $field->getVar('field_parent');
+ $check_field_parent = new XoopsFormCheckBox(' ', 'field_parent', $field_parent);
+ $check_field_parent->addOption($id, _AM_TDMCREATE_FIELD_PARENT );
+ $parameters_tray->addElement($check_field_parent);
+
+ $field_inlist = $isNew ? 0 : $field->getVar('field_inlist');
+ $check_field_inlist = new XoopsFormCheckBox(' ', 'field_inlist['.$id.']', $field_inlist);
+ $check_field_inlist->addOption(1, _AM_TDMCREATE_FIELD_INLIST);
+ $parameters_tray->addElement($check_field_inlist);
+
+ $field_inform = $isNew ? 0 : $field->getVar('field_inform');
+ $check_field_inform = new XoopsFormCheckBox(' ', 'field_inform['.$id.']', $field_inform);
+ $check_field_inform->addOption(1, _AM_TDMCREATE_FIELD_INFORM);
+ $parameters_tray->addElement($check_field_inform);
+
+ $field_admin = $isNew ? 0 : $field->getVar('field_admin');
+ $check_field_admin = new XoopsFormCheckBox(' ', 'field_admin['.$id.']', $field_admin);
+ $check_field_admin->addOption(1, _AM_TDMCREATE_FIELD_ADMIN);
+ $parameters_tray->addElement($check_field_admin);
+
+ $field_user = $isNew ? 0 : $field->getVar('field_user');
+ $check_field_user = new XoopsFormCheckBox(' ', 'field_user['.$id.']', $field_user);
+ $check_field_user->addOption(1, _AM_TDMCREATE_FIELD_USER);
+ $parameters_tray->addElement($check_field_user);
+
+ $field_block = $isNew ? 0 : $field->getVar('field_block');
+ $check_field_block = new XoopsFormCheckBox('', 'field_block['.$id.']', $field_block);
+ $check_field_block->addOption(1, _AM_TDMCREATE_FIELD_BLOCK);
+ $parameters_tray->addElement($check_field_block);
+
+ $field_main = $isNew ? ( $id == 1 ? 1 : 0 ) : $field->getVar('field_main');
+ $check_field_main = new XoopsFormRadio('', 'field_main', $field_main);
+ $check_field_main->addOption('', _AM_TDMCREATE_FIELD_MAINFIELD );
+ $parameters_tray->addElement($check_field_main);
+
+ $field_search = $isNew ? 0 : $field->getVar('field_search');
+ $check_field_search = new XoopsFormCheckBox(' ', 'field_search['.$id.']', $field_search);
+ $check_field_search->addOption(1, _AM_TDMCREATE_FIELD_SEARCH);
+ $parameters_tray->addElement($check_field_search);
+
+ $field_required = $isNew ? 0 : $field->getVar('field_required');
+ $check_field_required = new XoopsFormCheckBox(' ', 'field_required['.$id.']', $field_required);
+ $check_field_required->addOption(1, _AM_TDMCREATE_FIELD_REQUIRED);
+ $parameters_tray->addElement($check_field_required);
+ $form->addElement(new TDMCreateFormLabel('<td><div class="portlet"><div class="portlet-header">'._AM_TDMCREATE_FIELD_PARAMETERS_LIST.'</div><div class="portlet-content">'.$parameters_tray->render().'</div></div></td></tr>'));
+ }
+ $id++;
+ }
+ unset($id);
}
- unset($id);
+
$form->addElement(new TDMCreateFormLabel('</tbody>'));
$form->addElement(new TDMCreateFormLabel('<tfoot><tr>'));
$form_hidden = new XoopsFormHidden('op', 'save');
@@ -284,45 +393,8 @@
public function &get($id = null, $fields = null)
{
return parent::get($id, $fields);
- }
-
- /**
- * Load a {@link XoopsObject} object from the database
- *
- * @access protected
- * @param mixed $id ID
- * @param array $fields fields to fetch
- * @return object {@link XoopsObject}
- */
- /*public function &get($id = null, $fields = null)
- {
- $object = null;
- if (empty($id)) {
- $object = $this->create();
- return $object;
- }
- if (is_array($fields) && count($fields) > 0) {
- $select = implode(',', $fields);
- if (!in_array($this->keyName, $fields)) {
- $select .= ', ' . $this->keyName;
- }
- } else {
- $select = '*';
- }
- $sql = sprintf('SELECT %s FROM %s WHERE %s = %s', $select, $this->table, $this->keyName, $this->db->quote($id));
- //$sql = "SELECT {$select} FROM {$this->table} WHERE {$this->keyName} = " . $this->db->quote($id);
- if (!$result = $this->db->query($sql)) {
- return $object;
- }
- if (!$this->db->getRowsNum($result)) {
- return $object;
- }
- $object =& $this->create(false);
- $object->assignVars($this->db->fetchArray($result));
+ }
- return $object;
- }*/
-
/**
* get IDs of objects matching a condition
*
@@ -348,28 +420,5 @@
return false;
}
return true;
- }
-
- /*
- * @public function getFieldOption
- * @param integer $field_id
- * @param integer $field_option
- */
- public function getFieldOption($field_id, $field_option = '')
- {
- $criteria = new Criteria('field_id', $field_id );
- if ($this->getCount($criteria) > 0) {
- $obj = $this->getObjects($criteria, false, false );
- if (is_string($field_option)) {
- if (!empty($obj[0][$field_option]))
- return strtolower($obj[0][$field_option]);
- } else {
- if (!empty($obj[0][$field_option]) && is_numeric($obj[0][$field_option]))
- return intval($obj[0][$field_option]);
- }
- } else {
- return false;
- }
- unset($criteria);
- }
+ }
}
\ No newline at end of file
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-11 14:50:43 UTC (rev 12578)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/blocks.php 2014-06-11 15:51:20 UTC (rev 12579)
@@ -69,7 +69,7 @@
define('{$language}DISPLAY', "How Many Tables to Display");
define('{$language}TITLELENGTH', "Title Length");
define('{$language}CATTODISPLAY', "Categories to Display");
-define('{$language}ALLCAT', "All Categories");
+define('{$language}ALLCAT', "All Categories");\n
EOT;
foreach (array_keys($tables) as $i)
{
@@ -79,22 +79,18 @@
$nb_caracteres = strlen($table_fieldname);
$table_blocks = $tables[$i]->getVar('table_blocks');
$language1 = $language.strtoupper($table_fieldname);
- $fpif = '';
- $criteria_fields = new CriteriaCompo();
- $criteria_fields->add(new Criteria('field_tid', $table_id));
- $fields_all = $this->tdmcreate->getHandler('fields')->getObjects($criteria_fields);
- unset($criteria_fields);
- foreach (array_keys($fields_all) as $f)
+ $fields = $this->getTableFields($table_id);
+ foreach (array_keys($fields) as $f)
{
- $field_name = $fields_all[$f]->getVar('field_name');
- if($f == 1) {
+ $field_name = $fields[$f]->getVar('field_name');
+ if($f == 0) {
$fpif = $field_name;
}
$fields_final[$f] = substr($fpif, $nb_caracteres);
- $lng_fileds = $language1.strtoupper($fields_final[$f]);
+ $lng_fileds = $language1.'_'.strtoupper($fields_final[$f]);
$ucf_table_field = $table_name.str_replace('_', ' ', ucfirst($fields_final[$f]));
$content .= <<<EOT
-\ndefine('{$lng_fileds}', "{$field_name}");
+define('{$lng_fileds}', "{$ucf_table_field}");\n
EOT;
}
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/modinfo.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/modinfo.php 2014-06-11 14:50:43 UTC (rev 12578)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/modinfo.php 2014-06-11 15:51:20 UTC (rev 12579)
@@ -108,7 +108,7 @@
foreach (array_keys($tables) as $i)
{
$table_name = $tables[$i]->getVar('table_name');
- $language1 = $language.strtoupper($table_name).'';
+ $language1 = $language.'_'.strtoupper($table_name).'';
$table_name = str_replace("_", " ", ucfirst($table_name));
if ( $tables[$i]->getVar('table_blocks') == 1 ) {
$content .= <<<EOT
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php 2014-06-11 14:50:43 UTC (rev 12578)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php 2014-06-11 15:51:20 UTC (rev 12579)
@@ -163,7 +163,7 @@
$imgtray1->addElement($imageselect1, false);
$imgtray1->addElement( new XoopsFormLabel( '', "<br /><img src='".XOOPS_URL."/".$iconsdirectory."/".$table_image."' name='image1' id='image1' alt='' />" ) );
$fileseltray1 = new XoopsFormElementTray('','<br />');
- $fileseltray1->addElement(new XoopsFormFile(_AM_TDMCREATE_FORMUPLOAD , 'table_image', $this->tdmcreate->getConfig('maxsize')));
+ $fileseltray1->addElement(new XoopsFormFile(_AM_TDMCREATE_FORMUPLOAD , 'attachedfile', $this->tdmcreate->getConfig('maxsize')));
$fileseltray1->addElement(new XoopsFormLabel(''));
$imgtray1->addElement($fileseltray1);
$form->addElement($imgtray1);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/install.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/install.php 2014-06-11 14:50:43 UTC (rev 12578)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/install.php 2014-06-11 15:51:20 UTC (rev 12579)
@@ -21,7 +21,7 @@
$indexFile = XOOPS_UPLOAD_PATH.'/index.html';
$blankFile = XOOPS_UPLOAD_PATH.'/blank.gif';
-$emptyFile = XOOPS_ROOT_PATH.'/modules/TDMCreate/images/empty.png';
+$emptyFile = XOOPS_ROOT_PATH.'/modules/TDMCreate/assets/images/empty.png';
// Making of "uploads" folder
$tdmcreate = XOOPS_UPLOAD_PATH.'/tdmcreate';
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/xoops_version.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/xoops_version.php 2014-06-11 14:50:43 UTC (rev 12578)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/xoops_version.php 2014-06-11 15:51:20 UTC (rev 12579)
@@ -413,5 +413,5 @@
$modversion['config'][$i]['description'] = "";
$modversion['config'][$i]['formtype'] = "textbox";
$modversion['config'][$i]['valuetype'] = "text";
-$modversion['config'][$i]['default'] = '12555';
+$modversion['config'][$i]['default'] = '12576';
unset($i);
\ No newline at end of file
|
|
From: <be...@us...> - 2014-06-11 14:50:51
|
Revision: 12578
http://sourceforge.net/p/xoops/svn/12578
Author: beckmi
Date: 2014-06-11 14:50:43 +0000 (Wed, 11 Jun 2014)
Log Message:
-----------
Fixing 2nd Captcha
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/profile/register.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/profile/register.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/profile/register.php 2014-06-11 14:48:03 UTC (rev 12577)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/profile/register.php 2014-06-11 14:50:43 UTC (rev 12578)
@@ -34,7 +34,7 @@
xoops_load('XoopsUserUtility');
$myts =& MyTextSanitizer::getInstance();
-$config_handler =& xoops_gethandler('config');
+$config_handler =& xoops_gethandler('config');
$GLOBALS['xoopsConfigUser'] = $config_handler->getConfigsByCat(XOOPS_CONF_USER);
if (empty($GLOBALS['xoopsConfigUser']['allow_register'])) {
redirect_header('index.php', 6, _US_NOREGISTER);
@@ -49,15 +49,15 @@
$current_opname = $_SESSION[$opkey];
unset($_SESSION[$opkey]);
if (!isset($_POST[$current_opname])) {
- $_POST=array();
+ $_POST = array();
}
} else {
- $_POST=array();
+ $_POST = array();
$current_opname = 'op'; // does not matter, it isn't there
}
-$op = !isset($_POST[$current_opname]) ? 'register' : $_POST[$current_opname];
-$current_step = isset($_POST['step']) ? intval( $_POST['step'] ) : 0;
+$op = !isset($_POST[$current_opname]) ? 'register' : $_POST[$current_opname];
+$current_step = isset($_POST['step']) ? intval($_POST['step']) : 0;
// The newly introduced variable $_SESSION['profile_post'] is contaminated by $_POST, thus we use an old vaiable to hold uid parameter
$uid = !empty($_SESSION['profile_register_uid']) ? intval($_SESSION['profile_register_uid']) : 0;
@@ -92,10 +92,10 @@
$xoBreadcrumbs[] = array('title' => $steps[$current_step]['step_name']);
}
-$member_handler =& xoops_gethandler('member');
+$member_handler =& xoops_gethandler('member');
$profile_handler = xoops_getmodulehandler('profile');
-$fields = $profile_handler->loadFields();
+$fields = $profile_handler->loadFields();
$userfields = $profile_handler->getUserVars();
if ($uid == 0) {
@@ -123,15 +123,15 @@
// Lets merge current $_POST with $_SESSION['profile_post'] so we can have access to info submited in previous steps
// Get all fields that we can expect from a $_POST inlcuding our private '_message_'
$fieldnames = array();
-foreach (array_keys($fields) as $i ) {
+foreach (array_keys($fields) as $i) {
$fieldnames[] = $fields[$i]->getVar('field_name');
}
-$fieldnames = array_merge($fieldnames, $userfields);
+$fieldnames = array_merge($fieldnames, $userfields);
$fieldnames[] = '_message_';
// Get $_POST that matches above criteria, we do not need to store step, tokens, etc
$postfields = array();
-foreach ($fieldnames as $fieldname ) {
+foreach ($fieldnames as $fieldname) {
if (isset($_POST[$fieldname])) {
$postfields[$fieldname] = $_POST[$fieldname];
}
@@ -139,12 +139,12 @@
if ($current_step == 0) {
// Reset any previous session for first step
- $_SESSION['profile_post'] = array();
+ $_SESSION['profile_post'] = array();
$_SESSION['profile_register_uid'] = null;
} else {
// Merge current $_POST with $_SESSION['profile_post']
$_SESSION['profile_post'] = array_merge($_SESSION['profile_post'], $postfields);
- $_POST = array_merge($_SESSION['profile_post'], $_POST);
+ $_POST = array_merge($_SESSION['profile_post'], $_POST);
}
// Set vars from $_POST/$_SESSION['profile_post']
@@ -174,12 +174,12 @@
// Check user data at first step
if ($current_step == 1) {
- $uname = isset($_POST['uname']) ? $myts->stripSlashesGPC(trim($_POST['uname']) ) : '';
- $email = isset($_POST['email']) ? $myts->stripSlashesGPC(trim($_POST['email']) ) : '';
- $url = isset($_POST['url']) ? $myts->stripSlashesGPC(trim($_POST['url']) ) : '';
- $pass = isset($_POST['pass']) ? $myts->stripSlashesGPC(trim($_POST['pass']) ) : '';
- $vpass = isset($_POST['vpass']) ? $myts->stripSlashesGPC(trim($_POST['vpass']) ) : '';
- $agree_disc = (isset($_POST['agree_disc']) && intval($_POST['agree_disc']) ) ? 1 : 0;
+ $uname = isset($_POST['uname']) ? $myts->stripSlashesGPC(trim($_POST['uname'])) : '';
+ $email = isset($_POST['email']) ? $myts->stripSlashesGPC(trim($_POST['email'])) : '';
+ $url = isset($_POST['url']) ? $myts->stripSlashesGPC(trim($_POST['url'])) : '';
+ $pass = isset($_POST['pass']) ? $myts->stripSlashesGPC(trim($_POST['pass'])) : '';
+ $vpass = isset($_POST['vpass']) ? $myts->stripSlashesGPC(trim($_POST['vpass'])) : '';
+ $agree_disc = (isset($_POST['agree_disc']) && intval($_POST['agree_disc'])) ? 1 : 0;
if ($GLOBALS['xoopsConfigUser']['reg_dispdsclmr'] != 0 && $GLOBALS['xoopsConfigUser']['reg_disclaimer'] != '') {
if (empty($agree_disc)) {
@@ -202,102 +202,125 @@
// If the last step required SAVE or if we're on the last step then we will insert/update user on database
if ($current_step > 0 && empty($stop) && (!empty($steps[$current_step - 1]['step_save']) || !isset($steps[$current_step]))) {
- $isNew = $newuser->isNew();
-
- //Did created an user already? If not then let us set some extra info
- if ($isNew) {
- $uname = isset($_POST['uname']) ? $myts->stripSlashesGPC(trim($_POST['uname'])) : '';
- $email = isset($_POST['email']) ? $myts->stripSlashesGPC(trim($_POST['email'])) : '';
- $url = isset($_POST['url']) ? $myts->stripSlashesGPC(trim($_POST['url'])) : '';
- $pass = isset($_POST['pass']) ? $myts->stripSlashesGPC(trim($_POST['pass'])) : '';
- $newuser->setVar('uname', $uname);
- $newuser->setVar('email', $email);
- $newuser->setVar('pass', $pass ? md5($pass) : '');
- $actkey = substr(md5(uniqid(mt_rand(), 1) ), 0, 8);
- $newuser->setVar('actkey', $actkey, true);
- $newuser->setVar('user_regdate', time(), true);
- $newuser->setVar('uorder', $GLOBALS['xoopsConfig']['com_order'], true);
- $newuser->setVar('umode', $GLOBALS['xoopsConfig']['com_mode'], true);
- $newuser->setVar('theme', $GLOBALS['xoopsConfig']['theme_set'], true);
- $newuser->setVar('user_avatar', 'avatars/blank.gif', true);
- if ($GLOBALS['xoopsConfigUser']['activation_type'] == 1) {
- $newuser->setVar('level', 1, true);
- } else {
- $newuser->setVar('level', 0, true);
+ if ($GLOBALS['xoopsModuleConfig']['profileCaptchaAfterStep1'] == 1 && $current_step > 1) {
+ xoops_load('XoopsCaptcha');
+ $xoopsCaptcha2 = XoopsCaptcha::getInstance();
+ if (!$xoopsCaptcha2->verify()) {
+ $stop .= $xoopsCaptcha2->getMessage();
}
}
- // Insert/update user and check if we have succeded
- if (!$member_handler->insertUser($newuser)) {
- $stop .= _US_REGISTERNG . "<br />";
- $stop .= implode('<br />', $newuser->getErrors() );
- } else {
- // User inserted! Now insert custom profile fields
- $profile->setVar('profile_id', $newuser->getVar('uid') );
- $profile_handler->insert($profile);
+ if (empty($stop)) {
- // We are good! If this is 'was' a new user then we handle notification
+ $isNew = $newuser->isNew();
+
+ //Did created an user already? If not then let us set some extra info
if ($isNew) {
- if ($GLOBALS['xoopsConfigUser']['new_user_notify'] == 1 && !empty($GLOBALS['xoopsConfigUser']['new_user_notify_group'])) {
- $xoopsMailer =& xoops_getMailer();
- $xoopsMailer->reset();
- $xoopsMailer->useMail();
- $xoopsMailer->setToGroups($member_handler->getGroup($GLOBALS['xoopsConfigUser']['new_user_notify_group']));
- $xoopsMailer->setFromEmail($GLOBALS['xoopsConfig']['adminmail']);
- $xoopsMailer->setFromName($GLOBALS['xoopsConfig']['sitename']);
- $xoopsMailer->setSubject(sprintf(_US_NEWUSERREGAT,$GLOBALS['xoopsConfig']['sitename']));
- $xoopsMailer->setBody(sprintf(_US_HASJUSTREG, $newuser->getVar('uname')));
- $xoopsMailer->send(true);
+ $uname = isset($_POST['uname']) ? $myts->stripSlashesGPC(trim($_POST['uname'])) : '';
+ $email = isset($_POST['email']) ? $myts->stripSlashesGPC(trim($_POST['email'])) : '';
+ $url = isset($_POST['url']) ? $myts->stripSlashesGPC(trim($_POST['url'])) : '';
+ $pass = isset($_POST['pass']) ? $myts->stripSlashesGPC(trim($_POST['pass'])) : '';
+ $newuser->setVar('uname', $uname);
+ $newuser->setVar('email', $email);
+ $newuser->setVar('pass', $pass ? md5($pass) : '');
+ $actkey = substr(md5(uniqid(mt_rand(), 1)), 0, 8);
+ $newuser->setVar('actkey', $actkey, true);
+ $newuser->setVar('user_regdate', time(), true);
+ $newuser->setVar('uorder', $GLOBALS['xoopsConfig']['com_order'], true);
+ $newuser->setVar('umode', $GLOBALS['xoopsConfig']['com_mode'], true);
+ $newuser->setVar('theme', $GLOBALS['xoopsConfig']['theme_set'], true);
+ $newuser->setVar('user_avatar', 'avatars/blank.gif', true);
+ if ($GLOBALS['xoopsConfigUser']['activation_type'] == 1) {
+ $newuser->setVar('level', 1, true);
+ } else {
+ $newuser->setVar('level', 0, true);
}
+ }
- $message = "";
- if (!$member_handler->addUserToGroup(XOOPS_GROUP_USERS, $newuser->getVar('uid'))) {
- $message = _PROFILE_MA_REGISTER_NOTGROUP . "<br />";
- } else if ($GLOBALS['xoopsConfigUser']['activation_type'] == 1) {
- XoopsUserUtility::sendWelcome($newuser);
- } else if ($GLOBALS['xoopsConfigUser']['activation_type'] == 0) {
- $xoopsMailer =& xoops_getMailer();
- $xoopsMailer->reset();
- $xoopsMailer->useMail();
- $xoopsMailer->setTemplate('register.tpl');
- $xoopsMailer->assign('SITENAME', $GLOBALS['xoopsConfig']['sitename']);
- $xoopsMailer->assign('ADMINMAIL', $GLOBALS['xoopsConfig']['adminmail']);
- $xoopsMailer->assign('SITEURL', XOOPS_URL."/");
- $xoopsMailer->assign('X_UPASS', $_POST['vpass']);
- $xoopsMailer->setToUsers($newuser);
- $xoopsMailer->setFromEmail($GLOBALS['xoopsConfig']['adminmail']);
- $xoopsMailer->setFromName($GLOBALS['xoopsConfig']['sitename']);
- $xoopsMailer->setSubject(sprintf(_US_USERKEYFOR, $newuser->getVar('uname')));
- if (!$xoopsMailer->send(true)) {
- $_SESSION['profile_post']['_message_'] = 0;
- } else {
- $_SESSION['profile_post']['_message_'] = 1;
+ // Insert/update user and check if we have succeded
+ if (!$member_handler->insertUser($newuser)) {
+ $stop .= _US_REGISTERNG . "<br />";
+ $stop .= implode('<br />', $newuser->getErrors());
+ } else {
+ // User inserted! Now insert custom profile fields
+ $profile->setVar('profile_id', $newuser->getVar('uid'));
+ $profile_handler->insert($profile);
+
+ // We are good! If this is 'was' a new user then we handle notification
+ if ($isNew) {
+ if ($GLOBALS['xoopsConfigUser']['new_user_notify'] == 1 && !empty($GLOBALS['xoopsConfigUser']['new_user_notify_group'])) {
+ $xoopsMailer =& xoops_getMailer();
+ $xoopsMailer->reset();
+ $xoopsMailer->useMail();
+ $xoopsMailer->setToGroups($member_handler->getGroup($GLOBALS['xoopsConfigUser']['new_user_notify_group']));
+ $xoopsMailer->setFromEmail($GLOBALS['xoopsConfig']['adminmail']);
+ $xoopsMailer->setFromName($GLOBALS['xoopsConfig']['sitename']);
+ $xoopsMailer->setSubject(sprintf(_US_NEWUSERREGAT, $GLOBALS['xoopsConfig']['sitename']));
+ $xoopsMailer->setBody(sprintf(_US_HASJUSTREG, $newuser->getVar('uname')));
+ $xoopsMailer->send(true);
}
- } else if ($GLOBALS['xoopsConfigUser']['activation_type'] == 2) {
- $xoopsMailer =& xoops_getMailer();
- $xoopsMailer->reset();
- $xoopsMailer->useMail();
- $xoopsMailer->setTemplate('adminactivate.tpl');
- $xoopsMailer->assign('USERNAME', $newuser->getVar('uname'));
- $xoopsMailer->assign('USEREMAIL', $newuser->getVar('email'));
- $xoopsMailer->assign('USERACTLINK', XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname', 'n') . '/activate.php?id=' . $newuser->getVar('uid') . '&actkey=' . $newuser->getVar('actkey', 'n'));
- $xoopsMailer->assign('SITENAME', $GLOBALS['xoopsConfig']['sitename']);
- $xoopsMailer->assign('ADMINMAIL', $GLOBALS['xoopsConfig']['adminmail']);
- $xoopsMailer->assign('SITEURL', XOOPS_URL . "/");
- $xoopsMailer->setToGroups($member_handler->getGroup($GLOBALS['xoopsConfigUser']['activation_group']));
- $xoopsMailer->setFromEmail($GLOBALS['xoopsConfig']['adminmail']);
- $xoopsMailer->setFromName($GLOBALS['xoopsConfig']['sitename']);
- $xoopsMailer->setSubject(sprintf(_US_USERKEYFOR, $newuser->getVar('uname')));
- if (!$xoopsMailer->send()) {
- $_SESSION['profile_post']['_message_'] = 2;
+
+ $message = "";
+ if (!$member_handler->addUserToGroup(XOOPS_GROUP_USERS, $newuser->getVar('uid'))) {
+ $message = _PROFILE_MA_REGISTER_NOTGROUP . "<br />";
} else {
- $_SESSION['profile_post']['_message_'] = 3;
+ if ($GLOBALS['xoopsConfigUser']['activation_type'] == 1) {
+ XoopsUserUtility::sendWelcome($newuser);
+ } else {
+ if ($GLOBALS['xoopsConfigUser']['activation_type'] == 0) {
+ $xoopsMailer =& xoops_getMailer();
+ $xoopsMailer->reset();
+ $xoopsMailer->useMail();
+ $xoopsMailer->setTemplate('register.tpl');
+ $xoopsMailer->assign('SITENAME', $GLOBALS['xoopsConfig']['sitename']);
+ $xoopsMailer->assign('ADMINMAIL', $GLOBALS['xoopsConfig']['adminmail']);
+ $xoopsMailer->assign('SITEURL', XOOPS_URL . "/");
+ $xoopsMailer->assign('X_UPASS', $_POST['vpass']);
+ $xoopsMailer->setToUsers($newuser);
+ $xoopsMailer->setFromEmail($GLOBALS['xoopsConfig']['adminmail']);
+ $xoopsMailer->setFromName($GLOBALS['xoopsConfig']['sitename']);
+ $xoopsMailer->setSubject(sprintf(_US_USERKEYFOR, $newuser->getVar('uname')));
+ if (!$xoopsMailer->send(true)) {
+ $_SESSION['profile_post']['_message_'] = 0;
+ } else {
+ $_SESSION['profile_post']['_message_'] = 1;
+ }
+ } else {
+ if ($GLOBALS['xoopsConfigUser']['activation_type'] == 2) {
+ $xoopsMailer =& xoops_getMailer();
+ $xoopsMailer->reset();
+ $xoopsMailer->useMail();
+ $xoopsMailer->setTemplate('adminactivate.tpl');
+ $xoopsMailer->assign('USERNAME', $newuser->getVar('uname'));
+ $xoopsMailer->assign('USEREMAIL', $newuser->getVar('email'));
+ $xoopsMailer->assign(
+ 'USERACTLINK',
+ XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname', 'n') . '/activate.php?id=' . $newuser->getVar('uid') . '&actkey=' . $newuser->getVar(
+ 'actkey',
+ 'n'
+ )
+ );
+ $xoopsMailer->assign('SITENAME', $GLOBALS['xoopsConfig']['sitename']);
+ $xoopsMailer->assign('ADMINMAIL', $GLOBALS['xoopsConfig']['adminmail']);
+ $xoopsMailer->assign('SITEURL', XOOPS_URL . "/");
+ $xoopsMailer->setToGroups($member_handler->getGroup($GLOBALS['xoopsConfigUser']['activation_group']));
+ $xoopsMailer->setFromEmail($GLOBALS['xoopsConfig']['adminmail']);
+ $xoopsMailer->setFromName($GLOBALS['xoopsConfig']['sitename']);
+ $xoopsMailer->setSubject(sprintf(_US_USERKEYFOR, $newuser->getVar('uname')));
+ if (!$xoopsMailer->send()) {
+ $_SESSION['profile_post']['_message_'] = 2;
+ } else {
+ $_SESSION['profile_post']['_message_'] = 3;
+ }
+ }
+ }
+ }
}
+ if ($message) {
+ $GLOBALS['xoopsTpl']->append('confirm', $message);
+ }
+ $_SESSION['profile_register_uid'] = $newuser->getVar('uid');
}
- if ($message) {
- $GLOBALS['xoopsTpl']->append('confirm', $message);
- }
- $_SESSION['profile_register_uid'] = $newuser->getVar('uid');
}
}
}
@@ -305,7 +328,7 @@
if (!empty($stop) || isset($steps[$current_step])) {
include_once dirname(__FILE__) . '/include/forms.php';
$current_step = empty($stop) ? $current_step : $current_step - 1;
- $reg_form = profile_getRegisterForm($newuser, $profile, $steps[$current_step]);
+ $reg_form = profile_getRegisterForm($newuser, $profile, $steps[$current_step]);
$reg_form->assign($GLOBALS['xoopsTpl']);
$GLOBALS['xoopsTpl']->assign('current_step', $current_step);
$GLOBALS['xoopsTpl']->assign('stop', $stop);
@@ -313,7 +336,7 @@
// No errors and no more steps, finish
$GLOBALS['xoopsTpl']->assign('finish', _PROFILE_MA_REGISTER_FINISH);
$GLOBALS['xoopsTpl']->assign('current_step', -1);
- if ( $GLOBALS['xoopsConfigUser']['activation_type'] == 1 && !empty($_SESSION['profile_post']['pass'])) {
+ if ($GLOBALS['xoopsConfigUser']['activation_type'] == 1 && !empty($_SESSION['profile_post']['pass'])) {
$GLOBALS['xoopsTpl']->assign('finish_login', _PROFILE_MA_FINISH_LOGIN);
$GLOBALS['xoopsTpl']->assign('finish_uname', $newuser->getVar('uname'));
$GLOBALS['xoopsTpl']->assign('finish_pass', htmlspecialchars($_SESSION['profile_post']['pass']));
|
|
From: <rgr...@us...> - 2014-06-11 14:48:13
|
Revision: 12577
http://sourceforge.net/p/xoops/svn/12577
Author: rgriffith
Date: 2014-06-11 14:48:03 +0000 (Wed, 11 Jun 2014)
Log Message:
-----------
Add XoopsRequest class
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsload.php
Added Paths:
-----------
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsrequest.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsload.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsload.php 2014-06-10 22:48:07 UTC (rev 12576)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsload.php 2014-06-11 14:48:03 UTC (rev 12577)
@@ -220,6 +220,7 @@
'xoopsformselecteditor' => XOOPS_ROOT_PATH . '/class/xoopsform/formselecteditor.php',
'xoopsformcalendar' => XOOPS_ROOT_PATH . '/class/xoopsform/formcalendar.php',
'xoopsfilterinput' => XOOPS_ROOT_PATH . '/class/xoopsfilterinput.php',
+ 'xoopsrequest' => XOOPS_ROOT_PATH . '/class/xoopsrequest.php',
);
}
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsrequest.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsrequest.php (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsrequest.php 2014-06-11 14:48:03 UTC (rev 12577)
@@ -0,0 +1,492 @@
+<?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.
+ */
+
+/**
+ * Request Class
+ *
+ * This class serves to provide a common interface to access
+ * request variables. This includes $_POST, $_GET, and naturally $_REQUEST. Variables
+ * can be passed through an input filter to avoid injection or returned raw.
+ *
+ * @category Xmf\Module\Request
+ * @package Xmf
+ * @author Richard Griffith <ri...@ge...>
+ * @author trabis <lus...@gm...>
+ * @author Joomla!
+ * @copyright 2011-2013 The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @version Release: 1.0
+ * @link http://xoops.org
+ * @since 1.0
+ */
+class XoopsRequest
+{
+
+ /**
+ * Available masks for cleaning variables
+ */
+ const NOTRIM = 1;
+ const ALLOWRAW = 2;
+ const ALLOWHTML = 4;
+
+ /**
+ * Gets the request method
+ *
+ * @return string
+ */
+ public static function getMethod()
+ {
+ $method = strtoupper($_SERVER['REQUEST_METHOD']);
+
+ return $method;
+ }
+
+ /**
+ * Fetches and returns a given variable.
+ *
+ * The default behaviour is fetching variables depending on the
+ * current request method: GET and HEAD will result in returning
+ * an entry from $_GET, POST and PUT will result in returning an
+ * entry from $_POST.
+ *
+ * You can force the source by setting the $hash parameter:
+ *
+ * - post $_POST
+ * - get $_GET
+ * - files $_FILES
+ * - cookie $_COOKIE
+ * - env $_ENV
+ * - server $_SERVER
+ * - method via current $_SERVER['REQUEST_METHOD']
+ * - default $_REQUEST
+ *
+ * @param string $name Variable name
+ * @param mixed $default Default value if the variable does not exist
+ * @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD)
+ * @param string $type Return type for the variable, for valid values see {@link XoopsFilterInput::clean()}.
+ * @param int $mask Filter mask for the variable
+ *
+ * @return mixed Requested variable
+ */
+ public static function getVar($name, $default = null, $hash = 'default', $type = 'none', $mask = 0)
+ {
+ // Ensure hash and type are uppercase
+ $hash = strtoupper($hash);
+ if ($hash === 'METHOD') {
+ $hash = strtoupper($_SERVER['REQUEST_METHOD']);
+ }
+ $type = strtoupper($type);
+ $sig = $hash . $type . $mask;
+
+ // Get the input hash
+ switch ($hash) {
+ case 'GET':
+ $input = &$_GET;
+ break;
+ case 'POST':
+ $input = &$_POST;
+ break;
+ case 'FILES':
+ $input = &$_FILES;
+ break;
+ case 'COOKIE':
+ $input = &$_COOKIE;
+ break;
+ case 'ENV':
+ $input = &$_ENV;
+ break;
+ case 'SERVER':
+ $input = &$_SERVER;
+ break;
+ default:
+ $input = &$_REQUEST;
+ $hash = 'REQUEST';
+ break;
+ }
+
+ if (isset($input[$name]) && $input[$name] !== null) {
+ // Get the variable from the input hash and clean it
+ $var = XoopsRequest::cleanVar($input[$name], $mask, $type);
+
+ // Handle magic quotes compatability
+ if (get_magic_quotes_gpc() && ($var != $default) && ($hash != 'FILES')) {
+ $var = XoopsRequest::stripSlashesRecursive($var);
+ }
+ } else {
+ if ($default !== null) {
+ // Clean the default value
+ $var = XoopsRequest::cleanVar($default, $mask, $type);
+ } else {
+ $var = $default;
+ }
+ }
+
+ return $var;
+ }
+
+ /**
+ * Fetches and returns a given filtered variable. The integer
+ * filter will allow only digits to be returned. This is currently
+ * only a proxy function for getVar().
+ *
+ * See getVar() for more in-depth documentation on the parameters.
+ *
+ * @param string $name Variable name
+ * @param int $default Default value if the variable does not exist
+ * @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD)
+ *
+ * @return int Requested variable
+ */
+ public static function getInt($name, $default = 0, $hash = 'default')
+ {
+ return XoopsRequest::getVar($name, $default, $hash, 'int');
+ }
+
+ /**
+ * Fetches and returns a given filtered variable. The float
+ * filter only allows digits and periods. This is currently
+ * only a proxy function for getVar().
+ *
+ * See getVar() for more in-depth documentation on the parameters.
+ *
+ * @param string $name Variable name
+ * @param float $default Default value if the variable does not exist
+ * @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD)
+ *
+ * @return float Requested variable
+ */
+ public static function getFloat($name, $default = 0.0, $hash = 'default')
+ {
+ return XoopsRequest::getVar($name, $default, $hash, 'float');
+ }
+
+ /**
+ * Fetches and returns a given filtered variable. The bool
+ * filter will only return true/false bool values. This is
+ * currently only a proxy function for getVar().
+ *
+ * See getVar() for more in-depth documentation on the parameters.
+ *
+ * @param string $name Variable name
+ * @param bool $default Default value if the variable does not exist
+ * @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD)
+ *
+ * @return bool Requested variable
+ */
+ public static function getBool($name, $default = false, $hash = 'default')
+ {
+ return XoopsRequest::getVar($name, $default, $hash, 'bool');
+ }
+
+ /**
+ * Fetches and returns a given filtered variable. The word
+ * filter only allows the characters [A-Za-z_]. This is currently
+ * only a proxy function for getVar().
+ *
+ * See getVar() for more in-depth documentation on the parameters.
+ *
+ * @param string $name Variable name
+ * @param string $default Default value if the variable does not exist
+ * @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD)
+ *
+ * @return string Requested variable
+ */
+ public static function getWord($name, $default = '', $hash = 'default')
+ {
+ return XoopsRequest::getVar($name, $default, $hash, 'word');
+ }
+
+ /**
+ * Fetches and returns a given filtered variable. The cmd
+ * filter only allows the characters [A-Za-z0-9.-_]. This is
+ * currently only a proxy function for getVar().
+ *
+ * See getVar() for more in-depth documentation on the parameters.
+ *
+ * @param string $name Variable name
+ * @param string $default Default value if the variable does not exist
+ * @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD)
+ *
+ * @return string Requested variable
+ */
+ public static function getCmd($name, $default = '', $hash = 'default')
+ {
+ return XoopsRequest::getVar($name, $default, $hash, 'cmd');
+ }
+
+ /**
+ * Fetches and returns a given filtered variable. The string
+ * filter deletes 'bad' HTML code, if not overridden by the mask.
+ * This is currently only a proxy function for getVar().
+ *
+ * See getVar() for more in-depth documentation on the parameters.
+ *
+ * @param string $name Variable name
+ * @param string $default Default value if the variable does not exist
+ * @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD)
+ * @param int $mask Filter mask for the variable
+ *
+ * @return string Requested variable
+ */
+ public static function getString($name, $default = '', $hash = 'default', $mask = 0)
+ {
+ // Cast to string, in case XoopsRequest::ALLOWRAW was specified for mask
+ return (string) XoopsRequest::getVar($name, $default, $hash, 'string', $mask);
+ }
+
+ /**
+ * Fetches and returns an array
+ *
+ * @param string $name Variable name
+ * @param string $default Default value if the variable does not exist
+ * @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD)
+ *
+ * @return array
+ */
+ public static function getArray($name, $default = array(), $hash = 'default')
+ {
+ return XoopsRequest::getVar($name, $default, $hash, 'array');
+ }
+
+ /**
+ * Fetches and returns raw text
+ *
+ * @param string $name Variable name
+ * @param string $default Default value if the variable does not exist
+ * @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD)
+ *
+ * @return string Requested variable
+ */
+ public static function getText($name, $default = '', $hash = 'default')
+ {
+ return (string) XoopsRequest::getVar($name, $default, $hash, 'string', XoopsRequest::ALLOWRAW);
+ }
+
+ /**
+ * Set a variable in one of the request variables
+ *
+ * @param string $name Name
+ * @param string $value Value
+ * @param string $hash Hash
+ * @param boolean $overwrite Boolean
+ *
+ * @return string Previous value
+ */
+ public static function setVar($name, $value = null, $hash = 'method', $overwrite = true)
+ {
+ //If overwrite is true, makes sure the variable hasn't been set yet
+ if (!$overwrite && array_key_exists($name, $_REQUEST)) {
+ return $_REQUEST[$name];
+ }
+
+ // Get the request hash value
+ $hash = strtoupper($hash);
+ if ($hash === 'METHOD') {
+ $hash = strtoupper($_SERVER['REQUEST_METHOD']);
+ }
+
+ $previous = array_key_exists($name, $_REQUEST) ? $_REQUEST[$name] : null;
+
+ switch ($hash) {
+ case 'GET':
+ $_GET[$name] = $value;
+ $_REQUEST[$name] = $value;
+ break;
+ case 'POST':
+ $_POST[$name] = $value;
+ $_REQUEST[$name] = $value;
+ break;
+ case 'COOKIE':
+ $_COOKIE[$name] = $value;
+ $_REQUEST[$name] = $value;
+ break;
+ case 'FILES':
+ $_FILES[$name] = $value;
+ break;
+ case 'ENV':
+ $_ENV['name'] = $value;
+ break;
+ case 'SERVER':
+ $_SERVER['name'] = $value;
+ break;
+ }
+
+ return $previous;
+ }
+
+ /**
+ * Fetches and returns a request array.
+ *
+ * The default behaviour is fetching variables depending on the
+ * current request method: GET and HEAD will result in returning
+ * $_GET, POST and PUT will result in returning $_POST.
+ *
+ * You can force the source by setting the $hash parameter:
+ *
+ * - post $_POST
+ * - get $_GET
+ * - files $_FILES
+ * - cookie $_COOKIE
+ * - env $_ENV
+ * - server $_SERVER
+ * - method via current $_SERVER['REQUEST_METHOD']
+ * - default $_REQUEST
+ *
+ * @param string $hash to get (POST, GET, FILES, METHOD)
+ * @param int $mask Filter mask for the variable
+ *
+ * @return mixed Request hash
+ */
+ public static function get($hash = 'default', $mask = 0)
+ {
+ $hash = strtoupper($hash);
+
+ if ($hash === 'METHOD') {
+ $hash = strtoupper($_SERVER['REQUEST_METHOD']);
+ }
+
+ switch ($hash) {
+ case 'GET':
+ $input = $_GET;
+ break;
+ case 'POST':
+ $input = $_POST;
+ break;
+ case 'FILES':
+ $input = $_FILES;
+ break;
+ case 'COOKIE':
+ $input = $_COOKIE;
+ break;
+ case 'ENV':
+ $input = &$_ENV;
+ break;
+ case 'SERVER':
+ $input = &$_SERVER;
+ break;
+ default:
+ $input = $_REQUEST;
+ break;
+ }
+
+ // Handle magic quotes compatability
+ if (get_magic_quotes_gpc() && ($hash != 'FILES')) {
+ $input = XoopsRequest::stripSlashesRecursive($input);
+ }
+
+ $result = XoopsRequest::cleanVars($input, $mask);
+
+ return $result;
+ }
+
+ /**
+ * Sets a request variable
+ *
+ * @param array $array An associative array of key-value pairs
+ * @param string $hash The request variable to set (POST, GET, FILES, METHOD)
+ * @param boolean $overwrite If true and an existing key is found, the value is overwritten, otherwise it is ingored
+ *
+ * @return void
+ */
+ public static function set($array, $hash = 'default', $overwrite = true)
+ {
+ foreach ($array as $key => $value) {
+ XoopsRequest::setVar($key, $value, $hash, $overwrite);
+ }
+ }
+
+ /**
+ * Clean up an input variable.
+ *
+ * @param mixed $var The input variable.
+ * @param int $mask Filter bit mask.
+ * - 1=no trim: If this flag is cleared and the input is a string,
+ * the string will have leading and trailing whitespace trimmed.
+ * - 2=allow_raw: If set, no more filtering is performed, higher bits are ignored.
+ * - 4=allow_html: HTML is allowed, but passed through a safe HTML filter first.
+ * If set, no more filtering is performed.
+ * - If no bits other than the 1 bit is set, a strict filter is applied.
+ * @param string $type The variable type. See {@link XoopsFilterInput::clean()}.
+ *
+ * @return string
+ */
+ private static function cleanVar($var, $mask = 0, $type = null)
+ {
+ // Static input filters for specific settings
+ static $noHtmlFilter = null;
+ static $safeHtmlFilter = null;
+
+ // If the no trim flag is not set, trim the variable
+ if (!($mask & 1) && is_string($var)) {
+ $var = trim($var);
+ }
+
+ // Now we handle input filtering
+ if ($mask & 2) {
+ // If the allow raw flag is set, do not modify the variable
+ } else {
+ XoopsLoad::load('xoopsfilterinput');
+ if ($mask & 4) {
+ // If the allow html flag is set, apply a safe html filter to the variable
+ if (is_null($safeHtmlFilter)) {
+ $safeHtmlFilter = XoopsFilterInput::getInstance(null, null, 1, 1);
+ }
+ $var = $safeHtmlFilter->clean($var, $type);
+ } else {
+ // Since no allow flags were set, we will apply the most strict filter to the variable
+ if (is_null($noHtmlFilter)) {
+ $noHtmlFilter = XoopsFilterInput::getInstance();
+ }
+ $var = $noHtmlFilter->clean($var, $type);
+ }
+ }
+
+ return $var;
+ }
+
+ /**
+ * Clean up an array of variables.
+ *
+ * @param mixed $var The input variable.
+ * @param int $mask Filter bit mask. See {@link XoopsRequest::cleanVar()}
+ * @param string $type The variable type. See {@link XoopsFilterInput::clean()}.
+ *
+ * @return string
+ */
+ private static function cleanVars($var, $mask = 0, $type = null)
+ {
+ if (is_string($var)) {
+ $var = XoopsRequest::cleanVar($var, $mask, $type);
+ } else {
+ foreach ($var as $key => &$value) {
+ $value = XoopsRequest::cleanVars($value, $mask, $type);
+ }
+ }
+
+ return $var;
+ }
+
+
+ /**
+ * Strips slashes recursively on an array
+ *
+ * @param array $value Array of (nested arrays of) strings
+ *
+ * @return array The input array with stripshlashes applied to it
+ */
+ private static function stripSlashesRecursive($value)
+ {
+ $value = is_array($value) ? array_map(array('XoopsRequest', 'stripSlashesRecursive'), $value)
+ : stripslashes($value);
+
+ return $value;
+ }
+}
|
|
From: <txm...@us...> - 2014-06-10 22:48:20
|
Revision: 12576
http://sourceforge.net/p/xoops/svn/12576
Author: txmodxoops
Date: 2014-06-10 22:48:07 +0000 (Tue, 10 Jun 2014)
Log Message:
-----------
- Fixed bugs Edit/Save fields
- Updated
- Work in progress
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/menu.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/objects.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/permissions.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class/classes.php
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class/formelements.php
Removed Paths:
-------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/formelements.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-06-10 12:14:51 UTC (rev 12575)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-06-10 22:48:07 UTC (rev 12576)
@@ -161,17 +161,33 @@
$fieldelement_fid = TDMCreateRequest::getInt('fieldelement_fid');
//
if (isset($field_tid)) {
- $fieldsObj =& $tdmcreate->getHandler('fields')->get($field_tid);
+ //$fieldsObj =& $tdmcreate->getHandler('fields')->get($field_tid);
if (isset($fieldelement_fid)) {
$fieldelementObj =& $tdmcreate->getHandler('fieldelements')->get($fieldelement_fid);
}
} else {
- $fieldsObj =& $tdmcreate->getHandler('fields')->create();
+ //$fieldsObj =& $tdmcreate->getHandler('fields')->create();
$fieldelementObj =& $tdmcreate->getHandler('fieldelements')->create();
}
// Set Variables
+ $isNew = false;
if ($field_numb > 0) {
- for( $i = 1; $i <= $field_numb; $i++ ) {
+ $fields =& $tdmcreate->getHandler('fields')->get($field_tid);
+ foreach($field_id as $i => $value)
+ {
+ switch($value){
+ case 'new':
+ $fieldsObj = $tdmcreate->getHandler('fields')->create();
+ $fieldelementObj =& $tdmcreate->getHandler('fieldelements')->create();
+ $isNew = true;
+ break;
+ default:
+ $fieldsObj = $tdmcreate->getHandler('fields')->get($value);
+ $fieldelementObj =& $tdmcreate->getHandler('fieldelements')->get($fieldelement_fid);
+ break;
+ }
+ //}
+ //for( $i = 1; $i <= $field_numb; $i++ ) {
// Set Data
$fieldsObj->setVar( 'field_mid', $field_mid );
$fieldsObj->setVar( 'field_tid', $field_tid );
@@ -206,7 +222,7 @@
$GLOBALS['xoopsTpl']->assign('error', $fieldelementObj->getHtmlErrors() . ' Field element');
}
//
- if ($fieldsObj->isNew()) {
+ if ($isNew) {
redirect_header('fields.php', 2, sprintf(_AM_TDMCREATE_FIELD_FORM_SAVED_OK, $table_name));
} else {
redirect_header('fields.php', 2, sprintf(_AM_TDMCREATE_FIELD_FORM_UPDATED_OK, $table_name));
@@ -228,7 +244,7 @@
$adminMenu->addItemButton(_AM_TDMCREATE_FIELDS_LIST, 'fields.php', 'list');
$GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
- $fieldsObj = $tdmcreate->getHandler('fields')->get( $field_tid, array('field_id', 'field_name') );
+ $fieldsObj = $tdmcreate->getHandler('fields')->get( $field_tid );
$form = $fieldsObj->getForm(null, $field_tid);
$GLOBALS['xoopsTpl']->assign('form', $form->render());
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-06-10 12:14:51 UTC (rev 12575)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-06-10 22:48:07 UTC (rev 12576)
@@ -30,21 +30,15 @@
/**
* @var mixed
*/
- private $tdmcreate = null;
+ private $tdmcreate = null;
- /**
- * @var mixed
- */
- private $table = null;
-
/*
* @public function constructor class
* @param null
*/
public function __construct()
{
- $this->tdmcreate = TDMCreate::getInstance();
- //$this->table = TDMCreateTables::getInstance();
+ $this->tdmcreate = TDMCreate::getInstance();
$this->initVar('field_id', XOBJ_DTYPE_INT);
$this->initVar('field_mid', XOBJ_DTYPE_INT);
$this->initVar('field_tid', XOBJ_DTYPE_INT);
@@ -113,7 +107,7 @@
$field_tid = $isNew ? $f_tid : $this->getVar('field_tid');
// Get the list of fields
$criteria = new CriteriaCompo();
- $criteria->add(new Criteria('field_tid', $this->getVar('field_tid')));
+ $criteria->add(new Criteria('field_tid', $f_tid));
$field_numb = $isNew ? $f_numb : $this->tdmcreate->getHandler('fields')->getCount($criteria); //$this->getVar('field_numb')
$form = new TDMCreateThemeForm(null, 'form', $action, 'post', true);
@@ -134,13 +128,14 @@
$form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_KEY.'</th>'));
$form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_PARAMETERS.'</th>'));
$form->addElement(new TDMCreateFormLabel('</tr></thead>'));
- $form->addElement(new TDMCreateFormLabel('<tbody>'));
-
- var_dump($field_numb);
- $class = '';
- for($i = 1; $i <= $field_numb; $i++)
- {
- $form->addElement(new XoopsFormHidden('field_id['.$i.']', $this->getVar('field_id')));
+ $form->addElement(new TDMCreateFormLabel('<tbody>'));
+ $fields = $this->tdmcreate->getHandler('fields')->getObjects($criteria);
+ unset($criteria);
+ //var_dump($field_numb);
+ $class = ''; $id = 1;
+ foreach ($fields as $field)
+ {
+ $form->addElement(new XoopsFormHidden('field_id['.$id.']', $field->getVar('field_id')));
$form->addElement(new XoopsFormHidden('field_mid', $field_mid));
$form->addElement(new XoopsFormHidden('field_tid', $field_tid));
$form->addElement(new XoopsFormHidden('field_numb', $field_numb));
@@ -148,36 +143,36 @@
$class = ($class == 'even') ? 'odd' : 'even';
$form->addElement(new TDMCreateFormLabel('<tr class="'.$class.'">'));
// Index ID
- $form->addElement(new TDMCreateFormLabel('<td class="center">'.$i.'</td>'));
+ $form->addElement(new TDMCreateFormLabel('<td class="center">'.$id.'</td>'));
// Field Name
- $this_field_name = $isNew ? (!empty($f_name) ? $f_name . '_' : '') : $this->getVar('field_name');
- $field_name = new XoopsFormText(_AM_TDMCREATE_FIELD_NAME, 'field_name['.$i.']', 15, 255, $this_field_name);
+ $this_field_name = $isNew ? (!empty($f_name) ? $f_name . '_' : '') : $field->getVar('field_name');
+ $field_name = new XoopsFormText(_AM_TDMCREATE_FIELD_NAME, 'field_name['.$id.']', 15, 255, $this_field_name);
$form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_name->render().'</td>'));
// Field Type
- $fieldtype_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_type['.$i.']', $this->getVar('field_type'));
+ $fieldtype_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_type['.$id.']', $field->getVar('field_type'));
$fieldtype_select->addOptionArray($this->tdmcreate->getHandler('fieldtype')->getList());
$form->addElement(new TDMCreateFormLabel('<td class="center">'.$fieldtype_select->render().'</td>'));
// Field Value
- $field_value = new XoopsFormText(_AM_TDMCREATE_FIELD_VALUE, 'field_value['.$i.']', 5, 20, $this->getVar('field_value'));
+ $field_value = new XoopsFormText(_AM_TDMCREATE_FIELD_VALUE, 'field_value['.$id.']', 5, 20, $field->getVar('field_value'));
$form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_value->render().'</td>'));
// Field Attributes
- $field_attributes_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_attribute['.$i.']', $this->getVar('field_attribute'));
+ $field_attributes_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_attribute['.$id.']', $field->getVar('field_attribute'));
$field_attributes_select->addOptionArray($this->tdmcreate->getHandler('fieldattributes')->getList());
$form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_attributes_select->render().'</td>'));
// Field Null
- $field_null_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_NULL, 'field_null['.$i.']', $this->getVar('field_null'));
+ $field_null_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_NULL, 'field_null['.$id.']', $field->getVar('field_null'));
$field_null_select->addOptionArray($this->tdmcreate->getHandler('fieldnull')->getList());
$form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_null_select->render().'</td>'));
// Field Default
- $field_default = new XoopsFormText(_AM_TDMCREATE_FIELD_DEFAULT, 'field_default['.$i.']', 15, 25, $this->getVar('field_default'));
+ $field_default = new XoopsFormText(_AM_TDMCREATE_FIELD_DEFAULT, 'field_default['.$id.']', 15, 25, $field->getVar('field_default'));
$form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_default->render().'</td>'));
// Field Key
- $field_key_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_KEY, 'field_key['.$i.']', $this->getVar('field_key'));
+ $field_key_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_KEY, 'field_key['.$id.']', $field->getVar('field_key'));
$field_key_select->addOptionArray($this->tdmcreate->getHandler('fieldkey')->getList());
$form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_key_select->render().'</td>'));
// Field Void
$table_autoincrement = $this->tdmcreate->getHandler('tables')->get($f_tid);
- if( ($i == 1) && ($table_autoincrement->getVar('table_autoincrement') == 1)) {
+ if( ($id == 1) && ($table_autoincrement->getVar('table_autoincrement') == 1)) {
$form->addElement(new TDMCreateFormLabel('<td> </td></tr>'));
} else {
// Box header row
@@ -189,60 +184,61 @@
$criteria_element->add(new Criteria('fieldelement_tid', 0));
$criteria_table = new CriteriaCompo();
$criteria_table->add(new Criteria('fieldelement_mid', $field_mid));
- $field_elements_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element['.$i.']', $this->getVar('field_element'));
+ $field_elements_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element['.$id.']', $field->getVar('field_element'));
$field_elements_select->addOptionArray($this->tdmcreate->getHandler('fieldelements')->getList($criteria_element));
$field_elements_select->addOptionArray($this->tdmcreate->getHandler('fieldelements')->getList($criteria_table));
unset($criteria_element); unset($criteria_table);
$parameters_tray->addElement($field_elements_select);
- $field_parent = $isNew ? ( $i == 1 ? 1 : 0 ) : $this->getVar('field_parent');
+ $field_parent = $isNew ? ( $id == 1 ? 1 : 0 ) : $field->getVar('field_parent');
$check_field_parent = new XoopsFormCheckBox(' ', 'field_parent', $field_parent);
- $check_field_parent->addOption($i, _AM_TDMCREATE_FIELD_PARENT );
+ $check_field_parent->addOption($id, _AM_TDMCREATE_FIELD_PARENT );
$parameters_tray->addElement($check_field_parent);
- $field_inlist = $isNew ? 0 : $this->getVar('field_inlist');
- $check_field_inlist = new XoopsFormCheckBox(' ', 'field_inlist['.$i.']', $field_inlist);
+ $field_inlist = $isNew ? 0 : $field->getVar('field_inlist');
+ $check_field_inlist = new XoopsFormCheckBox(' ', 'field_inlist['.$id.']', $field_inlist);
$check_field_inlist->addOption(1, _AM_TDMCREATE_FIELD_INLIST);
$parameters_tray->addElement($check_field_inlist);
- $field_inform = $isNew ? 0 : $this->getVar('field_inform');
- $check_field_inform = new XoopsFormCheckBox(' ', 'field_inform['.$i.']', $field_inform);
+ $field_inform = $isNew ? 0 : $field->getVar('field_inform');
+ $check_field_inform = new XoopsFormCheckBox(' ', 'field_inform['.$id.']', $field_inform);
$check_field_inform->addOption(1, _AM_TDMCREATE_FIELD_INFORM);
$parameters_tray->addElement($check_field_inform);
- $field_admin = $isNew ? 0 : $this->getVar('field_admin');
- $check_field_admin = new XoopsFormCheckBox(' ', 'field_admin['.$i.']', $field_admin);
+ $field_admin = $isNew ? 0 : $field->getVar('field_admin');
+ $check_field_admin = new XoopsFormCheckBox(' ', 'field_admin['.$id.']', $field_admin);
$check_field_admin->addOption(1, _AM_TDMCREATE_FIELD_ADMIN);
$parameters_tray->addElement($check_field_admin);
- $field_user = $isNew ? 0 : $this->getVar('field_user');
- $check_field_user = new XoopsFormCheckBox(' ', 'field_user['.$i.']', $field_user);
+ $field_user = $isNew ? 0 : $field->getVar('field_user');
+ $check_field_user = new XoopsFormCheckBox(' ', 'field_user['.$id.']', $field_user);
$check_field_user->addOption(1, _AM_TDMCREATE_FIELD_USER);
$parameters_tray->addElement($check_field_user);
- $field_block = $isNew ? 0 : $this->getVar('field_block');
- $check_field_block = new XoopsFormCheckBox('', 'field_block['.$i.']', $field_block);
+ $field_block = $isNew ? 0 : $field->getVar('field_block');
+ $check_field_block = new XoopsFormCheckBox('', 'field_block['.$id.']', $field_block);
$check_field_block->addOption(1, _AM_TDMCREATE_FIELD_BLOCK);
$parameters_tray->addElement($check_field_block);
- $field_main = $isNew ? ( $i == 1 ? 1 : 0 ) : $this->getVar('field_main');
+ $field_main = $isNew ? ( $id == 1 ? 1 : 0 ) : $field->getVar('field_main');
$check_field_main = new XoopsFormRadio('', 'field_main', $field_main);
$check_field_main->addOption('', _AM_TDMCREATE_FIELD_MAINFIELD );
$parameters_tray->addElement($check_field_main);
- $field_search = $isNew ? 0 : $this->getVar('field_search');
- $check_field_search = new XoopsFormCheckBox(' ', 'field_search['.$i.']', $field_search);
+ $field_search = $isNew ? 0 : $field->getVar('field_search');
+ $check_field_search = new XoopsFormCheckBox(' ', 'field_search['.$id.']', $field_search);
$check_field_search->addOption(1, _AM_TDMCREATE_FIELD_SEARCH);
$parameters_tray->addElement($check_field_search);
- $field_required = $isNew ? 0 : $this->getVar('field_required');
- $check_field_required = new XoopsFormCheckBox(' ', 'field_required['.$i.']', $field_required);
+ $field_required = $isNew ? 0 : $field->getVar('field_required');
+ $check_field_required = new XoopsFormCheckBox(' ', 'field_required['.$id.']', $field_required);
$check_field_required->addOption(1, _AM_TDMCREATE_FIELD_REQUIRED);
$parameters_tray->addElement($check_field_required);
$form->addElement(new TDMCreateFormLabel('<td><div class="portlet"><div class="portlet-header">'._AM_TDMCREATE_FIELD_PARAMETERS_LIST.'</div><div class="portlet-content">'.$parameters_tray->render().'</div></div></td></tr>'));
- }
+ }
+ $id++;
}
-
+ unset($id);
$form->addElement(new TDMCreateFormLabel('</tbody>'));
$form->addElement(new TDMCreateFormLabel('<tfoot><tr>'));
$form_hidden = new XoopsFormHidden('op', 'save');
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/index.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/index.php 2014-06-10 12:14:51 UTC (rev 12575)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/index.php 2014-06-10 22:48:07 UTC (rev 12576)
@@ -44,14 +44,13 @@
/*
* @public function write
* @param string $module
- * @param mixed $table
+ * @param mixed $tables
* @param string $filename
*/
- public function write($module, $table, $tables, $filename) {
+ public function write($module, $tables, $filename) {
$this->setModule($module);
- $this->setFileName($filename);
- $this->table = $table;
- $this->tables = $tables;
+ $this->setTables($tables);
+ $this->setFileName($filename);
}
/*
* @public function render
@@ -59,8 +58,8 @@
*/
public function render() {
$module = $this->getModule();
- $filename = $this->getFileName();
- //$table = $this->getTable();
+ $tables = $this->getTables();
+ $filename = $this->getFileName();
$module_name = strtolower($module->getVar('mod_name'));
$language = $this->getLanguage($module_name, 'AM');
$language_thereare = $this->getLanguage($module_name, 'AM', 'THEREARE_');
@@ -68,9 +67,9 @@
$content .= <<<EOT
include_once 'header.php';\n
EOT;
- foreach (array_keys($this->tables) as $i)
+ foreach (array_keys($tables) as $i)
{
- $table_name = $this->tables[$i]->getVar('table_name');
+ $table_name = $tables[$i]->getVar('table_name');
$content .= <<<EOT
//count "{$table_name}"
\$count_{$table_name} = \${$table_name}Handler->getCount();\n
@@ -81,12 +80,12 @@
\$adminMenu->addInfoBox({$language}STATISTICS);
// InfoBox\n
EOT;
- foreach (array_keys($this->tables) as $i)
+ foreach (array_keys($tables) as $i)
{
- $table_name = $this->tables[$i]->getVar('table_name');
+ $table_name = $tables[$i]->getVar('table_name');
$ta_stutable_name = $language_thereare.strtoupper($table_name);
$content .= <<<EOT
-\$adminMenu->addInfoBoxLine({$language}STATISTICS, '<label>'.{$ta_stutable_name}.'</label>', \$count_{$table_name});\n
+\$adminMenu->addInfoBoxLine({$language}STATISTICS, '<label>'.{$ta_stutable_name}.'</label>', \$count_{$table_name});\n
EOT;
}
$content .= <<<EOT
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/menu.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/menu.php 2014-06-10 12:14:51 UTC (rev 12575)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/menu.php 2014-06-10 22:48:07 UTC (rev 12576)
@@ -44,15 +44,13 @@
/*
* @public function write
* @param string $module
- * @param mixed $table
* @param mixed $tables
* @param string $filename
*/
- public function write($module, $table, $tables, $filename) {
+ public function write($module, $tables, $filename) {
$this->setModule($module);
+ $this->setTables($tables);
$this->setFileName($filename);
- $this->table = $table;
- $this->tables = $tables;
}
/*
* @public function render
@@ -60,9 +58,9 @@
*/
public function render() {
$module = $this->getModule();
- $module_name = $module->getVar('mod_name');
- //$table = $this->getTable();
+ $tables = $this->getTables();
$filename = $this->getFileName();
+ $module_name = $module->getVar('mod_name');
$language = $this->getLanguage($module_name, 'MI', 'ADMENU');
$menu = 1;
$content = $this->getHeaderFilesComments($module, $filename);
@@ -79,20 +77,21 @@
\$adminmenu[\$i]['icon'] = \$sysPathIcon32.'/home.png';
\$i++;
EOT;
- foreach (array_keys($this->tables) as $i)
+ foreach (array_keys($tables) as $i)
{
- if ( $this->tables[$i]->getVar('table_admin') == 1 )
+ $table_permissions = $tables[$i]->getVar('table_permissions');
+ if ( $tables[$i]->getVar('table_admin') == 1 )
{
$menu++;
$content .= <<<EOT
\n\$adminmenu[\$i]['title'] = {$language}{$menu};
-\$adminmenu[\$i]['link'] = 'admin/{$this->tables[$i]->getVar('table_name')}.php';
-\$adminmenu[\$i]['icon'] = \$sysPathIcon32.'/{$this->tables[$i]->getVar('table_image')}';
+\$adminmenu[\$i]['link'] = 'admin/{$tables[$i]->getVar('table_name')}.php';
+\$adminmenu[\$i]['icon'] = \$sysPathIcon32.'/{$tables[$i]->getVar('table_image')}';
\$i++;
EOT;
}
}
- if( $this->table->getVar('table_permissions') == 1 ) {
+ if( $table_permissions == 1 ) {
$menu++;
$content .= <<<EOT
\n\$adminmenu[\$i]['title'] = {$language}{$menu};
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/objects.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/objects.php 2014-06-10 12:14:51 UTC (rev 12575)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/objects.php 2014-06-10 22:48:07 UTC (rev 12576)
@@ -41,7 +41,7 @@
*/
public function getSimpleSetVar($table_name, $field_name) {
$ret = <<<EOT
- \${$table_name}_obj->setVar('{$field_name}', \$_POST['{$field_name}']);\n
+ \${$table_name}Obj->setVar('{$field_name}', \$_POST['{$field_name}']);\n
EOT;
return $ret;
}
@@ -52,7 +52,7 @@
*/
public function getTextDateSelect($table_name, $field_name) {
$ret = <<<EOT
- \${$table_name}_obj->setVar('{$field_name}', strtotime(\$_POST['{$field_name}']));\n
+ \${$table_name}Obj->setVar('{$field_name}', strtotime(\$_POST['{$field_name}']));\n
EOT;
return $ret;
}
@@ -63,7 +63,7 @@
*/
public function getCheckBoxOrRadioYN($table_name, $field_name) {
$ret = <<<EOT
- \${$table_name}_obj->setVar('{$field_name}', ((\$_REQUEST['{$field_name}'] == 1) ? '1' : '0'));\n
+ \${$table_name}Obj->setVar('{$field_name}', ((\$_REQUEST['{$field_name}'] == 1) ? '1' : '0'));\n
EOT;
return $ret;
}
@@ -75,6 +75,7 @@
*/
public function getUploadImage($module_name, $table_name, $field_name) {
$ret = <<<EOT
+ // Set Var Image
include_once XOOPS_ROOT_PATH.'/class/uploader.php';
\$uploaddir = XOOPS_UPLOAD_PATH.'/{$module_name}/images/{$table_name}/';
\$uploader = new XoopsMediaUploader(\$uploaddir, xoops_getModuleOption('mimetypes', '{$module_name}'),
@@ -86,10 +87,10 @@
\$errors = \$uploader->getErrors();
redirect_header('javascript:history.go(-1)', 3, \$errors);
} else {
- \${$table_name}_obj->setVar('{$field_name}', \$uploader->getSavedFileName());
+ \${$table_name}Obj->setVar('{$field_name}', \$uploader->getSavedFileName());
}
} else {
- \${$table_name}_obj->setVar('{$field_name}', \$_POST['{$field_name}']);
+ \${$table_name}Obj->setVar('{$field_name}', \$_POST['{$field_name}']);
}\n
EOT;
return $ret;
@@ -102,6 +103,7 @@
*/
public function getUploadFile($module_name, $table_name, $field_name) {
$ret = <<<EOT
+ // Set Var File
include_once XOOPS_ROOT_PATH.'/class/uploader.php';
\$uploaddir = XOOPS_UPLOAD_PATH.'/{$module_name}/files/{$table_name}/';
\$uploader = new XoopsMediaUploader(\$uploaddir, xoops_getModuleOption('mimetypes', '{$module_name}'),
@@ -113,7 +115,7 @@
\$errors = \$uploader->getErrors();
redirect_header('javascript:history.go(-1)', 3, \$errors);
} else {
- \${$table_name}_obj->setVar('{$field_name}', \$uploader->getSavedFileName());
+ \${$table_name}Obj->setVar('{$field_name}', \$uploader->getSavedFileName());
}
}\n
EOT;
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/pages.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/pages.php 2014-06-10 12:14:51 UTC (rev 12575)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/pages.php 2014-06-10 22:48:07 UTC (rev 12576)
@@ -67,7 +67,7 @@
\ninclude_once 'header.php';
//It recovered the value of argument op in URL$
\$op = {$mod_name}_CleanVars(\$_REQUEST, 'op', 'list', 'string');
-
+// Navigation
echo \$adminMenu->addNavigation('{$table_name}.php');
switch (\$op)
{\n
@@ -145,7 +145,7 @@
case 'new':
\$adminMenu->addItemButton({$language}{$stu_table_name}_LIST, '{$table_name}.php', 'list');
echo \$adminMenu->renderButton();
-
+ // Get Form
\${$table_name}Obj =& \${$table_name}Handler->create();
\$form = \${$table_name}Obj->getForm();
\$form->display();
@@ -170,13 +170,14 @@
\${$table_name}Obj =& \${$table_name}Handler->get(\$_REQUEST['{$fpif}']);
} else {
\${$table_name}Obj =& \${$table_name}Handler->create();
- }\n
+ }
+ // Set Vars\n
EOT;
foreach (array_keys($fields) as $f)
{
$field_name = $fields[$f]->getVar('field_name');
$field_element = $fields[$f]->getVar('field_element');
- if($f > 0) {
+ if($f > 0) { // If we want to hide field id
switch($field_element) {
case 4:
case 5:
@@ -199,11 +200,11 @@
}
$ret .= <<<EOT
-
+ // Insert Data
if (\${$table_name}Handler->insert(\${$table_name}Obj)) {
redirect_header('{$table_name}.php?op=list', 2, {$language}FORMOK);
}
-
+ // Get Form
echo \${$table_name}Obj->getHtmlErrors();
\$form =& \${$table_name}Obj->getForm();
\$form->display();
@@ -224,6 +225,7 @@
\$adminMenu->addItemButton({$language}ADD_{$stu_table_name}, '{$table_name}.php?op=new', 'add');
\$adminMenu->addItemButton({$language}{$stu_table_name}_LIST, '{$table_name}.php', 'list');
echo \$adminMenu->renderButton();
+ // Get Form
\${$table_name}Obj = \${$table_name}Handler->get(\$_REQUEST['{$fpif}']);
\$form = \${$table_name}Obj->getForm();
\$form->display();
@@ -282,7 +284,6 @@
$module_name = $module->getVar('mod_name');
$table_name = $table->getVar('table_name');
$language = $this->getLanguage($module_name, 'AM');
- $fpif = ''; $fpmf = '';
$fields = $this->getTableFields($table->getVar('table_id'));
foreach(array_keys($fields) as $f)
{
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/permissions.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/permissions.php 2014-06-10 12:14:51 UTC (rev 12575)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/permissions.php 2014-06-10 22:48:07 UTC (rev 12576)
@@ -151,7 +151,7 @@
$fields = $this->getTableFields($table_id);
foreach(array_keys($fields) as $f)
{
- if($f == 1) {
+ if($f == 0) {
$fpif = $fields[$f]->getVar('field_name');
}
if($fields[$f]->getVar('field_main') == 1) {
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-10 12:14:51 UTC (rev 12575)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-06-10 22:48:07 UTC (rev 12576)
@@ -249,47 +249,18 @@
$ret[] = $userTemplates->renderFile($table_name.'.tpl');
}
/*var_dump($table_name); */
- }
- // Creation of admin language file
- if ( $table_admin == 1) {
- // Language Admin File
- $languageAdmin = LanguageAdmin::getInstance();
- $languageAdmin->write($module, $tables, 'admin.php');
- $ret[] = $languageAdmin->render();
- }
+ }
// Creation of blocks language file
if ( $table_blocks == 1) {
// Language Blocks File
$languageBlocks = LanguageBlocks::getInstance();
$languageBlocks->write($module, $tables, 'blocks.php');
$ret[] = $languageBlocks->render();
- }
- // Creation of user language file
- if ( $table_user == 1) {
- // Language Main File
- $languageMain = LanguageMain::getInstance();
- $languageMain->write($module, $table, $tables, 'main.php');
- $ret[] = $languageMain->render();
- }
+ }
// Language Modinfo File
$languageModinfo = LanguageModinfo::getInstance();
$languageModinfo->write($module, $table, $tables, 'modinfo.php');
- $ret[] = $languageModinfo->render();
- // Creation of user files
- if ( $table_user == 1) {
- // 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');
- $ret[] = $userIndex->render();
- }
+ $ret[] = $languageModinfo->render();
// Creation of admin files
if ( $table_admin == 1) {
// Admin Header File
@@ -298,20 +269,32 @@
$ret[] = $adminHeader->render();
// Admin Index File
$adminIndex = AdminIndex::getInstance();
- $adminIndex->write($module, $table, $tables, 'index.php');
+ $adminIndex->write($module, $tables, 'index.php');
$ret[] = $adminIndex->render();
// Admin Menu File
$adminMenu = AdminMenu::getInstance();
- $adminMenu->write($module, $table, $tables, 'menu.php');
+ $adminMenu->write($module, $tables, 'menu.php');
$ret[] = $adminMenu->render();
- }
- // Creation of admin permission file
- if (( $table_permissions == 1) && ( $table_admin == 1 )) {
- // Admin Permissions File
- $adminPermissions = AdminPermissions::getInstance();
- $adminPermissions->write($module, $tables, 'permissions.php');
- $ret[] = $adminPermissions->render();
- }
+ // Creation of admin permission file
+ if (( $table_permissions == 1)) {
+ // Admin Permissions File
+ $adminPermissions = AdminPermissions::getInstance();
+ $adminPermissions->write($module, $tables, 'permissions.php');
+ $ret[] = $adminPermissions->render();
+ }
+ // Admin Aboutr File
+ $adminAbout = AdminAbout::getInstance();
+ $adminAbout->write($module, 'about.php');
+ $ret[] = $adminAbout->render();
+ // Admin Footer File
+ $adminFooter = AdminFooter::getInstance();
+ $adminFooter->write($module, 'footer.php');
+ $ret[] = $adminFooter->render();
+ // Language Admin File
+ $languageAdmin = LanguageAdmin::getInstance();
+ $languageAdmin->write($module, $tables, 'admin.php');
+ $ret[] = $languageAdmin->render();
+ }
// Creation of notifications files
if ( $table_notifications == 1 ) {
// Include Notifications File
@@ -360,25 +343,8 @@
$includeComments->write($module, $table);
$ret[] = $includeComments->renderCommentsNew($module, 'comment_new');
}
- if ( ($table_user == 1) && ($table_notifications == 1)){
- // User Notification Update File
- $userNotificationUpdate = UserNotificationUpdate::getInstance();
- $userNotificationUpdate->write($module, 'notification_update.php');
- $ret[] = $userNotificationUpdate->render();
- }
- // Creation of admin files
- if ( $table->getVar('table_admin') == 1 ) {
- // Admin Aboutr File
- $adminAbout = AdminAbout::getInstance();
- $adminAbout->write($module, 'about.php');
- $ret[] = $adminAbout->render();
- // Admin Footer File
- $adminFooter = AdminFooter::getInstance();
- $adminFooter->write($module, 'footer.php');
- $ret[] = $adminFooter->render();
- }
// Creation of user files
- if ( $table->getVar('table_user') == 1 ) {
+ if ( ($table_user == 1)){
// Templates Index File
$templatesIndex = TemplatesIndex::getInstance();
$templatesIndex->write($module, 'index.tpl');
@@ -390,7 +356,29 @@
// User Header File
$userHeader = UserHeader::getInstance();
$userHeader->write($module, 'header.php');
- $ret[] = $userHeader->render();
+ $ret[] = $userHeader->render();
+ // User Notification Update File
+ if ( ($table_notifications == 1 )){
+ $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');
+ $ret[] = $userIndex->render();
+ // Language Main File
+ $languageMain = LanguageMain::getInstance();
+ $languageMain->write($module, $table, $tables, 'main.php');
+ $ret[] = $languageMain->render();
}
// Css Styles File
$cssStyles = CssStyles::getInstance($module, 'style.css');
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class/classes.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class/classes.php 2014-06-10 12:14:51 UTC (rev 12575)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class/classes.php 2014-06-10 22:48:07 UTC (rev 12576)
@@ -19,7 +19,7 @@
* @version $Id: class_files.php 12258 2014-01-02 09:33:29Z timgno $
*/
defined('XOOPS_ROOT_PATH') or die('Restricted access');
-require_once TDMC_PATH . '/class/files/formelements.php';
+require_once 'formelements.php';
class ClassFiles extends TDMCreateFormElements
{
/*
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class/formelements.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class/formelements.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class/formelements.php 2014-06-10 22:48:07 UTC (rev 12576)
@@ -0,0 +1,353 @@
+<?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: form_elements.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class TDMCreateFormElements extends TDMCreateFile
+{
+ /*
+ * @public function constructor
+ * @param null
+ */
+ public function __construct() {
+ parent::__construct();
+ $this->tdmcreate = TDMCreate::getInstance();
+ }
+ /**
+ * @param string $method
+ * @param array $args
+ */
+ public function __call($method, $args)
+ {
+ $arg = isset($args[0]) ? $args[0] : null;
+ return $this->getVar($method, $arg);
+ }
+ /*
+ * @static function &getInstance
+ * @param null
+ */
+ public static function &getInstance()
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self();
+ }
+ return $instance;
+ }
+ /*
+ * @public function initForm
+ * @param string $module
+ * @param string $table
+ */
+ public function initForm($module, $table) {
+ $this->setModule($module);
+ $this->setTable($table);
+ }
+ /*
+ * @public function getXoopsFormText
+ * @param string $language
+ * @param string $field_name
+ * @param string $required
+ */
+ public function getXoopsFormText($language, $field_name, $required = 'false') {
+ $ret = <<<EOT
+ \$form->addElement(new XoopsFormText({$language}, '{$field_name}', 50, 255, \$this->getVar('{$field_name}')){$required});\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getXoopsFormText
+ * @param string $language
+ * @param string $field_name
+ * @param string $required
+ */
+ public function getXoopsFormTextArea($language, $field_name, $required = 'false') {
+ $ret = <<<EOT
+ \$form->addElement(new XoopsFormTextArea({$language}, '{$field_name}', \$this->getVar('{$field_name}'), 4, 47){$required});\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getXoopsFormDhtmlTextArea
+ * @param string $language
+ * @param string $module_name
+ * @param string $field_name
+ * @param string $required
+ */
+ public function getXoopsFormDhtmlTextArea($language, $module_name, $field_name, $required = 'false') {
+ $ret = <<<EOT
+ \$editor_configs = array();
+ \$editor_configs['name'] = '{$field_name}';
+ \$editor_configs['value'] = \$this->getVar('{$field_name}', 'e');
+ \$editor_configs['rows'] = 5;
+ \$editor_configs['cols'] = 40;
+ \$editor_configs['width'] = '100%';
+ \$editor_configs['height'] = '400px';
+ \$editor_configs['editor'] = xoops_getModuleOption('{$module_name}_editor', '{$module_name}');
+ \$form->addElement( new XoopsFormEditor({$language}, '{$field_name}', \$editor_configs){$required});\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getXoopsFormCheckBox
+ * @param string $language
+ * @param string $field_name
+ * @param string $required
+ */
+ public function getXoopsFormCheckBox($language, $field_name, $required = 'false') {
+ $ret = <<<EOT
+ \${$field_name} = \$this->isNew() ? 0 : \$this->getVar('{$field_name}');
+ \$check_{$field_name} = new XoopsFormCheckBox({$language}, '{$field_name}', \${$field_name});
+ \$check_{$field_name}->addOption(1, " ");
+ \$form->addElement(\$check_{$field_name}{$required});\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getXoopsFormHidden
+ * @param string $field_name
+ */
+ public function getXoopsFormHidden($field_name) {
+ $ret = <<<EOT
+ \$form->addElement(new XoopsFormHidden('{$field_name}', \$this->getVar('{$field_name}')));\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getXoopsFormUploadFile
+ * @param string $language
+ * @param string $field_name
+ * @param string $required
+ */
+ public function getXoopsFormUploadFile($language, $field_name, $required = 'false') {
+ $ret = <<<EOT
+ \$form->addElement(new XoopsFormUploadFile({$language}, '{$field_name}', \$xoopsModuleConfig['maxsize']){$required});\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getXoopsFormUploadImage
+ * @param string $language
+ * @param string $field_name
+ * @param string $required
+ */
+ public function getXoopsFormUploadImage($language, $field_name, $required = 'false') {
+ $ret = <<<EOT
+ \$form->addElement(new XoopsFormUploadImage({$language}, '{$field_name}', \$xoopsModuleConfig['maxsize']){$required});\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getXoopsFormColorPicker
+ * @param string $language
+ * @param string $field_name
+ * @param string $required
+ */
+ public function getXoopsFormColorPicker($language, $field_name, $required = 'false') {
+ $ret = <<<EOT
+ \$form->addElement(new XoopsFormColorPicker({$language}, '{$field_name}', \$xoopsModuleConfig['maxsize']){$required});\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getXoopsFormSelect
+ * @param string $language
+ * @param string $table_name
+ * @param string $field_name
+ * @param string $required
+ */
+ public function getXoopsFormSelect($language, $table_name, $field_name, $required = 'false') {
+ $ret = <<<EOT
+ \${$field_name}_select = new XoopsFormSelect({$language}, '{$field_name}', \$this->getVar('{$field_name}'));
+ \${$field_name}_select->addOptionArray({$table_name}Handler->getList());
+ \$form->addElement(\${$field_name}_select{$required});\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getXoopsFormSelectUser
+ * @param string $language
+ * @param string $field_name
+ * @param string $required
+ */
+ public function getXoopsFormSelectUser($language, $field_name, $required = 'false') {
+ $ret = <<<EOT
+ \$form->addElement(new XoopsFormSelectUser({$language}, '{$field_name}', false, \$this->getVar('{$field_name}'), 1, false){$required});\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getXoopsFormRadioYN
+ * @param string $language
+ * @param string $field_name
+ * @param string $required
+ */
+ public function getXoopsFormRadioYN($language, $field_name, $required = 'false') {
+ $ret = <<<EOT
+ ${$field_name} = \$this->isNew() ? 0 : \$this->getVar('{$field_name}');
+ \$form->addElement(new XoopsFormRadioYN({$language}, '{$field_name}', ${$field_name}){$required});\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getXoopsFormTextDateSelect
+ * @param string $language
+ * @param string $field_name
+ * @param string $required
+ */
+ public function getXoopsFormTextDateSelect($language, $field_name, $required = 'false') {
+ $ret = <<<EOT
+ \$form->addElement(new XoopsFormTextDateSelect({$language}, '{$field_name}', '', \$this->getVar('{$field_name}')){$required});\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getXoopsFormTable
+ * @param string $language
+ * @param string $module_name
+ * @param string $table_name
+ * @param string $fields
+ * @param string $required
+ */
+ public function getXoopsFormTable($language, $module_name, $table_name, $fields, $required = 'false')
+ {
+ $field_name = '';
+ foreach(array_keys($fields) as $f)
+ {
+ if(($fields[$f]->getVar('field_parent') == 1)) {
+ $field_name = $fields[$f]->getVar('field_name');
+ }
+ }
+ $ret = <<<XFT
+ \${$table_name}Handler =& xoops_getModuleHandler('{$table_name}', '{$module_name}');
+ \${$field_name}_select = new XoopsFormSelect({$language}, '{$field_name}', \$this->getVar('{$field_name}'));
+ \${$field_name}_select->addOptionArray(\${$field_name}Handler->getList());
+ \$form->addElement(\${$field_name}_select{$required});\n
+XFT;
+ return $ret;
+ }
+ /*
+ * @public function getXoopsFormTopic
+ * @param string $language
+ * @param string $module_name
+ * @param string $table_name
+ * @param string $fields
+ * @param string $required
+ */
+ public function getXoopsFormTopic($language, $module_name, $table_name, $fields, $required = 'false')
+ {
+ foreach(array_keys($fields) as $f)
+ {
+ $field_name = $fields[$f]->getVar('field_name');
+ if($fields[$f]->getVar('field_id') == 1) {
+ $field_id = $field_name;
+ }
+ if($fields[$f]->getVar('field_parent') == 1) {
+ $field_pid = $field_name;
+ }
+ if($fields[$f]->getVar('field_main') == 1) {
+ $field_main = $field_name;
+ }
+ }
+ $ret = <<<XFT
+ include_once(XOOPS_ROOT_PATH . '/class/tree.php');
+ \${$table_name}Handler = xoops_getModuleHandler('{$table_name}', '\${$module_name}' );
+ \$criteria = new CriteriaCompo();
+ \${$table_name} = \${$table_name}Handler->getObjects( \$criteria );
+ if(\${$table_name}) {
+ \${$table_name}_tree = new XoopsObjectTree( \${$table_name}, '{$field_id}', '{$field_pid}' );
+ \${$field_pid} = \${$table_name}_tree->makeSelBox( '{$field_pid}', '{$field_main}','--', \$this->getVar('{$field_pid}', 'e' ), true );
+ \$form->addElement( new XoopsFormLabel ( {$language}, \${$field_pid} ){$required});
+ }\n
+XFT;
+ return $ret;
+ }
+ /*
+ * @public function renderElements
+ * @param null
+ */
+ public function renderElements() {
+ $module = $this->getModule();
+ $table = $this->getTable();
+ $module_name = $module->getVar('mod_name');
+ $table_name = $table->getVar('table_name');
+ $language_funct = $this->getLanguage($module_name, 'AM');
+ $language_table = $language_funct . strtoupper($table_name);
+ $ret = '';
+ $fields = $this->getTableFields($table->getVar('table_id'));
+ foreach(array_keys($fields) as $f)
+ {
+ $field_name = $fields[$f]->getVar('field_name');
+ $field_element = $fields[$f]->getVar('field_element');
+ $language = $language_funct . strtoupper($field_name);
+ $required = ( $fields[$f]->getVar('field_required') == 1 ) ? ', true' : '';
+ //
+ //if($f > 0) { // If we want to hide XoopsFormHidden() or field id
+ switch($field_element)
+ {
+ case 1:
+ $ret .= $this->getXoopsFormText($language, $field_name, $required);
+ break;
+ case 2:
+ $ret .= $this->getXoopsFormTextArea($language, $field_name, $required);
+ break;
+ case 3:
+ $ret .= $this->getXoopsFormDhtmlTextArea($language, $module_name, $field_name, $required);
+ break;
+ case 4:
+ $ret .= $this->getXoopsFormCheckBox($language, $field_name, $required);
+ break;
+ case 5:
+ $ret .= $this->getXoopsFormRadioYN($language, $field_name, $required);
+ break;
+ case 6:
+ $ret .= $this->getXoopsFormSelect($language, $table_name, $field_name, $required);
+ break;
+ case 7:
+ $ret .= $this->getXoopsFormSelectUser($language, $field_name, $required);
+ break;
+ case 8:
+ $ret .= $this->getXoopsFormColorPicker($language, $field_name, $required);
+ break;
+ case 9:
+ $ret .= $this->getXoopsFormUploadImage($language, $field_name, $required);
+ break;
+ case 10:
+ $ret .= $this->getXoopsFormUploadFile($language, $field_name, $required);
+ break;
+ case 11:
+ $ret .= $this->getXoopsFormTextDateSelect($language, $field_name, $required);
+ break;
+ default:
+ $ret .= $this->getXoopsFormHidden($field_name);
+ break;
+ }
+ if ($field_element > 11) {
+ if($table->getVar('table_category') == 1) {
+ $ret .= $this->getXoopsFormTopic($language, $module_name, $table_name, $fields, $required);
+ } else {
+ $ret .= $this->getXoopsFormTable($language, $module_name, $table_name, $fields, $required);
+ }
+ }
+ //}
+ }
+ return $ret;
+ }
+}
\ No newline at end of file
Deleted: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/formelements.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/formelements.php 2014-06-10 12:14:51 UTC (rev 12575)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/formelements.php 2014-06-10 22:48:07 UTC (rev 12576)
@@ -1,351 +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: form_elements.php 12258 2014-01-02 09:33:29Z timgno $
- */
-defined('XOOPS_ROOT_PATH') or die('Restricted access');
-
-class TDMCreateFormElements extends TDMCreateFile
-{
- /*
- * @public function constructor
- * @param null
- */
- public function __construct() {
- parent::__construct();
- $this->tdmcreate = TDMCreate::getInstance();
- }
- /**
- * @param string $method
- * @param array $args
- */
- public function __call($method, $args)
- {
- $arg = isset($args[0]) ? $args[0] : null;
- return $this->getVar($method, $arg);
- }
- /*
- * @static function &getInstance
- * @param null
- */
- public static function &getInstance()
- {
- static $instance = false;
- if (!$instance) {
- $instance = new self();
- }
- return $instance;
- }
- /*
- * @public function initForm
- * @param string $module
- * @param string $table
- */
- public function initForm($module, $table) {
- $this->setModule($module);
- $this->setTable($table);
- }
- /*
- * @public function getXoopsFormText
- * @param string $language
- * @param string $field_name
- * @param string $required
- */
- public function getXoopsFormText($language, $field_name, $required = 'false') {
- $ret = <<<EOT
- \$form->addElement(new XoopsFormText({$language}, '{$field_name}', 50, 255, \$this->getVar('{$field_name}')){$required});\n
-EOT;
- return $ret;
- }
- /*
- * @public function getXoopsFormText
- * @param string $language
- * @param string $field_name
- * @param string $required
- */
- public function getXoopsFormTextArea($language, $field_name, $required = 'false') {
- $ret = <<<EOT
- \$form->addElement(new XoopsFormTextArea({$language}, '{$field_name}', \$this->getVar('{$field_name}'), 4, 47){$required});\n
-EOT;
- return $ret;
- }
- /*
- * @public function getXoopsFormDhtmlTextArea
- * @param string $language
- * @param string $module_name
- * @param string $field_name
- * @param string $required
- */
- public function getXoopsFormDhtmlTextArea($language, $module_name, $field_name, $required = 'false') {
- $ret = <<<EOT
- \$editor_configs = array();
- \$editor_configs['name'] = '{$field_name}';
- \$editor_configs['value'] = \$this->getVar('{$field_name}', 'e');
- \$editor_configs['rows'] = 5;
- \$editor_configs['cols'] = 40;
- \$editor_configs['width'] = '100%';
- \$editor_configs['height'] = '400px';
- \$editor_configs['editor'] = xoops_getModuleOption('{$module_name}_editor', '{$module_name}');
- \$form->addElement( new XoopsFormEditor({$language}, '{$field_name}', \$editor_configs){$required});\n
-EOT;
- return $ret;
- }
- /*
- * @public function getXoopsFormCheckBox
- * @param string $language
- * @param string $field_name
- * @param string $required
- */
- public function getXoopsFormCheckBox($language, $field_name, $required = 'false') {
- $ret = <<<EOT
- \${$field_name} = \$this->isNew() ? 0 : \$this->getVar('{$field_name}');
- \$check_{$field_name} = new XoopsFormCheckBox({$language}, '{$field_name}', \${$field_name});
- \$check_{$field_name}->addOption(1, " ");
- \$form->addElement(\$check_{$field_name}{$required});\n
-EOT;
- return $ret;
- }
- /*
- * @public function getXoopsFormHidden
- * @param string $field_name
- */
- public function getXoopsFormHidden($field_name) {
- $ret = <<<EOT
- \$form->addElement(new XoopsFormHidden('{$field_name}', \$this->getVar('{$field_name}')));\n
-EOT;
- return $ret;
- }
- /*
- * @public function getXoopsFormUploadFile
- * @param string $language
- * @param string $field_name
- * @param string $required
- */
- public function getXoopsFormUploadFile($language, $field_name, $required = 'false') {
- $ret = <<<EOT
- \$form->addElement(new XoopsFormUploadFile({$language}, '{$field_name}', \$xoopsModuleConfig['maxsize']){$required});\n
-EOT;
- return $ret;
- }
- /*
- * @public function getXoopsFormUploadImage
- * @param string $language
- * @param string $field_name
- * @param string $required
- */
- public function getXoopsFormUploadImage($language, $field_name, $required = 'false') {
- $ret = <<<EOT
- \$form->addElement(new XoopsFormUploadImage({$language}, '{$field_name}', \$xoopsModuleConfig['maxsize']){$required});\n
-EOT;
- return $ret;
- }
- /*
- * @public function getXoopsFormColorPicker
- * @param string $language
- * @param string $field_name
- * @param string $required
- */
- public function getXoopsFormColorPicker($language, $field_name, $required = 'false') {
- $ret = <<<EOT
- \$form->addElement(new XoopsFormColorPicker({$language}, '{$field_name}', \$xoopsModuleConfig['maxsize']){$required});\n
-EOT;
- return $ret;
- }
- /*
- * @public function getXoopsFormSelect
- * @param string $language
- * @param string $table_name
- * @param string $field_name
- * @param string $required
- */
- public function getXoopsFormSelect($language, $table_name, $field_name, $required = 'false') {
- $ret = <<<EOT
- \${$field_name}_select = new XoopsFormSelect({$language}, '{$field_name}', \$this->getVar('{$field_name}'));
- \${$field_name}_select->addOptionArray({$table_name}Handler->getList());
- \$form->addElement(\${$field_name}_select{$required});\n
-EOT;
- return $ret;
- }
- /*
- * @public function getXoopsFormSelectUser
- * @param string $language
- * @param string $field_name
- * @param string $required
- */
- public function getXoopsFormSelectUser($language, $field_name, $required = 'false') {
- $ret = <<<EOT
- \$form->addElement(new XoopsFormSelectUser({$language}, '{$field_name}', false, \$this->getVar('{$field_name}'), 1, false){$required});\n
-EOT;
- return $ret;
- }
- /*
- * @public function getXoopsFormRadioYN
- * @param string $language
- * @param string $field_name
- * @param string $required
- */
- public function getXoopsFormRadioYN($language, $field_name, $required = 'false') {
- $ret = <<<EOT
- ${$field_name} = \$this->isNew() ? 0 : \$this->getVar('{$field_name}');
- \$form->addElement(new XoopsFormRadioYN({$language}, '{$field_name}', ${$field_name}){$required});\n
-EOT;
- return $ret;
- }
- /*
- * @public function getXoopsFormTextDateSelect
- * @param string $language
- * @param string $field_name
- * @param string $required
- */
- public function getXoopsFormTextDateSelect($language, $field_name, $required = 'false') {
- $ret = <<<EOT
- \$form->addElement(new XoopsFormTextDateSelect({$language}, '{$field_name}', '', \$this->getVar('{$field_name}')){$required});\n
-EOT;
- return $ret;
- }
- /*
- * @public function getXoopsFormTable
- * @param string $language
- * @param string $module_name
- * @param string $table_name
- * @param string $fields
- * @param string $required
- */
- public function getXoopsFormTable($language, $module_name, $table_name, $fields, $required = 'false')
- {
- $field_name = '';
- foreach(array_keys($fields) as $f)
- {
- if(($fields[$f]->getVar('field_parent') == 1)) {
- $field_name = $fields[$f]->getVar('field_name');
- }
- }
- $ret = <<<XFT
- \${$table_name}Handler =& xoops_getModuleHandler('{$table_name}', '{$module_name}');
- \${$field_name}_select = new XoopsFormSelect({$language}, '{$field_name}', \$this->getVar('{$field_name}'));
- \${$field_name}_select->addOptionArray(\${$field_name}Handler->getList());
- \$form->addElement(\${$field_name}_select{$required});\n
-XFT;
- return $ret;
- }
- /*
- * @public function getXoopsFormTopic
- * @param string $language
- * @param string $module_name
- * @param string $table_name
- * @param string $fields
- * @param string $required
- */
- public function getXoopsFormTopic($language, $module_name, $table_name, $fields, $required = 'false')
- {
- foreach(array_keys($fields) as $f)
- {
- $field_name = $fields[$f]->getVar('field_name');
- if($fields[$f]->getVar('field_id') == 1) {
- $field_id = $field_name;
- }
- if($fields[$f]->getVar('field_parent') == 1) {
- $field_pid = $field_name;
- }
- if($fields[$f]->getVar('field_main') == 1) {
- $field_main = $field_name;
- }
- }
- $ret = <<<XFT
- include_once(XOOPS_ROOT_PATH . '/class/tree.php');
- \${$table_name}Handler = xoops_getModuleHandler('{$table_name}', '\${$module_name}' );
- \$criteria = new CriteriaCompo();
- \${$table_name} = \${$table_name}Handler->getObjects( \$criteria );
- if(\${$table_name}) {
- \${$table_name}_tree = new XoopsObjectTree( \${$table_name}, '{$field_id}', '{$field_pid}' );
- \${$field_pid} = \${$table_name}_tree->makeSelBox( '{$field_pid}', '{$field_main}','--', \$this->getVar('{$field_pid}', 'e' ), true );
- \$form->addElement( new XoopsFormLabel ( {$language}, \${$field_pid} ){$required});
- }\n
-XFT;
- return $ret;
- }
- /*
- * @public function renderElements
- * @param null
- */
- public function renderElements() {
- $module = $this->getModule();
- $table = $this->getTable();
- $module_name = $module->getVar('mod_name');
- $table_name = $table->getVar('table_name');
- $language_funct = $this->getLanguage($module_name, 'AM');
- $language_table = $language_funct . strtoupper($table_name);
- $ret = '';
- $fields = $this->getTableFields($table->getVar('table_id'));
- foreach(array_keys($fields) as $f)
- {
- $field_name = $fields[$f]->getVar('field_name');
- $field_element = $fields[$f]->getVar('field_element');
- $language = $language_funct . strtoupper($field_name);
- $required = ( $fields[$f]->getVar('field_required') == 1 ) ? ', true' : '';
- //
- switch($field_element)
- {
- case 1:
- $ret .= $this->getXoopsFormText($language, $field_name, $required);
- break;
- case 2:
- $ret .= $this->getXoopsFormTextArea($language, $field_name, $required);
- break;
- case 3:
- $ret .= $this->getXoopsFormDhtmlTextArea($language, $module_name, $field_name, $required);
- break;
- case 4:
- $ret .= $this->getXoopsFormCheckBox($language, $field_name, $required);
- break;
- case 5:
- $ret .= $this->getXoopsFormRadioYN($language, $field_name, $required);
- break;
- case 6:
- $ret .= $this->getXoopsFormSelect($language, $table_name, $field_name, $required);
- break;
- case 7:
- $ret .= $this->getXoopsFormSelectUser($language, $field_name, $required);
- break;
- case 8:
- $ret .= $this->getXoopsFormColorPicker($language, $field_name, $required);
- break;
- case 9:
- $ret .= $this->getXoopsFormUploadImage($language, $field_name, $required);
- break;
- case 10:
- $ret .= $this->getXoopsFormUploadFile($language, $field_name, $required);
- break;
- case 11:
- $ret .= $this->getXoopsFormTextDateSelect($language, $field_name, $required);
- break;
- default:
- $ret .= $this->getXoopsFormHidden($field_name);
- break;
- }
- if ($field_element > 11) {
- if($table->getVar('table_category') == 1) {
- $ret .= $this->getXoopsFormTopic($language, $module_name, $table_name, $fields, $required);
- } else {
- $ret .= $this->getXoopsFormTable($language, $module_name, $table_name, $fields, $required);
- }
- }
- }
- return $ret;
- }
-}
\ No newline at end of file
|
|
From: <txm...@us...> - 2014-06-10 12:15:02
|
Revision: 12575
http://sourceforge.net/p/xoops/svn/12575
Author: txmodxoops
Date: 2014-06-10 12:14:51 +0000 (Tue, 10 Jun 2014)
Log Message:
-----------
prefix removed from the file creation
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/common.php
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/about.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/menu.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/objects.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/permissions.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/templates.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks/blocks.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks/templates.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class/classes.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/css/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/css/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/css/styles.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs/changelog.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs/docs.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/comments.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/common.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/functions.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/install.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/jquery.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/notifications.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/search.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/
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/class/files/language/help.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/mail.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/main.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/modinfo.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql/mysql.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/notification_update.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/objects.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/print.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/rss.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/submit.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/templates.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/xoopsversion.php
Removed Paths:
-------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/css/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/about.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/about.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/about.php 2014-06-10 12:14:51 UTC (rev 12575)
@@ -0,0 +1,72 @@
+<?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 admin_about.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class AdminAbout extends TDMCreateFile
+{
+ /*
+ * @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 = strtolower($module->getVar('mod_name'));
+ $module_donations = $module->getVar('mod_donations');
+ $content = $this->getHeaderFilesComments($module, $filename);
+ $content .= <<<EOT
+include 'header.php';
+echo \$adminMenu->addNavigation('about.php');
+echo \$adminMenu->renderAbout('{$module_donations}', false);
+include 'footer.php';
+EOT;
+ $this->tdmcfile->create($module_name, '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/admin/footer.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/footer.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/footer.php 2014-06-10 12:14:51 UTC (rev 12575)
@@ -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: 1.91 admin_footer.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class AdminFooter 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 = $this->getHeaderFilesComments($module, $filename);
+ $content .= <<<EOT
+\necho "<div class='center'><a href='http://www.xoops.org' title='Visit XOOPS' target='_blank'>
+ <img src='".\$sysPathIcon32."/xoopsmicrobutton.gif' alt='XOOPS' /></a></div>";
+echo "<div class='center smallsmall italic pad5'>
+ <strong>" . \$xoopsModule->getVar('name') . "</strong> ".{$language}MAINTAINEDBY."
+ <a href='{$support_url}' title='Visit {$support_name}' class='tooltip' rel='external'>{$support_name}</a></div>";
+xoops_cp_footer();
+EOT;
+ $this->tdmcfile->create($module_name, '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/admin/header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/header.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/header.php 2014-06-10 12:14:51 UTC (rev 12575)
@@ -0,0 +1,132 @@
+<?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_header.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class AdminHeader extends TDMCreateFile
+{
+ /*
+ * @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, $tables, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ $this->setTable($table);
+ $this->setTables($tables);
+ }
+ /*
+ * @public function render
+ * @param null
+ */
+ public function render() {
+ $module = $this->getModule();
+ $table = $this->getTable();
+ $tables = $this->getTables();
+ $filename = $this->getFileName();
+ $module_name = $module->getVar('mod_name');
+ $stl_mod_name = strtolower($module_name);
+ $ucfmod_name = ucfirst($module_name);
+ $language = $this->getLanguage('AM');
+ $content = $this->getHeaderFilesComments($module, $filename);
+ $content .= <<<EOT
+\nrequire_once dirname(dirname(dirname(dirname(__FILE__)))). '/include/cp_header.php';
+\$thisPath = dirname(dirname(__FILE__));
+include_once \$thisPath.'/include/common.php';
+include_once \$thisPath.'/include/functions.php';
+//\n
+EOT;
+ if ( $table->getVar('table_name') != '' ) {
+ $content .= <<<EOT
+include_once \$thisPath.'/class/helper.php';
+// Get instance
+\${$stl_mod_name}Helper = {$ucfmod_name}Helper::getInstance();\n
+EOT;
+ }
+ $content .= <<<EOT
+\$thisModule = \$GLOBALS['xoopsModule']->getVar('dirname');
+
+\$sysPathIcon16 = '../' . \$xoopsModule->getInfo('sysicons16');
+\$sysPathIcon32 = '../' . \$xoopsModule->getInfo('sysicons32');
+\$pathModuleAdmin = \$GLOBALS['xoopsModule']->getInfo('dirmoduleadmin');
+
+\$modPathIcon16 = \$xoopsModule->getInfo('modicons16');
+\$modPathIcon32 = \$xoopsModule->getInfo('modicons32');
+//\n
+EOT;
+ foreach (array_keys($tables) as $i)
+ {
+ $table_name = $tables[$i]->getVar('table_name');
+ $content .= <<<EOT
+\${$table_name}Handler =& xoops_getModuleHandler('{$table_name}', \$thisModule);\n
+EOT;
+ }
+ $content .=<<<EOT
+//
+\$myts =& MyTextSanitizer::getInstance();
+if (!isset(\$xoopsTpl) || !is_object(\$xoopsTpl)) {
+ include_once(XOOPS_ROOT_PATH."/class/template.php");
+ \$xoopsTpl = new XoopsTpl();
+}
+// System icons path
+\$xoopsTpl->assign('sysPathIcon16', \$sysPathIcon16);
+\$xoopsTpl->assign('sysPathIcon32', \$sysPathIcon32);
+// Local icons path
+\$xoopsTpl->assign('modPathIcon16', \$modPathIcon16);
+\$xoopsTpl->assign('modPathIcon32', \$modPathIcon32);
+
+//Load languages
+xoops_loadLanguage('admin', \$thisModule);
+xoops_loadLanguage('modinfo', \$thisModule);
+xoops_loadLanguage('main', \$thisModule);
+// Local admin menu class
+if ( file_exists(\$GLOBALS['xoops']->path(\$pathModuleAdmin.'/moduleadmin.php'))){
+ include_once \$GLOBALS['xoops']->path(\$pathModuleAdmin.'/moduleadmin.php');
+}else{
+ redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, false);
+}
+xoops_cp_header();
+\$adminMenu = new ModuleAdmin();
+EOT;
+ $this->tdmcfile->create($module_name, '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/admin/index.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/index.html (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/index.html 2014-06-10 12:14:51 UTC (rev 12575)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/index.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/index.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/index.php 2014-06-10 12:14:51 UTC (rev 12575)
@@ -0,0 +1,101 @@
+<?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_index.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class AdminIndex extends TDMCreateFile
+{
+ /*
+ * @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, $tables, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ $this->table = $table;
+ $this->tables = $tables;
+ }
+ /*
+ * @public function render
+ * @param null
+ */
+ public function render() {
+ $module = $this->getModule();
+ $filename = $this->getFileName();
+ //$table = $this->getTable();
+ $module_name = strtolower($module->getVar('mod_name'));
+ $language = $this->getLanguage($module_name, 'AM');
+ $language_thereare = $this->getLanguage($module_name, 'AM', 'THEREARE_');
+ $content = $this->getHeaderFilesComments($module, $filename);
+ $content .= <<<EOT
+include_once 'header.php';\n
+EOT;
+ foreach (array_keys($this->tables) as $i)
+ {
+ $table_name = $this->tables[$i]->getVar('table_name');
+ $content .= <<<EOT
+//count "{$table_name}"
+\$count_{$table_name} = \${$table_name}Handler->getCount();\n
+EOT;
+ }
+ $content .= <<<EOT
+// InfoBox Statistics
+\$adminMenu->addInfoBox({$language}STATISTICS);
+// InfoBox\n
+EOT;
+ foreach (array_keys($this->tables) as $i)
+ {
+ $table_name = $this->tables[$i]->getVar('table_name');
+ $ta_stutable_name = $language_thereare.strtoupper($table_name);
+ $content .= <<<EOT
+\$adminMenu->addInfoBoxLine({$language}STATISTICS, '<label>'.{$ta_stutable_name}.'</label>', \$count_{$table_name});\n
+EOT;
+ }
+ $content .= <<<EOT
+// Render Index
+echo \$adminMenu->addNavigation('index.php');
+echo \$adminMenu->renderIndex();
+include_once 'footer.php';
+EOT;
+ $this->tdmcfile->create($module_name, '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/admin/menu.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/menu.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/menu.php 2014-06-10 12:14:51 UTC (rev 12575)
@@ -0,0 +1,116 @@
+<?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_menu.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class AdminMenu extends TDMCreateFile
+{
+ /*
+ * @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 mixed $tables
+ * @param string $filename
+ */
+ public function write($module, $table, $tables, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ $this->table = $table;
+ $this->tables = $tables;
+ }
+ /*
+ * @public function render
+ * @param null
+ */
+ public function render() {
+ $module = $this->getModule();
+ $module_name = $module->getVar('mod_name');
+ //$table = $this->getTable();
+ $filename = $this->getFileName();
+ $language = $this->getLanguage($module_name, 'MI', 'ADMENU');
+ $menu = 1;
+ $content = $this->getHeaderFilesComments($module, $filename);
+ $content .= <<<EOT
+\n\$dirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+\$module_handler =& xoops_gethandler('module');
+\$xoopsModule =& XoopsModule::getByDirname(\$dirname);
+\$moduleInfo =& \$module_handler->get(\$xoopsModule->getVar('mid'));
+\$sysPathIcon32 = \$moduleInfo->getInfo('sysicons32');
+\$adminmenu = array();
+\$i = 1;
+\$adminmenu[\$i]['title'] = {$language}{$menu};
+\$adminmenu[\$i]['link'] = 'admin/index.php';
+\$adminmenu[\$i]['icon'] = \$sysPathIcon32.'/home.png';
+\$i++;
+EOT;
+ foreach (array_keys($this->tables) as $i)
+ {
+ if ( $this->tables[$i]->getVar('table_admin') == 1 )
+ {
+ $menu++;
+ $content .= <<<EOT
+\n\$adminmenu[\$i]['title'] = {$language}{$menu};
+\$adminmenu[\$i]['link'] = 'admin/{$this->tables[$i]->getVar('table_name')}.php';
+\$adminmenu[\$i]['icon'] = \$sysPathIcon32.'/{$this->tables[$i]->getVar('table_image')}';
+\$i++;
+EOT;
+ }
+ }
+ if( $this->table->getVar('table_permissions') == 1 ) {
+ $menu++;
+ $content .= <<<EOT
+\n\$adminmenu[\$i]['title'] = {$language}{$menu};
+\$adminmenu[\$i]['link'] = 'admin/permissions.php';
+\$adminmenu[\$i]['icon'] = \$pathIcon32.'/permissions.png';
+\$i++;
+EOT;
+ }
+ $menu++;
+ $content .= <<<EOT
+\n\$adminmenu[\$i]['title'] = {$language}{$menu};
+\$adminmenu[\$i]['link'] = 'admin/about.php';
+\$adminmenu[\$i]['icon'] = \$pathIcon32.'/about.png';
+unset( \$i );
+EOT;
+ unset( $menu );
+
+ $this->tdmcfile->create($module_name, '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/admin/objects.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/objects.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/objects.php 2014-06-10 12:14:51 UTC (rev 12575)
@@ -0,0 +1,122 @@
+<?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_objects.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class AdminObjects
+{
+ /*
+ * @static function &getInstance
+ * @param null
+ */
+ public static function &getInstance()
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self();
+ }
+ return $instance;
+ }
+ /*
+ * @public function getSimpleSetVar
+ * @param string $table_name
+ * @param string $field_name
+ */
+ public function getSimpleSetVar($table_name, $field_name) {
+ $ret = <<<EOT
+ \${$table_name}_obj->setVar('{$field_name}', \$_POST['{$field_name}']);\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getTextDateSelect
+ * @param string $table_name
+ * @param string $field_name
+ */
+ public function getTextDateSelect($table_name, $field_name) {
+ $ret = <<<EOT
+ \${$table_name}_obj->setVar('{$field_name}', strtotime(\$_POST['{$field_name}']));\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getCheckBoxOrRadioYN
+ * @param string $table_name
+ * @param string $field_name
+ */
+ public function getCheckBoxOrRadioYN($table_name, $field_name) {
+ $ret = <<<EOT
+ \${$table_name}_obj->setVar('{$field_name}', ((\$_REQUEST['{$field_name}'] == 1) ? '1' : '0'));\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getUploadImage
+ * @param string $module_name
+ * @param string $table_name
+ * @param string $field_name
+ */
+ public function getUploadImage($module_name, $table_name, $field_name) {
+ $ret = <<<EOT
+ include_once XOOPS_ROOT_PATH.'/class/uploader.php';
+ \$uploaddir = XOOPS_UPLOAD_PATH.'/{$module_name}/images/{$table_name}/';
+ \$uploader = new XoopsMediaUploader(\$uploaddir, xoops_getModuleOption('mimetypes', '{$module_name}'),
+ xoops_getModuleOption('maxsize', '{$module_name}'), null, null);
+ if (\$uploader->fetchMedia(\$_POST['xoops_upload_file'][0])) {
+ \$uploader->setPrefix('{$field_name}_');
+ \$uploader->fetchMedia(\$_POST['xoops_upload_file'][0]);
+ if (!\$uploader->upload()) {
+ \$errors = \$uploader->getErrors();
+ redirect_header('javascript:history.go(-1)', 3, \$errors);
+ } else {
+ \${$table_name}_obj->setVar('{$field_name}', \$uploader->getSavedFileName());
+ }
+ } else {
+ \${$table_name}_obj->setVar('{$field_name}', \$_POST['{$field_name}']);
+ }\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getUploadFile
+ * @param string $module_name
+ * @param string $table_name
+ * @param string $field_name
+ */
+ public function getUploadFile($module_name, $table_name, $field_name) {
+ $ret = <<<EOT
+ include_once XOOPS_ROOT_PATH.'/class/uploader.php';
+ \$uploaddir = XOOPS_UPLOAD_PATH.'/{$module_name}/files/{$table_name}/';
+ \$uploader = new XoopsMediaUploader(\$uploaddir, xoops_getModuleOption('mimetypes', '{$module_name}'),
+ xoops_getModuleOption('maxsize', '{$module_name}'), null, null);
+ if (\$uploader->fetchMedia(\$_POST['xoops_upload_file'][0])) {
+ \$uploader->setPrefix('{$field_name}_') ;
+ \$uploader->fetchMedia(\$_POST['xoops_upload_file'][0]);
+ if (!\$uploader->upload()) {
+ \$errors = \$uploader->getErrors();
+ redirect_header('javascript:history.go(-1)', 3, \$errors);
+ } else {
+ \${$table_name}_obj->setVar('{$field_name}', \$uploader->getSavedFileName());
+ }
+ }\n
+EOT;
+ return $ret;
+ }
+}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/pages.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/pages.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/pages.php 2014-06-10 12:14:51 UTC (rev 12575)
@@ -0,0 +1,309 @@
+<?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_pages.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+require_once 'objects.php';
+class AdminPages extends TDMCreateFile
+{
+ /*
+ * @var string
+ */
+ private $adminobjects = null;
+ /*
+ * @public function constructor
+ * @param null
+ */
+ public function __construct() {
+ parent::__construct();
+ $this->adminobjects = AdminObjects::getInstance();
+ $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 getAdminPagesHeader
+ * @param string $mod_name
+ * @param string $table_name
+ */
+ public function getAdminPagesHeader($mod_name, $table_name) {
+
+ $ret = <<<EOT
+\ninclude_once 'header.php';
+//It recovered the value of argument op in URL$
+\$op = {$mod_name}_CleanVars(\$_REQUEST, 'op', 'list', 'string');
+
+echo \$adminMenu->addNavigation('{$table_name}.php');
+switch (\$op)
+{\n
+EOT;
+ return $ret;
+ }
+
+ /*
+ * @public function getAdminPagesList
+ * @param string $table_name
+ * @param string $language
+ */
+ public function getAdminPagesList($table_name, $language, $fields, $fpif, $fpmf) {
+ $stu_table_name = strtoupper($table_name);
+ $ret = <<<EOT
+ case 'list':
+ default:
+ \$limit = xoops_getModuleOption('adminpager');
+ \$start = TDMCreate_CleanVars(\$_REQUEST, 'start', 0);
+ \$adminMenu->addItemButton({$language}ADD_{$stu_table_name}, '{$table_name}.php?op=new', 'add');
+ echo \$adminMenu->renderButton();
+ \$criteria = new CriteriaCompo();
+ \$criteria->setSort('{$fpif} ASC, {$fpmf}');
+ \$criteria->setOrder('ASC');
+ \${$table_name}_rows = \${$table_name}Handler->getCount(\$criteria);
+ \${$table_name}_arr = \${$table_name}Handler->getAll(\$criteria);
+ unset(\$criteria);
+
+ // Table view
+ if (\${$table_name}_rows > 0)
+ {
+ foreach (array_keys(\${$table_name}_arr) as \$i)
+ {\n
+EOT;
+ foreach(array_keys($fields) as $f)
+ {
+ $field_name = $fields[$f]->getVar('field_name');
+ $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));
+ }
+ }
+ $lp_field_name = substr($field_name, 0, strpos($field_name, '_'));
+ $ret .= <<<EOT
+ \${$lp_field_name}['{$rp_field_name}'] = \${$table_name}_arr[\$i]->getVar('{$field_name}');\n
+EOT;
+ }
+ $ret .= <<<EOT
+ \$GLOBALS['xoopsTpl']->append('{$table_name}_list', \${$lp_field_name});
+ unset(\${$lp_field_name});
+ }
+ if ( \${$table_name}_rows > \$limit ) {
+ include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
+ \$pagenav = new XoopsPageNav(\${$table_name}_rows, \$limit, \$start, 'start', 'op=list&limit=' . \$limit);
+ \$GLOBALS['xoopsTpl']->assign('pagenav', \$pagenav->renderNav(4));
+ }
+ } else {
+ \$GLOBALS['xoopsTpl']->assign('error', {$language}THEREARENT_{$stu_table_name});
+ }
+ break;\n
+EOT;
+ return $ret;
+ }
+
+ /*
+ * @public function getAdminPagesNew
+ * @param string $table_name
+ * @param string $language
+ */
+ public function getAdminPagesNew($table_name, $language) {
+ $stu_table_name = strtoupper($table_name);
+ $ret = <<<EOT
+ case 'new':
+ \$adminMenu->addItemButton({$language}{$stu_table_name}_LIST, '{$table_name}.php', 'list');
+ echo \$adminMenu->renderButton();
+
+ \${$table_name}Obj =& \${$table_name}Handler->create();
+ \$form = \${$table_name}Obj->getForm();
+ \$form->display();
+ break;\n
+EOT;
+ return $ret;
+ }
+
+ /*
+ * @public function getAdminPagesSave
+ * @param string $table_name
+ * @param string $language
+ */
+ public function getAdminPagesSave($module_name, $table_name, $language, $fields, $fpif, $fpmf)
+ {
+ $ret = <<<EOT
+ case 'save':
+ if ( !\$GLOBALS['xoopsSecurity']->check() ) {
+ redirect_header('{$table_name}.php', 3, implode(',', \$GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if (isset(\$_REQUEST['{$fpif}'])) {
+ \${$table_name}Obj =& \${$table_name}Handler->get(\$_REQUEST['{$fpif}']);
+ } else {
+ \${$table_name}Obj =& \${$table_name}Handler->create();
+ }\n
+EOT;
+ foreach (array_keys($fields) as $f)
+ {
+ $field_name = $fields[$f]->getVar('field_name');
+ $field_element = $fields[$f]->getVar('field_element');
+ if($f > 0) {
+ switch($field_element) {
+ case 4:
+ case 5:
+ $ret .= $this->adminobjects->getCheckBoxOrRadioYN($table_name, $field_name);
+ break;
+ case 9:
+ $ret .= $this->adminobjects->getUploadImage($module_name, $table_name, $field_name);
+ break;
+ case 10:
+ $ret .= $this->adminobjects->getUploadFile($module_name, $table_name, $field_name);
+ break;
+ case 11:
+ $ret .= $this->adminobjects->getTextDateSelect($table_name, $field_name);
+ break;
+ default:
+ $ret .= $this->adminobjects->getSimpleSetVar($table_name, $field_name);
+ break;
+ }
+ }
+ }
+
+ $ret .= <<<EOT
+
+ if (\${$table_name}Handler->insert(\${$table_name}Obj)) {
+ redirect_header('{$table_name}.php?op=list', 2, {$language}FORMOK);
+ }
+
+ echo \${$table_name}Obj->getHtmlErrors();
+ \$form =& \${$table_name}Obj->getForm();
+ \$form->display();
+ break;\n
+EOT;
+ return $ret;
+ }
+
+ /*
+ * @public function getAdminPagesEdit
+ * @param string $table_name
+ * @param string $language
+ */
+ public function getAdminPagesEdit($table_name, $language, $fpif) {
+ $stu_table_name = strtoupper($table_name);
+ $ret = <<<EOT
+ case 'edit':
+ \$adminMenu->addItemButton({$language}ADD_{$stu_table_name}, '{$table_name}.php?op=new', 'add');
+ \$adminMenu->addItemButton({$language}{$stu_table_name}_LIST, '{$table_name}.php', 'list');
+ echo \$adminMenu->renderButton();
+ \${$table_name}Obj = \${$table_name}Handler->get(\$_REQUEST['{$fpif}']);
+ \$form = \${$table_name}Obj->getForm();
+ \$form->display();
+ break;\n
+EOT;
+ return $ret;
+ }
+
+ /*
+ * @public function getAdminPagesDelete
+ * @param string $table_name
+ * @param string $language
+ */
+ public function getAdminPagesDelete($table_name, $language, $fpif, $fpmf) {
+
+ $ret = <<<EOT
+ case 'delete':
+ \${$table_name}Obj =& \${$table_name}Handler->get(\$_REQUEST['{$fpif}']);
+ if (isset(\$_REQUEST['ok']) && \$_REQUEST['ok'] == 1) {
+ if ( !\$GLOBALS['xoopsSecurity']->check() ) {
+ redirect_header('{$table_name}.php', 3, implode(', ', \$GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if (\${$table_name}Handler->delete(\${$table_name}Obj)) {
+ redirect_header('{$table_name}.php', 3, {$language}FORMDELOK);
+ } else {
+ echo \${$table_name}Obj->getHtmlErrors();
+ }
+ } else {
+ xoops_confirm(array('ok' => 1, '{$fpif}' => \$_REQUEST['{$fpif}'], 'op' => 'delete'), \$_SERVER['REQUEST_URI'], sprintf({$language}FORMSUREDEL, \${$table_name}Obj->getVar('{$fpmf}')));
+ }
+ break;\n
+EOT;
+ return $ret;
+ }
+
+ /*
+ * @public function getAdminPagesFooter
+ * @param null
+ */
+ public function getAdminPagesFooter() {
+ $ret = <<<EOT
+}
+include_once 'footer.php';
+EOT;
+ return $ret;
+ }
+
+ /*
+ * @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');
+ $language = $this->getLanguage($module_name, 'AM');
+ $fpif = ''; $fpmf = '';
+ $fields = $this->getTableFields($table->getVar('table_id'));
+ foreach(array_keys($fields) as $f)
+ {
+ $field_name = $fields[$f]->getVar('field_name');
+ if($f == 0) {
+ $fpif = $field_name;
+ }
+ if($fields[$f]->getVar('field_main') == 1) {
+ $fpmf = $field_name;
+ }
+ }
+ $content = $this->getHeaderFilesComments($module, $filename);
+ $content .= $this->getAdminPagesHeader($module_name, $table_name);
+ $content .= $this->getAdminPagesList($table_name, $language, $fields, $fpif, $fpmf);
+ $content .= $this->getAdminPagesNew($table_name, $language);
+ $content .= $this->getAdminPagesSave($module_name, $table_name, $language, $fields, $fpif, $fpmf);
+ $content .= $this->getAdminPagesEdit($table_name, $language, $fpif);
+ $content .= $this->getAdminPagesDelete($table_name, $language, $fpif, $fpmf);
+ $content .= $this->getAdminPagesFooter();
+ //
+ $this->tdmcfile->create($module_name, '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/admin/permissions.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/permissions.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/permissions.php 2014-06-10 12:14:51 UTC (rev 12575)
@@ -0,0 +1,222 @@
+<?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_permissions.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class AdminPermissions 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 mixed $table
+ * @param mixed $tables
+ * @param string $filename
+ */
+ public function write($module, $tables, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ $this->setTables($tables);
+ }
+ /*
+ * @public function render
+ * @param string $module_name
+ * @param string $language
+ */
+ public function getHeaderPermissionsCode($module_name, $language)
+ {
+ $ret = <<<PRM
+\ninclude_once 'header.php';
+include_once XOOPS_ROOT_PATH.'/class/xoopsform/grouppermform.php';
+if( !empty(\$_POST['submit']) )
+{
+ redirect_header( XOOPS_URL.'/modules/'.\$xoopsModule->dirname().'/admin/permissions.php', 1, _MP_GPERMUPDATED );
+}
+// Check admin have access to this page
+/*\$group = \$xoopsUser->getGroups ();
+\$groups = xoops_getModuleOption ( 'admin_groups', \$thisDirname );
+if (count ( array_intersect ( \$group, \$groups ) ) <= 0) {
+ redirect_header ( 'index.php', 3, _NOPERM );
+}*/
+
+echo \$adminMenu->addNavigation('permissions.php');
+
+\$permission = {$module_name}_CleanVars(\$_POST, 'permission', 1, 'int');
+\$selected = array('', '', '', '');
+\$selected[\$permission-1] = ' selected';
+
+\$permTableForm = new XoopsTableForm('fselperm', 'permissions.php', 'post');
+\$formSelect = new XoopsFormSelect('', 'permission', onChange='javascript: document.fselperm.submit()');
+\$formSelect->addOption(\$selected[0], {$language}GLOBAL);
+\$formSelect->addOption(\$selected[1], {$language}APPROVE);
+\$formSelect->addOption(\$selected[2], {$language}SUBMIT);
+\$formSelect->addOption(\$selected[3], {$language}VIEW);
+\$permTableForm->addElement(\$formSelect);
+\$permTableForm->display();\n\n
+PRM;
+ return $ret;
+ }
+
+ /*
+ * @public function render
+ * @param string $module_name
+ * @param string $language
+ */
+ public function getSwitchPermissionsCode($module_name, $language)
+ {
+ $ret = <<<PRM
+\$module_id = \$xoopsModule->getVar('mid');
+switch(\$permission)
+{
+ case 1:
+ \$formTitle = {$language}GLOBAL;
+ \$permName = '{$module_name}_ac';
+ \$permDesc = {$language}GLOBAL_DESC;
+ \$globalPerms = array( '4' => {$language}GLOBAL_4,
+ '8' => {$language}GLOBAL_8,
+ '16' => {$language}GLOBAL_16 );
+ break;
+ case 2:
+ \$formTitle = {$language}APPROVE;
+ \$permName = '{$module_name}_access';
+ \$permDesc = {$language}APPROVE_DESC;
+ break;
+ case 3:
+ \$formTitle = {$language}SUBMIT;
+ \$permName = '{$module_name}_submit';
+ \$permDesc = {$language}SUBMIT_DESC;
+ break;
+ case 4:
+ \$formTitle = {$language}VIEW;
+ \$permName = '{$module_name}_view';
+ \$permDesc = {$language}VIEW_DESC;
+ break;
+}\n
+PRM;
+ return $ret;
+ }
+
+ /*
+ * @public function render
+ * @param string $module_name
+ * @param string $table_name
+ * @param string $language
+ */
+ public function getBodyPermissionsCode($module_name, $language)
+ {
+ $tables = $this->getTables();
+ foreach(array_keys($tables) as $t)
+ {
+ $table_id = $tables[$t]->getVar('table_id');
+ if($tables[$t]->getVar('table_permissions') == 1) {
+ $table_name = $tables[$t]->getVar('table_name');
+ }
+ }
+ $fields = $this->getTableFields($table_id);
+ foreach(array_keys($fields) as $f)
+ {
+ if($f == 1) {
+ $fpif = $fields[$f]->getVar('field_name');
+ }
+ if($fields[$f]->getVar('field_main') == 1) {
+ $fpmf = $fields[$f]->getVar('field_name');
+ }
+ }
+ $ret = <<<PRM
+\$permform = new XoopsGroupPermForm(\$formTitle, \$module_id, \$permName, \$permDesc, 'admin/permissions.php');
+if (\$permission == 1) {
+ foreach (\$globalPerms as \$perm_id => \$perm_name) {
+ \$permform->addItem(\$perm_id, \$perm_name);
+ }
+ echo \$permform->render();
+ echo '<br /><br />';
+} else {
+ \$criteria = new CriteriaCompo();
+ \$criteria->setSort('{$fpmf}');
+ \$criteria->setOrder('ASC');
+ \${$table_name}_count = \${$table_name}Handler->getCount(\$criteria);
+ \${$table_name}_arr = \${$table_name}Handler->getObjects(\$criteria);
+ unset(\$criteria);
+ foreach (array_keys(\${$table_name}_arr) as \$i) {
+ \$permform->addItem(\${$table_name}_arr[\$i]->getVar('{$fpif}'), \${$table_name}_arr[\$i]->getVar('{$fpmf}'));
+ }
+ // Check if {$table_name} exist before rendering the form and redirect, if there aren't {$table_name}
+ if (\${$table_name}_count > 0) {
+ echo \$permform->render();
+ echo '<br /><br />';
+ } else {
+ redirect_header ( '{$table_name}.php?op=new', 3, {$language}NOPERMSSET );
+ exit ();
+ }\n
+PRM;
+ return $ret;
+ }
+
+ /*
+ * @public function getFooterPermissionsCode
+ * @param null
+ */
+ public function getFooterPermissionsCode() {
+ $ret = <<<PRM
+}
+unset(\$permform);
+include_once 'footer.php';
+PRM;
+ return $ret;
+ }
+
+ /*
+ * @public function render
+ * @param null
+ */
+ public function render() {
+ $module = $this->getModule();
+ $filename = $this->getFileName();
+ $module_name = strtolower($module->getVar('mod_name'));
+ $language = $this->getLanguage($module_name, 'AM');
+ $content = $this->getHeaderFilesComments($module, $filename);
+ $content .= $this->getHeaderPermissionsCode($module_name, $language);
+ $content .= $this->getSwitchPermissionsCode($module_name, $language);
+ $content .= $this->getBodyPermissionsCode($module_name, $language);
+ $content .= $this->getFooterPermissionsCode();
+ //
+ $this->tdmcfile->create($module_name, '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/admin/templates.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/templates.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/templates.php 2014-06-10 12:14:51 UTC (rev 12575)
@@ -0,0 +1,65 @@
+<?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
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks/blocks.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks/blocks.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks/blocks.php 2014-06-10 12:14:51 UTC (rev 12575)
@@ -0,0 +1,184 @@
+<?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: blocks_pages.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class BlocksFiles 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 mixed $table
+ */
+ public function write($module, $table) {
+ $this->setModule($module);
+ $this->setTable($table);
+ }
+ /*
+ * @public function getBlocksShow
+ * @param null
+ */
+ public function getBlocksShow($module_name, $table_name, $table_fieldname, $table_category, $fields, $fpif, $fpmf) {
+ $mod_name_lowercase = strtolower($module_name);
+ $ret = <<<EOT
+include_once XOOPS_ROOT_PATH.'/modules/{$module_name}/include/functions.php';
+function b_{$mod_name_lowercase}_{$table_name}_show(\$options)
+{
+ include_once XOOPS_ROOT_PATH.'/modules/{$mod_name_lowercase}/class/{$table_name}.php';
+ \$myts =& MyTextSanitizer::getInstance();
+
+ \${$table_fieldname} = array();
+ \$type_block = \$options[0];
+ \$nb_{$table_name} = \$options[1];
+ \$lenght_title = \$options[2];
+
+ \${$table_name}Handler =& xoops_getModuleHandler('{$table_name}', '{$module_name}');
+ \$criteria = new CriteriaCompo();
+ array_shift(\$options);
+ array_shift(\$options);
+ array_shift(\$options);\n
+EOT;
+ if ( $table_category == 1 ) {
+ $ret .= <<<EOT
+ if (!(count(\$options) == 1 && \$options[0] == 0)) {
+ \$criteria->add(new Criteria('{$table_fieldname}_category', {$mod_name_lowercase}_block_addCatSelect(\$options), 'IN'));
+ }\n
+EOT;
+ }
+
+ $ret .= <<<EOT
+ if (\$type_block)
+ {
+ \$criteria->add(new Criteria('{$fpif}', 0, '!='));
+ \$criteria->setSort('{$fpif}');
+ \$criteria->setOrder('ASC');
+ }
+
+ \$criteria->setLimit(\$nb_{$table_name});
+ \${$table_name}_arr = \${$table_name}Handler->getAll(\$criteria);
+ foreach (array_keys(\${$table_name}_arr) as \$i)
+ {\n
+EOT;
+ foreach(array_keys($fields) as $f)
+ {
+ if( $fields[$f]->getVar('field_block') == 1 ) {
+ $ret .= <<<EOT
+ \${$table_fieldname}['{$fpmf}'] = \${$table_name}_arr[\$i]->getVar('{$fpmf}');\n
+EOT;
+ }
+ }
+ $ret .= <<<EOT
+ }
+ return \${$table_fieldname};
+}\n\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getBlocksEdit
+ * @param string $module_name
+ * @param string $table_name
+ * @param string $fpif
+ * @param string $fpmf
+ * @param string $language
+ */
+ public function getBlocksEdit($module_name, $table_name, $fpif, $fpmf, $language) {
+ $mod_name_lowercase = strtolower($module_name);
+ $ret = <<<EOT
+function b_{$mod_name_lowercase}_{$table_name}_edit(\$options)
+{
+ include_once XOOPS_ROOT_PATH.'/modules/{$module_name}/class/{$table_name}.php';
+ \${$table_name}Handler =& xoops_getModuleHandler('{$table_name}', '{$module_name}');
+ \$form = {$language}DISPLAY;
+ \$form .= "<input type='hidden' name='options[0]' value='".\$options[0]."' />";
+ \$form .= "<input name='options[1]' size='5' maxlength='255' value='".\$options[1]."' type='text' /> <br />";
+ \$form .= {$language}TITLELENGTH." : <input name='options[2]' size='5' maxlength='255' value='".\$options[2]."' type='text' /><br /><br />";
+ array_shift(\$options);
+ array_shift(\$options);
+ array_shift(\$options);
+ \$criteria = new CriteriaCompo();
+ \$criteria->add(new Criteria('{$fpif}', 0, '!='));
+ \$criteria->setSort('{$fpif}');
+ \$criteria->setOrder('ASC');
+ \${$table_name}_arr = \${$table_name}Handler->getAll(\$criteria);
+ unset(\$criteria)
+ \$form .= {$language}CATTODISPLAY."<br /><select name='options[]' multiple='multiple' size='5'>";
+ \$form .= "<option value='0' " . (array_search(0, \$options) === false ? "" : "selected='selected'") . ">" .{$language}ALLCAT . "</option>";
+ foreach (array_keys(\${$table_name}_arr) as \$i) {
+ \${$fpif} = \${$table_name}_arr[\$i]->getVar('{$fpif}');
+ \$form .= "<option value='" . \${$fpif} . "' " . (array_search(\${$fpif}, \$options) === false ? "" : "selected='selected'") . ">".\${$table_name}_arr[\$i]->getVar('{$fpmf}')."</option>";
+ }
+ \$form .= "</select>";
+ return \$form;
+}
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function renderFile
+ * @param null
+ */
+ public function renderFile($filename)
+ {
+ $module = $this->getModule();
+ $table = $this->getTable();
+ $module_name = strtolower($module->getVar('mod_name'));
+ $table_name = $table->getVar('table_name');
+ $table_fieldname = $table->getVar('table_fieldname');
+ $table_category = $table->getVar('table_category');
+ $language = $this->getLanguage($module_name, 'MB');
+ $fields = $this->getTableFields($table->getVar('table_id'));
+ foreach(array_keys($fields) as $f)
+ {
+ if($f == 0) {
+ $fpif = $fields[$f]->getVar('field_name');
+ }
+ if($fields[$f]->getVar('field_main') == 1) {
+ $fpmf = $fields[$f]->getVar('field_name');
+ }
+ }
+ $content = $this->getHeaderFilesComments($module, $filename);
+ $content .= $this->getBlocksShow($module_name, $table_name, $table_fieldname, $table_category, $fields, $fpif, $fpmf);
+ $content .= $this->getBlocksEdit($module_name, $table_name, $fpif, $fpmf, $language);
+ //
+ $this->tdmcfile->create($module_name, 'blocks', $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/blocks/index.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks/index.html (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks/index.html 2014-06-10 12:14:51 UTC (rev 12575)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks/templates.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks/templates.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks/templates.php 2014-06-10 12:14:51 UTC (rev 12575)
@@ -0,0 +1,98 @@
+<?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: blocks.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class BlocksTemplates 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 mixed $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');
+ $language = $this->getLanguage($module_name, 'MB');
+ $content = <<<EOT
+<table class="outer">
+ <tr class="head">\n
+EOT;
+ $fields = $this->getTableFields($table->getVar('table_id'));
+ foreach(array_keys($fields) as $f)
+ {
+ $lng_field_name = $language.strtoupper($fields[$f]->getVar('field_na...
[truncated message content] |
|
From: <txm...@us...> - 2014-06-10 11:22:53
|
Revision: 12574
http://sourceforge.net/p/xoops/svn/12574
Author: txmodxoops
Date: 2014-06-10 11:22:46 +0000 (Tue, 10 Jun 2014)
Log Message:
-----------
Move files creation, in their subdirectories
Updated
Work in progress
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/file.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/common.php
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_about.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_menu.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_objects.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_permissions.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_templates.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks/blocks_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks/blocks_templates.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class/class_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/css/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/css/css_styles.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/css/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs/docs_changelog.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs/docs_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/include_comments.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/include_common.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/include_functions.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/include_install.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/include_jquery.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/include_notifications.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/include_search.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/language_admin.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/language_blocks.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/language_help.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/language_main.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/language_modinfo.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language/language_tpl.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql/sql_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/templates_footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/templates_header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/templates_index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates/templates_pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/user_footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/user_header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/user_index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/user_notification_update.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/user_objects.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/user_pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/user_print.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/user_rss.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/user_submit.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/user_templates.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/user_xoopsversion.php
Removed Paths:
-------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_about.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_menu.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_objects.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_permissions.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_templates.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_templates.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/css_styles.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs_changelog.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_comments.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_common.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_functions.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_install.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_jquery.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_notifications.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_search.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/class/files/language_help.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_main.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_modinfo.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_notification_update.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_objects.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_print.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_rss.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_submit.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_templates.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_xoopsversion.php
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_about.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_about.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_about.php 2014-06-10 11:22:46 UTC (rev 12574)
@@ -0,0 +1,72 @@
+<?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 admin_about.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class AdminAbout extends TDMCreateFile
+{
+ /*
+ * @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 = strtolower($module->getVar('mod_name'));
+ $module_donations = $module->getVar('mod_donations');
+ $content = $this->getHeaderFilesComments($module, $filename);
+ $content .= <<<EOT
+include 'header.php';
+echo \$adminMenu->addNavigation('about.php');
+echo \$adminMenu->renderAbout('{$module_donations}', false);
+include 'footer.php';
+EOT;
+ $this->tdmcfile->create($module_name, '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/admin/admin_footer.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_footer.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_footer.php 2014-06-10 11:22:46 UTC (rev 12574)
@@ -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: 1.91 admin_footer.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class AdminFooter 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 = $this->getHeaderFilesComments($module, $filename);
+ $content .= <<<EOT
+\necho "<div class='center'><a href='http://www.xoops.org' title='Visit XOOPS' target='_blank'>
+ <img src='".\$sysPathIcon32."/xoopsmicrobutton.gif' alt='XOOPS' /></a></div>";
+echo "<div class='center smallsmall italic pad5'>
+ <strong>" . \$xoopsModule->getVar('name') . "</strong> ".{$language}MAINTAINEDBY."
+ <a href='{$support_url}' title='Visit {$support_name}' class='tooltip' rel='external'>{$support_name}</a></div>";
+xoops_cp_footer();
+EOT;
+ $this->tdmcfile->create($module_name, '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/admin/admin_header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_header.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_header.php 2014-06-10 11:22:46 UTC (rev 12574)
@@ -0,0 +1,132 @@
+<?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_header.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class AdminHeader extends TDMCreateFile
+{
+ /*
+ * @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, $tables, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ $this->setTable($table);
+ $this->setTables($tables);
+ }
+ /*
+ * @public function render
+ * @param null
+ */
+ public function render() {
+ $module = $this->getModule();
+ $table = $this->getTable();
+ $tables = $this->getTables();
+ $filename = $this->getFileName();
+ $module_name = $module->getVar('mod_name');
+ $stl_mod_name = strtolower($module_name);
+ $ucfmod_name = ucfirst($module_name);
+ $language = $this->getLanguage('AM');
+ $content = $this->getHeaderFilesComments($module, $filename);
+ $content .= <<<EOT
+\nrequire_once dirname(dirname(dirname(dirname(__FILE__)))). '/include/cp_header.php';
+\$thisPath = dirname(dirname(__FILE__));
+include_once \$thisPath.'/include/common.php';
+include_once \$thisPath.'/include/functions.php';
+//\n
+EOT;
+ if ( $table->getVar('table_name') != '' ) {
+ $content .= <<<EOT
+include_once \$thisPath.'/class/helper.php';
+// Get instance
+\${$stl_mod_name}Helper = {$ucfmod_name}Helper::getInstance();\n
+EOT;
+ }
+ $content .= <<<EOT
+\$thisModule = \$GLOBALS['xoopsModule']->getVar('dirname');
+
+\$sysPathIcon16 = '../' . \$xoopsModule->getInfo('sysicons16');
+\$sysPathIcon32 = '../' . \$xoopsModule->getInfo('sysicons32');
+\$pathModuleAdmin = \$GLOBALS['xoopsModule']->getInfo('dirmoduleadmin');
+
+\$modPathIcon16 = \$xoopsModule->getInfo('modicons16');
+\$modPathIcon32 = \$xoopsModule->getInfo('modicons32');
+//\n
+EOT;
+ foreach (array_keys($tables) as $i)
+ {
+ $table_name = $tables[$i]->getVar('table_name');
+ $content .= <<<EOT
+\${$table_name}Handler =& xoops_getModuleHandler('{$table_name}', \$thisModule);\n
+EOT;
+ }
+ $content .=<<<EOT
+//
+\$myts =& MyTextSanitizer::getInstance();
+if (!isset(\$xoopsTpl) || !is_object(\$xoopsTpl)) {
+ include_once(XOOPS_ROOT_PATH."/class/template.php");
+ \$xoopsTpl = new XoopsTpl();
+}
+// System icons path
+\$xoopsTpl->assign('sysPathIcon16', \$sysPathIcon16);
+\$xoopsTpl->assign('sysPathIcon32', \$sysPathIcon32);
+// Local icons path
+\$xoopsTpl->assign('modPathIcon16', \$modPathIcon16);
+\$xoopsTpl->assign('modPathIcon32', \$modPathIcon32);
+
+//Load languages
+xoops_loadLanguage('admin', \$thisModule);
+xoops_loadLanguage('modinfo', \$thisModule);
+xoops_loadLanguage('main', \$thisModule);
+// Local admin menu class
+if ( file_exists(\$GLOBALS['xoops']->path(\$pathModuleAdmin.'/moduleadmin.php'))){
+ include_once \$GLOBALS['xoops']->path(\$pathModuleAdmin.'/moduleadmin.php');
+}else{
+ redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, false);
+}
+xoops_cp_header();
+\$adminMenu = new ModuleAdmin();
+EOT;
+ $this->tdmcfile->create($module_name, '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/admin/admin_index.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_index.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_index.php 2014-06-10 11:22:46 UTC (rev 12574)
@@ -0,0 +1,101 @@
+<?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_index.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class AdminIndex extends TDMCreateFile
+{
+ /*
+ * @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, $tables, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ $this->table = $table;
+ $this->tables = $tables;
+ }
+ /*
+ * @public function render
+ * @param null
+ */
+ public function render() {
+ $module = $this->getModule();
+ $filename = $this->getFileName();
+ //$table = $this->getTable();
+ $module_name = strtolower($module->getVar('mod_name'));
+ $language = $this->getLanguage($module_name, 'AM');
+ $language_thereare = $this->getLanguage($module_name, 'AM', 'THEREARE_');
+ $content = $this->getHeaderFilesComments($module, $filename);
+ $content .= <<<EOT
+include_once 'header.php';\n
+EOT;
+ foreach (array_keys($this->tables) as $i)
+ {
+ $table_name = $this->tables[$i]->getVar('table_name');
+ $content .= <<<EOT
+//count "{$table_name}"
+\$count_{$table_name} = \${$table_name}Handler->getCount();\n
+EOT;
+ }
+ $content .= <<<EOT
+// InfoBox Statistics
+\$adminMenu->addInfoBox({$language}STATISTICS);
+// InfoBox\n
+EOT;
+ foreach (array_keys($this->tables) as $i)
+ {
+ $table_name = $this->tables[$i]->getVar('table_name');
+ $ta_stutable_name = $language_thereare.strtoupper($table_name);
+ $content .= <<<EOT
+\$adminMenu->addInfoBoxLine({$language}STATISTICS, '<label>'.{$ta_stutable_name}.'</label>', \$count_{$table_name});\n
+EOT;
+ }
+ $content .= <<<EOT
+// Render Index
+echo \$adminMenu->addNavigation('index.php');
+echo \$adminMenu->renderIndex();
+include_once 'footer.php';
+EOT;
+ $this->tdmcfile->create($module_name, '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/admin/admin_menu.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_menu.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_menu.php 2014-06-10 11:22:46 UTC (rev 12574)
@@ -0,0 +1,116 @@
+<?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_menu.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class AdminMenu extends TDMCreateFile
+{
+ /*
+ * @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 mixed $tables
+ * @param string $filename
+ */
+ public function write($module, $table, $tables, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ $this->table = $table;
+ $this->tables = $tables;
+ }
+ /*
+ * @public function render
+ * @param null
+ */
+ public function render() {
+ $module = $this->getModule();
+ $module_name = $module->getVar('mod_name');
+ //$table = $this->getTable();
+ $filename = $this->getFileName();
+ $language = $this->getLanguage($module_name, 'MI', 'ADMENU');
+ $menu = 1;
+ $content = $this->getHeaderFilesComments($module, $filename);
+ $content .= <<<EOT
+\n\$dirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+\$module_handler =& xoops_gethandler('module');
+\$xoopsModule =& XoopsModule::getByDirname(\$dirname);
+\$moduleInfo =& \$module_handler->get(\$xoopsModule->getVar('mid'));
+\$sysPathIcon32 = \$moduleInfo->getInfo('sysicons32');
+\$adminmenu = array();
+\$i = 1;
+\$adminmenu[\$i]['title'] = {$language}{$menu};
+\$adminmenu[\$i]['link'] = 'admin/index.php';
+\$adminmenu[\$i]['icon'] = \$sysPathIcon32.'/home.png';
+\$i++;
+EOT;
+ foreach (array_keys($this->tables) as $i)
+ {
+ if ( $this->tables[$i]->getVar('table_admin') == 1 )
+ {
+ $menu++;
+ $content .= <<<EOT
+\n\$adminmenu[\$i]['title'] = {$language}{$menu};
+\$adminmenu[\$i]['link'] = 'admin/{$this->tables[$i]->getVar('table_name')}.php';
+\$adminmenu[\$i]['icon'] = \$sysPathIcon32.'/{$this->tables[$i]->getVar('table_image')}';
+\$i++;
+EOT;
+ }
+ }
+ if( $this->table->getVar('table_permissions') == 1 ) {
+ $menu++;
+ $content .= <<<EOT
+\n\$adminmenu[\$i]['title'] = {$language}{$menu};
+\$adminmenu[\$i]['link'] = 'admin/permissions.php';
+\$adminmenu[\$i]['icon'] = \$pathIcon32.'/permissions.png';
+\$i++;
+EOT;
+ }
+ $menu++;
+ $content .= <<<EOT
+\n\$adminmenu[\$i]['title'] = {$language}{$menu};
+\$adminmenu[\$i]['link'] = 'admin/about.php';
+\$adminmenu[\$i]['icon'] = \$pathIcon32.'/about.png';
+unset( \$i );
+EOT;
+ unset( $menu );
+
+ $this->tdmcfile->create($module_name, '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/admin/admin_objects.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_objects.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_objects.php 2014-06-10 11:22:46 UTC (rev 12574)
@@ -0,0 +1,122 @@
+<?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_objects.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class AdminObjects
+{
+ /*
+ * @static function &getInstance
+ * @param null
+ */
+ public static function &getInstance()
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self();
+ }
+ return $instance;
+ }
+ /*
+ * @public function getSimpleSetVar
+ * @param string $table_name
+ * @param string $field_name
+ */
+ public function getSimpleSetVar($table_name, $field_name) {
+ $ret = <<<EOT
+ \${$table_name}_obj->setVar('{$field_name}', \$_POST['{$field_name}']);\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getTextDateSelect
+ * @param string $table_name
+ * @param string $field_name
+ */
+ public function getTextDateSelect($table_name, $field_name) {
+ $ret = <<<EOT
+ \${$table_name}_obj->setVar('{$field_name}', strtotime(\$_POST['{$field_name}']));\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getCheckBoxOrRadioYN
+ * @param string $table_name
+ * @param string $field_name
+ */
+ public function getCheckBoxOrRadioYN($table_name, $field_name) {
+ $ret = <<<EOT
+ \${$table_name}_obj->setVar('{$field_name}', ((\$_REQUEST['{$field_name}'] == 1) ? '1' : '0'));\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getUploadImage
+ * @param string $module_name
+ * @param string $table_name
+ * @param string $field_name
+ */
+ public function getUploadImage($module_name, $table_name, $field_name) {
+ $ret = <<<EOT
+ include_once XOOPS_ROOT_PATH.'/class/uploader.php';
+ \$uploaddir = XOOPS_UPLOAD_PATH.'/{$module_name}/images/{$table_name}/';
+ \$uploader = new XoopsMediaUploader(\$uploaddir, xoops_getModuleOption('mimetypes', '{$module_name}'),
+ xoops_getModuleOption('maxsize', '{$module_name}'), null, null);
+ if (\$uploader->fetchMedia(\$_POST['xoops_upload_file'][0])) {
+ \$uploader->setPrefix('{$field_name}_');
+ \$uploader->fetchMedia(\$_POST['xoops_upload_file'][0]);
+ if (!\$uploader->upload()) {
+ \$errors = \$uploader->getErrors();
+ redirect_header('javascript:history.go(-1)', 3, \$errors);
+ } else {
+ \${$table_name}_obj->setVar('{$field_name}', \$uploader->getSavedFileName());
+ }
+ } else {
+ \${$table_name}_obj->setVar('{$field_name}', \$_POST['{$field_name}']);
+ }\n
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getUploadFile
+ * @param string $module_name
+ * @param string $table_name
+ * @param string $field_name
+ */
+ public function getUploadFile($module_name, $table_name, $field_name) {
+ $ret = <<<EOT
+ include_once XOOPS_ROOT_PATH.'/class/uploader.php';
+ \$uploaddir = XOOPS_UPLOAD_PATH.'/{$module_name}/files/{$table_name}/';
+ \$uploader = new XoopsMediaUploader(\$uploaddir, xoops_getModuleOption('mimetypes', '{$module_name}'),
+ xoops_getModuleOption('maxsize', '{$module_name}'), null, null);
+ if (\$uploader->fetchMedia(\$_POST['xoops_upload_file'][0])) {
+ \$uploader->setPrefix('{$field_name}_') ;
+ \$uploader->fetchMedia(\$_POST['xoops_upload_file'][0]);
+ if (!\$uploader->upload()) {
+ \$errors = \$uploader->getErrors();
+ redirect_header('javascript:history.go(-1)', 3, \$errors);
+ } else {
+ \${$table_name}_obj->setVar('{$field_name}', \$uploader->getSavedFileName());
+ }
+ }\n
+EOT;
+ return $ret;
+ }
+}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_pages.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_pages.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_pages.php 2014-06-10 11:22:46 UTC (rev 12574)
@@ -0,0 +1,309 @@
+<?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_pages.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+require_once 'admin_objects.php';
+class AdminPages extends TDMCreateFile
+{
+ /*
+ * @var string
+ */
+ private $adminobjects = null;
+ /*
+ * @public function constructor
+ * @param null
+ */
+ public function __construct() {
+ parent::__construct();
+ $this->adminobjects = AdminObjects::getInstance();
+ $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 getAdminPagesHeader
+ * @param string $mod_name
+ * @param string $table_name
+ */
+ public function getAdminPagesHeader($mod_name, $table_name) {
+
+ $ret = <<<EOT
+\ninclude_once 'header.php';
+//It recovered the value of argument op in URL$
+\$op = {$mod_name}_CleanVars(\$_REQUEST, 'op', 'list', 'string');
+
+echo \$adminMenu->addNavigation('{$table_name}.php');
+switch (\$op)
+{\n
+EOT;
+ return $ret;
+ }
+
+ /*
+ * @public function getAdminPagesList
+ * @param string $table_name
+ * @param string $language
+ */
+ public function getAdminPagesList($table_name, $language, $fields, $fpif, $fpmf) {
+ $stu_table_name = strtoupper($table_name);
+ $ret = <<<EOT
+ case 'list':
+ default:
+ \$limit = xoops_getModuleOption('adminpager');
+ \$start = TDMCreate_CleanVars(\$_REQUEST, 'start', 0);
+ \$adminMenu->addItemButton({$language}ADD_{$stu_table_name}, '{$table_name}.php?op=new', 'add');
+ echo \$adminMenu->renderButton();
+ \$criteria = new CriteriaCompo();
+ \$criteria->setSort('{$fpif} ASC, {$fpmf}');
+ \$criteria->setOrder('ASC');
+ \${$table_name}_rows = \${$table_name}Handler->getCount(\$criteria);
+ \${$table_name}_arr = \${$table_name}Handler->getAll(\$criteria);
+ unset(\$criteria);
+
+ // Table view
+ if (\${$table_name}_rows > 0)
+ {
+ foreach (array_keys(\${$table_name}_arr) as \$i)
+ {\n
+EOT;
+ foreach(array_keys($fields) as $f)
+ {
+ $field_name = $fields[$f]->getVar('field_name');
+ $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));
+ }
+ }
+ $lp_field_name = substr($field_name, 0, strpos($field_name, '_'));
+ $ret .= <<<EOT
+ \${$lp_field_name}['{$rp_field_name}'] = \${$table_name}_arr[\$i]->getVar('{$field_name}');\n
+EOT;
+ }
+ $ret .= <<<EOT
+ \$GLOBALS['xoopsTpl']->append('{$table_name}_list', \${$lp_field_name});
+ unset(\${$lp_field_name});
+ }
+ if ( \${$table_name}_rows > \$limit ) {
+ include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
+ \$pagenav = new XoopsPageNav(\${$table_name}_rows, \$limit, \$start, 'start', 'op=list&limit=' . \$limit);
+ \$GLOBALS['xoopsTpl']->assign('pagenav', \$pagenav->renderNav(4));
+ }
+ } else {
+ \$GLOBALS['xoopsTpl']->assign('error', {$language}THEREARENT_{$stu_table_name});
+ }
+ break;\n
+EOT;
+ return $ret;
+ }
+
+ /*
+ * @public function getAdminPagesNew
+ * @param string $table_name
+ * @param string $language
+ */
+ public function getAdminPagesNew($table_name, $language) {
+ $stu_table_name = strtoupper($table_name);
+ $ret = <<<EOT
+ case 'new':
+ \$adminMenu->addItemButton({$language}{$stu_table_name}_LIST, '{$table_name}.php', 'list');
+ echo \$adminMenu->renderButton();
+
+ \${$table_name}Obj =& \${$table_name}Handler->create();
+ \$form = \${$table_name}Obj->getForm();
+ \$form->display();
+ break;\n
+EOT;
+ return $ret;
+ }
+
+ /*
+ * @public function getAdminPagesSave
+ * @param string $table_name
+ * @param string $language
+ */
+ public function getAdminPagesSave($module_name, $table_name, $language, $fields, $fpif, $fpmf)
+ {
+ $ret = <<<EOT
+ case 'save':
+ if ( !\$GLOBALS['xoopsSecurity']->check() ) {
+ redirect_header('{$table_name}.php', 3, implode(',', \$GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if (isset(\$_REQUEST['{$fpif}'])) {
+ \${$table_name}Obj =& \${$table_name}Handler->get(\$_REQUEST['{$fpif}']);
+ } else {
+ \${$table_name}Obj =& \${$table_name}Handler->create();
+ }\n
+EOT;
+ foreach (array_keys($fields) as $f)
+ {
+ $field_name = $fields[$f]->getVar('field_name');
+ $field_element = $fields[$f]->getVar('field_element');
+ if($f > 0) {
+ switch($field_element) {
+ case 4:
+ case 5:
+ $ret .= $this->adminobjects->getCheckBoxOrRadioYN($table_name, $field_name);
+ break;
+ case 9:
+ $ret .= $this->adminobjects->getUploadImage($module_name, $table_name, $field_name);
+ break;
+ case 10:
+ $ret .= $this->adminobjects->getUploadFile($module_name, $table_name, $field_name);
+ break;
+ case 11:
+ $ret .= $this->adminobjects->getTextDateSelect($table_name, $field_name);
+ break;
+ default:
+ $ret .= $this->adminobjects->getSimpleSetVar($table_name, $field_name);
+ break;
+ }
+ }
+ }
+
+ $ret .= <<<EOT
+
+ if (\${$table_name}Handler->insert(\${$table_name}Obj)) {
+ redirect_header('{$table_name}.php?op=list', 2, {$language}FORMOK);
+ }
+
+ echo \${$table_name}Obj->getHtmlErrors();
+ \$form =& \${$table_name}Obj->getForm();
+ \$form->display();
+ break;\n
+EOT;
+ return $ret;
+ }
+
+ /*
+ * @public function getAdminPagesEdit
+ * @param string $table_name
+ * @param string $language
+ */
+ public function getAdminPagesEdit($table_name, $language, $fpif) {
+ $stu_table_name = strtoupper($table_name);
+ $ret = <<<EOT
+ case 'edit':
+ \$adminMenu->addItemButton({$language}ADD_{$stu_table_name}, '{$table_name}.php?op=new', 'add');
+ \$adminMenu->addItemButton({$language}{$stu_table_name}_LIST, '{$table_name}.php', 'list');
+ echo \$adminMenu->renderButton();
+ \${$table_name}Obj = \${$table_name}Handler->get(\$_REQUEST['{$fpif}']);
+ \$form = \${$table_name}Obj->getForm();
+ \$form->display();
+ break;\n
+EOT;
+ return $ret;
+ }
+
+ /*
+ * @public function getAdminPagesDelete
+ * @param string $table_name
+ * @param string $language
+ */
+ public function getAdminPagesDelete($table_name, $language, $fpif, $fpmf) {
+
+ $ret = <<<EOT
+ case 'delete':
+ \${$table_name}Obj =& \${$table_name}Handler->get(\$_REQUEST['{$fpif}']);
+ if (isset(\$_REQUEST['ok']) && \$_REQUEST['ok'] == 1) {
+ if ( !\$GLOBALS['xoopsSecurity']->check() ) {
+ redirect_header('{$table_name}.php', 3, implode(', ', \$GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if (\${$table_name}Handler->delete(\${$table_name}Obj)) {
+ redirect_header('{$table_name}.php', 3, {$language}FORMDELOK);
+ } else {
+ echo \${$table_name}Obj->getHtmlErrors();
+ }
+ } else {
+ xoops_confirm(array('ok' => 1, '{$fpif}' => \$_REQUEST['{$fpif}'], 'op' => 'delete'), \$_SERVER['REQUEST_URI'], sprintf({$language}FORMSUREDEL, \${$table_name}Obj->getVar('{$fpmf}')));
+ }
+ break;\n
+EOT;
+ return $ret;
+ }
+
+ /*
+ * @public function getAdminPagesFooter
+ * @param null
+ */
+ public function getAdminPagesFooter() {
+ $ret = <<<EOT
+}
+include_once 'footer.php';
+EOT;
+ return $ret;
+ }
+
+ /*
+ * @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');
+ $language = $this->getLanguage($module_name, 'AM');
+ $fpif = ''; $fpmf = '';
+ $fields = $this->getTableFields($table->getVar('table_id'));
+ foreach(array_keys($fields) as $f)
+ {
+ $field_name = $fields[$f]->getVar('field_name');
+ if($f == 0) {
+ $fpif = $field_name;
+ }
+ if($fields[$f]->getVar('field_main') == 1) {
+ $fpmf = $field_name;
+ }
+ }
+ $content = $this->getHeaderFilesComments($module, $filename);
+ $content .= $this->getAdminPagesHeader($module_name, $table_name);
+ $content .= $this->getAdminPagesList($table_name, $language, $fields, $fpif, $fpmf);
+ $content .= $this->getAdminPagesNew($table_name, $language);
+ $content .= $this->getAdminPagesSave($module_name, $table_name, $language, $fields, $fpif, $fpmf);
+ $content .= $this->getAdminPagesEdit($table_name, $language, $fpif);
+ $content .= $this->getAdminPagesDelete($table_name, $language, $fpif, $fpmf);
+ $content .= $this->getAdminPagesFooter();
+ //
+ $this->tdmcfile->create($module_name, '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/admin/admin_permissions.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_permissions.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_permissions.php 2014-06-10 11:22:46 UTC (rev 12574)
@@ -0,0 +1,222 @@
+<?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_permissions.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class AdminPermissions 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 mixed $table
+ * @param mixed $tables
+ * @param string $filename
+ */
+ public function write($module, $tables, $filename) {
+ $this->setModule($module);
+ $this->setFileName($filename);
+ $this->setTables($tables);
+ }
+ /*
+ * @public function render
+ * @param string $module_name
+ * @param string $language
+ */
+ public function getHeaderPermissionsCode($module_name, $language)
+ {
+ $ret = <<<PRM
+\ninclude_once 'header.php';
+include_once XOOPS_ROOT_PATH.'/class/xoopsform/grouppermform.php';
+if( !empty(\$_POST['submit']) )
+{
+ redirect_header( XOOPS_URL.'/modules/'.\$xoopsModule->dirname().'/admin/permissions.php', 1, _MP_GPERMUPDATED );
+}
+// Check admin have access to this page
+/*\$group = \$xoopsUser->getGroups ();
+\$groups = xoops_getModuleOption ( 'admin_groups', \$thisDirname );
+if (count ( array_intersect ( \$group, \$groups ) ) <= 0) {
+ redirect_header ( 'index.php', 3, _NOPERM );
+}*/
+
+echo \$adminMenu->addNavigation('permissions.php');
+
+\$permission = {$module_name}_CleanVars(\$_POST, 'permission', 1, 'int');
+\$selected = array('', '', '', '');
+\$selected[\$permission-1] = ' selected';
+
+\$permTableForm = new XoopsTableForm('fselperm', 'permissions.php', 'post');
+\$formSelect = new XoopsFormSelect('', 'permission', onChange='javascript: document.fselperm.submit()');
+\$formSelect->addOption(\$selected[0], {$language}GLOBAL);
+\$formSelect->addOption(\$selected[1], {$language}APPROVE);
+\$formSelect->addOption(\$selected[2], {$language}SUBMIT);
+\$formSelect->addOption(\$selected[3], {$language}VIEW);
+\$permTableForm->addElement(\$formSelect);
+\$permTableForm->display();\n\n
+PRM;
+ return $ret;
+ }
+
+ /*
+ * @public function render
+ * @param string $module_name
+ * @param string $language
+ */
+ public function getSwitchPermissionsCode($module_name, $language)
+ {
+ $ret = <<<PRM
+\$module_id = \$xoopsModule->getVar('mid');
+switch(\$permission)
+{
+ case 1:
+ \$formTitle = {$language}GLOBAL;
+ \$permName = '{$module_name}_ac';
+ \$permDesc = {$language}GLOBAL_DESC;
+ \$globalPerms = array( '4' => {$language}GLOBAL_4,
+ '8' => {$language}GLOBAL_8,
+ '16' => {$language}GLOBAL_16 );
+ break;
+ case 2:
+ \$formTitle = {$language}APPROVE;
+ \$permName = '{$module_name}_access';
+ \$permDesc = {$language}APPROVE_DESC;
+ break;
+ case 3:
+ \$formTitle = {$language}SUBMIT;
+ \$permName = '{$module_name}_submit';
+ \$permDesc = {$language}SUBMIT_DESC;
+ break;
+ case 4:
+ \$formTitle = {$language}VIEW;
+ \$permName = '{$module_name}_view';
+ \$permDesc = {$language}VIEW_DESC;
+ break;
+}\n
+PRM;
+ return $ret;
+ }
+
+ /*
+ * @public function render
+ * @param string $module_name
+ * @param string $table_name
+ * @param string $language
+ */
+ public function getBodyPermissionsCode($module_name, $language)
+ {
+ $tables = $this->getTables();
+ foreach(array_keys($tables) as $t)
+ {
+ $table_id = $tables[$t]->getVar('table_id');
+ if($tables[$t]->getVar('table_permissions') == 1) {
+ $table_name = $tables[$t]->getVar('table_name');
+ }
+ }
+ $fields = $this->getTableFields($table_id);
+ foreach(array_keys($fields) as $f)
+ {
+ if($f == 1) {
+ $fpif = $fields[$f]->getVar('field_name');
+ }
+ if($fields[$f]->getVar('field_main') == 1) {
+ $fpmf = $fields[$f]->getVar('field_name');
+ }
+ }
+ $ret = <<<PRM
+\$permform = new XoopsGroupPermForm(\$formTitle, \$module_id, \$permName, \$permDesc, 'admin/permissions.php');
+if (\$permission == 1) {
+ foreach (\$globalPerms as \$perm_id => \$perm_name) {
+ \$permform->addItem(\$perm_id, \$perm_name);
+ }
+ echo \$permform->render();
+ echo '<br /><br />';
+} else {
+ \$criteria = new CriteriaCompo();
+ \$criteria->setSort('{$fpmf}');
+ \$criteria->setOrder('ASC');
+ \${$table_name}_count = \${$table_name}Handler->getCount(\$criteria);
+ \${$table_name}_arr = \${$table_name}Handler->getObjects(\$criteria);
+ unset(\$criteria);
+ foreach (array_keys(\${$table_name}_arr) as \$i) {
+ \$permform->addItem(\${$table_name}_arr[\$i]->getVar('{$fpif}'), \${$table_name}_arr[\$i]->getVar('{$fpmf}'));
+ }
+ // Check if {$table_name} exist before rendering the form and redirect, if there aren't {$table_name}
+ if (\${$table_name}_count > 0) {
+ echo \$permform->render();
+ echo '<br /><br />';
+ } else {
+ redirect_header ( '{$table_name}.php?op=new', 3, {$language}NOPERMSSET );
+ exit ();
+ }\n
+PRM;
+ return $ret;
+ }
+
+ /*
+ * @public function getFooterPermissionsCode
+ * @param null
+ */
+ public function getFooterPermissionsCode() {
+ $ret = <<<PRM
+}
+unset(\$permform);
+include_once 'footer.php';
+PRM;
+ return $ret;
+ }
+
+ /*
+ * @public function render
+ * @param null
+ */
+ public function render() {
+ $module = $this->getModule();
+ $filename = $this->getFileName();
+ $module_name = strtolower($module->getVar('mod_name'));
+ $language = $this->getLanguage($module_name, 'AM');
+ $content = $this->getHeaderFilesComments($module, $filename);
+ $content .= $this->getHeaderPermissionsCode($module_name, $language);
+ $content .= $this->getSwitchPermissionsCode($module_name, $language);
+ $content .= $this->getBodyPermissionsCode($module_name, $language);
+ $content .= $this->getFooterPermissionsCode();
+ //
+ $this->tdmcfile->create($module_name, '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/admin/admin_templates.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_templates.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/admin_templates.php 2014-06-10 11:22:46 UTC (rev 12574)
@@ -0,0 +1,65 @@
+<?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
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/index.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/index.html (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/index.html 2014-06-10 11:22:46 UTC (rev 12574)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Deleted: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_about.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_about.php 2014-06-10 11:16:39 UTC (rev 12573)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_about.php 2014-06-10 11:22:46 UTC (rev 12574)
@@ -1,72 +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: 1.91 admin_about.php 12258 2014-01-02 09:33:29Z timgno $
- */
-defined('XOOPS_ROOT_PATH') or die('Restricted access');
-
-class AdminAbout extends TDMCreateFile
-{
- /*
- * @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 = strtolower($module->getVar('mod_name'));
- $module_donations = $module->getVar('mod_donations');
- $content = $this->getHeaderFilesComments($module, $filename);
- $content .= <<<EOT
-include 'header.php';
-echo \$adminMenu->addNavigation('about.php');
-echo \$adminMenu->renderAbout('{$module_donations}', false);
-include 'footer.php';
-EOT;
- $this->tdmcfile->create($module_name, 'admin', $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/admin_footer.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_footer.php 2014-06-10 11:16:39 UTC (rev 12573)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_footer.php 2014-06-10 11:22:46 UTC (rev 12574)
@@ -1,78 +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: 1.91 admin_footer.php 12258 2014-01-02 09:33:29Z timgno $
- */
-defined('XOOPS_ROOT_PATH') or die('Restricted access');
-
-class AdminFooter extends TDMCreateFile
-{
- /*
- * @public function constructor
- * @param string $modules
- * @param string $filename
- */
- 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 = $this->getHeaderFilesComments($module, $filename);
- $content .= <<<EOT
-\necho "<div class='center'><a href='http://www.xoops.org' title='Visit XOOPS' target='_blank'>
- <img src='".\$sysPathIcon32."/xoopsmicrobutton.gif' alt='XOOPS' /></a></div>";
-echo "<div class='center smallsmall italic pad5'>
- <strong>" . \$xoopsModule->getVar('name') . "</strong> ".{$language}MAINTAINEDBY."
- <a href='{$support_url}' title='Visit {$support_name}' class='tooltip' rel='external'>{$support_name}</a></div>";
-xoops_cp_footer();
-EOT;
- $this->tdmcfile->create($module_name, 'admin', $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/admin_header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_header.php 2014-06-10 11:16:39 UTC (rev 12573)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_header.php 2014-06-10 11:22:46 UTC...
[truncated message content] |
|
From: <be...@us...> - 2014-06-10 11:16:56
|
Revision: 12573
http://sourceforge.net/p/xoops/svn/12573
Author: beckmi
Date: 2014-06-10 11:16:39 +0000 (Tue, 10 Jun 2014)
Log Message:
-----------
Updating to 4.4.1
Modified Paths:
--------------
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/CHANGES.md
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/build-config.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/ckeditor.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/config.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/contents.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/lang/en.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/codemirror/css/codemirror.min.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/codemirror/js/beautify.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/codemirror/js/codemirror.addons.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/codemirror/js/codemirror.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/codemirror/theme/ambiance.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/codemirror/theme/lesser-dark.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/codemirror/theme/mbo.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/codemirror/theme/midnight.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/codemirror/theme/rubyblue.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/codemirror/theme/solarized.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/codemirror/theme/the-matrix.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/confighelper/docs/install.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/div/dialogs/div.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/find/dialogs/find.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/forms/dialogs/radio.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/icons.png
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/icons_hidpi.png
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/link/dialogs/anchor.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/link/dialogs/link.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/scayt/README.md
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/scayt/dialogs/options.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/templates/dialogs/templates.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/wsc/dialogs/ciframe.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/wsc/dialogs/tmpFrameset.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/wsc/dialogs/wsc.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/wsc/dialogs/wsc.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/wsc/dialogs/wsc_ie.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/kama/editor.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/kama/editor_ie.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/kama/editor_ie7.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/kama/editor_ie8.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/kama/editor_iequirks.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/kama/icons.png
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/kama/icons_hidpi.png
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/moono/dialog.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/moono/dialog_ie.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/moono/dialog_ie7.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/moono/dialog_ie8.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/moono/dialog_iequirks.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/moono/icons.png
Added Paths:
-----------
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/codemirror/js/codemirror.min.js.map
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/codemirror/js/codemirror.mode.bbcode.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/codemirror/js/codemirror.mode.bbcodemixed.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/codemirror/theme/mdn-like.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/codemirror/theme/neo.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/plugins/codemirror/theme/pastel-on-dark.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/moono/images/hidpi/index.html
Removed Paths:
-------------
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/kama/dialog_opera.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/moono/dialog_opera.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/skins/moono/images/mini.png
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/CHANGES.md
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/CHANGES.md 2014-06-10 09:48:36 UTC (rev 12572)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/CHANGES.md 2014-06-10 11:16:39 UTC (rev 12573)
@@ -1,6 +1,117 @@
CKEditor 4 Changelog
====================
+## CKEditor 4.4.1
+
+New Features:
+
+* [#9661](http://dev.ckeditor.com/ticket/9661): Added the option to [configure](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-linkJavaScriptLinksAllowed) anchor tags with JavaScript code in `href` attribute.
+
+Fixed Issues:
+
+* [#11861](http://dev.ckeditor.com/ticket/11861): Fixed: [Webkit/Blink] Span elements created while joining adjacent elements. **Note:** This patch only covers cases when *Backspace* or *Delete* is pressed on a collapsed (empty) selection. The remaining case, with a non-empty selection, will be fixed in next release.
+* [#10714](http://dev.ckeditor.com/ticket/10714): Fixed: [iOS] Selection and drop-downs are broken if touch listener is used due to [Webkit bug](https://bugs.webkit.org/show_bug.cgi?id=128924). Thanks to [Arty Gus](https://github.com/artygus)!
+* [#11911](http://dev.ckeditor.com/ticket/11911): Fixed setting the `dir` attribute for preloaded language in [CKEDITOR.lang](http://docs.ckeditor.com/#!/api/CKEDITOR.lang). Thanks to [Akash Mohapatra](https://github.com/akashmohapatra)!
+* [#11926](http://dev.ckeditor.com/ticket/11926): Fixed: Code snippet does not decode HTML entities when loading code from the `<code>` element.
+* [#11223](http://dev.ckeditor.com/ticket/11223): Fixed: Issue when [Protected Source](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-protectedSource) was not working in the title element.
+* [#11859](http://dev.ckeditor.com/ticket/11859): Fixed: Removed [Source Dialog](http://ckeditor.com/addon/sourcedialog) plugin from being required in [Code Snippet](http://ckeditor.com/addon/codesnippet) sample.
+* [#11754](http://dev.ckeditor.com/ticket/11754): Fixed: Infinite loop in Google Chrome when content contains not closed attributes.
+* [#11848](http://dev.ckeditor.com/ticket/11848): Fixed: [`editor.insertElement()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertElement) throwing an exception in IE when there was no selection in editor.
+* [#11801](http://dev.ckeditor.com/ticket/11801): Fixed: Editor anchors unavailable when linking [Enhanced Image](http://ckeditor.com/addon/image2) widget.
+* [#11626](http://dev.ckeditor.com/ticket/11626): Fixed: [Table Resize](http://ckeditor.com/addon/tableresize) sets invalid width.
+* [#11872](http://dev.ckeditor.com/ticket/11872): Made [`element.addClass()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-addClass) chainable symmetrically to [`element.removeClass()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-removeClass).
+* [#11813](http://dev.ckeditor.com/ticket/11813): Fixed: Link lost while pasting captioned image and restoring undo snapshot ([Enhanced Image](http://ckeditor.com/addon/image2)).
+* [#11814](http://dev.ckeditor.com/ticket/11814): Fixed: _Link_ and _Unlink_ entries persistently displayed in [Enhanced Image](http://ckeditor.com/addon/image2) context menu.
+* [#11839](http://dev.ckeditor.com/ticket/11839): Fixed: [IE9] Caret jumps out of editable area when resizing editor in source mode.
+* [#11822](http://dev.ckeditor.com/ticket/11822): Fixed: [Webkit] Editing Anchors by double-click broken in some cases.
+* [#11823](http://dev.ckeditor.com/ticket/11823): Fixed: [IE8] [Table Resize](http://ckeditor.com/addon/tableresize) throws error over scrollbar.
+* [#11788](http://dev.ckeditor.com/ticket/11788): Fixed: It is not possible to change language back to _Not set_ in [Code Snippet](http://ckeditor.com/addon/codesnippet) dialog.
+* [#11788](http://dev.ckeditor.com/ticket/11788): Fixed: [Filter](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.filter) rules are not applied inside elements with `contenteditable` attribute set to `true`.
+* [#11798](http://dev.ckeditor.com/ticket/11798): Fixed: Inserting non-editable element inside a table cell breaks the table badly.
+* [#11793](http://dev.ckeditor.com/ticket/11793): Fixed: Drop-down is not "on" when clicking it while editor is blurred.
+* [#11850](http://dev.ckeditor.com/ticket/11850): Fixed: Fake objects with contenteditable set to `false` are not downcasted properly.
+* [#11811](http://dev.ckeditor.com/ticket/11811): Fixed: Widget's data are not encoded correctly when passed to attribute.
+* [#11777](http://dev.ckeditor.com/ticket/11777): Fixed encoding ampersand in the [Mathematical Formulas](http://ckeditor.com/addon/mathjax) plugin.
+* [#11880](http://dev.ckeditor.com/ticket/11880): Fixed: [IE8-9] Linked image has a default thick border.
+
+Other changes:
+
+* [#11807](http://dev.ckeditor.com/ticket/11807): Updated jQuery version used in sample to 1.11.0 and tested CKEditor jQuery adapter with version 1.11.0 and 2.1.0.
+* [#9504](http://dev.ckeditor.com/ticket/9504): Stopped using deprecated attribute.specified in all browsers except IE.
+* [#11809](http://dev.ckeditor.com/ticket/11809): Changed tab size in `<pre>` to 4 spaces.
+
+## CKEditor 4.4
+
+**Important Notes:**
+
+* Marked the [`editor.beforePaste`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-beforePaste) event as deprecated.
+* The default class of captioned images has changed to `image` (was: `caption`). Please note that once edited in CKEditor 4.4+, all existing images of the `caption` class (`<figure class="caption">`) will be [filtered out](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter) unless the [`config.image2_captionedClass`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-image2_captionedClass) option is set to `caption`. For backward compatibility (i.e. when upgrading), it is highly recommended to use this setting, which also helps prevent CSS conflicts, etc. This does not apply to new CKEditor integrations.
+* Widgets without defined buttons are no longer registered automatically to the [Advanced Content Filter](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter). Before CKEditor 4.4 widgets were registered to the ACF which was an incorrect behavior ([#11567](http://dev.ckeditor.com/ticket/11567)). This change should not have any impact on standard scenarios, but if your button does not execute the widget command, you need to set [`allowedContent`](http://docs.ckeditor.com/#!/api/CKEDITOR.feature-property-allowedContent) and [`requiredContent`](http://docs.ckeditor.com/#!/api/CKEDITOR.feature-property-requiredContent) properties for it manually, because the editor will not be able to find them.
+* The [Show Borders](http://ckeditor.com/addon/showborders) plugin was added to the Standard installation package in order to ensure that unstyled tables are still visible for the user ([#11665](http://dev.ckeditor.com/ticket/11665)).
+* Since CKEditor 4.4 the editor instance should be passed to [`CKEDITOR.style`](http://docs.ckeditor.com/#!/api/CKEDITOR.style) methods to ensure full compatibility with other features (e.g. applying styles to widgets requires that). We ensured backward compatibility though, so the [`CKEDITOR.style`](http://docs.ckeditor.com/#!/api/CKEDITOR.style) will work even when the editor instance is not provided.
+
+New Features:
+
+* [#11297](http://dev.ckeditor.com/ticket/11297): Styles can now be applied to widgets. The definition of a style which can be applied to a specific widget must contain two additional properties — `type` and `widget`. Read more in the [Widget Styles](http://docs.ckeditor.com/#!/guide/dev_styles-section-widget-styles) section of the "Syles Drop-down" guide. Note that by default, widgets support only classes and no other attributes or styles. Related changes and features:
+ * Introduced the [`CKEDITOR.style.addCustomHandler()`](http://docs.ckeditor.com/#!/api/CKEDITOR.style-static-method-addCustomHandler) method for registering custom style handlers.
+ * The [`CKEDITOR.style.apply()`](http://docs.ckeditor.com/#!/api/CKEDITOR.style-method-apply) and [`CKEDITOR.style.remove()`](http://docs.ckeditor.com/#!/api/CKEDITOR.style-method-remove) methods are now called with an editor instance instead of the document so they can be reused by the [`CKEDITOR.editor.applyStyle()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-applyStyle) and [`CKEDITOR.editor.removeStyle()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-removeStyle) methods. Backward compatibility was preserved, but from CKEditor 4.4 it is highly recommended to pass an editor instead of a document to these methods.
+ * Many new methods and properties were introduced in the [Widget API](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget) to make the handling of styles by widgets fully customizable. See: [`widget.definition.styleableElements`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.definition-property-styleableElements), [`widget.definition.styleToAllowedContentRule`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.definition-property-styleToAllowedContentRules), [`widget.addClass()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-addClass), [`widget.removeClass()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-removeClass), [`widget.getClasses()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-getClasses), [`widget.hasClass()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-hasClass), [`widget.applyStyle()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-applyStyle), [`widget.removeStyle()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-removeStyle), [`widget.checkStyleActive()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-checkStyleActive).
+ * Integration with the [Allowed Content Filter](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter) required an introduction of the [`CKEDITOR.style.toAllowedContent()`](http://docs.ckeditor.com/#!/api/CKEDITOR.style-method-toAllowedContentRules) method which can be implemented by the custom style handler and if exists, it is used by the [`CKEDITOR.filter`](http://docs.ckeditor.com/#!/api/CKEDITOR.filter) to translate a style to [allowed content rules](http://docs.ckeditor.com/#!/api/CKEDITOR.filter.allowedContentRules).
+* [#11300](http://dev.ckeditor.com/ticket/11300): Various changes in the [Enhanced Image](http://ckeditor.com/addon/image2) plugin:
+ * Introduced the [`config.image2_captionedClass`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-image2_captionedClass) option to configure the class of captioned images.
+ * Introduced the [`config.image2_alignClasses`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-image2_alignClasses) option to configure the way images are aligned with CSS classes.
+ If this setting is defined, the editor produces classes instead of inline styles for aligned images.
+ * Default image caption can be translated (customized) with the `editor.lang.image2.captionPlaceholder` string.
+* [#11341](http://dev.ckeditor.com/ticket/11341): [Enhanced Image](http://ckeditor.com/addon/image2) plugin: It is now possible to add a link to any image type.
+* [#10202](http://dev.ckeditor.com/ticket/10202): Introduced wildcard support in the [Allowed Content Rules](http://docs.ckeditor.com/#!/guide/dev_allowed_content_rules) format.
+* [#10276](http://dev.ckeditor.com/ticket/10276): Introduced blacklisting in the [Allowed Content Filter](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter).
+* [#10480](http://dev.ckeditor.com/ticket/10480): Introduced code snippets with code highlighting. There are two versions available so far — the default [Code Snippet](http://ckeditor.com/addon/codesnippet) which uses the [highlight.js](http://highlightjs.org) library and the [Code Snippet GeSHi](http://ckeditor.com/addon/codesnippetgeshi) which uses the [GeSHi](http://qbnz.com/highlighter/) library.
+* [#11737](http://dev.ckeditor.com/ticket/11737): Introduced an option to prevent [filtering](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter) of an element that matches custom criteria (see [`filter.addElementCallback()`](http://docs.ckeditor.com/#!/api/CKEDITOR.filter-method-addElementCallback)).
+* [#11532](http://dev.ckeditor.com/ticket/11532): Introduced the [`editor.addContentsCss()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-addContentsCss) method that can be used for [adding custom CSS files](http://docs.ckeditor.com/#!/guide/plugin_sdk_styles).
+* [#11536](http://dev.ckeditor.com/ticket/11536): Added the [`CKEDITOR.tools.htmlDecode()`](http://docs.ckeditor.com/#!/api/CKEDITOR.tools-method-htmlDecode) method for decoding HTML entities.
+* [#11225](http://dev.ckeditor.com/ticket/11225): Introduced the [`CKEDITOR.tools.transparentImageData`](http://docs.ckeditor.com/#!/api/CKEDITOR.tools-property-transparentImageData) property which contains transparent image data to be used in CSS or as image source.
+
+Other changes:
+
+* [#11377](http://dev.ckeditor.com/ticket/11377): Unified internal representation of empty anchors using the [fake objects](http://ckeditor.com/addon/fakeobjects).
+* [#11422](http://dev.ckeditor.com/ticket/11422): Removed Firefox 3.x, Internet Explorer 6 and Opera 12.x leftovers in code.
+* [#5217](http://dev.ckeditor.com/ticket/5217): Setting data (including switching between modes) creates a new undo snapshot. Besides that:
+ * Introduced the [`editable.status`](http://docs.ckeditor.com/#!/api/CKEDITOR.editable-property-status) property.
+ * Introduced a new `forceUpdate` option for the [`editor.lockSnapshot`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-lockSnapshot) event.
+ * Fixed: Selection not being unlocked in inline editor after setting data ([#11500](http://dev.ckeditor.com/ticket/11500)).
+* The [WebSpellChecker](http://ckeditor.com/addon/wsc) plugin was updated to the latest version.
+
+Fixed Issues:
+
+* [#10190](http://dev.ckeditor.com/ticket/10190): Fixed: Removing block style with [`editor.removeStyle()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-removeStyle) should result in a paragraph and not a div.
+* [#11727](http://dev.ckeditor.com/ticket/11727): Fixed: The editor tries to select a non-editable image which was clicked.
+
+## CKEditor 4.3.5
+
+New Features:
+
+* Added new translation: Tatar.
+
+Fixed Issues:
+
+* [#11677](http://dev.ckeditor.com/ticket/11677): Fixed: Undo/Redo keystrokes are blocked in the source mode.
+* [#11717](http://dev.ckeditor.com/ticket/11717): [Document Properties](http://ckeditor.com/addon/docprops) plugin requires the [Color Dialog](http://ckeditor.com/addon/colordialog) plugin to work.
+
+## CKEditor 4.3.4
+
+Fixed Issues:
+
+* [#11597](http://dev.ckeditor.com/ticket/11597): [IE11] Fixed: Error thrown when trying to open the [preview](http://ckeditor.com/addon/preview) using the keyboard.
+* [#11544](http://dev.ckeditor.com/ticket/11544): [Placeholders](http://ckeditor.com/addon/placeholder) will no longer be upcasted in parents not accepting `<span>` elements.
+* [#8663](http://dev.ckeditor.com/ticket/8663): Fixed [`element.renameNode()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-renameNode) not clearing the [`element.getName()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-getName) cache.
+* [#11574](http://dev.ckeditor.com/ticket/11574): Fixed: *Backspace* destroying the DOM structure if an inline editable is placed in a list item.
+* [#11603](http://dev.ckeditor.com/ticket/11603): Fixed: [Table Resize](http://ckeditor.com/addon/tableresize) attaches to tables outside the editable.
+* [#9205](http://dev.ckeditor.com/ticket/9205), [#7805](http://dev.ckeditor.com/ticket/7805), [#8216](http://dev.ckeditor.com/ticket/8216): Fixed: `{cke_protected_1}` appearing in data in various cases where HTML comments are placed next to `"` or `'`.
+* [#11635](http://dev.ckeditor.com/ticket/11635): Fixed: Some attributes are not protected before the content is passed through the fix bin.
+* [#11660](http://dev.ckeditor.com/ticket/11660): [IE] Fixed: Table content is lost when some extra markup is inside the table.
+* [#11641](http://dev.ckeditor.com/ticket/11641): Fixed: Switching between modes in the classic editor removes content styles for the inline editor.
+* [#11568](http://dev.ckeditor.com/ticket/11568): Fixed: [Styles](http://ckeditor.com/addon/stylescombo) drop-down list is not enabled on selection change.
+
## CKEditor 4.3.3
Fixed Issues:
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/build-config.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/build-config.js 2014-06-10 09:48:36 UTC (rev 12572)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/build-config.js 2014-06-10 11:16:39 UTC (rev 12573)
@@ -13,10 +13,10 @@
* (1) http://ckeditor.com/builder
* Visit online builder to build CKEditor from scratch.
*
- * (2) http://ckeditor.com/builder/5346be27bc0918d0fd5cc09a6bae537b
+ * (2) http://ckeditor.com/builder/e6b8a045f8f984a69463975ca3e6524a
* Visit online builder to build CKEditor, starting with the same setup as before.
*
- * (3) http://ckeditor.com/builder/download/5346be27bc0918d0fd5cc09a6bae537b
+ * (3) http://ckeditor.com/builder/download/e6b8a045f8f984a69463975ca3e6524a
* Straight download link to the latest version of CKEditor (Optimized) with the same setup as before.
*
* NOTE:
@@ -26,7 +26,7 @@
var CKBUILDER_CONFIG = {
skin: 'moono',
- preset: 'standard',
+ preset: 'full',
ignore: [
'dev',
'.gitignore',
@@ -38,34 +38,58 @@
'a11yhelp' : 1,
'about' : 1,
'basicstyles' : 1,
+ 'bidi' : 1,
'blockquote' : 1,
'clipboard' : 1,
+ 'colorbutton' : 1,
+ 'colordialog' : 1,
'contextmenu' : 1,
+ 'dialogadvtab' : 1,
+ 'div' : 1,
'elementspath' : 1,
'enterkey' : 1,
'entities' : 1,
'filebrowser' : 1,
+ 'find' : 1,
+ 'flash' : 1,
'floatingspace' : 1,
+ 'font' : 1,
'format' : 1,
+ 'forms' : 1,
'horizontalrule' : 1,
'htmlwriter' : 1,
+ 'iframe' : 1,
'image' : 1,
+ 'indentblock' : 1,
'indentlist' : 1,
+ 'justify' : 1,
+ 'language' : 1,
'link' : 1,
'list' : 1,
+ 'liststyle' : 1,
'magicline' : 1,
'maximize' : 1,
+ 'newpage' : 1,
+ 'pagebreak' : 1,
'pastefromword' : 1,
'pastetext' : 1,
+ 'preview' : 1,
+ 'print' : 1,
'removeformat' : 1,
'resize' : 1,
+ 'save' : 1,
'scayt' : 1,
+ 'selectall' : 1,
+ 'showblocks' : 1,
+ 'showborders' : 1,
+ 'smiley' : 1,
'sourcearea' : 1,
'specialchar' : 1,
'stylescombo' : 1,
'tab' : 1,
'table' : 1,
'tabletools' : 1,
+ 'templates' : 1,
'toolbar' : 1,
'undo' : 1,
'wsc' : 1,
@@ -132,6 +156,7 @@
'sv' : 1,
'th' : 1,
'tr' : 1,
+ 'tt' : 1,
'ug' : 1,
'uk' : 1,
'vi' : 1,
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/ckeditor.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/ckeditor.js 2014-06-10 09:48:36 UTC (rev 12572)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/ckeditor/ckeditor/ckeditor.js 2014-06-10 11:16:39 UTC (rev 12573)
@@ -2,459 +2,465 @@
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
-(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var a={timestamp:"E1PE",version:"4.3.3",revision:"7841b02",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var b=window.CKEDITOR_BASEPATH||"";if(!b)for(var e=document.getElementsByTagName("script"),a=0;a<e.length;a++){var d=e[a].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(d){b=d[1];break}}-1==b.indexOf(":/")&&"//"!=b.slice(0,2)&&(b=0===b.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+
-b:location.href.match(/^[^\?]*\/(?:)/)[0]+b);if(!b)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return b}(),getUrl:function(b){-1==b.indexOf(":/")&&0!==b.indexOf("/")&&(b=this.basePath+b);this.timestamp&&("/"!=b.charAt(b.length-1)&&!/[&?]t=/.test(b))&&(b+=(0<=b.indexOf("?")?"&":"?")+"t="+this.timestamp);return b},domReady:function(){function b(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",
-b,!1),e()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",b),e())}catch(a){}}function e(){for(var e;e=a.shift();)e()}var a=[];return function(e){a.push(e);"complete"===document.readyState&&setTimeout(b,1);if(1==a.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",b,!1),window.addEventListener("load",b,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",b);window.attachEvent("onload",b);e=!1;try{e=
-!window.frameElement}catch(d){}if(document.documentElement.doScroll&&e){var j=function(){try{document.documentElement.doScroll("left")}catch(e){setTimeout(j,1);return}b()};j()}}}}()},d=window.CKEDITOR_GETURL;if(d){var b=a.getUrl;a.getUrl=function(c){return d.call(a,c)||b.call(a,c)}}return a}());
-CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(a){var d=CKEDITOR.event.prototype,b;for(b in d)a[b]==void 0&&(a[b]=d[b])},CKEDITOR.event.prototype=function(){function a(a){var e=d(this);return e[a]||(e[a]=new b(a))}var d=function(b){b=b.getPrivate&&b.getPrivate()||b._||(b._={});return b.events||(b.events={})},b=function(b){this.name=b;this.listeners=[]};b.prototype={getListenerIndex:function(b){for(var e=0,a=this.listeners;e<a.length;e++)if(a[e].fn==b)return e;return-1}};
-return{define:function(b,e){var g=a.call(this,b);CKEDITOR.tools.extend(g,e,true)},on:function(b,e,g,d,m){function j(a,f,n,s){a={name:b,sender:this,editor:a,data:f,listenerData:d,stop:n,cancel:s,removeListener:i};return e.call(g,a)===false?false:a.data}function i(){s.removeListener(b,e)}var n=a.call(this,b);if(n.getListenerIndex(e)<0){n=n.listeners;g||(g=this);isNaN(m)&&(m=10);var s=this;j.fn=e;j.priority=m;for(var r=n.length-1;r>=0;r--)if(n[r].priority<=m){n.splice(r+1,0,j);return{removeListener:i}}n.unshift(j)}return{removeListener:i}},
-once:function(){var b=arguments[1];arguments[1]=function(e){e.removeListener();return b.apply(this,arguments)};return this.on.apply(this,arguments)},capture:function(){CKEDITOR.event.useCapture=1;var b=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return b},fire:function(){var b=0,e=function(){b=1},a=0,h=function(){a=1};return function(m,j,i){var n=d(this)[m],m=b,s=a;b=a=0;if(n){var r=n.listeners;if(r.length)for(var r=r.slice(0),v,f=0;f<r.length;f++){if(n.errorProof)try{v=r[f].call(this,
-i,j,e,h)}catch(q){}else v=r[f].call(this,i,j,e,h);v===false?a=1:typeof v!="undefined"&&(j=v);if(b||a)break}}j=a?false:typeof j=="undefined"?true:j;b=m;a=s;return j}}(),fireOnce:function(b,e,a){e=this.fire(b,e,a);delete d(this)[b];return e},removeListener:function(b,e){var a=d(this)[b];if(a){var h=a.getListenerIndex(e);h>=0&&a.listeners.splice(h,1)}},removeAllListeners:function(){var b=d(this),e;for(e in b)delete b[e]},hasListeners:function(b){return(b=d(this)[b])&&b.listeners.length>0}}}());
-CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(a,d){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fire.call(this,a,d,this)},CKEDITOR.editor.prototype.fireOnce=function(a,d){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fireOnce.call(this,a,d,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype));
-CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),d=window.opera,b={ie:a.indexOf("trident/")>-1,opera:!!d&&d.version,webkit:a.indexOf(" applewebkit/")>-1,air:a.indexOf(" adobeair/")>-1,mac:a.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat"&&(!document.documentMode||document.documentMode<10),mobile:a.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return false;var e=document.domain,b=window.location.hostname;return e!=
-b&&e!="["+b+"]"},secure:location.protocol=="https:"};b.gecko=navigator.product=="Gecko"&&!b.webkit&&!b.opera&&!b.ie;if(b.webkit)a.indexOf("chrome")>-1?b.chrome=true:b.safari=true;var c=0;if(b.ie){c=b.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode;b.ie9Compat=c==9;b.ie8Compat=c==8;b.ie7Compat=c==7;b.ie6Compat=c<7||b.quirks}if(b.gecko){var e=a.match(/rv:([\d\.]+)/);if(e){e=e[1].split(".");c=e[0]*1E4+(e[1]||0)*100+(e[2]||0)*1}}b.opera&&(c=parseFloat(d.version()));
-b.air&&(c=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));b.webkit&&(c=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));b.version=c;b.isCompatible=b.iOS&&c>=534||!b.mobile&&(b.ie&&c>6||b.gecko&&c>=10801||b.opera&&c>=9.5||b.air&&c>=1||b.webkit&&c>=522||false);b.hidpi=window.devicePixelRatio>=2;b.needsBrFiller=b.gecko||b.webkit||b.ie&&c>10;b.needsNbspFiller=b.ie&&c<11;b.cssClass="cke_browser_"+(b.ie?"ie":b.gecko?"gecko":b.opera?"opera":b.webkit?"webkit":"unknown");if(b.quirks)b.cssClass=b.cssClass+" cke_browser_quirks";
-if(b.ie){b.cssClass=b.cssClass+(" cke_browser_ie"+(b.quirks||b.version<7?"6":b.version));if(b.quirks)b.cssClass=b.cssClass+" cke_browser_iequirks"}if(b.gecko)if(c<10900)b.cssClass=b.cssClass+" cke_browser_gecko18";else if(c<=11E3)b.cssClass=b.cssClass+" cke_browser_gecko19";if(b.air)b.cssClass=b.cssClass+" cke_browser_air";if(b.iOS)b.cssClass=b.cssClass+" cke_browser_ios";if(b.hidpi)b.cssClass=b.cssClass+" cke_hidpi";return b}());
+(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var a={timestamp:"E4KA",version:"4.4.1",revision:"568b5ed",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var a=window.CKEDITOR_BASEPATH||"";if(!a)for(var d=document.getElementsByTagName("script"),f=0;f<d.length;f++){var b=d[f].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(b){a=b[1];break}}-1==a.indexOf(":/")&&"//"!=a.slice(0,2)&&(a=0===a.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+
+a:location.href.match(/^[^\?]*\/(?:)/)[0]+a);if(!a)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return a}(),getUrl:function(a){-1==a.indexOf(":/")&&0!==a.indexOf("/")&&(a=this.basePath+a);this.timestamp&&("/"!=a.charAt(a.length-1)&&!/[&?]t=/.test(a))&&(a+=(0<=a.indexOf("?")?"&":"?")+"t="+this.timestamp);return a},domReady:function(){function a(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",
+a,!1),d()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",a),d())}catch(f){}}function d(){for(var a;a=f.shift();)a()}var f=[];return function(d){f.push(d);"complete"===document.readyState&&setTimeout(a,1);if(1==f.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",a);window.attachEvent("onload",a);d=!1;try{d=
+!window.frameElement}catch(b){}if(document.documentElement.doScroll&&d){var e=function(){try{document.documentElement.doScroll("left")}catch(d){setTimeout(e,1);return}a()};e()}}}}()},e=window.CKEDITOR_GETURL;if(e){var b=a.getUrl;a.getUrl=function(c){return e.call(a,c)||b.call(a,c)}}return a}());
+CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(a){var e=CKEDITOR.event.prototype,b;for(b in e)a[b]==void 0&&(a[b]=e[b])},CKEDITOR.event.prototype=function(){function a(a){var d=e(this);return d[a]||(d[a]=new b(a))}var e=function(a){a=a.getPrivate&&a.getPrivate()||a._||(a._={});return a.events||(a.events={})},b=function(a){this.name=a;this.listeners=[]};b.prototype={getListenerIndex:function(a){for(var d=0,f=this.listeners;d<f.length;d++)if(f[d].fn==a)return d;return-1}};
+return{define:function(b,d){var f=a.call(this,b);CKEDITOR.tools.extend(f,d,true)},on:function(b,d,f,e,n){function i(a,o,s,r){a={name:b,sender:this,editor:a,data:o,listenerData:e,stop:s,cancel:r,removeListener:k};return d.call(f,a)===false?false:a.data}function k(){s.removeListener(b,d)}var o=a.call(this,b);if(o.getListenerIndex(d)<0){o=o.listeners;f||(f=this);isNaN(n)&&(n=10);var s=this;i.fn=d;i.priority=n;for(var r=o.length-1;r>=0;r--)if(o[r].priority<=n){o.splice(r+1,0,i);return{removeListener:k}}o.unshift(i)}return{removeListener:k}},
+once:function(){var a=arguments[1];arguments[1]=function(d){d.removeListener();return a.apply(this,arguments)};return this.on.apply(this,arguments)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,d=function(){a=1},f=0,b=function(){f=1};return function(n,i,k){var o=e(this)[n],n=a,s=f;a=f=0;if(o){var r=o.listeners;if(r.length)for(var r=r.slice(0),v,g=0;g<r.length;g++){if(o.errorProof)try{v=r[g].call(this,
+k,i,d,b)}catch(p){}else v=r[g].call(this,k,i,d,b);v===false?f=1:typeof v!="undefined"&&(i=v);if(a||f)break}}i=f?false:typeof i=="undefined"?true:i;a=n;f=s;return i}}(),fireOnce:function(a,d,f){d=this.fire(a,d,f);delete e(this)[a];return d},removeListener:function(a,d){var f=e(this)[a];if(f){var b=f.getListenerIndex(d);b>=0&&f.listeners.splice(b,1)}},removeAllListeners:function(){var a=e(this),d;for(d in a)delete a[d]},hasListeners:function(a){return(a=e(this)[a])&&a.listeners.length>0}}}());
+CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(a,e){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fire.call(this,a,e,this)},CKEDITOR.editor.prototype.fireOnce=function(a,e){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fireOnce.call(this,a,e,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype));
+CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),e={ie:a.indexOf("trident/")>-1,webkit:a.indexOf(" applewebkit/")>-1,air:a.indexOf(" adobeair/")>-1,mac:a.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat"&&(!document.documentMode||document.documentMode<10),mobile:a.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return false;var a=document.domain,f=window.location.hostname;return a!=f&&a!="["+f+"]"},secure:location.protocol==
+"https:"};e.gecko=navigator.product=="Gecko"&&!e.webkit&&!e.ie;if(e.webkit)a.indexOf("chrome")>-1?e.chrome=true:e.safari=true;var b=0;if(e.ie){b=e.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode;e.ie9Compat=b==9;e.ie8Compat=b==8;e.ie7Compat=b==7;e.ie6Compat=b<7||e.quirks}if(e.gecko){var c=a.match(/rv:([\d\.]+)/);if(c){c=c[1].split(".");b=c[0]*1E4+(c[1]||0)*100+(c[2]||0)*1}}e.air&&(b=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));e.webkit&&(b=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));
+e.version=b;e.isCompatible=e.iOS&&b>=534||!e.mobile&&(e.ie&&b>6||e.gecko&&b>=2E4||e.air&&b>=1||e.webkit&&b>=522||false);e.hidpi=window.devicePixelRatio>=2;e.needsBrFiller=e.gecko||e.webkit||e.ie&&b>10;e.needsNbspFiller=e.ie&&b<11;e.cssClass="cke_browser_"+(e.ie?"ie":e.gecko?"gecko":e.webkit?"webkit":"unknown");if(e.quirks)e.cssClass=e.cssClass+" cke_browser_quirks";if(e.ie)e.cssClass=e.cssClass+(" cke_browser_ie"+(e.quirks?"6 cke_browser_iequirks":e.version));if(e.air)e.cssClass=e.cssClass+" cke_browser_air";
+if(e.iOS)e.cssClass=e.cssClass+" cke_browser_ios";if(e.hidpi)e.cssClass=e.cssClass+" cke_hidpi";return e}());
"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if(CKEDITOR.status!="basic_ready")CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a=
-CKEDITOR.loadFullCore,d=CKEDITOR.loadFullCoreTimeout;if(a){CKEDITOR.status="basic_ready";a&&a._load?a():d&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},d*1E3)}})})();CKEDITOR.status="basic_loaded"}();CKEDITOR.dom={};
-(function(){var a=[],d=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.opera?"-o-":CKEDITOR.env.ie?"-ms-":"";CKEDITOR.on("reset",function(){a=[]});CKEDITOR.tools={arrayCompare:function(b,a){if(!b&&!a)return true;if(!b||!a||b.length!=a.length)return false;for(var e=0;e<b.length;e++)if(b[e]!=a[e])return false;return true},clone:function(b){var a;if(b&&b instanceof Array){a=[];for(var e=0;e<b.length;e++)a[e]=CKEDITOR.tools.clone(b[e]);return a}if(b===null||typeof b!="object"||
-b instanceof String||b instanceof Number||b instanceof Boolean||b instanceof Date||b instanceof RegExp)return b;a=new b.constructor;for(e in b)a[e]=CKEDITOR.tools.clone(b[e]);return a},capitalize:function(b,a){return b.charAt(0).toUpperCase()+(a?b.slice(1):b.slice(1).toLowerCase())},extend:function(b){var a=arguments.length,e,g;if(typeof(e=arguments[a-1])=="boolean")a--;else if(typeof(e=arguments[a-2])=="boolean"){g=arguments[a-1];a=a-2}for(var d=1;d<a;d++){var m=arguments[d],j;for(j in m)if(e===
-true||b[j]==void 0)if(!g||j in g)b[j]=m[j]}return b},prototypedCopy:function(b){var a=function(){};a.prototype=b;return new a},copy:function(b){var a={},e;for(e in b)a[e]=b[e];return a},isArray:function(b){return Object.prototype.toString.call(b)=="[object Array]"},isEmpty:function(b){for(var a in b)if(b.hasOwnProperty(a))return false;return true},cssVendorPrefix:function(b,a,e){if(e)return d+b+":"+a+";"+b+":"+a;e={};e[b]=a;e[d+b]=a;return e},cssStyleToDomStyle:function(){var b=document.createElement("div").style,
-a=typeof b.cssFloat!="undefined"?"cssFloat":typeof b.styleFloat!="undefined"?"styleFloat":"float";return function(e){return e=="float"?a:e.replace(/-./g,function(e){return e.substr(1).toUpperCase()})}}(),buildStyleHtml:function(b){for(var b=[].concat(b),a,e=[],g=0;g<b.length;g++)if(a=b[g])/@import|[{}]/.test(a)?e.push("<style>"+a+"</style>"):e.push('<link type="text/css" rel=stylesheet href="'+a+'">');return e.join("")},htmlEncode:function(b){return(""+b).replace(/&/g,"&").replace(/>/g,">").replace(/</g,
-"<")},htmlEncodeAttr:function(b){return b.replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")},htmlDecodeAttr:function(b){return b.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")},getNextNumber:function(){var b=0;return function(){return++b}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(b,a){var e=a(b);e.prototype=b.prototype;return e},setTimeout:function(b,a,e,g,d){d||(d=window);e||(e=d);return d.setTimeout(function(){g?b.apply(e,[].concat(g)):
-b.apply(e)},a||0)},trim:function(){var b=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(a){return a.replace(b,"")}}(),ltrim:function(){var b=/^[ \t\n\r]+/g;return function(a){return a.replace(b,"")}}(),rtrim:function(){var b=/[ \t\n\r]+$/g;return function(a){return a.replace(b,"")}}(),indexOf:function(b,a){if(typeof a=="function")for(var e=0,g=b.length;e<g;e++){if(a(b[e]))return e}else{if(b.indexOf)return b.indexOf(a);e=0;for(g=b.length;e<g;e++)if(b[e]===a)return e}return-1},search:function(b,
-a){var e=CKEDITOR.tools.indexOf(b,a);return e>=0?b[e]:null},bind:function(b,a){return function(){return b.apply(a,arguments)}},createClass:function(b){var a=b.$,e=b.base,g=b.privates||b._,d=b.proto,b=b.statics;!a&&(a=function(){e&&this.base.apply(this,arguments)});if(g)var m=a,a=function(){var e=this._||(this._={}),a;for(a in g){var b=g[a];e[a]=typeof b=="function"?CKEDITOR.tools.bind(b,this):b}m.apply(this,arguments)};if(e){a.prototype=this.prototypedCopy(e.prototype);a.prototype.constructor=a;a.base=
-e;a.baseProto=e.prototype;a.prototype.base=function(){this.base=e.prototype.base;e.apply(this,arguments);this.base=arguments.callee}}d&&this.extend(a.prototype,d,true);b&&this.extend(a,b,true);return a},addFunction:function(b,c){return a.push(function(){return b.apply(c||this,arguments)})-1},removeFunction:function(b){a[b]=null},callFunction:function(b){var c=a[b];return c&&c.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,c;return function(e){c=
-CKEDITOR.tools.trim(e+"")+"px";return a.test(c)?c:e||""}}(),convertToPx:function(){var a;return function(c){if(!a){a=CKEDITOR.dom.element.createFromHtml('<div style="position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"></div>',CKEDITOR.document);CKEDITOR.document.getBody().append(a)}if(!/%$/.test(c)){a.setStyle("width",c);return a.$.clientWidth}return c}}(),repeat:function(a,c){return Array(c+1).join(a)},tryThese:function(){for(var a,c=0,e=arguments.length;c<e;c++){var g=
-arguments[c];try{a=g();break}catch(d){}}return a},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(a){return function(){var c=arguments,e=this;window.setTimeout(function(){a.apply(e,c)},0)}},normalizeCssText:function(a,c){var e=[],g,d=CKEDITOR.tools.parseCssText(a,true,c);for(g in d)e.push(g+":"+d[g]);e.sort();return e.length?e.join(";")+";":""},convertRgbToHex:function(a){return a.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(a,e,b,d){a=
-[e,b,d];for(e=0;e<3;e++)a[e]=("0"+parseInt(a[e],10).toString(16)).slice(-2);return"#"+a.join("")})},parseCssText:function(a,c,e){var g={};if(e){e=new CKEDITOR.dom.element("span");e.setAttribute("style",a);a=CKEDITOR.tools.convertRgbToHex(e.getAttribute("style")||"")}if(!a||a==";")return g;a.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,e,b){if(c){e=e.toLowerCase();e=="font-family"&&(b=b.toLowerCase().replace(/["']/g,"").replace(/\s*,\s*/g,","));b=CKEDITOR.tools.trim(b)}g[e]=
-b});return g},writeCssText:function(a,c){var e,g=[];for(e in a)g.push(e+":"+a[e]);c&&g.sort();return g.join("; ")},objectCompare:function(a,c,e){var g;if(!a&&!c)return true;if(!a||!c)return false;for(g in a)if(a[g]!=c[g])return false;if(!e)for(g in c)if(a[g]!=c[g])return false;return true},objectKeys:function(a){var c=[],e;for(e in a)c.push(e);return c},convertArrayToObject:function(a,c){var e={};arguments.length==1&&(c=true);for(var g=0,d=a.length;g<d;++g)e[a[g]]=c;return e},fixDomain:function(){for(var a;;)try{a=
-window.parent.document.domain;break}catch(c){a=a?a.replace(/.+?(?:\.|$)/,""):document.domain;if(!a)break;document.domain=a}return!!a},eventsBuffer:function(a,c){function e(){d=(new Date).getTime();g=false;c()}var g,d=0;return{input:function(){if(!g){var c=(new Date).getTime()-d;c<a?g=setTimeout(e,a-c):e()}},reset:function(){g&&clearTimeout(g);g=d=0}}},enableHtml5Elements:function(a,c){for(var e=["abbr","article","aside","audio","bdi","canvas","data","datalist","details","figcaption","figure","footer",
-"header","hgroup","mark","meter","nav","output","progress","section","summary","time","video"],g=e.length,d;g--;){d=a.createElement(e[g]);c&&a.appendChild(d)}}}})();
-CKEDITOR.dtd=function(){var a=CKEDITOR.tools.extend,d=function(a,e){for(var b=CKEDITOR.tools.clone(a),g=1;g<arguments.length;g++){var e=arguments[g],c;for(c in e)delete b[c]}return b},b={},c={},e={address:1,article:1,aside:1,blockquote:1,details:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},g={command:1,link:1,meta:1,noscript:1,script:1,style:1},h={},m={"#":1},j={center:1,dir:1,noframes:1};
-a(b,{a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,"var":1,video:1,wbr:1},m,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});a(c,e,b,j);d={a:d(b,{a:1,button:1}),abbr:b,address:c,
-area:h,article:a({style:1},c),aside:a({style:1},c),audio:a({source:1,track:1},c),b:b,base:h,bdi:b,bdo:b,blockquote:c,body:c,br:h,button:d(b,{a:1,button:1}),canvas:b,caption:c,cite:b,code:b,col:h,colgroup:{col:1},command:h,datalist:a({option:1},b),dd:c,del:b,details:a({summary:1},c),dfn:b,div:a({style:1},c),dl:{dt:1,dd:1},dt:c,em:b,embed:h,fieldset:a({legend:1},c),figcaption:c,figure:a({figcaption:1},c),footer:c,form:c,h1:b,h2:b,h3:b,h4:b,h5:b,h6:b,head:a({title:1,base:1},g),header:c,hgroup:{h1:1,
-h2:1,h3:1,h4:1,h5:1,h6:1},hr:h,html:a({head:1,body:1},c,g),i:b,iframe:m,img:h,input:h,ins:b,kbd:b,keygen:h,label:b,legend:b,li:c,link:h,map:c,mark:b,menu:a({li:1},c),meta:h,meter:d(b,{meter:1}),nav:c,noscript:a({link:1,meta:1,style:1},b),object:a({param:1},b),ol:{li:1},optgroup:{option:1},option:m,output:b,p:b,param:h,pre:b,progress:d(b,{progress:1}),q:b,rp:b,rt:b,ruby:a({rp:1,rt:1},b),s:b,samp:b,script:m,section:a({style:1},c),select:{optgroup:1,option:1},small:b,source:h,span:b,strong:b,style:m,
-sub:b,summary:b,sup:b,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:c,textarea:m,tfoot:{tr:1},th:c,thead:{tr:1},time:d(b,{time:1}),title:m,tr:{th:1,td:1},track:h,u:b,ul:{li:1},"var":b,video:a({source:1,track:1},c),wbr:h,acronym:b,applet:a({param:1},c),basefont:h,big:b,center:c,dialog:h,dir:{li:1},font:b,isindex:h,noframes:c,strike:b,tt:b};a(d,{$block:a({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},e,j),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1,
+CKEDITOR.loadFullCore,e=CKEDITOR.loadFullCoreTimeout;if(a){CKEDITOR.status="basic_ready";a&&a._load?a():e&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},e*1E3)}})})();CKEDITOR.status="basic_loaded"}();CKEDITOR.dom={};
+(function(){var a=[],e=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",b=/&/g,c=/>/g,d=/</g,f=/"/g,h=/&/g,n=/>/g,i=/</g,k=/"/g;CKEDITOR.on("reset",function(){a=[]});CKEDITOR.tools={arrayCompare:function(a,d){if(!a&&!d)return true;if(!a||!d||a.length!=d.length)return false;for(var f=0;f<a.length;f++)if(a[f]!=d[f])return false;return true},clone:function(a){var d;if(a&&a instanceof Array){d=[];for(var f=0;f<a.length;f++)d[f]=CKEDITOR.tools.clone(a[f]);
+return d}if(a===null||typeof a!="object"||a instanceof String||a instanceof Number||a instanceof Boolean||a instanceof Date||a instanceof RegExp)return a;d=new a.constructor;for(f in a)d[f]=CKEDITOR.tools.clone(a[f]);return d},capitalize:function(a,d){return a.charAt(0).toUpperCase()+(d?a.slice(1):a.slice(1).toLowerCase())},extend:function(a){var d=arguments.length,f,b;if(typeof(f=arguments[d-1])=="boolean")d--;else if(typeof(f=arguments[d-2])=="boolean"){b=arguments[d-1];d=d-2}for(var g=1;g<d;g++){var e=
+arguments[g],c;for(c in e)if(f===true||a[c]==void 0)if(!b||c in b)a[c]=e[c]}return a},prototypedCopy:function(a){var d=function(){};d.prototype=a;return new d},copy:function(a){var d={},f;for(f in a)d[f]=a[f];return d},isArray:function(a){return Object.prototype.toString.call(a)=="[object Array]"},isEmpty:function(a){for(var d in a)if(a.hasOwnProperty(d))return false;return true},cssVendorPrefix:function(a,d,f){if(f)return e+a+":"+d+";"+a+":"+d;f={};f[a]=d;f[e+a]=d;return f},cssStyleToDomStyle:function(){var a=
+document.createElement("div").style,d=typeof a.cssFloat!="undefined"?"cssFloat":typeof a.styleFloat!="undefined"?"styleFloat":"float";return function(a){return a=="float"?d:a.replace(/-./g,function(a){return a.substr(1).toUpperCase()})}}(),buildStyleHtml:function(a){for(var a=[].concat(a),d,f=[],b=0;b<a.length;b++)if(d=a[b])/@import|[{}]/.test(d)?f.push("<style>"+d+"</style>"):f.push('<link type="text/css" rel=stylesheet href="'+d+'">');return f.join("")},htmlEncode:function(a){return(""+a).replace(b,
+"&").replace(c,">").replace(d,"<")},htmlDecode:function(a){return a.replace(h,"&").replace(n,">").replace(i,"<")},htmlEncodeAttr:function(a){return a.replace(f,""").replace(d,"<").replace(c,">")},htmlDecodeAttr:function(a){return a.replace(k,'"').replace(i,"<").replace(n,">")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(a,d){var f=d(a);f.prototype=a.prototype;return f},setTimeout:function(a,
+d,f,b,g){g||(g=window);f||(f=g);return g.setTimeout(function(){b?a.apply(f,[].concat(b)):a.apply(f)},d||0)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(d){return d.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(d){return d.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(d){return d.replace(a,"")}}(),indexOf:function(a,d){if(typeof d=="function")for(var f=0,b=a.length;f<b;f++){if(d(a[f]))return f}else{if(a.indexOf)return a.indexOf(d);
+f=0;for(b=a.length;f<b;f++)if(a[f]===d)return f}return-1},search:function(a,d){var f=CKEDITOR.tools.indexOf(a,d);return f>=0?a[f]:null},bind:function(a,d){return function(){return a.apply(d,arguments)}},createClass:function(a){var d=a.$,f=a.base,b=a.privates||a._,g=a.proto,a=a.statics;!d&&(d=function(){f&&this.base.apply(this,arguments)});if(b)var e=d,d=function(){var a=this._||(this._={}),d;for(d in b){var g=b[d];a[d]=typeof g=="function"?CKEDITOR.tools.bind(g,this):g}e.apply(this,arguments)};if(f){d.prototype=
+this.prototypedCopy(f.prototype);d.prototype.constructor=d;d.base=f;d.baseProto=f.prototype;d.prototype.base=function(){this.base=f.prototype.base;f.apply(this,arguments);this.base=arguments.callee}}g&&this.extend(d.prototype,g,true);a&&this.extend(d,a,true);return d},addFunction:function(d,f){return a.push(function(){return d.apply(f||this,arguments)})-1},removeFunction:function(d){a[d]=null},callFunction:function(d){var f=a[d];return f&&f.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=
+/^-?\d+\.?\d*px$/,d;return function(f){d=CKEDITOR.tools.trim(f+"")+"px";return a.test(d)?d:f||""}}(),convertToPx:function(){var a;return function(d){if(!a){a=CKEDITOR.dom.element.createFromHtml('<div style="position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"></div>',CKEDITOR.document);CKEDITOR.document.getBody().append(a)}if(!/%$/.test(d)){a.setStyle("width",d);return a.$.clientWidth}return d}}(),repeat:function(a,d){return Array(d+1).join(a)},tryThese:function(){for(var a,
+d=0,f=arguments.length;d<f;d++){var b=arguments[d];try{a=b();break}catch(g){}}return a},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(a){return function(){var d=arguments,f=this;window.setTimeout(function(){a.apply(f,d)},0)}},normalizeCssText:function(a,d){var f=[],b,g=CKEDITOR.tools.parseCssText(a,true,d);for(b in g)f.push(b+":"+g[b]);f.sort();return f.length?f.join(";")+";":""},convertRgbToHex:function(a){return a.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,
+function(a,d,f,g){a=[d,f,g];for(d=0;d<3;d++)a[d]=("0"+parseInt(a[d],10).toString(16)).slice(-2);return"#"+a.join("")})},parseCssText:function(a,d,f){var b={};if(f){f=new CKEDITOR.dom.element("span");f.setAttribute("style",a);a=CKEDITOR.tools.convertRgbToHex(f.getAttribute("style")||"")}if(!a||a==";")return b;a.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,f,o){if(d){f=f.toLowerCase();f=="font-family"&&(o=o.toLowerCase().replace(/["']/g,"").replace(/\s*,\s*/g,","));
+o=CKEDITOR.tools.trim(o)}b[f]=o});return b},writeCssText:function(a,d){var f,b=[];for(f in a)b.push(f+":"+a[f]);d&&b.sort();return b.join("; ")},objectCompare:function(a,d,f){var b;if(!a&&!d)return true;if(!a||!d)return false;for(b in a)if(a[b]!=d[b])return false;if(!f)for(b in d)if(a[b]!=d[b])return false;return true},objectKeys:function(a){var d=[],f;for(f in a)d.push(f);return d},convertArrayToObject:function(a,d){var f={};arguments.length==1&&(d=true);for(var b=0,g=a.length;b<g;++b)f[a[b]]=d;
+return f},fixDomain:function(){for(var a;;)try{a=window.parent.document.domain;break}catch(d){a=a?a.replace(/.+?(?:\.|$)/,""):document.domain;if(!a)break;document.domain=a}return!!a},eventsBuffer:function(a,d){function f(){g=(new Date).getTime();b=false;d()}var b,g=0;return{input:function(){if(!b){var d=(new Date).getTime()-g;d<a?b=setTimeout(f,a-d):f()}},reset:function(){b&&clearTimeout(b);b=g=0}}},enableHtml5Elements:function(a,d){for(var f=["abbr","article","aside","audio","bdi","canvas","data",
+"datalist","details","figcaption","figure","footer","header","hgroup","mark","meter","nav","output","progress","section","summary","time","video"],b=f.length,g;b--;){g=a.createElement(f[b]);d&&a.appendChild(g)}},checkIfAnyArrayItemMatches:function(a,d){for(var f=0,b=a.length;f<b;++f)if(a[f].match(d))return true;return false},checkIfAnyObjectPropertyMatches:function(a,d){for(var f in a)if(f.match(d))return true;return false},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw=="}})();
+CKEDITOR.dtd=function(){var a=CKEDITOR.tools.extend,e=function(a,d){for(var f=CKEDITOR.tools.clone(a),b=1;b<arguments.length;b++){var d=arguments[b],e;for(e in d)delete f[e]}return f},b={},c={},d={address:1,article:1,aside:1,blockquote:1,details:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},f={command:1,link:1,meta:1,noscript:1,script:1,style:1},h={},n={"#":1},i={center:1,dir:1,noframes:1};
+a(b,{a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,"var":1,video:1,wbr:1},n,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});a(c,d,b,i);e={a:e(b,{a:1,button:1}),abbr:b,address:c,
+area:h,article:a({style:1},c),aside:a({style:1},c),audio:a({source:1,track:1},c),b:b,base:h,bdi:b,bdo:b,blockquote:c,body:c,br:h,button:e(b,{a:1,button:1}),canvas:b,caption:c,cite:b,code:b,col:h,colgroup:{col:1},command:h,datalist:a({option:1},b),dd:c,del:b,details:a({summary:1},c),dfn:b,div:a({style:1},c),dl:{dt:1,dd:1},dt:c,em:b,embed:h,fieldset:a({legend:1},c),figcaption:c,figure:a({figcaption:1},c),footer:c,form:c,h1:b,h2:b,h3:b,h4:b,h5:b,h6:b,head:a({title:1,base:1},f),header:c,hgroup:{h1:1,
+h2:1,h3:1,h4:1,h5:1,h6:1},hr:h,html:a({head:1,body:1},c,f),i:b,iframe:n,img:h,input:h,ins:b,kbd:b,keygen:h,label:b,legend:b,li:c,link:h,map:c,mark:b,menu:a({li:1},c),meta:h,meter:e(b,{meter:1}),nav:c,noscript:a({link:1,meta:1,style:1},b),object:a({param:1},b),ol:{li:1},optgroup:{option:1},option:n,output:b,p:b,param:h,pre:b,progress:e(b,{progress:1}),q:b,rp:b,rt:b,ruby:a({rp:1,rt:1},b),s:b,samp:b,script:n,section:a({style:1},c),select:{optgroup:1,option:1},small:b,source:h,span:b,strong:b,style:n,
+sub:b,summary:b,sup:b,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:c,textarea:n,tfoot:{tr:1},th:c,thead:{tr:1},time:e(b,{time:1}),title:n,tr:{th:1,td:1},track:h,u:b,ul:{li:1},"var":b,video:a({source:1,track:1},c),wbr:h,acronym:b,applet:a({param:1},c),basefont:h,big:b,center:c,dialog:h,dir:{li:1},font:b,isindex:h,noframes:c,strike:b,tt:b};a(e,{$block:a({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},d,i),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1,
div:1,dl:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1},$cdata:{script:1,style:1},$editable:{address:1,article:1,aside:1,blockquote:1,body:1,details:1,div:1,fieldset:1,figcaption:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,nav:1,p:1,pre:1,section:1},$empty:{area:1,base:1,basefont:1,br:1,col:1,command:1,dialog:1,embed:1,hr:1,img:1,input:1,isindex:1,keygen:1,link:1,meta:1,param:1,source:1,track:1,
-wbr:1},$inline:b,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:a({body:1,head:1,html:1},d.head),$nonEditable:{applet:1,audio:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,param:1,script:1,textarea:1,video:1},$object:{applet:1,audio:1,button:1,hr:1,iframe:1,img:1,input:1,object:1,select:1,table:1,textarea:1,video:1},$removeEmpty:{abbr:1,acronym:1,b:1,bdi:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,mark:1,meter:1,output:1,q:1,ruby:1,s:1,samp:1,
-small:1,span:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,"var":1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},$transparent:{a:1,audio:1,canvas:1,del:1,ins:1,map:1,noscript:1,object:1,video:1},$intermediate:{caption:1,colgroup:1,dd:1,dt:1,figcaption:1,legend:1,li:1,optgroup:1,option:1,rp:1,rt...
[truncated message content] |
|
From: <be...@us...> - 2014-06-10 09:48:43
|
Revision: 12572
http://sourceforge.net/p/xoops/svn/12572
Author: beckmi
Date: 2014-06-10 09:48:36 +0000 (Tue, 10 Jun 2014)
Log Message:
-----------
Updating to 4.0.28
Modified Paths:
--------------
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/changelog.txt
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/image/plugin.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/link/plugin.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/lists/plugin.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/paste/plugin.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/spellchecker/plugin.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/table/plugin.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/visualblocks/css/visualblocks.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/skins/lightgray/skin.ie7.min.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/skins/lightgray/skin.min.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/tinymce.min.js
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/changelog.txt
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/changelog.txt 2014-06-10 09:47:09 UTC (rev 12571)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/changelog.txt 2014-06-10 09:48:36 UTC (rev 12572)
@@ -1,3 +1,37 @@
+Version 4.0.28 (2014-05-27)
+ Fixed critical issue with empty urls producing an exception when converted into absolute urls due to resent bug fix in tinymce.util.URI.
+Version 4.0.27 (2014-05-27)
+ Added support for definition lists to lists plugin and enter key logic. This can now created by the format menu.
+ Added cmd option for the style_formats menu enables you to toggle commands on/off using the formats menu for example lists.
+ Added definition lists to visualblocks plugin so these are properly visualized like other list elements.
+ Added new paste_merge_formats option that reduces the number of nested text format elements produced on paste. Enabled by default.
+ Added better support for nested link_list/image_list menu items each item can now have a "menu" item with subitems.
+ Added "Add to Dictionary" support to spellchecker plugin when the backend tells that this feature is available.
+ Added new table_default_attributes/table_default_styles options patch contributed by Dan Villiom Podlaski Christiansen.
+ Added new table_class_list/table_cell_class_list/table_row_class_list options to table plugin.
+ Added new invalid_styles/valid_classes options to better control what gets returned for the style/class attribute.
+ Added new file_browser_callback_types option that allows you to specify where to display the picker based on dialog type.
+ Fixed so the selected state is properly handled on nested menu items in listboxes patch contributed by Jelle Kralt.
+ Fixed so the invisiblity css value for TinyMCE gets set to inherit instead of visible to better support dialog scripts like reveal.
+ Fixed bug where Gecko would remove anchors when pasting since the their default built in logic removes empty nodes.
+ Fixed bug where it wasn't possible to paste on Chrome Andoid since it doesn't properly support the Clipboard API yet.
+ Fixed bug where user defined type attribute value of text/javascript didn't get properly serialized.
+ Fixed bug where space in span elements would removed when the element was considered empty.
+ Fixed bug where the undo/redo button states didn't change if you removed all undo levels using undoManager.clear.
+ Fixed bug where unencoded links inside query strings or hash values would get processed by the relative urls logic.
+ Fixed bug where contextmenu would automatically close in inline editing mode on Firefox running on Mac.
+ Fixed bug where Gecko/IE would produce multiple BR elements when forced_root_block was set to false and a table was the last child of body.
+ Fixed bug where custom queryCommandState handlers didn't properly handle boolean states.
+ Fixed bug where auto closing float panels link menus wasn't automatically closed when the window was resized.
+ Fixed bug where the image plugin wouldn't update image dimensions when the current image was changed using the image_list select box.
+ Fixed bug with paste plugin not properly removing paste bin on Safari Mac when using the cmd+shift+v keyboard command.
+ Fixed bug where the paste plugin wouln't properly strip trailing br elements under very specific scenarios.
+ Fixed bug where enter key wouldn't properly place the caret on Gecko when pressing enter in a text block with a br ended line inside.
+ Fixed bug where Safari Mac shortcuts like Cmd+Opt+L didn't get passed through to the browser due to a Quirks fix.
+ Fixed so plain text mode works better when it converts rich text to plain text when pasting from for example Word.
+ Fixed so numeric keycodes can be used in the shortcut format enabling support for any key to be specified.
+ Fixed so table cells can be navigated with tab key and new rows gets automatically added when you are at the last cell.
+ Fixed bug where formatting before cursor gets removed when toggled off for continued content.
Version 4.0.26 (2014-05-06)
Fixed bug in media plugin where changing existing url did not use media regex patterns to create protocol neutral url.
Fixed bug where selection wasn't properly restored on IE 11 due to a browser bug with Element.contains.
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/image/plugin.min.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/image/plugin.min.js 2014-06-10 09:47:09 UTC (rev 12571)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/image/plugin.min.js 2014-06-10 09:48:36 UTC (rev 12572)
@@ -1 +1 @@
-tinymce.PluginManager.add("image",function(e){function t(e,t){function i(e,i){n.parentNode&&n.parentNode.removeChild(n),t({width:e,height:i})}var n=document.createElement("img");n.onload=function(){i(n.clientWidth,n.clientHeight)},n.onerror=function(){i()};var a=n.style;a.visibility="hidden",a.position="fixed",a.bottom=a.left=0,a.width=a.height="auto",document.body.appendChild(n),n.src=e}function i(t){return tinymce.each(t,function(t){t.textStyle=function(){return e.formatter.getCssText({inline:"img",classes:[t.value]})}}),t}function n(t){return function(){var i=e.settings.image_list;"string"==typeof i?tinymce.util.XHR.send({url:i,success:function(e){t(tinymce.util.JSON.parse(e))}}):"function"==typeof i?i(t):t(i)}}function a(n){function a(t,i,n){var a,l=[];return tinymce.each(e.settings[t]||n,function(e){var t={text:e.text||e.title,value:e.value};l.push(t),(f[i]===e.value||!a&&e.selected)&&(a=t)}),a&&!f[i]&&(f[i]=a.value,a.selected=!0),l}function l(){var t=[{text:"None",value:""}];return tinymce.each(n,function(i){t.push({text:i.text||i.title,value:e.convertURL(i.value||i.url,"src"),menu:i.menu})}),t}function o(){var e,t,i,n;e=u.find("#width")[0],t=u.find("#height")[0],i=e.value(),n=t.value(),u.find("#constrain")[0].checked()&&g&&h&&i&&n&&(g!=i?(n=Math.round(i/g*n),t.value(n)):(i=Math.round(n/h*i),e.value(i))),g=i,h=n}function s(){function t(t){function i(){t.onload=t.onerror=null,e.selection.select(t),e.nodeChanged()}t.onload=function(){f.width||f.height||y.setAttribs(t,{width:t.clientWidth,height:t.clientHeight}),i()},t.onerror=i}d(),o(),f=tinymce.extend(f,u.toJSON()),f.alt||(f.alt=""),""===f.width&&(f.width=null),""===f.height&&(f.height=null),f.style||(f.style=null),f={src:f.src,alt:f.alt,width:f.width,height:f.height,style:f.style,"class":f["class"]},f["class"]||delete f["class"],e.undoManager.transact(function(){return f.src?(v?y.setAttribs(v,f):(f.id="__mcenew",e.focus(),e.selection.setContent(y.createHTML("img",f)),v=y.get("__mcenew"),y.setAttrib(v,"id",null)),void t(v)):void(v&&(y.remove(v),e.focus(),e.nodeChanged()))})}function r(e){return e&&(e=e.replace(/px$/,"")),e}function c(){m&&m.value(e.convertURL(this.value(),"src")),t(this.value(),function(e){e.width&&e.height&&(g=e.width,h=e.height,u.find("#width").value(g),u.find("#height").value(h))})}function d(){function t(e){return e.length>0&&/^[0-9]+$/.test(e)&&(e+="px"),e}if(e.settings.image_advtab){var i=u.toJSON(),n=y.parseStyle(i.style);delete n.margin,n["margin-top"]=n["margin-bottom"]=t(i.vspace),n["margin-left"]=n["margin-right"]=t(i.hspace),n["border-width"]=t(i.border),u.find("#style").value(y.serializeStyle(y.parseStyle(y.serializeStyle(n))))}}var u,g,h,m,p,f={},y=e.dom,v=e.selection.getNode();g=y.getAttrib(v,"width"),h=y.getAttrib(v,"height"),"IMG"!=v.nodeName||v.getAttribute("data-mce-object")||v.getAttribute("data-mce-placeholder")?v=null:f={src:y.getAttrib(v,"src"),alt:y.getAttrib(v,"alt"),"class":y.getAttrib(v,"class"),width:g,height:h},n&&(m={type:"listbox",label:"Image list",values:l(),value:f.src&&e.convertURL(f.src,"src"),onselect:function(e){var t=u.find("#alt");(!t.value()||e.lastControl&&t.value()==e.lastControl.text())&&t.value(e.control.text()),u.find("#src").value(e.control.value())},onPostRender:function(){m=this}}),e.settings.image_class_list&&(p={name:"class",type:"listbox",label:"Class",values:i(a("image_class_list","class"))});var b=[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0,onchange:c},m];e.settings.image_description!==!1&&b.push({name:"alt",type:"textbox",label:"Image description"}),e.settings.image_dimensions!==!1&&b.push({type:"container",label:"Dimensions",layout:"flex",direction:"row",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:3,onchange:o,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:3,onchange:o,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}),b.push(p),e.settings.image_advtab?(v&&(f.hspace=r(v.style.marginLeft||v.style.marginRight),f.vspace=r(v.style.marginTop||v.style.marginBottom),f.border=r(v.style.borderWidth),f.style=e.dom.serializeStyle(e.dom.parseStyle(e.dom.getAttrib(v,"style")))),u=e.windowManager.open({title:"Insert/edit image",data:f,bodyType:"tabpanel",body:[{title:"General",type:"form",items:b},{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox"},{type:"form",layout:"grid",packV:"start",columns:2,padding:0,alignH:["left","right"],defaults:{type:"textbox",maxWidth:50,onchange:d},items:[{label:"Vertical space",name:"vspace"},{label:"Horizontal space",name:"hspace"},{label:"Border",name:"border"}]}]}],onSubmit:s})):u=e.windowManager.open({title:"Insert/edit image",data:f,body:b,onSubmit:s})}e.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:n(a),stateSelector:"img:not([data-mce-object],[data-mce-placeholder])"}),e.addMenuItem("image",{icon:"image",text:"Insert image",onclick:n(a),context:"insert",prependToContext:!0})});
\ No newline at end of file
+tinymce.PluginManager.add("image",function(e){function t(e,t){function n(e,n){i.parentNode&&i.parentNode.removeChild(i),t({width:e,height:n})}var i=document.createElement("img");i.onload=function(){n(i.clientWidth,i.clientHeight)},i.onerror=function(){n()};var a=i.style;a.visibility="hidden",a.position="fixed",a.bottom=a.left=0,a.width=a.height="auto",document.body.appendChild(i),i.src=e}function n(t){return tinymce.each(t,function(t){t.textStyle=function(){return e.formatter.getCssText({inline:"img",classes:[t.value]})}}),t}function i(t){return function(){var n=e.settings.image_list;"string"==typeof n?tinymce.util.XHR.send({url:n,success:function(e){t(tinymce.util.JSON.parse(e))}}):"function"==typeof n?n(t):t(n)}}function a(i){function a(t,n,i){var a,l=[];return tinymce.each(e.settings[t]||i,function(e){var t={text:e.text||e.title,value:e.value};l.push(t),(f[n]===e.value||!a&&e.selected)&&(a=t)}),a&&!f[n]&&(f[n]=a.value,a.selected=!0),l}function l(){function t(n,i){return i=i||[],tinymce.each(n,function(n){var a={text:n.text||n.title};n.menu?a.menu=t(n.menu):a.value=e.convertURL(n.value||n.url,"src"),i.push(a)}),i}return t(i,[{text:"None",value:""}])}function o(){var e,t,n,i;e=u.find("#width")[0],t=u.find("#height")[0],n=e.value(),i=t.value(),u.find("#constrain")[0].checked()&&g&&h&&n&&i&&(g!=n?(i=Math.round(n/g*i),t.value(i)):(n=Math.round(i/h*n),e.value(n))),g=n,h=i}function s(){function t(t){function n(){t.onload=t.onerror=null,e.selection.select(t),e.nodeChanged()}t.onload=function(){f.width||f.height||y.setAttribs(t,{width:t.clientWidth,height:t.clientHeight}),n()},t.onerror=n}d(),o(),f=tinymce.extend(f,u.toJSON()),f.alt||(f.alt=""),""===f.width&&(f.width=null),""===f.height&&(f.height=null),f.style||(f.style=null),f={src:f.src,alt:f.alt,width:f.width,height:f.height,style:f.style,"class":f["class"]},f["class"]||delete f["class"],e.undoManager.transact(function(){return f.src?(v?y.setAttribs(v,f):(f.id="__mcenew",e.focus(),e.selection.setContent(y.createHTML("img",f)),v=y.get("__mcenew"),y.setAttrib(v,"id",null)),void t(v)):void(v&&(y.remove(v),e.focus(),e.nodeChanged()))})}function r(e){return e&&(e=e.replace(/px$/,"")),e}function c(){m&&m.value(e.convertURL(this.value(),"src")),t(this.value(),function(e){e.width&&e.height&&(g=e.width,h=e.height,u.find("#width").value(g),u.find("#height").value(h))})}function d(){function t(e){return e.length>0&&/^[0-9]+$/.test(e)&&(e+="px"),e}if(e.settings.image_advtab){var n=u.toJSON(),i=y.parseStyle(n.style);delete i.margin,i["margin-top"]=i["margin-bottom"]=t(n.vspace),i["margin-left"]=i["margin-right"]=t(n.hspace),i["border-width"]=t(n.border),u.find("#style").value(y.serializeStyle(y.parseStyle(y.serializeStyle(i))))}}var u,g,h,m,p,f={},y=e.dom,v=e.selection.getNode();g=y.getAttrib(v,"width"),h=y.getAttrib(v,"height"),"IMG"!=v.nodeName||v.getAttribute("data-mce-object")||v.getAttribute("data-mce-placeholder")?v=null:f={src:y.getAttrib(v,"src"),alt:y.getAttrib(v,"alt"),"class":y.getAttrib(v,"class"),width:g,height:h},i&&(m={type:"listbox",label:"Image list",values:l(),value:f.src&&e.convertURL(f.src,"src"),onselect:function(e){var t=u.find("#alt");(!t.value()||e.lastControl&&t.value()==e.lastControl.text())&&t.value(e.control.text()),u.find("#src").value(e.control.value()).fire("change")},onPostRender:function(){m=this}}),e.settings.image_class_list&&(p={name:"class",type:"listbox",label:"Class",values:n(a("image_class_list","class"))});var b=[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0,onchange:c},m];e.settings.image_description!==!1&&b.push({name:"alt",type:"textbox",label:"Image description"}),e.settings.image_dimensions!==!1&&b.push({type:"container",label:"Dimensions",layout:"flex",direction:"row",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:3,onchange:o,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:3,onchange:o,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}),b.push(p),e.settings.image_advtab?(v&&(f.hspace=r(v.style.marginLeft||v.style.marginRight),f.vspace=r(v.style.marginTop||v.style.marginBottom),f.border=r(v.style.borderWidth),f.style=e.dom.serializeStyle(e.dom.parseStyle(e.dom.getAttrib(v,"style")))),u=e.windowManager.open({title:"Insert/edit image",data:f,bodyType:"tabpanel",body:[{title:"General",type:"form",items:b},{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox"},{type:"form",layout:"grid",packV:"start",columns:2,padding:0,alignH:["left","right"],defaults:{type:"textbox",maxWidth:50,onchange:d},items:[{label:"Vertical space",name:"vspace"},{label:"Horizontal space",name:"hspace"},{label:"Border",name:"border"}]}]}],onSubmit:s})):u=e.windowManager.open({title:"Insert/edit image",data:f,body:b,onSubmit:s})}e.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:i(a),stateSelector:"img:not([data-mce-object],[data-mce-placeholder])"}),e.addMenuItem("image",{icon:"image",text:"Insert image",onclick:i(a),context:"insert",prependToContext:!0})});
\ No newline at end of file
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/link/plugin.min.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/link/plugin.min.js 2014-06-10 09:47:09 UTC (rev 12571)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/link/plugin.min.js 2014-06-10 09:48:36 UTC (rev 12572)
@@ -1 +1 @@
-tinymce.PluginManager.add("link",function(t){function e(e){return function(){var n=t.settings.link_list;"string"==typeof n?tinymce.util.XHR.send({url:n,success:function(t){e(tinymce.util.JSON.parse(t))}}):"function"==typeof n?n(e):e(n)}}function n(e){function n(t){var e=d.find("#text");(!e.value()||t.lastControl&&e.value()==t.lastControl.text())&&e.value(t.control.text()),d.find("#href").value(t.control.value())}function l(){var n=[{text:"None",value:""}];return tinymce.each(e,function(e){n.push({text:e.text||e.title,value:t.convertURL(e.value||e.url,"href"),menu:e.menu})}),n}function i(e){return tinymce.each(e,function(e){e.textStyle=function(){return t.formatter.getCssText({inline:"a",classes:[e.value]})}}),e}function a(e,n,l){var i,a=[];return tinymce.each(t.settings[e]||l,function(t){var e={text:t.text||t.title,value:t.value};a.push(e),(b[n]===t.value||!i&&t.selected)&&(i=e)}),i&&!b[n]&&(b[n]=i.value,i.selected=!0),a}function r(e){var l=[];return tinymce.each(t.dom.select("a:not([href])"),function(t){var n=t.name||t.id;n&&l.push({text:n,value:"#"+n,selected:-1!=e.indexOf("#"+n)})}),l.length?(l.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:l,onselect:n}):void 0}function o(){h&&h.value(t.convertURL(this.value(),"href")),!f&&0===b.text.length&&x&&this.parent().parent().find("#text")[0].value(this.value())}function s(t){var e=k.getContent();if(/</.test(e)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(e)||-1==e.indexOf("href=")))return!1;if(t){var n,l=t.childNodes;if(0===l.length)return!1;for(n=l.length-1;n>=0;n--)if(3!=l[n].nodeType)return!1}return!0}var u,c,f,d,x,v,h,g,m,p,y,b={},k=t.selection,w=t.dom;u=k.getNode(),c=w.getParent(u,"a[href]"),x=s(),b.text=f=c?c.innerText||c.textContent:k.getContent({format:"text"}),b.href=c?w.getAttrib(c,"href"):"",b.target=c?w.getAttrib(c,"target"):t.settings.default_link_target||null,b.rel=c?w.getAttrib(c,"rel"):null,b["class"]=c?w.getAttrib(c,"class"):null,b.title=c?w.getAttrib(c,"title"):"",x&&(v={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){b.text=this.value()}}),e&&(h={type:"listbox",label:"Link list",values:l(),onselect:n,value:t.convertURL(b.href,"href"),onPostRender:function(){h=this}}),t.settings.target_list!==!1&&(m={name:"target",type:"listbox",label:"Target",values:a("target_list","target",[{text:"None",value:""},{text:"New window",value:"_blank"}])}),t.settings.rel_list&&(g={name:"rel",type:"listbox",label:"Rel",values:a("rel_list","rel",[{text:"None",value:""}])}),t.settings.link_class_list&&(p={name:"class",type:"listbox",label:"Class",values:i(a("link_class_list","class"))}),t.settings.link_title!==!1&&(y={name:"title",type:"textbox",label:"Title",value:b.title}),d=t.windowManager.open({title:"Insert link",data:b,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:o,onkeyup:o},v,y,r(b.href),h,g,m,p],onSubmit:function(e){function n(e,n){var l=t.selection.getRng();window.setTimeout(function(){t.windowManager.confirm(e,function(e){t.selection.setRng(l),n(e)})},0)}function l(){var e={href:i,target:b.target?b.target:null,rel:b.rel?b.rel:null,"class":b["class"]?b["class"]:null,title:b.title?b.title:null};c?(t.focus(),x&&b.text!=f&&("innerText"in c?c.innerText=b.text:c.textContent=b.text),w.setAttribs(c,e),k.select(c),t.undoManager.add()):x?t.insertContent(w.createHTML("a",e,w.encode(b.text))):t.execCommand("mceInsertLink",!1,e)}var i;return b=tinymce.extend(b,e.data),(i=b.href)?i.indexOf("@")>0&&-1==i.indexOf("//")&&-1==i.indexOf("mailto:")?void n("The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(t){t&&(i="mailto:"+i),l()}):/^\s*www\./i.test(i)?void n("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(t){t&&(i="http://"+i),l()}):void l():void t.execCommand("unlink")}})}t.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Ctrl+K",onclick:e(n),stateSelector:"a[href]"}),t.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink",stateSelector:"a[href]"}),t.addShortcut("Ctrl+K","",e(n)),this.showDialog=n,t.addMenuItem("link",{icon:"link",text:"Insert link",shortcut:"Ctrl+K",onclick:e(n),stateSelector:"a[href]",context:"insert",prependToContext:!0})});
\ No newline at end of file
+tinymce.PluginManager.add("link",function(t){function e(e){return function(){var n=t.settings.link_list;"string"==typeof n?tinymce.util.XHR.send({url:n,success:function(t){e(tinymce.util.JSON.parse(t))}}):"function"==typeof n?n(e):e(n)}}function n(e){function n(t){var e=d.find("#text");(!e.value()||t.lastControl&&e.value()==t.lastControl.text())&&e.value(t.control.text()),d.find("#href").value(t.control.value())}function l(){function n(e,l){return l=l||[],tinymce.each(e,function(e){var i={text:e.text||e.title};e.menu?i.menu=n(e.menu):i.value=t.convertURL(e.value||e.url,"href"),l.push(i)}),l}return n(e,[{text:"None",value:""}])}function i(e){return tinymce.each(e,function(e){e.textStyle=function(){return t.formatter.getCssText({inline:"a",classes:[e.value]})}}),e}function a(e,n,l){var i,a=[];return tinymce.each(t.settings[e]||l,function(t){var e={text:t.text||t.title,value:t.value};a.push(e),(b[n]===t.value||!i&&t.selected)&&(i=e)}),i&&!b[n]&&(b[n]=i.value,i.selected=!0),a}function r(e){var l=[];return tinymce.each(t.dom.select("a:not([href])"),function(t){var n=t.name||t.id;n&&l.push({text:n,value:"#"+n,selected:-1!=e.indexOf("#"+n)})}),l.length?(l.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:l,onselect:n}):void 0}function o(){h&&h.value(t.convertURL(this.value(),"href")),!f&&0===b.text.length&&x&&this.parent().parent().find("#text")[0].value(this.value())}function s(t){var e=k.getContent();if(/</.test(e)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(e)||-1==e.indexOf("href=")))return!1;if(t){var n,l=t.childNodes;if(0===l.length)return!1;for(n=l.length-1;n>=0;n--)if(3!=l[n].nodeType)return!1}return!0}var u,c,f,d,x,v,h,g,m,p,y,b={},k=t.selection,w=t.dom;u=k.getNode(),c=w.getParent(u,"a[href]"),x=s(),b.text=f=c?c.innerText||c.textContent:k.getContent({format:"text"}),b.href=c?w.getAttrib(c,"href"):"",b.target=c?w.getAttrib(c,"target"):t.settings.default_link_target||null,b.rel=c?w.getAttrib(c,"rel"):null,b["class"]=c?w.getAttrib(c,"class"):null,b.title=c?w.getAttrib(c,"title"):"",x&&(v={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){b.text=this.value()}}),e&&(h={type:"listbox",label:"Link list",values:l(),onselect:n,value:t.convertURL(b.href,"href"),onPostRender:function(){h=this}}),t.settings.target_list!==!1&&(m={name:"target",type:"listbox",label:"Target",values:a("target_list","target",[{text:"None",value:""},{text:"New window",value:"_blank"}])}),t.settings.rel_list&&(g={name:"rel",type:"listbox",label:"Rel",values:a("rel_list","rel",[{text:"None",value:""}])}),t.settings.link_class_list&&(p={name:"class",type:"listbox",label:"Class",values:i(a("link_class_list","class"))}),t.settings.link_title!==!1&&(y={name:"title",type:"textbox",label:"Title",value:b.title}),d=t.windowManager.open({title:"Insert link",data:b,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:o,onkeyup:o},v,y,r(b.href),h,g,m,p],onSubmit:function(e){function n(e,n){var l=t.selection.getRng();window.setTimeout(function(){t.windowManager.confirm(e,function(e){t.selection.setRng(l),n(e)})},0)}function l(){var e={href:i,target:b.target?b.target:null,rel:b.rel?b.rel:null,"class":b["class"]?b["class"]:null,title:b.title?b.title:null};c?(t.focus(),x&&b.text!=f&&("innerText"in c?c.innerText=b.text:c.textContent=b.text),w.setAttribs(c,e),k.select(c),t.undoManager.add()):x?t.insertContent(w.createHTML("a",e,w.encode(b.text))):t.execCommand("mceInsertLink",!1,e)}var i;return b=tinymce.extend(b,e.data),(i=b.href)?i.indexOf("@")>0&&-1==i.indexOf("//")&&-1==i.indexOf("mailto:")?void n("The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(t){t&&(i="mailto:"+i),l()}):/^\s*www\./i.test(i)?void n("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(t){t&&(i="http://"+i),l()}):void l():void t.execCommand("unlink")}})}t.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Ctrl+K",onclick:e(n),stateSelector:"a[href]"}),t.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink",stateSelector:"a[href]"}),t.addShortcut("Ctrl+K","",e(n)),this.showDialog=n,t.addMenuItem("link",{icon:"link",text:"Insert link",shortcut:"Ctrl+K",onclick:e(n),stateSelector:"a[href]",context:"insert",prependToContext:!0})});
\ No newline at end of file
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/lists/plugin.min.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/lists/plugin.min.js 2014-06-10 09:47:09 UTC (rev 12571)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/lists/plugin.min.js 2014-06-10 09:48:36 UTC (rev 12572)
@@ -1 +1 @@
-tinymce.PluginManager.add("lists",function(e){function t(e){return e&&/^(OL|UL)$/.test(e.nodeName)}function n(e){return e.parentNode.firstChild==e}function r(e){return e.parentNode.lastChild==e}function o(t){return t&&!!e.schema.getTextBlockElements()[t.nodeName]}function i(e){return e&&"SPAN"===e.nodeName&&"bookmark"===e.getAttribute("data-mce-type")}var a=this;e.on("init",function(){function d(e){function t(t){var r,o,i;o=e[t?"startContainer":"endContainer"],i=e[t?"startOffset":"endOffset"],1==o.nodeType&&(r=b.create("span",{"data-mce-type":"bookmark"}),o.hasChildNodes()?(i=Math.min(i,o.childNodes.length-1),t?o.insertBefore(r,o.childNodes[i]):b.insertAfter(r,o.childNodes[i])):o.appendChild(r),o=r,i=0),n[t?"startContainer":"endContainer"]=o,n[t?"startOffset":"endOffset"]=i}var n={};return t(!0),e.collapsed||t(),n}function s(e){function t(t){function n(e){for(var t=e.parentNode.firstChild,n=0;t;){if(t==e)return n;(1!=t.nodeType||"bookmark"!=t.getAttribute("data-mce-type"))&&n++,t=t.nextSibling}return-1}var r,o,i;r=i=e[t?"startContainer":"endContainer"],o=e[t?"startOffset":"endOffset"],r&&(1==r.nodeType&&(o=n(r),r=r.parentNode,b.remove(i)),e[t?"startContainer":"endContainer"]=r,e[t?"startOffset":"endOffset"]=o)}t(!0),t();var n=b.createRng();n.setStart(e.startContainer,e.startOffset),e.endContainer&&n.setEnd(e.endContainer,e.endOffset),k.setRng(n)}function f(t,n){var r,o,i,a=b.createFragment(),d=e.schema.getBlockElements();if(e.settings.forced_root_block&&(n=n||e.settings.forced_root_block),n&&(o=b.create(n),o.tagName===e.settings.forced_root_block&&b.setAttribs(o,e.settings.forced_root_block_attrs),a.appendChild(o)),t)for(;r=t.firstChild;){var s=r.nodeName;i||"SPAN"==s&&"bookmark"==r.getAttribute("data-mce-type")||(i=!0),d[s]?(a.appendChild(r),o=null):n?(o||(o=b.create(n),a.appendChild(o)),o.appendChild(r)):a.appendChild(r)}return e.settings.forced_root_block?i||tinymce.Env.ie&&!(tinymce.Env.ie>10)||o.appendChild(b.create("br",{"data-mce-bogus":"1"})):a.appendChild(b.create("br")),a}function l(){return tinymce.grep(k.getSelectedBlocks(),function(e){return"LI"==e.nodeName})}function c(e,t,n){var r,o,i=b.select('span[data-mce-type="bookmark"]',e);n=n||f(t),r=b.createRng(),r.setStartAfter(t),r.setEndAfter(e),o=r.extractContents(),b.isEmpty(o)||b.insertAfter(o,e),b.insertAfter(n,e),b.isEmpty(t.parentNode)&&(tinymce.each(i,function(e){t.parentNode.parentNode.insertBefore(e,t.parentNode)}),b.remove(t.parentNode)),b.remove(t)}function p(e){var n,r;if(n=e.nextSibling,n&&t(n)&&n.nodeName==e.nodeName){for(;r=n.firstChild;)e.appendChild(r);b.remove(n)}if(n=e.previousSibling,n&&t(n)&&n.nodeName==e.nodeName){for(;r=n.firstChild;)e.insertBefore(r,e.firstChild);b.remove(n)}}function u(e){tinymce.each(tinymce.grep(b.select("ol,ul",e)),function(e){var n,r=e.parentNode;"LI"==r.nodeName&&r.firstChild==e&&(n=r.previousSibling,n&&"LI"==n.nodeName&&(n.appendChild(e),b.isEmpty(r)&&b.remove(r))),t(r)&&(n=r.previousSibling,n&&"LI"==n.nodeName&&n.appendChild(e))})}function m(e){function o(e){b.isEmpty(e)&&b.remove(e)}var i,a=e.parentNode,d=a.parentNode;return n(e)&&r(e)?("LI"==d.nodeName?(b.insertAfter(e,d),o(d),b.remove(a)):t(d)?b.remove(a,!0):(d.insertBefore(f(e),a),b.remove(a)),!0):n(e)?("LI"==d.nodeName?(b.insertAfter(e,d),e.appendChild(a),o(d)):t(d)?d.insertBefore(e,a):(d.insertBefore(f(e),a),b.remove(e)),!0):r(e)?("LI"==d.nodeName?b.insertAfter(e,d):t(d)?b.insertAfter(e,a):(b.insertAfter(f(e),a),b.remove(e)),!0):("LI"==d.nodeName?(a=d,i=f(e,"LI")):i=t(d)?f(e,"LI"):f(e),c(a,e,i),u(a.parentNode),!0)}function h(e){function n(n,r){var o;if(t(n)){for(;o=e.lastChild.firstChild;)r.appendChild(o);b.remove(n)}}var r,o;return r=e.previousSibling,r&&t(r)?(r.appendChild(e),!0):r&&"LI"==r.nodeName&&t(r.lastChild)?(r.lastChild.appendChild(e),n(e.lastChild,r.lastChild),!0):(r=e.nextSibling,r&&t(r)?(r.insertBefore(e,r.firstChild),!0):r&&"LI"==r.nodeName&&t(e.lastChild)?!1:(r=e.previousSibling,r&&"LI"==r.nodeName?(o=b.create(e.parentNode.nodeName),r.appendChild(o),o.appendChild(e),n(e.lastChild,o),!0):!1))}function v(){var t=l();if(t.length){for(var n=d(k.getRng(!0)),r=0;r<t.length&&(h(t[r])||0!==r);r++);return s(n),e.nodeChanged(),!0}}function C(){var t=l();if(t.length){var n,r,o=d(k.getRng(!0)),i=e.getBody();for(n=t.length;n--;)for(var a=t[n].parentNode;a&&a!=i;){for(r=t.length;r--;)if(t[r]===a){t.splice(n,1);break}a=a.parentNode}for(n=0;n<t.length&&(m(t[n])||0!==n);n++);return s(o),e.nodeChanged(),!0}}function g(n){function r(){function t(e){var t,n;for(t=a[e?"startContainer":"endContainer"],n=a[e?"startOffset":"endOffset"],1==t.nodeType&&(t=t.childNodes[Math.min(n,t.childNodes.length-1)]||t);t.parentNode!=d;){if(o(t))return t;if(/^(TD|TH)$/.test(t.parentNode.nodeName))return t;t=t.parentNode}return t}for(var n,r=[],d=e.getBody(),s=t(!0),f=t(),l=[],c=s;c&&(l.push(c),c!=f);c=c.nextSibling);return tinymce.each(l,function(e){if(o(e))return r.push(e),void(n=null);if(b.isBlock(e)||"BR"==e.nodeName)return"BR"==e.nodeName&&b.remove(e),void(n=null);var t=e.nextSibling;return i(e)&&(o(t)||!t&&e.parentNode==d)?void(n=null):(n||(n=b.create("p"),e.parentNode.insertBefore(n,e),r.push(n)),void n.appendChild(e))}),r}var a=k.getRng(!0),f=d(a),l=r();tinymce.each(l,function(e){var r,o;o=e.previousSibling,o&&t(o)&&o.nodeName==n?(r=o,e=b.rename(e,"LI"),o.appendChild(e)):(r=b.create(n),e.parentNode.insertBefore(r,e),r.appendChild(e),e=b.rename(e,"LI")),p(r)}),s(f)}function N(){var n=d(k.getRng(!0)),r=e.getBody();tinymce.each(l(),function(e){var n,o;if(b.isEmpty(e))return void m(e);for(n=e;n&&n!=r;n=n.parentNode)t(n)&&(o=n);c(o,e)}),s(n)}function y(e){var t=b.getParent(k.getStart(),"OL,UL");if(t)if(t.nodeName==e)N(e);else{var n=d(k.getRng(!0));p(b.rename(t,e)),s(n)}else g(e)}var b=e.dom,k=e.selection;a.backspaceDelete=function(e){function n(e,t){var n=e.startContainer,r=e.startOffset;if(3==n.nodeType&&(t?r<n.data.length:r>0))return n;for(var o=new tinymce.dom.TreeWalker(e.startContainer);n=o[t?"next":"prev"]();)if(3==n.nodeType&&n.data.length>0)return n}function r(e,n){var r,o,i=e.parentNode;for(t(n.lastChild)&&(o=n.lastChild),r=n.lastChild,r&&"BR"==r.nodeName&&e.hasChildNodes()&&b.remove(r);r=e.firstChild;)n.appendChild(r);o&&n.appendChild(o),b.remove(e),b.isEmpty(i)&&b.remove(i)}if(k.isCollapsed()){var o=b.getParent(k.getStart(),"LI");if(o){var i=k.getRng(!0),a=b.getParent(n(i,e),"LI");if(a&&a!=o){var f=d(i);return e?r(a,o):r(o,a),s(f),!0}if(!a&&!e&&N(o.parentNode.nodeName))return!0}}},e.addCommand("Indent",function(){return v()?void 0:!0}),e.addCommand("Outdent",function(){return C()?void 0:!0}),e.addCommand("InsertUnorderedList",function(){y("UL")}),e.addCommand("InsertOrderedList",function(){y("OL")}),e.on("keydown",function(t){9==t.keyCode&&e.dom.getParent(e.selection.getStart(),"LI")&&(t.preventDefault(),t.shiftKey?C():v())})}),e.addButton("indent",{icon:"indent",title:"Increase indent",cmd:"Indent",onPostRender:function(){var t=this;e.on("nodechange",function(){for(var r=e.selection.getSelectedBlocks(),o=!1,i=0,a=r.length;!o&&a>i;i++){var d=r[i].nodeName;o="LI"==d&&n(r[i])||"UL"==d||"OL"==d}t.disabled(o)})}}),e.on("keydown",function(e){e.keyCode==tinymce.util.VK.BACKSPACE?a.backspaceDelete()&&e.preventDefault():e.keyCode==tinymce.util.VK.DELETE&&a.backspaceDelete(!0)&&e.preventDefault()})});
\ No newline at end of file
+tinymce.PluginManager.add("lists",function(e){function t(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)}function n(e){return e.parentNode.firstChild==e}function r(e){return e.parentNode.lastChild==e}function a(t){return t&&!!e.schema.getTextBlockElements()[t.nodeName]}var o=this;e.on("init",function(){function i(e){function t(t){var r,a,o;a=e[t?"startContainer":"endContainer"],o=e[t?"startOffset":"endOffset"],1==a.nodeType&&(r=y.create("span",{"data-mce-type":"bookmark"}),a.hasChildNodes()?(o=Math.min(o,a.childNodes.length-1),t?a.insertBefore(r,a.childNodes[o]):y.insertAfter(r,a.childNodes[o])):a.appendChild(r),a=r,o=0),n[t?"startContainer":"endContainer"]=a,n[t?"startOffset":"endOffset"]=o}var n={};return t(!0),e.collapsed||t(),n}function d(e){function t(t){function n(e){for(var t=e.parentNode.firstChild,n=0;t;){if(t==e)return n;(1!=t.nodeType||"bookmark"!=t.getAttribute("data-mce-type"))&&n++,t=t.nextSibling}return-1}var r,a,o;r=o=e[t?"startContainer":"endContainer"],a=e[t?"startOffset":"endOffset"],r&&(1==r.nodeType&&(a=n(r),r=r.parentNode,y.remove(o)),e[t?"startContainer":"endContainer"]=r,e[t?"startOffset":"endOffset"]=a)}t(!0),t();var n=y.createRng();n.setStart(e.startContainer,e.startOffset),e.endContainer&&n.setEnd(e.endContainer,e.endOffset),k.setRng(n)}function s(t,n){var r,a,o,i=y.createFragment(),d=e.schema.getBlockElements();if(e.settings.forced_root_block&&(n=n||e.settings.forced_root_block),n&&(a=y.create(n),a.tagName===e.settings.forced_root_block&&y.setAttribs(a,e.settings.forced_root_block_attrs),i.appendChild(a)),t)for(;r=t.firstChild;){var s=r.nodeName;o||"SPAN"==s&&"bookmark"==r.getAttribute("data-mce-type")||(o=!0),d[s]?(i.appendChild(r),a=null):n?(a||(a=y.create(n),i.appendChild(a)),a.appendChild(r)):i.appendChild(r)}return e.settings.forced_root_block?o||tinymce.Env.ie&&!(tinymce.Env.ie>10)||a.appendChild(y.create("br",{"data-mce-bogus":"1"})):i.appendChild(y.create("br")),i}function f(){return tinymce.grep(k.getSelectedBlocks(),function(e){return/^(LI|DT|DD)$/.test(e.nodeName)})}function l(e,t,n){var r,a,o=y.select('span[data-mce-type="bookmark"]',e);n=n||s(t),r=y.createRng(),r.setStartAfter(t),r.setEndAfter(e),a=r.extractContents(),y.isEmpty(a)||y.insertAfter(a,e),y.insertAfter(n,e),y.isEmpty(t.parentNode)&&(tinymce.each(o,function(e){t.parentNode.parentNode.insertBefore(e,t.parentNode)}),y.remove(t.parentNode)),y.remove(t)}function c(e){var n,r;if(n=e.nextSibling,n&&t(n)&&n.nodeName==e.nodeName){for(;r=n.firstChild;)e.appendChild(r);y.remove(n)}if(n=e.previousSibling,n&&t(n)&&n.nodeName==e.nodeName){for(;r=n.firstChild;)e.insertBefore(r,e.firstChild);y.remove(n)}}function p(e){tinymce.each(tinymce.grep(y.select("ol,ul",e)),function(e){var n,r=e.parentNode;"LI"==r.nodeName&&r.firstChild==e&&(n=r.previousSibling,n&&"LI"==n.nodeName&&(n.appendChild(e),y.isEmpty(r)&&y.remove(r))),t(r)&&(n=r.previousSibling,n&&"LI"==n.nodeName&&n.appendChild(e))})}function m(e){function a(e){y.isEmpty(e)&&y.remove(e)}var o,i=e.parentNode,d=i.parentNode;return"DD"==e.nodeName?(y.rename(e,"DT"),!0):n(e)&&r(e)?("LI"==d.nodeName?(y.insertAfter(e,d),a(d),y.remove(i)):t(d)?y.remove(i,!0):(d.insertBefore(s(e),i),y.remove(i)),!0):n(e)?("LI"==d.nodeName?(y.insertAfter(e,d),e.appendChild(i),a(d)):t(d)?d.insertBefore(e,i):(d.insertBefore(s(e),i),y.remove(e)),!0):r(e)?("LI"==d.nodeName?y.insertAfter(e,d):t(d)?y.insertAfter(e,i):(y.insertAfter(s(e),i),y.remove(e)),!0):("LI"==d.nodeName?(i=d,o=s(e,"LI")):o=t(d)?s(e,"LI"):s(e),l(i,e,o),p(i.parentNode),!0)}function u(e){function n(n,r){var a;if(t(n)){for(;a=e.lastChild.firstChild;)r.appendChild(a);y.remove(n)}}var r,a;return"DT"==e.nodeName?(y.rename(e,"DD"),!0):(r=e.previousSibling,r&&t(r)?(r.appendChild(e),!0):r&&"LI"==r.nodeName&&t(r.lastChild)?(r.lastChild.appendChild(e),n(e.lastChild,r.lastChild),!0):(r=e.nextSibling,r&&t(r)?(r.insertBefore(e,r.firstChild),!0):r&&"LI"==r.nodeName&&t(e.lastChild)?!1:(r=e.previousSibling,r&&"LI"==r.nodeName?(a=y.create(e.parentNode.nodeName),r.appendChild(a),a.appendChild(e),n(e.lastChild,a),!0):!1)))}function h(){var t=f();if(t.length){for(var n=i(k.getRng(!0)),r=0;r<t.length&&(u(t[r])||0!==r);r++);return d(n),e.nodeChanged(),!0}}function v(){var t=f();if(t.length){var n,r,a=i(k.getRng(!0)),o=e.getBody();for(n=t.length;n--;)for(var s=t[n].parentNode;s&&s!=o;){for(r=t.length;r--;)if(t[r]===s){t.splice(n,1);break}s=s.parentNode}for(n=0;n<t.length&&(m(t[n])||0!==n);n++);return d(a),e.nodeChanged(),!0}}function C(n){function r(){function t(e){var t,n;for(t=o[e?"startContainer":"endContainer"],n=o[e?"startOffset":"endOffset"],1==t.nodeType&&(t=t.childNodes[Math.min(n,t.childNodes.length-1)]||t);t.parentNode!=i;){if(a(t))return t;if(/^(TD|TH)$/.test(t.parentNode.nodeName))return t;t=t.parentNode}return t}for(var n,r=[],i=e.getBody(),d=t(!0),s=t(),f=[],l=d;l&&(f.push(l),l!=s);l=l.nextSibling);return tinymce.each(f,function(e){if(a(e))return r.push(e),void(n=null);if(y.isBlock(e)||"BR"==e.nodeName)return"BR"==e.nodeName&&y.remove(e),void(n=null);var t=e.nextSibling;return tinymce.dom.BookmarkManager.isBookmarkNode(e)&&(a(t)||!t&&e.parentNode==i)?void(n=null):(n||(n=y.create("p"),e.parentNode.insertBefore(n,e),r.push(n)),void n.appendChild(e))}),r}var o=k.getRng(!0),s=i(o),f="LI";n=n.toUpperCase(),"DL"==n&&(f="DT"),tinymce.each(r(),function(e){var r,a;a=e.previousSibling,a&&t(a)&&a.nodeName==n?(r=a,e=y.rename(e,f),a.appendChild(e)):(r=y.create(n),e.parentNode.insertBefore(r,e),r.appendChild(e),e=y.rename(e,f)),c(r)}),d(s)}function g(){var n=i(k.getRng(!0)),r=e.getBody();tinymce.each(f(),function(e){var n,a;if(y.isEmpty(e))return void m(e);for(n=e;n&&n!=r;n=n.parentNode)t(n)&&(a=n);l(a,e)}),d(n)}function N(e){var t=y.getParent(k.getStart(),"OL,UL,DL");if(t)if(t.nodeName==e)g(e);else{var n=i(k.getRng(!0));c(y.rename(t,e)),d(n)}else C(e)}function L(t){return function(){var n=y.getParent(e.selection.getStart(),"UL,OL,DL");return n&&n.nodeName==t}}var y=e.dom,k=e.selection;o.backspaceDelete=function(e){function n(e,t){var n=e.startContainer,r=e.startOffset;if(3==n.nodeType&&(t?r<n.data.length:r>0))return n;for(var a=new tinymce.dom.TreeWalker(e.startContainer);n=a[t?"next":"prev"]();)if(3==n.nodeType&&n.data.length>0)return n}function r(e,n){var r,a,o=e.parentNode;for(t(n.lastChild)&&(a=n.lastChild),r=n.lastChild,r&&"BR"==r.nodeName&&e.hasChildNodes()&&y.remove(r);r=e.firstChild;)n.appendChild(r);a&&n.appendChild(a),y.remove(e),y.isEmpty(o)&&y.remove(o)}if(k.isCollapsed()){var a=y.getParent(k.getStart(),"LI");if(a){var o=k.getRng(!0),s=y.getParent(n(o,e),"LI");if(s&&s!=a){var f=i(o);return e?r(s,a):r(a,s),d(f),!0}if(!s&&!e&&g(a.parentNode.nodeName))return!0}}},e.addCommand("Indent",function(){return h()?void 0:!0}),e.addCommand("Outdent",function(){return v()?void 0:!0}),e.addCommand("InsertUnorderedList",function(){N("UL")}),e.addCommand("InsertOrderedList",function(){N("OL")}),e.addCommand("InsertDefinitionList",function(){N("DL")}),e.addQueryStateHandler("InsertUnorderedList",L("UL")),e.addQueryStateHandler("InsertOrderedList",L("OL")),e.addQueryStateHandler("InsertDefinitionList",L("DL")),e.on("keydown",function(t){9==t.keyCode&&e.dom.getParent(e.selection.getStart(),"LI,DT,DD")&&(t.preventDefault(),t.shiftKey?v():h())})}),e.addButton("indent",{icon:"indent",title:"Increase indent",cmd:"Indent",onPostRender:function(){var t=this;e.on("nodechange",function(){for(var r=e.selection.getSelectedBlocks(),a=!1,o=0,i=r.length;!a&&i>o;o++){var d=r[o].nodeName;a="LI"==d&&n(r[o])||"UL"==d||"OL"==d||"DD"==d}t.disabled(a)})}}),e.on("keydown",function(e){e.keyCode==tinymce.util.VK.BACKSPACE?o.backspaceDelete()&&e.preventDefault():e.keyCode==tinymce.util.VK.DELETE&&o.backspaceDelete(!0)&&e.preventDefault()})});
\ No newline at end of file
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/paste/plugin.min.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/paste/plugin.min.js 2014-06-10 09:47:09 UTC (rev 12571)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/paste/plugin.min.js 2014-06-10 09:48:36 UTC (rev 12572)
@@ -1 +1 @@
-!function(e,t){"use strict";function n(e,t){for(var n,i=[],r=0;r<e.length;++r){if(n=s[e[r]]||o(e[r]),!n)throw"module definition dependecy not found: "+e[r];i.push(n)}t.apply(null,i)}function i(e,i,r){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(i===t)throw"invalid module definition, dependencies must be specified";if(r===t)throw"invalid module definition, definition function must be specified";n(i,function(){s[e]=r.apply(null,arguments)})}function r(e){return!!s[e]}function o(t){for(var n=e,i=t.split(/[.\/]/),r=0;r<i.length;++r){if(!n[i[r]])return;n=n[i[r]]}return n}function a(n){for(var i=0;i<n.length;i++){for(var r=e,o=n[i],a=o.split(/[.\/]/),l=0;l<a.length-1;++l)r[a[l]]===t&&(r[a[l]]={}),r=r[a[l]];r[a[a.length-1]]=s[o]}}var s={},l="tinymce/pasteplugin/Utils",c="tinymce/util/Tools",d="tinymce/html/DomParser",u="tinymce/html/Schema",f="tinymce/pasteplugin/Clipboard",m="tinymce/Env",p="tinymce/util/VK",g="tinymce/pasteplugin/WordFilter",h="tinymce/html/Serializer",v="tinymce/html/Node",b="tinymce/pasteplugin/Quirks",y="tinymce/pasteplugin/Plugin",x="tinymce/PluginManager";i(l,[c,d,u],function(e,t,n){function i(t,n){return e.each(n,function(e){t=e.constructor==RegExp?t.replace(e,""):t.replace(e[0],e[1])}),t}function r(i){function r(e){var t=e.name,n=e;if("br"===t)return void(s+="\n");if(l[t]&&(s+=" "),c[t])return void(s+=" ");if(3==e.type&&(s+=e.value),!e.shortEnded&&(e=e.firstChild))do r(e);while(e=e.next);d[t]&&n.next&&(s+="\n","p"==t&&(s+="\n"))}var o=new n,a=new t({},o),s="",l=o.getShortEndedElements(),c=e.makeMap("script noscript style textarea video audio iframe object"," "),d=o.getBlockElements();return r(a.parse(i)),s}return{filter:i,innerText:r}}),i(f,[m,p,l],function(e,t,n){return function(i){function r(e){var t,n=i.dom;if(t=i.fire("BeforePastePreProcess",{content:e}),t=i.fire("PastePreProcess",t),e=t.content,!t.isDefaultPrevented()){if(i.hasEventListeners("PastePostProcess")&&!t.isDefaultPrevented()){var r=n.add(i.getBody(),"div",{style:"display:none"},e);t=i.fire("PastePostProcess",{node:r}),n.remove(r),e=t.node.innerHTML}t.isDefaultPrevented()||i.insertContent(e)}}function o(e){e=i.dom.encode(e).replace(/\r\n/g,"\n");var t=i.dom.getParent(i.selection.getStart(),i.dom.isBlock),o=i.settings.forced_root_block,a;o&&(a=i.dom.createHTML(o,i.settings.forced_root_block_attrs),a=a.substr(0,a.length-3)+">"),t&&/^(PRE|DIV)$/.test(t.nodeName)||!o?e=n.filter(e,[[/\n/g,"<br>"]]):(e=n.filter(e,[[/\n\n/g,"</p>"+a],[/^(.*<\/p>)(<p>)$/,a+"$1"],[/\n/g,"<br />"]]),-1!=e.indexOf("<p>")&&(e=a+e)),r(e)}function a(){var t=i.dom,n=i.getBody(),r=i.dom.getViewPort(i.getWin()),o=r.y,a=20,s;if(v=i.selection.getRng(),i.inline&&(s=i.selection.getScrollContainer(),s&&s.scrollTop>0&&(o=s.scrollTop)),v.getClientRects){var l=v.getClientRects();if(l.length)a=o+(l[0].top-t.getPos(n).y);else{a=o;var c=v.startContainer;c&&(3==c.nodeType&&c.parentNode!=n&&(c=c.parentNode),1==c.nodeType&&(a=t.getPos(c,s||n).y))}}h=t.add(i.getBody(),"div",{id:"mcepastebin",contentEditable:!0,"data-mce-bogus":"1",style:"position: absolute; top: "+a+"px;width: 10px; height: 10px; overflow: hidden; opacity: 0"},y),(e.ie||e.gecko)&&t.setStyle(h,"left","rtl"==t.getStyle(n,"direction",!0)?65535:-65535),t.bind(h,"beforedeactivate focusin focusout",function(e){e.stopPropagation()}),h.focus(),i.selection.select(h,!0)}function s(){if(h){for(var e;e=i.dom.get("mcepastebin");)i.dom.remove(e),i.dom.unbind(e);v&&i.selection.setRng(v)}x=!1,h=v=null}function l(){var e=y,t,n;for(t=i.dom.select("div[id=mcepastebin]"),n=t.length;n--;){var r=t[n].innerHTML;e==y&&(e=""),r.length>e.length&&(e=r)}return e}function c(e){var t={};if(e&&e.types){var n=e.getData("Text");n&&n.length>0&&(t["text/plain"]=n);for(var i=0;i<e.types.length;i++){var r=e.types[i];t[r]=e.getData(r)}}return t}function d(e){return c(e.clipboardData||i.getDoc().dataTransfer)}function u(e,t){function n(e){if("image/png"==o[a].type){var t=new FileReader;return t.onload=function(){r('<img src="'+t.result+'">')},t.readAsDataURL(e.getAsFile()),!0}}if(!(!i.settings.paste_data_images||"text/html"in t||"text/plain"in t)&&e.clipboardData){var o=e.clipboardData.items;if(o)for(var a=0;a<o.length;a++)if(n(o[a]))return!0}}function f(e){var t=i.getDoc(),n;if(t.caretPositionFromPoint){var r=t.caretPositionFromPoint(e.clientX,e.clientY);n=t.createRange(),n.setStart(r.offsetNode,r.offset),n.collapse(!0)}else t.caretRangeFromPoint&&(n=t.caretRangeFromPoint(e.clientX,e.clientY));return n}function m(e,t){return t in e&&e[t].length>0}function p(){i.on("keydown",function(n){if(!n.isDefaultPrevented()&&(t.metaKeyPressed(n)&&86==n.keyCode||n.shiftKey&&45==n.keyCode)){if(x=n.shiftKey&&86==n.keyCode,n.stopImmediatePropagation(),b=(new Date).getTime(),e.ie&&x)return n.preventDefault(),void i.fire("paste",{ieFake:!0});s(),a()}}),i.on("paste",function(t){var c=d(t),f=(new Date).getTime()-b<1e3,p="text"==g.pasteFormat||x;return t.isDefaultPrevented()?void s():u(t,c)?void s():(f||t.preventDefault(),!e.ie||f&&!t.ieFake||(a(),i.dom.bind(h,"paste",function(e){e.stopPropagation()}),i.getDoc().execCommand("Paste",!1,null),c["text/html"]=l()),void setTimeout(function(){var e=l();return h&&h.firstChild&&"mcepastebin"===h.firstChild.id&&(p=!0),s(),!p&&f&&e&&e!=y&&(c["text/html"]=e),e!=y&&f||(e=c["text/html"]||c["text/plain"]||y,e!=y)?(!m(c,"text/html")&&m(c,"text/plain")&&(p=!0),void(p?o(c["text/plain"]||n.innerText(e)):r(e))):void(f||i.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."))},0))}),i.on("dragstart",function(e){if(e.dataTransfer.types)try{e.dataTransfer.setData("mce-internal",i.selection.getContent())}catch(t){}}),i.on("drop",function(e){var t=f(e);if(t&&!e.isDefaultPrevented()){var n=c(e.dataTransfer),a=n["mce-internal"]||n["text/html"]||n["text/plain"];a&&(e.preventDefault(),i.undoManager.transact(function(){n["mce-internal"]&&i.execCommand("Delete"),i.selection.setRng(t),n["text/html"]?r(a):o(a)}))}})}var g=this,h,v,b=0,y="%MCEPASTEBIN%",x;g.pasteHtml=r,g.pasteText=o,i.on("preInit",function(){p(),i.parser.addNodeFilter("img",function(t){if(!i.settings.paste_data_images)for(var n=t.length;n--;){var r=t[n].attributes.map.src;r&&0===r.indexOf("data:image")&&(t[n].attr("data-mce-object")||r===e.transparentSrc||t[n].remove())}})}),i.on("PreProcess",function(){i.dom.remove(i.dom.get("mcepastebin"))})}}),i(g,[c,d,u,h,v,l],function(e,t,n,i,r,o){function a(e){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(e)||/class="OutlineElement/.test(e)||/id="?docs\-internal\-guid\-/.test(e)}function s(s){var l=s.settings;s.on("BeforePastePreProcess",function(c){function d(e){function t(e,t,a,s){var l=e._listLevel||o;l!=o&&(o>l?n&&(n=n.parent.parent):(i=n,n=null)),n&&n.name==a?n.append(e):(i=i||n,n=new r(a,1),s>1&&n.attr("start",""+s),e.wrap(n)),e.name="li",t.value="";var c=t.next;c&&3==c.type&&(c.value=c.value.replace(/^\u00a0+/,"")),l>o&&i&&i.lastChild.append(n),o=l}for(var n,i,o=1,a=e.getAll("p"),s=0;s<a.length;s++)if(e=a[s],"p"==e.name&&e.firstChild){for(var l="",c=e.firstChild;c&&!(l=c.value);)c=c.firstChild;if(/^\s*[\u2022\u00b7\u00a7\u00d8\u25CF]\s*$/.test(l)){t(e,c,"ul");continue}if(/^\s*\w+\.$/.test(l)){var d=/([0-9])\./.exec(l),u=1;d&&(u=parseInt(d[1],10)),t(e,c,"ol",u);continue}n=null}}function u(t,n){var i={},o=s.dom.parseStyle(n);if("p"===t.name){var a=/mso-list:\w+ \w+([0-9]+)/.exec(n);a&&(t._listLevel=parseInt(a[1],10))}return e.each(o,function(e,n){switch(n){case"horiz-align":n="text-align";break;case"vert-align":n="vertical-align";break;case"font-color":case"mso-foreground":n="color";break;case"mso-background":case"mso-highlight":n="background";break;case"font-weight":case"font-style":return void("normal"!=e&&(i[n]=e));case"mso-element":if(/^(comment|comment-list)$/i.test(e))return void t.remove()}return 0===n.indexOf("mso-comment")?void t.remove():void(0!==n.indexOf("mso-")&&("all"==m||p&&p[n])&&(i[n]=e))}),/(bold)/i.test(i["font-weight"])&&(delete i["font-weight"],t.wrap(new r("b",1))),/(italic)/i.test(i["font-style"])&&(delete i["font-style"],t.wrap(new r("i",1))),i=s.dom.serializeStyle(i,t.name),i?i:null}var f=c.content,m,p;if(m=l.paste_retain_style_properties,m&&(p=e.makeMap(m.split(/[, ]/))),l.paste_enable_default_filters!==!1&&a(c.content)){c.wordContent=!0,f=o.filter(f,[/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\xa0"],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(e,t){return t.length>0?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join("\xa0"):""}]]);var g=l.paste_word_valid_elements;g||(g="-strong/b,-em/i,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-table[width],-tr,-td[colspan|rowspan|width],-th,-thead,-tfoot,-tbody,-a[href|name],sub,sup,strike,br,del");var h=new n({valid_elements:g,valid_children:"-li[p]"});e.each(h.elements,function(e){e.attributes["class"]||(e.attributes["class"]={},e.attributesOrder.push("class")),e.attributes.style||(e.attributes.style={},e.attributesOrder.push("style"))});var v=new t({},h);v.addAttributeFilter("style",function(e){for(var t=e.length,n;t--;)n=e[t],n.attr("style",u(n,n.attr("style"))),"span"==n.name&&n.parent&&!n.attributes.length&&n.unwrap()}),v.addAttributeFilter("class",function(e){for(var t=e.length,n,i;t--;)n=e[t],i=n.attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(i)&&n.remove(),n.attr("class",null)}),v.addNodeFilter("del",function(e){for(var t=e.length;t--;)e[t].remove()}),v.addNodeFilter("a",function(e){for(var t=e.length,n,i,r;t--;)if(n=e[t],i=n.attr("href"),r=n.attr("name"),i&&-1!=i.indexOf("#_msocom_"))n.remove();else if(i&&0===i.indexOf("file://")&&(i=i.split("#")[1],i&&(i="#"+i)),i||r){if(r&&!/^_?(?:toc|edn|ftn)/i.test(r)){n.unwrap();continue}n.attr({href:i,name:r})}else n.unwrap()});var b=v.parse(f);d(b),c.content=new i({},h).serialize(b)}})}return s.isWordContent=a,s}),i(b,[m,c,g,l],function(e,t,n,i){return function(r){function o(e){r.on("BeforePastePreProcess",function(t){t.content=e(t.content)})}function a(e){return e=i.filter(e,[/^[\s\S]*<body[^>]*>\s*<!--StartFragment-->|<!--EndFragment-->\s*<\/body[^>]*>[\s\S]*$/g,/<!--StartFragment-->|<!--EndFragment-->/g,[/<span class="Apple-converted-space">\u00a0<\/span>/g,"\xa0"],/<br>$/i])}function s(e){if(!n.isWordContent(e))return e;var o=[];t.each(r.schema.getBlockElements(),function(e,t){o.push(t)});var a=new RegExp("(?:<br> [\\s\\r\\n]+|<br>)*(<\\/?("+o.join("|")+")[^>]*>)(?:<br> [\\s\\r\\n]+|<br>)*","g");return e=i.filter(e,[[a,"$1"]]),e=i.filter(e,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function l(e){if(n.isWordContent(e))return e;var t=r.settings.paste_webkit_styles;if(r.settings.paste_remove_styles_if_webkit===!1||"all"==t)return e;if(t&&(t=t.split(/[, ]/)),t){var i=r.dom,o=r.selection.getNode();e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(e,n,r,a){var s=i.parseStyle(r,"span"),l={};if("none"===t)return n+a;for(var c=0;c<t.length;c++){var d=s[t[c]],u=i.getStyle(o,t[c],!0);/color/.test(t[c])&&(d=i.toHex(d),u=i.toHex(u)),u!=d&&(l[t[c]]=d)}return l=i.serializeStyle(l,"span"),l?n+' style="'+l+'"'+a:""})}else e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return e=e.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(e,t,n,i){return t+' style="'+n+'"'+i})}e.webkit&&(o(l),o(a)),e.ie&&o(s)}}),i(y,[x,f,g,b],function(e,t,n,i){var r;e.add("paste",function(e){function o(){"text"==s.pasteFormat?(this.active(!1),s.pasteFormat="html"):(s.pasteFormat="text",this.active(!0),r||(e.windowManager.alert("Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off."),r=!0))}var a=this,s,l=e.settings;a.clipboard=s=new t(e),a.quirks=new i(e),a.wordFilter=new n(e),e.settings.paste_as_text&&(a.clipboard.pasteFormat="text"),l.paste_preprocess&&e.on("PastePreProcess",function(e){l.paste_preprocess.call(a,a,e)}),l.paste_postprocess&&e.on("PastePostProcess",function(e){l.paste_postprocess.call(a,a,e)}),e.addCommand("mceInsertClipboardContent",function(e,t){t.content&&a.clipboard.pasteHtml(t.content),t.text&&a.clipboard.pasteText(t.text)}),e.paste_block_drop&&e.on("dragend dragover draggesture dragdrop drop drag",function(e){e.preventDefault(),e.stopPropagation()}),e.settings.paste_data_images||e.on("drop",function(e){var t=e.dataTransfer;t&&t.files&&t.files.length>0&&e.preventDefault()}),e.addButton("pastetext",{icon:"pastetext",tooltip:"Paste as text",onclick:o,active:"text"==a.clipboard.pasteFormat}),e.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:s.pasteFormat,onclick:o})})}),a([l,f,g,b,y])}(this);
\ No newline at end of file
+!function(e,t){"use strict";function n(e,t){for(var n,r=[],i=0;i<e.length;++i){if(n=s[e[i]]||o(e[i]),!n)throw"module definition dependecy not found: "+e[i];r.push(n)}t.apply(null,r)}function r(e,r,i){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(r===t)throw"invalid module definition, dependencies must be specified";if(i===t)throw"invalid module definition, definition function must be specified";n(r,function(){s[e]=i.apply(null,arguments)})}function i(e){return!!s[e]}function o(t){for(var n=e,r=t.split(/[.\/]/),i=0;i<r.length;++i){if(!n[r[i]])return;n=n[r[i]]}return n}function a(n){for(var r=0;r<n.length;r++){for(var i=e,o=n[r],a=o.split(/[.\/]/),l=0;l<a.length-1;++l)i[a[l]]===t&&(i[a[l]]={}),i=i[a[l]];i[a[a.length-1]]=s[o]}}var s={},l="tinymce/pasteplugin/Utils",c="tinymce/util/Tools",d="tinymce/html/DomParser",u="tinymce/html/Schema",f="tinymce/pasteplugin/Clipboard",p="tinymce/Env",m="tinymce/util/VK",h="tinymce/pasteplugin/WordFilter",g="tinymce/html/Serializer",v="tinymce/html/Node",y="tinymce/pasteplugin/Quirks",b="tinymce/pasteplugin/Plugin",C="tinymce/PluginManager";r(l,[c,d,u],function(e,t,n){function r(t,n){return e.each(n,function(e){t=e.constructor==RegExp?t.replace(e,""):t.replace(e[0],e[1])}),t}function i(r){function i(e){var t=e.name,n=e;if("br"===t)return void(s+="\n");if(l[t]&&(s+=" "),c[t])return void(s+=" ");if(3==e.type&&(s+=e.value),!e.shortEnded&&(e=e.firstChild))do i(e);while(e=e.next);d[t]&&n.next&&(s+="\n","p"==t&&(s+="\n"))}var o=new n,a=new t({},o),s="",l=o.getShortEndedElements(),c=e.makeMap("script noscript style textarea video audio iframe object"," "),d=o.getBlockElements();return i(a.parse(r)),s}function o(e){return e=r(e,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/g,/<!--StartFragment-->|<!--EndFragment-->/g,[/<span class="Apple-converted-space">\u00a0<\/span>/g,"\xa0"],/<br>$/i])}return{filter:r,innerText:i,trimHtml:o}}),r(f,[p,m,l],function(e,t,n){return function(r){function i(e){var t,n=r.dom;if(t=r.fire("BeforePastePreProcess",{content:e}),t=r.fire("PastePreProcess",t),e=t.content,!t.isDefaultPrevented()){if(r.hasEventListeners("PastePostProcess")&&!t.isDefaultPrevented()){var i=n.add(r.getBody(),"div",{style:"display:none"},e);t=r.fire("PastePostProcess",{node:i}),n.remove(i),e=t.node.innerHTML}t.isDefaultPrevented()||r.insertContent(e,{merge:r.settings.paste_merge_formats!==!1})}}function o(e){e=r.dom.encode(e).replace(/\r\n/g,"\n");var t=r.dom.getParent(r.selection.getStart(),r.dom.isBlock),o=r.settings.forced_root_block,a;o&&(a=r.dom.createHTML(o,r.settings.forced_root_block_attrs),a=a.substr(0,a.length-3)+">"),t&&/^(PRE|DIV)$/.test(t.nodeName)||!o?e=n.filter(e,[[/\n/g,"<br>"]]):(e=n.filter(e,[[/\n\n/g,"</p>"+a],[/^(.*<\/p>)(<p>)$/,a+"$1"],[/\n/g,"<br />"]]),-1!=e.indexOf("<p>")&&(e=a+e)),i(e)}function a(){var t=r.dom,n=r.getBody(),i=r.dom.getViewPort(r.getWin()),o=i.y,a=20,s;if(b=r.selection.getRng(),r.inline&&(s=r.selection.getScrollContainer(),s&&s.scrollTop>0&&(o=s.scrollTop)),b.getClientRects){var l=b.getClientRects();if(l.length)a=o+(l[0].top-t.getPos(n).y);else{a=o;var c=b.startContainer;c&&(3==c.nodeType&&c.parentNode!=n&&(c=c.parentNode),1==c.nodeType&&(a=t.getPos(c,s||n).y))}}y=t.add(r.getBody(),"div",{id:"mcepastebin",contentEditable:!0,"data-mce-bogus":"1",style:"position: absolute; top: "+a+"px;width: 10px; height: 10px; overflow: hidden; opacity: 0"},x),(e.ie||e.gecko)&&t.setStyle(y,"left","rtl"==t.getStyle(n,"direction",!0)?65535:-65535),t.bind(y,"beforedeactivate focusin focusout",function(e){e.stopPropagation()}),y.focus(),r.selection.select(y,!0)}function s(){if(y){for(var e;e=r.dom.get("mcepastebin");)r.dom.remove(e),r.dom.unbind(e);b&&r.selection.setRng(b)}y=b=null}function l(){var e=x,t,n;for(t=r.dom.select("div[id=mcepastebin]"),n=t.length;n--;){var i=t[n].innerHTML;e==x&&(e=""),i.length>e.length&&(e=i)}return e}function c(e){var t={};if(e&&e.types){var n=e.getData("Text");n&&n.length>0&&(t["text/plain"]=n);for(var r=0;r<e.types.length;r++){var i=e.types[r];t[i]=e.getData(i)}}return t}function d(e){return c(e.clipboardData||r.getDoc().dataTransfer)}function u(e,t){function n(e){if("image/png"==o[a].type){var t=new FileReader;return t.onload=function(){i('<img src="'+t.result+'">')},t.readAsDataURL(e.getAsFile()),!0}}if(!(!r.settings.paste_data_images||"text/html"in t||"text/plain"in t)&&e.clipboardData){var o=e.clipboardData.items;if(o)for(var a=0;a<o.length;a++)if(n(o[a]))return!0}}function f(e){var t=e.clipboardData;return-1!=navigator.userAgent.indexOf("Android")&&t&&t.items&&0===t.items.length}function p(e){var t=r.getDoc(),n;if(t.caretPositionFromPoint){var i=t.caretPositionFromPoint(e.clientX,e.clientY);n=t.createRange(),n.setStart(i.offsetNode,i.offset),n.collapse(!0)}else t.caretRangeFromPoint&&(n=t.caretRangeFromPoint(e.clientX,e.clientY));return n}function m(e,t){return t in e&&e[t].length>0}function h(e){return t.metaKeyPressed(e)&&86==e.keyCode||e.shiftKey&&45==e.keyCode}function g(){r.on("keydown",function(t){if(h(t)&&!t.isDefaultPrevented()){if(w=t.shiftKey&&86==t.keyCode,w&&e.webkit&&-1!=navigator.userAgent.indexOf("Version/"))return;if(t.stopImmediatePropagation(),C=(new Date).getTime(),e.ie&&w)return t.preventDefault(),void r.fire("paste",{ieFake:!0});s(),a()}}),r.on("keyup",function(e){h(e)&&!e.isDefaultPrevented()&&s()}),r.on("paste",function(t){var c=d(t),p=(new Date).getTime()-C<1e3,h="text"==v.pasteFormat||w;return w=!1,t.isDefaultPrevented()||f(t)?void s():u(t,c)?void s():(p||t.preventDefault(),!e.ie||p&&!t.ieFake||(a(),r.dom.bind(y,"paste",function(e){e.stopPropagation()}),r.getDoc().execCommand("Paste",!1,null),c["text/html"]=l()),void setTimeout(function(){var e;return m(c,"text/html")?e=c["text/html"]:(e=l(),e==x&&(h=!0)),e=n.trimHtml(l()),y&&y.firstChild&&"mcepastebin"===y.firstChild.id&&(h=!0),s(),h&&(e=m(c,"text/plain")&&-1==e.indexOf("</p>")?c["text/plain"]:n.innerText(e)),e==x?void(p||r.windo...
[truncated message content] |
|
From: <be...@us...> - 2014-06-10 09:47:25
|
Revision: 12571
http://sourceforge.net/p/xoops/svn/12571
Author: beckmi
Date: 2014-06-10 09:47:09 +0000 (Tue, 10 Jun 2014)
Log Message:
-----------
Adding couple of icons
Added Paths:
-----------
XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/16/link_break.png
XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/32/link_break.png
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/16/link_break.png
===================================================================
(Binary files differ)
Index: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/16/link_break.png
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/16/link_break.png 2014-06-09 19:08:59 UTC (rev 12570)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/16/link_break.png 2014-06-10 09:47:09 UTC (rev 12571)
Property changes on: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/16/link_break.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/32/link_break.png
===================================================================
(Binary files differ)
Index: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/32/link_break.png
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/32/link_break.png 2014-06-09 19:08:59 UTC (rev 12570)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/32/link_break.png 2014-06-10 09:47:09 UTC (rev 12571)
Property changes on: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/32/link_break.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
|
|
From: <txm...@us...> - 2014-06-09 19:09:04
|
Revision: 12570
http://sourceforge.net/p/xoops/svn/12570
Author: txmodxoops
Date: 2014-06-09 19:08:59 +0000 (Mon, 09 Jun 2014)
Log Message:
-----------
- Fixed bugs
- Work in progress
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/formelements.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_files.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_files.php 2014-06-09 00:03:18 UTC (rev 12569)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_files.php 2014-06-09 19:08:59 UTC (rev 12570)
@@ -113,41 +113,32 @@
}
/*
* @public function getBlocksEdit
- * @param null
+ * @param string $module_name
+ * @param string $table_name
+ * @param string $fpif
+ * @param string $fpmf
+ * @param string $language
*/
- public function getBlocksEdit($module_name, $table_name, $table_category, $fpif, $fpmf, $language) {
+ public function getBlocksEdit($module_name, $table_name, $fpif, $fpmf, $language) {
$mod_name_lowercase = strtolower($module_name);
$ret = <<<EOT
function b_{$mod_name_lowercase}_{$table_name}_edit(\$options)
-{\n
-EOT;
- if ( $table_category == 1 ) {
- $ret .=<<<EOT
- include_once XOOPS_ROOT_PATH.'/modules/{$module_name}/class/category.php';
-
- \$categoryHandler =& xoops_getModuleHandler('category', "{$module_name}");
- \$criteria = new CriteriaCompo();
- \$criteria->setSort("{$fpmf}");
- \$criteria->setOrder("ASC");
- \${$table_name}_arr = \$categoryHandler->getall(\$criteria);\n
-EOT;
- }
- $ret .= <<<EOT
- include_once XOOPS_ROOT_PATH.'/modules/{$module_name}/class/{$table_name}.php';
-
+{
+ include_once XOOPS_ROOT_PATH.'/modules/{$module_name}/class/{$table_name}.php';
+ \${$table_name}Handler =& xoops_getModuleHandler('{$table_name}', '{$module_name}');
\$form = {$language}DISPLAY;
\$form .= "<input type='hidden' name='options[0]' value='".\$options[0]."' />";
\$form .= "<input name='options[1]' size='5' maxlength='255' value='".\$options[1]."' type='text' /> <br />";
- \$form .= {$language}TITLELENGTH." : <input name='options[2]' size='5' maxlength='255' value='".\$options[2]."' type='text' /><br /><br />";
- \${$table_name}Handler =& xoops_getModuleHandler('{$table_name}', '{$module_name}');
- \$criteria = new CriteriaCompo();
+ \$form .= {$language}TITLELENGTH." : <input name='options[2]' size='5' maxlength='255' value='".\$options[2]."' type='text' /><br /><br />";
array_shift(\$options);
array_shift(\$options);
array_shift(\$options);
+ \$criteria = new CriteriaCompo();
\$criteria->add(new Criteria('{$fpif}', 0, '!='));
\$criteria->setSort('{$fpif}');
\$criteria->setOrder('ASC');
\${$table_name}_arr = \${$table_name}Handler->getAll(\$criteria);
+ unset(\$criteria)
\$form .= {$language}CATTODISPLAY."<br /><select name='options[]' multiple='multiple' size='5'>";
\$form .= "<option value='0' " . (array_search(0, \$options) === false ? "" : "selected='selected'") . ">" .{$language}ALLCAT . "</option>";
foreach (array_keys(\${$table_name}_arr) as \$i) {
@@ -161,14 +152,14 @@
return $ret;
}
/*
- * @public function render
+ * @public function renderFile
* @param null
*/
public function renderFile($filename)
{
$module = $this->getModule();
$table = $this->getTable();
- $module_name = $module->getVar('mod_name');
+ $module_name = strtolower($module->getVar('mod_name'));
$table_name = $table->getVar('table_name');
$table_fieldname = $table->getVar('table_fieldname');
$table_category = $table->getVar('table_category');
@@ -185,7 +176,7 @@
}
$content = $this->getHeaderFilesComments($module, $filename);
$content .= $this->getBlocksShow($module_name, $table_name, $table_fieldname, $table_category, $fields, $fpif, $fpmf);
- $content .= $this->getBlocksEdit($module_name, $table_name, $table_category, $fpif, $fpmf, $language);
+ $content .= $this->getBlocksEdit($module_name, $table_name, $fpif, $fpmf, $language);
//
$this->tdmcfile->create($module_name, 'blocks', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
return $this->tdmcfile->renderFile();
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php 2014-06-09 00:03:18 UTC (rev 12569)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php 2014-06-09 19:08:59 UTC (rev 12570)
@@ -66,7 +66,7 @@
*/
public function getInitVar($field_name, $type = 'INT') {
$ret = <<<EOT
- \$this->initVar('{$field_name}', XOBJ_DTYPE_{$type});\n
+ \n\$this->initVar('{$field_name}', XOBJ_DTYPE_{$type});
EOT;
return $ret;
}
@@ -127,7 +127,9 @@
}
/*
* @public function getHeadClass
- * @param mixed $constructor
+ * @param string $module_name
+ * @param string $table_name
+ * @param array $fields
*/
public function getHeadClass($module_name, $table_name, $fields) {
$ucf_module_name = ucfirst($module_name);
@@ -147,19 +149,35 @@
public function __construct()
{
\$this->XoopsObject();
- {$this->getInitVars($fields)}
- }\n
+{$this->getInitVars($fields)}
+ }
+ /*
+ * @static function &getInstance
+ * @param null
+ */
+ public static function &getInstance()
+ {
+ static \$instance = false;
+ if (!\$instance) {
+ \$instance = new self();
+ }
+ return \$instance;
+ }\n
EOT;
return $ret;
}
/*
* @public function getHeadFunctionForm
- * @param string $form
+ * @param string $module
+ * @param string $table
*/
- public function getHeadFunctionForm($module_name, $elements_form) {
+ public function getHeadFunctionForm($module, $table)
+ {
+ $module_name = strtolower($module->getVar('mod_name'));
$lang_add = $this->getLanguage($module_name, 'AM', 'ADD');
$lang_edit = $this->getLanguage($module_name, 'AM', 'EDIT');
+ $this->formelements->initForm($module, $table);
$ret = <<<EOT
/*
* Get form
@@ -177,12 +195,13 @@
xoops_load('XoopsFormLoader');
\$form = new XoopsThemeForm(\$title, 'form', \$action, 'post', true);
\$form->setExtra('enctype="multipart/form-data"');\n
-{$elements_form}\n
+{$this->formelements->renderElements()}\n
EOT;
return $ret;
}
/*
* @public function getPermissionsInFunctionForm
+ * @param string $module_name
* @param string $fpif
*/
public function getPermissionsInFunctionForm($module_name, $fpif) {
@@ -190,7 +209,7 @@
$perm_submit = $this->getLanguage($module_name, 'AM', 'PERMISSIONS_SUBMIT');
$perm_view = $this->getLanguage($module_name, 'AM', 'PERMISSIONS_VIEW');
$ret = <<<EOT
- //permissions
+ // Permissions
\$member_handler = & xoops_gethandler ( 'member' );
\$group_list = &\$member_handler->getGroupList();
\$gperm_handler = &xoops_gethandler ( 'groupperm' );
@@ -220,7 +239,7 @@
\$form->addElement ( \$groups_can_submit_checkbox );
// For view
\$groups_can_view_checkbox->addOptionArray ( \$group_list );
- \$form->addElement ( \$groups_can_view_checkbox );\n
+ \$form->addElement ( \$groups_can_view_checkbox );\n\n
EOT;
return $ret;
}
@@ -240,6 +259,8 @@
}
/*
* @public function getClassHandler
+ * @param string $module_name
+ * @param string $table_name
* @param string $fpif
* @param string $fpmf
*/
@@ -247,7 +268,6 @@
$ucf_module_name = ucfirst($module_name);
$ucf_table_name = ucfirst($table_name);
$ucf_mod_table_handler = $ucf_module_name . $ucf_table_name;
-
$ret = <<<EOT
/*
* Class Object Handler {$ucf_module_name}{$ucf_table_name}
@@ -268,19 +288,15 @@
return $ret;
}
/*
- * @public function render
- * @param null
+ * @public function renderFile
+ * @param string $filename
*/
public function renderFile($filename) {
$module = $this->getModule();
$table = $this->getTable();
$table_nbfields = $table->getVar('table_nbfields');
$table_name = $table->getVar('table_name');
- //$fields = $this->getFields();
- //$filename = $this->getFileName();
$module_name = strtolower($module->getVar('mod_name'));
- $fpif = ''; $fpmf = '';
- $initvar_functions = array();
$fields = $this->getTableFields($table->getVar('table_id'));
foreach(array_keys($fields) as $f)
{
@@ -291,14 +307,10 @@
if($fields[$f]->getVar('field_main') == 1) {
$fpmf = $field_name;
}
- }
- //$initvar = $this->getInitVars($fields);
- $this->formelements->initForm($module, $table);
- $elements_form = $this->formelements->renderElement();
-
+ }
$content = $this->getHeaderFilesComments($module, $filename);
$content .= $this->getHeadClass($module_name, $table_name, $fields);
- $content .= $this->getHeadFunctionForm($module_name, $elements_form);
+ $content .= $this->getHeadFunctionForm($module, $table);
if ($table->getVar('table_permissions') == 1) {
$content .= $this->getPermissionsInFunctionForm($module_name, $fpif);
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/formelements.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/formelements.php 2014-06-09 00:03:18 UTC (rev 12569)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/formelements.php 2014-06-09 19:08:59 UTC (rev 12570)
@@ -54,11 +54,11 @@
/*
* @public function initForm
* @param string $module
- * @param array $table
+ * @param string $table
*/
public function initForm($module, $table) {
- $this->module = $module;
- $this->table = $table;
+ $this->setModule($module);
+ $this->setTable($table);
}
/*
* @public function getXoopsFormText
@@ -280,26 +280,24 @@
return $ret;
}
/*
- * @public function render
+ * @public function renderElements
* @param null
*/
- public function renderElement() {
- $module_name = $this->module->getVar('mod_name');
- $table_name = $this->table->getVar('table_name');
+ public function renderElements() {
+ $module = $this->getModule();
+ $table = $this->getTable();
+ $module_name = $module->getVar('mod_name');
+ $table_name = $table->getVar('table_name');
$language_funct = $this->getLanguage($module_name, 'AM');
$language_table = $language_funct . strtoupper($table_name);
$ret = '';
- $table_id = $this->table->getVar('table_id');
- $criteria_fields = new CriteriaCompo();
- $criteria_fields->add(new Criteria('field_tid', $table_id));
- $fields_all = $this->tdmcreate->getHandler('fields')->getObjects($criteria_fields);
- unset($criteria_fields);
- foreach(array_keys($fields_all) as $f)
+ $fields = $this->getTableFields($table->getVar('table_id'));
+ foreach(array_keys($fields) as $f)
{
- $field_name = $fields_all[$f]->getVar('field_name');
- $field_element = $fields_all[$f]->getVar('field_element');
+ $field_name = $fields[$f]->getVar('field_name');
+ $field_element = $fields[$f]->getVar('field_element');
$language = $language_funct . strtoupper($field_name);
- $required = ( $fields_all[$f]->getVar('field_required') == 1 ) ? ', true' : '';
+ $required = ( $fields[$f]->getVar('field_required') == 1 ) ? ', true' : '';
//
switch($field_element)
{
@@ -341,10 +339,10 @@
break;
}
if ($field_element > 11) {
- if($this->table->getVar('table_category') == 1) {
- $ret .= $this->getXoopsFormTopic($language, $module_name, $table_name, $fields_all, $required);
+ if($table->getVar('table_category') == 1) {
+ $ret .= $this->getXoopsFormTopic($language, $module_name, $table_name, $fields, $required);
} else {
- $ret .= $this->getXoopsFormTable($language, $module_name, $table_name, $fields_all, $required);
+ $ret .= $this->getXoopsFormTable($language, $module_name, $table_name, $fields, $required);
}
}
}
|
|
From: <txm...@us...> - 2014-06-09 00:03:26
|
Revision: 12569
http://sourceforge.net/p/xoops/svn/12569
Author: txmodxoops
Date: 2014-06-09 00:03:18 +0000 (Mon, 09 Jun 2014)
Log Message:
-----------
Updated
Work in progress
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_permissions.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_templates.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/file.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_comments.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_install.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_notifications.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_search.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/class/files/language_main.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_modinfo.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/tablefields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_print.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_rss.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_submit.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_templates.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_xoopsversion.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-06-07 10:22:26 UTC (rev 12568)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-06-09 00:03:18 UTC (rev 12569)
@@ -169,10 +169,10 @@
$fieldsObj =& $tdmcreate->getHandler('fields')->create();
$fieldelementObj =& $tdmcreate->getHandler('fieldelements')->create();
}
- //
+ // Set Variables
if ($field_numb > 0) {
for( $i = 1; $i <= $field_numb; $i++ ) {
- //
+ // Set Data
$fieldsObj->setVar( 'field_mid', $field_mid );
$fieldsObj->setVar( 'field_tid', $field_tid );
$fieldsObj->setVar( 'field_numb', $field_numb );
@@ -201,7 +201,7 @@
$fieldelementObj->setVar( 'fieldelement_tid', $field_tid );
$fieldelementObj->setVar( 'fieldelement_name', 'Table : '.ucfirst($table_name) );
$fieldelementObj->setVar( 'fieldelement_value', 'XoopsFormTables-'.ucfirst($table_name) );
- // Insert new table name
+ // Insert new field element id for table name
if (!$tdmcreate->getHandler('fieldelements')->insert($fieldelementObj) ) {
$GLOBALS['xoopsTpl']->assign('error', $fieldelementObj->getHtmlErrors() . ' Field element');
}
@@ -228,7 +228,7 @@
$adminMenu->addItemButton(_AM_TDMCREATE_FIELDS_LIST, 'fields.php', 'list');
$GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
- $fieldsObj = $tdmcreate->getHandler('fields')->get( $field_tid );
+ $fieldsObj = $tdmcreate->getHandler('fields')->get( $field_tid, array('field_id', 'field_name') );
$form = $fieldsObj->getForm(null, $field_tid);
$GLOBALS['xoopsTpl']->assign('form', $form->render());
@@ -271,9 +271,14 @@
$fieldsObj =& $tdmcreate->getHandler('fields')->get($field_id);
if (isset($_GET['field_tid'])) {
if (isset($_GET['field_parent'])) {
- $fld_parent = intval($_GET['field_parent']);
+ /*$fld_parent = intval($_GET['field_parent']);
$field_parent = ($fld_parent == 1) ? 0 : 1;
- $fieldsObj->setVar('field_parent', $field_parent);
+ $fieldsObj->setVar('field_parent', $field_parent);*/
+ for( $i = 1; $i <= $field_numb; $i++ ) {
+ $fld_parent = intval($_GET['field_parent'][$i]);
+ $field_parent = ($i == $fld_parent) ? '1' : '0';
+ $fieldsObj->setVar('field_parent', $field_parent);
+ }
} elseif (isset($_GET['field_inlist'])) {
$fld_inlist = intval($_GET['field_inlist']);
$field_inlist = ($fld_inlist == 1) ? 0 : 1;
@@ -295,9 +300,14 @@
$field_block = ($fld_block == 1) ? 0 : 1;
$fieldsObj->setVar('field_block', $field_block);
} elseif (isset($_GET['field_main'])) {
- $fld_main = intval($_GET['field_main']);
+ /*$fld_main = intval($_GET['field_main']);
$field_main = ($fld_main == 1) ? 0 : 1;
- $fieldsObj->setVar('field_main', $field_main);
+ $fieldsObj->setVar('field_main', $field_main);*/
+ for( $i = 1; $i <= $field_numb; $i++ ) {
+ $fld_main = intval($_GET['field_main'][$i]);
+ $field_main = ($i == $fld_main) ? '1' : '0';
+ $fieldsObj->setVar('field_main', $field_main);
+ }
} elseif (isset($_GET['field_search'])) {
$fld_search = intval($_GET['field_search']);
$field_search = ($fld_search == 1) ? 0 : 1;
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-06-07 10:22:26 UTC (rev 12568)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-06-09 00:03:18 UTC (rev 12569)
@@ -182,7 +182,7 @@
} else {
// Box header row
$parameters_tray = new XoopsFormElementTray('', '<br />');
- /*$parameters_header = new TDMCreateFormLabel('<div class="portlet"><div class="portlet-header">Images</div></div>')
+ /*$parameters_header = new TDMCreateFormLabel('<div class="portlet"><div class="portlet-header">_AM_TDMCREATE_FIELD_PARAMETERS_LIST</div></div>')
$parameters_tray->addElement($parameters_header); */
// Field Elements
$criteria_element = new CriteriaCompo();
@@ -259,24 +259,12 @@
*/
class TDMCreateFieldsHandler extends XoopsPersistableObjectHandler
{
- /**
- * @var mixed
- */
- public $tdmcreate = null;
-
- /**
- * @var mixed
- */
- public $table = null;
-
/*
* @public function constructor class
* @param mixed $db
*/
public function __construct(&$db)
{
- $this->tdmcreate = TDMCreate::getInstance();
- //$this->table = TDMCreateTables::getInstance();
parent::__construct($db, 'mod_tdmcreate_fields', 'tdmcreatefields', 'field_tid', 'field_name');
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_header.php 2014-06-07 10:22:26 UTC (rev 12568)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_header.php 2014-06-09 00:03:18 UTC (rev 12569)
@@ -50,8 +50,8 @@
public function write($module, $table, $tables, $filename) {
$this->setModule($module);
$this->setFileName($filename);
- $this->table = $table;
- $this->tables = $tables;
+ $this->setTable($table);
+ $this->setTables($tables);
}
/*
* @public function render
@@ -59,9 +59,10 @@
*/
public function render() {
$module = $this->getModule();
+ $table = $this->getTable();
+ $tables = $this->getTables();
$filename = $this->getFileName();
$module_name = $module->getVar('mod_name');
- //$table = $this->getTable();
$stl_mod_name = strtolower($module_name);
$ucfmod_name = ucfirst($module_name);
$language = $this->getLanguage('AM');
@@ -71,31 +72,36 @@
\$thisPath = dirname(dirname(__FILE__));
include_once \$thisPath.'/include/common.php';
include_once \$thisPath.'/include/functions.php';
+//\n
EOT;
- if ( $this->table->getVar('table_name') != '' ) {
+ if ( $table->getVar('table_name') != '' ) {
$content .= <<<EOT
-\ninclude_once \$thisPath.'/class/helper.php';
+include_once \$thisPath.'/class/helper.php';
// Get instance
-\${$stl_mod_name}Helper = {$ucfmod_name}Helper::getInstance();
+\${$stl_mod_name}Helper = {$ucfmod_name}Helper::getInstance();\n
EOT;
}
$content .= <<<EOT
-\n\n\$thisModule = \$GLOBALS['xoopsModule']->getVar('dirname');
+\$thisModule = \$GLOBALS['xoopsModule']->getVar('dirname');
\$sysPathIcon16 = '../' . \$xoopsModule->getInfo('sysicons16');
\$sysPathIcon32 = '../' . \$xoopsModule->getInfo('sysicons32');
\$pathModuleAdmin = \$GLOBALS['xoopsModule']->getInfo('dirmoduleadmin');
\$modPathIcon16 = \$xoopsModule->getInfo('modicons16');
-\$modPathIcon32 = \$xoopsModule->getInfo('modicons32');\n
+\$modPathIcon32 = \$xoopsModule->getInfo('modicons32');
+//\n
EOT;
- foreach (array_keys($this->tables) as $i)
+ foreach (array_keys($tables) as $i)
{
- $table_name = $this->tables[$i]->getVar('table_name');
- $content .= '$'.$table_name.'Handler =& xoops_getModuleHandler(\''.$table_name. '\', $thisModule);'.PHP_EOL;
+ $table_name = $tables[$i]->getVar('table_name');
+ $content .= <<<EOT
+\${$table_name}Handler =& xoops_getModuleHandler('{$table_name}', \$thisModule);\n
+EOT;
}
$content .=<<<EOT
-\n\n\$myts =& MyTextSanitizer::getInstance();
+//
+\$myts =& MyTextSanitizer::getInstance();
if (!isset(\$xoopsTpl) || !is_object(\$xoopsTpl)) {
include_once(XOOPS_ROOT_PATH."/class/template.php");
\$xoopsTpl = new XoopsTpl();
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_pages.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_pages.php 2014-06-07 10:22:26 UTC (rev 12568)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_pages.php 2014-06-09 00:03:18 UTC (rev 12569)
@@ -54,7 +54,7 @@
*/
public function write($module, $table) {
$this->setModule($module);
- $this->table = $table;
+ $this->setTable($table);
}
/*
* @public function getAdminPagesHeader
@@ -170,25 +170,31 @@
\${$table_name}Obj =& \${$table_name}Handler->get(\$_REQUEST['{$fpif}']);
} else {
\${$table_name}Obj =& \${$table_name}Handler->create();
- }
+ }\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 == 1) || ($field_element == 2) || ($field_element == 3) || ($field_element > 11)) {
- $this->adminobjects->getSimpleSetVar($table_name, $field_name);
- } else*/if(($field_element == 4) || ($field_element == 5)) {
- $this->adminobjects->getCheckBoxOrRadioYN($table_name, $field_name);
- } elseif($field_element == 9) {
- $this->adminobjects->getUploadImage($module_name, $table_name, $field_name);
- } elseif($field_element == 10) {
- $this->adminobjects->getUploadFile($module_name, $table_name, $field_name);
- } elseif($field_element == 11) {
- $this->adminobjects->getTextDateSelect($table_name, $field_name);
- } else {
- $this->adminobjects->getSimpleSetVar($table_name, $field_name);
+ if($f > 0) {
+ switch($field_element) {
+ case 4:
+ case 5:
+ $ret .= $this->adminobjects->getCheckBoxOrRadioYN($table_name, $field_name);
+ break;
+ case 9:
+ $ret .= $this->adminobjects->getUploadImage($module_name, $table_name, $field_name);
+ break;
+ case 10:
+ $ret .= $this->adminobjects->getUploadFile($module_name, $table_name, $field_name);
+ break;
+ case 11:
+ $ret .= $this->adminobjects->getTextDateSelect($table_name, $field_name);
+ break;
+ default:
+ $ret .= $this->adminobjects->getSimpleSetVar($table_name, $field_name);
+ break;
+ }
}
}
@@ -271,32 +277,28 @@
*/
public function renderFile($filename)
{
- $fpif = ''; $fpmf = '';
- $table_id = $this->table->getVar('table_id');
- $criteria_fields = new CriteriaCompo();
- $criteria_fields->add(new Criteria('field_tid', $table_id));
- $fields_all = $this->tdmcreate->getHandler('fields')->getObjects($criteria_fields);
- unset($criteria_fields);
- foreach(array_keys($fields_all) as $f)
+ $module = $this->getModule();
+ $table = $this->getTable();
+ $module_name = $module->getVar('mod_name');
+ $table_name = $table->getVar('table_name');
+ $language = $this->getLanguage($module_name, 'AM');
+ $fpif = ''; $fpmf = '';
+ $fields = $this->getTableFields($table->getVar('table_id'));
+ foreach(array_keys($fields) as $f)
{
- $field_name = $fields_all[$f]->getVar('field_name');
+ $field_name = $fields[$f]->getVar('field_name');
if($f == 0) {
$fpif = $field_name;
}
- if($fields_all[$f]->getVar('field_main') == 1) {
+ if($fields[$f]->getVar('field_main') == 1) {
$fpmf = $field_name;
}
- }
- $module = $this->getModule();
- $module_name = $module->getVar('mod_name');
- $table_name = $this->table->getVar('table_name');
- //$filename = $this->getFileName();
- $language = $this->getLanguage($module_name, 'AM');
+ }
$content = $this->getHeaderFilesComments($module, $filename);
$content .= $this->getAdminPagesHeader($module_name, $table_name);
- $content .= $this->getAdminPagesList($table_name, $language, $fields_all, $fpif, $fpmf);
+ $content .= $this->getAdminPagesList($table_name, $language, $fields, $fpif, $fpmf);
$content .= $this->getAdminPagesNew($table_name, $language);
- $content .= $this->getAdminPagesSave($module_name, $table_name, $language, $fields_all, $fpif, $fpmf);
+ $content .= $this->getAdminPagesSave($module_name, $table_name, $language, $fields, $fpif, $fpmf);
$content .= $this->getAdminPagesEdit($table_name, $language, $fpif);
$content .= $this->getAdminPagesDelete($table_name, $language, $fpif, $fpmf);
$content .= $this->getAdminPagesFooter();
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_permissions.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_permissions.php 2014-06-07 10:22:26 UTC (rev 12568)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_permissions.php 2014-06-09 00:03:18 UTC (rev 12569)
@@ -52,7 +52,7 @@
public function write($module, $tables, $filename) {
$this->setModule($module);
$this->setFileName($filename);
- $this->tables = $tables;
+ $this->setTables($tables);
}
/*
* @public function render
@@ -140,27 +140,22 @@
*/
public function getBodyPermissionsCode($module_name, $language)
{
- $table_permissions = ''; $table_name = '';
- foreach(array_keys($this->tables) as $t)
+ $tables = $this->getTables();
+ foreach(array_keys($tables) as $t)
{
- $table_id = $this->tables[$t]->getVar('table_id');
- $table_permissions = $this->tables[$t]->getVar('table_permissions');
- if($table_permissions == 1) {
- $table_name = $this->tables[$t]->getVar('table_name');
+ $table_id = $tables[$t]->getVar('table_id');
+ if($tables[$t]->getVar('table_permissions') == 1) {
+ $table_name = $tables[$t]->getVar('table_name');
}
}
- $fpif = ''; $fpmf = '';
- $criteria_fields = new CriteriaCompo();
- $criteria_fields->add(new Criteria('field_tid', $table_id));
- $fields_all = $this->tdmcreate->getHandler('fields')->getObjects($criteria_fields);
- unset($criteria_fields);
- foreach(array_keys($fields_all) as $f)
+ $fields = $this->getTableFields($table_id);
+ foreach(array_keys($fields) as $f)
{
if($f == 1) {
- $fpif = $fields_all[$f]->getVar('field_name');
+ $fpif = $fields[$f]->getVar('field_name');
}
- if($fields_all[$f]->getVar('field_main') == 1) {
- $fpmf = $fields_all[$f]->getVar('field_name');
+ if($fields[$f]->getVar('field_main') == 1) {
+ $fpmf = $fields[$f]->getVar('field_name');
}
}
$ret = <<<PRM
@@ -214,7 +209,6 @@
$module = $this->getModule();
$filename = $this->getFileName();
$module_name = strtolower($module->getVar('mod_name'));
- //$table_name = $this->table->getVar('table_name');
$language = $this->getLanguage($module_name, 'AM');
$content = $this->getHeaderFilesComments($module, $filename);
$content .= $this->getHeaderPermissionsCode($module_name, $language);
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-07 10:22:26 UTC (rev 12568)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-06-09 00:03:18 UTC (rev 12569)
@@ -245,7 +245,7 @@
$ret[] = $userPages->renderFile($table_name.'.php');
// User Templates File
$userTemplates = UserTemplates::getInstance();
- $userTemplates->write($module, $table, $tables);
+ $userTemplates->write($module, $table);
$ret[] = $userTemplates->renderFile($table_name.'.tpl');
}
var_dump($table_name);
@@ -254,14 +254,14 @@
if ( $table_admin == 1) {
// Language Admin File
$languageAdmin = LanguageAdmin::getInstance();
- $languageAdmin->write($module, $table, $tables, 'admin.php');
+ $languageAdmin->write($module, $tables, 'admin.php');
$ret[] = $languageAdmin->render();
}
// Creation of blocks language file
if ( $table_blocks == 1) {
// Language Blocks File
$languageBlocks = LanguageBlocks::getInstance();
- $languageBlocks->write($module, $table, $tables, 'blocks.php');
+ $languageBlocks->write($module, $tables, 'blocks.php');
$ret[] = $languageBlocks->render();
}
// Creation of user language file
@@ -287,7 +287,7 @@
$ret[] = $templatesHeader->render();
// User Index File
$userIndex = UserIndex::getInstance();
- $userIndex->write($module, $table, 'index.php');
+ $userIndex->write($module, 'index.php');
$ret[] = $userIndex->render();
}
// Creation of admin files
@@ -327,7 +327,7 @@
if ( $table_name != null) {
// Sql File
$sqlFile = SqlFile::getInstance();
- $sqlFile->write($module, $table, $tables, 'mysql.sql');
+ $sqlFile->write($module, $tables, 'mysql.sql');
$ret[] = $sqlFile->render();
}
// Creation of search file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_files.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_files.php 2014-06-07 10:22:26 UTC (rev 12568)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_files.php 2014-06-09 00:03:18 UTC (rev 12569)
@@ -49,22 +49,19 @@
*/
public function write($module, $table) {
$this->setModule($module);
- $this->table = $table;
+ $this->setTable($table);
}
/*
* @public function getBlocksShow
* @param null
*/
- public function getBlocksShow($module, $fields_all, $fpif, $fpmf) {
- $mod_name = $module->getVar('mod_name');
- $mod_name_lowercase = strtolower($mod_name);
- $table_name = $this->table->getVar('table_name');
- $table_fieldname = $this->table->getVar('table_fieldname');
+ public function getBlocksShow($module_name, $table_name, $table_fieldname, $table_category, $fields, $fpif, $fpmf) {
+ $mod_name_lowercase = strtolower($module_name);
$ret = <<<EOT
-include_once XOOPS_ROOT_PATH.'/modules/{$mod_name}/include/functions.php';
+include_once XOOPS_ROOT_PATH.'/modules/{$module_name}/include/functions.php';
function b_{$mod_name_lowercase}_{$table_name}_show(\$options)
{
- include_once XOOPS_ROOT_PATH.'/modules/{$mod_name}/class/{$table_name}.php';
+ include_once XOOPS_ROOT_PATH.'/modules/{$mod_name_lowercase}/class/{$table_name}.php';
\$myts =& MyTextSanitizer::getInstance();
\${$table_fieldname} = array();
@@ -72,22 +69,22 @@
\$nb_{$table_name} = \$options[1];
\$lenght_title = \$options[2];
- \${$table_name}Handler =& xoops_getModuleHandler('{$table_name}', '{$mod_name}');
+ \${$table_name}Handler =& xoops_getModuleHandler('{$table_name}', '{$module_name}');
\$criteria = new CriteriaCompo();
array_shift(\$options);
array_shift(\$options);
- array_shift(\$options);
+ array_shift(\$options);\n
EOT;
- if ( $this->table->getVar('table_category') == 1 ) {
+ if ( $table_category == 1 ) {
$ret .= <<<EOT
- \n\tif (!(count(\$options) == 1 && \$options[0] == 0)) {
- \$criteria->add(new Criteria('{$table_fieldname}_category', {$mod_name}_block_addCatSelect(\$options), 'IN'));
- }
+ if (!(count(\$options) == 1 && \$options[0] == 0)) {
+ \$criteria->add(new Criteria('{$table_fieldname}_category', {$mod_name_lowercase}_block_addCatSelect(\$options), 'IN'));
+ }\n
EOT;
}
$ret .= <<<EOT
- \n\tif (\$type_block)
+ if (\$type_block)
{
\$criteria->add(new Criteria('{$fpif}', 0, '!='));
\$criteria->setSort('{$fpif}');
@@ -97,13 +94,13 @@
\$criteria->setLimit(\$nb_{$table_name});
\${$table_name}_arr = \${$table_name}Handler->getAll(\$criteria);
foreach (array_keys(\${$table_name}_arr) as \$i)
- {
+ {\n
EOT;
- foreach(array_keys($fields_all) as $f)
+ foreach(array_keys($fields) as $f)
{
- if( $fields_all[$f]->getVar('field_block') == 1 ) {
+ if( $fields[$f]->getVar('field_block') == 1 ) {
$ret .= <<<EOT
-\n\t\t\${$table_fieldname}['{$fpmf}'] = \${$table_name}_arr[\$i]->getVar('{$fpmf}');\n
+ \${$table_fieldname}['{$fpmf}'] = \${$table_name}_arr[\$i]->getVar('{$fpmf}');\n
EOT;
}
}
@@ -118,34 +115,31 @@
* @public function getBlocksEdit
* @param null
*/
- public function getBlocksEdit($module, $fpif, $fpmf, $language) {
- $mod_name = $module->getVar('mod_name');
- $mod_name_lowercase = strtolower($mod_name);
- $table_name = $this->table->getVar('table_name');
- $table_fieldname = $this->table->getVar('table_fieldname');
+ public function getBlocksEdit($module_name, $table_name, $table_category, $fpif, $fpmf, $language) {
+ $mod_name_lowercase = strtolower($module_name);
$ret = <<<EOT
function b_{$mod_name_lowercase}_{$table_name}_edit(\$options)
-{
+{\n
EOT;
- if ( $this->table->getVar('table_category') == 1 ) {
+ if ( $table_category == 1 ) {
$ret .=<<<EOT
- \ninclude_once XOOPS_ROOT_PATH.'/modules/{$mod_name}/class/category.php';
+ include_once XOOPS_ROOT_PATH.'/modules/{$module_name}/class/category.php';
- \$categoryHandler =& xoops_getModuleHandler('category', "{$mod_name}");
+ \$categoryHandler =& xoops_getModuleHandler('category', "{$module_name}");
\$criteria = new CriteriaCompo();
\$criteria->setSort("{$fpmf}");
\$criteria->setOrder("ASC");
- \${$table_name}_arr = \$categoryHandler->getall(\$criteria);
+ \${$table_name}_arr = \$categoryHandler->getall(\$criteria);\n
EOT;
}
$ret .= <<<EOT
- \ninclude_once XOOPS_ROOT_PATH.'/modules/{$mod_name}/class/{$table_name}.php';
+ include_once XOOPS_ROOT_PATH.'/modules/{$module_name}/class/{$table_name}.php';
\$form = {$language}DISPLAY;
\$form .= "<input type='hidden' name='options[0]' value='".\$options[0]."' />";
\$form .= "<input name='options[1]' size='5' maxlength='255' value='".\$options[1]."' type='text' /> <br />";
\$form .= {$language}TITLELENGTH." : <input name='options[2]' size='5' maxlength='255' value='".\$options[2]."' type='text' /><br /><br />";
- \${$table_name}Handler =& xoops_getModuleHandler('{$table_name}', '{$mod_name}');
+ \${$table_name}Handler =& xoops_getModuleHandler('{$table_name}', '{$module_name}');
\$criteria = new CriteriaCompo();
array_shift(\$options);
array_shift(\$options);
@@ -172,29 +166,26 @@
*/
public function renderFile($filename)
{
- $fpif = ''; $fpmf = '';
- $table_id = $this->table->getVar('table_id');
- $criteria_fields = new CriteriaCompo();
- $criteria_fields->add(new Criteria('field_tid', $table_id));
- $fields_all = $this->tdmcreate->getHandler('fields')->getObjects($criteria_fields);
- unset($criteria_fields);
- foreach(array_keys($fields_all) as $f)
+ $module = $this->getModule();
+ $table = $this->getTable();
+ $module_name = $module->getVar('mod_name');
+ $table_name = $table->getVar('table_name');
+ $table_fieldname = $table->getVar('table_fieldname');
+ $table_category = $table->getVar('table_category');
+ $language = $this->getLanguage($module_name, 'MB');
+ $fields = $this->getTableFields($table->getVar('table_id'));
+ foreach(array_keys($fields) as $f)
{
- if($f == 1) {
- $fpif = $fields_all[$f]->getVar('field_name');
+ if($f == 0) {
+ $fpif = $fields[$f]->getVar('field_name');
}
- if($fields_all[$f]->getVar('field_main') == 1) {
- $fpmf = $fields_all[$f]->getVar('field_name');
+ if($fields[$f]->getVar('field_main') == 1) {
+ $fpmf = $fields[$f]->getVar('field_name');
}
- }
- $module = $this->getModule();
- $module_name = $module->getVar('mod_name');
- //$table = $this->getTable();
- //$filename = $this->getFileName();
- $language = $this->getLanguage($module_name, 'MB');
+ }
$content = $this->getHeaderFilesComments($module, $filename);
- $content .= $this->getBlocksShow($module, $fields_all, $fpif, $fpmf);
- $content .= $this->getBlocksEdit($module, $fpif, $fpmf, $language);
+ $content .= $this->getBlocksShow($module_name, $table_name, $table_fieldname, $table_category, $fields, $fpif, $fpmf);
+ $content .= $this->getBlocksEdit($module_name, $table_name, $table_category, $fpif, $fpmf, $language);
//
$this->tdmcfile->create($module_name, 'blocks', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
return $this->tdmcfile->renderFile();
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_templates.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_templates.php 2014-06-07 10:22:26 UTC (rev 12568)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_templates.php 2014-06-09 00:03:18 UTC (rev 12569)
@@ -49,7 +49,7 @@
*/
public function write($module, $table) {
$this->setModule($module);
- $this->table = $table;
+ $this->setTable($table);
}
/*
* @public function render
@@ -57,37 +57,32 @@
*/
public function renderFile($filename) {
$module = $this->getModule();
- $table_fieldname = $this->table->getVar('table_fieldname');
- //$fields = $this->getFields();
- //$filename = $this->getFileName();
+ $table = $this->getTable();
$module_name = $module->getVar('mod_name');
+ $table_name = $table->getVar('table_name');
+ $table_fieldname = $table->getVar('table_fieldname');
$language = $this->getLanguage($module_name, 'MB');
- //$content = $this->getHeaderFilesComments($module, $filename);
$content = <<<EOT
<table class="outer">
<tr class="head">\n
EOT;
- $table_id = $this->table->getVar('table_id');
- $criteria_fields = new CriteriaCompo();
- $criteria_fields->add(new Criteria('field_tid', $table_id));
- $fields_all = $this->tdmcreate->getHandler('fields')->getObjects($criteria_fields);
- unset($criteria_fields);
- foreach(array_keys($fields_all) as $f)
+ $fields = $this->getTableFields($table->getVar('table_id'));
+ foreach(array_keys($fields) as $f)
{
- $lng_field_name = $language.strtoupper($fields_all[$f]->getVar('field_name'));
+ $lng_field_name = $language.strtoupper($fields[$f]->getVar('field_name'));
$content .= <<<EOT
<th><{\$smarty.const.{$lng_field_name}}></th>\n
EOT;
}
$content .= <<<EOT
</tr>
- <{foreachq item={$table_fieldname} from=\${$table_fieldname}}>
+ <{foreachq item={$table_fieldname} from=\${$table_name}}>
<tr class = "<{cycle values = 'even,odd'}>">\n
EOT;
- foreach(array_keys($fields_all) as $f)
+ foreach(array_keys($fields) as $f)
{
- $table_field_name = $table_fieldname.'.'.strip_tags($fields_all[$f]->getVar('field_name'));
+ $table_field_name = $table_fieldname.'.'.strip_tags($fields[$f]->getVar('field_name'));
$content .= <<<EOT
<td><{\${$table_field_name}}></td>\n
EOT;
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php 2014-06-07 10:22:26 UTC (rev 12568)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php 2014-06-09 00:03:18 UTC (rev 12569)
@@ -56,8 +56,8 @@
*/
public function write($module, $table, $tables) {
$this->setModule($module);
- $this->table = $table;
- $this->tables = $tables;
+ $this->setTable($table);
+ $this->setTables($tables);
}
/*
* @public function getInitVar
@@ -72,15 +72,15 @@
}
/*
* @public function getInitVars
- * @param array $fields_all
+ * @param array $fields
*/
- public function getInitVars($fields_all) {
+ public function getInitVars($fields) {
$ret = '';
// Creation of the initVar functions list
- foreach (array_keys($fields_all) as $f)
+ foreach (array_keys($fields) as $f)
{
- $field_name = $fields_all[$f]->getVar('field_name');
- $field_type = $fields_all[$f]->getVar('field_type');
+ $field_name = $fields[$f]->getVar('field_name');
+ $field_type = $fields[$f]->getVar('field_type');
switch($field_type) {
case 'INT':
case 'TINYINT':
@@ -129,7 +129,7 @@
* @public function getHeadClass
* @param mixed $constructor
*/
- public function getHeadClass($module_name, $table_name, $fields_all) {
+ public function getHeadClass($module_name, $table_name, $fields) {
$ucf_module_name = ucfirst($module_name);
$ucf_table_name = ucfirst($table_name);
$ret = <<<EOT
@@ -147,7 +147,7 @@
public function __construct()
{
\$this->XoopsObject();
- {$this->getInitVars($fields_all)}
+ {$this->getInitVars($fields)}
}\n
EOT;
return $ret;
@@ -273,36 +273,33 @@
*/
public function renderFile($filename) {
$module = $this->getModule();
- $table_nbfields = $this->table->getVar('table_nbfields');
- $table_name = $this->table->getVar('table_name');
+ $table = $this->getTable();
+ $table_nbfields = $table->getVar('table_nbfields');
+ $table_name = $table->getVar('table_name');
//$fields = $this->getFields();
//$filename = $this->getFileName();
$module_name = strtolower($module->getVar('mod_name'));
$fpif = ''; $fpmf = '';
$initvar_functions = array();
- $table_id = $this->table->getVar('table_id');
- $criteria_fields = new CriteriaCompo();
- $criteria_fields->add(new Criteria('field_tid', $table_id));
- $fields_all = $this->tdmcreate->getHandler('fields')->getObjects($criteria_fields);
- unset($criteria_fields);
- foreach(array_keys($fields_all) as $f)
+ $fields = $this->getTableFields($table->getVar('table_id'));
+ foreach(array_keys($fields) as $f)
{
- $field_name = $fields_all[$f]->getVar('field_name');
- if(($f == 0) && ($this->table->getVar('table_autoincrement') == 1)) {
+ $field_name = $fields[$f]->getVar('field_name');
+ if(($f == 0) && ($table->getVar('table_autoincrement') == 1)) {
$fpif = $field_name;
}
- if($fields_all[$f]->getVar('field_main') == 1) {
+ if($fields[$f]->getVar('field_main') == 1) {
$fpmf = $field_name;
}
}
- //$initvar = $this->getInitVars($fields_all);
- $this->formelements->initForm($module, $this->table);
+ //$initvar = $this->getInitVars($fields);
+ $this->formelements->initForm($module, $table);
$elements_form = $this->formelements->renderElement();
$content = $this->getHeaderFilesComments($module, $filename);
- $content .= $this->getHeadClass($module_name, $table_name, $fields_all);
+ $content .= $this->getHeadClass($module_name, $table_name, $fields);
$content .= $this->getHeadFunctionForm($module_name, $elements_form);
- if ($this->table->getVar('table_permissions') == 1) {
+ if ($table->getVar('table_permissions') == 1) {
$content .= $this->getPermissionsInFunctionForm($module_name, $fpif);
}
$content .= $this->getFootFunctionForm();
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/file.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/file.php 2014-06-07 10:22:26 UTC (rev 12568)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/file.php 2014-06-09 00:03:18 UTC (rev 12569)
@@ -20,9 +20,9 @@
*/
defined('XOOPS_ROOT_PATH') or die('Restricted access');
-require_once 'abstract.php';
+require_once 'tablefields.php';
xoops_load('XoopsFile');
-class TDMCreateFile extends TDMCreateAbstract
+class TDMCreateFile extends TDMCreateTableFields
{
/*
* @var string
@@ -80,19 +80,14 @@
/*
* @var string
*/
- protected $tdmcfile = null;
+ protected $tdmcfile = null;
/*
- * @var string
- */
- protected $tdmcreate = null;
-
- /*
* @public function constructor
* @param null
*/
public function __construct() {
- $this->xoopsfile = XoopsFile::getHandler();
+ $this->xoopsfile = XoopsFile::getHandler();
}
/*
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_comments.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_comments.php 2014-06-07 10:22:26 UTC (rev 12568)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_comments.php 2014-06-09 00:03:18 UTC (rev 12569)
@@ -49,7 +49,7 @@
*/
public function write($module, $table) {
$this->setModule($module);
- $this->table = $table;
+ $this->setTable($table);
}
/*
* @public function getCommentsIncludes
@@ -74,20 +74,16 @@
*/
public function renderCommentsNew($module, $filename)
{
+ $table = $this->getTable();
$module_name = strtolower($module->getVar('mod_name'));
- $table_name = $this->table->getVar('table_name');
- $table_fieldname = $this->table->getVar('table_fieldname');
+ $table_name = $table->getVar('table_name');
+ $table_fieldname = $table->getVar('table_fieldname');
$fpmf = null;
- $table_id = $this->table->getVar('table_id');
- $criteria_fields = new CriteriaCompo();
- $criteria_fields->add(new Criteria('field_tid', $table_id));
- $fields_all = $this->tdmcreate->getHandler('fields')->getObjects($criteria_fields);
- unset($criteria_fields);
- foreach(array_keys($fields_all) as $f)
+ $fields = $this->getTableFields($table->getVar('table_id'));
+ foreach(array_keys($fields) as $f)
{
- $field_name = $fields_all[$f]->getVar('field_name');
- if($fields_all[$f]->getVar('field_main') == 1) {
- $fpmf = $field_name;
+ if($fields[$f]->getVar('field_main') == 1) {
+ $fpmf = $fields[$f]->getVar('field_name');
}
}
$content = $this->getHeaderFilesComments($module, $filename.'.php');
@@ -111,7 +107,7 @@
*/
/*public function render() {
$module = $this->getModule();
- //$fields = $this->getFields();
+ $table = $this->getTable();
$filename = $this->getFileName();
$module_name = $module->getVar('mod_name');
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_install.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_install.php 2014-06-07 10:22:26 UTC (rev 12568)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_install.php 2014-06-09 00:03:18 UTC (rev 12569)
@@ -50,8 +50,8 @@
*/
public function write($module, $tables, $filename) {
$this->setModule($module);
- $this->setFileName($filename);
- $this->tables = $tables;
+ $this->setTables($tables);
+ $this->setFileName($filename);
}
/*
* @public function render
@@ -61,8 +61,7 @@
{
$module = $this->getModule();
$module_name = strtolower($module->getVar('mod_name'));
- //$table = $this->getTable();
- //$fields = $this->getFields();
+ $tables = $this->getTables();
$filename = $this->getFileName();
$content = $this->getHeaderFilesComments($module, $filename);
$content .= <<<EOT
@@ -77,21 +76,17 @@
copy(\$indexFile, \${$module_name}.'/index.html');
EOT;
$field_element = '';
- foreach (array_keys($this->tables) as $t)
+ foreach (array_keys($tables) as $t)
{
- $table_name = $this->tables[$t]->getVar('table_name');
- $table_id = $this->tables[$t]->getVar('table_id');
- $criteria_fields = new CriteriaCompo();
- $criteria_fields->add(new Criteria('field_tid', $table_id));
- $fields_all = $this->tdmcreate->getHandler('fields')->getObjects($criteria_fields);
- unset($criteria_fields);
- foreach(array_keys($fields_all) as $f) {
+ $table_name = $tables[$t]->getVar('table_name');
+ $fields = $this->getTableFields($tables[$t]->getVar('table_id'));
+ foreach(array_keys($fields) as $f) {
{
- $field_name = $fields_all[$f]->getVar('field_name');
- if ( ($f > 1) && ($this->tables[$t]->getVar('table_autoincrement') == 1) ) {
- $field_element = $fields_all[$f]->getVar('field_element');
+ $field_name = $fields[$f]->getVar('field_name');
+ if ( ($f > 0) && ($tables[$t]->getVar('table_autoincrement') == 1) ) {
+ $field_element = $fields[$f]->getVar('field_element');
}
- if ( $f == 1 ) {
+ if ( $f == 0 ) {
$content .= <<<EOT
\n// Making of {$table_name} uploads folder
\${$table_name} = \${$module_name}.'/{$table_name}';
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_notifications.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_notifications.php 2014-06-07 10:22:26 UTC (rev 12568)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_notifications.php 2014-06-09 00:03:18 UTC (rev 12569)
@@ -47,13 +47,12 @@
* @public function write
* @param string $module
* @param mixed $table
- * @param string $fields
* @param string $filename
*/
public function write($module, $table, $filename) {
$this->setModule($module);
$this->setFileName($filename);
- $this->table = $table;
+ $this->setTable($table);
}
/*
* @static function getNotificationsFunction
@@ -61,20 +60,17 @@
*/
public function getNotificationsFunction($module_name)
{
- $table_name = $this->table->getVar('table_name');
- $table_fieldname = $this->table->getVar('table_fieldname');
+ $table = $this->getTable();
+ $table_name = $table->getVar('table_name');
+ $table_fieldname = $table->getVar('table_fieldname');
$fpif = null; $fpmf = null;
- $table_id = $this->table->getVar('table_id');
- $criteria_fields = new CriteriaCompo();
- $criteria_fields->add(new Criteria('field_tid', $table_id));
- $fields_all = $this->tdmcreate->getHandler('fields')->getObjects($criteria_fields);
- unset($criteria_fields);
- foreach(array_keys($fields_all) as $i) {
- $field_name = $fields_all[$i]->getVar('field_name');
- if(($i == 1) && ($this->table->getVar('table_autoincrement') == 1)) {
+ $fields = $this->getTableFields($table->getVar('table_id'));
+ foreach(array_keys($fields) as $i) {
+ $field_name = $fields[$i]->getVar('field_name');
+ if(($i == 1) && ($table->getVar('table_autoincrement') == 1)) {
$fpif = $field_name;
}
- if($fields_all[$i]->getVar('field_main') == 1) {
+ if($fields[$i]->getVar('field_main') == 1) {
$fpmf = $field_name;
}
}
@@ -138,8 +134,6 @@
*/
public function render() {
$module = $this->getModule();
- //$table = $this->getTable();
- //$fields = $this->getFields();
$filename = $this->getFileName();
$module_name = strtolower($module->getVar('mod_name'));
$content = $this->getHeaderFilesComments($module, $filename);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_search.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_search.php 2014-06-07 10:22:26 UTC (rev 12568)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_search.php 2014-06-09 00:03:18 UTC (rev 12569)
@@ -47,13 +47,12 @@
* @public function write
* @param string $module
* @param mixed $table
- * @param string $fields
* @param string $filename
*/
public function write($module, $table, $filename) {
$this->setModule($module);
$this->setFileName($filename);
- $this->table = $table;
+ $this->setTable($table);
}
/*
* @static function getSearchField
@@ -66,7 +65,7 @@
$sql = '';
if(isset($fpsf)) {
$nb_fpsf = count($fpsf);
- $sql = '(';
+ $sql .= '(';
for($i = 0; $i < $nb_fpsf; $i++)
{
if ( $i != $nb_fpsf - 1 ) {
@@ -85,24 +84,21 @@
*/
public function getSearchFunction($module_name)
{
- $table_name = $this->table->getVar('table_name');
- $table_fieldname = $this->table->getVar('table_fieldname');
+ $table = $this->getTable();
+ $table_name = $table->getVar('table_name');
+ $table_fieldname = $table->getVar('table_fieldname');
$fpif = ''; $fpsf = null;
- $table_id = $this->table->getVar('table_id');
- $criteria_fields = new CriteriaCompo();
- $criteria_fields->add(new Criteria('field_tid', $table_id));
- $fields_all = $this->tdmcreate->getHandler('fields')->getObjects($criteria_fields);
- unset($criteria_fields);
- foreach(array_keys($fields_all) as $f)
+ $fields = $this->getTableFields($table->getVar('table_id'));
+ foreach(array_keys($fields) as $f)
{
- $field_name = $fields_all[$f]->getVar('field_name');
- if(($f > 1) && ($this->table->getVar('table_autoincrement') == 1)) {
+ $field_name = $fields[$f]->getVar('field_name');
+ if(($f == 0) && ($table->getVar('table_autoincrement') == 1)) {
$fpif = $field_name;
}
- if($fields_all[$f]->getVar('field_main') == 1) {
+ if($fields[$f]->getVar('field_main') == 1) {
$fpmf = $field_name;
}
- if($fields_all[$f]->getVar('field_search') == 1) {
+ if($fields[$f]->getVar('field_search') == 1) {
$fpsf = $field_name;
}
}
@@ -152,8 +148,6 @@
*/
public function render() {
$module = $this->getModule();
- //$table = $this->getTable();
- //$fields = $this->getFields();
$filename = $this->getFileName();
$module_name = strtolower($module->getVar('mod_name'));
$content = $this->getHeaderFilesComments($module, $filename);
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-07 10:22:26 UTC (rev 12568)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_admin.php 2014-06-09 00:03:18 UTC (rev 12569)
@@ -44,15 +44,13 @@
/*
* @public function write
* @param string $module
- * @param mixed $table
- * @param string $fields
+ * @param string $tables
* @param string $filename
*/
- public function write($module, $table, $tables, $filename) {
+ public function write($module, $tables, $filename) {
$this->setModule($module);
- $this->setFileName($filename);
- $this->table = $table;
- $this->tables = $tables;
+ $this->setTables($tables);
+ $this->setFileName($filename);
}
/*
* @public function render
@@ -60,20 +58,17 @@
*/
public function render() {
$module = $this->getModule();
- //$table = $this->getTable();
- $fields = $this->getFields();
+ $tables = $this->getTables();
$filename = $this->getFileName();
- $module_name = $module->getVar('mod_name');
- $table_name = $this->table->getVar('table_name');
-
+ $module_name = $module->getVar('mod_name');
$language = $this->getLanguage($module_name, 'AM');
$content = $this->getHeaderFilesComments($module, $filename);
$content .= <<<EOT
\n//Admin
EOT;
- foreach (array_keys($this->tables) as $i)
+ foreach (array_keys($tables) as $i)
{
- $table_name = $this->tables[$i]->getVar('table_name');
+ $table_name = $tables[$i]->getVar('table_name');
$stu_table_name = strtoupper($table_name);
$table_name_nohs = strtolower($table_name);
$content .= <<<EOT
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-07 10:22:26 UTC (rev 12568)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_blocks.php 2014-06-09 00:03:18 UTC (rev 12569)
@@ -45,16 +45,13 @@
/*
* @public function write
* @param string $module
- * @param mixed $table
* @param mixed $tables
- * @param string $fields
* @param string $filename
*/
- public function write($module, $table, $tables, $filename) {
+ public function write($module, $tables, $filename) {
$this->setModule($module);
$this->setFileName($filename);
- $this->table = $table;
- $this->tables = $tables;
+ $this->setTables($tables);
}
/*
* @public function render
@@ -62,13 +59,9 @@
*/
public function render() {
$module = $this->getModule();
- //$table = $this->getTable();
- //$fields = $this->getFields();
+ $tables = $this->getTables();
$filename = $this->getFileName();
- $module_name = $module->getVar('mod_name');
- $table_name = $this->table->getVar('table_name');
- $table_fieldname = $this->table->getVar('table_fieldname');
- $table_nbfields = $this->table->getVar('table_nbfields');
+ $module_name = $module->getVar('mod_name');
$language = $this->getLanguage($module_name, 'MB');
$content = $this->getHeaderFilesComments($module, $filename);
$content .= <<<EOT
@@ -78,13 +71,13 @@
define('{$language}CATTODISPLAY', "Categories to Display");
define('{$language}ALLCAT', "All Categories");
EOT;
- foreach (array_keys($this->tables) as $i)
+ foreach (array_keys($tables) as $i)
{
- $table_id = $this->tables[$i]->getVar('table_id');
- $table_name = $this->tables[$i]->getVar('table_name');
- $table_fieldname = $this->tables[$i]->getVar('table_fieldname');
+ $table_id = $tables[$i]->getVar('table_id');
+ $table_name = $tables[$i]->getVar('table_name');
+ $table_fieldname = $tables[$i]->getVar('table_fieldname');
$nb_caracteres = strlen($table_fieldname);
- $table_blocks = $this->tables[$i]->getVar('table_blocks');
+ $table_blocks = $tables[$i]->getVar('table_blocks');
$language1 = $language.strtoupper($table_fieldname);
$fpif = '';
$criteria_fields = new CriteriaCompo();
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_main.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_main.php 2014-06-07 10:22:26 UTC (rev 12568)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_main.php 2014-06-09 00:03:18 UTC (rev 12569)
@@ -52,8 +52,8 @@
public function write($module, $table, $tables, $filename) {
$this->setModule($module);
$this->setFileName($filename);
- $this->table = $table;
- $this->tables = $tables;
+ $this->setTable($table);
+ $this->setTables($tables);
}
/*
* @public function render
@@ -61,14 +61,10 @@
*/
public function render() {
$module = $this->getModule();
- //$table = $this->getTable();
- //$fields = $this->getFields();
+ $tables = $this->getTables();
$filename = $this->getFileName();
$module_name = $module->getVar('mod_name');
- $module_description = $module->getVar('mod_description');
- $table_name = $this->table->getVar('table_name');
- $table_fieldname = $this->table->getVar('table_fieldname');
- $table_nbfields = $this->table->getVar('table_nbfields');
+ $module_description = $module->getVar('mod_description');
$ucf_mod_name = ucfirst($module_name);
$language = $this->getLanguage($module_name, 'MA');
$content = $this->getHeaderFilesComments($module, $filename);
@@ -77,42 +73,37 @@
define('{$language}INDEX', "Home");
define('{$language}TITLE', "{$ucf_mod_name}");
define('{$language}DESC', "{$module_description}");
-define('{$language}INDEX_DESC', "{$module_description}");
+define('{$language}INDEX_DESC', "{$module_description}");\n
EOT;
- foreach (array_keys($this->tables) as $i)
+ foreach (array_keys($tables) as $i)
{
- $table_name = $this->tables[$i]->getVar('table_name');
- $table_fieldname = $this->tables[$i]->getVar('table_fieldname');
+ $table_name = $tables[$i]->getVar('table_name');
+ $table_fieldname = $tables[$i]->getVar('table_fieldname');
$nb_caracteres = strlen($table_fieldname);
- $table_blocks = $this->tables[$i]->getVar('table_blocks');
+ $table_blocks = $tables[$i]->getVar('table_blocks');
$lng_stu_table_name = $language.strtoupper($table_name);
$ucf_table_name = UcFirstAndToLower($table_name);
$content .= <<<EOT
-\n\ndefine('{$lng_stu_table_name}', "{$ucf_table_name}");
-define('{$lng_stu_table_name}_DESC', "{$ucf_table_name} description");
+define('{$lng_stu_table_name}', "{$ucf_table_name}");
+define('{$lng_stu_table_name}_DESC', "{$ucf_table_name} description");\n
EOT;
- $fpif = '';
- $table_id = $this->tables[$i]->getVar('table_id');
- $criteria_fields = new CriteriaCompo();
- $criteria_fields->add(new Criteria('field_tid', $table_id));
- $fields_all = $this->tdmcreate->getHandler('fields')->getObjects($criteria_fields);
- unset($criteria_fields);
- foreach (array_keys($fields_all) as $f)
+ $fields = $this->getTableFields($tables[$i]->getVar('table_id'));
+ foreach (array_keys($fields) as $f)
{
- $field_name = $fields_all[$f]->getVar('field_name');
- if($f == 1) {
+ $field_name = $fields[$f]->getVar('field_name');
+ if($f == 0) {
$fpif = $field_name;
}
$fields_final[$f] = substr($fpif, $nb_caracteres);
$lng_stu_fields = $language.'_'.strtoupper($table_fieldname).strtoupper($fields_final[$f]);
$ucf_fields = ucfirst($table_fieldname.str_replace("_", " ", $fields_final[$f]));
$content .= <<<EOT
-\ndefine('{$lng_stu_fields}', "{$ucf_fields}");
+define('{$lng_stu_fields}', "{$ucf_fields}");\n
EOT;
}
}
$content .= <<<EOT
-\n\ndefine('{$language}ADMIN', "Admin");
+define('{$language}ADMIN', "Admin");
EOT;
$this->tdmcfile->create($module_name, 'language/'.$GLOBALS['xoopsConfig']['language'], $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
return $this->tdmcfile->renderFile();
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_modinfo.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_modinfo.php 2014-06-07 10:22:26 UTC (rev 12568)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_modinfo.php 2014-06-09 00:03:18 UTC (rev 12569)
@@ -52,8 +52,8 @@
public function write($module, $table, $tables, $filename) {
$this->setModule($module);
$this->setFileName($filename);
- $this->table = $table;
- $this->tables = $tables;
+ $this->setTable($table);
+ $this->setTables($tables);
}
/*
* @public function render
@@ -61,16 +61,16 @@
*/
public function render() {
$module = $this->getModule();
- //$table = $this->getTable();
- //$fields = $this->getFields();
+ $table = $this->getTable();
+ $tables = $this->getTables();
$filename = $this->getFileName();
$module_name = $module->getVar('mod_name');
$module_description = $module->getVar('mod_description');
- $table_name = $this->table->getVar('table_name');
- $table_fieldname = $this->table->getVar('table_fieldname');
- $table_nbfields = $this->table->getVar('table_nbfields');
- $table_image = $this->table->getVar('table_image');
- $table_permissions = $this->table->getVar('table_permissions');
+ $table_name = $table->getVar('table_name');
+ $table_fieldname = $table->getVar('table_fieldname');
+ $table_nbfields = $table->getVar('table_nbfields');
+ $table_image = $table->getVar('table_image');
+ $table_permissions = $table->getVar('table_permissions');
$language = $this->getLanguage($module_name, 'MI');
$content = $this->getHeaderFilesComments($module, $filename);
$menu = 1;
@@ -79,81 +79,81 @@
define('{$language}NAME', "{$module_name}");
define('{$language}DESC', "{$module_description}");
//Menu
-define('{$language}ADMENU{$menu}', "Home");
+define('{$language}ADMENU{$menu}', "Home");\n
EOT;
- foreach (array_keys($this->tables) as $i)
+ foreach (array_keys($tables) as $i)
{
$menu++;
- $table_name = str_replace('_', ' ', $this->tables[$i]->getVar('table_name'));
+ $table_name = str_replace('_', ' ', $tables[$i]->getVar('table_name'));
$table_name = ucfirst($table_name);
$content .= <<<EOT
-\ndefine('{$language}ADMENU{$menu}', "{$table_name}");
+define('{$language}ADMENU{$menu}', "{$table_name}");\n
EOT;
}
if ( $table_permissions != 0 ) {
$menu++;
$content .= <<<EOT
-\ndefine('{$language}ADMENU{$menu}', "Permissions");
+define('{$language}ADMENU{$menu}', "Permissions");\n
EOT;
}
$menu++;
$content .= <<<EOT
-\ndefine('{$language}ADMENU{$menu}', "About");
+define('{$language}ADMENU{$menu}', "About");\n
EOT;
unset( $menu );
$content .= <<<EOT
-\n//Blocks
+//Blocks\n
EOT;
- foreach (array_keys($this->tables) as $i)
+ foreach (array_keys($tables) as $i)
{
- $table_name = $this->tables[$i]->getVar('table_name');
+ $table_name = $tables[$i]->getVar('table_name');
$language1 = $language.strtoupper($table_name).'';
$table_name = str_replace("_", " ", ucfirst($table_name));
- if ( $this->tables[$i]->getVar('table_blocks') == 1 ) {
+ if ( $tables[$i]->getVar('table_blocks') == 1 ) {
$content .= <<<EOT
-\ndefine('{$language1}BLOCK', "{$table_name} block");
+define('{$language1}BLOCK', "{$table_name} block");\n
EOT;
}
}
$content .= <<<EOT
-\n//Config
+//Config
define('{$language}EDITOR', "Editor");
define('{$language}EDITOR_DESC', "Select the Editor to use");
define('{$language}KEYWORDS', "Keywords");
-define('{$language}KEYWORDS_DESC', "Insert here the keywords (separate by comma)");
+define('{$language}KEYWORDS_DESC', "Insert here the keywords (separate by comma)");\n
EOT;
if ( $table_name != '' ) {
$content .= <<<EOT
-\ndefine('{$language}ADMINPAGER', "Admin pager");
+define('{$language}ADMINPAGER', "Admin pager");
define('{$language}ADMINPAGER_DESC', "Admin per page list");
define('{$language}USERPAGER', "User pager");
-define('{$language}USERPAGER_DESC', "User per page list");
+define('{$language}USERPAGER_DESC', "User per page list");\n
EOT;
}
if ( $table_image != '' )
{
$content .= <<<EOT
-\ndefine('{$language}MAXSIZE', "Max size");
+define('{$language}MAXSIZE', "Max size");
define('{$language}MAXSIZE_DESC', "Set a number of max size uploads file in byte");
define('{$language}MIMETYPES', "Mime Types");
-define('{$language}MIMETYPES_DESC', "Set the mime types selected");
+define('{$language}MIMETYPES_DESC', "Set the mime types selected");\n
EOT;
}
$content .= <<<EOT
-\ndefine('{$language}IDPAYPAL', "Paypal ID");
+define('{$language}IDPAYPAL', "Paypal ID");
define('{$language}IDPAYPAL_DESC', "Insert here your PayPal ID for donactions.");
define('{$language}ADVERTISE', "Advertisement Code");
define('{$language}ADVERTISE_DESC', "Insert here the advertisement code");
define('{$language}BOOKMARKS', "Social Bookmarks");
define('{$language}BOOKMARKS_DESC', "Show Social Bookmarks in the form");
define('{$language}FBCOMMENTS', "Facebook comments");
-define('{$language}FBCOMMENTS_DESC', "Allow Facebook comments in the form");
+define('{$language}FBCOMMENTS_DESC', "Allow Facebook comments in the form");\n
EOT;
- if ( $this->table->getVar('table_notifications') == 1 )
+ if ( $table->getVar('table_notifications') == 1 )
{
$content .= <<<EOT
-\n// Notifications
+// Notifications
define('{$language}GLOBAL_NOTIFY', "Allow Facebook comments in the form");
define('{$language}GLOBAL_NOTIFY_DESC', "Allow Facebook comments in the form");
define('{$language}CATEGORY_NOTIFY', "Allow Facebook comments in the form");
@@ -191,12 +191,12 @@
define('{$language}FILE_APPROVE_NOTIFY', "Allow Facebook comments in the form");
define('{$language}FILE_APPROVE_NOTIFY_CAPTION', "Allow Facebook comments in the form");
define('{$language}FILE_APPROVE_NOTIFY_DESC', "Allow Facebook comments in the form");
-define('{$language}FILE_APPROVE_NOTIFY_SUBJECT', "Allow Facebook comments in the form");
+define('{$language}FILE_APPROVE_NOTIFY_SUBJECT', "Allow Facebook comments in the form");\n
EOT;
}
if ( $table_permissions != 0 ) {
$content .= <<<EOT
-\n// Permissions Groups
+// Permissions Groups
define('{$language}GROUPS', "Groups access");
define('{$language}GROUPS_DESC', "Select general access permission for groups.");
define('{$language}ADMINGROUPS', "Admin Group Permissions");
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql_files.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql_files.php 2014-06-07 10:22:26 UTC (rev 12568)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql_files.php 2014-06-09 00:03:18 UTC (rev 12569)
@@ -49,14 +49,12 @@
* @param string $module
* @param string $table
* @param string $tables
- * @param array $fields
* @param string $filename
*/
- public function write($module, $table, $tables, $filename) {
+ public function write($module, $tables, $filename) {
$this->setModule($module);
- $this->setFileName($filename);
- $this->table = $table;
- $this->tables = $tables;
+ $this->setTables($tables);
+ $this->setFileName($filename);
}
/*
@@ -110,12 +108,13 @@
public function getDatabaseTables($module_name)
{
$ret = null;
- foreach(array_keys($this->tables) as $t)
+ $tables = $this->getTables();
+ foreach(array_keys($tables) as $t)
{
- $table_id = $this->tables[$t]->getVar('table_id');
- $table_name = $this->tables[$t]->getVar('table_name');
- $table_autoincrement = $this->tables[$t]->getVar('table_autoincrement');
- $nb_fields = $this->tables[$t]->getVar('table_nbfields');
+ $table_id = $tables[$t]->getVar('table_id');
+ $table_name = $tables[$t]->getVar('table_name');
+ $table_autoincrement = $tabl...
[truncated message content] |
|
From: <txm...@us...> - 2014-06-07 10:22:33
|
Revision: 12568
http://sourceforge.net/p/xoops/svn/12568
Author: txmodxoops
Date: 2014-06-07 10:22:26 +0000 (Sat, 07 Jun 2014)
Log Message:
-----------
- Fixed bugs
- Deleted duplicated code
- Updated
- 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/admin_about.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_menu.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_permissions.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_templates.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_templates.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/css_styles.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs_changelog.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/file.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/formelements.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_comments.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_common.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_functions.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_install.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_jquery.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_notifications.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_search.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/class/files/language_help.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_main.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_modinfo.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_notification_update.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_print.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_rss.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_submit.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_templates.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_xoopsversion.php
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/tablefields.php
Removed Paths:
-------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/tables_fields.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-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/abstract.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -27,25 +27,32 @@
abstract class TDMCreateAbstract
{
/**
- * "module" attribute of the files
+ * "module" attribute fot files
*
* @var mixed
*/
- private $module = null;
+ protected $module = null;
/**
- * "table" attribute of the files
+ * "table" attribute fot files
*
* @var mixed
*/
- private $table = null;
+ protected $table = null;
/**
- * "field" attribute of the files
+ * "tables" attribute fot files
*
* @var mixed
*/
- private $fields = null;
+ protected $tables = null;
+
+ /**
+ * "fields" attribute fot files
+ *
+ * @var mixed
+ */
+ protected $fields = null;
/**
* public function setFileName
@@ -80,6 +87,22 @@
}
/**
+ * public function setTables
+ * @param mixed $tables
+ */
+ public function setTables($tables) {
+ $this->tables = $tables;
+ }
+
+ /*
+ * @public function getTables
+ * @param null
+ */
+ public function getTables() {
+ return $this->tables;
+ }
+
+ /**
* @public function setFields
* @param mixed $fields
*/
@@ -96,7 +119,7 @@
}
/**
- * Generates output for the files.
+ * Generates output for files.
*
* This method is abstract and must be overwritten by the child classes.
*
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_about.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_about.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_about.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -23,11 +23,6 @@
class AdminAbout extends TDMCreateFile
{
/*
- * @var string
- */
- private $tdmcfile = null;
-
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_footer.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_footer.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_footer.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -23,11 +23,6 @@
class AdminFooter extends TDMCreateFile
{
/*
- * @var string
- */
- private $tdmcfile = null;
-
- /*
* @public function constructor
* @param string $modules
* @param string $filename
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_header.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_header.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -23,18 +23,6 @@
class AdminHeader extends TDMCreateFile
{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $table = null;
- /*
- * @var string
- */
- private $tables = null;
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_index.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_index.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_index.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,20 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class AdminIndex extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $table = null;
- /*
- * @var string
- */
- private $tables = null;
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_menu.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_menu.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_menu.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,20 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class AdminMenu extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $table = null;
- /*
- * @var string
- */
- private $tables = null;
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_pages.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_pages.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_pages.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -25,16 +25,8 @@
/*
* @var string
*/
- private $adminobjects = null;
+ private $adminobjects = null;
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $table = null;
- /*
* @public function constructor
* @param null
*/
@@ -288,7 +280,7 @@
foreach(array_keys($fields_all) as $f)
{
$field_name = $fields_all[$f]->getVar('field_name');
- if($f == 1) {
+ if($f == 0) {
$fpif = $field_name;
}
if($fields_all[$f]->getVar('field_main') == 1) {
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_permissions.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_permissions.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_permissions.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,16 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class AdminPermissions extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $tables = null;
- /*
* @public function constructor
* @param null
*/
Modified: 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-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_templates.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -23,10 +23,6 @@
class AdminTemplates extends HtmlSmartyCodes
{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
* @public function constructor
* @param null
*/
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-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -342,23 +342,23 @@
// Include Comments File
$includeComments = IncludeComments::getInstance();
$includeComments->write($module, $table);
- $ret[] = $includeComments->getCommentsIncludes($module, 'comment_edit');
+ $ret[] = $includeComments->renderCommentsIncludes($module, 'comment_edit');
// Include Comments File
$includeComments = IncludeComments::getInstance();
$includeComments->write($module, $table);
- $ret[] = $includeComments->getCommentsIncludes($module, 'comment_delete');
+ $ret[] = $includeComments->renderCommentsIncludes($module, 'comment_delete');
// Include Comments File
$includeComments = IncludeComments::getInstance();
$includeComments->write($module, $table);
- $ret[] = $includeComments->getCommentsIncludes($module, 'comment_post');
+ $ret[] = $includeComments->renderCommentsIncludes($module, 'comment_post');
// Include Comments File
$includeComments = IncludeComments::getInstance();
$includeComments->write($module, $table);
- $ret[] = $includeComments->getCommentsIncludes($module, 'comment_reply');
+ $ret[] = $includeComments->renderCommentsIncludes($module, 'comment_reply');
// Include Comments File
$includeComments = IncludeComments::getInstance();
$includeComments->write($module, $table);
- $ret[] = $includeComments->getCommentsNew($module, 'comment_new');
+ $ret[] = $includeComments->renderCommentsNew($module, 'comment_new');
}
if ( ($table_user == 1) && ($table_notifications == 1)){
// User Notification Update File
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_files.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_files.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_files.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,16 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class BlocksFiles extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $table = null;
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_templates.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_templates.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_templates.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,16 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class BlocksTemplates extends HtmlSmartyCodes
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $table = null;
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,24 +21,13 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
require_once 'formelements.php';
class ClassFiles extends TDMCreateFormElements
-{
+{
/*
* @var string
*/
- private $tdmcfile = null;
+ private $formelements = null;
+
/*
- * @var string
- */
- private $formelements = null;
- /*
- * @var string
- */
- private $table = null;
- /*
- * @var string
- */
- private $tables = null;
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/css_styles.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/css_styles.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/css_styles.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,12 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class CssStyles extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs_changelog.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs_changelog.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs_changelog.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -23,12 +23,8 @@
}
class DocsChangelog extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs_files.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs_files.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs_files.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,12 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class DocsFiles extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/file.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/file.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/file.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -78,6 +78,16 @@
private $mode = null;
/*
+ * @var string
+ */
+ protected $tdmcfile = null;
+
+ /*
+ * @var string
+ */
+ protected $tdmcreate = null;
+
+ /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/formelements.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/formelements.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/formelements.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,16 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class TDMCreateFormElements extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $module = null;
- /*
- * @var string
- */
- private $table = null;
- /*
* @public function constructor
* @param null
*/
@@ -256,6 +248,7 @@
* @param string $language
* @param string $module_name
* @param string $table_name
+ * @param string $fields
* @param string $required
*/
public function getXoopsFormTopic($language, $module_name, $table_name, $fields, $required = 'false')
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_comments.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_comments.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_comments.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,16 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class IncludeComments extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $table = null;
- /*
* @public function constructor
* @param null
*/
@@ -61,9 +53,10 @@
}
/*
* @public function getCommentsIncludes
+ * @param string $module
* @param string $filename
*/
- public function getCommentsIncludes($module, $filename)
+ public function renderCommentsIncludes($module, $filename)
{
$module_name = strtolower($module->getVar('mod_name'));
$content = $this->getHeaderFilesComments($module, $filename.'.php');
@@ -77,9 +70,9 @@
/*
* @public function getCommentsNew
* @param string $module
- * @param string $file_name
+ * @param string $filename
*/
- public function getCommentsNew($module, $filename)
+ public function renderCommentsNew($module, $filename)
{
$module_name = strtolower($module->getVar('mod_name'));
$table_name = $this->table->getVar('table_name');
@@ -116,7 +109,7 @@
* @public function render
* @param null
*/
- public function render() {
+ /*public function render() {
$module = $this->getModule();
//$fields = $this->getFields();
$filename = $this->getFileName();
@@ -150,5 +143,5 @@
return $this->tdmcfile->renderFile();
break;
}
- }
+ }*/
}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_common.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_common.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_common.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,12 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class IncludeCommon extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_functions.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_functions.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_functions.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,12 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class IncludeFunctions extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_install.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_install.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_install.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,16 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class IncludeInstall extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $tables = null;
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_jquery.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_jquery.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_jquery.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,12 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class IncludeJquery extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_notifications.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_notifications.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_notifications.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,16 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class IncludeNotifications extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $table = null;
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_search.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_search.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_search.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,16 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class IncludeSearch extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $table = null;
- /*
* @public function constructor
* @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-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_admin.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,20 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class LanguageAdmin extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $table = null;
- /*
- * @var string
- */
- private $tables = null;
- /*
* @public function constructor
* @param null
*/
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-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_blocks.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,20 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class LanguageBlocks extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $table = null;
- /*
- * @var string
- */
- private $tables = null;
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_help.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_help.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_help.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -23,11 +23,6 @@
class LanguageHelp extends TDMCreateFile
{
/*
- * @var string
- */
- private $tdmcfile = null;
-
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_main.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_main.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_main.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,20 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class LanguageMain extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $table = null;
- /*
- * @var string
- */
- private $tables = null;
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_modinfo.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_modinfo.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_modinfo.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,20 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class LanguageModinfo extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $table = null;
- /*
- * @var string
- */
- private $tables = null;
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql_files.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql_files.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql_files.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,24 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class SqlFile extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $tdmcreate = null;
- /*
- * @var string
- */
- private $table = null;
- /*
- * @var string
- */
- private $tables = null;
- /*
* @public function constructor
* @param null
*/
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/tablefields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/tablefields.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/tablefields.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -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: tablefields.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+require_once 'abstract.php';
+class TableFields extends TDMCreateAbstract
+{
+ /*
+ * @public function constructor
+ * @param mixed $table
+ */
+ public function __construct() {
+
+ }
+ /*
+ * @param string $method
+ * @param array $args
+ */
+ public function __call($method, $args)
+ {
+ $arg = isset($args[0]) ? $args[0] : null;
+ return $this->getVar($method, $arg);
+ }
+ /*
+ * @static function &getInstance
+ * @param null
+ */
+ public static function &getInstance()
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self();
+ }
+ return $instance;
+ }
+ /*
+ * @public function getTableFields
+ * @param integer $index
+ */
+ public function getTableFields(integer $index) {
+ if(!is_array($this->table)) {
+ $fields = $this->table->getVar('table_fields');
+ } else {
+ $fields = $this->table[$index]->getVar('table_fields');
+ }
+ return explode('|', $fields);
+ }
+ /*
+ * @public function getTableParameters
+ * @param integer $index
+ */
+ public function getTableParameters(integer $index) {
+ if(!is_array($this->table)) {
+ $parameters = $this->table->getVar('table_parameters');
+ } else {
+ $parameters = $this->table[$index]->getVar('table_parameters');
+ }
+ return explode('|', $parameters);
+ }
+}
\ No newline at end of file
Deleted: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/tables_fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/tables_fields.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/tables_fields.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -1,83 +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: tables_fields.php 12258 2014-01-02 09:33:29Z timgno $
- */
-if (!defined('XOOPS_ROOT_PATH')) {
- die('XOOPS root path not defined');
-}
-
-class TablesFields
-{
- /*
- * @var mixed
- */
- public $table = null;
- /*
- * @public function constructor
- * @param mixed $table
- */
- public function __construct($table = null) {
- $this->table = $table;
- }
- /*
- * @param string $method
- * @param array $args
- */
- public function __call($method, $args)
- {
- $arg = isset($args[0]) ? $args[0] : null;
- return $this->getVar($method, $arg);
- }
- /*
- * @static function &getInstance
- * @param null
- */
- public static function &getInstance()
- {
- static $instance = false;
- if (!$instance) {
- $instance = new self();
- }
- return $instance;
- }
- /*
- * @public function getTableFields
- * @param integer $index
- */
- public function getTableFields(integer $index) {
- if(!is_array($this->table)) {
- $fields = $this->table->getVar('table_fields');
- } else {
- $fields = $this->table[$index]->getVar('table_fields');
- }
- return explode('|', $fields);
- }
- /*
- * @public function getTableParameters
- * @param integer $index
- */
- public function getTableParameters(integer $index) {
- if(!is_array($this->table)) {
- $parameters = $this->table->getVar('table_parameters');
- } else {
- $parameters = $this->table[$index]->getVar('table_parameters');
- }
- return explode('|', $parameters);
- }
-}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_footer.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_footer.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_footer.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,16 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class TemplatesFooter extends HtmlSmartyCodes
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $table = null;
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_header.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_header.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,16 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class TemplatesHeader extends HtmlSmartyCodes
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $tables = null;
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_index.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_index.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_index.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,13 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class TemplatesIndex extends HtmlSmartyCodes
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
-
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_pages.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_pages.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_pages.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -23,16 +23,8 @@
}
class TemplatesPages extends HeaderFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $tables = null;
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_footer.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_footer.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_footer.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,13 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class UserFooter extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
-
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_header.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_header.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,13 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class UserHeader extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
-
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_index.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_index.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_index.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,16 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class UserIndex extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $table = null;
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_notification_update.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_notification_update.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_notification_update.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -23,11 +23,6 @@
class UserNotificationUpdate extends TDMCreateFile
{
/*
- * @var string
- */
- private $tdmcfile = null;
-
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_pages.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_pages.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_pages.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,16 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class UserPages extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $table = null;
- /*
* @public function constructor
* @param null
*/
@@ -174,13 +166,13 @@
}
}
$lp_field_name = substr($field_name, 0, strpos($field_name, '_'));
- if(( $f > 1 ) && ($this->table->getVar('table_autoincrement') == 1)){
+ if(( $f > 0 ) && ($this->table->getVar('table_autoincrement') == 1)){
$fpe = $fields_all[$f]->getVar('field_element');
- } else {
- if ( $fields_all[$f]->getVar('field_main') == 1 ) {
- $fpmf = $field_name; // fpmf = fields parameters main field
- }
+ }
+ if ( $fields_all[$f]->getVar('field_main') == 1 ) {
+ $fpmf = $field_name; // fpmf = fields parameters main field
}
+
// Verify if this is a textarea or dhtmltextarea
if ( $fpe == 2 || $fpe == 3 ) {
$content .= <<<EOT
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_print.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_print.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_print.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,20 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class UserPrint extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $table = null;
- /*
- * @var string
- */
- private $fields = null;
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_rss.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_rss.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_rss.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,20 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class UserRss extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $table = null;
- /*
- * @var string
- */
- private $fields = null;
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_submit.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_submit.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_submit.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,20 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class UserSubmit extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $table = null;
- /*
- * @var string
- */
- private $fields = null;
- /*
* @public function constructor
* @param null
*/
Modified: 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-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_templates.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,16 +21,8 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class UserTemplates extends HtmlSmartyCodes
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
- * @var string
- */
- private $tables = null;
- /*
* @public function constructor
* @param null
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_xoopsversion.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_xoopsversion.php 2014-06-06 15:19:10 UTC (rev 12567)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_xoopsversion.php 2014-06-07 10:22:26 UTC (rev 12568)
@@ -21,24 +21,13 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
class UserXoopsVersion extends TDMCreateFile
-{
+{
/*
- * @var string
- */
- private $tdmcfile = null;
- /*
* @var array
*/
- private $keywords = array();
+ private $keywords = array();
+
/*
- * @var string
- */
- private $table = null;
- /*
- * @var string
- */
- private $tables = null;
- /*
* @public function constructor
* @param null
*/
|