<?php 
@include("cf_myfunction.php");

$action = isset($_GET["action"]) ? chkstr($_GET["action"],1) : "countget";
$assort = isset($_GET["assort"]) ? intval($_GET["assort"]) : 0;
$c = isset($_GET["c"]) ? chkstr($_GET["c"],1) : "";

$username = isset($_GET["username"]) ? chkstr($_GET["username"],1) : "";


if($assort=="")//为空时
{
 if($c=="")//脚本调用时
 {
  $assort=0;  
 }
 else
 {
  $username=$c;
  $assort=1;
 }
}

$tmp=httppath(2);

if($action=="countget"&&$assort==0)
{

echo "function WriteCookie (cookieName, cookieValue, expiry)	".chr(13).chr(10);
echo "{	".chr(13).chr(10);
echo " var expDate = new Date();	".chr(13).chr(10);
echo " if(expiry)	".chr(13).chr(10);
echo " {	".chr(13).chr(10);
echo "  expDate.setTime (expDate.getTime() + expiry);	".chr(13).chr(10);
echo "  document.cookie = cookieName + \"=\" + escape (cookieValue) + \"; path=/ expires=\" + expDate.toGMTString();	".chr(13).chr(10);
echo " }	".chr(13).chr(10);
echo " else	".chr(13).chr(10);
echo " {	".chr(13).chr(10);
echo "  document.cookie = cookieName + \"=\" + escape (cookieValue);	".chr(13).chr(10);
echo " }	".chr(13).chr(10);
echo "}	".chr(13).chr(10);

echo "function ReadCookie(name){	".chr(13).chr(10);
echo " var cookieValue = \"\";	".chr(13).chr(10);
echo " var search = name + \"=\";	".chr(13).chr(10);
echo " if(document.cookie.length > 0)	".chr(13).chr(10);
echo " {	".chr(13).chr(10);
echo "  offset = document.cookie.indexOf(search);	".chr(13).chr(10);
echo "  if (offset != -1) {	".chr(13).chr(10);
echo "  offset += search.length;	".chr(13).chr(10);
echo "  end = document.cookie.indexOf(\";\", offset);	".chr(13).chr(10);
echo "  if (end == -1) end = document.cookie.length;	".chr(13).chr(10);
echo "  cookieValue = unescape(document.cookie.substring(offset, end))	".chr(13).chr(10);
echo "  }	".chr(13).chr(10);
echo " }	".chr(13).chr(10);
echo "return cookieValue;	".chr(13).chr(10);
echo "}	".chr(13).chr(10);

echo "function DeleteCookie(name) {	".chr(13).chr(10);
echo " var expires = new Date();	".chr(13).chr(10);
echo " expires.setTime (expires.getTime() - 1);	".chr(13).chr(10);
echo " WriteCookie( name , \"Delete Cookie\", expires,null,null,false);	".chr(13).chr(10);
echo "}	".chr(13).chr(10);

echo " var cfstatshowcookie=ReadCookie(\"cfstatshowcookie\");	".chr(13).chr(10);

echo " if(cfstatshowcookie!=\"".$username."\")	".chr(13).chr(10);
echo " {	".chr(13).chr(10);
echo "  a=new Date();	".chr(13).chr(10);
echo "  h=a.getHours();	".chr(13).chr(10);
echo "  m=a.getMinutes();	".chr(13).chr(10);
echo "  s=a.getSeconds();	".chr(13).chr(10);
echo "  sparetime=1000*60*60*24*1-(h*3600+m*60+s)*1000-1;	".chr(13).chr(10);

echo "  WriteCookie('cfstatshowcookie',\"".$username."\",sparetime);	".chr(13).chr(10);

echo "  firstshow=1;	".chr(13).chr(10);
echo " }	".chr(13).chr(10);
echo " else	".chr(13).chr(10);
echo " {	".chr(13).chr(10);
echo "  firstshow=0;	".chr(13).chr(10);
echo " }	".chr(13).chr(10);

echo "var cookieEnabled=(navigator.cookieEnabled)? true : false	".chr(13).chr(10);
echo " if (typeof navigator.cookieEnabled==\"undefined\" && !cookieEnabled){	".chr(13).chr(10);
echo " document.cookie = \"testcookie\"	".chr(13).chr(10);
echo " cookieEnabled=(document.cookie==\"testcookie\")? true : false	".chr(13).chr(10);
echo " document.cookie = \"\"	".chr(13).chr(10);
echo "}	".chr(13).chr(10);
echo "var cookieok;	".chr(13).chr(10);
echo "if(cookieEnabled==false)	".chr(13).chr(10);
echo "{	".chr(13).chr(10);
echo " firstshow=0;	".chr(13).chr(10);
echo "}	".chr(13).chr(10);

echo "var ly=escape(document.referrer);	".chr(13).chr(10);
echo "var currweb=escape(location.href);	".chr(13).chr(10);
echo "var screenwidth=screen.width;                        	".chr(13).chr(10);
echo "var screenheight=screen.height;                      	".chr(13).chr(10);
echo "var screencolordepth=screen.colorDepth; 	".chr(13).chr(10);
echo "document.write(\"<script src='".$tmp."cf.php?action=countget_2&username=".$username."&assort=0&ly=\" + ly + \"&currweb=\" + currweb + \"&firstshow=\" + firstshow + \"&screenwidth=\" + screenwidth + \"&screenheight=\" + screenheight + \"&screencolordepth=\" + screencolordepth + \"&ranstr=\" +  Math.random() + \"' language='JavaScript' charset='gb2312'></script>\");	".chr(13).chr(10);

}


