コード例 #1
0
ファイル: main_index.php プロジェクト: SelFish131/rf_office
    function lost2()
    {
        $this->load->library('validation');
        $this->load->library('email');
        $rules['login'] = "******";
        $rules['email'] = "required|valid_email";
        $this->validation->set_rules($rules);
        $fields['login'] = lang('off_main_login');
        $fields['email'] = lang('off_acc_email');
        $this->validation->set_fields($fields);
        if ($this->validation->run() == FALSE) {
            $this->table->set_template(tpl_table());
            $this->table->add_row(lang('off_main_login'), form_input('login'));
            $this->table->add_row(lang('off_acc_email'), form_input('email'));
            $this->table->add_row(form_submit('mysubmit', lang('off_lostbtn')), '');
            $text = '
	    <div align="center">' . $this->validation->error_string . heading(icon('64x64/lock.png') . lang('off_lostmastertitle'), 3) . form_open('main_index/lost2') . $this->table->generate() . '</form></div>' . anchor("main_index/lost", lang('off_lostemail'));
            $this->data['content'] = $text;
        } else {
            $login = office_secure(trim($this->input->post('login', true)));
            $email = office_secure(trim($this->input->post('email', true)));
            if ($this->login_is_exit($login, $email)) {
                $this->data['content'] = lang('off_emailsend');
                include APPPATH . 'config/mail.php';
                $this->email->initialize($config);
                $PWD = $this->login_is_exit($login, $email);
                $FGPWD = $this->get_FGPWD($login);
                $this->email->from('*****@*****.**', 'Lost Password');
                $this->email->to($email);
                $name = gen_name_profile(Get_AccountSerial($login));
                $this->email->subject('Repair Password');
                $this->email->message(sprintf(lang('off_emailsubject'), $name, $login, $PWD, $FGPWD, site_url(), config('office_name', 'rf_settings')));
                $this->email->send();
            } else {
                $this->data['content'] = lang('off_dataerror');
            }
        }
        compile();
    }
コード例 #2
0
ファイル: main.php プロジェクト: SelFish131/rf_office
 function characters()
 {
     //        заголовок страницы
     $this->data['title'] = lang('off_title_list') . gen_name_profile();
     //        узнаЄм имена баз
     $user = get_user();
     $world = get_world();
     //        узнаЄм список персонажей аккаунта
     $query = $this->MSSQL->query("SELECT * FROM {$world}.dbo.tbl_base WHERE Account = '" . get_login() . "'");
     $this->data['content'] = '';
     //        если персонажи есть то составл¤ем список
     $this->table->set_template(tpl_table());
     if ($query->num_rows() > 0) {
         foreach ($query->result() as $row) {
             if ($row->DCK == 0) {
                 $this->table->add_row(b(preg_name($row->Name)), $this->_char_menu($row->Serial, false));
             }
             if ($row->DCK == 1) {
                 $this->table->add_row(b(icon('32x32/trash_can.png', lang('off_cheinfo_del')) . $row->DeleteName), $this->_char_menu($row->Serial, true));
             }
         }
         //        генерируем табличку
         $this->data['content'] .= $this->table->generate();
         //        а если персов нет?
     } else {
         $this->data['content'] = icon('64x64/delete_image.png') . lang('off_notfoundpl');
     }
     $this->data['content'] .= '<hr>' . icon('32x32/info.png') . effect_toggle(lang('off_shop_titleinfo'), 'info', 'slide') . hiddendiv('info', '<div>' . icon('32x32/trash_can.png') . lang('off_cheinfo_del') . br(1) . icon('32x32/add_user.png') . lang('off_cheinfo_ressurect') . br(1) . icon('32x32/delete_user.png') . lang('off_cheinfo_delete') . br(1) . icon('32x32/support.png') . lang('off_cheinfo_safe') . br(1) . icon('32x32/search_database.png') . lang('off_inven_info') . br(1) . icon('32x32/tools.png') . lang('off_char_cleardoctip') . br(1) . icon('32x32/id_card.png') . lang('off_cheinfo_info') . '</div>');
     //        выводим ;)
     compile();
 }