Storm patrik Fixes

This commit is contained in:
JonatanRek 2020-04-28 11:43:07 +02:00
parent 57501e2847
commit 2560800efb
10 changed files with 4 additions and 21 deletions

View File

@ -1,17 +0,0 @@
<?php
if (isset($_POST) && !empty($_POST)){
if (isset($_POST['submitPasswordChange']) && $_POST['submitPasswordChange'] != "") {
$oldPassword = $_POST['oldPassword'];
$newPassword = $_POST['newPassword1'];
$newPassword2 = $_POST['newPassword2'];
UserManager::changePassword($oldPassword, $newPassword, $newPassword2);
header('Location: ' . BASEDIR . 'logout');
die();
} else if (isset($_POST['submitCreateUser']) && $_POST['submitCreateUser'] != "") {
$userName = $_POST['userName'];
$password = $_POST['userPassword'];
UserManager::createUser($userName, $password);
header('Location: ' . BASEDIR . 'setting');
die();
}
}

View File

@ -7,7 +7,7 @@ class Partial{
function __construct($path = "", $debug = false) {
$this->debug = $debug;
if (!empty('../app/templates/part/' . $path . '.phtml') && file_exists('../app/templates/part/' . $path . '.phtml')) {
if (!empty('../app/views/templates/part/' . $path . '.phtml') && file_exists('../app/views/templates/part/' . $path . '.phtml')) {
$this->path = $path;
} else {
echo '<pre>';
@ -29,6 +29,6 @@ class Partial{
extract($this->assignedValues);
}
require('../app/templates/part/' . $this->path . '.phtml');
require('../app/views/templates/part/' . $this->path . '.phtml');
}
}

View File

@ -26,8 +26,8 @@ class Template{
function render() {
extract($this->assignedValues);
if (!empty('../app/controls/' . $this->path . '.php') && file_exists('../app/controls/' . $this->path . '.php')) {
include('../app/controls/' . $this->path . '.php');
if (!empty('../app/controllers/' . $this->path . 'Controller.php') && file_exists('../app/controllers/' . $this->path . 'Controller.php')) {
include('../app/controllers/' . $this->path . 'Controller.php');
}
require_once('../app/views/templates/' . $this->path . '.phtml');
}