Fix POST request handling in dashboard forms
parent
1df2182bae
commit
e192d3fd04
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
if($_SERVER['REQUEST_TYPE'] == 'POST')
|
||||
if($_SERVER['REQUEST_METHOD'] == 'POST')
|
||||
{
|
||||
if(isset($_POST['remove'])) {
|
||||
include '../app/FormValidator.php';
|
||||
include 'app/FormValidator.php';
|
||||
$validator = new FormValidator(array(
|
||||
'uuid' => array('required' => true, 'regex' => '/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/')
|
||||
));
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
if($_SERVER['REQUEST_TYPE'] == 'POST')
|
||||
if($_SERVER['REQUEST_METHOD'] == 'POST')
|
||||
{
|
||||
if(isset($_POST['leave'])) {
|
||||
include '../app/FormValidator.php';
|
||||
include 'app/FormValidator.php';
|
||||
$validator = new FormValidator(array(
|
||||
'group' => array('required' => true, 'regex' => '/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/')
|
||||
));
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
$statementCreateTable = $RUNTIME['PDO']->prepare("CREATE TABLE IF NOT EXISTS `UserIdentitys` (`PrincipalID` VARCHAR(38) NOT NULL, `IdentityID` VARCHAR(38) NOT NULL, PRIMARY KEY (`IdentityID`))");
|
||||
$statementCreateTable->execute();
|
||||
|
||||
if($_SERVER['REQUEST_TYPE'] == 'POST') {
|
||||
include '../app/FormValidator.php';
|
||||
if($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
include 'app/FormValidator.php';
|
||||
if(isset($_POST['enableIdent'])) {
|
||||
$validator = new FormValidator(array(
|
||||
'newuuid' => array('required' => true, 'regex' => '/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/')
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
if($_SERVER['REQUEST_TYPE'] == 'POST') {
|
||||
if($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
if(!isset($_SESSION['LOGIN']) || !isset($_SESSION['UUID'])) {
|
||||
header('Location: index.php');
|
||||
die();
|
||||
}
|
||||
|
||||
include '../app/FormValidator.php';
|
||||
include 'app/FormValidator.php';
|
||||
$validator = new FormValidator(array(
|
||||
'oldPassword' => array('required' => true, 'regex' => '.{1,1000}'),
|
||||
'newPassword' => array('required' => true, 'regex' => '.{1,1000}'),
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
die();
|
||||
}
|
||||
|
||||
if($_SERVER['REQUEST_TYPE'] == 'POST') {
|
||||
include '../app/FormValidator.php';
|
||||
if($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
include 'app/FormValidator.php';
|
||||
if(isset($_POST['genpw'])) {
|
||||
$validator = new FormValidator(array(
|
||||
'userid' => array('required' => true, 'regex' => '/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/')
|
||||
|
|
Loading…
Reference in New Issue