mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-17 08:41:01 +00:00
fix: a lot of MySQL calls in templates replaced by MySQLi ones
This commit is contained in:
@@ -284,8 +284,8 @@ if($embassy == 0 || $mainbuilding >= 2 && $mainbuilding <= 4 && $village->natar
|
||||
$user = $session->uid;
|
||||
|
||||
//connect to DB
|
||||
//mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
//mysql_select_db(SQL_DB);
|
||||
//mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
//mysqli_select_db(SQL_DB);
|
||||
|
||||
//loop search village user
|
||||
$query = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."vdata WHERE owner = ".$user."");
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
$count="0";
|
||||
include("GameEngine/Config.php");
|
||||
|
||||
$connection = mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysql_error());
|
||||
mysql_select_db(SQL_DB, $connection) or die(mysql_error());
|
||||
$connection = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysqli_error());
|
||||
mysqli_select_db(SQL_DB, $connection) or die(mysqli_error());
|
||||
|
||||
$q = "SELECT * FROM ".TB_PREFIX."movement where endtime < ".time()." and proc = 0";
|
||||
$result = mysql_query($q, $connection);
|
||||
$count=mysql_num_rows($result);
|
||||
$result = mysqli_query($GLOBALS["link"], $q, $connection);
|
||||
$count=mysqli_num_rows($result);
|
||||
|
||||
?>
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
@@ -10,7 +10,7 @@
|
||||
#################################################################################
|
||||
|
||||
|
||||
$txt="Testing system message";
|
||||
$txt="Testing, testing... Gordon, is that you?!";
|
||||
|
||||
//bbcode = html code
|
||||
$txt = preg_replace("/\[b\]/is",'<b>', $txt);
|
||||
|
||||
Reference in New Issue
Block a user