rejetto forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - zhenhai

Pages: 1
1
中文 - Chinese / Add a simple DNS service for intranet
« on: May 17, 2009, 02:58:28 AM »
[mydns]
{{if|{{?name}}|{{\
{{append|weburl.txt|  <a target='bank' href="{{?weburl}}" title="{{?memo}}">{{?name}}</a>./append}}/}}/if}}
<form name=frm>
<p>本模块功能相当于为内部网络系统提供了一个简易的DNS地址解析服务/this module is A simple DNS service
<p>请输入你要推荐的网站(或自己的)链接地址/Input your web link
<p>内网最好是IP防止域名解析失败,网站说明要简洁明了,不夸大其词。
<p>如果允许https方式访问请在备注中说明
<p>网站名称/web name:<input name=name size=40 value="">
<p>网站链接/web link:<input name=weburl size=60 value="http://">
<p>该网站的简单说明和备注/memo:
<p><TEXTAREA name=memo ROWS="6" COLS="40"></TEXTAREA>
<p><input type=submit value="添加网站链接/Add a web link" >
</form>
<script>document.frm.name.focus();</script>
<br>{{load|weburl.txt}}

2
HTML & templates / how to limit the chat.txt size?
« on: April 18, 2009, 05:59:42 AM »
a white board code as that,  ihave a question: how to limit the chat.txt filesize?

 
[chat]
{{if|{{?text}}|{{\
{{save|chat.txt|({{time}}){{?name1}}{{if|{{?name2}}|对{{?name2}}/if}}留言:\n{{?text}}\n{{load|chat.txt}}/save}}/}}/if}}

<form name=frm>
<input name=name1 size=10 value="{{?name1}}">对<input name=name2 size=10

value="{{?name2}}">留言:
<p><TEXTAREA name=text ROWS="3" COLS="40"></TEXTAREA>
<p><input type=submit value="提交留言" >
</form>
<script>document.frm.text.focus();</script>
<br><TEXTAREA ROWS="30" COLS="40">{{load|chat.txt}}</TEXTAREA>

3
Programmers corner / logout suggestion
« on: April 15, 2009, 09:55:25 AM »
Advice on ~Login and ~logout
I study the source text: newuserpassDlg.pss, I found how to solve the HFS Logout/quit question. I mean since the HFS has a select properties on Anonmous, why we add a choice when userBox.text = '' ? when a blank user try to login, we can log HFS with a hidden default user: @anonmous (of course the "@" is still kept in characters check list!), it means to logout/quit your user account.

The source text said:

procedure TnewuserpassFrm.okBtnClick(Sender: TObject);
var
  error: string;
begin
userBox.text:=trim(userBox.text);
pwdBox.text:=trim(pwdBox.text);
error:='';
if (userBox.text > '') and not validUsername(userBox.Text)
or (pwdBox.text > '') and not validUsername(pwdBox.text) then
  error:='The characters below are not allowed'#13'/\:?*"<>|;&&@'
else if (pwdBox.text > '') and (userBox.text = '') then
  error:='User is mandatory'
else if pwdBox.text <> pwd2Box.text then
  error:='The two passwords you entered don''t match';

//add by zhenhai
if (userBox.text = '') then
userBox.text ="@anonmous";
error = ''
//


if error = '' then ModalResult:=mrOk
else msgDlg(error, MB_ICONERROR);
end;


Pages: 1