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 / userrank / rankform.php < prev    next >
Encoding:
PHP Script  |  2007-12-04  |  3.7 KB  |  55 lines

  1. <?php
  2. // $Id: rankform.php 1145 2007-12-04 09:43:26Z phppp $
  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. // Author: Kazumi Ono (AKA onokazu)                                          //
  28. // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
  29. // Project: The XOOPS Project                                                //
  30. // ------------------------------------------------------------------------- //
  31.  
  32. include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
  33. $rank_form = new XoopsThemeForm($rank['form_title'], 'rankform', 'admin.php', 'post', true);
  34. $rank_form->setExtra('enctype="multipart/form-data"');
  35. $rank_form->addElement(new XoopsFormText(_AM_RANKTITLE, 'rank_title', 50, 50, $rank['rank_title']), true);
  36. $rank_form->addElement(new XoopsFormText(_AM_MINPOST, 'rank_min', 10, 10, $rank['rank_min']));
  37. $rank_form->addElement(new XoopsFormText(_AM_MAXPOST, 'rank_max', 10, 10, $rank['rank_max']));
  38. $rank_tray = new XoopsFormElementTray(_AM_IMAGE, ' ');
  39. $rank_select = new XoopsFormFile('', 'rank_image', 5000000);
  40. $rank_tray->addElement($rank_select);
  41. if (trim($rank['rank_image']) != '' && file_exists(XOOPS_UPLOAD_PATH.'/'.$rank['rank_image'])) {
  42.     $rank_label = new XoopsFormLabel('', '<img src="'.XOOPS_UPLOAD_URL.'/'.$rank['rank_image'].'" alt="" />');
  43.     $rank_tray->addElement($rank_label);
  44. }
  45. $rank_form->addElement($rank_tray);
  46. $tray = new XoopsFormElementTray(_AM_SPECIAL, '<br />');
  47. $tray->addElement(new XoopsFormRadioYN('', 'rank_special', $rank['rank_special']));
  48. $tray->addElement(new XoopsFormLabel('', _AM_SPECIALCAN));
  49. $rank_form->addElement($tray);
  50. $rank_form->addElement(new XoopsFormHidden('rank_id', $rank['rank_id']));
  51. $rank_form->addElement(new XoopsFormHidden('op', $rank['op']));
  52. $rank_form->addElement(new XoopsFormHidden('fct', 'userrank'));
  53. $rank_form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
  54. ?>
  55.