public function update() { restricted(); $config = app('config'); unset($config['site']); $post = app('request')->request; if ($post['newusername'] != '') { $config['user']['username'] = $post['newusername']; } if ($post['newpassword'] != '') { $config['user']['password'] = md5($post['newpassword']); } if ($post['newmastercode'] != '') { $config['user']['mastercode'] = md5($post['newmastercode']); } $config['user']['autologin'] = app('request')->has('autologin'); arr2file($config, DIR_APP . '/config.php'); notify(t('saved')); return back(); }
<?php $title = 'EduApp - Add New App'; require_once 'core/includes/overall/header.inc.php'; restricted(); require_once 'core/includes/add.inc.php'; ?> <div class="titleBar"> <h3>Add New App</h3> </div> <section> <?php if (!isset($_GET['added'])) { ?> <form class="add" method="post" action="" enctype="multipart/form-data" autocomplete="off"> <figure> <img src="images/placeholders/addImage.gif"> <figcaption> <a href="#" id="imageUpload">Add Image</a> <input type="file" name="file"> </figcaption> </figure> <div class="right"> <input type="text" placeholder="Enter the applications' name here" name="name" <?php if (isset($_POST['name'])) { echo 'value="' . $_POST["name"] . '"'; } ?> > <div class="select"> <select name="category">