00001
00002
00003
00004
00005
00006
00007 #include "connectstring"
00008 #include "read_write_base.hpp"
00009 #include "openLogin.h"
00010 #include "filePick.hpp"
00011
00012 int main( int argcount, char ** args )
00013 {
00014
00015 string path = getenv("PATH_INFO");
00016
00017 openLogin login;
00018 if( path.length() )
00019 {
00020
00021 path = path.substr(1);
00022 }
00023 filePicker picker(login,path);
00024 cgiScript script("text/html", false, picker.fileDir().c_str());
00025 writelog("OK - script made");
00026
00027 if ( login.testLoginStatus() )
00028 {
00029 script.closeHeader();
00030
00031 writelog("Checking for files to delete");
00032 picker.checkForfilesToDelete(script);
00033
00034 writelog("Generating file list");
00035 picker.fileList(script);
00036
00037 writelog("Done");
00038 }
00039 else
00040 {
00041 script.closeHeader();
00042 script << "<html><body>" << endl;
00043 script << "Not Logged in <!--";
00044 script << login.getLastError() << endl;
00045
00046 script << " --></body></html>" << endl;
00047 writelog("INVALID ACCESS ATTEMPT");
00048 }
00049 writelog("OK - All Done");
00050 return(0);
00051 }
00052 #include "read_write_base.cpp"
00053