Joanjoc tools: Index - Suggest articles from interwikis - Articles without interwikis

Viewing: header.inc.php Filesize: 1.81Kb
<?php

//Language selector
$par['uselang']  = param_val('uselang''gpcd''');
if (
$par['uselang'] == '') {
    
//If browser prefered first language is one of the translations, autoselect it
    
$translations = array('ca','en');
    
$http_accept_lang substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'],','));
    if (
in_array($http_accept_lang$translations)) {
        
$par['uselang'] = $http_accept_lang;
    } else {
        
//Else default language = english
        
$par['uselang'] = 'en';
    }
}
require_once (
'./translations/'.$par['uselang'].'.inc.php');
    
//Starts page rendering
echo '<'.'?xml version="1.0" encoding="UTF-8" ?'.'>';
?>
<html>
<head>
    <title>Toolserver :: Joanjoc tools</title>
</head>
<body>
<form method="get">
<table width="98%"><tr><td><a href="http://ca.wikipedia.org/wiki/Usuari:Joanjoc">Joanjoc</a> tools: 
    <a href="index.php?uselang=<?=$par['uselang']?>"><?=$String['Index']?></a> 
     - 
    <a href="sugart.php?uselang=<?=$par['uselang']?>"><?=$String['Suggest articles from interwikis']?></a>
    - 
    <a href="artniw.php?uselang=<?=$par['uselang']?>"><?=$String['Articles without interwikis']?></a></td>
    <td align="right"><select name="uselang">
        <?=Option_item('Català','ca',$par['uselang'])?>
        <?=Option_item('English','en',$par['uselang'])?>
    </select>
    <input name="set-userlang" type="submit" value="<?=$String['Select language']?>" ></td></tr>
</table>
</form>    
<hr/>

<?php
//Display source code if necessary
$par['action']  = (param_val('action''gpcd'''));                                                                                               
$par['file']  = (param_val('file''gpcd'''));
if(
$par['action'] == 'source')
{
  if (
$par['file'] == '') {
      
Show_source_code($_SERVER['SCRIPT_FILENAME']);
  } else {
      
Show_source_code($par['file']);
  }
  require_once (
'footer.inc.php');
  die();
}
?>

Source code for : header.inc.php · functions.inc.php · footer.inc.php · ca.inc.php · en.inc.php