예제 #1
0
파일: Form.php 프로젝트: sinfocol/gwf3
 private function getForm()
 {
     $data = array('username' => array(GWF_Form::STRING, '', $this->module->lang('th_username'), $this->module->lang('tt_username', array(GWF_User::USERNAME_LENGTH))), 'password' => array(GWF_Form::PASSWORD, '', $this->module->lang('th_password'), $this->module->lang('tt_password')));
     if ($this->module->wantEmailActivation()) {
         $data['email'] = array(GWF_Form::STRING, '', $this->module->lang('th_email'), $this->module->lang('tt_email'));
     }
     if ($this->module->hasMinAge()) {
         $data['birthdate'] = array(GWF_Form::DATE, 0, $this->module->lang('th_birthdate'), '', GWF_Date::LEN_DAY);
     }
     if ($this->module->wantCountrySelect()) {
         $cid = isset($_POST['countryid']) ? $_POST['countryid'] : GWF_IP2Country::detectCountryID();
         $data['countryid'] = array(GWF_Form::SELECT, GWF_CountrySelect::single('countryid', $cid), $this->module->lang('th_countryid'));
     }
     if ($this->module->isTOSForced()) {
         if ('' !== ($href_tos = $this->module->cfgHrefTos())) {
             $data['tos'] = array(GWF_Form::CHECKBOX, false, $this->module->lang('th_tos2', array(htmlspecialchars($href_tos))));
         } else {
             $data['tos'] = array(GWF_Form::CHECKBOX, false, $this->module->lang('th_tos'));
         }
         $data['eula'] = array(GWF_Form::VALIDATOR);
     }
     if ($this->module->wantCaptcha()) {
         $data['captcha'] = array(GWF_Form::CAPTCHA);
     }
     $data['register'] = array(GWF_Form::SUBMIT, $this->module->lang('btn_register'));
     return new GWF_Form($this, $data);
 }
예제 #2
0
파일: UserEdit.php 프로젝트: sinfocol/gwf3
 public function validate_country(Module_Admin $module, $arg)
 {
     return GWF_CountrySelect::validate_countryid($arg, true);
 }
예제 #3
0
파일: GWF_User.php 프로젝트: sinfocol/gwf3
 public function getCountrySelect($name = 'country')
 {
     return GWF_CountrySelect::single($name, Common::getPostString($name, $this->getCountryID()));
 }
예제 #4
0
파일: SiteEdit.php 프로젝트: sinfocol/gwf3
 public function validate_site_country(Module_WeChall $m, $arg)
 {
     return GWF_CountrySelect::validate_countryid($arg, false);
 }
예제 #5
0
 private static function getObjectSelect(GWF_Module $module, GDO $gdo, $c, $classname)
 {
     if ($classname === 'GWF_Country') {
         return GWF_CountrySelect::single($c, $gdo->getVar($c));
     }
     die('Unsupported object in GWF_FormGDO::getObjectSelect: ' . $classname);
 }
예제 #6
0
파일: SearchAdv.php 프로젝트: sinfocol/gwf3
 public static function validate_country(Module_Usergroups $m, $v)
 {
     return GWF_CountrySelect::validate_countryid($v, true);
 }