Raised This Month: $12 Target: $400
 3% 

[Request] Help to fix sms bug


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wizz
Member
Join Date: Mar 2010
Old 05-17-2017 , 10:51   [Request] Help to fix sms bug
Reply With Quote #1

Edit/Delete Message Reply With Quote Multi-Quote This Message Quick reply to this message #1
Hello i have problem with sms plugin.
i use fortumo sms services
Everything works but there are little bug with when anyone makes admin in server (id1) and wanna make admin in server2 (id2) with same name he maked id1. then mysql database not make admin in server2 (id2) but adding more admin time to server id1 admin.

Everything works ok if u dont use same names when sending sms to server1 and server2..
both are using 1 mysql database..

Sorry my bad english im from Estonian
And thanks.

PHP Code:
<?php 

function createRandomPassword() { 
    
$chars "abcdefghijkmnopqrstuvwxyz0123456789"
    
srand((double)microtime()*1000000); 
    
$i 0
    
$pass '' 
    while (
$i <= 6) { 
        
$num rand() % 33
        
$tmp substr($chars$num1); 
        
$pass $pass $tmp
        
$i++; 
    } 
    return 
$pass
     


    
$nimi =  
        
$_GET['message']; 
    
$db_host 
        
"localhost"// MySQL Serveri URL/IP 
    
$db_name 
        
"amxbans"// MySQL Andmebaas 
    
$db_user =  
        
"username"// MySQL Konto 
    
$db_pass 
        
"password"// MySQLi Parool  
    
$access 
        
"bitn"// Õigused, mis SMSi saatjale antakse. 
    
$reply_noname 
        
"Viga: Te ei sisestanud nime!"// Viga, mida kuvatakse SMSi saatjale, kui ta ei sisestanud nime 
    
$reply_error 
        
"Viga: Skriptis esines viga, v6ta yhendust:www.oika-servers.eu."// Viga, mida kuvatakse SMSi saatjale, kui skriptis on sees viga 
    
$days 
        
30// Mitu päeva kestab SMS pakett 
    
$created =  
        
mktime(); 
    
$expires 
        
$created $days*86400
    
$ashow 
        
1// Kas näitab admini listis? 
    
$flags 
        
"ab";  
    
$parool2 =  
        
createRandomPassword(); // Loob parooli, mis kuvatakse SMSi saatjale. 
    
$parool =   
        
md5($parool2); // Sama asi mis $parool2, kuid see pannakse MYSQL andmebaasi md5 cryptiga. 
    
$server_id 
        
2// Serveri ID, kuhu antakse õigused 
    
$add_or_new =  
        
0
     
    
mysql_connect
                    
$db_host
                    
$db_user
                    
$db_pass); // Ühendame MySQLiga 
    
mysql_select_db
                    
$db_name); // Valime andmebaasi  
     
    
$result mysql_query("SELECT * FROM amx_amxadmins WHERE username='$nimi'"); 
    
$row mysql_fetch_array($result); 
     
    if (!
$nimi// Kui nime ei sisestatud SMSi 
    

        
$endreply "Te ei sisestanud nime!"
        echo 
$endreply
        exit; 
    } 
     
    if (!
$row// Kui pole kehtivat admini staatust, siis lisame mysql kirje 
    

        
mysql_query("INSERT INTO `amx_amxadmins` (username, password, access, flags, steamid, nickname, ashow, created, expired, days) VALUES('$nimi', '$parool', '$access', '$flags', '$nimi', '$nimi', '$ashow', '$created', '$expires', '$days')") or die($reply_error); 
         
        
$adminid mysql_insert_id(); 
         
        
mysql_query("INSERT INTO `amx_admins_servers` (admin_id, server_id) VALUES ('$adminid', '$server_id')") or die($reply_error); 
         
        
$endreply "T寡me! Tellisite endale vip ******************sed ****************** surfpubi. Nimi:'$nimi' Parool:'$parool2'"
    } 
    else 
// Kui on kehtiv admini staatus 
    

        
$dayz 30
        
$g_admin_expire mktime() + $dayz*86400
        
$vana_days $row['days']; 
        
$vana_expired $row['expired']; 
        
$vana_created $row['created']; 
        
$kokku $vana_expired $vana_created
        
$kokku2 $g_admin_expire $kokku
        
$days $dayz $vana_days
     
        
mysql_query("UPDATE amx_amxadmins SET access='$access', expired='$kokku2', days='$days' WHERE username='$nimi'") or die($reply_error); 
         
        
$endreply "T寡me! Pikendasite ****************** vipi aega 30 p妶a v******************. Teil on n******************vip staatus $days p妶a."
    } 
     
    echo 
$endreply// Saadame vastus SMSi. 
?>

Last edited by wizz; 05-17-2017 at 10:52.
wizz is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 05-17-2017 , 12:50   Re: [Request] Help to fix sms bug
Reply With Quote #2

wtf? this its amxmodx forum not php forum but i can help you in private ;p
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-17-2017 , 13:00   Re: [Request] Help to fix sms bug
Reply With Quote #3

Quote:
Originally Posted by D3XT3R View Post
wtf? this its amxmodx forum not php forum but i can help you in private ;p
True. It's a forum, not private help.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 05-17-2017 , 13:02   Re: [Request] Help to fix sms bug
Reply With Quote #4

say this to yours self not to me.
i didnt helped him hier becuase its amx forum and say it to yours self about yours signature

☄ I make/sell private AMXX plugins. Contact me on Skype: doctor.crom1234
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-17-2017 , 13:12   Re: [Request] Help to fix sms bug
Reply With Quote #5

Quote:
Originally Posted by D3XT3R View Post
say this to yours self not to me.
i didnt helped him hier becuase its amx forum and say it to yours self about yours signature

☄ I make/sell private AMXX plugins. Contact me on Skype: doctor.crom1234
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 05-17-2017 , 13:24   Re: [Request] Help to fix sms bug
Reply With Quote #6

wtf! nice picture man!!!! give me the link please
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-17-2017 , 13:27   Re: [Request] Help to fix sms bug
Reply With Quote #7

It's AMXX forum, I can't give you the link.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
wizz
Member
Join Date: Mar 2010
Old 05-17-2017 , 13:51   Re: [Request] Help to fix sms bug
Reply With Quote #8

when i make admin same name what i maked in server 1 and now sending sms to server 2 same name then he dont adding admin in server id2 he adding 30 more days to admin time in server id 1

PLEASE HELP !!! ive tryed 8 hours to change trhat code but im not coder..

Last edited by wizz; 05-17-2017 at 13:52.
wizz is offline
JusTGo
Veteran Member
Join Date: Mar 2013
Old 05-17-2017 , 14:45   Re: [Request] Help to fix sms bug
Reply With Quote #9

use steam id instead of name
__________________

Last edited by JusTGo; 05-17-2017 at 14:46.
JusTGo is offline
Unknown Guy
Member
Join Date: Dec 2014
Location: Munich, Germany
Old 05-17-2017 , 15:23   Re: [Request] Help to fix sms bug
Reply With Quote #10

Quote:
Originally Posted by D3XT3R View Post
wtf? this its amxmodx forum not php forum but i can help you in private ;p
hmm right

Unknown Guy is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:10.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode