Ejemplo n.º 1
0
 public function getForm()
 {
     $langid = Common::getPostString('langid', GWF_Language::getEnglish()->getID());
     require_once GWF_CORE_PATH . 'module/Category/GWF_CategorySelect.php';
     //key => array(TYPE, default, text, classname)
     //		GWF_Language::setShowSupported(true);
     $data = array('langid' => array(GWF_Form::SELECT, GWF_LangSelect::single(GWF_Language::SUPPORTED, 'langid', $langid), $this->module->lang('th_langid')), 'catid' => array(GWF_Form::SELECT, GWF_CategorySelect::single('catid', Common::getPostString('catid', '1'), 0), $this->module->lang('th_category')), 'title' => array(GWF_Form::STRING, '', $this->module->lang('th_title')), 'message' => array(GWF_Form::MESSAGE, '', $this->module->lang('th_message')), 'div1' => array(GWF_Form::DIVIDER), 'div2' => array(GWF_Form::DIVIDER), 'preview' => array(GWF_Form::SUBMIT, $this->module->lang('btn_preview'), ''), 'add' => array(GWF_Form::SUBMIT, $this->module->lang('btn_add'), ''));
     return new GWF_Form($this, $data);
 }
Ejemplo n.º 2
0
 public function getForm(WC_Site $site, $is_admin)
 {
     $data = array();
     $data['site_name'] = array(GWF_Form::STRING, $site->getVar('site_name'), $this->module->lang('th_site_name'));
     if ($is_admin) {
         $data['site_classname'] = array(GWF_Form::STRING, $site->getVar('site_classname'), $this->module->lang('th_site_classname'));
         $data['site_basescore'] = array(GWF_Form::INT, $site->getVar('site_basescore'), $this->module->lang('th_site_basescore'));
         $data['site_usercount'] = array(GWF_Form::INT, $site->getVar('site_usercount'), $this->module->lang('th_site_usercount'));
         $data['site_challcount'] = array(GWF_Form::INT, $site->getVar('site_challcount'), $this->module->lang('th_site_challcount'));
         $data['site_powarg'] = array(GWF_Form::INT, $site->getVar('site_powarg'), $this->module->lang('th_site_powarg'));
         $data['site_spc'] = array(GWF_Form::INT, $site->getVar('site_spc'), $this->module->lang('th_site_spc'));
         $data['site_color'] = array(GWF_Form::STRING, $site->getVar('site_color'), $this->module->lang('th_site_color'));
     }
     $data['site_status'] = array(GWF_Form::SELECT, $this->getStatusSelect($site), $this->module->lang('th_site_status'));
     $data['no_urlencode'] = array(GWF_Form::CHECKBOX, $site->isOptionEnabled(WC_Site::NO_URLENCODE), $this->module->lang('th_no_urlencode'));
     $data['auto_update'] = array(GWF_Form::CHECKBOX, $site->hasAutoUpdate(), $this->module->lang('th_autoupdate'));
     $data['onsite_rank'] = array(GWF_Form::CHECKBOX, $site->hasOnSiteRank(), $this->module->lang('th_site_has_osr'));
     $data['default_hide'] = array(GWF_Form::CHECKBOX, $site->isDefaultHidden(), $this->module->lang('th_default_hide'));
     if ($is_admin) {
         $data['linear'] = array(GWF_Form::CHECKBOX, $site->isLinear(), $this->module->lang('th_linear'));
     }
     $data['div0'] = array(GWF_Form::DIVIDER);
     if ($is_admin) {
         $data['divi0'] = array(GWF_Form::HEADLINE, $this->module->lang('pi_site_tags', array($site->displayTags(true))));
         $data['site_tags'] = array(GWF_Form::STRING, $site->getVar('site_tags'), $this->module->lang('th_site_tags'));
     }
     $data['site_country'] = array(GWF_Form::SELECT, GWF_CountrySelect::single('site_country', Common::getPostString('site_country', $site->getCountryID())), $this->module->lang('th_site_country2'));
     if ($is_admin) {
         $data['site_language'] = array(GWF_Form::SELECT, GWF_LangSelect::single(0, 'site_language', $site->getLangID()), $this->module->lang('th_site_language2'));
     }
     if ($is_admin) {
         $data['site_joindate'] = array(GWF_Form::STRING, $site->getVar('site_joindate'), $this->module->lang('th_site_joindate'), '', GWF_Date::LEN_SECOND);
     }
     $data['site_launchdate'] = array(GWF_Form::DATE, $site->getVar('site_launchdate'), $this->module->lang('th_site_launchdate'), '', GWF_Date::LEN_DAY);
     if ($is_admin) {
         $data['site_authkey'] = array(GWF_Form::STRING, $site->getVar('site_authkey'), $this->module->lang('th_site_authkey'));
     }
     $data['site_xauthkey'] = array(GWF_Form::STRING, $site->getVar('site_xauthkey'), $this->module->lang('th_site_xauthkey'));
     $data['site_irc'] = array(GWF_Form::STRING, $site->getVar('site_irc'), $this->module->lang('th_site_irc'));
     $data['div2'] = array(GWF_Form::DIVIDER);
     $data['div3'] = array(GWF_Form::HEADLINE, $this->module->lang('pi_site_urls'));
     $data['site_url'] = array(GWF_Form::STRING, $site->getVar('site_url'), $this->module->lang('th_site_url'));
     $data['site_url_mail'] = array(GWF_Form::STRING, $site->getVar('site_url_mail'), $this->module->lang('th_site_url_mail'));
     $data['site_url_score'] = array(GWF_Form::STRING, $site->getVar('site_url_score'), $this->module->lang('th_site_url_score'));
     $data['site_url_profile'] = array(GWF_Form::STRING, $site->getVar('site_url_profile'), $this->module->lang('th_site_url_profile'));
     $data['div4'] = array(GWF_Form::DIVIDER);
     $data['div5'] = array(GWF_Form::HEADLINE, $this->l('pi_warboxes'));
     $data['no_v1'] = array(GWF_Form::CHECKBOX, $site->isNoV1(), $this->l('th_no_v1'), $this->l('tt_no_v1'));
     // 		$data['warenbl'] = array(GWF_Form::CHECKBOX, $site->isWarBox(), $this->l('th_warbox'));
     // 		$data['warhost'] = array(GWF_Form::STRING, $site->getWarHost(), $this->l('th_warhost'));
     // 		$data['warport'] = array(GWF_Form::INT, $site->getWarPort(), $this->l('th_warport'));
     // 		$data['warscrd'] = array(GWF_Form::INT, $site->getWarReduceScore(), $this->l('th_war_score_reduce'));
     //		$data['site_description'] = array(GWF_Form::MESSAGE, $site->getVar('site_description'), $this->module->lang('th_site_description'));
     $data['edit'] = array(GWF_Form::SUBMIT, $this->module->lang('btn_edit_site'));
     return new GWF_Form($this, $data);
 }
