[In-Orbit][CMS] Dark Planets edition + emu

01/04/2015 21:44 Destiny#136
ok i fix chat
System: Welcome to the English chat
System: Server is running for Tests, some new updates are not applied so please keep the server discussion out of chat!
ahh old good times never back :( only one dp server

edit but cant login to chat tool [Only registered and activated users can see links. Click Here To Register...]
and why [Only registered and activated users can see links. Click Here To Register...] this no work
01/04/2015 22:42 cryz35#137
Quote:
Originally Posted by edox77 View Post
ok i fix chat
System: Welcome to the English chat
System: Server is running for Tests, some new updates are not applied so please keep the server discussion out of chat!
ahh old good times never back :( only one dp server

edit but cant login to chat tool [Only registered and activated users can see links. Click Here To Register...]
and why [Only registered and activated users can see links. Click Here To Register...] this no work
Not implemented
01/05/2015 02:53 underworld222#138
Quote:
Originally Posted by YURI-ELIADE.ITALY View Post
I give you just can not get into the home by means of the error in index 19 I eleminato all passes but nothing to do there, and good luck to those who succeeded.
check \KERNEL-DOCMS\Server.Config.php
\KERNEL-DOCMS\Class.db.php
and other config files..
01/05/2015 03:07 YURI-ELIADE.ITALY#139
Quote:
Originally Posted by underworld222 View Post
check \KERNEL-DOCMS\Server.Config.php
\KERNEL-DOCMS\Class.db.php
and other config files..
class.db.php <-------- [Only registered and activated users can see links. Click Here To Register...]

server.Config.php <-------- [Only registered and activated users can see links. Click Here To Register...]
01/05/2015 07:48 katil0172#140
edox77 server link ?
01/05/2015 08:09 Davidc96#141
Quote:
Originally Posted by edox77 View Post
i click in gg and get ammo :P in shop cant get ammo but gg can :P
this is because GG use table server_1_player_all_item and shop use table server_1_player_ammunation.

See:
GG
PHP Code:
private function addItems($args){
        
$lootIds = array('2'=>'ammunition_laser_mcb-25''3'=>'ammunition_laser_mcb-50''4'=>'ammunition_laser_ucb-100''5'=>'ammunition_laser_sab-50','12'=>'ammunition_rocket_plt-2021','11'=>'ammunition_mine_acm-01');
        foreach(
$args as $k => $r){
            if(
array_key_exists($r['id'], $lootIds)):
                
$li $lootIds[$r['id']];
                if(
self::checkExistence($li)):
                    if(!empty(
$r['q'])):
                    
$Q $r['q'];
                    
$sqli "UPDATE `server_1_player_all_items` SET Q = Q + $Q WHERE userID=? && playerID=? && lootid=?";
                    
$stmt $this->con->prepare($sqli);
                    
$stmt->bindParam(1$this->useridPDO::PARAM_INT);
                    
$stmt->bindParam(2$this->playeridPDO::PARAM_INT);
                    
$stmt->bindParam(3$liPDO::PARAM_STR);
                    
$stmt->execute();
                    endif;
                else:
                  if(!empty(
$r['q'])):
                    
$in 0;
                    
$Q $r['q'];
                    
$sql "INSERT INTO `server_1_player_all_items` (`lootid`, `Q`, `interactive`, `playerID`, `userID`) VALUES (?, ?, ?, ?, ?)";
                    
$stmt $this->con->prepare($sql);
                    
$stmt->bindParam(1$liPDO::PARAM_STR);
                    
$stmt->bindParam(2$QPDO::PARAM_INT);
                    
$stmt->bindParam(3$inPDO::PARAM_INT);
                    
$stmt->bindParam(4$this->playeridPDO::PARAM_INT);
                    
$stmt->bindParam(5$this->useridPDO::PARAM_INT);
                    
$stmt->execute();
                    endif;
                endif;
            endif;
        }
        return 
true;
    } 
Shop:
PHP Code:
private function updateAmmo($am$full){
        
$sqli "UPDATE server_1_player_ammunation SET $full = ($full+$am) WHERE playerID=:pid";
        
$stmt $this->con->prepare($sqli);
        
$stmt->bindParam(':pid'$this->pidPDO::PARAM_INT);
        if (
$stmt->execute()) {
                
$message '{"result":"success","message":"' $am 'x ammunition: \"' $name '\" purchased.<br \/><br \/>","showEquipOption":false,"userBalance":{"uridium":' $this->uridium ',"credits":' $this->credits '},"userShip":{"laserAmmunitionSpace":100000000,"rocketSpace":100000000},"isShipDumpEmpty":false,"itemId":"' $id '","category":"ammunition"}';
                return 
$message;
        }else{
                
$message '{"result":"error","message":"S.H.E.I.L.D. found a bug on your account, contact staff.","userBalance":{"uridium":' $this->uridium ',"credits":' $this->credits '},"userShip":{"laserAmmunitionSpace":0,"rocketSpace":0},"isShipDumpEmpty":false,"itemId":"' $id '","category":"ship"}';
        return 
$message;
        }
    } 
Emulator use the server_1_player_ammunation.

PD: How do you fix the chat, I start the chat emulator, I edit the xml config files but chat doesn't connect to the emu (Only the in-game chat client doesn't works, the acp chat connection works)
01/05/2015 10:31 sveratus#142
downloaded on vps fucking finally releaseee.

damn great errors , how to upload the database i get errors in phpmyadmin
01/05/2015 15:48 underworld222#143
Quote:
Originally Posted by YURI-ELIADE.ITALY View Post
class.db.php
[Only registered and activated users can see links. Click Here To Register...]
twice?

PHP Code:
<?php
/*
 *  FOLLOW SCRIPT WAS MADE BY BAU - MEDIANET IVS DENMARK
 */
class DB 
        public static 
$instance

        public function 
__construct() {} 
         
        public static function 
getInstance() { 
         
                if(empty(
self::$instance)) { 
                         
                        
$db_info = array( 
                                
"db_host" => "127.0.0.1"
                                
"db_port" => "3306"
                                
"db_user" => "root"
                                
"db_pass" => "Ty56DCx"
                                
"db_name" => "darkorbit"
                                
"db_charset" => "UTF-8" 
                        
); 
                         
   
// .........


        
static function safe($s '')
        {
            
$db_info = array( 
                                
"db_host" => "127.0.0.1"
                                
"db_port" => "3306"
                                
"db_user" => "root"
                                
"db_pass" => "Ty56DCx"
                                
"db_name" => "darkorbit"
                                
"db_charset" => "UTF-8" 
                        
); 
            
$con $MySQLi = new mysqli($db_info["db_host"], $db_info["db_user"], $db_info['db_pass'], $db_info['db_name']);
            
//TODO: finish this... not exactly perfect
            
return mysqli_real_escape_string($con$s);
        }
       
// .........    
?>

here try this on index.. just copy the "commented" part
PHP Code:
<?php
echo "DarkPlanets is offline for some days. <br> Thanks for your patience.";
Exit;

require 
'./KERNEL-DOCMS/Init.php';

if(isset(
$_POST['recoverTrue']) && !empty($_POST['recoverTrue'])){
    
$_SESSION['errorData'] = $unity->passwordRecovery($_POST['recoverPw']);
}
if(isset(
$_POST['loginForm_default_username'], $_POST['loginForm_default_password'], $_POST['loginForm_default_login_submit']) && $_POST['loginForm_default_login_submit'] === 'Login'):
    
$_SESSION['errorData'] = "";
    if(
preg_match('/[|]/'$_POST['loginForm_default_username']) || strlen($_POST['loginForm_default_password']) < || strlen($_POST['loginForm_default_password']) > 20 || !preg_match('`[0-9]`'$_POST['loginForm_default_password']) || $_POST['loginForm_default_password'] === '******' || strlen($_POST['loginForm_default_username']) < || strlen($_POST['loginForm_default_username']) > 40):
        
$_SESSION['errorData'] .= '<div class="singup_errorMessage signup_errorMessage">Username and password combination doesn\'t exist.<br>Please check your info and try again.</div>';
        else:        
                                    
//           05.01.15 made it pdo ~underworld
                /*$name = mysqli_real_escape_string($MySQLi, $_POST['loginForm_default_username']);
                $query = $MySQLi->query("SELECT users.pwHash, users.ID, users.Email, users.verified, users.banned, users.banned_until, users.IP, server_1_players.rank FROM users INNER JOIN server_1_players ON users.ID=server_1_players.userID WHERE users.Name = '". $name ."'");
                */
                
$n $_POST['loginForm_default_username'];
                
$q $GLOBALS['DB']->prepare("SELECT users.pwHash, users.ID, users.Email, users.verified, users.banned, users.banned_until, users.IP, server_1_players.rank FROM users INNER JOIN server_1_players ON users.ID=server_1_players.userID WHERE users.Name = :name");
                
$q->bindParam(':name'$nPDO::PARAM_STR);
                
$q->execute();
                unset(
$n);
                
                if(
$q->rowCount () === 1):
                
$row $q->fetchAll(PDO::FETCH_ASSOC); /* work done */
                
if($row['banned']!=0){
                    
header('Location: http://darkplanets.net/?calmdown=99&until=Banned%20Permanent');                    
                }else{
                
//if($row['rank']==21){
                
if(($unity->cPT($row['banned_until']))){
some below you have the same problem.
PHP Code:
                if($q->rowCount () === 1):
                
$row $q->fetchAll(PDO::FETCH_ASSOC); /* work done */
                
if($row['banned']!=0){
                    
header('Location: http://darkplanets.net/?calmdown=99&until=Banned%20Permanent');                    
                }else{
                
//if($row['rank']==21){
                
if(($unity->cPT($row['banned_until']))){
                    
header('Location: http://darkplanets.net/?calmdown=99&until='.$row['banned_until']);        
                }else{
                        if(
$Encryption->decrypt($row['pwHash'])===$_POST['loginForm_default_password']){                            
                            
$sessionId $Core::GenerateRandom(18truefalse);
                            
$MySQLi->query('UPDATE users SET sessionId = \' ' $sessionId '\', IP = \''.$unity->get_client_ip().'\' WHERE ID = ' $row['ID'] . '');
                            
$_SESSION['server1']['user']['sessionId'] = $sessionId;
                            
$_SESSION['server1']['user']['email'] = $row['Email'];
                            
$_SESSION['server1']['user']['verified'] = $row['verified'];
                            
DB::pmc($row['ID'], "User logged in from ip: ".$unity->get_client_ip(), "logins");
                            
header('Location: /indexInternal.es.php?action=internalStart');
                        }else{
                            
$_SESSION['errorData'] .= '<div>Username and password combination doesn\'t exist.<br>Please check your info and try again.</div>';
        
                        }
                        } 

just use pdo instead.
01/05/2015 19:38 Toxicsnacht#144
how to fix the ammo problem?
01/05/2015 20:01 NoCheatImPGM#145
Quote:
Originally Posted by Toxicsnacht View Post
how to fix the ammo problem?
Ajax/Shop.php

Code:
private function updateAmmo($am, $full){
		$sqli = "UPDATE server_1_player_ammunation SET $full = ($full+$am) WHERE playerID=:pid";
		$stmt = $this->con->prepare($sqli);
        $stmt->bindParam(':pid', $this->pid, PDO::PARAM_INT);
        if ($stmt->execute()) {
				$message = '{"result":"success","message":"' . $am . 'x ammunition: \"' . $full . '\" purchased.<br \/><br \/>","showEquipOption":false,"userBalance":{"uridium":' . $this->uridium . ',"credits":' . $this->credits . '},"userShip":{"laserAmmunitionSpace":100000000,"rocketSpace":100000000},"isShipDumpEmpty":false,"itemId":"","category":"ammunition"}';
                return $message;
		}else{
				$message = '{"result":"error","message":"S.H.E.I.L.D. found a bug on your account, contact staff.","userBalance":{"uridium":' . $this->uridium . ',"credits":' . $this->credits . '},"userShip":{"laserAmmunitionSpace":0,"rocketSpace":0},"isShipDumpEmpty":false,"itemId":"' . $id . '","category":"ship"}';
        return $message;
		}
	}
01/05/2015 20:12 lCulito#146
any know why doesn't work galaxy gates? i don't receive munition, if any can tell me where i can change sql when send ammo, i can code and give the fix...

thanks and sorry for my english

test my server:
[Only registered and activated users can see links. Click Here To Register...] (Have 2 servers, new version(is darkplanets version) and old version(my own version)).
01/05/2015 20:49 Luffa#147
Quote:
Originally Posted by lCulito View Post
any know why doesn't work galaxy gates? i don't receive munition, if any can tell me where i can change sql when send ammo, i can code and give the fix...

thanks and sorry for my english

test my server:
[Only registered and activated users can see links. Click Here To Register...] (Have 2 servers, new version(is darkplanets version) and old version(my own version)).
Yes i know why :) i also know how to fix most of the bugs in this release xD

-A
01/05/2015 20:53 lCulito#148
Quote:
Originally Posted by Αnonymous View Post
Yes i know why :) i also know how to fix most of the bugs in this release xD

-A
Can you tell me why doesn't work or where i can fix please?..

Thanks

My server:
------
Darkstars.es
01/05/2015 21:31 underworld222#149
Quote:
Originally Posted by lCulito View Post
Can you tell me why doesn't work or where i can fix please?..

Thanks

My server:
------
Darkstars.es
server is very slow..
01/05/2015 21:54 Arby#150
Due to the main developer requesting it, I removed the links and I'm closing the thread.
If a person doesn't want his work (or a cracked version/leaked etc) on epvp, he is allowed to request the removal providing he is indeed the actual owner of that work.