function getForm($action = false)
 {
     global $xoopsDB, $xoopsModule, $xoopsModuleConfig;
     if ($action === false) {
         $action = $_SERVER['REQUEST_URI'];
     }
     $title = $this->isNew() ? sprintf(_AM_TDMCREATE_MODULES_ADD) : sprintf(_AM_TDMCREATE_MODULES_EDIT);
     include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
     $form = new XoopsThemeForm($title, 'form_modules', $action, 'post', true);
     $form->setExtra('enctype="multipart/form-data"');
     $form->insertBreak('<div align="center"><b>' . _AM_TDMCREATE_MODULES_IMPORTANT . '</b></div>', 'head');
     $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_NAME, 'modules_name', 50, 255, $this->getVar('modules_name')), true);
     $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_VERSION, 'modules_version', 50, 255, $this->getVar('modules_version')), true);
     $form->addElement(new XoopsFormTextArea(_AM_TDMCREATE_MODULES_DESCRIPTION, 'modules_description', $this->getVar('modules_description'), 3, 47), true);
     $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_AUTHOR, 'modules_author', 50, 255, $this->getVar('modules_author')), true);
     $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_LICENSE, 'modules_license', 50, 255, $this->getVar('modules_license')), true);
     $modules_display_menu = $this->isNew() ? '1' : $this->getVar('modules_display_menu');
     $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULES_DISPLAY_MENU, 'modules_display_menu', $modules_display_menu, _YES, _NO));
     $modules_display_admin = $this->isNew() ? '1' : $this->getVar('modules_display_admin');
     $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULES_DISPLAY_ADMIN, 'modules_display_admin', $modules_display_admin, _YES, _NO));
     $modules_active_search = $this->isNew() ? '1' : $this->getVar('modules_active_search');
     $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULES_ACTIVE_SEARCH, 'modules_active_search', $modules_active_search, _YES, _NO));
     $modules_image = $this->getVar('modules_image') ? $this->getVar('modules_image') : 'blank.gif';
     $uploadirectory = "/modules/" . $xoopsModule->dirname() . "/images/uploads/modules";
     $imgtray = new XoopsFormElementTray(_AM_TDMCREATE_MODULES_IMAGE, '<br />');
     $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, "./modules/" . $xoopsModule->dirname() . "/images/uploads/modules");
     $imageselect = new XoopsFormSelect($imgpath, 'modules_image', $modules_image);
     $modules_image_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . $uploadirectory);
     foreach ($modules_image_array as $image) {
         $imageselect->addOption("{$image}", $image);
     }
     $imageselect->setExtra("onchange='showImgSelected(\"image3\", \"modules_image\", \"" . $uploadirectory . "\", \"\", \"" . XOOPS_URL . "\")'");
     $imgtray->addElement($imageselect, false);
     $imgtray->addElement(new XoopsFormLabel('', "<br /><img src='" . XOOPS_URL . "/" . $uploadirectory . "/" . $modules_image . "' name='image3' id='image3' alt='' />"));
     $fileseltray = new XoopsFormElementTray('', '<br />');
     $fileseltray->addElement(new XoopsFormFile(_AM_TDMCREATE_FORMUPLOAD, 'attachedfile', 104857600), false);
     $fileseltray->addElement(new XoopsFormLabel(''), false);
     $imgtray->addElement($fileseltray);
     $form->addElement($imgtray);
     $form->insertBreak('<div align="center"><b>' . _AM_TDMCREATE_MODULES_NOTIMPORTANT . '</b></div>', 'head');
     $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_AUTHOR_WEBSITE_URL, 'modules_author_website_url', 50, 255, $this->getVar('modules_author_website_url')), false);
     $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_AUTHOR_WEBSITE_NAME, 'modules_author_website_name', 50, 255, $this->getVar('modules_author_website_name')), false);
     $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_CREDITS, 'modules_credits', 50, 255, $this->getVar('modules_credits')), false);
     $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_RELEASE_INFO, 'modules_release_info', 50, 255, $this->getVar('modules_release_info')), false);
     $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_RELEASE_FILE, 'modules_release_file', 50, 255, $this->getVar('modules_release_file')), false);
     $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_MANUAL, 'modules_manual', 50, 255, $this->getVar('modules_manual')), false);
     $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_MANUAL_FILE, 'modules_manual_file', 50, 255, $this->getVar('modules_manual_file')), false);
     $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_DEMO_SITE_URL, 'modules_demo_site_url', 50, 255, $this->getVar('modules_demo_site_url')), false);
     $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_DEMO_SITE_NAME, 'modules_demo_site_name', 50, 255, $this->getVar('modules_demo_site_name')), false);
     $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_MODULE_WEBSITE_URL, 'modules_module_website_url', 50, 255, $this->getVar('modules_module_website_url')), false);
     $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_MODULE_WEBSITE_NAME, 'modules_module_website_name', 50, 255, $this->getVar('modules_module_website_name')), false);
     $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_RELEASE, 'modules_release', 50, 255, $this->getVar('modules_release')), false);
     $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_STATUS, 'modules_module_status', 50, 255, $this->getVar('modules_module_status')), false);
     $form->addElement(new XoopsFormHidden('op', 'modules_save'));
     $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
     $form->display();
     return $form;
 }
Beispiel #2
0
         break;
     case 'password':
         $myts =& MyTextSanitizer::getInstance();
         $ele = new XoopsFormPassword($title, $config[$i]->getVar('conf_name'), 50, 255, $myts->htmlspecialchars($config[$i]->getConfValueForOutput()));
         break;
     case 'color':
         $myts =& MyTextSanitizer::getInstance();
         $ele = new XoopsFormColorPicker($title, $config[$i]->getVar('conf_name'), $myts->htmlspecialchars($config[$i]->getConfValueForOutput()));
         break;
     case 'hidden':
         $myts =& MyTextSanitizer::getInstance();
         $ele = new XoopsFormHidden($config[$i]->getVar('conf_name'), $myts->htmlspecialchars($config[$i]->getConfValueForOutput()));
         break;
     case 'line_break':
         $myts =& MyTextSanitizer::getInstance();
         $form->insertBreak('<center>' . $title . '</center>', $myts->htmlspecialchars($config[$i]->getConfValueForOutput()));
         break;
     case 'textbox':
     default:
         $myts =& MyTextSanitizer::getInstance();
         $ele = new XoopsFormText($title, $config[$i]->getVar('conf_name'), 50, 255, $myts->htmlspecialchars($config[$i]->getConfValueForOutput()));
         break;
 }
 if (isset($ele)) {
     $ele->setDescription($description);
     $form->addElement($ele);
 }
 $hidden = new XoopsFormHidden('conf_ids[]', $config[$i]->getVar('conf_id'));
 $form->addElement($hidden);
 unset($ele);
 unset($hidden);
 }
 $sql = sprintf("SELECT id, weight, description FROM quality_dimension_weight ORDER BY weight");
 $db->query($sql);
 $qdws = array();
 while ($tmp = $db->fetch_assoc()) {
     $qdws[] = $tmp;
 }
 $formulario = new XoopsThemeForm("New DataSet", "inclusao_assunto", "?acao=salvar");
 $formulario->addElement(new XoopsFormText("Name:", "dataset[Nome]", 50, 50));
 $formulario->addElement(new XoopsFormTextArea("Description:", "dataset[Descricao]", "", 5, 80));
 $idioma = new XoopsFormSelect("Language:", "dataset[IdIdioma]", null, 1, false);
 //,"Idioma das páginas inseridas no DataSet");
 $idioma->addOptionArray(pegaIdiomas());
 $formulario->addElement($idioma);
 $formulario->addElement(new XoopsFormText("Min. pages in dataset:", "dataset[MinPagina]", 5, 5, 10));
 $formulario->insertBreak();
 $formulario->insertBreak();
 $method = new XoopsFormSelect("Dataset feeding method:", "dataset[method]", null, 1, false);
 $method->addOptionArray(array('M' => 'Manual', 'C' => 'Crawler + Quality Evaluation', 'Q' => 'Search engines + Quality Evaluation', 'P' => 'Search engines + P of N'));
 $formulario->addElement($method);
 $formulario->addElement(new XoopsFormLabel('If you are using a quality evaluation method, select which quality dimensions you would like FoxSet to evaluate and assign them a weight (click <a href="#" onclick="document.getElementById(\'table_qwds\').style.display = \'block\'; return false;">here</a> to see how the weight scale works):'));
 $tabela = '<div id="table_qwds" style="display: none;"><table cellspacing="10" style="border: 1px solid #000000;"><tr><td><strong>Weight</strong></td><td><strong>Description</strong></td></tr>';
 foreach ($qdws as $qwd) {
     $tabela .= '<tr><td align="center">' . $qwd['weight'] . '</td><td>' . $qwd['description'] . '</td></tr>';
 }
 $tabela .= '</table></div>';
 $formulario->addElement(new XoopsFormLabel($tabela));
 foreach ($qds as $qd) {
     $nametray = 'tray_qd' . $qd['id'];
     ${$nametray} = new XoopsFormElementTray("");
     $namecheck = 'check_qd' . $qd['id'];
Beispiel #4
0
             break;
         case 'password':
             $myts = MyTextSanitizer::getInstance();
             $ele = new XoopsFormPassword($title, $config[$i]->getVar('conf_name'), 50, 255, $myts->htmlspecialchars($config[$i]->getConfValueForOutput()));
             break;
         case 'color':
             $myts = MyTextSanitizer::getInstance();
             $ele = new XoopsFormColorPicker($title, $config[$i]->getVar('conf_name'), $myts->htmlspecialchars($config[$i]->getConfValueForOutput()));
             break;
         case 'hidden':
             $myts = MyTextSanitizer::getInstance();
             $ele = new XoopsFormHidden($config[$i]->getVar('conf_name'), $myts->htmlspecialchars($config[$i]->getConfValueForOutput()));
             break;
         case 'line_break':
             $myts = MyTextSanitizer::getInstance();
             $form->insertBreak('<div style="text-align:center">' . $title . '</div>', $myts->htmlspecialchars($config[$i]->getConfValueForOutput()));
             break;
         case 'textbox':
         default:
             $myts = MyTextSanitizer::getInstance();
             $ele = new XoopsFormText($title, $config[$i]->getVar('conf_name'), 50, 255, $myts->htmlspecialchars($config[$i]->getConfValueForOutput()));
             break;
     }
     if (isset($ele)) {
         $ele->setDescription($description);
         $form->addElement($ele);
     }
     $hidden = new XoopsFormHidden('conf_ids[]', $config[$i]->getVar('conf_id'));
     $form->addElement($hidden);
     unset($ele, $hidden);
 }
