PDA

View Full Version : Active link to Housekeeping v2?



Hypertext
01-02-2010, 08:08 PM
Anybody got it or feel like uploading it for me? Alternatively posting the mysql install file (the database creation file itself.)

Thanks.

Please disregard the fact that there may be anything better suited to the task. I'm just looking for something specific within it that could help me sort some code out.

LMS16
01-02-2010, 10:27 PM
http://habboemotion.com/resource/djpanel/housekeepingguy.zip

:) hope this is the right one...

Dentafrice
06-02-2010, 04:10 PM
I've got a few zips of it, not sure if they work.. or which ones they actually are.. as well as the old HKV2 Paid version that I never finished..

Here's the install file.. the SQL is in there somewhere I think..


<?php
session_start();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=us-ascii">
<meta name="author" content="testSITE">
<title>Install Housekeeping</title>
<link href="css/index.css" rel="stylesheet" type="text/css" />

<style type="text/css">
#box {
width: 500px;
}
</style>
</head>

<body>

<div align="center"><img src="images/logo.png"></div>
<div id="box">

<?php
// Housekeeping INSTALL FILE


$step = $_GET ["step"];
if ($step == "1" || $step == "") {
// BEGINNING OF INSTALL
?>
<center><span class="header">Installation</span> - Step1 - <em>Checks</em></center>
<br />
<br />
<center>
<table width="400" cellspacing="1" cellpadding="3" border="0"
bgcolor="#cccccc">

<tbody>
<tr>
<td><b>Name</b></td>
<td><b>Status</b></td>
<td><b>Error</b></td>
</tr>
<?php
if (is_writable ( "config.php" ) == false) {
$table_error = "Cannot write to file.";
$table_image = "cross.png";
} else {
$table_error = "";
$table_image = "accept.png";
}
?>
<tr>
<td bgcolor="#ffffff">Configuration File (0777)</td>
<td bgcolor="#ffffff" style="text-align: center;"><img
src="images/<?php
echo $table_image;
?>" /></td>
<td bgcolor="#ffffff"><?php
echo $table_error;
?></td>
</tr>
<?php
if (file_exists ( "classes/" ) == false) {
$table_error = "File/directory does not exist.";
$table_image = "cross.png";
} else {
$table_error = "";
$table_image = "accept.png";
}
?>
<tr>
<td bgcolor="#ffffff">Classes Directory</td>
<td bgcolor="#ffffff" style="text-align: center;"><img
src="images/<?php
echo $table_image;
?>" /></td>
<td bgcolor="#ffffff"><?php
echo $table_error;
?></td>
</tr>

<?php
if (file_exists ( "css/" ) == false) {
$table_error = "File/directory does not exist.";
$table_image = "cross.png";
} else {
$table_error = "";
$table_image = "accept.png";
}
?>
<tr>
<td bgcolor="#ffffff">CSS Directory</td>
<td bgcolor="#ffffff" style="text-align: center;"><img
src="images/<?php
echo $table_image;
?>" /></td>
<td bgcolor="#ffffff"><?php
echo $table_error;
?></td>
</tr>
<?php
if (file_exists ( "images/" ) == false) {
$table_error = "File/directory does not exist.";
$table_image = "cross.png";
} else {
$table_error = "";
$table_image = "accept.png";
}
?>
<tr>
<td bgcolor="#ffffff">Images Directory</td>
<td bgcolor="#ffffff" style="text-align: center;"><img
src="images/<?php
echo $table_image;
?>" /></td>
<td bgcolor="#ffffff"><?php
echo $table_error;
?></td>
</tr>

<?php
if (file_exists ( "includes/" ) == false) {
$table_error = "File/directory does not exist.";
$table_image = "cross.png";
} else {
$table_error = "";
$table_image = "accept.png";
}
?>
<tr>
<td bgcolor="#ffffff">Includes Directory</td>
<td bgcolor="#ffffff" style="text-align: center;"><img
src="images/<?php
echo $table_image;
?>" /></td>
<td bgcolor="#ffffff"><?php
echo $table_error;
?></td>
</tr>

<?php
if (file_exists ( "javascript/" ) == false) {
$table_error = "File/directory does not exist.";
$table_image = "cross.png";
} else {
$table_error = "";
$table_image = "accept.png";
}
?>
<tr>
<td bgcolor="#ffffff">Javascript Directory</td>
<td bgcolor="#ffffff" style="text-align: center;"><img
src="images/<?php
echo $table_image;
?>" /></td>
<td bgcolor="#ffffff"><?php
echo $table_error;
?></td>
</tr>

<?php
if (file_exists ( "pages/" ) == false) {
$table_error = "File/directory does not exist.";
$table_image = "cross.png";
} else {
$table_error = "";
$table_image = "accept.png";
}
?>
<tr>
<td bgcolor="#ffffff">Pages Directory</td>
<td bgcolor="#ffffff" style="text-align: center;"><img
src="images/<?php
echo $table_image;
?>" /></td>
<td bgcolor="#ffffff"><?php
echo $table_error;
?></td>
</tr>
</tbody>
</table>
</center>
<br /><br />
<div style="text-align: center;">
<form method="post" action="?step=2">
<input type="submit" class="formsss" value="Next">
</form>
</div>
<?php
} else {
if ($step == "2") {
// STEP 2 - DATABASE DETAILS //
if($_GET["action"] == "save") {
$server = $_POST["server"];
$username = $_POST["username"];
$password = $_POST["password"];
$database = $_POST["database"];
// TIME TO CHECK! //

$conn = @mysql_connect($server, $username, $password);
if($conn == false) {
$table_is = 1;
$table_image = "cross.png";
$table_error = "Could not connect to database.";
} else {
$table_image = "accept.png";
$table_error = "";
$select_db = @mysql_select_db($database);
if($select_db == false) {
$table_db = 1;
$table_db_image = "cross.png";
$table_db_error = "Could not select database.";
} else {
$table_db = 0;
$table_db_image = "accept.png";
$table_db_error = "";
}
}
?>
<center><span class="header">Installation</span> - Step 2 - <em>Database Details</em></center>
<br /><br />

<center>
<table width="400" cellspacing="1" cellpadding="3" border="0"
bgcolor="#cccccc">

<tbody>
<tr>
<td><b>Name</b></td>
<td><b>Status</b></td>
<td><b>Error</b></td>
</tr>
<tr>
<td bgcolor="#ffffff">Connection</td>
<td bgcolor="#ffffff" style="text-align: center;"><img
src="images/<?php
echo $table_image;
?>" /></td>
<td bgcolor="#ffffff"><?php
echo $table_error;
?></td>
</tr>
<?php
if($table_is != 1) {
?>
<tr>
<td bgcolor="#ffffff">Select Database</td>
<td bgcolor="#ffffff" style="text-align: center;"><img
src="images/<?php
echo $table_db_image;
?>" /></td>
<td bgcolor="#ffffff"><?php
echo $table_db_error;
?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</center>

<br /><br />
<div style="text-align: center;">
<?php
if($table_db != "" || $table_is != "") {
?>
<form method="post" action="?step=2">
<input type="submit" class="formsss" value="Fix">
</form>
<?php
} else {
$_SESSION["database_username"] = $username;
$_SESSION["database_password"] = $password;
$_SESSION["database_database"] = $database;
$_SESSION["database_server"] = $server;
?>
<form method="post" action="?step=3">
<input type="submit" class="formsss" value="Next">
</form>
<?php
}
?>
</div>
<?php
} else {
?>
<center><span class="header">Installation</span> - Step 2 - <em>Database Details</em></center>
<br /><br />
<center>
<form method="post" action="?step=2&action=save">
<table>
<tr>
<td><strong>Server</strong></td>
<td><input type="text" class="formsss" name="server"></td>
</tr>

<tr>
<td><strong>Database</strong></td>
<td><input type="text" class="formsss" name="database"></td>
</tr>

<tr>
<td><strong>Database Username</strong></td>
<td><input type="text" class="formsss" name="username"></td>
</tr>

<tr>
<td><strong>Database Password</strong></td>
<td><input type="text" class="formsss" name="password"></td>
</tr>
</table>
</center>
<br /><br />
<div style="text-align: center;">
<input type="submit" class="formsss" value="Next">
</form>
</div>
<?php
}

} else {
if($step == "3") {
if($_GET["action"] == "save") {
$sitename = $_POST["sitename"];
$url = $_POST["url"];
$root = $_POST["root"];
$_SESSION["sitename"] = $sitename;
$_SESSION["url"] = $url;
$_SESSION["root"] = $root;
?>
<center><span class="header">Installation</span> - Step 3 - <em>Site Details</em></center>
<br /><br />
<div style="text-align: center;">
<form method="post" action="?step=4">
<input type="submit" class="formsss" value="Next">
</form>
</div>
<?php
} else {
?>
<center><span class="header">Installation</span> - Step 3 - <em>Site Details</em></center>
<br /><br />
<center>
<form method="post" action="?step=3&action=save">
<table>
<tr>
<td><strong>Site Name</strong></td>
<td><input type="text" class="formsss" name="sitename" size="50"></td>
</tr>

<tr>
<td><strong>URL to Housekeeping</strong></td>
<td><input type="text" class="formsss" name="url" value="http://www.example.com/housekeeping/" size="50"></td>
</tr>

<tr>
<td><strong>Document Root</strong></td>
<td><input type="text" class="formsss" name="root" value="/home/example/public_html/housekeeping/" size="50"></td>
</tr>

</table>
</center>
<br /><br />
<div style="text-align: center;">
<input type="submit" class="formsss" value="Next">
</form>
</div>
<?php
}
} else {
if($step == "4") {
// TIME TO WRITE THE CONFIGURATION FILE
$file = '<?php
session_start();

/*
* Location Configuration
*/
$root = "' . $_SESSION["root"] . '";
$url = "' . $_SESSION["url"] . '";

$classes = $root . "classes/";
$includes = $root . "includes/";
$images = $url . "images/";
$css = $url . "css/";
$javascript = $url . "javascript/";

/* Include Files */

require_once $classes . "database.php";
require_once $classes . "core.php";

/* Define Database Settings */

$database ["server"] = "' . $_SESSION["database_server"] . '";
$database ["username"] = "' . $_SESSION["database_username"] . '";
$database ["password"] = "' . $_SESSION["database_password"] . '";
$database ["database"] = "' . $_SESSION["database_database"] . '";

/* Connect */

$db->connect ( $database ["server"], $database ["username"], $database ["password"], $database ["database"] );

/* Define Presets */
$action = @$_GET["action"];
$myuid = session_id();
?>';

$fp = @fopen("config.php", "w+");
if(@fwrite($fp, $file) == false) {
$table_is = 1;
$table_image = "cross.png";
$table_error = "Could not open config.php for writing.";
}
@fclose($fp);
?>
<center><span class="header">Installation</span> - Step 4 - <em>Write Configuration</em></center>
<br /><br />
<?php
if($table_is == 1) {
?>
<center>
<table width="400" cellspacing="1" cellpadding="3" border="0"
bgcolor="#cccccc">

<tbody>
<tr>
<td><b>Name</b></td>
<td><b>Status</b></td>
<td><b>Error</b></td>
</tr>
<tr>
<td bgcolor="#ffffff">Write Configuration</td>
<td bgcolor="#ffffff" style="text-align: center;"><img
src="images/<?php
echo $table_image;
?>" /></td>
<td bgcolor="#ffffff"><?php
echo $table_error;
?></td>
</tr>
</tbody>
</table>
</center>
<br /><br />
<?php
}
?>
<div style="text-align: center;">
<form method="post" action="?step=5">
<input type="submit" class="formsss" value="Next">
</form>
</div>
<?php
} else {
if($step == "5") {
require_once "config.php";
if($_GET["action"] == "save") {
$_SESSION["user_username"] = $core->clean($_POST["username"]);
$_SESSION["user_password"] = $core->clean($_POST["password"]);
$_SESSION["user_email"] = $core->clean($_POST["email"]);
?>
<center><span class="header">Installation</span> - Step 5 - <em>Setup User</em></center>
<br /><br />

<div style="text-align: center;">
<form method="post" action="?step=6">
<input type="submit" class="formsss" value="Next">
</form>
</div>
<?php
} else {
?>
<center><span class="header">Installation</span> - Step 5 - <em>Administration Account</em></center>
<br /><br />
<center>
<form method="post" action="?step=5&action=save">
<table>
<tr>
<td><strong>Username</strong></td>
<td><input type="text" class="formsss" name="username" size="50"></td>
</tr>

<tr>
<td><strong>Password</strong></td>
<td><input type="text" class="formsss" name="password" size="50"></td>
</tr>

<tr>
<td><strong>E-Mail</strong></td>
<td><input type="text" class="formsss" name="email" size="50"></td>
</tr>

</table>
</center>
<br /><br />
<div style="text-align: center;">
<input type="submit" class="formsss" value="Next">
</form>
</div>
<?php
}
} else {
if($step == "6") {
require_once "config.php";
// Time to start the database crap, yay! //

$db->query("DROP TABLE IF EXISTS `logins`;");
$db->query("CREATE TABLE `logins` (
`id` int(11) NOT NULL auto_increment,
`data` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ;");

$db->query("DROP TABLE IF EXISTS `perm_set`;");

$db->query("CREATE TABLE `perm_set` (
`id` int(10) NOT NULL auto_increment,
`settings` int(10) NOT NULL,
`user_management` int(10) NOT NULL,
`dj_says` int(10) NOT NULL,
`requests` int(10) NOT NULL,
`usergroup_management` int(10) NOT NULL,
`title` text NOT NULL,
`admin_group` int(10) NOT NULL,
`templates` int(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;");

$db->query("INSERT INTO `perm_set` (`id`, `settings`, `user_management`, `dj_says`, `requests`, `usergroup_management`, `title`, `admin_group`, `templates`) VALUES
(1, 1, 1, 1, 1, 1, 'Administrator', 1, 1),
(6, 0, 0, 1, 1, 0, 'DJ', 0, 0);");

$db->query("DROP TABLE IF EXISTS `requests`;");
$db->query("
CREATE TABLE `requests` (
`id` int(10) NOT NULL auto_increment,
`name` varchar(255) NOT NULL,
`username` text NOT NULL,
`type` text NOT NULL,
`text` text NOT NULL,
`ip` text NOT NULL,
`date` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ;");

$db->query("DROP TABLE IF EXISTS `says`;");
$db->query("CREATE TABLE `says` (
`id` int(11) NOT NULL auto_increment,
`username` text NOT NULL,
`text` text NOT NULL,
`date` text NOT NULL,
`ip` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ;");
$db->query("DROP TABLE IF EXISTS `sessions`;");
$db->query("CREATE TABLE `sessions` (
`id` int(10) NOT NULL auto_increment,
`session_id` text NOT NULL,
`time` text NOT NULL,
`ip` text NOT NULL,
`uid` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ;");

$db->query("DROP TABLE IF EXISTS `settings`;");
$db->query("CREATE TABLE `settings` (
`id` int(10) NOT NULL auto_increment,
`name` text NOT NULL,
`value` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ;");

$db->query("INSERT INTO `settings` (`id`, `name`, `value`) VALUES
(1, 'sitename', '" . $_SESSION["sitename"] . "'),
(2, 'version', 'Housekeeping V2.0 BUILD 1.0'),
(3, 'timeout', '900'),
(4, 'date_format', 'M d, y'),
(5, 'server_ip', ''),
(6, 'server_port', ''),
(7, 'server_password', ''),
(8, 'server_stats', '0');");

$db->query("DROP TABLE IF EXISTS `templates`;");
$db->query("CREATE TABLE `templates` (
`id` int(10) NOT NULL auto_increment,
`name` text NOT NULL,
`value` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;");
$db->query("INSERT INTO `templates` (`id`, `name`, `value`) VALUES
(1, 'says', '{username} says:<br />\r\n{message}<br /><br />\r\n\r\nPosted on {date}'),
(2, 'panel_says', 'DJ {username} - {message}'),
(3, 'panel_stats', '{server_title} - {listeners} listeners; {song}');");

$db->query("DROP TABLE IF EXISTS `usergroup`;");
$db->query("CREATE TABLE `usergroup` (
`id` int(10) NOT NULL auto_increment,
`title` text NOT NULL,
`perm_set` int(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;");

$db->query("INSERT INTO `usergroup` (`id`, `title`, `perm_set`) VALUES
(1, 'Administrator', 1),
(2, 'DJ', 2);");
$db->query("DROP TABLE IF EXISTS `users`;");
$db->query("
CREATE TABLE `users` (
`id` int(10) NOT NULL auto_increment,
`username` text NOT NULL,
`password` text NOT NULL,
`email` text NOT NULL,
`usergroup` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ;");

$db->query("INSERT INTO `users` (`id`, `username`, `password`, `email`, `usergroup`) VALUES
(1, '" . $_SESSION["user_username"] . "', '" . md5($_SESSION["user_password"]) . "', '" . $_SESSION["user_email"] . "', '1');");
?>
<center><span class="header">Installation</span> - Step 6 - <em>Install Database</em></center>
<br /><br />

<div style="text-align: center;">
<form method="post" action="?step=7">
<input type="submit" class="formsss" value="Next">
</form>
</div>
<?php
} else {
if($step == "8") {

unlink("install.php");
require_once "config.php";
$core->redirect("index.php");
exit();
}
?>
<center><span class="header">Installation</span> - Done</center>
<br /><br />
<center>
Your installation is now complete. You may now delete this file.<br /><br />
</center>
<div style="text-align: center;">
<form method="post" action="?step=8">
<input type="submit" class="formsss" value="Login">
</form>
</div>
<?php
}
}
}
}
}
}
?>
</div>

<div id="footer">Copyright &copy; 2008, Caleb Mingle and testSITE. All
rights reserved. <br>
testSITE is powered by <a href="http://www.dentafrice.com"
target="_blank">Housekeeping V2.0 BUILD 1.0.</a><br>
All login attempts are recorded.<br />
<br />

<br />
</div>

</body>
</html>

Want to hide these adverts? Register an account for free!