diff --git a/webui/attribute-add.php b/webui/attribute-add.php index 7bfda573e1a53a88253127c2055b48abb03e550a..4f626f4fa47084bec0874c5a42582364ba7a13bb 100644 --- a/webui/attribute-add.php +++ b/webui/attribute-add.php @@ -69,7 +69,7 @@ if ($_POST['frmaction'] == "add") { <option value="!*">!*</option> <option value="||=">||=</option> <option value="||==">||==</option> - </select> + </select> </td> </tr> <tr> diff --git a/webui/attribute-change.php b/webui/attribute-change.php index d58991fa14f05a431397eb66b1e4fccb74d588b3..64f5e5744567bb2ad04b6d7b7c857299d876cbc9 100644 --- a/webui/attribute-change.php +++ b/webui/attribute-change.php @@ -90,7 +90,7 @@ if ($_POST['frmaction'] == "change") { <option value="!*">!*</option> <option value="||=">||=</option> <option value="||==">||==</option> - </select> + </select> </td> </tr> <tr> @@ -106,13 +106,13 @@ if ($_POST['frmaction'] == "change") { <option value="">--</option> <option value="0">No</option> <option value="1">Yes</option> - </select> + </select> </td> </tr> </table> - + <p /> - + <div class="textcenter"> <input type="submit" /> </div> @@ -124,9 +124,9 @@ if ($_POST['frmaction'] == "change") { <div class="warning">No attribute selected</div> <?php } - - - + + + # SQL Updates } elseif ($_POST['frmaction'] == "change2") { ?> @@ -134,7 +134,7 @@ if ($_POST['frmaction'] == "change") { <?php # Check an attribute was selected if (isset($_POST['attr_id'])) { - + $updates = array(); if (!empty($_POST['user_attributes_name'])) { @@ -153,7 +153,7 @@ if ($_POST['frmaction'] == "change") { # Check if we have updates if (sizeof($updates) > 0) { $updateStr = implode(', ',$updates); - + $res = $db->exec("UPDATE ${DB_TABLE_PREFIX}user_attributes SET $updateStr WHERE ID = ".$db->quote($_POST['attr_id'])); if ($res) { ?> @@ -193,4 +193,3 @@ printFooter(); # vim: ts=4 ?> - diff --git a/webui/attribute-delete.php b/webui/attribute-delete.php index 450be5b0691bb2473c153ccecc216ee0465c0ac1..5dd55ae5e849670b04273313a2a1184471c724c9 100644 --- a/webui/attribute-delete.php +++ b/webui/attribute-delete.php @@ -60,17 +60,17 @@ if ($_POST['frmaction'] == "delete") { <div class="warning">No attribute selected</div> <?php } - - + + # SQL Updates } elseif ($_POST['frmaction'] == "delete2") { ?> <p class="pageheader">Attribute Delete Results</p> <?php if (isset($_POST['attr_id'])) { - - if ($_POST['confirm'] == "yes") { + + if ($_POST['confirm'] == "yes") { $res = $db->exec("DELETE FROM ${DB_TABLE_PREFIX}user_attributes WHERE ID = ".$_POST['attr_id']); if ($res !== FALSE) { ?> diff --git a/webui/group-add.php b/webui/group-add.php index dd55511a0073aad1d12cf9052531caaa110f1f7d..3858a206757b6e00da5d92db0c5a898bb4c8ffc2 100644 --- a/webui/group-add.php +++ b/webui/group-add.php @@ -34,7 +34,7 @@ printHeader(array( )); -if ($_POST['frmaction'] == "add") { +if ($_POST['frmaction'] == "add") { ?> <p class="pageheader">Add Group</p> <?php @@ -58,7 +58,7 @@ if ($_POST['frmaction'] == "add") { <select name="group_disabled"> <option value="0">No</option> <option value="1">Yes</option> - </select> + </select> </td> </tr> <tr> @@ -73,9 +73,9 @@ if ($_POST['frmaction'] == "add") { </table> </form> <?php - - - + + + # Check we have all params } elseif ($_POST['frmaction'] == "add2") { ?> @@ -84,7 +84,7 @@ if ($_POST['frmaction'] == "add") { <?php $stmt = $db->prepare("INSERT INTO ${DB_TABLE_PREFIX}groups (Name,Priority,Disabled,Comment) VALUES (?,?,?,?)"); - + $res = $stmt->execute(array( $_POST['group_name'], $_POST['group_priority'], diff --git a/webui/group-attribute-change.php b/webui/group-attribute-change.php index a1799d9c9d7edede619189c3df46e0e1651834af..c630079c2517389337b1c4ec054e538d97a3507c 100644 --- a/webui/group-attribute-change.php +++ b/webui/group-attribute-change.php @@ -88,7 +88,7 @@ if ($_POST['frmaction'] == "change") { <option value="!*">!*</option> <option value="||=">||=</option> <option value="||==">||==</option> - </select> + </select> </td> </tr> <tr> @@ -104,13 +104,13 @@ if ($_POST['frmaction'] == "change") { <option value="">--</option> <option value="0">No</option> <option value="1">Yes</option> - </select> + </select> </td> </tr> </table> - + <p /> - + <div class="textcenter"> <input type="submit" /> </div> @@ -122,9 +122,9 @@ if ($_POST['frmaction'] == "change") { <div class="warning">No attribute selected</div> <?php } - - - + + + # SQL Updates } elseif ($_POST['frmaction'] == "change2") { ?> @@ -132,7 +132,7 @@ if ($_POST['frmaction'] == "change") { <?php # Check an attribute was selected if (isset($_POST['attr_id'])) { - + $updates = array(); if (!empty($_POST['group_attributes_name'])) { @@ -151,7 +151,7 @@ if ($_POST['frmaction'] == "change") { # Check if we have updates if (sizeof($updates) > 0) { $updateStr = implode(', ',$updates); - + $res = $db->exec("UPDATE ${DB_TABLE_PREFIX}group_attributes SET $updateStr WHERE ID = ".$db->quote($_POST['attr_id'])); if ($res) { ?> diff --git a/webui/user-attributes.php b/webui/user-attributes.php index e7255c5e9c3f8254059ebfe6df1723ebaaeef3f4..6ff1f9af4c4070e97f00a74e1667b4f06e6c5e76 100644 --- a/webui/user-attributes.php +++ b/webui/user-attributes.php @@ -76,7 +76,7 @@ printHeader(array( <?php $_SESSION['attr_user_id'] = $_POST['user_id']; if (isset($_SESSION['attr_user_id'])) { - + $temp = $_SESSION['attr_user_id']; $sql = "SELECT ID, Name, Operator, Value, Disabled FROM ${DB_TABLE_PREFIX}user_attributes WHERE UserID = $temp ORDER BY ID"; $res = $db->query($sql); diff --git a/webui/user-delete.php b/webui/user-delete.php index 26412eb8014be1f05d8892c0566e704b55033a87..e5c4a3f46df38b776cbec59c8beca8706ad20e5c 100644 --- a/webui/user-delete.php +++ b/webui/user-delete.php @@ -72,7 +72,7 @@ if ($_POST['frmaction'] == "delete") { $check = $db->query($sql); if ($check->num_rows == 0) { - if ($_POST['confirm'] == "yes") { + if ($_POST['confirm'] == "yes") { $res = $db->exec("DELETE FROM ${DB_TABLE_PREFIX}users WHERE ID = ".$_POST['user_id']); if ($res !== FALSE) { ?> diff --git a/webui/user-groups-delete.php b/webui/user-groups-delete.php index a3df5743cf2ea3210b747dcf81ff73c533280063..f6ac383506204f72508bb376f52885aef9cdee1a 100644 --- a/webui/user-groups-delete.php +++ b/webui/user-groups-delete.php @@ -61,20 +61,20 @@ if ($_POST['frmaction'] == "delete") { <div class="warning">No group assignment selected</div> <?php } - - + + # SQL Updates } elseif ($_POST['frmaction'] == "delete2") { ?> <p class="pageheader">Group Assignment Removal Results</p> <?php if (isset($_POST['group_id'])) { - if ($_POST['confirm'] == "yes") { + if ($_POST['confirm'] == "yes") { $res = $db->exec("DELETE FROM ${DB_TABLE_PREFIX}users_to_groups WHERE UserID = ".$_SESSION['groups_user_id']." AND GroupID = ".$_POST['group_id']); if ($res !== FALSE) { ?> <div class="notice">Group with ID: <?php print_r($_POST['group_id']);?> deleted from user with ID: <?php print_r($_SESSION['groups_user_id']);?></div> -<?php +<?php session_destroy(); } else { ?>