Пример #1
0
                } 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>
<link rel="stylesheet" href="css/style.css" type="text/css" media="all" />
<link rel="shortcut icon" href="images/favicon.ico" />
Пример #2
0
// display left content panel
echo "<div class='admin-content-edit'>\n";
if ($selectedRecordName) {
    echo "<h2>Edit the following properties for '{$selectedRecordName}' and save</h2>\n";
    echo "<form method='post' action='" . $_SERVER['PHP_SELF'] . "' enctype='multipart/form-data'>";
    // update values
    $index = 0;
    if ($textArray) {
        foreach ($textArray as $textField) {
            echo "<h3>" . $textField[2] . "</h3>\n";
            switch (StructuredFieldValue::getType($textField[2])) {
                case 'text':
                    echo "<input type='text' name='value" . $index++ . "' value='" . restoreValue($textField[3]) . "' width=40></input><br/>\n";
                    break;
                case 'textarea':
                    echo "<textarea name='value" . $index++ . "' rows='15' cols='70'>" . restoreValue($textField[3]) . "</textarea>";
                    break;
            }
        }
    }
    // update assets
    $index = 0;
    if ($assetArray) {
        foreach ($assetArray as $asset) {
            echo "<h3>" . $asset[5] . "</h3>\n";
            echo "enter the title here<br/><input type='text' name='asset{$index}' value='" . displayValue($asset[1]) . "' width=40></input><br/>\n";
            echo "<input type='file' name='file{$index}'></input>";
            if ($asset[2]) {
                echo " - (current uploaded file:" . $asset[2] . ")";
            }
            echo "<br/>\n";
Пример #3
0
require_once 'lib/php/DOLib.php';
if (!swValidate('s_username')) {
    header("location: index.php");
}
connect();
// save new value and redirect to the page to view the change
$save = $_POST['save'];
if ($save) {
    Setting::setSetting($save, $_POST['value']);
}
//get default value for the textarea (either from selecting an item in the history, or from the current active record)
$id = $_GET['id'];
$row = Setting::getSetting($id);
if ($row) {
    $initValue = restoreValue($row[2]);
    $initName = restoreValue($row[1]);
}
?>
<!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 settings mode</title>
<link rel="stylesheet" href="css/style.css" type="text/css" media="all" />
<link rel="shortcut icon" href="images/favicon.ico" />

</head>
<body>
<div class="header">
<div id='options'>
	<div id='setting'>