* @author Paul Simon K * @author Stephen Waite * @author Brady Miller * @author Rod Roark * @copyright Copyright (c) 2010 Z&H Consultancy Services Private Limited * @copyright Copyright (C) 2018-2020 Stephen Waite * @copyright Copyright (c) 2019-2020 Brady Miller * @copyright Copyright (c) 2020 Rod Roark * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 */ require_once("../globals.php"); require_once("$srcdir/auth.inc"); require_once("../../custom/code_types.inc.php"); require_once("$srcdir/patient.inc"); require_once("$srcdir/options.inc.php"); require_once("$srcdir/payment.inc.php"); use OpenEMR\Common\Acl\AclMain; use OpenEMR\Common\Twig\TwigContainer; use OpenEMR\Core\Header; if (!AclMain::aclCheckCore('acct', 'bill', '', 'write') && !AclMain::aclCheckCore('acct', 'eob', '', 'write')) { echo (new TwigContainer(null, $GLOBALS['kernel']))->getTwig()->render('core/unauthorized.html.twig', ['pageTitle' => xl("Confirm Payment")]); exit; } $screen = 'edit_payment'; // Deletion of payment distribution code if (isset($_POST["mode"])) { if ($_POST["mode"] == "DeletePaymentDistribution") { $DeletePaymentDistributionId = (isset($_POST['DeletePaymentDistributionId']) ? trim($_POST['DeletePaymentDistributionId']) : ''); $DeletePaymentDistributionIdArray = explode('_', $DeletePaymentDistributionId); $payment_id = $DeletePaymentDistributionIdArray[0]; $PId = $DeletePaymentDistributionIdArray[1]; $Encounter = $DeletePaymentDistributionIdArray[2]; $Code = $DeletePaymentDistributionIdArray[3]; $Modifier = $DeletePaymentDistributionIdArray[4]; $Codetype = $DeletePaymentDistributionIdArray[5]; //delete and log that action row_modify( "ar_activity", "deleted = NOW()", "session_id = '" . add_escape_custom($payment_id) . "' AND " . "pid = '" . add_escape_custom($PId) . "' AND " . "deleted IS NULL AND " . "encounter = '" . add_escape_custom($Encounter) . "' AND " . "code_type = '" . add_escape_custom($Codetype) . "' AND " . "code = '" . add_escape_custom($Code) . "' AND " . "modifier='" . add_escape_custom($Modifier) . "'" ); $Message = 'Delete'; //------------------ $_POST["mode"] = "searchdatabase"; } } //=============================================================================== //Modify Payment Code. //=============================================================================== if (isset($_POST["mode"])) { if ($_POST["mode"] == "ModifyPayments" || $_POST["mode"] == "FinishPayments") { $payment_id = $_REQUEST['payment_id']; //ar_session Code //=============================================================================== if (trim($_POST['type_name']) == 'insurance') { $QueryPart = "payer_id = '" . trim(formData('hidden_type_code')) . "', patient_id = '" . 0; } elseif (trim($_POST['type_name']) == 'patient') { $QueryPart = "payer_id = '" . 0 . "', patient_id = '" . trim(formData('hidden_type_code')); } $user_id = $_SESSION['authUserID']; $closed = 0; $modified_time = date('Y-m-d H:i:s'); $check_date = DateToYYYYMMDD(formData('check_date')); $deposit_date = DateToYYYYMMDD(formData('deposit_date')); $post_to_date = DateToYYYYMMDD(formData('post_to_date')); if ($post_to_date == '') { $post_to_date = date('Y-m-d'); } if ($_POST['deposit_date'] == '') { $deposit_date = $post_to_date; } $global_account = ""; if (formData('global_reset') == '-0.00') { $global_account = "', global_amount = '" . trim(formData('global_reset')); } sqlStatement("update ar_session set " . $QueryPart . "', user_id = '" . trim(add_escape_custom($user_id)) . "', closed = '" . trim(add_escape_custom($closed)) . "', reference = '" . trim(formData('check_number')) . "', check_date = '" . trim(add_escape_custom($check_date)) . "', deposit_date = '" . trim(add_escape_custom($deposit_date)) . "', pay_total = '" . trim(formData('payment_amount')) . "', modified_time = '" . trim(add_escape_custom($modified_time)) . $global_account . "', payment_type = '" . trim(formData('type_name')) . "', description = '" . trim(formData('description')) . "', adjustment_code = '" . trim(formData('adjustment_code')) . "', post_to_date = '" . trim(add_escape_custom($post_to_date)) . "', payment_method = '" . trim(formData('payment_method')) . "' where session_id='" . add_escape_custom($payment_id) . "'"); //=============================================================================== $CountIndexAbove = $_REQUEST['CountIndexAbove']; $CountIndexBelow = $_REQUEST['CountIndexBelow']; $hidden_patient_code = $_REQUEST['hidden_patient_code']; $user_id = $_SESSION['authUserID']; $created_time = date('Y-m-d H:i:s'); //================================================================== //UPDATION //It is done with out deleting any old entries. //================================================================== for ($CountRow = 1; $CountRow <= $CountIndexAbove; $CountRow++) { if (isset($_POST["HiddenEncounter$CountRow"])) { $where1 = "WHERE deleted IS NULL AND session_id = '" . add_escape_custom($payment_id) . "' AND pid ='" . trim(formData("HiddenPId$CountRow")) . "' AND encounter = '" . trim(formData("HiddenEncounter$CountRow")) . "' AND code_type = '" . trim(formData("HiddenCodetype$CountRow")) . "' AND code = '" . trim(formData("HiddenCode$CountRow")) . "' AND modifier = '" . trim(formData("HiddenModifier$CountRow")) . "'"; $where = "$where1 AND pay_amount > 0"; if (isset($_POST["Payment$CountRow"]) && $_POST["Payment$CountRow"] * 1 > 0) { if (trim($_POST['type_name']) == 'insurance') { if (trim($_POST["HiddenIns$CountRow"]) == 1) { $AccountCode = "IPP"; } if (trim($_POST["HiddenIns$CountRow"]) == 2) { $AccountCode = "ISP"; } if (trim($_POST["HiddenIns$CountRow"]) == 3) { $AccountCode = "ITP"; } } elseif (trim($_POST['type_name']) == 'patient') { $AccountCode = "PP"; } $resPayment = sqlStatement("SELECT * from ar_activity $where"); if (sqlNumRows($resPayment) > 0) { sqlStatement("UPDATE ar_activity SET deleted = NOW() $where"); } sqlBeginTrans(); $sequence_no = sqlQuery("SELECT IFNULL(MAX(sequence_no),0) + 1 AS increment " . "FROM ar_activity WHERE pid = '" . trim(formData("HiddenPId$CountRow")) . "' AND encounter = '" . trim(formData("HiddenEncounter$CountRow")) . "'"); sqlStatement("insert into ar_activity set " . "pid = '" . trim(formData("HiddenPId$CountRow")) . "', encounter = '" . trim(formData("HiddenEncounter$CountRow")) . "', sequence_no = '" . add_escape_custom($sequence_no['increment']) . "', code_type = '" . trim(formData("HiddenCodetype$CountRow")) . "', code = '" . trim(formData("HiddenCode$CountRow")) . "', modifier = '" . trim(formData("HiddenModifier$CountRow")) . "', payer_type = '" . trim(formData("HiddenIns$CountRow")) . "', reason_code = '" . trim(formData("ReasonCode$CountRow")) . "', post_time = '" . trim(add_escape_custom($created_time)) . "', post_user = '" . trim(add_escape_custom($user_id)) . "', session_id = '" . trim(formData('payment_id')) . "', modified_time = '" . trim(add_escape_custom($created_time)) . "', pay_amount = '" . trim(formData("Payment$CountRow")) . "', adj_amount = '" . 0 . "', account_code = '" . add_escape_custom($AccountCode) . "'"); sqlCommitTrans(); } else { sqlStatement("UPDATE ar_activity SET deleted = NOW() $where"); } //============================================================================================================================== $where = "$where1 AND adj_amount != 0"; if (isset($_POST["AdjAmount$CountRow"]) && $_POST["AdjAmount$CountRow"] * 1 !== 0) { if (trim($_POST['type_name']) == 'insurance') { $AdjustString = "Ins adjust Ins" . trim($_POST["HiddenIns$CountRow"]); $AccountCode = "IA"; } elseif (trim($_POST['type_name']) == 'patient') { $AdjustString = "Pt adjust"; $AccountCode = "PA"; } $resPayment = sqlStatement("SELECT * from ar_activity $where"); if (sqlNumRows($resPayment) > 0) { sqlStatement("update ar_activity set deleted = NOW() $where"); } sqlBeginTrans(); $sequence_no = sqlQuery("SELECT IFNULL(MAX(sequence_no),0) + 1 AS increment FROM ar_activity WHERE pid = '" . trim(formData("HiddenPId$CountRow")) . "' AND encounter = '" . trim(formData("HiddenEncounter$CountRow")) . "'"); sqlStatement("insert into ar_activity set " . "pid = '" . trim(formData("HiddenPId$CountRow")) . "', encounter = '" . trim(formData("HiddenEncounter$CountRow")) . "', sequence_no = '" . add_escape_custom($sequence_no['increment']) . "', code_type = '" . trim(formData("HiddenCodetype$CountRow")) . "', code = '" . trim(formData("HiddenCode$CountRow")) . "', modifier = '" . trim(formData("HiddenModifier$CountRow")) . "', payer_type = '" . trim(formData("HiddenIns$CountRow")) . "', post_time = '" . trim(add_escape_custom($created_time)) . "', post_user = '" . trim(add_escape_custom($user_id)) . "', session_id = '" . trim(formData('payment_id')) . "', modified_time = '" . trim(add_escape_custom($created_time)) . "', pay_amount = '" . 0 . "', adj_amount = '" . trim(formData("AdjAmount$CountRow")) . "', memo = '" . add_escape_custom($AdjustString) . "', account_code = '" . add_escape_custom($AccountCode) . "'"); sqlCommitTrans(); } else { sqlStatement("update ar_activity set deleted = NOW() $where"); } //============================================================================================================================== $where = "$where1 AND (memo LIKE 'Deductable%' OR memo LIKE 'Deductible%')"; if (isset($_POST["Deductible$CountRow"]) && $_POST["Deductible$CountRow"] * 1 > 0) { $resPayment = sqlStatement("SELECT * from ar_activity $where"); if (sqlNumRows($resPayment) > 0) { sqlStatement("update ar_activity set deleted = NOW() $where"); } sqlBeginTrans(); $sequence_no = sqlQuery("SELECT IFNULL(MAX(sequence_no),0) + 1 AS increment FROM ar_activity WHERE pid = '" . trim(formData("HiddenPId$CountRow")) . "' AND encounter = '" . trim(formData("HiddenEncounter$CountRow")) . "'"); sqlStatement("insert into ar_activity set " . "pid = '" . trim(formData("HiddenPId$CountRow")) . "', encounter = '" . trim(formData("HiddenEncounter$CountRow")) . "', sequence_no = '" . add_escape_custom($sequence_no['increment']) . "', code_type = '" . trim(formData("HiddenCodetype$CountRow")) . "', code = '" . trim(formData("HiddenCode$CountRow")) . "', modifier = '" . trim(formData("HiddenModifier$CountRow")) . "', payer_type = '" . trim(formData("HiddenIns$CountRow")) . "', post_time = '" . trim(add_escape_custom($created_time)) . "', post_user = '" . trim(add_escape_custom($user_id)) . "', session_id = '" . trim(formData('payment_id')) . "', modified_time = '" . trim(add_escape_custom($created_time)) . "', pay_amount = '" . 0 . "', adj_amount = '" . 0 . "', memo = '" . "Deductible $" . trim(formData("Deductible$CountRow")) . "', account_code = '" . "Deduct" . "'"); sqlCommitTrans(); } else { sqlStatement("delete from ar_activity $where"); } //============================================================================================================================== $where = "$where1 AND pay_amount < 0"; if (isset($_POST["Takeback$CountRow"]) && $_POST["Takeback$CountRow"] * 1 > 0) { $resPayment = sqlStatement("SELECT * from ar_activity $where"); if (sqlNumRows($resPayment) > 0) { sqlStatement("update ar_activity set deleted = NOW() $where"); } sqlBeginTrans(); $sequence_no = sqlQuery("SELECT IFNULL(MAX(sequence_no),0) + 1 AS increment FROM ar_activity WHERE pid = '" . trim(formData("HiddenPId$CountRow")) . "' AND encounter = '" . trim(formData("HiddenEncounter$CountRow")) . "'"); sqlStatement("insert into ar_activity set " . "pid = '" . trim(formData("HiddenPId$CountRow")) . "', encounter = '" . trim(formData("HiddenEncounter$CountRow")) . "', sequence_no = '" . add_escape_custom($sequence_no['increment']) . "', code_type = '" . trim(formData("HiddenCodetype$CountRow")) . "', code = '" . trim(formData("HiddenCode$CountRow")) . "', modifier = '" . trim(formData("HiddenModifier$CountRow")) . "', payer_type = '" . trim(formData("HiddenIns$CountRow")) . "', post_time = '" . trim(add_escape_custom($created_time)) . "', post_user = '" . trim(add_escape_custom($user_id)) . "', session_id = '" . trim(formData('payment_id')) . "', modified_time = '" . trim(add_escape_custom($created_time)) . "', pay_amount = '" . trim(formData("Takeback$CountRow")) * -1 . "', adj_amount = '" . 0 . "', account_code = '" . "Takeback" . "'"); sqlCommitTrans(); } else { sqlStatement("delete from ar_activity $where"); } //============================================================================================================================== $where = "$where1 AND follow_up = 'y'"; if (isset($_POST["FollowUp$CountRow"]) && $_POST["FollowUp$CountRow"] == 'y') { $resPayment = sqlStatement("SELECT * from ar_activity $where"); if (sqlNumRows($resPayment) > 0) { sqlStatement("update ar_activity set deleted = NOW() $where"); } sqlBeginTrans(); $sequence_no = sqlQuery("SELECT IFNULL(MAX(sequence_no),0) + 1 AS increment FROM ar_activity WHERE pid = '" . trim(formData("HiddenPId$CountRow")) . "' AND encounter = '" . trim(formData("HiddenEncounter$CountRow")) . "'"); sqlStatement("insert into ar_activity set " . "pid = '" . trim(formData("HiddenPId$CountRow")) . "', encounter = '" . trim(formData("HiddenEncounter$CountRow")) . "', sequence_no = '" . add_escape_custom($sequence_no['increment']) . "', code_type = '" . trim(formData("HiddenCodetype$CountRow")) . "', code = '" . trim(formData("HiddenCode$CountRow")) . "', modifier = '" . trim(formData("HiddenModifier$CountRow")) . "', payer_type = '" . trim(formData("HiddenIns$CountRow")) . "', post_time = '" . trim(add_escape_custom($created_time)) . "', post_user = '" . trim(add_escape_custom($user_id)) . "', session_id = '" . trim(formData('payment_id')) . "', modified_time = '" . trim(add_escape_custom($created_time)) . "', pay_amount = '" . 0 . "', adj_amount = '" . 0 . "', follow_up = '" . "y" . "', follow_up_note = '" . trim(formData("FollowUpReason$CountRow")) . "'"); sqlCommitTrans(); } else { sqlStatement("delete from ar_activity $where"); } //============================================================================================================================== } else { break; } } //========= //INSERTION of new entries,continuation of modification. //========= for ($CountRow = $CountIndexAbove + 1; $CountRow <= $CountIndexAbove + $CountIndexBelow; $CountRow++) { if (isset($_POST["HiddenEncounter$CountRow"])) { DistributionInsert($CountRow, $created_time, $user_id); } else { break; } } if ($_REQUEST['global_amount'] == 'yes') { sqlStatement("update ar_session set global_amount=? where session_id =?", [(isset($_POST["HidUnappliedAmount"]) ? trim($_POST["HidUnappliedAmount"]) * 1 : ''), $payment_id]); } elseif ($_REQUEST['global_reset'] == '-0.00') { sqlStatement("update ar_session set global_amount=? where session_id =?", [0, $payment_id]); } if ($_POST["mode"] == "FinishPayments") { $Message = 'Finish'; } $_POST["mode"] = "searchdatabase"; $Message = 'Modify'; } } //============================================================================== //Search Code //=============================================================================== $payment_id = ($payment_id ?? null) * 1 > 0 ? $payment_id : $_REQUEST['payment_id']; $ResultSearchSub = sqlStatement( "SELECT DISTINCT encounter, code_type, code, modifier, pid " . "FROM ar_activity WHERE deleted IS NULL AND session_id = ? " . "ORDER BY pid, encounter, code, modifier", [$payment_id] ); //============================================================================== //============================================================================== //=============================================================================== ?> <?php echo xlt('Confirm Payment'); ?>

0) { ?>
0) ?> 0) {//Distribution rows already in the database are displayed. ?> 0) { if ($CountPatient === 1) { $Table = 'yes'; ?>

0 and payer_type <= ? and sequence_no <= ?", [$PId, $Codetype, $Code, $Modifier, $Encounter, $Ins, $Sequence] ); $rowMoneyGot = sqlFetchArray($resMoneyGot); $MoneyGot = $rowMoneyGot['MoneyGot']; $resMoneyAdjusted = sqlStatement( "SELECT sum(adj_amount) AS MoneyAdjusted FROM ar_activity WHERE " . "deleted IS NULL AND pid = ? and code_type = ? and code = ? AND " . "modifier = ? AND encounter = ? AND payer_type > 0 AND " . "payer_type <= ? and sequence_no <= ?", [$PId, $Codetype, $Code, $Modifier, $Encounter, $Ins, $Sequence] ); $rowMoneyAdjusted = sqlFetchArray($resMoneyAdjusted); $MoneyAdjusted = $rowMoneyAdjusted['MoneyAdjusted']; } $Remainder = $Fee - $Copay - $MoneyGot - $MoneyAdjusted; //For calculating RemainderJS.Used while restoring back the values. if ($Ins == 0) {//Got just before Patient $resMoneyGot = sqlStatement( "SELECT sum(pay_amount) AS MoneyGot FROM ar_activity WHERE " . "deleted IS NULL AND pid = ? AND code_type = ? AND code = ? AND " . "modifier = ? AND encounter = ? and payer_type != 0", [$PId, $Codetype, $Code, $Modifier, $Encounter] ); $rowMoneyGot = sqlFetchArray($resMoneyGot); $MoneyGot = $rowMoneyGot['MoneyGot']; $resMoneyAdjusted = sqlStatement( "SELECT sum(adj_amount) AS MoneyAdjusted FROM ar_activity WHERE " . "deleted IS NULL AND pid = ? AND code_type = ? AND code = ? AND " . "modifier = ? and encounter = ? and payer_type != 0", [$PId, $Codetype, $Code, $Modifier, $Encounter] ); $rowMoneyAdjusted = sqlFetchArray($resMoneyAdjusted); $MoneyAdjusted = $rowMoneyAdjusted['MoneyAdjusted']; } else { //Got just before the previous //Fetch the LOWEST sequence_no till this session. //Used maily in the case if primary/others pays once more. $resSequence = sqlStatement( "SELECT sequence_no FROM ar_activity WHERE " . "session_id = ? AND deleted IS NULL AND pid = ? AND encounter = ? " . "order by sequence_no", [$payment_id, $PId, $Encounter] ); $rowSequence = sqlFetchArray($resSequence); $Sequence = $rowSequence['sequence_no']; $resMoneyGot = sqlStatement( "SELECT sum(pay_amount) as MoneyGot FROM ar_activity WHERE " . "deleted IS NULL AND pid = ? AND code_type = ? AND code = ? " . "AND modifier = ? AND encounter = ? AND payer_type > 0 AND " . "payer_type <= ? AND sequence_no < ?", [$PId, $Codetype, $Code, $Modifier, $Encounter, $Ins, $Sequence] ); $rowMoneyGot = sqlFetchArray($resMoneyGot); $MoneyGot = $rowMoneyGot['MoneyGot']; $resMoneyAdjusted = sqlStatement( "SELECT sum(adj_amount) as MoneyAdjusted FROM ar_activity WHERE " . "deleted IS NULL AND pid = ? and code_type = ? and code = ? AND " . "modifier = ? AND encounter = ? AND payer_type <= ? AND sequence_no < ?", [$PId, $Codetype, $Code, $Modifier, $Encounter, $Ins, $Sequence] ); $rowMoneyAdjusted = sqlFetchArray($resMoneyAdjusted); $MoneyAdjusted = $rowMoneyAdjusted['MoneyAdjusted']; } //Stored in hidden so that can be used while restoring back the values. $RemainderJS = $Fee - $Copay - $MoneyGot - $MoneyAdjusted; $resPayment = sqlStatement( "SELECT pay_amount FROM ar_activity WHERE " . "deleted IS NULL AND session_id=? AND pid = ? AND encounter = ? AND " . "code_type = ? AND code = ? AND modifier = ? AND pay_amount > 0", [$payment_id, $PId, $Encounter, $Codetype, $Code, $Modifier] ); $rowPayment = sqlFetchArray($resPayment); $PaymentDB = $rowPayment['pay_amount'] ?? null * 1; $PaymentDB = $PaymentDB == 0 ? '' : $PaymentDB; $resPayment = sqlStatement( "SELECT pay_amount FROM ar_activity WHERE " . "deleted IS NULL AND session_id = ? AND pid = ? AND encounter = ? AND " . "code_type = ? AND code = ? AND modifier = ? AND pay_amount < 0", [$payment_id, $PId, $Encounter, $Codetype, $Code, $Modifier] ); $rowPayment = sqlFetchArray($resPayment); $TakebackDB = ($rowPayment['pay_amount'] ?? null) * -1; $TakebackDB = $TakebackDB == 0 ? '' : $TakebackDB; $resPayment = sqlStatement( "SELECT adj_amount FROM ar_activity WHERE " . "deleted IS NULL AND session_id = ? AND pid = ? AND encounter = ? AND " . "code_type = ? AND code = ? AND modifier = ? AND adj_amount != 0", [$payment_id, $PId, $Encounter, $Codetype, $Code, $Modifier] ); $rowPayment = sqlFetchArray($resPayment); $AdjAmountDB = $rowPayment['adj_amount'] * 1; $AdjAmountDB = $AdjAmountDB == 0 ? '' : $AdjAmountDB; $resPayment = sqlStatement( "SELECT memo FROM ar_activity WHERE " . "deleted IS NULL AND session_id = ? AND pid = ? AND encounter = ? AND " . "code_type = ? AND code = ? AND modifier = ? AND " . "(memo LIKE 'Deductable%' OR memo LIKE 'Deductible%')", [$payment_id, $PId, $Encounter, $Codetype, $Code, $Modifier] ); $rowPayment = sqlFetchArray($resPayment); $DeductibleDB = $rowPayment['memo'] ?? ''; $DeductibleDB = str_replace('Deductable $', '', $DeductibleDB); $DeductibleDB = str_replace('Deductible $', '', $DeductibleDB); $resPayment = sqlStatement( "SELECT follow_up, follow_up_note FROM ar_activity WHERE " . "deleted IS NULL AND session_id = ? AND pid = ? AND encounter = ? AND " . "code_type = ? AND code = ? AND modifier = ? AND follow_up = 'y'", [$payment_id, $PId, $Encounter, $Codetype, $Code, $Modifier] ); $rowPayment = sqlFetchArray($resPayment); $FollowUpDB = $rowPayment['follow_up'] ?? ''; $FollowUpReasonDB = $rowPayment['follow_up_note'] ?? ''; $resPayment = sqlStatement( "SELECT reason_code FROM ar_activity WHERE " . "deleted IS NULL AND session_id = ? AND pid = ? AND encounter = ? AND " . "code_type = ? AND code = ? AND modifier = ?", [$payment_id, $PId, $Encounter, $Codetype, $Code, $Modifier] ); $rowPayment = sqlFetchArray($resPayment); $ReasonCodeDB = $rowPayment['reason_code']; if ($Ins == 1) { $AllowedDB = number_format($Fee - $AdjAmountDB, 2); } else { $AllowedDB = 0; } $AllowedDB = $AllowedDB === 0 ? '' : $AllowedDB; if ($Ins == 1) { $bgcolor = '#ddddff'; } elseif ($Ins == 2) { $bgcolor = '#ffdddd'; } elseif ($Ins == 3) { $bgcolor = '#F2F1BC'; } elseif ($Ins == 0) { $bgcolor = '#AAFFFF'; } $paymenttot = $paymenttot + floatval($PaymentDB); $adjamttot = $adjamttot + floatval($AdjAmountDB); $deductibletot = $deductibletot + floatval($DeductibleDB); $takebacktot = $takebacktot + floatval($TakebackDB); $allowedtot = $allowedtot + floatval($AllowedDB); ?> 0) } while ($RowSearchSub = sqlFetchArray($ResultSearchSub)); if ($Table == 'yes') { ?>
 
 
'; }//End of if($RowSearchSub = sqlFetchArray($ResultSearchSub)) ?>
0) ?>
" />