<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Мониторинг обменных пунктов электронных валют</title>
<meta name="description" content="Курсы надежных обменных пунктов, меняющих WMR на WMZ (WebMoney на WebMoney). Список выгодных обменников, работающих с обменом WMR на WMZ.">
<meta name="keywords" content="WMR, обменники, WMZ, курсы, WebMoney, список обменников, мониторинг, лучшие курсы, обмен валют, обменные пункты">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<link type="text/css" rel="stylesheet" href="main.css">
</head>
<body>
<table cellpadding="0" cellspacing="0" border="0" class="content">
<tr>
<td><h2> Мониторинг курсов обменных пунктов</h2></td>
</tr>
<tr>
<td class="contentLeft">
<!--content-->
<script language="JavaScript" type="text/javascript">
var select1 = 0;
var select2 = 0;
var temp1 = 0;
var temp2 = 0;
function goto_list() {
document.location='index.php?c1='+document.select_currency.from.value+'&c2='+document.select_currency.to.value;
}
function auto_direct(select1, select2) {
if (select1 == 1) {
temp1 = select1;
}
if (select2 == 1) {
temp2 = select2;
}
if ((temp1 == 1)&&(temp2 == 1)) {
goto_list();
}
}
nr = false;
function f_cl(url) {
if (nr) {
nr = false;
return false;
}
window.open('go.php?'+url);
}
</script>
<?php
include ('db.php');
function itfalse($x)
{
global $se; $ok=0;
for ($j = 3; $j < 15; $j++)
{
if ($se[$x][$j] == 40) { $ok++; }
} return $ok;
}
function iscount2($x,$y)
{
if (($x == 7) and ($y == 7)) { return 0; }
if (($x == 1) and ($y == 0)) { return 1; }
if (($x == 3) ) { return 2; }
if (($x == 2) and ($y == 6)) { return 3; }
if (($x == 2) and ($y == 1)) { return 4; }
if (($x == 6) and ($y == 5)) { return 5; }
if (($x == 7) and ($y == 4)) { return 6; }
if (($x == 1) and ($y == 2)) { return 7; }
if (($x == 6) and ($y == 6)) { return 8; }
if (($x == 4)) { return 9; }
}
function iscount($x,$y) //1 2 digit
{
if ( ($x == 1) and ($y == 0) ) { return 1; }
if (($x == 5) and ($y == 4)) { return 2; }
if (($x == 2) and ($y == 7)) { return 3; }
if (($x == 2) and ($y == 10)) { return 4; }
if (($x == 7) and ($y == 5)) { return 5; }
if (($x == 8) and ($y == 5)) { return 6; }
if (($x == 1) and ($y == 3)) { return 7; }
if (($x == 7) and ($y == 7)) { return 8; }
if (($x == 5) and ($y == 8)) { return 9; }
if (($x == 8) and ($y == 8)) { return 0; }
}
function curl_redir_exec($ch)
{
static $curl_loops = 0;
static $curl_max_loops = 20;
if ($curl_loops++ >= $curl_max_loops)
{
$curl_loops = 0;
return FALSE;
}
if ($http_code == 301 || $http_code == 302)
{
preg_match('/Location:(.*?)\n/', $header, $matches); if (!$url)
{
//couldn't process the url to redirect to
$curl_loops = 0;
return $data;
}
if (!$url['scheme'])
$url['scheme'] = $last_url['scheme'];
if (!$url['host'])
$url['host'] = $last_url['host'];
if (!$url['path'])
$url['path'] = $last_url['path'];
$new_url = $url['scheme'] . '://' . $url['host'] . $url['path'] . ($url['query']?'?'.$url['query']:'');
//debug('Redirecting to', $new_url);
return curl_redir_exec($ch);
} else {
$curl_loops=0;
return $data;
}
}
function getPage($url)
{
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"); return $result;
}
?>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" align="left" width="100%">
<tr>
<td width="100%" style='padding-top: 7px; padding-bottom: 7px; padding-left: 10px; padding-right: 10px; '>
Направление обмена:<br><br>
<form action="index.php" method="get" name="select_currency">
<select name="from" onchange="auto_direct(1, 0)">
<?php
$c1= $_GET["c1"];
$c2= $_GET["c2"];
if ($c1=="" && $c2=="")
{$c1=1; $c2=2;}
foreach ($decode as $i=>$value)
{ if ($decode[$i] <>"") {echo"<option value=".$i;
if ($i==$c1) {echo " selected";}
echo ">".$decode[$i]."</option>";}
}
?>
</select> на <select name="to" onchange="auto_direct(0, 1)">
<?php
$i=0;
foreach ($decode as $i=>$value)
{ if ($decode[$i] <>"") {echo"<option value=".$i;
if ($i==$c2) {echo " selected";}
echo ">".$decode[$i]."</option>";}
}
?>
</select> <script language="JavaScript" type="text/javascript">
document.write('<a href="javascript:goto_list()"><b>Найти лучший курс!</b><'+'/a>');
</script>
<noscript>
<input type="submit" style="margin-top: 12px; margin-bottom: 2px" value="Найти курсы">
</noscript>
</form>
</td>
</tr>
</table>
<br>
<h2>Обмен <?php echo $decode[$c1]; ?> на <?php echo $decode[$c2]; ?></h2><br><br>
<div class="exchvar">
<a href="http://pincode.biz.ua/index.php?c1=<?php echo $c2; ?>&c2=<?php echo $c1; ?>"><b>Обратный обмен</a></b> <a href="http://pincode.biz.ua/index.php?c1=1&c2=20"><b>Обмен WMZ на WMU</b></a> <a href="http://pincode.biz.ua/index.php?c1=2&c2=20"><b>Обмен WMR на WMU</b></a></div><br>
<table cellSpacing="1" cellPadding="0" border="0" class="course" width="550">
<thead>
<tr class="caption"><td> Обменник</td><td width="90">Отдаете</td><td width="90">Получаете</td><td width="90" class="alignright">Резерв</td><td class="alignright" width="35">BL </td></tr>
</thead>
<tbody>
<?php
foreach ($obmennik as $k=>$valueo)
{$file = @getpage ($obmennik[$k]["kurs_url"]);
if ($obmennik[$k] <>"" && (!$file)==false)
{
foreach ($file as $line_num => $file)
{
if ($c1==$array[0] && $c2==$array[1])
{
$kursy[$k][1]=$array[2];
$kursy[$k][2]=$array[3];
if ($kursy[$k][1]<>"") {$nn=1; }
}
}
}
}
//if(is_array($kursy) && isset($kursy[1][1]))
//foreach ($kursy as $kurs => $kursy) {
//if ($kursy[$kurs][1]<>"" && $kursy[$kurs][2]<>"")
// {$nn=1;}
//}
//if ($kursy[0][1]<>"")
if ($nn==1)
{
$sum=0;
$sk=0;
$n=0;
foreach($kursy as $key => $val)
{
$res=$kursy[$key][2];
$print1=1;
$print=$kursy[$key][1];
if ($print<1) {$print1=(1/$print);
$print=1;
}
if ($reserve<=0) {$reserve=0;}
$wmid = @getpage('http://stats.wmtransfer.com/Levels/pWMIDLevel.aspx?wmid='.$obmennik[$key]["wmid"].'&w=35&h=18&bg=0XDBE2E9');
for ($i = 4; $i < 35; $i++)
{
for ($j = 3; $j < 15; $j++)
{
}
}
$is = false;
$w = '';
if ( (itfalse(4) ==6 ) and (itfalse(5) ==7 ) and (itfalse(6) ==1 ) and (itfalse(7) ==2 ) and (itfalse(8) == 7 ) )
{
$is = true;
$w='no';
}
if (!( itfalse(18) or itfalse(20) or itfalse(19) or ($is) ) )
{
//one digit
$p1 = itfalse(23,$se);
$p2 = itfalse(28,$se);
$w = (iscount($p1, $p2));
$is = true;
}
if ( ! ( itfalse(13) or itfalse(14) or itfalse(12) or ($is) ) )
{
//two digit
$p1 = itfalse(17,$se);
$p2 = itfalse(22,$se);
$w = (iscount($p1, $p2));
$p1 = itfalse(25,$se);
$p2 = itfalse(30,$se);
$w .= (iscount($p1, $p2));
$is = true;
}
if (!( itfalse(7) or itfalse(8) or itfalse(6) or ($is) ) )
{
//tree digit
$p1 = itfalse(11,$se);
$p2 = itfalse(16,$se);
$w = (iscount2($p1, $p2));
$p1 = itfalse(18,$se);
$p2 = itfalse(23,$se);
$w.=(iscount2($p1, $p2));
$p1 = itfalse(25,$se);
$p2 = itfalse(30,$se);
$w.= (iscount2($p1, $p2));
$is = true;
}
if ($is == false)
{
$p1 = itfalse(6,$se);
$p2 = itfalse(11,$se);
$w = (iscount2($p1, $p2));
$p1 = itfalse(13,$se);
$p2 = itfalse(18,$se);
$w.= (iscount2($p1, $p2));
$p1 = itfalse(20,$se);
$p2 = itfalse(25,$se);
$w.= (iscount2($p1, $p2));
$p1 = itfalse(27,$se);
$p2 = itfalse(32,$se);
$w.= (iscount2($p1, $p2));
}
echo'
<tr class="row" onClick="f_cl('.$key.')">
<td> '.$obmennik[$key]["name"].'</td>
<td class="alignright">'.$w.'</td>
</tr>';
$sum2=$sum2+$reserve;
if ($print1==1){
$sum1=$print*$reserve;
}
else {
$sum1=$print1*$reserve;
}
$n=$n+1;
$sum=$sum+$sum1;
}
echo '</tbody></table><br><br>';
echo ('<h2>Статистика</h2><br>' );
echo ('Всего обменных пунктов: <b>'.$n.'</b><br>' );
echo ('Всего резервов: <b>'.number_format (round($sum2,2),2).' '.$decode[$c2].'</b><br>'); echo ('Cредний курс <b>'.$decode[$c1].'/'.$decode[$c2].'</b> с учетом резервов: <b>'.number_format(round(($sum/$sum2),4),2).'</b><br>'); echo ('Обновление: <b>'.$time.'</b><br>' );
echo ('Время выполнения скрипта: <b>'.(round($end-$start, 4)).' c</b><br>'); }
else {echo '<tr><td></td></tr></tbody></table><br><b>Обмен в данном направлении не производится ни одним из имеющихся в базе обменных пунктов</b><br><br>';};
?>
<br>
</body>
</html>