本文整理汇总了PHP中ask_ticket函数的典型用法代码示例。如果您正苦于以下问题:PHP ask_ticket函数的具体用法?PHP ask_ticket怎么用?PHP ask_ticket使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ask_ticket函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wikiplugin_poll
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~';
}
示例2: wikiplugin_poll
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");
}
}
示例3: foreach
} 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");
示例4: tra
$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");
}
示例5: date
$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");
示例6: tra
// $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');
示例7: tempnam
$_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");
示例8: header
// 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");
示例9: json_encode
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");
示例10: header
<?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']);
示例11: check_ticket
$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");
示例12: ask_ticket
// 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");
示例13: check_ticket
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");
示例14: array
} 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");
示例15: tra
}
// 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)) {