Просмотр поста

.
Koenig
(\/)____o_O____(\/)
citybooks,
if ($systemUser->rights >= 7) {
$fn = realpath(dirname(__FILE__)) . "/system/end.php";

if (isset($_POST['customfooter'])) {
@file_put_contents($fn, $_POST['customfooter']);
}
$text = htmlspecialchars_decode(@file_get_contents($fn));
?> 
<div class="well">
<?php 
if (! is_writable($fn)) {
echo '<p>Error: file not writtable: <br>' .$fn. '<hr></p>';
}
?>
<form action="" method="post"> 
<div class="form-group">
<label for="motd">Footer html:</label>
<textarea id="customfooter" name="customfooter" cols="" rows="8" class="form-control"><?=$text?></textarea><br> 
</div>
<div class="pull-right">
<input type="submit" name="submitbtn" id="submitbtn" value="Update" class="submit btn btn-default">
</div>
</form>
</div>
<?php
} else {
die('not allowed');
}