Register for your free account! | Forgot your password?

You last visited: Today at 22:10

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Web Design

Discussion on Web Design within the CO2 Private Server forum part of the Conquer Online 2 category.

View Poll Results: Would this be a good project for the community?
Yes 12 66.67%
No 6 33.33%
Voters: 18. You may not vote on this poll

Closed Thread
 
Old 01/24/2014, 03:12   #46
 
turk55's Avatar
 
elite*gold: 130
Join Date: Oct 2007
Posts: 1,655
Received Thanks: 706
Quote:
Originally Posted by .Light View Post
[....]
Not really quite the best way to do it, here is a small upgrade;

PHP Code:
<?php
require_once('connect.php');

$mysqli = new mysqli($hostdb$dbuser$dbpass$dbname); // this should be in connect.php

$serverport "5816";
$serveraddress $serverip;
$port 9959;
$ip $serverip;
//EDIT HERE!!!
$status '1';  //1: Checks the port. 2: *NOT CODED* Checks database table for 1/0.
//EDIT HERE!!!

function countRows($table$mysqli$filter "") {
    
$queryString "SELECT count(*) FROM ".$table;
    if(!empty(
$filter)) {
        
$queryString .= " WHERE ".$filter;
    }
    
$query $mysqli->query($queryString);
    
$rows $query->num_rows;
    return 
$rows;
}

if (
$status == '1')
{
    echo 
'<p class="offline"><font style="color: ">Accounts: <font style="color: green"><b>'.countRows("accounts"$mysqli).'</p></b></font>';
    echo 
'<p class="offline"><font style="color: ">Characters: <font style="color: green"><b>'.countRows("entities"$mysqli).'</p></b></font>';
    echo 
'<p class="offline"><font style="color: ">Online Players: <font style="color: green"><b>'.countRows("entities"$mysqli"Online=1").'</p></b></font>';

    require_once(
"inc/online.php");
}
else if (
$status == '2')
{
    echo 
"WORKED2";
}
else
{
    echo 
"EDIT INC/SERVERSTATUS.PHP";
}
?>
turk55 is offline  
Thanks
1 User
Old 01/24/2014, 05:56   #47
 
elite*gold: 0
Join Date: Mar 2010
Posts: 183
Received Thanks: 74
Quote:
Originally Posted by turk55 View Post
Not really quite the best way to do it, here is a small upgrade;

PHP Code:
<?php
require_once('connect.php');

$mysqli = new mysqli($hostdb$dbuser$dbpass$dbname); // this should be in connect.php

$serverport "5816";
$serveraddress $serverip;
$port 9959;
$ip $serverip;
//EDIT HERE!!!
$status '1';  //1: Checks the port. 2: *NOT CODED* Checks database table for 1/0.
//EDIT HERE!!!

function countRows($table$mysqli$filter "") {
    
$queryString "SELECT count(*) FROM ".$table;
    if(!empty(
$filter)) {
        
$queryString .= " WHERE ".$filter;
    }
    
$query $mysqli->query($queryString);
    
$rows $query->num_rows;
    return 
$rows;
}

