#!/usr/bin/perl
BEGIN { use lib '/usr/home/cfg' ; require push_inc ; }
require cfg ;
print "Content-type: text/html\n\n";
# unless ($useropts{it}{$username}) { print "<<<<<<<<<<<< MAINTENANCE IN PROGRESS >>>>>>>>>" ; exit ; }
#---------------------------------------------------------------------------------------------------------------------------------------------------------------------
use CGI::Carp qw(fatalsToBrowser);
use CGI;
use Mail::Sendmail;
use Fcntl qw(:flock);
use File::Copy;
use File::Basename;
use Date::Calc qw(:all);
use Excel::Writer::XLSX;
&today;
#---------------------------------------------------------------------------------------------------------------------------------------------------------------------
@ARGV = split(/\\*\&/, $ENV{'QUERY_STRING'});
$action = $ARGV[0] ;
our ($q) = CGI -> new() ;
our $iaction = $q -> param('iaction') || $action ;
our $isaved = $q -> param('isaved') || '' ;
our $debug = 1 ;
#-------- page opts --------------------------------------------------------------------------------------------------------------------------------------------------
&page_opts ;
#---------------------------------------------------------------------------------------------------------------------------------------------------------------------
our $srchscr = 1 ;
&db_open_ro ;
our $db_ignore_open_close = 1 ; # do one open and one close instead of repeating it
&report_screen if $iaction eq '' ;
if ($iaction eq 'report') {
&common_min_load_params ;
&report_ifields;
&list_screen ;
&screen3;
}
if ($iaction eq 'save') {
&common_min_load_params ;
&update ;
&report_ifields;
&list_screen ;
&screen3;
}
&common_min_action;
$db_ignore_open_close = 0 ; # do one open and one close instead of repeating it
&db_close_conn ;
exit;
#------------------------------------------------------------------------------------------
sub update {
&schedule_payments_update("troubleshoot_monitor") ;
} #------------------------------------------------------------------------------------------
sub report_ifields {
&schedule_payments_report_ifields("troubleshoot_monitor") ;
} #------------------------------------------------------------------------------------------
sub list_screen {
our $count_outstanding = 0 ;
&schedule_payments_list_screen("troubleshoot_monitor") ;
} #------------------------------------------------------------------------------------------
sub thead {
&common_min_thead ;
} #-------------------------------------------------------------------------------
sub page_opts {
our $glyphicon = 'list' ;
our $lcpage = 'troubleshoot-monitor-payment' ;
&common_page_name ;
our $table = 'shift_operator_ids' ;
$page_title = 'Troubleshoot Monitor Payments' ;
} #-------------------------------------------------------------------------------
sub report_screen {
&schedule_payments_report_screen("troubleshoot_monitor") ;
} #-------------------------------------------------------------------------------
sub screen3 {
&thead;
if ($isaved) { $alert = &common_min_alert('success',"$ucpage $isaved!",'ok') ; } else { &common_min_alert_type ; }
# my $page = "$lcpage\s" ;
my $page = "event-quotes" ;
if ($s{no}) { $page = $lcpage ; }
&common_min_table('id',$page,'list') ;
our $savjqy = 1 ;
# &common_min_extra_crumb("manage-$lcpage\s","Manage $ucfirstpage\s") ;
$extra_form_fields .= qq~
~;
$print_box_content_rows .= &common_min_forms_end('','','save') if $count_outstanding ;
require _blank ;
exit ;
} #------------------------------------------------------------------------------------------
# sub screen4 {
# &common_min_alert_type ;
# print <
#
#
#
# $useropts{title}
#
#
#
#
#
#
#
# ENDOFTEXT
# #
# exit ;
# } #------------------------------------------------------------------------------------------
use common ;
use report ;
use xlsxcreator ;
use today ;
use schedule ;
1;