<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Changepass extends CI_Controller {

	function __construct(){
		    parent::__construct();
        	$this->load->helper('url');
            $this->load->library('session');
		    $this->load->model('CsdjDB');
            $this->db->cache_off();
	}

	public function index()
	{

            $data['CS_AdminName']='123456';
            $data['CS_AdminPass']=md5('123456');
            $data['CS_Quanx']='1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50';

	        $query = $this->db->query("SELECT CS_ID FROM ".CS_SqlPrefix."admin order by CS_ID desc"); 
            if($query->num_rows()==0){
                 $this->CsdjDB->get_insert('admin',$data);
			}else{
                 $row=$query->row();
                 $this->CsdjDB->get_update('admin',$row->CS_ID,$data);
			}
            echo '账号、密码修改成功，全部是：123456<br><br>认证码在./csdj/lib/CS_Config.php里面修改<br><br>请一定删除文件./app/controllers/changepass.php(否则后果很严重)';
	}
}
