<?php include_once "config.inc.php"; include_once "templates/style.css"; $etl = new Etl(); if (!@$_GET['filename']) { die($lang['noFileChoose']); } else { echo "<a href=index.php?frame=right>" . $lang['back'] . "</a><br><br>"; if (file_exists($env['etl'] . $_GET['filename'])) { if (!@$_POST['filename']) { $str = $etl->GetEtl($_GET['filename']); echo "<form method=post>"; echo "<textarea name=content cols=\"60\" rows=\"30\">" . $str . "</textarea><br>"; echo "<input type=hidden name=filename value=" . $_GET['filename'] . ">"; echo "<input type=submit value=" . $lang['submit'] . "> <input type=button value=\"" . $lang['cancel'] . "\" onclick=\"javascript:history.back()\">"; echo "</form>"; } else { $etl->PutEtl($_POST['content'], $_POST['filename']); echo "<script>alert(\"" . $lang['success'] . "\");window.location='execEtl.php';</script>"; } } else { echo "<script>alert(" . $lang['noSuchFile'] . ");history.back();</script>"; } }
<?php include_once "config.inc.php"; include_once "templates/style.css"; $etl = new Etl(); if (!@$_GET['filename']) { die($lang['noFileChoose']); } else { if ($etl->DropEtl($_GET['filename'])) { echo "<script>alert(" . $lang['success'] . ");window.location='execEtl.php'"; } else { die($lang['unknownError']); } }
<?php include_once 'config.inc.php'; include_once 'templates/style.css'; $etl = new Etl(); if (!@$_POST['filename']) { $dir = dir($env['etl']); $i = 0; while (false !== ($entry = $dir->read())) { if ($entry != '.') { if ($entry != '..') { if ($entry != "") { $filename[$i] = $entry; } else { $filename[$i] = ""; } } } $i++; } $dir->close(); echo "<<< <a href=index.php?frame=right>" . $lang['back'] . "</a><br><br>"; echo $lang['putIni'] . "'./etl/'<br><br>"; echo "<form method=post>"; echo "<table border=1 cellspacing=1 cellpadding=3>"; $i = 0; foreach ($filename as $k => $v) { echo "<tr>\n\t\t<td>\n\t\t<input type=checkbox name=filename[] value=" . $v . ">\n\t\t</td>\n\t\t<td>\n\t\t" . $v . "\n\t\t</td>\n\t\t<td>\n\t\t<a href=editEtl.php?filename=" . $v . ">" . $lang['edit'] . "</a>\n\t\t</td>\n\t\t<td>\n\t\t<a href=# onclick=\"javascript:realconfirm('" . $lang['dropEtlConfirm'] . "','dropEtl.php?filename=" . $v . "');\">" . $lang['delete'] . "</a>\n\t\t</td>\n\t\t</tr>"; $i++; } echo "</table><br>";