if($action=="countget_2"||$assort==1)
{
@include("conn.php");
@include("config.php");

if($assort==0){
 $ly=isset($_GET["ly"]) ? substr(chkstr(urldecode($_GET["ly"]),1),0,255) : "";
 $currweb=isset($_GET["currweb"]) ? substr(chkstr(urldecode($_GET["currweb"]),1),0,255) : "";
}
else
{
 $ly= isset($_SERVER["HTTP_REFERER"]) ? substr(chkstr(urldecode($_SERVER["HTTP_REFERER"]),1),0,255) : "";
 $currweb=$ly;
}


$firstshow = isset($_GET["firstshow"]) ? intval($_GET["firstshow"],2) : 0;
$screenwidth = isset($_GET["screenwidth"]) ? intval($_GET["screenwidth"],2) : 0;
$screenheight = isset($_GET["screenheight"]) ? intval($_GET["screenheight"],2) : 0;
$screencolordepth = isset($_GET["screencolordepth"]) ? intval($_GET["screencolordepth"],2) : 0;

$lyhead=isset($ly) ? breakurl($ly) : "";

$ip = $_SERVER['REMOTE_ADDR'];

$agentstr=$_SERVER['HTTP_USER_AGENT'];

if (strpos($agentstr,'Alexa')!=false) {
 $alexa=1;
}
else
{
 $alexa=0;
}

$ostype=getostype();
$browsertype=getbrowsertype();


//每天一次删除过期数据
if(abs(strtotime("now")-strtotime($rsset["lastdeldate"]))>3600*24*1)
{
 $sql="delete from cfstat_visit_last where TO_DAYS(NOW())-TO_DAYS(lasttime)>1";
 mysql_query($sql);
 
 $sql="delete from cfstat_client_day where TO_DAYS(NOW())-TO_DAYS(adddate)>$clientkeepday";
 mysql_query($sql);

 $sql="delete from cfstat_count_day where TO_DAYS(NOW())-TO_DAYS(adddate)>$countkeepday";
 mysql_query($sql);

 $sql="delete from cfstat_count_hour where TO_DAYS(NOW())-TO_DAYS(adddate)>$hourkeepday";
 mysql_query($sql);

 $sql="delete from cfstat_ly_day where TO_DAYS(NOW())-TO_DAYS(adddate)>$lykeepday";
 mysql_query($sql);

 $sql="delete from cfstat_search_day where TO_DAYS(NOW())-TO_DAYS(adddate)>$searchkeepday";
 mysql_query($sql);

 $sql="delete from cfstat_searchkeyword_day where TO_DAYS(NOW())-TO_DAYS(adddate)>$searchkeywordkeepday";
 mysql_query($sql);

 $sql="delete from cfstat_web_day where TO_DAYS(NOW())-TO_DAYS(adddate)>$webkeepday";
 mysql_query($sql);
 
 $sql="update cfstat_admin set lastdeldate='".date("Y-m-d")."'";
 mysql_query($sql);
}


$sql="select countershow,style,showtotal,realiptotal,userstate,imgfilename,imgselftext from cfstat_user where username='$username'";
$result=mysql_query($sql);
$rs=mysql_fetch_assoc($result);
if($rs['userstate']==0)
{
 $mycode="<a href=".$tmp."cf.php?action=countgo&username=".$username." target=_blank title=&#x7F51;&#x7AD9;&#x6D41;&#x91CF;&#x7EDF;&#x8BA1;>&#x7528;&#x6237;&#x88AB;&#x6682;&#x505C;</a>";
 echo "document.write('".$mycode."');";
 exit;
}
else
{
 $countershow=$rs['countershow'];
 $style=$rs['style'];
 $showtotal=$rs['showtotal']+1;
 $realiptotal=$rs['realiptotal'];
 $imgfilename=$rs['imgfilename'];
 $imgselftext=$rs['imgselftext'];
}

if($assort==0)//网站统计且不是第一次访问时
{
 if($firstshow==0){
  $sql="update cfstat_visit_last set pvtotal=pvtotal+1,currweb='$currweb',lasttime='".date("Y-m-d H:i:s")."' where ip='$ip' and username='$username'";
  mysql_query($sql);
 }
}
elseif($assort==1)//网店统计时，根据last表里的IP判断是否第一次访问
{
 $sql="update cfstat_visit_last set pvtotal=pvtotal+1,currweb='$currweb',lasttime='".date("Y-m-d H:i:s")."' where ip='$ip' and username='$username'";
 mysql_query($sql);
 
 if(mysql_affected_rows()==0)
 {
  $firstshow=1; //网店第一次访问
 }
 else
 {
  $firstshow=0; //网店不是第一次访问
 }
}

//网站统计或网店统计第一次访问时
if($firstshow==1)
{
//取得访问时设置范围内最小的myid那条记录的id进行更新，不存在记录时新插入
$sql="select id from cfstat_visit_last where username='$username' and myid<=".($realiptotal+1-$user_visit_maxrsnum)." order by myid desc limit 0,1";
$result=mysql_query($sql);
$rs=mysql_fetch_assoc($result);
if($rs['id'])
{
 $sql="update cfstat_visit_last set";
 $sql = $sql." myid='".($realiptotal+1)."',";
 $sql = $sql."username='$username',";
 $sql = $sql."ip='$ip',";
 $sql = $sql."pvtotal='1',";
 $sql = $sql."ly='$ly',";
 $sql = $sql."currweb='$currweb',";
 $sql = $sql."addtime='".date("Y-m-d H:i:s")."',";
 $sql = $sql."lasttime='".date("Y-m-d H:i:s")."',";
 $sql = $sql."screenwidth='$screenwidth',";
 $sql = $sql."screenheight='$screenheight',";
 $sql = $sql."screencolordepth='$screencolordepth',";
 $sql = $sql."ostype='$ostype',";
 $sql = $sql."browsertype='$browsertype'";
 $sql = $sql." where id='".$rs['id']."'";
 mysql_query($sql);
}
else
 {
  $sql="insert into cfstat_visit_last (myid,username,ip,ly,currweb,addtime,lasttime,screenwidth,screenheight,screencolordepth,ostype,browsertype)  values(".($realiptotal+1).",'$username','$ip','$ly','$currweb','".date("Y-m-d H:i:s")."','".date("Y-m-d H:i:s")."','$screenwidth','$screenheight','$screencolordepth','$ostype','$browsertype')";
  mysql_query($sql);
 }

 //第一次访问时同时更新PV,IP
 $sql="update cfstat_user set showtotal=showtotal+1,realshowtotal=realshowtotal+1,realiptotal=realiptotal+1,lasttime='".date("Y-m-d H:i:s")."' where username='$username'";
 mysql_query($sql);
}
elseif($firstshow==0)
{
  //不是第一次访问时更新PV
  $sql="update cfstat_user set showtotal=showtotal+1,realshowtotal=realshowtotal+1,lasttime='".date("Y-m-d H:i:s")."' where username='$username'";
  mysql_query($sql);
}

if($firstshow==1)
{
 $sql = "update cfstat_client_day set ";

 if($alexa==1){$sql= $sql." alexacounter=alexacounter+1,";}

 if($ostype=="Windows XP") $sql = $sql."os1 = os1+1,";
 if($ostype=="Windows Vista") $sql = $sql."os2 = os2+1,";
 if($ostype=="Windows 7") $sql = $sql."os3 = os3+1,";
 if($ostype=="Windows 2003") $sql = $sql."os4 = os4+1,";
 if($ostype=="Windows 2000") $sql = $sql."os5 = os5+1,";
 if($ostype <> "Windows XP" && $ostype <> "Windows Vista" && $ostype <> "Windows 7" && $ostype <> "Windows 2003" && $ostype <> "Windows 2000")$sql = $sql."osother = osother+1,";

 if($browsertype=="IE 6.0") $sql = $sql."browser1 = browser1+1,";
 if($browsertype=="IE 7.0") $sql = $sql."browser2 = browser2+1,";
 if($browsertype=="IE 8.0") $sql = $sql."browser3 = browser3+1,";
 if($browsertype=="Maxthon") $sql = $sql."browser4 = browser4+1,";
 if($browsertype=="TencentTraveler") $sql = $sql."browser5 = browser5+1,";
 if($browsertype=="360SE") $sql = $sql."browser6 = browser6+1,";
 if($browsertype=="Firefox" ) $sql = $sql."browser7 = browser7+1,";
 if($browsertype <> "IE 6.0" && $browsertype <> "IE 7.0" && $browsertype <> "IE 8.0" && $browsertype <> "Maxthon" && $browsertype <> "TencentTraveler" && $browsertype <> "360SE" && $browsertype <> "Firefox")$sql = $sql."browserother = browserother+1,";

 if($screenwidth==1024) $sql = $sql."screenwidth1 = screenwidth1+1,";
 if($screenwidth==1280) $sql = $sql."screenwidth2 = screenwidth2+1,";
 if($screenwidth==1440) $sql = $sql."screenwidth3 = screenwidth3+1,";
 if($screenwidth==1152) $sql = $sql."screenwidth4 = screenwidth4+1,";
 if($screenwidth==1680) $sql = $sql."screenwidth5 = screenwidth5+1,";
 if($screenwidth==800) $sql = $sql."screenwidth6 = screenwidth6+1,";
 if($screenwidth==1600) $sql = $sql."screenwidth7 = screenwidth7+1,";
 if($screenwidth==1920) $sql = $sql."screenwidth8 = screenwidth8+1,";
 if($screenwidth==1360) $sql = $sql."screenwidth9 = screenwidth9+1,";
 if($screenwidth <> 1024 && $screenwidth <> 1280 && $screenwidth <> 1440 && $screenwidth <> 1152 && $screenwidth <> 1680 && $screenwidth <> 800 && $screenwidth <> 1600 && $screenwidth <> 1920 && $screenwidth <> 1360 )$sql = $sql."screenwidthother = screenwidthother+1,";

 if($screenheight==768) $sql = $sql."screenheight1 = screenheight1+1,";
 if($screenheight==800) $sql = $sql."screenheight2 = screenheight2+1,";
 if($screenheight==900) $sql = $sql."screenheight3 = screenheight3+1,";
 if($screenheight==1024) $sql = $sql."screenheight4 = screenheight4+1,";
 if($screenheight==864) $sql = $sql."screenheight5 = screenheight5+1,";
 if($screenheight==1050) $sql = $sql."screenheight6 = screenheight6+1,";
 if($screenheight==960) $sql = $sql."screenheight7 = screenheight7+1,";
 if($screenheight==720) $sql = $sql."screenheight8 = screenheight8+1,";
 if($screenheight==600) $sql = $sql."screenheight9 = screenheight9+1,";
 if($screenheight <> 768 && $screenheight <> 800 && $screenheight <> 900 && $screenheight <> 1024 && $screenheight <> 864 && $screenheight <> 1050 && $screenheight <> 960 && $screenheight <> 720 && $screenheight <> 600) $sql = $sql."screenheighthother = screenheighthother+1,";

 if($screencolordepth==32) $sql = $sql."screencolordepth1 = screencolordepth1+1";
 if($screencolordepth==16) $sql = $sql."screencolordepth2 = screencolordepth2+1";
 if($screencolordepth==24) $sql = $sql."screencolordepth3 = screencolordepth3+1";
 if($screencolordepth <> 32 && $screencolordepth <> 16 && $screencolordepth <> 24) $sql = $sql."screencolordepthOther = screencolordepthother+1";

 $sql = $sql." where username='$username' and TO_DAYS(NOW())-TO_DAYS(adddate)=0";

 mysql_query($sql);
 
 if(mysql_affected_rows()==0)
 {
  $sql="insert into cfstat_client_day (username,adddate) values ('$username','".date("Y-m-d")."')";
  mysql_query($sql);
 } 
}


 if($firstshow==1)
 {
  $sql="update cfstat_count_day set mycounter=mycounter+1,ipcounter=ipcounter+1 where username='$username' and TO_DAYS(NOW())-TO_DAYS(adddate)=0";
 }
 else
 {
  $sql="update cfstat_count_day set mycounter=mycounter+1 where username='$username' and TO_DAYS(NOW())-TO_DAYS(adddate)=0";
 } 
 mysql_query($sql);


 if(mysql_affected_rows()==0)
 {
  $sql="insert into cfstat_count_day (username,adddate) values ('$username','".date("Y-m-d")."')";
  mysql_query($sql);
 }


 if($firstshow==1)
 {
  $sql="update cfstat_count_hour set mycounter=mycounter+1,ipcounter=ipcounter+1 where username='$username' and TO_DAYS(NOW())-TO_DAYS(adddate)=0 and addhour=".date("H");
 }
 else
 {
  $sql="update cfstat_count_hour set mycounter=mycounter+1 where username='$username' and TO_DAYS(NOW())-TO_DAYS(adddate)=0 and addhour=".date("H");
 } 
 mysql_query($sql);

 if(mysql_affected_rows()==0)
 {
  $sql="insert into cfstat_count_hour (username,adddate,addhour) values ('$username','".date("Y-m-d")."','".date("H")."')";
  mysql_query($sql);
 }

if($firstshow==1)
{
 $sql="update cfstat_ly_day set mycounter=mycounter+1,ipcounter=ipcounter+1,ip='$ip',ly='$ly',lasttime='".date("Y-m-d H:i:s")."' where username='$username' and lyhead='$lyhead' and TO_DAYS(NOW())-TO_DAYS(adddate)=0";
}
else
{
 $sql="update cfstat_ly_day set mycounter=mycounter+1,ip='$ip',ly='$ly',lasttime='".date("Y-m-d H:i:s")."' where username='$username' and lyhead='$lyhead' and TO_DAYS(NOW())-TO_DAYS(adddate)=0";	   
}
mysql_query($sql);

if(mysql_affected_rows()==0)
{
 $sql="insert into cfstat_ly_day (username,ip,lyhead,ly,adddate,addtime,lasttime) values ('$username','$ip','$lyhead','$ly','".date("Y-m-d")."','".date("Y-m-d H:i:s")."','".date("Y-m-d H:i:s")."')";
 mysql_query($sql);
}


$searchexist = 0;
$keywordexist = 0;
$keyword = "";
$allsearch = $rsset["allsearch"];
$k = 0;

if($allsearch!=""&&$ly!="")
{
 $myarray=explode("|",$allsearch);

 for ($i=0;$i<=count($myarray)-1;$i++)
 {
  $siteflag=substr($myarray[$i],0,strpos($myarray[$i],","));
  $keywordflag=substr($myarray[$i],strpos($myarray[$i],",")+1,1000);

  $siteflagarray=explode("/",$siteflag);
  $keywordflagarray=explode("/",$keywordflag);



  for ($j=0;$j<=count($siteflagarray)-1;$j++)
  {

   if(strlen(breakurl($ly))>strlen($siteflagarray[$j]))
   {
	if(substr(breakurl($ly),strlen(breakurl($ly))-strlen($siteflagarray[$j]),1000) == $siteflagarray[$j])
	{
	 $k=1;
	 $i=1000;
	 $j=1000;
	}
   }
   elseif(strlen(breakurl($ly))==strlen($siteflagarray[$j]))
   {
     if(breakurl($ly)==$siteflagarray[$j])
     {
      $k=1;
      $i=1000;
      $j=1000;
     }
   }
  }
 }

}



  if ($k==1)
  {
	  $searchexist = -1;//搜索存在时

	  for ($j=0;$j<=count($keywordflagarray)-1;$j++){
		   //如果搜索引擎的网址时存在搜索关键字的标志时
		   //?a=1&b=&c=
		   //?a=&b=1&c=
		   //?a=&b=&c=1
		  if((strpos($ly, "?".$keywordflagarray[$j]."=")!==false && strpos($ly, "?".$keywordflagarray[$j]."=&")==false)||(strpos($ly, "&".$keywordflagarray[$j]."=")!==false && strpos($ly, "&".$keywordflagarray[$j]."=&")==false && strrev(substr(strrev($ly), 0,strlen($keywordflagarray[$j])+1))!=$keywordflagarray[$j]."=")){
			  
			  $keywordexist = -1;	
			  $keyword = getsearchkeyword($ly,$keywordflagarray[$j]);
			  $j=1000;  
		  }
	  }
  }


if($searchexist==-1&&$siteflag<>""){
 if($firstshow==1)
 {
  $sql="update cfstat_search_day set mycounter=mycounter+1,ipcounter=ipcounter+1 where username='$username' and siteflag='$siteflag' and TO_DAYS(NOW())-TO_DAYS(adddate)=0";
 }
 else
 {
  $sql="update cfstat_search_day set mycounter=mycounter+1 where username='$username' and siteflag='$siteflag' and TO_DAYS(NOW())-TO_DAYS(adddate)=0";
 }
 mysql_query($sql);

 if(mysql_affected_rows()==0)
 {
  $sql="insert into cfstat_search_day (username,siteflag,adddate) values ('$username','$siteflag','".date("Y-m-d")."')";
  mysql_query($sql);
 } 
}


if($keywordexist=-1&&$keyword<>""){
 $indexcode=md5($username.$siteflag.$keyword.date("Y-m-d"));

 if($firstshow==1)
 {
  $sql="update cfstat_searchkeyword_day set mycounter=mycounter+1,ipcounter=ipcounter+1,lastly='$ly',lasttime='".date("Y-m-d H:i:s")."' where indexcode='$indexcode'";
 }
 else
 {
  $sql="update cfstat_searchkeyword_day set mycounter=mycounter+1,lastly='$ly',lasttime='".date("Y-m-d H:i:s")."' where indexcode='$indexcode'";
 }
  mysql_query($sql);
  if(mysql_affected_rows()==0)
  {
   $sql="insert into cfstat_searchkeyword_day (username,siteflag,keyword,adddate,addtime,lasttime,lastly,indexcode) values ('$username','$siteflag','$keyword','".date("Y-m-d")."','".date("Y-m-d H:i:s")."','".date("Y-m-d H:i:s")."','$ly','$indexcode')";
   mysql_query($sql);
  } 
}

 $indexcode=md5($username.$currweb.date("Y-m-d"));

 $sql="update cfstat_web_day set mycounter=mycounter+1,lasttime='".date("Y-m-d H:i:s")."' where indexcode='$indexcode'";
 mysql_query($sql);
 
 if(mysql_affected_rows()==0)
 {
  $sql="insert into cfstat_web_day (username,weburl,adddate,addtime,lasttime,indexcode) values ('$username','$currweb','".date("Y-m-d")."','".date("Y-m-d H:i:s")."','".date("Y-m-d H:i:s")."','$indexcode')";
  mysql_query($sql);
 }


if($assort==0)
{
$counttitle="统计服务由[".$rsset["systitle"]."]提供";
if($countershow==1)
{ 
$len = strlen($showtotal);
$width = 8;
if($len > $width)
{
 $width = $len;
}

for ($i=0;$i<$width;$i++)
{
 $n = $showtotal % 10;
 $showtotal = $showtotal / 10;
 $gifs[$width-$i-1]=$n;
}

$countercode="<a href=".$tmp."cf.php?action=countgo&username=".$username." target=_blank title=".$counttitle.">";

for ($i=0;$i<$width;$i++)
{
 $countercode=$countercode."<img src=".$tmp."counterpic/".$style."/".$gifs[$i].".gif border=0>";
}

$countercode=$countercode."</a>";

echo "document.write('".$countercode."');";
}
elseif($countershow==2)
{
 $mycode="<a href=".$tmp."cf.php?action=countgo&username=".$username." target=_blank title=$counttitle><img src=".$tmp."images/counter.gif border=0></a>";
 echo "document.write('".$mycode."');";
}
elseif($countershow==3)
{
 $mycode="<a href=".$tmp."cf.php?action=countgo&username=".$username." target=_blank title=$counttitle><span style=font-size:12>统计</span></a>";
 echo "document.write('".$mycode."');";
}
elseif($countershow==4)
{
$mystr  = "window.onresize = CFResizeDiv;	".chr(13).chr(10);
$mystr .= "window.onerror = function(){}	".chr(13).chr(10);
$mystr .= "var divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i = 0;	".chr(13).chr(10);
$mystr .= "var px = document.doctype?\"px\":0;	".chr(13).chr(10);
$mystr .= "var scrollwidth = navigator.userAgent.indexOf(\"Firefox\")>0?16:0;	".chr(13).chr(10);
$mystr .= "var iframeheight = navigator.userAgent.indexOf(\"MSIE\")>0?260-2:260-2;	".chr(13).chr(10);
$mystr .= "String.prototype.Trim  = function(){return this.replace(/^\s+|\s+$/g,\"\");}	".chr(13).chr(10);
$mystr .= "function CF_collapse(obj){	".chr(13).chr(10);
$mystr .= "		ct = document.getElementById('tab_c_iframe');	".chr(13).chr(10);
$mystr .= "		if(ct.style.display==\"none\"){	".chr(13).chr(10);
$mystr .= "			ct.style.display=\"\";	".chr(13).chr(10);
$mystr .= "			obj.src=obj.src.replace(\"max.gif\",\"min.gif\");	".chr(13).chr(10);
$mystr .= "		} else {	".chr(13).chr(10);
$mystr .= "			ct.style.display=\"none\";	".chr(13).chr(10);
$mystr .= "			obj.src=obj.src.replace(\"min.gif\",\"max.gif\");	".chr(13).chr(10);
$mystr .= "		}	".chr(13).chr(10);
$mystr .= "		CFResizeDiv();	".chr(13).chr(10);
$mystr .= "	}	".chr(13).chr(10);

$mystr .= "	function CFMsg()	".chr(13).chr(10);
$mystr .= "	{	".chr(13).chr(10);
$mystr .= "		try{	".chr(13).chr(10);
$mystr .= "			divTop = parseInt(document.getElementById(\"eMeng\").style.top,10);	".chr(13).chr(10);
$mystr .= "			divLeft = parseInt(document.getElementById(\"eMeng\").style.left,10);	".chr(13).chr(10);
$mystr .= "			divHeight = parseInt(document.getElementById(\"eMeng\").offsetHeight,10);	".chr(13).chr(10);
$mystr .= "			divWidth = parseInt(document.getElementById(\"eMeng\").offsetWidth,10);	".chr(13).chr(10);

$mystr .= "			var scrollPosTop,scrollPosLeft,docWidth,docHeight;	".chr(13).chr(10);
$mystr .= "			if (typeof window.pageYOffset != 'undefined') { 	".chr(13).chr(10);
$mystr .= "				scrollPosTop = window.pageYOffset; 	".chr(13).chr(10);
$mystr .= "				scrollPosLeft = window.pageXOffset; 	".chr(13).chr(10);
$mystr .= "				docWidth = window.innerWidth; 	".chr(13).chr(10);
$mystr .= "				docHeight = window.innerHeight; 	".chr(13).chr(10);
$mystr .= "			} else if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat') {	".chr(13).chr(10);
$mystr .= "				scrollPosTop = document.documentElement.scrollTop;	".chr(13).chr(10);
$mystr .= "				scrollPosLeft = document.documentElement.scrollLeft;	".chr(13).chr(10);
$mystr .= "				docWidth = document.documentElement.clientWidth;	".chr(13).chr(10);
$mystr .= "				docHeight = document.documentElement.clientHeight;	".chr(13).chr(10);
$mystr .= "			} else if (typeof document.body != 'undefined') { 	".chr(13).chr(10);
$mystr .= "				scrollPosTop = document.body.scrollTop;	".chr(13).chr(10);
$mystr .= "				scrollPosLeft = document.body.scrollLeft;	".chr(13).chr(10);
$mystr .= "				docWidth = document.body.clientWidth;	".chr(13).chr(10);
$mystr .= "				docHeight = document.body.clientHeight;	".chr(13).chr(10);
$mystr .= "			}	".chr(13).chr(10);

$mystr .= "			document.getElementById(\"eMeng\").style.top = parseInt(scrollPosTop,10) + docHeight + 10 + px;// divHeight	".chr(13).chr(10);
$mystr .= "			document.getElementById(\"eMeng\").style.left = parseInt(scrollPosLeft,10) + docWidth - divWidth - scrollwidth + px;	".chr(13).chr(10);
$mystr .= "			document.getElementById(\"eMeng\").style.visibility=\"visible\";	".chr(13).chr(10);
$mystr .= "			objTimer = window.setInterval(\"CF_move_div()\",10);	".chr(13).chr(10);
$mystr .= "		}catch(e){}	".chr(13).chr(10);
$mystr .= "	}	".chr(13).chr(10);

$mystr .= "	function CFResizeDiv()	".chr(13).chr(10);
$mystr .= "	{	".chr(13).chr(10);
$mystr .= "		i+=1;	".chr(13).chr(10);
$mystr .= "		try{	".chr(13).chr(10);
$mystr .= "			divHeight = parseInt(document.getElementById(\"eMeng\").offsetHeight,10);	".chr(13).chr(10);
$mystr .= "			divWidth = parseInt(document.getElementById(\"eMeng\").offsetWidth,10);	".chr(13).chr(10);

$mystr .= "			var scrollPosTop,scrollPosLeft,docWidth,docHeight; 	".chr(13).chr(10);
$mystr .= "			if (typeof window.pageYOffset != 'undefined') { 	".chr(13).chr(10);
$mystr .= "				scrollPosTop = window.pageYOffset; 	".chr(13).chr(10);
$mystr .= "				scrollPosLeft = window.pageXOffset; 	".chr(13).chr(10);
$mystr .= "				docWidth = window.innerWidth; 	".chr(13).chr(10);
$mystr .= "				docHeight = window.innerHeight; 	".chr(13).chr(10);
$mystr .= "			} else if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat') {	".chr(13).chr(10);
$mystr .= "				scrollPosTop = document.documentElement.scrollTop;	".chr(13).chr(10);
$mystr .= "				scrollPosLeft = document.documentElement.scrollLeft;	".chr(13).chr(10);
$mystr .= "				docWidth = document.documentElement.clientWidth;	".chr(13).chr(10);
$mystr .= "				docHeight = document.documentElement.clientHeight;	".chr(13).chr(10);
$mystr .= "			} else if (typeof document.body != 'undefined') { 	".chr(13).chr(10);
$mystr .= "				scrollPosTop = document.body.scrollTop;	".chr(13).chr(10);
$mystr .= "				scrollPosLeft = document.body.scrollLeft;	".chr(13).chr(10);
$mystr .= "				docWidth = document.body.clientWidth;	".chr(13).chr(10);
$mystr .= "				docHeight = document.body.clientHeight;	".chr(13).chr(10);
$mystr .= "			}	".chr(13).chr(10);

$mystr .= "			document.getElementById(\"eMeng\").style.top = docHeight - divHeight + parseInt(scrollPosTop,10) + px;	".chr(13).chr(10);
$mystr .= "			document.getElementById(\"eMeng\").style.left = docWidth - divWidth + parseInt(scrollPosLeft,10) - scrollwidth + px;	".chr(13).chr(10);
$mystr .= "		}catch(e){}	".chr(13).chr(10);
$mystr .= "	}	".chr(13).chr(10);

$mystr .= "	function CF_move_div()	".chr(13).chr(10);
$mystr .= "	{	".chr(13).chr(10);

$mystr .= "		var scrollPosTop,scrollPosLeft,docWidth,docHeight; 	".chr(13).chr(10);
$mystr .= "		if (typeof window.pageYOffset != 'undefined') { 	".chr(13).chr(10);
$mystr .= "			scrollPosTop = window.pageYOffset; 	".chr(13).chr(10);
$mystr .= "			scrollPosLeft = window.pageXOffset; 	".chr(13).chr(10);
$mystr .= "			docWidth = window.innerWidth; 	".chr(13).chr(10);
$mystr .= "			docHeight = window.innerHeight; 	".chr(13).chr(10);
$mystr .= "		} else if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat') {	".chr(13).chr(10);
$mystr .= "			scrollPosTop = document.documentElement.scrollTop;	".chr(13).chr(10);
$mystr .= "			scrollPosLeft = document.documentElement.scrollLeft;	".chr(13).chr(10);
$mystr .= "			docWidth = document.documentElement.clientWidth;	".chr(13).chr(10);
$mystr .= "			docHeight = document.documentElement.clientHeight;	".chr(13).chr(10);
$mystr .= "		} else if (typeof document.body != 'undefined') { 	".chr(13).chr(10);
$mystr .= "			scrollPosTop = document.body.scrollTop;	".chr(13).chr(10);
$mystr .= "			scrollPosLeft = document.body.scrollLeft;	".chr(13).chr(10);
$mystr .= "			docWidth = document.body.clientWidth;	".chr(13).chr(10);
$mystr .= "			docHeight = document.body.clientHeight;	".chr(13).chr(10);
$mystr .= "		}	".chr(13).chr(10);

$mystr .= "		try{	".chr(13).chr(10);
$mystr .= "			if(parseInt(document.getElementById(\"eMeng\").style.top,10) <= (docHeight - divHeight + parseInt(scrollPosTop,10)))	".chr(13).chr(10);
$mystr .= "			{	".chr(13).chr(10);
$mystr .= "				window.clearInterval(objTimer);objTimer = window.setInterval(\"CFResizeDiv()\",1);	".chr(13).chr(10);
$mystr .= "			}	".chr(13).chr(10);
$mystr .= "			divTop = parseInt(document.getElementById(\"eMeng\").style.top,10);	".chr(13).chr(10);
$mystr .= "			document.getElementById(\"eMeng\").style.top = divTop - 1 + px;	".chr(13).chr(10);
$mystr .= "		}catch(e){}	".chr(13).chr(10);
$mystr .= "	}	".chr(13).chr(10);
$mystr .= "	function CFMessbox(shape,color){	".chr(13).chr(10);
$mystr .= "		var styles='position:absolute;top:0px;left:0px;z-index:99999;visibility:hidden;';	".chr(13).chr(10);
$mystr .= "		var copic='<img src=\"".$tmp."images/gbook_min.gif\" align=\"absmiddle\" class=\"ioc'+color+'\" onClick=\"CF_collapse(this)\">';	".chr(13).chr(10);
$mystr .= "		if(shape>1) window.onload = CFMsg;	".chr(13).chr(10);
$mystr .= "		else {styles='';copic=''}	".chr(13).chr(10);
$mystr .= "		var s;	".chr(13).chr(10);

$mystr .= "		if(shape==2) {	".chr(13).chr(10);
$mystr .= "			s='<div id=eMeng style=\"width:208px;Z-INDEX:99999;LEFT:0px;POSITION:absolute;TOP:0px;VISIBILITY:hidden;\">'	".chr(13).chr(10);
$mystr .= "				+'<table style=\"width:100%;border:1px solid #AED1F7; border-collapse:collapse;\">'	".chr(13).chr(10);
$mystr .= "				+'        <tr>'	".chr(13).chr(10);
$mystr .= "				+'          <td align=left style=\"background:url(".$tmp."images/gbook_bg.gif) repeat-x;list-style-type:none; padding: 0; border: 0;font-size:12px;\"><img src=\"".$tmp."images/gbook_zxly.gif\"><img src=\"".$tmp."images/space.gif\" width=116 height=1><img src=\"".$tmp."images/gbook_min.gif\" align=\"absmiddle\" class=\"ioc'+color+'\" onClick=\"CF_collapse(this)\">'	".chr(13).chr(10);
$mystr .= "				+'		  </td>'	".chr(13).chr(10);
$mystr .= "				+'        </tr>'	".chr(13).chr(10);

$mystr .= "				+'        <tr>'	".chr(13).chr(10);
$mystr .= "				+'        <td style=\"background-color:#ffffff\">'	".chr(13).chr(10);
$mystr .= "				+'         <iframe src=\"".$tmp."cf_gbook.php?action=gbookcodeget&username=".$username."&ly=".urlencode($ly)."&currweb=".urlencode($currweb)."\" width=\"194\" height=\"' + iframeheight + '\" frameborder=\"0\" marginheight=0 marginwidth=0 scrolling=no id=\"tab_c_iframe\"></iframe>'	".chr(13).chr(10);
$mystr .= "				+'		  </td>'	".chr(13).chr(10);
$mystr .= "				+'        </tr>'	".chr(13).chr(10);
$mystr .= "				+'      </table>'	".chr(13).chr(10);

$mystr .= "				+'</div>';	".chr(13).chr(10);
$mystr .= "		} else if(shape==3) {	".chr(13).chr(10);
$mystr .= "			s='<div id=eMeng style=\"width:210px;background:#FFFFFF;'+styles+'\">'	".chr(13).chr(10);
$mystr .= "				+'  <table width=\"100%\"  border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border:1px solid #808080;\" id=\"tab_'+color+'\">'	".chr(13).chr(10);
$mystr .= "				+'    <tr>'	".chr(13).chr(10);
$mystr .= "				+'      <td colspan=\"3\" align=right style=\"font-size:12px; line-height:19px;height:19px;padding-right:6px;color:#FFFFFF;\" onDblClick=\"CF_collapse(this.firstChild.nextSibling)\">留言板'+copic	".chr(13).chr(10);
$mystr .= "				+'</tr>'	".chr(13).chr(10);
$mystr .= "				+'    </tr>'	".chr(13).chr(10);
$mystr .= "				+ '</table>'	".chr(13).chr(10);
$mystr .= "				+'</div>';	".chr(13).chr(10);
$mystr .= "		}	".chr(13).chr(10);
$mystr .= "		document.writeln(s);	".chr(13).chr(10);
$mystr .= "	}	".chr(13).chr(10);
	
$mystr .= "	CFMessbox(2,1);	".chr(13).chr(10);

echo $mystr;
}

}
elseif($assort==1)
{
$imgfilename="upload/".$imgfilename;
$imgselftext=iconv("GB2312","UTF-8",$imgselftext);
$fontfilename="images/simkai.ttf";
$fontsize=10;
$distancefromborder=8;
$fontcolorarray=array(0,0,0,0);
$shadecolorarray=array(255,255,255,0);
$stringbottom=20;


if(strpos($imgselftext, "{imgcounter}")!==false)
{
 $imgselftext = str_replace("{imgcounter}", $showtotal, $imgselftext);
}

if(strpos($imgselftext, "{todaytotal}")!==false&&strpos($imgselftext, "{todayiptotal}")!==false)
{
 $sql="select mycounter,ipcounter from cfstat_count_day where username='$username' and TO_DAYS(NOW())-TO_DAYS(adddate)=0";
 $result=mysql_query($sql);
 if($rs=mysql_fetch_assoc($result)){
  $todaytotal=$rs['mycounter'];
  $todayiptotal=$rs['ipcounter'];
 }
 else{
  $todaytotal=0;
  $todayiptotal=0;
 }
 
  $imgselftext = str_replace("{todaytotal}", $todaytotal, $imgselftext);
  $imgselftext = str_replace("{todayiptotal}", $todayiptotal, $imgselftext);
}

if(strpos($imgselftext, "{yesterdaytotal}")!==false&&strpos($imgselftext, "{yesterdayiptotal}")!==false)
{
 $sql="select mycounter,ipcounter from cfstat_count_day where username='$username' and TO_DAYS(NOW())-TO_DAYS(adddate)=1";

 $result=mysql_query($sql);
 if($rs=mysql_fetch_assoc($result)){
  $yesterdaytotal=$rs['mycounter'];
  $yesterdayiptotal=$rs['ipcounter'];
 }
 else{
  $yesterdaytotal=0;
  $yesterdayiptotal=0;
 }
  $imgselftext = str_replace("{yesterdaytotal}", $yesterdaytotal, $imgselftext);
  $imgselftext = str_replace("{yesterdayiptotal}", $yesterdayiptotal, $imgselftext);
}

if(strpos($imgselftext, "{ip}")!==false)
{
 $imgselftext = str_replace("{ip}", $ip, $imgselftext);
}

watermark($imgfilename,$imgselftext,$fontfilename,$fontsize,$distancefromborder,$fontcolorarray,$shadecolorarray,$stringbottom);
}

}

