Exemple #1
0
function _vereinteammatchlist($vid, $show = 'home')
{
    global $dbi;
    // step 1 collect the teams for this verein
    // step 2 for each team we collect the schedule and create click-rows to the matchsheet
    echo '<h3>Alle Vereins Teams und ihre Heim Spiele</h3>';
    $RS = DB_listTeams($dbi, 0, 0, "", 1, "", $vid);
    foreach ($RS as $row) {
        if ($show == 'home') {
            $MATCHLIST = DB_listMatches($dbi, 1, 0, $row[4], "", "", 1);
        } elseif ($show = 'away') {
            $MATCHLIST = DB_listMatches($dbi, 1, 0, $row[4], "", "", 0);
        } elseif ($show = 'all') {
            // this doesn't work ...
            $MATCHLIST = DB_listMatches($dbi, 1, 0, $row[4], "", "", "", "", "logic");
        }
        $aTH = array("Runde", "Datum", "Spielort", "Status", "", "Sets", "Legs", "Team", "Teamname");
        echo "<div class=\"sectionhead\">Team {$row['5']} in {$row['2']} (" . sizeof($MATCHLIST) . " Matches)</div><br/>";
        echo '<div class="child">';
        OpenTable();
        echo ArrayToTableHead($aTH);
        echo RecordsetToClickTable($MATCHLIST, 4, "ls_system.php?func=showmatch&vmkey=%P1%&eventid=%P2%", 3, 0);
        CloseTable();
        echo '</div><br/>';
    }
}
Exemple #2
0
function startjournal($sitename, $user)
{
    global $module_name;
    $user = filter($user, "nohtml");
    $sitename = filter($sitename, "nohtml");
    if (is_user($user)) {
        $j_user1 = "<center>[ <a href=\"modules.php?name={$module_name}\">" . _JOURNALDIR . "</a> | <a href=\"modules.php?name={$module_name}&file=edit\">" . _YOURJOURNAL . "</a> ]</center>";
        $j_user2 = "";
    } else {
        $j_user1 = "<center>[ <a href=\"modules.php?name={$module_name}\">" . _JOURNALDIR . "</a> | <a href=\"modules.php?name=Your_Account&op=new_user\">" . _CREATEACCOUNT . "</a> ]</center>";
        $j_user2 = "<br><center><font class=\"tiny\">" . _MEMBERSCAN . "</font></center>";
    }
    title("{$sitename}: " . _USERSJOURNAL . "");
    if (is_user($user)) {
        include "modules/Your_Account/navbar.php";
        OpenTable();
        nav();
        CloseTable();
        echo "<br>";
    }
    OpenTable();
    echo "<center><img src=modules/{$module_name}/images/bgimage.gif><br><font class=title><b>" . _USERSJOURNAL . "</b></font></center>";
    echo "{$j_user1}";
    echo "{$j_user2}";
    CloseTable();
}
Exemple #3
0
function fc_wrap($id)
{
    global $xoopsDB, $xoopsConfig, $xoopsTheme, $xoopsOption;
    OpenTable();
    //query Database (returns an array)
    $fc_item = fc_query_db_on_id($id);
    //$id exists?
    if (isset($fc_item['adress']) && $fc_item['adress'] != "") {
        // include content
        $fc_include = XOOPS_ROOT_PATH . "/modules/cjaycontent/content/" . $fc_item['adress'];
        if (file_exists($fc_include)) {
            include $fc_include;
            // increment hitcounter (hits)
            $res = $xoopsDB->queryF("UPDATE " . $xoopsDB->prefix() . "_cjaycontent SET hits=hits+1 WHERE id=\"" . $id . "\"");
        } else {
            echo _CC_FILENOTFOUND . $fc_include;
        }
    } else {
        $fc_include = XOOPS_ROOT_PATH . "/modules/cjaycontent/content/DO_NOT_DELETE.php";
        if (file_exists($fc_include)) {
            include $fc_include;
            // increment hitcounter (hits)
            $res = $xoopsDB->queryF("UPDATE " . $xoopsDB->prefix() . "_cjaycontent SET hits=hits+1 WHERE id=\"" . $id . "\"");
        } else {
            echo _CC_FILENOTFOUND . $fc_include;
        }
    }
    CloseTable();
    return 1;
}
Exemple #4
0
 function hreferer()
 {
     global $bgcolor2, $prefix, $db, $admin_file;
     include "header.php";
     GraphicAdmin();
     OpenTable();
     echo "<center><font class=\"title\"><b>" . _HTTPREFERERS . "</b></font></center>";
     CloseTable();
     echo "<br>";
     OpenTable();
     echo "<center><b>" . _WHOLINKS . "</b></center><br><br>" . "<table border=\"0\" width=\"100%\">";
     $row = $db->sql_fetchrow($db->sql_query("SELECT httprefmode from " . $prefix . "_config"));
     $httprefmode = intval($row['httprefmode']);
     $result = $db->sql_query("SELECT rid, url from " . $prefix . "_referer");
     while ($row = $db->sql_fetchrow($result)) {
         $rid = intval($row['rid']);
         $url = filter($row['url'], "nohtml");
         $url2 = urlencode($url);
         $title = $url;
         if ($httprefmode == 1) {
             $url = explode("/", $url);
             $url = "http://{$url['2']}";
         }
         echo "<tr><td bgcolor=\"{$bgcolor2}\"><font class=\"content\">{$rid}</td>" . "<td bgcolor=\"{$bgcolor2}\"><font class=\"content\"><a href=\"index.php?url={$url2}\" target=\"_new\" title=\"{$title}\">{$url}</a></td></tr>";
     }
     echo "</table>" . "<form action=\"" . $admin_file . ".php\" method=\"post\">" . "<input type=\"hidden\" name=\"op\" value=\"delreferer\">" . "<center><input type=\"submit\" value=\"" . _DELETEREFERERS . "\"></center>";
     CloseTable();
     include "footer.php";
 }
