<?php require '../classes/adminauth.php'; $a = new adminauth(); if (!$a->CheckPermission('drop_device')) { require '../classes/gui.php'; $agui = new admingui(); include '../includes/header.php'; include 'menu.php'; echo '<center><b>You have no permission to drop devices.</b></center></body></html>'; die; } require '../classes/vouchermanager.php'; $v = new vouchermanager(); $v->DropDevice($_GET['type'], $_GET['addr']); header('Location: index.php');
<?php require '../classes/adminauth.php'; require '../classes/systemmanager.php'; $a = new adminauth(); $s = new systemmanager(); if (!$a->CheckPermission('sys_config')) { require '../classes/gui.php'; include '../includes/header.php'; include 'menu.php'; echo '<center><b>You have no permission to manage the system config.</b></center></body></html>'; die; } include '../includes/header.php'; include 'menu.php'; echo '<center><b>Manage system config</b></center><br><br>'; if ($_GET['do'] == 'update_general') { $s->SetSetting('vouchertext1', $_POST['vouchertext1']); $s->SetSetting('vouchertext2', $_POST['vouchertext2']); $s->SetSetting('pre-form-text', $_POST['pre-form-text']); $s->SetSetting('post-form-text', $_POST['post-form-text']); $s->SetSetting('deny_drop_devices', $_POST['deny_drop_devices']); if ($_POST['use_verification'] == 'y') { $s->SetSetting('use_verification', 'y'); } else { $s->SetSetting('use_verification', 'n'); } if ($_POST['use_exp_date'] == 'y') { $s->SetSetting('use_exp_date', 'y'); } else { $s->SetSetting('use_exp_date', 'n');
<?php require '../classes/adminauth.php'; $a = new adminauth(); require '../classes/vouchermanager.php'; require '../classes/gui.php'; require '../classes/usermanager.php'; include '../includes/header.php'; include 'menu.php'; $agui = new admingui(); $u = new usermanager(); if ($_GET['do'] == '') { if (!$a->CheckPermission('view_users')) { echo '<center><b>You have no permission to edit users.</b></center></body></html>'; die; } echo '<center><b>User list</b></center><br><br>'; $agui->ListUsers($u->GetUserlist()); if ($a->CheckPermission('add_users')) { echo '<br><br><ul><u>Add User:</u><br> <form action="' . $_SERVER['PHP_SELF'] . '?do=add" method="post"> Username: <input type="text" name="add_user" size="20" class="formstyle"><br> Password: <input type="password" name="add_pwd" size="20" class="formstyle"><br> Repeat: <input type="password" name="add_repeat" size="20" class="formstyle"><br><br> <input type="submit" value="Add user" class="formstyle"> </form></ul>'; } } if ($_GET['do'] == 'add') { if (!$a->CheckPermission('add_users')) { echo '<center><b>You have no permission to add users.</b></center></body></html>';
<?php require '../classes/adminauth.php'; $a = new adminauth(); if (!$a->CheckPermission('drop_voucher')) { require '../classes/gui.php'; $agui = new admingui(); include '../includes/header.php'; include 'menu.php'; echo '<center><b>You have no permission to drop vouchers.</b></center></body></html>'; die; } require '../classes/vouchermanager.php'; $v = new vouchermanager(); $v->DropVoucher($_GET['vid'], true); header('Location: index.php');
<?php require '../classes/adminauth.php'; require '../classes/vouchermanager.php'; require '../classes/gui.php'; $a = new adminauth(); $v = new vouchermanager(); $agui = new admingui(); include '../includes/header.php'; include 'menu.php'; echo '<center><b>Active vouchers:</b></center><br>'; // List all vouchers if ($a->CheckPermission('view_voucher')) { $agui->ListVouchers($v->GetVoucherList()); } else { echo '<center><i>You are now allowed to view vouchers.</i></center>'; } ?> </body> </html>
<?php require '../classes/adminauth.php'; $a = new adminauth(); $a->Logout();
<?php require '../classes/adminauth.php'; require '../classes/systemmanager.php'; $a = new adminauth(); $s = new systemmanager(); if (!$a->CheckPermission('add_voucher')) { require '../classes/gui.php'; include '../includes/header.php'; include 'menu.php'; echo '<center><b>You have no permission to add vouchers.</b></center></body></html>'; die; } include '../includes/header.php'; include 'menu.php'; // Has a number been entered or do we have to display the form? Has the user set how long the voucher should be valid? if (is_numeric($_POST['cnt']) && trim($_POST['cnt']) != '' && ($_POST['d'] != 0 || $_POST['h'] != 0 || $_POST['m'] != 0 || ($_POST['e_d'] != 0 || $_POST['e_h'] != 0 || $_POST['e_m'] != 0)) && ($_POST['start_expire'] != '' || $s->GetSetting('force_start_exp') == 'y')) { // Include and load the vouchermanager require '../classes/vouchermanager.php'; $v = new vouchermanager(); // Replace entered values with default values, if enforced. This prevents the user from injecting forbidden values to the system if ($s->GetSetting('force_device-qty') == 'y') { $_POST['dev-cnt'] = $s->GetSetting('default_device-qty'); } if ($s->GetSetting('force_start_exp') == 'y') { if ($s->GetSetting('default_start_exp') == 'creation') { $_POST['start_expire'] = 'now'; } else { $_POST['start_expire'] = 'given'; } }