<?php
if (isset($_POST['prgrm'])) {
    if (!class_exists('crm_hardlock')) require_once("common_cadline_libraries/crm_hardlock.class.php");

    $actcode    = crm_hardlock::GetActCode($_POST['prgrm']);
    $resultXml  = '<' . '?' . 'xml version="1.0"' . '?' . '><SelectedProgram>';
    $resultXml  .= '<Password>' . $_POST['prgrm'] . '</Password><DayCode>' . $actcode . '</DayCode>';
    $resultXml  .= '</SelectedProgram>';
    header('Content-Type: text/xml; charset=utf-8');
    header('Content-Disposition: inline; filename=response.xml');

    echo $resultXml;
}
