Example #1
0
 private function RegisterUser()
 {
     if (!class_exists('job_ParseFilter')) {
         throw new ExceptionAllError('Class job_ParseFilter not found');
     }
     $parse = new job_ParseFilter(array(), array(), 1, 1);
     if (intval($GLOBALS['config']['reg_group']) < 3) {
         $GLOBALS['config']['reg_group'] = 4;
     }
     $regpassword = md5(md5($this->add_value['password1']));
     $name = $this->dbase->EscapeString($parse->process(htmlspecialchars(trim($this->add_value['name']))));
     $email = $this->dbase->EscapeString($parse->process(htmlspecialchars(trim($this->add_value['email']))));
     $this->dbase->DirectQuery("INSERT INTO " . USERPREFIX . "_users (name, password, email, reg_date, lastdate, user_group, info, signature, favorites, xfields, logged_ip) VALUES ('{$name}', '{$regpassword}', '{$email}', '{$this->dbase->timer->cur_time}', '{$this->dbase->timer->cur_time}', '" . $GLOBALS['config']['reg_group'] . "', '', '', '', '', '" . $this->dbase->EscapeString($this->member['ip']) . "')");
     $this->member['id'] = $this->dbase->Insert_id();
     $this->member['name'] = $this->add_value['name'];
     $this->member['group'] = $GLOBALS['config']['reg_group'];
     $this->LoginIn($this->add_value['password1']);
 }
Example #2
0
 /**
  * Preparation Values for resumes
  *
  */
 protected function PreparationResumeValues()
 {
     $this->PreparationValues();
     if (!class_exists('job_ParseFilter')) {
         throw new ExceptionAllError('Не найден класс job_ParseFilter');
     }
     $parse = new job_ParseFilter(array(), array(), 1, 1);
     $this->add_value['description'] = $parse->process(trim($this->add_value['description']));
     $this->add_value['contact_person'] = $parse->process(trim($this->add_value['contact_person']));
     $this->add_value['phone'] = $parse->process(trim($this->add_value['phone']));
     $this->add_value['email'] = $parse->process(trim($this->add_value['email']));
     if (!empty($_FILES['photo']['name'])) {
         $this->UploadImage('photo');
     } elseif (empty($this->old_value['photo']) || !empty($this->add_value['del_photo'])) {
         $this->add_value['photo'] = '';
     }
 }