Dashboard weiter ausgebaut
This commit is contained in:
37
controller/admin_parameter.php
Normal file
37
controller/admin_parameter.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
require_once("../config.inc.php");
|
||||
$function = $_POST['function'];
|
||||
|
||||
if ($function == 'saveParameter') {
|
||||
|
||||
$query2 = "SELECT pid
|
||||
FROM jumi_parameter
|
||||
ORDER BY pid ASC";
|
||||
$result2 = $db->query( $query2)
|
||||
or die ("Cannot execute query2");
|
||||
|
||||
while ($row2 = $result2->fetch_array()){
|
||||
$pid = $row2['pid'];
|
||||
$pid_value = $_POST[$pid];
|
||||
|
||||
|
||||
$sql1 = $db->query( "UPDATE jumi_parameter
|
||||
SET wert = '$pid_value'
|
||||
WHERE pid = $pid
|
||||
" );
|
||||
}
|
||||
|
||||
if(!$sql1){
|
||||
echo "Success";
|
||||
}else{
|
||||
echo "Error: PDATE jumi_parameter
|
||||
SET wert = '$pid_value'
|
||||
WHERE pid = $pid";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
Reference in New Issue
Block a user