<!-- #include file="include/admin_onlogin.asp" -->
<!-- #include file="include/jk_template.asp" -->
<%
dim s_id,s_name
admins=true
popedom_num=0
data_name="jk_skin"
index_url="skin"
tit_fir="模板"
tit="标准模板配置"
s_id=trim(request.querystring("s_id"))

call admin_header(0,0)
%>
<tr><td align=center colspan=2 height=30>
  <table border=0>
  <tr>
  <td><a href='admins_config_skin.asp' class=red>标准模板配置</a></td>
  <td width=10></td>
  <td><a href='admins_config_skin_mod.asp'>新闻/文章模板配置</a></td>
  <td width=10></td>
  <td><a href='admins_config_skin.asp?jk_mod=css' >CSS样式文件生成</a></td>
  <td width=10></td>
  <td><a href='admin_data.asp?action=cache'>网站缓存清理</a></td>
  <td width=10></td>
  <td><%call admin_read("","网站模板设置","模板功能可以对您的网站进行个性设计。<br>如果你不是很熟悉此功能，请不要随便修改，最好在我们的辅导下修改。<br><font class=red>如果系统允许用户使用“自选风格”，则请在修改模板后一定要清理网站缓存！</font>")%></td>
  </tr>
  </table>
</td></tr>
</table>
<%
call admin_table(1)

select case jk_mod
case "css"
  call joekoe_chk_css()
case "edit"
  call joekoe_chk_edit()
case "common"
  call joekoe_chk_common()
case "handle"
  call joekoe_chk_handle()
case "inport"
  call joekoe_chk_inport()
case else
  call joekoe_chk_main()
end select

call admin_ender(1)

sub joekoe_chk_css()
  dim s_css
  sql="select top 1 s_css from "&data_name&" where s_dir='"&joekoe_cms.web_skin&"'"
  set rs=joekoe_cms.exec(sql,1)
  if rs.eof then
    rs.close
    call admin_msg("默认的"&tit_fir&"（"&joekoe_cms.web_skin&"）不存在！","?",1)
    exit sub
  end if
  s_css=rs("s_css")
  rs.close
  s_css=replace(s_css,"{$web_skin}",joekoe_cms.web_dir_skin)
  call create_file(joekoe_cms.web_dir_skin&"style.css",s_css)
  call admin_msg("CSS样式文件生成成功！\n\n文件路径："&joekoe_cms.web_dir_skin&"style.css","?",1)
end sub

sub joekoe_chk_edit_format()
  dim s_format_topic,s_format_fk
  if chk() then
    s_format_topic=code_admin("s_format_topic",1,0)
    s_format_fk=code_admin("s_format_fk",1,0)
    if s_format_topic="" or s_format_fk="" then
      call admin_error("请输入 "&tit_fir&"（"&s_name&"） 的 相关信息！")
      exit sub
    end if
    rs("s_format_topic")=s_format_topic
    rs("s_format_fk")=s_format_fk
    rs.update
    call delete_cache_skins()
    call admin_msg("已成功编辑了"&tit_fir&"（"&s_name&"）的 相关信息！",pageurl&action,1)
    exit sub
  end if
  call form_first()
