Web update page
This commit is contained in:
parent
4cce42059d
commit
b11c416373
@ -4,14 +4,17 @@ require_once("includes/config.php");
|
|||||||
require_once("includes/header.php");
|
require_once("includes/header.php");
|
||||||
require_once("includes/nav.php");
|
require_once("includes/nav.php");
|
||||||
|
|
||||||
//update code
|
if ($_SERVER['REQUEST_METHOD'] === POST && isset($_FILES['update']) && $_FILES['update']['size'] > 10000000 && $_FILES['upfile']['size'] < 10000000) {
|
||||||
|
move_uploaded_file($_FILES['file']['tmp_name'], '/tmp/update.cc')
|
||||||
|
exec("/usr/bin/sudo /update.sh", $result);
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h2>System Update</h2>
|
<h2>System Update</h2>
|
||||||
<form id="update" enctype="multipart/form-data" method="post" action="">
|
<form id="update" enctype="multipart/form-data" method="post" action="">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<input type="file" name="image">
|
<input type="file" name="update">
|
||||||
<input type="submit" class="btn btn-b btn-sm smooth" value="Upload">
|
<input type="submit" class="btn btn-b btn-sm smooth" value="Upload">
|
||||||
<p>
|
<p>
|
||||||
<ul>
|
<ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user