Beispiel #1
0
<?php

if (defined('HAVEACCESS')) {
    if ($outputhtml) {
        headerAdd($charset, $langu, $title, $headerdirection, $script, $style, "html");
    } else {
        headerAdd($charset, $langu, $title, $headerdirection, $script, $style);
    }
    // set as XHTML
    require '../../smarty.php';
    // already defined access with browse9.php
    $smarty->assign($strings);
    $smarty->assign('textdir', $textdir);
    if ($_GET['trnsps'] == 1) {
        $smarty->assign('trnsps', 1);
    } else {
        $smarty->assign('trnsps', 0);
    }
    // end else
    $smarty->assign('bc_nv_print', $bc_nv_print);
    $smarty->assign('navbar_noscript', $navbar_noscript);
    mysql_select_db($hardcodeddb, mysql_connect($host, $dbuser, $passw));
    ////////////// Print table and borders according to user selection //////////////
    if ($outputmode == "" || $outputmode == NULL || $outputmode == "normal") {
        $smarty->assign('table_output_flag', 1);
        if (!$nocaption) {
            $smarty->assign('caption_flag', 1);
            $smarty->assign('caption', $captiontitle);
        }
        // end if (if there is to be no caption)
    }
            $dontlocalizeagain = 1;
            // Just spare the running of an extra function (since it was already (by necessity) run within this else)--see the "if" just below
        }
        // end else (if there is no heading or alias set for the specific table--having this option allows titles to appear with the table name (in some form at least), even if a localization was not set (or if it was not set because the name is intended to be the heading))
        if (!$dontlocalizeagain) {
            localize(1);
            // Go back to the localization for the user's choice of language
        }
        // end if (if need to localize again)
    }
    // end else (if there is no heading or alias in the given language)
    // This will be overwritten in browse9.php if there is a file defined
    $title = $strings["browserfile"] . ": " . $heading;
    // Call header function to add XHTML headers
    // If no file is set, refer the user back to the main page.
    if (!$file) {
        headerAdd($charset, $defaultlanguage, $title, $headerdirection, "", $style);
        delaytime(0, $browserfile);
    }
    // end if (if there is no file defined, redirect the user back to the main page)
    // Get table metadata such as:
    ////// 1) The number of levels (e.g., the Bible with book, chapter, verse has 3) and their fields
    ////// 2) The number of options (e.g., the Qur'an can be browsed by Rodwell or traditional numbering--Fix: (later?) Any other reasonable options should also be added (e.g., to Collins esp.). Once searching has been added, this might be merged with that.)
    ////// 3) The fields to comprise the above-mentioned browsing options
    ////// 4) A default field and default value if the user does not specify a range.
    ////// 5) The original language (by code) of the table (would be used if implement a multilingual feature to allow users to view the table names in their original language, if they (the main text--not necessarily notes, etc.) were written in that language.
    ////// 6) The original language (by code) in which the table name and fields were written.
    ///////////////////
    get_table($file);
}
// end if defined HAVEACCESS
Beispiel #3
0
    }
    // end if (if GET value is not blank)
    // Get languages, direction and codes
    get_language($ck_language);
    get_language($defaultlanguage, 1);
    // Add a "1" to indicate the language to be set is the default
    // Set up the localization array to be used in this script from the localization database.
    localize(1);
    // "1" is for a complex localization (including tables, etc.) of a non-default language
    require_once "navigbcs.php";
    // Navigator and Breadcrumbs
    require 'headeradd.php';
    // Call header function to add XHTML headers
    $title = $strings["browserfile"];
    $textdirection = $textdir["browserfile"];
    headerAdd($charset, $lang_code, $title, $textdirection, $script);
    print <<<HERE
<noscript>
\t<p class="noscript" dir="{$textdir["noscriptonchange"]}">{$strings["noscriptonchange"]}</p></noscript>
HERE;
    print $bc_nv_print;
    ///////////////// Print option to remove cookies and start over with new choice of language interface
    print <<<HERE

<p class="removecookies" dir="{$textdir["removecookies"]}"><small><a title="{$strings["resetinterfacelang"]}" accesskey="0" href="{$browserfile}?removecookies=yes">{$strings["removecookies"]}</a></small></p>
<h2 class="fileheading">{$title}</h2>
<p><br /></p>
HERE;
    /////////////////// Get list of databases (must have user access to each one desired)... /////////////////
    $db_list = mysql_list_dbs($connect);
    $m = 0;