<?php
/////////////////////////////////////////////////////////////////////////////
Mini Alumni (Http://www.piscdong.com/?m=mini_class)
//
(c) Piscdong Studio (http://www.piscdong.com/)
//
The program is completely free, please keep this code.
Do not sell this program or its modified version, do not use this program or its modified version of any commercial activities.
/////////////////////////////////////////////////////////////////////////////
Require_once (' inc.php ');
if (!file_exists ($l _file)) {
Echo Getstop (2);
if ($_server[' Request_method ']== ' POST ' && $_post[' title ']!= ' && $_post[' username ']!= ') ' && $_ post[' name ']!= ' && $_post[' password ']!= ') {
Require_once ($c _file);
Echo ' <div class= "title" > Install MySQL database </div><div class= "Gcontent" ><ul>;
$query = "CREATE TABLE {$dbprefix}main (
ID Int (a) not NULL auto_increment,
Title varchar (255) Not NULL,
School varchar (255) Default NULL,
ClassName varchar (255) Default NULL,
Open int (5) Not NULL default ' 0 ',
Openreg Int (5) Not NULL default ' 0 ',
GID varchar (255) Default ' 1|2|3 ',
Content text,
email int (5) Not NULL default ' 0 ',
pagesize Int (a) not NULL default ' 20 ',
Upload int (5) Not NULL default ' 0 ',
maxsize Int (a) not NULL default ' 0 ',
filetype varchar (255) default ' JPG ',
Thum Int (5) Not NULL default ' 0 ',
slink Int (5) Not NULL default ' 0 ',
Veri Int (5) Not NULL default ' 0 ',
ICP varchar (255) Default NULL,
Skin Int (a) not NULL default ' 0 ',
Timefix varchar (255) Not NULL default ' 0 ',
IP varchar (255) Default NULL,
UNIQUE KEY ID (ID)
) ". (CHKSQLV ()? " Engine=myisam DEFAULT charset=gb2312 ': ' Type=myisam ');
$result =mysql_query ($query);
Echo ' <li> set data table '. $dbprefix. ' Main:<span style= ' font-weight:bold;color:# '. ($result ==true? " 036; " > Success ': ' F00; ' > Failure '). ' </span></li> ';
Unset ($query);
Unset ($result);
$query = "CREATE TABLE {$dbprefix}member (
ID Int (a) not NULL auto_increment,
Username varchar (255) Not NULL,
Password varchar (255) Not NULL,
Name varchar (255) Not NULL,
status int (5) Not NULL default ' 0 ',
Power Int (5) is not NULL default ' 0 ',
regdate int () not NULL default ' 0 ',
Visit int (a) not NULL default ' 0 ',
visitdate int () not NULL default ' 0 ',
Question varchar (255) Default NULL,
Answer varchar (255) Default NULL,
Email varchar (255) Default NULL,
gender int (5) Not NULL default ' 0 ',
bir_y Int (4) Not NULL default ' 0 ',
bir_m Int (2) not NULL default ' 0 ',
Bir_d Int (2) not NULL default ' 0 ',
Address varchar (255) Default NULL,
Location varchar (255) Default NULL,
URL varchar (255) Default NULL,
Work varchar (255) Default NULL,
Phone varchar (255) Default NULL,
Tel varchar (255) Default NULL,
QQ varchar (255) Default NULL,
MSN varchar (255) Default NULL,
Gtalk varchar (255) Default NULL,
GID Int (5) Not NULL default ' 0 ',
RelA varchar (255) Default NULL,
Photo varchar (255) Default NULL,
Pupload Int (5) Not NULL default ' 0 ',
UNIQUE KEY ID (ID)
) ". (CHKSQLV ()? " Engine=myisam DEFAULT charset=gb2312 ': ' Type=myisam ');
$result =mysql_query ($query);
Echo ' <li> set data table '. $dbprefix. ' Member:<span style= ' font-weight:bold;color:# '. ($result ==true? " 036; " > Success ': ' F00; ' > Failure '). ' </span></li> ';
Unset ($query);
Unset ($result);
$query = "CREATE TABLE {$dbprefix}online (
aid Int (a) not NULL default ' 0 ',
datetime int () not NULL default ' 0 ',
Online int (5) Not NULL default ' 1 ',
IP char default NULL,
UNIQUE KEY Aid (AID)
) ". (CHKSQLV ()? " Engine=memory DEFAULT charset=gb2312 ': ' Type=heap ');
$result =mysql_query ($query);
Echo ' <li> set data table '. $dbprefix. ' Online:<span style= ' font-weight:bold;color:# '. ($result ==true? " 036; " > Success ': ' F00; ' > Failure '). ' </span></li> ';
Unset ($query);
Unset ($result);
$query = "CREATE TABLE {$dbprefix}topic (
ID Int (a) not NULL auto_increment,
Content text not NULL,
aid Int (a) not NULL default ' 0 ',
datetime int () not NULL default ' 0 ',
Sticky Int (5) Not NULL default ' 0 ',
Sid Int (a) not NULL default ' 0 ',
Tid int (5) Not NULL default ' 0 ',
Mid int (5) Not NULL default ' 0 ',
Disp INT (5) Not NULL default ' 0 ',
' Lock ' int (5) Not NULL default ' 0 ',
RID Int (a) not NULL default ' 0 ',
Lasttime int () not NULL default ' 0 ',
UNIQUE KEY ID (ID)
) ". (CHKSQLV ()? " Engine=myisam DEFAULT charset=gb2312 ': ' Type=myisam ');
$result =mysql_query ($query);
Echo ' <li> set data table '. $dbprefix. ' Topic:<span style= ' font-weight:bold;color:# '. ($result ==true? " 036; " > Success ': ' F00; ' > Failure '). ' </span></li> ';
Unset ($query);
Unset ($result);
$query = "CREATE TABLE {$dbprefix}vote (
id int () not NULL auto_increment,
& Nbsp;aid Int (a) NOT null default ' 0 ',
tid Int (TEN) NOT null default ' 0 ',
vid Int (a) not N ull default ' 0 ',
datetime int () not NULL default ' 0 ',
unique KEY ID (ID)
&NBSP;&NBSP ;) ". (CHKSQLV ()? " Engine=myisam DEFAULT charset=gb2312 ': ' Type=myisam ');
$result =mysql_query ($query);
echo ' <li> set up data table '. $dbprefix. ' Vote:<span style= ' font-weight:bold;color:# '. ($result ==true? " 036; " > Success ': ' F00; ' > Failure '). ' </span></li> ';
unset ($query);
unset ($result);
$query = "CREATE TABLE {$dbprefix}photo (
id int () not NULL auto_increment,
& Nbsp;url text NOT NULL,
title varchar (255) default NULL,
aid Int (a) NOT null default ' 0 ',
cid Int (a) NOT null default ' 0 ',
datetime Int (a) NOT null default ' 0 ',
Upload int (5) NOT null default ' 0 ',
disp Int (5) is not null default ' 0 ',
vid Int (5) is not NULL Default ' 0 ',
unique KEY ID (ID)
). ( CHKSQLV ()? ' Engine=myisam DEFAULT charset=gb2312 ': ' Type=myisam ');
$result =mysql_query ($query);
echo ' <li> set up data table '. $dbprefix. ' Photo:<span style= ' font-weight:bold;color:# '. ($result ==true? " 036; " > Success ': ' F00; ' > Failure '). ' </span></li> ';
unset ($query);
unset ($result);
$query = "CREATE TABLE {$dbprefix}pcomment (
id int () not NULL auto_increment,
aid Int (a) NOT null default ' 0 ',
pid Int (a) NOT null default ' 0 ',
disp Int (5 Not null default ' 0 ',
datetime int is not null default ' 0 ',
content text is not NULL,
unique KEY ID (ID)
). (CHKSQLV ()? " Engine=myisam DEFAULT charset=gb2312 ': ' Type=myisam ');
$result =mysql_query ($query);
echo ' <li> set up data table '. $dbprefix. ' Pcomment:<span style= ' font-weight:bold;color:# '. ($result ==true? " 036; " > Success ': ' F00; ' > Failure '). ' </span></li> ';
unset ($query);
unset ($result);
$query = "CREATE TABLE {$dbprefix}camp (
id int () not NULL auto_increment,
& Nbsp;title varchar (255) NOT NULL,
aid Int (a) NOT null default ' 0 ',
sticky Int (5) is not NULL Default ' 0 ',
closed Int (5) NOT null default ' 0 ',
disp Int (5) is not null default ' 0 ',
&N Bsp; datetime int () not NULL default ' 0 ',
cdate varchar (255) Default NULL,
cloc VA Rchar (255) default NULL,
cpay varchar (255) default NULL,
content text,
UNIQUE KEY ID (ID)
). (CHKSQLV ()? " Engine=myisam DEFAULT charset=gb2312 ': ' Type=myisam ');
$result =mysql_query ($query);
echo ' <li> set up data table '. $dbprefix. ' Camp:<span style= ' font-weight:bold;color:# '. ($result ==true? " 036; " > Success ': ' F00; ' > Failure '). ' </span></li> ';
unset ($query);
unset ($result);
$query = "CREATE TABLE {$dbprefix}ccomment (
id int () not NULL auto_increment,
aid Int (a) NOT null default ' 0 ',
cid Int (a) NOT null default ' 0 ',
sid Int (10 Not null default ' 0 ',
disp Int (5) is not null default ' 0 ',
datetime int is not NULL Defaul T ' 0 ',
content text,
unique KEY ID (ID)
). ( CHKSQLV ()? ' Engine=myisam DEFAULT charset=gb2312 ': ' Type=myisam ');
$result =mysql_query ($query);
echo ' <li> set up data table '. $dbprefix. ' Ccomment:<span style= ' font-weight:bold;color:# '. ($result ==true? " 036; " > Success ': ' F00; ' > Failure '). ' </span></li> ';
unset ($query);
unset ($result);
$query = "CREATE TABLE {$dbprefix}cuser (
id int () not NULL auto_increment,
& Nbsp;aid Int (a) NOT null default ' 0 ',
cid Int (TEN) NOT null default ' 0 ',
tid Int (a) not N ull default ' 1 ',
datetime int () not NULL default ' 0 ',
unique KEY ID (ID)
&NBSP;&NBSP ;) ". (CHKSQLV ()? " Engine=myisam DEFAULT charset=gb2312 ': ' Type=myisam ');
$result =mysql_query ($query);
echo ' <li> set up data table '. $dbprefix. ' Cuser:<span style= ' font-weight:bold;color:# '. ($result ==true? " 036; " > Success ': ' F00; ' > Failure '). ' </span></li> ';
unset ($query);
unset ($result);
$query = "CREATE TABLE {$dbprefix}message (
id int () not NULL auto_increment,
aid Int (a) NOT null default ' 0 ',
tid Int (TEN) NOT null default ' 0 ',
datetime Int (15) Not null default ' 0 ',
readed Int (5) is not null default ' 0 ',
content text is not NULL,
&nbs P; unique KEY ID (ID)
). (CHKSQLV ()? " Engine=myisam DEFAULT charset=gb2312 ': ' Type=myisam ');
$result =mysql_query ($query);
echo ' <li> set up data table '. $dbprefix. ' Message:<span style= ' font-weight:bold;color:# '. ($result ==true? " 036; " > Success ': ' F00; ' > Failure '). ' </span></li> ';
unset ($query);
unset ($result);
$query = "CREATE TABLE {$dbprefix}adminop (
id int () not NULL auto_increment,
aid Int (a) NOT null default ' 0 ',
sid Int (TEN) NOT null default ' 0 ',
tid Int (5) Not N ull default ' 0 ',
datetime int () NOT null default ' 0 ',
content text is not NULL,
& nbsp UNIQUE KEY ID (ID)
). (CHKSQLV ()? " Engine=myisam DEFAULT charset=gb2312 ': ' Type=myisam ');
$result =mysql_query ($query);
echo ' <li> set up data table '. $dbprefix. ' Adminop:<span style= ' font-weight:bold;color:# '. ($result ==true? " 036; " > Success ': ' F00; ' > Failure '). ' </span></li> ';
unset ($query);
unset ($result);
$query = "CREATE TABLE {$dbprefix}link (
id int () not NULL auto_increment,
& Nbsp;title varchar (255) NOT NULL,
url varchar (255) NOT NULL,
thread Int (a) NOT null Defau Lt ' 0 ',
unique KEY ID (ID)
. ( CHKSQLV ()? ' Engine=myisam DEFAULT charset=gb2312 ': ' Type=myisam ');
$result =mysql_query ($query);
echo ' <li> set up data table '. $dbprefix. ' Link:<span style= ' font-weight:bold;color:# '. ($result ==true? " 036; " > Success ': ' F00; ' > Failure '). ' </span></li> ';
unset ($query);
unset ($result);
$query = "CREATE TABLE {$dbprefix}skin (
id int () not NULL auto_increment,
& Nbsp;path varchar (255) NOT NULL,
title varchar (255) Default NULL,
sfile varchar (255) not NULL,
unique KEY ID (ID)
). ( CHKSQLV ()? ' Engine=myisam DEFAULT charset=gb2312 ': ' Type=myisam ');
$result =mysql_query ($query);
echo ' <li> set up data table '. $dbprefix. ' Skin:<span style= ' font-weight:bold;color:# '. ($result ==true? " 036; " > Success ': ' F00; ' > Failure '). ' </span></li> ';
unset ($query);
unset ($result);
$title =htmlspecialchars (Trim ($_post[' title ')), ent_quotes);
$query =sprintf (' insert into%s (title) values (%s) ', $dbprefix. ' Main ',
SqlString ($title, ' text '));
$result =mysql_query ($query);
echo ' <li> write new data '. $dbprefix. ' Main:<span style= ' font-weight:bold;color:# '. ($result ==true? " 036; " > Success ': ' F00; ' > Failure '). ' </span></li> ';
unset ($query);
unset ($result);
$username =trim ($_post[' username '));
$password =enc_p (Trim ($_post[' password '));
$name =htmlspecialchars (Trim ($_post[' name ')), ent_quotes);
$query =sprintf (' insert into%s (username, password, name, power, RegDate) values (%s,%s,%s, 9,%s) ", $dbprefix. ' member ',
SqlString ($username, ' text '),
SqlString ($password, ' text '),
SqlString ($name, ' text '),
Time ());
$result =mysql_query ($query);
Echo ' <li> write new data '. $dbprefix. ' Member:<span style= ' font-weight:bold;color:# '. ($result ==true? " 036; " > Success ': ' F00; ' > Failure '). ' </span></li> ';
Unset ($query);
Unset ($result);
$query =sprintf (' insert into%s (path, title, Sfile) values (%s,%s,%s) ', $dbprefix. ' Skin ',
SqlString (' Blue ', ' text '),
SqlString (' Blue Dream ', ' text '),
SqlString (' styles.css ', ' text '));
$result =mysql_query ($query);
Echo ' <li> write new data '. $dbprefix. ' Skin:<span style= ' font-weight:bold;color:# '. ($result ==true? " 036; " > Success ': ' F00; ' > Failure '). ' </span></li> ';
Unset ($query);
Unset ($result);
Echo ' </ul><input type= "button" value= "complete" class= "button" onclick= "location.href=". /';" /></div> ';
WRITETEXT ($l _file,time ());
}else{
?>
<div class= "title" > Step 2nd: Configuration information </div>
<div class= "Lcontent" >
<form method= "POST" onsubmit= "if" (document.form1.title.value== ' | | document.form1.username.value== ' | | document.form1.password.value== ' ' | | document.form1.name.value== ') {alert (' Please enter configuration information. '); return false;} else if (document.form1.password.value!= ' && document.form1.password.value!= Document.form1.password2.value) {alert (' Please confirm password. '); return false;} " Name= "Form1" >
<div class= "formline" ><label for= "Formtitle" > Title: </label><input name= "title" Id= "Formtitle" Size= "/></div>"
<div class= "Formline" > Administrator Information </div>
<div class= "formline" ><label for= "Formusername" > Username: </label><input name= "username" Formusername "Size="/></div>
<div class= "formline" ><label for= "FormName" > Name: </label><input name= "name" id= "FormName" size= " "/></div>
<div class= "formline" ><label for= "Formpassword" > Password: </label><input type= "Password" Password "id=" Formpassword "size="/></div>
<div class= "formline" ><label for= "Formpassword2" > Confirmation: </label><input type= "Password" Password2 "id=" Formpassword2 "size="/></div>
<div class= "formline" ><input type= "Submit" value= "Next" id= "Formsubmit" class= "button"/> <input "type=" Reset "value=" reset "class=" button "/></div>
</form>
</div>
<?php
}
Echo Getsfoot ();
}else{
Header (' Location:. /');
}
?>