Просмотр файла system/plugins/default.php

Размер файла: 2.28Kb
<?php
#----------------------------------#
#**********[WHT] ICQBot************#
#         Made by : Sklep          #
#    E-mail : [email protected]    #
#    Site : http://Wap-Hack.Ru     #
#          ICQ : 712788            #
#----------------------------------#
function php($val)
{
  $params = explode(" ",$val);

  preg_match("#\s+(.*)#", $params[0], $process_match);
	
	if(!empty($process_match[0]))
    {
	  $query = mysql_query("SELECT * FROM `rase` WHERE `description`='wait'");
	  $row = mysql_fetch_array($query);
	  $icq->sendMessage($msg['from'], $row['tl']);
	  
      sleep(1);
	  
	  $process_match[1] = str_replace("_", "-", $process_match[1]);
	  $file = file_get_contents("http://ru2.php.net/manual/ru/function.".$process_match[1].".php");
	  $file = str_replace("\n", "", $file);
	  $file = iconv("UTF-8", "WINDOWS-1251", $file);
                 
	  $name = preg_match("#<h1 class=\"refname\">(.*)</h1>#isU", $file, $outn)	?	$outn[1]	: '';
	  $vers = preg_match("#<p class=\"verinfo\">(.*)</p>#isU", $file, $outv)	?	$outv[0]	: '';
	  $minidesc = preg_match("#<p class=\"refpurpose\">(.*)</p>#isU", $file, $outm)	?	$outm[0]	: '';
	  $desc = preg_match("#<h3 class=\"title\">(.*)<blockquote>#isU", $file, $outd)	?	$outd[0]	: '';
                 
	  $desc = str_replace("Note:", "\r\nЗамечание: ", $desc);
     
	    if ($name || $vers || $desc)
	      $icq->sendMessage($msg['from'], strip_tags("Функция: ".$name." -- ".$vers."\r\n\r\n".$desc));
		else
		{
		  $query = mysql_query("SELECT * FROM `rase` WHERE `description`='php_notfound'");
		  $row = mysql_fetch_array($query);
		  $icq->sendMessage($msg['from'], $row['tl']);
		}
		 
	  $send = str_replace(array("&#62;", "&#38;", "    "), array(">", "&", ""), $send);
	  $icq->sendMessage($msg['from'], html_entity_decode($send));
	}
	else
	{
	  $query = mysql_query("SELECT * FROM `rase` WHERE `description`='php_error'");
	  $row = mysql_fetch_array($query);
	  $icq->sendMessage($msg['from'], $row['tl']);
	}
}


function times($val)
{
  $icq->sendMessage($msg['from'], "Московское время: ".date('H:i:s'));
}


function base64_de($val)
{
  $icq->sendMessage($msg['from'], base64_decode($val));
}


function base64_en($val)
{
  $icq->sendMessage($msg['from'], base64_encode($val));
}


?>