<?php
if (file_exists('../../' . $_REQUEST['tenant'] . '/config.php')) {
    require_once('../../' . $_REQUEST['tenant'] . '/config.php');
}
if (file_exists('/config.php')) {
    require_once('/config.php');
}

if (file_exists('../../../' . $_REQUEST['tenant'] . '/output/reports/' . $_REQUEST['clientnumber'] . '/' . $_REQUEST['repnumber'] . '_' . $_REQUEST['items'] . '.pdf') && $_REQUEST['forceGen'] != "yes") {
    echo "1";
} else {
    require_once('genPDF2.php');
}