コード例 #1
0
                $ext = substr(strrchr($filename, '.'), 1);
                StaticAsset::createStaticAsset($save, $filename, $ext);
                $location = ViewUrl::getViewUrl($save);
                if ($location) {
                    header("location: view.php?location=" . $location);
                } else {
                    header("location: view.php");
                }
            }
        }
    }
}
//get default value for the textarea (either from selecting an item in the history, or from the current active record)
$name = empty($save) ? $_GET['name'] : $save;
if ($_GET['init']) {
    $row = StaticAsset::getStaticAssetById($_GET['init']);
} else {
    $row = StaticAsset::getStaticAssetByName($name);
}
if ($row) {
    $initValue = restoreValue($row[2]);
}
//delete history entry
$delete = $_GET['delete'];
if ($delete) {
    StaticAsset::deleteStaticAsset($delete);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>