41 lines
960 B
Perl
41 lines
960 B
Perl
#!/usr/bin/perl
|
|
|
|
BEGIN { use lib '/usr/home/cfg' ; require push_inc ; }
|
|
|
|
print "Content-type: text/html\n\n";
|
|
|
|
use CGI::Carp qw(fatalsToBrowser);
|
|
use Fcntl qw(:flock);
|
|
use JSON::Repair ':all';
|
|
|
|
require cfg ;
|
|
|
|
#------------------------------------------------------------------------------------------
|
|
|
|
@ARGV = split(/\\*\&/, $ENV{'QUERY_STRING'});
|
|
|
|
foreach $ARG (@ARGV) { ($par,$val) = split(/\=/,$ARG) ; $val =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $param{$par} = $val ; }
|
|
|
|
# e.g. https://sssadmin.co.za/cgi-bin/sss/scripts/get/get_typeahead_json.pl?json_type=additional_services
|
|
|
|
# our $debug = 1 ;
|
|
|
|
#------------------------------------------------------------------------------------------
|
|
|
|
$json = '[' ;
|
|
|
|
&common_shared_load_poc_recipient_nr_json ;
|
|
|
|
$json .= ']' ;
|
|
|
|
print $json ;
|
|
|
|
exit ;
|
|
|
|
#------------------------------------------------------------------------------------------
|
|
|
|
use db ;
|
|
use common ;
|
|
use common_shared ;
|
|
|
|
1; |