Google
Web alhem.net
Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

IWeb.h

Go to the documentation of this file.
00001 00006 /* 00007 Copyright (C) 2004 Anders Hedstrom 00008 00009 This program is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU General Public License 00011 as published by the Free Software Foundation; either version 2 00012 of the License, or (at your option) any later version. 00013 00014 This program is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with this program; if not, write to the Free Software 00021 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00022 */ 00023 #ifndef _IWEB_H 00024 #define _IWEB_H 00025 00026 #define COOKIE_DOMAIN ".alhem.net" 00027 #define COOKIE_PATH "/cgi-bin/ib" 00028 00029 #include <stdio.h> 00030 #include <libcgi++.h> 00031 #include <mysql/mysql.h> 00032 #include <libmysqlwrapped.h> 00033 #include <libibank.h> 00034 #include "AccountForm.h" 00035 #include "SettingsForm.h" 00036 #include "ForumsForm.h" 00037 #include "ThreadListForm.h" 00038 #include "ViewThreadForm.h" 00039 #include "NewThreadForm.h" 00040 #include "NewMessageForm.h" 00041 #include "EditMessageForm.h" 00042 00043 00044 class IWeb : public Web 00045 { 00046 public: 00047 IWeb(); 00048 ~IWeb(); 00049 00050 void ReadCookies(); 00051 void FormInput(); 00052 void CreateHeader(); 00053 void GenerateDocument(); 00054 00055 Database &GetDatabase() { return m_db; } 00056 void SetTheCookie(); 00057 00058 /* 00059 cookie = 00060 <usernum> : <valid> : <forum> : <thread> : <page> : <index> : <qty> 00061 */ 00062 long GetUsernum() { return m_usernum; } 00063 void SetUsernum(long x) { if (x != m_usernum) m_bSetCookie = true; m_usernum = x; } 00064 long GetValid() { return m_valid; } 00065 void SetValid(long x) { if (x != m_valid) m_bSetCookie = true; m_valid = x; } 00066 long GetForum() { return m_forum; } 00067 void SetForum(long x) { if (x != m_forum) m_bSetCookie = true; m_forum = x; } 00068 long GetThread() { return m_thread; } 00069 void SetThread(long x) { if (x != m_thread) m_bSetCookie = true; m_thread = x; } 00070 long GetPage() { return m_page; } 00071 void SetPage(long x) { if (x != m_page) m_bSetCookie = true; m_page = x; } 00072 long GetIndex() { return m_index; } 00073 void SetIndex(long x) { if (x != m_index) m_bSetCookie = true; m_index = x; } 00074 long GetQty() { return m_qty; } 00075 void SetQty(long x) { if (x != m_qty) m_bSetCookie = true; m_qty = x; } 00076 long GetMessage() { return m_message; } 00077 void SetMessage(long x) { if (x != m_message) m_bSetCookie = true; m_message = x; } 00078 00079 private: 00080 Database m_db; 00081 SysLog m_log; 00082 bool m_bSetCookie; 00083 long m_image; 00084 db::Image *m_pImage; 00085 bool m_image_tn; 00086 bool m_not_modified; 00087 std::string m_cookie_to_set; 00088 // 00089 AccountForm m_form1; 00090 SettingsForm m_form2; 00091 ForumsForm m_form3; 00092 ThreadListForm m_form4; 00093 ViewThreadForm m_form5; 00094 NewThreadForm m_form6; 00095 NewMessageForm m_form7; 00096 EditMessageForm m_form8; 00097 // 00098 long m_usernum; 00099 long m_valid; 00100 long m_forum; 00101 long m_thread; 00102 long m_page; 00103 long m_index; 00104 long m_qty; 00105 long m_message; 00106 00107 }; 00108 00109 00110 00111 00112 #endif // _IWEB_H

Generated on Sat Feb 12 00:14:56 2005 for IBank by doxygen 1.3.7