00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include <iostream>
00013 #include <iomanip>
00014 #include "cgiTemplates.h"
00015 #include "connectstring"
00016 #include "forms.h"
00017 #include "ocTypes.h"
00018 #include "ocString.h"
00019 #include "read_write_base.hpp"
00020 #include "forms_base.hpp"
00021 #include "list_base.hpp"
00022 #include "cgiTemplates.h"
00023 #include "Report_Type.hpp"
00024 #include "list_base.hpp"
00025 #include "openLogin.h"
00026 #include "connectstring"
00027 using namespace std;
00028 openLogin oLogin;
00029 #include "InfoPoints.hpp"
00030
00031
00032 class Report_Type_form: public Report_Type_Obj, public forms_base
00033 {
00034 public:
00035 Report_Type_form(cgiScript & script):Report_Type_Obj(),forms_base(script)
00036 {
00037 setKey(*this);
00038 }
00039 virtual ~Report_Type_form(){;}
00040
00041 void form_id_transfer( void )
00042 {
00043 llongFXfer( "Id", Id );
00044 }
00045 void form_data_transfer( void )
00046 {
00047 stringFXfer( "Name", Name);
00048 stringFXfer( "File_Extension", File_Extension);
00049 }
00050
00051 bool dbf_action( string mode, changeMap & changes )
00052 {
00053 return db_action( mode, changes );
00054 }
00055
00056
00057 bool form_display( void )
00058 {
00059 bool breturn = true;
00060 ocString sql;
00061 script << makeTop("Report_Type_Popup.cgi", "Report_Type")
00062 << formTemplate.getParagraph("advanced_begin");
00063 script << makeStaticBox("Id", "Id", Id ,"8");
00064 script << "<br class='clearall'>" << endl;
00065 script << formTemplate.getParagraph("advanced_end");
00066
00067 script << makeTextBox("Name", "Name", Name ,"125","25");
00068 script << "<br class='clearall'>" << endl;
00069 script << makeTextBox("File_Extension", "File_Extension", File_Extension ,"125","10");
00070 script << "<br class='clearall'>" << endl;
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094 script << makeButtons( key() );
00095 script << makeBottom( m_result ) << endl;
00096 return breturn;
00097 }
00098 };
00099
00100
00101 int main( int argcount, char ** args )
00102 {
00103 cgiScript script( "text/html", false );
00104 Report_Type_form myFrm(script);
00105
00106 infoPoints iPoints;
00107 if( iPoints.idToken.length() )
00108 {
00109 oLogin.token = iPoints.idToken;
00110 }
00111
00112 if( oLogin.testLoginStatus() )
00113 {
00114 script.closeHeader();
00115 cgiTemplates pgTemplate;
00116 pgTemplate.load("Templates/childPane.htmp");
00117
00118 script << ocString(pgTemplate.getParagraph("top"))
00119 .replaceAll("$heading$","Report_Type");
00120
00121 myFrm.loadControlTemplates("Templates/childdivform.htmp");
00122 myFrm.form_action();
00123 myFrm.form_display();
00124
00125 ocString end = pgTemplate.getParagraph("bottom");
00126 script << end;
00127 }
00128 else
00129 {
00130 script.Redirect("/");
00131 }
00132 }
00133
00134 #include "read_write_base.cpp"
00135 #include "forms_base.cpp"
00136
00137