My Forum source code (i)

Source: Internet
Author: User
Tags expression mysql
In fact, the time to write this code is only nearly three days, beforehand is not after detailed thinking and planning (can say a little plan is not) that day think of doing a forum to try, and then do it, and I have been contacted for nearly one months of PHP, has not really written the program and other things, In writing this code of two days and a half time, there are several times encountered difficulties, want to give up, but I still wrote out, and did not think incredibly can use, so the middle may have a lot of hidden trouble also can not say, although said to be used.
In two days, I'm going to work, there is no time to examine the code carefully from beginning to end, which is one of the reasons I put it up, and another reason is that because I want everyone to take a look at these characters, I'm just a rookie, there may be a lot of shortcuts, there may be many places wrong, And in the last two days I changed some of the pages of the code, but other related code has not been removed, so some places a bit more repeated. But it can operate normally, this is affirmative (at least on the surface normal, I win98/apache/php/mysql under the use of no problem, online testing is no problem, other circumstances do not know. I only hope that the rookie like me, or more than my rookie can get something, and those veteran and predecessors can write or message to point out the middle of shortcomings or deficiencies, I will be more happy. Because of that, I can learn a lot from it. My email address is: hllinyu@netease.com,oicq:2289230, home page address is: http://lfox.oso.com.cn
Okay, nonsense to say too much, I hope you can put into the work to modify this forum source code, let it become a free forum for the Chinese to develop their own, so that the Forum code to become a lot of like me to PHP is interested in and feel that the friends who have no way to do it. Let's look at my forum!
First of all, we will use two tables to store the information of the Foxbbs and store the information of the user Useinfo, because the data space is not very large, so chose the mysql+txt way to do, all topics except content are stored in MySQL, The topic content and reply content of the relatively large amount of data are stored separately with the extension. Fox and. BBS txt format file, in the table and add a file name of the field on the line, in order to avoid file name Repeat, take the current system time to do file name, such as January 2, 2001 11:20 30 seconds sent a post, file name is 20010102112030.txt I think this can meet most of the Please, because there may not be a few forums will be hot to every second there are two or more new posts appear bar! Oh......
The specific situation of this forum can be seen http://lfox.oso.com.cn/foxbbs/foxbbs.php, in addition to the main page http://lfox.oso.com.cn/index.php on the source package download, read the source code can not be disruptive oh.

Useinfo User Information table
0 usename varchar (8) NOT NULL user name
1 Usepass varchar (8) NOT NULL password
2 Useni varchar () NOT NULL nickname
3 Useoicq varchar (a) NOT NULL
4 Usesex Int (1) NOT NULL user gender
5 useage Int (2) NOT NULL user age
6 Usezy varchar (4) NOT NULL occupation
7 useaddr varchar () NOT NULL address
8 Usemail varchar NOT NULL mailbox
9 Useweb varchar NOT NULL home
USEQM varchar (+) NOT NULL signature
One useattr int (1) Not NULL property 1 User 2 Moderator 3 Admin 4 Webmaster
Useinf Int (1) Not NULL exposes information 1 No 2 is
Useid Int (5) Not auto_increment primary key user ID number
USEBQ Int (1) NOT NULL expression
RegDate datetime; Registration time
EndDate varchar () NOT NULL last arrival time
Ftnum Int (4) Not null number of posts
Usety char (1) NOT NULL


Foxbbs Forum Theme Table
0 ID Int (5) Not auto_increment primary key
1 usename varchar not posting user name
2 Ftbq Int (1) Not expression
3 title varchar (+) not subject
4 ftdate varchar not posting time
5 mesname varchar Not content file name 20010102055635 I have more than one, in case of accidents, in fact, 14 is enough.
6 Djnum Int (4) Not clickable number
7 Hfnum Int (3) not back plural
8 hfdate varchar not last reply time
9 Hfname varchar () not reply file name
Hfusename varchar Last reply to person name
IP varchar (15)
Lockes int 1

linkfox.inc.php Connection Database with
?
$dbhostname = "Lfox";
$dbusername = "root";
$dbpassword = "root";
$dbName = "Flyfox";
Mysql_connect ($dbhostname, $dbusername, $dbpassword) or DIE ("Unable to CONNECT to database");
@mysql_select_db ("$dbName") or Die ("Unable to select database");
?>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.