#!/usr/bin/perl BEGIN { use lib '/usr/home/cfg' ; require push_inc ; } require cfg ; print "Content-type: text/html\n\n"; &today ; #--------------------------------------------------------------------------------------------------------------------------------------------------------------------- use DBI; use CGI::Carp qw(fatalsToBrowser); use CGI; @ARGV = split(/\\*\&/, $ENV{'QUERY_STRING'}); $action = $ARGV[0] ; $selectfield = $ARGV[1] ; # our $debug = 1 ; our $table = 'customers' ; our ($q) = CGI -> new() ; $iaction = $q -> param('iaction') || $action ; #--------------------------------------------------------------------------------------------------------------------------------------------------------------------- if ($iaction eq 'add'){ &common_min_add_screen; &screen1; } if ($iaction eq 'save'){ &common_min_load_params ; &insert ; &screen2 ; } &common_min_action; exit ; #------------------------------------------------------------------------------------------ sub insert { &add_db_fields ; $i{last_edited_by} = $userid ; $i{user_id} = $userid ; $i{id} = &db_min_get_max($table,'id') ; $i{date_time} = "$now_ccyy_mm_dd $now_hour:$now_min:$now_sec" ; $i{last_updated} = "$now_ccyy_mm_dd $now_hour:$now_min:$now_sec" ; &db_min_insert($table) ; } #------------------------------------------------------------------------------------------ sub add_screen { $box_header_title = 'Add Customer' ; $hidden_action = 'save' ; $head_col_width = 2 ; } #------------------------------------------------------------------------------------------ sub add_db_fields { &common_customer_hidden_db_fields ; $hidden{id} = 2 ; } #------------------------------------------------------------------------------------------ sub thead { &common_min_thead ; } #------------------------------------------------------------------------------- sub screen1 { &dialog_common ; print < $alert
$print_box_content_rows
ENDOFTEXT # exit; } #------------------------------------------------------------------------------------------ sub screen2 { print < ITV Admin ENDOFTEXT # exit ; } #------------------------------------------------------------------------------------------ use today ; use dialog ; use common ; 1;