r3935 renderRackPage(): justify alignment as suggested by SF user elacour
[racktables] / ajax.php
CommitLineData
11048491 1<?php
90a3d6d8
DY
2ob_start();
3try {
11048491 4
da111736 5require 'inc/init.php';
0df8c52b
DO
6$pageno = 'perms';
7$tabno = 'edit';
11048491
DY
8fixContext();
9
11048491
DY
10if (!permitted())
11{
1dcdcc47 12 echo "NAK\nPermission denied";
11048491
DY
13 exit();
14}
15
1dcdcc47 16switch ($_REQUEST['ac'])
11048491
DY
17{
18 case 'verifyCode':
7f42d792 19 $result = getRackCode (dos2unix ($_REQUEST['code']));
11048491 20 if ($result['result'] == 'ACK')
2847f8aa 21 echo "ACK\n";
11048491
DY
22 else
23 echo "NAK\n".$result['load'];
24 break;
25}
90a3d6d8
DY
26ob_end_flush();
27}
28catch (Exception $e)
29{
30 ob_end_clean();
3a089a44 31 echo "NAK\nRuntime exception";
90a3d6d8 32}
11048491 33
11048491 34?>