'update 1.0 to 1.1
alter table AllPath add UpdateTime datetime
alter table config add outlinkimg varchar(100)
alter table reg add clickcount integer
alter table config add bottom text,usechinese varchar(1)
update allpath set UpdateTime=LastTime where UpdateTime is null
update reg set clickcount=0 where clickcount is null
update reg set usize=0 where usize is null
'update 1.1 to 2.0
alter table config add zipday varchar(50),water varchar(255),maxheight integer,maxwidth integer
alter table [level] add limit1 varchar(1),limit2 varchar(1),limit3 varchar(1)
update config set zipday='3',water='5`0``5`Arial`12`#0000FF``False`此处输入水印文字' where zipday is null
update [level] set limit2='1' where limit2 is null
update allpath set updatetime=lasttime where updatetime is null
update reg set uplogin=regdate where uplogin is null
CREATE TABLE album_tag (id int IDENTITY (1,1) NOT null,albumid integer,tagid integer)
CREATE TABLE photo_tag (id int IDENTITY (1,1) NOT null,photoid integer,tagid integer)
CREATE TABLE tags (id int IDENTITY (1,1) NOT null,tag varchar(50),acount integer,pcount integer)
CREATE TABLE photo_exif (id int IDENTITY (1,1) NOT null,PhotoID integer,Ex_ImageWidth varchar(50),Ex_ImageHeight varchar(50),Ex_XResolution varchar(50),Ex_YResolution varchar(50),Ex_EquipmentMake varchar(50),Ex_CameraModel varchar(50),Ex_Flash varchar(50),Ex_FocalLength varchar(50),Ex_FNumber varchar(50),Ex_ExposureTime varchar(50),Ex_ISOSpeed varchar(50),Ex_ExposureProg varchar(50),Ex_DatePictureTaken varchar(50),Ex_ExposureBias varchar(50),Ex_MeteringMode varchar(50))
alter table allpath add mark varchar(1),jb varchar(1),[Order] integer,M_order varchar(50)
update allpath set mark='1' where mark is null
update config set maxheight=0,maxwidth=0 where maxheight is null
CREATE TABLE template (id int IDENTITY (1,1) NOT null,[label] varchar(50),[note] varchar(255),para varchar(255),content text,type varchar(2))
alter table shorturl add code varchar(255)
alter table config add team varchar(50),outteam varchar(1),webdiskzh varchar(1),webdiskurl varchar(255),webdiskcode varchar(50),banksubmit2 varchar(1),billcode varchar(50),billmd5 varchar(50),midthumb varchar(1)
update config set banksubmit2='0',midthumb='1' where banksubmit2 is null
Select count(id) as tcount From template
*insert into template ([label],[note],para,content,type) values ('albumlist','相册列表','0,0,25,10,,1,,1,0,,1','<div class=album title={$note}><div align=center style=""WIDTH: 120px;HEIGHT: 100px""><a href=Photo.aspx?albumid={$id}><img src={$face} border=0></div><div class=title><a href=Photo.aspx?albumid={$id}>{$albumname}</a><br>用户：<a href=myspace.aspx?username={$username} target=_blank>{$username}</a><br>照片：[{$photocount}张]<br>添加时间：{$lasttime}<br></div></div>','1')
*insert into template ([label],[note],para,content,type) values ('photolist','照片列表','0,0,25,10,,1,,1,,1','<div class=photo title={$note}><div class=pic align=center><div align=center style=""WIDTH: 120px;  ; HEIGHT: 100px""><a href=MySpace_Detail.aspx?PhotoID={$id} target=_blank><img src={$url1} border=0></a></div></div><div class=title><a href=MySpace_Detail.aspx?PhotoID={$id} target=_blank>{$photoname}</a><br>用户：<a href=myspace.aspx?username={$username} target=_blank>{$username}</a><br>评论:{$commentcount}<br>点击：{$count}<br>上传时间：{$time}</div></div>','2')
*insert into template ([label],[note],para,content,type) values ('userlist','用户列表','uplogin|Desc,,1,25,,0','<div class=kind><div align=center style=""WIDTH: 120px;  ; HEIGHT: 100px""><a href=myspace.aspx?username={$username} target=_blank><img src={$face} border=0></a></div><div class=title><a href=myspace.aspx?username={$username} target=_blank>{$username}</a><br></div></div>','3')
*insert into template ([label],[note],para,content,type) values ('commlist','评论列表','0,10,,1','<div class=album title={$note}><div align=center style=""WIDTH: 120px;HEIGHT: 100px""><a href=Photo.aspx?albumid={$id}><img src={$face} border=0></div><div class=title><a href=Photo.aspx?albumid={$id}>{$albumname}</a><br>用户：<a href=myspace.aspx?username={$username} target=_blank>{$username}</a><br>照片：[{$photocount}张]<br>添加时间：{$lasttime}<br></div></div>','4')
*insert into template ([label],[note],para,content,type) values ('kindlist','类别列表',',1','<div class=kind><div align=center style=""WIDTH: 120px;HEIGHT: 100px""><a href=album.aspx?kind={$id}><img src={$face} border=0></a></div><div class=title><a href=album.aspx?kind={$id}>{$kind}</a><br></div></div>','6')
*insert into template ([label],[note],para,content,type) values ('page','分页','currpage,page,10','总共记录数：{$recordcount}&nbsp;&nbsp;页码：{$pagelist}&nbsp;&nbsp;<a href={$firstpage}>第一页</a>&nbsp;&nbsp;<a href={$priorpage}>上一页</a>&nbsp;&nbsp;<a href={$nextpage}>下一页</a>&nbsp;&nbsp;<a href={$lastpage}>最末页</a>&nbsp;&nbsp;第&nbsp;{$currpage}&nbsp;页/共&nbsp;{$countpage}&nbsp;页','5')
*insert into template ([label],[note],para,content,type) values ('albumindex','首页相册列表','Photocount|Desc,4,4,10,,0,,0,1,,0,0','<DIV><A href=Photo.aspx?albumid={$id}><img src={$face} width=75 height=75 border=0></A><A href=Photo.aspx?albumid={$id}>{$albumname}</A><BR><SPAN class=txt12Black>{$photocount} 张图 </SPAN>|<A href=myspace.aspx?username={$username} target=_blank>{$username}</A> <BR><SPAN class=txt12Black>{$note}</SPAN></DIV>','1')
*insert into template ([label],[note],para,content,type) values ('photoindex','首页照片列表','Click|Desc,4,4,10,,0,,0,,0,0','<DIV><A href=MySpace_Detail.aspx?photoid={$id} target=_blank><IMG src={$url1} border=0></A><BR><SPAN class=txt12Black>{$photoname}</SPAN></DIV>','2')
*insert into template ([label],[note],para,content,type) values ('usertop','推荐用户','clickcount|DESC,,0,3,,1','<DIV style=""height:80px""><A href={$outurl} target=_blank><IMG src={$face} border=0></A><A href={$outurl} target=_blank>{$username}</A><BR>相册数:{$albumcount}<BR>照片数:{$photocount}<BR>访问人数:{$clickcount}<BR><BR><BR></DIV>','3')
*insert into template ([label],[note],para,content,type) values ('tags','标签列表','Pcount|Desc','<a href=photo.aspx?tag={$tag}>{$tag}</a>&nbsp;[{$count}]&nbsp;','7')
*insert into template ([label],[note],para,content,type) values ('facelist','大头贴列表','0,0,10,10,,0','<div class=photo title={$photoname}><div class=pic align=center><div align=center style=""WIDTH: 120px;HEIGHT: 100px""><a href=MySpace_Detail.aspx?PhotoID={$id} target=_blank><img src={$url1} border=0></a></div></div><div class=title><a href=MySpace_Detail.aspx?PhotoID={$id} target=_blank>{$photoname}</a><br>用户：<a href=myspace.aspx?username={$username} target=_blank>{$username}</a><br>评论:{$commentcount}<br>点击：{$count}<br>上传时间：{$time}</div></div>','8')

'update 2.0 to 2.1
alter table config add tenpaycode varchar(50),tenpaykey varchar(50),usepaylist varchar(20),jf_pay integer

'update 2.1 to 2.2
update reg set allowpl='1' where allowpl is null
alter table config add savenormal varchar(1),allowguestpl varchar(1),jf_upload integer,lysec integer,zhtitle varchar(50),allowly varchar(1),allowpl varchar(1),adv7 varchar(1),whtml varchar(1),wext varchar(10)
update config set jf_upload=0,lysec=0,zhtitle='网络硬盘',savenormal='1',allowguestpl='1',allowly='1',allowpl='1' where lysec is null
alter table team add TeamVirtual varchar(255)
alter table allpath add alt integer
alter table allpath add TeamID integer,limit4 varchar(1)
alter table photo_zip add TeamID integer
alter table reg add spacename varchar(50)
alter table config add picurl varchar(50)
update [level] set limit4='1' where limit4 is null
update config set lysec='0' where lysec is null