Ejemplo n.º 3
0
 private function getForm()
 {
     $langid = $this->lang->getID();
     $t = $this->news->getTranslationB($langid);
     $title = $t['newst_title'];
     $message = $t['newst_message'];
     //		GWF_Language::setShowSupported(true);
     $data = array('langid' => array(GWF_Form::HIDDEN, $langid), 'title' => array(GWF_Form::STRING, $title, $this->module->lang('th_title')), 'message' => array(GWF_Form::MESSAGE, $message, $this->module->lang('th_message')), 'hidden' => array(GWF_Form::CHECKBOX, $this->news->isHidden(), $this->module->lang('th_hidden')), 'mailme' => array(GWF_Form::CHECKBOX, $this->news->isToBeMailed(), $this->module->lang('th_mail_me')), 'preview' => array(GWF_Form::SUBMIT, $this->module->lang('btn_preview'), ''), 'edit' => array(GWF_Form::SUBMIT, $this->module->lang('btn_edit'), ''), 'transid' => array(GWF_Form::SELECT, GWF_LangSelect::single(GWF_Language::SUPPORTED, 'transid'), $this->module->lang('th_transid')), 'translate' => array(GWF_Form::SUBMIT, $this->module->lang('btn_translate'), ''));
     return new GWF_Form($this, $data);
 }
