00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _CGI_BASEFORM_H
00020 #define _CGI_BASEFORM_H
00021
00022
00023 namespace cgi
00024 {
00025
00026
00027 enum {
00028 VALUE_WHATEVER = 0,
00029 VALUE_IS_MOB,
00030 VALUE_IS_OBJ,
00031 VALUE_IS_ROOM,
00032 VALUE_IS_ZONE
00033 };
00034
00035
00036 class BaseForm : public WebForm
00037 {
00038 public:
00039 BaseForm(Web *,const string &);
00040 virtual ~BaseForm();
00041
00042 Database *GetDatabase();
00043 long GetStart();
00044 long GetAntal();
00045 long GetZone();
00046 long GetRace();
00047 long GetClass();
00048 long GetObjtype();
00049 long GetMaterial();
00050
00051 char *htmlcolor(const string &);
00052 char *nocolor(const string &);
00053 void textarea(const string &,const string &,const string &,bool = false);
00054 long asciiconvert(const string &);
00055 void inputnum(const string &,const string &,long,int = VALUE_WHATEVER);
00056 void SetColor(const string &str) { m_strColor = str; }
00057 void inputselect(Query &,const string &,const string &,const string &,long,bool = false);
00058 void inputstr(const string &,const string &,int size,const string &,bool = false);
00059 void inputsubmit(const string &);
00060 void inputbit(Query &q,const string &title,const string &name,const string &query,long flags,int brk,bool radio = false);
00061 void inputdie(const string &title,const string &name,long,long);
00062 void inputcheck(const string &title,const string &name,bool);
00063 void ShowMob(db::Mob &,bool = false,bool = false);
00064 void ShowObj(db::Obj &,bool = false,bool = false);
00065 void ShowRoom(db::Room &,bool = false,bool = false,bool = false);
00066 void ShowZone(db::Zone &,bool = false,bool = false);
00067 void ShowVirtual(db::Vzone &,bool = false,bool = false,bool = false);
00068 void ShowRace(db::Race &,bool = false,bool = false);
00069 void ShowWeapon(db::Weapon &,bool = false,bool = false);
00070 void ShowSkill(db::Skill &,bool = false,bool = false);
00071 void ShowResource(db::Resource &,bool = false,bool = false);
00072
00073 long EditingZone();
00074 long AddPic(long,const string &);
00075
00076 private:
00077 string m_strColor;
00078 };
00079
00080
00081 }
00082
00083
00084 #endif // _CGI_BASEFORM_H
00085