Пример #1
0
function get_admin_auth($sToken = null)
{
    global $_COOKIE;
    $cookieName = ftt_get_config('auth.cookie_name', 'auth', false);
    if ($sToken == null) {
        $sToken = $_COOKIE[$cookieName];
    }
    return new Auth2(1, "e+@*YvVB2o-;efvR", $sToken);
}
Пример #2
0
 public function index()
 {
     $aMainResultData = $this->auth_dao->getListAll($this->aMainTable, '', $this->aWhereValParam, $this->sListAllType, $this->nLimit);
     $aMainResultView = $this->getViewData($aMainResultData, 'main', $this->aMainTable);
     $this->aViewData['nMainDataCount'] = count($aMainResultData);
     $this->aViewData['aMainResultView'] = $aMainResultView;
     $this->aViewData['aMainInfo'] = $this->aMainInfo;
     $this->aViewData['aAuthMenu'] = ftt_get_config('auth_menu', '/auth');
     $this->layout_view($this->ssn . '/auth_index.php', $this->aViewData, $this->sDefaultView);
 }
Пример #3
0
 public function goLogin()
 {
     $aParam = $this->input->post();
     $aMainTable = current(ftt_get_config('main', 'auth'));
     $aAuthMaster = ftt_get_config('auth_master', 'auth');
     if ($aAuthMaster[$aParam['pGmId']] == $aParam['pGmPassword']) {
         echo $this->echoJson(array('auth_id' => $aParam['pGmId'], 'auth_password' => $aParam['pGmPassword'], 'auth_priv' => 'A'));
     }
     $aSearchValue = array($aParam['pGmId'], md5($aParam['pGmPassword']));
     $aResultData = $this->csbase_dao->getListOne($aMainTable, $aSearchValue, array(' = ? ', ' = ? '));
     echo $this->echoJson($aResultData);
 }