5. Layout module Design
The so-called classification, more for the Telnet server to consider, in cq66 mode, users can press
According to their own will to classify, anyway, the final is directly to the basic unit to access the version.
For the access to the layout article, when storing the entire article as a parameter, the block of the article by this layer
Complete, if the upper layer is transmitted in blocks, then all the upper layers are passed, combined, and then transferred to this layer
decomposition; When reading, this layer is accessed in blocks, if the upper level is to be accessed in full-text units
, the upper level does the merger work, this layer regardless.
As to whether to separate out the index, does not affect the operation of the upper layer, the main and lower database constructs have
The main consideration is the feasibility, efficiency needs and so on.
Where do the checks for permissions take place? Or put it on the upper level, in fact Telnet server side,
And cq66 's client, will not give the general user to display special instructions menu, of course, the user can
To send cq66 instructions directly, the server is still checking. But there should be no work under it.
Can you check the module layer again?
。 Class Boardmanage {
Private
Public
Operations on classifications
int getclassnameinfo (int maxclass, char **classid,
char * * classname);
Returns the classified information in English and Chinese names.
int getboardname (int maxboards, char *classid,
Char **boardname);
Returns the layout information in a category, general classification, direct Select.
From Sboard
where Boardclass = = .... Special classification check the corresponding table ....
Modify the privileges required by the layout administrator above
int Newclass (char * newclassname, int type);
New classification, general classification or special classification,
int Deleteclass (char *newclassname);
Delete classification, but not cascade, that this layer is not responsible for consistency, the upper level is responsible for the
The corresponding layout of the classification information changed to another. Category renaming is also first deleted and then built,
int Addclassboard (const char *classname, char *newboardname);
The established version is added to a category, specifically for special classifications, for general classification,
The effect is like Modifyboardinfo,
int Deleteclassboard (const char *classname, char *boardname);
Remove a version from the classification, also for the special classification, the general classification, the effect is also
Is the same as Modifyboardinfo, a version of the classification properties can be empty, that is not a
In any category.
Information about the version of the operation.
int Newboard (const char *boardid,char *boardname);
Create a new version to create the corresponding table. The other parameters take the default values.
int Deleteboard (const char *boardid);
Delete a version and delete the corresponding table.
int getboardinfo (const char *boardid, Char *boardname,
int& numposts, Char *masters, Char *class,
Long &level);
Information about the layout you are taking.
int Modifyboardid (const char *oldid, char *newid);
Change the English ID of the version, the name of the table will also be changed,
int modifyboardinfo (const char *boardid, Char *boardname,
int numposts, char *masters, Char *class,
Long level);
You need privileges to modify the layout information.
Action on the layout article.
int AddText (char *boardid, Char *title, Char *writer,
Char *text);
Add an article to the canvas and split the long article into 2k blocks.
int DeleteText (char *boardid, int num);
Delete the article, just make a mark, do not immediately modify the corresponding table.
int flushtable (char *boardid);
Refresh the layout to delete the corresponding record of the deleted article.
int Marktext (char *boardid, int num, char mark);
Make a mark on the article.
int Modifytitle (char *boardid, int num, char *newtitle);
Modify the title of the article.
int Modifytext (char *boardid, int num, char *newtext);
Modify the content of the article, not your own articles need privileges.
int gettextinfo (const char *boardid, int num, char *title,
Char *writer, char& mark);
Gets the title information of the article.
int GetText (const char *boardid, int num, int block,
Char *text);
Reads the contents of the article, in blocks.
Search for articles and authors
Return all the results of a query at once?
int querywriter (const char *boardid, Char *writer,
Char **result);
Query the layout of an author's article.
int querytitle (const char *boardid, Char *title,
Char **result);
On the query canvas, the title contains the article with the specified content.
}
The transfer of parameters is a rather annoying thing, from an abstract point of view, the data that you want to return
The underlying is irrelevant, so it should be handled, but from an efficiency standpoint, you don't want the data to be repeated
Copy, on the other hand, the application of the space is released, whether it is completed in the upper level or in this layer
It? Accidentally, it is easy to have memory errors.
The above describes the bbs.5isotoi5.org based on the MySQL BBS design (iv), including the bbs.5isotoi5.org aspects of the content, I hope that the PHP tutorial interested in a friend helpful.