Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ob_start();
- @session_start();
- ini_set( 'display_errors', True );
- date_default_timezone_set( @date_default_timezone_get() );
- error_reporting( E_ALL );
- define( '_sep', str_replace( '\\', '\\\\', DIRECTORY_SEPARATOR ) );
- define( '_root', str_replace( '\\', '\\\\', __DIR__ ) . _sep );
- require _root . '_class' . _sep . 'class.php';
- ?>
- <head>
- <title>Edit chat group</title>
- </head>
- <?php include('nav.php'); ?>
- <div align="center"> </a><span style="color:#001aff;text-shadow: 0px 0px 5px#000000;"><h2>Editar Seu perfil geral</h2></span>
- <body>
- <div class="block c4">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <title>Edit your chat</title>
- <meta name="description" content="Edit your chat">
- <meta name="viewport" content="width=device-width">
- <!--<meta name="msapplication-TileImage" content="http://xat.com/images/win8-tile-144.png"/> TODO: -->
- <meta name="msapplication-TileColor" content="#000033"/>
- <meta name="xt" content="edit">
- <meta name="xcb_js" content="gv6DD4">
- <meta name="xcb_l" content="oH7gcs">
- <script type="text/javascript">
- //<![CDATA[
- try{if (!window.CloudFlare) {var CloudFlare=[{verbose:0,p:0,byc:0,owlid:"cf",bag2:1,mirage2:0,oracle:0,paths:{cloudflare:"/cdn-cgi/nexp/dokv=88e434a982/"},atok:"0debc295324a9a09ed533e125f1d04e4",petok:"fd9196e3ee1acabc243e686f1fd2939fca198378-1409869586-1800",zone:"xat.com",rocket:"0",apps:{}}];CloudFlare.push({"apps":{"ape":"ce6a7c57d5e4e884b40b3c5937c588e0"}});!function(a,b){a=document.createElement("script"),b=document.getElementsByTagName("script")[0],a.async=!0,a.src="//ajax.cloudflare.com/cdn-cgi/nexp/dokv=97fb4d042e/cloudflare.min.js",b.parentNode.insertBefore(a,b)}()}}catch(e){};
- //]]>
- </script>
- <link href="http://xat.com/favicon.ico" rel="shortcut icon" type="image/x-icon">
- <link rel="dns-prefetch" href="//www.xatech.com">
- <link rel="stylesheet" type="text/css" href="http://xat.com/css/bootstrap.min.css?v=gv6DD4">
- <link rel="stylesheet" type="text/css" href="http://xat.com/css/bootstrap-responsive.min.css?v=gv6DD4">
- <link rel="stylesheet" type="text/css" href="http://xat.com/css/animate.css?v=gv6DD4">
- <link rel="stylesheet" type="text/css" href="http://xat.com/css/main.css?v=gv6DD4">
- <link rel="stylesheet" type="text/css" href="http://xat.com/css/cookiecuttr.css?v=gv6DD4">
- <script src="http://xat.com/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js?v=gv6DD4"></script>
- </head>
- <body>
- <!--[if lt IE 7]>
- <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
- <![endif]-->
- <!--/head-->
- <!--header-->
- <?php
- If ( Isset( $_POST[ 'cmd' ] ) )
- {
- $messages = Array( );
- switch ( $_POST[ 'cmd' ] )
- {
- case 'login':
- If ( !$core->allset( $_POST, 'user', 'pass' ) )
- {
- break;
- } //!$core->allset( $_POST, 'user', 'pass' )
- If ( strlen( $_POST[ 'user' ] ) == 0 )
- {
- $messages[ ] = 'Por favor digite seu usuario.';
- } //strlen( $_POST[ 'user' ] ) == 0
- If ( strlen( $_POST[ 'pass' ] ) == 0 )
- {
- $messages[ ] = 'Por favor digite sua senha.';
- } //strlen( $_POST[ 'pass' ] ) == 0
- If ( !empty( $messages ) )
- break;
- $user = $mysql->fetch_Array( 'select * from `users` where `username`=:a;', Array(
- 'a' => $_POST[ 'user' ]
- ) );
- If ( empty( $user ) || !$mysql->validate( $_POST[ 'pass' ], $user[ 0 ][ 'password' ] ) )
- {
- $messages[ ] = 'Usuario/senha esta incorreto!';
- break;
- } //empty( $user ) || !$mysql->validate( $_POST[ 'pass' ], $user[ 0 ][ 'password' ] )
- $loginKey = md5( time() . json_encode( $_POST ) );
- $_COOKIE[ 'loginKey' ] = $loginKey;
- $expire = time() + 60 * 60 * 24 * 30;
- setcookie( "loginKey", $loginKey, $expire );
- $mysql->query( 'update `users` set `loginKey`=:a where `username`=:b;', Array(
- 'a' => $loginKey,
- 'b' => $user[ 0 ][ 'username' ]
- ) );
- $messages[ ] = 'Voce sera redirecionado automaticamente para a pagina inicial!' . $core->refreshLogin();
- $core->auth = True;
- break;
- case 'register':
- If ( !$core->allset( $_POST, 'user', 'pass', 'mail' ) )
- {
- break;
- } //!$core->allset( $_POST, 'user', 'pass', 'mail' )
- If ( strlen( $_POST[ 'user' ] ) < 5 || strlen( $_POST[ 'user' ] ) > 32 || !ctype_alnum( $_POST[ 'user' ] ) )
- {
- $messages[ ] = 'O seu usuario precisa ter 5-15 alpha-numerico ou caracteres (a-z/0-9).';
- } //strlen( $_POST[ 'user' ] ) < 5 || strlen( $_POST[ 'user' ] ) > 32 || !ctype_alnum( $_POST[ 'user' ] )
- If ( strtolower( $_POST[ 'user' ] ) == 'unregistered' )
- {
- $messages[ ] = 'Este usuario e reservado!';
- } //strtolower( $_POST[ 'user' ] ) == 'unregistered'
- If ( strlen( $_POST[ 'pass' ] ) < 6 )
- {
- $messages[ ] = 'Sua senha precisa ter pelo menos 6 caracteres.';
- } //strlen( $_POST[ 'pass' ] ) < 6
- If ( !filter_var( $_POST[ 'mail' ], FILTER_VALIDATE_EMAIL ) )
- {
- $messages[ ] = 'Por favor digite um email valido.';
- } //!filter_var( $_POST[ 'mail' ], FILTER_VALIDATE_EMAIL )
- If ( !empty( $messages ) )
- break;
- $count = $mysql->fetch_Array( 'select count(*) as `count` from `users` where `username`=:a or `email`=:b or (`connectedlast`=:c and `username`!=:d);', Array(
- 'a' => $_POST[ 'user' ],
- 'b' => $_POST[ 'mail' ],
- 'c' => $_SERVER[ 'REMOTE_ADDR' ],
- 'd' => ''
- ) );
- If ( $count[ 0 ][ 'count' ] > 0 )
- {
- $messages[ ] = 'Este nome de usuario ja esta em uso, ou voce ja tem uma conta!';
- break;
- } //$count[ 0 ][ 'count' ] > 0
- $vals = Array(
- 'id' => 'NULL',
- 'username' => $_POST[ 'user' ],
- 'nickname' => $_POST[ 'user' ],
- 'password' => $mysql->hash( $_POST[ 'pass' ] ),
- 'avatar' => rand( 0, 1759 ),
- 'url' => '',
- 'k' => rand( -1000000000, 1000000000 ),
- 'k2' => rand( -1000000000, 1000000000 ),
- 'k3' => rand( -10000000000, 1000000000 ),
- 'xats' => $config->xats,
- 'reserve' => $config->xats,
- 'days' => time() + ( $config->days * 86400 ),
- 'email' => $_POST[ 'mail' ],
- 'powers' => '',
- 'enabled' => '1',
- 'transferblock' => '',
- 'connectedlast' => $_SERVER[ 'REMOTE_ADDR' ],
- 'rank' => 1
- );
- $result = $mysql->insert( 'users', $vals );
- $messages[ ] = "Voce foi registrado com sucesso, agora faca o login!";
- break;
- case 'update_bio':
- If ( $core->auth )
- {
- $mysql->query( 'update `users` set `css`=:css where `id`=' . $core->user[ 'id' ] . ';', Array(
- 'css' => $_POST[ 'bio' ]
- ) );
- } //$core->auth
- break;
- case 'update_passok':
- If ( $core->auth )
- {
- $mysql->query( 'update `users` set `passok`=:passok where `id`=' . $core->user[ 'id' ] . ';', Array(
- 'passok' => $_POST[ 'passok' ]
- ) );
- } //$core->auth
- break;
- case 'update_desc':
- If ( $core->auth )
- {
- $mysql->query( 'update `users` set `desc`=:desc where `id`=' . $core->user[ 'id' ] . ';', Array(
- 'desc' => $_POST[ 'desc' ]
- ) );
- } //$core->auth
- break;
- case 'update_embed':
- If ( $core->auth )
- {
- $mysql->query( 'update `users` set `embed`=:embed where `id`=' . $core->user[ 'id' ] . ';', Array(
- 'embed' => $_POST[ 'embed' ]
- ) );
- } //$core->auth
- break;
- case 'update_tickle':
- If ( $core->auth )
- {
- $mysql->query( 'update `users` set `tickle`=:tickle where `id`=' . $core->user[ 'id' ] . ';', Array(
- 'tickle' => $_POST[ 'tickle' ]
- ) );
- } //$core->auth
- break;
- } //$_POST[ 'cmd' ]
- Foreach ( $messages as $message )
- {
- print '<div class="message"> ' . $message . ' </div>';
- } //$messages as $message
- } //Isset( $_POST[ 'cmd' ] )
- If ( !Isset( $_GET[ 'u' ] ) && Isset( $core->user[ 'username' ] ) )
- {
- $_GET[ 'u' ] = $core->user[ 'username' ];
- } //!Isset( $_GET[ 'u' ] ) && Isset( $core->user[ 'username' ] )
- If ( Isset( $_GET[ 'u' ] ) && ctype_alnum( $_GET[ 'u' ] ) )
- {
- $user = $mysql->fetch_Array( 'select * from `users` where `username`=:uname;', Array(
- 'uname' => $_GET[ 'u' ]
- ) );
- If ( count( $user ) == 1 )
- {
- $nickname = htmlspecialchars( substr( $user[ 0 ][ 'nickname' ], 0, strpos( $user[ 0 ][ 'nickname' ] . '##', '##' ) ) );
- $nickname = preg_replace( '/\([^)]*\)+/', '', $nickname );
- $pcount = $mysql->fetch_Array( 'select count(*) from `userpowers` where `userid`=:userid;', Array(
- 'userid' => $user[ 0 ][ 'id' ]
- ) );
- print '<div class="block c5">';
- print '<div class="heading">' . substr( $nickname, 0, 50 ) . '</div>';
- print '<table style="width: 99%">';
- If ( is_numeric( $user[ 0 ][ 'avatar' ] ) )
- {
- } //is_numeric( $user[ 0 ][ 'avatar' ] )
- print '</table>';
- If ( $core->auth && $core->user[ 'id' ] == $user[ 0 ][ 'id' ] )
- {
- print '';
- } //$core->auth && $core->user[ 'id' ] == $user[ 0 ][ 'id' ]
- print '</div>';
- print '<embed src="../web_gear/flash/profile.swf?a30" wmode="transparent" quality="high" width="425" height="600" name="profile" FlashVars="Info=' . $user[ 0 ][ 'id' ] . ';=' . $user[ 0 ][ 'username' ] . ';=' . $user[ 0 ][ 'nickname' ] . ';=' . $user[ 0 ][ 'avatar' ] . ';=http://BlockedDomain/;=" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" /></div>
- ';
- print '<p><center><div class="heading"> Editar DESCRIÇAO [<a href="usuario/' . htmlspecialchars( $_GET[ 'u' ] ) . '&preview">Visualizar</a>]</div></center></p>';
- }
- If ( $user[ 0 ][ 'desc' ] == '' && ( !$core->auth || $core->user[ 'id' ] != $user[ 0 ][ 'id' ] ) )
- {
- print '<div class="tc" style="width: 100%"> ' . $user[ 0 ][ 'username' ] . ' nao tem um perfil. </div>';
- } //$user[ 0 ][ 'desc' ] == '' && ( !$core->auth || $core->user[ 'id' ] != $user[ 0 ][ 'id' ] )
- ElseIf ( $core->auth && $core->user[ 'id' ] == $user[ 0 ][ 'id' ] && !Isset( $_GET[ 'preview' ] ) )
- {
- print '<form method="post">';
- print '<input type="hidden" name="cmd" value="update_desc" />';
- print '<textarea name="desc" style="width: 20%;resize: none" rows="10">' . htmlspecialchars( $user[ 0 ][ 'desc' ] ) . '</textarea>';
- print '<div style="width: 33%;text-align: center"> <input type="submit" value="Mudar Descriçao" /> </div>';
- print '</form>';
- print '<center><div class="heading"> Sua Senha <a href="usuario/' . htmlspecialchars( $_GET[ 'u' ] ) . '<p align="left"><font color="#FF0000"><p>(Por medidas de Segurança sua senha só será mostrada a voce)</p></font></a></div></center>';
- }
- If ( $user[ 0 ][ 'passok' ] == '' && ( !$core->auth || $core->user[ 'id' ] != $user[ 0 ][ 'id' ] ) )
- {
- print '<div class="tc" style="width: 100%"> ' . $user[ 0 ][ 'username' ] . ' nao tem um perfil. </div>';
- } //$user[ 0 ][ 'passok' ] == '' && ( !$core->auth || $core->user[ 'id' ] != $user[ 0 ][ 'id' ] )
- ElseIf ( $core->auth && $core->user[ 'id' ] == $user[ 0 ][ 'id' ] && !Isset( $_GET[ 'preview' ] ) )
- {
- print '<form method="post">';
- print '<input type="hidden" name="cmd" value="update_passok" />';
- print '<p><text name="passok" style="width: 33%;resize: none" rows="15"></p>' . htmlspecialchars( $user[ 0 ][ 'passok' ] ) . '</text>';
- print '</form>';
- print '<div class="block c4-5 fr">';
- If ( Isset( $core->user[ 'id' ] ) && $core->user[ 'id' ] == $user[ 0 ][ 'id' ] && !Isset( $_GET[ 'preview' ] ) )
- {
- print '<br />';
- print '<center><div class="heading"> Editar CSS [<a href="usuario/' . htmlspecialchars( $_GET[ 'u' ] ) . '&preview">Visualizar</a>]</div></center>';
- } //Isset( $core->user[ 'id' ] ) && $core->user[ 'id' ] == $user[ 0 ][ 'id' ] && !Isset( $_GET[ 'preview' ] )
- Else
- {
- print '<div class="heading"> Perfil </div>';
- }
- If ( $user[ 0 ][ 'css' ] == '' && ( !$core->auth || $core->user[ 'id' ] != $user[ 0 ][ 'id' ] ) )
- {
- print '<div class="tc" style="width: 100%"> ' . $user[ 0 ][ 'username' ] . ' nao tem um perfil. </div>';
- } //$user[ 0 ][ 'css' ] == '' && ( !$core->auth || $core->user[ 'id' ] != $user[ 0 ][ 'id' ] )
- ElseIf ( $core->auth && $core->user[ 'id' ] == $user[ 0 ][ 'id' ] && !Isset( $_GET[ 'preview' ] ) )
- {
- print '<form method="post">';
- print '<input type="hidden" name="cmd" value="update_bio" />';
- print '<textarea name="bio" style="width: 20%;resize: none" rows="10">' . htmlspecialchars( $user[ 0 ][ 'css' ] ) . '</textarea>';
- print '<div style="width: 33%;text-align: center"> <input type="submit" value="Mudar css" /> </div>';
- print '</form>';
- print '<center><div class="heading"> Editar HTML [<a href="usuario/' . htmlspecialchars( $_GET[ 'u' ] ) . '&preview">Visualizar</a>]</div></center>';
- }
- If ( $user[ 0 ][ 'embed' ] == '' && ( !$core->auth || $core->user[ 'id' ] != $user[ 0 ][ 'id' ] ) )
- {
- print '<div class="tc" style="width: 100%"> ' . $user[ 0 ][ 'username' ] . ' nao tem um perfil. </div>';
- } //$user[ 0 ][ 'embed' ] == '' && ( !$core->auth || $core->user[ 'id' ] != $user[ 0 ][ 'id' ] )
- ElseIf ( $core->auth && $core->user[ 'id' ] == $user[ 0 ][ 'id' ] && !Isset( $_GET[ 'preview' ] ) )
- {
- print '<form method="post">';
- print '<input type="hidden" name="cmd" value="update_embed" />';
- print '<textarea name="embed" style="width: 20%;resize: none" rows="10">' . htmlspecialchars( $user[ 0 ][ 'embed' ] ) . '</textarea>';
- print '<div style="width: 33%;text-align: center"> <input type="submit" value="Mudar Html" /> </div>';
- print '</form>';
- print '<center><div class="heading"> Editar Auto mensagem privada [<a href="usuario/' . htmlspecialchars( $_GET[ 'u' ] ) . '&preview">Visualizar</a>]</div></center>';
- }
- If ( $user[ 0 ][ 'tickle' ] == '' && ( !$core->auth || $core->user[ 'id' ] != $user[ 0 ][ 'id' ] ) )
- {
- print '<div class="tc" style="width: 100%"> ' . $user[ 0 ][ 'username' ] . ' nao tem um perfil. </div>';
- } //$user[ 0 ][ 'tickle' ] == '' && ( !$core->auth || $core->user[ 'id' ] != $user[ 0 ][ 'id' ] )
- ElseIf ( $core->auth && $core->user[ 'id' ] == $user[ 0 ][ 'id' ] && !Isset( $_GET[ 'preview' ] ) )
- {
- print '<form method="post">';
- print '<input type="hidden" name="cmd" value="update_tickle" />';
- print '<textarea name="tickle" style="width: 20%;resize: none" rows="10">' . htmlspecialchars( $user[ 0 ][ 'tickle' ] ) . '</textarea>';
- print '<div style="width: 33%;text-align: center"> <input type="submit" value="Mudar Html" /> </div>';
- print '</form>';
- } //$core->auth && $core->user[ 'id' ] == $user[ 0 ][ 'id' ] && !Isset( $_GET[ 'preview' ] )
- Else
- {
- $bb = Array(
- '[br]' => '<br />',
- "\n" => '<br />',
- '[center]' => '<span class="tc" style="width: 100%;display: inline-block;">',
- '[/center]' => '</span>',
- '[b]' => '<b>',
- '[/b]' => '</b>',
- '[h1]' => '<h1>',
- '[/h1]' => '</h1>',
- '[h2]' => '<h2>',
- '[/h2]' => '</h2>',
- '[h3]' => '<h3>',
- '[/h3]' => '</h3>',
- '[center]' => '<center>',
- '[/center]' => '</center>'
- );
- print str_replace( Array_keys( $bb ), $bb, htmlspecialchars( $user[ 0 ][ 'desc' ] ) );
- print str_replace( Array_keys( $bb ), $bb, htmlspecialchars( $user[ 0 ][ 'css' ] ) );
- print str_replace( Array_keys( $bb ), $bb, htmlspecialchars( $user[ 0 ][ 'embed' ] ) );
- }
- print '</div>';
- } //count( $user ) == 1
- Else
- {
- print '<div class="block c1 tc"> Usuario inexistente! </div>';
- }
- } //Isset( $_GET[ 'u' ] ) && ctype_alnum( $_GET[ 'u' ] )
- Else
- {
- print '
- ';
- }
- ?>
- <?php
- ini_set('display_errors', 'Off');
- if(!$core->auth)
- {
- return include $pages['profile'];
- }
- $ajustes = $mysql->fetch_array('SELECT * FROM users WHERE username = '.$_COOKIE['loginKey'].'');
- if(isset($_POST['npass']) && isset($_POST['npass2']) && isset($_POST['apass']))
- {
- if(!($_POST['npass'] === null) && !($_POST['npass2'] === null) && !($_POST['apass'] === null)){
- if($_POST['npass'] == $_POST['npass2']){
- if($mysql->validate($_POST['apass'], $core->user['password'])){
- $mysql->query("UPDATE USERS set PASSWORD = '".$mysql->hash($_POST['npass'])."' WHERE username = '".$core->user['username']."'");
- $mysql->query("UPDATE USERS set passok = '".($_POST['npass'])."' WHERE username = '".$core->user['username']."'");
- $mysql->query("UPDATE users SET loginKey = '' WHERE id='" . $core->user['id'] . "'");
- $alerta1 = '<div class="alert alert-success" align="center" role="alert">
- <strong>Bien hecho!</strong> Datos actualizados. Sera redireccionado en 2 segundos!</div>';
- echo'<meta http-equiv="Refresh" content="2;url=/login">';
- }
- else {
- $alerta1 = '<div class="alert alert-danger" align="center" role="alert">
- <strong>Disculpe!</strong> Su Antigua contraseña no es correcta.</div>';
- }
- }
- else {
- $alerta1 = '<div class="alert alert-danger" align="center" role="alert">
- <strong>Disculpe!</strong> Tus contraseñas nuevas no coinciden.</div>';
- }
- } else {
- $alerta1 = '<div class="alert alert-danger" align="center" role="alert">
- <strong>Disculpe!</strong> Rellene todos los campos.</div>';
- }
- }
- ?>
- <meta charset="utf-8">
- <link rel="stylesheet" type="text/css" href="/cache/cache.php?f=bootstrap.min.css">
- <link rel="stylesheet" type="text/css" href="/cache/cache.php?f=bootstrap-responsive.min.css">
- <link rel="stylesheet" type="text/css" href="/cache/cache.php?f=main.css">
- <title>Cambiar clave - <?php echo $config->info['ixatname']; ?></title>
- <?php include('nav.php'); ?>
- <div class="container">
- <br />
- <?php echo $alerta1; ?>
- <style type="text/css">
- .vbmenu_control A:link {text-decoration: none; color:#FFFFFF}
- .vbmenu_control A:visited {text-decoration: none; color:#FFFFFF}
- .vbmenu_control A:hover {text-decoration: underline; color:#FFFFFF}
- .vbmenu_control A:active {text-decoration: none; color:#FFFFFF}
- .vbmenu_control
- {
- background: #000000;
- color: #FFFFFF;
- font: bold 11px tahoma, verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
- padding: 3px 6px 3px 6px;
- white-space: nowrap;
- }
- </style>
- <h1><span style="display: inline;">Mudar a senha do seu perfil</span></h1>
- <p><span style="display: inline;">Troque sua senha</span></p>
- <form action="" method="post">
- <table border="0"><tbody><tr><td>
- <p><span style="display: inline;">Senha atual:</span></p></td><td>
- <input name="apass" type="password" size="32" maxlength="64" required></td></tr>
- <tr><td><p><span style="display: inline;">senha nova:</span></p></td><td>
- <input name="npass" type="password" size="32" maxlength="64" required></td></tr>
- <tr><td><p><span style="display: inline;">Verificar Nova senha:</span></p></td><td>
- <input name="npass2" type="password" size="32" maxlength="64" required></td></tr>
- </tbody></table>
- <button type="submit" name="ok" value="1" class="btn"><i class=" icon-wrench"></i> <span style="display: inline;">Submeter</span></button>
- </form>
- </div>
- <?php
- function bad($text){
- $badword = array_merge(array_map('chr', range( 0, 31)),array('<','>',':',';','\'','/','\\','|','?','*','"',')','('));
- $text = str_replace($badword, '', $text);
- return $text;
- }
- $message = array();
- if (isset($_POST['usuario'])) {
- $_POST = bad($_POST);
- $_GET = bad($_GET);
- $usuario = $_POST['usuario'];
- $usuario = bad($usuario);
- $verificarusuario = $mysql->fetch_array("SELECT * FROM users WHERE username='" . $usuario . "';");
- $vxat = $mysql->fetch_array("SELECT * FROM users WHERE id='" . $core->user['id'] . "';");
- foreach ($vxat as $row) {
- $xats = $row['xats'];
- }
- if (empty($usuario)) {
- $message[] = 'Shortname esta Vazio ';
- } else {
- if (strlen($usuario) > 4) {
- $message[] = 'Shortname tem que ser mais que 4 letras';
- }
- if (strlen($usuario) < 7) {
- $message[] = 'Minimo 4 Letras';
- }
- if (!empty($verificarusuario)) {
- $message[] = 'Ja possui um usuario com este nome, porfavor escolhe outro nome.';
- }
- }
- if (empty($message)) {
- if (strlen($usuario) == 4) {
- if ($xats < 10000) {
- $message[] = 'Voce nao tem xats Suficiente';
- } else {
- $mysql->query("UPDATE users SET username='{$usuario}' WHERE id='{$core->user['id']}'");
- $mysql->query("UPDATE users SET xats = xats - {$valor4letra} WHERE id='{$core->user['id']}'");
- $message[] = 'Shortname ' . $usuario . ' Comprado com Sucesso';
- print $core->refreshLogin();
- }
- }
- if (strlen($usuario) == 5) {
- if ($xats < 7500) {
- $message[] = 'Voce nao tem xats Suficiente';
- } else {
- $mysql->query("UPDATE users SET username='{$usuario}' WHERE id='{$core->user['id']}'");
- $mysql->query("UPDATE users SET xats = xats - {$valor5letra} WHERE id='{$core->user['id']}'");
- $message[] = 'Shortname ' . $usuario . ' Comprado com Sucesso';
- print $core->refreshLogin();
- }
- }
- if (strlen($usuario) == 6) {
- if ($xats < 6000) {
- $message[] = 'Voce nao tem xats Suficiente';
- } else {
- $mysql->query("UPDATE users SET username='{$usuario}' WHERE id='{$core->user['id']}'");
- $mysql->query("UPDATE users SET xats = xats - {$valor6letra} WHERE id='{$core->user['id']}'");
- $message[] = 'Shortname ' . $usuario . ' Comprado com Sucesso';
- print $core->refreshLogin();
- }
- }
- if (strlen($usuario) == 7) {
- if ($xats < 2000) {
- $message[] = 'Voce nao tem xats Suficiente';
- } else {
- $mysql->query("UPDATE users SET username='{$usuario}' WHERE id='{$core->user['id']}'");
- $mysql->query("UPDATE users SET xats = xats - {$valor7letra} WHERE id='{$core->user['id']}'");
- $message[] = 'Shortname ' . $usuario . ' Comprado com Sucesso';
- print $core->refreshLogin();
- }
- }
- if (strlen($usuario) == 8) {
- if ($xats < 1000) {
- $message[] = 'Voce nao tem xats Suficiente';
- } else {
- $mysql->query("UPDATE users SET username='{$usuario}' WHERE id='{$core->user['id']}'");
- $mysql->query("UPDATE users SET xats = xats - {$valor8letra} WHERE id='{$core->user['id']}'");
- $message[] = 'Shortname ' . $usuario . ' Comprado com Sucesso';
- print $core->refreshLogin();
- }
- }
- }
- foreach ($message as $msg) {
- print '<br><div class="alert alert-dismissable alert-info">
- <button type="button" class="close" data-dismiss="alert"></button>
- <center>' . $msg . ' </center></div>';
- }
- }
- ?>
- <center>
- <h1><span style="display: inline;">Mudar shortname</span></h1>
- <form method="post">
- <br>
- <input type="text" name="usuario" placeholder="Shortname">
- <br>
- <input type="submit" name="submit" value="Comprar ShortName">
- </form>
- <h2 >Precos:</h2>
- <ul >
- <strong><li>8 letras, 1.000 xats,</li>
- <li>7 letras, 2.000 mil xats,</li>
- <li>6 letras, 6.000 mil xats,</li>
- <li>5 letras, 7.500 xats,</li>
- <li>4 letras, 10.000 xats,</li></strong>
- </ul>
- </center>
- <script src="/cache/cache.php?f=query.js"></script>
- <script src="/cache/cache.php?f=script.js"></script>
- <br><br><br><br>
- <?php include('foot.php');?>
- <script type="text/javascript">
- _uacct = "UA-1813155-1";
- if(!config.cookiedecline) urchinTracker();
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement