public static function includePicture($name) { $asset = StaticAsset::getStaticAssetByName($name); if (swValidate('edit')) { echo "<a target='_top' class='edit' href='swcms/editstaticasset.php?name={$name}' class='edit'></a>"; } if ($asset) { echo "<img alt='" . $asset[1] . "' src='swcms/assets/" . $asset[2] . "'></img>"; } }
$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> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>standupweb CMS - Edit static asset mode</title>