declare
userid web_site.userid%type;
id web_site.id%type;
cursor site is select id,userid from web_site;
begin
open site;
loop
fetch site into id,userid;
exit when site%notfound;
insert into web_model (id,userid,siteid,name,type,codeheadleft,
codeheadright,code,codeedit,codeweb,model,bgcolor,style)
values(id+1,userid,id,'搜索','网站默认','','','','搜索结果列表',
'',
'','','0');
insert into web_page (id,userid,siteid,model,fathernode,fathernodename,name,title,
keywords,introduction,bgcolor,postercode,code,style,isshow,isshowimghead,isshownavigation,
isshowfooter,pagetype) values (id+2,userid,id,'2','0','','搜索结果','搜索结果','搜索结果',
'','','-1,-1,-1','widget-place-1=|widget-place-2=widget-'||(id+1),'0','0','1','1','1','1');
end loop;
close site;
end;
,
