| Server IP : 3.111.61.48 / Your IP : 216.73.216.67 Web Server : Apache System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.2.31 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/vhost/ats.isankalpa.org/app/Helpers/ |
Upload File : |
<?php
//use Session;
use Illuminate\Support\Facades\Session;
//use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| SUCCESS MESSAGE HELPER
|--------------------------------------------------------------------------
|
| Here is where you want to show the success message
| Parameter is treated as message text
|
*/
if( ! function_exists( 'get_success_message' ) )
{
function get_success_message( $msg = '' )
{
if( $msg )
{
$success_message = '<div class="col-me-12">
<div class="alert-primary bg-success margin-bottom-es">
<strong><i class="fa fa-check fa-lg"></i> </strong> '.$msg.'
<a href="javascript:void(0);" class="alert-close"><i class="material-icons">close</i></a>
</div>
</div>
<div class="clearfix"></div>';
Session::flash('message', $success_message);
}
}
}
/*
|--------------------------------------------------------------------------
| ERROR MESSAGE HELPER
|--------------------------------------------------------------------------
|
| Here is where you want to show the error message
| Parameter is treated as message text
|
*/
if( ! function_exists( 'get_error_message' ) )
{
function get_error_message( $msg = '' )
{
if( $msg )
{
$error_message = '<div class="col-me-12">
<div class="alert-primary bg-error margin-bottom-es">
<strong><i class="fa fa-power-off fa-lg"></i></strong>'.$msg.'
<a href="javascript:void(0);" class="alert-close"><i class="material-icons">close</i></a>
</div>
</div>
<div class="clearfix"></div>';
Session::flash('message', $error_message);
}
}
}
/*
|--------------------------------------------------------------------------
| ERROR MESSAGE HELPER
|--------------------------------------------------------------------------
|
| Here is where you want to show the error message
| Parameter is treated as message text
|
*/
if( ! function_exists( 'get_any_message' ) )
{
function get_any_message( $msg = '', $type = 'success' )
{
$msg_type = 'success_message';
if( $type == 'info' ){
$div_class = "info";
$icon_class = "fa-info-circle";
}elseif( $type == 'success' ){
$div_class = "success";
$icon_class = "fa-check";
}elseif( $type == 'error' ){
$div_class = "error";
$icon_class = "fa-power-off";
}elseif( $type == 'warning' ){
$div_class = "warning";
$icon_class = "fa-exclamation-triangle";
}
if( $msg != '' )
{
$msg = '<div class="col-me-12">
<div class="alert-primary bg-'.$div_class.' margin-bottom-es">
<strong><i class="fa '.$icon_class .' fa-lg"></i> </strong> '.$msg.'
<a href="javascript:void(0);" class="alert-close"><i class="material-icons">close</i></a>
</div>
</div>
<div class="clearfix"></div>';
}
Session::flash('message', $msg);
}
}
if( ! function_exists( 'show_flash_messages' ) )
{
function show_flash_messages( )
{
if(Session::has('message'))
{
$r = Session::get('message');
Session::forget('message');
return $r;
}
}
}
if( ! function_exists( 'show_success_message' ) )
{
function show_success_message( $msg = '', $return_html = false )
{
$success_message = '';
if( $msg )
{
$success_message = '<div class="form-panel">
<div class="alert-primary bg-success margin-bottom-es">
<strong><i class="fa fa-check fa-lg"></i> </strong> '.$msg.'
<a href="javascript:void(0);" class="alert-close"><i class="material-icons">close</i></a>
</div>
</div>
<div class="clearfix"></div>';
}
if( $return_html )
return $success_message;
else
echo $success_message;
}
}
if( ! function_exists( 'show_error_message' ) )
{
function show_error_message( $msg = '', $return_html = false )
{
$error_message = '';
if( $msg )
{
$error_message = '<div class="col-me-12">
<div class="alert-primary bg-error margin-bottom-es">
<strong><i class="fa fa-power-off fa-lg"></i> </strong>'.$msg.'
<a href="javascript:void(0);" class="alert-close"><i class="material-icons">close</i></a>
</div>
</div>
<div class="clearfix"></div>';
}
if( $return_html )
return $error_message;
else
echo $error_message;
}
}
if( ! function_exists( 'get_msg_body_by_id' ) )
{
function get_msg_body_by_id( $msg_id = '' )
{
$ret_msg = '';
#~~~~~~~~~~~~~~~~~ CHILD SECTION MESSAGES [START] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
$msg['child_add_success'] = "Child Data Saved Successfully.";
$msg['child_add_fail'] = "Failed to Save Child Data. Please try again later.";
$msg['child_edit_success'] = "Child Data Updated Successfully.";
$msg['child_edit_fail'] = "There is some problem. Please try again later.";
$msg['child_view_fail'] = "There is some problem. Please try again later.";
$msg['child_delete_success'] = "Child Data Deleted Successfully.";
$msg['child_delete_fail'] = "Failed to Delete Child Data. Please try again later.";
$msg['child_delete_wrong'] = "Something went wrong. Please try again later.";
$msg['child_to_parent_redirect_fail'] = "Failed to fetch Parent Data. Please try again later.";
$msg['child_to_parent_redirect_child_id_fail'] = "There is some problem. Please try again.";
#~~~~~~~~~~~~~~~~~ CHILD SECTION MESSAGES [END] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~~~~~~~~~~~~ CHILD ASQ SECTION MESSAGES [START] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
$msg['child_asq_add_success'] = "Child ASQ Data Saved Successfully.";
$msg['child_asq_add_fail'] = "Failed to Save Child ASQ Data. Please try again later.";
$msg['child_asq_child_id_fail'] = "Failed to fetch Child ASQ Data. Please try again later.";
$msg['child_asq_child_data_fail'] = "There is some problem. Please try again.";
$msg['child_asq_edit_success'] = "Child ASQ Data Updated Successfully.";
$msg['child_asq_edit_fail'] = "Failed to fetch Child ASQ Data. Please try again later.";
$msg['child_asq_view_fail'] = "There is some problem, please try again later.";
$msg['child_asq_delete_success'] = "Child ASQ Data Deleted Successfully.";
$msg['child_asq_delete_fail'] = "Failed to Delete Child ASQ Data. Please try again later.";
$msg['child_asq_delete_wrong'] = "Something went wrong. Please try again later.";
#~~~~~~~~~~~~~~~~~ CHILD ASQ SECTION MESSAGES [END] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~~~~~~~~~~~~ PARENT SECTION MESSAGES [START] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
$msg['parent_add_success'] = "Parent Data Saved Successfully.";
$msg['parent_add_fail'] = "Failed to Save Parent Data. Please try again later.";
$msg['parent_edit_success'] = "Parent Data Updated Successfully.";
$msg['parent_edit_fail'] = "There is some problem. Please try again later.";
$msg['parent_view_fail'] = "There is some problem. please try again later.";
$msg['parent_delete_success'] = "Parent Data Deleted Successfully.";
$msg['parent_delete_fail'] = "Failed to Delete Parent Data. Please try again later.";
$msg['parent_delete_wrong'] = "Something went wrong. Please try again later.";
#~~~~~~~~~~~~~~~~~ PARENT SECTION MESSAGES [END] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~~~~~~~~~~~~ WIRS SECTION MESSAGES [START] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
$msg['wirs_wrong'] = "Something went wrong. Please try again later.";
$msg['wirs_view_fail'] = "There is some problem. please try again later.";
$msg['wirs_consent_add_success'] = "Consent form data saved successfully.";
$msg['wirs_consent_update_success'] = "Consent form data updated successfully.";
$msg['wirs_intake_add_success'] = "Intake form data saved successfully.";
$msg['wirs_intake_update_success'] = "Intake form data updated successfully.";
$msg['wirs_wic_prenatal_add_success'] = "WIC Prenatal form data saved successfully.";
$msg['wirs_wic_prenatal_update_success'] = "WIC Prenatal form data updated successfully.";
$msg['wirs_resource_add_success'] = "Resource form data saved successfully.";
$msg['wirs_resource_update_success'] = "Resource form data updated successfully.";
$msg['wirs_confirmation_add_success'] = "Confirmation form data saved successfully.";
$msg['wirs_confirmation_update_success'] = "Confirmation form data updated successfully.";
$msg['wirs_concrete_support_add_success'] = "Concrete Support form data saved successfully.";
$msg['wirs_concrete_support_update_success'] = "Concrete Support form data updated successfully.";
$msg['wirs_aso_add_success'] = "ASO Checklist form data saved successfully.";
$msg['wirs_aso_update_success'] = "ASO Checklist form data updated successfully.";
$msg['wirs_progress_note_add_success'] = "Progress Note form data saved successfully.";
$msg['wirs_progress_note_update_success'] = "Progress Note form data updated successfully.";
$msg['document_delete_success'] = "Document file Deleted Successfully.";
$msg['document_delete_fail'] = "Failed to Delete Document file. Please try again later.";
$msg['invalid_file_type'] = "Invalid file type.";
$msg['base64_decode_failed'] = "base64_decode failed. Please try again later.";
$msg['not_valid_file'] = "Did not match the valid file type.";
$msg['failed_to_upload_file'] = "Failed to upload file. Please try again later.";
#~~~~~~~~~~~~~~~~~ WIRS SECTION MESSAGES [END] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~~~~~~~~~~~~ DATA EXPORT SECTION MESSAGES [START] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
$msg['data_export_search_fail'] = "No data found with the selected search criteria.";
#~~~~~~~~~~~~~~~~~ DATA EXPORT SECTION MESSAGES [END] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~~~~~~~~~~~~ MONTHLY IN HOUSE SECTION MESSAGES [START] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
$msg['monthly_in_house_search_fail'] = "No data found with the selected search criteria.";
#~~~~~~~~~~~~~~~~~ MONTHLY IN HOUSE SECTION MESSAGES [END] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~~~~~~~~~~~~ POST OFFICE MAILING LIST SECTION MESSAGES [START] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
$msg['post_mailing_list_search_fail'] = "No data found with the selected search criteria.";
#~~~~~~~~~~~~~~~~~ POST OFFICE MAILING LIST SECTION MESSAGES [END] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~~~~~~~~~~~~ USER SETTINGS SECTION MESSAGES [START] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
$msg['user_settings_add_success'] = "User Type Data Saved Successfully.";
$msg['user_settings_add_fail'] = "Failed to Save User Type Data. Please try again later.";
$msg['user_settings_edit_success'] = "User Type Data Updated Successfully.";
$msg['user_settings_edit_fail'] = "There is some problem. Please try again later.";
$msg['user_settings_view_fail'] = "There is some problem, please try again later.";
$msg['user_settings_delete_success'] = "The User Type is Deleted Successfully.";
$msg['user_settings_delete_fail'] = "Failed to Delete the User Type. Please try again later.";
$msg['user_settings_delete_fail_user_present'] = " user(s) found assigned to this Role.<BR />
Please change the User Type Role of the user(s) & try again.";
$msg['user_settings_delete_wrong'] = "Something went wrong. Please try again later.";
$msg['user_settings_access_success'] = "User Type Access permission applied successfully.";
$msg['user_settings_access_fail'] = "Failed to save data. Please try again later.";
$msg['user_settings_access_wrong'] = "Something went wrong. Please try again later.";
#~~~~~~~~~~~~~~~~~ USER SETTINGS SECTION MESSAGES [END] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~~~~~~~~~~~~ USER SECTION MESSAGES [START] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
$msg['user_add_success'] = "User Data Saved Successfully.";
$msg['user_add_fail'] = "Failed to Save User Data. Please try again later.";
$msg['user_edit_success'] = "User Data Updated Successfully.";
$msg['user_edit_fail'] = "There is some problem. Please try again later.";
$msg['user_view_fail'] = "There is some problem. Please try again later.";
$msg['user_delete_success'] = "The User is Deleted Successfully.";
$msg['user_delete_fail'] = "Failed to Delete the User Type. Please try again later.";
$msg['user_delete_wrong'] = "Something went wrong. Please try again later.";
$msg['user_profile_edit_success'] = "Your Profile Information is Updated Successfully.";
$msg['user_profile_edit_fail'] = "There is some problem. Please try again.";
#~~~~~~~~~~~~~~~~~ USER SECTION MESSAGES [END] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
//Location Section Messages
$msg['location_add_success'] = "Location Data Saved Successfully.";
$msg['location_add_fail'] = "Failed to Save Location Data. Please try again later.";
if( $msg_id != '' && array_key_exists( $msg_id, $msg ) )
{
$ret_msg = $msg[trim($msg_id)];
}
return $ret_msg;
}
}