function wikiplugin_poll($data, $params) { global $smarty, $polllib, $trklib, $tikilib, $dbTiki, $userlib, $tiki_p_admin, $prefs, $_REQUEST, $user; $default = array('showtitle' => 'y', 'showresult' => 'link', 'showtotal' => 'y'); $params = array_merge($default, $params); extract($params, EXTR_SKIP); if (!isset($pollId)) { return WikiParser_PluginOutput::argumentError(array('pollId')); } global $polllib; include_once 'lib/polls/polllib.php'; $poll_info = $polllib->get_poll($pollId); $options = $polllib->list_poll_options($pollId); $hasVoted = $tikilib->user_has_voted($user, 'poll' . $pollId); $ret = ''; $smarty->assign_by_ref('showresult', $showresult); $smarty->assign_by_ref('showtotal', $showtotal); $smarty->assign_by_ref('hasVoted', $hasVoted); $smarty->assign_by_ref('showtitle', $showtitle); if (!$hasVoted || $prefs['feature_poll_revote'] == 'y') { $smarty->assign_by_ref('menu_info', $poll_info); $smarty->assign_by_ref('channels', $options); $smarty->assign_by_ref('poll_title', $data); $smarty->assign('ownurl', $tikilib->httpPrefix() . $_SERVER['REQUEST_URI']); ask_ticket('poll-form'); $ret = $smarty->fetch('tiki-plugin_poll.tpl'); } if ($showresult == 'voted' && $hasVoted || $showresult == 'always') { $total = $polllib->options_percent($poll_info, $options); $poll_info['options'] = $options; $smarty->assign_by_ref('poll_info', $poll_info); $ret .= $smarty->fetch('tiki-poll_results_bar.tpl'); } return '~np~' . $ret . '~/np~'; }
function wikiplugin_poll($data, $params) { global $smarty, $polllib, $trklib, $tikilib, $dbTiki, $userlib, $tiki_p_admin, $maxRecords, $_REQUEST, $user; extract($params, EXTR_SKIP); if (!isset($pollId)) { $smarty->assign('msg', tra("missing poll ID for plugin POLL")); return $smarty->fetch("error_simple.tpl"); } else { include_once 'lib/polls/polllib.php'; $poll_info = $polllib->get_poll($pollId); $options = $polllib->list_poll_options($pollId); $smarty->assign_by_ref('menu_info', $poll_info); $smarty->assign_by_ref('channels', $options); $smarty->assign_by_ref('poll_title', $data); $smarty->assign('ownurl', $tikilib->httpPrefix() . $_SERVER["REQUEST_URI"]); ask_ticket('poll-form'); // Display the template return $smarty->fetch("tiki-plugin_poll.tpl"); } }
} else { $smarty->assign('next_offset', -1); } // If offset is > 0 then prev_offset if ($offset > 0) { $smarty->assign('prev_offset', $offset - $maxRecords); } else { $smarty->assign('prev_offset', -1); } if ($prefs['poll_list_categories'] == 'y') { foreach ($channels['data'] as $key => $channel) { $channels['data'][$key]['categories'] = $polllib->get_poll_categories($channel['pollId']); } } if ($prefs['poll_list_objects'] == 'y') { foreach ($channels['data'] as $key => $channel) { $channels['data'][$key]['objects'] = $polllib->get_poll_objects($channel['pollId']); } } $smarty->assign_by_ref('channels', $channels["data"]); $listPages = $tikilib->list_pageNames(); $smarty->assign_by_ref('listPages', $listPages['data']); $cat_type = 'poll'; $cat_objid = $_REQUEST["pollId"]; include_once "categorize_list.php"; ask_ticket('admin-polls'); // disallow robots to index page: $smarty->assign('metatag_robots', 'NOINDEX, NOFOLLOW'); // Display the template $smarty->assign('mid', 'tiki-admin_polls.tpl'); $smarty->display("tiki.tpl");
$smarty->assign('pendinganswer', $_REQUEST["suggested_answer"]); } else { if (!empty($_REQUEST["suggested_question"])) { $faqlib->add_suggested_faq_question($_REQUEST["faqId"], $_REQUEST["suggested_question"], $_REQUEST["suggested_answer"], $user); } else { $error = tra('You must suggest a question; please try again.'); $smarty->assign('error', $error); // Save the pending answer if question is empty $smarty->assign('pendinganswer', $_REQUEST["suggested_answer"]); } } } } $suggested = $faqlib->list_suggested_questions(0, -1, 'created_desc', '', $_REQUEST["faqId"]); $smarty->assign_by_ref('suggested', $suggested["data"]); $smarty->assign('suggested_cant', count($suggested["data"])); include_once 'tiki-section_options.php'; if ($prefs['feature_theme_control'] == 'y') { $cat_type = 'faq'; $cat_objid = $_REQUEST["faqId"]; include 'tiki-tc.php'; } ask_ticket('view-faq'); // Display the template $smarty->assign('mid', 'tiki-view_faq.tpl'); if (isset($_REQUEST['print'])) { $smarty->display('tiki-print.tpl'); $smarty->assign('print', 'y'); } else { $smarty->display("tiki.tpl"); }
$find = $_REQUEST["find"]; } else { $find = ''; } $smarty->assign('find', $find); $smarty->assign_by_ref('sort_mode', $sort_mode); if (isset($_SESSION['thedate'])) { $pdate = $_SESSION['thedate']; } else { $pdate = date("U"); } $channels = $notepadlib->list_notes($user, $offset, $maxRecords, $sort_mode, $find); $cant_pages = ceil($channels["cant"] / $maxRecords); $smarty->assign_by_ref('cant_pages', $cant_pages); $smarty->assign('actual_page', 1 + $offset / $maxRecords); if ($channels["cant"] > $offset + $maxRecords) { $smarty->assign('next_offset', $offset + $maxRecords); } else { $smarty->assign('next_offset', -1); } // If offset is > 0 then prev_offset if ($offset > 0) { $smarty->assign('prev_offset', $offset - $maxRecords); } else { $smarty->assign('prev_offset', -1); } $smarty->assign_by_ref('channels', $channels["data"]); include_once 'tiki-mytiki_shared.php'; ask_ticket('notepad-list'); $smarty->assign('mid', 'tiki-notepad_list.tpl'); $smarty->display("tiki.tpl");
// $Id$ require_once 'tiki-setup.php'; //check if feature is on $access->check_feature('feature_mailin'); $access->check_permission(array('tiki_p_admin_mailin')); $mailinlib = TikiLib::lib('mailin'); // List $accounts = $mailinlib->list_mailin_accounts(0, -1, 'account_asc', ''); $smarty->assign('accounts', $accounts['data']); if (isset($_REQUEST['mailin_autocheck'])) { if ($_REQUEST['mailin_autocheck'] == 'y' && !(preg_match('/[0-9]+/', $_REQUEST['mailin_autocheckFreq']) && $_REQUEST['mailin_autocheckFreq'] > 0)) { $smarty->assign('msg', tra('Frequency should be a positive integer!')); $smarty->display('error.tpl'); die; } else { $tikilib->set_preference('mailin_autocheck', $_REQUEST['mailin_autocheck']); $tikilib->set_preference('mailin_autocheckFreq', $_REQUEST['mailin_autocheckFreq']); if ($prefs['mailin_autocheck'] == 'y') { $tikifeedback[] = array('num' => 1, 'mes' => sprintf(tra('Mail-in accounts set to be checked every %s minutes'), $prefs['mailin_autocheckFreq'])); } else { $tikifeedback[] = array('num' => 1, 'mes' => sprintf(tra('Automatic Mail-in accounts checking disabled'))); } } } $artlib = TikiLib::lib('art'); $smarty->assign('tikifeedback', $tikifeedback); $smarty->assign('mailin_types', $mailinlib->list_available_types()); ask_ticket('admin-mailin'); // disallow robots to index page: $smarty->assign('metatag_robots', 'NOINDEX, NOFOLLOW'); $smarty->display('tiki-admin_mailin.tpl');
$_REQUEST["imageType"] = $imgtype; } $smarty->assign('imageData', $_REQUEST["imageData"]); $smarty->assign('tempimg', 'n'); if (strlen($_REQUEST["imageData"]) > 0) { $tmpfname = tempnam($tmpDir, "TMPIMG") . $imgname; $fp = fopen($tmpfname, "w"); if ($fp) { fwrite($fp, urldecode($_REQUEST["imageData"])); fclose($fp); $smarty->assign('tempimg', $tmpfname); $smarty->assign('hasImage', 'y'); } else { $smarty->assign('hasImage', 'n'); } } if (!isset($_REQUEST["create_zone"])) { $bannerId = $bannerlib->replace_banner($_REQUEST["bannerId"], $_REQUEST["client"], $_REQUEST["url"], '', '', $_REQUEST["use"], $_REQUEST["imageData"], $_REQUEST["imageType"], $_REQUEST["imageName"], $_REQUEST["HTMLData"], $_REQUEST["fixedURLData"], $_REQUEST["textData"], $fromDate, $toDate, $useDates, $Dmon, $Dtue, $Dwed, $Dthu, $Dfri, $Dsat, $Dsun, $fromTime, $toTime, $_REQUEST["maxImpressions"], $_REQUEST["zone"]); $smarty->assign('bannerId', $bannerId); } } $zones = $bannerlib->banner_get_zones(); $smarty->assign_by_ref('zones', $zones); $clients = $userlib->get_users(0, -1, 'login_desc', ''); $smarty->assign_by_ref('clients', $clients["data"]); ask_ticket('edit-banner'); // disallow robots to index page: $smarty->assign('metatag_robots', 'NOINDEX, NOFOLLOW'); // Display the template $smarty->assign('mid', 'tiki-edit_banner.tpl'); $smarty->display("tiki.tpl");
// If the page doesn't exist then display an error if (!$tikilib->page_exists($page)) { if (count($likepages) == 1) { header("Status: 402 Found"); /* PHP3 */ header("HTTP/1.0 402 Found"); /* PHP4 */ header("Location: tiki-index.php?page={$likepages['0']}"); die; } $smarty->assign('page_exists', 'n'); if (count($likepages) < 1) { header("Status: 404 Not Found"); /* PHP3 */ header("HTTP/1.0 404 Not Found"); /* PHP4 */ $smarty->assign('headtitle', tra("Page cannot be found")); $smarty->assign('errortitle', tra("Page cannot be found") . " (404)"); $smarty->assign('errortype', '404'); $smarty->display("error.tpl"); die; } } $smarty->assign_by_ref('likepages', $likepages); ask_ticket('likepages'); // disallow robots to index page: $smarty->assign('metatag_robots', 'NOINDEX, NOFOLLOW'); include_once 'tiki-section_options.php'; // Display the template $smarty->assign('mid', 'tiki-likepages.tpl'); $smarty->display("tiki.tpl");
if (strpos($k, 'feature') !== false && preg_match_all('/_/m', $k, $m) === 1) { $feature_prefs[] = $k; } } $headerlib->add_js('var prefNames = ' . json_encode($feature_prefs) . ';'); $smarty->assign_by_ref('maxRecords', $maxRecords); $smarty->assign_by_ref('sort_mode', $sort_mode); $allchannels = $menulib->list_menu_options($_REQUEST["menuId"], 0, -1, $sort_mode, $find); $allchannels = $menulib->sort_menu_options($allchannels); $channels = $menulib->list_menu_options($_REQUEST["menuId"], $offset, $maxRecords, $sort_mode, $find, true); $channels = $menulib->describe_menu_types($channels); $smarty->assign_by_ref('cant_pages', $channels["cant"]); $smarty->assign_by_ref('channels', $channels["data"]); $smarty->assign_by_ref('allchannels', $allchannels["data"]); if (isset($info['groupname']) && !is_array($info['groupname'])) { $info['groupname'] = explode(',', $info['groupname']); } $all_groups = $userlib->list_all_groups(); if (is_array($all_groups)) { foreach ($all_groups as $g) { $option_groups[$g] = is_array($info['groupname']) && in_array($g, $info['groupname']) ? 'selected="selected"' : ''; } } $smarty->assign_by_ref('option_groups', $option_groups); $smarty->assign('escape_menu_labels', $prefs['menus_item_names_raw'] === 'n' && $editable_menu_info['parse'] === 'n'); ask_ticket('admin-menu-options'); // disallow robots to index page: $smarty->assign('metatag_robots', 'NOINDEX, NOFOLLOW'); // Display the template $smarty->assign('mid', 'tiki-admin_menu_options.tpl'); $smarty->display("tiki.tpl");
<?php // (c) Copyright 2002-2013 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: include_blogs.php 44444 2013-01-05 21:24:24Z changi67 $ // This script may only be included - so its better to die if called directly. if (strpos($_SERVER['SCRIPT_NAME'], basename(__FILE__)) !== false) { header('location: index.php'); exit; } if (isset($_REQUEST['bloglistconf'])) { check_ticket('admin-inc-blogs'); } if (isset($_REQUEST['blogcomprefs'])) { check_ticket('admin-inc-blogs'); } ask_ticket('admin-inc-blogs'); $smarty->assign_by_ref('blogs', $blogs['data']);
$access->check_feature('feature_search_stats'); $access->check_permission('tiki_p_admin'); if (isset($_REQUEST["clear"])) { check_ticket('search-stats'); $searchstatslib->clear_search_stats(); } if (!isset($_REQUEST["sort_mode"])) { $sort_mode = 'hits_desc'; } else { $sort_mode = $_REQUEST["sort_mode"]; } if (!isset($_REQUEST["offset"])) { $offset = 0; } else { $offset = $_REQUEST["offset"]; } $smarty->assign_by_ref('offset', $offset); if (isset($_REQUEST["find"])) { $find = $_REQUEST["find"]; } else { $find = ''; } $smarty->assign('find', $find); $smarty->assign_by_ref('sort_mode', $sort_mode); $channels = $searchstatslib->list_search_stats($offset, $maxRecords, $sort_mode, $find); $smarty->assign_by_ref('cant_pages', $channels["cant"]); $smarty->assign_by_ref('channels', $channels["data"]); ask_ticket('search-stats'); // Display the template $smarty->assign('mid', 'tiki-search_stats.tpl'); $smarty->display("tiki.tpl");
// 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 = 'publishDate_desc'; } else { $sort_mode = $_REQUEST["sort_mode"]; } $smarty->assign_by_ref('sort_mode', $sort_mode); if (!isset($_REQUEST["offset"])) { $offset = 0; } else { $offset = $_REQUEST["offset"]; } $smarty->assign_by_ref('offset', $offset); if (isset($_REQUEST["find"])) { $find = $_REQUEST["find"]; } else { $find = ''; } $smarty->assign('find', $find); // Get a list of last changes to the Wiki database $listpages = $dcslib->list_programmed_content($_REQUEST["contentId"], $offset, $maxRecords, $sort_mode, $find); $smarty->assign_by_ref('cant', $listpages["cant"]); $smarty->assign_by_ref('listpages', $listpages["data"]); ask_ticket('edit-programmed-content'); // disallow robots to index page: $smarty->assign('metatag_robots', 'NOINDEX, NOFOLLOW'); // Display the template $smarty->assign('mid', 'tiki-edit_programmed_content.tpl'); $smarty->display("tiki.tpl");
check_ticket('user-modules'); $usermoduleslib->down_user_module($_REQUEST["down"], $user); } if (isset($_REQUEST["left"])) { check_ticket('user-modules'); $usermoduleslib->set_column_user_module($_REQUEST["left"], $user, 'l'); } if (isset($_REQUEST["right"])) { check_ticket('user-modules'); $usermoduleslib->set_column_user_module($_REQUEST["right"], $user, 'r'); } $orders = array(); for ($i = 1; $i < 50; $i++) { $orders[] = $i; } $smarty->assign_by_ref('orders', $orders); $assignables = $usermoduleslib->get_user_assignable_modules($user); if (count($assignables) > 0) { $smarty->assign('canassign', 'y'); } else { $smarty->assign('canassign', 'n'); } $modules = $usermoduleslib->get_user_assigned_modules($user); $smarty->assign('modules_l', $usermoduleslib->get_user_assigned_modules_pos($user, 'l')); $smarty->assign('modules_r', $usermoduleslib->get_user_assigned_modules_pos($user, 'r')); $smarty->assign_by_ref('assignables', $assignables); $smarty->assign_by_ref('modules', $modules); include_once 'tiki-mytiki_shared.php'; ask_ticket('user-modules'); $smarty->assign('mid', 'tiki-user_assigned_modules.tpl'); $smarty->display("tiki.tpl");
} else { $smarty->assign('next_offset', -1); } if ($offset > 0) { $smarty->assign('prev_offset', $offset - $maxRecords); } else { $smarty->assign('prev_offset', -1); } $smarty->assign_by_ref('mapitems', $mapitems["data"]); //MAPPING if (!isset($_REQUEST['sort_mode2'])) { $_REQUEST['sort_mode2'] = 'name_asc'; } $smarty->assign('sort_mode2', $_REQUEST['sort_mode2']); // Get all the process roles $all_roles = $roleManager->list_roles($_REQUEST['pid'], 0, -1, $_REQUEST['sort_mode2'], ''); $smarty->assign_by_ref('items', $all_roles['data']); $valid = $activityManager->validate_process_activities($_REQUEST['pid']); $proc_info['isValid'] = $valid ? 'y' : 'n'; $errors = array(); if (!$valid) { $errors = $activityManager->get_error(); } $smarty->assign('errors', $errors); $smarty->assign('proc_info', $proc_info); $sameurl_elements = array('offset', 'sort_mode', 'where', 'find', 'offset2', 'find2', 'sort_mode2', 'where2', 'pid'); ask_ticket('g-admin-roles'); // disallow robots to index page: $smarty->assign('metatag_robots', 'NOINDEX, NOFOLLOW'); $smarty->assign('mid', 'tiki-g-admin_roles.tpl'); $smarty->display("tiki.tpl");
} // do_forum } //report != y $smarty->assign('errortype', 'no_redirect_login'); if ($ok && $report == 'y') { $access->redirect($_REQUEST['url'], tra('Your link was sent.')); } $smarty->assign('sent', true); } $smarty->assign_by_ref('errors', $errors); } else { $smarty->assign_by_ref('name', $user); $smarty->assign('email', $userlib->get_user_email($user)); } ask_ticket('share'); $smarty->assign('mid', 'tiki-share.tpl'); $smarty->display('tiki.tpl'); /** * * Validates the given recipients and returns false on error or an array containing the recipients on success * @param array|string $recipients list of recipients as an array or a comma/semicolon separated list * @return array|bool */ function checkAddresses($recipients, $error = true) { global $errors, $prefs, $user; global $registrationlib, $userlib, $logslib; include_once 'lib/registration/registrationlib.php'; $e = array(); if (!is_array($recipients)) {
if ($g != 'Anonymous') { $addedGroupsDesc[] = $g; } } if (isset($_REQUEST[$g]) && $_REQUEST[$g] == 'cat_remove_desc') { $categlib->group_unwatch_category_and_descendants($g, $_REQUEST['objectId'], false); if ($g != 'Anonymous') { $deletedGroupsDesc[] = $g; } } } $smarty->assign_by_ref('addedGroupsDesc', $addedGroupsDesc); $smarty->assign_by_ref('deletedGroupsDesc', $deletedGroupsDesc); if (!empty($addedGroupsDesc) || !empty($deletedGroupsDesc)) { foreach ($extendedTargets as $d) { $catinfo = $categlib->get_category($d); $catTreeNodes[] = array('id' => $catinfo['categId'], 'parent' => $catinfo['parentId'], 'data' => $catinfo['name']); } include_once 'lib/tree/BrowseTreeMaker.php'; $tm = new BrowseTreeMaker('categ'); $res = $tm->make_tree($catTreeNodes[0]['parent'], $catTreeNodes); $smarty->assign('tree', $res); } } } else { $group_watches = $tikilib->get_groups_watching($_REQUEST['objectId'], $_REQUEST['watch_event'], $objectType); } $smarty->assign_by_ref('group_watches', $group_watches); ask_ticket('object_watches'); $smarty->assign('mid', 'tiki-object_watches.tpl'); $smarty->display('tiki.tpl');
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. //this script may only be included - so its better to die if called directly. if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) { header("location: index.php"); exit; } if (isset($_REQUEST["mouseoverfeatures"])) { check_ticket('admin-inc-community'); simple_set_toggle("feature_community_mouseover"); simple_set_toggle("feature_community_mouseover_name"); simple_set_toggle("feature_community_mouseover_picture"); simple_set_toggle("feature_community_mouseover_friends"); simple_set_toggle("feature_community_mouseover_score"); simple_set_toggle("feature_community_mouseover_country"); simple_set_toggle("feature_community_mouseover_email"); simple_set_toggle("feature_community_mouseover_lastlogin"); simple_set_toggle("feature_community_mouseover_distance"); } /* This is desired future feature if (isset($_REQUEST["friendshipfeatures"])) { check_ticket('admin-inc-community'); simple_set_toggle("feature_community_friends_permission"); simple_set_int("feature_community_friends_permission_dep"); } */ ask_ticket('admin-inc-community'); ?>
$smarty->assign('resultscale', $resultscale); if ($resultscale) { $info = $imagegallib->get_image_info($imageId, 's', $resultscale); $smarty->assign('xsize_scaled', $info["xsize"]); $smarty->assign('ysize_scaled', $info["ysize"]); } $smarty->assign_by_ref('scaleinfo', $scaleinfo); include_once 'tiki-section_options.php'; if ($prefs['feature_theme_control'] == 'y') { $cat_type = 'image gallery'; $cat_objid = $galleryId; include 'tiki-tc.php'; } // now set it if needed if ($popup) { $prefs['feature_left_column'] = 'n'; $prefs['feature_right_column'] = 'n'; } ask_ticket('browse-image'); //add a hit $statslib->stats_hit($info["name"], "image", $imageId); if ($prefs['feature_actionlog'] == 'y') { $logslib->add_action('Viewed', $galleryId, 'image gallery'); } // Display the template if ($popup) { $smarty->display("tiki-browse_image.tpl"); } else { $smarty->assign('mid', 'tiki-browse_image.tpl'); $smarty->display("tiki.tpl"); }
$tikilib->set_preference('rowImagesGalleries', $_REQUEST['rowImages']); $tikilib->set_preference('thumbSizeXGalleries', $_REQUEST['thumbSizeX']); $tikilib->set_preference('thumbSizeYGalleries', $_REQUEST['thumbSizeY']); $tikilib->set_preference('scaleSizeGalleries', $_REQUEST['scaleSize']); $smarty->assign('maxRows', $_REQUEST['maxRows']); $smarty->assign('rowImages', $_REQUEST['rowImages']); $smarty->assign('thumbSizeX', $_REQUEST['thumbSizeX']); $smarty->assign('thumbSizeY', $_REQUEST['thumbSizeY']); $smarty->assign('scaleSize', $_REQUEST['scaleSize']); if ($imagegallib->havegd) { $gdlib = tra('Detected, Version:') . ' ' . $imagegallib->gdversion . ' (' . tra('Test Image') . ': <img src="tiki-testGD.php" alt="" />)'; } else { $gdlib = tra('Not detected.'); } if ($imagegallib->haveimagick) { $imagicklib = tra('Detected, Version:') . ' ' . tra('Unknown'); } else { $imagicklib = tra('Not detected.'); } $smarty->assign('gdlib', $gdlib); $smarty->assign('imagicklib', $imagicklib); if ($prefs['feature_categories'] == 'y') { include_once 'lib/categories/categlib.php'; $catree = $categlib->getCategories(NULL, true, false); $smarty->assign('catree', $catree); } $galleries = $imagegallib->list_visible_galleries(0, -1, 'name_desc', 'admin', ''); $smarty->assign_by_ref('galleries', $galleries['data']); $smarty->assign('max_img_upload_size', $imagegallib->max_img_upload_size()); ask_ticket('admin-inc-gal');
$sort_mode = $_REQUEST["sort_mode"]; } $smarty->assign_by_ref('sort_mode', $sort_mode); // If offset is set use it if not then use offset =0 // use the maxRecords php variable to set the limit // if sortMode is not set then use lastModif_desc if (!isset($_REQUEST["offset"])) { $offset = 0; } else { $offset = $_REQUEST["offset"]; } $smarty->assign_by_ref('offset', $offset); if (isset($_REQUEST["find"])) { $find = $_REQUEST["find"]; } else { $find = ''; } $smarty->assign('find', $find); // Get a list of last changes to the Wiki database if ($tiki_p_admin_banners == 'y') { $who = 'admin'; } else { $who = $user; } $listpages = $bannerlib->list_banners($offset, $maxRecords, $sort_mode, $find, $who); $smarty->assign_by_ref('cant_pages', $listpages["cant"]); $smarty->assign_by_ref('listpages', $listpages["data"]); ask_ticket('list-banners'); $smarty->assign('mid', 'tiki-list_banners.tpl'); $smarty->display("tiki.tpl");
} else { $ingroups = ''; } $users = $userlib->get_groups($offset, $maxRecords, $sort_mode, $find, '', 'y', $ingroups, $userChoice); foreach ($users['data'] as $key => $group) { if (isset($user_info['groups'][$group['groupName']])) { $users['data'][$key]['what'] = $user_info['groups'][$group['groupName']]; } } $cant_pages = ceil($users["cant"] / $maxRecords); $smarty->assign_by_ref('cant_pages', $cant_pages); $smarty->assign('actual_page', 1 + $offset / $maxRecords); if ($users["cant"] > $offset + $maxRecords) { $smarty->assign('next_offset', $offset + $maxRecords); } else { $smarty->assign('next_offset', -1); } // If offset is > 0 then prev_offset if ($offset > 0) { $smarty->assign('prev_offset', $offset - $maxRecords); } else { $smarty->assign('prev_offset', -1); } // Get users (list of users) $smarty->assign_by_ref('users', $users["data"]); ask_ticket('admin-assign-user'); // disallow robots to index page: $smarty->assign('metatag_robots', 'NOINDEX, NOFOLLOW'); // Display the template $smarty->assign('mid', 'tiki-assignuser.tpl'); $smarty->display("tiki.tpl");
} } else { $listpages["data"][$i]["individual"] = 'n'; } } // If there're more records then assign next_offset $cant_pages = ceil($listpages["cant"] / $maxRecords); $smarty->assign_by_ref('cant_pages', $cant_pages); $smarty->assign('actual_page', 1 + $offset / $maxRecords); if ($listpages["cant"] > $offset + $maxRecords) { $smarty->assign('next_offset', $offset + $maxRecords); } else { $smarty->assign('next_offset', -1); } // If offset is > 0 then prev_offset if ($offset > 0) { $smarty->assign('prev_offset', $offset - $maxRecords); } else { $smarty->assign('prev_offset', -1); } $smarty->assign_by_ref('listpages', $listpages["data"]); $smarty->assign_by_ref('cant', $listpages["cant"]); include_once 'tiki-section_options.php'; if ($prefs['feature_mobile'] == 'y' && isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'mobile') { include_once "lib/hawhaw/hawtikilib.php"; HAWTIKI_list_blogs($listpages, $tiki_p_read_blog); } ask_ticket('list-blogs'); // Display the template $smarty->assign('mid', 'tiki-list_blogs.tpl'); $smarty->display("tiki.tpl");
if ($channels["cant"] > $offset + $maxRecords) { $smarty->assign('next_offset', $offset + $maxRecords); } else { $smarty->assign('next_offset', -1); } // If offset is > 0 then prev_offset if ($offset > 0) { $smarty->assign('prev_offset', $offset - $maxRecords); } else { $smarty->assign('prev_offset', -1); } $smarty->assign('channels', $channels["data"]); } $upcoming = $minicallib->minical_list_events_from_date($user, 0, $minical_upcoming, 'start_asc', '', $pdate_h); $smarty->assign('upcoming', $upcoming['data']); $hours = range(0, 23); $smarty->assign('hours', $hours); $minutes = range(0, 59); $smarty->assign('minutes', $minutes); $duration_hours = $info['duration'] / (60 * 60); $duration_minutes = $info['duration'] % (60 * 60); $smarty->assign('duration_hours', $duration_hours); $smarty->assign('duration_minutes', $duration_minutes); $topics = $minicallib->minical_list_topics($user, 0, -1, 'name_asc', ''); $smarty->assign('topics', $topics['data']); $section = 'calendar'; include_once 'tiki-section_options.php'; include_once 'tiki-mytiki_shared.php'; ask_ticket('minical'); $smarty->assign('mid', 'tiki-minical.tpl'); $smarty->display("tiki.tpl");
$smarty->assign_by_ref('blog_stats', $blog_stats); if ($prefs['feature_polls'] == 'y') { $poll_stats = $statslib->poll_stats(); } else { $poll_stats = false; } $smarty->assign_by_ref('poll_stats', $poll_stats); if ($prefs['feature_faqs'] == 'y') { $faq_stats = $statslib->faq_stats(); } else { $faq_stats = false; } $smarty->assign_by_ref('faq_stats', $faq_stats); if ($prefs['feature_quizzes'] == 'y') { $quiz_stats = $statslib->quiz_stats(); } else { $quiz_stats = false; } $smarty->assign_by_ref('quiz_stats', $quiz_stats); $user_stats = $statslib->user_stats(); $smarty->assign_by_ref('user_stats', $user_stats); $site_stats = $statslib->site_stats(); $smarty->assign_by_ref('site_stats', $site_stats); $best_objects_stats = $statslib->best_overall_object_stats(20); $smarty->assign_by_ref('best_objects_stats', $best_objects_stats); $best_objects_stats_lastweek = $statslib->best_overall_object_stats(20, 7); $smarty->assign_by_ref('best_objects_stats_lastweek', $best_objects_stats_lastweek); ask_ticket('stats'); // Display the template $smarty->assign('mid', 'tiki-stats.tpl'); $smarty->display("tiki.tpl");
} else { $find = ''; } $smarty->assign('find', $find); $smarty->assign_by_ref('sort_mode', $sort_mode); $channels = $templateslib->list_all_templates($offset, $maxRecords, $sort_mode, $find); $cant_pages = ceil($channels["cant"] / $maxRecords); $smarty->assign_by_ref('cant_pages', $cant_pages); $smarty->assign('actual_page', 1 + $offset / $maxRecords); if ($channels["cant"] > $offset + $maxRecords) { $smarty->assign('next_offset', $offset + $maxRecords); } else { $smarty->assign('next_offset', -1); } // If offset is > 0 then prev_offset if ($offset > 0) { $smarty->assign('prev_offset', $offset - $maxRecords); } else { $smarty->assign('prev_offset', -1); } $smarty->assign_by_ref('channels', $channels["data"]); include_once "textareasize.php"; include_once 'lib/quicktags/quicktagslib.php'; $quicktags = $quicktagslib->list_quicktags(0, -1, 'taglabel_desc', '', 'wiki'); $smarty->assign_by_ref('quicktags', $quicktags["data"]); ask_ticket('admin-content-templates'); // disallow robots to index page: $smarty->assign('metatag_robots', 'NOINDEX, NOFOLLOW'); // Display the template $smarty->assign('mid', 'tiki-admin_content_templates.tpl'); $smarty->display("tiki.tpl");
include_once "categorize.php"; require_once 'tiki-sefurl.php'; $smarty->loadPlugin('smarty_modifier_sefurl'); $url = smarty_modifier_sefurl($postId, 'blogpost'); header("location: {$url}"); exit; } if ($contribution_needed) { $smarty->assign('title', $_REQUEST["title"]); $smarty->assign('parsed_data', $tikilib->parse_data($_REQUEST['data'], array('is_html' => $is_wysiwyg))); $smarty->assign('data', $_REQUEST['data']); if ($prefs['feature_freetags'] == 'y') { $smarty->assign('taglist', $_REQUEST["freetag_string"]); } } $cat_type = 'blog post'; $cat_objid = $postId; include_once "categorize_list.php"; if ($prefs['geo_locate_blogpost'] == 'y') { $smarty->assign('geolocation_string', TikiLib::lib('geo')->get_coordinates_string('blog post', $postId)); } include_once 'tiki-section_options.php'; if ($prefs['feature_contribution'] == 'y') { include_once 'contribution.php'; } ask_ticket('blog'); // disallow robots to index page: $smarty->assign('metatag_robots', 'NOINDEX, NOFOLLOW'); // Display the Index Template $smarty->assign('mid', 'tiki-blog_post.tpl'); $smarty->display("tiki.tpl");
<?php // (c) Copyright 2002-2013 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: include_security.php 51166 2014-05-07 16:00:38Z arildb $ //this script may only be included - so its better to die if called directly. if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) { header("location: index.php"); exit; } if (isset($_REQUEST["security"])) { check_ticket('admin-inc-security'); } if (!extension_loaded('mcrypt')) { global $smarty; $smarty->assign('no_mcrypt', 'y'); } ask_ticket('admin-inc-security');
<?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: include_metrics.php 39469 2012-01-12 21:13:48Z changi67 $ //this script may only be included - so its better to die if called directly. if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) { header("location: index.php"); exit; } check_ticket('admin-inc-metrics'); ask_ticket('admin-inc-metrics');
} $handler =& new TikiSheetDatabaseHandler($sheetId); $grid->export($handler); ob_start(); $handler =& new TikiSheetOutputHandler(); $grid->export($handler); $smarty->assign("grid_content", ob_get_contents()); ob_end_clean(); } else { $list = array(); $handlers = TikiSheet::getHandlerList(); foreach ($handlers as $key => $handler) { $temp =& new $handler(); if (!$temp->supports(TIKISHEET_LOAD_DATA | TIKISHEET_LOAD_CALC)) { continue; } $list[$key] = array("name" => $temp->name(), "version" => $temp->version(), "class" => $handler); } $smarty->assign_by_ref("handlers", $list); } $cat_type = 'sheet'; $cat_objid = $_REQUEST["sheetId"]; include_once "categorize_list.php"; $section = 'sheet'; include_once 'tiki-section_options.php'; ask_ticket('sheet'); // disallow robots to index page: $smarty->assign('metatag_robots', 'NOINDEX, NOFOLLOW'); // Display the template $smarty->assign('mid', 'tiki-import-sheets.tpl'); $smarty->display("tiki.tpl");
$smarty->display("error.tpl"); die; } if (empty($_REQUEST['oldpass']) && !empty($_REQUEST['actpass'])) { $_REQUEST['oldpass'] = $userlib->activate_password($_REQUEST['user'], $_REQUEST['actpass']); if (empty($_REQUEST['oldpass'])) { $smarty->assign('msg', tra('Invalid username or activation code. Maybe this code has already been used.')); $smarty->display('error.tpl'); die; } } // Check that provided user name could log in with old password, otherwise display error and exit list($isvalid, $_REQUEST["user"], $error) = $userlib->validate_user($_REQUEST["user"], $_REQUEST["oldpass"], '', ''); if (!$isvalid) { $smarty->assign('msg', tra("Invalid old password or unknown user")); $smarty->display("error.tpl"); die; } $userlib->change_user_password($_REQUEST["user"], $_REQUEST["pass"]); // Login the user and display Home page $_SESSION["{$user_cookie_site}"] = $_REQUEST["user"]; header('Location: ' . $prefs['tikiIndex']); } ask_ticket('change-password'); // Display the template global $prefs; $prefs['language'] = $tikilib->get_user_preference($_REQUEST["user"], "language", $prefs['site_language']); // disallow robots to index page: $smarty->assign('metatag_robots', 'NOINDEX, NOFOLLOW'); $smarty->assign('mid', 'tiki-change_password.tpl'); $smarty->display("tiki.tpl");