Пример #1
0
	<?php 
include_once 'database.php';
$id = $_GET['id'];
if (isset($_POST['edit-mod'])) {
    $uname = $_POST['username'];
    $pass = $_POST['password'];
    $fname = $_POST['fullname'];
    $contact = $_POST['contactNo'];
    editmod($id, $uname, $pass, $fname, $contact);
    header("Location:index.php?page=moderators");
}
$n = getmod($id);
?>


<h2>Add Moderator Account</h2>

<form method="post" class="form-horizontal">
		<div class="form-group">
		
		<label id="form-label">Username</label>
		<input type="text" name="username" id="username" placeholder="Username" class="form-control" value = "<?php 
echo $n['username'];
?>
" required>

		<label id="form-label">Password</label>
		<input type="text" name="password" id="password" placeholder="Password" class="form-control" value = "<?php 
echo $n['password'];
?>
" required>
function getFiles($path)
{
    global $dirContents, $pathURL, $cpExts, $denyAccess;
    $filePath = $path == '.' ? '/' : '/' . $path . '/';
    for ($i = 0, $l = count($dirContents['files']); $i < $l; $i++) {
        $dirItem = $dirContents['files'][$i];
        $dirItemURL = escape($dirItem);
        $dirItemHTML = htmlspecialchars($dirItem);
        $fullPath = $path . '/' . $dirItem;
        $ext = getext($dirItem);
        $mod = getmod($fullPath);
        echo '  <li title="' . $dirItemHTML . '">' . "\n\t" . '<a href="' . escape(ROOT . $filePath . $dirItem) . '" title="' . $dirItemHTML . '" class="file">' . $dirItemHTML . '</a><!-- ' . $dirItemHTML . " -->" . "\n\t" . '<span class="fs"  title="file size">' . getfs($path . '/' . $dirItem) . '</span>' . "\n\t" . '<span class="extension" title="file extension">' . $ext . '</span>' . "\n\t" . '<span class="mode" title="mode">' . $mod . '</span>' . (zipSupport() && $ext == 'zip' ? "\n\t" . '<a href="?do=extract&amp;path=' . $pathURL . '&amp;subject=' . $dirItemURL . '" title="Extract ' . $dirItemHTML . '" class="extract b"></a><!-- Extract ' . $dirItemHTML . " -->" : null) . (filesize($fullPath) <= 1048576 * MaxEditableSize ? in_array($ext, $cpExts) ? "\n\t" . '<a href="#" title="Edit ' . $dirItemHTML . '" onclick="edit.init(\'' . $dirItemURL . '\', \'' . $pathURL . '\', \'' . getext($dirItem) . '\'); return false;" class="edit cp b"></a><!-- Edit ' . $dirItemHTML . " -->" : "\n\t" . '<a href="#" title="Edit ' . $dirItemHTML . '" onclick="edit.init(\'' . $dirItemURL . '\', \'' . $pathURL . '\', null); return false;" class="edit b"></a><!-- Edit ' . $dirItemHTML . " -->" : null) . "\n\t" . '<a href="#" title="Chmod ' . $dirItemHTML . '" onclick="fOp.chmod(\'' . $pathURL . '\', \'' . $dirItemURL . '\', \'' . $mod . '\'); return false;" class="chmod b"></a><!-- Chmod ' . $dirItemHTML . " -->" . "\n\t" . '<a href="#" title="Move ' . $dirItemHTML . '" onclick="fOp.moveList(\'' . $dirItemURL . '\', \'' . $pathURL . '\', \'' . $pathURL . '\'); return false;" class="move b"></a><!-- Move ' . $dirItemHTML . " -->" . "\n\t" . '<a href="#" title="Rename ' . $dirItemHTML . '" onclick="fOp.rename(\'' . $dirItemURL . '\', \'' . $pathURL . '\'); return false;" class="rename b"></a><!-- Rename ' . $dirItemHTML . ' -->' . "\n\t" . '<a href="?do=delete&amp;path=' . $pathURL . '&amp;subject=' . $dirItemURL . '" title="Delete ' . $dirItemHTML . '" onclick="return confirm(\'Are you sure you want to delete ' . removeQuotes($dirItem) . '?\');" class="del b"></a><!-- Delete ' . $dirItemHTML . " -->" . "\n  </li>\n";
    }
}