879 lines
38 KiB
Plaintext
879 lines
38 KiB
Plaintext
<?php
|
|
if(!defined('GAME'))
|
|
{
|
|
die();
|
|
}
|
|
if(!function_exists('send_mime_mail')) {
|
|
function send_mime_mail($name_from, // èìÿ îòïðàâèòåëÿ
|
|
$email_from, // email îòïðàâèòåëÿ
|
|
$name_to, // èìÿ ïîëó÷àòåëÿ
|
|
$email_to, // email ïîëó÷àòåëÿ
|
|
$data_charset, // êîäèðîâêà ïåðåäàííûõ äàííûõ
|
|
$send_charset, // êîäèðîâêà ïèñüìà
|
|
$subject, // òåìà ïèñüìà
|
|
$body // òåêñò ïèñüìà
|
|
)
|
|
{
|
|
$to = mime_header_encode($name_to, $data_charset, $send_charset)
|
|
. ' <' . $email_to . '>';
|
|
$subject = mime_header_encode($subject, $data_charset, $send_charset);
|
|
$from = mime_header_encode($name_from, $data_charset, $send_charset)
|
|
.' <' . $email_from . '>';
|
|
if($data_charset != $send_charset) {
|
|
$body = iconv($data_charset, $send_charset, $body);
|
|
}
|
|
$headers = "From: $from\r\n";
|
|
$headers .= "Content-type: text/html; charset=$send_charset\r\n";
|
|
|
|
return mail($to, $subject, $body, $headers);
|
|
}
|
|
|
|
function mime_header_encode($str, $data_charset, $send_charset) {
|
|
if($data_charset != $send_charset) {
|
|
$str = iconv($data_charset, $send_charset, $str);
|
|
}
|
|
return '=?' . $send_charset . '?B?' . base64_encode($str) . '?=';
|
|
}
|
|
}
|
|
|
|
if($u->room['file']=='bank')
|
|
{
|
|
$noc = $c['crtoecr']; //120 kr = 1 ekr.
|
|
$con = $c['ecrtocr']; //1 åêð. = 30 êð.
|
|
function getNum($v)
|
|
{
|
|
$plid = $v;
|
|
$pi = iconv_strlen($plid);
|
|
if($pi<5)
|
|
{
|
|
$i = 0;
|
|
while($i<=5-$pi)
|
|
{
|
|
$plid = '0'.$plid;
|
|
$i++;
|
|
}
|
|
}
|
|
return $plid;
|
|
}
|
|
function getNumId($v)
|
|
{
|
|
$plid = $v;
|
|
$array = str_split($plid);
|
|
$ends=0;
|
|
$result='';
|
|
for($i=0,$end=(count($array)-1);$i<=$end;$i++){
|
|
if($array[$i]==0 and $ends==0){$array[$i]='';}else{$ends=1;}
|
|
$result.=$array[$i];
|
|
}
|
|
//print_r($array);
|
|
return $result;
|
|
}
|
|
|
|
if($u->info['allLock'] > time()) {
|
|
$u->bank = false;
|
|
}
|
|
|
|
$re2 = '';
|
|
if(isset($_GET['enter']) && !isset($u->bank['id']))
|
|
{
|
|
$bank = mysql_fetch_array(mysql_query('SELECT * FROM `bank` WHERE `uid` = "'.$u->info['id'].'" AND `id` = "'.mysql_real_escape_string((int)$_POST['bank']).'" LIMIT 1'));
|
|
if(!isset($bank['id']))
|
|
{
|
|
$re2 = 'Íåâåðíûé íîìåð ñ÷åòà.';
|
|
}elseif($bank['pass']!=$_POST['pass'])
|
|
{
|
|
$pl = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `actions` WHERE `uid` = "'.$u->info['id'].'" AND `time` > "'.(time()-60*60).'" AND `vars` = "bank_bad_pass_'.mysql_real_escape_string($bank['id']).'" LIMIT 5'));
|
|
if($pl[0]>=3)
|
|
{
|
|
$re2 = 'Âàø ñ÷åò áûë çàáëîêèðîâàí íà 1 ÷àñ';
|
|
}else{
|
|
if($pl[0]==0)
|
|
{
|
|
$re2 = 'Íåâåðíûé íîìåð ñ÷åòà èëè ïàðîëü. Åñëè âû òðèæäû ââåäåòå íåâåðíûé íîìåð ñ÷åòà èëè ïàðîëü, ñ÷åò áóäåò çàáëîêèðîâàí íà ÷àñ';
|
|
}else{
|
|
$pp = array(0=>'îê',1=>'êà',2=>'êè',3=>'êè');
|
|
$re2 = 'Íåâåðíûé íîìåð ñ÷åòà èëè ïàðîëü. Ó âàñ îñòàëîñü '.(3-$pl[0]).' ïîïûò'.$pp[3-$pl[0]].', â ïðîòèâíîì ñëó÷àè ñ÷åò áóäåò çàáëîêèðîâàí íà ÷àñ';
|
|
}
|
|
mysql_query('INSERT INTO `actions` (`uid`,`time`,`city`,`room`,`vars`,`ip`) VALUES ("'.$u->info['id'].'","'.time().'","'.$u->info['city'].'","'.$u->info['room'].'","bank_bad_pass_'.mysql_real_escape_string($bank['id']).'","'.mysql_real_escape_string($_SERVER['HTTP_X_REAL_IP']).'")');
|
|
}
|
|
}else{
|
|
|
|
if($u->info['allLock'] > time()) {
|
|
echo '<script>setTimeout(function(){alert("Âàì çàïðåùåíî ïîëüçîâàòüñÿ óñëóãàìè áàíêà äî '.date('d.m.y H:i',$u->info['allLock']).'")},250);</script>';
|
|
}else{
|
|
//âîøëè!
|
|
$bank['useNow'] = time()+12*60*60;
|
|
mysql_query('UPDATE `bank` SET `useNow` = "0" WHERE `id` != "'.$bank['id'].'" AND `uid` = "'.$u->info['id'].'" AND `useNow`!="0" LIMIT 1');
|
|
mysql_query('UPDATE `bank` SET `useNow` = "'.$bank['useNow'].'" WHERE `id` = "'.$bank['id'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1');
|
|
mysql_query('INSERT INTO `actions` (`uid`,`time`,`city`,`room`,`vars`,`ip`) VALUES ("'.$u->info['id'].'","'.time().'","'.$u->info['city'].'","'.$u->info['room'].'","bank_good_pass_'.mysql_real_escape_string($bank['id']).'","'.mysql_real_escape_string($_SERVER['HTTP_X_REAL_IP']).'")');
|
|
$u->bank = $bank;
|
|
}
|
|
}
|
|
}elseif(isset($_GET['res']))
|
|
{
|
|
//echo $_GET['schet'].'<br>';
|
|
$b_pass = mysql_fetch_array(mysql_query('SELECT * FROM `bank` WHERE `uid` = "'.$u->info['id'].'" AND `id` = "'.mysql_real_escape_string(getNumId($_GET['schet'])).'" ORDER BY `id` DESC LIMIT 1'));
|
|
if($b_pass['repass'] >= time())
|
|
{
|
|
$re2 = 'Íîìåðà ñ÷åòîâ è ïàðîëè ê íèì ìîæíî âûñëàòü òîëüêî îäèí ðàç â ñóòêè';
|
|
}else{
|
|
mysql_query('INSERT INTO `actions` (`uid`,`time`,`city`,`room`,`vars`,`ip`) VALUES ("'.$u->info['id'].'","'.time().'","'.$u->info['city'].'","'.$u->info['room'].'","bank_res","'.mysql_real_escape_string($_SERVER['HTTP_X_REAL_IP']).'")');
|
|
$re2 = 'Âûñëàí íîìåð ñ÷åòà è ïàðîëü íà email, óêàçàííûé â àíêåòå';
|
|
mysql_query('UPDATE `bank` SET `repass` = "'.(time()+24*3600).'" WHERE `id` = "'.$b_pass['id'].'" LIMIT 1');
|
|
send_mime_mail('Áîéöîâñêèé Êëóá - Support',
|
|
'support@new-combats.com',
|
|
''.$u->info['login'].'',
|
|
$u->info['mail'],
|
|
'CP1251', // êîäèðîâêà, â êîòîðîé íàõîäÿòñÿ ïåðåäàâàåìûå ñòðîêè
|
|
'KOI8-R', // êîäèðîâêà, â êîòîðîé áóäåò îòïðàâëåíî ïèñüìî
|
|
'Âîññòàíîâëåíèå ïàðîëÿ îò ñ÷åòà â áàíêå ïåðñîíàæà '.$u->info['login'].'',
|
|
"Íîìåð ñ÷åòà: ".getNum($b_pass['id'])."<br>Ïàðîëü: ".$b_pass['pass'].'<br><br>Ñ óâàæåíèåì,<br>Àäìèíèñòðàöèÿ Áîéöîâñêîãî Êëóáà');
|
|
|
|
}
|
|
}elseif(isset($_GET['open']) && !isset($u->bank['id']))
|
|
{
|
|
if( $_POST['rdn01'] == 2 && ($u->info['level'] >= 8 || $u->info['money4'] < 15 )) {
|
|
$re2 = 'Íåäîñòàòî÷íî çóáîâ!';
|
|
}elseif($u->info['money']>=3 || ($u->info['level'] < 8 && $u->info['money4'] >= 15 && $c['zuby'] == true ))
|
|
{
|
|
if( $_POST['pass1'] == '' || $_POST['pass1'] == ' ' ) {
|
|
$re2 = 'Âû íå óêàçàëè ïàðîëü!';
|
|
}elseif( $_POST['pass1'] != $_POST['pass2'] ) {
|
|
$re2 = 'Ïàðîëè íå ñîâïàäàþò!';
|
|
}elseif( $u->info['money'] - 3 < 0 && $_POST['rdn01'] != 2 ) {
|
|
$re2 = 'Ó âàñ íåäîñòàòî÷íî êð.';
|
|
}elseif($u->info['align']!=2)
|
|
{
|
|
$pass = rand(10000,91191);
|
|
$pass = htmlspecialchars($_POST['pass1'],NULL,'cp1251');
|
|
$ins = mysql_query('INSERT INTO `bank` (`uid`,`create`,`pass`) VALUES ("'.$u->info['id'].'","'.time().'","'.$pass.'")');
|
|
if($ins)
|
|
{
|
|
$bank = mysql_insert_id();
|
|
if( $u->info['level'] < 8 && $_POST['rdn01'] == 2 && $c['zuby'] == true) {
|
|
$u->info['money4'] -= 15;
|
|
}else{
|
|
$u->info['money'] -= 3;
|
|
}
|
|
$upd = mysql_query('UPDATE `users` SET `money` = "'.$u->info['money'].'",`money4` = "'.$u->info['money4'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|
$re2 = 'Ñ÷åò ¹<b>'.getNum($bank).'</b> áûë óñïåøíî îòêðûò.<br>Ïàðîëü îò ñ÷åòà: <b>'.$pass.'</b><br><small><br>(Ñìåíèòü ïàðîëü ìîæíî â ðàçäåëå "Óïðàâëåíèå ñ÷åòîì" ïîñëå àâòîðèçàöèè)';
|
|
$u->addDelo(3,$u->info['id'],'Âû óñïåøíî îòêðûëè ñ÷åò ¹'.getNum($bank).'',time(),$u->info['city'],'Bank.System',3,0,'');
|
|
}else{
|
|
$re2 = 'Áàíê îòêàçàë â ïîëó÷åíèè áàíêîâñêîãî ñ÷åòà.';
|
|
}
|
|
}else{
|
|
$re2 = 'Õàîñíèêè íå ìîãóò ñîçäàâàòü íîâûå ñ÷åòà â áàíêå.';
|
|
}
|
|
}else{
|
|
if( $u->info['level'] < 8 && $c['zuby'] == true ) {
|
|
$re2 = 'Äëÿ îòêðûòèÿ ñ÷åòà íåîáõîäèìî èìåòü ïðè ñåáå <b>3.00 êð.</b> èëè <b>'.$u->zuby(15).'</b>';
|
|
}else{
|
|
$re2 = 'Äëÿ îòêðûòèÿ ñ÷åòà íåîáõîäèìî èìåòü ïðè ñåáå <b>3.00 êð.</b>';
|
|
}
|
|
}
|
|
}elseif(isset($_GET['exit']) && isset($u->bank['id']))
|
|
{
|
|
$u->bank = false;
|
|
mysql_query('UPDATE `bank` SET `useNow` = "0" WHERE `uid` = "'.$u->info['id'].'" AND `useNow`!="0" LIMIT 1');
|
|
}
|
|
|
|
if($u->info['allLock'] > time()) {
|
|
$u->bank = false;
|
|
}
|
|
|
|
if(isset($u->bank['id']))
|
|
{
|
|
if(isset($_POST['sd4']) && $u->newAct($_POST['sd4']))
|
|
{
|
|
if(isset($_POST['transfer_kredit2']) && $u->info['admin']>0)
|
|
{
|
|
//ïåðåâîä åêðåäèòîâ ñ îäíîãî ñ÷åòà íà äðóãîé
|
|
$ub = mysql_fetch_array(mysql_query('SELECT * FROM `bank` WHERE `id` = "'.mysql_real_escape_string((int)$_POST['num2']).'" LIMIT 1'));
|
|
if(isset($ub['id']) && $ub['id']!=$u->bank['id'])
|
|
{
|
|
$ut = mysql_fetch_array(mysql_query('SELECT `id`,`level`,`city`,`room`,`login` FROM `users` WHERE `id` = "'.mysql_real_escape_string($ub['uid']).'" LIMIT 1'));
|
|
if($ut['level']>=0 || $ut['id']==$u->info['id'] || $u->info['admin']>0)
|
|
{
|
|
$mn = floor((int)($_POST['tansfer_sum2']*100));
|
|
$mn = round(($mn/100),2);
|
|
$prc = 0;
|
|
$mn += $prc;
|
|
if($u->bank['money2']>=$mn)
|
|
{
|
|
if($mn<0.01 || $mn>1000000000)
|
|
{
|
|
$re2 = 'Íåâåðíî óêàçàíà ñóììà';
|
|
}else{
|
|
$upd = mysql_query('UPDATE `bank` SET `money2` = "'.mysql_real_escape_string($u->bank['money2']-$mn).'" WHERE `id` = "'.$u->bank['id'].'" LIMIT 1');
|
|
if($upd)
|
|
{
|
|
$u->bank['money2'] -= $mn;
|
|
$ub['money2'] += $mn-$prc;
|
|
|
|
mysql_query('UPDATE `users` SET `catch` = `catch` + "'.floor($mn-$prc).'" WHERE `id` = "'.$ut['id'].'" LIMIT 1');
|
|
mysql_query('UPDATE `users` SET `frg` = `frg` + '.floor($mn).' WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|
|
|
mysql_query('UPDATE `bank` SET `money2` = "'.mysql_real_escape_string($ub['money2']).'" WHERE `id` = "'.$ub['id'].'" LIMIT 1');
|
|
$re2 = 'Âû óäà÷íî ïåðåâåëè <b>'.($mn-$prc).' åêð.</b> (êîìèññèÿ <b>'.$prc.' åêð.</b>) íà ñ÷åò ¹'.getNum($ub['id']).' ïåðñîíàæó "<b>'.$ut['login'].'</b>"';
|
|
$u->addDelo(3,$ut['id'],'Ïîëó÷åíî <b>'.($mn-$prc).' åêð.</b> ñî ñ÷åòà ¹'.getNum($u->bank['id']).' îò ïåðñîíàæà "'.$u->info['login'].'", êîìèññèÿ <b>'.$prc.' åêð.</b> <i>(Èòîãî: '.$ub['money1'].' êð., '.$ub['money2'].' åêð.)</i>',time(),$ut['city'],'Bank.System',mysql_real_escape_string($mn-$prc),0,$ub['id']);
|
|
$u->addDelo(3,$u->info['id'],'Ïåðåäàíî <b>'.($mn-$prc).' åêð.</b> íà ñ÷åò ¹'.getNum($ub['id']).' ïåðñîíàæó "'.$ut['login'].'", êîìèññèÿ <b>'.$prc.' åêð.</b> <i>(Èòîãî: '.$u->bank['money1'].' êð., '.$u->bank['money2'].' åêð.)</i>',time(),$u->info['city'],'Bank.System',0,mysql_real_escape_string($mn),$u->bank['id']);
|
|
$log = '"'.$u->info['login'].'" ['.$u->info['level'].'] ïåðåâåë ñî ñâîåãî áàíêîâñêîãî ñ÷åòà ¹'.$u->bank['id'].' íà ñ÷åò ¹'.$ub['id'].' ê ïåðñîíàæó "'.$ut['login'].'" ['.$ut['level'].'] '.($mn-$prc).' åêð.';
|
|
$u->addDelo(1,$u->info['id'],$log,time(),$u->info['city'],'Bank.System',0,0,'');
|
|
$u->addDelo(1,$ut['id'],$log,time(),$ut['city'],'Bank.System',0,0,'');
|
|
if($ut['id']!=$u->info['id'])
|
|
{
|
|
$alg = '';
|
|
if($u->info['align']==50)
|
|
{
|
|
$alg = '<img src=https://img.new-combats.com/i/align/align50.gif >';
|
|
}
|
|
$text = '"'.$alg.'[login:'.$u->info['login'].']" ïåðåâåë'.($u->info['sex']==0?"":"à").' âàì <b>'.($mn-$prc).' åêð.</b> ñî ñâîåãî áàíêîâñêîãî ñ÷åòà ¹'.getNum($u->bank['id']).' íà âàø áàíêîâñêèé ñ÷åò ¹'.getNum($ub['id']).'.';
|
|
|
|
mysql_query("INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES ('".$ut['city']."','".$ut['room']."','','".$ut['login']."','".$text."','".time()."','12','0','1')");
|
|
}
|
|
}else{
|
|
$re2 = 'Íå óäàëîñü âûïîëíèòü îïåðàöèþ';
|
|
}
|
|
}
|
|
}else{
|
|
$re2 = 'Ó âàñ íåò <b>'.$mn.' åêð.</b> íà ñ÷åòå';
|
|
}
|
|
}else{
|
|
$re2 = 'Íåëüçÿ ïåðåâåñòè êðåäèòû íà ýòîò ñ÷åò';
|
|
}
|
|
}else{
|
|
$re2 = 'Íåëüçÿ ïåðåâåñòè êðåäèòû íà ýòîò ñ÷åò';
|
|
}
|
|
}elseif(isset($_POST['transfer_kredit']) && $u->info['align']!=2)
|
|
{
|
|
//ïåðåâîä êðåäèòîâ ñ îäíîãî ñ÷åòà íà äðóãîé
|
|
if($u->info['level']>=4 || $u->info['admin']>0)
|
|
{
|
|
$ub = mysql_fetch_array(mysql_query('SELECT * FROM `bank` WHERE `id` = "'.mysql_real_escape_string((int)$_POST['num']).'" LIMIT 1'));
|
|
if(isset($ub['id']) && $ub['id']!=$u->bank['id'])
|
|
{
|
|
$ut = mysql_fetch_array(mysql_query('SELECT `id`,`level`,`city`,`room`,`login` FROM `users` WHERE `id` = "'.mysql_real_escape_string($ub['uid']).'" LIMIT 1'));
|
|
if($ut['level']>=4 || $ut['id']==$u->info['id'] || $u->info['admin']>0)
|
|
{
|
|
$mn = floor((int)($_POST['tansfer_sum']*100));
|
|
$mn = round(($mn/100),2);
|
|
$prc = round($mn*3/100,2);
|
|
$mn += $prc;
|
|
if($u->bank['money1']>=$mn)
|
|
{
|
|
if($mn<0.01 || $mn>1000000000)
|
|
{
|
|
$re2 = 'Íåâåðíî óêàçàíà ñóììà';
|
|
}else{
|
|
$upd = mysql_query('UPDATE `bank` SET `money1` = "'.mysql_real_escape_string($u->bank['money1']-$mn).'" WHERE `id` = "'.$u->bank['id'].'" LIMIT 1');
|
|
if($upd)
|
|
{
|
|
$u->bank['money1'] -= $mn;
|
|
$ub['money1'] += $mn-$prc;
|
|
mysql_query('UPDATE `bank` SET `money1` = "'.mysql_real_escape_string($ub['money1']).'" WHERE `id` = "'.$ub['id'].'" LIMIT 1');
|
|
$re2 = 'Âû óäà÷íî ïåðåâåëè <b>'.($mn-$prc).' êð.</b> (êîìèññèÿ <b>'.$prc.' êð.</b>) íà ñ÷åò ¹'.getNum($ub['id']).' ïåðñîíàæó "<b>'.$ut['login'].'</b>"';
|
|
$u->addDelo(3,$ut['id'],'Ïîëó÷åíî <b>'.($mn-$prc).' êð.</b> ñî ñ÷åòà ¹'.getNum($u->bank['id']).' îò ïåðñîíàæà "'.$u->info['login'].'", êîìèññèÿ <b>'.$prc.' êð.</b> <i>(Èòîãî: '.$ub['money1'].' êð., '.$ub['money2'].' åêð.)</i>',time(),$ut['city'],'Bank.System',mysql_real_escape_string($mn-$prc),0,$ub['id']);
|
|
$u->addDelo(3,$u->info['id'],'Ïåðåäàíî <b>'.($mn-$prc).' êð.</b> íà ñ÷åò ¹'.getNum($ub['id']).' ïåðñîíàæó "'.$ut['login'].'", êîìèññèÿ <b>'.$prc.' êð.</b> <i>(Èòîãî: '.$u->bank['money1'].' êð., '.$u->bank['money2'].' åêð.)</i>',time(),$u->info['city'],'Bank.System',0,mysql_real_escape_string($mn),$u->bank['id']);
|
|
$log = '"'.$u->info['login'].'" ['.$u->info['level'].'] ïåðåâåë ñî ñâîåãî áàíêîâñêîãî ñ÷åòà ¹'.$u->bank['id'].' íà ñ÷åò ¹'.$ub['id'].' ê ïåðñîíàæó "'.$ut['login'].'" ['.$ut['level'].'] '.($mn-$prc).' êð. Äîïîëíèòåëüíî ñíÿòî '.$prc.' êð. çà óñëóãè áàíêà.';
|
|
$u->addDelo(1,$u->info['id'],$log,time(),$u->info['city'],'Bank.System',0,0,'');
|
|
$u->addDelo(1,$ut['id'],$log,time(),$ut['city'],'Bank.System',0,0,'');
|
|
if($ut['id']!=$u->info['id'])
|
|
{
|
|
$text = '"[login:'.$u->info['login'].']" ïåðåâåë'.($u->info['sex']==0?"":"à").' âàì <b>'.($mn-$prc).' êð.</b> ñî ñâîåãî áàíêîâñêîãî ñ÷åòà ¹'.getNum($u->bank['id']).' íà âàø áàíêîâñêèé ñ÷åò ¹'.getNum($ub['id']).'.';
|
|
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$ut['city']."','".$ut['room']."','','".$ut['login']."','".$text."','".time()."','6','0','1')");
|
|
}
|
|
}else{
|
|
$re2 = 'Íå óäàëîñü âûïîëíèòü îïåðàöèþ';
|
|
}
|
|
}
|
|
}else{
|
|
$re2 = 'Ó âàñ íåò <b>'.$mn.' êð.</b> íà ñ÷åòå';
|
|
}
|
|
}else{
|
|
$re2 = 'Íåëüçÿ ïåðåâåñòè êðåäèòû íà ýòîò ñ÷åò';
|
|
}
|
|
}else{
|
|
$re2 = 'Íåëüçÿ ïåðåâåñòè êðåäèòû íà ýòîò ñ÷åò';
|
|
}
|
|
}else{
|
|
$re2 = 'Ïåðåäà÷à êðåäèòîâ âîçìîæíà òîëüêî ñ 4-ãî óðîâíÿ';
|
|
}
|
|
}elseif($u->info['align']!=2 && $u->info['haos'] < time() && $u->info['haos'] != 1 && $u->info['align'] !=50 && isset($_POST['convert_kredit']) && $c['crtoecr'] > 0) {
|
|
//îáìåíÿòü êð. íà åêð.
|
|
if($u->info['palpro'] > time()) {
|
|
$mn = ceil((int)($_POST['convert_sum2']*100));
|
|
$mn = round(($mn/100),2);
|
|
$mne = round($mn/$noc,2);
|
|
$mn = round(($mn/100*103+5),2);
|
|
$sm = $u->testAction('`uid` = "'.$u->info['id'].'" AND `vars` = "bank_kr_to_ekr_['.date('d.m.Y',time()).']" ORDER BY `id` DESC LIMIT 1',1);
|
|
$sm_lim = 100;
|
|
if(isset($sm['id']) && $sm['vals']+$mne > $sm_lim) {
|
|
if($sm['vals'] < $sm_lim) {
|
|
$re2 = 'Íà ñåãîäíÿ Âû ìîæåòå îáìåíÿòü åùå íà <b>'.($sm_lim-$sm['vals']).' åêð.</b>. (Ïðèìåðíî '.round( ( ($sm_lim-$sm['vals'])*$noc ) ,2).' êð.), òåêóùèé îáìåí íà <b>'.$mne.' åêð.</b>.';
|
|
}else{
|
|
$re2 = 'Íà ñåãîäíÿ Âû èñ÷åðïàëè ñâîé ëèìèò îáìåíà êð. íà åêð. ('.$sm_lim.' åêð.)';
|
|
}
|
|
}elseif($mn > 0 && $mne > 0 && $mn >= round((0.01*($noc*1.03)+5),2)) {
|
|
if($u->bank['money1'] >= $mn) {
|
|
if(!isset($sm['id'])) {
|
|
$u->addAction(time(),'bank_kr_to_ekr_['.date('d.m.Y').']',$mne);
|
|
}else{
|
|
mysql_query('UPDATE `actions` SET `vals` = "'.($sm['vals']+$mne).'" WHERE `id` = "'.$sm['id'].'" LIMIT 1');
|
|
}
|
|
$re2 = 'Âû óñïåøíî îáìåíÿëè <b>'.$mn.' êð.</b> íà <b>'.$mne.' åêð.</b>';
|
|
$u->bank['money1'] -= $mn;
|
|
$u->bank['money2'] += $mne;
|
|
|
|
mysql_query('UPDATE `users` SET `catch` = `catch` + "'.round($mne,2).'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|
|
|
mysql_query('UPDATE `bank` SET `money1` = "'.mysql_real_escape_string($u->bank['money1']).'", `money2` = "'.mysql_real_escape_string($u->bank['money2']).'",`shara` = `shara` + "'.mysql_real_escape_string($mne).'" WHERE `id` = "'.mysql_real_escape_string($u->bank['id']).'" LIMIT 1');
|
|
$log = '"'.$u->info['login'].'" ['.$u->info['level'].'] îáìåíÿë <b>'.$mn.' êð.</b> íà <b>'.$mne.' åêð.</b>, Áàíêîâñêèé ñ÷åò ¹'.$u->bank['id'].'.';
|
|
$u->addDelo(1,$u->info['id'],$log,time(),$u->info['city'],'Bank.System',0,0,'');
|
|
$u->addDelo(3,$u->info['id'],'Âû óñïåøíî îáìåíÿëè <b>'.ceil((int)($_POST['convert_sum2']*100/100)).' êð.</b> íà <b>'.$mne.' åêð.</b>, êîìèññèÿ <b>'.round((ceil((int)($_POST['convert_sum2']*100/100))/100*3+5),2).' êð.</b> <i>(Èòîãî: '.$u->bank['money1'].' êð., '.$u->bank['money2'].' åêð.)</i>',time(),$u->info['city'],'Bank.System',0,0,$u->bank['id']);
|
|
}else{
|
|
$re2 = 'Ó âàñ íåò <b>'.$mn.' êð.</b> íà ñ÷åòå';
|
|
}
|
|
}else{
|
|
$re2 = 'Ìèíèìàëüíàÿ ñóììà äëÿ îáìåíà ñîñòàâëÿåò '.round((0.01*($noc*1.03)+5),2).' êð.';
|
|
}
|
|
}else{
|
|
$re2 = 'Âû äîëæíû ïðîéòè ïðîâåðêó íà ÷èñòîòó ó Ïàëàäèíîâ èëè Òàðìàíîâ.';
|
|
}
|
|
}elseif(isset($_POST['convert_ekredit']))
|
|
{
|
|
//îáìåíÿòü åêð. íà êð.
|
|
$mn = ceil((int)($_POST['convert_sum']*100));
|
|
$mn = round(($mn/100),2);
|
|
if($u->bank['money2']>=$mn)
|
|
{
|
|
if($mn<0.01 || $mn>1000000000)
|
|
{
|
|
$re2 = 'Íåâåðíî óêàçàíà ñóììà';
|
|
}else{
|
|
$upd = mysql_query('UPDATE `bank` SET `money1` = "'.mysql_real_escape_string($u->bank['money1']+($mn*$con)).'",`money2` = "'.mysql_real_escape_string($u->bank['money2']-$mn).'" WHERE `id` = "'.$u->bank['id'].'" LIMIT 1');
|
|
if($upd)
|
|
{
|
|
$u->bank['money1'] += $mn*$con;
|
|
$u->bank['money2'] -= $mn;
|
|
$u->addDelo(3,$u->info['id'],'Âû îáìåíÿëè <b>'.$mn.' åêð.</b> íà <b>'.($mn*$con).' êð.</b>, êîìèññèÿ <b>0 êð.</b> <i>(Èòîãî: '.$u->bank['money1'].' êð., '.$u->bank['money2'].' åêð.)</i>',time(),$u->info['city'],'Bank.System',0,mysql_real_escape_string($mn*$con),$u->bank['id']);
|
|
$re2 = 'Âû óäà÷íî îáìåíÿëè <b>'.$mn.' åêð.</b> íà <b>'.($mn*$con).' êð.</b>';
|
|
}else{
|
|
$re2 = 'Íå óäàëîñü âûïîëíèòü îïåðàöèþ';
|
|
}
|
|
}
|
|
}else{
|
|
$re2 = 'Ó âàñ íåò <b>'.$mn.' åêð.</b> íà ñ÷åòå';
|
|
}
|
|
}elseif(isset($_POST['get_kredit']))
|
|
{
|
|
//ïîëîæèòü äåíüãè íà ñ÷åò
|
|
$mn = floor((int)($_POST['get_sum']*100));
|
|
$mn = round(($mn/100),2);
|
|
if($u->bank['money1']>=$mn)
|
|
{
|
|
if($mn<0.01 || $mn>1000000000)
|
|
{
|
|
$re2 = 'Íåâåðíî óêàçàíà ñóììà (Ñíÿòü '.((int)$_POST['get_sum']).' êð.)';
|
|
}else{
|
|
$upd = mysql_query('UPDATE `users` SET `money` = "'.mysql_real_escape_string($u->info['money']+$mn).'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|
if($upd)
|
|
{
|
|
$u->bank['money1'] -= $mn;
|
|
$u->info['money'] += $mn;
|
|
mysql_query('UPDATE `bank` SET `money1` = "'.mysql_real_escape_string($u->bank['money1']).'" WHERE `id` = "'.$u->bank['id'].'" LIMIT 1');
|
|
$u->addDelo(3,$u->info['id'],'Âû ñíÿëè ñî ñ÷åòà <b>'.$mn.' êð.</b>, êîìèññèÿ <b>0 êð.</b> <i>(Èòîãî: '.$u->bank['money1'].' êð., '.$u->bank['money2'].' åêð.)</i>',time(),$u->info['city'],'Bank.System',0,0,$u->bank['id']);
|
|
$re2 = 'Âû óäà÷íî ñíÿëè ñî ñ÷åòà <b>'.$mn.' êð.</b>';
|
|
}else{
|
|
$re2 = 'Íå óäàëîñü âûïîëíèòü îïåðàöèþ';
|
|
}
|
|
}
|
|
}else{
|
|
$re2 = 'Ó âàñ íåò <b>'.$mn.' êð.</b> íà ñ÷åòå';
|
|
}
|
|
}elseif(isset($_POST['add_kredit']))
|
|
{
|
|
//ïîëîæèòü äåíüãè íà ñ÷åò
|
|
$mn = floor((int)($_POST['add_sum']*100));
|
|
$mn = round(($mn/100),2);
|
|
if($u->info['money']>=$mn)
|
|
{
|
|
if($mn<0.01 || $mn>1000000000)
|
|
{
|
|
$re2 = 'Íåâåðíî óêàçàíà ñóììà (Ïîïîëíåíèå ñ÷åòà)';
|
|
}else{
|
|
$upd = mysql_query('UPDATE `users` SET `money` = "'.mysql_real_escape_string($u->info['money']-$mn).'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|
if($upd)
|
|
{
|
|
$u->bank['money1'] += $mn;
|
|
$u->info['money'] -= $mn;
|
|
mysql_query('UPDATE `bank` SET `money1` = "'.mysql_real_escape_string($u->bank['money1']).'" WHERE `id` = "'.$u->bank['id'].'" LIMIT 1');
|
|
$u->addDelo(3,$u->info['id'],'Âû ïîëîæèëè íà ñ÷åò <b>'.$mn.' êð.</b>, êîìèññèÿ <b>0 êð.</b> <i>(Èòîãî: '.$u->bank['money1'].' êð., '.$u->bank['money2'].' åêð.)</i>',time(),$u->info['city'],'Bank.System',0,0,$u->bank['id']);
|
|
$re2 = 'Âû óäà÷íî ïîëîæèëè íà ñâîé ñ÷åò <b>'.$mn.' êð.</b>';
|
|
}else{
|
|
$re2 = 'Íå óäàëîñü âûïîëíèòü îïåðàöèþ';
|
|
}
|
|
}
|
|
}else{
|
|
$re2 = 'Ó âàñ íåò ïðè ñåáå <b>'.$mn.' êð.</b>';
|
|
}
|
|
}elseif(isset($_POST['change_psw2']))
|
|
{
|
|
//ñìåíà ïàðîëÿ ñ÷åòà
|
|
$sm = $u->testAction('`uid` = "'.$u->info['id'].'" AND `vals` = "id='.$u->bank['id'].'&new_pass='.$u->bank['pass'].'" AND `vars` = "bank_new_pass" AND `time` > "'.(time()-24*60*60).'" LIMIT 1',1);
|
|
if($_POST['new_psw1']!=$_POST['new_psw2'])
|
|
{
|
|
$re2 = 'Ïàðîëè íå ñîâïàäàþò';
|
|
}elseif(iconv_strlen($_POST['new_psw1'])<6 || iconv_strlen($_POST['new_psw1'])>32)
|
|
{
|
|
$re2 = 'Ïàðîëü íå ìîæåò áûòü êîðî÷å 6 èëè äëèíåå 32 ñèìâîëîâ';
|
|
}elseif(isset($sm['id']))
|
|
{
|
|
$re2 = 'Íåëüçÿ ìåíÿòü ïàðîëü ÷àùå îäíîãî ðàçà â äåíü';
|
|
}else{
|
|
//ìåíÿåì
|
|
$upd = mysql_query('UPDATE `bank` SET `pass` = "'.mysql_real_escape_string($_POST['new_psw1']).'" WHERE `id` = "'.$u->bank['id'].'" LIMIT 1');
|
|
if($upd)
|
|
{
|
|
$u->addAction(time(),'bank_new_pass','id='.$u->bank['id'].'&new_pass='.$_POST['new_psw1'].'');
|
|
$u->bank['pass'] = $_POST['new_psw1'];
|
|
$re2 = 'Ïàðîëü îò ñ÷åòà ¹<b>'.getNum($u->bank['id']).'</b> áûë óñïåøíî èçìåíåí<br>Íîâûé ïàðîëü: <b>'.$u->bank['pass'].'</b>';
|
|
$u->addDelo(3,$u->info['id'],'Áûë èçìåíåí ïàðîëü îò ñ÷åòà.',time(),$u->info['city'],'Bank.System',0,0,$u->bank['id']);
|
|
}else{
|
|
$re2 = 'Âàì îòêàçàëè â ñìåíå ïàðîëÿ';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if($re!=''){ echo '<div align="right"><font color="red"><b>'.$re.'</b></font></div>'; } ?>
|
|
<style type="text/css">
|
|
|
|
.pH3 { COLOR: #8f0000; FONT-FAMILY: Arial; FONT-SIZE: 12pt; FONT-WEIGHT: bold; }
|
|
.class_ {
|
|
font-weight: bold;
|
|
color: #C5C5C5;
|
|
cursor:pointer;
|
|
}
|
|
.class_st {
|
|
font-weight: bold;
|
|
color: #659BA3;
|
|
cursor:pointer;
|
|
}
|
|
.class__ {
|
|
font-weight: bold;
|
|
color: #FFFFFF;
|
|
cursor:pointer;
|
|
background-color: #659BA3;
|
|
}
|
|
.class__st {
|
|
font-weight: bold;
|
|
color: #FFFFFF;
|
|
cursor:pointer;
|
|
background-color: #659BA3;
|
|
font-size: 10px;
|
|
}
|
|
.class_old {
|
|
font-weight: bold;
|
|
color: #919191;
|
|
cursor:pointer;
|
|
}
|
|
.class__old {
|
|
font-weight: bold;
|
|
color: #FFFFFF;
|
|
cursor:pointer;
|
|
background-color: #838383;
|
|
font-size: 10px;
|
|
}
|
|
</style>
|
|
<TABLE width="100%" cellspacing="0" cellpadding="0">
|
|
<tr><td>
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
<tr>
|
|
<td><div align="center">
|
|
<div align="center" class="pH3">
|
|
<h3>Áàíê<br /></h3>
|
|
</div>
|
|
</div></td>
|
|
<td width="200">
|
|
<div style="float:right;">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tr>
|
|
<td width="100%"> </td>
|
|
<td><table border="0" cellpadding="0" cellspacing="0">
|
|
<tr align="right" valign="top">
|
|
<td><!-- -->
|
|
<? echo $goLis; ?>
|
|
<!-- -->
|
|
<table border="0" cellspacing="0" cellpadding="0">
|
|
<tr>
|
|
<td nowrap="nowrap"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
|
|
<tr>
|
|
<td bgcolor="#D3D3D3"><img src="https://img.new-combats.com/i/move/links.gif" width="9" height="7" /></td>
|
|
<td bgcolor="#D3D3D3" nowrap="nowrap"><a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.11&rnd=<? echo $code; ?>';" title="<? thisInfRm('1.180.0.11',1); ?>">Ñòðàøèëêèíà óëèöà</a></td>
|
|
</tr>
|
|
</table></td>
|
|
</tr>
|
|
</table></td>
|
|
</tr>
|
|
</table></td>
|
|
</tr>
|
|
</table>
|
|
</div></td>
|
|
</tr>
|
|
</table>
|
|
<TABLE width="100%" cellspacing="0" cellpadding="4">
|
|
<TR>
|
|
<form name="F1" method="post">
|
|
<TD valign="top" align="left">
|
|
<!--Ìàãàçèí--></TD>
|
|
</FORM>
|
|
</TR>
|
|
<TR>
|
|
<TD valign="top" align="left">
|
|
<? if($re2!=''){ echo '<div align="left"><font color="red">'.$re2.'</font></div><br>'; }
|
|
if(!isset($u->bank['id']))
|
|
{
|
|
?>
|
|
Ìû ïðåäîñòàâëÿåì ñëåäóþùèå óñëóãè:
|
|
<OL>
|
|
<LI>Îòêðûòèå ñ÷åòà<LI>Âîçìîæíîñòü ïîëîæèòü/ñíÿòü êðåäèòû/åâðîêðåäèòû ñî ñ÷åòà
|
|
<LI>Ïåðåâåñòè êðåäèòû/åâðîêðåäèòû ñ îäíîãî ñ÷åòà íà äðóãîé
|
|
<LI>Îáìåííûé ïóíêò. Îáìåí åâðîêðåäèòîâ íà êðåäèòû
|
|
</OL>
|
|
<script type="text/javascript" src="js/jquery.js"></script>
|
|
<script>
|
|
function hidecreatefx() {
|
|
if( $('#hidecreate').css('display') != 'none' ) {
|
|
$('#hidecreate').css('display','none');
|
|
}else{
|
|
$('#hidecreate').css('display','');
|
|
}
|
|
}
|
|
</script>
|
|
<FORM action="main.php?open&rnd=<? echo $code; ?>" method="POST">
|
|
Õîòèòå îòêðûòü ñâîé ñ÷åò? Óñëóãà ïëàòíàÿ: <INPUT onclick="hidecreatefx();" TYPE="button" value="Îòêðûòü ñ÷åò">
|
|
<div id="hidecreate" style="display:none">
|
|
<FIELDSET style="width:300px;"><LEGEND><B>Îòêðûòèå ñ÷åòà</B> </LEGEND>
|
|
<small>
|
|
<? if ($u->info['level'] < 8 && $c['zuby'] == true) { ?>
|
|
<center>
|
|
<input name="rdn01" type="radio" value="1"> <b>3.00 êð.</b> <input name="rdn01" type="radio" value="2"> <?=$u->zuby(15)?>
|
|
</center>
|
|
<hr />
|
|
<? }else{
|
|
?>
|
|
<center>
|
|
<input checked="checked" name="rdn01" type="radio" value="1"> <b>3.00 êð.</b>
|
|
</center>
|
|
<hr />
|
|
<?
|
|
} ?>
|
|
<style>
|
|
fieldset {
|
|
border:1px solid #AEAEAE;
|
|
}
|
|
hr {
|
|
border:0;
|
|
border-bottom:1px solid #aeaeae;
|
|
}
|
|
</style>
|
|
<table width="300" border="0" cellspacing="0" cellpadding="0">
|
|
<tr>
|
|
<td>Ïàðîëü ñ÷åòà:</td>
|
|
<td><INPUT style='width:90;' type="password" value="" name="pass1"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Åùå ðàç:</td>
|
|
<td><INPUT style='width:90;' type="password" value="" name="pass2"></td>
|
|
</tr>
|
|
</table>
|
|
</small>
|
|
<center>
|
|
<INPUT TYPE="submit" value="Îòêðûòü ñ÷åò">
|
|
</center>
|
|
</FIELDSET>
|
|
</div>
|
|
</FORM>
|
|
<form action="main.php?enter&rnd=<? echo $code; ?>" method="POST">
|
|
<br />
|
|
<FIELDSET style="width:300px;"><LEGEND><B>Óïðàâëåíèå ñ÷åòîì</B> </LEGEND>
|
|
<TABLE width="300">
|
|
<TR><TD valign=top>
|
|
<TABLE>
|
|
<TR><TD>Íîìåð ñ÷åòà</td> <TD colspan=2><select name="bank" size=0 style="width: 90px">
|
|
<?
|
|
$sp = mysql_query('SELECT * FROM `bank` WHERE `uid` = "'.$u->info['id'].'" AND `block` = "0"');
|
|
while($pl = mysql_fetch_array($sp))
|
|
{
|
|
?>
|
|
<option value="<? echo $pl['id']; ?>" selected="selected"><? echo getNum($pl['id']); ?></option>
|
|
<?
|
|
}
|
|
?>
|
|
</select></td></tr>
|
|
<TR><TD>Ïàðîëü</td><td> <INPUT style='width:90;' type="password" value="" name="pass"></td>
|
|
</tr>
|
|
<TR><TD colspan=3 align=center><INPUT TYPE="submit" value="Âîéòè"></td></tr>
|
|
</TABLE>
|
|
</TD>
|
|
</TABLE>
|
|
</FIELDSET>
|
|
</form>
|
|
<form method=GET action='main.php'>
|
|
<input type=hidden name='res' value=<? echo $code; ?>>
|
|
<br />
|
|
<br />
|
|
Çàáûëè ïàðîëü? Ìîæíî åãî âûñëàòü íà email, íîìåð ñ÷åòà:<input type=text name='schet'> <input type="submit" value="Âûñëàòü" /></TD>
|
|
</form>
|
|
</TR>
|
|
</TABLE>
|
|
</table>
|
|
<br>
|
|
<div id="textgo" style="visibility:hidden;"></div>
|
|
<?
|
|
}else{
|
|
|
|
?>
|
|
<style>
|
|
.pay td {
|
|
width:50px;
|
|
}
|
|
.pay td img{
|
|
display:block;
|
|
margin:1px 0 0 0;
|
|
}
|
|
.pay td:hover img{
|
|
margin:0 0 1px 0;
|
|
}
|
|
.pay td:hover img {
|
|
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=80); /* IE 5.5+*/
|
|
-moz-opacity: 0.8; /* Mozilla 1.6 è íèæå */
|
|
-khtml-opacity: 0.8; /* Konqueror 3.1, Safari 1.1 */
|
|
opacity: 0.8; /* CSS3 - Mozilla 1.7b +, Firefox 0.9 +, Safari 1.2+, Opera 9 */
|
|
cursor:pointer;
|
|
}
|
|
</style>
|
|
<!-- óïðàâëåíèå ñ÷åòîì -->
|
|
<FORM action="main.php" method="POST">
|
|
<INPUT TYPE=hidden name="sd4" value="<? echo $u->info['nextAct']; ?>">
|
|
<TABLE width=100%>
|
|
<TR>
|
|
<TD valign=top width=30%><H4>Óïðàâëåíèå ñ÷åòîì</H4>
|
|
<b>Ñ÷¸ò ¹:</b> <? echo getNum($u->bank['id']); ?> <a href="?exit=<? echo $code; ?>" title="Îêîí÷èòü ðàáîòó c òåêóùèì ñ÷åòîì">[x]</a><br>
|
|
</TD>
|
|
<TD valign=top align=center width=40%>
|
|
<TABLE><TR><TD>
|
|
<FIELDSET><LEGEND><B>Ó âàñ íà ñ÷åòå</B> </LEGEND>
|
|
<TABLE>
|
|
<TR><TD>Êðåäèòîâ:</TD><TD><B><? echo $u->round2($u->bank['money1']); ?></B></TD></TR>
|
|
<TR><TD>Åâðîêðåäèòîâ:</TD>
|
|
<TD><B><? echo $u->round2($u->bank['money2']); ?></B></TD>
|
|
</TR>
|
|
<TR><TD colspan=2><HR></TD></TR>
|
|
<TR><TD>Ïðè ñåáå íàëè÷íûõ:</TD><TD><B><? echo $u->round2($u->info['money']); ?> êð.</B></TD></TR>
|
|
</TABLE>
|
|
</FIELDSET>
|
|
</TD></TR></TABLE>
|
|
</TD>
|
|
<TD valign=top align=right width=30%><FONT COLOR=red>Âíèìàíèå!</FONT> Íåêîòîðûå óñëóãè áàíêà ïëàòíûå, î ðàçìåðå âçûìàåìîé êîìèññèè íàïèñàíî â ñîîòâåòñòâóþùåì ðàçäåëå.</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<style>
|
|
fieldset {
|
|
border:1px solid #AEAEAE;
|
|
}
|
|
hr {
|
|
border:0;
|
|
border-bottom:1px solid #aeaeae;
|
|
}
|
|
</style>
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
<tr>
|
|
<td width="50%" valign="top"><table width="100%" cellspacing="5">
|
|
<tr>
|
|
<td valign="top" width="50%"><fieldset>
|
|
<legend><b>Ïîïîëíèòü ñ÷åò</b> </legend>
|
|
Ñóììà
|
|
<input type="text" name="add_sum" id="add_sum" size="6" maxlength="10" />
|
|
êð.
|
|
<input type="submit" name="add_kredit" value="Ïîëîæèòü êðåäèòû íà ñ÷åò" onclick="if(Math.round(document.getElementById('add_sum')).value==0) {alert('Óêàæèòå ñóììó è íîìåð ñ÷åòà'); return false;} else {return confirm('Âû õîòèòå ïîëîæèòü íà ñâîé ñ÷åò '+(Math.floor(document.getElementById('add_sum').value*100)/100).toFixed(2)+' êð. ?')}" />
|
|
<br />
|
|
</fieldset></td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><fieldset>
|
|
<legend><b>Ïåðåâåñòè êðåäèòû íà äðóãîé ñ÷åò</b> </legend>
|
|
Ñóììà
|
|
<input id="vl1" value="" type="text" name="tansfer_sum" size="6" maxlength="10" />
|
|
êð.<br />
|
|
Íîìåð ñ÷åòà êóäà ïåðåâåñòè êðåäèòû
|
|
<input value="" type="text" id="vl2" name="num" size="12" maxlength="15" />
|
|
<br />
|
|
<input type="submit" name="transfer_kredit" value="Ïåðåâåñòè êðåäèòû íà äðóãîé ñ÷åò" onclick="if(Math.round(document.getElementById('vl1')).value==0 || Math.round(document.getElementById('vl2').value)==0) {alert('Óêàæèòå ñóììó è íîìåð ñ÷åòà'); return false;} else {return confirm('Âû õîòèòå ïåðåâåñòè ñî ñâîåãî ñ÷åòà '+(Math.floor(document.getElementById('vl1').value*100)/100).toFixed(2)+' êð. íà ñ÷åò íîìåð '+Math.floor(document.getElementById('vl2').value)+' ?')}" />
|
|
<br />
|
|
<small>Êîìèññèÿ ñîñòàâëÿåò <b>3.00 %</b> îò ñóììû, íî íå ìåíåå <b>1.00 êð</b>.</small>
|
|
</fieldset></td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><fieldset>
|
|
<legend><b>Îáìåííûé ïóíêò</b> </legend>
|
|
Îáìåíÿòü åâðîêðåäèòû íà êðåäèòû.<br />
|
|
Êóðñ <b>1 åêð.</b> = <b><? echo $con; ?>.00 êð.</b><br />
|
|
Ñóììà
|
|
<input type="text" name="convert_sum" id="convert_sum" size="6" maxlength="10" />
|
|
åêð.
|
|
<input type="submit" name="convert_ekredit" value="Îáìåíÿòü" <? /*onclick="return confirm('Âû õîòèòå îáìåíÿòü '+(Math.floor(document.getElementById('convert_sum').value*100)/100).toFixed(2)+' åêð. íà '+(Math.floor(document.getElementById('convert_sum').value*100)/100*<? echo (0+$con); ?>).toFixed(2)+' êð. ?');" */ ?> />
|
|
</fieldset></td>
|
|
</tr>
|
|
<? if($u->info['align']!=2 && $u->info['haos'] < time() && $u->info['haos'] != 1 && $c['crtoecr'] > 0) { ?>
|
|
<tr>
|
|
<td valign="top"><fieldset style="background-color:#DDEAD7">
|
|
<legend><b>Îáìåííûé ïóíêò</b> </legend>
|
|
Îáìåíÿòü êðåäèòû íà åâðîêðåäèòû.<br />
|
|
Êóðñ <b><? echo $noc; ?> êð.</b> = <b>1.00 åêð.</b><br />
|
|
Ñóììà
|
|
<input type="text" name="convert_sum2" id="convert_sum2" size="6" maxlength="10" />
|
|
êð.
|
|
<br />
|
|
<small>Êîìèññèÿ ñîñòàâëÿåò <b>3.00 %</b> îò ñóììû, à òàê-æå <b>5.00 êð</b>.</small>
|
|
<input type="submit" name="convert_kredit" value="Îáìåíÿòü" onclick="return confirm('Âû õîòèòå îáìåíÿòü '+(5+Math.floor((document.getElementById('convert_sum2').value)*103)/100).toFixed(2)+' êð. íà '+(Math.floor(document.getElementById('convert_sum2').value*100)/100/<? echo $noc; ?>).toFixed(2)+' åêð. ?');" />
|
|
</fieldset></td>
|
|
</tr>
|
|
<? }
|
|
if($u->info['admin']>1000)
|
|
{
|
|
?>
|
|
<tr>
|
|
<td valign="top"><fieldset>
|
|
<legend><b>Ïåðåâåñòè åâðîêðåäèòû íà äðóãîé ñ÷åò</b> </legend>
|
|
Ñóììà
|
|
<input id="vl12" value="" type="text" name="tansfer_sum2" size="6" maxlength="10" />
|
|
åêð.<br />
|
|
Íîìåð ñ÷åòà êóäà ïåðåâåñòè êðåäèòû
|
|
<input value="" type="text" id="vl22" name="num2" size="12" maxlength="15" />
|
|
<br />
|
|
<input type="submit" name="transfer_kredit2" value="Ïåðåâåñòè åâðîêðåäèòû íà äðóãîé ñ÷åò" onclick="if(Math.round(document.getElementById('vl12')).value==0 || Math.round(document.getElementById('vl22').value)==0) {alert('Óêàæèòå ñóììó è íîìåð ñ÷åòà'); return false;} else {return confirm('Âû õîòèòå ïåðåâåñòè ñî ñâîåãî ñ÷åòà '+(Math.floor(document.getElementById('vl12').value*100)/100).toFixed(2)+' åêð. íà ñ÷åò íîìåð '+Math.floor(document.getElementById('vl22').value)+' ?')}" />
|
|
<br />
|
|
Êîìèññèÿ ñîñòàâëÿåò <b>0.00 %</b> îò ñóììû, íî íå ìåíåå <b>0.01 åêð</b>.
|
|
</fieldset></td>
|
|
</tr>
|
|
<? } ?>
|
|
<tr>
|
|
<td valign="top"><fieldset>
|
|
<legend><b>Íàñòðîéêè</b> </legend>
|
|
Ó âàñ ðàçðåøåíà âûñûëêà íîìåðà ñ÷åòà è ïàðîëÿ íà email. Åñëè âû íå óâåðåíû â ñâîåì email, èëè óáåæäåíû, ÷òî íå çàáóäåòå ñâîé íîìåð ñ÷åòà è ïàðîëü ê íåìó, òî ìîæåòå çàïðåòèòü âûñûëêó ïàðîëÿ íà email. Ýòî óáåðåæåò âàñ îò êðàæè êðåäèòîâ ñ âàøåãî ñ÷åòà â ñëó÷àå âçëîìà âàøåãî email. Íî åñëè âû ñàìè çàáóäåòå ñâîé íîìåð ñ÷åòà è/èëè ïàðîëü, âàì óæå íèêòî íå ïîìîæåò!<br />
|
|
<input type="submit" name="stop_send_email2" value="Çàïðåòèòü âûñûëêó ïàðîëÿ íà email" />
|
|
<hr />
|
|
<b>Ñìåíèòü ïàðîëü</b><br />
|
|
<table>
|
|
<tr>
|
|
<td>Íîâûé ïàðîëü</td>
|
|
<td><input type="password" name="new_psw1" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Ââåäèòå íîâûé ïàðîëü ïîâòîðíî</td>
|
|
<td><input type="password" name="new_psw2" /></td>
|
|
</tr>
|
|
</table>
|
|
<input type="submit" name="change_psw2" value="Ñìåíèòü ïàðîëü" />
|
|
<br />
|
|
<div id="keypad4" align="center" style="display: none;"></div>
|
|
</fieldset></td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"> </td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td width="50%" valign="top"><table width="100%" align="left" cellspacing="5">
|
|
<tr>
|
|
<td valign="top" width="50%"><fieldset>
|
|
<legend><b>Ñíÿòü ñî ñ÷åòà</b> </legend>
|
|
Ñóììà
|
|
<input type="text" name="get_sum" id="get_sum" size="6" maxlength="10" />
|
|
êð.
|
|
<input type="submit" name="get_kredit" value="Ñíÿòü êðåäèòû ñî ñ÷åòà" onclick="if(Math.round(document.getElementById('get_sum')).value==0) {alert('Óêàæèòå ñóììó è íîìåð ñ÷åòà'); return false;} else {return confirm('Âû õîòèòå ñíÿòü ñî ñâîåãî ñ÷åòà '+(Math.floor(document.getElementById('get_sum').value*100)/100).toFixed(2)+' êð. ?')}" />
|
|
<br />
|
|
</fieldset></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><fieldset>
|
|
<legend><b>Êóðñ åâðîêðåäèòà ê ìèðîâîé âàëþòå</b> </legend>
|
|
<table width="100%" border="0" cellpadding="2" cellspacing="0">
|
|
<?
|
|
$pl = mysql_fetch_array(mysql_query('SELECT * FROM `bank_table` ORDER BY `time` DESC LIMIT 1'));
|
|
if(isset($pl['id'])) {
|
|
?>
|
|
<tr>
|
|
<td><small>Äàííûå íà <b><?=date('d.m.y H:i',$pl['time'])?></b> áåç ó÷åòà êîìèññèé</small></td>
|
|
</tr>
|
|
<?
|
|
$pl['RUB'] = 1;
|
|
|
|
$i = 0;
|
|
$true = array(
|
|
array('USD', 'äîëëàðîâ ÑØÀ'),
|
|
array('EUR', 'ÅÂÐÎ'),
|
|
array('RUB','ðîññèéñêèõ ðóáëåé'),
|
|
array('UAH','óêð. ãðèâåí'),
|
|
array('BYR','áåëîðóññêèõ ðóáëåé'),
|
|
array('AZN','àçåðáàéäæàíñêèõ ìàíàò'),
|
|
array('GBP','àíãë. ôóíòîâ ñòåðëèíãîâ')
|
|
);
|
|
while($i < count($true)) {
|
|
?>
|
|
<tr>
|
|
<td><span>1 åêð. = </span><span style="display:inline-block;width:100px"><b><?=round( ($pl['cur']/$pl[$true[$i][0]]) , 4 )?></b></span><span><?=$true[$i][1]?></span></td>
|
|
</tr>
|
|
<?
|
|
$i++;
|
|
}
|
|
}else{
|
|
?>
|
|
<tr>
|
|
<td><small><center><font color=green><b> 10UAH = 1 Åâðîêðåäèò </b></font></center></small></td>
|
|
</tr>
|
|
<tr>
|
|
<td><small><center><font color=green><b>0.35USD = 1 Åâðîêðåäèò </b></font></center></small></td>
|
|
</tr>
|
|
<tr>
|
|
<td><small><center><font color=green><b> 20RUB = 1 Åâðîêðåäèò </b></font></center></small></td>
|
|
</tr>
|
|
<tr>
|
|
<td><small><center><font color=green><b>0.29EUR = 1 Åâðîêðåäèò </b></font></center></small></td>
|
|
</tr>
|
|
<? } ?>
|
|
</table>
|
|
</fieldset></td>
|
|
</tr><tr>
|
|
<td valign="top"><fieldset>
|
|
<legend><b>Ïîñëåäíèå îïåðàöèè</b> </legend>
|
|
<table width="100%" border="0" cellpadding="2" cellspacing="0">
|
|
<?
|
|
$sp = mysql_query('SELECT * FROM `users_delo` WHERE `uid` = "'.$u->info['id'].'" AND `dop` = "'.$u->bank['id'].'" AND `type` = "3" ORDER BY `time` DESC LIMIT 21');
|
|
while($pl = mysql_fetch_array($sp))
|
|
{
|
|
?>
|
|
<tr>
|
|
<td><small><? echo '<font color="green">'.date('d.m.Y H:i',$pl['time']).'</font> '; echo $pl['text']; ?></small></td>
|
|
</tr>
|
|
<?
|
|
}
|
|
?>
|
|
</table>
|
|
</fieldset></td>
|
|
</tr>
|
|
|
|
</table></td>
|
|
</tr>
|
|
</table>
|
|
</FORM>
|
|
<small>Ñóììà óêàçàííàÿ â îêíå îïîâåùåíèÿ è ñóììû âçûìàåìàÿ\íà÷èñëÿåìàÿ ìîãóò ðàçëè÷àòüñÿ.</small>
|
|
<?
|
|
}
|
|
}
|
|
?> |