Exemple #1
0
function themeheader()
{
    global $slogan, $sitename, $banners, $mainindex, $adminindex, $cpgtpl, $db, $prefix, $site_logo, $MAIN_CFG, $CPG_SESS, $Blocks;
    if ($MAIN_CFG['global']['admingraphic'] & 4) {
        include 'includes/cssmainmenu.php';
    }
    $imgr = $imgl = '';
    // left blocks ?
    if ($Blocks->l && $Blocks->showblocks & 1) {
        $img = $Blocks->hideblock('600') ? 'plus.gif' : 'minus.gif';
        $imgl = '<img alt="' . _TOGGLE . '" title="' . _TOGGLE . '" id="pic600" src="themes/' . $CPG_SESS['theme'] . '/images/' . $img . '" onclick="blockswitch(\'600\');" style="cursor:pointer; float:left; padding-top:3px;" />';
    }
    // right blocks ?
    if ($Blocks->r && $Blocks->showblocks & 2) {
        $img = $Blocks->hideblock('601') ? 'plus.gif' : 'minus.gif';
        $imgr = '<img alt="' . _TOGGLE . '" title="' . _TOGGLE . '" id="pic601" src="themes/' . $CPG_SESS['theme'] . '/images/' . $img . '" onclick="blockswitch(\'601\');" style="cursor:pointer; float:right; padding-top:3px;" />';
    }
    $result = $db->sql_uquery("SELECT topicid, topictext FROM " . $prefix . "_topics ORDER BY topictext");
    while ($row = $db->sql_fetchrow($result, SQL_NUM)) {
        $toplist[$row[0]] = $row[1];
    }
    $user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
    $css_ie = ereg('MSIE 7.0', $user_agent) ? 'ie7' : (ereg('MSIE ([0-6].[0-9]{1,2})', $user_agent) ? 'ie6' : (isset($_SESSION['SECURITY']['UA']) && $_SESSION['SECURITY']['UA'] == 'Safari' ? 'safari' : (isset($_SESSION['SECURITY']['UA']) && $_SESSION['SECURITY']['UA'] == 'Opera' ? 'opera' : '')));
    $cpgtpl->assign_vars(array('CSS_IE' => $css_ie ? '<link rel="stylesheet" type="text/css" href="themes/' . $CPG_SESS['theme'] . '/style/' . $css_ie . '.css" />' : '', 'PUBLIC_HEADER' => !defined('ADMIN_PAGES'), 'B_L_VISIBLE' => $Blocks->hideblock('600') ? 'style="display: none"' : '', 'BLOG_ENABLED' => is_active('Blogs'), 'G_LEFTIMAGE' => $imgl, 'G_RIGHTIMAGE' => $imgr, 'S_TOGGLE' => _TOGGLE, 'S_SEARCH' => _SEARCH, 'S_IS_ADMIN' => is_admin(), 'S_CAN_ADMIN' => can_admin(), 'S_IS_USER' => is_user(), 'S_LOGO' => $site_logo, 'S_SITENAME' => $sitename, 'S_WELCOME' => _WELCOMETO, 'S_HOME' => _HOME, 'S_BLOG' => _BlogsLANG, 'S_DOWNLOADS' => _DownloadsLANG, 'S_GALLERY' => _coppermineLANG, 'S_FORUMS' => _ForumsLANG, 'S_MY_ACCOUNT' => _Your_AccountLANG, 'S_NEWS' => _NewsLANG, 'S_ADMIN' => _ADMINISTRATION, 'S_BANNER' => $banners ? viewbanner() : '', 'U_MAININDEX' => $mainindex, 'U_NEWS' => getlink('News'), 'U_SEARCH' => getlink('Search'), 'U_DOWNLOADS' => getlink('Downloads'), 'U_FORUMS' => getlink('Forums'), 'U_GALLERY' => getlink('coppermine'), 'U_BLOG' => getlink('Blogs'), 'U_MY_ACCOUNT' => getlink('Your_Account'), 'U_ADMININDEX' => $adminindex, 'S_MAIN_MENU' => isset($mmcontent) ? $mmcontent : false));
    $Blocks->display('l');
}
Exemple #2
0
function themefooter()
{
    global $banners, $cpgtpl, $Blocks;
    $Blocks->display('r');
    $cpgtpl->assign_vars(array('B_R_VISIBLE' => $Blocks->hideblock('601') ? 'style="display: none"' : '', 'S_FOOTER' => footmsg(), 'S_BANNER' => $banners ? viewbanner() : ''));
    $cpgtpl->set_filenames(array('footer' => 'footer.html'));
    $cpgtpl->display('footer');
}
Exemple #3
0
function themeheader()
{
    global $slogan, $sitename, $banners, $mainindex, $adminindex, $cpgtpl, $site_logo, $CPG_SESS, $MAIN_CFG, $Blocks;
    if ($MAIN_CFG['global']['admingraphic'] & 4) {
        include 'includes/cssmainmenu.php';
    }
    $imgr = $imgl = '';
    // left blocks ?
    if ($Blocks->l) {
        $img = $Blocks->hideblock('600') ? 'plus.gif' : 'minus.gif';
        $imgl = '<img alt="Toggle Content" title="Toggle Content" id="pic600" src="themes/' . $CPG_SESS['theme'] . '/images/' . $img . '" onclick="blockswitch(\'600\');" style="cursor:pointer; float:left; padding:2px 0 2px 0;" />';
    }
    // right blocks ?
    if ($Blocks->r) {
        $img = $Blocks->hideblock('601') ? 'plus.gif' : 'minus.gif';
        $imgr = '<img alt="Toggle Content" title="Toggle Content" id="pic601" src="themes/' . $CPG_SESS['theme'] . '/images/' . $img . '" onclick="blockswitch(\'601\');" style="cursor:pointer; float:right; padding:2px 0 2px 0;" />';
    }
    $user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
    $cpgtpl->assign_vars(array('CSS_IE' => ereg('MSIE 7.0', $user_agent) ? '<link rel="stylesheet" type="text/css" href="themes/' . $CPG_SESS['theme'] . '/style/ie7.css" />' : (ereg('MSIE ([0-6].[0-9]{1,2})', $user_agent) ? '<link rel="stylesheet" type="text/css" href="themes/' . $CPG_SESS['theme'] . '/style/ie6.css" />' : ''), 'PUBLIC_HEADER' => !defined('ADMIN_PAGES'), 'B_L_VISIBLE' => $Blocks->hideblock('600') ? 'style="display: none"' : '', 'B_L_HIDDEN' => $Blocks->hideblock('600') ? '' : 'style="display: none"', 'G_LEFTIMAGE' => $imgl, 'G_RIGHTIMAGE' => $imgr, 'S_IS_ADMIN' => is_admin(), 'S_CAN_ADMIN' => can_admin(), 'S_IS_USER' => is_user(), 'S_LOGO' => $site_logo, 'S_SITENAME' => $sitename, 'S_HOME' => _HOME, 'S_DOWNLOADS' => is_active('Downloads') ? _DownloadsLANG : false, 'S_FORUMS' => _ForumsLANG, 'S_MY_ACCOUNT' => is_user() ? _Your_AccountLANG : _BREG, 'S_ADMIN' => _ADMINISTRATION, 'S_BANNER' => $banners ? viewbanner() : '', 'U_MAININDEX' => $mainindex, 'U_DOWNLOADS' => getlink('Downloads'), 'U_FORUMS' => getlink('Forums'), 'U_MY_ACCOUNT' => getlink(is_user() ? 'Your_Account' : 'Your_Account&amp;file=register'), 'U_ADMININDEX' => $adminindex, 'S_MAIN_MENU' => isset($mmcontent) ? $mmcontent : false));
    $Blocks->display('l');
}
Exemple #4
0
function themeheader()
{
    global $slogan, $sitename, $banners, $mainindex, $adminindex, $index, $cpgtpl, $ownpagetitle;
    $imgr = $imgl = '';
    // left blocks ?
    if (blocks_visible('l')) {
        $topblockl = '<td width="194"><img src="themes/PH2/images/left_block_top.jpg" height="12" alt="" /></td>';
        $img = hideblock('600') ? 'plus.gif' : 'minus.gif';
        $imgl = '<img align="left" alt="Toggle Content" title="Toggle Content" id="pic600" src="themes/PH2/images/' . $img . '" onclick="blockswitch(\'600\');" style="cursor:pointer" />';
    } else {
        $topblockl = '<td width="194" class="mtop_block"></td>';
    }
    // right blocks ?
    if (blocks_visible('r')) {
        $topblock = '<td width="194"><img src="themes/PH2/images/right_block_top.jpg" height="12" alt="" /></td>';
        $img = hideblock('601') ? 'plus.gif' : 'minus.gif';
        $imgr = '<img align="right" alt="Toggle Content" title="Toggle Content" id="pic601" src="themes/PH2/images/' . $img . '" onclick="blockswitch(\'601\');" style="cursor:pointer" />';
    } else {
        $topblock = '<td width="194" class="mtop_block"></td>';
    }
    $cpgtpl->assign_vars(array('PUBLIC_HEADER' => !defined('ADMIN_PAGES'), 'B_L_VISIBLE' => hideblock('600') ? 'style="display: none"' : '', 'G_LEFTIMAGE' => $imgl, 'G_RIGHTIMAGE' => $imgr, 'S_IS_ADMIN' => is_admin(), 'S_CAN_ADMIN' => can_admin(), 'S_IS_USER' => is_user(), 'S_SITENAME' => $sitename, 'S_HOME' => _HOME, 'S_DOWNLOADS' => _DownloadsLANG, 'S_FORUMS' => _ForumsLANG, 'S_MY_ACCOUNT' => _Your_AccountLANG, 'S_ADMIN' => _ADMINISTRATION, 'S_BANNER' => $banners ? viewbanner() : '', 'U_MAININDEX' => $mainindex, 'U_DOWNLOADS' => getlink('Downloads'), 'U_FORUMS' => getlink('Forums'), 'U_MY_ACCOUNT' => getlink('Your_Account'), 'U_ADMININDEX' => $adminindex, 'U_PRIVATE_M' => getlink('Private_Messages'), 'U_GALLERY' => getlink('coppermine'), 'U_SEARCH' => getlink('Search'), 'G_LBLOCK_TOP' => $topblockl, 'G_RBLOCK_TOP' => $topblock));
    blocks('left');
}
Exemple #5
0
* See COPYRIGHT.php for copyright notices and details.
* @license GNU/GPL Version 2, see LICENSE.php
* Mambo 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; version 2 of the License.
*/
/** ensure this file is being included by a parent file */
defined('_VALID_MOS') or die('Direct Access to this location is not allowed.');
$bid = intval(mosGetParam($_REQUEST, 'bid', 0));
$task = mosGetParam($_REQUEST, "task", "");
switch ($task) {
    case "click":
        clickbanner($bid);
        break;
    default:
        viewbanner($mainframe->getCfg('live_site'));
        break;
}
function viewbanner($_live_site)
{
    global $database, $mosConfig_live_site;
    $database->setQuery("SELECT count(*) AS numrows FROM #__banner WHERE showBanner=1");
    $numrows = $database->loadResult();
    if ($numrows === null) {
        echo $database->stderr(true);
        return;
    }
    if ($numrows > 1) {
        mt_srand((double) microtime() * 1000000);
        $bannum = mt_rand(0, --$numrows);
    } else {
        if ($url != "") {
            echo "You changed the URL<br>";
        }
        if ($alttext != "") {
            echo "You changed the Alternate Text";
        }
        echo "<br><br><a href=\"javascript:history.go(-1)\">Back to Stats Page</a></center>";
    } else {
        echo "<center><br>Your login/password doesn't match.<br><br>Please <a href=\"banners.php?op=login\">login again</a></center>";
    }
}
switch ($op) {
    case "click":
        clickbanner($bid);
        break;
    case "login":
        clientlogin();
        break;
    case "Ok":
        bannerstats($login, $pass);
        break;
    case "Change":
        change_banner_url_by_client($login, $pass, $cid, $bid, $url, $alttext);
        break;
    case "EmailStats":
        EmailStats($login, $cid, $bid, $pass);
        break;
    default:
        viewbanner();
        break;
}
Exemple #7
0
function themefooter()
{
    global $MAIN_CFG, $cpgtpl, $banners, $Blocks, $db;
    if ($MAIN_CFG['global']['maintenance'] && !is_admin()) {
        echo '</body></html>';
        return;
    }
    global $foot1, $foot2, $foot3;
    //dummy require of the global, or else $footer_1... will be empty later
    // TODO: need to test a bit more if this line is needed
    Fix_Quotes($foot1, 1);
    // Let's save it before footmsg() adds other pieces into it
    $footer_1 = $foot1;
    // Let's also save others
    $footer_2 = $foot2;
    $footer_3 = $foot3;
    // Now let's clean all foot globals, so footmsg() would add minimum info to $foot1
    $foot1 = '';
    $foot2 = '';
    $foot3 = '';
    $debug_sql_id = '31881';
    $debug_php_id = '31949';
    $cpgtpl->assign_vars(array('S_BANNER_ACT' => $banners, 'S_BANNER' => $banners ? viewbanner() : '', 'S_FOOTER' => footmsg(), 'FOOTER_1' => $footer_1, 'FOOTER_2' => $footer_2, 'FOOTER_3' => $footer_3, 'DSQL_ID' => $debug_sql_id, 'DPHP_ID' => $debug_php_id, 'S_DEBUG_SQL_COLLAPSED' => $Blocks->hideblock($debug_sql_id), 'S_DEBUG_PHP_COLLAPSED' => $Blocks->hideblock($debug_php_id), 'U_EDIT_FOOTER' => is_admin() ? adminlink('settings&amp;s=3') : ''));
    /*
      In case the template array gets emptied, i.e during forums admin messages
      We assign some again, that are also used in footer
    */
    //Dragonfly 10 or load only if needed
    //if (version_compare(CPG_NUKE, '10.0.0', '>=') || !isset($cpgtpl->_tpldata['.'][0]['HEADVARS_OK'])) {
    if (version_compare(CPG_NUKE, '10.0.0', '<') && !isset($cpgtpl->_tpldata['.'][0]['HEADVARS_OK'])) {
        global $CPG_SESS, $mainindex, $adminindex, $lang, $userinfo;
        /* CSS Menu */
        if ($MAIN_CFG['global']['admingraphic'] & 4) {
            include 'themes/' . $CPG_SESS['theme'] . '/includes/cssmainmenu.php';
        }
        $cpgtpl->assign_vars(array('CURRENT_URL' => ereg_replace('&', '&amp;', get_uri()), 'S_TIMENOW' => sprintf($lang['Current_time'], formatDateTime(current_time(), _DATESTRING)), 'S_IS_USER' => is_user(), 'S_LASTVISIT' => is_user() ? sprintf($lang['You_last_visit'], formatDateTime($userinfo['user_lastvisit'], _DATESTRING)) : '', 'BACK_TO_TOP' => $lang['Back_to_top'], 'S_MAIN_MENU' => isset($mmcontent) ? $mmcontent : false, 'U_MAININDEX' => $mainindex, 'U_DOWNLOADS' => getlink('Downloads'), 'U_FORUMS' => getlink('Forums'), 'U_MY_ACCOUNT' => getlink(is_user() ? 'Your_Account' : 'Your_Account&amp;file=register'), 'U_ADMININDEX' => $adminindex, 'S_DOWNLOADS' => is_active('Downloads') ? _DownloadsLANG : false, 'S_FORUMS' => _ForumsLANG, 'S_MY_ACCOUNT' => is_user() ? _Your_AccountLANG : _BREG, 'S_ADMINISTR' => _ADMINISTRATION));
    }
    $cpgtpl->set_filenames(array('footer' => 'footer.html'));
    $cpgtpl->display('footer');
}
Exemple #8
0
  | banners.php - NexOS banner display file                           |
  | Authors:                                                          |
  |  Steven Sheeley                                                   |
  |  Richard R. Pufky                                                 |
  |      and the Myndworx Asylum Dev Team                             |
  | eMail: support at myndworx dot com                                |
  | Website: http://www.nexoscms.org and http://www.myndworx.com      |
  +-------------------------------------------------------------------+
  |Original Copyright below                                           |
  +-------------------------------------------------------------------+
  | CPG Dragonfly™ CMS                                                |
  | Copyright © 2004 - 2005 by CPG-Nuke Dev Team                      |
  | http://www.dragonflycms.com                                       |
  | Dragonfly is released under the terms and conditions of the GNU   |
  | GPL version 2 or any later version                                |
  +-------------------------------------------------------------------+
   Last modification notes:
    $Author$
    $Date$
    $Rev$
*/
if (!defined('CPG_NUKE')) {
    define('XMLFEED', 1);
    require_once 'includes/cmsinit.inc';
    $bid = intval($_GET['bid']);
    $row = $db->sql_ufetchrow('SELECT clickurl FROM ' . $prefix . "_banner WHERE bid='{$bid}'");
    $db->sql_query('UPDATE ' . $prefix . "_banner SET clicks=clicks+1 WHERE bid='{$bid}'");
    URL::redirect($row['clickurl']);
} else {
    echo viewbanner();
}
Exemple #9
0
function themefooter()
{
    global $showblocks, $banners, $cpgtpl, $foot1, $foot2, $foot3, $copyright, $start_time, $db, $themeblockside, $Blocks;
    $Blocks->display('r');
    $cpgtpl->assign_vars(array('B_R_VISIBLE' => $Blocks->hideblock('601') ? 'style="display:none;"' : '', 'S_FOOTER' => footmsg(), 'S_BANNER' => $banners ? viewbanner() : ''));
    $cpgtpl->set_filenames(array('footer' => 'footer.html'));
    $cpgtpl->display('footer');
}