Ejemplo n.º 4
0
 public function getForm()
 {
     $user = GWF_Session::getUser();
     $user_email = $user->getVar('user_email');
     # SECURITY
     $data = array('username' => array(GWF_Form::SSTRING, $user->getVar('user_name'), $this->module->lang('th_username')), 'email' => array(GWF_Form::STRING, $user_email, $this->module->lang('th_email')));
     ### Email set but not approved.
     if ($user_email !== '' && !$user->hasValidMail()) {
         $data['approvemail'] = array(GWF_Form::SUBMIT, $this->module->lang('btn_approvemail'), $this->module->lang('th_approvemail'));
     }
     // DEMOGRAPHICS
     $data['div1'] = array(GWF_Form::HEADLINE, $this->module->lang('th_demo', array(GWF_Time::humanDuration($this->module->cfgChangeTime()), 1)));
     $data['countryid'] = array(GWF_Form::SELECT, $user->getCountrySelect('countryid'), $this->module->lang('th_countryid'));
     $data['langid'] = array(GWF_Form::SELECT, GWF_LangSelect::single(0, 'langid', Common::getPostString('langid', $user->getVar('user_langid'))), $this->module->lang('th_langid'));
     $data['langid2'] = array(GWF_Form::SELECT, GWF_LangSelect::single(0, 'langid2', Common::getPostString('langid2', $user->getVar('user_langid2'))), $this->module->lang('th_langid2'));
     $data['birthdate'] = array(GWF_Form::DATE, $user->getVar('user_birthdate'), $this->module->lang('th_birthdate'), '', GWF_Date::LEN_DAY);
     if ($this->module->cfgShowGender()) {
         $data['gender'] = array(GWF_Form::SELECT, $user->getGenderSelect(), $this->module->lang('th_gender'));
     }
     // OPTIONS
     $data['div2'] = array(GWF_Form::HEADLINE, $this->module->lang('th_flags'));
     $data['email_fmt'] = array(GWF_Form::SELECT, $this->selectEMailFormat($user), $this->module->lang('th_email_fmt'));
     if ($this->module->cfgShowCheckboxes()) {
         $data['online'] = array(GWF_Form::CHECKBOX, $user->isOptionEnabled(GWF_User::HIDE_ONLINE), $this->module->lang('th_online'));
         $data['record_ips'] = array(GWF_Form::CHECKBOX, $user->isOptionEnabled(GWF_User::RECORD_IPS), $this->module->lang('th_record_ips', array($this->module->getMethodURL('Access'))), $this->module->lang('tt_record_ips'));
         $data['alert_uas'] = array(GWF_Form::CHECKBOX, $user->isOptionEnabled(GWF_User::ALERT_UAS), $this->module->lang('th_alert_uas'), $this->module->lang('tt_alert_uas'));
         $data['alert_ips'] = array(GWF_Form::CHECKBOX, $user->isOptionEnabled(GWF_User::ALERT_IPS), $this->module->lang('th_alert_ips'), $this->module->lang('tt_alert_ips'));
         $data['alert_isps'] = array(GWF_Form::CHECKBOX, $user->isOptionEnabled(GWF_User::ALERT_ISPS), $this->module->lang('th_alert_isps'), $this->module->lang('tt_alert_isps'));
         $data['show_bday'] = array(GWF_Form::CHECKBOX, $user->isOptionEnabled(GWF_User::SHOW_BIRTHDAY), $this->module->lang('th_show_bday'));
         $data['show_obday'] = array(GWF_Form::CHECKBOX, $user->isOptionEnabled(GWF_User::SHOW_OTHER_BIRTHDAYS), $this->module->lang('th_show_obday'));
         $data['show_email'] = array(GWF_Form::CHECKBOX, $user->isOptionEnabled(GWF_User::SHOW_EMAIL), $this->module->lang('th_show_email'));
         $data['allow_email'] = array(GWF_Form::CHECKBOX, $user->isOptionEnabled(GWF_User::ALLOW_EMAIL), $this->module->lang('th_allow_email'));
     }
     if ($this->module->cfgShowAdult()) {
         if (GWF_Time::getAge($user->getVar('user_birthdate')) >= $this->module->cfgAdultAge()) {
             $data['adult'] = array(GWF_Form::CHECKBOX, $user->isOptionEnabled(GWF_User::WANTS_ADULT), $this->module->lang('th_adult'));
         }
     }
     if ($this->module->cfgUseAvatar()) {
         // Avatar
         if ($user->isOptionEnabled(GWF_User::HAS_AVATAR)) {
             $data['avatar'] = array(GWF_Form::HEADLINE, $user->displayAvatar(), $this->module->lang('th_avatar'));
             $data['drop_avatar'] = array(GWF_Form::SUBMIT, $this->module->lang('btn_drop_avatar'), '');
         } else {
             $data['avatar'] = array(GWF_Form::FILE_OPT, '', $this->module->lang('th_avatar'));
         }
     }
     $data['divpw'] = array(GWF_Form::HEADLINE, $this->module->lang('th_change_pw', array('recovery')));
     // BTN
     $buttons = array('change' => $this->module->lang('btn_submit'), 'delete' => $this->module->lang('btn_delete'));
     //		$data['change'] = array(GWF_Form::SUBMIT, $this->module->lang('btn_submit'), '');
     $data['buttons'] = array(GWF_Form::SUBMITS, $buttons);
     return new GWF_Form($this, $data);
 }
