![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 26 Pomógł: 0 Dołączył: 28.07.2005 Ostrzeżenie: (0%) ![]() ![]() |
Witam
Jak zrobić aby skrypt uwazał ze male i duże litery to to samo do skryptu dopisałem linike Kod if($ibforums->input['username'] == $ibforums->member['name']) $this->error("donate_self"); gdzie name np. LoL i jak w formularzu wpisze LoL wszystko działa jednak gdy wpisze lol nie działa ;/ Pozdrawiam Ten post edytował Azz 21.01.2006, 12:04:39 |
|
|
![]()
Post
#2
|
|
![]() Grupa: Przyjaciele php.pl Postów: 2 923 Pomógł: 9 Dołączył: 25.10.2004 Skąd: Rzeszów - studia / Warszawa - praca Ostrzeżenie: (0%) ![]() ![]() |
-------------------- |
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 26 Pomógł: 0 Dołączył: 28.07.2005 Ostrzeżenie: (0%) ![]() ![]() |
domyslilem sie jednak gdy wpisze lOl wtedy to zawodzi
![]() |
|
|
![]()
Post
#4
|
|
![]() Grupa: Przyjaciele php.pl Postów: 2 923 Pomógł: 9 Dołączył: 25.10.2004 Skąd: Rzeszów - studia / Warszawa - praca Ostrzeżenie: (0%) ![]() ![]() |
Cos z tymi Twoimi domyslami nie tak.
-------------------- |
|
|
![]()
Post
#5
|
|
Grupa: Zarejestrowani Postów: 26 Pomógł: 0 Dołączył: 28.07.2005 Ostrzeżenie: (0%) ![]() ![]() |
działa nie zauważyłem stringa przed input
![]() Ten post edytował Azz 21.01.2006, 12:24:32 |
|
|
![]()
Post
#6
|
|
![]() Grupa: Przyjaciele php.pl Postów: 2 923 Pomógł: 9 Dołączył: 25.10.2004 Skąd: Rzeszów - studia / Warszawa - praca Ostrzeżenie: (0%) ![]() ![]() |
A echo strtolower($ibforums->input['username']) i echo strtolower($ibforums->member['name']) daja te same stringi?
-------------------- |
|
|
![]()
Post
#7
|
|
Grupa: Zarejestrowani Postów: 26 Pomógł: 0 Dołączył: 28.07.2005 Ostrzeżenie: (0%) ![]() ![]() |
jest to fragmen skryptu ibstore
Kod function donatemoney() { global $ibforums, $DB, $std, $print, $ibstore; $this->nav = array( $ibforums->lang['money_var'] ); if($ibforums->member['g_donate_points'] == 0) $this->error("no_permissions"); $ibforums->lang['donate_to'] = str_replace("<CURRENCY>", $ibforums->vars['currency_name'], $ibforums->lang['donate_to']); if($ibforums->member['points'] <= 0) $disabled = "disabled"; $this->output .= $this->html->donatemoney($disabled); } function dodonate_money() { global $DB,$ibforums,$ibstore; if($_POST['amount'] == "" || $ibforums->input['username'] == "") $this->error("donate_cheating"); $ibforums->input['username'] = trim($ibforums->input['username']); $ibforums->input['amount'] = $ibforums->input['amount']; if($ibforums->input['username'] == "") $this->error("donate_empty"); if($ibforums->input['amount'] <= 0) $this->error("donate_notenought"); if(strtolower($ibforums->input['username']) == strtolower($ibforums->member['name'])) $this->error("donate_self"); if($ibforums->member['points'] < $ibforums->input['amount']) { $this->error("donate_notenought"); } $reciever = $this->get_memberid($ibforums->input['username'],',points'); $reciever['points'] += $ibforums->input['amount']; $ibforums->member['points'] -= $ibforums->input['amount']; $DB->query("UPDATE _ipb_members SET points={$reciever['points']} WHERE id={$reciever['id']} LIMIT 1"); $DB->query("UPDATE _ipb_members SET points={$ibforums->member['points']} WHERE id={$ibforums->member['id']} LIMIT 1"); $message = str_replace("{to}" ,$reciever['name'] ,$ibforums->vars['money_donation']); $message = str_replace("{from}" ,$ibforums->member['name'] ,$message); $message = str_replace("{amount}" ,$ibforums->input['amount'] ,$message); $message = str_replace("{message}" ,$ibforums->input['message'] ,$message); $message = str_replace("{currency_name}" ,$ibforums->vars['currency_name'],$message); $message = str_replace("\n" ,"<br />" ,$message); $message = preg_replace("#{date: (.+?)}#ies",'date("\\1",time());' ,$message); $ibstore->sendpm($reciever['id'],$message,$ibforums->lang['sent_money']); $ibstore->write_log("Donation of {$ibforums->input['amount']} sent to {$reciever['name']}.","donate_m"); $ibstore->redirect("donated","act=store"); } dodałem Kod if(strtolower($ibforums->input['username']) == strtolower($ibforums->member['name'])) $this->error("donate_self"); aby nie można było przesyłać punktów do siebie i wszystko chodzi tak jak powinno Ten post edytował Azz 21.01.2006, 12:28:13 |
|
|
![]()
Post
#8
|
|
![]() Grupa: Przyjaciele php.pl Postów: 2 923 Pomógł: 9 Dołączył: 25.10.2004 Skąd: Rzeszów - studia / Warszawa - praca Ostrzeżenie: (0%) ![]() ![]() |
Sprawdz to co Ci podalem wczesniej.
-------------------- |
|
|
![]()
Post
#9
|
|
Grupa: Zarejestrowani Postów: 26 Pomógł: 0 Dołączył: 28.07.2005 Ostrzeżenie: (0%) ![]() ![]() |
to samo
|
|
|
![]()
Post
#10
|
|
![]() Grupa: Przyjaciele php.pl Postów: 2 923 Pomógł: 9 Dołączył: 25.10.2004 Skąd: Rzeszów - studia / Warszawa - praca Ostrzeżenie: (0%) ![]() ![]() |
Ale co to samo stringi sa takie same?
-------------------- |
|
|
![]()
Post
#11
|
|
Grupa: Zarejestrowani Postów: 26 Pomógł: 0 Dołączył: 28.07.2005 Ostrzeżenie: (0%) ![]() ![]() |
wsztstko chodzi tak jak powinno
![]() |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 27.06.2025 - 06:32 |