19 defined(
"XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
29 function __construct()
31 parent::__construct();
43 $blank_img =
'blank.gif';
45 $blank_img = str_replace(
'ranks/',
'', $this->getVar(
'rank_image',
'e'));
54 $form->setExtra(
'enctype="multipart/form-data"');
62 $imageselect_img =
new XoopsFormSelect( $imgpath_img,
'rank_image', $blank_img);
64 $imageselect_img->addOption(
"$blank_img", $blank_img );
65 foreach ($image_array_img as $image_img) {
66 $imageselect_img->addOption(
"$image_img", $image_img );
68 $imageselect_img->setExtra(
"onchange='showImgSelected(\"xo-ranks-img\", \"rank_image\", \"ranks\", \"\", \"" .
XOOPS_UPLOAD_URL .
"\")'" );
69 $imgtray_img->addElement( $imageselect_img,
false );
70 $imgtray_img->addElement(
new XoopsFormLabel(
'',
"<br /><img src='" .
XOOPS_UPLOAD_URL .
"/ranks/" . $blank_img .
"' name='image_img' id='xo-ranks-img' alt='' />" ) );
75 $imgtray_img->addElement( $fileseltray_img );
76 $form->addElement( $imgtray_img );
78 if (!$this->isNew()) {
79 $rank_special = $this->getVar(
'rank_special');
86 $special_tray->addElement(
new XoopsFormRadioYN(
'',
'rank_special', $rank_special ) );
87 $form->addElement( $special_tray );
88 if ( !$this->isNew() ) {
112 parent::__construct(
$db,
'ranks',
'SystemUserrank',
'rank_id',
'rank_title' );