#
#
#
#
#
#
#
#
#
#
# Get settings
require "../settings.php";
require "../core-settings.php";
require "../libs/ext.lib.php";
if (isset($_GET["id"])) {
    $OUTPUT = printPayslip($_GET);
} else {
    $OUTPUT = "Invalid use.";
}
# display output
require "../tmpl-print.php";
# confirm new data
function printPayslip($_GET)
{
    # Get vars
    foreach ($_GET as $key => $value) {
        ${$key} = $value;
    }
    # Validate input
    require_lib("validate");
    $v = new validate();
#
#
#
#
# Get settings
require "../settings.php";
require "../core-settings.php";
require "emp-functions.php";
if (isset($_REQUEST["id"])) {
    $OUTPUT = printPayslip($_REQUEST["id"]);
} elseif (isset($_REQUEST["batch"])) {
    #split up into batches and send to function in sequence
    $batch_arr = explode("|", $_REQUEST["batch"]);
    $null_val = array_pop($batch_arr);
    foreach ($batch_arr as $each => $own) {
        $OUTPUT .= printPayslip($own);
        $OUTPUT .= "<p style='page-break-before: always'>";
    }
} else {
    invalid_use();
}
require "../tmpl-print.php";
function printPayslip($id)
{
    global $PRDMON, $MONPRD;
    extract($_REQUEST);
    /* reversals once passed as negative ids */
    if ($id[0] == "-") {
        $rev = true;
    }
    $id = preg_replace("/^-/", "", $id);