@ -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,83 +158,35 @@ 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
{
$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>' ;
$content .= '<option value="' . $i . '" selected="selected">' . $i . '</option>' ;
}
else
{
$content .= '<option value="' . $i . '">' . $i . '</option>' ;
}
}
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 .= '<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 ()
function ListDir ( $dir , $selection )
{
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 )