if (
$status == '1')
{
    echo 
'<p class="offline"><font style="color: ">Accounts: <font style="color: green"><b>'.countRows("accounts"$mysqli).'</p></b></font>';
    echo 
'<p class="offline"><font style="color: ">Characters: <font style="color: green"><b>'.countRows("entities"$mysqli).'</p></b></font>';
    echo 
'<p class="offline"><font style="color: ">Online Players: <font style="color: green"><b>'.countRows("entities"$mysqli"Online=1").'</p></b></font>';

    require_once(
"inc/online.php");
}
else if (
$status == '2')
{
    echo 
"WORKED2";
}
else
{
    echo 
"EDIT INC/SERVERSTATUS.PHP";
}
?>
Thanks for the upgrade (: I'll add it to the site instead of the other one and I'll add your name to the contributions when we release it.
.Light is offline  
Old 01/24/2014, 07:25   #48
 
Gerculy's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 86
Received Thanks: 15
Quote:
Originally Posted by Y u k i View Post
Nice. That will keep the site from loading if its offline until the timeout.
Timeout is set to 1 sec therefore you wont even notice.

About the old / upgraded Server Status . why not using PDO ?
Gerculy is offline  
Old 01/24/2014, 15:50   #49
 
turk55's Avatar
 
elite*gold: 130
Join Date: Oct 2007
Posts: 1,655
Received Thanks: 706
Quote:
Originally Posted by Gerculy View Post
Timeout is set to 1 sec therefore you wont even notice.

About the old / upgraded Server Status . why not using PDO ?
He was using the old mysql library so I tryed to lure him into the newer mysql library, but yeah you are right. PDO should be used if it wants to be used for multiple sources
turk55 is offline  
Old 01/28/2014, 14:26   #50
 
Gerculy's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 86
Received Thanks: 15
Quote:
Originally Posted by turk55 View Post
He was using the old mysql library so I tryed to lure him into the newer mysql library, but yeah you are right. PDO should be used if it wants to be used for multiple sources
Mysql is deprecated since Version 5.5.0
.

And your wrong about :
Quote:
PDO should be used if it wants to be used for multiple sources
It's not about using mysql, mysqli or PDO the website can't be made for multiple servers because tables and rows are not the same only if they use the same source.
And PDO is suggested because it's the lastest and easiest.
Gerculy is offline  
Old 01/28/2014, 17:56   #51
 
turk55's Avatar
 
elite*gold: 130
Join Date: Oct 2007
Posts: 1,655
Received Thanks: 706
Quote:
Originally Posted by Gerculy View Post
Mysql is deprecated since Version 5.5.0
.

And your wrong about :
It's not about using mysql, mysqli or PDO the website can't be made for multiple servers because tables and rows are not the same only if they use the same source.
And PDO is suggested because it's the lastest and easiest.
What are you talking about ? The regular MySQL library is old and deprecated, the MySQLi library on the other hand is the newer version of it.

PDO is a wrapper which allows you to use multiple database types to connect to etc. Therefore it actually does support multiple sources, all it requires you to do is change the queries a little where needed.
turk55 is offline  
Old 01/28/2014, 21:11   #52

 
jackpotsvr's Avatar
 
elite*gold: 20
Join Date: Oct 2008
Posts: 328
Received Thanks: 43
I like the design
jackpotsvr is offline  
Old 01/29/2014, 01:39   #53
 
elite*gold: 0
Join Date: Mar 2010
Posts: 183
Received Thanks: 74
Quote:
Originally Posted by Gerculy View Post
And your wrong about :
It's not about using mysql, mysqli or PDO the website can't be made for multiple servers because tables and rows are not the same only if they use the same source.
False. It can be made for multiple servers.

I think its funny people still think that can't actually means something in this field. You can do ANYTHING, literally anything, you just have to figure out how.
.Light is offline  
Thanks
1 User
Old 01/29/2014, 11:09   #54


 
KraHen's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 794
The design is nice.
KraHen is offline  
Old 01/30/2014, 02:03   #55
 
elite*gold: 0
Join Date: Mar 2010
Posts: 183
Received Thanks: 74
Quote:
Originally Posted by jackpotsvr View Post
I like the design
Quote:
Originally Posted by KraHen View Post
The design is nice.

Thanks (:
.Light is offline  
Old 06/01/2015, 05:27   #56
 
elite*gold: 0
Join Date: Mar 2010
Posts: 183
Received Thanks: 74
I've decided to restart this project!

Progress so far:



The events page is also coded in. All of the settings are handled by the database.
All news are handled by the database.
Any questions, let me know!
.Light is offline  
Closed Thread


Similar Threads Similar Threads
█ [S] Design ( YT Design / ElitePvpers Design / Avatar / Signatur / Web Design █
05/18/2019 - elite*gold Trading - 6 Replies
Hi Ich suche einen ,,Designer'' der mir folgendes machen kann: - Web Design - Signatur - Avatar - ElitePvPers Design - Youtube Kanal Design
[DESIGN] Steam Store Design - Für Keys, Gifts oder Accounts! [DESIGN]
02/06/2017 - elite*gold Trading - 32 Replies
Hallo ich biete hier mein selbst erstelles Threaddesign an. Ich habe es im Steam Stil erstellt und hoffe es gefällt euch. Das Threaddesign könnt ihr nach euren Wünschen ganz einfach anpassen. Falls ihr nicht wisst wie kann ich es euch entweder per Skype/PN mit ein paar Screenshots erklären oder ihr sagt mir was geändert werden soll und ich mache es. Das Design wird nur einmal verkauft. Beim Kauf erhaltet die .psd und alle Rechte! Gegen kleinen Aufpreis erstelle ich euch noch eine passende...
[B] Patcher+design, client design, website design+script PSC
11/18/2012 - Metin2 Trading - 0 Replies
*deleted*



All times are GMT +2. The time now is 22:10.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.