예제 #1
0
/**
* smarty_function_banner
*/
function smarty_function_banner($params, &$gBitSmarty)
{
    global $gBitSystem;
    include_once BANNERS_PKG_PATH . 'banner_lib.php';
    if (!isset($bannerlib)) {
        $bannerlib = new BannerLib();
    }
    extract($params);
    // Param = zone
    if (empty($zone)) {
        $gBitSmarty->trigger_error("assign: missing 'zone' parameter");
        return;
    }
    $banner = $bannerlib->select_banner($zone);
    print $banner;
}
예제 #2
0
function smarty_function_banner($params, &$smarty)
{
    global $tikilib;
    global $dbTiki;
    include_once 'lib/banners/bannerlib.php';
    if (!isset($bannerlib)) {
        $bannerlib = new BannerLib($dbTiki);
    }
    extract($params);
    // Param = zone
    if (empty($zone)) {
        $smarty->trigger_error("assign: missing 'zone' parameter");
        return;
    }
    $banner = $bannerlib->select_banner($zone);
    print $banner;
}
예제 #3
0
<?php

// $Header: /cvsroot/tikiwiki/tiki/tiki-edit_banner.php,v 1.15.2.6 2006/09/03 16:32:29 ohertel Exp $
// Copyright (c) 2002-2005, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// Initialization
require_once 'tiki-setup.php';
require_once 'lib/tikilib.php';
# httpScheme()
include_once 'lib/banners/bannerlib.php';
if (!isset($bannerlib)) {
    $bannerlib = new BannerLib($dbTiki);
}
// CHECK FEATURE BANNERS AND ADMIN PERMISSION HERE
if ($feature_banners != 'y') {
    $smarty->assign('msg', tra("This feature is disabled") . ": feature_banners");
    $smarty->display("error.tpl");
    die;
}
if ($tiki_p_admin_banners != 'y') {
    $smarty->assign('msg', tra("You do not have permissions to edit banners"));
    $smarty->display("error.tpl");
    die;
}
if (isset($_REQUEST["bannerId"]) && $_REQUEST["bannerId"] > 0) {
    $info = $bannerlib->get_banner($_REQUEST["bannerId"]);
    if (!$info) {
        $smarty->assign('msg', tra("Banner not found"));
        $smarty->display("error.tpl");
        die;
예제 #4
0
<?php
// (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project
// 
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id: tiki-list_banners.php 39467 2012-01-12 19:47:28Z changi67 $

require_once ('tiki-setup.php');
include_once ('lib/banners/bannerlib.php');
if (!isset($bannerlib)) {
	$bannerlib = new BannerLib;
}
$access->check_feature('feature_banners');

if (isset($_REQUEST["remove"])) {
	if ($tiki_p_admin_banners != 'y') {
		$smarty->assign('errortype', 401);
		$smarty->assign('msg', tra("You do not have permission to remove banners"));
		$smarty->display("error.tpl");
		die;
	}
	$access->check_authenticity();
	$bannerlib->remove_banner($_REQUEST["remove"]);
}
// This script can receive the thresold
// for the information as the number of
// days to get in the log 1,3,4,etc
// it will default to 1 recovering information for today
if (!isset($_REQUEST["sort_mode"])) {
	$sort_mode = 'created_desc';
} else {
예제 #5
0
<?php
// (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project
// 
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id: select_banner.php 39467 2012-01-12 19:47:28Z changi67 $
  
if (!isset($_REQUEST["zone"])) {
	die;
}

require_once ('tiki-setup.php');

include_once ('lib/banners/bannerlib.php');

if (!isset($bannerlib)) {
	$bannerlib = new BannerLib;
}

// CHECK FEATURE BANNERS HERE
$access->check_feature('feature_banners');

$banner = $bannerlib->select_banner($_REQUEST["zone"]);
print ($banner);
예제 #6
0
<?php

// (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id: banner_click.php 39467 2012-01-12 19:47:28Z changi67 $
require_once 'tiki-setup.php';
include_once 'lib/banners/bannerlib.php';
if (!isset($bannerlib)) {
    $bannerlib = new BannerLib();
}
$access->check_feature('feature_banners');
$bannerlib->add_click($_REQUEST["id"]);
$url = urldecode($_REQUEST["url"]);
header("location: {$url}");
예제 #7
0
    $smarty->assign('msg', tra("This feature is disabled") . ": feature_banners");
    $smarty->display("error.tpl");
    die;
}
$bannercachefile = $prefs['tmpDir'];
if ($tikidomain) {
    $bannercachefile .= "/{$tikidomain}";
}
$bannercachefile .= "/banner." . $_REQUEST["id"];
if (is_file($bannercachefile) and !isset($_REQUEST["reload"])) {
    $size = getimagesize($bannercachefile);
    $type = $size['mime'];
} else {
    include_once 'lib/banners/bannerlib.php';
    if (!isset($bannerlib)) {
        $bannerlib = new BannerLib($dbTiki);
    }
    $data = $bannerlib->get_banner($_REQUEST["id"]);
    if (!$data) {
        die;
    }
    $type = $data["imageType"];
    $data = $data["imageData"];
    if ($data) {
        $fp = fopen($bannercachefile, "wb");
        fputs($fp, $data);
        fclose($fp);
    }
}
header("Content-type: {$type}");
if (is_file($bannercachefile)) {
$section = 'admin';
require_once ('tiki-setup.php');
include_once ('lib/menubuilder/menulib.php');
include_once ('lib/rss/rsslib.php');
include_once ('lib/polls/polllib.php');
include_once ('lib/banners/bannerlib.php');
include_once ('lib/dcs/dcslib.php');
include_once ('lib/modules/modlib.php');
include_once ('lib/structures/structlib.php');

if (!isset($dcslib)) {
	$dcslib = new DCSLib($dbTiki);
}

if (!isset($bannerlib)) {
	$bannerlib = new BannerLib($dbTiki);
}

if (!isset($rsslib)) {
	$rsslib = new RssLib($dbTiki);
}

if (!isset($polllib)) {
	$polllib = new PollLib($dbTiki);
}

if (!isset($structlib)) {
	$structlib = new StructLib($dbTiki);
}

$smarty->assign('wysiwyg', 'n');
예제 #9
0
<?php

// $Header: /cvsroot/tikiwiki/tiki/tiki-view_banner.php,v 1.17.2.3 2005/01/05 19:45:28 jburleyebuilt Exp $
// Copyright (c) 2002-2005, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// Initialization
require_once 'tiki-setup.php';
require_once 'lib/tikilib.php';
# httpScheme()
include_once 'lib/banners/bannerlib.php';
if (!isset($bannerlib)) {
    $bannerlib = new BannerLib($dbTiki);
}
if ($feature_banners != 'y') {
    $smarty->assign('msg', tra("This feature is disabled") . ": feature_banners");
    $smarty->display("error.tpl");
    die;
}
// CHECK FEATURE BANNERS AND ADMIN PERMISSION HERE
if (!isset($_REQUEST["bannerId"])) {
    $smarty->assign('msg', tra("No banner indicated"));
    $smarty->display("error.tpl");
    die;
}
$info = $bannerlib->get_banner($_REQUEST["bannerId"]);
if (!$info) {
    $smarty->assign('msg', tra("Banner not found"));
    $smarty->display("error.tpl");
    die;
}