<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="css/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>藏金阁</title><link>http://www.940194.cn/</link><description>让世界发现你的光彩</description><generator>RainbowSoft Studio Z-Blog 1.8 Spirit Build 80722</generator><language>zh-CN</language><copyright>Copyright 2008-2009 藏金阁 版权所有 All Rights Reserved.</copyright><pubDate>Wed, 11 Nov 2009 16:03:28 +0800</pubDate><item><title>中国民主建国会温州市企业家联谊会</title><author>a@b.com (apollo)</author><link>http://www.940194.cn/ShowData/2009-11/200901111466.html</link><pubDate>Wed, 11 Nov 2009 15:57:23 +0800</pubDate><guid>http://www.940194.cn/ShowData/2009-11/200901111466.html</guid><description><![CDATA[<p>网站名称：中国民主建国会温州市企业家联谊会<br />网站地址：<a href="http://www.mjwzqlh.com">www.mjwzqlh.com</a><br />介绍：中国民主建国会温州市企业家联谊会，对外是具备独立法人资格的社会团体，对内是市委会直接领导的民建会员企业家的横向联谊组织（会员仍在各自的支部参加纵向的组织活动）。联谊会紧紧地围绕着市委会中心工作任务，发挥联系和服务会员企业家的作用，以&ldquo;沟通、服务、发展&rdquo;为宗旨，贯彻自筹经费、自办会务、自我教育、自我服务的&ldquo;四自&rdquo;方针，积极推动会员企业及企业家为温州的经济建设又好又快发展服务。<br />地址：浙江省温州市车站大道交行广场31A<br />电话：0577-88983081&nbsp; 0577-88983082<br />传真：0577-88983081</p>]]></description><category>网站优化</category><comments>http://www.940194.cn/ShowData/2009-11/200901111466.html#comment</comments><wfw:comment>http://www.940194.cn/</wfw:comment><wfw:commentRss>http://www.940194.cn/feed.asp?cmt=132</wfw:commentRss><trackback:ping>http://www.940194.cn/cmd.asp?act=tb&amp;id=132&amp;key=380ebfa3</trackback:ping></item><item><title>Asp.NET+LDAP学习之旅第一节</title><author>a@b.com (apollo)</author><link>http://www.940194.cn/ShowData/2009-11/200901110797.html</link><pubDate>Tue, 10 Nov 2009 19:58:31 +0800</pubDate><guid>http://www.940194.cn/ShowData/2009-11/200901110797.html</guid><description><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 今天在看一个单点登录的技术文章的时候，无意中看到了LDAP(<font size="2">Lightweight Directory Access Protocol</font>)，据说很多的单点登录都是基于这项技术实现的。看见了新东西难免就有些好奇，在百度中疯狂的搜索了LDAP之后，百分百的确定了这项技术可以作为以后自己研究的方向，那么先把怎么配置服务器说起吧。<br /><br />一、创建 Active Directory 在独立服务器上安装了 Windows Server 2003 之后，运行&ldquo;Active Directory 向导&rdquo;以创建新的 Active Directory 目录林或域，然后将 Windows Server 2003 计算机转换为目录林中的第一个域控制器。若要将 Windows Server 2003 计算机转换为目录林中的第一个域控制器，请按照下列步骤操作：<font size="3"> </font></p><ol>    <li>在计算机的 CD-ROM 或 DVD-ROM 驱动器中插入 Windows Server 2003 光盘。</li>    <li>单击 开始 ，单击 运行 ，然后键入 dcpromo 。</li>    <li>单击 确定 以启动&ldquo;Active Directory 安装向导&rdquo;，然后单击 下一步 。</li>    <li>单击&ldquo;新域的域控制器&rdquo;，然后单击 下一步 。</li>    <li>单击&ldquo;在新目录林中的域&rdquo;，然后单击 下一步 。</li>    <li>为新域指定完整的 DNS 名称。请注意，因为该过程用于实现实验室环境，而不是将该环境集成到现有的 DNS 基础结构中，因此可以在该设置中使用诸如 mycompany.local 之类的一般名称。单击 下一步 。</li>    <li>接受域的默认 NetBIOS 名（如果使用第 6 步中的建议，则它为&ldquo;mycompany&rdquo;）。单击 下一步 。</li>    <li>将数据库和日志文件的位置设置为在默认设置 c:\winnt\ntds 文件夹下，然后单击 下一步 。</li>    <li>将 Sysvol 文件夹的位置设置为在默认设置 c:\winnt\sysvol 文件夹下，然后单击 下一步 。</li>    <li>单击&ldquo;在这台计算机上安装并配置 DNS 服务器&rdquo;，然后单击 下一步 。</li>    <li>单击&ldquo;只与 Windows 2000 或 Windows Server 2003 服务器或操作系统兼容的权限&rdquo;，然后单击 下一步 。</li>    <li>因为这是实验室环境，所以将目录服务恢复模式的管理员密码留为空白。请注意，在完整的生产环境中，应通过使用安全密码格式设置此密码。单击 下一步 。</li>    <li>检查并确认所选择的选项，然后单击 下一步 。</li>    <li>Active Directory 的安装将继续进行。请注意，该操作将需要几分钟。</li>    <li>出现提示时，重新启动计算机。计算机重新启动后，确认已经为新的域控制器创建了域名系统 (DNS) 服务位置记录。若要确认已创建了 DNS 服务位置记录，请按照下列步骤操作：    <ol>        <li>单击 开始 ，指向 管理工具 ，然后单击 DNS ，以启动 DNS 管理控制台。</li>        <li>展开该服务器名称，再展开 正向搜索区域 ，然后展开该域。</li>        <li>确认 _msdcs、_sites、_tcp 和 _udp 文件夹已存在。这些文件夹和它们包含的服务位置记录对于 Active Directory 和 Windows Server 2003 的运行至关重要。</li>    </ol>    </li></ol><p>二、将用户和计算机添加到 Active Directory 域中</p><p>新的 Active Directory 域建立后，在该域中创建一个用户帐户作为管理帐户。在将该用户添加到适当的安全组中时，使用该帐户将计算机添加到域中。</p><ol>    <li>若要创建新用户，请按照下列步骤操作：    <ol>        <li>单击 开始 ，指向 管理工具 ，然后单击&ldquo;Active Directory 用户和计算机&rdquo;，以启动 Active Directory 用户和计算机控制台。</li>        <li>单击已创建的域名，然后展开这些目录。</li>        <li>右键单击 用户 ，指向 新建 ，然后单击 用户 。</li>        <li>键入新用户的名、姓和用户登录名，然后单击 下一步 。</li>        <li>键入新密码，确认密码，然后单击以选中以下复选框之一： <br />        <ul>            <li>用户下次登录时须更改密码（推荐多数用户采用）</li>            <li>用户不能更改密码</li>            <li>密码永不过期</li>            <li>帐户已停用</li>        </ul>        单击 下一步 。</li>        <li>检查提供的信息是否每一项均正确，单击 完成 。</li>    </ol>    </li>    <li>创建新用户后，让该用户帐户成为能够允许用户执行管理任务的组中的成员。因为所控制的是实验室环境，所以可以通过使其成为 Schema、Enterprise 和 Domain Administrators 组的成员，授予该用户帐户完全的管理访问权限。若要将帐户添加到 Schema、Enterprise 和 Domain Administrators 组，请按照下列步骤操作：    <ol>        <li>从&ldquo;Active Directory 用户和计算机&rdquo;控制台，右键单击已创建的新帐户，然后单击 属性 。</li>        <li>单击 隶属于 选项卡，然后单击 添加 。</li>        <li>在 选择组 对话框中，指定一个组，然后单击 确定 将所需组添加到列表中。</li>        <li>对用户要在其中具有帐户成员资格的每一个组重复选择过程。</li>        <li>单击 确定 完成。</li>    </ol>    </li>    <li>该过程的最后一步是将成员服务器添加到域中。该过程也适用于工作站。若要向域中添加计算机，请按照下列步骤操作：    <ol>        <li>登录到要将其添加到域的计算机。</li>        <li>右键单击 我的电脑 ，然后单击 属性 。</li>        <li>单击 计算机名 选项卡，然后单击 更改 。</li>        <li>在 计算机名更改 对话框中，单击 隶属于 下方的 域 ，然后键入域名。单击 确定 。</li>        <li>在显示提示后，键入您以前创建的帐户的用户名和密码，然后单击 确定 。 <br />        将显示欢迎您来到该域的消息。</li>        <li>单击 确定 返回到 计算机名 选项卡，然后单击 确定 完成。</li>        <li>出现提示时，重新启动计算机。</li>    </ol>    </li></ol><p>经过以上步骤的设置，你就可以充分使用LDAP带来的便利了，我还在研究中，等研究出来了到时候在发出文章来好了。<br />原文地址：<a href="http://www.cnblogs.com/echo/archive/2005/03/18/120972.html">http://www.cnblogs.com/echo/archive/2005/03/18/120972.html</a>&nbsp;</p>]]></description><category>程序代码</category><comments>http://www.940194.cn/ShowData/2009-11/200901110797.html#comment</comments><wfw:comment>http://www.940194.cn/</wfw:comment><wfw:commentRss>http://www.940194.cn/feed.asp?cmt=131</wfw:commentRss><trackback:ping>http://www.940194.cn/cmd.asp?act=tb&amp;id=131&amp;key=28b66b24</trackback:ping></item><item><title>Windows7无法访问Windows2003共享的解决方案</title><author>a@b.com (apollo)</author><link>http://www.940194.cn/ShowData/2009-11/20160501338.html</link><pubDate>Thu, 05 Nov 2009 16:18:35 +0800</pubDate><guid>http://www.940194.cn/ShowData/2009-11/20160501338.html</guid><description><![CDATA[<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 今天的工作本来安排的好好的，本来都已经在开始高效的做事情了，因为服务器要安装一个驱动程序，在安装好了之后结果发现自己的电脑再也没有办法连接到服务器的共享了，真是恼火。造理说我也是可什么设置都没有动过啊，我就只是用下网络的共享服务而已那。看来我们现在用的这个版本的Windows7还是存在着这样的Bug，可怜的微软(我的版本是MSDN版本的)。<br />下面说说Windows7不能访问Windows2003共享的解决方案：<br />1、首先确认一下控制面板-系统和安全-windows防火墙-允许的程序里打开了&ldquo;文件和打印机共享&rdquo;；<br />&nbsp;<img title="" alt="" onload="ResizeImage(this,520)" src="http://www.940194.cn/upload/2009/11/200911051627258887.png" /><br />2、然后在开始的搜索栏输入&ldquo;本地安全策略&rdquo;，将&ldquo;网络安全：LAN管理器身份验证级别&rdquo;项的值&ldquo;没有定义&rdquo;改为&ldquo;发送LM &amp; NTLM响应&rdquo;；<br /><img title="" alt="" onload="ResizeImage(this,520)" src="http://www.940194.cn/upload/2009/11/200911051627464738.png" /><br />3、经过这样设置之后，Windows7应该就可以访问Windows2003的网络共享了。<br />&nbsp;<img title="" alt="" onload="ResizeImage(this,520)" src="http://www.940194.cn/upload/2009/11/200911051628386705.png" /></div>]]></description><category>实用代码</category><comments>http://www.940194.cn/ShowData/2009-11/20160501338.html#comment</comments><wfw:comment>http://www.940194.cn/</wfw:comment><wfw:commentRss>http://www.940194.cn/feed.asp?cmt=130</wfw:commentRss><trackback:ping>http://www.940194.cn/cmd.asp?act=tb&amp;id=130&amp;key=b37a945c</trackback:ping></item><item><title>C#动态注册JS脚本到页面尾部</title><author>a@b.com (apollo)</author><link>http://www.940194.cn/ShowData/2009-11/20160501955.html</link><pubDate>Thu, 05 Nov 2009 13:46:09 +0800</pubDate><guid>http://www.940194.cn/ShowData/2009-11/20160501955.html</guid><description><![CDATA[<p>在一个新的项目中需要用到动态注册JS脚本，代码很简单先做下记录，方便下次查找使用。<br />Type CsType = this.GetType();<br />ClientScriptManager _CsManager = Page.ClientScript;<br />string StrJs = &quot;&lt;script type=text/javascript&gt;setTimeout('ExpireTime()',500);function ExpireTime(){showTB('&quot; + UIConfig.InstallDir + UIConfig.AdminDir + &quot;/AboutUs/ExpireTime.aspx',500,300,'温馨提醒','');}&lt;/script&gt;&quot;;<br />&nbsp;_CsManager.RegisterClientScriptBlock(CsType, &quot;ButtonClickScript&quot;, StrJs, false);<br />这个代码是将JS脚本库注册到网页的最底部的。</p>]]></description><category>程序代码</category><comments>http://www.940194.cn/ShowData/2009-11/20160501955.html#comment</comments><wfw:comment>http://www.940194.cn/</wfw:comment><wfw:commentRss>http://www.940194.cn/feed.asp?cmt=129</wfw:commentRss><trackback:ping>http://www.940194.cn/cmd.asp?act=tb&amp;id=129&amp;key=802cb8e7</trackback:ping></item><item><title>温州市凯顿安全设备有限公司</title><author>a@b.com (apollo)</author><link>http://www.940194.cn/ShowData/2009-10/200901031617_2928.html</link><pubDate>Sat, 31 Oct 2009 14:15:15 +0800</pubDate><guid>http://www.940194.cn/ShowData/2009-10/200901031617_2928.html</guid><description><![CDATA[<p>承建单位：温州市捷点信息技术有限公司<br />名字：温州市凯顿安全设备有限公司<br />网址：<a href="http://www.ktzsafety.com/">http://www.ktzsafety.com</a><br />地址：中国浙江温州市龙湾区状元石坦东路34号<br />电&nbsp;&nbsp;&nbsp; 话：0577 56666555/56883366 <br />移动电话：13456077222 <br />传&nbsp;&nbsp;&nbsp; 真：0577 56885886</p>]]></description><category>网站优化</category><comments>http://www.940194.cn/ShowData/2009-10/200901031617_2928.html#comment</comments><wfw:comment>http://www.940194.cn/</wfw:comment><wfw:commentRss>http://www.940194.cn/feed.asp?cmt=128</wfw:commentRss><trackback:ping>http://www.940194.cn/cmd.asp?act=tb&amp;id=128&amp;key=28c75d81</trackback:ping></item><item><title>全局设置后台某个时间段不能发布信息</title><author>a@b.com (apollo)</author><link>http://www.940194.cn/ShowData/2009-10/200901013715.html</link><pubDate>Tue, 13 Oct 2009 14:48:41 +0800</pubDate><guid>http://www.940194.cn/ShowData/2009-10/200901013715.html</guid><description><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 国庆这段时间吧，遇到了一个比较有意思的事情，可能跟国内政府有关系吧，怕在国庆期间发布一些有害的文章，所以机房封网的封网，网站嘛可能是因为很多工作人员放假没有时间去管理，也都做了限制上传的操作。本来这个也是一个比较机械的活，不就是把后台给删除掉就可以了吗，但是仔细想想，国庆以后呢，那你还不是要一个一个的改回来，那不是又要一次重复的劳动，所以呢，我就在设想是不是可以通过一个全局的文件来实现，废话不多说，大家看看以下的代码，应该就会明白是什么意思了。</p><p>using System;<br />using System.Collections.Generic;<br />using System.Linq;<br />using System.Web;<br />using System.Web.Security;<br />using System.Web.SessionState;</p><p>namespace WebApplication1<br />{<br />&nbsp;&nbsp;&nbsp; public class Global : System.Web.HttpApplication<br />&nbsp;&nbsp;&nbsp; {</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; protected void Application_Start(object sender, EventArgs e)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; protected void Session_Start(object sender, EventArgs e)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; protected void Application_BeginRequest(object sender, EventArgs e)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string FileName = HttpContext.Current.Request.FilePath.ToLower();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DateTime BTime = new DateTime(2009, 10, 1);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DateTime ETime = new DateTime(2009, 10, 9);</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DateTime TTime = Convert.ToDateTime(DateTime.Now.ToString());</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (FileName.IndexOf(&quot;admin&quot;) &gt; 0)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( BTime &lt;= TTime &amp;&amp; TTime &lt;= ETime)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HttpContext.Current.Response.Write(&quot;国庆期间(10月1日-10月8日)封网，不允许进行信息发布操作。&quot;);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HttpContext.Current.Response.End();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; protected void Application_AuthenticateRequest(object sender, EventArgs e)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; protected void Application_Error(object sender, EventArgs e)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; protected void Session_End(object sender, EventArgs e)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; protected void Application_End(object sender, EventArgs e)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; }<br />}</p><p>只要是在路径中包含有admin的信息的，就不能进去后台了，过了这个设定的时间网站一切恢复正常，呵呵~~~简单吧，当然这个代码还有再深度挖掘的必要，时间限制就没有去检测跟改进了，希望网友可以提出宝贵意见，谢谢啦。</p>]]></description><category>程序代码</category><comments>http://www.940194.cn/ShowData/2009-10/200901013715.html#comment</comments><wfw:comment>http://www.940194.cn/</wfw:comment><wfw:commentRss>http://www.940194.cn/feed.asp?cmt=126</wfw:commentRss><trackback:ping>http://www.940194.cn/cmd.asp?act=tb&amp;id=126&amp;key=abc67a41</trackback:ping></item><item><title>温州市中旭达气动阀门制造有限公司</title><author>a@b.com (apollo)</author><link>http://www.940194.cn/ShowData/2009-09/20090927808.html</link><pubDate>Sun, 27 Sep 2009 11:15:47 +0800</pubDate><guid>http://www.940194.cn/ShowData/2009-09/20090927808.html</guid><description><![CDATA[<p>承建单位：温州市捷点信息技术有限公司<br />网址：<a href="http://www.cnzxd.com/">http://www.cnzxd.com/</a><br />地址：浙江省温州市龙湾区永强大道3135号<br />电话：86-577-86822664 86815663 <br />传真：86-577-86827663</p><p><a target="_blank" href="http://www.cnzxd.com/"><img title="" alt="" onload="ResizeImage(this,520)" src="http://www.940194.cn/upload/2009/9/未标题-1.jpg" /></a></p>]]></description><category>网站优化</category><comments>http://www.940194.cn/ShowData/2009-09/20090927808.html#comment</comments><wfw:comment>http://www.940194.cn/</wfw:comment><wfw:commentRss>http://www.940194.cn/feed.asp?cmt=125</wfw:commentRss><trackback:ping>http://www.940194.cn/cmd.asp?act=tb&amp;id=125&amp;key=96911918</trackback:ping></item><item><title>瑞申酒店家俱制造有限公司</title><author>a@b.com (apollo)</author><link>http://www.940194.cn/ShowData/2009-09/20090923436_7993.html</link><pubDate>Wed, 23 Sep 2009 14:24:34 +0800</pubDate><guid>http://www.940194.cn/ShowData/2009-09/20090923436_7993.html</guid><description><![CDATA[<p>承建单位：温州市捷点信息技术有限公司<br />网址：<a href="http://www.wz-rs.com.cn">http://www.wz-rs.com.cn</a><br />地址：温州市娄桥玕南工业区河塘路2-1号<br />电话：0577-86095815<br />传真：0577-86095816<br />&nbsp;</p>]]></description><category>网站优化</category><comments>http://www.940194.cn/ShowData/2009-09/20090923436_7993.html#comment</comments><wfw:comment>http://www.940194.cn/</wfw:comment><wfw:commentRss>http://www.940194.cn/feed.asp?cmt=124</wfw:commentRss><trackback:ping>http://www.940194.cn/cmd.asp?act=tb&amp;id=124&amp;key=61ec633b</trackback:ping></item><item><title>Asp获取文件夹并进行排序操作</title><author>a@b.com (apollo)</author><link>http://www.940194.cn/ShowData/2009-09/20090911287.html</link><pubDate>Fri, 11 Sep 2009 17:29:31 +0800</pubDate><guid>http://www.940194.cn/ShowData/2009-09/20090911287.html</guid><description><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 最近在研究Asp中，以前虽然有用Asp但其实也只是停留在表面吧，很多深层次的技术压根没有研究进去，这不在做上传的时候就遇到问题了。其实代码很简单，这里我先贴出代码：</p><p>&lt;%<br />Response.Buffer = True<br />Response.Expires = -1<br />Response.ExpiresAbsolute = Now() - 1<br />Response.Expires = 0<br />Response.CacheControl = &quot;no-cache&quot;<br />Function GetFolder(Path)<br />Set Fso=Server.Createobject(&quot;Scripting.FileSystemObject&quot;)<br />dim CurFolder,folderPath,responseStr<br />CurFolder=trim(Path)<br />CurFolder=replace(CurFolder,&quot;\&quot;,&quot;/&quot;)<br />If Left(CurFolder,1)&lt;&gt;&quot;/&quot; then<br />&nbsp;Response.Write &quot;&amp;nbsp;&amp;nbsp;找不到该文件目录。&quot;<br />Else<br />&nbsp;Dim i:i=0<br />&nbsp;Dim j:j=0<br />&nbsp;FolderPath= VRootDir &amp; CurFolder<br />&nbsp;FolderPath=Replace(FolderPath,&quot;//&quot;,&quot;/&quot;)<br />&nbsp;If Fso.Folderexists(Server.mappath(FolderPath)) Then<br />&nbsp;&nbsp;Set Folder=Fso.Getfolder(Server.Mappath(FolderPath))</p><p>&nbsp;&nbsp;If SubPath=&quot;&quot; Then<br />&nbsp;&nbsp;Response.Write(&quot;&lt;table width=&quot;&quot;98%&quot;&quot; border=&quot;&quot;0&quot;&quot; cellspacing=&quot;&quot;0&quot;&quot; cellpadding=&quot;&quot;0&quot;&quot; align=&quot;&quot;center&quot;&quot;&gt;&quot;)<br />&nbsp;&nbsp;Response.Write(&quot;&lt;tr&gt;&quot;)<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;Set Rs=Server.CreateObject(&quot;Adodb.RecordSet&quot;)<br />&nbsp;&nbsp;Rs.CursorLocation = 1 <br />&nbsp;&nbsp;Rs.CursorType = 1<br />&nbsp;&nbsp;Rs.Fields.Append &quot;FileName&quot;,200,255<br />&nbsp;&nbsp;Rs.Fields.Append &quot;FileDate&quot;,200,255<br />&nbsp;&nbsp;Rs.open<br />&nbsp;&nbsp;If Err.number &lt;&gt; 0 Then<br />&nbsp;&nbsp;&nbsp;Response.Write(Err.Description)<br />&nbsp;&nbsp;&nbsp;Response.End()<br />&nbsp;&nbsp;End if<br />&nbsp;&nbsp;For Each ChildFolder in Folder.Subfolders<br />&nbsp;&nbsp;&nbsp;Rs.AddNew <br />&nbsp;&nbsp;&nbsp;Rs.Fields(&quot;FileName&quot;) = ChildFolder.Name <br />&nbsp;&nbsp;&nbsp;Rs.Fields(&quot;FileDate&quot;) = ChildFolder.DateLastModified<br />&nbsp;&nbsp;&nbsp;Rs.Update <br />&nbsp;&nbsp;Next<br />&nbsp;&nbsp;Rs.Sort = &quot;FileName Desc&quot;<br />&nbsp;&nbsp;If Not (Rs.Eof Or Rs.Bof) Then<br />&nbsp;&nbsp;&nbsp;Rs.MoveFirst<br />&nbsp;&nbsp;End If<br />&nbsp;&nbsp;Do While Not Rs.EOF<br />&nbsp;&nbsp;&nbsp;i=i+1<br />&nbsp;&nbsp;&nbsp;Response.Write(&quot;&lt;td height=&quot;&quot;30&quot;&quot;&gt;&lt;a href=&quot;&quot;Sys_FileManager.asp?Element=&quot;&amp;Element&amp;&quot;&amp;SubPath=&quot;&amp;Rs(&quot;FileName&quot;)&amp;&quot;&quot;&quot;&gt;&lt;img src=&quot;&quot;Images/Filetype/folder.gif&quot;&quot; align=&quot;&quot;absmiddle&quot;&quot; style=&quot;&quot;border:0px&quot;&quot;&gt;&amp;nbsp;&quot;&amp;Rs(&quot;FileName&quot;)&amp;&quot;&lt;/a&gt;&lt;/td&gt;&quot;)<br />&nbsp;&nbsp;&nbsp;If i Mod 3=0 Then<br />&nbsp;&nbsp;&nbsp;&nbsp;Response.Write(&quot;&lt;/tr&gt;&lt;tr&gt;&quot;)<br />&nbsp;&nbsp;&nbsp;End if<br />&nbsp;&nbsp;Rs.MoveNext<br />&nbsp;&nbsp;Loop<br />&nbsp;&nbsp;Rs.close<br />&nbsp;&nbsp;Set Rs=Nothing<br />&nbsp;&nbsp;Response.Write(&quot;&lt;/tr&gt;&quot;)<br />&nbsp;&nbsp;Response.Write(&quot;&lt;Table&gt;&quot;)<br />&nbsp;&nbsp;End If<br />&nbsp;&nbsp;Response.Write(&quot;&lt;div style=&quot;&quot;width:350px;height:1px; line-height:1px;border-bottom:solid 1px #c5cdd4&quot;&quot;&gt;&lt;/div&gt;&quot;)&nbsp;<br />&nbsp;&nbsp;Response.Write(&quot;&lt;table width=&quot;&quot;98%&quot;&quot; border=&quot;&quot;0&quot;&quot; cellspacing=&quot;&quot;0&quot;&quot; cellpadding=&quot;&quot;0&quot;&quot; align=&quot;&quot;center&quot;&quot;&gt;&quot;)<br />&nbsp;&nbsp;Response.Write(&quot;&lt;tr&gt;&quot;)<br />&nbsp;&nbsp;If Right(Path,1)&lt;&gt;&quot;/&quot; Then<br />&nbsp;&nbsp;&nbsp;Path=Path&amp;&quot;/&quot;<br />&nbsp;&nbsp;End If<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;Set Rs = Server.CreateObject(&quot;ADODB.Recordset&quot;)<br />&nbsp;&nbsp;Rs.CursorLocation = 1 <br />&nbsp;&nbsp;Rs.CursorType = 1<br />&nbsp;&nbsp;Rs.Fields.Append &quot;FileName&quot;,200,255<br />&nbsp;&nbsp;Rs.Fields.Append &quot;FileDate&quot;,200,255<br />&nbsp;&nbsp;Rs.open<br />&nbsp;&nbsp;If Err.number &lt;&gt; 0 Then<br />&nbsp;&nbsp;&nbsp;Response.Write(Err.Description)<br />&nbsp;&nbsp;&nbsp;Response.End()<br />&nbsp;&nbsp;End if<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;For Each Item In Folder.Files <br />&nbsp;&nbsp;Rs.AddNew <br />&nbsp;&nbsp;Rs.Fields(&quot;FileName&quot;) = item.Name <br />&nbsp;&nbsp;Rs.Fields(&quot;FileDate&quot;) = item.dateLastModified<br />&nbsp;&nbsp;Rs.Update <br />&nbsp;&nbsp;Next <br />&nbsp;&nbsp;Rs.Sort = &quot;FileDate Desc&quot; <br />&nbsp;&nbsp;If Not (Rs.Eof Or Rs.Bof) Then<br />&nbsp;&nbsp;&nbsp;Rs.MoveFirst<br />&nbsp;&nbsp;End If<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;Do While Not Rs.EOF<br />&nbsp;&nbsp;&nbsp;j=j+1<br />&nbsp;&nbsp;&nbsp;Response.Write(&quot;&lt;td height=&quot;&quot;30&quot;&quot; style=&quot;&quot;table-layout: fixed;WORD-BREAK: break-all; WORD-WRAP: break-word&quot;&quot; valign=&quot;&quot;top&quot;&quot; align=&quot;&quot;center&quot;&quot;&gt;&lt;a href=&quot;&quot;javascript:GetValue('&quot;&amp;Path&amp;Rs(&quot;filename&quot;)&amp;&quot;')&quot;&quot;&gt;&lt;img src=&quot;&quot;&quot;&amp;Path&amp;&quot;/&quot;&amp;Rs(&quot;filename&quot;)&amp;&quot;&quot;&quot; align=&quot;&quot;absmiddle&quot;&quot; width=&quot;&quot;100&quot;&quot; height=&quot;&quot;100&quot;&quot; style=&quot;&quot;border:solid 1px #CCCCCC;&quot;&quot;&gt;&lt;br/&gt;&quot;&amp;Rs(&quot;filename&quot;)&amp;&quot;&lt;/a&gt;&lt;/td&gt;&quot;)<br />&nbsp;&nbsp;&nbsp;If j Mod 3=0 Then<br />&nbsp;&nbsp;&nbsp;&nbsp;Response.Write(&quot;&lt;/tr&gt;&lt;tr&gt;&quot;)<br />&nbsp;&nbsp;&nbsp;End if<br />&nbsp;&nbsp;Rs.MoveNext<br />&nbsp;&nbsp;Loop<br />&nbsp;&nbsp;Rs.close<br />&nbsp;&nbsp;Set Rs=Nothing<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;If j=0 Then<br />&nbsp;&nbsp;Response.Write &quot;该文件目录下不存在任何文件。&quot;<br />&nbsp;&nbsp;End If<br />&nbsp;&nbsp;Response.Write(&quot;&lt;/tr&gt;&quot;)<br />&nbsp;&nbsp;Response.Write(&quot;&lt;Table&gt;&quot;)<br />&nbsp;Else<br />&nbsp;&nbsp;Response.Write(&quot;&amp;nbsp;&amp;nbsp;找不到该文件目录。&quot;)<br />&nbsp;End If<br />End If<br />End Function<br />%&gt;</p><p>注意下其中用到了Adodb.RecordSet对象，先将临时对象存入到RS中然后进行数据库表的排序，呵呵，跟.net一样，只是以前压根没有想到Asp居然也可以这样。</p>]]></description><category>程序代码</category><comments>http://www.940194.cn/ShowData/2009-09/20090911287.html#comment</comments><wfw:comment>http://www.940194.cn/</wfw:comment><wfw:commentRss>http://www.940194.cn/feed.asp?cmt=122</wfw:commentRss><trackback:ping>http://www.940194.cn/cmd.asp?act=tb&amp;id=122&amp;key=0ee53d71</trackback:ping></item><item><title>苍南渔寮望海湾渔家乐</title><author>a@b.com (apollo)</author><link>http://www.940194.cn/ShowData/2009-09/20090911530.html</link><pubDate>Fri, 11 Sep 2009 15:56:45 +0800</pubDate><guid>http://www.940194.cn/ShowData/2009-09/20090911530.html</guid><description><![CDATA[<p>承建单位：<a href="http://www.cnvp.com.cn/" target="_blank"><font color="#0a5d0a">温州市捷点信息技术有限公司</font></a><br />渔家乐网址：<a href="http://www.ylyjl.com/">http://www.ylyjl.com/</a><br />联系人：叶圣龙<br />客房预订电话：13868850645<br />电话：0577-64690802<br />手机：13868360879<br />标准客房、特色海鲜、农家菜、海景餐厅、沙滩OK、快艇<br />&nbsp;</p>]]></description><category>网站优化</category><comments>http://www.940194.cn/ShowData/2009-09/20090911530.html#comment</comments><wfw:comment>http://www.940194.cn/</wfw:comment><wfw:commentRss>http://www.940194.cn/feed.asp?cmt=121</wfw:commentRss><trackback:ping>http://www.940194.cn/cmd.asp?act=tb&amp;id=121&amp;key=39cd09d3</trackback:ping></item></channel></rss>