Ejemplo n.º 5
0
 private function getForm($row)
 {
     $user = GWF_User::getStaticOrGuest();
     if ($row === false) {
         $email = $user->getValidMail();
         $type = 0;
         $langid = GWF_Language::getCurrentID();
     } else {
         $email = $row->getEMail();
         $type = $row->getType();
         $langid = $row->getLangID();
     }
     $data = array('email' => array(GWF_Form::STRING, $email, $this->module->lang('th_email')), 'type' => array(GWF_Form::SELECT, GWF_Newsletter::getTypeSelectB($this->module, 'type', $type), $this->module->lang('th_type')), 'langid' => array(GWF_Form::SELECT, GWF_LangSelect::single(GWF_Language::SUPPORTED, 'langid', $langid), $this->module->lang('th_langid')), 'sign' => array(GWF_Form::SUBMIT, $this->module->lang('btn_sign'), ''));
     return new GWF_Form(GDO::table('GWF_Newsletter'), $data);
 }
Ejemplo n.º 6
0
 public function getForm(GWF_Category $cat)
 {
     //		static $form = true;
     //		if ($form === true)
     //		{
     $data = array('catid' => array(GWF_Form::SSTRING, $cat->getID(), $this->module->lang('th_catid')), 'group' => array(GWF_Form::STRING, $cat->getGroup(), $this->module->lang('th_group')), 'key' => array(GWF_Form::STRING, $cat->getKey(), $this->module->lang('th_key')), 'parent' => array(GWF_Form::SELECT, $this->getParentSelect($cat), $this->module->lang('th_parent')), 'div1' => array(GWF_Form::DIVIDER));
     $data += $this->getFormLangs($cat);
     $data['div2'] = array(GWF_Form::DIVIDER);
     $data['new_trans'] = array(GWF_Form::HEADLINE, '', $this->module->lang('th_new_trans'));
     $data['langid'] = array(GWF_Form::SELECT, GWF_LangSelect::single(1, 'langid'), $this->module->lang('th_langid'));
     $data['newtrans'] = array(GWF_Form::STRING, '', $this->module->lang('th_trans'));
     $data['edit'] = array(GWF_Form::SUBMIT, $this->module->lang('btn_edit'), '');
     $form = new GWF_Form($this, $data);
     //		}
     return $form;
 }
