common_cadline_libraries (CRM hardlock/db/users classes; upstream cadline_web/cadcommonlib), maintenance/ (ARCHLine.XP license backend; upstream cadline_web/maintenance), maintenance2/. Vetted live files (byte-truth); upstream repos in PROVENANCE.md. NOTE: could be git submodules — kept as live files for byte-fidelity. Signed-off-by: LÁZÁR Imre <imre@illusion.hu> Assisted-by: claude-code@claude-opus-4-8
90 lines
3.5 KiB
PHP
90 lines
3.5 KiB
PHP
<?php
|
|
|
|
/*******************************************************************************
|
|
* test url: https://www.archlinexp.com/maintenance/al.php?action=selectprogramdialog&pwd=3600068368825006&userid=84130344b4
|
|
******************************************************************************/
|
|
|
|
class SelectProgramDialog
|
|
{
|
|
function SelectProgramDialog()
|
|
{
|
|
if (!class_exists('crm_hardlock')) require_once($_SERVER['DOCUMENT_ROOT'] . "/common_cadline_libraries/crm_hardlock.class.php");
|
|
}
|
|
|
|
public static function getPrograms($pwd = '', $userid = '')
|
|
{
|
|
echo '<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">';
|
|
echo '<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>';
|
|
echo '<br/>';
|
|
|
|
$result = "";
|
|
|
|
$url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
|
|
|
if (strpos($url, "hu") !== false) {
|
|
$serial = "Sorozatszám";
|
|
$version = "Verzió";
|
|
$type = "Típus";
|
|
$submit = "Küldés";
|
|
} else {
|
|
$serial = "Serial number";
|
|
$version = "Version";
|
|
$type = "Type";
|
|
$submit = "Submit";
|
|
}
|
|
|
|
$key = "#&ßsdfdfs789fs7d";
|
|
$nUserID = crm_hardlock::decode2($userid, $key);
|
|
$verid = crm_hardlock::GetVerIdFromPassword($pwd);
|
|
|
|
if (substr($pwd, 6, 1) == 'L') {
|
|
$actualPrograms = crm_hardlock::GetAllPrograms($nUserID, 2, $verid);
|
|
} else {
|
|
$actualPrograms = crm_hardlock::GetAllPrograms($nUserID, 1, $verid);
|
|
}
|
|
|
|
$result .= '
|
|
<form action="class/selectedprogram.php" method="post">
|
|
<div class="container">
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">' . $serial . '</th>
|
|
<th scope="col">' . $version . '</th>
|
|
<th scope="col">' . $type . '</th>
|
|
<th scope="col">Lan</th>
|
|
<th scope="col"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>';
|
|
|
|
foreach ($actualPrograms as $actpgoram) {
|
|
$result .= '
|
|
<tr>
|
|
<td>' . $actpgoram["prHlNum"] . '</td>
|
|
<td>' . crm_hardlock::GetVerName($actpgoram["prVerID"]) . '</td>
|
|
<td>' . crm_hardlock::GetTypeName($actpgoram["prTypeID"]) . '</td>
|
|
<td>' . $actpgoram["prLan"] . '</td>
|
|
<td><input type="checkbox" name="prgrm" value="' . $actpgoram["prHlNum"] . '" /></td>
|
|
</tr>';
|
|
}
|
|
|
|
$result .= '
|
|
</tbody>
|
|
</table>
|
|
<input type="submit" value="' . $submit . '" class="btn btn-success" />
|
|
</div>
|
|
</form>';
|
|
|
|
echo $result;
|
|
|
|
?>
|
|
<script>
|
|
$('input[type="checkbox"]').on('change', function() {
|
|
$('input[type="checkbox"]').not(this).prop('checked', false);
|
|
});
|
|
</script>
|
|
<?php
|
|
}
|
|
}
|
|
?>
|