⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kitrule.xml

📁 这是一个规则文件.最原始的代码我手里头没有.但是这个有配置文件.用来存储语言格式的.
💻 XML
📖 第 1 页 / 共 5 页
字号:
          <attrvartype>5</attrvartype>
          <attropertype>0</attropertype>
          <attrmacrotype>0</attrmacrotype>
          <attrmacrono>0</attrmacrono>
          <attrdefault></attrdefault>
          <attrremark>留言录音路径加文件名</attrremark>
        </attr>
        <attr attrid="2">
          <attrname>var</attrname>
          <attrvartype>5</attrvartype>
          <attropertype>0</attropertype>
          <attrmacrotype>0</attrmacrotype>
          <attrmacrono>0</attrmacrono>
          <attrdefault></attrdefault>
          <attrremark>菜单收码变量</attrremark>
        </attr>
        <attr attrid="3">
          <attrname>tableandfield</attrname>
          <attrvartype>5</attrvartype>
          <attropertype>0</attropertype>
          <attrmacrotype>0</attrmacrotype>
          <attrmacrono>0</attrmacrono>
          <attrdefault></attrdefault>
          <attrremark>数据项(表名.字段名等)</attrremark>
        </attr>
        <attr attrid="4">
          <attrname>value</attrname>
          <attrvartype>5</attrvartype>
          <attropertype>0</attropertype>
          <attrmacrotype>0</attrmacrotype>
          <attrmacrono>0</attrmacrono>
          <attrdefault></attrdefault>
          <attrremark>需要insert的实际的值)</attrremark>
        </attr>
        </attrlist>
    
    <!-- 系统指令套件代码 -->
    
      <!-- 脚本原代码区 -->
		  <!-- 查数据纪录子流程 -->
  <subform id="SysForm10" remark="留言录音" type="2" startid="s2101">
  
  <!-- 留言录音 -->
  
   <multiplay id="s2101"
              remark="请您在听到滴的一声后进行留言.您有XX秒的留言时间.留言完毕请按#."
              dtmfruleid="6"
              playruleid="1"
              mixtype1="file"
              content1="sysform/sys10_001.voc"
              mixtype2="value"
              content2="$S_PRA0"
              mixtype3="file"
              content3="sysform/sys10_002.voc"
              next="s2102"/>

   <catch id="s2102" remark="判断放音收码结果">
        <onevent event="OnHangon" goto="s21018"/>
        <onevent event="OnPlayEnd" goto="s2103"/>
        <onevent event="OnRecvDTMF" goto="s2103"/>
        <onevent event="OnPlayError" goto="s2103"/>
        <onevent event="OnErrDTMF" goto="s2103"/>
   </catch>
   
 <!-- 开始录音 -->

   <recordfile id="s2103"
               remark="留言录音"
               filename="$S_PRA1"
               beep="true"
               maxtime="$S_PRA0"
               termchar="#"
               format="pcma"
               writemode="0"
               next="s2104"/>

    <catch id="s2104" remark="判断录音结果">
      <onevent event="OnHangon" goto="s21014"/>
      <onevent event="OnRecordEnd" goto="s2105"/>
      <onevent event="OnRecordError" goto="s2105"/>
    </catch>

 <!-- 听录音 -->
    <playfiles id="s2105"
              remark="您的留言如下:xxxxx"
              dtmfruleid="5"
              playruleid="1"
              filename1="sysform/sys10_003.voc"
              filename2="$S_PRA1"
              next="s2106"/>

    <catch id="s2106" remark="判断放音收码结果">
        <onevent event="OnHangon" goto="s21014"/>
        <onevent event="OnPlayEnd" goto="s2107"/>
        <onevent event="OnRecvDTMF" goto="s2107"/>
        <onevent event="OnPlayError" goto="s2107"/>
        <onevent event="OnErrDTMF" goto="s2107"/>
    </catch>

 <!-- 选择菜单 -->

    <playfile id="s2107"
              remark="重听录音请按1,重新录音请按2,确认请按3,取消请按4."
              dtmfruleid="1"
              playruleid="2"
              filename="sysform/sys10_004.voc"
              returndtmfs="$S_PRA2"
              next="s2108"/>

    <catch id="s2108" remark="判断放音收码结果">
        <onevent event="OnHangon" goto="s21014"/>
        <onevent event="OnPlayEnd" goto="s2107"/>
        <onevent event="OnRecvDTMF" goto="s2109"/>
        <onevent event="OnPlayError" goto="s2109"/>
        <onevent event="OnErrDTMF" goto="s2109"/>
    </catch>

    <switch id="s2109">
        <case cond="$S_PRA2=1" goto="s2105"/>
        <case cond="$S_PRA2=2" goto="s2103"/>
        <case cond="$S_PRA2=3" goto="s21010"/>
        <case cond="$S_PRA2=4" goto="s21014"/>
        <default goto="s21088"/>
    </switch>

  <!-- 写纪录并返回 -->

    <dbinsert id="s21010"
             remark="插入录音记录"
             sqls="insert into $S_PRA3 values ($S_PRA4)"
             next="s21011"/>

    <catch id="s21011" remark="判断数据库操作结果">
         <onevent event="OnDBSuccess" goto="s21012"/>
         <onevent event="OnDBFail" goto="s21013"/>
    </catch>

   <assign id="s21012" name="$S_PRB9" expr="0" next="s21099"/>
   <assign id="s21013" name="$S_PRB9" expr="1" next="s21099"/>
 
  <!-- 删除文件 -->
   <deletefile id="s21014" filename="$S_PRA1" next="s21015"/>
    
   <catch id="s21015"> 
      <onevent event="OnFail" goto="s21016"/>
      <onevent event="OnSuccess" goto="s21017"/>
      <onevent event="OnHangon" goto="s21018"/>
   </catch>

   <assign id="s21016" name="$S_PRB8" expr="0" next="s21099"/>
   <assign id="s21017" name="$S_PRB8" expr="1" next="s21099"/>
   <assign id="s21018" name="$S_PRB8" expr="2" next="s21099"/>
    
    <hangon id="s21088"/>
 
  <!-- 停止录音并返回一个标志 -->
  <stop id="s21019" next="s21018"/>

    <return id="s21099"/>
  
  </subform>
		    
