<?php
include_once('./Function/BasicClass.php');
include_once('./config.php');
error_reporting(0);
$Modelu = isset($_REQUEST["m"]) ? urldecode($_REQUEST["m"]) : '';  //模式参数
$EncodeStr = isset($_REQUEST["s"]) ? urldecode($_REQUEST["s"]) : '';

$Content = '大河弯弯向东流 就是这么牛,古老东方的一条龙 就是这么牛,他的名字叫中国呀 就是这么牛,我们是中国的小孩 就是这么牛。';

switch($Modelu){
    case 'img':
        try{
            MakeImg(authcode($EncodeStr,'DECODE',constant("PicServiceKey"),0));
        }catch (Exception $e){
            echo '404';
        }
	    break;
    case 'imgQ':
        try{
            MakeImg(authcode($EncodeStr,'DECODE',constant("PicServiceKey"),0),'https://www.sogou.com/');
        }catch (Exception $e){
            echo '404';
        }
	    break;
    case 'doc':
        MakeDocs(authcode($EncodeStr,'DECODE',constant("PicServiceKey"),0),$Content,'test.docx');
        break;
    case 'xls':
        MakeExcel(authcode($EncodeStr,'DECODE',constant("PicServiceKey"),0),$Content,'test.xlsx');
        break;
    case 'ppt':
        MakePPT(authcode($EncodeStr,'DECODE',constant("PicServiceKey"),0),$Content,'test.ppt');
        break;
    case 'video':
        echo 'video';
        break;
    default:
        http_response_code(404);
        echo 'Not Found';
}
?>