<?php
class duoduo2020
{
   public function pwd(){
      $id=$_POST['id'];
      //判断原密码对不对

      $num=db()->count("duoduo2020","adminpass='".deep_jm($_POST['old_pwd'])."' and id=$id");
      if (empty($num)){
      	 json(1,"原密码不对");
      }
      $data['adminpass']=deep_jm($_POST['ddpwd']);
      db()->update("duoduo2020",$data,"id=$id");
      json(0);
  }
    
  
}
