Postado Agosto 23, 2014 10 anos não velho precisa tirar as linhas certas se não buga o site .... aguardando o arquivo Projeto ATS (Naruto)Informações AbaixoFacebookYoutubeDiscord Tutoriais / ConteúdosClique Aqui
Postado Agosto 23, 2014 10 anos Autor brunds Não entendi muito bem, vc quer o arquivo createaccount do meu htdocs ? Irei postar os arquivos aqui que são relacionados ...
Postado Agosto 23, 2014 10 anos isso eu quero ver se o seu site tem a mesma pasta que a linha que o meu site Projeto ATS (Naruto)Informações AbaixoFacebookYoutubeDiscord Tutoriais / ConteúdosClique Aqui
Postado Agosto 23, 2014 10 anos Autor createAccount.php <?php require("system/system.php"); require("../config.php"); auth(); require("../system/application/libraries/POT/OTS.php"); /* Status types */ define('OK', 0); define('MISSING_VAR', 1); define('ACCOUNTNAME_TAKEN', 2); define('UNKNOWN', 3); /* Variable is missing? */ if(!isset($_GET['accountName']) || !isset($_GET['password']) || !isset($_GET['email'])) { die(json_encode(array('status'=>MISSING_VAR))); } $ots = POT::getInstance(); $ots->connect(POT::DB_MYSQL, array('host' => HOSTNAME, 'user' => USERNAME, 'database' => DATABASE, 'password' => PASSWORD)); $account = new OTS_Account(); $account->find($_GET['accountName']); /* Account name taken? */ if($account->isLoaded()) { die(json_encode(array('status'=>ACCOUNTNAME_TAKEN))); } $name = $account->createNamed($_GET['accountName']); $account->setPassword(sha1($_GET['password'])); $account->setEmail($_GET['email']); $account->setCustomField('premdays', PREMDAYS); try { $account->save(); } catch(Exception $e) { die(json_encode(array('status'=>UNKNOWN, 'message'=>$e->getMessage()))); } die(json_encode(array('status'=>OK, 'id'=>$account->getId()))); account.php <?php $GLOBALS['characters'] = $characters; $ide = new IDE; try { $ide->loadInjections("account"); } catch(Exception $e) { error($e->getMessage()); } echo "<h2>Hello <a href='".url('profile/view/'.$_SESSION['nickname'])."'>".ucfirst($_SESSION['nickname'])."</a>!</h2>"; if($messages != 0) if($messages == 1) echo "<center><b>You have $messages new message! Click <a href='".url('msg/inbox')."'>here</a> to read them!</b></center><br/>"; else echo "<center><b>You have $messages new messages! Click <a href='".url('msg/inbox')."'>here</a> to read them!</b></center><br/>"; ?> <script>$(function(){$("#tabs").tabs();});</script> <?php echo "<div id='tabs'>"; echo '<ul> <li><a href="#characters">Characters</a></li> <li><a href="#account">Account</a></li> <li><a href="#community">Community</a></li> <li><a href="#logout">Logout</a></li> </ul>'; echo "<div id='characters'>"; echo "<center><a href='".WEBSITE."/index.php/character/create_character'><button class='ide_button' onClick=\"window.location.href='".WEBSITE."/index.php/character/create_character';\">Create Character</button></a></center>"; echo "<table width='100%'>"; echo "<tr><td><center><b>Name</b></center></td><td><center><b>Level</b></center></td><td><center><b>Actions</b></center></td></tr>"; foreach($characters as $row) { echo "<tr class='highlight'><td><center><a href=\"".WEBSITE."/index.php/character/view/$row->name\">$row->name</a></center></td><td><center>$row->level</center></td><td><center><a href=\"".WEBSITE."/index.php/account/editcomment/$row->id\" class='tipsy' title='Edit comment'><img src='".WEBSITE."/public/images/edit.gif'/></a> <a href='#' onClick='if(confirm(\"Are you sure?\")) window.location.href=\"".WEBSITE."/index.php/account/deletePlayer/$row->id\"' class='tipsy' title='Delete character'><img src='".WEBSITE."/public/images/false.gif'/></a></center></td></tr>"; } echo "</table>"; echo "</div>"; echo "<div id='account'>"; echo "<center><a href='".WEBSITE."/index.php/account/changepassword'><button class='ide_button' onClick=\"window.location.href='".WEBSITE."/index.php/account/changepassword';\">Change password</button></a></center>"; echo "</div>"; echo "<div id='community'>"; echo "<b>Profile</b>"; echo "<li><a href='".WEBSITE."/index.php/profile/update'>Edit Profile</a></li>"; echo "<li><a href='".WEBSITE."/index.php/profile/avatar'>Update Avatar</a></li>"; echo "<br/><b>Messages</b>"; echo "<li><a href='".WEBSITE."/index.php/msg/inbox'>Inbox</a></li>"; echo "<li><a href='".WEBSITE."/index.php/msg/outbox'>Outbox</a></li>"; echo "<li><a href='".WEBSITE."/index.php/msg/write'>Write New</a></li>"; echo "</div>"; echo "<div id='logout'>"; echo "<br /><center><b>Are you sure you want to log out?</b><br /><br /><a href='".WEBSITE."/index.php/account/logout'><button class='ide_button' onClick=\"window.location.href='".WEBSITE."/index.php/account/logout';\">Logout</button></a></center>"; echo "</div>"; echo "</div>"; if(empty($acc[0]['rlname']) || empty($acc[0]['location']) || empty($acc[0]['about_me'])) alert("You might consider updating your public profile <a href='".WEBSITE."/index.php/profile/update'><b>here</b></a>!"); ?> OTS_Account.php <?php $GLOBALS['characters'] = $characters; $ide = new IDE; try { $ide->loadInjections("account"); } catch(Exception $e) { error($e->getMessage()); } echo "<h2>Hello <a href='".url('profile/view/'.$_SESSION['nickname'])."'>".ucfirst($_SESSION['nickname'])."</a>!</h2>"; if($messages != 0) if($messages == 1) echo "<center><b>You have $messages new message! Click <a href='".url('msg/inbox')."'>here</a> to read them!</b></center><br/>"; else echo "<center><b>You have $messages new messages! Click <a href='".url('msg/inbox')."'>here</a> to read them!</b></center><br/>"; ?> <script>$(function(){$("#tabs").tabs();});</script> <?php echo "<div id='tabs'>"; echo '<ul> <li><a href="#characters">Characters</a></li> <li><a href="#account">Account</a></li> <li><a href="#community">Community</a></li> <li><a href="#logout">Logout</a></li> </ul>'; echo "<div id='characters'>"; echo "<center><a href='".WEBSITE."/index.php/character/create_character'><button class='ide_button' onClick=\"window.location.href='".WEBSITE."/index.php/character/create_character';\">Create Character</button></a></center>"; echo "<table width='100%'>"; echo "<tr><td><center><b>Name</b></center></td><td><center><b>Level</b></center></td><td><center><b>Actions</b></center></td></tr>"; foreach($characters as $row) { echo "<tr class='highlight'><td><center><a href=\"".WEBSITE."/index.php/character/view/$row->name\">$row->name</a></center></td><td><center>$row->level</center></td><td><center><a href=\"".WEBSITE."/index.php/account/editcomment/$row->id\" class='tipsy' title='Edit comment'><img src='".WEBSITE."/public/images/edit.gif'/></a> <a href='#' onClick='if(confirm(\"Are you sure?\")) window.location.href=\"".WEBSITE."/index.php/account/deletePlayer/$row->id\"' class='tipsy' title='Delete character'><img src='".WEBSITE."/public/images/false.gif'/></a></center></td></tr>"; } echo "</table>"; echo "</div>"; echo "<div id='account'>"; echo "<center><a href='".WEBSITE."/index.php/account/changepassword'><button class='ide_button' onClick=\"window.location.href='".WEBSITE."/index.php/account/changepassword';\">Change password</button></a></center>"; echo "</div>"; echo "<div id='community'>"; echo "<b>Profile</b>"; echo "<li><a href='".WEBSITE."/index.php/profile/update'>Edit Profile</a></li>"; echo "<li><a href='".WEBSITE."/index.php/profile/avatar'>Update Avatar</a></li>"; echo "<br/><b>Messages</b>"; echo "<li><a href='".WEBSITE."/index.php/msg/inbox'>Inbox</a></li>"; echo "<li><a href='".WEBSITE."/index.php/msg/outbox'>Outbox</a></li>"; echo "<li><a href='".WEBSITE."/index.php/msg/write'>Write New</a></li>"; echo "</div>"; echo "<div id='logout'>"; echo "<br /><center><b>Are you sure you want to log out?</b><br /><br /><a href='".WEBSITE."/index.php/account/logout'><button class='ide_button' onClick=\"window.location.href='".WEBSITE."/index.php/account/logout';\">Logout</button></a></center>"; echo "</div>"; echo "</div>"; if(empty($acc[0]['rlname']) || empty($acc[0]['location']) || empty($acc[0]['about_me'])) alert("You might consider updating your public profile <a href='".WEBSITE."/index.php/profile/update'><b>here</b></a>!"); ?> Editado Agosto 23, 2014 10 anos por r0bert0lol (veja o histórico de edições)
Postado Agosto 23, 2014 10 anos maninho to de saida mais quando eu voltar vou dar uma molhada no meu site ai eu vejo pra ty qual é a pasta blz Projeto ATS (Naruto)Informações AbaixoFacebookYoutubeDiscord Tutoriais / ConteúdosClique Aqui
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.