Exemple #5
0
function SERVICE_CMSOPEN_postnuke($authenticate_only)
{
    global $phpnuke, $default_access, $web_root, $root_dir, $cms_user_access, $cms_type, $include_path;
    if (!defined("LOADED_AS_MODULE") and $phpnuke == "false") {
        die("You can't access this file directly...<br><br>Generally this means that Jinzora was " . "installed as a PostNuke module and you're trying to access it outside of PostNuke");
    }
    if (function_exists('pnSecAuthAction')) {
        if (!pnSecAuthAction(0, 'Jinzora::', "::", ACCESS_READ)) {
            include 'header.php';
            die('Access Denied');
            include 'footer.php';
        }
    }
    // Now let's get the users name IF we need it
    if (pnUserGetVar('uname') != "") {
        $username = pnUserGetVar('uname');
    } else {
        $username = "******";
    }
    // Ok, now let's authenticate this user
    userAuthenticate($username);
    // Now let's see if we only wanted the user access
    if ($authenticate_only == true) {
        return;
    }
    include_once "header.php";
    // Now let's open the table
    OpenTable();
}
function page_header($text, $form_action = false, $form_name = "install")
{
    global $phpbb_root_path, $phpEx;
    OpenTable();
    $form_action = $form_action ? $form_action : $phpbb_root_path . 'admin/install.' . $phpEx;
    echo "<table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"10\" align=\"center\">\n";
    echo "  <tr>\n";
    echo "    <td width=\"100%\">\n";
    echo "      <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
    echo "        <tr>\n";
    echo "          <td>\n";
    echo "            <table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n";
    echo "              <tr>\n";
    echo "                <td>\n";
    echo "                </td>\n";
    echo "                <td align=\"center\" width=\"100%\" valign=\"middle\">\n";
    echo "                  <font style=\"font-size:150%\"><b>" . $text . "</b></font>\n";
    echo "                </td>\n";
    echo "              </tr>\n";
    echo "            </table>\n";
    echo "          </td>\n";
    echo "        </tr>\n";
    echo "        <tr>\n";
    echo "          <td>\n";
    echo "            <br /><br />\n";
    echo "          </td>\n";
    echo "        </tr>\n";
    echo "        <tr>\n";
    echo "          <td align=\"center\">\n";
    echo "            <table width=\"80%\" cellpadding=\"2\" cellspacing=\"1\" border=\"0\">\n";
    echo "              <form action=\"" . $form_action . "\" name=\"" . $form_name . "\" method=\"post\">\n";
    return;
}
Exemple #7
0
function viewdownloadeditorial()
{
    global $downloadsprefix, $db;
    $lid = intval($_GET['lid']);
    include "header.php";
    downl_menu_tpl(1);
    $result = $db->sql_query("SELECT adminid, editorialtimestamp, editorialtext, editorialtitle FROM " . $downloadsprefix . "_editorials WHERE downloadid = {$lid}");
    $recordexist = $db->sql_numrows($result);
    $displaytitle = ereg_replace("_", " ", $ttitle);
    echo '<br />';
    OpenTable();
    echo "<center><font class=\"option\"><b>" . _DOWNLOADPROFILE . ": {$displaytitle}</b></font><br />";
    downl_infomenu_tpl($lid, $ttitle);
    if ($recordexist != 0) {
        while (list($adminid, $editorialtimestamp, $editorialtext, $editorialtitle) = $db->sql_fetchrow($result)) {
            ereg("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $editorialtimestamp, $editorialtime);
            $editorialtime = strftime("%F", mktime($editorialtime[4], $editorialtime[5], $editorialtime[6], $editorialtime[2], $editorialtime[3], $editorialtime[1]));
            $date_array = explode("-", $editorialtime);
            $timestamp = mktime(0, 0, 0, $date_array["1"], $date_array["2"], $date_array["0"]);
            $formatted_date = date("F j, Y", $timestamp);
            echo "<br /><br />";
            OpenTable2();
            echo "<center><font class=\"option\"><b>'{$editorialtitle}'</b></font></center>" . "<center><font class=\"tiny\">" . _EDITORIALBY . " {$adminid} - {$formatted_date}</font></center><br /><br />" . "{$editorialtext}";
            CloseTable2();
        }
    } else {
        echo "<br /><br /><center><font class=\"option\"><b>" . _NOEDITORIAL . "</b></font></center>";
    }
    echo "<br /><br /><center>";
    downloadfooter($lid);
    echo "</center>";
    CloseTable();
    include "footer.php";
}
function DoHead()
{
    include "header.php";
    OpenTable();
    ?>
	<center><b><strong>
		&middot; <a href="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
">Administration Home</a> &middot;<br>
		&middot; <a href="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
?op=Accounting">Accounting Admin</a> &middot;
<?php 
    include "modules/Accounting/updater.php";
    if (isUpdate()) {
        ?>
		<br>&middot;&middot;&middot; <a href="http://moahosting.com/modules.php?name=Downloads&d_op=viewdownload&cid=2">An update is available!</a> &middot;&middot;&middot;<br>
<?php 
    }
    ?>
	</strong></b></center>
<?php 
    CloseTable();
    echo "<br>";
    OpenTable();
    // Create the accounting menu
    DoMenu();
}
Exemple #9
0
function show($mode, $tablelist, $query)
{
    global $db, $bgcolor2, $bgcolor3, $type, $dbname;
    require_once 'header.php';
    GraphicAdmin('_AMENU0');
    OpenTable();
    if ($query === null) {
        echo 'Mode: <b>' . $mode . '</b> not available yet';
        return;
    }
    if (count($tablelist)) {
        $result = $db->sql_query($query);
        $numfields = $db->sql_numfields($result);
        echo '<span class="genmed"><strong>' . _DATABASE . ':</strong> ' . $dbname . '</span><br /><br />Here are the results of your ' . strtolower($type) . '<br /><br />
		<table border="0" cellpadding="2"><tr bgcolor="' . $bgcolor2 . '">';
        for ($j = 0; $j < $numfields; $j++) {
            echo '<td><strong>' . $db->sql_fieldname($j, $result) . '</strong></td>';
        }
        echo '</tr>';
        $bgcolor = $bgcolor3;
        while ($row = $db->sql_fetchrow($result)) {
            $bgcolor = $bgcolor == '' ? ' bgcolor="' . $bgcolor3 . '"' : '';
            echo '<tr' . $bgcolor . '>';
            for ($j = 0; $j < $numfields; $j++) {
                echo '<td>' . $row[$j] . '</td>';
            }
            echo '</tr>';
        }
        echo '</table>';
    }
    CloseTable();
}
Exemple #10
0
function showheader()
{
    global $pagetitle;
    require 'header.php';
    GraphicAdmin('_AMENU2');
    OpenTable();
    echo '<table border="0" width="100%"><tr><td valign="top">';
}
Exemple #11
0
function group_head()
{
    global $lang;
    require_once 'header.php';
    GraphicAdmin('_AMENU2');
    OpenTable();
    echo '<div style="text-align:center;"><h1>Groups Administration</h1></div>';
}
Exemple #12
0
function Choice()
{
    global $xoopsModule;
    xoops_cp_header();
    OpenTable();
    echo "<a href='" . XOOPS_URL . "/modules/system/admin.php?fct=preferences&op=showmod&mod=" . $xoopsModule->getVar('mid') . "'>" . _IMP_Edit . "</a><br />";
    CloseTable();
    xoops_cp_footer();
}
function SiteSent($fname)
{
    include 'header.php';
    $fname = stripslashes(FixQuotes(check_html(removecrlf($fname))));
    OpenTable();
    echo "<center><font class=\"content\">" . _FREFERENCE . " {$fname}...<br><br>" . _THANKSREC . "</font></center>";
    CloseTable();
    include 'footer.php';
}
Exemple #14
0
function StorySent($title, $fname)
{
    include "header.php";
    $title = filter($title, "nohtml");
    $fname = filter($fname, "nohtml");
    OpenTable();
    echo "<center><font class=\"content\">" . _FSTORY . " <b>{$title}</b> " . _HASSENT . " {$fname}... " . _THANKS . "</font></center>";
    CloseTable();
    include "footer.php";
}
function StorySent($title, $fname)
{
    include "header.php";
    $title = htmlspecialchars(urldecode(check_html($title, "nohtml")));
    $fname = htmlspecialchars(urldecode($fname));
    OpenTable();
    echo "<center><font class=\"content\">" . _FSTORY . " <b>{$title}</b> " . _HASSENT . " {$fname}... " . _THANKS . "</font></center>";
    CloseTable();
    include "footer.php";
}
function error_halt($msg)
{
    global $xoopsLogger;
    xoops_cp_header();
    include './mymenu.php';
    echo $xoopsLogger->dumpQueries();
    OpenTable();
    echo $msg;
    CloseTable();
    xoops_cp_footer();
}
Exemple #17
0
/**
 * Bayonet Content Management System
 * Copyright (C) 2008  Joseph Hunkeler
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
function ListModules()
{
    global $db;
    $result = $db->Query("SELECT dir_name, weight, status FROM bayonet_modules ORDER BY status DESC, weight ASC");
    $modules = $db->Fetch($result);
    OpenTable("50%");
    echo "<tr><th>Directory Name</th><th>Weight</th><th>Status</th></tr>";
    foreach ($modules as $module) {
        echo "<tr><td>" . $module['dir_name'] . "</td><td>" . $module['weight'] . "</td><td>" . $module['status'] . "</td></tr>";
    }
    CloseTable();
}
function dropcomment($username, $onwhat, $mtime, $ndate)
{
    global $module_name;
    echo "<br>";
    OpenTable();
    echo "<div align=center class=title>" . _LEAVECOMMENT . "</div><br><br>";
    echo "<form action='modules.php?name={$module_name}&file=commentsave' method='post'><input type='hidden' name='rid' value='{$onwhat}'>";
    echo "<div align=center>" . _COMMENTBOX . ":<br><textarea name=\"comment\" wrap=virtual cols=55 rows=10></textarea><br><br><input type='submit' name='submit' value='" . _POSTCOMMENT . "'></div>";
    echo "</form><br>";
    echo "<center>" . _COMMENTSNOTE . "</center>";
    CloseTable();
}
Exemple #19
0
function f2go()
{
    include "header.php";
    OpenTable();
    echo "Addon Sample File (f2.php) CALLED FROM Sand_Journey Theme<br>";
    echo "<ul>";
    echo "<li><a href=\"modules.php?name=Addon_Sample&amp;file=f2&amp;func=f2one\">Function f2one</a>";
    echo "<li><a href=\"modules.php?name=Addon_Sample&amp;file=index&amp;func=dos\">Go to index.php</a>";
    echo "</ul>";
    echo "As you can see now, this page doesn't show the Right Blocks, this is because at the begining " . "of this file we set \$index variable to \"0\"";
    CloseTable();
    include "footer.php";
}
Exemple #20
0
function SERVICE_CMSOPEN_cpgnuke($authenticate_only)
{
    global $this_site, $web_root, $path_to_zip, $root_dir, $media_dir, $audio_types, $video_types, $ext_graphic, $cms_user_access, $default_access, $CLASS, $include_path;
    $userinfo =& $CLASS['member']->members[is_user()];
    $username = $userinfo['username'];
    userAuthenticate($username);
    // Now let's see if we only wanted the user access
    if ($authenticate_only == true) {
        return;
    }
    include_once "header.php";
    OpenTable();
}
Exemple #21
0
function AddonSample()
{
    include "header.php";
    OpenTable();
    echo "Addon Sample File (index.php) CALLED FROM Sand_Journey Theme<br><br>";
    echo "<ul>";
    echo "<li><a href=\"modules.php?name=Addon_Sample&amp;file=index&amp;func=one\">Function One</a>";
    echo "<li><a href=\"modules.php?name=Addon_Sample&amp;file=index&amp;func=two\">Function Two</a>";
    echo "<li><a href=\"modules.php?name=Addon_Sample&amp;file=f2\">Call to file f2.php</a>";
    echo "</ul>";
    echo "You can now use Administration interface to activate or deactivate any module. As an Admin you can always " . "access to your Inactive modules for testing purpouses.";
    CloseTable();
    include "footer.php";
}
Exemple #22
0
function showheader()
{
    global $modheader;
    $modheader .= '
<link rel="stylesheet" href="themes/default/style/tabletree.css" type="text/css" media="screen"/>
<script type="text/javascript" src="includes/javascript/framework.js"></script>
<script type="text/javascript" src="includes/javascript/dragndrop.js"></script>
<script type="text/javascript" src="includes/javascript/tabletree.js"></script>
<script type="text/javascript" src="includes/javascript/tasktable.js"></script>
';
    require_once 'header.php';
    GraphicAdmin('_AMENU1');
    OpenTable();
    echo '<div style="text-align:center;">';
}
function ShowFaq($id_cat, $categories)
{
    global $bgcolor2, $sitename, $prefix, $db, $module_name;
    OpenTable();
    echo "<center><font class=\"content\"><b>{$sitename} " . _FAQ2 . "</b></font></center><br><br>" . "<a name=\"top\"></a><br>" . "" . _CATEGORY . ": <a href=\"modules.php?name={$module_name}\">" . _MAIN . "</a> -> {$categories}" . "<br><br>" . "<table width=\"100%\" cellpadding=\"4\" cellspacing=\"0\" border=\"0\">" . "<tr bgcolor=\"{$bgcolor2}\"><td colspan=\"2\"><font class=\"option\"><b>" . _QUESTION . "</b></font></td></tr><tr><td colspan=\"2\">";
    $id_cat = intval($id_cat);
    $result = $db->sql_query("SELECT id, id_cat, question, answer FROM " . $prefix . "_faqanswer WHERE id_cat='{$id_cat}'");
    while ($row = $db->sql_fetchrow($result)) {
        $id = intval($row['id']);
        $id_cat = intval($row['id_cat']);
        $question = stripslashes(check_html($row['question'], "nohtml"));
        $answer = stripslashes($row['answer']);
        echo "<strong><big>&middot;</big></strong>&nbsp;&nbsp;<a href=\"#{$id}\">{$question}</a><br>";
    }
    echo "</td></tr></table>\n    <br>";
}
function viewdownloadcomments($lid, $ttitle)
{
    global $prefix, $dbi, $admin, $bgcolor2, $module_name;
    include "header.php";
    include "modules/{$module_name}/d_config.php";
    menu(1);
    echo "<br>";
    $result = sql_query("SELECT ratinguser, rating, ratingcomments, ratingtimestamp FROM " . $prefix . "_downloads_votedata WHERE ratinglid = {$lid} AND ratingcomments != '' ORDER BY ratingtimestamp DESC", $dbi);
    $totalcomments = sql_num_rows($result, $dbi);
    $transfertitle = ereg_replace("_", " ", $ttitle);
    $transfertitle = stripslashes($transfertitle);
    $displaytitle = $transfertitle;
    OpenTable();
    echo "<center><font class=\"option\"><b>" . _DOWNLOADPROFILE . ": {$displaytitle}</b></font><br><br>";
    downloadinfomenu($lid, $ttitle);
    echo "<br><br><br>" . _TOTALOF . " {$totalcomments} " . _COMMENTS . "</font></center><br>" . "<table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" width=\"450\">";
    $x = 0;
    while (list($ratinguser, $rating, $ratingcomments, $ratingtimestamp) = sql_fetch_row($result, $dbi)) {
        $ratingcomments = stripslashes($ratingcomments);
        ereg("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $ratingtimestamp, $ratingtime);
        $ratingtime = strftime("%F", mktime($ratingtime[4], $ratingtime[5], $ratingtime[6], $ratingtime[2], $ratingtime[3], $ratingtime[1]));
        $date_array = explode("-", $ratingtime);
        $timestamp = mktime(0, 0, 0, $date_array["1"], $date_array["2"], $date_array["0"]);
        $formatted_date = date("F j, Y", $timestamp);
        /* Individual user information */
        $result2 = sql_query("SELECT rating FROM " . $prefix . "_downloads_votedata WHERE ratinguser = '******'", $dbi);
        $usertotalcomments = sql_num_rows($result2, $dbi);
        $useravgrating = 0;
        while (list($rating2) = sql_fetch_row($result2, $dbi)) {
            $useravgrating = $useravgrating + $rating2;
        }
        $useravgrating = $useravgrating / $usertotalcomments;
        $useravgrating = number_format($useravgrating, 1);
        echo "<tr><td bgcolor=\"{$bgcolor2}\">" . "<font class=\"content\"><b> " . _USER . ": </b><a href=\"{$nukeurl}/modules.php?name=Your_Account&amp;op=userinfo&amp;username={$ratinguser}\">{$ratinguser}</a></font>" . "</td>" . "<td bgcolor=\"{$bgcolor2}\">" . "<font class=\"content\"><b>" . _RATING . ": </b>{$rating}</font>" . "</td>" . "<td bgcolor=\"{$bgcolor2}\" align=\"right\">" . "<font class=\"content\">{$formatted_date}</font>" . "</td>" . "</tr>" . "<tr>" . "<td valign=\"top\">" . "<font class=\"tiny\">" . _USERAVGRATING . ": {$useravgrating}</font>" . "</td>" . "<td valign=\"top\" colspan=\"2\">" . "<font class=\"tiny\">" . _NUMRATINGS . ": {$usertotalcomments}</font>" . "</td>" . "</tr>" . "<tr>" . "<td colspan=\"3\">" . "<font class=\"content\">";
        if (is_admin($admin)) {
            echo "<a href=\"admin.php?op=DownloadsModDownload&amp;lid={$lid}\"><img src=\"modules/{$module_name}/images/editicon.gif\" border=\"0\" alt=\"" . _EDITTHISDOWNLOAD . "\"></a>";
        }
        echo " {$ratingcomments}</font>" . "<br><br><br></td></tr>";
        $x++;
    }
    echo "</table><br><br><center>";
    downloadfooter($lid, $ttitle);
    echo "</center>";
    CloseTable();
    include "footer.php";
}
Exemple #25
0
/**
 * Bayonet Content Management System
 * Copyright (C) 2008  Joseph Hunkeler
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
function ListAdmins()
{
    global $db;
    $result = $db->Query("SELECT `user_id`, `username`, `level` FROM `bayonet_users` ORDER BY `level` DESC, `username` ASC");
    $admins = $db->fetch($result);
    $num = 1;
    OpenTable("300px");
    echo "<tr><th></th><th style=\"text-align:left;\">Username</th><th style=\"text-align:left;\">Level</th></tr>";
    foreach ($admins as $admin) {
        if ($admin['level'] != $level) {
            $level = $admin['level'];
            echo "<tr><td colspan=\"3\"><hr /></td></tr>";
        }
        echo "<tr><td>{$num}.</td><td><a href=\"?op=admins&edit={$admin['user_id']}\">{$admin['username']}</a></td><td>{$admin['level']}</td></tr>";
        $num++;
    }
    CloseTable();
}
Exemple #26
0
function login()
{
    global $sec_code, $pagetitle, $adminindex;
    $pagetitle .= ' ' . _BC_DELIM . ' ' . _ADMINLOGIN;
    require 'header.php';
    OpenTable();
    echo open_form($adminindex, 'login', _ADMINLOGIN) . '
	<label for="alogin" class="ulog">' . _ADMINID . '</label><input class="set" type="text" name="alogin" id="alogin" size="20" maxlength="25" /><br />
	<label for="pwd" class="ulog">' . _PASSWORD . '</label><input class="set" type="password" name="pwd" id="pwd" size="20" maxlength="40" /><br />';
    if ($sec_code & 1) {
        echo '<label for="gfx_check" class="ulog">' . _SECURITYCODE . ':</label>' . generate_secimg(7) . '<br />
		<label for="gfx_check" class="ulog">' . _TYPESECCODE . ':</label><input class="set" type="text" name="gfx_check" id="gfx_check" size="10" maxlength="8" /><br />';
    }
    echo '<label for="persistent" class="ulog">' . _LOGIN_REMEMBERME . '</label><input type="checkbox" name="persistent" id="persistent" value="1" /><br />
	<div style="text-align:center;"><input type="submit" class="sub" value="' . _LOGIN . '" /></div>' . close_form();
    echo '<script type="text/javascript">document.getElementById("alogin").focus();</script>';
    CloseTable();
    require 'footer.php';
}
Exemple #27
0
function galleryHeader()
{
    global $moduleName, $iConfig, $admin, $admin_file;
    $galleryTitle = $iConfig['igallery_title'];
    include 'header.php';
    OpenTable();
    echo '<div id="gal-header">' . PHP_EOL;
    echo '	<h2>' . $galleryTitle . '</h2>' . PHP_EOL;
    echo '	<a href="modules.php?name=' . $moduleName . '">' . _IG_GALLHOME . '</a> |' . PHP_EOL;
    //if ($_GET['op']==='showAlbum') { echo '	<a href="modules.php?name='. $moduleName .'&amp;op=showSlide&amp;albumid='.$_GET['albumid'] .'">'. _IG_GALLSLIDE .'</a> |' . PHP_EOL; }
    if (is_admin($admin)) {
        echo '	<a href="' . $admin_file . '.php?op=galAdmin">' . _IG_GALLADMIN . '</a> |' . PHP_EOL;
    }
    echo '	<a href="modules.php?name=' . $moduleName . '&amp;op=topPics">' . _IG_GALLTOP . '</a> |' . PHP_EOL;
    echo '	<a href="modules.php?name=' . $moduleName . '&amp;op=recentMoves">' . _IG_RECENTMOVES . '</a> |' . PHP_EOL;
    echo '	<a href="modules.php?name=' . $moduleName . '&amp;op=addPics">' . _IG_ADDMEDIA . '</a>' . PHP_EOL;
    echo '	<hr />' . PHP_EOL;
    echo '</div>' . PHP_EOL;
}
Exemple #28
0
function SERVICE_CMSCSS_phpnuke()
{
    global $include_path, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $thename, $css, $row_colors, $jz_MenuItem, $jz_MenuItemHover, $jz_MenuItemLeft, $jz_MainItemHover, $jz_MenuSplit;
    echo "<style type=\"text/css\">" . ".jz_row1 { background-color:{$bgcolor1}; }" . ".jz_row2 { background-color:{$bgcolor2}; }" . ".and_head1 { background-color:{$bgcolor2}; }" . ".and_head2 { background-color:{$bgcolor1}; }" . "</style>";
    OpenTable();
    // Now let's set the style sheet for CMS stuff
    $thename = @get_theme();
    $_SESSION['cms-style'] = "themes/" . $thename . "/style/style.css";
    $_SESSION['cms-theme-data'] = urlencode($bgcolor1 . "|" . $bgcolor2);
    $row_colors = array('jz_row2', 'jz_row1');
    $jz_MenuItemHover = "jz_row2";
    $jz_MenuItem = "jz_row1";
    $jz_MenuItemLeft = "jzMenuItemLeft";
    $jz_MenuSplit = "jzMenuSplit";
    $jz_MainItemHover = "jzMainItemHover";
    // Now let's set the CSS
    $css = $include_path . "style/cms-theme/default.php";
    return $css;
}
Exemple #29
0
function downl_menu_tpl($maindownload)
{
    global $user_adddownload, $module_name;
    OpenTable();
    $ThemeSel = get_theme();
    if (file_exists("themes/{$ThemeSel}/images/down-logo.gif")) {
        echo "<br /><div align=\"center\"><a href=\"" . getlink() . "\"><img src=\"themes/{$ThemeSel}/images/down-logo.gif\" border=\"0\" alt=\"\" /></a><br /><br />";
    } else {
        echo "<br /><div align=\"center\"><a href=\"" . getlink() . "\"><img src=\"modules/{$module_name}/images/down-logo.gif\" border=\"0\" alt=\"\" /></a><br /><br />";
    }
    echo "<form action=\"" . getlink("&amp;d_op=search") . "\" method=\"post\"><input type=\"text\" size=\"25\" name=\"query\" /> <input type=\"submit\" value=\"" . _SEARCH . "\" /></form>" . "<font class=\"content\">[ ";
    if ($maindownload > 0) {
        echo "<a href=\"" . getlink() . "\">" . _DOWNLOADSMAIN . "</a> | ";
    }
    if ($user_adddownload) {
        echo "<a href=\"" . getlink("&amp;d_op=AddDownload") . "\">" . _ADDDOWNLOAD . "</a> | ";
    }
    echo "<a href=\"" . getlink("&amp;d_op=NewDownloads") . "\">" . _NEW . "</a>" . " | <a href=\"" . getlink("&amp;d_op=MostPopular") . "\">" . _POPULAR . "</a>" . " | <a href=\"" . getlink("&amp;d_op=TopRated") . "\">" . _TOPRATED . "</a> ]" . "</font></div>";
    CloseTable();
}
function foot()
{
    global $prefix, $user_prefix, $db, $index, $user, $cookie, $storynum, $user, $cookie, $Default_Theme, $foot1, $foot2, $foot3, $foot4, $home, $module, $name;
    if ($home == 1) {
        blocks(Down);
    }
    if ($module == 1 and file_exists("modules/{$name}/copyright.php")) {
        $cpname = ereg_replace("_", " ", $name);
        echo "<div align=\"right\"><a href=\"javascript:openwindow()\">{$cpname} &copy;</a></div>";
    }
    if ($module == 1 and file_exists("modules/{$name}/admin/panel.php")) {
        echo "<br>";
        OpenTable();
        include "modules/{$name}/admin/panel.php";
        CloseTable();
    }
    themefooter();
    echo "</body>\n" . "</html>";
    die;
}