Ejemplo n.º 7
0
 private function getForm()
 {
     $tags = Common::getPostString('link_tags', Common::getGet('tag'));
     $data = array('link_lang' => array(GWF_Form::SELECT, GWF_LangSelect::single(GWF_LangSelect::TYPE_SUPPORTED, 'link_lang'), $this->module->lang('th_link_lang')), 'link_score' => array(GWF_Form::STRING, '0', $this->module->lang('th_link_score'), $this->module->lang('tt_link_score')), 'link_gid' => array(GWF_Form::SELECT, GWF_GroupSelect::single('link_gid'), $this->module->lang('th_link_gid'), $this->module->lang('tt_link_gid')), 'tag_info' => array(GWF_Form::HEADLINE, '', $this->module->lang('info_tag')), 'known_tags' => array(GWF_Form::HEADLINE, '', $this->collectTags()), 'link_tags' => array(GWF_Form::STRING, $tags, $this->module->lang('th_link_tags')), 'div1' => array(GWF_Form::DIVIDER), 'link_href' => array(GWF_Form::STRING, '', $this->module->lang('th_link_href'), $this->module->lang('tt_link_href')), 'link_descr' => array(GWF_Form::STRING, '', $this->module->lang('th_link_descr')));
     if ($this->module->cfgLongDescription()) {
         $data['link_descr2'] = array(GWF_Form::MESSAGE, '', $this->module->lang('th_link_descr2'));
     }
     $data['link_options&' . GWF_Links::MEMBER_LINK] = array(GWF_Form::CHECKBOX, isset($_POST['link_options&' . GWF_Links::MEMBER_LINK]), $this->module->lang('th_link_options&' . GWF_Links::MEMBER_LINK));
     if (GWF_User::isLoggedIn()) {
         $data['link_options&' . GWF_Links::UNAFILIATE] = array(GWF_Form::CHECKBOX, isset($_POST['link_options&' . GWF_Links::UNAFILIATE]), $this->module->lang('th_link_options&' . GWF_Links::UNAFILIATE));
         $data['link_options&' . GWF_Links::ONLY_PRIVATE] = array(GWF_Form::CHECKBOX, isset($_POST['link_options&' . GWF_Links::ONLY_PRIVATE]), $this->module->lang('th_link_options&' . GWF_Links::ONLY_PRIVATE));
     }
     if (!GWF_Session::isLoggedIn() && $this->module->cfgGuestCaptcha()) {
         $data['captcha'] = array(GWF_Form::CAPTCHA);
     }
     $data['buttons'] = array(GWF_Form::SUBMITS, array('preview' => $this->module->lang('btn_preview'), 'add' => $this->module->lang('btn_add')));
     return new GWF_Form($this, $data);
 }
Ejemplo n.º 8
0
 private function formAdd()
 {
     $mod_cat = GWF_Module::loadModuleDB('Category', true, true);
     $data = array();
     $data['url'] = array(GWF_Form::STRING, '', $this->module->lang('th_url'));
     $data['type'] = array(GWF_Form::SELECT, GWF_PageType::select($this->module), $this->module->lang('th_type'));
     $data['lang'] = array(GWF_Form::SELECT, GWF_LangSelect::single(1, 'lang'), $this->module->lang('th_lang'));
     $data['groups'] = array(GWF_Form::SELECT_A, GWF_GroupSelect::multi('groups', true, true, true), $this->module->lang('th_groups'));
     $data['noguests'] = array(GWF_Form::CHECKBOX, false, $this->module->lang('th_noguests'));
     if ($this->is_author) {
         $data['index'] = array(GWF_Form::CHECKBOX, true, $this->module->lang('th_index'));
         $data['follow'] = array(GWF_Form::CHECKBOX, true, $this->module->lang('th_follow'));
         $data['sitemap'] = array(GWF_Form::CHECKBOX, false, $this->module->lang('th_in_sitemap'));
     }
     $data['title'] = array(GWF_Form::STRING, '', $this->module->lang('th_title'));
     if ($mod_cat !== false) {
         $data['cat'] = array(GWF_Form::SELECT, GWF_CategorySelect::single('cat', Common::getPostString('cat')), $this->module->lang('th_cat'));
     }
     $data['descr'] = array(GWF_Form::STRING, '', $this->module->lang('th_descr'));
     $data['tags'] = array(GWF_Form::STRING, '', $this->module->lang('th_tags'));
     $data['show_author'] = array(GWF_Form::CHECKBOX, true, $this->module->lang('th_show_author'));
     $data['show_similar'] = array(GWF_Form::CHECKBOX, true, $this->module->lang('th_show_similar'));
     $data['show_modified'] = array(GWF_Form::CHECKBOX, true, $this->module->lang('th_show_modified'));
     $data['show_trans'] = array(GWF_Form::CHECKBOX, true, $this->module->lang('th_show_trans'));
     $data['show_comments'] = array(GWF_Form::CHECKBOX, true, $this->module->lang('th_show_comments'));
     if ($this->is_author) {
         $data['home_page'] = array(GWF_Form::CHECKBOX, false, $this->module->lang('th_home_page'));
     }
     $data['file'] = array(GWF_Form::FILE_OPT, '', $this->module->lang('th_file'));
     $data['upload'] = array(GWF_Form::SUBMIT, $this->module->lang('btn_upload'));
     if ($this->is_author) {
         $data['inline_css'] = array(GWF_Form::MESSAGE_NOBB, '', $this->module->lang('th_inline_css'));
     }
     $data['content'] = array(GWF_Form::MESSAGE_NOBB, '', $this->module->lang('th_content'));
     $buttons = array('preview' => $this->module->lang('btn_preview'), 'add' => $this->module->lang('btn_add'));
     $data['buttons'] = array(GWF_Form::SUBMITS, $buttons);
     return new GWF_Form($this, $data);
 }
Ejemplo n.º 9
0
 private function getForm()
 {
     $u = $this->user;
     $data = array('username' => array(GWF_Form::STRING, $u->displayUsername(), $this->module->lang('th_user_name')), 'email' => array(GWF_Form::STRING, $u->display('user_email'), $this->module->lang('th_email')), 'password' => array(GWF_Form::STRING, '', $this->module->lang('th_new_pass')), 'gender' => array(GWF_Form::SELECT, $u->getGenderSelect('gender'), $this->module->lang('th_gender')), 'country' => array(GWF_Form::SELECT, $u->getCountrySelect('country'), $this->module->lang('th_country')), 'lang1' => array(GWF_Form::SELECT, GWF_LangSelect::single(0, 'lang1', $u->getVar('user_langid')), $this->module->lang('th_lang_1')), 'lang2' => array(GWF_Form::SELECT, GWF_LangSelect::single(0, 'lang2', $u->getVar('user_langid2')), $this->module->lang('th_lang_2')), 'level' => array(GWF_Form::STRING, $u->getVar('user_level'), $this->module->lang('th_level')), 'approved' => array(GWF_Form::CHECKBOX, $u->hasValidMail(), $this->module->lang('th_is_approved')), 'bot' => array(GWF_Form::CHECKBOX, $u->isBot(), $this->module->lang('th_is_bot')), 'online' => array(GWF_Form::CHECKBOX, $u->isOptionEnabled(GWF_User::HIDE_ONLINE), $this->module->lang('th_hide_online')), 'showemail' => array(GWF_Form::CHECKBOX, $u->isOptionEnabled(GWF_User::SHOW_EMAIL), $this->module->lang('th_show_email')), 'adult' => array(GWF_Form::CHECKBOX, $u->isOptionEnabled(GWF_User::WANTS_ADULT), $this->module->lang('th_want_adult')), 'deleted' => array(GWF_Form::CHECKBOX, $u->isDeleted(), $this->module->lang('th_deleted')), 'edit' => array(GWF_Form::SUBMIT, $this->module->lang('btn_edit_user'), ''));
     return new GWF_Form($this, $data);
 }
