<?php

session_start();
require_once "adHocConst.php";
require_once "adHocInclude.php";
//adHocQuery.php
//===================================================================================
//This section retrieves the menu record
$connAdHoc = pdoConnect(cAdHocServer, cAdHocDatabase, cAdHocUsername, cAdHocPassword);
// load a recordset for links to create in the following query results
$gblRows = loadLinks($connAdHoc);
$siteNum = $_SESSION["sitenum"];
$sqlSite = "SELECT site_name FROM sites WHERE site_num = " . $siteNum;
$siteStmt = pdoQuery($sqlSite, $connAdHoc);
$siteRow = pdoFirstRow($siteStmt);
$siteName = pdoData($siteRow, "site_name");
traceHide("Passed keys / value");
foreach ($_REQUEST as $key => $val) {
    traceHide("key:" . $key . " / val:" . $val);
}
$curMenu = $_REQUEST["menunum"];
$curLine = $_REQUEST["linenum"];
$sql = " SELECT q1.query_num, title, q1.heading_text AS heading, q1.total_fields," . "q1.link_field, q1.select_stmt AS detail_select," . "q1.pre_select," . "q2.select_stmt AS title_select," . " udb_name, udb_server, udb_username, udb_password" . " FROM menus m" . " LEFT JOIN queries AS q1 ON m.main_query_num = q1.query_num" . " LEFT JOIN queries AS q2 ON m.title_query_num = q2.query_num" . " LEFT JOIN sitedbs AS s ON s.udb_num = q1.udb_num" . " AND s.site_num = " . $siteNum . " LEFT JOIN dbs AS d ON d.udb_num = s.udb_num" . " WHERE m.menu_num = " . $curMenu . " AND m.line_num = " . $curLine;
traceHide("main query=" . $sql);
//===================================================================================
//Get the menu record pertaining to this query
$adhocStmt = pdoQuery($sql, $connAdHoc);
$row = pdoFirstRow($adhocStmt);
$title = pdoData($row, "title");
$heading = pdoData($row, "heading");
//Analyse totalling required
Ejemplo n.º 2
0
        <?php 
BsocketB('public-xhtml-leftbar');
?>
            
            </div>
</div>
<div class="clear">

</div>
<div id="footer">
<div id="btm_cont">


</div>
<div id="ft_btm">            <?php 
loadLinks('footer');
?>
            <?php 
loadSettings('copyright');
?>
            <?php 
BsocketB('public-xhtml-footer');
?>
<br />
<!--Credits -->
<a href="http://ramblingsoul.com">CSS Template</a> by Rambling Soul<br />
Images from<a href="http://sxc.hu"> sxc.hu</a>
<!--/Credits -->


</div>
Ejemplo n.º 3
0
    loadUsers();
}
if ($type == "addPlayer") {
    addPlayer($data);
}
if ($type == "loadChalleneges") {
    loadChalleneges();
}
if ($type == "loadChallengeText") {
    loadChallengeText();
}
if ($type == "addLink") {
    addLink($data);
}
if ($type == "loadLinks") {
    loadLinks($data);
}
if ($type == "getTeamRating") {
    getTeamRating($data);
}
if ($type == "getTeamRanking") {
    getTeamRanking($data);
}
if ($type == "getWinners") {
    getWinners($data);
}
if ($type == "getTodaysChallenge") {
    getTodaysChallenge($data);
}
function changeStatus($data)
{
Ejemplo n.º 4
0
function loadLinks($link_cat, $format = '', $before = '', $after = '', $first = true)
{
    global $razorArray;
    $linklist = getLinksArray($link_cat);
    if (!empty($linklist)) {
        if ($format == '') {
            $format = "<li>%s</li>";
        }
        if ($format == 'nolist') {
            $format = '%s';
        }
        if ($first) {
            if ($format == '<li>%s</li>') {
                echo sprintf('<ul class="first">');
            }
        } else {
            if ($format == '<li>%s</li>') {
                echo sprintf('<ul>');
            }
        }
        foreach ($linklist as $slab => $title) {
            $extLinkFlag = false;
            if (isset($razorArray['ext_links'])) {
                if (in_array($slab, array_keys($razorArray['ext_links']))) {
                    $extLinkFlag = true;
                }
            }
            BsocketB('create-link-from-cat-before');
            if ($extLinkFlag) {
                if (isset($razorArray['ext_link_win'][$slab])) {
                    if ($razorArray['ext_link_win'][$slab]) {
                        echo sprintf($format, $before . makeLinkWin('http://' . $razorArray['ext_links'][$slab], $title) . $after);
                    } else {
                        echo sprintf($format, $before . makeLink('http://' . $razorArray['ext_links'][$slab], $title) . $after);
                    }
                } else {
                    echo sprintf($format, $before . makeLink('http://' . $razorArray['ext_links'][$slab], $title) . $after);
                }
            } else {
                $addSubCatLinks = '';
                if (!isset($razorArray['sub_cat_flag'])) {
                    $razorArray['sub_cat_flag'] = array();
                }
                if (in_array($slab, $razorArray['sub_cat_flag'])) {
                    $format = "<li>%s";
                } else {
                    $format = "<li>%s</li>";
                }
                $slabUrlIn = slabUrl($slab);
                if ($slabUrlIn == '?') {
                    $stripURL = explode(RAZOR_HOME_FILENAME, $_SERVER['PHP_SELF']);
                    echo sprintf($format, $before . makeLink($stripURL[0], $title) . $after);
                } else {
                    echo sprintf($format, $before . makeLink($slabUrlIn, $title) . $after);
                }
                foreach ($razorArray['sub_cat_flag'] as $subCat => $underSlab) {
                    if ($slab == $underSlab && !empty($razorArray['links_cats'][$subCat])) {
                        $addSubCatLinks = sprintf(loadLinks($subCat, '', '', '', false));
                    }
                }
                if (in_array($slab, $razorArray['sub_cat_flag'])) {
                    echo sprintf("</li>");
                    $format = "<li>%s</li>";
                }
            }
            BsocketB('create-link-from-cat-after');
        }
        if ($format == '<li>%s</li>') {
            echo sprintf('</ul>');
        }
    }
}
<div id="menu">
	<?php 
loadLinks('top-navigation');
?>
	<?php 
BsocketB('public-xhtml-topnav');
?>
</div>

<div id="content">

<div id="left">
<h2>Categories : </h2>
<div class="box">
	<?php 
loadLinks('sidebar');
?>
	<?php 
BsocketB('public-xhtml-leftnav');
?>
</div>
</div>

<div id="right">

<div class="contentleft">
<div class="contentleftbox">
	<?php 
loadSlabContents();
?>
	<?php