• <s id="1jjov"><bdo id="1jjov"></bdo></s>
    <s id="1jjov"></s>

    
    

      <sup id="1jjov"></sup>
        1. <s id="1jjov"><nobr id="1jjov"><ins id="1jjov"></ins></nobr></s>
           
          售前咨詢QQ:QQ412395521
          業(yè)務(wù)合作QQ:QQ627174919
          位置:首頁 > 知新 > 帝國CMS > 教程發(fā)布

          帝國CMS 6.0功能解密之會員空間信息標(biāo)簽調(diào)用

          時間:2009-09-02 19:44:24
              帝國CMS6.0版新增了針對會員空間信息調(diào)用的“靈動標(biāo)簽函數(shù)”,使會員空間模板增加信息調(diào)用更簡單,不用寫sql查詢執(zhí)行代碼。

          空間的“靈動標(biāo)簽函數(shù)”語法基本同靈動標(biāo)簽,大家回顧下靈動標(biāo)簽語法:
          點(diǎn)擊這里查看:http://m.newskycloth.com/doc/ecmsedu/base/mbzz/html/sysbq.html#eloop


          空間的“靈動標(biāo)簽函數(shù)”具體語法為如下:
          <?php
          $spacesql=espace_eloop(欄目ID,顯示條數(shù),操作類型,只顯示有標(biāo)題圖片);
          while($spacer=$empire->fetch($spacesql))
          {
                  $spacesr=espace_eloop_sp($spacer);
          ?>
          模板代碼內(nèi)容
          <?
          }
          ?>

          1、espace_eloop函數(shù)的參數(shù)怎么跟靈動標(biāo)簽一樣?是的,參數(shù)完全一樣,設(shè)置的內(nèi)容也是一樣,支持靈動標(biāo)簽的所有操作類型。
          “欄目ID”:多個欄目ID、專題ID與標(biāo)題分類ID可用,號格開,如'1,2'; 如果是按SQL語句調(diào)用,則此處為SQL語句。
          “顯示條數(shù)”:顯示前幾條記錄。
          “操作類型”:同標(biāo)簽調(diào)用的操作類型。
          “只顯示有標(biāo)題圖片”:0為不限制,1為只顯示有標(biāo)題圖片的信息。

          2、$spacer變量是什么?$spacer相當(dāng)于靈動標(biāo)簽的“$bqr”變量:
          $spacer[字段名]

          3、$spacesr=espace_eloop_sp($spacer);是什么作用?“espace_eloop_sp”函數(shù)是返回特殊字段內(nèi)容數(shù)組,相當(dāng)于靈動標(biāo)簽的$bqsr變量:
          $spacesr[titleurl]:標(biāo)題鏈接
          $spacesr[classname]:欄目名稱
          $spacesr[classurl]:欄目鏈接


          舉例說明
          例子1:用空間“靈動標(biāo)簽函數(shù)”實(shí)現(xiàn)如下圖效果

          實(shí)現(xiàn)代碼為如下:
          <table width="380" border="0" cellpadding="3" cellspacing="1" bgcolor="#96C8F1" align="center">
            <tr>
              <td background="template/default/images/bg_title_sider.gif"><b>最新新聞</b></td>
            </tr>
            <tr>
              <td bgcolor="#FFFFFF">
                          <table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <?php
                          $spacesql=espace_eloop(2,5,0,0);
                          while($spacer=$empire->fetch($spacesql))
                          {
                                  $spacesr=espace_eloop_sp($spacer);
                          ?>
                                  <tr>
                                          <td height="25">
                                                  <img src="template/default/images/li.gif" width="15" height="10"><a href="<?=$spacesr[titleurl]?>" target="_blank"><?=$spacer[title]?></a> (<?=date('Y-m-d',$spacer[newstime])?>)
                                          </td>
                                  </tr>
                          <?
                          }
                          ?>
                                </table>
                  </td>
            </tr>
          </table>
          說明:調(diào)用欄目ID=2的最新5條信息。(date為時間格式化函數(shù))

          例子2:用空間“靈動標(biāo)簽函數(shù)”實(shí)現(xiàn)如下圖效果

          實(shí)現(xiàn)代碼為如下:
          <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#96C8F1" align="center">
            <tr>
              <td background="template/default/images/bg_title_sider.gif"><b>圖片新聞</b></td>
            </tr>
            <tr>
              <td bgcolor="#FFFFFF">
                          <table width="100%" border="0" cellspacing="1" cellpadding="3">
                                  <tr>
                                  <?php
                                  $spacesql=espace_eloop(2,4,0,1);
                                  while($spacer=$empire->fetch($spacesql))
                                  {
                                          $spacesr=espace_eloop_sp($spacer);
                                  ?>
                                          <td height="25" align="center">
                                                  <a href="<?=$spacesr[titleurl]?>" target="_blank"><img src="<?=$spacer[titlepic]?>" width="108" height="72" border="0"></a>
                                                  <br>
                                                  <a href="<?=$spacesr[titleurl]?>" target="_blank"><?=esub($spacer[title],20)?></a>
                                          </td>
                                  <?
                                  }
                                  ?>
                                  </tr>
                                </table>
                  </td>
            </tr>
          </table>
          說明:調(diào)用帶標(biāo)題圖片的最新4條信息。(esub為截取字?jǐn)?shù)函數(shù))
          旗下其它產(chǎn)品:【帝國備份王】    【EBMA系統(tǒng)】    【帝國下載系統(tǒng)
          Powered by EmpireCMS
          版權(quán)所有 ©2002-2024 EmpireSoft Inc.
        2. <s id="1jjov"><bdo id="1jjov"></bdo></s>
          <s id="1jjov"></s>

          
          

            <sup id="1jjov"></sup>
              1. <s id="1jjov"><nobr id="1jjov"><ins id="1jjov"></ins></nobr></s>
                超碰无码人妻 | 人人夜夜i日日 | 女人片60免费视频18 | 国产豆花在线 | 免费女人高潮又粗又大毛片 | 国产福利视频在线播放 | 国产视频成人 | 99国产精品久久久久久久久久久久久 | 日韩一区二区三区视频在线观看 | 熟女激情|