die;
}
if ($tiki_p_view_integrator != 'y' && $tiki_p_admin_integrator != 'y' && $tiki_p_admin != 'y') {
    $smarty->assign('errortype', 401);
    $smarty->assign('msg', tra("You do not have permission to use this feature"));
    $smarty->display("error.tpl");
    die;
}
$repID = isset($_REQUEST["repID"]) && strlen($_REQUEST["repID"]) > 0 ? $_REQUEST["repID"] : 0;
if (!isset($_REQUEST["repID"]) && $repID <= 0) {
    $smarty->assign('msg', tra("No repository given"));
    $smarty->display("error.tpl");
    die;
}
// Create instance of integrator
$integrator = new TikiIntegrator($dbTiki);
// Get repository configuration data
$rep = $integrator->get_repository($repID);
// Check if given file present at configured location
$file = $integrator->get_rep_file($rep, isset($_REQUEST["file"]) ? $_REQUEST["file"] : '');
if (substr($file, 0, 7) != 'http://' && substr($file, 0, 8) != 'https://' && !file_exists($file)) {
    if ($tiki_p_admin == 'y') {
        $smarty->assign('msg', tra("File not found ") . $file);
    } else {
        $smarty->assign('msg', tra("File not found ") . $_REQUEST["file"]);
    }
    $smarty->display("error.tpl");
    die;
}
// Needs to clear cached version of this file...
if (isset($_REQUEST["clear_cache"]) && $rep["cacheable"]) {
$description = isset($_REQUEST["description"]) ? $_REQUEST["description"] : '';
$rxmod = isset($_REQUEST["rxmod"]) ? $_REQUEST["rxmod"] : '';
$file = isset($_REQUEST["file"]) ? $_REQUEST["file"] : '';
$type = isset($_REQUEST["type"]) ? $_REQUEST["type"] == 'on' ? 'y' : 'n' : 'n';
$casesense = isset($_REQUEST["casesense"]) ? $_REQUEST["casesense"] == 'on' ? 'y' : 'n' : 'n';
$code = isset($_REQUEST["code"]) ? $_REQUEST["code"] == 'on' ? 'y' : 'n' : 'n';
$html = isset($_REQUEST["html"]) ? $_REQUEST["html"] == 'on' ? 'y' : 'n' : 'n';
$all = isset($_REQUEST["all"]) ? $_REQUEST["all"] == 'on' ? 'y' : 'n' : 'n';
$enabled = isset($_REQUEST["enabled"]) ? $_REQUEST["enabled"] == 'on' ? 'y' : 'n' : 'n';
if (!isset($_REQUEST["repID"]) || $repID <= 0) {
    $smarty->assign('msg', tra("No repository"));
    $smarty->display("error.tpl");
    die;
}
// Create instance of integrator
$integrator = new TikiIntegrator($dbTiki);
// Check if copy button pressed
if (isset($_REQUEST["copy"]) && $srcrep > 0) {
    $integrator->copy_rules($srcrep, $repID);
}
// Check if 'save' button pressed ...
if (isset($_REQUEST["save"])) {
    // ... and all mandatory paramaters r OK
    if (strlen($srch) > 0) {
        $integrator->add_replace_rule($repID, $ruleID, $ord, $srch, $repl, $type, $casesense, $rxmod, $enabled, $description);
    } else {
        $smarty->assign('msg', tra("Search is mandatory field"));
        $smarty->display("error.tpl");
        die;
    }
}
<?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_integrator_repositories.php 39467 2012-01-12 19:47:28Z changi67 $

require_once ('tiki-setup.php');
require_once ('lib/integrator/integrator.php');
$access->check_feature('feature_integrator');
$access->check_permission(array('tiki_p_view_integrator'));
// Create instance of integrator
$integrator = new TikiIntegrator($dbTiki);
// Fill list of repositories
$repositories = $integrator->list_repositories(true);
$smarty->assign_by_ref('repositories', $repositories);
// Display the template
$smarty->assign('mid', 'tiki-list_integrator_repositories.tpl');
$smarty->display("tiki.tpl");
$access->check_feature('feature_integrator');
$access->check_permission(array('tiki_p_admin_integrator'));

// Setup local variables from request or set default values
$repID = isset($_REQUEST['repID']) ? $_REQUEST['repID'] : 0;
$name = isset($_REQUEST['name']) ? $_REQUEST['name'] : '';
$path = isset($_REQUEST['path']) ? $_REQUEST['path'] : '';
$start = isset($_REQUEST['start']) ? $_REQUEST['start'] : '';
$cssfile = isset($_REQUEST['cssfile']) ? $_REQUEST['cssfile'] : '';
$expiration = isset($_REQUEST['expiration']) ? $_REQUEST['expiration'] : 0;
$description = isset($_REQUEST['description']) ? $_REQUEST['description'] : '';
$vis = isset($_REQUEST['vis']) ? ($_REQUEST['vis'] == 'on' ? 'y' : 'n') : 'n';
$cacheable = isset($_REQUEST['cacheable']) ? ($_REQUEST['cacheable'] == 'on' ? 'y' : 'n') : 'n';

// Create instance of integrator
$integrator = new TikiIntegrator($dbTiki);

// Check if 'submit' pressed ...
if (isset($_REQUEST['save'])) {
	// ... and all mandatory paramaters r OK
	if (strlen($name) > 0) $integrator->add_replace_repository($repID, $name, $path, $start, $cssfile, $vis, $cacheable, $expiration, $description);
	else {
		$smarty->assign('msg', tra("Repository name can't be an empty"));
		$smarty->display('error.tpl');
		die;
	}
}

// Whether some action requested?
if (isset($_REQUEST['action'])) {
	switch ($_REQUEST['action']) {
Example #5
0
<?php

// (c) Copyright 2002-2015 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$
//this script may only be included - so its better to die if called directly.
$access->check_script($_SERVER['SCRIPT_NAME'], basename(__FILE__));
/*
 * Check location for Tiki Integrator script and setup aux CSS file if needed by repository
 */
include_once 'lib/integrator/integrator.php';
if (strpos($_SERVER['REQUEST_URI'], 'tiki-integrator.php') != 0 && isset($_REQUEST['repID'])) {
    // Create instance of integrator
    $integrator = new TikiIntegrator($dbTiki);
    $headerlib->add_cssfile($integrator->get_rep_css($_REQUEST['repID']), 20);
}
$description = isset($_REQUEST["description"]) ? $_REQUEST["description"] : '';
$rxmod = isset($_REQUEST["rxmod"]) ? $_REQUEST["rxmod"] : '';
$file = isset($_REQUEST["file"]) ? $_REQUEST["file"] : '';
$type = isset($_REQUEST["type"]) ? ($_REQUEST["type"] == 'on' ? 'y' : 'n') : 'n';
$casesense = isset($_REQUEST["casesense"]) ? ($_REQUEST["casesense"] == 'on' ? 'y' : 'n') : 'n';
$code = isset($_REQUEST["code"]) ? ($_REQUEST["code"] == 'on' ? 'y' : 'n') : 'n';
$html = isset($_REQUEST["html"]) ? ($_REQUEST["html"] == 'on' ? 'y' : 'n') : 'n';
$all = isset($_REQUEST["all"]) ? ($_REQUEST["all"] == 'on' ? 'y' : 'n') : 'n';
$enabled = isset($_REQUEST["enabled"]) ? ($_REQUEST["enabled"] == 'on' ? 'y' : 'n') : 'n';
if (!isset($_REQUEST["repID"]) || $repID <= 0) {
	$smarty->assign('msg', tra("No repository"));
	$smarty->display("error.tpl");
	die;
}
// Create instance of integrator
$integrator = new TikiIntegrator($dbTiki);
// Check if copy button pressed
if (isset($_REQUEST["copy"]) && ($srcrep > 0)) $integrator->copy_rules($srcrep, $repID);
// Check if 'save' button pressed ...
if (isset($_REQUEST["save"])) {
	// ... and all mandatory paramaters r OK
	if (strlen($srch) > 0) $integrator->add_replace_rule($repID, $ruleID, $ord, $srch, $repl, $type, $casesense, $rxmod, $enabled, $description);
	else {
		$smarty->assign('msg', tra("Search is mandatory field"));
		$smarty->display("error.tpl");
		die;
	}
}
// Check if 'preview' button pressed ...
if (isset($_REQUEST["preview"])) {
	// Prepeare rule data
Example #7
0
    $smarty->assign('favicon', "styles/{$tikidomain}/{$favicon}");
    $smarty->assign('favicon_type', "{$favicon_type}");
} elseif (is_file("{$favicon}")) {
    $smarty->assign('favicon', "{$favicon}");
    $smarty->assign('favicon_type', "{$favicon_type}");
} else {
    $smarty->assign('favicon', false);
}
/*
 * Check location for Tiki Integrator script and setup aux CSS file if needed by repository
 */
if ($feature_integrator == 'y') {
    include_once 'lib/integrator/integrator.php';
    if (strpos($_SERVER['REQUEST_URI'], 'tiki-integrator.php') != 0 && isset($_REQUEST['repID'])) {
        // Create instance of integrator
        $integrator = new TikiIntegrator($dbTiki);
        $integrator_css_file = $integrator->get_rep_css($_REQUEST['repID']);
        $smarty->assign('integrator_css_file', $integrator_css_file);
    }
}
/*
 * Register the search refresh function
 */
if ($feature_search == 'y') {
    include_once "lib/search/refresh.php";
    register_shutdown_function("refresh_search_index");
}
/*
 * Whether to show comments zone on page load by default
 */
if (isset($_REQUEST['comzone'])) {