<?php
class misc_lib{
    
    /**
     * 获取拒绝记录
     *
     * @param unknown_type $ip
     * @param unknown_type $ctype
     * @return unknown
     */
    public static function vuserip($ip , $ctype){
        return OBJ('deny_tab')->where("ip = $ip and ctype = $ctype")->get();
    }
    
    public static function getfilename($mod , $sname){
        return $mod . '/'.$sname . '.html';
    }
    
    /**
     * 加密后的密码串
     *
     */
    public static function getpasswd($pwd){
        return md5(substr(md5($pwd) , 0 , 16));
    }
}
?>