Exemple #1
0
function DisplayFlag($ShortLang, $png, $title)
{
    $langurl = $_SERVER['PHP_SELF'] . "?";
    if ($_SERVER['QUERY_STRING'] != "") {
        $QS = explode('&', $_SERVER['QUERY_STRING']);
        for ($ii = 0; $ii < count($QS); $ii++) {
            if (strpos($QS[$ii], "lang=") === false) {
                $langurl = $langurl . $QS[$ii] . "&";
            }
        }
    }
    if ($_SESSION['lang'] == $ShortLang) {
        echo "      <span><a href=\"", $langurl, "lang=", $ShortLang, "\"><img src=\"" . bwlink("images/flags/" . $png) . "\" alt=\"", $title, "\" title=\"", $title, "\"/></a></span>\n";
    } else {
        echo "      <a href=\"", $langurl, "lang=", $ShortLang, "\"><img src=\"" . bwlink("images/flags/" . $png) . "\" alt=\"", $title, "\" title=\"", $title, "\"/></a>\n";
    }
}
Exemple #2
0
function DisplayAdminComments($TData, $lastaction = "", $page = 0, $itemsperpage = 0, $count = 0, $urlpiece = "")
{
    global $countmatch;
    global $title;
    $title = "Admin Comments";
    global $AdminCommentsScope;
    require_once "header.php";
    Menu1("", ww('MainPage'));
    // Displays the top menu
    Menu2("admincomments.php", ww('MainPage'));
    // Displays the second menu
    $MenuAction = "";
    $MenuAction .= "            <li><a href=\"" . bwlink("admin/admincomments.php") . "\">Negative comments</a></li>\n";
    if (HasRight("Comments", "AdminAbuser")) {
        $MenuAction .= "            <li><a href=\"" . bwlink("admin/admincomments.php?action=AdminAbuser") . "\">Abusive comments</a></li>\n";
    }
    $MenuAction .= "            <li><a href=\"" . bwlink("admin/admincomments.php?action=All") . "\">All comments</a></li>\n";
    DisplayHeaderShortUserContent($title . ": " . $lastaction);
    ShowLeftColumn($MenuAction, VolMenu());
    echo "    <div id=\"col3\"> \n";
    echo "      <div id=\"col3_content\" class=\"clearfix\"> \n";
    echo "        <div class=\"info clearfix\">\n";
    echo "          <h2>Your scope:", $AdminCommentsScope, "</h2>\n";
    if ($itemsperpage != 0) {
        $params = new StdClass();
        $params->strategy = new HalfPagePager('right');
        if (empty($urlpiece)) {
            $params->page_url = 'admincomments.php?action=All';
        } else {
            $params->page_url = 'admincomments.php?action=' . $urlpiece;
        }
        $params->page_url_marker = 'page';
        $params->page_method = 'get';
        $params->items = $count;
        $params->active_page = $page;
        $params->items_per_page = $itemsperpage;
        $pager = new PagerWidget($params);
        $pager->render();
    }
    if (!empty($TData)) {
        ShowList($TData, $page * $itemsperpage, $count);
    }
    if (isset($pager)) {
        $pager->render();
    }
    require_once "footer.php";
}
Exemple #3
0
if (array_key_exists('switchtrans', $_SESSION) and $_SESSION['switchtrans'] == 'on') {
    //  echo "<a href=\"",$langurl,"switchtrans=off\"><img border=0 height=10 src=\"images/showtransarray.gif\" alt=\"remove translation mode\" width=16></a>&nbsp;";
    $pagetotranslate = $_SERVER['PHP_SELF'];
    if ($pagetotranslate[0] == "/") {
        $pagetotranslate[0] = "_";
    }
    echo "      <a href=\"" . bwlink("admin/adminwords.php?showtransarray=1&amp;pagetotranslate=" . $pagetotranslate) . "\" target=\"_blank\"><img height=\"11px\" width=\"16px\" src=\"" . bwlink("images/switchtrans.gif") . "\" alt=\"go to current translation list for " . $_SERVER['PHP_SELF'] . "\" title=\"go to current translation list for " . $_SERVER['PHP_SELF'] . "\" /></a>\n";
}
echo "      </div>\n";
echo "      <p>&nbsp;</p>\n";
echo "\t<p class=\"center\">";
echo "\t\t<a href=\"../about\">" . ww("AboutUsPage") . "</a>|";
echo "    <a href=\"../terms\">" . ww('TermsOfUse') . "</a>|";
echo "    <a href=\"../privacy\">" . ww('Privacy') . "</a>|";
echo "\t\t<a href=\"../impressum\">" . ww("Impressum") . "</a>|";
echo "\t\t<a href=\"" . bwlink("faq.php") . "\">" . "faq" . "</a>|";
echo "\t\t<a href=\"" . bwlink("feedback.php") . "\">" . ww("Contact") . "</a>";
echo "\t</p>";
echo "      <p class=\"center\">&copy;2007-2008 <strong>BeWelcome</strong> - " . ww("TheHospitalityNetwork") . "</p>\n";
echo "    </div>   <!-- footer --> \n";
echo "  </div>   <!-- page --> \n";
echo "</div>   <!-- page_margins --> \n";
echo "</body>\n";
echo "</html>\n";
// This will log the delay if a $started_time=time() was issued in config.inc.php and if the delay exceed one second
// in config.inc.php it must also be declared as global
global $started_time;
if (isset($started_time) and $started_time > 0) {
    $started_time = $started_time - time();
    LogStr("Delay for the page according to footer " . $started_time . " second [" . $_SERVER['PHP_SELF'] . "]", "DebugDelay");
}
Exemple #4
0
function DisplayHeaderMainPage($TitleTopContent = "", $MessageBeforeColumnLow = "", $ActionList = "")
{
    global $DisplayHeaderMainPageIsSet;
    echo "    <div id=\"main\">\n";
    echo "      <div id=\"teaser_bg\">\n";
    echo "      <div id=\"teaser\" class=\"clearfix teaser_main\">\n";
    if (IsLoggedIn()) {
        echo "        <h2>", ww("HelloUsername", LinkWithUsername($_SESSION["Username"])), "</h2>\n";
    } else {
        echo "        <h2>", ww("YourAreNotLogged"), "</h2>\n";
    }
    echo "        <div id=\"teaser_l\">\n";
    echo "\t\t\t\t<img src=\"" . MyPict() . "\" id=\"MainUserpic\" alt=\"ProfilePicture\"/>\n";
    echo "        </div>\n";
    echo "        <div id=\"teaser_r\">\n";
    echo "\t\t\t<div class=\"subcolumns\">\n";
    echo "\t\t\t\t<div class=\"c38l\">\n";
    echo "    \t\t\t\t<div class=\"subcl\">\n";
    echo "          \t<p><img src=\"images/icons1616/icon_contactmember.png\" alt=\"Messages\"/>", ww("MainPageNewMessages"), "</p>\n";
    echo "          \t<p><img src=\"images/icons1616/icon_addcomments.png\" alt=\"Comments\"/>", ww("MainPageNewComments"), "</p>\n";
    echo "          \t<p><img src=\"images/icons1616/icon_myvisitors.png\" alt=\"Visitors\"/>", ww("MainPageNewVisitors"), "</p>\n";
    echo "        \t\t\t</div>\n";
    echo "      \t\t</div>\n";
    echo "\t\t\t\t<div class=\"c62r\">\n";
    echo "\t\t\t\t\t<div class=\"subcr\">\n";
    echo "\t\t\t\t\t\t<div id=\"mapsearch\">\n";
    echo "\t\t\t\t\t\t<form>\n";
    echo "\t\t\t\t\t          <fieldset> \n";
    // echo "                    <label for=\"searchtext\">Search the map</label><br />\n";
    echo "\t\t\t\t\t          <input type=\"text\" id=\"searchtext\" name=\"searchtext\" size=\"20\" maxlength=\"30\" id=\"text-field\" value=\"Search the map!\" onfocus=\"this.value='';\"/>\n";
    echo "\t\t\t\t\t          <input type=\"hidden\" name=\"action\" value=\"mapsearch\" />\n";
    echo "\t\t\t\t\t          <input type=\"image\" src=\"" . bwlink("images/icon_go.png") . "\" id=\"submit-button\" /><br />\n";
    echo "\t\t\t\t\t        </fieldset>\n";
    echo "\t\t\t\t\t\t</form>\n";
    echo "\t\t\t\t\t\t</div>\n";
    echo "\t\t\t\t\t</div>\n";
    echo "\t\t\t\t</div>\n";
    echo "\t\t\t</div>\n";
    echo "        </div>\n";
    echo "      </div>\n";
    // no tabs >>
    echo "\t        <div id=\"middle_nav\" class=\"clearfix\">\n";
    echo "\t\t        <div id=\"nav_sub\" class=\"notabs\">\n";
    echo "\t\t\t        <ul>\n";
    echo "\t\t\t        </ul>\n";
    echo "\t\t        </div>\n";
    echo "\t        </div>\n";
    echo "      </div>\n";
    //end teaser_bg
    ShowLeftColumn($ActionList, VolMenu());
    // Show the Actions
    // middle column
    echo "\n";
    echo "      <div id=\"col3\"> \n";
    echo "        <div id=\"col3_content\" class=\"clearfix\"> \n";
    $DisplayHeaderMainPageIsSet = true;
    // set this for footer function which will be in charge of calling the closing /div
}
Exemple #5
0
$_SESSION['IdLanguage'] = 0;
// force English for menu
Menu1("", "DB_MAINTENANCE");
// Displays the top menu
Menu2("main.php", "DB_MAINTENANCE");
// Displays the second menu
if (!HasRight("Admin")) {
    echo "<p> this need Admin rights</p>";
    require_once "layout/footer.php";
    die(1);
}
$MenuAction = "            <li><a href=\"" . bwlink("admin/dbmaintenance.php") . "\">db maintenance</a></li>\n";
$MenuAction .= "            <li><a href=\"" . bwlink("admin/dbmaintenance.php?action=updateid") . "\">update new ids</a></li>\n";
$MenuAction .= "            <li><a href=\"" . bwlink("admin/dbmaintenance.php?action=filltrads") . "\">fill the forum_trads</a></li>\n";
$MenuAction .= "            <li><a href=\"" . bwlink("admin/dbmaintenance.php?action=filltag_threads") . "\">recreate tags_threads</a></li>\n";
$MenuAction .= "            <li><a href=\"" . bwlink("admin/dbmaintenance.php?action=updatetagcounters") . "\">update tags counters</a></li>\n";
DisplayHeaderShortUserContent("Db Maintenance", $MenuAction, "");
// Display the header
ShowLeftColumn($MenuAction, "");
$action = GetStrParam("action", "");
switch ($action) {
    case "updateid":
        sql_query("update forums_tags set id=tagid");
        // dealing with redundant values
        sql_query("update forums_threads set id=threadid");
        // dealing with redundant values
        sql_query("update forums_posts set id=postid");
        // dealing with redundant values
        echo "<br />Id updated</p>";
        break;
    case "updatetagcounters":
Exemple #6
0
function LinkEditWord($code, $_IdLanguage = -1)
{
    $IdLanguage = $_IdLanguage;
    if ($IdLanguage == -1) {
        $IdLanguage = $_SESSION["IdLanguage"];
    }
    $str = "<a href=\"" . bwlink("admin/adminwords.php?IdLanguage=" . $IdLanguage . "&code={$code}") . "\">edit</a>";
    return $str;
}