#!/usr/bin/perl ############################################## ## ## ## PROFILE MANAGER BASIC 3.0 ## ## Build 2005-10-20 ## ## ## ## Interlogy LLC. ## ## email: contact@interlogy.com ## ## http://www.interlogy.com/products/pmb ## ## ## ## Copyright 1999-2005 Interlogy LLC. ## ## ## ############################################## ############################### # find the root if this is IIS: ############################### if($ENV{'SERVER_SOFTWARE'} =~ m/IIS/) { if($root eq "" && $ENV{'PATH_TRANSLATED'} ne "") { my $pt = $ENV{'PATH_TRANSLATED'}; my @pts = split(/\\/, $pt); $pts[-1] = ""; if($ENV{'PATH_INFO'} eq "/pm.xls"){ $pts[-2] = ""; } $root = join "/", @pts; $root =~ s/\/\//\//; $OS = "NT"; } } require "${root}lib/pm.lib"; require "${root}lib/admin.lib"; require "${root}data/config/pmpre.cfg"; $strip_html = "no"; $iamadmin = 1; $no_strip_pipe = 1; &readit; if($input{'realaction'} ne ""){ $input{'action'} = $input{'realaction'}; } if($input{'adminpass'} ne ""){ $input{'pass'} = pm_encode($input{'adminpass'}); } if($input{'pass'} eq ""){ $input{'pass'} = $req->cookie("pmadm"); } if($input{'action'} eq "admin_menu"){ my $packed_cookie = $req->cookie( -NAME => "pmadm", -VALUE => $input{'pass'}, -EXPIRES => "+7d", -PATH => "/" ); print $req->header(-COOKIE => $packed_cookie); $header_set = 1; }elsif($input{'action'} eq "logout"){ my $packed_cookie = $req->cookie( -NAME => "pmadm", -VALUE => "byebye", -EXPIRES => "-1h", -PATH => "/" ); print $req->header(-COOKIE => $packed_cookie); $header_set = 1; $input{'action'} = "admin_logout"; &tempwiz; exit; }else{ print "Content-type: text/html\n\n" unless ($input{'action'} eq "exported" && $input{'format'} eq "excel"); } $admin_pass_file = "${root}$admin_pass_file"; if(&admin_pass_check ne "yes") { if($input{'pass'} ne ""){ print "
| "; $input{'base_dropdown'} = ""; foreach(@base){ $input{'base_dropdown'} .= ""; if($size == $i++){ $input{'base_checkbox'} .= "\n | \n";
$i=0;
}
$input{'base_checkbox'} .= "
$_ "; } $input{'base_checkbox'} .= "\n\n |