icq蓝牙

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version.

在本教程中,我将重点介绍如何使用WhizBase作为向ICQ发送ICQ消息的工具。 在这里,我将在WhizBase 5.1版本中发布的WhizBase中使用一项新技术。

In this tutorial I will use 3 files, pager.wbsp for the processing, email.wbsp for sending the messages and eng.ic as a language file.

在本教程中,我将使用3个文件,pager.wbsp用于处理,email.wbsp用于发送消息,以及eng.ic作为语言文件。

Multilingual abilities

多语种能力

WhizBase has built-in multilingual support, but I will not use it in this tutorial because it is not supported in 5.1 version. So I will use the older method of including a language file.

WhizBase具有内置的多语言支持,但在本教程中我将不使用它,因为5.1版本不支持它。 因此,我将使用包含语言文件的较旧方法。

In this language file we will define variables with the language content:

在此语言文件中,我们将使用语言内容定义变量:

$wbsetv[l_send|Send the message to this ICQ number:]
$wbsetv[l_emne|Subject:]
$wbsetv[l_besked|Message:]
$wbsetv[l_ditnavn|Your name:]
$wbsetv[l_dinepost|Your email address:]
$wbsetv[l_sendbeskeden|Send the message]
$wbsetv[l_icqikkeudfyldt|You forgot to fill in the ICQ number that the message should be sent to.]
$wbsetv[l_ingenbesked|You forgot to write a message.]
$wbsetv[l_tilbage|Back]
$wbsetv[l_over450tegn|The message is too long. Maximum is 450 characters.]
$wbsetv[l_epostikkeudfyldt|You forgot to fill in your email address.]
$wbsetv[l_beskedenafsendt|The message has been sent.]

I've used $wbsetv to set language variables, now I will save this code as "lang.ic" and put it in lang folder I have created on webs root. I have that practice to separate language files from others.

我使用$ wbsetv设置语言变量,现在我将这段代码另存为“ lang.ic”并将其放在在web根目录下创建的lang文件夹中。 我有将语言文件与其他文件分开的做法。

Subroutine code

子程序代码

WhizBase supports subroutines (from version 5.1 on); it is something like a custom function available in some languages like VB. This is a powerful new technology in WhizBase which eases rapid application developments.

WhizBase支持子例程(从5.1版本开始); 它类似于自定义功能,在某些语言(如VB)中可用。 这是WhizBase中一项功能强大的新技术,可简化快速的应用程序开发。

The code of a subroutine can be added in any place in WhizBase code, but it is preferably to put it after <!--WB_BeginTemplate--> so we can find it easily.

可以在WhizBase代码的任何位置添加子例程的代码,但最好将其放在<!-WB_BeginTemplate->之后,以便我们轻松找到它。

The syntax used for adding subroutines is:

用于添加子例程的语法为:

<!--WB_BeginSub_subroutinename-->
subroutine code
<!--WB_EndSub-->

We will need to provide the subroutine name and the subroutine code, which is any set of WhizBase commands and code.

我们将需要提供子例程名称和子例程代码,它是任何WhizBase命令和代码集。

I will make a subroutine to show a back input with error message if the user makes any mistake in the form.

如果用户在表单中有任何错误,我将创建一个子例程以显示带有错误消息的反向输入。

