Location: PHPKode > projects > DynPG > frontend.em_js.inc.php
<?php

// import
    $cp = empty($_GET['cp'])? '': $_GET['cp'];
    $charset = empty($_GET['charset'])? 'iso-8859-1': strtolower($_GET['charset']);


// fetch language strings
    @session_start();
    if (empty($_SESSION["LANGUAGE"]))
        $_SESSION["LANGUAGE"] = 'de';

    require_once dirname(__FILE__) . "/plugins/plugins.php";
	require_once dirname(__FILE__) . "/plugins/languages.php";
    require_once dirname(__FILE__) . '/localised/' . strtolower($_SESSION["LANGUAGE"]) . '.lang.php';


// calculate revision
    $year = date('Y');


// js output
    print "/**\r\n" .
          "* DynPG Frontend Edit Mode JavaScript File\r\n" .
          "*\r\n" .
          "* Description:\r\n" .
          "* This file contains the necessary JavaScript routines and classes that\r\n" .
          "* realize the DynPG frontend edit mode. It is realized via a jQuery\r\n" .
          "* and SAJAX handshake.\r\n" .
          "*\r\n" .
          "* (c) {$year} Daniel Schliebner\r\n" .
          "* Revision: 1.0\r\n" .
          "*\r\n" .
          "*/\r\n\r\n";

    // language array
    $dpg_lang = new TLanguage($_SESSION["LANGUAGE"], 'General');
    $larr = Array(
        "\t" . '"LANG_EM_LANGUAGE": "' . strtolower($_SESSION["LANGUAGE"]) . '"'
    );
    foreach ($dpg_lang->str as $lang_str => $value) {
        if (preg_match('/^lang_em_/', $lang_str))
            $larr []= "\t" . '"' . strtoupper($lang_str) . '": "' . str_replace('"', '\"', $charset == 'utf-8'? utf8_encode($value): $value) . '"';
    }
    print "/* The global array containing all language strings. */\r\n";
    print "var dpgem_languageDef = { \r\n" . implode(", \r\n", $larr) . "\r\n }; \r\n\r\n";

    // current url
    print "/* The global string containing the url to the current page. */\r\n";
    print "var dpgem_currentPageURL = '{$cp}'; \r\n\r\n";

    // js repository
    include dirname(__FILE__) . '/js/edit_mode.js';


// EOF
Return current item: DynPG