#!/usr/bin/perl $root = "/x/pix/ocf/pmpre/"; ############################################## ## ## ## PROFILE MANAGER PREMIUM 1.16 ## ## ## ## Aytekin Tank ## ## email: aytekin@interlogy.com ## ## http://www.interlogy.com/scripts/pmpre ## ## ## ## Copyright 1999, 2000 Aytekin Tank. ## ## ## ############################################## ############################### # Let the browser know.. ############################### print "Content-type: text/html\n\n"; ############################### # Make it easy to find the errors ############################### eval("main"); if ($@) { #print "Content-type: text/plain\n\n", &err("

\n$@\n"); } sub main { ############################### # functions library: ############################### require "${root}pm.lib"; ############################### # Read the data coming from the form.. ############################### if(!$dontparse){ &readit; } ############################### # main comfiguration file: ############################### require "${root}pm.cfg"; ############################### # some definations: ############################### $info = "login=$input{'login'}"; if($input{'ID'} ne "") { $info .= "&ID=$input{'ID'}"; $gotid=1;} elsif((&pm_check) eq "yes") { $info .= "&ID=$values{'ID'}";} &init_errors; ############################### # create the links ############################### &link_em; ############################### # show header ############################### &header; ############################### # Security block: ############################### @blocked_features = qw( delete modify change_password upload uploaded delete_image mail_read mail_write mail_delete ); if($input{'action'} eq "show"){ foreach(@blocked_features){ if($input{'temp'} eq $_){ err("This feature is blocked for \"show\" action, try \"member\" action!"); exit; } } } ######## # MENU # ######## if ($input{'action'} eq "display") { &display_cgi;} elsif ($input{'action'} eq "delete") { if(!(&pm_check =~ /^n/)){&pm_delete_form;} } elsif ($input{'action'} eq "deleted") { &pm_delete; } elsif ($input{'action'} eq "register") {&pm_register; } elsif ($input{'action'} eq "search") {&search_cgi; } elsif ($input{'action'} eq "list") {&list; &tempwiz;} elsif ($input{'action'} eq "error") { &err($error_message{$input{'why'}});} elsif ($input{'action'} eq "modify") { if(!(&pm_check =~ /^n/)){&pm_modify_form;} } elsif ($input{'action'} eq "show") { $input{'action'}=$input{'temp'}; &tempwiz; } elsif ($input{'action'} eq "member") { if(!(&pm_check =~ /^n/)){ $input{'action'}=$input{'temp'}; &tempwiz;} } elsif ($input{'action'} eq "modified") { &pm_modify; } elsif ($input{'action'} eq "login") { if($save_stats eq "yes") {&log_event;} &panel_check; } elsif ($input{'action'} eq "send_password") { &pm_send_password; } elsif ($input{'action'} eq "change_password") { if(!(&pm_check =~ /^n/)){&pm_change_password; }} ## PM Premium actions ## needs patch to work: elsif ($input{'action'} eq "upload") { &pm_check; require "${root}pmpre.cfg"; &pm_upload_page; } elsif ($input{'action'} eq "uploaded"){ require "${root}pmpre.cfg"; &modify_element_by_number($input{'field'}, $endURL);&end; } elsif ($input{'action'} eq "delete_image") { &modify_element_by_number($input{'field'}, " "); &end; } elsif($input{'action'} eq "mail_write") { require "${root}pmpre.cfg"; &mail_write; &tempwiz;} elsif($input{'action'} eq "mail_write_form") { require "${root}pmpre.cfg"; &tempwiz;} elsif($input{'action'} eq "mail_delete") { require "${root}pmpre.cfg"; &mail_delete; &tempwiz;} elsif($input{'action'} eq "mail_read") { require "${root}pmpre.cfg"; &mail_read; &tempwiz;} else { &panel_check; } &end; } ####### # END # #######