HEX
Server: Apache
System: Linux www3.pit.tblive.com 5.14.0-687.38.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 12 17:19:12 EDT 2026 x86_64
User: awaldron (1020)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/awaldron/_accomods/apidev.accomods.com/admin/codes.php
<?php
error_reporting(E_ALL);
include('_helpers.php');

if (isset($_POST['submitForm'])) {
    $fp = fopen('/home/awaldron/_accomods/api.accomods.com/schoolCodes.txt', 'w');
    fwrite($fp, $_POST['codes']);
    fclose($fp);
}

$file = file_get_contents('/home/awaldron/_accomods/api.accomods.com/schoolCodes.txt');
$codes = file('/home/awaldron/_accomods/api.accomods.com/schoolCodes.txt');
sort($codes);


include '_header.php';
?>

<div class="container">
    <div class="row">
        <div class="col-sm-12">
            <h1>School Code Editor</h1>
            <p><a href="/admin">Back to Admin Panel</a></p>

            <form action="/admin/codes.php" method="post">
                <input type="hidden" name="hi" value="ho" />
                <textarea style="min-width:600px;min-height:400px;padding:5px 10px;" name="codes"><?php echo $file; ?></textarea>
                <br><br/><input type="submit" name="submitForm" value="submit edit" />
            </form>
        </div>
    </div>
</div>


<br/><br/><br/>
<div class="container">
    <div class="row">
        <div class="col-sm-12">
<!--
            <h1>School Code Editor</h1>
            <p><a href="/admin">Back to Admin Panel</a></p>
-->

			<table class="table table-striped table-hover">
				<thead>
				<tr><th>School Name</th><th>School Code</th><th>Expires</th></tr>
				</thead>
				<tbody>
					<?php
						$i=0;
						foreach ($codes as $row) {
							$s = explode("||",$row);
							echo '<tr>';
							echo '<td>'.$s[0].'</td>';
							echo '<td>'.$s[1].'</td>';
							echo '<td>'.get_expiration_date( trim($s[1]) ).'</td>';
							echo '</tr>';
						}
					?>
				</tbody>
			</table>
        </div>
    </div>
</div>


<?php
include '_footer.php';
?>