Просмотр файла sdark.mobi/adm_root/fakeon.php

Размер файла: 908B
<?php

/**
 * Fake online 
 * @author  Alex Priadko 
 */



include $_SERVER['DOCUMENT_ROOT'] . '/core/system.php';
$header = 'Фейковый онлайн.';
include $_SERVER['DOCUMENT_ROOT'] . '/core/head.php';

if ($user['prava'] < 4)
{
	header(
		sprintf(
			"Location:%s",
			'/'
			)
		);
	exit;
}

if (isset($_POST['submit']))
{
	$pc = (int) abs($_POST['pc']);

	 mysql_query(
			"UPDATE `user` SET `online` = '".(time())."' WHERE `online` < '".(time()-84600*15)."' ORDER BY RAND() LIMIT $pc"
		) or die (mysql_error());

	if ($query)
	{
		header(
			sprintf(
				"Location:/%s",
				'online?allon'
				)
			);
		exit;
	} else {
		///error
	}
} else {
	?>
	<form action = "#" method = "POST">
		Сколько крутим онлайна:
		<br>
		<input type = "text" name = "pc" required>
		<br>
		<input type ="submit">
	</form>
	<?php
}



include $_SERVER['DOCUMENT_ROOT'] . '/core/foot.php';
?>