function create_plugin_instance() {
      global $oLang, $aLang;

      if (!isset($_SESSION['language']) || isset($_GET['language'])) {

        MyOOS_CoreApi::requireOnce('classes/class_language.php');

        $oLang = new language();

        if (isset($_GET['language']) && !empty($_GET['language'])) {
          $oLang->set($_GET['language']);
        } else {
          $oLang->get_browser_language();
        }
      }

      return true;

    }
 function create_plugin_instance()
 {
     global $oLang, $aLang;
     $dbconn =& oosDBGetConn();
     $oostable =& oosDBGetTables();
     $aPages = oos_get_pages();
     if (!isset($_SESSION['language']) || isset($_GET['language'])) {
         MyOOS_CoreApi::requireOnce('classes/class_language.php');
         $oLang = new language();
         if (isset($_GET['language']) && oos_is_not_null($_GET['language'])) {
             $oLang->set($_GET['language']);
         } else {
             $oLang->get_browser_language();
         }
     }
     $sLanguage = oos_var_prep_for_os($_SESSION['language']);
     include 'includes/languages/' . $sLanguage . '.php';
     return true;
 }
Ejemplo n.º 3
0
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<script type="text/javascript" src="scripts.js"></script>
<?php 
include './function.php';
$lang = new language();
$lang->set('de-de');
$text = new text();
?>
<button onclick="anzeige('form.php?fmet=3')"><?php 
echo $text->view_nq("menu3");
?>
</button>
<button onclick="anzeige('form.php?fmet=1')"><?php 
echo $text->view_nq("menu1");
?>
</button>
<button onclick="anzeige('form.php?fmet=2')"><?php 
echo $text->view_nq("menu2");
?>
</button>
<button onclick="anzeige('form.php?fmet=5')"><?php 
echo $text->view_nq("menu4");
?>
</button>
<button onclick="anzeige('form.php?fmet=6')"><?php 
echo $text->view_nq("menu8");
?>
Ejemplo n.º 4
0
while ($configuration = $configuration_result->fields) {
    define($configuration['cfg_key'], $configuration['cfg_value']);
    // Move that ADOdb pointer!
    $configuration_result->MoveNext();
}
// initialize the logger class
require '../includes/classes/class_logger.php';
// some code to solve compatibility issues
require 'includes/functions/function_compatibility.php';
// language
if (!isset($_SESSION['language']) || isset($_GET['language'])) {
    // require the language class
    require '../includes/classes/class_language.php';
    $oLang = new language();
    if (isset($_GET['language']) && oos_is_not_null($_GET['language'])) {
        $oLang->set($_GET['language']);
    } else {
        $oLang->get_browser_language();
    }
}
// require the language translations
require 'includes/languages/' . $_SESSION['language'] . '.php';
$current_page = split('\\?', basename($_SERVER['PHP_SELF']));
$current_page = $current_page[0];
// for BadBlue(Win32) webserver compatibility
if (file_exists('includes/languages/' . $_SESSION['language'] . '/' . $current_page)) {
    require 'includes/languages/' . $_SESSION['language'] . '/' . $current_page;
}
// define our general functions used application-wide
require 'includes/functions/function_output.php';
require '../includes/functions/function_password.php';
Ejemplo n.º 5
0
 function view($tid)
 {
     #Für Quote eine Instanz erzeugen
     $quote = new db();
     #Überprufe ob eine Sprache gesetzt ist wenn nicht standart setzten
     global $standart_lang;
     if (!isset($_COOKIE['lang'])) {
         $lang = new language();
         $lang->set($standart_lang);
     }
     $lang = $_COOKIE['lang'];
     $xml = simplexml_load_file("./lang/{$lang}.xml");
     #Texte werden aus einer XML gelesen. XML ANSI Codiert
     $inhalt_xml = $xml->{$tid};
     $inhalt_xml_q = $quote->quote($inhalt_xml);
     return $inhalt_xml_q;
 }