<commit_before><?php

// $Header: /cvsroot/tikiwiki/tiki/tiki-graph_sheet.php,v 1.3 2005-12-26 19:55:38 lphuberdeau Exp $

// Based on tiki-galleries.php
// Copyright (c) 2002-2005, <NAME>, <NAME>, <NAME>, 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/sheet/grid.php');
require_once ('lib/graph-engine/gd.php');
require_once ('lib/graph-engine/pdflib.php');
require_once ('lib/graph-engine/graph.pie.php');
require_once ('lib/graph-engine/graph.bar.php');
require_once ('lib/graph-engine/graph.multiline.php');

function handle_series( $serie, &$sheet )
{
	if( !$range = $sheet->getRange( $serie ) )
		$range = explode( ', ', $serie );

	if( !is_array( $range ) )
		return array();

	return $range;
}

// Various validations {{{1

// Now check permissions to access this page
if ($feature_sheet != 'y') {
	$smarty->assign('msg', tra("This feature is disabled").": feature_sheets, feature_charts");

	$smarty->display("error.tpl");
	die;
}

if ($tiki_p_view_sheet != 'y' && $tiki_p_admin != 'y' && $tiki_p_admin_sheet != 'y') {
	$smarty->assign('msg', tra("Access Denied").": feature_sheets");

	$smarty->display("error.tpl");
	die;
}

// This condition will be removed when a php-based renderer will be written
if( !function_exists( 'pdf_new' ) && !function_exists( 'imagepng' ) )<commit_msg>Changing the way custom series are handled.<commit_after><?php

// $Header: /cvsroot/tikiwiki/tiki/tiki-graph_sheet.php,v 1.4 2005-12-26 20:02:25 lphuberdeau Exp $

// Based on tiki-galleries.php
// Copyright (c) 2002-2005, <NAME>, <NAME>, <NAME>, 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/sheet/grid.php');
require_once ('lib/graph-engine/gd.php');
require_once ('lib/graph-engine/pdflib.php');
require_once ('lib/graph-engine/graph.pie.php');
require_once ('lib/graph-engine/graph.bar.php');
require_once ('lib/graph-engine/graph.multiline.php');

function handle_series( $serie, &$sheet )
{
	if( !$range = $sheet->getRange( $serie ) )
		$range = array_map( 'trim', explode( ',', $serie ) );

	if( !is_array( $range ) )
		return array();

	return $range;
}

// Various validations {{{1

// Now check permissions to access this page
if ($feature_sheet != 'y') {
	$smarty->assign('msg', tra("This feature is disabled").": feature_sheets, feature_charts");

	$smarty->display("error.tpl");
	die;
}

if ($tiki_p_view_sheet != 'y' && $tiki_p_admin != 'y' && $tiki_p_admin_sheet != 'y') {
	$smarty->assign('msg', tra("Access Denied").": feature_sheets");

	$smarty->display("error.tpl");
	die;
}

// This condition will be removed when a php-based renderer will be written
if( !function_exists( 'pdf_new' ) && !function_exists( 'imagepng' ) )
{'fraction_non_alphanumeric': 0.17871222076215507, 'fraction_numerical': 0.0164257555847569, 'mean_word_length': 4.638888888888889, 'pattern_counts': {'":': 4, '<': 11, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3702200', 'n_tokens_mistral': 1120, 'n_tokens_neox': 1069, 'n_words': 266}