Postado Maio 3, 2014 11 anos quando alguem usar o name changer na loja, o nome do char fica com a primeira letra minuscula, queria um jeito para deixa-la maiuscula....
Postado Maio 3, 2014 11 anos Autor se estiver faltando alguma coisa me avisa que eu mando o resto: Citar else { $buy_offer = getItemByID($buy_id); if(isset($buy_offer['id'])) { //item exist in database if($buy_offer['type'] != 'changename') { if($user_premium_points >= $buy_offer['points']) { $main_content .= ' <div class="TableContainer"> <div class="CaptionContainer"> <div class="CaptionInnerContainer"> <span class="CaptionEdgeLeftTop" style="background-image: url('.$layout_name.'/images/content/box-frame-edge.gif);"></span> <span class="CaptionEdgeRightTop" style="background-image: url('.$layout_name.'/images/content/box-frame-edge.gif);"></span> <span class="CaptionBorderTop" style="background-image: url('.$layout_name.'/images/content/table-headline-border.gif);"></span> <span class="CaptionVerticalLeft" style="background-image: url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span> <div class="Text">Delivery Informations</div> <span class="CaptionVerticalRight" style="background-image: url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span> <span class="CaptionBorderBottom" style="background-image: url('.$layout_name.'/images/content/table-headline-border.gif);"></span> <span class="CaptionEdgeLeftBottom" style="background-image: url('.$layout_name.'/images/content/box-frame-edge.gif);"></span> <span class="CaptionEdgeRightBottom" style="background-image: url('.$layout_name.'/images/content/box-frame-edge.gif);"></span> </div> </div> <table class="Table5" cellpadding="0" cellspacing="0"> <tbody><tr> <td> <div class="InnerTableContainer"> <table style="width: 100%;"><tbody><tr><td> <div class="InnerTableContainer"> <table> <tbody> <tr> <td> <div class="TableShadowContainerRightTop"> <div class="TableShadowRightTop" style="background-image: url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div> </div> <div class="TableContentAndRightShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-rm.gif);"> <div class="TableContentContainer"> <table class="TableContent" style="border: 1px solid #faf0d7;"> <tbody> <tr style="background-color: #505050;"> </tr> <tr class="Table" style="background-color: #d4c0a1;"> <td style="width: 800; border: 1px; border-style: solid; border-color: #FAF0D7; padding: 4px;"> <table border="0" cellpadding="4" cellspacing="1" width="100%"> <tr bgcolor="'.$config['site']['vdarkborder'].'"> <td colspan="2"><font style="font-size:16px; font-weight:bold; color: #FFFFFF;"><b>Item Informations</b></font></td> </tr> <tr bgcolor="#D4C0A1"> <td width="100"><b>Image:</b></td> <td width="550">'; if(file_exists('images/items/'.$buy_offer['item_id'].'.gif')) { $main_content .= '<img src="images/items/'.$buy_offer['item_id'].'.gif" height="32" width="32">'; } else { $main_content .= '<img src="images/monsters/nophoto.png" height="32" width="32">'; } $main_content .='</td> </tr> <tr bgcolor="#F1E0C6"><td width="100"><b>Name:</b></td><td width="550">'.$buy_offer['name'].'</td></tr> <tr bgcolor="#D4C0A1"><td width="100"><b>Description:</b></td><td width="550">'.$buy_offer['description'].'</td></tr>'; $main_content .='<tr bgcolor="#F1E0C6"><td width="100"><b>Cost:</b></td><td width="550"><small><b>'.$buy_offer['points'].'</b> premium points</small></td></tr>'; $main_content .=' </table> </td> </tr> </tbody> </table> </div> </div> <div class="TableShadowContainer"> <div class="TableBottomShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-bm.gif);"> <div class="TableBottomLeftShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div> <div class="TableBottomRightShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-br.gif);"></div> </div> </div> </td> </tr> </tbody> </table> </div> <div class="InnerTableContainer"> <table> <tbody> <tr> <td> <div class="TableShadowContainerRightTop"> <div class="TableShadowRightTop" style="background-image: url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div> </div> <div class="TableContentAndRightShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-rm.gif);"> <div class="TableContentContainer"> <table class="TableContent" style="border: 1px solid #faf0d7;"> <tbody> <tr style="background-color: #505050;"> </tr> <tr class="Table" style="background-color: #d4c0a1;"> <td style="width: 800; border: 1px; border-style: solid; border-color: #FAF0D7; padding: 4px;"> <form action="index.php?subtopic=shopsystem&action=confirm_transaction" method=POST> <input type="hidden" name="buy_id" value="'.$buy_id.'"> <table border="0" cellpadding="4" cellspacing="1" width="100%"> <tr bgcolor="'.$config['site']['vdarkborder'].'"> <td colspan="2"><font style="font-size:16px; font-weight:bold; color: #FFFFFF;"><b>Select one Player</b></font></td> </tr> <tr bgcolor="#D4C0A1"><td width="110"><b>Name:</b> <select name="buy_name" style="padding: 5px;">'; $players_from_logged_acc = $account_logged->getPlayersList(); if(count($players_from_logged_acc) > 0) { $players_from_logged_acc->orderBy('name'); foreach($players_from_logged_acc as $player) $main_content .= '<option>'.$player->getName().'</option>'; } else { $main_content .= 'You don\'t have any character on your account.'; } $main_content .= '</select> <input type="submit" value="Purschase"><br /><small>Character <b> your account </b> you will receive.</small></td></tr></table> </form> </td> </tr> </tbody> </table> </div> </div> <div class="TableShadowContainer"> <div class="TableBottomShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-bm.gif);"> <div class="TableBottomLeftShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div> <div class="TableBottomRightShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-br.gif);"></div> </div> </div> </td> </tr> </tbody> </table> </div> <div class="InnerTableContainer"> <table> <tbody> <tr> <td> <div class="TableShadowContainerRightTop"> <div class="TableShadowRightTop" style="background-image: url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div> </div> <div class="TableContentAndRightShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-rm.gif);"> <div class="TableContentContainer"> <table class="TableContent" style="border: 1px solid #faf0d7;"> <tbody> <tr style="background-color: #505050;"> </tr> <tr class="Table" style="background-color: #d4c0a1;"> <td style="width: 800; border: 1px; border-style: solid; border-color: #FAF0D7; padding: 4px;"> <form action="index.php?subtopic=shopsystem&action=confirm_transaction" method="POST"><input type="hidden" name="buy_id" value="'.$buy_id.'"> <table border="0" cellpadding="4" cellspacing="1" width="100%"> <tr bgcolor="'.$config['site']['vdarkborder'].'"> <td colspan="2"><font style="font-size:16px; font-weight:bold; color: #FFFFFF;"><b>Send Gift</b></font></td> </tr> <tr bgcolor="#D4C0A1"><td width="110"><b>To player:</b> <input type="text" name="buy_name" autocomplete="off" placeholder="Character to recive '.$buy_offer['name'].'" size="25"> <input type="submit" value="Purschase to friend"><br /><small>Put in the field above the name of the character that will receive the item.</small></td></tr> </table> </form> </td> </tr> </tbody> </table> </div> </div> <div class="TableShadowContainer"> <div class="TableBottomShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-bm.gif);"> <div class="TableBottomLeftShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div> <div class="TableBottomRightShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-br.gif);"></div> </div> </div> </td> </tr> </tbody> </table> </div> </td> </tr> </tbody> </table> </div> </td> </tr> </tbody> </table> </div>'; } else { $main_content .= ' <TABLE BORDER="0" CELLSPACING="1" CELLPADDING="4" WIDTH="100%"> <TR BGCOLOR="'.$config['site']['vdarkborder'].'"> <TD CLASS="white"><b>Erro</b></td> </TR> <TR BGCOLOR='.$config['site']['darkborder'].'><TD>Para comprar <b>'.$buy_offer['name'].'</b> voce precisa de <b>'.$buy_offer['points'].' premium points</b> disponíveis.<br />Atualmente você possui <b>'.$user_premium_points.'</b> premium points.</TD> </TR> </TABLE> <br /> <table width="100%"> <tbody> <tr align="center"> <td> <table border="0" cellpadding="0" cellspacing="0"> <tbody><tr><td style="border: 0px none;"> <a href="javascript:void();" onclick=location.href="index.php?subtopic=donate"> <div class="BigButton" style="background-image: url('.$layout_name.'/images/buttons/sbutton.gif);"> <div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image: url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div> <div class="ButtonText" style="background-image:url('.$layout_name.'/images/buttons/_sbutton_buypoints.png);"></div> </div> </div> </a> </td> </tr> <tr> </tr> </tbody> </table> </td> <td> <table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td style="border: 0px none;"> <a href="javascript:void();" onclick=location.href="index.php?subtopic=shopsystem"><div class="BigButton" style="background-image: url('.$layout_name.'/images/buttons/sbutton.gif);"> <div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image: url('.$layout_name.'/images/buttons/sbutton_over.gif); visibility: hidden;"></div> <input class="ButtonText" name="Back" alt="Back" src="'.$layout_name.'/images/vips/_sbutton_back.gif" type="image"> </table> </td> </tr> </tbody> </table> <p> </p>';} } else { $main_content .= '<script type="text/javascript"> var accountHttp; //sprawdza czy dane konto istnieje czy nie function checkAccount() { if(document.getElementById("account_name").value=="") { document.getElementById("acc_name_check").innerHTML = \'<img src="images/nok.gif" />\'; return; } accountHttp=GetXmlHttpObject(); if (accountHttp==null) { return; } var account = document.getElementById("account_name").value; var url="ajax/check_account.php?account=" + account + "&uid="+Math.random(); accountHttp.onreadystatechange=AccountStateChanged; accountHttp.open("GET",url,true); accountHttp.send(null); } function AccountStateChanged() { if (accountHttp.readyState==4) { document.getElementById("acc_name_check").innerHTML=accountHttp.responseText; } } var emailHttp; //sprawdza czy dane konto istnieje czy nie function checkEmail() { if(document.getElementById("email").value=="") { document.getElementById("email_check").innerHTML = \'<img src="images/nok.gif" />\'; return; } emailHttp=GetXmlHttpObject(); if (emailHttp==null) { return; } var email = document.getElementById("email").value; var url="ajax/check_email.php?email=" + email + "&uid="+Math.random(); emailHttp.onreadystatechange=EmailStateChanged; emailHttp.open("GET",url,true); emailHttp.send(null); } function EmailStateChanged() { if (emailHttp.readyState==4) { document.getElementById("email_check").innerHTML=emailHttp.responseText; } } function validate_required(field,alerttxt) { with (field) { if (value==null||value==""||value==" ") {alert(alerttxt);return false;} else {return true} } } function validate_email(field,alerttxt) { with (field) { apos=value.indexOf("@"); dotpos=value.lastIndexOf("."); if (apos<1||dotpos-apos<2) {alert(alerttxt);return false;} else {return true;} } } function validate_form(thisform) { with (thisform) { if (validate_required(buy_from,"Please enter a new name of your character!")==false) {buy_from.focus();return false;} if (validate_required(email,"Please enter your e-mail!")==false) {email.focus();return false;} if (validate_email(email,"Invalid e-mail format!")==false) {email.focus();return false;} if (verifpass==1) { if (validate_required(passor,"Please enter password!")==false) {passor.focus();return false;} if (validate_required(passor2,"Please repeat password!")==false) {passor2.focus();return false;} if (passor2.value!=passor.value) {alert(\'Repeated password is not equal to password!\');return false;} } if(rules.checked==false) {alert(\'To create account you must accept server rules!\');return false;} } } </script>'; $main_content .= ' <form action="index.php?subtopic=shopsystem&action=confirm_transaction" method="post" onsubmit="return validate_form(this)"><input type="hidden" name="buy_id" value="'.$buy_id.'"> <table border="0" cellpadding="4" cellspacing="1" width="100%"><tr bgcolor="#505050"><td colspan="2"><b class="white">Change Name</b></td></tr> <tr bgcolor="#D4C0A1"><td width="110"><b>Name:</b></td><td width="550"> <select style="padding: 5px;" name="buy_name">'; $players_from_logged_acc = $account_logged->getPlayersList(); if(count($players_from_logged_acc) > 0) { $players_from_logged_acc->orderBy('name'); foreach($players_from_logged_acc as $player) { $main_content .= '<option>'.$player->getName().'</option>';} } else { $main_content .= 'You don\'t have any character on your account.';} $main_content .= '</select> </td> </tr> <tr bgcolor="#F1E0C6"> <td width="110"><b>New name:</b></td> <td width="550"><input type="text" name="buy_from" id="buy_from" /> '; if ($account_logged->getCustomField("premium_points") <= $buy_offer['points']){$main_content .='<input type="submit" value="Change Name" disabled />';} else {$main_content .='<input type="submit" value="Change Name" />';} $main_content .='</td> </tr> </table> <br /> </form>';} } else { $main_content .= '<TABLE BORDER="0" CELLSPACING="1" CELLPADDING="5" WIDTH="100%"> <tr BGCOLOR="'.$config['site']['vdarkborder'].'"> <td CLASS="white"><b>Error</b></td> </tr> <tr BGCOLOR='.$config['site']['darkborder'].'> <td>Offer with ID <b>'.$buy_id.'</b> doesn\'t exist. Please <a href="index.php?subtopic=shopsystem">select item</a> again.</td> </tr> </TABLE>';} }}} elseif($action == 'confirm_transaction') { if(!$logged) { $main_content .= '<TABLE BORDER="0" CELLSPACING="1" CELLPADDING="4" WIDTH="100%"> <TR BGCOLOR="'.$config['site']['vdarkborder'].'"> <TD CLASS=white><B>Shoping Error</B></TD> </TR> <TR BGCOLOR='.$config['site']['darkborder'].'> <td> <TABLE BORDER="0" CELLSPACING="1" cellpadding="4"> <TR> <TD>Please login first.</TD> </TR> </TABLE> </td> </tr> </TABLE>';} else { $buy_id = (int) $_POST['buy_id']; $buy_name = stripslashes(urldecode($_POST['buy_name'])); $buy_from = stripslashes(urldecode($_POST['buy_from'])); if(empty($buy_id)) { $main_content .= 'Please <a href="index.php?subtopic=shopsystem">select item</a> first.'; } else { if($buy_offer['type'] == 'changename'){ if(!check_name_new_char($buy_from)) { $main_content .= 'Invalid name format of new name.'; }} else { $buy_offer = getItemByID($buy_id); $check_name_in_database = $ots->createObject('Player'); $check_name_in_database->find($buy_from); if($buy_offer['type'] == 'changename'){ if(!$check_name_in_database->isLoaded()) { }}
Postado Maio 4, 2014 11 anos cola o arquivo todo aqui! [em spoiler, e aproveita e edita o arquivo acima e coloca em spoiler tbem] STYLLER OT 2022
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.