电脑安全

您当前的位置:主页 > 电脑安全 >

php生成xml 类-网络编程

来源:[db:来源]标题:   encoding    编辑:电脑技术全能网 时间:2019-09-18 18:01

原标题:php生成xml 类-网络编程
   <?phpclass 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;}*/ }?>

上一篇:php给图片加水印四-网络编程

下一篇:没有了