permit_class.php
资源名称:BBWPS.rar [点击查看]
上传用户:yttaitong
上传日期:2009-05-10
资源大小:128k
文件大小:1k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
PHP
- <?php
- /*
- [BBWPS!] (C)2006-2010 小蜜蜂版权所有.
- This is NOT a freeware, use is subject to license terms
- 时间:2007年12月
- 描述:生成用户的权限功能条
- */
- class PermitFeed {
- var $m_channel = NULL;
- var $m_FeedItem = '';
- var $m_channelItem = '';
- var $m_charset = "gb2312";
- function PermitFeed($charset='') {
- $this->__construct($charset);
- }
- function __construct($charset=''){
- if($charset) $this->m_charset=$charset;
- $this->m_channel ="<?xml version="1.0" encoding="$this->m_charset"?>n";
- $this->m_channel.=" <permit>n";
- }
- function __destruct(){
- unset($this->m_channelItem,$this->m_channel,$this->m_FeedItem);
- }
- function addFeedItem($ItemArray) {
- $this->m_FeedItem .=" <item>n";
- foreach ($ItemArray as $tag=>$text){
- $this->m_FeedItem .=" <".$tag.">".$text."</".$tag.">n";
- }
- $this->m_FeedItem .=" </item>n";
- }
- function releaseFeed() {
- header("Content-Type: text/xml");
- print $this->m_channel;
- print $this->m_FeedItem;
- print "</permit>";
- }
- }
- ?>