#!/usr/bin/perl # ------------------- NoDeny ------------------ # Copyright (&#1071;) Volik Stanislav, 2008, 2009 # Read license http://nodeny.com.ua/license.txt # --------------------------------------------- $VER=49.32; $VER==$VER_chk or &VerWrong($F{a}); $PR{88} or &Error('&#1084;&#1045;&#1056; &#1054;&#1055;&#1070;&#1041; +&#1052;&#1070; &#1071;&#1053;&#1043;&#1044;&#1070;&#1052;&#1061;&#104 +5; &#1057;&#1042;&#1045;&#1056;&#1052;&#1064;&#1059; &#1043;&#1070;&# +1054;&#1061;&#1071;&#1045;&#1048;.'); &LoadMoneyMod; $mid=int $F{mid}; if( $mid ) { $p=sql_select_line($dbh,"SELECT *,AES_DECRYPT(passwd,'$Passwd_Key') + AS pass FROM users WHERE id=$mid",'&#1076;&#1070;&#1052;&#1052;&#106 +4;&#1045; &#1053;&#1071;&#1052;&#1053;&#1041;&#1052;&#1053;&#1048; &# +1043;&#1070;&#1054;&#1061;&#1071;&#1061;',"&#1071;&#1049;&#1055;&#106 +4;&#1056;: select from users where id=$mid"); $p or &Error("&#1089;&#1049;&#1070;&#1043;&#1070;&#1052;&#1052;&#10 +70;&#1066; &#1053;&#1071;&#1052;&#1053;&#1041;&#1052;&#1070;&#1066; & +#1043;&#1070;&#1054;&#1061;&#1071;&#1069; id=$mid &#1052;&#1045; &#10 +71;&#1057;&#1067;&#1045;&#1071;&#1056;&#1041;&#1057;&#1045;&#1056;!") +; $p->{mid} && &Error("&#1084;&#1045;&#1050;&#1069;&#1043;&#1066; &#1 +071;&#1053;&#1043;&#1044;&#1070;&#1056;&#1069; &#1070;&#1050;&#1061;& +#1070;&#1071;&#1052;&#1057;&#1063; &#1043;&#1070;&#1054;&#1061;&#1071 +;&#1069; &#1044;&#1050;&#1066; &#1070;&#1050;&#1061;&#1070;&#1071;&#1 +052;&#1053;&#1048;."); ($grp,$paket,$paket3)=&Get_fields('grp','paket','paket3'); $UGrp_allow{$grp}<2 && &Error("&#1089; &#1041;&#1070;&#1071; &#1052 +;&#1045;&#1056; &#1054;&#1055;&#1070;&#1041; &#1052;&#1070; &#1071;&# +1053;&#1043;&#1044;&#1070;&#1052;&#1061;&#1045; &#1057;&#1042;&#1045; +&#1056;&#1052;&#1064;&#1059; &#1043;&#1070;&#1054;&#1061;&#1071;&#104 +5;&#1048; &#1041; &#1043;&#1070;&#1049;&#1070;&#1043;&#1070;&#1052;&# +1052;&#1053;&#1048; &#1062;&#1055;&#1057;&#1054;&#1054;&#1045;. &#107 +3;&#1053;&#1043;&#1051;&#1053;&#1060;&#1052;&#1053;, &#1056;&#1053;&# +1050;&#1069;&#1049;&#1053; &#1042;&#1056;&#1053; &#1065;&#1056;&#1061 +; &#1054;&#1055;&#1070;&#1041;&#1070; &#1040;&#1064;&#1050;&#1061; &# +1043;&#1070;&#1040;&#1055;&#1070;&#1052;&#1064;.",$go_back); ($name,$fio,$passwd)=&Get_filtr_fields('name','fio','pass'); $origpasswd=$br.'&#1086;&#1070;&#1055;&#1053;&#1050;&#1069; &#1053; +&#1071;&#1052;&#1053;&#1041;&#1052;&#1053;&#1048; &#1043;&#1070;&#105 +4;&#1061;&#1071;&#1061;:'.$br.'<input type=radio name=passnum value=3 + checked> '.&input_t('passwd3',$passwd,20,30); $OUT.=$br.&MessX(&Printf('&#1103;&#1053;&#1043;&#1044;&#1070;&#1052 +;&#1061;&#1045; &#1070;&#1050;&#1061;&#1070;&#1071;&#1052;&#1053;&#10 +48; &#1043;&#1070;&#1054;&#1061;&#1071;&#1061; &#1044;&#1050;&#1066; +&#1050;&#1053;&#1062;&#1061;&#1052;&#1070;: [bold], &#1090;&#1093;&#1 +085;: [bold], id: [bold]',$name,$fio,$mid),0,1); } else { # &#1084;&#1070;&#1048;&#1044;&#1045;&#1051; &#1054;&#1070;&#1049;& +#1045;&#1056;, &#1049; &#1049;&#1053;&#1056;&#1053;&#1055;&#1053;&#10 +51;&#1057; &#1070;&#1044;&#1051;&#1061;&#1052; &#1061;&#1051;&#1045;& +#1045;&#1056; &#1044;&#1053;&#1071;&#1056;&#1057;&#1054; %tarifs=(); $first_pkt=0; foreach( 1..$m_tarif ) { next if !$Plan_name[$_] || !$Plan_allow_show[$_]; $first_pkt||=$_; $tarifs{$_}=$Plan_name_short[$_]; } $paket=int $F{paket}; $paket=$first_pkt if !$Plan_allow_show[$paket]; # &#1071;&#1060;&#1 +057;&#1050;&#1069;&#1052;&#1061;&#1042;&#1070;&#1050; - &#1054;&#1070 +;&#1049;&#1045;&#1056; &#1040;&#1057;&#1044;&#1045;&#1056; &#1054;&#1 +045;&#1055;&#1041;&#1064;&#1051; &#1061;&#1043; &#1071;&#1054;&#1061; +&#1071;&#1049;&#1070; $pakets=join '',map{ &tag('option',$tarifs{$_},"value=$_".($paket== +$_ && ' selected')) } sort {$tarifs{$a} cmp $tarifs{$b}} keys %tarifs +; $pakets=&tag('select',$pakets,'name=paket size=1'); $fio=$origpasswd=''; $OUT.=&Mess3('row2',&bold('&#1103;&#1053;&#1043;&#1044;&#1070;&#105 +2;&#1061;&#1045; &#1057;&#1042;&#1045;&#1056;&#1052;&#1053;&#1048; &# +1043;&#1070;&#1054;&#1061;&#1071;&#1061; &#1049;&#1050;&#1061;&#1045; +&#1052;&#1056;&#1070;')).$br; @grps=grep{ $_ && $UGrp_allow{$_}>1 } keys %UGrp_name; $F{grp}=$grps[0] if $#grps==0; # &#1045;&#1071;&#1050;&#1061; &#107 +0;&#1044;&#1051;&#1061;&#1052;&#1057; &#1044;&#1053;&#1071;&#1056;&#1 +057;&#1054;&#1052;&#1070; &#1041;&#1071;&#1045;&#1062;&#1053; &#1053; +&#1044;&#1052;&#1070; &#1062;&#1055;&#1057;&#1054;&#1054;&#1070;, &#1 +071;&#1042;&#1061;&#1056;&#1070;&#1045;&#1051;, &#1042;&#1056;&#1053; + &#1053;&#1052; &#1045;&#1045; &#1061; &#1041;&#1064;&#1040;&#1055;&# +1070;&#1050; if( defined $F{grp} ) { $grp=int $F{grp}; $UGrp_allow{$grp}<2 && &Error('&#1089; &#1041;&#1070;&#1071; &#1 +052;&#1045;&#1056; &#1054;&#1055;&#1070;&#1041; &#1052;&#1070; &#1071 +;&#1053;&#1043;&#1044;&#1070;&#1052;&#1061;&#1045; &#1057;&#1042;&#10 +45;&#1056;&#1052;&#1064;&#1059; &#1043;&#1070;&#1054;&#1061;&#1071;&# +1045;&#1048; &#1041; &#1043;&#1070;&#1049;&#1070;&#1043;&#1070;&#1052 +;&#1052;&#1053;&#1048; &#1062;&#1055;&#1057;&#1054;&#1054;&#1045;. &# +1073;&#1053;&#1043;&#1051;&#1053;&#1060;&#1052;&#1053; &#1056;&#1053; +&#1050;&#1069;&#1049;&#1053; &#1042;&#1056;&#1053; &#1065;&#1056;&#10 +61; &#1054;&#1055;&#1070;&#1041;&#1070; &#1040;&#1064;&#1050;&#1061; +&#1043;&#1070;&#1040;&#1055;&#1070;&#1052;&#1064;.',$go_back); } else { $out1=$out2=''; foreach $g (sort {$UGrp_name{$a} cmp $UGrp_name{$b}} keys %UGrp_ +name) { next if $UGrp_allow{$g}<2 || !$g; $h="<option value=$g".($grp==$g && ' selected').">$UGrp_name{ +$g}</option>"; $UGrp{$g}=~/^2$|^2,|,2,|,2$/? ($out2.=$h) : ($out1.=$h); } $out=&tag('select',$out1.$out2,'name=grp size=1'); $out=&Center(&Table('table2',&RRow('row1','ll',$out,&submit_a('& +#1076;&#1070;&#1050;&#1045;&#1045; &rarr;')))); $OUT.=&MessX(&form('!'=>1,"&#1073;&#1064;&#1040;&#1045;&#1055;&# +1061;&#1056;&#1045; &#1062;&#1055;&#1057;&#1054;&#1054;&#1057; &#1049 +;&#1050;&#1061;&#1045;&#1052;&#1056;&#1070;, &#1041; &#1049;&#1053;&# +1056;&#1053;&#1055;&#1053;&#1048; &#1071;&#1053;&#1040;&#1061;&#1055; +&#1070;&#1045;&#1056;&#1045;&#1071;&#1069; &#1071;&#1053;&#1043;&#104 +4;&#1070;&#1056;&#1069; &#1057;&#1042;&#1045;&#1056;&#1052;&#1057;&#1 +063; &#1043;&#1070;&#1054;&#1061;&#1071;&#1069;:".$br3.$out)); &Exit; } $paket3=int $F{paket3}; $paket3=0 if !defined($Plans3{$paket3}) || $Plans3{$paket3}{usr_grp +}!~/,$grp,/; $pakets3=join '',map {"<option value=$_".($paket3==$_ && ' selected +').">$Plans3{$_}{name}</option>"} sort {$Plans3{$a}{name} cmp $Plans3{$b}{name}} keys %Plans3; $pakets3&&=&tag('select',"<option value=0>&nbsp;</option>$pakets3", +'name=paket3 size=1'); } %fileds=('mid'=>$mid,'grp'=>$grp,'paket'=>$paket,'paket3'=>$paket3); $p=sql_select_line($dbh,"SELECT * FROM user_grp WHERE grp_id=$grp",'&# +1076;&#1070;&#1052;&#1052;&#1064;&#1045; &#1049;&#1050;&#1061;&#1045; +&#1052;&#1056;&#1071;&#1049;&#1053;&#1048; &#1062;&#1055;&#1057;&#105 +4;&#1054;&#1064;'); if( $p ) { $grp_block_limit=$p->{grp_block_limit}; $grp_nets=$p->{grp_nets}; @nets=split /\n/,$grp_nets if $grp_nets; } else { $grp_block_limit=0; $grp_nets=''; @nets=(); } {# &#1054;&#1055;&#1053;&#1041;&#1045;&#1055;&#1049;&#1070; &#1054;&#1 +070;&#1055;&#1053;&#1050;&#1066;, ip $need_form=0; $ip_str='IP'; $Ffio=&trim(defined $F{fio}? $F{fio} : $fio); $Fcontract_date=int $F{contract_date}; $Fcontract_date=0 if $Fcontract_date<0 || $Fcontract_date>31; $Fpassnum=int $F{passnum}; $Fpasswd=$Fpassnum>2? $F{passwd3} : $Fpassnum>1? $F{passwd2} : $Fpass +num>0? $F{passwd1} : $F{passwd0}; if( defined $Fpasswd ) { if( !$Fpasswd ) { &Message('&#1086;&#1057;&#1071;&#1056;&#1053;&#1048; &#1054;&#1 +070;&#1055;&#1053;&#1050;&#1069; &#1052;&#1045; &#1055;&#1070;&#1043; +&#1055;&#1045;&#1068;&#1045;&#1052;.','','&#1073;&#1052;&#1061;&#1051 +;&#1070;&#1052;&#1061;&#1045;'); $need_form=1; } elsif( length($Fpasswd)<4 ) { &Message('&#1087;&#1045;&#1049;&#1053;&#1051;&#1045;&#1052;&#10 +44;&#1057;&#1045;&#1056;&#1071;&#1066; &#1044;&#1050;&#1066; &#1040;& +#1045;&#1043;&#1053;&#1054;&#1070;&#1071;&#1052;&#1053;&#1071;&#1056; +&#1061; &#1061;&#1071;&#1054;&#1053;&#1050;&#1069;&#1043;&#1053;&#104 +1;&#1070;&#1056;&#1069; &#1054;&#1070;&#1055;&#1053;&#1050;&#1061; &# +1044;&#1050;&#1061;&#1052;&#1052;&#1053;&#1048; &#1052;&#1045; &#1051 +;&#1045;&#1052;&#1045;&#1045; 4&#1059; &#1071;&#1061;&#1051;&#1041;&# +1053;&#1050;&#1053;&#1041;.','','&#1086;&#1055;&#1045;&#1044;&#1057;& +#1054;&#1055;&#1045;&#1060;&#1044;&#1045;&#1052;&#1061;&#1045;'); } } $Fip=&trim($F{ip}); unless (defined $F{ip}) { $need_form=1; last; } if( $Fip!~/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/ || $1>255 || $2>255 || $3>25 +5 || $4>255 ) { &Message($Fip? 'IP-&#1070;&#1044;&#1055;&#1045;&#1071; &#1057;&#10 +49;&#1070;&#1043;&#1070;&#1052; &#1052;&#1045;&#1041;&#1045;&#1055;&# +1052;&#1053;.' : '&#1084;&#1045; &#1057;&#1049;&#1070;&#1043;&#1070;& +#1052; ip-&#1070;&#1044;&#1055;&#1045;&#1071;','','&#1073;&#1052;&#10 +61;&#1051;&#1070;&#1052;&#1061;&#1045;'); $ip_str=&tag('span','IP','class=error'); $need_form=1; last; } $sortip=$2*65536 + $3*256 + $4; if( $grp_nets && !&Check_Ip_in_Nets($Fip,@nets) ) { &Message('IP &#1052;&#1045; &#1054;&#1053;&#1054;&#1070;&#1044;&#1 +070;&#1045;&#1056; &#1041; &#1071;&#1054;&#1061;&#1071;&#1053;&#1049; + &#1055;&#1070;&#1043;&#1055;&#1045;&#1068;&#1045;&#1052;&#1052;&#106 +4;&#1059; &#1054;&#1053;&#1044;&#1071;&#1045;&#1056;&#1045;&#1048; &# +1044;&#1050;&#1066; &#1044;&#1070;&#1052;&#1052;&#1053;&#1048; &#1062 +;&#1055;&#1057;&#1054;&#1054;&#1064;.','','&#1073;&#1052;&#1061;&#105 +1;&#1070;&#1052;&#1061;&#1045;'); $ip_str=&tag('span','IP','class=error'); $need_form=1; last; } $p=&sql_select_line($dbh,"SELECT * FROM users WHERE ip='$Fip'",'&#110 +3;&#1057;&#1067;&#1045;&#1071;&#1056;&#1041;&#1057;&#1045;&#1056; &#1 +050;&#1061; &#1049;&#1050;&#1061;&#1045;&#1052;&#1056; &#1071; &#1056 +;&#1070;&#1049;&#1061;&#1051; &#1060;&#1045; ip?'); if( $p ) { &Message('&#1081;&#1050;&#1061;&#1045;&#1052;&#1056; &#1071; &#105 +7;&#1049;&#1070;&#1043;&#1070;&#1052;&#1052;&#1064;&#1051; ip &#1057; +&#1060;&#1045; &#1043;&#1070;&#1055;&#1045;&#1062;&#1061;&#1071;&#105 +6;&#1055;&#1061;&#1055;&#1053;&#1041;&#1070;&#1052;. &#1073;&#1053;&# +1043;&#1051;&#1053;&#1060;&#1052;&#1053; &#1054;&#1053;&#1049;&#1070; + &#1041;&#1064; &#1041;&#1041;&#1053;&#1044;&#1061;&#1050;&#1061; &#1 +044;&#1070;&#1052;&#1052;&#1064;&#1045;, &#1057;&#1049;&#1070;&#1043; +&#1070;&#1052;&#1052;&#1064;&#1048; ip &#1040;&#1064;&#1050; &#1043;& +#1070;&#1052;&#1066;&#1056;.','','&#1073;&#1052;&#1061;&#1051;&#1070; +&#1052;&#1061;&#1045;'); $ip_str=&tag('span','IP','class=error'); $need_form=1; last; } } { $need_form or last; $allow_nets=''; if( $grp_nets ) { &LoadNetMod; $first_ip=''; foreach $net (split /\n/,$grp_nets) { ($h)=&nNet_GetNextIp($net); $first_ip||=$h; $allow_nets.=&RRow('*','ll',$net,!!$h && &ahref('#',$h,qq{OnCli +ck="javascript:document.getElementById(1).value='$h'"})); } $allow_nets=&Table('tbg3',&RRow('tablebg','cc','&#1086;&#1053;&#10 +44;&#1071;&#1045;&#1056;&#1069;','&#1103;&#1041;&#1053;&#1040;&#1053; +&#1044;&#1052;&#1064;&#1048; ip').$allow_nets) if $allow_nets; } $i=0; $contact_sel=''; foreach( ' (&#1071;&#1045;&#1062;&#1053;&#1044;&#1052;&#1066;)',' (&# +1041;&#1042;&#1045;&#1055;&#1070;)',' (&#1054;&#1053;&#1043;&#1070;&# +1041;&#1042;&#1045;&#1055;&#1070;)','','','','','','','' ) { $contact_sel.="<option value=$i".($Fcontract_date==$i && ' selecte +d').'>'.&the_date($t-86400*$i++)." $_</option>"; } # &#1058;&#1053;&#1055;&#1051;&#1061;&#1055;&#1057;&#1045;&#1051; &#1 +071;&#1050;&#1057;&#1042;&#1070;&#1048;&#1052;&#1064;&#1048; &#1054;& +#1070;&#1055;&#1053;&#1050;&#1069; $rpass1=$rpass2=''; $len=9+int(rand 3); for ($i=0; $i<$len; $i++) {$rpass1.=(0..9,'A'..'Z','a'..'z','@','.',' +,','-','=','%','$','(',')',':','_','?','+','#')[rand 76]} for ($i=0; $i<$len-3; $i++) {$rpass2.=(0..9,'A'..'Z','a'..'z')[rand 6 +2]} $sth=&sql($dbh,"SELECT ip FROM users",'&#1086;&#1053;&#1050;&#1057;&# +1042;&#1061;&#1051; &#1071;&#1054;&#1061;&#1071;&#1053;&#1049; ip &#1 +041;&#1071;&#1045;&#1059; &#1070;&#1040;&#1053;&#1052;&#1045;&#1052;& +#1056;&#1053;&#1041;'); $U{$_->{ip}}=1 while $_=$sth->fetchrow_hashref; $i=0; $out_lft=$h=''; $old_region=0; $sth=&sql($dbh,"SELECT * FROM points,p_street WHERE points.street=p_s +treet.street ORDER BY p_street.region,p_street.name_street,points.hou +se",'&#1103;&#1054;&#1061;&#1071;&#1053;&#1049; &#1057;&#1050;&#1061; +&#1046;'); while( $p=$sth->fetchrow_hashref ) { ($street,$box,$house,$net,$region)=&Get_fields qw( street box house net region); $house.='('.&Filtr_out($p->{block}).')' if $p->{block}; $nstreet=&Filtr_out($p->{name_street}); if( $old_region!=$region ) { $r=$Regions{$region}; chop $r; $out_lft.=$h.&RRow('head','c',$r); $h=''; } $old_region=$region; $out_lft.="$h<tr class=row2><$td><a href='javascript:show_x($stree +t)'>$nstreet</a></td></tr>". "<tr class=row1 id=my_x_$street style='display:none'><td><tabl +e class='tbg1 width100'>" if $i!=$street; $i=$street; $h||='</table></td></tr>'; # &#1054;&#1053;&#1054;&#1064;&#1056;&#1070;&#1045;&#1051;&#1071;& +#1066; &#1052;&#1070;&#1048;&#1056;&#1061; &#1071;&#1041;&#1053;&#104 +0;&#1053;&#1044;&#1052;&#1064;&#1048; ip $ip=''; if( $net=~/^(\d+\.\d+\.\d+\.)(\d+)$/ && $2<254 ) { $net=$1; for( $x=$2+1; $x<255; $x++ ) { next if $U{"$net$x"}; $ip="$net$x"; last; } }else { $net=''; } $out_lft.=&PRow."<td>&#1088;&#1053;&#1042;&#1049;&#1070;: <a href= +'$scrpt&a=map&bx=$box' target='_blank'>$box</a></td><td>&#1076;&#1053 +;&#1051;: <span class=data1>$house</span></td><td>&#1086;&#1053;&#104 +4;&#1071;&#1045;&#1056;&#1069;: ".($net? "<span class=data1>$net</spa +n>" : "&#1084;&#1077;&#1093;&#1075;&#1073;&#1077;&#1103;&#1088;&#1084 +;&#1102;"). "</td><td>IP: ".($ip? qq{<a href='#' OnClick="javascript:docum +ent.getElementById(1).value='$ip'">$ip</a>} : '&#1052;&#1045;&#1056; +&#1041;&#1070;&#1055;&#1061;&#1070;&#1052;&#1056;&#1053;&#1041;')."</ +td></tr>"; } $out_lft.=$h; $out=&div('message',&form('!'=>1,%fileds,&Table('tbg3', &RRow('*','ll ','&#1090;&#1093;&#1085; &#1049;&#1050;&#1061;&#1045; +&#1052;&#1056;&#1070;',&input_t('fio',$Ffio,36,255),''). &RRow('*','ll ','&#1076;&#1070;&#1056;&#1070; &#1043;&#1070;&#1049; +&#1050;&#1063;&#1042;&#1045;&#1052;&#1061;&#1066; &#1049;&#1053;&#105 +2;&#1056;&#1055;&#1070;&#1049;&#1056;&#1070;',"<select name=contract_ +date size=1>$contact_sel</select>",''). &RRow('*','lll',$ip_str,&input_t('ip',$Fip || ($Auto_ip>0 && $first +_ip),36,16,'id=1'),$allow_nets? '&nbsp;&#1073; &#1062;&#1055;&#1057;&#1054;&#1054;&#1045; &#104 +9;&#1050;&#1061;&#1045;&#1052;&#1056;&#1070; &#1055;&#1070;&#1043;&#1 +055;&#1045;&#1068;&#1070;&#1045;&#1056;&#1071;&#1066; &#1052;&#1070;& +#1043;&#1052;&#1070;&#1042;&#1070;&#1056;&#1069; ip &#1070;&#1044;&#1 +055;&#1045;&#1071;&#1070; &#1041; &#1056;&#1070;&#1049;&#1061;&#1059; + &#1044;&#1061;&#1070;&#1054;&#1070;&#1043;&#1053;&#1052;&#1070;&#105 +9;:'.$br2.$allow_nets : '&nbsp;&#1084;&#1045;&#1056; &#1053;&#1062;&#1055;&#1070;&#1052 +;&#1061;&#1042;&#1045;&#1052;&#1061;&#1048; &#1054;&#1053; &#1044;&#1 +061;&#1070;&#1054;&#1070;&#1043;&#1053;&#1052;&#1057; &#1070;&#1044;& +#1055;&#1045;&#1071;&#1053;&#1041;'). &RRow('*','lll','&#1086;&#1070;&#1055;&#1053;&#1050;&#1069;', '<input type=radio name=passnum value=0> '.&input_t('passwd0',$ +Fpasswd,20,30).$br. '<input type=radio name=passnum value=1> '.&input_t('passwd1',$ +rpass1,20,30).$br. '<input type=radio name=passnum value=2'.(!$mid && ' checked'). +'> '.&input_t('passwd2',$rpass2,20,30).$origpasswd, '&#1073;&#1041;&#1045;&#1044;&#1061;&#1056;&#1045; &#1054;&#107 +0;&#1055;&#1053;&#1050;&#1069; &#1061;&#1050;&#1061; &#1041;&#1064;&# +1040;&#1045;&#1055;&#1061;&#1056;&#1045; &#1053;&#1044;&#1061;&#1052; + &#1061;&#1043; &#1054;&#1055;&#1045;&#1044;&#1050;&#1053;&#1060;&#10 +45;&#1052;&#1052;&#1064;&#1059; &#1071;&#1062;&#1045;&#1052;&#1045;&# +1055;&#1061;&#1055;&#1053;&#1041;&#1070;&#1052;&#1052;&#1064;&#1059; +&#1071;&#1050;&#1057;&#1042;&#1070;&#1048;&#1052;&#1064;&#1051; &#105 +3;&#1040;&#1055;&#1070;&#1043;&#1053;&#1051;'). (!$mid && &RRow('*','lll',$Plan2_Title || '&#1088;&#1070;&#1055;&#1 +061;&#1058;&#1052;&#1064;&#1048; &#1054;&#1050;&#1070;&#1052;',$paket +s,'')). (!$mid && $pakets3 && &RRow('*','lll',$Plan3_Title || '&#1076;&#105 +3;&#1054;&#1053;&#1050;&#1052;&#1061;&#1056;&#1045;&#1050;&#1069;&#10 +52;&#1064;&#1048; &#1056;&#1070;&#1055;&#1061;&#1058;&#1052;&#1064;&# +1048; &#1054;&#1050;&#1070;&#1052;',$pakets3,'')) ).$br2.&submit_a('&#1076;&#1070;&#1050;&#1045;&#1045; &rarr;').$br) +); if( !$out_lft ) { $OUT.=$out.$go_back; &Exit; } $OUT.=&Table('width100', &tag('tr', &tag('td',&Table('tbg width100',$out_lft),'valign=top width=36%' +). &tag('td',$out,'valign=top') ) ).$go_back; &Exit; } $fileds{passwd0}=$Fpasswd; $Fpasswd=&Filtr_mysql($Fpasswd); $fileds{contract_date}=$Fcontract_date; $Fcontract_date=$t-$Fcontract_date*86400; $fileds{fio}=$Ffio; $title="&#1090;&#1093;&#1085;: ".&bold(&Filtr_out($Ffio) || '&#1052;&# +1045; &#1057;&#1049;&#1070;&#1043;&#1070;&#1052;&#1064;').$br2; $fileds{ip}=$Fip; {# === &#1086;&#1055;&#1053;&#1041;&#1045;&#1055;&#1049;&#1070; &#1050 +;&#1053;&#1062;&#1061;&#1052;&#1070; if( $PR{120} ) { # &#1050;&#1053;&#1062;&#1061;&#1052; &#1052;&#1045; &#1041;&#1064 +;&#1040;&#1061;&#1055;&#1070;&#1045;&#1056; &#1070;&#1044;&#1051;&#10 +61;&#1052;, &#1054;&#1055;&#1061;&#1071;&#1041;&#1070;&#1061;&#1041;& +#1070;&#1045;&#1056;&#1071;&#1066; &#1070;&#1041;&#1056;&#1053;&#1051 +;&#1070;&#1056;&#1061;&#1042;&#1045;&#1071;&#1049;&#1061; $login=lc( &translit(&Filtr($Ffio)) ) || $Fip; $login=~s|^([^ ]+) +.*$|$1|; # &#1053;&#1071;&#1056;&#1070;&#1041; +&#1061;&#1051; &#1056;&#1053;&#1050;&#1069;&#1049;&#1053; &#1058;&#10 +70;&#1051;&#1061;&#1050;&#1061;&#1063; $sth=&sql($dbh,"SELECT name FROM users WHERE name LIKE '$login%'") +; $L{lc($p->{name})}=1 while $p=$sth->fetchrow_hashref; if( $L{$login} ) { # &#1052;&#1070;&#1048;&#1044;&#1045;&#1051; &#1052;&#1045;&#10 +43;&#1070;&#1052;&#1066;&#1056;&#1064;&#1048; &#1050;&#1053;&#1062;&# +1061;&#1052; &#1041;&#1061;&#1044;&#1070; &#1050;&#1053;&#1062;&#1061 +;&#1052;_&#1042;&#1061;&#1071;&#1050;&#1053; $i=1; $i++ while ( $L{"${login}_$i"} ); $login.="_$i"; } $Flogin=$login; last; } $Flogin=$F{login}; defined $Flogin or last; $Flogin=&trim($Flogin); $Block_space_login && $Flogin=~s|\s||g && &Message('&#1073; &#1050;&# +1053;&#1062;&#1061;&#1052;&#1045; &#1057;&#1040;&#1055;&#1070;&#1052; +&#1064; &#1054;&#1055;&#1053;&#1040;&#1045;&#1050;&#1064;.','','&#107 +3;&#1052;&#1061;&#1051;&#1070;&#1052;&#1061;&#1045;'); $login=&Filtr($Flogin); $Flogin ne $login && &Message("&#1073; &#1050;&#1053;&#1062;&#1061;&# +1052;&#1045; &#1057;&#1040;&#1055;&#1070;&#1052;&#1064; &#1052;&#1045 +;&#1044;&#1053;&#1054;&#1057;&#1071;&#1056;&#1061;&#1051;&#1064;&#104 +5; &#1071;&#1061;&#1051;&#1041;&#1053;&#1050;&#1064;. &#1084;&#1053;& +#1041;&#1064;&#1048; &#1050;&#1053;&#1062;&#1061;&#1052;: $login",'', +'&#1073;&#1052;&#1061;&#1051;&#1070;&#1052;&#1061;&#1045;'); $Flogin=''; if( length($login)<3 ) { &Message('&#1082;&#1053;&#1062;&#1061;&#1052;&#1064; &#1051;&#1045 +;&#1052;&#1045;&#1045; 3&#1059; &#1071;&#1061;&#1051;&#1041;&#1053;&# +1050;&#1053;&#1041; &#1052;&#1045; &#1055;&#1070;&#1043;&#1055;&#1045 +;&#1068;&#1045;&#1052;&#1064;.','','&#1073;&#1052;&#1061;&#1051;&#107 +0;&#1052;&#1061;&#1045;'); last; } $p=&sql_select_line($dbh,"SELECT name FROM users WHERE name='$login'" +,'&#1103;&#1057;&#1067;&#1045;&#1071;&#1056;&#1041;&#1057;&#1045;&#10 +56; &#1050;&#1061; &#1049;&#1050;&#1061;&#1045;&#1052;&#1056; &#1071; + &#1056;&#1070;&#1049;&#1061;&#1051; &#1060;&#1045; &#1050;&#1053;&#1 +062;&#1061;&#1052;&#1053;&#1051;?'); if( $p ) { &Message("&#1089;&#1060;&#1045; &#1071;&#1057;&#1067;&#1045;&#1071 +;&#1056;&#1041;&#1057;&#1045;&#1056; &#1049;&#1050;&#1061;&#1045;&#10 +52;&#1056; &#1071; &#1050;&#1053;&#1062;&#1061;&#1052;&#1053;&#1051; +".&bold($login),'','&#1073;&#1052;&#1061;&#1051;&#1070;&#1052;&#1061; +&#1045;'); last; } $fileds{login}=$Flogin=$login; } sub push_login { length($_[0])>2 && !(grep{$_ eq $_[0]} @logins) && push @logins,$_[0] +; } {# === &#1073;&#1041;&#1053;&#1044; &#1050;&#1053;&#1062;&#1061;&#1052 +;&#1070; $Flogin && last; @logins=(); $h1=$h=lc( &Filtr($Ffio||$Fip) ); if( $h1=~s/^([^ ]+) +([^ ]*).*$/$1_$2/ ) { $h=$1; &push_login(&translit($h1)); &push_login($h); } $h3=$h2=&translit($h); @logins,&push_login($h2); $h3=~s|[euioa]||g && &push_login($h3); # &#1050;&#1053;&#1062;&#1061; +&#1052; &#1040;&#1045;&#1043; &#1062;&#1050;&#1070;&#1071;&#1052;&#10 +64;&#1059; &#1040;&#1057;&#1049;&#1041; &push_login($h1); @f=$Block_space_login? ('_2','_pc2','_pc3','_comp_2','_comp_3','_note +book','_apoint','_router','_alias','_out_ip','.') : ('_2',' pc2',' pc3',' comp 2',' comp 3',' out ip','_pc2','_pc3','_n +otebook','_apoint','_router','_alias','_out_ip','.'); push @logins,$h2.$_ foreach @f; $out="$title &#1073;&#1064;&#1040;&#1045;&#1055;&#1061;&#1056;&#1045; + &#1053;&#1044;&#1061;&#1052; &#1061;&#1043; &#1041;&#1070;&#1055;&#1 +061;&#1070;&#1052;&#1056;&#1053;&#1041; &#1050;&#1053;&#1062;&#1061;& +#1052;&#1070;:".$br2.&input_t('login','',36,36,'id=1').$br2; foreach $login (@logins) { %L=(); $sth=&sql($dbh,"SELECT name FROM users WHERE name LIKE '$login%'") +; $L{&lc_rus(lc($p->{name}))}=1 while $p=$sth->fetchrow_hashref; $h=&lc_rus(lc($login)); if( $L{$h} ) { $i=0; $i++ while ($L{"$h$i"}); $login="$login$i"; } $h=&Filtr_out($login); $out.=&ahref('#',$h,qq{OnClick="javascript:document.getElementById +(1).value='$h'"}).$br; } $OUT.=&MessX(&form('!'=>1,%fileds,$out.$br.&submit_a('&#1076;&#1070;& +#1050;&#1045;&#1045; &rarr;'))).$go_back; &Exit; } $balance=0; # === &#1086;&#1055;&#1045;&#1044;&#1057;&#1071;&#1056;&#1070;&#1052;& +#1053;&#1041;&#1050;&#1045;&#1052;&#1052;&#1064;&#1045; &#1054;&#1053 +;&#1044;&#1049;&#1050;&#1063;&#1042;&#1045;&#1052;&#1061;&#1066; === { $newuser_opt=&sql_select_line($dbh,"SELECT * FROM newuser_opt WHERE o +pt_enabled>0 LIMIT 1",'&#1077;&#1071;&#1056;&#1069; &#1050;&#1061; &# +1054;&#1055;&#1045;&#1044;&#1057;&#1071;&#1056;&#1070;&#1052;&#1053;& +#1041;&#1050;&#1045;&#1052;&#1052;&#1064;&#1045; &#1054;&#1053;&#1044 +;&#1049;&#1050;&#1063;&#1042;&#1045;&#1052;&#1061;&#1066;?'); $newuser_opt or last; # &#1041; &#1056;&#1070;&#1055;&#1061;&#1058;&#1045; &#1057;&#1049;&# +1070;&#1043;&#1070;&#1052;&#1053; &#1054;&#1055;&#1045;&#1044;&#1057; +&#1071;&#1056;&#1070;&#1052;&#1053;&#1041;&#1050;&#1045;&#1052;&#1052 +;&#1053;&#1045; &#1054;&#1053;&#1044;&#1049;&#1050;&#1063;&#1042;&#10 +45;&#1052;&#1061;&#1045; &#1061;&#1050;&#1061; &#1045;&#1062;&#1053; +&#1057;&#1049;&#1070;&#1043;&#1070;&#1050; &#1070;&#1044;&#1051;&#106 +1;&#1052; $Fopt=$mid? int $F{opt} : $Plan_newuser_opt[$paket] || int $F{opt}; last if !$Fopt && defined($F{opt}) && $PR{118}; # &#1070;&#1044;&#105 +1;&#1061;&#1052;&#1057; &#1055;&#1070;&#1043;&#1055;&#1045;&#1068;&#1 +045;&#1052;&#1053; &#1052;&#1045; &#1061;&#1071;&#1054;&#1053;&#1050; +&#1069;&#1043;&#1053;&#1041;&#1070;&#1056;&#1069; &#1054;&#1055;&#104 +5;&#1044;&#1057;&#1071;&#1056;&#1070;&#1052;&#1053;&#1041;&#1050;&#10 +45;&#1052;&#1052;&#1064;&#1045; &#1054;&#1053;&#1044;&#1049;&#1050;&# +1063;&#1042;&#1045;&#1052;&#1061;&#1066; { if( !$Fopt ) { defined $F{opt} && &Message("&#1073;&#1064; &#1044;&#1053;&#1050; +&#1060;&#1052;&#1064; &#1041;&#1064;&#1040;&#1055;&#1070;&#1056;&#106 +9; &#1054;&#1055;&#1045;&#1044;&#1057;&#1071;&#1056;&#1070;&#1052;&#1 +053;&#1041;&#1050;&#1045;&#1052;&#1052;&#1053;&#1045; &#1054;&#1053;& +#1044;&#1049;&#1050;&#1063;&#1042;&#1045;&#1052;&#1061;&#1045; &#1052 +;&#1061;&#1060;&#1045;",'',''); last; } $p=&sql_select_line($dbh,"SELECT * FROM newuser_opt WHERE id=$Fopt A +ND opt_enabled>0"); if( !$p ) { $Plan_newuser_opt[$paket] && &Error("&#1085;&#1068;&#1061;&#1040; +&#1049;&#1070; &#1041; &#1056;&#1070;&#1055;&#1061;&#1058;&#1052;&#10 +53;&#1051; &#1054;&#1050;&#1070;&#1052;&#1045;. &#1086;&#1055;&#1045; +&#1044;&#1057;&#1071;&#1056;&#1070;&#1052;&#1053;&#1041;&#1050;&#1045 +;&#1052;&#1052;&#1053;&#1062;&#1053; &#1054;&#1053;&#1044;&#1049;&#10 +50;&#1063;&#1042;&#1045;&#1052;&#1061;&#1066; &#9575; $Fopt &#1052;&# +1045; &#1071;&#1057;&#1067;&#1045;&#1071;&#1056;&#1041;&#1057;&#1045; +&#1056;. &#1085;&#1040;&#1055;&#1070;&#1056;&#1061;&#1056;&#1045;&#10 +71;&#1069; &#1049; &#1062;&#1050;&#1070;&#1041;&#1052;&#1053;&#1051;& +#1057; &#1070;&#1044;&#1051;&#1061;&#1052;&#1061;&#1071;&#1056;&#1055 +;&#1070;&#1056;&#1053;&#1055;&#1057;.",$go_back); &Message("&#1086;&#1055;&#1045;&#1044;&#1057;&#1071;&#1056;&#1070 +;&#1052;&#1053;&#1041;&#1050;&#1045;&#1052;&#1052;&#1053;&#1045; &#10 +54;&#1053;&#1044;&#1049;&#1050;&#1063;&#1042;&#1045;&#1052;&#1061;&#1 +045; &#9575; $Fopt &#1052;&#1045; &#1071;&#1057;&#1067;&#1045;&#1071; +&#1056;&#1041;&#1057;&#1045;&#1056; &#1050;&#1061;&#1040;&#1053; &#10 +52;&#1045;&#1070;&#1049;&#1056;&#1061;&#1041;&#1052;&#1053;. &#1073;& +#1064;&#1040;&#1045;&#1055;&#1061;&#1056;&#1045; &#1052;&#1057;&#1060 +;&#1052;&#1053;&#1045; &#1041; &#1071;&#1054;&#1061;&#1071;&#1049;&#1 +045; &#1052;&#1061;&#1060;&#1045;",'',''); $Fopt=0; last; } # &#1076;&#1070;&#1052;&#1052;&#1064;&#1045; &#1041;&#1064;&#1040;&# +1055;&#1070;&#1052;&#1052;&#1053;&#1062;&#1053; &#1054;&#1055;&#1045; +&#1044;&#1057;&#1071;&#1056;&#1070;&#1052;&#1053;&#1041;&#1050;&#1045 +;&#1052;&#1052;&#1053;&#1062;&#1053; &#1054;&#1053;&#1044;&#1049;&#10 +50;&#1063;&#1042;&#1045;&#1052;&#1061;&#1066; $fileds{opt}=$Fopt; ($id,$opt_time,$pay_sum,$pay_comment,$pay_reason,$opt_action,$opt_ti +me)=&Get_fields('id','opt_time','pay_sum','pay_comment','pay_reason', +'opt_action','opt_time'); $balance=$Fopt && $pay_sum? $pay_sum : 0; $pay_reason=~/^([^\$]*)\$(.*)$/ or last; # &#1054;&#1050;&#1070;&#1056;&#1045;&#1060; "&#1071;&#1052;&#1066;& +#1056;&#1061;&#1045; &#1043;&#1070; &#1054;&#1053;&#1044;&#1049;&#105 +0;&#1063;&#1042;&#1045;&#1052;&#1061;&#1045;" &#1056;&#1055;&#1045;&# +1040;&#1057;&#1045;&#1056; &#1053;&#1040;&#1066;&#1043;&#1070;&#1056; +&#1045;&#1050;&#1069;&#1052;&#1053;&#1062;&#1053; &#1049;&#1053;&#105 +1;&#1051;&#1045;&#1052;&#1056;&#1070;&#1055;&#1061;&#1066; &#1071;&#1 +053; &#1071;&#1056;&#1053;&#1055;&#1053;&#1052;&#1064; &#1070;&#1044; +&#1051;&#1061;&#1052;&#1070; unless( defined $F{reason} ) { $OUT.=&MessX( &form('!'=>1,%fileds, "&#1076;&#1050;&#1066; &#1054;&#1050;&#1070;&#1056;&#1045;&#1 +060;&#1070; &#1071;&#1052;&#1066;&#1056;&#1061;&#1066; &#1043;&#1070; + &#1054;&#1053;&#1044;&#1049;&#1050;&#1063;&#1042;&#1045;&#1052;&#106 +1;&#1045; &#1052;&#1045;&#1053;&#1040;&#1059;&#1053;&#1044;&#1061;&#1 +051;&#1053; &#1053;&#1040;&#1066;&#1043;&#1070;&#1056;&#1045;&#1050;& +#1069;&#1052;&#1053; &#1057;&#1071;&#1056;&#1070;&#1052;&#1053;&#1041 +;&#1061;&#1056;&#1069; &#1049;&#1053;&#1051;&#1051;&#1045;&#1052;&#10 +56;&#1070;&#1055;&#1061;&#1048;:".$br2. &Filtr_out($1).&input_t('reason','',50,50).&Filtr_out($2).$br +2.&submit_a('&#1076;&#1070;&#1050;&#1045;&#1045; &rarr;') ) ).$go_back; &Exit; } } $Fopt && last; # &#1054;&#1055;&#1045;&#1044;.&#1054;&#1053;&#1044;&# +1049;&#1050;&#1063;&#1042;&#1045;&#1052;&#1061;&#1045; &#1041;&#1064; +&#1040;&#1055;&#1070;&#1052;&#1053; &#1061; &#1053;&#1052;&#1053; &#1 +071;&#1057;&#1067;&#1045;&#1071;&#1056;&#1041;&#1057;&#1045;&#1056; # &#1103;&#1054;&#1061;&#1071;&#1053;&#1049; &#1054;&#1055;&#1045;&#1 +044;&#1057;&#1071;&#1056;&#1070;&#1052;&#1053;&#1041;&#1050;&#1045;&# +1052;&#1052;&#1064;&#1059; &#1054;&#1053;&#1044;&#1049;&#1050;&#1063; +&#1042;&#1045;&#1052;&#1061;&#1048; $url=$scrpt; $url.="&$_=".&URLEncode($fileds{$_}) foreach keys %fileds; # URLEncod +e &#1052;&#1057;&#1060;&#1045;&#1052; &#1044;&#1050;&#1066; &#1071;&# +1061;&#1051;&#1041;&#1053;&#1050;&#1070; '=' $out=''; # opt_enabled: # 0 - &#1054;&#1055;&#1045;&#1044;&#1057;&#1071;&#1056;&#1070;&#105 +2;&#1053;&#1041;&#1050;&#1045;&#1052;&#1052;&#1053;&#1045; &#1054;&#1 +053;&#1044;&#1049;&#1050;&#1063;&#1042;&#1045;&#1052;&#1061;&#1045; & +#1043;&#1070;&#1040;&#1050;&#1053;&#1049;&#1061;&#1055;&#1053;&#1041; +&#1070;&#1052;&#1053; # 1 - &#1056;&#1053;&#1050;&#1069;&#1049;&#1053; &#1044;&#1050;&#10 +66; &#1053;&#1071;&#1052;&#1053;&#1041;&#1052;&#1053;&#1048; &#1043;& +#1070;&#1054;&#1061;&#1071;&#1061; # 2 - &#1056;&#1053;&#1050;&#1069;&#1049;&#1053; &#1044;&#1050;&#10 +66; &#1070;&#1050;&#1061;&#1070;&#1071;&#1052;&#1053;&#1048; &#1043;& +#1070;&#1054;&#1061;&#1071;&#1061; $sth=&sql($dbh,"SELECT * FROM newuser_opt WHERE opt_enabled=".($mid? +2 : 1)); while( $p=$sth->fetchrow_hashref ) { ($id,$opt_time,$pay_sum)=&Get_fields('id','opt_time','pay_sum'); ($opt_name,$opt_comment)=&Get_filtr_fields('opt_name','opt_comment +'); $out.=&RRow('*','lrl',&ahref("$url&opt=$id",$opt_name),$pay_sum||' +&nbsp',$opt_comment); } $out.=&RRow('*','lll',&ahref("$url&opt=0",'&#1086;&#1055;&#1053;&#107 +1;&#1056;&#1053; &#1071;&#1053;&#1043;&#1044;&#1070;&#1056;&#1069; &# +1057;&#1042;&#1045;&#1056;&#1052;&#1057;&#1063; &#1043;&#1070;&#1054; +&#1061;&#1071;&#1069;'),'','') if $PR{118}; $OUT.=&div('message',&Table('tbg3',&RRow('tablebg','ccc','&#1088;&#10 +61;&#1054; &#1054;&#1053;&#1044;&#1049;&#1050;&#1063;&#1042;&#1045;&# +1052;&#1061;&#1066;',"&#1103;&#1056;&#1053;&#1061;&#1051;&#1053;&#107 +1;&#1056;&#1069;, $gr",'&#1089;&#1071;&#1050;&#1053;&#1041;&#1061;&#1 +066;').$out)).$go_back; &Exit; } $Ffio=&Filtr_mysql($Ffio); $sql="INSERT INTO users SET ". "mid=$mid,". "ip='$Fip',sortip=$sortip,". "fio='$Ffio',". "passwd=AES_ENCRYPT('$Fpasswd','$Passwd_Key'),". "limit_balance=".($mid? 0 : $grp_block_limit).','. "block_if_limit=".($mid? 0 : 1).','. "grp=$grp,". "state='on',". "balance=0,". "auth='no',". "contract='',". "contract_date=$Fcontract_date,". "paket=$paket,". "paket3=$paket3,". "cstate=9,". "start_day=-1,". "modify_time=$ut,". "name='$login'"; $sth=$dbh->prepare($sql); $sth->execute or &Error("&#1073;&#1052;&#1057;&#1056;&#1055;&#1045;&#1 +052;&#1052;&#1066;&#1066; &#1053;&#1068;&#1061;&#1040;&#1049;&#1070;. + &#1089;&#1042;&#1045;&#1056;&#1052;&#1070;&#1066; &#1043;&#1070;&#10 +54;&#1061;&#1071;&#1069; &#1049;&#1050;&#1061;&#1045;&#1052;&#1056;&# +1070; &#1052;&#1045; &#1071;&#1053;&#1043;&#1044;&#1070;&#1052;&#1070 +;.",$go_back); $id=$sth->{mysql_insertid} || $sth->{insertid}; $mId=$mid || $id; # id &#1053;&#1071;&#1052;&#1053;&#1041;&#1052;&#105 +3;&#1048; &#1043;&#1070;&#1054;&#1061;&#1071;&#1061; $OUT.=$br; &OkMess("&#1076;&#1070;&#1052;&#1052;&#1064;&#1045; &#1052;&#1053;&#10 +41;&#1053;&#1062;&#1053; &#1049;&#1050;&#1061;&#1045;&#1052;&#1056;&# +1070; &#1041;&#1052;&#1045;&#1071;&#1045;&#1052;&#1064; &#1041; &#104 +0;&#1070;&#1043;&#1057; &#1044;&#1070;&#1052;&#1052;&#1064;&#1059;.". +$br3.&CenterA("$scrpt0&a=user&id=$id",'&#1087;&#1045;&#1044;&#1070;&# +1049;&#1056;&#1061;&#1055;&#1053;&#1041;&#1070;&#1056;&#1069; &#1044; +&#1070;&#1052;&#1052;&#1064;&#1045;')); $OUT.=$br2; &ToLog("$Admin_UU &#1103;&#1053;&#1043;&#1044;&#1070;&#1052;&#1070; &# +1049;&#1050;&#1061;&#1045;&#1052;&#1056;&#1071;&#1049;&#1070;&#1066; +&#1057;&#1042;&#1045;&#1056;&#1052;&#1070;&#1066; &#1043;&#1070;&#105 +4;&#1061;&#1071;&#1069; id=$id, ip: $Fip, &#1050;&#1053;&#1062;&#1061 +;&#1052;: ".&commas($Flogin)); if( $balance ) { $rows=&sql_do($dbh,"UPDATE users SET balance=balance+($balance) WHE +RE id=$mId LIMIT 1"); $rows<1 && &ToLog("! &#1086;&#1053;&#1071;&#1050;&#1045; &#1071;&#1 +053;&#1043;&#1044;&#1070;&#1052;&#1061;&#1066; &#1057;&#1042;&#1045;& +#1056;&#1052;&#1053;&#1048; &#1043;&#1070;&#1054;&#1061;&#1071;&#1061 +; id=$id &#1052;&#1045; &#1057;&#1044;&#1070;&#1050;&#1053;&#1071;&#1 +069; &#1053;&#1040;&#1052;&#1053;&#1041;&#1061;&#1056;&#1069; &#1040; +&#1070;&#1050;&#1070;&#1052;&#1071;, &#1052;&#1045;&#1053;&#1040;&#10 +59;&#1053;&#1044;&#1061;&#1051;&#1070; &#1049;&#1053;&#1055;&#1055;&# +1045;&#1049;&#1056;&#1061;&#1055;&#1053;&#1041;&#1049;&#1070; &#1040; +&#1070;&#1050;&#1070;&#1052;&#1071;&#1070; &#1049;&#1050;&#1061;&#104 +5;&#1052;&#1056;&#1070; id=$mId"); } &sql_do($dbh,"INSERT INTO pays (mid,cash,type,category,admin_id,admin_ +ip,office,reason,time) ". "VALUES($mId,0,50,411,$Admin_id,INET_ATON('$ip'),$Admin_office,'& +#1090;&#1093;&#1085;: $Ffio, ip: $Fip',$ut)"); $tt="$ut+1"; if( $Fopt ) { $pay_comment=&Filtr_mysql($pay_comment); $pay_reason="$1$F{reason}$2" if $pay_reason=~/^([^\$]*)\$(.*)$/; $pay_reason=&Filtr_mysql($pay_reason); $category=$pay_sum>0? 10 : 100; # 100 - &#1053;&#1054;&#1050;&#1070 +;&#1056;&#1070; &#1054;&#1053;&#1044;&#1049;&#1050;&#1063;&#1042;&#10 +45;&#1052;&#1061;&#1066;, 10 - &#1040;&#1053;&#1052;&#1057;&#1071; &# +1054;&#1053;&#1044;&#1049;&#1050;&#1063;&#1042;&#1045;&#1052;&#1061;& +#1066; $pay_sum && &sql_do($dbh,"INSERT INTO pays (mid,cash,type,bonus,cat +egory,admin_id,admin_ip,office,reason,coment,time) ". "VALUES($mId,$pay_sum,10,'y',$category,0,INET_ATON('$ip'),$Admin +_office,'$pay_reason','$pay_comment',$tt)"); if( $opt_action ) { # &#1041;&#1052;&#1045;&#1071;&#1045;&#1051; &#1041; &#1054;&#10 +50;&#1070;&#1056;&#1045;&#1060;&#1061; `&#1043;&#1070;&#1054;&#1050;& +#1070;&#1052;&#1061;&#1055;&#1053;&#1041;&#1070;&#1052;&#1052;&#1053; +&#1045; &#1071;&#1053;&#1040;&#1064;&#1056;&#1061;&#1045;` $pay_sum && &sql_do($dbh,"INSERT INTO pays (mid,cash,type,catego +ry,admin_id,admin_ip,office,reason,coment,time) ". "VALUES($mId,0,50,430,0,INET_ATON('$ip'),$Admin_office,'$opt_a +ction:$opt_time','',$tt)"); } } 1;

In reply to Re: Whats Wrong Here?!?! by Anonymous Monk
in thread Whats Wrong Here?!?! by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.