コード例 #1
0
ファイル: Init_parsing.php プロジェクト: akswosn/tossi
// 2. key 값과 localkey값을 encrpty하여 실제 사용할 key를 생성 하자..
$dummy_key = $_GET['key'];
$cls_sec = new clsSecurity();
// real_key 실제 사용할 key.
$real_key = $cls_sec->encrypt($static_key, $dummy_key);
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// 3. method 의 값이 무엇인지 decrpty 하자
$method = $cls_sec->decrypt($method, $real_key);
/////////////////////////////////////////////////////////////////////////////
// 4. date 및 서버 url
if ($method == "rup") {
    // url
    $cls_config = new clsConfig();
    $c_hostname = $cls_config->GetIp();
    $c_virtualname = $cls_config->GetVirturalName();
    // date
    $cls_folder = new clsFolder();
    $c_date = $cls_folder->GetDateString();
    $result = sprintf("http://%s%s/,{$c_date}", $c_hostname, $c_virtualname, $c_date);
    echo "c_data={$result}";
    // 5. 이미지 업로드
} else {
    if ($method == "up") {
        $c_filename = $_GET['filename'];
        $c_filename = $cls_sec->decrypt($c_filename, $real_key);
        $c_type = $_GET['type'];
        if ($c_type != "image" || $c_type != "swf") {
            $c_type = $cls_sec->decrypt($c_type, $real_key);
        }
        if ($c_type == "") {