Line 1... |
Line 1... |
1 |
<?php
|
1 |
<?php
|
2 |
include_once( '../../header.php' );
|
2 |
include_once( '../../header.php' );
|
3 |
define( DEBUG, true );
|
3 |
define( DEBUG, true );
|
4 |
if ( isset( $_POST["submit"] ) && $_POST["submit"] == 'Save Modifications' ) {
|
4 |
if ( isset( $_POST["submit"] ) && $_POST["submit"] == 'Save Modifications' ) {
|
5 |
overwriteLicense( $_REQUEST['license_id'], $_REQUEST['client_id'], $_REQUEST['device_id'], $_REQUEST['license_product_id'], $_REQUEST['license'], $_REQUEST['added_date'], $_REQUEST['removed_date'], true );
|
5 |
$str = overwriteLicense( $_REQUEST['license_id'], $_REQUEST['client_id'], $_REQUEST['device_id'], $_REQUEST['license_product_id'], $_REQUEST['license'], $_REQUEST['added_date'], $_REQUEST['removed_date'], true );
|
6 |
header('Location: index.html');
|
6 |
header('Location: index.html');
|
7 |
}
|
7 |
}
|
8 |
// make them go back to the index page if they access this directly
|
8 |
// make them go back to the index page if they access this directly
|
9 |
if ( ! isset( $_REQUEST[ 'license_id'] ) ) header('Location: index.html');
|
9 |
if ( ! isset( $_REQUEST[ 'license_id'] ) ) header('Location: index.html');
|
10 |
$adding = $_REQUEST[ 'license_id'] == -1;
|
10 |
$adding = $_REQUEST[ 'license_id'] == -1;
|
Line 21... |
Line 21... |
21 |
<link rel="stylesheet" type="text/css" href="../../camp.css">
|
21 |
<link rel="stylesheet" type="text/css" href="../../camp.css">
|
22 |
</head>
|
22 |
</head>
|
23 |
<body>
|
23 |
<body>
|
24 |
<?php include_once('../../menu.php'); ?>
|
24 |
<?php include_once('../../menu.php'); ?>
|
25 |
<div id="content">
|
25 |
<div id="content">
|
- |
|
26 |
<?php print $str; ?>
|
- |
|
27 |
<?php if ( $adding ) { # we are adding ?>
|
- |
|
28 |
<h1 align='center'>Adding new license</h1>
|
- |
|
29 |
<h2 align='center'>Warning: Inputs not validated. Use Caution</h2>
|
- |
|
30 |
<?php } else { ?>
|
26 |
<h1 align='center'>Warning: Edits are not validated. Use Caution.</h1>
|
31 |
<h1 align='center'>Warning: Edits are not validated. Use Caution.</h1>
|
27 |
<h2 align='center'>Only use this to correct mistakes, not to move a license</h2>
|
32 |
<h2 align='center'>Only use this to correct mistakes, not to move a license</h2>
|
- |
|
33 |
<?php } // if..else
|
28 |
<?php if ( DEBUG ) { print '<pre>'; print_r( $currentLicense ); print '</pre>'; } ?>
|
34 |
if ( DEBUG ) { print '<pre>'; print_r( $currentLicense ); print '</pre>'; } ?>
|
29 |
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post" enctype="multipart/form-data">
|
35 |
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post" enctype="multipart/form-data">
|
30 |
<input type='hidden' name='license_id' value='<?php print $_REQUEST[ 'license_id']; ?>' />
|
36 |
<input type='hidden' name='license_id' value='<?php print $adding ? 'null' : $_REQUEST[ 'license_id']; ?>' />
|
31 |
<table border='1'>
|
37 |
<table border='1'>
|
32 |
<tr>
|
38 |
<tr>
|
33 |
<td>Client</td>
|
39 |
<td>Client</td>
|
34 |
<td>
|
40 |
<td>
|
35 |
<select name='client_id'>
|
41 |
<select name='client_id'>
|