Ejemplo n.º 10
0
 private function formTranslate(GWF_Page $page)
 {
     $data = array('url' => array(GWF_Form::STRING, $page->getVar('page_url'), $this->module->lang('th_url')), 'lang' => array(GWF_Form::SELECT, GWF_LangSelect::single(1, 'lang', $this->getSelectedLangID()), $this->module->lang('th_lang')), 'title' => array(GWF_Form::STRING, $page->getVar('page_title'), $this->module->lang('th_title')), 'descr' => array(GWF_Form::STRING, $page->getVar('page_meta_desc'), $this->module->lang('th_descr')), 'tags' => array(GWF_Form::STRING, trim($page->getVar('page_meta_tags'), ','), $this->module->lang('th_tags')), 'file' => array(GWF_Form::FILE_OPT, '', $this->module->lang('th_file')), 'upload' => array(GWF_Form::SUBMIT, $this->module->lang('btn_upload')), 'content' => array(GWF_Form::MESSAGE_NOBB, $page->getVar('page_content'), $this->module->lang('th_content')), 'translate' => array(GWF_Form::SUBMIT, $this->module->lang('btn_translate')));
     return new GWF_Form($this, $data);
 }
Ejemplo n.º 11
0
 private function getForm()
 {
     $data = array('langs' => array(GWF_Form::SELECT, GWF_LangSelect::single(0, 'langs', Common::getPost('langs', 'en'), true), $this->module->lang('th_langs')), 'warns' => array(GWF_Form::CHECKBOX, true, $this->module->lang('th_warns')), 'check' => array(GWF_Form::SUBMIT, $this->module->lang('btn_check')));
     return new GWF_Form($this, $data);
 }
Ejemplo n.º 12
0
 private function formAdd()
 {
     $data = array('lang' => array(GWF_Form::SELECT, GWF_LangSelect::single(1, 'lang', Common::getPostString('lang')), $this->module->lang('th_lang'), $this->module->lang('tt_lang')), 'question' => array(GWF_Form::STRING, '', $this->module->lang('th_question')), 'answer' => array(GWF_Form::MESSAGE, '', $this->module->lang('th_answer')), 'add' => array(GWF_Form::SUBMIT, $this->module->lang('btn_add_faq')));
     return new GWF_Form($this, $data);
 }
Ejemplo n.º 13
0
 private function formQuicksearch()
 {
     $data = array('mo' => array(GWF_Form::HIDDEN, 'PageBuilder'), 'me' => array(GWF_Form::HIDDEN, 'Search'), 'lang' => array(GWF_Form::SELECT, GWF_LangSelect::single(GWF_Language::SUPPORTED, 'lang', Common::getGetInt('lang', 0))), 'term' => array(GWF_Form::STRING_NO_CHECK, '', $this->module->lang('th_term')), 'quicksearch' => array(GWF_Form::SUBMIT, $this->module->lang('btn_search')));
     return new GWF_Form($this, $data, GWF_Form::METHOD_GET);
 }
Ejemplo n.º 14
0
 private function getForm()
 {
     $data = array('target' => array(GWF_Form::SELECT, GWF_LangSelect::single(0, 'target', Common::getPost('target')), $this->module->lang('th_target')), 'all_targets' => array(GWF_Form::CHECKBOX, false, $this->module->lang('th_all_targets')), 'missing' => array(GWF_Form::SUBMIT, $this->module->lang('btn_missing')), 'bundle' => array(GWF_Form::SUBMIT, $this->module->lang('btn_bundle')));
     return new GWF_Form($this, $data);
 }