#* we define the pager Subroutine *#
<!--WB_BeginSub_pager-->
<html><head><title>Pager</title>
<style type=text/css>
body {background:white; font-family:helvetica; font-size:10pt; color:#000000}
</style>
</head><body>
<center>$wbgetv[msg]<br />
<input type="button" onClick="history.go(-1)" value="&lt;&lt;&lt; $wbgetv[l_tilbage]">
</center>
</body></html>
<!--WB_EndSub-->

Call the language file

调用语言文件

I will call the language file by wbrinc after defining which language I am using.

在定义我使用的语言之后,我将通过wbrinc调用语言文件。

#* Please set here your language file *#
$wbsetv[lang|eng]
#**************************************##* We include the language file *#
$wbrinc[lang/$wbgetv[lang].ic]

As you see I am using relative paths but I can also use absolute paths, WhizBase supports both.

如您所见,我正在使用相对路径,但我也可以使用绝对路径,WhizBase支持两者。

The Form

表格

I will make a simple HTML form which submits the page to itself, I will put it in a variable so I can use it later where I need it.

我将制作一个简单HTML表单,将页面提交给它自己,将其放入变量中,以便以后可以在需要时使用它。

$wbsetv[formular|<form action="" method="post"><table bgcolor="#cccccc" border="#000000" cellspacing="0" cellpadding="5">
<tr><td><font size="2" face="arial" color="#000000">$wbgetv[l_send]</td>
<td><input type="text" name="icqnummer" size="25" /></td>
<tr><td><font size="2" face="arial" color="#000000">$wbgetv[l_emne]</td>
<td><input type="text" name="emne" size="25" /></td>
<tr><td><font size="2" face="arial" color="#000000">$wbgetv[l_besked]</td>
<td><textarea name="besked" cols="25" rows="8" wrap"=virtual"></textarea></td>
<tr><td><font size="2" face="arial" color="#000000">$wbgetv[l_ditnavn]</td>
<td><input type="text" name="navn" size="25" /></td>
<tr><td><font size="2" face="arial" color="#000000">$wbgetv[l_dinepost]</td>
<td><input type="text" name="epost" size="25" /></td>
<tr><td>&nbsp;</td>
<td><font size="2" face="arial" color="#000000"><input type="submit" name="submit" value="$wbgetv[l_sendbeskeden]" />
</table></form>]

As I previously indicated, I am using language file's variables instead of text. This is to support multilingualism.

如前所述,我正在使用语言文件的变量而不是文本。 这是为了支持多种语言。

If this do that, if not do not, then do that or this

如果这样做,如果不是,则这样做

I made a simple validation IF conditions block, I am using this like that just to show how we can use complex IF conditions in WhizBase, but in real life I use JS for this type of validation - then there's no need to refresh the page to validate if an input is empty.

我做了一个简单的验证IF条件块,我正像这样使用它,只是为了展示我们如何在WhizBase中使用复杂的IF条件,但是在现实生活中,我使用JS来进行这种类型的验证-则无需刷新页面即可验证输入是否为空。

$wbif["$wbv[submit]"<>""|$wbsetv[OK|1]$wbif["$wbv[emne]"=""|$wbsetv[OK|0]$wbsetv[emne|No subject]|$wbsetv[emne|$wbv[emne]]]$wbif["$wbv[navn]"=""|$wbsetv[OK|0]$wbsetv[navn|No name]|$wbsetv[navn|$wbv[navn]]]#* If no ICQ number was specified...  *#$wbif["$wbv[icqnummer]"=""|$wbsetv[OK|0]$wbsetv[msg|$wbgetv[l_icqikkeudfyldt]] $wbsub[pager]|#* If the user did not write a message...  *#$wbif[$wblen[$wbv[besked]]=0|$wbsetv[OK|0]$wbsetv[msg|$wbgetv[l_ingenbesked]] $wbsub[pager]|#* The message body cannot contain more than 450 characters  *#$wbif[$wblen[$wbv[besked]]>450|$wbsetv[OK|0]$wbsetv[msg|$wbgetv[l_over450tegn]] $wbsub[pager]|#* If the user did not specify his/her email address...  *#$wbif[$wblen[$wbv[epost]]=0|$wbsetv[OK|0]$wbsetv[msg|$wbgetv[l_epostikkeudfyldt]] $wbsub[pager]|]]]]#* Sending the message *#$wbif[$wbgetv[OK]=1|$wbsetv[msg|$wbgetv[l_beskedenafsendt]] $wbsetv[to|$wbv[icqnummer]@pager.icq.com] $wbsetv[body|$wbv[besked]] $wbsetv[from|$wbgetv[navn] <$wbv[epost]>] $wbgeturl[email.wbsp?to=$wbesc[$wbgetv[to]]&from=$wbesc[$wbgetv[from]]&body=$wbesc[$wbgetv[body]]]|]
|
$wbgetv[formular]
]

The first IF is to check if I have submitted the form or I am coming to the site first time. If the submit is submitted I will go ahead with validation, if not I will show the form variable.

第一个IF是要检查我是否已提交表格,还是我第一次来该网站。 如果提交了提交,我将继续进行验证,否则,我将显示form变量。

Then I have a number of conditions, if everything is OK I will go on and send the message to ICQ, if not I will define the error message from the language file and call the subroutine.

然后,我遇到了许多情况,如果一切正常,我将继续并将消息发送给ICQ,否则,我将从语言文件中定义错误消息并调用子例程。

If everything is OK, I call a file I will create later by $wbgeturl, I named it email.wbsp, and will pass to it variables to, from, and body. All escaped by $wbesc function.

如果一切正常,我将调用$ wbgeturl稍后创建的文件,将其命名为email.wbsp,并将变量传递给,来自和正文。 $ wbesc函数全部转义了。

In case one of the conditions do not pass I call the subroutine pager by $wbsub[] to show the error message.

如果其中一个条件没有通过,我通过$ wbsub []调用子例程寻呼机以显示错误消息。

In case I did not submit a form yet it will skip all the conditions and show me the form we specified above before.

如果我没有提交表格,它将跳过所有条件,并向我们显示我们之前指定的表格。

Now we will put all this together in one file:

现在,我们将所有这些放到一个文件中:

[FormFields]
WB_Command=R
wb_showlogo=F
<!--WB_BeginTemplate-->
#* Please set here your language file *#
$wbsetv[lang|eng]
#**************************************##* We include the language file *#
$wbrinc[lang/$wbgetv[lang].ic]#* we define the pager Subroutine *#
<!--WB_BeginSub_pager-->
<html><head><title>Pager</title>
<style type=text/css>
body {background:white; font-family:helvetica; font-size:10pt; color:#000000}
</style>
</head><body>
<center>$wbgetv[msg]<br />
<input type="button" onClick="history.go(-1)" value="&lt;&lt;&lt; $wbgetv[l_tilbage]">
</center>
</body></html>
<!--WB_EndSub-->$wbsetv[formular|<form action="" method="post"><TABLE bgcolor="#cccccc" border="#000000" cellspacing="0" cellpadding="5">
<tr><td><font size="2" face="arial" color="#000000">$wbgetv[l_send]</td>
<td><input type="text" name="icqnummer" size="25" /></td>
<tr><td><font size="2" face="arial" color="#000000">$wbgetv[l_emne]</td>
<td><input type="text" name="emne" size="25" /></td>
<tr><td><font size="2" face="arial" color="#000000">$wbgetv[l_besked]</td>
<td><textarea name="besked" cols="25" rows="8" wrap"=virtual"></textarea></td>
<tr><td><font size="2" face="arial" color="#000000">$wbgetv[l_ditnavn]</td>
<td><input type="text" name="navn" size="25" /></td>
<tr><td><font size="2" face="arial" color="#000000">$wbgetv[l_dinepost]</td>
<td><input type="text" name="epost" size="25" /></td>
<tr><td>&nbsp;</td>
<td><font size="2" face="arial" color="#000000"><input type="submit" name="submit" value="$wbgetv[l_sendbeskeden]" />
</table></form>]$wbif["$wbv[submit]"<>""|$wbsetv[OK|1]$wbif["$wbv[emne]"=""|$wbsetv[OK|0]$wbsetv[emne|No subject]|$wbsetv[emne|$wbv[emne]]]$wbif["$wbv[navn]"=""|$wbsetv[OK|0]$wbsetv[navn|No name]|$wbsetv[navn|$wbv[navn]]]#* If no ICQ number was specified...  *#$wbif["$wbv[icqnummer]"=""|$wbsetv[OK|0]$wbsetv[msg|$wbgetv[l_icqikkeudfyldt]] $wbsub[pager]|#* If the user did not write a message...  *#$wbif[$wblen[$wbv[besked]]=0|$wbsetv[OK|0]$wbsetv[msg|$wbgetv[l_ingenbesked]] $wbsub[pager]|#* The message body cannot contain more than 450 characters  *#$wbif[$wblen[$wbv[besked]]>450|$wbsetv[OK|0]$wbsetv[msg|$wbgetv[l_over450tegn]] $wbsub[pager]|#* If the user did not specify his/her email address...  *#$wbif[$wblen[$wbv[epost]]=0|$wbsetv[OK|0]$wbsetv[msg|$wbgetv[l_epostikkeudfyldt]] $wbsub[pager]|]]]]#* Sending the message *#$wbif[$wbgetv[OK]=1|$wbsetv[msg|$wbgetv[l_beskedenafsendt]] $wbsetv[to|$wbv[icqnummer]@pager.icq.com] $wbsetv[body|$wbv[besked]] $wbsetv[from|$wbgetv[navn] <$wbv[epost]>] $wbgeturl[email.wbsp?to=$wbesc[$wbgetv[to]]&from=$wbesc[$wbgetv[from]]&body=$wbesc[$wbgetv[body]]]|]
|
$wbgetv[formular]
]

Save this file as default.wbsp.

将此文件另存为default.wbsp。

Sending the email

发送邮件

Finally the message we want to send to some ICQ account we send it by email. In WhizBase sending emails are very simple. You just need four variables, three we have already passed in the $wbgeturl function and the fourth is set in this file.

最后,我们要发送到某个ICQ帐户的邮件,我们通过电子邮件发送。 在WhizBase中,发送电子邮件非常简单。 您只需要四个变量,三个变量已经传递给$ wbgeturl函数,而第四个变量已在此文件中设置。

[FormFields]
wb_mailserver=mail.localhost #* Here we define the outgoing mail server *#
wb_command=p
WB_To=$wbv{to}
WB_From=$wbv{from}
<!--WB_BeginTemplate-->
$wbv[body]

I hope this tutorial helped you learn more about WhizBase capabilities. Until the next article, have a good time.

我希望本教程可以帮助您了解有关WhizBase功能的更多信息。 在下一篇文章之前,玩得开心。

For more information email me at: NurAzije [at] Gmail [dot] com

有关更多信息,请给我发送电子邮件:NurAzije [at] Gmail [dot] com

Or visit WhizBase official site at www.whizbase.com

或访问WhizBase官方网站www.whizbase.com

NurAzije is a PHP and WhizBase programmer, who at the time of article publication is working in partnership with WhizBase on several projects.

- - -

---

翻译自: https://www.experts-exchange.com/articles/2634/Using-WhizBase-to-send-ICQ-messages.html

icq蓝牙

icq蓝牙_使用WhizBase发送ICQ消息相关推荐

  1. java发送小程序模板消息,记录_小程序发送模板消息

    package com.mj.frame.entity.resp; import java.io.Serializable; import java.util.List; import java.ut ...

  2. 企业微信推送消息延迟_企业微信发送应用消息的实现

    企业号升级到企业微信后,发送应用消息的接口也变化了不少,除了原来的文本.图片.文件.语音.视频.图文消息等消息外,增加了文本卡片.markdown消息.小程序通知消息等内容,不过它们都可以共用一个接口 ...

  3. python数据包发送给云平台_用python发送短消息(基于阿里云平台)

    新版短信接口在线测试页面:https://api.aliyun.com/new#/?product=Dysmsapi&api=SendSms&params={}&tab=DEM ...

  4. 企业微信推送消息延迟_企业微信发送应用消息,员工无法接收到推送消息。

    请求消息体:[touser=18666211235,toparty=,totag=,agentid=1000040,msgtype=text,content=,media_id=,title=,des ...

  5. 用ASP.Net写一个发送ICQ信息的程序

    这里我给大家提供一个很实用的例子,就是在线发送ICQ信息.想一想我们在网页上直接给朋友发送ICQ信息,那是多么美妙的事情啊.呵呵,在吹牛啊,其实ICQ本来就有在线发送的代码,不过,这些都是AOL给你写 ...

  6. 使用Java实现发送微信消息(附源码)_此程序在手再也不怕对象跟你闹了

    使用Java实现发送微信消息(附源码)_此程序在手再也不怕对象跟你闹了 此程序在手再也不怕女朋友跟你闹了!!!!自从有了女朋友比如:早安.晚安之类的问候语可不能断,但是也难免有时候会忘记那么该咋么办呢 ...

  7. 发送延迟消息_微信延迟消息的发送方式

    Part one. 如何使用微信来发送延迟消息呢? Part two. 之前一次偶然的机会,想要定时发送一个消息给朋友,于是产生了微信能否发送定时消息这个念头.去百度了一下,找到了方法.微信是可以定时 ...

  8. 公众号 接收规则 消息_微信公众平台 发送模板消息(Java接口开发)

    前言:最近一直再弄微信扫码推送图文消息和模板消息发送,感觉学习到了不少东西.今天先总结一下微信公众平台模板消息的发送.因为这个自己弄了很久,开始很多地方不明白,所以今天好好总结一下. 微信公众平台技术 ...

  9. java 模板接口开发_微信公众平台 发送模板消息(Java接口开发)

    前言:最近一直再弄微信扫码推送图文消息和模板消息发送,感觉学习到了不少东西.今天先总结一下微信公众平台模板消息的发送.因为这个自己弄了很久,开始很多地方不明白,所以今天好好总结一下. 微信公众平台技术 ...

最新文章

  1. 使用OpenCV为视频中美女加上眼线
  2. 捆绑调整Bundle Adjustment(最速下降法、牛顿法、Levenberg-Marquartdt法)
  3. Semaphore(信号量)
  4. android density 和款高度,Android Density(密度)
  5. android preference tab,Android SharedPreference - TabHost问题
  6. HDOJ-3790-最短路径问题 解题报告
  7. Full Tank?
  8. angular js 默认选中_AngularJS Select(选择框)
  9. 在ASP.NET Core 2.0中创建Web API
  10. 手把手叫你玩转网络编程系列之三 完成端口(Completion Port)详解
  11. html5学习之canvas模块的简单使用,作画三角形、圆形、矩形等
  12. Excel按某一列排序
  13. 全国职称计算机题库视频,全国职称计算机考试题库模拟训练—windowsXP
  14. vue jsonp跨域
  15. win10 matlab打开,win10系统启动matlab出现闪退的处理步骤
  16. vue中使用layui实现树形菜单增删改查功能
  17. php中md5加密函数怎么用,用PHP写的MD5加密函数
  18. 爬虫与反爬虫,永恒的道高一尺魔高一丈
  19. 电影《肖申克的救赎》给你最深的感受是什么?
  20. Distill文章-A gentle introduction to graph Neural Networks(图神经网络是怎么构造的)

热门文章

  1. 生活.小米移动电话卡1718或1719号段的接入点设置
  2. matlab 天线设计 泰勒加权_泰勒加权功分器
  3. vue前端实现从数据库获取数据的下拉框以及带参请求
  4. 跨境电商卖家应该掌握的9种电子邮件创意营销方法
  5. Android 8.1 中Systemui中的常见修改(二)电池的修改
  6. 智能合约开发——TypeScript 基础(全)
  7. 【Py】使用graphviz可视化对象引用关系
  8. 派生类的构造函数和析构函数
  9. 万物流变:从辩证法看互联网架构和人生
  10. 基于微信失物招领小程序系统设计与实现 开题报告