%>
  <form action='<%response.write pageurl&action%>' method=post>
  <input type=hidden name=chk value='yes'>
  <tr>
  <td>格式化.列表主题：<br><br>格式化<%response.write tit_fir%></td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_format_topic id=s_format_topic cols=60 rows=8><%response.write joekoe_cms.code_word(rs("s_format_topic"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_format_topic)"><%call textarea_resize("s_format_topic")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>格式化.图片外框：<br><br>格式化<%response.write tit_fir%></td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_format_fk id=s_format_fk cols=60 rows=8><%response.write joekoe_cms.code_word(rs("s_format_fk"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_format_fk)"><%call textarea_resize("s_format_fk")%></td>
    </tr>
    </table>
  </td>
  </tr>
<%
  call submit_edit()
end sub

sub joekoe_chk_edit_forum()
  dim s_forum_bar,s_forum_data,s_forum_more,s_forum_end,s_forum_board,s_forum_board_base,s_forum_top_bar,s_forum_top,s_forum_list_bar,s_forum_list,s_forum_list_more,s_forum_view_bar,s_forum_view,s_forum_views,s_forum_view_more
  if chk() then
    s_forum_bar=code_admin("s_forum_bar",1,0)
    s_forum_data=code_admin("s_forum_data",1,0)
    s_forum_more=code_admin("s_forum_more",1,0)
    s_forum_end=code_admin("s_forum_end",1,0)
    s_forum_board=code_admin("s_forum_board",1,0)
    s_forum_board_base=code_admin("s_forum_board_base",1,0)
    s_forum_top_bar=code_admin("s_forum_top_bar",1,0)
    s_forum_top=code_admin("s_forum_top",1,0)
    s_forum_list_bar=code_admin("s_forum_list_bar",1,0)
    s_forum_list=code_admin("s_forum_list",1,0)
    s_forum_list_more=code_admin("s_forum_list_more",1,0)
    s_forum_view_bar=code_admin("s_forum_view_bar",1,0)
    s_forum_view=code_admin("s_forum_view",1,0)
    s_forum_views=code_admin("s_forum_views",1,0)
    s_forum_view_more=code_admin("s_forum_view_more",1,0)
    if s_forum_bar="" or s_forum_data="" or s_forum_more="" or s_forum_end="" or s_forum_board="" or s_forum_board_base="" or s_forum_top_bar="" or s_forum_top="" or s_forum_list_bar="" or s_forum_list="" or s_forum_list_more="" or s_forum_view_bar="" or s_forum_view="" or s_forum_views="" or s_forum_view_more="" then
      call admin_error("请输入 "&tit_fir&"（"&s_name&"） 的 论坛"&tit_fir&" 信息！")
      exit sub
    end if
    rs("s_forum_bar")=s_forum_bar
    rs("s_forum_data")=s_forum_data
    rs("s_forum_more")=s_forum_more
    rs("s_forum_end")=s_forum_end
    rs("s_forum_board")=s_forum_board
    rs("s_forum_board_base")=s_forum_board_base
    rs("s_forum_top_bar")=s_forum_top_bar
    rs("s_forum_top")=s_forum_top
    rs("s_forum_list_bar")=s_forum_list_bar
    rs("s_forum_list")=s_forum_list
    rs("s_forum_list_more")=s_forum_list_more
    rs("s_forum_view_bar")=s_forum_view_bar
    rs("s_forum_view")=s_forum_view
    rs("s_forum_views")=s_forum_views
    rs("s_forum_view_more")=s_forum_view_more
    rs.update
    call delete_cache_skins()
    call admin_msg("已成功编辑了"&tit_fir&"（"&s_name&"）的 论坛"&tit_fir&" 信息！",pageurl&action,1)
    exit sub
  end if
  call form_first()
%>
  <form action='<%response.write pageurl&action%>' method=post>
  <input type=hidden name=chk value='yes'>
  <tr>
  <td>论坛主表格：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_forum_bar id=s_forum_bar cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_forum_bar"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_forum_bar)"><%call textarea_resize("s_forum_bar")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>论坛数据：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_forum_data  id=s_forum_data cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_forum_data"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_forum_data)"><%call textarea_resize("s_forum_data")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td >论坛图例：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_forum_more id=s_forum_more cols=60 rows=7><%response.write joekoe_cms.code_word(rs("s_forum_more"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_forum_more)"><%call textarea_resize("s_forum_more")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>论坛图例2：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_forum_end cols=60 rows=8><%response.write joekoe_cms.code_word(rs("s_forum_end"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_forum_end)"><%call textarea_resize("s_forum_end")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>论坛主体<%response.write tit_fir%>：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_forum_board cols=60 rows=10><%response.write joekoe_cms.code_word(rs("s_forum_board"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_forum_board)"><%call textarea_resize("s_forum_board")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>论坛主体附属<%response.write tit_fir%>：<br>最新发表信息</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_forum_board_base cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_forum_board_base"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_forum_board_base)"><%call textarea_resize("s_forum_board_base")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>论坛固顶表格<%response.write tit_fir%>：<br><br>与列表简洁模式共用</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_forum_top_bar cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_forum_top_bar"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_forum_top_bar)"><%call textarea_resize("s_forum_top_bar")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>论坛固顶<%response.write tit_fir%>：<br><br>与列表简洁模式共用</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_forum_top cols=60 rows=10><%response.write joekoe_cms.code_word(rs("s_forum_top"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_forum_top)"><%call textarea_resize("s_forum_top")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>论坛列表头<%response.write tit_fir%>：<br><br>标准模式</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_forum_list_bar cols=60 rows=10><%response.write joekoe_cms.code_word(rs("s_forum_list_bar"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_forum_list_bar)"><%call textarea_resize("s_forum_list_bar")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>论坛列表<%response.write tit_fir%>：<br><br>标准模式</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_forum_list cols=60 rows=10><%response.write joekoe_cms.code_word(rs("s_forum_list"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_forum_list)"><%call textarea_resize("s_forum_list")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>论坛列表<%response.write tit_fir%>：<br><br>简洁模式</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_forum_list_more cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_forum_list_more"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_forum_list_more)"><%call textarea_resize("s_forum_list_more")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>论坛浏览头<%response.write tit_fir%>：<br><br>标准与简洁模式共用</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_forum_view_bar cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_forum_view_bar"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_forum_view_bar)"><%call textarea_resize("s_forum_view_bar")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>论坛浏览<%response.write tit_fir%>：<br><br>标准模式</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_forum_view cols=60 rows=10><%response.write joekoe_cms.code_word(rs("s_forum_view"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_forum_view)"><%call textarea_resize("s_forum_view")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>论坛浏览<%response.write tit_fir%>：<br><br>简洁模式</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_forum_views cols=60 rows=10><%response.write joekoe_cms.code_word(rs("s_forum_views"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_forum_views)"><%call textarea_resize("s_forum_views")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>论坛浏览附属更多：<br><br>标准与简洁模式共用</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_forum_view_more cols=60 rows=3><%response.write joekoe_cms.code_word(rs("s_forum_view_more"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_forum_view_more)"><%call textarea_resize("s_forum_view_more")%></td>
    </tr>
    </table>
  </td>
  </tr>
<%
  call submit_edit()
end sub

sub joekoe_chk_edit_shop()
  dim s_shop_left,s_shop_center,s_shop_more,s_shop_end,s_shop_view,s_shop_cast,s_shop_good,s_shop_list
  if chk() then
    s_shop_left=code_admin("s_shop_left",1,0)
    s_shop_center=code_admin("s_shop_center",1,0)
    s_shop_more=code_admin("s_shop_more",1,0)
    s_shop_end=code_admin("s_shop_end",1,0)
    s_shop_view=code_admin("s_shop_view",1,0)
    s_shop_cast=code_admin("s_shop_cast",1,0)
    s_shop_good=code_admin("s_shop_good",1,0)
    s_shop_list=code_admin("s_shop_list",1,0)
    if s_shop_left="" or s_shop_center="" or s_shop_more="" or s_shop_end="" or s_shop_view="" or s_shop_cast="" or s_shop_good="" or s_shop_list="" then
      call admin_error("请输入 "&tit_fir&"（"&s_name&"） 的 商城"&tit_fir&" 信息！")
      exit sub
    end if
    rs("s_shop_left")=s_shop_left
    rs("s_shop_center")=s_shop_center
    rs("s_shop_more")=s_shop_more
    rs("s_shop_end")=s_shop_end
    rs("s_shop_view")=s_shop_view
    rs("s_shop_cast")=s_shop_cast
    rs("s_shop_good")=s_shop_good
    rs("s_shop_list")=s_shop_list
    rs.update
    call delete_cache_skins()
    call admin_msg("已成功编辑了"&tit_fir&"（"&s_name&"）的 商城"&tit_fir&" 信息！",pageurl&action,1)
    exit sub
  end if
  call form_first()
%>
  <form action='<%response.write pageurl&action%>' method=post>
  <input type=hidden name=chk value='yes'>
  <tr>
  <td>商城主表表格<%response.write tit_fir%>：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_shop_left cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_shop_left"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_shop_left)"><%call textarea_resize("s_shop_left")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>商城附属更多：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_shop_center cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_shop_center"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_shop_center)"><%call textarea_resize("s_shop_center")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>表格附属更多：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_shop_more cols=60 rows=3><%response.write joekoe_cms.code_word(rs("s_shop_more"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_shop_more)"><%call textarea_resize("s_shop_more")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>表格附属更多：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_shop_end cols=60 rows=3><%response.write joekoe_cms.code_word(rs("s_shop_end"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_shop_end)"><%call textarea_resize("s_shop_end")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>商城浏览<%response.write tit_fir%>：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_shop_view cols=60 rows=16><%response.write joekoe_cms.code_word(rs("s_shop_view"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_shop_view)"><%call textarea_resize("s_shop_view")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>公告浏览<%response.write tit_fir%>：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_shop_cast cols=60 rows=10><%response.write joekoe_cms.code_word(rs("s_shop_cast"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_shop_cast)"><%call textarea_resize("s_shop_cast")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>商城推荐<%response.write tit_fir%>：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_shop_good cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_shop_good"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_shop_good)"><%call textarea_resize("s_shop_good")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>单个产品<%response.write tit_fir%>：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_shop_list cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_shop_list"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_shop_list)"><%call textarea_resize("s_shop_list")%></td>
    </tr>
    </table>
  </td>
  </tr>
<%
  call submit_edit()
end sub

sub joekoe_chk_edit_down()
  dim s_down_left,s_down_center,s_down_more,s_down_end,s_down_view,s_down_tool,s_down_remark
  if chk() then
    s_down_left=code_admin("s_down_left",1,0)
    s_down_center=code_admin("s_down_center",1,0)
    s_down_more=code_admin("s_down_more",1,0)
    s_down_end=code_admin("s_down_end",1,0)
    s_down_view=code_admin("s_down_view",1,0)
    s_down_tool=code_admin("s_down_tool",1,0)
    s_down_remark=code_admin("s_down_remark",1,0)
    if s_down_left="" or s_down_center="" or s_down_more="" or s_down_end="" or s_down_view="" or s_down_tool="" or s_down_remark="" then
      call admin_error("请输入 "&tit_fir&"（"&s_name&"） 的 下载"&tit_fir&" 信息！")
      exit sub
    end if
    rs("s_down_left")=s_down_left
    rs("s_down_center")=s_down_center
    rs("s_down_more")=s_down_more
    rs("s_down_end")=s_down_end
    rs("s_down_view")=s_down_view
    rs("s_down_tool")=s_down_tool
    rs("s_down_remark")=s_down_remark
    rs.update
    call delete_cache_skins()
    call admin_msg("已成功编辑了"&tit_fir&"（"&s_name&"）的 下载"&tit_fir&" 信息！",pageurl&action,1)
    exit sub
  end if
  call form_first()
%>
  <form action='<%response.write pageurl&action%>' method=post>
  <input type=hidden name=chk value='yes'>
  <tr>
  <td>下载主表格<%response.write tit_fir%>：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_down_left cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_down_left"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_down_left)"><%call textarea_resize("s_down_left")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>下载附多表格：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_down_center cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_down_center"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_down_center)"><%call textarea_resize("s_down_center")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>下载搜索：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_down_more cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_down_more"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_down_more)"><%call textarea_resize("s_down_more")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>表格附属底部：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_down_end cols=60 rows=3><%response.write joekoe_cms.code_word(rs("s_down_end"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_down_end)"><%call textarea_resize("s_down_end")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>下载浏览<%response.write tit_fir%>：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_down_view cols=60 rows=16><%response.write joekoe_cms.code_word(rs("s_down_view"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_down_view)"><%call textarea_resize("s_down_view")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>常用工具：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_down_tool cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_down_tool"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_down_tool)"><%call textarea_resize("s_down_tool")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>下载说明：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_down_remark cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_down_remark"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_down_remark)"><%call textarea_resize("s_down_remark")%></td>
    </tr>
    </table>
  </td>
  </tr>
<%
  call submit_edit()
end sub

sub joekoe_chk_edit_login()
  dim s_login_left1,s_login_left2,s_login_main1,s_login_main2,s_login_forum1,s_login_forum2
  if chk() then
    s_login_left1=code_admin("s_login_left1",1,0)
    s_login_left2=code_admin("s_login_left2",1,0)
    s_login_main1=code_admin("s_login_main1",1,0)
    s_login_main2=code_admin("s_login_main2",1,0)
    s_login_forum1=code_admin("s_login_forum1",1,0)
    s_login_forum2=code_admin("s_login_forum2",1,0)
    if s_login_left1="" or s_login_left2="" or s_login_main1="" or s_login_main2="" then
      call admin_error("请输入 "&tit_fir&"（"&s_name&"） 的 用户登陆"&tit_fir&" 信息！")
      exit sub
    end if
    rs("s_login_left1")=s_login_left1
    rs("s_login_left2")=s_login_left2
    rs("s_login_main1")=s_login_main1
    rs("s_login_main2")=s_login_main2
    rs("s_login_forum1")=s_login_forum1
    rs("s_login_forum2")=s_login_forum2
    rs.update
    call delete_cache_skins()
    call admin_msg("已成功编辑了"&tit_fir&"（"&s_name&"）的 用户登陆"&tit_fir&" 信息！",pageurl&action,1)
    exit sub
  end if
  call form_first()
%>
  <form action='<%response.write pageurl&action%>' method=post>
  <input type=hidden name=chk value='yes'>
  <tr>
  <td>用户登陆.左边：<br><br>登陆前的<%response.write tit_fir%></td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_login_left1 cols=60 rows=8><%response.write joekoe_cms.code_word(rs("s_login_left1"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_login_left1)"><%call textarea_resize("s_login_left1")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>用户登陆.左边：<br><br>登陆后的<%response.write tit_fir%></td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_login_left2 cols=60 rows=8><%response.write joekoe_cms.code_word(rs("s_login_left2"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_login_left2)"><%call textarea_resize("s_login_left2")%></td>
    </tr>
    </table>
  </td>
  </tr>
    <tr>
  <td>论坛登录：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_login_forum1 cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_login_forum1"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_login_forum1)"><%call textarea_resize("s_login_forum1")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>论坛登录：<br><br>登录后的</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_login_forum2 cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_login_forum2"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_login_forum2)"><%call textarea_resize("s_login_forum2")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>用户登陆.主体：<br><br>登陆前的<%response.write tit_fir%></td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_login_main1 cols=60 rows=8><%response.write joekoe_cms.code_word(rs("s_login_main1"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_login_main1)"><%call textarea_resize("s_login_main1")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>用户登陆.主体：<br><br>登陆后的<%response.write tit_fir%></td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_login_main2 cols=60 rows=8><%response.write joekoe_cms.code_word(rs("s_login_main2"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_login_main2)"><%call textarea_resize("s_login_main2")%></td>
    </tr>
    </table>
  </td>
  </tr>
<%
  call submit_edit()
end sub

sub joekoe_chk_edit_base()
  dim s_mod_lefter,s_mod_righter,s_table_lefter,s_table_center,s_table_righter,s_fk_left,s_fk_center,s_fk_more,s_fk_end,s_format_pic,s_copyright,s_no_open,s_no_ip,s_fk_left3,s_fk_center3
  if chk() then
    s_mod_lefter=code_admin("s_mod_lefter",1,0)
    s_mod_righter=code_admin("s_mod_righter",1,0)
    s_table_lefter=code_admin("s_table_lefter",1,0)
    s_table_center=code_admin("s_table_center",1,0)
    s_table_righter=code_admin("s_table_righter",1,0)
    s_fk_left=code_admin("s_fk_left",1,0)
    s_fk_center=code_admin("s_fk_center",1,0)
    s_fk_more=code_admin("s_fk_more",1,0)
    s_fk_end=code_admin("s_fk_end",1,0)
    s_format_pic=code_admin("s_format_pic",1,0)
    s_copyright=code_admin("s_copyright",1,0)
    s_no_open=code_admin("s_no_open",1,0)
    s_no_ip=code_admin("s_no_ip",1,0)
    s_fk_left3=code_admin("s_fk_left3",1,0)
    s_fk_center3=code_admin("s_fk_center3",1,0)
    if s_mod_lefter="" or s_mod_righter="" or s_table_lefter="" or s_table_center="" or s_table_righter="" or s_fk_left="" or s_fk_center="" or s_fk_more="" or s_fk_end="" or s_format_pic="" or s_copyright="" or s_no_open="" or s_no_ip="" or s_fk_left3="" or s_fk_center3=""  then
      call admin_error("请输入 "&tit_fir&"（"&s_name&"） 的 基准表格 信息！")
      exit sub
    end if
    rs("s_mod_lefter")=s_mod_lefter
    rs("s_mod_righter")=s_mod_righter
    rs("s_table_lefter")=s_table_lefter
    rs("s_table_center")=s_table_center
    rs("s_table_righter")=s_table_righter
    rs("s_fk_left")=s_fk_left
    rs("s_fk_center")=s_fk_center
    rs("s_fk_more")=s_fk_more
    rs("s_fk_end")=s_fk_end
    rs("s_format_pic")=s_format_pic
    rs("s_copyright")=s_copyright
    rs("s_no_open")=s_no_open
    rs("s_no_ip")=s_no_ip
    rs("s_fk_left3")=s_fk_left3
    rs("s_fk_center3")=s_fk_center3
    rs.update
    call delete_cache_skins()
    call admin_msg("已成功编辑了"&tit_fir&"（"&s_name&"）的 基准表格 信息！",pageurl&action,1)
    exit sub
  end if
  call form_first()
%>
  <form action='<%response.write pageurl&action%>' method=post>
  <input type=hidden name=chk value='yes'>
  <tr>
  <td>页面框架.左：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_mod_lefter cols=60 rows=5><%response.write joekoe_cms.code_word(rs("s_mod_lefter"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_mod_lefter)"><%call textarea_resize("s_mod_lefter")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>页面框架.右：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_mod_righter cols=60 rows=5><%response.write joekoe_cms.code_word(rs("s_mod_righter"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_mod_righter)"><%call textarea_resize("s_mod_righter")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr class=tr1>
  <td>页面表格.左：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr class=tr1>
    <td><textarea name=s_table_lefter cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_table_lefter"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_table_lefter)"><%call textarea_resize("s_table_lefter")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr class=tr1>
  <td>页面表格.中：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr class=tr1>
    <td><textarea name=s_table_center cols=60 rows=5><%response.write joekoe_cms.code_word(rs("s_table_center"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_table_center)"><%call textarea_resize("s_table_center")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr class=tr1>
  <td>页面表格.右：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr class=tr1>
    <td><textarea name=s_table_righter cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_table_righter"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_table_righter)"><%call textarea_resize("s_table_righter")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>左表格<%response.write tit_fir%>1：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_fk_left cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_fk_left"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_fk_left)"><%call textarea_resize("s_fk_left")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>主表格<%response.write tit_fir%>1：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_fk_center cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_fk_center"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_fk_center)"><%call textarea_resize("s_fk_center")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>表格附属更多1：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_fk_more cols=60 rows=3><%response.write joekoe_cms.code_word(rs("s_fk_more"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_fk_more)"><%call textarea_resize("s_fk_more")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>表格附属底部1：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_fk_end cols=60 rows=3><%response.write joekoe_cms.code_word(rs("s_fk_end"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_fk_end)"><%call textarea_resize("s_fk_end")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr class=tr1>
  <td>图片框：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr class=tr1>
    <td><textarea name=s_format_pic cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_format_pic"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_format_pic)"><%call textarea_resize("s_format_pic")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr class=tr1>
  <td>其它版权信息：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr class=tr1>
    <td><textarea name=s_copyright cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_copyright"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_copyright)"><%call textarea_resize("s_copyright")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr class=tr1>
  <td>网站关闭信息：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr class=tr1>
    <td><textarea name=s_no_open cols=60 rows=7><%response.write joekoe_cms.code_word(rs("s_no_open"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_no_open)"><%call textarea_resize("s_no_open")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr class=tr1>
  <td>用户屏闭信息：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr class=tr1>
    <td><textarea name=s_no_ip cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_no_ip"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_no_ip)"><%call textarea_resize("s_no_ip")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>左表格<%response.write tit_fir%>3：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_fk_left3 cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_fk_left3"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_fk_left3)"><%call textarea_resize("s_fk_left3")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td>主表格<%response.write tit_fir%>3：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_fk_center3 cols=60 rows=6><%response.write joekoe_cms.code_word(rs("s_fk_center3"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_fk_center3)"><%call textarea_resize("s_fk_center3")%></td>
    </tr>
    </table>
  </td>
  </tr>
<%
  call submit_edit()
end sub

sub joekoe_chk_edit_config()
  dim s_name,s_dir,s_css,s_post,s_nologin,s_redx,s_ukong,s_go_back,s_closer,s_title,s_head,s_end
  if chk() then
    s_name=code_admin("s_name",1,50)
    s_dir=code_admin("s_dir",1,50)
    s_css=code_admin("s_css",1,0)
    s_post=code_admin("s_post",1,250)
    s_nologin=code_admin("s_nologin",1,250)
    s_redx=code_admin("s_redx",1,250)
    s_ukong=code_admin("s_ukong",1,250)
    s_go_back=code_admin("s_go_back",1,250)
    s_closer=code_admin("s_closer",1,250)
    s_title=code_admin("s_title",1,0)
    s_head=code_admin("s_head",1,0)
    s_end=code_admin("s_end",1,0)
    if s_name="" or s_dir="" or s_css="" or s_post="" or s_nologin="" or s_redx="" or s_ukong="" or s_go_back="" or s_closer="" or s_title="" or s_head="" or s_end="" then
      call admin_error("请输入 "&tit_fir&"（"&s_name&"） 的 基本配置 信息！")
      exit sub
    end if
    rs("s_name")=s_name
    rs("s_dir")=s_dir
    rs("s_css")=s_css
    rs("s_post")=s_post
    rs("s_nologin")=s_nologin
    rs("s_redx")=s_redx
    rs("s_ukong")=s_ukong
    rs("s_go_back")=s_go_back
    rs("s_closer")=s_closer
    rs("s_title")=s_title
    rs("s_head")=s_head
    rs("s_end")=s_end
    rs.update
    call delete_cache_skins()
    s_css=replace(s_css,"{$web_skin}",joekoe_cms.web_dir&"skin/"&s_dir&"/")
    call create_file(joekoe_cms.web_dir&"skin/"&s_dir&"/style.css",s_css)
    call admin_msg("已成功编辑了"&tit_fir&"（"&s_name&"）的 基本配置 信息！",pageurl&action,1)
    exit sub
  end if
  call form_first()
%>
  <form action='<%response.write pageurl&action%>' method=post>
  <input type=hidden name=chk value='yes'>
  <tr class=tr1>
  <td><%response.write tit_fir%>名称：</td>
  <td><input type=text name=s_name value='<%response.write rs("s_name")%>' size=20 maxlength=50></td>
  </tr>
  <tr class=tr1>
  <td><%response.write tit_fir%>目录：</td>
  <td><input type=text name=s_dir value='<%response.write rs("s_dir")%>' size=20 maxlength=20>&nbsp;<font class=red>请勿随意修改</font></td>
  </tr>
  <tr>
  <td>CSS样式：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_css cols=60 rows=8><%response.write joekoe_cms.code_word(rs("s_css"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_css)"><%call textarea_resize("s_css")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr class=tr1>
  <td>外部提交：</td>
  <td><input type=text name=s_post value='<%response.write rs("s_post")%>' size=60 maxlength=250></td>
  </tr>
  <tr class=tr1>
  <td>未注册登陆：</td>
  <td><input type=text name=s_nologin value='<%response.write rs("s_nologin")%>' size=60 maxlength=250></td>
  </tr>
  <tr class=tr1>
  <td>醒目标志：</td>
  <td><input type=text name=s_redx value='<%response.write rs("s_redx")%>' size=60 maxlength=250>&nbsp;例：<%response.write redx%></td>
  </tr>
  <tr class=tr1>
  <td>表格空隙：</td>
  <td><input type=text name=s_ukong value='<%response.write rs("s_ukong")%>' size=60 maxlength=250></td>
  </tr>
  <tr class=tr1>
  <td>返回上一页：</td>
  <td><input type=text name=s_go_back value='<%response.write rs("s_go_back")%>' size=60 maxlength=250></td>
  </tr>
  <tr class=tr1>
  <td>关闭窗口：</td>
  <td><input type=text name=s_closer value='<%response.write rs("s_closer")%>' size=60 maxlength=250></td>
  </tr>
  <tr>
  <td>网页头部<%response.write tit_fir%>：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><textarea name=s_title cols=60 rows=8><%response.write joekoe_cms.code_word(rs("s_title"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_title)"><%call textarea_resize("s_title")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr class=tr1>
  <td>网页头部.基准：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr class=tr1>
    <td><textarea name=s_head cols=60 rows=8><%response.write joekoe_cms.code_word(rs("s_head"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_head)"><%call textarea_resize("s_head")%></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr class=tr1>
  <td>网页底部.基准：</td>
  <td>
    <table border=0 cellspacing=0 cellpadding=0>
    <tr class=tr1>
    <td><textarea name=s_end cols=60 rows=8><%response.write joekoe_cms.code_word(rs("s_end"))%></textarea></td>
    <td width=5></td>
    <td valign=bottom><img src=images/admin/viewpic.gif onclick="runscript(s_end)"><%call textarea_resize("s_end")%></td>
    </tr>
    </table>
  </td>
  </tr>
<%
  call submit_edit()
end sub

sub joekoe_chk_edit()
  sql="select top 1 * from "&data_name&" where s_id="&s_id
  call joekoe_cms.exec("",-1)
  rs.open sql,conn,1,3
  if rs.eof then
    call admin_msg("要进行编辑的"&tit_fir&"（ID："&s_id&"）不存在！","?",1)
    exit sub
  end if
  s_name=rs("s_name")
  pageurl=pageurl&"s_id="&s_id&"&action="
  call admin_td(tit_fir&"编辑")
%>
<tr align=center>
<td width='20%'><font class=blue><b><%response.write s_name%></b></font></td>
<td width='80%'>
  <table border=0>
  <tr>
  <td><a href='<%response.write pageurl%>config'<%if action="config" then response.write " class=red"%>>基本配置</a></td>
  <td width=10></td>
  <td><a href='<%response.write pageurl%>base'<%if action="base" then response.write " class=red"%>>基准表格</a></td>
  <td width=10></td>
  <td><a href='<%response.write pageurl%>login'<%if action="login" then response.write " class=red"%>>用户登陆<%response.write tit_fir%></a></td>
  <td width=10></td>
  <td><a href='<%response.write pageurl%>down'<%if action="down" then response.write " class=red"%>>下载<%response.write tit_fir%></a></td>
  <td width=10></td>
  <td><a href='<%response.write pageurl%>shop'<%if action="shop" then response.write " class=red"%>>商城<%response.write tit_fir%></a></td>
  <td width=10></td>
  <td><a href='<%response.write pageurl%>forum'<%if action="forum" then response.write " class=red"%>>论坛<%response.write tit_fir%></a></td>
  <td width=10></td>
  <td><a href='<%response.write pageurl%>format'<%if action="format" then response.write " class=red"%>>格式化<%response.write tit_fir%></a></td>
  </tr>
  </table>
</td>
</tr>
<%
  select case action
  case "format"
    call joekoe_chk_edit_format()
  case "forum"
    call joekoe_chk_edit_forum()
  case "shop"
    call joekoe_chk_edit_shop()
  case "down"
    call joekoe_chk_edit_down()
  case "login"
    call joekoe_chk_edit_login()
  case "base"
    call joekoe_chk_edit_base()
  case else
    call joekoe_chk_edit_config()
  end select
  rs.close
end sub

sub joekoe_chk_common()
  dim s_skin
  s_skin=request.querystring("s_skin")
  if s_skin="" then
    call admin_msg("更新站点默认"&tit_fir&"参数出错！","?",1)
    exit sub
  end if
  web_dim(7)=s_skin
  call joekoe_template_common()
  call admin_msg("成功更新了站点默认"&tit_fir&"！","?jk_mod=css",1)
end sub

sub joekoe_chk_handle()
  dim sel_type,sel_id
  sel_type=code_admin("sel_type",1,0)
  sel_id=code_admin("sel_id",1,0)
  sel_id=replace(sel_id," ","")
  if sel_id="" then
    call admin_msg("没有选择可操作的记录！","?",1)
    exit sub
  end if
  if sel_type="delete" then
    sql="delete from "&data_name&" where s_dir<>'"&joekoe_cms.web_skin&"' and s_id in("&sel_id&")"
    call joekoe_cms.exec(sql,0)
    call delete_cache_skins()
    call admin_msg("成功删除所选择的"&tit_fir,"?",1)
    exit sub
  end if
  dim skin_file,export_type,econn,fieldsnum,dim_skin,dim_fields,j
  skin_file=code_admin("skin_file",1,0)
  export_type=code_admin("export_type",1,0)
  if skin_file="" then
    call admin_msg("导出的数据库路径不能为空！","?",1)
    exit sub
  end if
  sql="select * from "&data_name&" where s_id in("&sel_id&") order by s_id"
  set rs=joekoe_cms.exec(sql,1)
  if rs.eof then
    rs.close
    call admin_msg("没有选择可操作的记录！","?",1)
    exit sub
  end if
  dim_skin=rs.getrows()
  fieldsnum=rs.fields.count-1
  redim dim_fields(fieldsnum)
  for i=0 to fieldsnum
    dim_fields(i)=rs(i).name
  next
  rs.close
  on error resume next
  set econn=server.createobject("adodb.connection")
  econn.open "provider=microsoft.jet.oledb.4.0;data source="&server.mappath(skin_file)
  if export_type="replace" then
    econn.execute("delete * from "&data_name)
  end if
  rs.open "select * from "&data_name&" where s_id",econn,1,3
  if err.number=-2147467259 then 
    erase dim_skin
    erase dim_fields
    rs.close
    econn.close
    set econn=nothing
    err.clear
    call admin_msg("导出的数据库或数据表出现异常（可能不存在）！","?",1)
    exit sub
  end if
  for j=0 to ubound(dim_skin,2)
    rs.addnew
    for i=1 to fieldsnum
      rs(dim_fields(i))=dim_skin(i,j)
    next
    rs.update
  next
  rs.close
  econn.close
  set econn=nothing
  erase dim_skin
  erase dim_fields
  call admin_msg("成功导出所选择的"&tit_fir&"数据！","?",1)
end sub

sub joekoe_chk_inport()
  dim skin_file,export_type,econn,fieldsnum,dim_skin,dim_fields,j
  skin_file=code_admin("skin_file",1,0)
  export_type=code_admin("export_type",1,0)
  if skin_file="" then
    call admin_msg("导出的数据库路径不能为空！","?",1)
    exit sub
  end if
  on error resume next
  set econn=server.createobject("adodb.connection")
  econn.open "provider=microsoft.jet.oledb.4.0;data source="&server.mappath(skin_file)
  rs.open "select * from "&data_name&" order by s_id",econn,1,1
  dim_skin=rs.getrows()
  fieldsnum=rs.fields.count-1
  redim dim_fields(fieldsnum)
  for i=0 to fieldsnum
    dim_fields(i)=rs(i).name
  next
  rs.close
  econn.close
  set econn=nothing
  if err.number=-2147467259 then 
    erase dim_skin
    erase dim_fields
    err.clear
    call admin_msg("导出的数据库或数据表出现异常（可能不存在）！","?",1)
    exit sub
  end if
  if export_type="replace" then
    call joekoe_cms.exec("truncate table "&data_name,0)
  end if
  sql="select * from "&data_name
  call joekoe_cms.exec("",-1)
  rs.open sql,conn,1,3
  for j=0 to ubound(dim_skin,2)
    rs.addnew
    for i=1 to fieldsnum
      rs(dim_fields(i))=dim_skin(i,j)
    next
    rs.update
  next
  rs.close
  erase dim_skin
  erase dim_fields
    call delete_cache_skins()
  call admin_msg("成功导入所外部"&tit_fir&"数据！","?",1)
end sub

sub joekoe_chk_main()
  dim s_name,s_dir
  call admin_td(tit)
%>
<tr align=center valign=top>
<td width='20%'>
  <table border=0>
  <tr><td height=30><%response.write img_admin("s_imp","")%>&nbsp;<%response.write tit_fir%>管理</td></tr>
  <!--<tr><td height=30><%response.write img_admin("s_imp","")%>&nbsp;<a href='?action=add'>添加<%response.write tit_fir%></a></td></tr>-->
  </table>
</td>
<td width='80%'>
  <table cellspacing=1 cellpadding=3 class=table0>
  <form action='?jk_mod=handle' method=post>
  <tr align=center>
  <td class=td width='6%'>ID</td>
  <td class=td width='20%'><%response.write tit_fir%>名称</td>
  <td class=td width='15%'><%response.write tit_fir%>类型</td>
  <td class=td width='22%'><%response.write tit_fir%>目录</td>
  <td class=td width='37%'>相关操作&nbsp;<input type=checkbox name=sel_all value='yes' onclick="javascript:select_all(this.form);"></td>
  </tr>
<%
  sql="select * from "&data_name&" order by s_id"
  set rs=joekoe_cms.exec(sql,1)
  do while not rs.eof
    s_id=rs("s_id")
    s_name=rs("s_name")
    s_dir=rs("s_dir")
%>
  <tr align=center>
  <td class=tims><%response.write s_id%></td>
  <td><a href='?jk_mod=edit&s_id=<%response.write s_id%>' alt='点击可查看此<%response.write tit_fir%>或进行编辑'<%
    if joekoe_cms.web_skin=s_dir then
      response.write " class=red"
    end if
%>><%response.write s_name%></a></td>
  <td><%response.write s_dir%></td>
  <td>./skin/<font class=blue><%response.write s_dir%></font>/</td>
  <td>
    <table border=0>
    <tr>
    <td><a href='?jk_mod=edit&s_id=<%response.write s_id%>' alt='点击可查看此<%response.write tit_fir%>或进行编辑'>编辑</a></td>
    <td width=1></td>
    <td><%if joekoe_cms.web_skin=s_dir then%><font class=gray>设为默认<%response.write tit_fir%></font><%else%><a href='?jk_mod=common&s_skin=<%response.write s_dir%>'>设为默认<%response.write tit_fir%></a><%end if%></td>
    <td width=1></td>
    <td><a href='skins.asp?action=<%response.write s_dir%>&old_url=help.asp' target=_blank alt='点击以此<%response.write tit_fir%>浏览网站页面'>浏览</a></td>
    <td width=1></td>
    <td><input type=checkbox name=sel_id value='<%response.write s_id%>'></td>
    </tr>
    </table>
  </td>
  </tr>
<%
    rs.movenext
  loop
  rs.close
%>
  <tr class=tr2><td colspan=5 height=40 align=center>
    <table border=0>
    <tr class=tr2>
    <td>导出的数据库：</td>
    <td><input type=text name=skin_file value='' size=25></td>
    <td><select name=export_type><option value='add'>追加</option><option value='replace'>替换</option></select></td>
    <td><input type=radio name=sel_type value='export' checked>导出</td>
    <td><input type=radio name=sel_type value='delete'>删除</td>
    <td><input type=submit value='执行所选操作' onclick="return sel_click(this.form);"></td>
    </tr>
    </table>
  </td></tr>
  </form>
<%call admin_td0("导入外部"&tit_fir&"数据",5)%>
  <tr><td colspan=5 align=center>
    <table border=0>
    <form action='?jk_mod=inport' method=post>
    <tr>
    <td>导入<%response.write tit_fir%>数据库名：</td>
    <td><input type=text name=skin_file value='' size=25></td>
    <td><select name=export_type><option value='add'>追加导入</option><option value='replace'>替换导入</option></select></td>
    <td><input type=submit value='执行导入操作' onclick="javascript:return click_return('导入外部<%response.write tit_fir%>数据库',0);"></td>
    </tr>
    </form>
    </table>
  </td></tr>
  </table>
</td>
</tr>
<%
end sub

sub delete_cache_skins()
  application.contents.remove(joekoe_cms.web_cookies&"_CMS_Skin")
end sub 

function code_css(cvar,ct,cnum)
  dim temp1
  temp1=code_admin(cvar,ct,cnum)
  temp1=replace(temp1,"|","")
  code_css=temp1
end function
%>
