+ Changed from MySQL to MySQLi native driver.
+ Added 2 new functions in DataBase class: fetch($query) and num_rows($query) git-svn-id: https://svn.pioder.pl/uf-svn/uF@20 72ec579a-5ced-4fa4-82f3-afba5d98df2f
This commit is contained in:
@@ -38,7 +38,7 @@ class Admin_Over
|
||||
global $default_skin;
|
||||
$all='';
|
||||
$query = DataBase::sql_query("SELECT `name`, `s_id` FROM `".SKINS_TABLE."`",'GENERAL','Could not obtain skins information');
|
||||
while($t = @mysql_fetch_array($query))
|
||||
while($t = DataBase::fetch($query))
|
||||
{
|
||||
|
||||
if ($t['name']==$default_skin)
|
||||
@@ -104,14 +104,14 @@ class Admin_Over
|
||||
{
|
||||
$result = User::UserInformation($_SESSION['uid'],'skin');
|
||||
$sql = "SELECT * FROM `".SKINS_TABLE."` WHERE `s_id`='$result'";
|
||||
$result = mysql_fetch_array(DataBase::sql_query($sql,'CRITICAL','Could not obtain skin information.'));
|
||||
$result = DataBase::fetch(DataBase::sql_query($sql,'CRITICAL','Could not obtain skin information.'));
|
||||
return $result['name'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $forum_config['defaultskin'];
|
||||
$sql = "SELECT * FROM `".SKINS_TABLE."` WHERE `s_id`='$result'";
|
||||
$result = mysql_fetch_array(DataBase::sql_query($sql,'CRITICAL','Could not obtain skin information.'));
|
||||
$result = DataBase::fetch(DataBase::sql_query($sql,'CRITICAL','Could not obtain skin information.'));
|
||||
return $result['name'];
|
||||
}
|
||||
}
|
||||
@@ -131,14 +131,14 @@ class Admin_Over
|
||||
{
|
||||
$sql = "SELECT `t_id` FROM ".TOPICS_TABLE.";";
|
||||
$query = DataBase::sql_query($sql,'GENERAL','Could not obtain total posts information');
|
||||
$result = mysql_num_rows($query);
|
||||
$result = DataBase::num_rows($query);
|
||||
return($result);
|
||||
}
|
||||
function TotalPosts()
|
||||
{
|
||||
$sql = "SELECT `p_id` FROM ".POSTS_TABLE.";";
|
||||
$query = DataBase::sql_query($sql,'GENERAL','Could not obtain total posts information');
|
||||
$result = mysql_num_rows($query);
|
||||
$result = DataBase::num_rows($query);
|
||||
return($result);
|
||||
}
|
||||
function GenerateHeader()
|
||||
|
||||
Reference in New Issue
Block a user