Beispiel #5
0
     xoops_cp_footer();
     exit;
 }
 include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
 $form = new XoopsThemeForm(_AM_EDITHEADL, 'xoopsheadline_form', 'index.php');
 $form->addElement(new XoopsFormText(_AM_SITENAME, 'headline_name', 50, 255, $hl->getVar('headline_name')), true);
 $form->addElement(new XoopsFormText(_AM_URL, 'headline_url', 50, 255, $hl->getVar('headline_url')), true);
 $form->addElement(new XoopsFormText(_AM_URLEDFXML, 'headline_rssurl', 50, 255, $hl->getVar('headline_rssurl')), true);
 $form->addElement(new XoopsFormText(_AM_ORDER, 'headline_weight', 4, 3, $hl->getVar('headline_weight')));
 $enc_sel = new XoopsFormSelect(_AM_ENCODING, 'headline_encoding', $hl->getVar('headline_encoding'));
 $enc_sel->addOptionArray(array('utf-8' => 'UTF-8', 'iso-8859-1' => 'ISO-8859-1', 'us-ascii' => 'US-ASCII'));
 $form->addElement($enc_sel);
 $cache_sel = new XoopsFormSelect(_AM_CACHETIME, 'headline_cachetime', $hl->getVar('headline_cachetime'));
 $cache_sel->addOptionArray(array('3600' => _HOUR, '18000' => sprintf(_HOURS, 5), '86400' => _DAY, '259200' => sprintf(_DAYS, 3), '604800' => _WEEK, '2592000' => _MONTH));
 $form->addElement($cache_sel);
 $form->insertBreak(_AM_MAINSETT);
 $form->addElement(new XoopsFormRadioYN(_AM_DISPLAY, 'headline_display', $hl->getVar('headline_display'), _YES, _NO));
 $form->addElement(new XoopsFormRadioYN(_AM_DISPIMG, 'headline_mainimg', $hl->getVar('headline_mainimg'), _YES, _NO));
 $form->addElement(new XoopsFormRadioYN(_AM_DISPFULL, 'headline_mainfull', $hl->getVar('headline_mainfull'), _YES, _NO));
 $mmax_sel = new XoopsFormSelect(_AM_DISPMAX, 'headline_mainmax', $hl->getVar('headline_mainmax'));
 $mmax_sel->addOptionArray(array('1' => 1, '5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30));
 $form->addElement($mmax_sel);
 $form->insertBreak(_AM_BLOCKSETT);
 $form->addElement(new XoopsFormRadioYN(_AM_ASBLOCK, 'headline_asblock', $hl->getVar('headline_asblock'), _YES, _NO));
 $form->addElement(new XoopsFormRadioYN(_AM_DISPIMG, 'headline_blockimg', $hl->getVar('headline_blockimg'), _YES, _NO));
 $bmax_sel = new XoopsFormSelect(_AM_DISPMAX, 'headline_blockmax', $hl->getVar('headline_blockmax'));
 $bmax_sel->addOptionArray(array('1' => 1, '5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30));
 $form->addElement($bmax_sel);
 $form->insertBreak();
 $form->addElement(new XoopsFormHidden('headline_id', $hl->getVar('headline_id')));
 $form->addElement(new XoopsFormHidden('op', 'editgo'));
 $etrep .= "<td align=left>" . $marque . "</td>";
 $etrep .= "<td align=left>" . _AM_INTER_DELAI . "</td>";
 $etrep .= "<td><input type='text' name='delai' size='10' maxlength='15' value='" . $delai . "'></td>";
 $etrep .= "<tr><td align=left>" . _AM_VEHICULE_MODELE . "</td>";
 $etrep .= "<td align=left>" . $modele_version . "</td>";
 $etrep .= "<td align=left>" . _AM_INTER_KM . "</td>";
 $etrep .= "<td>" . $kilometrage . " Kms</td></tr>";
 $etrep .= "<tr><td colspan=4>&nbsp;</td></tr>";
 $etrep .= "<tr><td align=left>" . _AM_VEHICULE_PROPRIETAIRE . "</td>";
 $etrep .= "<td align=left>" . $civilite . " " . $nom . " " . $prenom . "</td>";
 $etrep .= "<td align=left>" . _AM_CLIENT_TEL . "</td>";
 $etrep .= "<td>" . $teldom . " / " . $telport . "</td></tr>";
 $etrep .= "<tr><td align=left>" . _AM_INTER_TAF . "</td>";
 $etrep .= "<td align=left colspan=3><TEXTAREA style='border: 1px solid #0078F0 ' rows='2' cols='70' name='taf'>" . $description . "</TEXTAREA><br><input type='submit' class='formButton' name='submit' id='submit' value='Mettre &agrave jour' title='MAJ'  /></td></tr>";
 $etrep .= "</table>";
 $form->insertBreak(_AM_VEHICULE_INTERVENTION . '<center><br>' . $etrep . '</center>', 'head');
 $mod_dec = "<table border=1>";
 $mod_dec .= "<tr><td></td>";
 $mod_dec .= "<th colspan=3>" . _AM_INTER_MOD_MECA . "</th>";
 $mod_dec .= "<th colspan=3>" . _AM_INTER_MOD_CARRO . "</th>";
 $mod_dec .= "<td></td></tr>";
 $mod_dec .= "<tr><th align=left width=200px>" . _AM_INTER_EMPL . "</th>";
 $mod_dec .= "<th width=100px>" . _AM_INTER_MOD_T1 . "</th>";
 $mod_dec .= "<th width=100px>" . _AM_INTER_MOD_T2 . "</th>";
 $mod_dec .= "<th width=100px>" . _AM_INTER_MOD_T3 . "</th>";
 $mod_dec .= "<th width=100px>" . _AM_INTER_MOD_T1 . "</th>";
 $mod_dec .= "<th width=100px>" . _AM_INTER_MOD_T2 . "</th>";
 $mod_dec .= "<th width=100px>" . _AM_INTER_MOD_T3 . "</th>";
 $mod_dec .= "<th width=100px>" . _AM_ACTION . "</th></tr>";
 //heures deja declarées
 // init des variables de cumul de la MOD
Beispiel #7
0
    global $xoopsConfig, $xoopsDB, $myts, $wfsConfig;
  	
  	echo "<div><h4>" . _AM_GENERALCONF . "</h4></div>";
  	//echo "<table width='100%' border='0' cellpadding = '2' cellspacing='1' class='outer'>";

// add adminmenu flag
//	adminmenu();
	if ($wfsAdminMenu) adminmenu();
 
	include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
	
	$sform = new XoopsThemeForm(_AM_MENUS, "op", xoops_getenv('PHP_SELF'));

// easy to rename module and table
//	$sform->insertBreak("<div class = even>WF-Section admin</div>");
	$sform->insertBreak("<div class = even>$wfsTitle admin</div>");

	$sform->insertBreak("<tr class = bg3><td >"._AM_CATEGORYMENU."</td><td></td></tr>");
	
	$showcatpic_radio = new XoopsFormRadioYN(_AM_SHOWCATPIC, 'showcatpic', $wfsConfig['showcatpic'], ' Yes', ' No');
	$sform->addElement($showcatpic_radio);
	
	$submenus_radio = new XoopsFormRadioYN(_AM_SHOWSUBMENU, 'submenus', $wfsConfig['submenus'], ' Yes', ' No');
	$sform->addElement($submenus_radio);
	
	$showMarticles_radio = new XoopsFormRadioYN(_AM_SHOWMARTICLES, 'showMarticles', $wfsConfig['showMarticles'], ' Yes', ' No');
	$sform->addElement($showMarticles_radio);
	
	$showMupdated_radio = new XoopsFormRadioYN(_AM_SHOWMUPDATED, 'showMupdated', $wfsConfig['showMupdated'], ' Yes', ' No');
	$sform->addElement($showMupdated_radio);
	
Beispiel #8
0
 function getForm($action = false)
 {
     global $xoopsDB, $xoopsModule, $xoopsModuleConfig;
     $start2 = empty($_REQUEST['start2']) ? 0 : intval($_REQUEST['start2']);
     if ($action === false) {
         $action = $_SERVER['REQUEST_URI'];
     }
     $title = $this->isNew() ? sprintf(_MP_TRIE) : sprintf(_MP_TRIE);
     include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
     $form = new XoopsThemeForm($title, 'form', $action, 'post', true);
     $form->setExtra('enctype="multipart/form-data"');
     $form->addElement(new XoopsFormTextDateSelect(_PM_AM_PRUNEAFTER, 'after', '15', $after = isset($_REQUEST['after']) ? strtotime($_REQUEST['after']) : time()));
     $form->addElement(new XoopsFormTextDateSelect(_PM_AM_PRUNEBEFORE, 'before', '15', $before = isset($_REQUEST['before']) ? strtotime($_REQUEST['before']) : time()));
     if (!$this->isNew()) {
         //Load groups
         $form->addElement(new XoopsFormHidden('id', $this->getVar('art_id')));
     }
     //editor
     //  $editor_configs=array();
     //	$editor_configs["name"] ="art_text'";
     //$editor_configs["value"] = $this->getVar('art_text', 'e');
     //$editor_configs["rows"] = 20;
     //$editor_configs["cols"] = 140;
     //$editor_configs["width"] = "100%";
     //$editor_configs["height"] = "400px";
     //$editor_configs["editor"] = $xoopsModuleConfig["editor"];
     //$form->addElement( new XoopsFormEditor(_AM_TDMSOUND_TEXT, "art_text", $editor_configs), false );
     //upload
     //affiche membre
     $member_handler =& xoops_gethandler('member');
     $usercount = $member_handler->getUserCount();
     $nav = new XoopsPageNav($usercount, 200, $start2, "start2", "op=purge");
     $user_select = new XoopsFormSelect('', "del_userid", @$_REQUEST['del_userid'], 5, true);
     $user_select->setExtra("style=\"width:170px;\" ");
     $criteria = new CriteriaCompo();
     $criteria->setSort('uname');
     $criteria->setOrder('ASC');
     $criteria->setLimit(200);
     $criteria->setStart($start2);
     $user_select->addOptionArray($member_handler->getUserList($criteria));
     $user_select_tray = new XoopsFormElementTray(_MP_NICKNAME, "<br />");
     $user_select_tray->addElement($user_select);
     $user_select_nav = new XoopsFormLabel('', $nav->renderNav(4));
     $user_select_tray->addElement($user_select_nav);
     $form->addElement($user_select_tray);
     //
     //groupe
     $groupe_select = new XoopsFormSelectGroup(_MP_GROUPE, "del_groupe", false, @$_REQUEST['del_groupe'], 5, true);
     $groupe_select->setExtra("style=\"width:170px;\" ");
     $form->addElement($groupe_select);
     //
     $form->addElement(new XoopsFormRadioYN(_PM_AM_ONLYREADMESSAGES, 'onlyread', $onlyread = isset($_REQUEST['onlyread']) ? $_REQUEST['onlyread'] : 0));
     $form->addElement(new XoopsFormRadioYN(_PM_AM_INCLUDEBOX, 'includebox', $includebox = isset($_REQUEST['includebox']) ? $_REQUEST['includebox'] : 0));
     $form->addElement(new XoopsFormRadioYN(_PM_AM_INCLUDESEND, 'includesend', $includesend = isset($_REQUEST['includesend']) ? $_REQUEST['includesend'] : 0));
     $form->addElement(new XoopsFormRadioYN(_PM_AM_INCLUDESAVE, 'includesave', $includesave = isset($_REQUEST['includesave']) ? $_REQUEST['includesave'] : 0));
     $form->addElement(new XoopsFormRadioYN(_PM_AM_INCLUDEFILE, 'includefile', $includefile = isset($_REQUEST['includefile']) ? $_REQUEST['includefile'] : 0));
     $form->addElement($texte_hidden);
     $form->addElement($promotray);
     $form->addElement($liste_read);
     $button_tray = new XoopsFormElementTray(_MP_ACTION, '');
     $button_tray->addElement(new XoopsFormButton('', 'op', _MP_VISU, 'submit'));
     $form->addElement($button_tray);
     //option purge
     $form->insertBreak(_MP_WARNING, 'odd');
     $form->addElement(new XoopsFormRadioYN(_PM_AM_NOTIFYUSERS, 'notifyusers', $notifyusers = isset($_REQUEST['notifyusers']) ? $_REQUEST['notifyusers'] : 0));
     $form->addElement(new XoopsFormRadioYN(_MP_NOTIFYFILE, 'notifyfile', $notifyfile = isset($_REQUEST['notifyfile']) ? $_REQUEST['notifyfile'] : 0));
     $purge_tray = new XoopsFormElementTray(_MP_ACTION, '');
     $purge_tray->addElement(new XoopsFormButton('', 'op', _MP_PURGE_OK, 'submit'));
     $form->addElement($purge_tray);
     return $form;
 }
Beispiel #9
0
    }
}
//----------form-Start--------------------------
$form->addElement($title_text);
$form->setRequired($title_text);
$form->addElement($cat_select);
if ($mode == G_INSERT) {
    $form->setRequired($cat_select);
}
$form->addElement($cat_select1);
$form->addElement($cat_select2);
$form->addElement($cat_select3);
$form->addElement($cat_select4);
$form->addElement($desc_tarea);
$form->addElement($hidden_body_html);
$form->insertBreak(_MD_GNAV_SMT_TITLE_FILE);
if ($photo['ext']) {
    $form->addElement($photoview);
    if ($gnavi_allownoimage) {
        $form->addElement($del_box);
    }
} else {
    $form->addElement($del_hidden);
}
$form->addElement($file_form);
$form->addElement($caption_text);
if ($photo['ext1']) {
    $form->addElement($photoview1);
    $form->addElement($del_box1);
} else {
    $form->addElement($del_hidden1);
Beispiel #10
0
function edittopic($CID = '')
{
    $html = '';
    $smiley = '';
    $xcodes = '';
    $pagetitle = '';
    $pageheadline = '';
    $page = '';
    $breaks = 1;
    $defaultpage = 0;
    $indeximage = '';
    $weight = 1;
    $htmlfile = '';
    $mainpage = 0;
    $submenu = 0;
    $allowcomments = 0;
    global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $XOOPS_URL, $xoopsModuleConfig;
    include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
    if ($CID) {
        $result = $xoopsDB->query("SELECT CID,pagetitle, pageheadline, page, weight, html, smiley, xcodes, breaks, defaultpage, indeximage, htmlfile, mainpage, submenu, created, comments, allowcomments  FROM " . $xoopsDB->prefix("wfschannel") . " WHERE CID = {$CID} ");
        list($CID, $pagetitle, $pageheadline, $page, $weight, $html, $smiley, $xcodes, $breaks, $defaultpage, $indeximage, $htmlfile, $mainpage, $submenu, $created, $comments, $allowcomments) = $xoopsDB->fetchrow($result);
        if ($xoopsDB->getRowsNum($result) == 0) {
            redirect_header("index.php", 1, _AM_NOTOPICTOEDIT);
            exit;
        }
        $sform = new XoopsThemeForm(_AM_MODIFYEXSITCHAN, "op", xoops_getenv('PHP_SELF'));
    } else {
        $sform = new XoopsThemeForm(_AM_ADDCHAN, "op", xoops_getenv('PHP_SELF'));
    }
    if (!$indeximage) {
        $indeximage = "blank.png";
    }
    $graph_array =& XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . "/" . $xoopsModuleConfig['uploaddir']);
    $indeximage_select = new XoopsFormSelect('', 'indeximage', $indeximage);
    $indeximage_select->addOptionArray($graph_array);
    $indeximage_select->setExtra("onchange='showImgSelected(\"image1\", \"indeximage\", \"" . $xoopsModuleConfig['uploaddir'] . "\", \"\", \"" . XOOPS_URL . "\")'");
    $indeximage_tray = new XoopsFormElementTray(_AM_CHAIMAGE, '&nbsp;');
    $indeximage_tray->addElement($indeximage_select);
    $indeximage_tray->addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/" . $xoopsModuleConfig['uploaddir'] . "/" . $indeximage . "' name='image1' id='image1' alt='' />"));
    $sform->addElement($indeximage_tray);
    $sform->addElement(new XoopsFormText(_AM_CHANW, 'weight', 4, 4, $weight));
    $sform->addElement(new XoopsFormText(_AM_CHANQ, 'pagetitle', 50, 255, $pagetitle), true);
    $sform->addElement(new XoopsFormText(_AM_CHANHDL, 'pageheadline', 50, 255, $pageheadline), false);
    ob_start();
    htmlarray($htmlfile, XOOPS_ROOT_PATH . "/" . $xoopsModuleConfig['htmluploaddir']);
    $sform->addElement(new XoopsFormLabel(_AM_CHANHTML, ob_get_contents()));
    ob_end_clean();
    $sform->addElement(new XoopsFormDhtmlTextArea(_AM_CHANA, 'page', $page, 15, 60), false);
    $html_checkbox = new XoopsFormCheckBox('', 'html', $html);
    $html_checkbox->addOption(1, _AM_DOHTML);
    $sform->addElement($html_checkbox);
    $smiley_checkbox = new XoopsFormCheckBox('', 'smiley', $smiley);
    $smiley_checkbox->addOption(1, _AM_DOSMILEY);
    $sform->addElement($smiley_checkbox);
    $xcodes_checkbox = new XoopsFormCheckBox('', 'xcodes', $xcodes);
    $xcodes_checkbox->addOption(1, _AM_DOXCODE);
    $sform->addElement($xcodes_checkbox);
    $breaks_checkbox = new XoopsFormCheckBox('', 'breaks', $breaks);
    $breaks_checkbox->addOption(1, _AM_BREAKS);
    $sform->addElement($breaks_checkbox);
    $sform->insertBreak("<b>" . _AM_MENU . "</b>", 'bg3');
    $defaultpage_radio = new XoopsFormRadioYN(_AM_DEFAULT, 'defaultpage', $defaultpage, ' ' . _AM_YES . '', ' ' . _AM_NO . '');
    $sform->addElement($defaultpage_radio);
    if ($defaultpage == 0) {
        $submenuitem_radio = new XoopsFormRadioYN(_AM_SUBMENUITEM, 'submenu', $submenu, ' ' . _AM_YES . '', ' ' . _AM_NO . '');
        $sform->addElement($submenuitem_radio);
        $mainpage_radio = new XoopsFormRadioYN(_AM_MAINPAGEITEM, 'mainpage', $mainpage, ' ' . _AM_YES . '', ' ' . _AM_NO . '');
        $sform->addElement($mainpage_radio);
    }
    if (!isset($allowcomments)) {
        $allowcomments = 0;
    }
    $allowcomments_radio = new XoopsFormRadioYN(_AM_ALLOWCOMMENTSCHANHTML, 'allowcomments', $allowcomments, ' ' . _AM_YES . '', ' ' . _AM_NO . '');
    $sform->addElement($allowcomments_radio);
    $sform->addElement(new XoopsFormHidden('CID', $CID));
    $create_tray = new XoopsFormElementTray('', '');
    $create_tray->addElement(new XoopsFormHidden('op', 'save'));
    if (!$CID) {
        $butt_save = new XoopsFormButton('', '', _AM_CREATE, 'submit');
        $butt_save->setExtra('onclick="this.form.elements.op.value=\'save\'"');
    } else {
        $butt_save = new XoopsFormButton('', '', _AM_MODIFY, 'submit');
        $butt_save->setExtra('onclick="this.form.elements.op.value=\'save\'"');
    }
    $create_tray->addElement($butt_save);
    $butt_cancel = new XoopsFormButton('', '', _AM_CANCEL, 'submit');
    $butt_cancel->setExtra('onclick="this.form.elements.op.value=\'cancel\'"');
    $create_tray->addElement($butt_cancel);
    $sform->addElement($create_tray);
    $sform->display();
    unset($hidden);
}
Beispiel #11
0
function hypconfShowForm($config)
{
    global $constpref, $mydirname, $mydirpath, $mytrustdirpath, $page, $xoopsConfig, $xoopsGTicket;
    if (!$config) {
        die('no configs');
    }
    if (isset($config['error'])) {
        echo '<div class="error">' . join('</div><div class="error">', $config['error']) . '</div>';
        unset($config['error']);
    }
    if (isset($config['contents'])) {
        echo $config['contents'];
        unset($config['contents']);
    }
    if ($config) {
        $count = count($config);
        include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
        include_once dirname(dirname(__FILE__)) . '/class/formcheckbox.php';
        if (!XC_CLASS_EXISTS('XoopsFormBreak')) {
            include_once dirname(dirname(__FILE__)) . '/class/formbreak.php';
        }
        $form = new XoopsThemeForm(hypconf_constant($constpref . '_ADMENU_' . strtoupper($page)), 'pref_form', 'index.php');
        $button_tray = new XoopsFormElementTray("");
        for ($i = 0; $i < $count; $i++) {
            $description = defined($config[$i]['description']) ? constant($config[$i]['description']) : '';
            //$title4tray = (!$description) ? hypconf_constant($config[$i]['title']) : hypconf_constant($config[$i]['title']).'<br /><br /><span style="font-weight:normal;">'.hypconf_constant($config[$i]['description']).'</span>'; // GIJ
            $title4tray = hypconf_constant($config[$i]['title']);
            $title = '';
            // GIJ
            switch ($config[$i]['formtype']) {
                case 'textarea':
                    $myts =& MyTextSanitizer::getInstance();
                    if ($config[$i]['valuetype'] == 'array') {
                        // this is exceptional.. only when value type is arrayneed a smarter way for this
                        $ele = $config[$i]['value'] != '' ? new XoopsFormTextArea($title, $config[$i]['name'], $myts->htmlspecialchars(implode('|', $config[$i]['value'])), 5, 50) : new XoopsFormTextArea($title, $config[$i]['name'], '', 5, 50);
                    } else {
                        $ele = new XoopsFormTextArea($title, $config[$i]['name'], $myts->htmlspecialchars($config[$i]['value']), 5, 50);
                        $ele->setExtra('class="norich"');
                    }
                    break;
                case 'select':
                    $size = 1;
                    if (!empty($config[$i]['size'])) {
                        $size = $config[$i]['size'];
                    }
                    $ele = new XoopsFormSelect($title, $config[$i]['name'], $config[$i]['value'], $size);
                    $options = $config[$i]['options'];
                    $opcount = count($options);
                    foreach ($options as $option) {
                        $optval = defined($option['confop_value']) ? constant($option['confop_value']) : $option['confop_value'];
                        $optkey = defined($option['confop_name']) ? constant($option['confop_name']) : $option['confop_name'];
                        $ele->addOption($optval, $optkey);
                    }
                    break;
                case 'select_multi':
                    $size = 5;
                    if (!empty($config[$i]['size'])) {
                        $size = $config[$i]['size'];
                    }
                    $ele = new XoopsFormSelect($title, $config[$i]['name'], $config[$i]['value'], $size, true);
                    $options = $config[$i]['options'];
                    foreach ($options as $option) {
                        $optval = defined($option['confop_value']) ? constant($option['confop_value']) : $option['confop_value'];
                        $optkey = defined($option['confop_name']) ? constant($option['confop_name']) : $option['confop_name'];
                        $ele->addOption($optval, $optkey);
                    }
                    break;
                case 'check':
                    $ele = new HypconfFormCheckBox($title, $config[$i]['name'], $config[$i]['value']);
                    if (!empty($config[$i]['width'])) {
                        //$ele->setWidth($config[$i]['width']);
                    }
                    $options = $config[$i]['options'];
                    foreach ($options as $option) {
                        $optval = defined($option['confop_value']) ? hypconf_constant($option['confop_value']) : $option['confop_value'];
                        $optkey = defined($option['confop_name']) ? hypconf_constant($option['confop_name']) : $option['confop_name'];
                        $ele->addOption($optval, $optkey);
                    }
                    break;
                case 'yesno':
                    $ele = new XoopsFormRadioYN($title, $config[$i]['name'], $config[$i]['value'], _YES, _NO);
                    break;
                case 'password':
                    $size = 50;
                    if (!empty($config[$i]['size'])) {
                        $size = $config[$i]['size'];
                    }
                    $myts =& MyTextSanitizer::getInstance();
                    $ele = new XoopsFormPassword($title, $config[$i]['name'], $size, 255, $myts->htmlspecialchars($config[$i]['value']));
                    break;
                case 'textbox':
                default:
                    $size = 50;
                    if (!empty($config[$i]['size'])) {
                        $size = $config[$i]['size'];
                    }
                    $myts =& MyTextSanitizer::getInstance();
                    $ele = new XoopsFormText($title, $config[$i]['name'], $size, 255, $myts->htmlspecialchars($config[$i]['value']));
                    if ($config[$i]['valuetype'] === 'int') {
                        $ele->setExtra(' style="text-align:right;"');
                    }
                    break;
            }
            $ele_tray = new XoopsFormElementTray($title4tray, '');
            $ele_tray->addElement($ele);
            $form->addElement($ele_tray);
            if ($description) {
                $form->insertBreak('<span style="font-weight:normal;">' . $description . '</span>', 'odd');
            }
            unset($ele_tray);
            unset($ele);
        }
        $button_tray->addElement(new XoopsFormHidden('op', 'save'));
        $button_tray->addElement(new XoopsFormHidden('page', $page));
        $xoopsGTicket->addTicketXoopsFormElement($button_tray, __LINE__, 1800, 'hypconf');
        $button_tray->addElement(new XoopsFormButton('', 'button', _GO, 'submit'));
        $form->addElement($button_tray);
        $form->display();
    }
}
Beispiel #12
0
function hypconfShowForm($config)
{
    global $constpref, $mydirname, $mydirpath, $mytrustdirpath, $page, $xoopsConfig, $xoopsGTicket;
    if (!$config) {
        die('no configs');
    }
    if (isset($config['error'])) {
        echo '<div class="error">' . join('</div><div class="error">', $config['error']) . '</div>';
        unset($config['error']);
    }
    if (isset($config['contents'])) {
        echo $config['contents'];
        unset($config['contents']);
    }
    $underContents = '';
    if (isset($config['underContents'])) {
        $underContents = $config['underContents'];
        unset($config['underContents']);
    }
    if ($config) {
        $count = count($config);
        include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
        include_once dirname(dirname(__FILE__)) . '/class/formcheckbox.php';
        if (!XC_CLASS_EXISTS('XoopsFormBreak')) {
            include_once dirname(dirname(__FILE__)) . '/class/formbreak.php';
        }
        $form = new XoopsThemeForm(hypconf_constant($constpref . '_ADMENU_' . strtoupper($page)), 'pref_form', 'index.php');
        $button_tray = new XoopsFormElementTray("");
        for ($i = 0; $i < $count; $i++) {
            $description = defined($config[$i]['description']) ? constant($config[$i]['description']) : '';
            //$title4tray = (!$description) ? hypconf_constant($config[$i]['title']) : hypconf_constant($config[$i]['title']).'<br /><br /><span style="font-weight:normal;">'.hypconf_constant($config[$i]['description']).'</span>'; // GIJ
            $title4tray = hypconf_constant($config[$i]['title']);
            $title = '';
            // GIJ
            switch ($config[$i]['formtype']) {
                case 'textarea':
                    (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || ($myts =& MyTextSanitizer::getInstance());
                    if ($config[$i]['valuetype'] == 'array') {
                        // this is exceptional.. only when value type is arrayneed a smarter way for this
                        $ele = $config[$i]['value'] != '' ? new XoopsFormTextArea($title, $config[$i]['name'], $myts->htmlspecialchars(implode('|', $config[$i]['value'], _CHARSET)), 5, 50) : new XoopsFormTextArea($title, $config[$i]['name'], '', 5, 50);
                    } else {
                        $ele = new XoopsFormTextArea($title, $config[$i]['name'], $myts->htmlspecialchars($config[$i]['value'], ENT_COMPAT, _CHARSET), 5, 50);
                        $ele->setExtra('class="norich plain" spellcheck="false"');
                    }
                    break;
                case 'select':
                    $size = 1;
                    if (!empty($config[$i]['size'])) {
                        $size = $config[$i]['size'];
                    }
                    $ele = new XoopsFormSelect($title, $config[$i]['name'], $config[$i]['value'], $size);
                    $options = $config[$i]['options'];
                    $opcount = count($options);
                    //var_dump($options);
                    foreach ($options as $option) {
                        if (isset($option['confop_value']) && isset($option['confop_name'])) {
                            $optval = defined($option['confop_value']) ? constant($option['confop_value']) : $option['confop_value'];
                            $optkey = defined($option['confop_name']) ? constant($option['confop_name']) : $option['confop_name'];
                        } else {
                            $optval = $optkey = $option;
                        }
                        $ele->addOption($optval, $optkey);
                    }
                    break;
                case 'select_multi':
                    $size = 5;
                    if (!empty($config[$i]['size'])) {
                        $size = $config[$i]['size'];
                    }
                    $ele = new XoopsFormSelect($title, $config[$i]['name'], $config[$i]['value'], $size, true);
                    $options = $config[$i]['options'];
                    foreach ($options as $option) {
                        $optval = defined($option['confop_value']) ? constant($option['confop_value']) : $option['confop_value'];
                        $optkey = defined($option['confop_name']) ? constant($option['confop_name']) : $option['confop_name'];
                        $ele->addOption($optval, $optkey);
                    }
                    break;
                case 'check':
                    $ele = new HypconfFormCheckBox($title, $config[$i]['name'], $config[$i]['value']);
                    if (!empty($config[$i]['width'])) {
                        //$ele->setWidth($config[$i]['width']);
                    }
                    $options = $config[$i]['options'];
                    foreach ($options as $option) {
                        $optval = defined($option['confop_value']) ? hypconf_constant($option['confop_value']) : $option['confop_value'];
                        $optkey = defined($option['confop_name']) ? hypconf_constant($option['confop_name']) : $option['confop_name'];
                        $ele->addOption($optval, $optkey);
                    }
                    break;
                case 'radio':
                    $ele = new XoopsFormRadio($title, $config[$i]['name'], $config[$i]['value']);
                    if (!empty($config[$i]['width'])) {
                        //$ele->setWidth($config[$i]['width']);
                    }
                    $options = $config[$i]['options'];
                    foreach ($options as $option) {
                        $optval = defined($option['confop_value']) ? hypconf_constant($option['confop_value']) : $option['confop_value'];
                        $optkey = defined($option['confop_name']) ? hypconf_constant($option['confop_name']) : $option['confop_name'];
                        $ele->addOption($optval, $optkey);
                    }
                    break;
                case 'yesno':
                    $ele = new XoopsFormRadioYN($title, $config[$i]['name'], $config[$i]['value'], _YES, _NO);
                    break;
                case 'password':
                    $size = 50;
                    if (!empty($config[$i]['size'])) {
                        $size = $config[$i]['size'];
                    }
                    (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || ($myts =& MyTextSanitizer::getInstance());
                    $ele = new XoopsFormPassword($title, $config[$i]['name'], $size, 255, $myts->htmlspecialchars($config[$i]['value'], ENT_COMPAT, _CHARSET));
                    break;
                case 'label':
                    $ele = new XoopsFormLabel($title, $description);
                    $description = '';
                    break;
                case 'theme':
                case 'theme_multi':
                    $ele = $config[$i]['formtype'] !== 'theme_multi' ? new XoopsFormSelect($title, $config[$i]['name'], $config[$i]['value']) : new XoopsFormSelect($title, $config[$i]['name'], $config[$i]['value'], 5, true);
                    $handle = opendir(XOOPS_THEME_PATH . '/');
                    $dirlist = array();
                    while (false !== ($file = readdir($handle))) {
                        if (is_dir(XOOPS_THEME_PATH . '/' . $file) && !preg_match("/^\\..*\$/", $file) && strtolower($file) != 'cvs') {
                            $dirlist[$file] = $file;
                        }
                    }
                    closedir($handle);
                    $ele->addOption('', hypconf_constant($constpref . '_NOT_SPECIFY'));
                    if (!empty($dirlist)) {
                        asort($dirlist);
                        $ele->addOptionArray($dirlist);
                    }
                    break;
                case 'tplset':
                    $ele = new XoopsFormSelect($title, $config[$i]['name'], $config[$i]['value']);
                    $tplset_handler =& xoops_gethandler('tplset');
                    $tplsetlist =& $tplset_handler->getList();
                    asort($tplsetlist);
                    $ele->addOption('', hypconf_constant($constpref . '_NOT_SPECIFY'));
                    foreach ($tplsetlist as $key => $name) {
                        $ele->addOption($key, htmlspecialchars($name, ENT_QUOTES, _CHARSET));
                    }
                    break;
                case 'textbox':
                default:
                    $size = 50;
                    if (!empty($config[$i]['size'])) {
                        $size = $config[$i]['size'];
                    }
                    (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || ($myts =& MyTextSanitizer::getInstance());
                    $ele = new XoopsFormText($title, $config[$i]['name'], $size, 255, $myts->htmlspecialchars($config[$i]['value'], ENT_COMPAT, _CHARSET));
                    if ($config[$i]['valuetype'] === 'int') {
                        $ele->setExtra(' style="text-align:right;"');
                    }
                    break;
            }
            $ele_tray = new XoopsFormElementTray($title4tray, '');
            $ele_tray->addElement($ele);
            $form->addElement($ele_tray);
            if ($description) {
                $form->insertBreak('<span style="font-weight:normal;">' . $description . '</span>', 'odd');
            }
            unset($ele_tray);
            unset($ele);
        }
        $button_tray->addElement(new XoopsFormHidden('op', 'save'));
        $button_tray->addElement(new XoopsFormHidden('page', $page));
        $xoopsGTicket->addTicketXoopsFormElement($button_tray, __LINE__, 1800, 'hypconf');
        $button_tray->addElement(new XoopsFormButton('', 'button', _GO, 'submit'));
        $form->addElement($button_tray);
        $form->display();
    }
    if ($underContents) {
        echo '<div>' . $underContents . '</div>';
    }
}
Beispiel #13
0
 if ($res) {
     while (($row = $xoopsDB->fetchArray($res)) != false) {
         $id = $row['id'];
         $nom = $row['nom'];
         $description = $row['description'];
         $tarif = $row['tarif'];
     }
 }
 Xoops_Cp_Header();
 garage_tabsAdminMenu("forfait.php");
 doc_info('forfait');
 $form = new XoopsThemeForm(_AM_FORFAIT_MODIFICATION, 'mforfait', "forfait.php?op=create&id=" . $id, 'post');
 $form->addElement(new XoopsFormText(_AM_FORFAIT_NOM, 'nom_forfait', 50, 255, $nom));
 $form->addElement(new XoopsFormTextArea(_AM_FORFAIT_DESCRIPTION, 'description_forfait', $description, 5, 60));
 $form->addElement(new XoopsFormText(_AM_FORFAIT_TARIF, 'tarif_forfait', 10, 10, $tarif));
 $form->insertBreak('<h3><center>' . _AM_FORFAIT_PIECES . '</center></h3><br>', 'head');
 //pieces
 // ajout de pieces
 $req1 = $xoopsDB->query("SELECT p.id, p.ref, p.designation, f.nom FROM " . $xoopsDB->prefix("garage_pieces") . " p INNER JOIN " . $xoopsDB->prefix("garage_fournisseur") . " f ON f.id = p.id_fournisseur ORDER BY designation ASC");
 $list_id_pieces = array();
 $list_id_pieces[0] = _AM_PCE_MAG;
 while ((list($id_piece, $ref, $designation, $nom_fournisseur) = $xoopsDB->fetchRow($req1)) != false) {
     $list_id_pieces[$id_piece] = $designation . ' - ' . $nom_fournisseur;
 }
 //liste des pieces deja renseignées
 $reqp = $xoopsDB->query("SELECT * FROM " . $xoopsDB->prefix("garage_nomenc_forfait") . " WHERE id_forfait=" . $id);
 $pieces_det = "<table border=1>";
 $pieces_det .= "<tr><th align=left>" . _AM_PCE_DESIG . "</th>";
 $pieces_det .= "<th align=center width=100px>" . _AM_PCE_QTE . "</th>";
 $pieces_det .= "<th align=center width=100px>" . _AM_PCE_PX . "</th>";
 $pieces_det .= "<th align=center width=100px>" . _AM_ACTION . "</th></tr>";
Beispiel #14
0
/**
* Get {@link XoopsThemeForm} for editing a user
*
* @param object $user {@link XoopsUser} to edit
*
* @return object
*/
function getUserForm(&$user, $action = false)
{
    global $xoopsConfig, $xoopsModule, $xoopsModuleConfig, $xoopsUser;
    if ($action === false) {
        $action = $_SERVER['REQUEST_URI'];
    }
    include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
    $title = $user->isNew() ? _PROFILE_AM_ADDUSER : _PROFILE_MA_EDITPROFILE;
    $form = new XoopsThemeForm($title, 'userinfo', $action, 'post', true);
    if ($user->isNew() || $xoopsUser->isAdmin()) {
        $elements[0][] = array('element' => new XoopsFormText(_PROFILE_MA_NICKNAME, 'loginname', 25, 255, $user->getVar('loginname', 'e')), 'required' => 1);
    } else {
        $elements[0][] = array('element' => new XoopsFormLabel(_PROFILE_MA_NICKNAME, $user->getVar('loginname')), 'required' => 0);
    }
    $weights[0][] = 0;
    $elements[0][] = array('element' => new XoopsFormText(_PROFILE_MA_DISPLAYNAME, 'uname', 25, 75, $user->getVar('uname', 'e')), 'required' => 1);
    $weights[0][] = 0;
    $elements[0][] = array('element' => new XoopsFormText(_PROFILE_MA_REALNAME, 'name', 25, 75, $user->getVar('name', 'e')), 'required' => 0);
    $weights[0][] = 0;
    $email_tray = new XoopsFormElementTray(_PROFILE_MA_EMAIL, '<br />');
    if ($user->isNew() || $xoopsModuleConfig['allow_chgmail'] == 1 || $xoopsUser->isAdmin()) {
        $email_text = new XoopsFormText('', 'email', 30, 60, $user->getVar('email'));
    } else {
        $email_text = new XoopsFormLabel('', $user->getVar('email'));
    }
    $email_tray->addElement($email_text, $user->isNew() || $xoopsModuleConfig['allow_chgmail'] == 1);
    $elements[0][] = array('element' => $email_tray, 'required' => 0);
    $weights[0][] = 0;
    if ($xoopsUser->isAdmin() && $user->getVar('uid') != $xoopsUser->getVar('uid')) {
        //If the user is an admin and is editing someone else
        $pwd_text = new XoopsFormPassword('', 'password', 10, 32);
        $pwd_text2 = new XoopsFormPassword('', 'vpass', 10, 32);
        $pwd_tray = new XoopsFormElementTray(_PROFILE_MA_PASSWORD . '<br />' . _PROFILE_MA_TYPEPASSTWICE);
        $pwd_tray->addElement($pwd_text);
        $pwd_tray->addElement($pwd_text2);
        $elements[0][] = array('element' => $pwd_tray, 'required' => 0);
        //cannot set an element tray required
        $weights[0][] = 0;
        $level_radio = new XoopsFormRadio(_PROFILE_MA_ACTIVEUSER, 'level', $user->getVar('level'));
        $level_radio->addOption(1, _PROFILE_MA_ACTIVE);
        $level_radio->addOption(0, _PROFILE_MA_INACTIVE);
        $level_radio->addOption(-1, _PROFILE_MA_DISABLED);
        $elements[0][] = array('element' => $level_radio, 'required' => 0);
        $weights[0][] = 0;
    }
    $elements[0][] = array('element' => new XoopsFormHidden('uid', $user->getVar('uid')), 'required' => 0);
    $weights[0][] = 0;
    $elements[0][] = array('element' => new XoopsFormHidden('op', 'save'), 'required' => 0);
    $weights[0][] = 0;
    if ($xoopsUser && $xoopsUser->isAdmin()) {
        $xoopsModule->loadLanguage("admin");
        $rank_select = new XoopsFormSelect(_PROFILE_AM_RANK, "rank", $user->getVar('rank'));
        $ranklist = XoopsLists::getUserRankList();
        if (count($ranklist) > 0) {
            $rank_select->addOption(0, _PROFILE_AM_NSRA);
            $rank_select->addOption(0, "--------------");
            $rank_select->addOptionArray($ranklist);
        } else {
            $rank_select->addOption(0, _PROFILE_AM_NSRID);
        }
        $elements[0][] = array('element' => $rank_select, 'required' => 0);
        $weights[0][] = 0;
        $gperm_handler =& xoops_gethandler('groupperm');
        //If user has admin rights on groups
        include_once XOOPS_ROOT_PATH . "/modules/system/constants.php";
        if ($gperm_handler->checkRight("system_admin", XOOPS_SYSTEM_GROUP, $xoopsUser->getGroups(), 1)) {
            //add group selection
            $group_select = new XoopsFormSelectGroup(_PROFILE_AM_GROUP, 'groups', false, $user->getGroups(), 5, true);
            $elements[0][] = array('element' => $group_select, 'required' => 0);
            $weights[0][] = 0;
        }
    }
    // Dynamic fields
    $profile_handler =& xoops_gethandler('profile');
    // Get fields
    $fields =& $profile_handler->loadFields();
    // Get ids of fields that can be edited
    $gperm_handler =& xoops_gethandler('groupperm');
    $editable_fields = $gperm_handler->getItemIds('profile_edit', $xoopsUser->getGroups(), $xoopsModule->getVar('mid'));
    $profile_fieldcat_handler =& xoops_getmodulehandler('fieldcategory');
    /* @var $profile_fieldcat_handler ProfileFieldCategoryHandler */
    $profile_cat_handler =& xoops_getmodulehandler('category');
    /* @var $profile_cat_handler ProfileCategoryHandler */
    $fieldcats =& $profile_fieldcat_handler->getObjects(null, true);
    if (count($fieldcats) > 0) {
        foreach (array_keys($fieldcats) as $i) {
            $catids[] = $fieldcats[$i]->getVar('catid');
        }
        $categories =& $profile_cat_handler->getObjects(new Criteria('catid', "(" . implode(',', array_unique($catids)) . ")", "IN"), true, false);
    }
    $fieldcat_handler =& xoops_getmodulehandler('fieldcategory');
    $fieldcats =& $fieldcat_handler->getObjects(null, true);
    foreach (array_keys($fields) as $i) {
        if (in_array($fields[$i]->getVar('fieldid'), $editable_fields)) {
            $fieldinfo['element'] = $fields[$i]->getEditElement($user);
            $fieldinfo['required'] = $fields[$i]->getVar('field_required');
            if (isset($fieldcats[$fields[$i]->getVar('fieldid')])) {
                $key = $fieldcats[$fields[$i]->getVar('fieldid')]->getVar('catid');
            } else {
                $key = 0;
            }
            $elements[$key][] = $fieldinfo;
            $weights[$key][] = isset($fieldcats[$fields[$i]->getVar('fieldid')]) ? intval($fieldcats[$fields[$i]->getVar('fieldid')]->getVar('field_weight')) : 1;
        }
    }
    ksort($elements);
    foreach (array_keys($elements) as $k) {
        array_multisort($weights[$k], SORT_ASC, array_keys($elements[$k]), SORT_ASC, $elements[$k]);
        $title = isset($categories[$k]) ? $categories[$k]['cat_title'] : _PROFILE_MA_DEFAULT;
        $form->insertBreak($title, 'head');
        foreach (array_keys($elements[$k]) as $i) {
            $form->addElement($elements[$k][$i]['element'], $elements[$k][$i]['required']);
        }
    }
    $form->addElement(new XoopsFormButton('', 'submit', _PROFILE_MA_SAVECHANGES, 'submit'));
    return $form;
}
Beispiel #15
0
 $form_home->addOption(1, '&nbsp;');
 $form->addElement($form_home);
 $options = array();
 $promotray = new XoopsFormElementTray('');
 $option_select = new XoopsFormSelect(_MP_FORMTYPE, 'formtype', $formtype);
 // $option_wins = array(
 // '1' => 'Compact' , '2' => 'DHTML','3' => 'htmlarea', '4' => 'Koivi', '5' => 'TinyEditor', '6' => 'Inbetween' , '7' => 'spaw', '8' => 'FCK');
 $option_wins = mp_selecteditor();
 foreach ($xoopsModuleConfig['wysiwyg'] as $option) {
     if (!empty($option_wins[$option])) {
         $options[$option] = $option_wins[$option];
     }
 }
 $option_select->addOptionArray($options);
 $form->addElement($option_select);
 $form->insertBreak(_MP_TRI_TRI, 'odd');
 $order_select = array('subject' => _MP_TRI_TITLE, 'msg_time' => _MP_TRI_DATE, 'read_msg' => _MP_TRI_READ);
 $thread_select = new XoopsFormSelect("", "sortname", $sortname);
 $thread_select->addOptionArray($order_select);
 $sortorder_select = array('asc' => _MP_TRI_OASC, 'desc' => _MP_TRI_ODESC);
 $sort_select = new XoopsFormSelect("", "sortorder", $sortorder);
 $sort_select->addOptionArray($sortorder_select);
 $flat_select = array('flat' => _MP_TRI_FLAT, 'thread' => _MP_TRI_THREAD);
 $threadn_select = new XoopsFormSelect("", "order", $vieworder);
 $threadn_select->addOptionArray($flat_select);
 $form->addElement($thread_select);
 $form->addElement($threadn_select);
 $form->addElement($sort_select);
 $msg_hidden = new XoopsFormHidden("op", "envoimp");
 $form->addElement($msg_hidden);
 $button_tray = new XoopsFormElementTray('', '');
function xhld_get_hl_form($hl, $action = 'new')
{
    // add or edit
    if ($action == 'new') {
        $form_title = _AM_ADDHEADL;
        $op = 'addgo';
    } else {
        $form_title = _AM_EDITHEADL;
        $op = 'editgo';
    }
    include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
    $form = new XoopsThemeForm($form_title, 'headline_form', 'index.php');
    $form->addElement(new XoopsFormText(_AM_SITENAME, 'headline_name', 40, 4096, $hl->getVar('headline_name')), true);
    $url_text = new XoopsFormText('', 'headline_url', 45, 4096, $hl->getVar('headline_url'));
    $url_tray = new XoopsFormElementTray(_AM_URL, '');
    $url_tray->addElement($url_text, true);
    $url_tray->addElement(new XoopsFormLabel("<img src='../images/html.gif' onClick=\"window.open(document.headline_form.headline_url.value,'','');return(false);\" alt='HTML' />"));
    $form->addElement($url_tray);
    $rssurl_text = new XoopsFormText('', 'headline_rssurl', 60, 4096, $hl->getVar('headline_rssurl'));
    $rssurl_tray = new XoopsFormElementTray(_AM_URLEDFXML, '');
    $rssurl_tray->addElement($rssurl_text, true);
    $rssurl_tray->addElement(new XoopsFormLabel("<img src='../images/xml.gif' onClick=\"window.open(document.headline_form.headline_rssurl.value,'','');return(false);\" alt='XML' />"));
    $form->addElement($rssurl_tray);
    $syndic_sel = new XoopsFormSelect(_AM_SYNDICATIONTYPE, 'headline_syndication', $hl->getVar('headline_syndication'));
    $syndic_sel->addOptionArray(array('' => _AM_SYNDICATIONTYPE_AUTO, 'RSS' => 'RSS', 'ATOM' => 'ATOM'));
    $form->addElement($syndic_sel);
    $form->addElement(new XoopsFormText(_AM_TITLEPATTERN, 'headline_titlepattern', 50, 4096, $hl->getVar('headline_titlepattern')), false);
    $form->addElement(new XoopsFormText(_AM_TITLEEXCLUDE, 'headline_titleexclude', 50, 4096, $hl->getVar('headline_titleexclude')), false);
    $form->addElement(new XoopsFormText(_AM_LINKPATTERN, 'headline_linkpattern', 50, 4096, $hl->getVar('headline_linkpattern')), false);
    $form->addElement(new XoopsFormText(_AM_LINKEXCLUDE, 'headline_linkexclude', 50, 4096, $hl->getVar('headline_linkexclude')), false);
    $form->addElement(new XoopsFormText(_AM_ORDER, 'headline_weight', 4, 3, $hl->getVar('headline_weight')));
    $enc_sel = new XoopsFormSelect(_AM_ENCODING, 'headline_encoding', $hl->getVar('headline_encoding'));
    $enc_sel->addOptionArray($GLOBALS['allowed_encodings']);
    $form->addElement($enc_sel);
    $cache_text = new XoopsFormText('', 'headline_cachetime', 6, 6, $hl->getVar('headline_cachetime') / 60);
    $cache_text->setExtra('style="text-align:right;"');
    $cache_tray = new XoopsFormElementTray(_AM_CACHETIME, '');
    $cache_tray->addElement($cache_text, true);
    $cache_tray->addElement(new XoopsFormLabel(sprintf(_MINUTES, '')));
    $form->addElement($cache_tray);
    $timeout_text = new XoopsFormText('', 'headline_timeout', 4, 4, $hl->getVar('headline_timeout'));
    $timeout_text->setExtra('style="text-align:right;"');
    $timeout_tray = new XoopsFormElementTray(_AM_TIMEOUT, '');
    $timeout_tray->addElement($timeout_text, true);
    $timeout_tray->addElement(new XoopsFormLabel(sprintf(_SECONDS, '')));
    $form->addElement($timeout_tray);
    $form->addElement(new XoopsFormRadioYN(_AM_ALLOWHTML, 'headline_allowhtml', $hl->getVar('headline_allowhtml'), _YES, _NO));
    $form->insertBreak(_AM_MAINSETT);
    $form->addElement(new XoopsFormRadioYN(_AM_DISPLAY, 'headline_display', $hl->getVar('headline_display'), _YES, _NO));
    $form->addElement(new XoopsFormRadioYN(_AM_DISPIMG, 'headline_mainimg', $hl->getVar('headline_mainimg'), _YES, _NO));
    $form->addElement(new XoopsFormRadioYN(_AM_DISPFULL, 'headline_mainfull', $hl->getVar('headline_mainfull'), _YES, _NO));
    $form->addElement(new XoopsFormText(_AM_DISPMAX, 'headline_mainmax', 5, 5, intval($hl->getVar('headline_mainmax'))), true);
    $form->insertBreak(_AM_BLOCKSETT);
    $form->addElement(new XoopsFormRadioYN(_AM_ASBLOCK, 'headline_asblock', $hl->getVar('headline_asblock'), _YES, _NO));
    $form->addElement(new XoopsFormRadioYN(_AM_DISPIMG, 'headline_blockimg', $hl->getVar('headline_blockimg'), _YES, _NO));
    $form->addElement(new XoopsFormText(_AM_DISPMAX, 'headline_blockmax', 5, 5, intval($hl->getVar('headline_blockmax'))), true);
    $form->insertBreak();
    $form->addElement(new XoopsFormHidden('headline_id', $hl->getVar('headline_id')));
    $form->addElement(new XoopsFormHidden('op', $op));
    $button_tray = new XoopsFormElementTray('', '&nbsp;');
    $button_tray->addElement(new XoopsFormButton('', 'headline_submit', _SUBMIT, 'submit'));
    if ($action != 'new') {
        $button_tray->addElement(new XoopsFormButton('', 'headline_saveas', _AM_SAVEAS, 'submit'));
    }
    $form->addElement($button_tray);
    // Ticket
    $GLOBALS['xoopsGTicket']->addTicketXoopsFormElement($form, __LINE__);
    return $form;
}
Beispiel #17
0
         $req = $xoopsDB->query("SELECT id, civilite, nom, prenom FROM " . $xoopsDB->prefix("garage_clients") . " WHERE id='{$id_proprietaire}'");
         if ($req) {
             while (($row = $xoopsDB->fetchArray($req)) != false) {
                 $proprietaire = $row['civilite'] . ' ' . $row['prenom'] . ' ' . $row['nom'];
             }
         }
     }
     echo '<tr>';
     echo '<td class="odd" ALIGN="left">' . $immat . ' - ' . $marque . '</td>';
     echo '<td class="odd" ALIGN="left">' . $proprietaire . '</td>';
     echo '<td class="odd" align="center"><A HREF="vehicule.php?op=modifvehicule&id=' . $id . '"><img src="../images/modif.png"></a> </td>';
     echo '<td class="odd" align="center"><A HREF="vehicule.php?op=suprvehicule&id=' . $id . '"><img src="../images/sup.png"></a></td>';
 }
 echo '</tr></table><br />';
 $form = new XoopsThemeForm(_AM_VEHICULE_CREATION, 'cvehicule', 'vehicule.php?op=creatvehicule', 'post');
 $form->insertBreak('<h3><center>' . _AM_VEHICULE_ADMINFO . '</center></h3>', 'head');
 $form->addElement(new XoopsFormText(_AM_VEHICULE_IMMAT, 'immat', 25, 50));
 $req4 = $xoopsDB->query("SELECT id, nom, prenom, cp FROM " . $xoopsDB->prefix("garage_clients") . " order by nom");
 while (($row = $xoopsDB->fetchArray($req4)) != false) {
     $clients[$row['id']] = $row['nom'] . ' - ' . $row['prenom'] . ' - ' . $row['cp'];
 }
 $cli = new XoopsFormSelect(_AM_VEHICULE_PROPRIETAIRE, 'id_proprietaire', null, 5, false);
 $cli->addOptionArray($clients);
 $form->addElement($cli);
 $form->addElement(new XoopsFormTextDateSelect(_AM_VEHICULE_DATE_MEC, 'date_mec', 15, date("YYYY-mm-dd")));
 $form->addElement(new XoopsFormText(_AM_VEHICULE_KILOMETRAGE, 'kilometrage', 15, 25));
 $form->insertBreak('<h3><center>' . _AM_VEHICULE_TECHINFO . '</center></h3>', 'head');
 $ct = new XoopsFormElementTray(_AM_VEHICULE_CT);
 $ct->addElement(new XoopsFormTextDateSelect(_AM_VEHICULE_DERNIER_CT, 'dernier_ct', 15, date("YYYY-mm-dd")));
 $ct->addElement(new XoopsFormTextDateSelect(_AM_VEHICULE_PROCHAIN_CT, 'prochain_ct', 15, date("YYYY-mm-dd")));
 $form->addElement($ct);
Beispiel #18
0
function edit_profiles_form()
{
    if (isset($_REQUEST['id'])) {
        $id = intval($_REQUEST['id']);
        $membershandler = xoops_getmodulehandler('members', 'genobio');
        $profileshandler = xoops_getmodulehandler('profiles', 'genobio');
        $member = $membershandler->get($id);
        $profile = $profileshandler->get($id);
        $member_id = $profile->getVar('member_id');
        $member_father_id = $profile->getVar('member_father_id');
        $member_mother_id = $profile->getVar('member_mother_id');
        $member_siblings_id = $profile->getVar('member_siblings_id');
        $member_partner_id = $profile->getVar('member_partner_id');
        $nickname = $profile->getVar('nickname');
        $dob = $profile->getVar('dob');
        $dod = $profile->getVar('dod');
        $anniversary = $profile->getVar('anniversary');
        $dob_unix = strtotime($profile->getVar('dob'));
        $dod_unix = strtotime($profile->getVar('dod'));
        $anniversary_unix = strtotime($profile->getVar('anniversary'));
        $height = $profile->getVar('height');
        $weight = $profile->getVar('weight');
        $colour_hair = $profile->getVar('colour_hair');
        $colour_eyes = $profile->getVar('colour_eyes');
        $baby_photo = $profile->getVar('baby_photo');
        $midlife_photo = $profile->getVar('midlife_photo');
        $elderly_photo = $profile->getVar('elderly_photo');
        $current_photo = $profile->getVar('current_photo');
        $bio = $profile->getVar('bio');
        $history = $profile->getVar('history');
        $education = $profile->getVar('education');
        $fellowship = $profile->getVar('fellowship');
        $earlyhistory = $profile->getVar('earlyhistory');
        $medical = $profile->getVar('medical');
        $achivements = $profile->getVar('achivements');
        $contributations = $profile->getVar('contributations');
        $awards = $profile->getVar('awards');
        $media = $profile->getVar('media');
        $publications = $profile->getVar('publications');
        $jobs = $profile->getVar('jobs');
        $spirtual = $profile->getVar('spirtual');
        $hates = $profile->getVar('hates');
        $likes = $profile->getVar('likes');
        $music = $profile->getVar('music');
        $thearts = $profile->getVar('thearts');
        $other = $profile->getVar('other');
        $title = 'Edit Sibblings Item - ' . $member->getVar('display_name');
    } else {
        redirect_header('index.php', 2, _GB_NOID);
        exit;
    }
    $form = new XoopsThemeForm($title, "edititem", "", "post");
    $editor_config['editor'] = 'fckeditor';
    $form->addElement(new GenobioFormSelectMember(_GB_AM_FATHER, "member_father_id", $member_father_id, 1, false));
    $form->addElement(new GenobioFormSelectMember(_GB_AM_MOTHER, "member_mother_id", $member_mother_id, 1, false));
    $form->addElement(new GenobioFormSelectMember(_GB_AM_PARTNER, "member_partner_id", $member_partner_id, 1, false));
    $form->addElement(new GenobioFormSelectSibblings(_GB_AM_SIBBLINGGROUP, "member_siblings_id", $member_siblings_id, 1, false));
    $form->insertBreak();
    $form->addElement(new XoopsFormText(_GB_AM_NICKNAME, "nickname", 35, 128, $nickname));
    $form->addElement(new XoopsFormText(_GB_AM_DOB, "dob", 15, 10, $dob));
    $form->addElement(new XoopsFormText(_GB_AM_DOD, "dod", 15, 10, $dod));
    $form->addElement(new XoopsFormText(_GB_AM_ANNIVERSARY, "anniversary", 15, 10, $anniversary));
    $form->addElement(new XoopsFormText(_GB_AM_HEIGHT, "height", 25, 20, $height));
    $form->addElement(new XoopsFormText(_GB_AM_WEIGHT, "weight", 25, 20, $weight));
    $form->addElement(new XoopsFormText(_GB_AM_COLOURHAIR, "colour_hair", 35, 50, $colour_hair));
    $form->addElement(new XoopsFormText(_GB_AM_COLOUREYES, "colour_eyes", 35, 50, $colour_eyes));
    $form->addElement(new XoopsFormFile(_GB_AM_BABYPHOTO, "baby_photo", 1024 * 8172 * 2));
    $form->addElement(new XoopsFormFile(_GB_AM_MIDLIFEPHOTO, "midlife_photo", 1024 * 8172 * 2));
    $form->addElement(new XoopsFormFile(_GB_AM_ELDERLYPHOTO, "elderly_photo", 1024 * 8172 * 2));
    $form->addElement(new XoopsFormFile(_GB_AM_CURRENTPHOTO, "current_photo", 1024 * 8172 * 2));
    $form->insertBreak();
    $editor_config['value'] = $bio;
    $form->addElement(new XoopsFormEditor(_GB_AM_INDIVIDUALBIO, "bio", $editor_config));
    $editor_config['value'] = $history;
    $form->addElement(new XoopsFormEditor(_GB_AM_HISTORY, "history", $editor_config));
    $editor_config['value'] = $education;
    $form->addElement(new XoopsFormEditor(_GB_AM_EDUCATION, "education", $editor_config));
    $editor_config['value'] = $fellowship;
    $form->addElement(new XoopsFormEditor(_GB_AM_FELLOWSHIP, "fellowship", $editor_config));
    $editor_config['value'] = $earlyhistory;
    $form->addElement(new XoopsFormEditor(_GB_AM_EARLYHISTORY, "earlyhistory", $editor_config));
    $editor_config['value'] = $medical;
    $form->addElement(new XoopsFormEditor(_GB_AM_MEDICAL, "medical", $editor_config));
    $editor_config['value'] = $achivements;
    $form->addElement(new XoopsFormEditor(_GB_AM_ACHIEVEMENTS, "achivements", $editor_config));
    $editor_config['value'] = $contributations;
    $form->addElement(new XoopsFormEditor(_GB_AM_CONTRIBUTIONS, "contributations", $editor_config));
    $editor_config['value'] = $awards;
    $form->addElement(new XoopsFormEditor(_GB_AM_AWARDS, "awards", $editor_config));
    $editor_config['value'] = $media;
    $form->addElement(new XoopsFormEditor(_GB_AM_MEDIA, "media", $editor_config));
    $editor_config['value'] = $publications;
    $form->addElement(new XoopsFormEditor(_GB_AM_PUBLICATION, "publications", $editor_config));
    $editor_config['value'] = $jobs;
    $form->addElement(new XoopsFormEditor(_GB_AM_EMPLOYMENT, "jobs", $editor_config));
    $editor_config['value'] = $spirtual;
    $form->addElement(new XoopsFormEditor(_GB_AM_SPIRITUAL, "spirtual", $editor_config));
    $editor_config['value'] = $hates;
    $form->addElement(new XoopsFormEditor(_GB_AM_INDIVIDUALHATES, "hates", $editor_config));
    $editor_config['value'] = $likes;
    $form->addElement(new XoopsFormEditor(_GB_AM_INDIVIDUALLIKES, "likes", $editor_config));
    $editor_config['value'] = $music;
    $form->addElement(new XoopsFormEditor(_GB_AM_MUSIC, "music", $editor_config));
    $editor_config['value'] = $thearts;
    $form->addElement(new XoopsFormEditor(_GB_AM_THEARTS, "thearts", $editor_config));
    $editor_config['value'] = $other;
    $form->addElement(new XoopsFormEditor(_GB_AM_OTHER, "other", $editor_config));
    $form->addElement(new XoopsFormHidden("id", $id));
    $form->addElement(new XoopsFormHidden("op", "profiles"));
    $form->addElement(new XoopsFormHidden("fct", "save"));
    $form->addElement(new XoopsFormButton('', 'contents_submit', _SUBMIT, "submit"));
    $form->setExtra('enctype="multipart/form-data"');
    $form->display();
}