本文整理汇总了PHP中jTipsGetParam函数的典型用法代码示例。如果您正苦于以下问题:PHP jTipsGetParam函数的具体用法?PHP jTipsGetParam怎么用?PHP jTipsGetParam使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了jTipsGetParam函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: title
/**
* Display the page title and set the document title based on parameters
* // BUG 349 - support for Page Title menu item parameter option
*
* @since 2.1.10
*/
function title()
{
global $mainframe, $jTips;
$view = jTipsGetParam($_REQUEST, 'view', 'Dashboard');
$default_title = jTipsGetParam($jTips['Menu'], $view, 'jTips');
if (isJoomla15()) {
$document =& JFactory::getDocument();
$params =& $mainframe->getParams();
// Page Title
$menus =& JSite::getMenu();
$menu = $menus->getActive();
if (is_object($menu)) {
$menu_params = new JParameter($menu->params);
if (!$menu_params->get('page_title')) {
$params->set('page_title', JText::_($default_title));
}
} else {
$params->set('page_title', JText::_($default_title));
}
$document->setTitle($params->get('page_title'));
if ($params->def('show_page_title', 0)) {
?>
<div class="componentheading<?php
echo $params->get('pageclass_sfx');
?>
">
<?php
echo html_entity_decode(stripslashes($params->get('page_title')));
?>
</div>
<?php
}
} else {
$mainframe->setPageTitle($default_title);
if (!empty($jTips['Title'])) {
?>
<h1 class='componentheading jmain_heading'><?php
echo $jTips['Title'];
?>
</h1>
<?php
}
}
}
示例2: ob_clean
/**
* Website: www.jtips.com.au
* @author Jeremy Roberts
* @copyright Copyright © 2009, jTips
* @license Commercial - See website for details
*
* @since 2.1 - 16/10/2008
* @version 2.1
* @package jTips
*
* Description:
*/
global $database, $mosConfig_absolute_path;
ob_clean();
require_once $mosConfig_absolute_path . '/administrator/components/com_jtips/classes/jbadword.class.php';
$comment = jTipsGetParam($_REQUEST, 'comment', '');
$jBad = new jBadWord($database);
$badwords = forceArray($jBad->loadByParams(array()));
$count = $deleted = $replaced = 0;
$results = array();
foreach ($badwords as $jBadWord) {
$search = '/' . $jBadWord->badword . '/' . ($jBadWord->match_case == 1 ? 'i' : '');
$found = preg_match_all($search, $comment, $matches);
if ($found > 0) {
$count++;
$found = $found + $jBadWord->hits;
$jBadWord->hits = $found;
if ($jBadWord->action == 'delete') {
$deleted++;
array_push($results, 0);
} else {
示例3: ob_clean
/**
* Website: www.jtips.com.au
* @author Jeremy Roberts
* @copyright Copyright © 2009, jTips
* @license Commercial - See website for details
*
* @since 2.1 - 09/10/2008
* @version 2.1
* @package jTips
*
* Description:
*/
global $database;
if (!class_exists('jSeason')) {
require_once 'components/com_jtips/classes/jseason.class.php';
}
ob_clean();
$season_id = jTipsGetParam($_REQUEST, 'season_id', false);
if (!$season_id) {
die(@json_encode(new stdClass()));
}
$jSeason = new jSeason($database);
$jSeason->load($season_id);
//$season = json_encode($jSeason);
foreach ($jSeason as $key => $val) {
if (!property_exists($jSeason, $key) or substr($key, 0, 1) == '_') {
unset($jSeason->{$key});
}
}
//suppress errors for unsupported types
die(@json_encode($jSeason));
示例4: jTeam
* @license Commercial - See website for details
*
* @since 2.1 - 01/10/2008
* @version 2.1
* @package jTips
*
* Description: Load an existing team, or prepare a new one.
* Load the form fields and prepare for editing
*/
//This breaks the shortcuts on the dashboard
//jTipsSpoofCheck();
global $database;
require_once 'components/com_jtips/classes/jseason.class.php';
require_once 'components/com_jtips/classes/jteam.class.php';
$jTeam = new jTeam($database);
$ids = jTipsGetParam($_REQUEST, 'cid', array());
//Do we have an existing Season?
$id = array_shift($ids);
if (is_numeric($id)) {
$jTeam->load($id);
}
//set the page title
$title = $jLang['_ADMIN_TEAM_TITLE'] . ": " . ($jTeam->exists() ? $jLang['_ADMIN_OTHER_EDIT'] : $jLang['_ADMIN_OTHER_NEW']);
//set the custom javascripts
$mainframe->addCustomHeadTag("<script type='text/javascript' src='components/com_jtips/modules/Teams/Teams.js'></script>");
//what seasons are there
$jSeason = new jSeason($database);
$jSeasons = forceArray($jSeason->loadByParams(array()));
$jSeasonOptions = array(jTipsHTML::makeOption('', $jLang['_ADMIN_CONF_NONE']));
jTipsSortArrayObjects($jSeasons, 'name', 'ASC');
foreach ($jSeasons as $season) {
示例5: defined
<?php
defined('_JEXEC') or defined('_VALID_MOS') or die('Restricted Access');
/**
* Website: www.jtips.com.au
* @author Jeremy Roberts
* @copyright Copyright © 2009, jTips
* @license Commercial - See website for details
*
* @since 2.1 - 07/10/2008
* @version 2.1
* @package jTips
*
* Description: Load a JSON encoded string of game objects for the passed in round
*/
//Can't do this here since this script is loaded with ajax
//jTipsSpoofCheck();
global $database;
require_once 'components/com_jtips/classes/jgame.class.php';
ob_clean();
//ob_start();
if ($round_id = jTipsGetParam($_REQUEST, 'round_id', false)) {
$jGame = new jGame($database);
$params = array('round_id' => $round_id, 'order' => array('type' => 'order', 'by' => 'position', 'direction' => 'asc'));
$jGames = forceArray($jGame->loadByParams($params));
die(@json_encode($jGames));
} else {
die(json_encode(false));
}
示例6: ob_clean
* Website: www.jtips.com.au
* @author Jeremy Roberts
* @copyright Copyright © 2009, jTips
* @license Commercial - See website for details
*
* @since 2.1 - 16/10/2008
* @version 2.1
* @package jTips
*
* Description:
*/
global $database;
ob_clean();
require_once 'components/com_jtips/classes/juser.class.php';
$user_id = jTipsGetParam($_REQUEST, 'user_id', '');
$field = jTipsGetParam($_REQUEST, 'field', '');
$jTipsUser = new jTipsUser($database);
$jTipsUser->load($user_id);
$jTipsUser->{$field} = intval(!$jTipsUser->{$field});
$jTipsUser->save();
if ($jTipsUser->{$field}) {
if ($field == 'status') {
//send notification email
$jTipsUser->sendNotificationEmail('Approval');
}
die('tick');
} else {
if ($field == 'status') {
//send notification email
$jTipsUser->sendNotificationEmail('Reject');
}
示例7: display
//.........这里部分代码省略.........
<tbody>
<tr class="sectiontableentry1">
<td style="text-align:center;">
<?php
//BUG 136 - show closed/closes depending on start time
echo TimeDate::toDisplayDateTime($this->jRound->start_time, false);
?>
</td>
<?php
if ($jTips['ShowJSCountdown'] == 1) {
?>
<td><div id='countdown' style="text-align:center;" class="highlight"><?php
echo $jLang['_COM_CLOSED'];
?>
</div></td>
<?php
}
$jTipParams = array('game_id' => array('type' => 'reference', 'query' => "SELECT DISTINCT id FROM #__jtips_games WHERE round_id = " . $this->jRound->id), 'user_id' => $jTipsCurrentUser->id);
$jTip = new jTip($database);
$jTipss = forceArray($jTip->loadByParams($jTipParams));
?>
<td><?php
if (count($jTipss) > 0) {
echo TimeDate::toDisplayDateTime($jTipss[0]->updated, false);
} else {
echo " ";
}
?>
</td>
</tr>
</tbody>
</table>
<?php
if (jTipsGetParam($jTips, 'TeamLadderPopup', 0)) {
$url = "view=TeamLadder&Itemid={$Itemid}&menu=0";
?>
<p style="text-align:center;font-weight:bold;"><?php
if (isJoomla15()) {
/*?>
<a class="modal" rel="{handler: 'iframe', size: {x: <?php echo $jTips['ShowTipsWidth']; ?>, y: <?php echo $jTips['ShowTipsHeight']; ?>}}" href="<?php echo jTipsRoute("index2.php?option=com_jtips&" .$url); ?>" title='Team Ladder'><?php echo $jLang['_COM_TIPS_SHOWHIDE']; ?></a>
<?php*/
// better popup handling in J1.5
JHTML::_('behavior.modal');
$rel = json_encode(array('size' => array('x' => $jTips['ShowTipsWidth'], 'y' => $jTips['ShowTipsHeight'])));
$url = jTipsRoute("index.php?option=com_jtips&tmpl=component&" . $url);
$attribs = array('class' => 'modal', 'rel' => str_replace('"', "'", $rel), 'title' => $jLang['_COM_TIPS_SHOWHIDE']);
echo JHTML::link($url, $jLang['_COM_TIPS_SHOWHIDE'], $attribs);
} else {
?>
<a href='javascript:void(0);' onClick="openPopup('<?php
echo $url;
?>
', 'Team Ladder');"><?php
echo $jLang['_COM_TIPS_SHOWHIDE'];
?>
</a>
<?php
}
?>
</p><?php
}
//BUG 189 - Which order should the tips panel be shown in
if ($this->jSeason->tips_layout == 'away') {
$left = 'away';
$right = 'home';
} else {
示例8: display
/**
* Take data assigned in $data and display it
*/
function display()
{
global $jTipsCurrentUser, $mainframe, $database, $jLang, $jTips, $mosConfig_live_site;
$mosConfig_offset = $mainframe->getCfg('offset');
global $Itemid;
$useJs = false;
if ($jTips['JsLadder'] != 'none') {
$useJs = true;
}
?>
<h2 class="contentheading jmain_heading"><?php
echo $this->jSeason->name;
?>
</h2>
<h3 align="center"><?php
if ($this->jRound->getPrev()) {
?>
<a style="font-size: smaller;"
href='<?php
echo jTipsRoute("index.php?option=com_jtips&Itemid={$Itemid}&view=Tips&layout=locked&rid=" . $this->jRound->getPrev());
?>
'>«
<?php
echo $jLang['_COM_PREV_ROUND'];
?>
</a> <?php
}
echo " " . $jLang['_COM_DASH_ROUND'] . " " . $this->jRound->round . " ";
if ($this->jRound->getNext()) {
?>
<a style="font-size: smaller;"
href='<?php
echo jTipsRoute("index.php?option=com_jtips&Itemid={$Itemid}&view=Tips&layout=locked&rid=" . $this->jRound->getNext());
?>
'><?php
echo $jLang['_COM_NEXT_ROUND'];
?>
»</a> <?php
}
?>
</h3>
<?php
if ($this->jRound->exists()) {
$jGameParams = array('round_id' => $this->jRound->id, 'order' => array('type' => 'order', 'by' => 'position', 'direction' => 'ASC'));
$jGame = new jGame($database);
$jGames = forceArray($jGame->loadByParams($jGameParams));
$tags = "class='sectiontableheader jtableheader'";
?>
<table width="100%" cellspacing="0">
<thead>
<tr class="sectiontableheader">
<th <?php
echo $tags;
?>
width="50%"><?php
echo $jLang['_COM_ROUND_START_TIME'];
?>
</th>
<?php
if ($jTips['ShowJSCountdown'] == 1) {
?>
<th <?php
echo $tags;
?>
width="50%"><?php
echo $jLang['_COM_ROUND_TIME_TO_START'];
?>
</th>
<?php
}
?>
</tr>
</thead>
<tbody>
<tr class="sectiontableentry1">
<td style="text-align: center;"><?php
//BUG 136 - show closed/closes depending on start time
echo TimeDate::toDisplayDateTime($this->jRound->start_time, false);
?>
</td>
<?php
if ($jTips['ShowJSCountdown'] == 1) {
?>
<td>
<div id='countdown' style="text-align: center;" class="highlight"><?php
echo $jLang['_COM_CLOSED'];
?>
</div>
</td>
<?php
}
?>
</tr>
</tbody>
</table>
<?php
if (jTipsGetParam($jTips, 'TeamLadderPopup', 0)) {
//.........这里部分代码省略.........
示例9: jTipsSpoofCheck
jTipsSpoofCheck();
global $mosConfig_absolute_path;
$file = jTipsGetParam($_REQUEST, 'path', '');
if (!$file) {
//create a new file
$file = $mosConfig_absolute_path . '/components/com_jtips/custom/views/' . jTipsGetParam($_REQUEST, 'view', 'DEFAULT');
if (jTipsGetParam($_REQUEST, 'tmpl', false)) {
$file .= '/tmpl';
}
$filename = jTipsGetParam($_REQUEST, 'filename', 'default.ext.php');
//clean the filename
$regex = array('#(\\.){2,}#', '#[^A-Za-z0-9\\.\\_\\- ]#', '#^\\.#');
$file .= '/' . preg_replace($regex, '', $filename);
}
if (jTipsGetParam($_FILES['fileupload'], 'tmp_name', false)) {
if (isJoomla15()) {
jimport('joomla.filesystem.file');
$result = JFile::upload($_FILES['fileupload']['tmp_name'], $file);
} else {
$result = move_uploaded_file($_FILES['fileupload']['tmp_name'], $file);
}
} else {
$content = jTipsGetParam($_REQUEST, 'filecontent', '');
$result = writeFile($file, jTipsStripslashes($content));
}
if ($result) {
$message = $jLang['_ADMIN_CSTM_SAVE_SUCCESS'];
} else {
$message = $jLang['_ADMIN_CSTM_SAVE_FAILURE'];
}
mosRedirect('index2.php?option=com_jtips&module=Customisations', $message);
示例10: defined
defined('_JEXEC') or defined('_VALID_MOS') or die('Restricted Access');
/**
* Website: www.jtips.com.au
* @author Jeremy Roberts
* @copyright Copyright © 2009, jTips
* @license Commercial - See website for details
*
* @since 2.1 - 09/10/2008
* @version 2.1
* @package jTips
*
* Description: Get a list of available import fields for the selected table
*/
global $database, $jLang;
ob_clean();
$table = jTipsGetParam($_REQUEST, 'table', '');
if ($table == '-1' or $table == '') {
die("opts = new Array();");
}
$jObj = new $table($database);
$defs =& $jObj->getFieldMap();
$i = 1;
ksort($defs);
$js = "\nvar opts = new Array();\n\n";
foreach ($defs as $field => $def) {
if (isset($def['import']) and $def['import'] == true) {
$label = $jLang[$def['label']];
$js .= "\n\t\topts.push(new Option('{$label}', '{$field}'));\n\t\t";
$i++;
}
}
示例11: display
function display()
{
global $jLang;
?>
<form action='index2.php' method='post' name='adminForm'>
<input type='hidden' name='task' value='list' />
<input type='hidden' name='option' value='<?php
echo jTipsGetParam($_REQUEST, 'option', 'com_jtips');
?>
' />
<input type='hidden' name='module' value='Export' />
<input type='hidden' name='hidemainmenu' value='0' />
<input type="hidden" name="<?php
echo jTipsSpoofValue();
?>
" value="1" />
<?php
if (isJoomla15()) {
JToolBarHelper::title($jLang['_ADMIN_CONF_EXPBTN'], 'export');
} else {
?>
<table class='adminheading'>
<tr><th><?php
echo $jLang['_ADMIN_CONF_EXPBTN'];
?>
</th></tr>
</table>
<?php
}
?>
<fieldset>
<legend><?php
echo $jLang['_ADMIN_EXP_INFO'];
?>
</legend>
<table class='admintable' width="100%">
<tr>
<td class="key" width="25%"><?php
echo $jLang['_ADMIN_EXP_PREVIOUS'];
?>
</td>
<td><?php
echo $this->selectLists['history'];
?>
<?php
echo $this->selectLists['actions'];
?>
<input type='submit' name='doAction' value='Go!' class='button' <?php
echo $this->disableExportButton;
?>
onclick="this.form.task.value='history'" /></td>
</tr>
<tr>
<td class="key" width="25%"><?php
echo $jLang['_ADMIN_EXP_SELECT_TYPE'];
?>
</td>
<td><?php
echo $this->selectLists['objects'];
?>
<input type="submit" name="getExport" value="Export Data" class="button" onclick="this.form.task.value='export'" /></td>
</tr>
</table>
</fieldset>
</form>
<?php
}
示例12: jimport
if (!isJoomla15()) {
$jSeason->start_time = TimeDate::toDisplayDate($jSeason->start_time);
$jSeason->end_time = TimeDate::toDisplayDate($jSeason->end_time);
}
if ($_FILES['image']['name'] and imageDirCheck()) {
$logofile = 'images/jtips/' . $_FILES['image']['name'];
if (isJoomla15()) {
jimport('joomla.filesystem.file');
jTipsLogger::_log('MOVING ' . $_FILES['image']['tmp_name'] . ' TO ' . $logofile, 'ERROR');
//JFile::move($_FILES['image']['tmp_name'], $mosConfig_absolute_path.'/'.$logofile);
//BUG 270 - to complete upload, use the upload function, not move
JFile::upload($_FILES['image']['tmp_name'], $mosConfig_absolute_path . '/' . $logofile);
} else {
if (!is_dir($mosConfig_absolute_path . '/images/jtips') or !file_exists($mosConfig_absolute_path . '/images/jtips')) {
mkdir($mosConfig_absolute_path . '/images/jtips');
}
move_uploaded_file($_FILES['image']['tmp_name'], $mosConfig_absolute_path . '/' . $logofile);
}
$jSeason->image = $logofile;
} else {
if (jTipsGetParam($_REQUEST, 'remove_image', 0) == 1) {
$jSeason->image = '';
}
}
$saved = $jSeason->save();
$message = 'Season ' . $jSeason->name . ($saved != false ? ' Saved!' : ' failed to save. Error!');
if ($task == 'apply') {
mosRedirect('index2.php?option=com_jtips&hidemainmenu=1&task=edit&module=Seasons&cid[]=' . $jSeason->id, $message);
} else {
mosRedirect('index2.php?option=com_jtips&task=list&module=Seasons', $message);
}
示例13: jTipsGetParam
*
* Description:
*/
require_once 'components/com_jtips/classes/jgame.class.php';
require_once 'components/com_jtips/classes/jround.class.php';
global $database, $jLang;
$id = jTipsGetParam($_REQUEST, 'id', false);
if (!$id or !is_numeric($id)) {
// BUG 373 - Round fails to copy
jTipsLogger::_log('No round id specified to copy!', 'ERROR');
mosRedirect('index2.php?option=com_jtips&task=list&module=Rounds', $jLang['_ADMIN_ROUND_COPY_FAIL']);
}
$focus = new jRound($database);
$focus->load($id);
$focus->id = null;
$focus->round = jTipsGetParam($_REQUEST, 'round', '');
$focus->scored = 0;
if (!$focus->round) {
jTipsLogger::_log('No Round number entered when copying round, determine next one.', 'ERROR');
$query = "SELECT MAX(round)+1 AS nextround FROM #__jtips_rounds WHERE season_id = '" . $focus->season_id . "'";
$database->setQuery($query);
$focus->round = $database->loadResult();
}
$focus->save();
$query = "SELECT id FROM #__jtips_games WHERE round_id = '" . $database->getEscaped($id) . "'";
$database->setQuery($query);
$game_ids = $database->loadResultArray();
if (!empty($game_ids)) {
foreach ($game_ids as $gid) {
$jGame = new jGame($database);
$jGame->load($gid);
示例14: display
function display()
{
global $Itemid, $database, $mainframe, $jTips, $jLang, $mosConfig_live_site, $jTipsCurrentUser;
$mosConfig_offset = $mainframe->getCfg('offset');
$postURL = jTipsRoute("index.php?option=com_jtips&Itemid={$Itemid}");
?>
<script type='text/javascript'>
function getTeamLadder(obj) {
document.getElementById('season_id').value = obj.options[obj.selectedIndex].value;
document.ladderForm.submit();
//window.location.href='index.php?option=com_jtips&Itemid=<?php
echo $Itemid;
?>
&task=teams&season=' + id;
}
</script>
<form action="<?php
echo $postURL;
?>
" method="post" name="ladderForm">
<input type="hidden" name="option" value="com_jtips" />
<input type="hidden" name="task" value="TeamLadder" />
<input type="hidden" name="season" id="season_id" />
<?php
if (jTipsGetParam($_REQUEST, 'menu', 1)) {
//jtips_HTML::seasonsList($jTipsCurrentUser, $this->jSeasons, "onchange='getTeamLadder(this);'", false, $this->jSeason->id);
}
?>
<table width='100%' cellspacing="0">
<thead>
<?php
?>
<tr class='sectiontableheader jtableheader'>
<th class="jtips_team_ladder_header">#</th>
<th class="jtips_team_ladder_header"> </th>
<th class="jtips_team_ladder_header"><?php
echo $jLang['_COM_TLD_TEAM'];
?>
</th>
<?php
if (!empty($jTips['TeamLadderColumns'])) {
foreach ($jTips['TeamLadderColumns'] as $field) {
$lang_key = "_COM_TLD_ABR_" . strtoupper($field);
?>
<th style="text-align:center" width="5" class="jtips_team_ladder_header"><?php
echo $jLang[$lang_key];
?>
</th>
<?php
}
}
?>
</tr>
<?php
?>
</thead>
<tbody>
<?php
$i = 1;
$rowIndex = 0;
$noteams = true;
if (count($this->jTeams) > 0) {
foreach ($this->jTeams as $jTeam) {
$extra = "";
$thisRowIndex = $rowIndex++;
?>
<tr class='sectiontableentry<?php
echo $thisRowIndex % 2 + 1;
?>
jtablerow<?php
echo $thisRowIndex % 2 + 1;
?>
'>
<td style='text-align:center'><?php
echo $i;
?>
</td>
<td style='text-align:center'>
<?php
$img = $jTeam->getLogo();
// if (jTipsFileExists(getJtipsImage($jTeam->logo))) {
// $img .= "<img src='" .$mainframe->getCfg('live_site');
// if (!empty($jTips['SubDirectory'])) {
// $img .= $jTips['SubDirectory'];
// }
// $img .= "/" .getJtipsImage($jTeam->logo). "' alt=' ' border='0' />";
// }
if (empty($img)) {
$img .= " ";
}
echo $img;
?>
</td>
<?php
$popupUrl = "view=TeamLadder&Itemid={$Itemid}&action=ShowTeam&id=" . $jTeam->id;
if (jTipsGetParam($_REQUEST, 'menu', 0) or !jTipsGetParam($_REQUEST, 'tmpl', false)) {
if (isJoomla15()) {
/*$x = $jTips['ShowTipsWidth'];
$y = $jTips['ShowTipsHeight'];
//BUG 274 - team ladder popup results in broken scroll bar
//.........这里部分代码省略.........
示例15: defined
<?php
/**
* Author: Jeremy Roberts
* Company: jTips
* Website: www.jtips.com.au
* Licence: Commercial. May not be copied, modified or redistributed
*/
defined('_JEXEC') or defined('_VALID_MOS') or die('Restricted access');
//require_once( $mainframe->getPath( 'toolbar_html' ));
$include_file = "components/com_jtips/modules/" . jTipsGetParam($_REQUEST, 'module', '') . "/toolbar.php";
jTipsLogger::_log("looking for toolbar file: {$include_file}", 'INFO');
if (jTipsFileExists($include_file)) {
jTipsLogger::_log("found {$include_file}... running script");
include $include_file;
} else {
jTipsLogger::_log('failed to find toolbar file!', 'ERROR');
}