Ejemplo n.º 15
0
 private function getForm()
 {
     $g = $this->group;
     $data = array('group_name' => array(GWF_Form::STRING, $g->getVar('group_name'), $this->module->lang('th_group_name')), 'view' => array(GWF_Form::SELECT, $this->getGroupViewSelect($g->getVisibleMode(), 'view'), $this->module->lang('th_group_sel_view')), 'join' => array(GWF_Form::SELECT, $this->getGroupInviteSelect($g->getJoinMode(), 'join'), $this->module->lang('th_group_sel_join')), 'lang' => array(GWF_Form::SELECT, GWF_LangSelect::single(0, 'lang', $g->getVar('group_lang')), $this->module->lang('th_group_lang')), 'country' => array(GWF_Form::SELECT, GWF_CountrySelect::single('country', $g->getVar('group_country')), $this->module->lang('th_group_country')), 'founder' => array(GWF_Form::STRING, $g->getFounder()->getVar('user_name'), $this->module->lang('th_group_founder')), 'edit' => array(GWF_Form::SUBMIT, $this->module->lang('btn_edit')));
     return new GWF_Form($this, $data);
 }
Ejemplo n.º 16
0
 private function getFormNew(array $descr)
 {
     $data = array('langid' => array(GWF_Form::SELECT, GWF_LangSelect::single(0, 'langid', Common::getPostInt('langid')), $this->module->lang('th_site_language')), 'descr_new' => array(GWF_Form::MESSAGE, '', $this->module->lang('th_site_description')), 'add' => array(GWF_Form::SUBMIT, $this->module->lang('btn_add')));
     return new GWF_Form($this, $data);
 }
Ejemplo n.º 17
0
 private function formEdit(GWF_HelpdeskFAQ $faq)
 {
     $data = array('lang' => array(GWF_Form::SELECT, GWF_LangSelect::single(1, 'lang', $faq->getVar('hdf_langid')), $this->module->lang('th_lang'), $this->module->lang('tt_lang')), 'question' => array(GWF_Form::STRING, $faq->getVar('hdf_question'), $this->module->lang('th_question')), 'answer' => array(GWF_Form::MESSAGE, $faq->getVar('hdf_answer'), $this->module->lang('th_answer')), 'delete_confirm' => array(GWF_Form::CHECKBOX, false, $this->module->lang('th_confirm_del')), 'delete_confirm_v' => array(GWF_Form::VALIDATOR), 'add' => array(GWF_Form::SUBMITS, array('edit' => $this->module->lang('btn_edit_faq'), 'delete' => $this->module->lang('btn_rem_faq'))));
     return new GWF_Form($this, $data);
 }
Ejemplo n.º 18
0
 private function formSearch()
 {
     $data = array('username' => array(GWF_Form::STRING, '', $this->module->lang('th_user_name')), 'minlevel' => array(GWF_Form::INT, 0, $this->module->lang('th_user_level')), 'email' => array(GWF_Form::STRING, '', $this->module->lang('th_user_email')), 'country' => array(GWF_Form::SELECT, GWF_CountrySelect::single('country', Common::getPost('country')), $this->module->lang('th_country')), 'language' => array(GWF_Form::SELECT, GWF_LangSelect::single(0, 'language', Common::getPost('language')), $this->module->lang('th_language')), 'gender' => array(GWF_Form::SELECT, GWF_Gender::select('gender', Common::getPost('gender')), $this->module->lang('th_gender')), 'hasmail' => array(GWF_Form::CHECKBOX, false, $this->module->lang('th_hasmail')), 'haswww' => array(GWF_Form::CHECKBOX, false, $this->module->lang('th_haswww')), 'icq' => array(GWF_Form::CHECKBOX, false, $this->module->lang('th_icq')), 'msn' => array(GWF_Form::CHECKBOX, false, $this->module->lang('th_msn')), 'jabber' => array(GWF_Form::CHECKBOX, false, $this->module->lang('th_jabber')), 'skype' => array(GWF_Form::CHECKBOX, false, $this->module->lang('th_skype')), 'yahoo' => array(GWF_Form::CHECKBOX, false, $this->module->lang('th_yahoo')), 'aim' => array(GWF_Form::CHECKBOX, false, $this->module->lang('th_aim')), 'search' => array(GWF_Form::SUBMIT, $this->module->lang('btn_search')));
     return new GWF_Form($this, $data);
 }