<?PHP if($_GET['editcharacter']) setcookie('name', $_GET['editcharacter']);
#################################################################################
## CONFIGURATION PAGE ##
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- #
## ---------------------------------------------------------------------------- #
## Script created by Kavvson (http://otland.net/members/kavvson/) #
## Author & developer: Kavvson #
## #
## Helpers: Archez <http://www.otland.net> #
## PineIt <http://www.otland.net> #
## Xampy <http://www.otland.net> #
#################################################################################
## +--------------------------Admin Panel Features------------------------------+
## | DONE: v.1
## | - Equipment Shower : Display items images
## | - Shows importat database fields : Ability to input new values and save
## | - Import list of players assigned with the account - display some info
## |
## | TODO: v.2
## | - IDEAS
## | - Secure part ( login / password ) - admin - stored in DB
## |
## |
## | IDEAS:
## | - Onclick image -> popup window that contains image items. After
## | clicking the image it will save and will be updated to the DB
## | - Health bar / Mana bar
## +----------------------------------------------------------------------------+
#################################################################################
#################################################################################
## +---------------------------------------------------------------------------
## | Database Connection
## +---------------------------------------------------------------------------
#################################################################################
$mysqli = new mysqli(
'localhost', // Host
'root', // User
'', // Password
'test' // Database name
);
if (!$mysqli) { die('<img src="http://otland.net/images/leave-icon.png" style="width: 19px" "> Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error());}
//echo '<div align="right"><img src="http://otland.net/images/ok.png" style="width: 19px" "> DB : ' . mysqli_get_host_info($mysqli) . "</div>";
#################################################################################
## +---------------------------------------------------------------------------
## | Windows configuration
## +---------------------------------------------------------------------------
## $window_decor = "mac_os_x" - theme name
## $window_title = "title" - You can define here the window title. You can use html tags. Like fe. <B>
## $window_width = "100" - Define the width of the window. You can only input a value. You cannot use the type of width = px,%,cm,mm etc.
## $window_height = "100" - Define the height of the window. You can only input a value. You cannot use the type of height = px,%,cm,mm etc.
## $window_content = "file.php" - Define here the content of the window. You can use a url: http://google.com ; you can also read files from .php .html .txt etc.
#################################################################################
$window_decor = "mac_os_x"; // The theme to load for the window system. Added in 2.7. Updated in 2.708
$window_title = "Czesc";
$window_title_image = "x.jpg";
$window_content = "t.txt"; //
$window_width = "333"; //
$window_height = "333"; //
#################################################################################
## +---------------------------------------------------------------------------
## | Style configuration (CSS)
## +---------------------------------------------------------------------------
## If you want add a new stylsheet add in the array '' => '', . And the last array cant contain ,
## Write 'Name of style can be any' => 'directory.extention',
## The 'Name of style can be any' can be the same with an other. Just add a 1 or _1
## You might get some values from $test
## Only .css extentions will work
#################################################################################
$css = array(
'Main Style' => 'style.css',
'Jquery Style' => 'css/jquery-ui-1.8.5.custom.css',
'Jquery' => 'panelfiles/lib/jquery.tooltip.css',
'Windows Style' => 'windowsjs/themes/default.css',
'' => '',
'Window Style1' => 'z_window/windowsjs/themes/'.$window_decor.'.css'
);
/* Make it working dont change until u have to */
foreach($css as $key => $value){ echo '<link rel="stylesheet" href="'.$value.'" />';}
#################################################################################
## +---------------------------------------------------------------------------
## | Script configuration (JS)
## +---------------------------------------------------------------------------
## If you want add a new javascript add in the array '' => '', . And the last array cant contain ,
## Write 'Name of style can be any' => 'directory.extention',
## The 'Name of style can be any' can be the same with an other. Just add a 1 or _1
## You might get some values from $test
## Only .js extentions will work
#################################################################################
$js = array(
'Jquery' => 'panelfiles/lib/jquery.js',
'Jquery1' => 'js/jquery-1.4.2.min.js',
'JS' => 'panelfiles/lib/jquery.dimensions.js',
'TT' => 'panelfiles/lib/jquery.tooltip.js',
'Window' => 'z_window/prototype/prototype.js',
'Window1' => 'z_window/windowsjs/javascripts/effects.js',
'Window2' => 'z_window/windowsjs/javascripts/window.js',
'Window3' => 'z_window/windowsjs/javascripts/window_effects.js'
);
/* Make it working dont change until u have to */
foreach($js as $key => $value) {echo '<script src="'.$value.'" type="text/javascript"></script>';}
#################################################################################
## +---------------------------------------------------------------------------
## | Database queries
## +---------------------------------------------------------------------------
#################################################################################
$result = $mysqli->query( 'SELECT * FROM `players` WHERE `name` = \''.$mysqli->real_escape_string( $_GET['editcharacter'] ).'\' LIMIT 1;' )->fetch_assoc( );
$accountresult = $mysqli->query( 'SELECT * FROM `players` LEFT JOIN `accounts` ON `accounts`.`id` = `players`.`account_id` WHERE `players`.`name` = \''.$mysqli->real_escape_string( $_GET['editcharacter'] ).'\';' )->fetch_assoc( );
?>