![]() |
![]() |
![]()
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: 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 |
|
|
![]() ![]() |
![]() |
Aktualny czas: 4.10.2025 - 18:00 |