00001 /* 00002 Copyright (C) 2003 Anders Hedstrom 00003 00004 This program is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU General Public License 00006 as published by the Free Software Foundation; either version 2 00007 of the License, or (at your option) any later version. 00008 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 GNU General Public License for more details. 00013 00014 You should have received a copy of the GNU General Public License 00015 along with this program; if not, write to the Free Software 00016 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 */ 00018 00019 #ifndef _CGI_WOLFSHADEWEB_H 00020 #define _CGI_WOLFSHADEWEB_H 00021 00022 #include "BaseForm.h" 00023 #include "MobForm.h" 00024 #include "ObjectForm.h" 00025 #include "ZoneForm.h" 00026 #include "RoomForm.h" 00027 #include "VirtualForm.h" 00028 #include "FelForm.h" 00029 #include "RaceForm.h" 00030 #include "WeaponForm.h" 00031 #include "SkillForm.h" 00032 #include "ResourceForm.h" 00033 #include "MapForm.h" 00034 00035 00036 namespace cgi 00037 { 00038 00039 00040 class WolfshadeWeb : public MenuWeb 00041 { 00042 public: 00045 WolfshadeWeb(const string &d, 00046 const string &p); 00047 ~WolfshadeWeb(); 00048 00049 void ReadCookies(); 00050 void FormInput(); 00051 void CreateHeader(); 00052 void GenerateDocument(); 00053 00054 Database *GetDatabase(); 00055 void SetTheCookie(); 00056 00057 long GetStart() { return m_start; } 00058 void SetStart(long x) { m_start = x; m_bSetCookie = true; } 00059 long GetAntal() { return m_antal; } 00060 void SetAntal(long x) { m_antal = x; m_bSetCookie = true; } 00061 long GetZone() { return m_zone; } 00062 void SetZone(long x) { m_zone = x; m_bSetCookie = true; } 00063 long GetRace() { return m_race; } 00064 void SetRace(long x) { m_race = x; m_bSetCookie = true; } 00065 long GetClass() { return m_class; } 00066 void SetClass(long x) { m_class = x; m_bSetCookie = true; } 00067 long GetObjtype() { return m_objtype; } 00068 void SetObjtype(long x) { m_objtype = x; m_bSetCookie = true; } 00069 long GetMaterial() { return m_material; } 00070 void SetMaterial(long x) { m_material = x; m_bSetCookie = true; } 00071 00072 long GetMenuMob() { return m_menuMob; } 00073 long GetMenuObj() { return m_menuObj; } 00074 long GetMenuRoom() { return m_menuRoom; } 00075 long GetMenuZone() { return m_menuZone; } 00076 long GetMenuVirtual() { return m_menuVirtual; } 00077 long GetMenuRace() { return m_menuRace; } 00078 long GetMenuWeapon() { return m_menuWeapon; } 00079 long GetMenuSkill() { return m_menuSkill; } 00080 long GetMenuResource() { return m_menuResource; } 00081 00082 void DisplayStartAntalForm(); 00083 void SetPic(const vector<string> &pic,const string &ext) { m_pic = pic; m_pic_ext = ext; } 00084 00085 private: 00086 Database m_db; 00087 bool m_bSetCookie; 00088 long m_start; 00089 long m_antal; 00090 long m_zone; 00091 long m_race; 00092 long m_class; 00093 long m_objtype; 00094 long m_material; 00095 vector<string> m_pic; 00096 string m_pic_ext; 00097 // 00098 long m_menuMob; 00099 long m_menuObj; 00100 long m_menuRoom; 00101 long m_menuZone; 00102 long m_menuVirtual; 00103 long m_menuRace; 00104 long m_menuWeapon; 00105 long m_menuSkill; 00106 long m_menuResource; 00107 // 00108 MobForm m_form1; 00109 ObjectForm m_form2; 00110 ZoneForm m_form3; 00111 RoomForm m_form4; 00112 VirtualForm m_form5; 00113 FelForm m_form6; 00114 RaceForm m_form7; 00115 WeaponForm m_form8; 00116 SkillForm m_form9; 00117 ResourceForm m_form10; 00118 MapForm m_form11; 00119 }; 00120 00121 00122 } // namespace cgi 00123 00124 00125 #endif // _CGI_WOLFSHADEWEB_H 00126