getTimestamp() . ".jpg"; // delete prev File $deleteFile = str_replace("http://133.130.127.13/images/minecraft/user_thum/" , "/var/www/images/minecraft/user_thum/", $user["data"]["thum"]); if( file_exists( $deleteFile ) == 1 && is_file( $deleteFile ) ) { unlink( $deleteFile ); } if( $thum_path == "" ) { fileUpload( $uploaddir , $fileName , $_FILES['file'] ); $thum_path = $realdir . $fileName; } // if( $user["thum"] != "" ) { // $thumValue = array(); // $thumValue[ "user_idx" ] = $user[ "idx" ]; // $thumValue[ "thum" ] = $user[ "thum" ]; // queryInsert( getQueryInsertStr( "minecraft.history_user_thum" , $thumValue ) ); // // // $thumValue[ "user_idx" ] = $user[ "idx" ]; // $thumValue[ "thum" ] = $thum_path; // queryInsert( getQueryInsertStr( "minecraft.history_user_thum" , $thumValue ) ); // } $value = array(); $value["thum"] = $thum_path; $sql = getQueryUpdateStr( $tableName , $value ) . "where idx=" . $user["idx"]; queryUpdate( $sql ); $result = m_curl_init( "http://133.130.127.13/api/minecraft/login.php" , $_POST ); $result = json_decode( $result , true ); // 모든 쿠키 삭제 foreach($_COOKIE as $key=>$val){ setCookie($key,"",time()-3600,"/"); } } else { $result["status"] = 100; } echo json_encode( $result ); ?>