+ Deleted skins table - obtaining skin information from skins/ catalog
+ Renamed AddPages to ListPages and rewrited function. + Removed AddPages2, AddLangs, Admin_Over::ViewSkinName() + Created ListDir() function git-svn-id: https://svn.pioder.pl/uf-svn/uF@34 72ec579a-5ced-4fa4-82f3-afba5d98df2f
This commit is contained in:
@@ -91,7 +91,8 @@ function UserAgent($agent)
|
||||
$system = (strpos($agent_tst, 'kateos')) ? 'linux_kateos' : $system;
|
||||
$system = (strpos($agent_tst, 'bsd')) ? 'linux_freebsd' : $system;
|
||||
}
|
||||
if ( $system == '')
|
||||
|
||||
if ( $system == '')
|
||||
{
|
||||
$system = (strpos($agent_tst, 'mac')) ? 'macos' : $system;
|
||||
$system = (strpos($agent_tst, 'aix')) ? 'aix' : $system;
|
||||
@@ -157,16 +158,14 @@ function GenerateTime($request_time)
|
||||
|
||||
return $date;
|
||||
}
|
||||
|
||||
function AddPages()
|
||||
|
||||
function ListPages($page, $count = 50)//for edit profile, not used in limit!
|
||||
{
|
||||
global $count;
|
||||
global $page;
|
||||
$content = '';
|
||||
for ($i=1;$i<=$count;$i++)
|
||||
{
|
||||
if ($i==$page)
|
||||
{
|
||||
{
|
||||
$content .= '<option value="'.$i.'" selected="selected">'.$i.'</option>';
|
||||
}
|
||||
else
|
||||
@@ -174,66 +173,20 @@ function AddPages()
|
||||
$content .= '<option value="'.$i.'">'.$i.'</option>';
|
||||
}
|
||||
}
|
||||
return $content;
|
||||
unset($content);
|
||||
}
|
||||
|
||||
function AddPages2($page)//for edit profile, not used in limit!
|
||||
{
|
||||
$content = '';
|
||||
for ($i=1;$i<=50;$i++)
|
||||
{
|
||||
if ($i==$page)
|
||||
{
|
||||
$content .= '<option value="'.$i.'" selected="selected">'.$i.'</option>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$content .= '<option value="'.$i.'">'.$i.'</option>';
|
||||
}
|
||||
}
|
||||
|
||||
return $content;
|
||||
unset($content);
|
||||
}
|
||||
|
||||
function AddSkins()
|
||||
|
||||
function ListDir($dir, $selection)
|
||||
{
|
||||
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 .= '<option value="'.$t['s_id'].'" selected="selected">'.$t['name'].'</option>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$all .= '<option value="'.$t['s_id'].'">'.$t['name'].'</option>';
|
||||
}
|
||||
}
|
||||
|
||||
return $all;
|
||||
unset($t, $all);
|
||||
}
|
||||
|
||||
function AddLangs()
|
||||
{
|
||||
global $forum_config;
|
||||
global $default_lang;
|
||||
$result='';
|
||||
$rep=opendir('./lngs');
|
||||
$browseruMoinsUnRepertoire = false;
|
||||
$rep=opendir('./'.$dir);
|
||||
while ($file = readdir($rep))
|
||||
{
|
||||
if($file != '..' && $file !='.' && $file !='')
|
||||
{
|
||||
if($file != '..' && $file !='.' && $file !='' && $file[0] != '.')
|
||||
{
|
||||
if (is_dir('./lngs/'.$file)){
|
||||
$browseruMoinsUnRepertoire = true;
|
||||
if ($file==$default_lang)
|
||||
if (is_dir('./'.$dir.'/'.$file)){
|
||||
if ($file==$selection)
|
||||
{
|
||||
$result .='<option value="'.$file.'" selected="selected">'.$file.'</option>';
|
||||
}
|
||||
@@ -245,7 +198,7 @@ function AddLangs()
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
unset($rep, $browseruMoinsUnRepertoire, $file, $result);
|
||||
unset($rep, $file, $result);
|
||||
}
|
||||
|
||||
function TimeGeneration()
|
||||
@@ -338,10 +291,8 @@ function ViewSkinName()
|
||||
{
|
||||
$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'];
|
||||
return $result;
|
||||
}
|
||||
|
||||
function GenerateLastPost($id, $type)
|
||||
|
||||
Reference in New Issue
Block a user