home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / CMS / xoops-2.0.18.1.exe / xoops-2.0.18.1 / htdocs / modules / system / admin / tplsets / tplform.php < prev    next >
Encoding:
PHP Script  |  2005-11-03  |  3.2 KB  |  47 lines

  1. <?php
  2. // $Id: tplform.php 2 2005-11-02 18:23:29Z skalpa $
  3. //  ------------------------------------------------------------------------ //
  4. //                XOOPS - PHP Content Management System                      //
  5. //                    Copyright (c) 2000 XOOPS.org                           //
  6. //                       <http://www.xoops.org/>                             //
  7. //  ------------------------------------------------------------------------ //
  8. //  This program is free software; you can redistribute it and/or modify     //
  9. //  it under the terms of the GNU General Public License as published by     //
  10. //  the Free Software Foundation; either version 2 of the License, or        //
  11. //  (at your option) any later version.                                      //
  12. //                                                                           //
  13. //  You may not change or alter any portion of this comment or credits       //
  14. //  of supporting developers from this source code or any supporting         //
  15. //  source code which is considered copyrighted (c) material of the          //
  16. //  original comment or credit authors.                                      //
  17. //                                                                           //
  18. //  This program is distributed in the hope that it will be useful,          //
  19. //  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
  20. //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
  21. //  GNU General Public License for more details.                             //
  22. //                                                                           //
  23. //  You should have received a copy of the GNU General Public License        //
  24. //  along with this program; if not, write to the Free Software              //
  25. //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
  26. //  ------------------------------------------------------------------------ //
  27.  
  28. include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
  29. $form = new XoopsThemeForm(_MD_EDITTEMPLATE, 'template_form', 'admin.php', 'post', true);
  30. $form->addElement(new XoopsFormLabel(_MD_FILENAME, $tform['tpl_file']));
  31. $form->addElement(new XoopsFormLabel(_MD_FILEDESC, $tform['tpl_desc']));
  32. $form->addElement(new XoopsFormLabel(_MD_LASTMOD, formatTimestamp($tform['tpl_lastmodified'], 'l')));
  33. $form->addElement(new XoopsFormTextArea(_MD_FILEHTML, 'html', $tform['tpl_source'], 25, 70));
  34. $form->addElement(new XoopsFormHidden('id', $tform['tpl_id']));
  35. $form->addElement(new XoopsFormHidden('op', 'edittpl_go'));
  36. $form->addElement(new XoopsFormHidden('redirect', 'edittpl'));
  37. $form->addElement(new XoopsFormHidden('fct', 'tplsets'));
  38. $form->addElement(new XoopsFormHidden('moddir', $tform['tpl_module']));
  39. if ($tform['tpl_tplset'] != 'default') {
  40.     $button_tray = new XoopsFormElementTray('');
  41.     $button_tray->addElement(new XoopsFormButton('', 'previewtpl', _PREVIEW, 'submit'));
  42.     $button_tray->addElement(new XoopsFormButton('', 'submittpl', _SUBMIT, 'submit'));
  43.     $form->addElement($button_tray);
  44. } else {
  45.     $form->addElement(new XoopsFormButton('', 'previewtpl', _MD_VIEW, 'submit'));
  46. }
  47. ?>