OXIESEC PANEL
- Current Dir:
/
/
home
/
cubot
/
docroot
/
cubcgi
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/03/2023 07:42:40 AM
rwxrwxr-x
📄
admmenu.pl
4.98 KB
08/14/2022 11:11:57 AM
rw-r--r--
📄
common.pl
11.84 KB
08/14/2022 11:11:57 AM
rw-r--r--
📄
config.pl
1.13 KB
08/14/2022 11:11:57 AM
rw-r--r--
📄
cubhealth.cgi
2.81 KB
08/14/2022 11:11:57 AM
rwxr-xr-x
📄
download.cgi
1.02 KB
08/14/2022 11:11:57 AM
rwxr-xr-x
📄
forms.pl
4.53 KB
08/14/2022 11:11:57 AM
rw-r--r--
📄
func.pl
3.08 KB
08/14/2022 11:11:57 AM
rw-r--r--
📄
libhtml.pl
4.05 KB
08/14/2022 11:11:57 AM
rw-r--r--
📄
libtest.pl
1.45 KB
08/14/2022 11:11:57 AM
rw-r--r--
📄
test.cgi
255 bytes
08/14/2022 11:11:57 AM
rwxr-xr-x
📄
tips.cgi
2.08 KB
08/14/2022 11:11:57 AM
rwxr-xr-x
Editing: forms.pl
Close
##!/usr/local/bin/perl -d #$CUBCGI_HOME="/home/cubot/docroot/cgi"; #$CONFDIR="/var/cubsys"; #require "$CUBCGI_HOME/libhtml.pl"; #require "$CUBCGI_HOME/config.pl"; #require "$CUBCGI_HOME/admmenu.pl"; #require "$CUBCGI_HOME/func.pl"; require "$CUBCGI_HOME/common.pl"; sub loginform{ my ($q) = @_; form($q, 'POST', 'cubhealth.cgi', '', 'myfrm', '#', ''); table("width=100% cellspacing=0 cellpadding=0 border=1"); trow(1); td(1,"class=header_bg"); table(" border=0 cellspacing=0 cellpadding=0 border=0"); trow(1); td(1); td(1,"class=header_bg_start"); html("<div class=clientlogo></div></td>"); td(1); html("<td class=header_bg_middle>"); html("<div id=topright></div></td><td>"); table(" width=20% border=0 cellpadding=0 cellspacing=0 align=center"); trow(1); td(1); html("<b>Admin Password</b>") ; td(0); trow(0); trow(1); td(1); print $q->password_field('txtpass'); td(0); #td(1); print "Help"; td(0); td(1);td(0); td(1); print $q->submit('cmd', 'Login'); td(0); td(1);td(0); trow(0); trow(1); td(1, "colspan=2"); b(1); $q->param('auth') eq 'fail' ? errmsg("Incorrect Admin Password.") : html("") ; b(0); td(0); trow(0); tableend(); html("<input type=hidden name=page value='LOGIN'>"); #auth formend($q); td(0); trow(0); tableend(); td(0); trow(0); tableend(); table(" width=100% border=0 cellpadding=0 cellspacing=0"); trow(1); td(1," class=header_subbar"); html("<div id=dashMenu>"); html("<ul>"); html("<li id=dashLink1 class=active>"); html("<a><span> System Status Dashboard</span></a>"); html("</li></ul></div>"); #html("<a href=#><span>System Status Dashboard</span></a></li></ul></div>"); td(0); trow(0); tableend(); } sub admform{ my ($q, $args) = @_; form($q, 'POST', 'cubhealth.cgi', '', 'myfrm', '#', ''); table('border=0 width="25%" align=center'); trow(1); td(1, 'colspan=2'); td(1); print $q->submit('cmd', 'Logout'); td(0); td(0); trow(0); tableend(); print ">>>>>>>>>>>>>>>>>>", $confvars{'LOGFILE'} ,":: $args<BR>"; if($args ne ''){ html("<input type=hidden name=Session value='$args'>"); } html("<input type=hidden name=page value='ADMFORM'>"); formend($q); } sub healthform { my ($q) = @_; if(!-e "$CONFDIR/cubhlth.inc"){ &loginform($q); } else{ if(!printform("login")){ &loginform($q); } } table(" height=85% border=0 cellspacing=0 cellpadding=1 width=100% "); trow(1," height=50% valign=top"); td(1," width=50%"); html("<div>"); &header("Services Information"); &statustbl(); html("</div>"); td(0); td(1,"class=vcol width=3px");td(0); td(1); html("<div>"); if($mode eq 'ADMIN'){ &otherstats(); } else{ &frontstats(); } } sub printform{ my $formname = shift; my %forms; open(FORM, "$CONFDIR/cubhlth.inc"); while(<FORM>){ chomp($_); my @arr = split(/,/ ,$_); next if(@arr[3] =~ /^#/); if(@arr[3] eq "2"){ $forms{@arr[0]} = @arr[1]; } } close(FORM); if(-e "html/$forms{$formname}"){ open(FORM, "html/$forms{$formname}") or return 0; while(<FORM>){ chomp($_); print $_, "\n"; } close(FORM); return 1; } return 0; } sub adminform { my ($q, $args, $fun, $op) = @_; form($q, 'POST', 'cubhealth.cgi', '', 'myfrm', '#', ''); if($args ne ''){ html("<input type=hidden name=Session value='$args'>"); } html("<input type=hidden name=page value='ADMFORM'>"); table("width=100% cellspacing=0 cellpadding=0 border=0"); trow(1); td(1,"class=header_bg"); table(" border=0 cellspacing=0 cellpadding=0 border=0"); trow(1); td(1,"class=header_bg_start"); html("<div class=clientlogo></div></td>"); html("<td class=header_bg_middle ><div id=taMenu><ul></div>"); html("<div id=topright></div></td><td>"); # html("Admin Services"); td(1,"align=right"); print $q->submit('cmd', 'Logout'); td(0); td(0);trow(0);tableend();td(0);trow(0);tableend(); #----------------- table("width=100% border=0"); trow(1, "valign=top class=criteria_div"); td(1, "width=20%"); html("<div><fieldset>"); table("width=100% "); open(MENU, "$CONFDIR/cubhlth.inc"); my $sesfile = "$CONFDIR/session/CUB_".$args; open(SESS, ">$sesfile"); while(<MENU>){ chomp($_); next if($_ =~ /^#/); my $line = $_; print SESS $line, "\n"; my @arg = split(/,/ ,$line); next if(@arg[3] ne '5'); trow(1); td(1); print $q->submit("op", "$arg[0]", "size='20' class='system'"); td(0); trow(0); } close(SESS); close(MENU); tableend(); html("</fieldset></div>"); td(0); td(1); #print "Fun is :$fun";# if($fun ne ''){ html("<div><fieldset>"); #admchpass &$fun($q, $op); html("</fieldset></div>"); } td(0); trow(0); tableend(); formend($q); } 1;