Просмотр файла mail/mail/functions.php

Размер файла: 1.46Kb
<?
#####################################################################
#  Copyright (c) 2002 Pau Oliva Fora <[email protected]>               #
#  Licensed under the GNU GPL. For full terms see the file COPYING. #
##################################################################### 

$VERSION="1.0";

function wmlheader() {
	echo("<?xml version=\"1.0\"?>\n");
	echo("<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n\n");
	echo("<wml>\n");
	}

function wmlmeta() {

	echo("<head>\n");
	echo("<meta http-equiv=\"Cache-Control\" content=\"max-age=20\" forua=\"true\"/>\n");
	echo("<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" forua=\"true\"/>\n");
	echo("<meta http-equiv=\"Cache-Control\" content=\"no-cache\" forua=\"true\"/>\n");
	echo("</head>\n");
	}

function wmlfooter() {
	echo("</card>\n</wml>\n");
	}


function decode($strHead) {

		  if(ereg("=\?.{0,}\?[Bb]\?",$strHead)){
			  $arrHead=split("=\?.{0,}\?[Bb]\?",$strHead);
			  while(list($key,$value)=each($arrHead)){
				  if(ereg("\?=",$value)){
					  $arrTemp=split("\?=",$value);
					  $arrTemp[0]=base64_decode($arrTemp[0]);
					  $arrHead[$key]=join("",$arrTemp);
				  }
			  }
			  $strHead=join("",$arrHead);
		  }

		  if(ereg("=\?.{0,}\?[Qq]\?",$strHead)){
			  $strHead=quoted_printable_decode($strHead);
			  $strHead=ereg_replace("=\?.{0,}\?[Qq]\?","",$strHead);
			  $strHead=ereg_replace("\?=","",$strHead);
		  }
		  return $strHead;
}

?>