正在加载...

呵呵,题目有点绕口。他们是一个咨询培训类型的公司,看上去很有前景。他们公司需要搞3个网站,很希望我过去,只是简单的聊了下公司的状况,吃了顿饭,要了我的联系方式,就回来了,我现在也很犹豫,到时候看看他们的待遇如何再说把,哎……

2007-6
11

今天新用到的功能,呵呵。不会ajax做不出dz的注册效果,这个也还行,呵呵。
<script language="javascript">
function checkName()
{
var NameStr=document.all.txtName.value
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.open("POST", "test.asp?uName="+NameStr, false);
xmlhttp.send();
if(xmlhttp.ResponseText==1)
alert("用户名已经存在");
else
alert("可以使用!");
}
</script>
用 户 名:<input type="text" id="txtName" name="txtName">
<input type="button" value="检测用户名" onclick="checkName()">

test.asp

<!--#include file="conn.asp" -->
<%
Set rs = Server.CreateObject ("ADODB.Recordset")
sql = "Select * from [users] where username='"&request("uName")&"'"
rs.Open sql,conn,1,1
if rs.EOF and rs.BOF then
response.write 0
else
response.write 1
end if
%>

2007-6
11

最近公司网站需要开发生成静态页功能,发现了这样的篇好文章,对于开发新闻系统有很大帮助。看后个人心得如下:模版数据保存在数据库中,则可在后台直接修改模版,用户发表新闻时,也可以自由选择多种模版(事先设置多个模版),此文是我认为十分全面的一篇关于ASP生成静态页的好文章,思路上对我启发很大。

原作者全文如下:

ASP2HTML WITH TEMPLET

我希望大家看到该标题就能让想象到它的功能:

1,WITH TEMPLET意思是,生成的页面架构将采用某个已设定的模板,在此之前我的一篇教程中介绍过,希望各位在看本教程之前对ASP采用模板应熟悉下。(当然,不看也没有问题,本教程同样会提及精华部分的:)

2,ASP2HTML。不要我再说ASP转变成HTML的好处了吧,呵呵,其中最值得知道的就是:静态HTML页和动态页对服务器的要求承受能力小得多,同样,静态HTML搜索几率远比动态页面的多得多。

那么,我现在需要处理的技术问题就是:
1,如何实现模板技术?(先参看下上篇文章吧)
2,如何实现2HTML技术?
3,如何让模板技术与2HTML技术结合?
More ...

2007-6
11
发表于: 生活 | 作者:
标签:

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>页面控制</title>
</head>
<style media="print">
.pageNext{
 page-break-after:always
}
</style>
<script language="vbscript">
function pageSet()//设置页眉页脚为空
dim hkey_root,hkey_path,hkey_key,RegWsh
hkey_root="HKEY_CURRENT_USER"
hkey_path="\Software\Microsoft\Internet Explorer\PageSetup"
Set RegWsh = CreateObject("WScript.Shell")
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,""  
  hkey_key="\footer"  
  RegWsh.RegWrite hkey_root+hkey_path+hkey_key,""  
end function
function pagesetup_default()//设置页眉页脚为默认值
dim hkey_root,hkey_path,hkey_key,RegWsh
hkey_root="HKEY_CURRENT_USER"
hkey_path="\Software\Microsoft\Internet Explorer\PageSetup"
on error resume next
  Set RegWsh = CreateObject("WScript.Shell")
  hkey_key="\header"
  RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"&w&b页码,&p/&P"
  hkey_key="\footer"
  RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"&u&b&d"
end function  

</script>

<body>

<OBJECT id=WebBrowser classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 width=0></OBJECT>

<input type="button" value="打开" onclick="document.all.WebBrowser.ExecWB(1,1)">
<input type="button" value="新建" onclick="document.all.WebBrowser.ExecWB(2,1)">
<input type="button" value="保存" onclick="document.all.WebBrowser.ExecWB(3,1)">
<input type="button" value="另存为" onclick="document.all.WebBrowser.ExecWB(4,1)">
<input type="button" value="属性" onclick="document.all.WebBrowser.ExecWB(10,1)">
<input type="button" value="打印" onclick="document.all.WebBrowser.ExecWB(6,1)">
<input type="button" value="直接打印" onclick="document.all.WebBrowser.ExecWB(6,6)">
<input type="button" value="打印预览" onclick="document.all.WebBrowser.ExecWB(7,1)">
<input type="button" value="页面设置" onclick="document.all.WebBrowser.ExecWB(8,1)">
<input type="button" value="撤消" onclick="document.all.WebBrowser.ExecWB(15,1)">
<input type="button" value="全选" onclick="document.all.WebBrowser.ExecWB(17,1)">
<input type="button" value="刷新" onclick="document.all.WebBrowser.ExecWB(22,1)">
<input type="button" value="无提示关闭" onclick="document.all.WebBrowser.ExecWB(45,1)">

</body>
</html>

可以从 http://ip.cn/nod/ 获得最新可用 NOD32 用户名密码,这个是我用来同步本地到服务器的 :)

program nod32pass;

{$APPTYPE CONSOLE}

uses
  SysUtils, Registry, Windows;

var
  Reg: TRegistry;
  buf: PByteArray;
  size: Integer;
  mask: array[0..19] of Byte = ($61, $D6, $D4, $E9, $DD, $F0, $FB, $F2, $5B, $64, $35, $AD, $B7, $C8, $19, $75, $EC, $31, $2B, $BC);
  i: integer;
  username, password: string;
begin
  try
    Reg := TRegistry.Create;
    try
      Reg.RootKey := HKEY_LOCAL_MACHINE;
     if Reg.OpenKeyReadOnly('SOFTWARE\Eset\Nod\CurrentVersion\Modules\Update\Settings\Config000\Settings') then
      begin
        username := Reg.ReadString('Username');
        size := Reg.GetDataSize('Password');
        GetMem(buf, size);
        Reg.ReadBinaryData('Password', buf^, size);

        i := 0;

        while i < size - 1 do
        begin
          password := password + chr(buf[i] xor mask[i]);
          Inc(i, 2);
        end;

        WriteLn('Username: ' + username);
        WriteLn('Password: ' + password);
      end;
    finally
      Reg.CloseKey;
      Reg.Free;
    end;
  except
    on E:Exception do
      Writeln(E.Classname, ': ', E.Message);
  end;
end.

可以从 http://www.newsmth.net/att.php?s.122.66988.1544.exe 下载得到编译好的可执行文件 :)