Debug: " ; print_r($_POST); echo "" ; # uncomment for debugging # echo "
Debug: " ; print_r($_REQUEST); echo "" ; $clientid = $_SERVER[REMOTE_ADDR] . "|" . $_SERVER[REMOTE_HOST] ; # . "|" . $_SERVER[HTTP_USER_AGENT] . "|" . $_SERVER[HTTP_REFERER] ; #useful mostly for debugging #----------------------------------------------------------------------------- # ADMIN FUNCTIONS #Checking if this is an admin request must be first.. before anything else.. #You should not have to edit any of this section if($_REQUEST['mode'] != "") { $seclevel = checkauth($passwd) ; } #see end of file below, I just couldn't talk myself into cutting and passing that function here. if($seclevel > 49 and $_REQUEST['mode'] == "get") { # checks to see if it is a 'get data' request from an admin if($_REQUEST['formname'] == "") { $formname = "default" ; } else { $formname = $_REQUEST['formname'] ; } ; if($_REQUEST['format'] == "") { $format = "html" ; } else { $format = $_REQUEST['format'] ; } ; $file = "$archive/glmailer/$formname.$format" ; $f = fopen("$file","r") ; $data = fread($f,filesize("$file")) ; fclose($f) ; if($format == "html") { print "
\n$data\n" ; } ; die ; # yea I know.. } ; if($seclevel > 49 and $_REQUEST['mode'] == "del") { #check to see if it is a delete data request, from an admin if($_REQUEST['formname'] == "") { $formname = "default" ; } else { $formname = $_REQUEST['formname'] ; } ; if($_REQUEST['format'] == "") { $format = "html" ; } else { $format = $_REQUEST['format'] ; } ; $file = "$archive/glmailer/$formname.xml" ; @unlink("$file") ; $file = "$archive/glmailer/$formname.html" ; @unlink("$file") ; $file = "$archive/glmailer/$formname.csv" ; @unlink("$file") ; print "Deleted all $formname data from server" ; die ; # yea I know.. } ; # END ADMIN FUNCTIONS #----------------------------------------------------------------------------- # EXAMPLE FORM: if(count($_POST) < 2 and count($_REQUEST) < 2 ) { # set to 2 to ignore a couple of cookies/session variables print <<