Размер файла: 3.08Kb
<?
require_once"../template/start.php";
require_once"../template/regglobals.php";
require_once"../template/config.php";
require_once"../template/functions.php";
require_once"../template/maincore.php";
require_once"../template/antidos.php";
require_once"../template/cookies.php";
require_once"../template/gzip.php";
require_once"../template/header.php";
require_once"../template/referer.php";
include_once"../themes/$config_themes/index.php";
$UIN = '***'; //icq-номер
$PASSWORD = '***'; //пароль
if(!isset($_POST['uin']) or !isset($_POST['text'])){ if(isset($_GET['uin'])){echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<title>ICQ | SmartOff.Net</title>
</head>
<body>
<b>Отправка ICQ-сообщений</b><br/>
<form method="post" action="index.php">
Номер ICQ:<br>
<input type="Text" name="uin" value="'.$_GET[uin].'" maxlength="9"><br>
Сообщение:<br>
<input type="Text" name="text" value="" maxlength="500"><br>
<input type=submit name="send" value="Отправить">
</form><br>
<a href="../index.php">На главную</a><br/>';
}else{
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<title>ICQ | SmartOff.Net</title>
</head>
<body>
<b>Отправка ICQ-сообщений</b><br/>
<form method="post" action="index.php">
Номер ICQ:<br>
<input type="Text" name="uin" value="" maxlength="9"><br>
Сообщение:<br>
<input type="Text" name="text" value="" maxlength="500"><br>
<input type=submit name="send" value="Отправить">
</form><br>
<a href="../index.php">На главную</a><br>';
}}else{
include('WebIcqLite.class.php');
$text=Encode($_POST['text'],'w');
$icq = new WebIcqLite();
if($icq->connect($UIN, $PASSWORD)){
if(!$icq->send_message($_POST['uin'], $text)){
echo $icq->error;
}else{
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<title>ICQ | SmartOff.Net</title>
</head>
<body>
<b>Отправка ICQ-сообщений</b><br/>
Сообщение отправлено.<br>
<a href="index.php">Отправить еще</a><br> <a href="../index.php">На главную</a>';
}
$icq->disconnect();
}else{
echo $icq->error;
}
}
function Encode($str,$type=u)
{
$conv=array();
for($x=192;$x<=239;$x++)
$conv['u'][chr($x)]=chr(208).chr($x-48);
for($x=240;$x<=255;$x++)
$conv['u'][chr($x)]=chr(209).chr($x-112);
$conv['u'][chr(168)]=chr(208).chr(129);
$conv['u'][chr(184)]=chr(209).chr(209);
$conv['w']=array_flip($conv['u']);
if($type=='w' || $type=='u')
return strtr($str,$conv[$type]);
else
return $str;
}
include_once"../themes/$config_themes/foot.php";
?>