phpcms-plugins-cvs Mailing List for phpCMS-plugins (Page 11)
Brought to you by:
mjahn
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(40) |
Jun
(38) |
Jul
(36) |
Aug
(46) |
Sep
(13) |
Oct
(1) |
Nov
|
Dec
(57) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(2) |
Feb
(19) |
Mar
|
Apr
(43) |
May
(119) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Martin J. <mj...@us...> - 2004-09-29 20:10:51
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/filemanager/img In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19438/modules/filemanager/img Added Files: reload.gif down.gif upload.gif edit.gif newdir.gif newfile.gif browse.gif down_active.gif move.gif arrow.gif delete.gif delete_all.gif up.gif home.gif edit_inactive.gif empty.gif up_active.gif Log Message: completed phpCMS-config-part began the statistic part --- NEW FILE: down.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: arrow.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: down_active.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: edit_inactive.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: edit.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: up.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: home.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: move.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: delete_all.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: reload.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: up_active.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: browse.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: upload.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: empty.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: newfile.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: newdir.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: delete.gif --- (This appears to be a binary file; contents omitted.) |
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/filemanager/img/filetypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19438/modules/filemanager/img/filetypes Added Files: xml.gif phpcms.project.gif help.gif realmedia.gif csv.gif photoshop.gif word.gif movie.gif access.gif clientscript.gif css.gif phpcms.menutemplate.gif webpage.gif phpcms.menu.gif excel.gif folder.gif phpcms.template.gif quicktime.gif archive.gif symlink.gif parent.gif serverscript.gif executable.gif targa.gif text.gif midi.gif security.gif phpcms.tag.gif audio.gif folder_inactive.gif richtext.gif bitmap.gif winmedia.gif flash.gif webimage.gif powerpoint.gif wap.gif acrobat.gif Log Message: completed phpCMS-config-part began the statistic part --- NEW FILE: archive.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: folder_inactive.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: word.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: audio.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: serverscript.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: webimage.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: richtext.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: excel.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: midi.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: csv.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: winmedia.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: wap.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: css.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: photoshop.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: folder.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: bitmap.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: phpcms.project.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: executable.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: flash.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: clientscript.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: realmedia.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: phpcms.menutemplate.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: phpcms.menu.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: security.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: movie.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: xml.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: symlink.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: phpcms.tag.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: phpcms.template.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: webpage.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: parent.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: quicktime.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: access.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: text.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: powerpoint.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: targa.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: acrobat.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: help.gif --- (This appears to be a binary file; contents omitted.) |
From: Martin J. <mj...@us...> - 2004-09-29 20:10:13
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/filemanager/img In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19271/modules/filemanager/img Log Message: Directory /cvsroot/phpcms-plugins/admin4phpCMS/modules/filemanager/img added to the repository |
From: Martin J. <mj...@us...> - 2004-09-29 20:10:13
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/filemanager/img/filetypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19271/modules/filemanager/img/filetypes Log Message: Directory /cvsroot/phpcms-plugins/admin4phpCMS/modules/filemanager/img/filetypes added to the repository |
From: Martin J. <mj...@us...> - 2004-08-28 08:44:56
|
Update of /cvsroot/phpcms-plugins/install4phpCMS/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29220/include Added Files: class.install4phpcms.php Log Message: reconstruction for the new releases --- NEW FILE: class.install4phpcms.php --- <?php /** * Install4phpCMS - the new phpCMS-installer * * <b>License</b> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * 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. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @author Martin Jahn <mj...@us...> * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright Copyright (c) 2004, Martin Jahn * @version $Id$ * @package install4phpcms **/ /* * $Log$ */ /** * the main class of install4phpCMS * * @package install4phpcms * @author Martin Jahn <mj...@us...> * @version $Id$ **/ class install4phpCMS { /** * @var array $_session is a reference to the global SESSION-array (for better portability) * @access private **/ var $_session = array (); /** * constructor method - compatibility mode with PHP4 * @access private **/ function install4phpCMS () { return $this->__construct(); } /** * constructor method * @access private **/ function __construct () { } /** * main function of the class * * this function contains the whole workflow of the installation-process **/ function run () { } /** * get list of directories with write-permission for PHP * * @access private **/ function _getDirList () { } /** * download an installation archive from phpcms.de * * @access private * @param $server string contains the server, where the archive can be downloaded **/ function _getArchive ($server = 'phpcms.de') { } /** * extract the installation-archive into the destination-directory * * @access private * @param $destination string contains the directory, where to extract the package **/ function _extractArchive ($destination) { } /** * this function sets corrects the permission of the extracted files and directories * * @access private **/ function _setPermission () { } /** * this function parses the configuration-file into an array * * @access private **/ function _getConfigfile () { } /** * this function sets the tags and their content for the search-replace-process in the installation-files * * @access private **/ function _setVariables () { } /** * this function replaces the tags in the installed files with the correct content * * @access private **/ function _replaceTags () { } /** * this function tries to autoconfigure the stealth-mode via URI-detection * * @access private **/ function _autoStealthMode () { } /** * set a session variable * * this funcion is a wrapper around the session-managment, so that it can easily be changed everytime * * @access private * @param $id string name/identifier of the variable * @param $value string value of the variable **/ function _setSessionVar ($id, $value) { } /** * get a session variable * * this funcion is a wrapper around the session-managment, so that it can easily be changed everytime * * @access private * @param $id string name/identifier of the variable * @return string the value of the wished variable or NULL if the variable does not exist **/ function _getSessionVar ($id) { } } ?> |
From: Martin J. <mj...@us...> - 2004-08-28 08:44:55
|
Update of /cvsroot/phpcms-plugins/install4phpCMS In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29220 Added Files: index.php .project Log Message: reconstruction for the new releases --- NEW FILE: .project --- <?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>install4phpCMS</name> <comment></comment> <projects> <project>phpcms</project> <project>phpcms-installer</project> </projects> <buildSpec> </buildSpec> <natures> </natures> </projectDescription> --- NEW FILE: index.php --- <?php /** * Install4phpCMS - the new phpCMS-installer * * <b>License</b> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * 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. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @author Martin Jahn <mj...@us...> * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright Copyright (c) 2004, Martin Jahn * @version $Id$ * @package install4phpcms **/ /* * $Log$ */ ?> |
From: Martin J. <mj...@us...> - 2004-08-28 08:44:38
|
Update of /cvsroot/phpcms-plugins/install4phpCMS/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29194/include Log Message: Directory /cvsroot/phpcms-plugins/install4phpCMS/include added to the repository |
From: Martin J. <mj...@us...> - 2004-08-28 08:43:06
|
Update of /cvsroot/phpcms-plugins/install4phpCMS In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28996/install4phpCMS Log Message: Directory /cvsroot/phpcms-plugins/install4phpCMS added to the repository |
From: Martin J. <mj...@us...> - 2004-08-25 21:21:49
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/statistik In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3559/modules/statistik Modified Files: .cvsignore Log Message: step 1 is taken Index: .cvsignore =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/statistik/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- .cvsignore 5 Aug 2004 16:38:42 -0000 1.1 +++ .cvsignore 25 Aug 2004 21:21:00 -0000 1.2 @@ -1,2 +1,3 @@ jpgraph* fonts +stat.txt |
From: Martin J. <mj...@us...> - 2004-08-25 21:21:13
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/filemanager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3559/modules/filemanager Modified Files: class.module_filemanager.php Added Files: layout.filemanager.xml Log Message: step 1 is taken --- NEW FILE: layout.filemanager.xml --- <?xml version="1.0" encoding="iso-8859-15" standalone="yes"?> <layout name="standard"> <layout:insert name="fm_list"> <![CDATA[ <h2>Verzeichnis: <layout:replace name="basedir" default="" /></h2> <div class="iconbar"> <a href="?moduleid=filemanager&basedir=/&action=viewdir" accesskey="h" alt="Alt+H" title="Heimatverzeichnis [Alt + H]">Home</a> <a href="#" onclick="Javascript:location.reload(); return false;" onkeypress="Javascript:location.reload(); return false;" accesskey="r" alt="Alt+R" title="Anzeige neu laden [Alt + R]">Reload</a> <button type="submit" name="fm-delete-selection" title="Lösche ausgwählte Einträge">Löschen</button> </div> <ul id="filelist"> <li class="header"> <img src="modules/layout/img/empty.gif" width="16" height="16" title="" alt="" class="input" /> <img src="modules/layout/img/empty.gif" width="16" height="16" title="" alt="" class="icon" /> <img src="modules/layout/img/empty.gif" width="16" height="16" title="" alt="" class="icon" /> <span class="chmod" title="Besitzer: UID\nGruppe: GID">Rechte</span> <span class="filesize" title="Dateigröße">Größe</span> <span class="filemtime" title="Last modified">Letzte Änderung</span> <span class="filename">Name</span> </li> <layout:replace name="content" default="" /> </ul> ]]> </layout:insert> <layout:insert name="fm_dir"> <![CDATA[ <li <layout:replace name="extra" default="" />> <input type="checkbox" name="select[<layout:replace name="filename" default="" />]" value="selected" id="select[<layout:replace name="filename" default="" />]" /> <a href="?moduleid=filemanager&basedir=<layout:replace name="basedir" default="/" />&file=<layout:replace name="filename" default="" />&action=viewdir" title="Verzeichnis öffnen" > <img src="modules/layout/img/filetypes/<layout:replace name="filetype" default="" />.gif" width="16" height="16" title="" alt="open" class="icon" /> </a> <img src="modules/layout/img/empty.gif" width="16" height="16" title="" alt="" class="input" /> <span class="chmod" title="Besitzer: <layout:replace name="uid" default="" /> <> Gruppe: <layout:replace name="gid" default="" />"> <layout:replace name="chmod" default="0000" /></span> <span class="filesize" title="Dateigröße"><layout:replace name="filesize" default="1 kB" /></span> <span class="filemtime" title="Last modified"><layout:replace name="filemtime" default="" /></span> <a href="?moduleid=filemanager&basedir=<layout:replace name="basedir" default="/" />&file=<layout:replace name="filename" default="" />&action=viewdir" title="Verzeichnis öffnen" class="filename"> <layout:replace name="filename" default="" /> </a> </li> ]]> </layout:insert> <layout:insert name="fm_dir_inactive"> <![CDATA[ <li <layout:replace name="extra" default="" />> <img src="modules/layout/img/empty.gif" width="16" height="16" title="" alt="" class="input" /> <img src="modules/layout/img/filetypes/<layout:replace name="filetype" default="" />.gif" width="16" height="16" title="" alt="" class="icon" /> <img src="modules/layout/img/empty.gif" width="16" height="16" title="" alt="" class="input" /> <span class="chmod" title="Besitzer: <layout:replace name="uid" default="" /> <> Gruppe: <layout:replace name="gid" default="" />"> <layout:replace name="chmod" default="0000" /></span> <span class="filesize" title="Dateigröße"><layout:replace name="filesize" default="1 kB" /></span> <span class="filemtime" title="Last modified"><layout:replace name="filemtime" default="" /></span> <span class="filename"><layout:replace name="filename" default="" /></span> </li> ]]> </layout:insert> <layout:insert name="fm_file"> <![CDATA[ <li <layout:replace name="extra" default="" />> <input type="checkbox" name="select[<layout:replace name="filename" default="" />]" value="selected" id="select[<layout:replace name="filename" default="" />]" /> <a href="?moduleid=filemanager&basedir=<layout:replace name="basedir" default="/" />&file=<layout:replace name="basedir" default="/" /><layout:replace name="filename" default="" />&action=viewfile" title="Datei anzeigen" > <img src="modules/layout/img/filetypes/<layout:replace name="filetype" default="" />" width="16" height="16" title="" alt="view" class="icon" /> </a> <a href="?moduleid=filemanager&basedir=<layout:replace name="basedir" default="/" />&file=<layout:replace name="basedir" default="/" /><layout:replace name="filename" default="" />&action=editfile" title="Datei editieren" > <img src="modules/layout/img/edit.gif" width="16" height="16" title="" alt="edit" class="icon" /> </a> <span class="chmod" title="Besitzer: <layout:replace name="uid" default="" /> <> Gruppe: <layout:replace name="gid" default="" />"><layout:replace name="chmod" default="0000" /></span> <span class="filesize" title="Dateigröße"><layout:replace name="filesize" default="1 kB" /></span> <span class="filemtime" title="Last modified"><layout:replace name="filemtime" default="00.00.0000 00:00:00" /></span> <span class="filename"><layout:replace name="filename" default="" /></span> </li> ]]> </layout:insert> <layout:insert name="fm_file_inactive"> <![CDATA[ <li <layout:replace name="extra" default="" />> <img src="modules/layout/img/empty.gif" width="16" height="16" title="" alt="" class="input" /> <a href="?moduleid=filemanager&basedir=<layout:replace name="basedir" default="/" />&file=<layout:replace name="basedir" default="/" /><layout:replace name="filename" default="" />&action=viewfile" title="Datei anzeigen" > <img src="modules/layout/img/filetypes/<layout:replace name="filetype" default="" />" width="16" height="16" title="" alt="view" class="icon" /> </a> <img src="modules/layout/img/edit_inactive.gif" width="16" height="16" title="" alt="" class="icon" /> <span class="chmod" title="Besitzer: <layout:replace name="uid" default="" /> <> Gruppe: <layout:replace name="gid" default="" />"><layout:replace name="chmod" default="0000" /></span> <span class="filesize" title="Dateigröße"><layout:replace name="filesize" default="1 kB" /></span> <span class="filemtime" title="Last modified"><layout:replace name="filemtime" default="00.00.0000 00:00:00" /></span> <span class="filename"><layout:replace name="filename" default="" /></span> </li> ]]> </layout:insert> <layout:insert name="fm_sum"> <![CDATA[ <li class="footer"> <img src="modules/layout/img/arrow.gif" width="16" height="16" title="" alt="" class="input" /> <input type="image" name="fm-delete-selection" src="modules/layout/img/delete.gif" alt="del" title="Lösche ausgwählte Einträge" /> <img src="modules/layout/img/empty.gif" width="16" height="16" title="" alt="" class="input" /> <span class="chmod"> </span> <span class="filesize" title=""><layout:replace name="sumsize" default="1 kB" /></span> <span class="filemtime"> </span> <span class="filename"><layout:replace name="dirs" default="0" /> Verzeichnisse/<layout:replace name="files" default="0" /> Dateien</span> </li> ]]> </layout:insert> <layout:insert name="fm_new"> <![CDATA[ <fieldset> <legend>Datei anlegen</legend> <label title="Im aktuelen Verzeichnis eine neue Datei anlegen">Neuer Dateiname <input type="text" name="fm-new-file-name" value="Neuer Dateiname" /></label> <label title="Vorlagen für die neue Datei, Leer ist Standard">Template auswählen <select name="fm-new-file-tpl" size="1"><option value="empty">Leer</option><option value="projectfile">phpCMS-Projektdatei</option><option value="menufile">phpCMS-Menüdatei</option></select></label> </fieldset> <fieldset> <legend>Verzeichnis anlegen</legend> <label title="Im aktuellen Verzeichnis ein neues Unterverzeichnis angelegen">Verzeichnisname: <input type="text" name="fm-new-subdir-name" value="Neuer Verzeichnisname" /></label> </fieldset> <button type="submit" name="fm-new-submit" value="1">Anlegen</button> ]]> </layout:insert> <layout:insert name="fm_upload"> <![CDATA[ <fieldset> <legend>Datei auf den Server laden</legend> <label title="Datei in das aktuelle Verzeichnis auf dem Server laden">Datei wählen <input type="file" name="fm-upload-file-name" /></label> <label title=""><input type="checkbox" name="fm-upload-archiv" value="1" />Archiv entpacken</label> </fieldset> <fieldset> <legend>Optionen</legend> <label>Verzeichnisname <input type="text" name="fm-new-subdir-name" value="Neuer Verzeichnisname" /></label> </fieldset> <button type="submit" name="fm-upload-submit" value="1">auf den Server laden</button> ]]> </layout:insert> <layout:insert name="fm_backup"> <![CDATA[ <fieldset> <legend>Format</legend> <label><input type="radio" name="fm-backup-compress" value="tgz" /> tar.gz</label> <label><input type="radio" name="fm-backup-compress" value="tbz" /> tar.bz</label> <label><input type="radio" name="fm-backup-compress" value="zip" /> zip</label> </fieldset> <fieldset> <legend>Aktion</legend> <label><input type="radio" name="fm-backup-send" value="down" onclick="" onkeypress="" /> herunterladen</label> <label><input type="radio" name="fm-backup-send" value="email" onclick="" onkeypress="" /> mailen</label> </fieldset> <fieldset id="fm-backup-send-email" class="hidden"> <legend>Emaildaten</legend> <label>Emailadresse <input type="text" name="fm-backup-mailto" value="ma...@ex..." /></label> </fieldset> <button type="submit" name="fm-backup-submit" value="1">Los geht's</button> ]]> </layout:insert> <layout:insert name="fm_clipboard"> <![CDATA[ <fieldset> <legend>Aktion</legend> <label title="Auswahl aus dem Verzeichnis in die Zwischenablage kopieren"><input type="radio" name="fm-clipboard-action" value="copy-select" /> Auswahl in Zwischenablage</label> <label title="Auswahl aus der Zwischenablage in das Verzeichnis kopieren"><input type="radio" name="fm-clipboard-action" value="insert-select" /> Auswahl in Verzeichnis</label> <label title="Auswahl aus der Zwischenablage löschen"><input type="radio" name="fm-clipboard-action" value="delete-select" /> Auswahl löschen</label> </fieldset> <fieldset> <legend>Inhalt der Zwischenablage</legend> <layout:replace name="content" default="" /> </fieldset> <button type="submit" name="fm-clipboard-submit" value="1">Aktion ausführen</button> ]]> </layout:insert> <layout:insert name="fm_clipboard_file"> <![CDATA[ <label title="<layout:replace name="title" />"><input type="checkbox" name="select-clipboard-<layout:replace name="filename" />" value="1" /> <layout:replace name="label" /></label> ]]> </layout:insert> </layout> Index: class.module_filemanager.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/filemanager/class.module_filemanager.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- class.module_filemanager.php 25 Aug 2004 21:16:48 -0000 1.6 +++ class.module_filemanager.php 25 Aug 2004 21:21:01 -0000 1.7 @@ -28,6 +28,9 @@ /* * $Log$ +* Revision 1.7 2004/08/25 21:21:01 mjahn +* step 1 is taken +* * Revision 1.6 2004/08/25 21:16:48 mjahn * step 1 is taken * @@ -72,9 +75,6 @@ $this->_callEvent ('CONFIG_GET', $actiondata1); $this->CONF =& $actiondata1 ['config']; include_once (dirname (__FILE__).'/config.filemanager.php'); - - $actiondata1 = array ('filename'=>dirname (__FILE__).'/layout.xml'); - $this->_callEvent ('LAYOUT_ADD_TEMPLATE', $actiondata1); } /** @@ -82,6 +82,9 @@ **/ function parseParam (&$actiondata) { + $actiondata1 = array ('filename'=>dirname (__FILE__).'/layout.filemanager.xml'); + $this->_callEvent ('LAYOUT_ADD_TEMPLATE', $actiondata1); + $this->display = (isset ($actiondata['request']['moduleid']) && $actiondata['request']['moduleid'] == 'filemanager'); $this->viewdir = $this->viewfile = $this->editfile = $this->action = ''; |
From: Martin J. <mj...@us...> - 2004-08-25 21:21:12
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/editor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3559/modules/editor Added Files: layout.editor.xml Log Message: step 1 is taken --- NEW FILE: layout.editor.xml --- <?xml version="1.0" encoding="iso-8859-15" standalone="yes"?> <layout name="standard"> <layout:insert name="ed_viewer"> <![CDATA[ <h2>Dateibetrachter für <em><layout:replace name="filename" /></em></h2> <div class="iconbar"> <a href="?moduleid=filemanager&basedir=<layout:replace name="basedir" default="/" />&action=viewdir" title="Dateibetrachter schließen" >Zurück</a> <a href="?moduleid=editor&file=<layout:replace name="filename" default="/" />&action=editfile" title="Datei bearbeiten" >Editieren</a> <a href="?moduleid=editor&file=<layout:replace name="filename" default="/" />&action=copyfile" title="Dateiinhalt in die Zwischenablage kopieren" >Kopieren</a> </div> <div id="fileviewer"> <layout:replace name="content" default="" /> </div> ]]> </layout:insert> <layout:insert name="ed_viewer_text_line"> <![CDATA[ <span class="linenumber"><layout:replace name="line" default=" " /></span> <layout:replace name="content" default=" " /><br /> ]]> </layout:insert> <layout:insert name="ed_editor"> <![CDATA[ <h2>Dateieditorr für <em><layout:replace name="filename" /></em></h2> <div class="iconbar"> <a href="?moduleid=filemanager&basedir=<layout:replace name="basedir" default="/" />&action=viewdir" title="Dateibetrachter schließen" >Zurück</a> <a href="?moduleid=editor&file=<layout:replace name="filename" default="/" />&action=copyfile" title="Dateiinhalt in die Zwischenablage kopieren" >Kopieren</a> <a href="?moduleid=editor&file=<layout:replace name="filename" default="/" />&action=pastefile" title="Inhalt aus der Zwischenablage einfügen" >Einfügen</a> </div> <div id="fileeditor"> <layout:replace name="content" default="" /> </div> ]]> </layout:insert> <layout:insert name="ed_editor_text"> <![CDATA[ <textarea cols="40" rows="20" name="ed-editor-file-content"><layout:replace name="content" default="" /></textarea> ]]> </layout:insert> </layout> |
From: Martin J. <mj...@us...> - 2004-08-25 21:21:12
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3559 Modified Files: .cvsignore Log Message: step 1 is taken Index: .cvsignore =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- .cvsignore 24 Jul 2004 08:58:25 -0000 1.1 +++ .cvsignore 25 Aug 2004 21:21:02 -0000 1.2 @@ -1 +1,4 @@ pear +efc_xfss-2003-08-22.tar.gz +md5.php +phpplugin-2004-06-13.tar.gz |
From: Martin J. <mj...@us...> - 2004-08-25 21:21:12
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/debug In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3559/modules/debug Added Files: layout.debug.xml Log Message: step 1 is taken --- NEW FILE: layout.debug.xml --- <?xml version="1.0" encoding="iso-8859-15" standalone="yes"?> <layout name="standard"> <layout:insert name="framebox"> <![CDATA[ <div class="iframe" style="width:<layout:replace name="width" default="100%" />; height:<layout:replace name="height" default="5em" />"> <layout:replace name="content" default="" /> </div> ]]> </layout:insert> <layout:insert name="cachedir"> <![CDATA[ <li class="subdir"> <input type="checkbox" name="deletedir[<layout:replace name="cachedir" />]" value="1" /> <layout:replace name="dirname" /> <ul> <layout:replace name="content" default="" /> </ul> </li> ]]> </layout:insert> <layout:insert name="cachefile"> <![CDATA[ <li> <input type="checkbox" name="delete[<layout:replace name="cachefile" />]" value="1" /> <span title="<layout:replace name="cachefile" />"><layout:replace name="filename" /></span> <span class="<layout:replace name="cachetype" />">CACHE</span> <span><layout:replace name="cachetime" /></span> </li> ]]> </layout:insert> </layout> |
From: Martin J. <mj...@us...> - 2004-08-25 21:17:28
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/filemanager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2565/modules/filemanager Modified Files: class.file_util.php class.module_filemanager.php Log Message: step 1 is taken Index: class.module_filemanager.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/filemanager/class.module_filemanager.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- class.module_filemanager.php 5 Aug 2004 16:38:41 -0000 1.5 +++ class.module_filemanager.php 25 Aug 2004 21:16:48 -0000 1.6 @@ -28,6 +28,9 @@ /* * $Log$ +* Revision 1.6 2004/08/25 21:16:48 mjahn +* step 1 is taken +* * Revision 1.5 2004/08/05 16:38:41 mjahn * tweaked phpcms::cache-module output * @@ -52,22 +55,26 @@ /** * Filemanager-class for administrative work in the filesystem * +* @todo include code for virtual filesystem (i.e. to browe compressed archives like a directory). +* @todo the vfs-plugins-api with methods for reading, writing, creating and deleting files and directories +* @todo the vfs-plugin must register a handler for each single action, so that the filemanager could retrieve the correct information * @package admin4phpCMS * @subpackage module_filemanager * @uses file_editor **/ - class module_filemanager extends module { - function init () { // connect to actions $this->_registerAction ('doParseParam', 'parseParam'); $this->_registerAction ('doProcess', 'process'); $this->docroot = realpath ($_SERVER['DOCUMENT_ROOT']); - $actiondata = array ('module'=>'filemanager'); - $this->_callEvent ('CONFIG_GET', $actiondata); - $this->CONF =& $actiondata ['config']; + $actiondata1 = array ('module'=>'filemanager'); + $this->_callEvent ('CONFIG_GET', $actiondata1); + $this->CONF =& $actiondata1 ['config']; include_once (dirname (__FILE__).'/config.filemanager.php'); + + $actiondata1 = array ('filename'=>dirname (__FILE__).'/layout.xml'); + $this->_callEvent ('LAYOUT_ADD_TEMPLATE', $actiondata1); } /** @@ -103,8 +110,8 @@ $this->basedir = realpath ($this->docroot.'/'.$this->basedir.'/'.$this->viewdir).'/'; if (strpos ($this->basedir, $this->docroot) === false) { $this->basedir = '/'; - $actiondata = array ('errortext'=>'Das Verzeichnis liegt außerhalb des zugelassenen Bereiches!'); - $this->_callEvent ('ERROR_NOTICE', $actiondata); + $actiondata1 = array ('errortext'=>'Das Verzeichnis liegt außerhalb des zugelassenen Bereiches!'); + $this->_callEvent ('ERROR_NOTICE', $actiondata1); } else { $this->basedir = str_replace ($this->docroot, '', $this->basedir); } @@ -116,9 +123,9 @@ * @param array $actiondata **/ function process (&$actiondata) { - $actiondata = array(); - $this->_callEvent ('USER_GET_STATUS', $actiondata); - $this->_USER = $actiondata; + $actiondata1 = array(); + $this->_callEvent ('USER_GET_STATUS', $actiondata1); + $this->_USER = $actiondata1; if (!$this->_USER['isLoggedIn']) { return true; @@ -149,11 +156,11 @@ **/ function getMenuMain (&$actiondata) { $root = $actiondata['_root']; - $actiondata = array ('_type'=>'menu_main_entry', '_root'=>$root, 'name'=>'Dateimanager', 'module'=>'filemanager', '_id'=>'filemanager', '_root'=>'mainmenu'); + $actiondata1 = array ('_type'=>'menu_main_entry', '_root'=>$root, 'name'=>'Dateimanager', 'module'=>'filemanager', '_id'=>'filemanager', '_root'=>'mainmenu'); if ($this->display) { - $actiondata ['extra'] = 'class="active"'; + $actiondata1 ['extra'] = 'class="active"'; } - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); } /** @@ -164,29 +171,29 @@ $root = $actiondata['_root']; - $actiondata = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Dateimanager', 'module'=>'filemanager', '_id'=>'files'); + $actiondata1 = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Dateimanager', 'module'=>'filemanager', '_id'=>'files'); if ($this->action == '') { - $actiondata['id'] = 'current'; + $actiondata1['id'] = 'current'; } - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); - $actiondata = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Hochladen', 'module'=>'filemanager', '_id'=>'uploads', 'action'=>'upload'); + $actiondata1 = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Hochladen', 'module'=>'filemanager', '_id'=>'uploads', 'action'=>'upload'); if ($this->action == 'upload') { - $actiondata['id'] = 'current'; + $actiondata1['id'] = 'current'; } - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); - $actiondata = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Backups', 'module'=>'filemanager', '_id'=>'backups', 'action'=>'backup'); + $actiondata1 = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Backups', 'module'=>'filemanager', '_id'=>'backups', 'action'=>'backup'); if ($this->action == 'backup') { - $actiondata['id'] = 'current'; + $actiondata1['id'] = 'current'; } - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); - $actiondata = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Editor', 'module'=>'filemanager', '_id'=>'editor', 'action'=>'editor'); + $actiondata1 = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Editor', 'module'=>'filemanager', '_id'=>'editor', 'action'=>'editor'); if ($this->action == 'editor') { - $actiondata['id'] = 'current'; + $actiondata1['id'] = 'current'; } - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); } @@ -222,7 +229,7 @@ } // skip hidden files - if ($entry{0} == '.' && $entry{1} != '.') { + if ($entry{0} == '.' && (strlen ($entry) > 1 && $entry{1} != '.')) { continue; } @@ -238,38 +245,15 @@ } } closedir ($dh); - sort ($dirs); - sort ($files); + + $this->_userSort ($dirs, $files); $entries = array_merge ($dirs, $files); unset ($files, $dirs); $num = count ($entries); - $actiondata = array ('_type'=>'headline', '_id'=>'headline', '_root'=>$root, - 'content'=>'Verzeichnis: '.htmlentities ($this->basedir)); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - - $actiondata = array ('_type'=>'ulist', '_id'=>'filelist', '_root'=>$root, 'extra'=>'id="filelist"',); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - - $actiondata = array ('_type'=>'filelist_entry', '_id'=>'list-0', '_root'=>'filelist', - 'extra'=>'class="header"', 'filesize'=>'Größe', 'filemtime'=>'Letzte Änderung', 'chmod'=>'CHMOD', 'gid'=>'GID', 'uid'=>'UID'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - - $actiondata = array ('_root'=>'list-0', '_id'=>'list-img-0', '_type'=>'image', - 'src'=>'modules/layout/img/empty.gif', 'width'=>'16', 'height'=>'16', 'title'=>'', 'alt'=>'', 'extra'=>'class="input"'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - - $actiondata = array ('_root'=>'list-0', '_id'=>'list-img-1', '_type'=>'image', 'src'=>'modules/layout/img/empty.gif', - 'width'=>'16', 'height'=>'16', 'title'=>'', 'alt'=>'', 'extra'=>'class="icon"'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - - $actiondata = array ('_root'=>'list-0', '_id'=>'list-img-2', '_type'=>'image', 'src'=>'modules/layout/img/empty.gif', - 'width'=>'16', 'height'=>'16', 'title'=>'', 'alt'=>'', 'extra'=>'class="icon"'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - - // set filename - $actiondata = array ('_root'=>'list-0', '_id'=>'file0', '_type'=>'inline', 'extra'=>'class="filename""', 'content'=>'Name'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_type'=>'fm_list', '_id'=>'filelist', '_root'=>$root, + 'basedir'=>htmlentities ($this->basedir)); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); $alternate = 1; $sum_size = 0; @@ -294,15 +278,7 @@ $file['filectime'] = strftime ('%d.%m.%Y %H:%M:%S', $data[8]); $file['fileatime'] = strftime ('%d.%m.%Y %H:%M:%S', $data[10]); $file['filesize'] = file_util::filesize ($dir.'/'.$entry); - $file['chmod'] = array ('oct'=>file_util::fileperms($dir.'/'.$entry)); - // set file-list-item - $actiondata = array ( - '_type'=>'filelist_entry', '_id'=>'list-'.$entry, '_root'=>'filelist', 'filename'=>htmlentities ($entry), - 'filesize'=>$file['filesize'], 'fileatime'=>$file['fileatime'], 'filectime'=>$file['filectime'], - 'filemtime'=>$file['filemtime'], 'gid'=>$file['gid']['str'], 'uid'=>$file['uid']['str'], 'chmod'=>$file['chmod']['oct'], - 'extra'=>'class="line'.$alternate++.'"'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - + $file['chmod'] = array ('oct'=>file_util::fileperms($dir.'/'.$entry), 'str'=>file_util::fileperms ($dir.'/'.$entry, true)); $entrypath = realpath ($dir.'/'.$entry); // entry is directory @@ -310,67 +286,52 @@ $nolink = false; - // entry is parent directory + // check if entry is parent directory if ($entry == '..') { $type = 'parent'; - $actiondata = array ('_root'=>'list-'.$entry, '_id'=>'img-empty-'.$entry, '_type'=>'image', 'src'=>'modules/layout/img/empty.gif', 'width'=>'16', 'height'=>'16', 'alt'=>'', 'title'=>'', 'extra'=>'class="input" id="input""'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + } elseif ($entry == '.') { + $type = 'empty'; + $nolink = true; } else { $num_dirs++; $type = 'folder'; - $actiondata = array ('_root'=>'list-'.$entry, '_id'=>'select-'.$entry, '_type'=>'form_checkbox_simple', 'id'=>'select['.$entry.']', 'name'=>'select['.$entry.']', 'value'=>'selected', 'title'=>'Auswählen', 'extra'=>'class="input"'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - + // check if entry has executive permission if (!@file_exists($entrypath.'/.')) { $type = 'folder_inactive'; $nolink = true; } + // check if entry has reading permission if (!is_readable ($entrypath)) { $type = 'folder_inactive'; $nolink = true; } - if (is_link ($entrypath)) { + // check if entry is a symlink + if (is_link ($dir.$entry)) { $type = 'symlink'; } } + // check if destination-path of entry is within the allowed path + if (!file_util::checkpath ($this->docroot, $entrypath)) { + $nolink = true; + } + + $actiondata1 = array ('_root'=>'filelist', '_id'=>'dir-'.$entry, 'basedir'=>$this->basedir, 'filename'=>htmlentities ($entry), 'filesize'=>$file ['filesize'], 'fileatime'=>$file ['fileatime'], 'filectime'=>$file ['filectime'], 'filemtime'=>$file ['filemtime'], 'gid'=>$file ['gid'] ['str'], 'uid'=>$file ['uid'] ['str'], 'chmod'=>$file ['chmod'] ['str'], 'extra'=>'class="line'.$alternate++.'"', 'filetype'=>$type); if ($nolink) { // set no link for open directory - $actiondata = array ('_root'=>'list-'.$entry, '_id'=>'view-'.$entry, '_type'=>'empty', 'href'=>'?moduleid=filemanager&basedir='.$this->basedir.'&file='.$entry.'&action=viewdir'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 ['_type'] = 'fm_dir_inactive'; + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); } else { // set link for open directory - $actiondata = array ('_root'=>'list-'.$entry, '_id'=>'view-'.$entry, '_type'=>'link', 'href'=>'?moduleid=filemanager&basedir='.$this->basedir.'&file='.$entry.'&action=viewdir', 'title'=>'Verzeichnis öffnen'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - } - // set image for link - $actiondata = array ('_root'=>'view-'.$entry, '_id'=>'img-view-'.$entry, '_type'=>'image', 'src'=>'modules/layout/img/filetypes/'.$type.'.gif', 'width'=>'16', 'height'=>'16', 'alt'=>'edit', 'extra'=>'class="icon"'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - - // set distance image - $actiondata = array ('_root'=>'list-'.$entry, '_id'=>'img-empty-'.$entry, '_type'=>'image', 'src'=>'modules/layout/img/empty.gif', 'width'=>'16', 'height'=>'16', 'alt'=>'', 'title'=>'', 'extra'=>'class="icon"'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - - // set filename - $actiondata = array ('_root'=>'list-'.$entry, '_id'=>'file-'.$entry, '_type'=>'inline', 'extra'=>'class="filename"'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - - if ($nolink) { - // set no link to filename - $actiondata = array ('_root'=>'file-'.$entry, '_id'=>'file-link-'.$entry, '_type'=>'empty', 'content'=>$entry); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - } else { - // set link to filename - $actiondata = array ('_root'=>'file-'.$entry, '_id'=>'file-link-'.$entry, '_type'=>'link', 'href'=>'?moduleid=filemanager&basedir='.$this->basedir.'&file='.$entry.'&action=viewdir', 'title'=>'Verzeichnis öffnen', 'content'=>$entry); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 ['_type'] = 'fm_dir'; + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); } } - if (is_file ($dir.'/'.$entry)) { $num_files++; @@ -383,58 +344,90 @@ break; } } + + // check if file is a symlink if (is_link ($dir.'/'.$entry)) { - $type = 'symlink'; + $type = 'symlink.gif'; } - $editor = 'edit'; - - // insert checkbox for selecting files - $actiondata = array ('_root'=>'list-'.$entry, '_id'=>'select-'.$entry, '_type'=>'form_checkbox_simple', 'extra'=>'id="select['.$entry.']"', 'class'=>'input', 'name'=>'select['.$entry.']', 'value'=>'selected', 'title'=>'Auswählen'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - - // insert view-link - $actiondata = array ('_root'=>'list-'.$entry, '_id'=>'view-'.$entry, '_type'=>'link', 'href'=>'?moduleid=filemanager&file='.$this->basedir.$entry.'&action=viewfile', 'title'=>'Datei anzeigen'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - - // insert image for view-link - $actiondata = array ('_root'=>'view-'.$entry, '_id'=>'img-view-'.$entry, '_type'=>'image', 'src'=>'modules/layout/img/filetypes/'.$type, 'width'=>'16', 'height'=>'16', 'alt'=>'view', 'title'=>'', 'extra'=>'class="icon"'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_root'=>'filelist', '_id'=>'file-'.$entry, 'filename'=>$entry, 'basedir'=>$this->basedir, 'filename'=>htmlentities ($entry), 'filesize'=>$file ['filesize'], 'fileatime'=>$file ['fileatime'], 'filectime'=>$file ['filectime'], 'filemtime'=>$file ['filemtime'], 'gid'=>$file ['gid'] ['str'], 'uid'=>$file ['uid'] ['str'], 'chmod'=>$file ['chmod'] ['str'], 'extra'=>'class="line'.$alternate++.'"', 'filetype'=>$type); - // insert edit-link - $actiondata = array ('_root'=>'list-'.$entry, '_id'=>'edit-'.$entry, '_type'=>'link', 'href'=>'?moduleid=filemanager&file='.$this->basedir.$entry.'&action=editfile', 'title'=>'Datei editieren'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - - // insert image for edit-link - $actiondata = array ('_root'=>'edit-'.$entry, '_id'=>'img-edit-'.$entry, '_type'=>'image', 'src'=>'modules/layout/img/'.$editor.'.gif', 'width'=>'16', 'height'=>'16', 'alt'=>'edit', 'title'=>'', 'extra'=>'class="icon"'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + // check if file is writeable + if (!is_writeable ($dir.'/'.$entry)) { + $actiondata1 ['_type'] = 'fm_file_inactive'; + } else { + $actiondata1 ['_type'] = 'fm_file'; + } - // set filename - $actiondata = array ('_root'=>'list-'.$entry, '_id'=>'file-'.$entry, '_type'=>'inline', 'extra'=>'class="filename"', 'content'=>$entry); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + // insert fileentry + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); } } - $actiondata = array ('_type'=>'filelist_entry', '_id'=>'list1', '_root'=>'filelist', - 'extra'=>'class="header"', 'filename'=>$num_dirs.' Verzeichnisse', 'filesize'=>file_util::filesize ($sum_size), 'filemtime'=>$num_files.' Dateien', - 'chmod'=>'', 'gid'=>'', ''=>'UID'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - - $actiondata = array ('_root'=>'list1', '_id'=>'list-img0', '_type'=>'image', - 'src'=>'modules/layout/img/empty.gif', 'width'=>'16', 'height'=>'16', 'title'=>'', 'alt'=>'', 'extra'=>'class="input"'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_root'=>'filelist', '_id'=>'filelist-summary', '_type'=>'fm_sum', 'dirs'=>$num_dirs, 'files'=>$num_files, 'sumsize'=>file_util::filesize ($sum_size)); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); - $actiondata = array ('_root'=>'list1', '_id'=>'list-img1', '_type'=>'image', - 'src'=>'modules/layout/img/empty.gif', 'width'=>'16', 'height'=>'16', 'title'=>'', 'alt'=>'', 'extra'=>'class="icon"'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + // set options-box + $actiondata1 = array ('_root'=>$root, '_id'=>'fm-options', '_type'=>'block', 'extra'=>'id="fm-options"'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); + + // set tablist + $actiondata1 = array ('_root'=>'fm-options', '_id'=>'tablist', '_type'=>'ulist', 'extra'=>'class="tabbed"'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); + + // set tabbox + $actiondata1 = array ('_root'=>'fm-options', '_id'=>'tabbox', '_type'=>'block', 'extra'=>'class="tabbox"'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); + + $tabs = array ( + array ('name'=>'Neu', 'id'=>'new'), + array ('name'=>'Hochladen', 'id'=>'upload'), + array ('name'=>'Archivieren', 'id'=>'backup'), + array ('name'=>'Zwischenablage', 'id'=>'clipboard') + ); - $actiondata = array ('_root'=>'list1', '_id'=>'list-img2', '_type'=>'image', - 'src'=>'modules/layout/img/empty.gif', 'width'=>'16', 'height'=>'16', 'title'=>'', 'alt'=>'', 'extra'=>'class="icon""'); + $num = count ($tabs); + for ($i = 0; $i < $num; $i++) { + + // set tab-list + $actiondata1 = array ('_root'=>'tablist', '_id'=>'tablistitem-'.$tabs [$i] ['id'], '_type'=>'list_entry'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + // set tab-script + $actiondata1 = array ('_root'=>'tablist', '_id'=>'tablistscript-'.$tabs [$i] ['id'], '_type'=>'script', 'content'=>'registerTab (\'tabbox-'.$tabs [$i] ['id'].'\');'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); + + // set the tab-link + $actiondata1 = array ('_root'=>'tablistitem-'.$tabs [$i] ['id'], '_id'=>'tablink-'.$tabs [$i] ['id'], '_type'=>'link', 'href'=>'#tabbox-'.$tabs [$i] ['id'], 'content'=>$tabs [$i] ['name'], 'extra'=>'class="" id="tabbox-'.$tabs [$i] ['id'].'-nav" onclick="displayTab (\'tabbox-'.$tabs [$i] ['id'].'\')" onkeypress="displayTab (\'tabbox-'.$tabs [$i] ['id'].'\')"'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); - // set filename - $actiondata = array ('_root'=>'list1', '_id'=>'file1', '_type'=>'inline', 'extra'=>'class="filename""', 'content'=>$num_dirs.' Verzeichnisse'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + // set the tab-box container + $actiondata1 = array ('_root'=>'tabbox', '_id'=>'tabbox-'.$tabs [$i] ['id'], '_type'=>'block', 'extra'=>'id="tabbox-'.$tabs [$i] ['id'].'"'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); + } + + // set the tab-box (new) + $actiondata1 = array ('_root'=>'tabbox-new', '_id'=>'tabbox-new-content', '_type'=>'fm_new'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); + + // set the tab-box (upload) + $actiondata1 = array ('_root'=>'tabbox-upload', '_id'=>'tabbox-upload-content', '_type'=>'fm_upload'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); + + // set the tab-box (backup) + $actiondata1 = array ('_root'=>'tabbox-backup', '_id'=>'tabbox-backup-content', '_type'=>'fm_backup'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); + + // set the tab-box (clipboard) + $actiondata1 = array ('_root'=>'tabbox-clipboard', '_id'=>'tabbox-clipboard-content', '_type'=>'fm_clipboard'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); + + + } + + function _userSort (&$dirs, &$files) { + sort ($dirs); + sort ($files); } } + ?> \ No newline at end of file Index: class.file_util.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/filemanager/class.file_util.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- class.file_util.php 24 Jul 2004 08:58:25 -0000 1.2 +++ class.file_util.php 25 Aug 2004 21:16:48 -0000 1.3 @@ -28,6 +28,9 @@ /* * $Log$ +* Revision 1.3 2004/08/25 21:16:48 mjahn +* step 1 is taken +* * Revision 1.2 2004/07/24 08:58:25 mjahn * changed some things * @@ -40,12 +43,64 @@ **/ class file_util { - function fileperms($filepath) { - $decperms = fileperms($filepath); - $octalperms = sprintf("%o",$decperms); - // -4 value should include ugo and strange bits for files and folders - return substr($octalperms,-4); + function chmodstr($in_Perms) { + $sP = ''; +/* + if(($in_Perms & 0xC000) == 0xC000) // Socket + $sP = 's'; + elseif(($in_Perms & 0xA000) == 0xA000) // Symbolic Link + $sP = 'l'; + elseif(($in_Perms & 0x8000) == 0x8000) // Regular + $sP = '−'; + elseif(($in_Perms & 0x6000) == 0x6000) // Block special + $sP = 'b'; + elseif(($in_Perms & 0x4000) == 0x4000) // Directory + $sP = 'd'; + elseif(($in_Perms & 0x2000) == 0x2000) // Character special + $sP = 'c'; + elseif(($in_Perms & 0x1000) == 0x1000) // FIFO pipe + $sP = 'p'; + else // UNKNOWN + $sP = 'u'; +*/ + // owner + $sP .= (($in_Perms & 0x0100) ? 'r' : '−') . + (($in_Perms & 0x0080) ? 'w' : '−') . + (($in_Perms & 0x0040) ? (($in_Perms & 0x0800) ? 's' : 'x' ) : + (($in_Perms & 0x0800) ? 'S' : '−')); + + // group + $sP .= (($in_Perms & 0x0020) ? 'r' : '−') . + (($in_Perms & 0x0010) ? 'w' : '−') . + (($in_Perms & 0x0008) ? (($in_Perms & 0x0400) ? 's' : 'x' ) : + (($in_Perms & 0x0400) ? 'S' : '−')); + + // world + $sP .= '<em>'; + $sP .= (($in_Perms & 0x0004) ? 'r' : '−') . + (($in_Perms & 0x0002) ? 'w' : '−') . + (($in_Perms & 0x0001) ? (($in_Perms & 0x0200) ? 't' : 'x' ) : + (($in_Perms & 0x0200) ? 'T' : '−')); + $sP .= '</em>'; + return $sP; + } + + function fileperms($filepath, $rwx = false) { + $decperms = fileperms($filepath); + $octalperms = sprintf("%o",$decperms); + if ($rwx) { + return file_util::chmodstr ($decperms); + } + // -4 value should include ugo and strange bits for files and folders + return substr($octalperms,-4); } + + function checkpath ($ref, $check) { + if (strpos ($check, $ref) === false) { + return false; + } + return true; + } function filesize($file) { if (is_int ($file)) { @@ -72,6 +127,19 @@ return round ($size / $factor); } + function filetime($file) { + if (is_int ($file)) { + $time = $file; + } elseif (is_dir ($file) || is_file ($file)) { + if (!file_exists ($file)) { + return '00.00.0000 00:00:00'; + } + $time = filemtime ($file); + } + + return strftime ($time, '%d.%m.%Y %H:%M%S'); + } + function gid ($gid) { $data = posix_getgrgid ($gid); return array ('int'=>$gid, 'str'=>$data['name']); |
From: Martin J. <mj...@us...> - 2004-08-25 21:17:27
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2565 Modified Files: index.php Changelog Log Message: step 1 is taken Index: Changelog =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/Changelog,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Changelog 5 Aug 2004 16:38:40 -0000 1.7 +++ Changelog 25 Aug 2004 21:16:47 -0000 1.8 @@ -1,3 +1,15 @@ +August 25 2004 (mjahn) + * created structure of the filemanager-gui, includeing up-/download, archiving and + clipboarding of files and directories + * prepared the filemanager-module for virtual filesystems (i.e. browsing zip-archives + as directories) + * enhanced layout class, so that any module can load its own template-file + * templatefiles are in XML + * created structure of the phpcms-config-gui + * created phpinfo in the help-module + + + Juli 31 2004 (mjahn) * it seems to be simple to install this software, - simply copy it into the destination dir Index: index.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/index.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- index.php 5 Aug 2004 16:38:40 -0000 1.7 +++ index.php 25 Aug 2004 21:16:47 -0000 1.8 @@ -34,6 +34,9 @@ /* * $Log$ +* Revision 1.8 2004/08/25 21:16:47 mjahn +* step 1 is taken +* * Revision 1.7 2004/08/05 16:38:40 mjahn * tweaked phpcms::cache-module output * @@ -59,11 +62,22 @@ **/ define ('DEBUG', false); error_reporting (E_ALL); + /** * Set the path for including the pear-packages **/ -ini_set ('include_path', realpath(dirname(__FILE__).'/pear/').'/:'.ini_get('include_path')); +define ('PEAR_DIR', dirname (__FILE__).'/pear/'); +if (!function_exists ('ini_set')) { + define ('PATH_TO_PEAR', PEAR_DIR); +} else { + $check = ini_set ('include_path', dirname(__FILE__).'/pear/'.PATH_SEPARATOR.ini_get ('include_path')); + if (empty ($check) || $check === false) { + define ('PATH_TO_PEAR', PEAR_DIR); + } else { + define ('PATH_TO_PEAR', ''); + } +} /** * Include the framework-class **/ @@ -79,6 +93,8 @@ **/ $a->run(); +//print_r ($a); + /** * Clear the variable-scope **/ |
From: Martin J. <mj...@us...> - 2004-08-25 21:17:26
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/user In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2565/modules/user Modified Files: Perm_XML.xml Auth_XML.xml class.module_user.php Added Files: layout.user.xml Log Message: step 1 is taken Index: Perm_XML.xml =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/user/Perm_XML.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Perm_XML.xml 30 May 2004 18:03:43 -0000 1.1 +++ Perm_XML.xml 25 Aug 2004 21:16:45 -0000 1.2 @@ -5,28 +5,25 @@ <user userId="1" authUserId="c4ca4238a0b923820dcc509a6f75849b" type="1"> <rights>0,1,2,3,4,5,6,7,8</rights> </user> - <user userId="2" authUserId="c4ca4238a0b923820dcc509a6f75849c" type="1"> - <rights>0,3,7</rights> - </user> - <user userId="3" authUserId="c4ca4238a0b923820dcc509a6f7584ec" type="1"> - <rights>0</rights> + <user userId="2" authUserId="c4ca4238a0b923820dcc509a6f7584ec" type="1"> + <rights>0,2,4,5</rights> </user> </users> <areas> - <area id="1" defineName="onlineeditor"> - <right defineName="watching">0</right> - <right defineName="saving">1</right> - <right defineName="creating">2</right> + <area id="1" defineName="administation"> + <right defineName="view">0</right> + <right defineName="edit">1</right> </area> <area id="2" defineName="filemanager"> - <right defineName="watching">3</right> - <right defineName="creating">4</right> - <right defineName="uploading">5</right> - <right defineName="delete">6</right> + <right defineName="view-all">2</right> + <right defineName="edit">3</right> + <right defineName="uploading">4</right> </area> - <area id="3" defineName="configuration"> - <right defineName="watching">7</right> - <right defineName="change">8</right> + <area id="3" defineName="phpcms"> + <right defineName="view-all">5</right> + <right defineName="edit-config">6</right> + <right defineName="edit-menu">7</right> + <right defineName="edit-content">8</right> </area> </areas> </liveuserPermXMLSimple> \ No newline at end of file Index: Auth_XML.xml =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/user/Auth_XML.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Auth_XML.xml 30 May 2004 18:03:43 -0000 1.1 +++ Auth_XML.xml 25 Aug 2004 21:16:45 -0000 1.2 @@ -1,27 +1,11 @@ <?xml version="1.0"?> <liveuserAuthXML> <user> - <userId>c4ca4238a0b923820dcc509a6f75849b</userId> + <userId>c2f3a7b0e409ffa94d33f8569f188103</userId> <handle>Martin Jahn</handle> <password>5f2f788f5c4f000701a40d56aaff6e36</password> <currentLogin>1047564897</currentLogin> - <lastLogin>1085387296</lastLogin> - <isActive>Y</isActive> - </user> - <user> - <userId>c4ca4238a0b923820dcc509a6f75849c</userId> - <handle>tester</handle> - <password>f5d1278e8109edd94e1e4197e04873b9</password> - <currentLogin>1047564897</currentLogin> - <lastLogin>1083272950</lastLogin> - <isActive>Y</isActive> - </user> - <user> - <userId>c4ca4238a0b923820dcc509a6f75849d</userId> - <handle>test</handle> - <password>098f6bcd4621d373cade4e832627b4f6</password> - <currentLogin>1047564897</currentLogin> - <lastLogin>1083272950</lastLogin> + <lastLogin>1092043123</lastLogin> <isActive>Y</isActive> </user> <user> @@ -29,7 +13,7 @@ <handle>demo</handle> <password>fe01ce2a7fbac8fafaed7c982a04e229</password> <currentLogin>1047564897</currentLogin> - <lastLogin>1084467564</lastLogin> + <lastLogin>1092043123</lastLogin> <isActive>Y</isActive> </user> </liveuserAuthXML> --- NEW FILE: layout.user.xml --- <?xml version="1.0" encoding="iso-8859-15" standalone="yes"?> <layout name="standard"> <layout:insert name="us_userlist"> <![CDATA[ <h2>Benutzerübersicht</h2> <ul id="userlist"> <layout:replace name="username" /> </ul> ]]> </layout:insert> <layout:insert name="us_listentry"> <![CDATA[ <li> <input type="submit" name="deluser-<layout:replace name="id" />" value="D" /> <input type="submit" name="edituser-<layout:replace name="id" />" value="E" /> <layout:replace name="username" /> </li> ]]> </layout:insert> <layout:insert name="us_edituser"> <![CDATA[ <fieldset> <legend>Benutzerdaten editieren</legend> <input type="hidden" name="edit-userId" value="<layout:replace name="userId" />" /> <label><input type="text" name="edit-handle" value="<layout:replace name="handle" />" />Loginname </label> <label><input type="password" name="edit-password" value="<layout:replace name="password" />" />Passwort </label> <label><input type="checkbox" name="edit-isActive" />Aktiviert </label> </fieldset> ]]> </layout:insert> <layout:insert name="us_newuser"> <![CDATA[ <fieldset> <legend>Neuen Benutzer anlegen</legend> <label><input type="text" name="new-handle" value="Neues Login" />Loginname </label> <label><input type="password" name="new-password" value="Neues Passwort" />Passwort </label> <label><input type="checkbox" name="new-isActive" />Aktiviert </label> </fieldset> ]]> </layout:insert> <layout:insert name="us_loginform"> <![CDATA[ <fieldset class="loginform"> <legend>Am System anmelden</legend> <input type="hidden" name="method" value="<layout:replace name="method" default="post" />" /> <layout:replace name="content" /> <label><input type="text" name="handle" />Benutzer </label> <label><input type="password" name="passwd" value="" />Passwort </label> <button type="submit" name="login-submit" value="1">Anmelden</button> </fieldset> ]]> </layout:insert> </layout> Index: class.module_user.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/user/class.module_user.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- class.module_user.php 5 Aug 2004 16:38:43 -0000 1.7 +++ class.module_user.php 25 Aug 2004 21:16:46 -0000 1.8 @@ -30,6 +30,9 @@ /* * $Log$ +* Revision 1.8 2004/08/25 21:16:46 mjahn +* step 1 is taken +* * Revision 1.7 2004/08/05 16:38:43 mjahn * tweaked phpcms::cache-module output * @@ -52,7 +55,7 @@ /** * include necessary files **/ -include_once 'LiveUser/LiveUser.php'; +include_once (PATH_TO_PEAR.'LiveUser/LiveUser.php'); /** * Class for user- and permission-managment @@ -94,7 +97,7 @@ $liveuserConfig = array( 'session' => array('name' => 'PHPSESSID','varname' => 'loginInfo'), 'login' => array('username' => 'handle', 'password' => 'passwd'), - 'cookie' => array('name' => 'loginInfo', 'path' => '/', 'domain' => $_SERVER ['HTTP_HOST'], 'lifetime' => 60), + 'cookie' => array('name' => 'loginInfo', 'path' => '/', 'domain' => 'localhost', 'lifetime' => 60), 'autoInit' => true, 'authContainers' => array(0 => array('type' => 'XML', 'file' => dirname(__FILE__).'/Auth_XML.xml', @@ -112,11 +115,9 @@ $this->_USER = LiveUser::factory($liveuserConfig); // connect to actions $this->_registerAction ('doParseParam', 'parseParam'); - $this->_registerAction ('doProcess', 'process'); $this->_registerAction ('doParseMenuMain', 'getMenuMain'); - $this->_registerAction ('doParseStatusbar', 'getContentBar'); $this->_registerAction ('doParseMenuSub', 'getMenuSub'); - $this->_registerAction ('doParseContent', 'getContent'); + $this->_registerAction ('doParseStatusbar', 'getStatusContent'); // provide my own actions to the eventhandler $this->_registerEvent ('USER_GET_DATA', 'doGetUserData'); @@ -135,8 +136,15 @@ * @param array $actiondata $actiondata contains the URI-param-arrays **/ function parseParam (&$actiondata) { + + // load our own extra template + $actiondata1 = array ('filename'=>dirname (__FILE__).'/layout.user.xml'); + $this->_callEvent ('LAYOUT_ADD_TEMPLATE', $actiondata1); + + // check if the user submitted the login-form $logout = false; $username = ''; + $passwd = ''; $password = ''; if (isset ($actiondata['post']['logout'])) { $logout = true; @@ -145,7 +153,6 @@ unset ($_GET['logout']); $logout = true; } - $passwd = ''; if (isset ($actiondata['post']['passwd'])) { $passwd = $actiondata['post']['passwd']; $logout = false; @@ -155,17 +162,40 @@ $username = $actiondata['post']['handle']; $logout = false; } + + // start the user-managaer $this->_USER->init($username, $password, $logout); - + // check if we have to display something $this->display = (isset ($actiondata['request']['moduleid']) && $actiondata['request']['moduleid'] == 'user'); + // get the wanted action from the URI $this->action = ''; if (isset ($actiondata['request']['action'])) { $this->action = $actiondata['request']['action']; } - return true; + + // if the user is not yet logged in + if (!$this->_USER->isLoggedIn ()) { + $this->action = 'login'; + } + // react onto the action + switch ($this->action) { + case 'login': + $this->_registerAction ('doProcess', 'processLogin'); + break; + case 'admin': + $this->_registerAction ('doProcess', 'processAdmin'); + break; + default: +// $this->_registerAction ('doProcess', 'processLogin'); + } + + $actiondata1 = array ('module'=>'user', 'format'=>'array'); + $this->_callEvent ('CONFIG_GET', $actiondata1); + $this->_CONF = $actiondata1 ['config']; + return true; } /** @@ -173,7 +203,13 @@ * * @param array $actiondata **/ - function process (&$actiondata) { + function processLogin (&$actiondata) { + $this->_registerAction ('doParseContent', 'getLoginContent'); + return true; + } + + function processAdmin (&$actiondata) { + $this->_registerAction ('doParseContent', 'getAdminContent'); return true; } @@ -184,15 +220,20 @@ * @param array $actiondata $actiondata['_root'] must provide the id of the parental element **/ function getMenuMain (&$actiondata) { + + $root = $actiondata['_root']; + if (!$this->_USER->isLoggedIn ()) { + $actiondata1 = array ('_type'=>'menu_main_entry', '_root'=>$root, 'name'=>'Anmeldung', 'module'=>'user', '_id'=>'usermenu', '_root'=>'mainmenu', 'extra'=>'class="active"'); + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); return true; } - $root = $actiondata['_root']; - $actiondata = array ('_type'=>'menu_main_entry', '_root'=>$root, 'name'=>'Benutzerverwaltung', 'module'=>'user', '_id'=>'usermenu', '_root'=>'mainmenu', 'id'=>'', 'class'=>''); + + $actiondata1 = array ('_type'=>'menu_main_entry', '_root'=>$root, 'name'=>'Benutzerverwaltung', 'module'=>'user', '_id'=>'usermenu', '_root'=>'mainmenu', 'id'=>'', 'class'=>''); if ($this->display) { - $actiondata ['extra'] = 'class="active"'; + $actiondata1 ['extra'] = 'class="active"'; } - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); return true; } @@ -213,17 +254,12 @@ $root = $actiondata['_root']; - $actiondata = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Benutzerübersicht', 'module'=>'user', '_id'=>'useroverview'); - if ($this->action == '') { - $actiondata['extra'] = 'id="current"'; + $actiondata1 = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Verwaltung', 'module'=>'user', '_id'=>'useroverview', 'action'=>'admin'); + if ($this->action == 'admin') { + $actiondata1 ['extra'] = 'id="current"'; } - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); - $actiondata = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Rechteübersicht', 'module'=>'user', '_id'=>'usermenuchg', 'action'=>'rights'); - if ($this->action == 'rights') { - $actiondata['extra'] = 'id="current"'; - } - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); return true; } @@ -232,100 +268,34 @@ * * @param array $actiondata $actiondata['_root'] must provide the id of the parental element **/ - function getContent (&$actiondata) { - if (!$this->_USER->isLoggedIn ()) { + function getLoginContent (&$actiondata) { - $root = $actiondata['_root']; - - $actiondata = array ('_id'=>'benutzerlogin', '_root'=>$root, '_type'=>'headline', 'content'=>'Benutzerlogin'); - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); - - $actiondata = array ('_id'=>'loginform', '_root'=>$root, '_type'=>'form', 'method'=>'post', 'action'=>'index.php'); - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); - - if (isset ($_SERVER ['QUERY_TERM']) && is_array ($_SERVER ['QUERY_TERM'])) { - foreach ($_SERVER ['QUERY_TERM'] as $id=>$value) { - $actiondata = array ('_id'=>'query-'.$id, '_type'=>'form_input_hidden', 'value'=>$value, 'name'=>$id, '_root'=>'loginform'); - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); - } - } - - $actiondata = array ('_id'=>'method', '_type'=>'form_input_hidden', 'value'=>'post', 'name'=>'method','_root'=>'loginform'); - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); + $root = $actiondata['_root']; - $actiondata = array ('_id'=>'handle', '_type'=>'form_input_text', 'label'=>'Benutzername', 'value'=>'Benutzername', 'name'=>'handle','_root'=>'loginform'); - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_id'=>'loginform', '_root'=>$root, '_type'=>'form', 'method'=>'post', 'action'=>'index.php'); + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); - $actiondata = array ('_id'=>'passwd', '_type'=>'form_input_password', 'value'=>'', 'label'=>'Passwort', 'name'=>'passwd','_root'=>'loginform'); - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_id'=>'loginform-content', '_root'=>'loginform', '_type'=>'us_loginform', 'method'=>'post'); + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); - $actiondata = array ('_id'=>'submit', '_type'=>'form_button', 'value'=>'Absenden', 'name'=>'submit','text'=>'Absenden', '_root'=>'loginform'); - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); - return true; - } - if (!$this->display) { - return true; - } + if (isset ($_GET) && is_array ($_GET)) { - if ($this->action == '') { - - $actiondata = array ('_type'=>'form', '_id'=>'userform', '_root'=>$actiondata ['_root'], 'action'=>'#'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - - $content = ''; - foreach ($this->_USER->_auth->tree->root->children as $i=>$user) { - ob_start (); - print_r($user); - $content = ob_get_contents(); - ob_end_clean (); - - $actiondata = array ('_type'=>'paragraph', '_id'=>'userform-'.$i, '_root'=>'userform'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - - foreach ($user->children as $userdata) { - $actiondata = array ('_type'=>'form_input_text', '_id'=>'userform-'.$i.'-'.$userdata->name, '_root'=>'userform-'.$i, 'name'=>'userform-'.$i.'-'.$userdata->name, 'label'=>$userdata->name, 'value'=>$userdata->content); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - } - + foreach ($_GET as $id=>$value) { + $actiondata = array ('_id'=>'query-'.$id, '_type'=>'form_input_hidden', 'value'=>$value, 'name'=>$id, '_root'=>'loginform'); + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); } } - if ($this->action == 'rights') { - ob_start (); - print_r($this->_USER->_perm->tree); - $content = ob_get_contents (); - ob_end_clean (); - - $actiondata = array ('_type'=>'form', '_id'=>'userform', '_root'=>$actiondata ['_root'], 'action'=>'#', 'content'=>'<pre>'.$content.'<pre>'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - - - $content = ''; - foreach ($this->_USER->_perm->tree->root->children as $i=>$user) { - ob_start (); - print_r($user); - $content = ob_get_contents(); - ob_end_clean (); - - $actiondata = array ('_type'=>'paragraph', '_id'=>'userform-'.$i, '_root'=>'userform'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - - foreach ($user->children as $userdata) { - $actiondata = array ('_type'=>'form_input_text', '_id'=>'userform-'.$i.'-'.$userdata->name, '_root'=>'userform-'.$i, 'name'=>'userform-'.$i.'-'.$userdata->name, 'label'=>$userdata->name, 'value'=>$userdata->content); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - } - - } - } return true; } + /** * Get content for statusbar * * @param array $actiondata $actiondata['_root'] must provide the id of the parental element **/ - function getContentBar (&$actiondata) { + function getStatusContent (&$actiondata) { if ($this->_USER->isLoggedIn ()) { $root = $actiondata['_root']; @@ -339,6 +309,24 @@ /** * Get content for statusbar * + * @param array $actiondata $actiondata['_root'] must provide the id of the parental element + **/ + function getAdminContent (&$actiondata) { + $this->actiondata1 = array ('_root'=>$actiondata ['_root'], '_id'=>'us_list', '_type'=>'us_userlist'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); + + $this->actiondata1 = array ('_root'=>'us_list', '_id'=>'us_list_entry-1', '_type'=>'us_listentry', 'id'=>'1', 'username'=>'Martin Jahn'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); + + $this->actiondata1 = array ('_root'=>'us_list', '_id'=>'us_list_entry-2', '_type'=>'us_listentry', 'id'=>'2', 'username'=>'demo'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); + + return true; + } + + /** + * Get content for statusbar + * * This function provides the following information about the user-status * <ul> * <li><b>$actiondata['isLoggedIn']</b> is the user logged in</li> |
From: Martin J. <mj...@us...> - 2004-08-25 21:17:26
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2565/modules/config Modified Files: config.xml config.dtd class.module_config.php Log Message: step 1 is taken Index: config.xml =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/config/config.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- config.xml 5 Aug 2004 16:38:41 -0000 1.5 +++ config.xml 25 Aug 2004 21:16:46 -0000 1.6 @@ -1,13 +1,24 @@ -<?xml version="1.0" encoding="UTF-8"?> +<?xml version="1.0" encoding="iso-8859-15"?> <!DOCTYPE framework SYSTEM "config.dtd"> <framework> + <module id="mail" name="email-service" include="class.module_mail.php" class="module_mail"> + <config name="admin-email" value="ma...@mj..." /> + <config name="from-email" value="fra...@ma..." /> + </module> + <module id="log" name="log-service" include="class.module_log.php" class="module_log"> + <config name="logfile" value="log/framework.log" /> + <config name="logrotate" /> + <config name="logrotate-days" value="2" /> + <config name="chmod" value="0606" /> + </module> + <module id="error" name="error-service" include="class.module_error.php" class="module_error" /> <module id="user" name="user-service" include="class.module_user.php" class="module_user"> <config name="userfile" value="Auth_XML.xml" /> <config name="permfile" value="Perm_XML.xml" /> </module> + <module id="debug" name="debug-service" include="class.module_debug.php" class="module_debug" /> <module id="layout" name="layout-service" include="class.module_layout.php" class="module_layout" /> <module id="editor" name="editor-service" include="class.module_editor.php" class="module_editor" /> - <module id="debug" name="debug-service" include="class.module_debug.php" class="module_debug" /> <module id="filemanager" name="filemanager" include="class.module_filemanager.php" class="module_filemanager"> <config name="startupdir" value="/" /> <config name="editor_image" value="jpg,jpeg,png,bmp,gif" /> @@ -21,15 +32,5 @@ <config name="projectfileext" value="ini" /> </module> <module id="statistik" name="statistik" include="class.module_statistik.php" class="module_statistik" /> - <module id="error" name="error-service" include="class.module_error.php" class="module_error" /> - <module id="mail" name="email-service" include="class.module_mail.php" class="module_mail"> - <config name="admin-email" value="ma...@mj..." /> - <config name="from-email" value="fra...@ma..." /> - </module> - <module id="log" name="log-service" include="class.module_log.php" class="module_log"> - <config name="logfile" value="log/framework.log" /> - <config name="logrotate" /> - <config name="logrotate-days" value="2" /> - <config name="chmod" value="0606" /> - </module> + <module id="hilfe" name="help" include="class.module_hilfe.php" class="module_hilfe" /> </framework> \ No newline at end of file Index: class.module_config.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/config/class.module_config.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- class.module_config.php 24 Jul 2004 08:58:25 -0000 1.6 +++ class.module_config.php 25 Aug 2004 21:16:46 -0000 1.7 @@ -30,6 +30,9 @@ /* * $Log$ +* Revision 1.7 2004/08/25 21:16:46 mjahn +* step 1 is taken +* * Revision 1.6 2004/07/24 08:58:25 mjahn * changed some things * @@ -43,7 +46,7 @@ /** * include the PEAR::XML_Tree class **/ -include_once 'XML/Tree.php'; +include_once (PATH_TO_PEAR.'XML/Tree.php'); /** * The config-class encapsulates the access to the configfile against the framework @@ -92,6 +95,36 @@ $this->_registerAction ('doSaveConfig', 'saveConfig'); $this->_registerEvent ('CONFIG_SET_FILE', 'doSetConfigFile'); $this->_registerAction ('doSetConfigFile', 'setConfigFile'); + + $this->_registerAction ('doParseParam', 'parseParam'); + $this->_registerAction ('doParseMenuMain', 'getMenuMain'); + } + + /** + * @param array $actiondata + **/ + function parseParam (&$actiondata) { + + $this->display = (isset ($actiondata['request']['moduleid']) && $actiondata['request']['moduleid'] == 'config'); + + $this->_callEvent ('USER_GET_STATUS', $actiondata1); + $this->_USER = $actiondata1; + + } + /** + * @param array $actiondata + **/ + function getMenuMain (&$actiondata) { + if (!$this->_USER['isLoggedIn']) { + return true; + } + + $root = $actiondata['_root']; + $actiondata1 = array ('_type'=>'menu_main_entry', '_root'=>$root, 'name'=>'Einstellungen', 'module'=>'config', '_id'=>'configmenu', '_root'=>'mainmenu'); + if ($this->display) { + $actiondata1 ['extra'] = 'class="active"'; + } + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); } /** @@ -107,23 +140,39 @@ $this->_configfile = dirname (__FILE__).'/config.xml'; } - if (!isset($this->_configfile)) { - $actiondata = array ('errortext'=>'Konfigurationsdatei konnte nicht geladen werden!'); - $this->_callEvent ('ERROR_NOTICE', $actiondata); + if (!isset ($this->_configfile)) { + $actiondata1 = array ('errortext'=>'Konfigurationsdatei konnte nicht geladen werden!'); + $this->_callEvent ('ERROR_NOTICE', $actiondata1); return false; } if (!file_exists ($this->_configfile)) { unset ($this->_configfile); - $actiondata = array ('errortext'=>'Konfigurationsdatei konnte nicht geladen werden!'); - $this->_callEvent ('ERROR_NOTICE', $actiondata); + $actiondata1 = array ('errortext'=>'Konfigurationsdatei konnte nicht geladen werden!'); + $this->_callEvent ('ERROR_NOTICE', $actiondata1); return false; } $XML =& new XML_Tree ($this->_configfile); + + if (PEAR::isError ($XML)) { + echo '<!--'; + print_r ($XML); + echo '-->'; + } + $configdata =& $XML->getTreeFromFile (); + + if (PEAR::isError ($configdata)) { + echo '<!--'; + print_r ($configdata); + echo '-->'; + } for ($i = 0; $i < count ($configdata->children); $i++) { - $this->_config[$configdata->children[$i]->attributes['id']] =& $configdata->children[$i]; + if (!isset ($configdata->children [$i]->attributes ['id'])) { + continue; + } + $this->_config [$configdata->children [$i]->attributes ['id']] =& $configdata->children [$i]; } return true; } @@ -138,17 +187,26 @@ * @param array $actiondata **/ function getConfig (&$actiondata) { - if (!isset($actiondata['module']) || !isset ($this->_config[$actiondata['module']])) { - $actiondata['config'] =& $this->_config; - } else { - if (!isset ($actiondata ['format']) || $actiondata ['format']=='object') { - $actiondata['config'] =& $this->_config[$actiondata['module']]; - } - if (isset ($actiondata ['format']) && $actiondata ['format']=='array') { - $num = count ($this->_config[$actiondata['module']]->children); - for ($i = 0; $i < $num; $i++) { - $actiondata['config'][$this->_config[$actiondata['module']]->children[$i]->attributes['name']] = & $this->_config[$actiondata['module']]->children[$i]->attributes['value']; + if (!isset ($actiondata ['module']) || !isset ($this->_config [$actiondata ['module']])) { + $actiondata ['config'] =& $this->_config; + return true; + } + + if (!isset ($actiondata ['format']) || $actiondata ['format'] == 'object') { + $actiondata ['config'] =& $this->_config [$actiondata ['module']]; + return true; + } + + if (isset ($actiondata ['format']) && $actiondata ['format']=='array') { + $num = count ($this->_config [$actiondata ['module']]->children); + for ($i = 0; $i < $num; $i++) { + if (count ($this->_config [$actiondata ['module']]->children [$i]->attributes) == 0) { + continue; } + if (!isset ($this->_config [$actiondata ['module']]->children [$i]->attributes ['name'])) { + continue; + } + $actiondata ['config'] [$this->_config [$actiondata ['module']]->children [$i]->attributes ['name']] = & $this->_config [$actiondata['module']]->children [$i]->attributes ['value']; } } return true; Index: config.dtd =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/config/config.dtd,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- config.dtd 30 May 2004 18:03:40 -0000 1.1 +++ config.dtd 25 Aug 2004 21:16:46 -0000 1.2 @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8"?> +<?xml version="1.0" encoding="iso-8859-15"?> <!ELEMENT framework (module)+> <!ELEMENT module (config)+> |
From: Martin J. <mj...@us...> - 2004-08-25 21:17:26
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/layout In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2565/modules/layout Modified Files: layout.dtd layout.css layout.xml gui.js gui.css class.module_layout.php Removed Files: layout.tpl Log Message: step 1 is taken Index: gui.css =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/layout/gui.css,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gui.css 24 Jul 2004 08:58:24 -0000 1.1 +++ gui.css 25 Aug 2004 21:16:44 -0000 1.2 @@ -2,74 +2,58 @@ } ul.tabbed { -padding: 3px 0; -margin-left: 0; -border-bottom: 1px solid #778; -font: bold 12px Verdana, sans-serif; -} - -ul.tabbed li -{ -list-style: none; -margin: 0; -display: inline; -} - -ul.tabbed li a -{ -padding: 3px 0.5em; -margin-left: 3px; -border: 1px solid #778; -border-bottom: none; -background: #DDE; -text-decoration: none; + padding: 0; + margin: 0; + border-bottom: 1px solid #029544; + font: bold 12px Verdana, sans-serif; } -ul.tabbed li a:link { color: #448; } -ul.tabbed li a:visited { color: #667; } - -ul.tabbed li a:hover -{ -color: #000; -background: #AAE; -border-color: #227; +ul.tabbed li { + list-style: none; + margin: 0; + display: inline; } -ul.tabbed li a#current -{ -background: white; -border-bottom: 1px solid white; +ul.tabbed li a { + padding: 0px 0.5em; + margin-right: 3px; + border: 1px solid #029544; + border-bottom: none; + background: #ccc; + text-decoration: none; + font-weight:normal; } -/** -* CSS-Anweisungen für die Konfigurationscontainer -**/ -div.config { - width:40em; - margin-top:1em; +ul.tabbed li a:link { + color: #029544; } -div.config ul { - margin:0; - padding:0; +ul.tabbed li a:visited { + color: #029544; } -div.config ul li a { - background:#eee; - color:black; +ul.tabbed li a:hover { + color: #029544; + background: #eee; + border-color: #029544; } -div.config ul li a.current { - background:#ccc; - color:black; +ul.tabbed li a.current +{ + color: #029544; + background: #fff; + border-bottom: 1px solid white; } -div.config ul li a:hover { - background:#ccc; - color:black; +div.tabbox { + border-width:0 1px 1px 1px; + border-color:#029544; + border-style:solid; + padding:0.3em; + margin:0; } -div.config div { - padding:0.3em; +#container { + width:50em; } Index: class.module_layout.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/layout/class.module_layout.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- class.module_layout.php 5 Aug 2004 16:38:41 -0000 1.10 +++ class.module_layout.php 25 Aug 2004 21:16:44 -0000 1.11 @@ -30,6 +30,9 @@ /* * $Log$ +* Revision 1.11 2004/08/25 21:16:44 mjahn +* step 1 is taken +* * Revision 1.10 2004/08/05 16:38:41 mjahn * tweaked phpcms::cache-module output * @@ -63,7 +66,8 @@ * There is a little bug in the Node.php in this package. It replaces the entities '<', '>', '"' and '''. * With this the output is not interpretable for clients **/ -include_once ('XML/Tree.php'); +include_once (PATH_TO_PEAR.'XML/Tree.php'); +include_once (PATH_TO_PEAR.'XML/DTD/XmlValidator.php'); /** @@ -76,6 +80,8 @@ * <li><b>DISPLAY_GET_CONTENT</b> let the modules create their content</li> * <li><b>DISPLAY_GET_STATUSBAR</b> let the modules create their statusbar</li> * <li><b>DISPLAY_GET_ERROR</b> let the modules create their error-messages</li> +* <li><b>LAYOUT_ADD_ELEMENT</b> add a layout-element into the layout-structure</li> +* <li><b>LAYOUT_ADD_TEMPLATE</b> add a layout-template into the template-stucture</li> * </ul> * * @package admin4phpCMS @@ -111,6 +117,7 @@ **/ function init () { $this->_registerEvent ('LAYOUT_ADD_ELEMENT', 'doLayoutAddElement'); + $this->_registerEvent ('LAYOUT_ADD_TEMPLATE', 'doLayoutAddTemplate'); $this->_registerEvent ('DISPLAY_PARSE_MENU_MAIN', 'doParseMenuMain'); $this->_registerEvent ('DISPLAY_PARSE_STATUSBAR', 'doParseStatusbar'); $this->_registerEvent ('DISPLAY_PARSE_MENU_SUB', 'doParseMenuSub'); @@ -118,10 +125,14 @@ $this->_registerEvent ('DISPLAY_PARSE_CONTENT', 'doParseContent'); $this->_registerAction ('doLayoutAddElement', 'addElement'); + $this->_registerAction ('doLayoutAddTemplate', 'addTemplate'); $this->_registerAction ('doDisplay', 'displayLayout'); $this->_elements[0] = array ('_type'=>'document', 'id'=>'root'); + + // parse the layoutfile for the elements + $this->_readLayoutFiles (dirname (__FILE__).'/layout.xml'); } /** @@ -144,10 +155,12 @@ $id = ''; if (!isset ($actiondata['_id'])) { + $actiondata ['_success'] = false; return false; } if (isset ($this->_ids [$actiondata ['_id']])) { + $actiondata ['_success'] = false; return false; } @@ -159,6 +172,32 @@ } else { $parent['_sub'][0] =& $this->_ids[$actiondata['_id']]; } + $actiondata ['_success'] = true; + return true; + } + + function addTemplate (&$actiondata) { + // check if the file does exist + if (!file_exists ($actiondata ['filename'])) { + $actiondata ['_success'] = false; + return false; + } + + // check if the file does conform with the DTD +/* $DTD = new XmlValidator (); + if (!DTD->isValid (dirname (__FILE__).'/layout.dtd', $actiondata ['filename'])) { + $actiondata ['_success'] = false; + return false; + } + unset ($DTD); +*/ + // parse the file + // merge the parsed filedata with the layout-tree + $this->_readLayoutfiles ($actiondata ['filename']); + + $actiondata ['_success'] = true; + + return true; } /** @@ -167,91 +206,29 @@ * @param array $actionhandler **/ function displayLayout (&$actiondata) { - - // parse the layoutfile for the elements - $this->_readLayoutFiles(); - - // read layoutfile for the framework - $output = join ('', file (dirname (__FILE__).'/layout.tpl')); - - // get all tags from the framework-layoutfile - $matches = preg_match_all ('°<phpcms-admin:replace name="([^"]*)"\s*/>°im', $output, $tags); - $tagnames = $tags[1]; - $search = $tags[0]; - $replace = array(); - unset ($tags); - // walk through the tag-array and generate the output - for ($i = 0; $i < $matches; $i++) { - $replace[$i] = ''; - switch ($tagnames[$i]) { - case 'mainmenu': - // set the menu-root - $actiondata = array ('_type'=>'ulist', '_id'=>'mainmenu', 'id'=>'mainmenu'); - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); - // get the main-menu-tree - $actiondata = array ('_root'=>'mainmenu'); - $this->_callEvent ('DISPLAY_PARSE_MENU_MAIN', $actiondata); - if (isset ($this->_ids['mainmenu']['_sub'])) { - $replace[$i] = $this->displayElement ($this->_ids['mainmenu']); - } - break; - - case 'statusbar': - // set container for statusbar - $actiondata = array ('_type'=>'empty', '_id'=>'statusbar'); - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); - // get the statusbar-entries - $actiondata = array ('_root'=>'statusbar'); - $this->_callEvent ('DISPLAY_PARSE_STATUSBAR', $actiondata); - if (isset ($this->_ids['statusbar']['_sub'])) { - $replace[$i] = $this->displayElement ($this->_ids['statusbar']); - } - break; - - case 'submenu': - // set the submenu block - $actiondata = array ('_type'=>'ulist', '_id'=>'submenu', 'extra'=>'id="submenu""'); - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); - // get the error-messages - $actiondata = array ('_root'=>'submenu'); - $this->_callEvent ('DISPLAY_PARSE_MENU_SUB', $actiondata); - if (isset ($this->_ids['submenu']['_sub'])) { - $replace[$i] = $this->displayElement ($this->_ids['submenu']); - } - break; - - case 'error': - // set the error-message block - $actiondata = array ('_type'=>'empty', '_id'=>'error'); - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); - // get the error-messages - $actiondata = array ('_root'=>'error'); - $this->_callEvent ('DISPLAY_PARSE_ERROR', $actiondata); - if (isset ($this->_ids['error']['_sub'])) { - $replace[$i] = $this->displayElement ($this->_ids['error']); - } - break; - - case 'content': - // set the content block - $actiondata = array ('_type'=>'empty', '_id'=>'content'); - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); - - // get the content - $actiondata = array ('_root'=>'content'); - $this->_callEvent ('DISPLAY_PARSE_CONTENT', $actiondata); - - if (isset ($this->_ids['content']['_sub'])) { - $replace[$i] = $this->displayElement ($this->_ids['content']); - } - break; - - default:; - } + + $actiondata2 = array (); + // set tags that has to be replaced in the layout + $tags = array ('mainmenu'=>'MENU_MAIN', 'statusbar'=>'STATUSBAR', 'submenu'=>'MENU_SUB', 'error'=>'ERROR', 'content'=>'CONTENT'); + foreach ($tags as $tag=>$event) { + // set the container-element + $actiondata1 = array ('_type'=>'empty', '_id'=>$tag); + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); + + // get the content for the tag + $actiondata1 = array ('_root'=>$tag); + $this->_callEvent ('DISPLAY_PARSE_'.$event, $actiondata1); + + if (isset ($this->_ids[$tag]['_sub'])) { + $actiondata2 [$tag] = $this->displayElement ($this->_ids [$tag]); + } } - + // send output to browser - echo str_replace ($search, $replace, $output); + $actiondata2 ['_type'] = 'layout'; + $actiondata2 ['_id'] = 'admin4phpcms'; + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata2); + echo $this->displayElement ($this->_ids['admin4phpcms']); } /** @@ -333,18 +310,17 @@ * * @access private **/ - function _readLayoutFiles () { - $layoutfile = dirname(__FILE__).'/layout.xml'; + function _readLayoutFiles ($layoutfile) { if (!isset($layoutfile)) { - $actiondata = array ('errortext'=>'Layoutdatei layout.xml konnte nicht geladen werden!'); - $this->_callEvent ('ERROR_NOTICE', $actiondata); + $actiondata1 = array ('errortext'=>'Layoutdatei layout.xml konnte nicht geladen werden!'); + $this->_callEvent ('ERROR_NOTICE', $actiondata1); return false; } if (!file_exists ($layoutfile)) { - $actiondata = array ('errortext'=>'Layoutdatei layout.xml konnte nicht geladen werden!'); - $this->_callEvent ('ERROR_NOTICE', $actiondata); + $actiondata1 = array ('errortext'=>'Layoutdatei layout.xml konnte nicht geladen werden!'); + $this->_callEvent ('ERROR_NOTICE', $actiondata1); return false; } @@ -365,7 +341,7 @@ continue; } - $this->_layout[$this->_layoutdata->children[$i]->attributes['name']] =& $this->_layoutdata->children[$i]->content; + $this->_layout[$this->_layoutdata->children[$i]->attributes['name']] =& XML_Tree_Node::decodeXmlEntities($this->_layoutdata->children[$i]->content); } //print_r($this->_layout); } Index: layout.xml =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/layout/layout.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- layout.xml 5 Aug 2004 16:38:41 -0000 1.6 +++ layout.xml 25 Aug 2004 21:16:44 -0000 1.7 @@ -1,7 +1,49 @@ <?xml version="1.0" encoding="iso-8859-15" standalone="yes"?> -<!DOCTYPE layout SYSTEM "layout.dtd"> <layout name="standard"> + <layout:insert name="layout"> + <![CDATA[ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de"> + <head> + <title>Verwaltungsoberfläche</title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <meta name="description" content="Administrationsoberfläche von phpCMS" /> + <meta name="robots" content="noindex,nofollow" /> + <meta name="author" content="Martin Jahn" /> + <meta name="language" content="de" /> + <meta http-equiv="imagetoolbar" content="no" /> + <link rel="stylesheet" href="modules/layout/layout.css" type="text/css" /> + <link rel="stylesheet" href="modules/layout/gui.css" type="text/css" /> + <script type="text/javascript" src="modules/layout/gui.js"></script> + </head> + <body> + <div id="menu"> + <img src="modules/layout/img/phpcms.png" width="181" height="60" alt="" title="phpCMS-Logo" /> + <ul id="mainmenu"> + <layout:replace name="mainmenu" /> + </ul> + <layout:replace name="statusbar" /> + <p> + © 2004, alle Rechte bei <a href="http://sourceforge.net/projects/phpcms-plugins/" title="Website des Projektes phpCMS-plugins auf SourceForge.net">phpCMS-Plugin-Team</a> + </p> + </div> + <div id="content"> + <div class="status"> + <ul id="submenu" class="horizontal"> + <layout:replace name="submenu" /> + </ul> + </div> + <div class="content"> + <layout:replace name="error" /> + <layout:replace name="content" /> + </div> + </div> + </body> +</html> + ]]> + </layout:insert> + <layout:insert name="empty"> <![CDATA[ <layout:replace name="content" /> @@ -103,6 +145,20 @@ </layout:insert> + <layout:insert name="form_select"> + <![CDATA[ +<select name="<layout:replace name="name" />" <layout:replace name="extra" default="" /> /><layout:replace name="content" default="" /></select> + ]]> + </layout:insert> + + + <layout:insert name="form_select_option"> + <![CDATA[ +<option value="<layout:replace name="value" />" <layout:replace name="extra" default="" /> /><layout:replace name="label" /></option> + ]]> + </layout:insert> + + <layout:insert name="form_input_text"> <![CDATA[ <label> @@ -158,6 +214,13 @@ </layout:insert> + <layout:insert name="form_submit"> + <![CDATA[ +<button type="submit" name="<layout:replace name="name" />" value="<layout:replace name="value" />" <layout:replace name="extra" default="" />><layout:replace name="content" /></button> + ]]> + </layout:insert> + + <layout:insert name="menu_main_entry"> <![CDATA[ <li <layout:replace name="extra" default="" />><a href="?moduleid=<layout:replace name="module" />&<layout:replace name="params" />"><layout:replace name="name" /> </a></li> @@ -197,14 +260,6 @@ </layout:insert> - <layout:insert name="filelist_entry"> - <![CDATA[ -<li <layout:replace name="extra" default="" />><layout:replace name="content" /><span class="filemtime" title="Last modified"><layout:replace name="filemtime" /></span><span class="filesize" title="Dateigröße"><layout:replace name="filesize" /></span><span class="chmod" title="Besitzer: <layout:replace name="uid" />\nGruppe: <layout:replace name="gid" />"><layout:replace name="chmod" /></span></li> - ]]> - - </layout:insert> - - <layout:insert name="tabbed_box"> <![CDATA[ <div class="tabbedBox"><layout:replace name="content" default="" /></div> @@ -232,6 +287,18 @@ ]]> </layout:insert> + + <layout:insert name="style"> + <![CDATA[ +<style type="text/css"> + +<layout:replace name="content" default="" /> + +</style> + ]]> + </layout:insert> + + <layout:insert name="cachelist"> <![CDATA[ <div class="symbolleiste"> @@ -267,4 +334,13 @@ ]]> </layout:insert> + + <layout:insert name="framebox"> + <![CDATA[ + <div class="iframe" style="width:<layout:replace name="width" default="100%" />; height:<layout:replace name="height" default="5em" />"> + <layout:replace name="content" default="" /> + </div> + ]]> + </layout:insert> + </layout> \ No newline at end of file --- layout.tpl DELETED --- Index: gui.js =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/layout/gui.js,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gui.js 24 Jul 2004 08:58:24 -0000 1.1 +++ gui.js 25 Aug 2004 21:16:44 -0000 1.2 @@ -9,11 +9,9 @@ for (i = 0; i < num; i++) { if (tabs [i] != id) { hideTab (tabs [i]); -/* alert ('hideTab (' + tabs [i] + ')');*/ continue; } showTab (tabs [i]); -/* alert ('showTab (' + tabs [i] + ')');*/ } } @@ -22,6 +20,7 @@ **/ function hideTab (id) { document.getElementById (id).style.display = 'none'; + document.getElementById (id + '-nav').className = ''; } /** @@ -29,6 +28,7 @@ **/ function showTab (id) { document.getElementById (id).style.display = 'block'; + document.getElementById (id + '-nav').className = 'current'; } /** Index: layout.dtd =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/layout/layout.dtd,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- layout.dtd 4 Jun 2004 11:11:58 -0000 1.2 +++ layout.dtd 25 Aug 2004 21:16:44 -0000 1.3 @@ -1,38 +1,5 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!ELEMENT layout ( - document, - block, - paragraph, - headline, - image, - form, - form_input_hidden, - form_input_text, - form_input_password, - form_checkbox, - form_radio, - form_textarea, - form_button, - menu_main_entry, - menu_main, - menu_sub_entry, - menu_sub -)> - -<!ELEMENT document (#PCDATA)> -<!ELEMENT block (#PCDATA)> -<!ELEMENT paragraph (#PCDATA)> -<!ELEMENT headline (#PCDATA)> -<!ELEMENT image (#PCDATA)> -<!ELEMENT form (#PCDATA)> -<!ELEMENT form_input_hidden (#PCDATA)> -<!ELEMENT form_input_text (#PCDATA)> -<!ELEMENT form_input_password (#PCDATA)> -<!ELEMENT form_checkbox (#PCDATA)> -<!ELEMENT form_radio (#PCDATA)> -<!ELEMENT form_textarea (#PCDATA)> -<!ELEMENT form_button (#PCDATA)> -<!ELEMENT menu_main_entry (#PCDATA)> -<!ELEMENT menu_main (#PCDATA)> -<!ELEMENT menu_sub_entry (#PCDATA)> -<!ELEMENT menu_sub (#PCDATA)> +<?xml version="1.0" encoding="iso-8859-1"?> +<!ELEMENT layout (layout:insert+)> +<!ATTLIST layout name ID #REQUIRED> +<!ELEMENT layout:insert (#PCDATA)> +<!ATTLIST layout:insert name ID #REQUIRED> Index: layout.css =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/layout/layout.css,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- layout.css 5 Aug 2004 16:38:41 -0000 1.4 +++ layout.css 25 Aug 2004 21:16:44 -0000 1.5 @@ -17,7 +17,6 @@ .content { padding:0.5em; padding-top:2em; - overflow:auto; } #menu { @@ -35,15 +34,20 @@ #menu p { padding:0.2em; - border:2px inset #eee; + border:1px inset #029544; + color:#333; +} + +#menu p a { + color:#029544; } #menu ul { list-style-type:none; - padding:0; + padding:0.3em; margin:0; - background:#eee; - border:2px inset #ddd; + border:0; + border:1px inset #029544; } #menu ul li { @@ -53,18 +57,20 @@ #menu ul li a { padding:0.2em 0.5em; - margin:0; + margin:0.2em 0; display:block; text-decoration:none; - border-top:1px solid #000; - border-bottom:1px solid #000; + color:#029544; + background:#eee; + border:1px outset #029544; } #menu ul li.active a, #menu ul li a:hover { - background:#ddd; + background:#fff; + border:1px inset #029544; } #menu ul li ul { @@ -86,11 +92,11 @@ #submenu { - background:#fff; + background:#eee; display:block; padding: 3px 0; margin: 0 0 1em 0; -border-bottom: 1px solid #778; +border-bottom: 1px solid #029544; font: bold Verdana, sans-serif; position:fixed; top:0; @@ -110,20 +116,22 @@ { padding: 3px 0.5em; margin-left: 3px; -border: 1px solid #778; +border: 1px solid #029544; +font-weight:bold; border-bottom: none; -background: #DDE; +background: #ddd; text-decoration: none; } -#submenu li a:link { color: #448; } -#submenu li a:visited { color: #667; } +#submenu li a:link { color: #029544; } +#submenu li a:visited { color: #029544; } #submenu li a:hover { -color: #000; -background: #AAE; -border-color: #227; +color: #029544; +font-weight:bold; +background: #fff; +border-color: #029544; } #submenu li#current a @@ -132,12 +140,14 @@ border-bottom: 1px solid white; } -#filelist { - width:50em; -} -#filelist li { - display:block; + + + +#filelist { + list-style-type:none; + padding:0; + margin:0.1em 0; } #filelist li, @@ -147,11 +157,20 @@ #filelist li input, #filelist li a, -#filelist li img, -#filelist li label, -#filelist li span { +#filelist li img { float:left; - display:block; +} + +#filelist a.filename { + float:none; + text-decoration:none; + color:#029544; +} + +#filelist li .filemtime, +#filelist li .filesize, +#filelist li .chmod { + float:right; } #filelist li .input { @@ -159,7 +178,9 @@ } #filelist li { + max-width:50em; clear:left; + padding-right:0.3em; } li.line1 { @@ -167,12 +188,12 @@ } li.line2 { - background-color:#ddd; + background-color:#eee; } .filename { - width:15em; padding-left:1em; + line-height:16px; } .filemtime { @@ -180,16 +201,13 @@ } .filesize { - width:6em; + width:5em; + text-align:right; } .chmod { - width:4em; -} - - -.giduid { - width:5em; + width:7em; + text-align:right; } #filelist .icon { @@ -200,22 +218,69 @@ border:0; } -#filelist .header { - background-color:#f9e; +#filelist li.header, +#filelist li.footer { + border:1px outset #029544; + color:#029544; + background:#ddd; + margin:0.1em 0; +} + +#filelist li.header *, +#filelist li.footer * { + color:#029544; +} + +#filelist li.header { + padding-top:0.2em; +} + +#filelist li.footer { + padding-top:0.1em; + padding-bottom:0,1em; +} + + +.iconbar { + width:50em; + text-align:left; + margin:0.1em 0; + padding:0; +} + +.iconbar a, +.iconbar input[type=submit], +.iconbar button[type=submit] { + background:none; + border:1px outset #029544; + padding:0.1em 0.5em; + margin:0; + color:#029544; + text-decoration:none; +} + +.iconbar a { + line-height:16px; } #fileviewer { font-family:monospace; background:silver; - white-space:pre; padding-right:1em; + width:50em; } #fileviewer .linenumber { + float:left; background-color:#fff; - color:#00f; + color:#029544; padding-right:0.5em; - margin-right:0.5em; + width:3em; + text-align:right; +} + +#fileviewer br { + clear:left; } #cacheview li { @@ -255,4 +320,81 @@ #cacheview span.dynamisch { color:#f00; font-weight:bold; -} \ No newline at end of file +} + +#fm-options { + width:50em; + margin-left:1em; +} + +em { + color:#029544; + font-style:normal; +} + +#fm-options { + font-family:monospace; + padding:0; + margin:1em 0; + max-width:50em; +} + +p, +h2 { + font-family:sans-serif; +} + +.tabbed li a { + background:#eee; +} + +.tabbed li a.current { + border-top-style:outset; + border-left-style:outset; + border-right-style:outset; + border-color:#029544; + border-bottom-color:#ddd; + background:#029544; + color:#eee; +} + +.tabbox { + border-style:outset; + background:#eee; +} + +legend { + border:1px solid #029544; + padding:0.1em; + padding: 0 0.5em; + font-family:sans-serif; + color:#eee; + background:#029544; +} + +fieldset { + border:1px inset #029544; + background:#fff; + margin:0.5em 0; + border-style:dashed; +} + +label { + display:block; + width:35em; + clear:both; +} + +label input { + float:right; +} + + +label.horizontal { + display:inline; +} + +label.horizontal input { + float:none; +} + |
From: Martin J. <mj...@us...> - 2004-08-25 21:17:26
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/statistik In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2565/modules/statistik Modified Files: class.module_statistik.php layout.xml Log Message: step 1 is taken Index: layout.xml =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/statistik/layout.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- layout.xml 5 Aug 2004 16:38:42 -0000 1.1 +++ layout.xml 25 Aug 2004 21:16:44 -0000 1.2 @@ -1,5 +1,4 @@ <?xml version="1.0" encoding="iso-8859-15" standalone="yes"?> -<!DOCTYPE layout SYSTEM "layout.dtd"> <layout name="standard"> <layout:insert name="cachelist"> <![CDATA[ Index: class.module_statistik.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/statistik/class.module_statistik.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- class.module_statistik.php 5 Aug 2004 16:38:42 -0000 1.1 +++ class.module_statistik.php 25 Aug 2004 21:16:44 -0000 1.2 @@ -1,6 +1,6 @@ <?php /** -* Managment of the phpCMS-related administration part +* statistic-module * * <b>License</b> * @@ -23,20 +23,23 @@ * @copyright Copyright (c) 2004, Martin Jahn * @version $Id$ * @package admin4phpCMS -* @subpackage module_statistik +* @subpackage module_statistic **/ /* * $Log$ -* Revision 1.1 2004/08/05 16:38:42 mjahn -* tweaked phpcms::cache-module output +* Revision 1.2 2004/08/25 21:16:44 mjahn +* step 1 is taken * */ + +include_once (PATH_TO_PEAR.'Cache.php'); + /** * Class for statistic interface * * @package admin4phpCMS -* @subpackage module_statistik +* @subpackage module_statistic * @todo Get the class work completly **/ class module_statistik extends module { @@ -60,15 +63,17 @@ * @param array $actiondata $actiondata contains the URI-param-arrays **/ function parseParam (&$actiondata) { - $this->display = (isset ($actiondata['request']['moduleid']) && $actiondata['request']['moduleid'] == 'statistik'); +// print_r ($actiondata); + $this->display = (isset ($actiondata ['request'] ['moduleid']) && $actiondata ['request'] ['moduleid'] == 'statistik'); $this->action = ''; - if (isset ($actiondata['request']['action'])) { - $this->action = $actiondata['request']['action']; + if (isset ($actiondata ['request'] ['action'])) { + $this->action = $actiondata ['request'] ['action']; } - $this->_callEvent ('USER_GET_STATUS', $actiondata); - $this->_USER = $actiondata; + $actiondata1 = array (); + $this->_callEvent ('USER_GET_STATUS', $actiondata1); + $this->_USER = $actiondata1; return true; @@ -86,11 +91,11 @@ } $root = $actiondata['_root']; - $actiondata = array ('_type'=>'menu_main_entry', '_root'=>$root, 'name'=>'Statistik', 'module'=>'statistik', '_id'=>'statistikmenu', '_root'=>'mainmenu'); + $actiondata1 = array ('_type'=>'menu_main_entry', '_root'=>$root, 'name'=>'Statistik', 'module'=>'statistik', '_id'=>'statistikmenu', '_root'=>'mainmenu'); if ($this->display) { - $actiondata ['extra'] = 'class="active"'; + $actiondata1 ['extra'] = 'class="active"'; } - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); return true; } // function getMenuMain () @@ -107,18 +112,27 @@ if (!$this->display) { return true; - } + } $root = $actiondata['_root']; - $actiondata = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Allgemein', 'module'=>'statistik', '_id'=>'statistik_common', 'action'=>'common'); - if ($this->action == 'cache') { - $actiondata['extra'] = 'id="current"'; + $actiondata1 = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Allgemein', 'module'=>'statistik', '_id'=>'statistik_common', 'action'=>'common'); + if ($this->action == 'common') { + $actiondata1 ['extra'] = 'id="current"'; } - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); } // function getMenuSub () + function parseStatFile () { + // open statfile + + // walk through statfile + + // create stat-arrays + + // + } } ?> \ No newline at end of file |
From: Martin J. <mj...@us...> - 2004-08-25 21:17:25
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/editor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2565/modules/editor Modified Files: class.module_text_editor.php class.module_xml_editor.php class.module_editor.php class.module_phpcms_editor.php class.module_image_editor.php Added Files: class.module_zip_editor.php Log Message: step 1 is taken Index: class.module_xml_editor.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/editor/class.module_xml_editor.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- class.module_xml_editor.php 24 Jul 2004 08:50:34 -0000 1.2 +++ class.module_xml_editor.php 25 Aug 2004 21:16:43 -0000 1.3 @@ -28,6 +28,9 @@ /* * $Log$ +* Revision 1.3 2004/08/25 21:16:43 mjahn +* step 1 is taken +* * Revision 1.2 2004/07/24 08:50:34 mjahn * updated editor-module * @@ -40,7 +43,7 @@ /** * include PEAR:XML_Tree for parsing of XML-files **/ -include_once ('XML/Tree.php'); +include_once (PATH_TO_PEAR.'XML/Tree.php'); /** * XML editor class @@ -73,14 +76,14 @@ $filename = $actiondata ['filename']; if (!isset($filename)) { - $actiondata = array ('errortext'=>'Datei '.$filename.' konnte nicht geladen werden!'); - $this->_callEvent ('ERROR_NOTICE', $actiondata); + $actiondata1 = array ('errortext'=>'Datei '.$filename.' konnte nicht geladen werden!'); + $this->_callEvent ('ERROR_NOTICE', $actiondata1); return false; } if (!file_exists ($filename)) { - $actiondata = array ('errortext'=>'Layoutdatei '.$filename.' konnte nicht geladen werden!'); - $this->_callEvent ('ERROR_NOTICE', $actiondata); + $actiondata1 = array ('errortext'=>'Layoutdatei '.$filename.' konnte nicht geladen werden!'); + $this->_callEvent ('ERROR_NOTICE', $actiondata1); return false; } @@ -94,8 +97,8 @@ $fh = @fopen ($filename, 'wb'); if ($fh === false) { fclose ($fh); - $actiondata = array ('errortext'=>'Konnte nicht in die Zieldatei '.$this->filename.' schreiben! (fehlende Schreibrechte)'); - $this->_callEvent ('ERROR_NOTICE', $actiondata); + $actiondata1 = array ('errortext'=>'Konnte nicht in die Zieldatei '.$this->filename.' schreiben! (fehlende Schreibrechte)'); + $this->_callEvent ('ERROR_NOTICE', $actiondata1); return false; } fwrite ($fh, $this->_file->get ()); @@ -111,8 +114,8 @@ $i = 0; foreach ($data as $line) { - $actiondata = array ('_id'=>'line'.$i, '_root'=>$actiondata ['_root'], '_type'=>'empty', 'class'=>'', 'id'=>'', 'content'=>htmlentities ($line).'<br />'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_id'=>'line'.$i, '_root'=>$actiondata ['_root'], '_type'=>'empty', 'class'=>'', 'id'=>'', 'content'=>htmlentities ($line).'<br />'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); $i++; } } @@ -126,20 +129,20 @@ $this->filename = $actiondata ['_filename']; // set container for fileviewer - $actiondata = array ('_root'=>$actiondata ['_root'], '_id'=>'columns', '_type'=>'column_block', 'extra'=>'id="spalten"'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_root'=>$actiondata ['_root'], '_id'=>'columns', '_type'=>'column_block', 'extra'=>'id="spalten"'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); // set container for XML-Tree - $actiondata = array ('_root'=>'columns', '_id'=>'tree-column', '_type'=>'column'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_root'=>'columns', '_id'=>'tree-column', '_type'=>'column'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); // set list-container for XML-Tree - $actiondata = array ('_root'=>'tree-column', '_id'=>'file-edit-tree', '_type'=>'ulist'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_root'=>'tree-column', '_id'=>'file-edit-tree', '_type'=>'ulist'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); // set container for input-fields - $actiondata = array ('_root'=>'columns', '_id'=>'edit-column', '_type'=>'column'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_root'=>'columns', '_id'=>'edit-column', '_type'=>'column'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); $XML =& new XML_Tree ($this->filename); $this->_file =& $XML->getTreeFromFile (); @@ -147,8 +150,8 @@ $this->displayNode ($this->_file, 'file-edit-tree', 'file-edit-tree-0', 'edit-column'); - $actiondata = array ('_id'=>'file-edit-form-submit', '_root'=>'file-edit-form', '_type'=>'form_button', 'text'=>'Absenden', 'name'=>'xml-save-file', 'value'=>'save'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_id'=>'file-edit-form-submit', '_root'=>'file-edit-form', '_type'=>'form_button', 'text'=>'Absenden', 'name'=>'xml-save-file', 'value'=>'save'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); } @@ -162,43 +165,38 @@ **/ function displayNode (&$node, $root, $node_id, $input_id) { if (isset ($node->name) && $node->name != '') { - $actiondata = array ('_id'=>$node_id, '_root'=>$root, '_type'=>'list_entry'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - - $actiondata = array ('_id'=>$node_id.'-script', '_root'=>$root, '_type'=>'script', 'content'=>'registerTab (\''.$node_id.'\')'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_id'=>$node_id, '_root'=>$root, '_type'=>'list_entry'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); - $actiondata = array ('_id'=>$node_id.'-link', '_root'=>$node_id, '_type'=>'link', 'content'=>$node->name, 'href'=>'#'.$node_id, 'extra'=>'onclick="displayTab (\''.$node_id.'\' )" onkeypress="displayTab (\''.$node_id.'\')"'); - if (isset ($node->attributes['name'])) { - $actiondata ['title'] = $node->attributes['name']; - } - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_id'=>$node_id.'-script', '_root'=>$root, '_type'=>'script', 'content'=>'registerTab (\''.$node_id.'\')'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); + $actiondata1 $actiondata = array ('_id'=>$node_id.'-name', '_root'=>$node_id.'-link', '_type'=>'empty', 'content'=>$node->name); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); - $actiondata = array ('_id'=>$node_id.'-block', '_root'=>$input_id, '_type'=>'block', 'extra'=>'id="'.$node_id.'"'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_id'=>$node_id.'-block', '_root'=>$input_id, '_type'=>'block', 'extra'=>'id="'.$node_id.'"'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); - $actiondata = array ('_id'=>$node_id.'-set', '_root'=>$node_id.'-block', '_type'=>'form_fieldset','title'=>$node->name); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_id'=>$node_id.'-set', '_root'=>$node_id.'-block', '_type'=>'form_fieldset','title'=>$node->name); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); foreach ($node->attributes as $name=>$value) { - $actiondata = array ('_id'=>$node_id.'-'.$name, '_root'=>$node_id.'-set', '_type'=>'form_input_text', 'extra'=>'id="xml-'.$node_id.'-attr-'.$name.'" ', 'name'=>'xml-'.$node_id.'-attr-'.$name, 'value'=>htmlentities ($value), 'label'=>$name); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_id'=>$node_id.'-'.$name, '_root'=>$node_id.'-set', '_type'=>'form_input_text', 'extra'=>'id="xml-'.$node_id.'-attr-'.$name.'" ', 'name'=>'xml-'.$node_id.'-attr-'.$name, 'value'=>htmlentities ($value), 'label'=>$name); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); } - $actiondata = array ('_id'=>$node_id.'-content', '_root'=>$node_id.'-set', '_type'=>'form_textarea', 'name'=>'xml-'.$node_id.'-content', 'extra'=>'id="xml-'.$node_id.'-content" ', 'value'=>htmlentities ($node->content), 'label'=>'content'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_id'=>$node_id.'-content', '_root'=>$node_id.'-set', '_type'=>'form_textarea', 'name'=>'xml-'.$node_id.'-content', 'extra'=>'id="xml-'.$node_id.'-content" ', 'value'=>htmlentities ($node->content), 'label'=>'content'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); } if (isset ($node->children) && is_array ($node->children) && count ($node->children) > 0) { - $actiondata = array ('_id'=>$node_id.'-sub', '_root'=>$node_id, '_type'=>'ulist'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_id'=>$node_id.'-sub', '_root'=>$node_id, '_type'=>'ulist'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); $num = count ($node->children); Index: class.module_image_editor.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/editor/class.module_image_editor.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- class.module_image_editor.php 24 Jul 2004 08:50:34 -0000 1.1 +++ class.module_image_editor.php 25 Aug 2004 21:16:43 -0000 1.2 @@ -28,8 +28,8 @@ /* * $Log$ -* Revision 1.1 2004/07/24 08:50:34 mjahn -* updated editor-module +* Revision 1.2 2004/08/25 21:16:43 mjahn +* step 1 is taken * * Revision 1.1 2004/06/18 15:17:00 mjahn * module filemanager and editor included @@ -161,18 +161,18 @@ $webname = $actiondata ['_webname']; $root = $actiondata ['_root']; $size = getimagesize ($filename); - $actiondata = array ('_root'=>$root, '_id'=>'view-image-block', '_type'=>'empty'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_root'=>$root, '_id'=>'view-image-block', '_type'=>'empty'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); // set image-viewer - $actiondata = array ('_root'=>'view-image-block', '_id'=>'view-image', '_type'=>'image', 'src'=>$webname, + $actiondata1 = array ('_root'=>'view-image-block', '_id'=>'view-image', '_type'=>'image', 'src'=>$webname, 'width'=>$size[0], 'height'=>$size[1], 'alt'=>'', 'title'=>''); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); // set image-data $content = 'Dateigröße: '.file_util::filesize ($filename).'<br />'. 'Breite: '.$size[0].'px<br />'. 'Höhe: '.$size[1].'px<br />'; - $actiondata = array ('_root'=>$actiondata ['_root'], '_id'=>'fileinfo', '_type'=>'block', 'id'=>'', 'class'=>'', 'content'=>$content); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_root'=>$actiondata ['_root'], '_id'=>'fileinfo', '_type'=>'block', 'id'=>'', 'class'=>'', 'content'=>$content); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); } function editFile (&$actiondata) { Index: class.module_text_editor.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/editor/class.module_text_editor.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- class.module_text_editor.php 18 Jun 2004 15:17:00 -0000 1.1 +++ class.module_text_editor.php 25 Aug 2004 21:16:43 -0000 1.2 @@ -28,6 +28,9 @@ /* * $Log$ +* Revision 1.2 2004/08/25 21:16:43 mjahn +* step 1 is taken +* * Revision 1.1 2004/06/18 15:17:00 mjahn * module filemanager and editor included * @@ -35,11 +38,6 @@ /** -* include PEAR:XML_Tree for parsing of XML-files -**/ -include_once ('XML/Tree.php'); - -/** * Text editor class * * This class provides an interface for editing Text-files. @@ -65,14 +63,14 @@ **/ function openfile ($filename) { if (!isset($filename)) { - $actiondata = array ('errortext'=>'Datei '.$filename.' konnte nicht geladen werden!'); - $this->_callEvent ('ERROR_NOTICE', $actiondata); + $actiondata1 = array ('errortext'=>'Datei '.$filename.' konnte nicht geladen werden!'); + $this->_callEvent ('ERROR_NOTICE', $actiondata1); return false; } if (!file_exists ($filename)) { - $actiondata = array ('errortext'=>'Layoutdatei '.$filename.' konnte nicht geladen werden!'); - $this->_callEvent ('ERROR_NOTICE', $actiondata); + $actiondata1 = array ('errortext'=>'Layoutdatei '.$filename.' konnte nicht geladen werden!'); + $this->_callEvent ('ERROR_NOTICE', $actiondata1); return false; } @@ -90,8 +88,8 @@ **/ function savefile ($filename = '') { if (!isset ($this->_file)) { - $actiondata = array ('errortext'=>'Keine XML-Daten zum Speichern vorhanden!'); - $this->_callEvent ('ERROR_NOTICE', $actiondata); + $actiondata1 = array ('errortext'=>'Keine XML-Daten zum Speichern vorhanden!'); + $this->_callEvent ('ERROR_NOTICE', $actiondata1); return false; } @@ -101,8 +99,8 @@ $fh = @fopen ($filename, 'wb'); if ($fh === false) { fclose ($fh); - $actiondata = array ('errortext'=>'Konnte nicht in die Zieldatei '.$this->filename.' schreiben! (fehlende Schreibrechte)'); - $this->_callEvent ('ERROR_NOTICE', $actiondata); + $actiondata1 = array ('errortext'=>'Konnte nicht in die Zieldatei '.$this->filename.' schreiben! (fehlende Schreibrechte)'); + $this->_callEvent ('ERROR_NOTICE', $actiondata1); return false; } fwrite ($fh, $this->_file->get ()); @@ -112,12 +110,17 @@ function viewFile (&$actiondata) { $this->filename = $actiondata ['_filename']; - $data = file ($this->filename); - $i = 0; - + if (strrchr ($this->filename, '.') == '.gz') { + $data = file ($this->filename); + } else { + $data = file ($this->filename); + } + + reset ($data); + $i = 1; foreach ($data as $line) { - $actiondata = array ('_id'=>'line'.$i, '_root'=>$actiondata ['_root'], '_type'=>'empty', 'content'=>htmlentities ($line)); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_id'=>'view-line-'.$i, '_root'=>$actiondata ['_root'], '_type'=>'ed_viewer_text_line', 'content'=>htmlentities ($line), 'line'=>$i); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); $i++; } } @@ -125,10 +128,16 @@ function editFile (&$actiondata) { $this->filename = $actiondata ['_filename']; - $data = file ($this->filename); + if (strrchr ($this->filename, '.') == '.gz') { + $data = file ($this->filename); + } else { + $data = file ($this->filename); + } + + $data = join ('', $data); - $actiondata = array ('_id'=>'edit-file', '_root'=>$actiondata ['_root'], '_type'=>'form_textarea', 'value'=>join ('', $data)); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_id'=>'edit-file', '_root'=>$actiondata ['_root'], '_type'=>'ed_editor_text', 'content'=>htmlentities ($data)); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); } } ?> \ No newline at end of file Index: class.module_editor.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/editor/class.module_editor.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- class.module_editor.php 24 Jul 2004 08:50:34 -0000 1.2 +++ class.module_editor.php 25 Aug 2004 21:16:43 -0000 1.3 @@ -30,6 +30,9 @@ /* * $Log$ +* Revision 1.3 2004/08/25 21:16:43 mjahn +* step 1 is taken +* * Revision 1.2 2004/07/24 08:50:34 mjahn * updated editor-module * @@ -43,6 +46,7 @@ * @package admin4phpCMS * @subpackage module_editor * @uses file_editor +* @todo internal clipboard over all editors **/ class module_editor extends module { @@ -56,9 +60,12 @@ $this->_registerAction ('doParseParam', 'parseParam'); $this->_registerAction ('doProcess', 'process'); $this->docroot = realpath ($_SERVER['DOCUMENT_ROOT']); - $actiondata = array ('module'=>'editor'); - $this->_callEvent ('CONFIG_GET', $actiondata); - $this->CONF =& $actiondata ['config']; + $actiondata1 = array ('module'=>'editor'); + $this->_callEvent ('CONFIG_GET', $actiondata1); + $this->CONF =& $actiondata1 ['config']; + + $actiondata1 = array ('filename'=>dirname (__FILE__).'/layout.xml'); + $this->_callEvent ('LAYOUT_ADD_TEMPLATE', $actiondata1); } /** @@ -73,12 +80,18 @@ $this->viewfile = ''; $this->editfile = ''; $this->action = ''; + $this->basedir = ''; // get the action if (isset ($actiondata['request']['action'])) { $this->action = $actiondata['request']['action']; } + // get the basedir + if (isset ($actiondata['request']['basedir'])) { + $this->basedir = $actiondata['request']['basedir']; + } + // get the filename of the file to view if ($this->action == 'viewfile' && isset ($actiondata['request']['file'])) { $this->filename = realpath ($this->docroot.'/'.$actiondata['request']['file']); @@ -92,8 +105,8 @@ if (isset ($this->filename) && strpos ($this->filename, $this->docroot) === false) { $this->filename = ''; $this->action = ''; - $actiondata = array ('errortext'=>'Die Datei befindet sich außerhalb des erlaubten Bereiches!'); - $this->_callEvent ('ERROR_NOTICE', $actiondata); + $actiondata1 = array ('errortext'=>'Die Datei befindet sich außerhalb des erlaubten Bereiches!'); + $this->_callEvent ('ERROR_NOTICE', $actiondata1); } } @@ -101,9 +114,9 @@ * @param array $actiondata **/ function process (&$actiondata) { - $actiondata = array(); - $this->_callEvent ('USER_GET_STATUS', $actiondata); - $this->_USER = $actiondata; + $actiondata1 = array(); + $this->_callEvent ('USER_GET_STATUS', $actiondata1); + $this->_USER = $actiondata1; if (!$this->_USER['isLoggedIn']) { return true; @@ -115,15 +128,15 @@ // check if the file exists if (!file_exists ($this->filename)) { - $actiondata = array ('errortext'=>'Die Datei '.$this->filename.' existiert nicht!'); - $this->_callEvent ('ERROR_NOTICE', $actiondata); + $actiondata1 = array ('errortext'=>'Die Datei '.$this->filename.' existiert nicht!'); + $this->_callEvent ('ERROR_NOTICE', $actiondata1); return true; } // check if the file is readable if (!is_readable ($this->filename)) { - $actiondata = array ('errortext'=>'Die Datei '.$filename.' kann nicht geöffnet werden!'); - $this->_callEvent ('ERROR_NOTICE', $actiondata); + $actiondata1 = array ('errortext'=>'Die Datei '.$this->filename.' kann nicht geöffnet werden!'); + $this->_callEvent ('ERROR_NOTICE', $actiondata1); return true; } @@ -131,7 +144,7 @@ $this->webname = str_replace ($this->docroot, '', $this->filename); // extract the extension from filename - $this->ext = strtolower (substr ($this->filename, strrpos ($this->filename, '.')+1)); + $this->ext = strtolower (substr (strrchr ('.', $this->filename), 1)); // load correct editor-module into framework switch ($this->ext) { // imagetypes @@ -149,16 +162,20 @@ case 'htm': $this->filetype = 'phpcms'; break; + + case 'zip': + $this->filetype = 'zip'; + break; default: $this->filetype = 'text'; break; } - $actiondata = array ('filename'=>dirname(__FILE__).'/class.module_'.$this->filetype.'_editor.php', 'class'=>'module_'.$this->filetype.'_editor'); - $this->_callEvent ('LOAD_MODULE', $actiondata); + $actiondata1 = array ('filename'=>dirname(__FILE__).'/class.module_'.$this->filetype.'_editor.php', 'class'=>'module_'.$this->filetype.'_editor'); + $this->_callEvent ('LOAD_MODULE', $actiondata1); - $actiondata = array ('filename'=>$this->filename); - $this->_callEvent ('EDITOR_SAVE_FILE', $actiondata); + $actiondata1 = array ('filename'=>$this->filename); + $this->_callEvent ('EDITOR_SAVE_FILE', $actiondata1); switch ($this->action) { case 'viewfile': @@ -176,28 +193,21 @@ function getViewContent (&$actiondata) { - $actiondata = array ('_id'=>'headline1', '_root'=>$actiondata['_root'], '_type'=>'headline', 'content'=>$this->webname); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - // set container for fileviewer - $actiondata = array ('_root'=>$actiondata ['_root'], '_id'=>'fileviewer', '_type'=>'block', 'extra'=>'id="fileviewer"'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_root'=>$actiondata ['_root'], '_id'=>'fileviewer', '_type'=>'ed_viewer', 'extra'=>'id="fileviewer"', 'filename'=>$this->webname, 'basedir'=>$this->basedir); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); - $actiondata = array ('_root'=>'fileviewer', '_filename'=>$this->filename, '_webname'=>$this->webname); - $this->_callEvent ('DISPLAY_VIEWER', $actiondata); + $actiondata1 = array ('_root'=>'fileviewer', '_filename'=>$this->filename, '_webname'=>$this->webname); + $this->_callEvent ('DISPLAY_VIEWER', $actiondata1); } function getEditContent (&$actiondata) { - $actiondata = array ('_id'=>'headline1', '_root'=>$actiondata['_root'], '_type'=>'headline', 'content'=>$this->webname); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_id'=>'file-editor', '_root'=>$actiondata['_root'], '_type'=>'ed_editor', 'filename'=>$this->webname, 'basedir'=>$this->basedir); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); - // set formular for fileviewer - $actiondata = array ('_root'=>$actiondata ['_root'], '_id'=>'file-edit-form', '_type'=>'form', 'action'=>'', 'method'=>'post'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - - $actiondata = array ('_root'=>'file-edit-form', '_filename'=>$this->filename, '_webname'=>$this->webname); - $this->_callEvent ('DISPLAY_EDITOR', $actiondata); + $actiondata1 = array ('_root'=>'file-editor', '_filename'=>$this->filename, '_webname'=>$this->webname); + $this->_callEvent ('DISPLAY_EDITOR', $actiondata1); } } Index: class.module_phpcms_editor.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/editor/class.module_phpcms_editor.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- class.module_phpcms_editor.php 24 Jul 2004 08:50:34 -0000 1.1 +++ class.module_phpcms_editor.php 25 Aug 2004 21:16:43 -0000 1.2 @@ -28,8 +28,8 @@ /* * $Log$ -* Revision 1.1 2004/07/24 08:50:34 mjahn -* updated editor-module +* Revision 1.2 2004/08/25 21:16:43 mjahn +* step 1 is taken * * */ @@ -74,12 +74,13 @@ $EDITOR->configfile = 'editor.conf.xml'; // connect the user-permission-control to the editor-object - $this->_callEvent ('USER_GET_STATUS', $actiondata); - $this->EDITOR->USER = $actiondata; + $actiondata1 = array (); + $this->_callEvent ('USER_GET_STATUS', $actiondata1); + $this->EDITOR->USER = $actiondata1; // call display-method of editor object - $actiondata = array ('_id'=>'edit-file', '_root'=>$actiondata ['_root'], '_type'=>'empty', 'content'=>$EDITOR->start ()); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_id'=>'edit-file', '_root'=>$actiondata ['_root'], '_type'=>'empty', 'content'=>$EDITOR->start ()); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); } } --- NEW FILE: class.module_zip_editor.php --- <?php /** * Editor for Text-files * * <b>License</b> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * 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. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @author Martin Jahn <mj...@us...> * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright Copyright (c) 2004, Martin Jahn * @version $Id: class.module_text_editor.php,v 1.1 2004/06/18 15:17:00 mjahn Exp $ * @package admin4phpCMS * @subpackage module_editor **/ /* * $Log: class.module_text_editor.php,v $ * Revision 1.1 2004/06/18 15:17:00 mjahn * module filemanager and editor included * */ /** * Text editor class * * This class provides an interface for editing Text-files. * * @package admin4phpCMS * @subpackage module_editor * @inheriteddoc **/ class module_zip_editor extends module { function init () { $this->_registerEvent ('DISPLAY_VIEWER', 'doDisplayViewer'); $this->_registerAction ('doDisplayViewer', 'viewFile'); $this->_registerEvent ('DISPLAY_EDITOR', 'doDisplayEditor'); $this->_registerAction ('doDisplayEditor', 'editFile'); } /** * Open a XML-file * * @param string $filename Contains the path of the XML-file to edit * @return boolean true if XML-file was opened successful **/ function openfile ($filename) { if (!isset($filename)) { $actiondata1 = array ('errortext'=>'Datei '.$filename.' konnte nicht geladen werden!'); $this->_callEvent ('ERROR_NOTICE', $actiondata1); return false; } if (!file_exists ($filename)) { $actiondata1 = array ('errortext'=>'Layoutdatei '.$filename.' konnte nicht geladen werden!'); $this->_callEvent ('ERROR_NOTICE', $actiondata1); return false; } $this->filename = $filename; $XML =& new XML_Tree ($this->filename); $this->_file =& $XML->getTreeFromFile (); return true; } /** * save the data from the formular into the XML-file * * @param string $filename Contains the path where to save the XML-file * @return boolean true if file was saved successful **/ function savefile ($filename = '') { if (!isset ($this->_file)) { $actiondata1 = array ('errortext'=>'Keine XML-Daten zum Speichern vorhanden!'); $this->_callEvent ('ERROR_NOTICE', $actiondata1); return false; } if ($filename != '' && file_exists ($filename) && is_writeable ($filename)) { $this->filename = $filename; } $fh = @fopen ($filename, 'wb'); if ($fh === false) { fclose ($fh); $actiondata1 = array ('errortext'=>'Konnte nicht in die Zieldatei '.$this->filename.' schreiben! (fehlende Schreibrechte)'); $this->_callEvent ('ERROR_NOTICE', $actiondata1); return false; } fwrite ($fh, $this->_file->get ()); fclose ($fh); } function viewFile (&$actiondata) { $this->filename = $actiondata ['_filename']; if (strrchr ($this->filename, '.') == '.gz') { $data = file ($this->filename); } else { $data = file ($this->filename); } reset ($data); $i = 1; foreach ($data as $line) { $actiondata1 = array ('_id'=>'view-line-'.$i, '_root'=>$actiondata ['_root'], '_type'=>'ed_viewer_text_line', 'content'=>htmlentities ($line), 'line'=>$i); $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); $i++; } } function editFile (&$actiondata) { $this->filename = $actiondata ['_filename']; if (strrchr ($this->filename, '.') == '.gz') { $data = file ($this->filename); } else { $data = file ($this->filename); } $data = join ('', $data); $actiondata1 = array ('_id'=>'edit-file', '_root'=>$actiondata ['_root'], '_type'=>'ed_editor_text', 'content'=>htmlentities ($data)); $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); } } ?> |
From: Martin J. <mj...@us...> - 2004-08-25 21:17:00
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2565/include Modified Files: class.eventhandler.php class.actionhandler.php Log Message: step 1 is taken Index: class.actionhandler.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/include/class.actionhandler.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- class.actionhandler.php 24 Jul 2004 08:58:24 -0000 1.6 +++ class.actionhandler.php 25 Aug 2004 21:16:49 -0000 1.7 @@ -30,6 +30,9 @@ /* * $Log$ +* Revision 1.7 2004/08/25 21:16:49 mjahn +* step 1 is taken +* * Revision 1.6 2004/07/24 08:58:24 mjahn * changed some things * @@ -109,9 +112,6 @@ reset ($this->_actions[$actionname]); foreach ($this->_actions[$actionname] as $actionclass => $actionmethod ) { - if (DEBUG) { - echo '<p>Action: '.$actionclass.'::'.$actionmethod.'</p>'; - } $object =& $this->__getInstance($actionclass); $object->{$actionmethod}($actiondata); } Index: class.eventhandler.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/include/class.eventhandler.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- class.eventhandler.php 24 Jul 2004 08:58:24 -0000 1.7 +++ class.eventhandler.php 25 Aug 2004 21:16:49 -0000 1.8 @@ -30,6 +30,9 @@ /* * $Log$ +* Revision 1.8 2004/08/25 21:16:49 mjahn +* step 1 is taken +* * Revision 1.7 2004/07/24 08:58:24 mjahn * changed some things * @@ -105,9 +108,6 @@ } $action = $this->_events[$eventname]; - if (DEBUG) { - echo '<p>Event: '.$eventname.'-> '.$action.'</p>'; - } return $this->_actionHandler->action($action, $actiondata); } |
From: Martin J. <mj...@us...> - 2004-08-25 21:16:59
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/hilfe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2565/modules/hilfe Added Files: class.module_hilfe.php Log Message: step 1 is taken --- NEW FILE: class.module_hilfe.php --- <?php /** * <b>License</b> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * 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. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @author Martin Jahn <mj...@us...> * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright Copyright (c) 2004, Martin Jahn * @version $Id$ * @package admin4phpCMS * @subpackage module_statistik **/ /* * $Log$ */ /** * Class for help and documentation * * @package admin4phpCMS * @subpackage module_help * @todo Get the class work completly **/ class module_hilfe extends module { /** * Initialization of the module * * The module registers its own events and connects his methods to some actions **/ function init () { // connect to actions $this->_registerAction ('doParseParam', 'parseParam'); $this->_registerAction ('doParseMenuMain', 'getMenuMain'); $this->_registerAction ('doParseMenuSub', 'getMenuSub'); return true; } /** * Parse the URI-params * * @param array $actiondata $actiondata contains the URI-param-arrays **/ function parseParam (&$actiondata) { // print_r ($actiondata); $this->display = (isset ($actiondata ['request'] ['moduleid']) && $actiondata ['request'] ['moduleid'] == 'hilfe'); $this->action = ''; if (isset ($actiondata ['request'] ['action'])) { $this->action = $actiondata ['request'] ['action']; } $actiondata1 = array (); $this->_callEvent ('USER_GET_STATUS', $actiondata1); $this->_USER = $actiondata1; switch ($this->action) { case 'phpinfo': $this->_registerAction ('doParseContent', 'getPHPContent'); break; default:; } return true; } // function parseParam () /** * Get content for mainmenu * * @param array $actiondata $actiondata['_root'] must provide the id of the parental element **/ function getMenuMain (&$actiondata) { if (!$this->_USER['isLoggedIn']) { return true; } $root = $actiondata['_root']; $actiondata1 = array ('_type'=>'menu_main_entry', '_root'=>$root, 'name'=>'Hilfe', 'module'=>'hilfe', '_id'=>'hilfemenu', '_root'=>'mainmenu'); if ($this->display) { $actiondata1 ['extra'] = 'class="active"'; } $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); return true; } // function getMenuMain () /** * Get submenu of module * * @param array $actiondata $actiondata['_root'] must provide the id of the parental element **/ function getMenuSub (&$actiondata) { if (!$this->_USER['isLoggedIn']) { return true; } if (!$this->display) { return true; } $root = $actiondata['_root']; $actiondata1 = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Allgemein', 'module'=>'hilfe', '_id'=>'hilfe_common', 'action'=>'common'); if ($this->action == 'common') { $actiondata1 ['extra'] = 'id="current"'; } $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); $actiondata1 = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'PHP-Info', 'module'=>'hilfe', '_id'=>'hilfe_phpinfo', 'action'=>'phpinfo'); if ($this->action == 'phpinfo') { $actiondata1 ['extra'] = 'id="current"'; } $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); $actiondata1 = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'phpCMS-Doku', 'module'=>'hilfe', '_id'=>'hilfe_phpcmsdocu', 'action'=>'phpcmsdocu'); if ($this->action == 'phpcmsdocu') { $actiondata1 ['extra'] = 'id="current"'; } $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); $actiondata1 = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Hilfe', 'module'=>'hilfe', '_id'=>'hilfe_hilfe', 'action'=>'hilfe'); if ($this->action == 'hilfe') { $actiondata1 ['extra'] = 'id="current"'; } $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); } // function getMenuSub () function getPHPContent (&$actiondata) { $actiondata1 = array ('_root'=>$actiondata ['_root'], '_type'=>'h2', '_id'=>'h2_ext', 'content'=>'Geladene Erweiterungen'); $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); $actiondata1 = array ('_root'=>$actiondata ['_root'], '_type'=>'block', '_id'=>'extensions', 'content'=>join ('<br />', get_loaded_extensions ())); $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); $style = 'body, td { font-family: arial, helvetica, sans-serif; font-size: 95%; }'."\n". 'h1 {clear:both; font-family: arial, helvetica, sans-serif; font-size: 120%; font-weight: bold;}'."\n". 'h2 {clear:both;margin:2em 0 1em 0; font-family: arial, helvetica, sans-serif; font-size: 110%; font-weight: bold;}'."\n". 'a { text-decoration: none; }'."\n". 'a:hover { text-decoration: underline; }'."\n". 'hr { clear:both; width: 600px; align: center; background-color: #cccccc; border: 0px; height: 1px;}'."\n". 'table {clear:both; text-align:left;margin: 0 0 1em 0}'."\n". 'th { font-family: arial, helvetica, sans-serif; font-size: 140%; font-weight: bold; }'."\n". '.p {text-align: left;}'."\n". '.e {background-color: #ccccff; font-weight: bold;}'."\n". '.h {background-color: #9999cc; font-weight: bold;}'."\n". '.v {background-color: #cccccc;}'."\n". 'i {color: #666666;}'."\n". 'img {float: right; border: 0px;}'."\n"; $actiondata1 = array ('_root'=>$actiondata ['_root'], '_type'=>'style', '_id'=>'phpinfo-style', 'content'=>$style); $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); // BOF Fix phpinfo ob_start(); phpinfo(); $infobuffer .= ob_get_contents(); ob_end_clean(); preg_match_all("=<body[^>]*>(.*)</body>=siU", $infobuffer, $a); $phpinfo = $a[1][0]; $phpinfo = str_replace( ';','; ', $phpinfo ); $phpinfo = str_replace( ',',', ', $phpinfo ); $phpinfo = str_replace( '<br>','<br />', $phpinfo ); $phpinfo = str_replace( 'align="center"','align="left"', $phpinfo ); $phpinfo = str_replace( 'align="right"','align="left"', $phpinfo ); $actiondata1 = array ('_root'=>$actiondata ['_root'], '_type'=>'block', '_id'=>'phpinfo', 'content'=>$phpinfo); $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); return true; } } ?> |
From: Martin J. <mj...@us...> - 2004-08-25 21:16:59
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/phpcms In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2565/modules/phpcms Modified Files: class.module_phpcms.php Added Files: layout.phpcms.xml Removed Files: layout.xml config.tpl.xml Log Message: step 1 is taken --- layout.xml DELETED --- Index: class.module_phpcms.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/phpcms/class.module_phpcms.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- class.module_phpcms.php 5 Aug 2004 16:38:42 -0000 1.2 +++ class.module_phpcms.php 25 Aug 2004 21:16:48 -0000 1.3 @@ -28,8 +28,8 @@ /* * $Log$ -* Revision 1.2 2004/08/05 16:38:42 mjahn -* tweaked phpcms::cache-module output +* Revision 1.3 2004/08/25 21:16:48 mjahn +* step 1 is taken * */ /** @@ -46,19 +46,29 @@ * <li><b>PHPCMS_GET_MENU</b> gets a menu-entry of the phpCMS-menufile</li> * <li><b>PHPCMS_SET_MENU</b> sets a menu-entry in the phpCMS-menufile</li> * <li><b>PHPCMS_GET_DEFAULT_VALUE</b> returns a configuration-value of the phpCMS-config</li> +* <li><b>PHPCMS_SET_DEFAULT_VALUE</b> sets a configuration-value of the phpCMS-config</li> * </ul> * +* <p> +* * @package admin4phpCMS * @subpackage module_phpcms -* @todo Get the class work completly +* @todo Check the POST- and GET-vars on correctness (i.e. $projectfile and so on) +* @todo Create general overview page as standard for phpCMS-section, if no action is defined **/ class module_phpcms extends module { /** - * @var object $DEFAULTS contains the information of the default.php-file + * @var array $DEFAULTS contains the information of the default.php-file * @access private **/ - var $_DEFAULTS; + var $_DEFAULTS = array (); + + /** + * @var array $_CONF contains the information of the config + * @access private + **/ + var $_CONF = array (); /** * Initialization of the module @@ -71,7 +81,14 @@ $this->_registerAction ('doParseMenuMain', 'getMenuMain'); $this->_registerAction ('doParseMenuSub', 'getMenuSub'); + $this->_registerEvent ('PHPCMS_GET_DEFAULTS_VALUE', 'doGetDefaultsValue'); + $this->_registerAction ('doGetDefaultsValue', '_getDefaultValue'); + + $this->_registerEvent ('PHPCMS_SET_DEFAULTS_VALUE', 'doSetDefaultsValue'); + $this->_registerAction ('doSetDefaultsValue', '_setDefaultValue'); + $actiondata = array ('filename'=>dirname (__FILE__).'/layout.phpcms.xml'); + $this->_callEvent ('LAYOUT_ADD_TEMPLATE', $actiondata); return true; } @@ -91,22 +108,36 @@ $this->configaction = ''; if (isset ($actiondata['request']['configform-submit'])) { $this->configaction = $actiondata['request']['configform-submit']; - $this->_formdata =& $actiondata ['request']; + $this->_formdata = $actiondata ['request']; + } + + $this->projectfile = ''; + if (isset ($actiondata['post']['submit-projectfile'])) { + $this->projectfile = $actiondata['post']['select-projectfile']; } switch ($this->action) { case 'cache': $this->_registerAction ('doProcess', 'processCache'); break; + case 'config': + $this->_registerAction ('doProcess', 'processConfig'); + break; + case 'menu': + $this->_registerAction ('doProcess', 'processMenu'); + break; + case 'tags': + $this->_registerAction ('doProcess', 'processTags'); + break; default: $this->_registerAction ('doProcess', 'Process'); } - $this->_callEvent ('USER_GET_STATUS', $actiondata); - $this->_USER = $actiondata; + $this->_callEvent ('USER_GET_STATUS', $actiondata1); + $this->_USER = $actiondata1; - $actiondata = array ('module'=>'phpcms', 'format'=>'array'); - $this->_callEvent ('CONFIG_GET', $actiondata); - $this->_CONF = $actiondata ['config']; + $actiondata1 = array ('module'=>'phpcms', 'format'=>'array'); + $this->_callEvent ('CONFIG_GET', $actiondata1); + $this->_CONF = $actiondata1 ['config']; return true; @@ -119,48 +150,7 @@ * @param array $actiondata **/ function process (&$actiondata) { - switch ($this->action) { - case 'config': - if ($this->configaction == 'save') { - $this->checkConfigForm (); - } - $this->_registerAction ('doParseContent', 'getConfigContent'); - $config = new XML_Tree (dirname (__FILE__).'/config.tpl.xml'); - $this->_DATA = & $config->getTreeFromFile (); - - $_data = @file ($this->docroot.$this->_CONF ['configfile']); - foreach ($_data as $line) { - if (!stristr ($line, '$this->')) { - continue; - } - - if (preg_match ('%\$this->([^=]*)=(.*?)$%im', $line, $erg)) { - $id = trim ($erg [1]); - $value = trim ($erg [2]); - if ($value{0} == '\'') { - $value = substr ($value, 1); - } - if (substr ($value, -1) == ';') { - $value = substr ($value, 0, strlen ($value) - 1); - } - if (substr ($value, -1) == '\'') { - $value = substr ($value, 0, strlen ($value) - 1); - } - $this->_DEFAULTS [$id] = $value; - } - } - - break; - case 'menu':; - $this->_registerAction ('doParseContent', 'getMenuContent'); - break; - case 'tags':; - $this->_registerAction ('doParseContent', 'getTagsContent'); - break; - default: - $this->_registerAction ('doParseContent', 'getContent'); - } - + $this->_registerAction ('doParseContent', 'getContent'); return true; } // function process () @@ -176,11 +166,11 @@ } $root = $actiondata['_root']; - $actiondata = array ('_type'=>'menu_main_entry', '_root'=>$root, 'name'=>'phpCMS', 'module'=>'phpcms', '_id'=>'phpcmsmenu', '_root'=>'mainmenu'); + $actiondata1 = array ('_type'=>'menu_main_entry', '_root'=>$root, 'name'=>'phpCMS', 'module'=>'phpcms', '_id'=>'phpcmsmenu', '_root'=>'mainmenu'); if ($this->display) { - $actiondata ['extra'] = 'class="active"'; + $actiondata1 ['extra'] = 'class="active"'; } - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); return true; } // function getMenuMain () @@ -201,29 +191,29 @@ $root = $actiondata['_root']; - $actiondata = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Cache', 'module'=>'phpcms', '_id'=>'phpcmscache', 'action'=>'cache'); + $actiondata1 = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Cache', 'module'=>'phpcms', '_id'=>'phpcmscache', 'action'=>'cache'); if ($this->action == 'cache') { - $actiondata['extra'] = 'id="current"'; + $actiondata1 ['extra'] = 'id="current"'; } - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); - $actiondata = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Konfiguration', 'module'=>'phpcms', '_id'=>'phpcmsconfig', 'action'=>'config'); + $actiondata1 = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Konfiguration', 'module'=>'phpcms', '_id'=>'phpcmsconfig', 'action'=>'config'); if ($this->action == 'config') { - $actiondata['extra'] = 'id="current"'; + $actiondata1 ['extra'] = 'id="current"'; } - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); - $actiondata = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Menüverwaltung', 'module'=>'phpcms', '_id'=>'phpcmsmenu', 'action'=>'menu'); + $actiondata1 = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Menüverwaltung', 'module'=>'phpcms', '_id'=>'phpcmsmenu1', 'action'=>'menu'); if ($this->action == 'menu') { - $actiondata['extra'] = 'id="current"'; + $actiondata1 ['extra'] = 'id="current"'; } - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); - $actiondata = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Tags editieren', 'module'=>'phpcms', '_id'=>'phpcmstags', 'action'=>'tags'); + $actiondata1 = array ('_type'=>'menu_sub_entry', '_root'=>$root, 'name'=>'Tags editieren', 'module'=>'phpcms', '_id'=>'phpcmstags', 'action'=>'tags'); if ($this->action == 'tags') { - $actiondata['extra'] = 'id="current"'; + $actiondata1 ['extra'] = 'id="current"'; } - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); return true; } // function getMenuSub () @@ -247,8 +237,8 @@ $content = ob_get_contents (); ob_end_clean (); - $actiondata = array ('_root'=>$actiondata ['_root'], '_id'=>'usercontent', '_type'=>'paragraph', 'content'=>'<pre>'.$content.'</pre>'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_root'=>$actiondata ['_root'], '_id'=>'usercontent', '_type'=>'paragraph', 'content'=>'<pre>'.$content.'</pre>'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); if ($this->action == 'menu' || $this->action == 'template' || $this->action == 'tags') { @@ -257,8 +247,8 @@ 'Damit w�re es m�glich alle Men�dateien, Seitentemplatedateien und Tagdateien getrennt zur Auswahl anzubieten. '; - $actiondata = array ('_root'=>$actiondata ['_root'], '_id'=>'user1content', '_type'=>'paragraph', 'content'=>$content); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_root'=>$actiondata ['_root'], '_id'=>'user1content', '_type'=>'paragraph', 'content'=>$content); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); } return true; } @@ -348,8 +338,8 @@ $root = $actiondata ['_root']; // initial list for the cache-view - $actiondata = array ('_root'=>$root, '_type'=>'cachelist', '_id'=>'cachedir-'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_root'=>$root, '_type'=>'cachelist', '_id'=>'cachedir-'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); // ids of elements that were even created in the layout-module // necessary for tree structure of the cache-view @@ -381,8 +371,8 @@ } // set output for subdirectory - $actiondata = array ('_root'=>$rootid, '_type'=>'cachedir', '_id'=>$rootid.$data [$i].'-', 'cachedir'=>$rootid, 'dirname'=>$data [$i], 'extra'=>'class="subdir"'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_root'=>$rootid, '_type'=>'cachedir', '_id'=>$rootid.$data [$i].'-', 'cachedir'=>$rootid, 'dirname'=>$data [$i], 'extra'=>'class="subdir"'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); $_ids [$rootid] = '1'; $rootid = $rootid.$data [$i].'-'; @@ -399,11 +389,24 @@ // now we can display the file-entry $selfid = $rootid.$data [$num]; - $actiondata = array ('_root'=>$rootid, '_type'=>'cachefile', '_id'=>$selfid, 'cachefile'=>$cachefile, 'filename'=>$data [$num], 'cachetype'=>$cs, 'cachetime'=>'24.07.2004 11:58:59'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_root'=>$rootid, '_type'=>'cachefile', '_id'=>$selfid, 'cachefile'=>$cachefile, 'filename'=>$data [$num], 'cachetype'=>$cs, 'cachetime'=>'24.07.2004 11:58:59'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); } // foreach } + function processConfig (&$actiondata) { + if ($this->configaction == 'save') { + $this->checkConfigForm (); + } + $this->_registerAction ('doParseContent', 'getConfigContent'); + + // load template from file + $_template = new XML_Tree (dirname (__FILE__).'/config.phpcms.xml'); + $this->_TPL = & $_template->getTreeFromFile (); + // load the values in the default.php + $this->_loadDefault (); + } + /** * Get content of the module * @@ -419,60 +422,70 @@ return true; } - $actiondata = array ('_root'=>$actiondata ['_root'], '_id'=>'config_container', '_type'=>'block', 'extra'=>'class="config"'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + // get the current version of phpCMS + $actiondata1 = array ('id'=>'VERSION'); + $this->_getDefaultValue ($actiondata1); + + $version = '1.2.1'; + + // load the correct template-structure according to the version of phpCMS + + // loop through the structure and create the tabs + + + $actiondata1 = array ('_root'=>$actiondata ['_root'], '_id'=>'config_container', '_type'=>'block', 'extra'=>'id="container"'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); - $actiondata = array ('_root'=>'config_container', '_id'=>'configform', '_type'=>'form'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_root'=>'config_container', '_id'=>'configform', '_type'=>'form'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); - $actiondata = array ('_root'=>'configform', '_id'=>'tablist', '_type'=>'ulist', 'extra'=>'class="tabbed"'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_root'=>'configform', '_id'=>'tablist', '_type'=>'ulist', 'extra'=>'class="tabbed"'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); - $actiondata = array ('_root'=>$actiondata ['_root'], '_id'=>'tabbox', '_type'=>'block', 'extra'=>'class="tabbox"'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_root'=>'configform', '_id'=>'tabbox', '_type'=>'block', 'extra'=>'class="tabbox"'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); - $num_tab = count ($this->_DATA->children); - for ($i = 0; $i < $num_tab; $i++) { - $tab =& $this->_DATA->children[$i]; + //print_r ($this->_DEFAULTS); + $tabs = array ('common'=>'Allgemein', 'pax'=>'PAX & Mail2Crypt', 'cache'=>'Caching', 'server'=>'Servereinstellungen', 'stat'=>'Statistik', 'other'=>'Sonstiges'); + + foreach ($tabs as $id=>$label) { // set tab-list-entry - $actiondata = array ('_root'=>'tablist', '_id'=>'tablistitem-'.$tab->attributes ['id'], '_type'=>'list_entry'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_root'=>'tablist', '_id'=>'tablistitem-'.$id, '_type'=>'list_entry'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); // set tab-list-entry - $actiondata = array ('_root'=>'tablist', '_id'=>'tablistscript-'.$tab->attributes ['id'], '_type'=>'script', 'content'=>'registerTab (\'tabbox-'.$tab->attributes ['id'].'\');'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_root'=>'tablist', '_id'=>'tablistscript-'.$id, '_type'=>'script', 'content'=>'registerTab (\'tabbox-'.$id.'\');'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); // set the tab-link - $actiondata = array ('_root'=>'tablistitem-'.$tab->attributes ['id'], '_id'=>'tablink-'.$tab->attributes ['id'], '_type'=>'link', 'href'=>'#tabbox-'.$tab->attributes ['id'], 'content'=>$tab->attributes ['label'], 'extra'=>'onclick="displayTab (\'tabbox-'.$tab->attributes ['id'].'\')" onkeypress="displayTab (\'tabbox-'.$tab->attributes ['id'].'\')"'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_root'=>'tablistitem-'.$id, '_id'=>'tablink-'.$id, '_type'=>'link', 'href'=>'#tabbox-'.$id, 'content'=>$label, 'extra'=>'class="" id="tabbox-'.$id.'-nav" onclick="displayTab (\'tabbox-'.$id.'\')" onkeypress="displayTab (\'tabbox-'.$id.'\')"'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); // set the tab-box - $actiondata = array ('_root'=>'tabbox', '_id'=>'tabbox-'.$tab->attributes ['id'], '_type'=>'block', 'extra'=>'id="tabbox-'.$tab->attributes ['id'].'" class="tabbox"'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_root'=>'tabbox', '_id'=>'tabbox-'.$id, '_type'=>'block', 'extra'=>'id="tabbox-'.$id.'"'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); - // walk through the array of config-items - $num = count ($tab->children); - for ($j = 0; $j < $num; $j++) { - - if (!isset ($this->_DEFAULTS [$tab->children [$j]->attributes ['id']])) { - continue; - } - - // set config-field - $actiondata = array ('_root'=>'tabbox-'.$tab->attributes ['id'], '_id'=>'config-'.$tab->children [$j]->attributes ['id'], '_type'=>'form_'.$tab->children [$j]->attributes ['type'], 'label'=>$tab->children [$j]->attributes ['label'], 'value'=>$this->_DEFAULTS [$tab->children [$j]->attributes ['id']], 'name'=>'config-'.$tab->children [$j]->attributes ['id']); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - } + + $actiondata1 = $this->_DEFAULTS; + $actiondata1 ['_root'] = 'tabbox-'.$id; + $actiondata1 ['_id'] = 'config-'.$id; + $actiondata1 ['_type'] = 'pc_config_'.$id; + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); } - // set the tab-box - $actiondata = array ('_root'=>'configform', '_id'=>'configform-submit', '_type'=>'form_button', 'type'=>'submit', 'name'=>'configform-submit', 'value'=>'save', 'text'=>'Speichern'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + // set the submit-button + $actiondata1 = array ('_root'=>'configform', '_id'=>'configform-submit', '_type'=>'form_submit', 'name'=>'configform-submit', 'value'=>'save', 'content'=>'Speichern'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); return true; } // function getConfigContent () + function processMenu (&$actiondata) { + $this->_registerAction ('doParseContent', 'getMenuContent'); + } + /** * Get content of the module * @@ -497,12 +510,16 @@ 'Eventuell kann die Software auch alle Projectdateien auslesen, obwohl phpCMS ja keine feste Endung f�r eine Projectdatei vorgibt. '. 'Damit w�re es m�glich alle Men�dateien, Seitentemplatedateien und Tagdateien getrennt zur Auswahl anzubieten. '; - $actiondata = array ('_root'=>$actiondata ['_root'], '_id'=>'user1content', '_type'=>'paragraph', 'content'=>$content); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_root'=>$actiondata ['_root'], '_id'=>'user1content', '_type'=>'paragraph', 'content'=>$content); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); return true; } // function getMenuContent () + function processTags () { + $this->_registerAction ('doParseContent', 'getTagsContent'); + } + /** * Get content of the module * @@ -517,20 +534,50 @@ return true; } - ob_start (); - print_r($this->_CONF); - $content = ob_get_contents (); - ob_end_clean (); + $_root = $actiondata ['_root']; + + $actiondata1 = array ('_root'=>$_root, '_id'=>'form_projectfile', '_type'=>'form', 'action'=>'#'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); + + $actiondata1 = array ('_root'=>'form_projectfile', '_id'=>'select-projectfile', '_type'=>'form_select', 'name'=>'select-projectfile'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); - $actiondata = array ('_root'=>$actiondata ['_root'], '_id'=>'usercontent', '_type'=>'paragraph', 'content'=>'<pre>'.$content.'</pre>'); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); - $content = 'Durch Auswahl eines Templates ist es m�glich, die Men�datei, das Seitentemplate und die Tagdatei zu bearbeiten. '. - 'Eventuell kann die Software auch alle Projectdateien auslesen, obwohl phpCMS ja keine feste Endung f�r eine Projectdatei vorgibt. '. - 'Damit w�re es m�glich alle Men�dateien, Seitentemplatedateien und Tagdateien getrennt zur Auswahl anzubieten. '; + $_dh = dir ($this->docroot.$this->_CONF ['projectdir']); + $_projectfiles = array (); + $content = ''; + while (false !== ($file = $_dh->read ())) { - $actiondata = array ('_root'=>$actiondata ['_root'], '_id'=>'user1content', '_type'=>'paragraph', 'content'=>$content); - $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); + if (strrchr ($file, '.') != '.'.$this->_CONF ['projectfileext']) { + continue; + } + + $actiondata1 = array ('_root'=>'select-projectfile', '_id'=>'select-'.$file, '_type'=>'form_select_option', 'value'=>$file, 'label'=>$file); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); + + $content .= '<p>'.$file.'</p>'; + } + + $actiondata1 = array ('_root'=>'form_projectfile', '_id'=>'submit-projectfile', '_type'=>'form_submit', 'name'=>'submit-projectfile', 'value'=>'1', 'content'=>'Projektdatei auswählen'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); + + $actiondata1 = array ('_root'=>$_root, '_id'=>'form_tags', '_type'=>'form', 'action'=>'#'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); + + if ($this->projectfile != '') { + $_data = $this->_parseProjectFile (file ($this->docroot.$this->_CONF ['projectdir'].$this->projectfile)); + + foreach ($_data as $id=>$value) { + + $actiondata1 = array ('_root'=>'form_tags', '_id'=>'tags_status_'.$id, '_type'=>'paragraph', 'content'=>$id.' = '.$value); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata1); + } + + } + + + + return true; } // function getTagsContent () @@ -545,20 +592,100 @@ } // function checkConfigForm () - function _getDefaultValue () { + function _getDefaultValue (&$actiondata) { + if (is_array ($this->_DEFAULTS) || count ($this->_DEFAULTS) == 0) { + $this->_loadDefault (); + } + + if (!isset ($actiondata ['id'])) { + return false; + } + + if (isset ($this->_DEFAULTS [$actiondata ['id']])) { + $actiondata ['value'] = $this->_DEFAULTS [$actiondata ['id']]; + return true; + } + return false; } function _loadDefault () { + $_datafile = $this->docroot.$this->_CONF ['configfile']; + if (function_exists ('file_get_contents')) { + $_data = file_get_contents ($_datafile); + } else { + $_data = join ('', file ($_datafile)); + } + $this->_parseDefault ($_data); } - function _parseDefault () { + function _parseDefault ($data = '') { + if (!preg_match_all ('/\$this->(\S*)\s*=\s*([^;]*)/im', $data, $erg)) { + return false; + } + + $num = count ($erg [1]); + for ($i = 0; $i < $num; $i++) { + switch (strtoupper ($erg [2] [$i])) { + case '\'OFF\'': + $this->_DEFAULTS [$erg [1] [$i]] = (int) 0; + $this->_DEFAULTS [$erg [1] [$i].'_ON'] = ''; + $this->_DEFAULTS [$erg [1] [$i].'_OFF'] = ' checked="checked"'; + break; + case '\'ON\'': + $this->_DEFAULTS [$erg [1] [$i]] = (int) 1; + $this->_DEFAULTS [$erg [1] [$i].'_OFF'] = ''; + $this->_DEFAULTS [$erg [1] [$i].'_ON'] = ' checked="checked"'; + break; + default: + if (substr ($erg [2] [$i], 0, 1) == '\'' && substr ($erg [2] [$i], -1) == '\'') { + $this->_DEFAULTS [$erg [1] [$i]] = (string) substr ($erg [2] [$i], 1, strlen ($erg [2] [$i]) - 2); + } else { + $this->_DEFAULTS [$erg [1] [$i]] = (string) $erg [2] [$i]; + } + } + + } + + return true; } - function _saveDefault () { + function _saveDefault (&$actiondata) { } - function _setDefaultValue () { + function _setDefaultValue (&$actiondata) { + if (is_array ($this->_DEFAULTS) || count ($this->_DEFAULTS) == 0) { + $this->_loadDefault (); + } + + if (!isset ($actiondata ['id'])) { + return false; + } + + if (isset ($this->_DEFAULTS [$actiondata ['id']])) { + return false; + } + + $this->_DEFAULTS [$this->_DEFAULTS [$actiondata ['id']]] = $actiondata ['value']; + return true; + } + + function _getTemplateList ($templatedir) { +// dfdsfas + } + + function _parseProjectFile ($data) { + $_ret = array (); + foreach ($data as $line) { + $line = trim ($line); + + if ($line{0} == ';') { + continue; + } + $id = trim (substr ($line, 0, strpos ($line, ':='))); + $_ret [$id] = trim (substr (strrchr ($line, ':='), 2)); + } + return $_ret; } } ?> \ No newline at end of file --- config.tpl.xml DELETED --- --- NEW FILE: layout.phpcms.xml --- <?xml version="1.0" encoding="iso-8859-15" standalone="yes"?> <layout name="standard"> <layout:insert name="pc_config_common"> <![CDATA[ <fieldset> <legend>Website</legend> <label><input type="text" name="config-PAGE_EXTENSION" value="<layout:replace name="PAGE_EXTENSION" />" />Erweiterung der Webseiten </label> <label><input type="text" name="config-PAGE_DEFAULTNAME" value="<layout:replace name="PAGE_DEFAULTNAME" />" />Standardname der Webseiten </label> <label><input type="text" name="config-TEMPEXT" value="<layout:replace name="TEMPEXT" />" />Erweiterung der Templatedatei </label> <label><input type="text" name="config-GLOBAL_PROJECT_FILE" value="<layout:replace name="GLOBAL_PROJECT_FILE" />" />Standard Projektdatei </label> </fieldset> <fieldset> <legend>Erkennung des Document-Root</legend> <label class="horizontal"><input type="radio" name="autoconfig-PATH" value="1"<layout:replace name="PAX_ON" /> /> Automatisch</label> <label class="horizontal"><input type="radio" name="autoconfig-PATH" value="0"<layout:replace name="PAX_OFF" /> /> Manuell eingeben</label> <label><input type="text" name="config-DOCUMENT_ROOT" value="<layout:replace name="DOCUMENT_ROOT" />" />Document_Root </label> </fieldset> <fieldset> <legend>Erkennung des Domainnamens</legend> <label class="horizontal"><input type="radio" name="autoconfig-DOMAIN" value="1"<layout:replace name="AUTO_DOMAIN_ON" /> /> Automatisch</label> <label class="horizontal"><input type="radio" name="autoconfig-DOMAIN" value="0"<layout:replace name="AUTO_DOMAIN_OFF" /> /> Manuell eingeben</label> <label><input type="text" name="config-DOMAIN_NAME" value="<layout:replace name="DOMAIN_NAME" />" />Document_Root </label> </fieldset> ]]> </layout:insert> <layout:insert name="pc_config_pax"> <![CDATA[ <fieldset> <legend>PAX-Erweiterung</legend> <label class="horizontal"><input type="radio" name="config-PAX" value="1"<layout:replace name="PAX_ON" /> /> An</label> <label class="horizontal"><input type="radio" name="config-PAX" value="0"<layout:replace name="PAX_OFF" /> /> Aus</label> </fieldset> <fieldset> <legend>PAX-Tags</legend> <label class="horizontal"><input type="radio" name="config-PAXTAGS" value="1"<layout:replace name="PAXTAGS_ON" /> /> An</label> <label class="horizontal"><input type="radio" name="config-PAXTAGS" value="0"<layout:replace name="PAXTAGS_OFF" /> /> Aus</label> </fieldset> <fieldset> <legend>Mail2Crypt</legend> <label class="horizontal"><input type="radio" name="config-MAIL2CRYPT" value="1"<layout:replace name="MAIL2CRYPT_ON" /> /> An</label> <label class="horizontal"><input type="radio" name="config-MAIL2CRYPT" value="0"<layout:replace name="MAIL2CRYPT_OFF" /> /> Aus</label> <label><input type="text" name="config-MAIL2CRYPT_JS" value="<layout:replace name="MAIL2CRYPT_JS" />" />Mail2Crypt JS-Pfad </label> <label><input type="text" name="config-MAIL2CRYPT_IMG" value="<layout:replace name="MAIL2CRYPT_IMG" />" />Mail2Crypt Img-Pfad </label> ]]> </layout:insert> <layout:insert name="pc_config_cache"> <![CDATA[ <fieldset> <legend>Serverseitiger Cache</legend> <label class="horizontal"><input type="radio" name="config-CACHE_STATE" value="1"<layout:replace name="CACHE_STATE_ON" /> /> An</label> <label class="horizontal"><input type="radio" name="config-CACHE_STATE" value="0"<layout:replace name="CACHE_STATE_OFF" /> /> Aus</label> <div id="pc_config_cache_1"> <label><input type="text" name="config-CACHE_DIR" value="<layout:replace name="CACHE_DIR" />" />Pfad zum Cacheverzeichnis </label> </div> </fieldset> <fieldset> <legend>Clientseitiger Cache</legend> <label class="horizontal"><input type="radio" name="config-CACHE_CLIENT" value="1"<layout:replace name="CACHE_CLIENT_ON" /> /> An</label> <label class="horizontal"><input type="radio" name="config-CACHE_CLIENT" value="0"<layout:replace name="CACHE_CLIENT_OFF" /> /> Aus</label> <div id="pc_config_cache_2"> <label><input type="text" name="config-PROXY_CACHE_TIME" value="<layout:replace name="PROXY_CACHE_TIME" />" />Pfad zum Cacheverzeichnis </label> </div> </fieldset> ]]> </layout:insert> <layout:insert name="pc_config_server"> <![CDATA[ <fieldset> <legend>gzip-Komprimierung</legend> <label class="horizontal"><input type="radio" name="config-GZIP" value="1"<layout:replace name="GZIP_ON" /> /> An</label> <label class="horizontal"><input type="radio" name="config-GZIP" value="0"<layout:replace name="GZIP_OFF" /> /> Aus</label> </fieldset> <fieldset> <legend title="Klau dem Apachen sein Gemachen ;)">Stealth-Mode</legend> <label class="horizontal"><input type="radio" name="config-STEALTH_MODE" value="1"<layout:replace name="STEALTH_MODE_ON" /> /> An</label> <label class="horizontal"><input type="radio" name="config-STEALTH_MODE" value="0"<layout:replace name="STEALTH_MODE_OFF" /> /> Aus</label> <div id="pc_config_server_1"> <label><input type="text" name="config-CACHE_DIR" value="<layout:replace name="CACHE_DIR" />" />Pfad zum Cacheverzeichnis </label> <label><input type="text" name="config-CACHE_DIR" value="<layout:replace name="CACHE_DIR" />" />Pfad zum Cacheverzeichnis </label> </div> </fieldset> <fieldset> <legend title="Fehlerbehandlung">Debug-Modus</legend> <label class="horizontal"><input type="radio" name="config-DEBUG" value="1"<layout:replace name="DEBUG_ON" /> /> An</label> <label class="horizontal"><input type="radio" name="config-DEBUG" value="0"<layout:replace name="DEBUG_OFF" /> /> Aus</label> <div id="pc_config_server_2"> <label><input type="text" name="config-ERROR_PAGE" value="<layout:replace name="ERROR_PAGE" />" />Datei für allgemeine Fehler</label> <label><input type="text" name="config-ERROR_PAGE_404" value="<layout:replace name="ERROR_PAGE_404" />" />Datei für Fehler 404 </label> </div> </fieldset> ]]> </layout:insert> <layout:insert name="pc_config_stat"> <![CDATA[ <fieldset> <legend>Allgemeine Statistik</legend> <label class="horizontal"><input type="radio" name="config-STEALTH_MODE" value="1"<layout:replace name="STEALTH_MODE_ON" /> /> An</label> <label class="horizontal"><input type="radio" name="config-STEALTH_MODE" value="0"<layout:replace name="STEALTH_MODE_OFF" /> /> Aus</label> <div id="pc_config_stat_1"> <label><input type="text" name="config-STATS_DIR" value="<layout:replace name="STATS_DIR" />" />Verzeichnis der Statistik </label> <label><input type="text" name="config-STATS_CURRENT" value="<layout:replace name="STATS_CURRENT" />" />aktuelles Verzeichnis der Statistik </label> <label><input type="text" name="config-STATS_BACKUP" value="<layout:replace name="STATS_BACKUP" />" />Backupverzeichnis der Statistik </label> </div> </fieldset> <fieldset> <legend>Referrer</legend> <label class="horizontal"><input type="radio" name="config-REFERRER" value="1"<layout:replace name="REFERRER_ON" /> /> An</label> <label class="horizontal"><input type="radio" name="config-REFERRER" value="0"<layout:replace name="REFERRER_OFF" /> /> Aus</label> <label><input type="text" name="config-REFERRER_DIR" value="<layout:replace name="REFERRER_DIR" />" />Verzeichnis für Referrer-Datei </label> <label><input type="text" name="config-REFERRER_FILE" value="<layout:replace name="REFERRER_FILE" />" />Dateiname für Referrer-Datei </label> <label><input type="text" name="config-REF_RELOAD_LOCK" value="<layout:replace name="REF_RELOAD_LOCK" />" />Reloadsperre </label> </fieldset> ]]> </layout:insert> <layout:insert name="pc_config_other"> <![CDATA[ <fieldset> <legend title="Nur für Experten">Interne Parameter</legend> <label><input type="text" name="config-START_FIELD" value="<layout:replace name="START_FIELD" />" />StartFeld </label> <label><input type="text" name="config-STOP_FIELD" value="<layout:replace name="STOP_FIELD" />" />Stop-Feld </label> <label><input type="text" name="config-MENU_DELIMITER" value="<layout:replace name="MENU_DELIMITER" />" />Menü-Trennzeichen </label> <label><input type="text" name="config-TAG_DELIMITER" value="<layout:replace name="TAG_DELIMITER" />" />Tag-Trennzeichen </label> </fieldset> <fieldset> <legend>Sonstiges</legend> <label><input type="password" name="config-PASS" value="<layout:replace name="PASS" />" />Passwort </label> <label><input type="password" name="config-PASS" value="<layout:replace name="PASS" />" />Passwort </label> </fieldset> ]]> </layout:insert> </layout> |
From: Martin J. <mj...@us...> - 2004-08-25 21:16:58
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/debug In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2565/modules/debug Modified Files: class.module_debug.php Log Message: step 1 is taken Index: class.module_debug.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/debug/class.module_debug.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- class.module_debug.php 4 Jun 2004 11:32:08 -0000 1.2 +++ class.module_debug.php 25 Aug 2004 21:16:49 -0000 1.3 @@ -28,6 +28,9 @@ /* * $Log$ +* Revision 1.3 2004/08/25 21:16:49 mjahn +* step 1 is taken +* * Revision 1.2 2004/06/04 11:32:08 mjahn * several changes * @@ -61,10 +64,10 @@ function getContent (&$actiondata) { if (DEBUG != true) return; - $root = $actiondata['_root']; + $_root = $actiondata['_root']; - $actiondata = array ('_id'=>'trennerdebug', '_type'=>'hr', 'id'=>'', 'class'=>'', '_root'=>$root); - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_id'=>'debugger', '_type'=>'framebox', 'width'=>'50em', 'height'=>'10em', '_root'=>$_root); + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); $this->uri['events'] =& $this->_event->_events; $this->uri['actions'] =& $this->_event->_actionHandler->_actions; @@ -80,12 +83,12 @@ } // set the headline - $actiondata = array ('_id'=>'request_'.$type, '_type'=>'headline', 'content'=>strtoupper ($type), 'id'=>'', 'class'=>'', '_root'=>$root); - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_id'=>'request_'.$type, '_type'=>'headline', 'content'=>strtoupper ($type), 'id'=>'', 'class'=>'', '_root'=>'debugger'); + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); // set the unordered list - $actiondata = array ('_id'=>'list_'.$type, '_type'=>'ulist', 'id'=>'', 'class'=>'', '_root'=>$root); - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_id'=>'list_'.$type, '_type'=>'ulist', 'id'=>'', 'class'=>'', '_root'=>'debugger'); + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); // walk through the array-structure foreach ($data as $id=>$value) { @@ -95,8 +98,8 @@ $content = '$_'.strtoupper($type).'[\''.$id.'\'] = '.$value; // set the list-entry with content - $actiondata = array ('_id'=>$type.$id, '_type'=>'list_entry', 'content'=>$content, '_root'=>'list_'.$type); - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); + $actiondata1 = array ('_id'=>$type.$id, '_type'=>'list_entry', 'content'=>$content, '_root'=>'list_'.$type); + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); } } } |
From: Martin J. <mj...@us...> - 2004-08-25 21:16:56
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/layout/img In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2565/modules/layout/img Added Files: edit_inactive.gif phpcms.png Log Message: step 1 is taken --- NEW FILE: edit_inactive.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: phpcms.png --- (This appears to be a binary file; contents omitted.) |