</rule>

<rule kitid="11">
    <!-- 系统指令套件定义 -->
   
      <name>SysForm11</name>
      <explain>听录音文件子流程</explain>
      <type>0</type>
      <icon>SysForm11.ico</icon>
      <remark>用来处理听录音事务</remark>
      
      <attrlist attrnum="4">
        <attr attrid="0">
          <attrname>recordpathandname</attrname>
          <attrvartype>5</attrvartype>
          <attropertype>0</attropertype>
          <attrmacrotype>0</attrmacrotype>
          <attrmacrono>0</attrmacrono>
          <attrdefault>SubForm11</attrdefault>
          <attrremark>要听的录音文件的路径加文件名字段</attrremark>
        </attr>
        <attr attrid="1">
          <attrname>tablename</attrname>
          <attrvartype>5</attrvartype>
          <attropertype>0</attropertype>
          <attrmacrotype>0</attrmacrotype>
          <attrmacrono>0</attrmacrono>
          <attrdefault></attrdefault>
          <attrremark>数据表名</attrremark>
        </attr>
        <attr attrid="2">
          <attrname>querycondition</attrname>
          <attrvartype>5</attrvartype>
          <attropertype>0</attropertype>
          <attrmacrotype>0</attrmacrotype>
          <attrmacrono>0</attrmacrono>
          <attrdefault></attrdefault>
          <attrremark>查询条件</attrremark>
        </attr>
        <attr attrid="3">
          <attrname>dtmf</attrname>
          <attrvartype>5</attrvartype>
          <attropertype>0</attropertype>
          <attrmacrotype>0</attrmacrotype>
          <attrmacrono>0</attrmacrono>
          <attrdefault></attrdefault>
          <attrremark>接收按键</attrremark>
        </attr>
        <attr attrid="4">
          <attrname>dtmf</attrname>
          <attrvartype>5</attrvartype>
          <attropertype>0</attropertype>
          <attrmacrotype>0</attrmacrotype>
          <attrmacrono>0</attrmacrono>
          <attrdefault></attrdefault>
          <attrremark>接收按键(要跳转的纪录号)</attrremark>
        </attr>
        </attrlist>
    
    <!-- 系统指令套件代码 -->
    
      <!-- 脚本原代码区 -->
		  <!-- 听录音文件子流程 -->