if($action=="countgo")
{

if(!empty($_COOKIE["cfstatggcookie"]))
{
 gotourl(base64_decode("dmlldy5waHA/dXNlcm5hbWU9").$username);
}

echo (base64_decode("PGh0bWw+ICAgICAgICAgICAgICAgDQo8aGVhZD4gICAgICAgICAgICAgICANCjx0aXRsZT7Ns7zGs8zQ8rDmyKjSs8PmPC90aXRsZT4gICAgICAgICAgICANCjxtZXRhIGh0dHAtZXF1aXY9J0NvbnRlbnQtVHlwZScgY29udGVudD0ndGV4dC9odG1sOyBjaGFyc2V0PWdiMjMxMic+ICAgICAgICAgICAgDQo8c3R5bGUgdHlwZT0ndGV4dC9jc3MnPiAgICAgICAgICAgIA0KVEFCTEUgeyAgICAgICAgICAgIA0KCUZPTlQtU0laRTogMTJweDsgQ09MT1I6ICMwMDAwMDA7IExJTkUtSEVJR0hUOiAxMjAlOyBGT05ULUZBTUlMWTogJ0FyaWFsJywgJ0hlbHZldGljYScsICdzYW5zLXNlcmlmJyAgICAgICAgICAgIA0KfSAgICAgICAgICAgIA0KPC9zdHlsZT4gICAgICAgICAgICANCjxzY3JpcHQ+DQpmdW5jdGlvbiBXcml0ZUNvb2tpZSAoY29va2llTmFtZSwgY29va2llVmFsdWUsIGV4cGlyeSkgICANCnsgICANCiB2YXIgZXhwRGF0ZSA9IG5ldyBEYXRlKCk7ICAgDQogaWYoZXhwaXJ5KSAgIA0KIHsgICANCiAgZXhwRGF0ZS5zZXRUaW1lIChleHBEYXRlLmdldFRpbWUoKSArIGV4cGlyeSk7ICAgDQogIGRvY3VtZW50LmNvb2tpZSA9IGNvb2tpZU5hbWUgKyAiPSIgKyBlc2NhcGUgKGNvb2tpZVZhbHVlKSArICI7IHBhdGg9LyBleHBpcmVzPSIgKyBleHBEYXRlLnRvR01UU3RyaW5nKCk7ICAgDQp9ICAgDQogZWxzZSAgIA0KIHsgICANCiAgZG9jdW1lbnQuY29va2llID0gY29va2llTmFtZSArICI9IiArIGVzY2FwZSAoY29va2llVmFsdWUpOyAgIA0KIH0gICANCn0gICANCmZ1bmN0aW9uIFJlYWRDb29raWUobmFtZSl7ICAgDQogdmFyIGNvb2tpZVZhbHVlID0gIiI7ICAgDQogdmFyIHNlYXJjaCA9IG5hbWUgKyAiPSI7ICAgDQogaWYoZG9jdW1lbnQuY29va2llLmxlbmd0aCA+IDApIHsgICANCiAgb2Zmc2V0ID0gZG9jdW1lbnQuY29va2llLmluZGV4T2Yoc2VhcmNoKTsgICANCiAgaWYgKG9mZnNldCAhPSAtMSkgeyAgIA0KICAgb2Zmc2V0ICs9IHNlYXJjaC5sZW5ndGg7ICAgDQogICBlbmQgPSBkb2N1bWVudC5jb29raWUuaW5kZXhPZigiOyIsIG9mZnNldCk7ICAgDQogICBpZiAoZW5kID09IC0xKSBlbmQgPSBkb2N1bWVudC5jb29raWUubGVuZ3RoOyAgIA0KICAgY29va2llVmFsdWUgPSB1bmVzY2FwZShkb2N1bWVudC5jb29raWUuc3Vic3RyaW5nKG9mZnNldCwgZW5kKSkgICANCiAgfSAgIA0KIH0gICANCnJldHVybiBjb29raWVWYWx1ZTsgICANCn0gICANCiB2YXIgcmV1cmw9J3ZpZXcucGhwP3VzZXJuYW1lPQ=="));

echo $username;

echo (base64_decode("JzsgICAgICAgICAgICAgICAgICAgDQogdmFyIENGU3RhdENSQ29va2llPVJlYWRDb29raWUoIkNGU3RhdENSQ29va2llIik7ICAgICAgICAgICAgICAgICAgIA0KIGlmKENGU3RhdENSQ29va2llPT0nJykgICAgICAgICAgICAgICAgICAgDQogeyAgICAgICAgICAgICAgICAgICANCiAgc3BhcmV0aW1lPTEwMDAqNjAqNjAqMjQqMzY1MDsgICAgICAgICAgICAgICAgICAgDQogIFdyaXRlQ29va2llKCdDRlN0YXRDUkNvb2tpZScsJzEnLHNwYXJldGltZSk7ICAgICAgICAgICAgICAgICAgIA0KICBjcnN0YXRlPTE7ICAgICAgICAgICAgICAgICAgIA0KIH0gICAgICAgICAgICAgICAgICAgDQogZWxzZSAgICAgICAgICAgICAgICAgICANCiB7ICAgICAgICAgICAgICAgICAgIA0KICBjcnN0YXRlPXBhcnNlSW50KENGU3RhdENSQ29va2llKTsgICAgICAgICAgICAgICAgICAgDQogfSAgICAgICAgICAgICAgICAgICANCiAgaWYoY3JzdGF0ZT09MCkgICANCiAgeyAgICAgICAgICAgICAgICAgIA0KICAgICBsb2NhdGlvbi5ocmVmPXJldXJsOw0KICAgfSAgICAgICAgICAgICAgICAgDQpmdW5jdGlvbiBjcnN0YXRlc2VsKG51bSkgeyAgIA0KICBzcGFyZXRpbWU9MTAwMCo2MCo2MCoyNCozNjUwOyAgICAgICAgICAgICAgICAgICANCiAgV3JpdGVDb29raWUoJ0NGU3RhdENSQ29va2llJyxudW0sc3BhcmV0aW1lKTsgICAgICAgICAgICAgICAgICAgDQogIGxvY2F0aW9uLmhyZWY9cmV1cmw7DQp9ICAgDQpmdW5jdGlvbiBteXNob3coKQ0Kew0KbG9jYXRpb24uaHJlZj1yZXVybDsNCmNsZWFySW50ZXJ2YWwobXlzdCk7DQp9DQpteXN0PXNldEludGVydmFsKCdteXNob3coKScsMTAwMCo2MCk7DQo8L3NjcmlwdD4NCjwvaGVhZD4gICAgICAgICAgICANCjxib2R5PiAgICAgICAgICAgIA0KPHRhYmxlIGJvcmRlcj0nMCcgYWxpZ249J2NlbnRlcicgY2VsbHBhZGRpbmc9JzUnIGNlbGxzcGFjaW5nPScwJz4gICAgICAgICAgICANCiAgPHRyPiAgICAgICAgICAgIA0KICAgIDx0ZD4mbmJzcDs8L3RkPiAgICAgICAgICAgIA0KICA8L3RyPiAgICAgICAgICAgIA0KICA8dHI+ICAgICAgICAgICAgDQogICAgPHRkIGhlaWdodD0nMzAnPjxkaXYgYWxpZ249J2NlbnRlcic+PGEgaHJlZj0naHR0cDovL3d3dy5xcWNmLmNvbScgdGFyZ2V0PSdfYmxhbmsnIHN0eWxlPSdmb250LXNpemU6MTJweDtjb2xvcjojZmYwMDAwO3RleHQtZGVjb3JhdGlvbjp1bmRlcmxpbmU7Zm9udC13ZWlnaHQ6Ym9sZDsnPlBvd2VyZWQgQnkgQ0Y8L2E+PC9kaXY+PC90ZD4gICAgICAgICAgICANCiAgPC90cj4gICAgICAgICAgICANCiAgPHRyPiAgICAgICAgICAgIA0KICAgIDx0ZD42MMPr1tO689fUtq+9+MjrzbO8xrvyteO798/Cw+bBtL3T1rG90734yOvNs7zGz7XNszwvdGQ+ICAgICAgICAgICAgDQogIDwvdHI+ICAgICAgICAgICAgDQogIDx0cj4gICAgICAgICAgICANCiAgIDx0ZCBhbGlnbj0nY2VudGVyJz4gICAgICAgICAgICANCiAgICA8YSBocmVmPScjJyBvbmNsaWNrPSdjcnN0YXRlc2VsKDEpJz6147v31rG90734yOvNs7zGPC9hPjxicj48YnI+ICAgICAgICAgICAgDQogICAgPGlucHV0IHR5cGU9J2NoZWNrYm94JyBuYW1lPSdjaGVja2JveCcgdmFsdWU9J2NoZWNrYm94JyBvbmNsaWNrPSdjcnN0YXRlc2VsKDApJz7PwrTOsrvU2c/Uyr60y9KzPGJyPiAgICAgICAgICAgIA0KICA8L3RyPiAgICAgICAgICAgIA0KPC90YWJsZT4gICAgICAgICAgIA0KPC9ib2R5PiAgICAgICAgICAgIA0KPC9odG1sPg=="));
}


?>