Edit File by line
/home/barbar84/www/extracte.../filemang...
File: create.php
<?php
[0] Fix | Delete
[1] Fix | Delete
const ACCESS = true;
[2] Fix | Delete
[3] Fix | Delete
include_once 'function.php';
[4] Fix | Delete
[5] Fix | Delete
// login
[6] Fix | Delete
[7] Fix | Delete
[8] Fix | Delete
$title = 'Create new';
[9] Fix | Delete
[10] Fix | Delete
include_once 'header.php';
[11] Fix | Delete
[12] Fix | Delete
echo '<div class="title">' . $title . '</div>';
[13] Fix | Delete
[14] Fix | Delete
if ($dir == null || !is_dir(processDirectory($dir))) {
[15] Fix | Delete
echo '<div class="list"><span>The path does not exist</span></div>
[16] Fix | Delete
<div class="title">Function</div>
[17] Fix | Delete
<ul class="list">
[18] Fix | Delete
<li><img src="icon/list.png" alt=""/> <a href="index.php' . $pages['paramater_0'] . '">List</a></li>
[19] Fix | Delete
</ul>';
[20] Fix | Delete
} else {
[21] Fix | Delete
$dir = processDirectory($dir);
[22] Fix | Delete
[23] Fix | Delete
if (isset($_POST['submit'])) {
[24] Fix | Delete
echo '<div class="notice_failure">';
[25] Fix | Delete
[26] Fix | Delete
if (empty($_POST['name'])) {
[27] Fix | Delete
echo 'Not fully entered information';
[28] Fix | Delete
} else if (intval($_POST['type']) === 0 && file_exists($dir . '/' . $_POST['name'])) {
[29] Fix | Delete
echo 'Name already exists in the form of Folder or File';
[30] Fix | Delete
} else if (intval($_POST['type']) === 1 && file_exists($dir . '/' . $_POST['name'])) {
[31] Fix | Delete
echo 'Name already exists in the form of Folder or File';
[32] Fix | Delete
} else if (isNameError($_POST['name'])) {
[33] Fix | Delete
echo 'Name illegal';
[34] Fix | Delete
} else {
[35] Fix | Delete
if (intval($_POST['type']) === 0) {
[36] Fix | Delete
if (!@mkdir($dir . '/' . $_POST['name']))
[37] Fix | Delete
echo 'Create Folder failure';
[38] Fix | Delete
else
[39] Fix | Delete
goURL('index.php?dir=' . $dirEncode . $pages['paramater_1']);
[40] Fix | Delete
} else if (intval($_POST['type']) === 1) {
[41] Fix | Delete
if (!@file_put_contents($dir . '/' . $_POST['name'], '...'))
[42] Fix | Delete
echo 'Create File failure';
[43] Fix | Delete
else
[44] Fix | Delete
goURL('index.php?dir=' . $dirEncode . $pages['paramater_1']);
[45] Fix | Delete
} else {
[46] Fix | Delete
echo 'Choose illegal';
[47] Fix | Delete
}
[48] Fix | Delete
}
[49] Fix | Delete
[50] Fix | Delete
echo '</div>';
[51] Fix | Delete
}
[52] Fix | Delete
[53] Fix | Delete
echo '<div class="list">
[54] Fix | Delete
<span>' . printPath($dir, true) . '</span><hr/>
[55] Fix | Delete
<form action="create.php?dir=' . $dirEncode . $pages['paramater_1'] . '" method="post">
[56] Fix | Delete
<span class="bull">&bull; </span>Folder or File name:<br/>
[57] Fix | Delete
<input type="text" name="name" value="' . ($_POST['name'] ?? null) . '" size="18"/><br/>
[58] Fix | Delete
<input type="radio" name="type" value="0" checked="checked"/>Folder<br/>
[59] Fix | Delete
<input type="radio" name="type" value="1"/>File<br/>
[60] Fix | Delete
<input type="submit" name="submit" value="Create"/>
[61] Fix | Delete
</form>
[62] Fix | Delete
</div>
[63] Fix | Delete
<div class="title">Function</div>
[64] Fix | Delete
<ul class="list">
[65] Fix | Delete
<li><img src="icon/upload.png" alt=""/> <a href="upload.php?dir=' . $dirEncode . $pages['paramater_1'] . '">Upload files</a></li>
[66] Fix | Delete
<li><img src="icon/import.png" alt=""/> <a href="import.php?dir=' . $dirEncode . $pages['paramater_1'] . '">Import files</a></li>
[67] Fix | Delete
<li><img src="icon/list.png" alt=""/> <a href="index.php?dir=' . $dirEncode . $pages['paramater_1'] . '">List</a></li>
[68] Fix | Delete
</ul>';
[69] Fix | Delete
}
[70] Fix | Delete
[71] Fix | Delete
include_once 'footer.php';
[72] Fix | Delete
[73] Fix | Delete
[74] Fix | Delete
[75] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function