Raised This Month: $51 Target: $400
 12% 

[CS:S] RankMe (Version 2.8.3 - 19 Jul 12)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
jbutzlaff
Junior Member
Join Date: Oct 2010
Old 10-23-2012 , 20:57   Re: [CS:S] RankMe (Version 2.8.3 - 19 Jul 12)
Reply With Quote #11

Quote:
Originally Posted by Sheepdude View Post
For SQLite 3 you need to use PDO. In config.php, replace:

Config.php:
Old code
Code:
$conexao = mysql_pconnect($host,$bd_user,$bd_password) or die($msg[0]);
mysql_select_db($bd,$conexao) or die($msg[1]);
New code
Code:
$conexao = new PDO('sqlite:up/rankme.sq3') or die($msg[0]);
In restore.php, make sure all the database strings make sense in terms of the directory location, and switch all instances of rank.sql to rankme.sq3. Example below:

Config.php:
Code:
$ftpDIR = "ftproot/css/addons/sourcemod/data/sqlite";
Restore.php:
Old code (example)
Code:
if (ftp_get($conn_id, "up/rank.sql", $ftpDIR . "/rank.sql", FTP_BINARY)) {
New code (example)
Code:
if (ftp_get($conn_id, "up/rankme.sq3", $ftpDIR . "/rankme.sq3", FTP_BINARY)) {
Index.php:
Old code
Code:
$resultado1 = mysql_query($query1,$conexao);

echo "<table id='table1'><tr><th>POSITION</th><th>NAME</th><th>STEAMID</th><th>SCORE</th><th>KDR</th><th>HEADSHOTS</th><th>ACCURACY</th></td>";
$rank=0;
while ($row = mysql_fetch_array($resultado1)) {
New code
Code:
$resultado1 = $conexao->query($query1);
echo "<a href='http://www.clan-psycho.com'><img src='http://www.clan-psycho.com/Themes/insidv2/images/theme/logo.png' /></a><br /><br />";
echo "<table id='table1'><tr><th>POSITION</th><th>NAME</th><th>STEAMID</th><th>SCORE</th><th>KDR</th><th>HEADSHOTS</th><th>ACCURACY</th></td>";
$rank=0;
while ($row = $resultado1->fetch()) {
Here is what the working web interface should look like:

http://www.clan-psycho.com/rank
Obrigado, mas recebo esse erro direto da console no linux, ao abrir o banco de dados.

[root@server sqlite]# sqlite rankme.sq3
Unable to open database "rankme.sq3": file is encrypted or is not a database
jbutzlaff is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:29.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode