<?php
/**
 * Created by PhpStorm.
 * User: zhangjun
 * Date: 20/08/2018
 * Time: 5:24 PM
 */

class Page_SiteConfigController extends  HttpBaseController
{
    public function doIndex()
    {
//        parent::doIndex(); // TODO: Change the autogenerated stub
        $this->index();
    }

    public function index()
    {
        header('Access-Control-Allow-Origin: *');
        $configData = $this->getSiteConfigFromDB([SiteConfig::SITE_ENABLE_INVITATION_CODE,SiteConfig::SITE_ENABLE_REAL_NAME, SiteConfig::SITE_ID_PUBK_PEM]);
        $configData = json_encode($configData);
        $callBack = $_GET['callback'];
        $configDataJson = json_encode($configData);
        echo "$callBack($configDataJson);";
    }

}