yardımlarınızı talep ediyorum
Warning: Cannot modify header information - headers already sent by (output started at /home/proxatco/public_html/index2.php:19) in /home/proxatco/public_html/_pages/profile.php on line 37
kırmızı olan yazılar ilgili hataların geçtikleri satırlar
index2.php:19
<?php
define('PHP_FIREWALL_REQUEST_URI', strip_tags( $_SERVER['REQUEST_URI'] ) );
define('PHP_FIREWALL_ACTIVATION', true );
if ( is_file( @dirname(__FILE__).'/php-firewall/firewall.php' ) )
include_once( @dirname(__FILE__).'/php-firewall/firewall.php' );
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';
//$mysql->query('update `users` set `password`=:h where `id`=:u;', array('h' => $mysql->hash('....'), 'u' => '3946'));
?>
<meta charset="UTF-8">
<link href="/cache/cache.php?f=X4T.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="/cache/cache.php?f=estilo.css" />
<?php $core->doPage(); ?>
<script src="/cache/cache.php?f=jquery.min.js" type="text/javascript"></script>
<script src="/cache/cache.php?f=query.js"></script>
<script src="/cache/cache.php?f=script.js"></script>profile.php on line 37<title>ProXat</title>
<?php
ob_start();
if(!isset($config->complete))
{
return include $pages['setup'];
}
if(isset($_POST['cmd']))
{
$messages = array();
switch($_POST['cmd'])
{
case 'login':
if(!$core->allset($_POST, 'user', 'pass'))
{
break;
}
if(strlen($_POST['user']) == 0)
{
$messages[] = 'Introduzca su nombre de usuario';
}
if(strlen($_POST['pass']) == 0)
{
$messages[] = 'Por favor, introduzca su contraseña';
}
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[] = 'Error de usuario / clave';
break;
}
$loginKey = md5(time() . json_encode($_POST));
setCookie('loginKey', $loginKey, strtotime('+ 1 year'));
$_COOKIE['loginKey'] = $loginKey;
$mysql->query('update `users` set `loginKey`=:a where `username`=:b;', array('a' => $loginKey, 'b' => $user[0]['username']));
$messages[] = 'Usted será redirigido a la pagina princial en segundos..' . $core->refreshLogin();
$core->auth = true;
break;
case 'register':
if(!$core->allset($_POST, 'user', 'pass', 'mail'))
{
break;
}
if(strlen($_POST['user']) < 5 || strlen($_POST['user']) > 32 || !ctype_alnum($_POST['user']))
{
$messages[] = 'Su nombre de usuario requiere 5-15 caracteres alfanuméricos (a-z/0-9)';
}
if(strtolower($_POST['user']) == 'unregistered')
{
$messages[] = 'Ese nombre de usuario es reservado.';
}
if(strlen($_POST['pass']) < 6)
{
$messages[] = 'Usted está obligado a elegir una contraseña con al menos 6 caracteres.';
}
if(!filter_var($_POST['mail'], FILTER_VALIDATE_EMAIL))
{
$messages[] = 'Por favor, introduce una dirección de correo electrónico válido.';
}
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[] = 'Ya esta registrado ese nombre de usuario, o si ya tienes una cuenta, haga Login!';
break;
}
/* Insert Pre-Registration-ID Here (Unregistered) */
$vals = array(
'id' => 'NULL',
'username' => $_POST['user'],
'nickname' => $_POST['user'],
'password' => $mysql->hash($_POST['pass']),
'avatar' => rand(0, 1759),
'url' => '',
'k' => rand(-1000000, 1000000),
'k2' => rand(-1000000, 1000000),
'k3' => rand(-1000000, 1000000),
'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);
if(isset($_COOKIE['referral']) && is_numeric($_COOKIE['referral']))
{
//$mysql->query('update `users` set `credit`=`credit`+125 where `id`=:uid;', array('uid' => $_COOKIE['referral']));
}
$messages[] = "Se Registro con éxito, ahora puede iniciar sesión.";
break;
case 'update_bio':
if($core->auth)
{
$mysql->query('update `users` set `desc`=:desc where `id`=' . $core->user['id'] . ';', array('desc' => $_POST['bio']));
}
break;
case 'update_pawn':
if(isset($core->auth))
{
if($core->user['custpawn'] != '')
{
if(substr($_POST['update_pawn'], 0, 1) == '#')
{
$_POST['update_pawn'] = substr($_POST['update_pawn'], 1);
}
if(!isset($_POST['update_pawn']) || strlen($_POST['update_pawn']) != 6 || !ctype_xdigit($_POST['update_pawn']))
{
$_POST['update_pawn'] = 'off';
}
$mysql->query('update `users` set `custpawn`=:pawn where `id`=' . $core->user['id'] . ';', array('pawn' => $_POST['update_pawn']));
}
}
break;
}
foreach($messages as $message)
{
print '<div class="lpt import"> ' . $message . ' </div>';
}
}
if(!isset($_GET['u']) && isset($core->user['username']))
{
$_GET['u'] = $core->user['username'];
}
if(isset($_GET['u']) && ctype_alnum($_GET['u']))
{
$user = $mysql->fetch_array('select * from `users` where `username`=:uname or `id`=:uid;', array('uname' => $_GET['u'], 'uid' => $_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="container" style="margin: 0.5%; padding: 0.5%;">';
print '<div class="left">';
print '<div class="window">';
print '<div class="heading" style="position: inherit; height: auto;">';
if (is_numeric($user[0]['avatar'])) {
echo "<tr> <td><img style=\"max-width: 100%; background-color: transparent;width: 94%;border: 1px rgba(204, 204, 204, 1) solid;margin-top: 10px;\" src=\"/web_gear/av/{$user[0]['avatar']}.png\" /> </td> </tr>", PHP_EOL;
} else {
echo '<tr> <td><img style="max-width: 100%;" src="'.$user[0]['avatar'].'" class="mini-foto" style=" background-color: transparent;width: 94%;border: 1px rgba(204, 204, 204, 1) solid;margin-top: 10px;"/> </td> </tr>', PHP_EOL;
}
print '<style="background-color: transparent;width: 94%;border: 1px rgba(204, 204, 204, 1) solid;margin-top: 10px;">' . substr($nickname, 0, 50) . ' </div><div class="content" style="top:0;padding-top:0;"><table><tbody><tr class=""> <td> ID </td> <td class="tr"> ' . $user[0]['id'] . ' </td> </tr><tr class=""> <td> Xats </td> <td class="tr"> ' . $user[0]['xats'] . ' </td> </tr><tr class=""> <td> Days </td> <td class="tr"> ' . floor($user[0]['days'] / 86400) . ' </td> </tr><tr class=""> <td> Powers </td> <td class="tr"> ' . $pcount[0]['count(*)'] . ' </td> </tr><tr class=""> <td> Credit </td> <td class="tr"> ' . $user[0]['credit'] . ' </td> </tr></tbody></table><div style="width: 100%" class="tc">';
print '<table style="width: 99%">';
print '</table>';
if($core->auth && $core->user['id'] == $user[0]['id'])
{
print '<div style="width: 100%" class="tc"> <input type="submit" class="claimCredit" value="Claim Credit" style="padding:4%;" /> <input type="submit" class="relogin" value="Relogin" style="padding:4%;" /> </div>';
}
$usuario = $mysql->fetch_array('select * from `users` where `username`=:usuario or `id`=:uid;', array('usuario' => $_GET['u'], 'uid' => $_GET['u']));
$powers = $mysql->fetch_Array( 'select * from `chat_powers` where `usuario`=:id;', Array('id' => $usuario[ 0 ][ 'id' ] ) );
If ( count( $usuario ) != 0 )
{
print '<br>';
print( '<div class="tc">Sus powers de grupo<br>' );
print( 'Actualemente[Asignados] Son:<br>' );
print '<br>';
print( '<strong> CHAT </strong> - <strong> POWER </strong><br>' );
Foreach ( $powers as $power )
print( '<i><a href="/' . $power[ 'chat' ] . '">' . $power[ 'chat' ] . '</a> </i>/<i> (' . $core->getPowerName( $power[ 'power' ] ) . ') </i><br>' );
} //count( $usuario ) != 0
Else
{
print( '<br><br><div class="tc" Usted no tiene powers activados en ningun chat!<br>' );
}
print( '</div><br>' );
print '</div></div></div></div>';
print '<div class="right">';
print '<div style="width: auto; min-width: 400px;">';
print '<div class="tabs" style="/*background-color: #1ba1e2; */ width: 100%;">';
print '<ul><li><a href="/profile?u=' . htmlspecialchars($_GET['u']) . '&referral" style="border: none;">Referral Link</a></li>';
print '<li><a href="/profile?u=' . htmlspecialchars($_GET['u']) . '&newpass" style="border: none;">Change Password</a></li>';
print '<li><a href="/profile?u=' . htmlspecialchars($_GET['u']) . '&xatspcbg" style="border: none;">Xatspace Background</a></li>';
print '<li><a href="/profile?u=' . htmlspecialchars($_GET['u']) . '&preview" style="border: none;">Acerca De MÃ*</a></li></ul>';
print '</div>';
print '<div class="tabs_content" style="width:auto;padding:1%;">';
if(isset($core->user['id']) && $core->user['id'] == $user[0]['id'] && !isset($_GET['preview']))
{
print '<div class="heading"> Referral Link <a style="color:#ffffff;" href="/faq#referrals">(click for explanation)</a> </div>';
print '<input type="text" style="width: 99%;text-align: center;" value="http://' . $config->server_dm . '/home?ref=' . $core->user['id'] . '" /><br /></div>';
print '<br />';
print '<div class="tabs_content" style="width:auto;padding:1%;">';
print '<div class="heading"> Bio [ <a style="color:#ffffff;" href="http://' . $config->server_dm . '/profile?u=' . htmlspecialchars($_GET['u']) . '&preview">Preview</a> ]</div>';
}
else
{
print '<div class="heading"> Biografia de '.$user[0]['username'].' </div>';
}
if($user[0]['desc'] == '' && (!$core->auth || $core->user['id'] != $user[0]['id']))
{
print '<div class="tc" style="width: 100%"> ' . $user[0]['username'] . ' no tiene una biografÃ*a. </div>';
}
elseif($core->auth && $core->user['id'] == $user[0]['id'] && !isset($_GET['preview']))
{
print '<small style="cursor:pointer" title="[br], [center], [b], [h1], [h2], [h3]"> BB CODES (hover) </small>';
print '<form method="post">';
print '<input type="hidden" name="cmd" value="update_bio" />';
print '<textarea name="bio" style="width: 99%;resize: none" rows="15">' . htmlspecialchars($user[0]['desc']) . '</textarea>';
print '<div style="width: 99%;text-align: center"> <input type="submit" value="Actualizar" /> </div></div>';
print '</form>';
}
else
{
$bb = array(
'[br]' => '<br />',
"\n" => '<br />',
'' => '<span class="tc" style="width: 100%;display: inline-block;">',
'' => '</span>',
'' => '<b>',
'' => '</b>',
'[h1]' => '<h1>',
'[/h1]' => '</h1>',
'[h2]' => '<h2>',
'[/h2]' => '</h2>',
'[h3]' => '<h3>',
'[/h3]' => '</h3>',
'' => '<center>',
'' => '</center>',
);
print str_replace(array_keys($bb), $bb, htmlspecialchars($user[0]['desc']));
}
print '</div></div>';
}
else
{
print '<div class="lpi import"> Usuario no encontrado :/ </div>';
}
}
else
{
print '
<div class="container">
<div style="width: 100%; text-align: center;">
<div class="halfopage" style="float: left;">
<div class="window">
<div class="heading"> Ingrese a su cuenta </div>
<div class="content">
<table>
<form method="post">
<input type="hidden" name="cmd" value="login" />
<tr> <td class="tl"> Usuario </td> <td> <input style="width: 100%" type="text" name="user" /> </td> </tr>
<tr> <td class="tl"> Clave </td> <td> <input style="width: 100%" type="password" name="pass" /> </td> </tr>
<tr> <td colspan="2"> <input type="submit" value="Login" class="fr" /> </td> </tr>
</form>
</tbody>
</table>
</div>
</div>
</div>
<div style="width: 10%; display: inline-block;"> <!-- Spacer --> </div>
<div class="halfopage" style="float: right;">
<div class="window">
<div class="heading"> Registrar una cuenta</div>
<div class="content">
<form method="post">
<table>
<input type="hidden" name="cmd" value="register" />
<tr> <td class="tl"> Usuario </td> <td> <input style="width: 100%" type="text" name="user" /> </td> </tr>
<tr> <td class="tl"> Clave </td> <td> <input style="width: 100%" type="password" name="pass" /> </td> </tr>
<tr> <td class="tl"> Correo </td> <td> <input style="width: 100%" type="text" name="mail" /> </td> </tr>
<tr> <td colspan="2"> <label for="verificacion" class="verif">¡Si ves esto, no llenes el siguiente campo!</label>
<input name="verificacion" class="verif" /> </td> </tr>
<tr> <td colspan="2"> <input type="submit" value="Register" class="fr" /> </td> </tr>
</table>
</form>
</div>
</div>
</div>
</div>
</div>';
}
if (isset($_POST['verificacion']) != ""){
// Es un SPAMbot
exit();
}else{
// Es un usuario real, proceder a enviar el formulario.
}
?>
<STYLE type=text/css>
body {
BACKGROUND-IMAGE: url(<?php print $user[0]['xatspaceBG']; ?>)}
a{
color: #3498DB;
} --para los enlaces
a:hover{
color: #FC0404;
} --para cuando pasas sobre un enlace
a:active{
color: #04FC67;
} --para cuando lo pulsas
a:visited{
color: #0467FC;
} --para los que ya as visitado
.verif{ display: none; }
</style>