⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.1
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
mydry
/
application
/
controllers
/
admin
/
View File Name :
Reset_password.php
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Reset_password extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('admin/Model_reset_password'); } public function index($email=0,$token=0) { $tot = $this->Model_reset_password->check_url($email,$token); if(!$tot) { redirect(base_url().'admin'); exit; } $error = ''; $success = ''; $data['setting'] = $this->Model_reset_password->get_setting_data(); if(isset($_POST['form1'])) { $valid = 1; $this->form_validation->set_rules('new_password', 'Password', 'trim|required'); $this->form_validation->set_rules('re_password', 'Retype Password', 'trim|required|matches[new_password]'); if($this->form_validation->run() == FALSE) { $valid = 0; $error = validation_errors(); } if($valid == 1) { $form_data = array( 'password' => md5($_POST['new_password']), 'token' => '' ); $this->Model_reset_password->update($email,$form_data); $success = 'Password is updated successfully!'; $this->session->set_flashdata('success',$success); redirect(base_url().'admin/reset_password/success'); } else { $this->session->set_flashdata('error',$error); $data['var1'] = $email; $data['var2'] = $token; $this->load->view('admin/view_reset_password',$data); } } else { $data['var1'] = $email; $data['var2'] = $token; $this->load->view('admin/view_reset_password',$data); } } public function success() { $data['setting'] = $this->Model_reset_password->get_setting_data(); $this->load->view('admin/view_reset_password_success',$data); } }