* @link http://pioder.gim2przemysl.int.pl/ * @license GNU GPL v3 **/ if ( !defined('IN_uF') ) { die('Hacking attempt'); } class Admin_Over { function AddPages() { global $count; global $page; $content = ''; for ($i=1;$i<=$count;$i++) { if ($i==$page) { $content .= ''; } else { $content .= ''; } } return $content; unset($content); } function AddSkins() { global $forum_config; global $default_skin; $all=''; $query = DataBase::sql_query("SELECT `name`, `s_id` FROM `".SKINS_TABLE."`",GENERAL,'Could not obtain skins information'); while($t = DataBase::fetch($query)) { if ($t['name']==$default_skin) { $all .= ''; } else { $all .= ''; } } return $all; unset($t, $all); } function AddPages2($page)//for edit profile, not used in limit! { $content = ''; for ($i=1;$i<=50;$i++) { if ($i==$page) { $content .= ''; } else { $content .= ''; } } return $content; unset($content); } function AddLangs() { global $forum_config; global $default_lang; $result=''; $cat=opendir('./../lngs'); $notempty = false; while ($file = readdir($cat)) { if($file != '..' && $file !='.' && $file !='') { if (is_dir('./../lngs/'.$file)){ $notempty = true; if ($file==$default_lang) { $result .=''; } else { $result .=''; } } } } return $result; unset($cat, $notempty, $file, $result); } function ViewSkinName() { global $forum_config; if ($_SESSION['uid']>0) { $result = User::UserInformation($_SESSION['uid'],'skin'); $sql = "SELECT * FROM `".SKINS_TABLE."` WHERE `s_id`='$result'"; $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 = DataBase::fetch(DataBase::sql_query($sql,CRITICAL,'Could not obtain skin information.')); return $result['name']; } } function DefaultLang() { global $forum_config; if ($_SESSION['uid']>0) { return User::UserInformation($_SESSION['uid'],'lang'); } else { return $forum_config['defaultlang']; } } function TotalTopics() { $sql = "SELECT `t_id` FROM ".TOPICS_TABLE.";"; $query = DataBase::sql_query($sql,GENERAL,'Could not obtain total posts information'); $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 = DataBase::num_rows($query); return($result); } function GenerateHeader() { global $default_skin; global $lng; echo ' DSF Administration
'.$lng['uf_pa'].'
'; } } ?>