本文整理汇总了PHP中Juri::root方法的典型用法代码示例。如果您正苦于以下问题:PHP Juri::root方法的具体用法?PHP Juri::root怎么用?PHP Juri::root使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Juri
的用法示例。
在下文中一共展示了Juri::root方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getInput
/**
* Method to get the field input markup for a spacer.
* The spacer does not have accept input.
*
* @return string The field input markup.
*
* @since 11.1
*/
protected function getInput()
{
$apiHelper = new mauticApiHelper();
$settings = $apiHelper->getApiSettings();
$url = Juri::root() . 'administrator/?plugin=mautic';
$text = 'PLG_MAUTIC_AUTHORIZE_BTN';
if (!empty($settings['accessToken'])) {
$url .= '&reauthorize=true';
$text = 'PLG_MAUTIC_REAUTHORIZE_BTN';
} else {
$url .= '&authorize=true';
}
if (!empty($settings['clientKey']) && !empty($settings['clientSecret'])) {
// Note: style is added for Joomla 2.5
$btn = Jhtml::link($url, JText::_($text), array('class' => 'btn btn-small btn-success', 'style' => 'float: left;'));
if (!empty($settings['accessToken'])) {
$resetUrl = Juri::root() . 'administrator/?plugin=mautic&reset=true';
$btn .= ' <span style="float: left; padding: 0 4px;">|</span> ';
$btn .= Jhtml::link($resetUrl, JText::_('PLG_MAUTIC_RESET_BTN'), array('class' => 'btn btn-small btn-default pull-right', 'style' => 'float: left;'));
}
return $btn;
} else {
return JText::_('PLG_MAUTIC_SAVE_KEYS_FIRST');
}
}
示例2: getData
/**
* Get the necessary data for our stats report
*
* @return array
*/
public function getData()
{
$data = array();
$db = JFactory::getDbo();
$data['php'] = phpversion();
$data['mysql'] = $db->getVersion() . ' ' . $db->name;
$data['domain'] = Juri::root();
$data['joomla'] = JVERSION;
$data['os'] = php_uname();
$data['server'] = $_SERVER['SERVER_SOFTWARE'] . ' ' . (function_exists('php_sapi_name') ? php_sapi_name() : '');
$data['language'] = implode(',', array_keys(JLanguage::getKnownLanguages(JPATH_BASE)));
$data['timezone'] = JFactory::getConfig()->get('offset');
$data['extension'] = $this->extension;
$data['version'] = CompojoomComponentHelper::getManifest($this->extension)->get('version');
$data['config'] = $this->getConfig();
$customData = $this->getCustomExtensionData();
if ($customData) {
$data = array_merge($data, $customData);
}
return $data;
}
示例3: getInput
protected function getInput()
{
$template = basename(dirname(dirname(dirname(__FILE__))));
$directory = basename($this->element['directory']);
$viewonclick = "if (document.getElementById('" . $this->id . "').value) { SqueezeBox.open('" . Juri::root() . 'templates/' . $template . '/images/' . $directory . "/'+document.getElementById('" . $this->id . "').value); };";
$clearonclick = "document.getElementById('" . $this->id . "').value='';";
$html = '<div class="input-prepend input-append">
<a class="btn" title="View image" href="javascript:void(0);" onclick="' . $viewonclick . '" >
<i class="icon-eye"> </i>
</a>
<input type="text" class="input-small" name="' . $this->name . '" id="' . $this->id . '" value="' . $this->value . '" />
<a class="modal btn" title="Select an image"
href="index.php?option=com_jxtc&view=files&tmpl=component&fld=' . $this->id . '&id=' . JRequest::getInt('id') . '&f=' . $directory . '"
rel="{handler: \'iframe\', size: {x: 755, y: 495}}">' . JText::_('JSELECT') . '
</a>';
if (!$this->element['hide_none']) {
$html .= '<a class="btn btn-danger" title="' . JText::_('JLIB_FORM_BUTTON_CLEAR') . '" href="javascript:void(0);" onclick="' . $clearonclick . '">
<i class="icon-remove icon-white"></i>
</a>';
}
$html .= '</div>';
return $html;
}
示例4: display
/**
* The default method that will display the output of this view which is called by
* Joomla
*
* @param string template Template file name
**/
public function display($tpl = null)
{
$mainframe = JFactory::getApplication();
$jinput = $mainframe->input;
$model = $this->getModel('Activities');
$activities = $model->getActivities();
foreach ($activities as $key => $activity) {
$param = new CParameter($activity->params);
switch ($activity->app) {
case 'users.featured':
$user = CFactory::getUser($param->get('userid'));
$activities[$key]->title = JText::sprintf('COM_COMMUNITY_MEMBER_IS_FEATURED', '<a href="' . CRoute::_(JUri::root() . $param->get('owner_url')) . '" class="cStream-Author">' . $user->getDisplayName() . '</a>');
break;
case 'events.wall':
case 'groups.wall':
case 'profile':
$user = CFactory::getUser($activity->actor);
$html = '<a class="cStream-Author" target="_blank" href="' . JUri::root() . 'index.php?option=com_community&view=profile&userid=' . $user->id . '">' . $user->getDisplayName() . '</a> ';
if ($activity->eventid) {
$event = JTable::getInstance('Event', 'cTable');
$event->load($activity->eventid);
$html .= '➜ <a class="cStream-Reference" target="_blank" href="' . JUri::root() . 'index.php?option=com_community&view=events&task=viewevent&eventid=' . $event->id . '">' . $event->title . '</a>';
} elseif ($activity->groupid) {
$group = JTable::getInstance('Group', 'cTable');
$group->load($activity->groupid);
$html .= '➜ <a class="cStream-Reference" target="_blank" href="' . JUri::root() . 'index.php?option=com_community&view=groups&task=viewgroup&groupid=' . $group->id . '">' . $group->name . '</a>';
} elseif (!empty($activity->target) && $activity->target != $activity->actor) {
$target = CFactory::getUser($activity->target);
$html .= '➜ <a class="cStream-Author" target="_blank" href="' . JUri::root() . 'index.php?option=com_community&view=profile&userid=' . $target->id . '">' . $target->getDisplayName() . '</a> ';
$html .= CActivities::format($activity->title);
} else {
$html .= ' posted: "' . CActivities::format($activity->title) . '"';
}
$activities[$key]->title = $html;
break;
case 'groups.avatar.upload':
$user = CFactory::getUser($activity->actor);
$html = '<a class="cStream-Author" target="_blank" href="' . JUri::root() . 'index.php?option=com_community&view=profile&userid=' . $user->id . '">' . $user->getDisplayName() . '</a> ';
$html .= JText::_('COM_COMMUNITY_ACTIVITIES_NEW_GROUP_AVATAR');
$activities[$key]->title = $html;
break;
case 'profile.avatar.upload':
$user = CFactory::getUser($activity->actor);
$html = '<a class="cStream-Author" target="_blank" href="' . JUri::root() . 'index.php?option=com_community&view=profile&userid=' . $user->id . '">' . $user->getDisplayName() . '</a> ';
$html .= JText::_('COM_COMMUNITY_ACTIVITIES_NEW_AVATAR');
$activities[$key]->title = $html;
break;
case 'albums.comment':
case 'albums':
$album = JTable::getInstance('Album', 'CTable');
$album->load($activity->cid);
$user = CFactory::getUser($activity->actor);
$html = '<a class="cStream-Author" target="_blank" href="' . JUri::root() . 'index.php?option=com_community&view=profile&userid=' . $user->id . '">' . $user->getDisplayName() . '</a> ';
$html .= JText::sprintf('COM_COMMUNITY_ACTIVITIES_WALL_POST_ALBUM', CRoute::_($album->getURI()), $this->escape($album->name));
$activities[$key]->title = $html;
break;
case 'profile.like':
case 'groups.like':
case 'events.like':
case 'photo.like':
case 'videos.like':
case 'album.like':
$actors = $param->get('actors');
$user = CFactory::getUser($activity->actor);
$users = explode(',', $actors);
$userCount = count($users);
switch ($activity->app) {
case 'profile.like':
$cid = CFactory::getUser($activity->cid);
$urlLink = JUri::root() . 'index.php?option=com_community&view=profile&userid=' . $cid->id;
$name = $cid->getDisplayName();
$element = 'COM_COMMUNITY_STREAM_LIKES_ELEMENT_PROFILE';
break;
case 'groups.like':
$cid = JTable::getInstance('Group', 'CTable');
$cid->load($activity->groupid);
$urlLink = JUri::root() . 'index.php?option=com_community&view=groups&task=viewgroup&groupid=' . $cid->id;
$name = $cid->name;
$element = 'COM_COMMUNITY_STREAM_LIKES_ELEMENT_GROUP';
break;
case 'events.like':
$cid = JTable::getInstance('Event', 'CTable');
$cid->load($activity->eventid);
$urlLink = JUri::root() . 'index.php?option=com_community&view=events&task=viewevent&eventid=' . $cid->id;
$name = $cid->title;
$element = 'COM_COMMUNITY_STREAM_LIKES_ELEMENT_EVENT';
break;
case 'photo.like':
$cid = JTable::getInstance('Photo', 'CTable');
$cid->load($activity->cid);
$urlLink = JUri::root() . 'index.php?option=com_community&view=photos&task=photo&albumid=' . $cid->albumid . '&userid=' . $cid->creator . '&photoid=' . $cid->id;
$name = $cid->caption;
$element = 'COM_COMMUNITY_STREAM_LIKES_ELEMENT_PHOTO';
break;
//.........这里部分代码省略.........
示例5: getWebFilePath
/**
* Get the web path to a file
*
* @param string $file - the file name
* @param int $id - the id
* @param bool $isThumb - are we dealing with a thumb
*
* @return string
*/
public function getWebFilePath($file, $id, $isThumb = false)
{
$params = JComponentHelper::getParams($this->component);
$path = Juri::root() . $params->get('image_path', 'images') . '/' . $this->typeAlias . '/' . $id;
if ($isThumb) {
$path .= '/thumbs';
}
$path .= '/' . $file;
return $path;
}
示例6: defined
/**
* @name Maximenu CK params
* @package com_maximenuck
* @copyright Copyright (C) 2014. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Cedric Keiflin - http://www.template-creator.com - http://www.joomlack.fr
*/
defined('_JEXEC') or die;
$path = JPATH_ROOT . '/modules/mod_maximenuck/themes';
$folders = JFolder::folders($path);
natsort($folders);
$i = 1;
echo '<div class="clearfix" style="min-height:35px;margin: 0 5px;">';
foreach ($folders as $folder) {
$theme_title = "";
if (file_exists($path . '/' . $folder . '/css/maximenuck.php')) {
if (file_exists($path . '/' . $folder . '/' . $folder . '.png')) {
$theme = JUri::root(true) . '/modules/mod_maximenuck/themes/' . $folder . '/' . $folder . '.png';
} else {
$theme = Juri::root(true) . '/administrator/components/com_maximenuck/images/what.png" width="110" height="110';
$theme_title = JText::_('CK_THEME_PREVIEW_NOT_FOUND');
}
} else {
$theme = Juri::root(true) . '/administrator/components/com_maximenuck/images/warning.png" width="110" height="110';
$theme_title = JText::_('CK_THEME_CSS_NOT_COMPATIBLE');
}
echo '<div class="themethumb" data-name="' . $folder . '" onclick="change_theme_stylesheet(\'' . $folder . '\')">' . '<img src="' . $theme . '" style="margin:0;padding:0;" title="' . $theme_title . '" class="hasTip" />' . '<div class="themename">' . $folder . '</div>' . '</div>';
$i++;
}
echo '</div>';
示例7: foreach
<?php
foreach ($condominiums as $key => $condominium) {
$resourceName = "";
// BFCHelper::getLanguage($condominium->Name, $this->language);
//$route = JRoute::_('index.php?option=com_bookingforconnector&view=condominium&ResourceId=' . $condominium->CondominiumId . ':' . BFCHelper::getSlug($resourceName));
$currUri = $uri . '&resourceId=' . $condominium->CondominiumId . ':' . BFCHelper::getSlug($resourceName);
if ($itemId != 0) {
$currUri .= '&Itemid=' . $itemId;
}
$route = JRoute::_($currUri);
$merchantLat = $condominium->XGooglePos;
$merchantLon = $condominium->YGooglePos;
$showMerchantMap = $merchantLat != null && $merchantLon != null;
$merchantImageUrl = Juri::root() . "components/com_bookingforconnector/assets/images/defaults/default-s6.jpeg";
$routeInfoRequest = JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&layout=contactspopup&tmpl=component&merchantId=' . $condominium->MerchantId . ':' . BFCHelper::getSlug($condominium->MerchantName));
$currUriMerchant = $uriMerchant . '&merchantId=' . $condominium->MerchantId . ':' . BFCHelper::getSlug($condominium->MerchantName);
if ($itemIdMerchant != 0) {
$currUriMerchant .= '&Itemid=' . $itemIdMerchant;
}
$routeMerchant = JRoute::_($currUriMerchant);
?>
<div class="<?php
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
?>
12 com_bookingforconnector-item-col" >
<div class="com_bookingforconnector-search-merchant com_bookingforconnector-item <?php
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
?>
" >
示例8:
components/com_javoice/asset/images/rss.gif" alt="RSS help"/>
</a>
</div>
</div>
<?php
} else {
echo JText::_("PLEASE_CREATE_NEW_FORUM_AND_VOICE_TYPE");
}
?>
<!--< New Loading Image and Text >-->
<!-- Loading -->
<div id="loader">
<img src="<?php
echo Juri::root();
?>
components/com_javoice/asset/images/loading.gif" alt="<?php
echo JText::_("LOADER_TITLE");
?>
"/>
<?php
echo '<br>';
?>
<?php
echo JText::_('LOADING');
?>
</div>
<!--< End New Loading Image and Text >-->
<div id="jav-msg-loading" style="display:none"></div>
示例9: natsort
<input class="radiobutton ckoption" type="radio" value="horizontal" id="orientationhorizontal" name="orientation" />
<label class="radiobutton first" for="orientationhorizontal" style="width:auto;" onclick="change_menu_orientation('horizontal')"><?php
echo JText::_('CK_HORIZONTAL');
?>
</label><input class="radiobutton ckoption" type="radio" value="vertical" id="orientationvertical" name="orientation" />
<label class="radiobutton" for="orientationvertical" style="width:auto;" onclick="change_menu_orientation('vertical')"><?php
echo JText::_('CK_VERTICAL');
?>
</label>
</div>
<hr />
<?php
$path = JPATH_ROOT . '/modules/mod_maximenuck/tmpl';
$files = JFolder::files($path, '.php');
natsort($files);
$i = 1;
echo '<div class="clearfix" style="min-height:35px;margin: 0 5px;">';
foreach ($files as $file) {
$thumb_title = '';
$file = JFile::stripExt($file);
if (file_exists($path . '/' . $file . '.png')) {
$thumb = Juri::root(true) . '/modules/mod_maximenuck/tmpl/' . $file . '.png';
} else {
$thumb = Juri::root(true) . '/administrator/components/com_maximenuck/images/what.png style="display:block;margin:0 auto;" width="90 height="90';
$thumb_title = JText::_('CK_LAYOUT_PREVIEW_NOT_FOUND');
}
$active = $layout == $file ? 'selected' : '';
echo '<div class="layoutthumb ' . $active . '" data-name="' . $file . '" onclick="change_layout(\'' . $file . '\')">' . '<img src="' . $thumb . '" style="margin:0;padding:0;" title="' . $thumb_title . '" class="hasTip" />' . '<div class="layoutname">' . $file . '</div>' . '</div>';
$i++;
}
echo '</div>';
示例10: defined
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$merchant = $this->item;
$sitename = $this->sitename;
$language = $this->language;
//$this->document->setTitle($this->item->Name);
//$this->document->setDescription( BFCHelper::getLanguage($this->item->Description, $this->language));
$this->document->setTitle(sprintf(JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEW_MERCHANTDETAILS_RESOURCES_TITLE'), $merchant->Name, $sitename));
$db = JFactory::getDBO();
$uri = 'index.php?option=com_bookingforconnector&view=resource';
$db->setQuery('SELECT id FROM #__menu WHERE link LIKE ' . $db->Quote($uri) . ' AND (language=' . $db->Quote($language) . ' OR language=' . $db->Quote('*') . ') AND published = 1 LIMIT 1');
//$itemId = ($db->getErrorNum())? 0 : intval($db->loadResult());
$itemId = intval($db->loadResult());
$resourceImageUrl = Juri::root() . "media/com_bookingfor/images/default.png";
$merchantImageUrl = Juri::root() . "media/com_bookingfor/images/DefaultLogoList.jpg";
$resourceLogoPath = BFCHelper::getImageUrlResized('resources', "[img]", 'onsellunit_list_default');
$resourceLogoPathError = BFCHelper::getImageUrl('resources', "[img]", 'onsellunit_list_default');
$merchantLogoPath = BFCHelper::getImageUrlResized('merchant', "[img]", 'resource_list_merchant_logo');
$merchantLogoPathError = BFCHelper::getImageUrl('merchant', "[img]", 'resource_list_merchant_logo');
?>
<script type="text/javascript">
<!--
var cultureCode = '<?php
echo $language;
?>
';
//-->
</script>
<div class="com_bookingforconnector_merchantdetails com_bookingforconnector_merchantdetails-t<?php
echo BFCHelper::showMerchantRatingByCategoryId($merchant->MerchantTypeId);
示例11:
$rating = $merchant->Rating;
$routeInfoRequest = JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&layout=contactspopup&tmpl=component&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name));
$currUriMerchant = $uriMerchant . '&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name);
if ($itemIdMerchant != 0) {
$currUriMerchant .= '&Itemid=' . $itemIdMerchant;
}
$routeMerchant = JRoute::_($currUriMerchant);
$routeRating = JRoute::_($currUriMerchant . '&layout=ratings');
$routeRatingform = JRoute::_($currUriMerchant . '&layout=rating');
$httpsPayment = $merchant->PaymentType;
$counter = 0;
$merchantLat = $merchant->XGooglePos;
$merchantLon = $merchant->YGooglePos;
$showMerchantMap = $merchantLat != null && $merchantLon != null;
$merchantLogo = Juri::root() . "components/com_bookingforconnector/assets/images/defaults/default-s1.jpeg";
$merchantLogoError = Juri::root() . "components/com_bookingforconnector/assets/images/defaults/default-s1.jpeg";
if (!empty($merchant->LogoUrl)) {
$merchantLogo = BFCHelper::getImageUrlResized('merchant', $merchant->LogoUrl, 'logomedium');
$merchantLogoError = BFCHelper::getImageUrl('merchant', $merchant->LogoUrl, 'logomedium');
}
if (!empty($merchant->ImageUrl)) {
$merchantImageUrl = BFCHelper::getImageUrlResized('merchant', $merchant->ImageUrl, 'medium');
}
?>
<div class="<?php
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL;
?>
12 com_bookingforconnector-item-col" >
<div class="com_bookingforconnector-search-merchant com_bookingforconnector-item <?php
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
?>
示例12: getItems
//.........这里部分代码省略.........
// {
$item->text .= self::_cleanText($item->introtext);
// }
$params->set('parsedInModule', 1);
// for plugins to know when they are parsed inside this module
if ($params->get('JPlugins', 0)) {
//Plugins
$results = $dispatcher->trigger('onBeforeDisplay', array(&$item, &$params, $limitstart));
$item->event->BeforeDisplay = trim(implode("\n", $results));
$results = $dispatcher->trigger('onAfterDisplay', array(&$item, &$params, $limitstart));
$item->event->AfterDisplay = trim(implode("\n", $results));
$results = $dispatcher->trigger('onAfterDisplayTitle', array(&$item, &$params, $limitstart));
$item->event->AfterDisplayTitle = trim(implode("\n", $results));
$results = $dispatcher->trigger('onBeforeDisplayContent', array(&$item, &$params, $limitstart));
$item->event->BeforeDisplayContent = trim(implode("\n", $results));
$results = $dispatcher->trigger('onAfterDisplayContent', array(&$item, &$params, $limitstart));
$item->event->AfterDisplayContent = trim(implode("\n", $results));
$dispatcher->trigger('onPrepareContent', array(&$item, &$params, $limitstart));
}
//Init K2 plugin events
$item->event->K2BeforeDisplay = '';
$item->event->K2AfterDisplay = '';
$item->event->K2AfterDisplayTitle = '';
$item->event->K2BeforeDisplayContent = '';
$item->event->K2AfterDisplayContent = '';
$item->event->K2CommentsCounter = '';
if ($params->get('K2Plugins', 0)) {
//K2 plugins
JPluginHelper::importPlugin('k2');
$results = $dispatcher->trigger('onK2BeforeDisplay', array(&$item, &$params, $limitstart));
$item->event->K2BeforeDisplay = trim(implode("\n", $results));
$results = $dispatcher->trigger('onK2AfterDisplay', array(&$item, &$params, $limitstart));
$item->event->K2AfterDisplay = trim(implode("\n", $results));
$results = $dispatcher->trigger('onK2AfterDisplayTitle', array(&$item, &$params, $limitstart));
$item->event->K2AfterDisplayTitle = trim(implode("\n", $results));
$results = $dispatcher->trigger('onK2BeforeDisplayContent', array(&$item, &$params, $limitstart));
$item->event->K2BeforeDisplayContent = trim(implode("\n", $results));
$results = $dispatcher->trigger('onK2AfterDisplayContent', array(&$item, &$params, $limitstart));
$item->event->K2AfterDisplayContent = trim(implode("\n", $results));
$dispatcher->trigger('onK2PrepareContent', array(&$item, &$params, $limitstart));
if ($params->get('itemCommentsCounter')) {
$results = $dispatcher->trigger('onK2CommentsCounter', array(&$item, &$params, $limitstart));
$item->event->K2CommentsCounter = trim(implode("\n", $results));
}
}
// Restore the intotext variable after plugins execution
$item->displayIntrotext = $item->text;
//Clean the plugin tags
$item->displayIntrotext = preg_replace("#{(.*?)}(.*?){/(.*?)}#s", '', $item->displayIntrotext);
//Author
if ($params->get('itemAuthor')) {
if (!empty($item->created_by_alias)) {
$item->author = $item->created_by_alias;
$item->authorGender = NULL;
$item->authorDescription = NULL;
if ($params->get('itemAuthorAvatar')) {
$item->authorAvatar = K2HelperUtilities::getAvatar('alias');
}
$item->authorLink = Juri::root(true);
} else {
$author = JFactory::getUser($item->created_by);
$item->author = $author->name;
$query = "SELECT `description`, `gender` FROM #__k2_users WHERE userID=" . (int) $author->id;
$db->setQuery($query, 0, 1);
$result = $db->loadObject();
if ($result) {
$item->authorGender = $result->gender;
$item->authorDescription = $result->description;
} else {
$item->authorGender = NULL;
$item->authorDescription = NULL;
}
if ($params->get('itemAuthorAvatar')) {
$item->authorAvatar = K2HelperUtilities::getAvatar($author->id, $author->email, $componentParams->get('userImageWidth'));
}
//Author Link
$item->authorLink = JRoute::_(K2HelperRoute::getUserRoute($item->created_by));
}
}
// Extra fields plugins
if (is_array($item->extra_fields)) {
foreach ($item->extra_fields as $key => $extraField) {
if ($extraField->type == 'textarea' || $extraField->type == 'textfield') {
$tmp = new JObject();
$tmp->text = $extraField->value;
if ($params->get('JPlugins', 0)) {
$dispatcher->trigger('onPrepareContent', array(&$tmp, &$params, $limitstart));
}
if ($params->get('K2Plugins', 0)) {
$dispatcher->trigger('onK2PrepareContent', array(&$tmp, &$params, $limitstart));
}
$extraField->value = $tmp->text;
}
}
}
$rows[] = $item;
}
return $rows;
}
}
示例13: op_runCmd
</div><?php
$processing_html = '<a href="' . $this->ehelper->getExportItemLink($t['tid'], $order_id) . '" id="tid_' . $t['tid'] . '_proc" onclick="' . "javascript:return op_runCmd('sendXml', this);" . '" >' . "<img src='" . Juri::root(true) . "components/com_onepage/assets/images/mootree_loader.gif' alt='" . $status_txt . "' title='" . $status_txt . "' /></a>";
?>
<div id="tiddiv_<?php
echo $t['tid'];
?>
_PROCESSING" <?php
if ($status != 'PROCESSING') {
echo ' style="display: none;" ';
}
?>
><?php
echo $processing_html;
?>
</div><?php
$error_html = '<a href="' . $this->ehelper->getExportItemLink($t['tid'], $order_id) . '" id="tid_' . $t['tid'] . '_err" onclick="' . "javascript:return op_runCmd('sendXml', this);" . '" >' . "<img src='" . Juri::root(true) . "components/com_onepage/assets/images/remove.png' alt='" . $status_txt . "' title='" . $status_txt . "' /></a>";
?>
<div id="tiddiv_<?php
echo $t['tid'];
?>
_ERROR" <?php
if ($status != 'ERROR') {
echo ' style="display: none;" ';
}
?>
><?php
echo $error_html;
?>
</div>
示例14: explode
if (!empty($do_not_show_opcregistration)) {
echo '1';
} else {
echo '0';
}
?>
" id="do_not_show_opcregistration" />
<?php
$selected = $opclang = JRequest::getVar('opclang', '');
$flag = '';
if (count($x) > 1) {
$a1 = explode('-', $opclang);
if (isset($a1[0])) {
$cl = strtolower($a1[0]);
if (file_exists(JPATH_SITE . DS . 'media' . DS . 'mod_languages' . DS . 'images' . DS . $cl . '.gif')) {
$root = Juri::root() . '/';
$root = str_replace('/administrator/', '', $root);
$flag = '<br style="clear:both;"><img src="' . $root . '/media/mod_languages/images/' . $cl . '.gif" alt="' . $opclang . '"/>';
}
}
?>
<div class="langtab" style="clear: both; " >
<label for="opclang"><?php
echo JText::_('JFIELD_LANGUAGE_LABEL');
?>
</label>
<select name="opclang" id="opclang" onchange="submitbutton('changelang');">
<?php
echo '<option ';
if (empty($selected)) {
echo 'selected="selected" ';
示例15: uploadReplyFile
function uploadReplyFile()
{
if (!JAVoiceHelpers::checkPermissionAdmin()) {
$k = 0;
$object[$k] = new stdClass();
$object[$k]->id = '#jav-msg-loading';
$object[$k]->attr = 'html';
$object[$k]->content = JText::_("SORRY_YOU_DONT_PERMISSION_TO_EDIT_THIS");
$k++;
$object[$k] = new stdClass();
$object[$k]->id = '#jav-msg-loading';
$object[$k]->attr = 'css';
$object[$k]->content = 'display,block';
$helper = new JAVoiceHelpers();
echo $helper->parse_JSON_new($object);
exit;
}
global $javconfig;
$helper = new JAVoiceHelpers();
$maxSize = (int) $helper->getSizeUploadFile("byte");
if (isset($_FILES['myfile']['name']) && $_FILES['myfile']['size'] > 0 && $_FILES['myfile']['size'] <= $maxSize && $_FILES['myfile']['tmp_name'] != '') {
jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.file');
$deleteSession = JRequest::getInt("deleteSession");
//echo '<script type="text/javascript">alert("'.$deleteSession.'");</script>';
if ($deleteSession) {
unset($_SESSION['javReplyNameFolder']);
unset($_SESSION['javReplyTemp']);
}
$fileexist = 0;
$img = '';
$totalFile = 0;
// Edit upload location here
$fname = basename($_FILES['myfile']['name']);
$fname = strtolower(str_replace(' ', '', $fname));
$folder = time() . rand() . DIRECTORY_SEPARATOR;
//$folder = JPATH_ROOT.DS."images".DS."stories".DS."ja_voice";
if (!isset($_SESSION['javReplyNameFolder'])) {
$_SESSION['javReplyNameFolder'] = $folder;
} else {
$folder = $_SESSION['javReplyNameFolder'];
}
//echo '<script type="text/javascript">alert("'.str_replace('\\','',$folder).'");</script>';
$destination_path = JPATH_ROOT . DS . "tmp" . DS . "ja_voice" . DS . $folder;
if (!isset($_SESSION['javReplyTemp'])) {
$_SESSION['javReplyTemp'] = $destination_path;
}
$target_path = $destination_path . '/' . $fname;
if (!is_dir($destination_path)) {
JFolder::create($destination_path);
}
$id = JRequest::getInt("responeid", 0);
$listFiles = JRequest::getVar("listfile");
if (count($listFiles) < $javconfig['plugin']->get("total_attach_file", 0)) {
//rebuilt listfile
foreach ($listFiles as $listFile) {
$type = substr(strtolower(trim($listFile)), -3, 3);
if ($type == 'ocx') {
$type = "doc";
}
$img .= "<div style='float: left; clear: both;'><span><input type='checkbox' onclick='javCheckTotalFileReply()' name='listfile[]' value='{$listFile}' checked></span> <img src='" . Juri::root() . "components/com_javoice/asset/images/icons/" . $type . ".gif' alt='" . $type . "' /> " . $listFile . "</div>";
$totalFile++;
}
//load file uncheck
$listFilesInFolders = JFolder::files($destination_path);
foreach ($listFilesInFolders as $listFilesInFolder) {
if (!in_array($listFilesInFolder, $listFiles)) {
$type = substr(strtolower(trim($listFilesInFolder)), -3, 3);
if ($type == 'ocx') {
$type = "doc";
}
$img .= "<div style='float: left; clear: both;'><span><input type='checkbox' onclick='javCheckTotalFileReply()' name='listfile[]' value='{$listFilesInFolder}' disabled='disabled'></span> <img src='" . Juri::root() . "components/com_javoice/asset/images/icons/" . $type . ".gif' alt='" . $type . "' /> " . $listFilesInFolder . "</div>";
$totalFile++;
}
}
$listFilesInFolders = JFolder::files(JPATH_ROOT . DS . "images" . DS . "stories" . DS . "ja_voice" . DS . "admin_response" . DS . $id);
foreach ($listFilesInFolders as $listFilesInFolder) {
if (!in_array($listFilesInFolder, $listFiles)) {
$type = substr(strtolower(trim($listFilesInFolder)), -3, 3);
if ($type == 'ocx') {
$type = "doc";
}
$img .= "<div style='float: left; clear: both;'><span><input type='checkbox' onclick='javCheckTotalFileReply()' name='listfile[]' value='{$listFilesInFolder}' disabled='disabled'></span> <img src='" . Juri::root() . "components/com_javoice/asset/images/icons/" . $type . ".gif' alt='" . $type . "' /> " . $listFilesInFolder . "</div>";
$totalFile++;
}
}
if (file_exists($target_path) || file_exists(JPATH_ROOT . DS . "images" . DS . "stories" . DS . "ja_voice" . DS . "admin_response" . DS . $id . DS . $fname)) {
$fileexist = 1;
} elseif (@move_uploaded_file($_FILES['myfile']['tmp_name'], $target_path)) {
$totalFile++;
$type = substr(strtolower(trim($_FILES['myfile']['name'])), -3, 3);
if ($type == 'ocx') {
$type = "doc";
}
$img .= "<input type='checkbox' name='listfile[]' onclick='javCheckTotalFileReply()' value='{$fname}' checked> <img src='" . Juri::root() . "components/com_javoice/asset/images/icons/" . $type . ".gif' /> " . $fname . "<br />";
}
}
echo '<script language="javascript" type="text/javascript">
var par = window.parent.document;
function stopUpload(par, listfile, count, totalUpload){
//.........这里部分代码省略.........