コード例 #1
0
ファイル: register.php プロジェクト: SelFish131/rf_office
 function referer($id = '')
 {
     ### Построение вывода
     $this->config->load('rf_settings', FALSE, TRUE);
     if ($this->config->item('REF_PAY') == false) {
         redirect('register', 'refresh');
     }
     $this->table->set_template(tpl_table());
     $this->table->add_row(lang('off_main_login'), form_input('login'), lang('off_reg_charuse'));
     $this->table->add_row(lang('off_main_passw'), form_password('password'), lang('off_reg_charuse'));
     $this->table->add_row(lang('off_acc_email'), form_input('email'), lang('off_reg_emailsample'));
     $this->table->add_row(lang('off_reg_secure'), form_input('secure'), '<img src="' . base_url() . index_page() . '/antibot">');
     $this->table->add_row(form_submit('submit', lang('off_reg_btn')), '');
     $this->data['content'] = heading(icon('48x48/add_image.png') . lang('off_reg_msgreg'), 4) . form_open('register/check') . form_hidden('refid', xss_clean($id)) . $this->table->generate() . '</form>';
     compile();
 }
コード例 #2
0
ファイル: vote.php プロジェクト: SelFish131/rf_office
 function getbonus($hash = 0)
 {
     if (!is_logged()) {
         redirect(base_url());
     }
     if ($this->_get_last_vote() != 0) {
         redirect('vote');
     }
     if ($this->_last_ip() != 0) {
         redirect('vote');
     }
     if (gen_secure() != $hash) {
         redirect('vote');
     }
     include APPPATH . "config/vote.php";
     $voted = $this->session->userdata('voted');
     if ($voted == 'true') {
         redirect('vote');
     }
     $this->data['title'] = lang('off_vote');
     $this->table->set_template(tpl_table());
     $votecount = 0;
     $text = '';
     $text .= icon('64x64/chart.png') . '<p>' . lang('off_vote_title') . '</p>';
     for ($i = 0; $i <= count($vote) - 1; $i++) {
         if ($this->session->userdata('vote' . $i)) {
             $this->table->add_row('<i>' . $vote[$i] . '</i>' . icon('32x32/accept.png'));
             $votecount++;
         } else {
             $this->table->add_row(b($vote[$i]) . icon('32x32/delete.png'));
         }
     }
     $text .= $this->table->generate();
     if (count($vote) == $votecount) {
         if ($this->_paybonus(count($vote))) {
         }
         $this->session->set_userdata('vote', time());
         $text .= icon('32x32/add_comment.png') . lang('off_vote_ok');
     } else {
         $text .= b(icon('32x32/warning.png') . anchor('vote', lang('off_vote_error')));
     }
     $this->data['content'] = $text;
     compile();
 }
コード例 #3
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();
    }
コード例 #4
0
ファイル: main.php プロジェクト: SelFish131/rf_office
 function del_inven($serial, $num)
 {
     if ($num > 100) {
         redirect(base_url());
     }
     $numeric = (int) office_secure($num);
     if (!is_numeric($serial)) {
         redirect('main');
     }
     if (!secure_serial_check($serial)) {
         redirect('#warn');
     }
     $this->table->set_template(tpl_table());
     $world = get_world();
     $query = $this->MSSQL->query("SELECT K{$num},D{$num},U{$num} FROM {$world}.dbo.tbl_inven WHERE Serial = '{$serial}'");
     if ($query->num_rows() > 0) {
         $row = $query->row_array();
         $this->table->add_row(lang('off_inven_items'), GetID($row['K' . $num], false));
         $this->table->add_row(lang('off_inven_count'), $row['D' . $num]);
         $this->table->add_row(lang('off_inven_update'), show_talic(bindechex($row['U' . $num], 3)));
         $this->table->add_row(form_open('main/acceptdelitem') . form_hidden('num', $num) . form_hidden('serial', $serial) . form_submit('accept', lang('off_accept_del')) . form_close(), go_back('', true));
     }
     $this->data['title'] = lang('off_acceptdelitemtitle');
     $this->data['content'] = $this->table->generate();
     compile();
 }