<subform id="SysForm11" remark="听录音文件" type="2" startid="s2111">
  
   <!-- 按要求查找录音文件 -->
  
   <dbquery id="s2111"
           remark="查询符合条件的语音纪录"
           sqls="select $S_PRA0 from $S_PRA1 where 1=1 and $S_PRA2"
           returnrecords="$S_PRB1"
           returnfields="$S_PRB2"
           next="s2112"/>
 
   <catch id="s2112" remark="">         
		   <onevent event="OnHangon" goto="s21116" />
			 <onevent event="OnDBSuccess" goto="s2113" />
			 <onevent event="OnDBFail" goto="s21115" />
   </catch>
  
  <!-- 放音并接收按键 -->
  
  <playfile id="s2113"
          remark="听第一条请按1,听下一条请按2,听上一条请按3,听最后一条请按4,跳到指定记录请按5,按#返回"
          dtmfruleid="1"
          playruleid="2"
          filename="sysform/sys11_001.voc"
          returndtmfs="$S_PRA3"
          next="s2114"/>

    <catch id="s2114" remark="判断放音收码结果">
      <onevent event="OnHangon" goto="s21116"/>
      <onevent event="OnPlayEnd" goto="s2113"/>
      <onevent event="OnRecvDTMF" goto="s2115"/>
      <onevent event="OnPlayError" goto="s2113"/>
      <onevent event="OnErrDTMF" goto="s2113"/>
    </catch>

    <switch id="s2115">
      <case cond="$S_PRA3=1" goto="s2116"/>
      <case cond="$S_PRA3=2" goto="s2117"/>
      <case cond="$S_PRA3=3" goto="s2118"/>
      <case cond="$S_PRA3=4" goto="s2119"/>
      <case cond="$S_PRA3=5" goto="s21117"/>
      <case cond="$S_PRA3='#'" goto="s21121"/>
      <default goto="s2113"/>
    </switch>

    <!--指针跳转-->

    <dbfirst id="s2116" failgoto="s21115" next="s21110"/>
    <dbnext id="s2117" failgoto="s21115" next="s21110"/>
    <dbprior id="s2118" failgoto="s21115" next="s21110"/>
    <dblast id="s2119" failgoto="s21115" next="s21110"/>
    
    <catch id="s21110" remark="判断数据库操作结果">
      <onevent event="OnHangon" goto="s21116"/>
      <onevent event="OnDBSuccess" goto="s21111"/>
      <onevent event="OnDBFail" goto="s21115"/>
    </catch>
  
     <!--依据字段名取得录音文件及文件名-->
  
    <dbfieldname id="s21111"
             remark="取语音文件名"
             fieldname="$S_PRA0"
             returnvalue="$S_PRB0"
             failgoto="s21115"
             next="s21112"/>
    
    <catch id="s21112" remark="判断数据库操作结果">
      <onevent event="OnHangon" goto="s21116"/>
      <onevent event="OnDBSuccess" goto="s21113"/>
      <onevent event="OnDBFail" goto="s21115"/>
    </catch>   
    
     <!--播放录音文件-->
     
    <playfile id="s21113"
            remark="播放录音文件"
            dtmfruleid="2"
            playruleid="2"
            filename="$S_PRB0"
            returndtmfs="$S_PRA3"
            next="s21114"/>
  
    <catch id="s21114" remark="判断放音收码结果">
      <onevent event="OnHangon" goto="s21115"/>
      <onevent event="OnPlayEnd" goto="s2113"/>
      <onevent event="OnRecvDTMF" goto="s2113"/>
      <onevent event="OnPlayError" goto="s2113"/>
      <onevent event="OnErrDTMF" goto="s2113"/>
    </catch>
  
  <!--返回标识-->
  
   <assign id="s21115" name="$S_PRB9" expr="0" next="s21199"/>
   <assign id="s21116" name="$S_PRB9" expr="2" next="s21199"/>
   <assign id="s21121" name="$S_PRB9" expr="3" next="s21199"/>

   <!--指点记录数并跳转-->
   <!--放音并接收要跳转的纪录按键-->

  <playfile id="s21117"
          remark="请输入留言记录号"
          dtmfruleid="2"
          playruleid="2"
          filename="sysform/sys11_002.voc"
          returndtmfs="$S_PRA4"
          next="s21118"/>

    <catch id="s21118" remark="判断放音收码结果">
      <onevent event="OnHangon" goto="s21116"/>
      <onevent event="OnPlayEnd" goto="s21117"/>
      <onevent event="OnRecvDTMF" goto="s21119"/>
      <onevent event="OnPlayError" goto="s21117"/>
      <onevent event="OnErrDTMF" goto="s21117"/>
    </catch>
    
    <switch id="s21119">
      <case cond="$S_PRA4='#'" goto="s21117"/>
      <case cond="$S_PRA4>=0" goto="s21120"/>
      <default goto="s21117"/>
    </switch>
    
    <!--跳转-->
    
    <dbgoto id="s21120" recordno="$S_PRA4" failgoto="s21115" next="s21122"/>
    
    <catch id="s21122" remark="判断数据库操作结果">
      <onevent event="OnHangon" goto="s21116"/>
      <onevent event="OnDBSuccess" goto="s21111"/>
      <onevent event="OnDBFail" goto="s21115"/>
    </catch>
    
   <return id="s21199"/>
  
  </subform>
		    
</rule>

<rule kitid="12">

  <name>SysForm12</name>
  <explain>
    功能:帐号和密码输入及认证子流程
    描述:根据给定的数据表名,帐号,密码字段,核对用户输入的帐号和密码。
          为避免恶意拨打,用户仅拥有三次输入机会,如三次输入错误流程将返回认证失败标志0
          认证成功则返回用户输入的帐号和认证成功标志1
  </explain>
  <type>2</type>
  <icon>SysForm12.ico</icon>
  <remark>
    $S_PRA0:传入参数,数据表名
    $S_PRA1:传入参数,帐号字段名
    $S_PRA2:传入参数,密码字段名
    $S_PRB0:返回参数,认证是否成功标志(1-成功,0-失败)
    $S_PRB1:返回参数,认证成功返回用户帐号
    $S_PRB6:临时变量,存放用户输入帐号密码的次数
    $S_PRB7:临时变量,存放用户输入的帐号
    $S_PRB8:临时变量,存放用户输入的密码 
    $S_PRB9:临时变量,存放数据表查询结果
  </remark>
  
      <attrlist attrnum="2">
        <attr attrid="0">
          <attrname>S_PRA0</attrname>
          <attrvartype>5</attrvartype>
          <attropertype>0</attropertype>
          <attrmacrotype>0</attrmacrotype>
          <attrmacrono>0</attr

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -