GhostManSec
Server: LiteSpeed
System: Linux premium117.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: eblama1 (1214)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /home/eblama1/sms.karnplayinland.com/modules/Student_Billing/Statements.php
<?php

Widgets( 'mailing_labels' );
Widgets( 'balance' );

if ( empty( $_REQUEST['search_modfunc'] ) )
{
	DrawHeader( ProgramTitle() );

	$extra['new'] = true;
	$extra['action'] = empty( $extra['action'] ) ? '&_ROSARIO_PDF=true' : $extra['action'] . '&_ROSARIO_PDF=true';

	Search( 'student_id', $extra );
}
else
{
	// For the Student Fees / Student Payments programs.
	$_REQUEST['print_statements'] = true;

	if ( isset( $_REQUEST['mailing_labels'] )
		&& $_REQUEST['mailing_labels'] === 'Y' )
	{
		$extra['group'][] = 'ADDRESS_ID';
	}

	$students_RET = GetStuList( $extra );

	if ( ! empty( $students_RET ) )
	{
		$SESSION_student_id_save = UserStudentID();

		$handle = PDFStart();

		foreach ( (array) $students_RET as $student )
		{
			if ( isset( $_REQUEST['mailing_labels'] )
				&& $_REQUEST['mailing_labels'] === 'Y' )
			{
				foreach ( (array) $student as $address )
				{
					unset( $_ROSARIO['DrawHeader'] );

					DrawHeader( _( 'Statement' ) );
					DrawHeader( $address['FULL_NAME'], $address['STUDENT_ID'] );
					DrawHeader( $address['GRADE_ID'] );
					DrawHeader( SchoolInfo( 'TITLE' ), ProperDate( DBDate() ) );

					// @since 11.6 Add Mailing Label position
					echo MailingLabelPositioned( $address['MAILING_LABEL'] );

					SetUserStudentID( $address['STUDENT_ID'] );

					require 'modules/Student_Billing/StudentFees.php';
					require 'modules/Student_Billing/StudentPayments.php';

					echo '<div style="page-break-after: always;"></div>';
				}
			}
			else
			{
				SetUserStudentID( $student['STUDENT_ID'] );

				unset( $_ROSARIO['DrawHeader'] );

				DrawHeader( _( 'Statement' ) );
				DrawHeader( $student['FULL_NAME'], $student['STUDENT_ID'] );
				DrawHeader( $student['GRADE_ID'] );
				DrawHeader( SchoolInfo( 'TITLE' ), ProperDate( DBDate() ) );

				require 'modules/Student_Billing/StudentFees.php';
				require 'modules/Student_Billing/StudentPayments.php';

				echo '<div style="page-break-after: always;"></div>';
			}
		}

		$_SESSION['student_id'] = $SESSION_student_id_save;

		PDFStop( $handle );
	}
	else
		BackPrompt( _( 'No Students were found.' ) );
}