<commit_before><?php
// (c) Copyright 2002-2010 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$

$section = 'sheet';
require_once ('tiki-setup.php');
require_once ('lib/sheet/grid.php');

$access->check_feature('feature_sheet');

$auto_query_args = array('sheetId');

if (!isset($_REQUEST["sheetId"])) {
	$_REQUEST["sheetId"] = 0;
	$info = array();
} else {
	$info = $sheetlib->get_sheet_info($_REQUEST["sheetId"]);
	if ($tiki_p_admin == 'y' || $tiki_p_admin_sheet == 'y' || $tikilib->user_has_perm_on_object($user, $_REQUEST['sheetId'], 'sheet', 'tiki_p_view_sheet')) $tiki_p_view_sheet = 'y';
	else $tiki_p_view_sheet = 'n';
	$smarty->assign('tiki_p_view_sheet', $tiki_p_view_sheet);
	if ($tiki_p_admin == 'y' || $tiki_p_admin_sheet == 'y' || ($user && $user == $info['author']) || $tikilib->user_has_perm_on_object($user, $_REQUEST['sheetId'], 'sheet', 'tiki_p_edit_sheet')) $tiki_p_edit_sheet = 'y';
	else $tiki_p_edit_sheet = 'n';
	$smarty->assign('tiki_p_edit_sheet', $tiki_p_edit_sheet);
	if ($tiki_p_admin == 'y' || $tiki_p_admin_sheet == 'y' || ($user && $user == $info['author']) || $tikilib->user_has_perm_on_object($user, $_REQUEST['sheetId'], 'sheet', 'tiki_p_view_sheet_history')) $tiki_p_view_sheet_history = 'y';
	else $tiki_p_view_sheet_history = 'n';
	$smarty->assign('tiki_p_view_sheet_history', $tiki_p_view_sheet_history);
}

$access->check_permission('tiki_p_view_sheet');

if (isset($_REQUEST["find"])) {
	$find = $_REQUEST["find"];
} else {
	$find = '';
}
$smarty->assign('find', $find);
$smarty->assign('sheetId', $_REQUEST["sheetId"]);
// Init smarty variables to blank values
$smarty->assign('title', '');
$smarty->assign('description', '');
$smarty->assign('edit_mode', 'n');
$smarty->assign('chart_enabled', (function_exists('imagepng') || function_exists('pdf_new')) ? 'y' : 'n');
// If we are editing an existing sheet prepare smarty variables
if (isset($_REQUEST["edit_mode"]) && $_REQUEST["edit_mode"]) {
	$access->check_permission('tiki_p_edit_sheet');
	check_ticket('sheet');
	// Get information about this sheetId and fill smarty variables
	$smarty->assign('edit_mode', 'y');
	if ($tiki_p_admin == 'y' || $tiki_p_admin_sheet == 'y') {
		$users = $tikilib->list_users(0, -1, 'login_asc', '', false);
		$smarty->assign_by_ref('users', $users['data']);<commit_msg>[MOD] headtitle for sheets page<commit_after><?php
// (c) Copyright 2002-2010 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$

$section = 'sheet';
require_once ('tiki-setup.php');
require_once ('lib/sheet/grid.php');

$access->check_feature('feature_sheet');

$auto_query_args = array('sheetId');

if (!isset($_REQUEST["sheetId"])) {
	$_REQUEST["sheetId"] = 0;
	$info = array();
	$smarty->assign('headtitle', tra('Spreadsheets'));
} else {
	$info = $sheetlib->get_sheet_info($_REQUEST["sheetId"]);
	if ($tiki_p_admin == 'y' || $tiki_p_admin_sheet == 'y' || $tikilib->user_has_perm_on_object($user, $_REQUEST['sheetId'], 'sheet', 'tiki_p_view_sheet')) $tiki_p_view_sheet = 'y';
	else $tiki_p_view_sheet = 'n';
	$smarty->assign('tiki_p_view_sheet', $tiki_p_view_sheet);
	if ($tiki_p_admin == 'y' || $tiki_p_admin_sheet == 'y' || ($user && $user == $info['author']) || $tikilib->user_has_perm_on_object($user, $_REQUEST['sheetId'], 'sheet', 'tiki_p_edit_sheet')) $tiki_p_edit_sheet = 'y';
	else $tiki_p_edit_sheet = 'n';
	$smarty->assign('tiki_p_edit_sheet', $tiki_p_edit_sheet);
	if ($tiki_p_admin == 'y' || $tiki_p_admin_sheet == 'y' || ($user && $user == $info['author']) || $tikilib->user_has_perm_on_object($user, $_REQUEST['sheetId'], 'sheet', 'tiki_p_view_sheet_history')) $tiki_p_view_sheet_history = 'y';
	else $tiki_p_view_sheet_history = 'n';
	$smarty->assign('tiki_p_view_sheet_history', $tiki_p_view_sheet_history);
	$smarty->assign('headtitle', tra('Spreadsheet - ') . $info['title']);
}

$access->check_permission('tiki_p_view_sheet');

if (isset($_REQUEST["find"])) {
	$find = $_REQUEST["find"];
} else {
	$find = '';
}
$smarty->assign('find', $find);
$smarty->assign('sheetId', $_REQUEST["sheetId"]);
// Init smarty variables to blank values
$smarty->assign('title', '');
$smarty->assign('description', '');
$smarty->assign('edit_mode', 'n');
$smarty->assign('chart_enabled', (function_exists('imagepng') || function_exists('pdf_new')) ? 'y' : 'n');
// If we are editing an existing sheet prepare smarty variables
if (isset($_REQUEST["edit_mode"]) && $_REQUEST["edit_mode"]) {
	$access->check_permission('tiki_p_edit_sheet');
	check_ticket('sheet');
	// Get information about this sheetId and fill smarty variables
	$smarty->assign('edit_mode', 'y');
	if ($tiki_p_admin == 'y' || $tiki_p_admin_sheet == 'y') {
		$users = $tikilib->list_users(0, -1, 'login_asc', '', false);
		$smarty->assign_by_ref('users', $users['data']);
{'fraction_non_alphanumeric': 0.20462110828274918, 'fraction_numerical': 0.004307812805952614, 'mean_word_length': 6.919379844961241, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 43, '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': '2306491', 'n_tokens_mistral': 1912, 'n_tokens_neox': 1880, 'n_words': 354}