<?php
|
|
class admin_haibao_controller extends adminCommon{
|
function index_action(){
|
|
$this->yuntpl(array('admin/admin_haibao_config'));
|
|
}
|
|
function save_action(){
|
if($_POST['config']){
|
unset($_POST['config']);
|
|
$configM = $this->MODEL('config');
|
|
$configM->setConfig($_POST);
|
|
$this->web_config();
|
|
$this->ACT_layer_msg( "海报配置设置成功!",9,1,2,1);
|
}
|
}
|
|
function get_restnum_action(){
|
$haibaouser = iconv('utf-8','gbk',trim($_POST['haibaouser']));
|
$key = trim($_POST['key']);
|
$url = 'http://haibao.phpyun.com/restnum.php';
|
$url .= "?haibaouser=".$haibaouser."&key=".$key;
|
|
if (extension_loaded('curl')){
|
$file_contents = CurlGet($url);
|
|
}else if(function_exists('file_get_contents')){
|
|
$file_contents = file_get_contents($url);
|
|
}
|
|
echo $file_contents;die;
|
|
}
|
}
|
?>
|