<?php
/**
 * 杂项操作
 * @copyright reginx.com
 * $Id: misc.mod.php 7 2013-01-24 00:30:29Z reginx $
 */
class misc_mod extends mod {
    
    /**
     * 输出验证码
     *
     */
    public function verifyAct(){
        $code = strtolower(core::randstr());
        $this->opensess($this->_conf['sess']);
        $this->sobj->set('verify' , md5($code));
        @ob_end_clean();
        image_lib::verify($code,54,24);
    }
    
    /**
     * 中文转换拼音 Ajax 接口
     *
     */
    public function getpyAct(){
        $this->nocache();
        $str = $this->get('c' , 'R');
        $out = py_lib::get($str);
        $this->ajaxout(array('py' => $out));
    }
}
?>