SQL吧 网站源码下载 企业网站源码下载 免费网站源码下载

当前位置: 主页 > 教程 > 程序 > php >

php生成xml 类

时间:2013-02-27 10:19来源: 作者: 点击:
php生成xml 类
企业站建365全包!先制作!后付款!600多套模版任你选择!晴网www.138.la专注企业站建仿站、域名、空间、云主机、服务器, 咨询电话:020-29031983 qq:2769485357

<?php
 class majax extends blogadmin {
  
  var $result = '<?xml version="1.0" encoding="gb2312"?>';
  function majax($db) {
   $this->db = $db;
   $this->adminname = $_SESSION['adminname'];
  }

  function checkLogin() {
   if($this->islogin()) {
    Return 0;
   }else{
    Return 1;
   }
  }
  
  function addCatResult($cTitle) {
   $cId = $this->addCat($cTitle);
   if($cId>0) {
    $this->result .="<succes id="$cId">$cTitle</succes>";
   }else {
    $this->result .="<loss id="$cId">$cTitle</loss>";
   }
   Return $this->result;
  }

  function upCatResult($cId,$cTitle) {
   if($this->upCat($cId,$cTitle)) {
    $this->result .="<succes id="$cId">$cTitle</succes>";
   }else {
    $this->result .="<loss id="$cId">$cTitle</loss>";
   }
   Return $this->result;
  }

  function delCat($cId,$cNum) {
   if($this->delCat($cId,$cNum)) {
    $this->result .="<succes id="$cId">$cTitle</succes>";
   }else {
    $this->result .="<loss id="$cId">$cTitle</loss>";
   }
   Return $this->result;
  }

  function delReviewResult($rId,$aId) {
   if($this->delReview($rId,$aId)) {
    $this->result .="<succes id="$rId">$cTitle</succes>";
   }else {
    $this->result .="<loss id="$rId">$cTitle</loss>";
   }
   Return $this->result;
  }

  function addLinkResult($ln,$lu,$lc) {
   $lId = $this->addLink($ln,$lu,$lc);
   if($lId>0) {
    $this->result .="<succes id="$lId">yes</succes>";
   }else {
    $this->result .="<loss>no</loss>";
   }
   Return $this->result;
  }
  function editLinkResult($lid,$ln,$lu,$lc) {
   if($this->editLink($lid,$ln,$lu,$lc)) {
    $this->result .="<succes id="$lid">yes</succes>";
   }else {
    $this->result .="<loss>no</loss>";
   }
   Return $this->result;
  }

  /*function addBokeResult($cId,$cTitle,$aAuthor,$isCmd,$aContent,$isOpen,$bokeUrl){
   $aId = $this->addBoke($cId,$cTitle,$aAuthor,$isCmd,$aContent,$isOpen,$bokeUrl);
   if($aId>0) {
    $this->result .="<succes id="$cId">$cTitle</succes>";
   }else{
    $this->result .="<loss id="$cId">$cTitle</loss>";
   }
   Return $this->result;
  }*/
    }
?>


(责任编辑:admin)
顶一下
(0)
0%
踩一下
(0)
0%
0
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
栏目列表
推荐内容