7
<script type="text/javascript">
10
window.location = "index.php?page=do.php&confirm&action=<?echo $action;?>&postfix=<?echo urlencode(json_encode($postfix));?>";
16
function RequestConfirmation($msg, $list) {
18
echo "<div class=\"list\">";
19
foreach ($list as $postfix) {
20
echo "cache*$postfix<br/>";
24
echo "<button onclick=\"Confirm();\">" . translate("Confirm") . "</button>";
28
function GetAdminFile($prefix = false) {
33
if (!is_dir($TMP_PATH . "/" . $dir)) {
34
if (!@mkdir($TMP_PATH . "/" . $dir, 0755, true))
35
throw new ADEIException(translate("Access to the temporary directory is denied"));
38
$fn = tempnam($TMP_PATH . "/" . $dir, $prefix);
47
$action = $_REQUEST['action'];
48
$confirm = isset($_REQUEST['confirm']);
52
if (isset($_GET['postfix']))
53
$postfix = json_decode(stripslashes($_GET['postfix']), true);
56
foreach ($_POST as $key => $value) {
57
if (($value == 1)&&(preg_match("/^postfix(.*)$/", $key, $m))) {
58
array_push($postfix, $m[1]);
64
?><span class="error"><?echo translate("Error: The list of items is not supplied");?></span><?
68
if (!is_array($postfix)) $postfix = array($postfix);
70
if (!$confirm) PlaceJS();
76
$cache = new CACHEDB();
77
foreach ($postfix as $p) {
80
echo translate("Done. All CACHES are droped.");
81
} catch (ADEIException $ae) {
82
?><span class="error"><?echo translate("Error: %s", $ae->getMessage());?></span><?
84
} else RequestConfirmation(
85
translate("Do you really want to drop following tables: "),
91
$name = GetAdminFile("resize-");
92
$f = fopen($name, "w");
94
throw new ADEIException(translate('Error creating temporary file: %s', $name));
97
require("../../adei.php");
99
$cache = new CACHEDB();
101
foreach ($postfix as $p) {
102
fwrite($f, '$cache->Rewidth("' . $p . '", true);' . "\n");
105
} catch (ADEIException $ae) {
106
echo translate("Error: %s", $ae->getMessage()) . "\n";
109
echo translate("done...") . "\n";?>');
113
echo "Please, login to the server and run: php $name -setup $SETUP";
115
echo "Please, login to the server and run: php $name";
119
$cache = new CACHEDB();
120
foreach ($postfix as $p) {
124
} catch (ADEIException $ae) {
125
?><span class="error"><?echo translate("Error: %s", $ae->getMessage());?></span><?
127
} else RequestConfirmation(
128
translate("Do you really want to resize following tables: "),
132
?><span class="error"><?
134
echo translate("Error: Invalid action \"%s\" is specified", $action);
136
echo translate("Error: Action is not specified");
b'\\ No newline at end of file'