/** * Method is called by the view and the results are imploded and displayed in a placeholder * * @param object The article object. Note $article->text is also available * @param object The article params * @param int The 'page' number * @return string */ function onAfterDisplayContent(&$article, &$params, $limitstart) { $regex = '/{biztweet}([^{]+){\\/biztweet}/i'; // simple performance check to determine whether bot should process further if (strpos($article->text, 'biztweet') !== false and JRequest::getCmd('view') == 'article') { $matches = array(); if (preg_match_all($regex, $article->text, $matches)) { //$search = array_pop($matches); // pop from the end $count = count($matches[1]); $width = floor(100 / $count); // now replace it $article->text = preg_replace($regex, '', $article->text); // build the html $tweets = ""; if ($this->_params->get('title', '')) { $tweets .= "<div class='contentheading'>" . $this->_params->get('title', '') . "</div>"; } foreach ($matches[1] as $search) { $search = preg_replace('/[^A-Za-z0-9_\\s]/', '', $search); $id = preg_replace('/[^A-Za-z0-9_]/', '__', $search); $tweets .= "<div id='btload_" . $id . "' style='text-align:center;'>"; $tweets .= JHTML::image(JURI::base() . 'plugins/content/biztweet/loading.gif', JText::_('Loading...')); $tweets .= "</div>"; $tweets .= "<ul class='timeline btsearchbox' title='" . $search . "' id='btsearch1'></ul>"; } $tweets .= "<div style='clear:both;'></div>"; return $tweets; } } else { if (strpos($article->text, 'biztweet') !== false and JRequest::getCmd('view') != 'article') { // remove the tag $article->text = preg_replace($regex, '', $article->text); } } }
function getData() { $user = JFactory::getUser(); if ($this->_id) { $query = ' SELECT i.* ' . ' FROM #__tracks_individuals as i ' . ' WHERE i.id = ' . $this->_id; } else { if ($user->get('id')) { $query = ' SELECT i.* ' . ' FROM #__tracks_individuals as i ' . ' WHERE i.user_id = ' . $user->get('id'); } else { JError::raiseError(403, JText::_('COM_TRACKS_ERROR_MUST_BE_LOGGED')); return false; } } $this->_db->setQuery($query); if ($result = $this->_db->loadObject()) { $this->_data = $result; $attribs['class'] = "pic"; if ($this->_data->picture != '') { $this->_data->picture = JHTML::image(JURI::root() . $this->_data->picture, $this->_data->first_name . ' ' . $this->_data->last_name, $attribs); } else { $this->_data->picture = JHTML::image(JURI::root() . 'media/com_tracks/images/misc/tnnophoto.jpg', $this->_data->first_name . ' ' . $this->_data->last_name, $attribs); } if ($this->_data->picture_small != '') { $this->_data->picture_small = JHTML::image(JURI::root() . $this->_data->picture_small, $this->_data->first_name . ' ' . $this->_data->last_name, $attribs); } else { $this->_data->picture_small = JHTML::image(JURI::root() . 'media/com_tracks/images/misc/tnnophoto.jpg', $this->_data->first_name . ' ' . $this->_data->last_name, $attribs); } } return $this->_data; }
function getTables() { $tables = array(); $data = array(); $data[] = array('<b>' . JText::_('URL') . '</b>', $this->_logRecord->url); if ($this->_logRecord->ip) { $ipBlocked = JD_Block_Helper::isIPBlocked($this->_logRecord->ip); $src = $ipBlocked ? JURI::base() . 'components/com_jdefender/images/locked.gif' : JURI::base() . 'components/com_jdefender/images/unlocked.gif'; $img = JHTML::image($src, JText::_('Block/Unblock user'), array('id' => 'user_ip_img', 'onclick' => 'toggleLockImage(); xajax_jdBlockParam(\'user_ip_img\', \'ip\', \'' . $this->_logRecord->ip . '\')', 'title' => JText::_('Block/Unblock IP'), 'class' => 'hasTip', 'style' => 'cursor: pointer')); $data[] = array('<b>' . JText::_('IP Address') . '</b>', $img . ' ' . $this->_logRecord->ip); } if ($this->_logRecord->user_id) { $user =& JFactory::getUser($this->_logRecord->user_id); $isUserBlocked = JD_Block_Helper::isUserBlocked($user->get('id')); $src = $isUserBlocked ? JURI::base() . 'components/com_jdefender/images/locked.gif' : JURI::base() . 'components/com_jdefender/images/unlocked.gif'; $img = JHTML::image($src, JText::_('Block/Unblock user'), array('id' => 'user_img_' . $user->get('id'), 'onclick' => 'toggleLockImage(); xajax_jdBlockParam(\'user_img_' . $user->get('id') . '\', \'user\',' . $user->get('id') . ')', 'title' => JText::_('Block/Unblock user'), 'class' => 'hasTip', 'style' => 'cursor: pointer')); $userId = $img . ' ' . $user->get('id'); $data[] = array('<b>' . JText::_('User ID') . '</b>', $userId); $data[] = array('<b>' . JText::_('Username') . '</b>', $user->get('username')); $data[] = array('<b>' . JText::_('Name') . '</b>', $user->get('name')); $data[] = array('<b>' . JText::_('Email') . '</b>', JHTML::_('email.cloak', $user->get('email'))); } // unset($this->_logRecord->status); unset($this->_logRecord->url); $tables[] = $data; return $tables; }
function getLogo(&$item, $class) { $imgtype = $this->params->get('logotype', 'logo_middle'); $logourl = (!empty($item->{$imgtype}) and file_exists(JPATH_ROOT . DS . str_replace('/', DS, $item->{$imgtype}))) ? $item->{$imgtype} : $this->placeholders[$imgtype]; //echo $logourl.'<br />'; $imgtitle = JText::_('View ') . $item->team_name; return JHTML::image($logourl, $item->team_name, 'border="0" class="' . $class . '" title="' . $imgtitle . '"'); }
public function display($tpl = null) { // Automatically fetch items, total and pagination - and assign them to the template $this->setAutoClean(false); $this->fetchItems(); $document =& JFactory::getDocument(); // Get some variables $layout = $this->params->get('layout', 'default'); $clayout = $this->params->get('clayout', 'default'); // Load the layout-specific stylesheet $this->addCss('view-categories-' . $clayout . '.css'); // Get the parent-category from our model $model =& $this->getModel(); $parent = $model->getParent(); // Set the page title $page_title = $this->params->get('page_title'); if ($this->params->get('show_page_title') == 1 && !empty($page_title)) { $document->setTitle($page_title); $parent->title = $page_title; } elseif (!empty($parent->title)) { $document->setTitle($parent->title); } // Loop through the list to set things right if (count($this->items) > 0) { foreach ($this->items as $id => $item) { if ($this->params->get('show_category_title') == 0) { $item->title = null; } if ($this->params->get('show_category_description') == 0) { $item->description = null; } $layout = $item->params->get('layout', $layout); $needles = array('category_id' => $item->id, 'category_alias' => $item->alias, 'layout' => $layout); $item->link = SimplelistsHelper::getUrl($needles); // Reinsert this item $this->items[$id] = $item; } } else { $this->assignRef('message', JText::_('No categories found')); } // prepare the image if ($this->params->get('show_category_image') && !empty($parent->image)) { $parent->image = JHTML::image($parent->image, $parent->title, 'title="' . $parent->title . '" class="simplelists" align="' . $parent->image_position . '"'); } else { $parent->image = null; } // prepare the title if ($this->params->get('show_category_title') == 0) { $parent->title = null; } // prepare the description if ($this->params->get('show_category_description') == 0) { $parent->description = null; } $this->assignRef('category', $parent); parent::display($tpl); }
function getFUOFBCustomImage($image_text, $custom_image) { $mod_URL = 'media/mod_fuofb/images/'; $mod_path = 'media/mod_fuofb/images/'; $img_URL = $mod_URL . $custom_image; $img_path = $mod_path . $custom_image; $size = getimagesize(JPATH_BASE . '/' . $img_path); //get dimensions of image $attr = array('title' => $image_text, 'width' => $size[0], 'height' => $size[1]); $img = JHTML::image(JURI::base() . $img_URL, 'Find Us On FaceBook - Image', $attr); return $img; }
static function listMessagesTitle($newsletter, $messages, $linkable) { $base_jinc = JURI::base() . 'components/com_jinc/assets/images/icons/'; $options = array('height' => 16, 'width' => 16, 'title' => JText::_('COM_JINC_ATTACHMENT')); $attach_img = JHTML::image($base_jinc . 'attachment.png', JText::_('COM_JINC_ATTACHMENT'), $options); echo '<table class="tbl_oldmsg" align="center" width="95%">'; echo '<thead><tr>'; echo '<th width="65%" align="left">' . JText::_('COM_JINC_SUBJECT') . '</th>'; echo '<th width="25%" align="center">' . JText::_('COM_JINC_MSGSENT') . '</th>'; echo '<th width="10%" align="center">' . $attach_img . '</th>'; echo '</tr></thead>'; $i = 0; foreach ($messages as $message) { $subject = $message->subject; $body = $message->body . $newsletter->get('disclaimer'); $body = preg_replace('/\\[SENDER\\]/s', $newsletter->get('sendername'), $body); $body = preg_replace('/\\[SENDERMAIL\\]/s', $newsletter->get('senderaddr'), $body); $body = preg_replace('/\\[NEWSLETTER\\]/s', $newsletter->get('name'), $body); $news_id = $newsletter->get('id'); $unsub_link = JURI::root() . 'index.php?option=com_jinc&view=newsletter&layout=unsubscription&news_id=' . $news_id; $body = preg_replace('/\\[UNSUBSCRIPTIONURL\\]/s', $unsub_link, $body); $user = JFactory::getUser(); if (!$user->guest) { $user_mail = $user->get('email'); $userid = $user->get('username'); $username = $user->get('name'); $current = array('usermail' => $user_mail, 'userid' => $userid, 'username' => $username); foreach ($current as $key => $value) { $body = preg_replace('/\\[' . strtoupper($key) . '\\]/s', $value, $body); } } $datasent = $message->datasent; $attachment = str_replace(DIRECTORY_SEPARATOR, '/', $message->attachment); $link_att = JRoute::_('images/' . $attachment); echo '<tr class="row' . $i % 2 . '">'; echo '<td width="50%">'; if ($linkable) { echo '<a href="index.php?option=com_jinc&view=message&id=' . $message->id . '">' . $subject . '</a>'; } else { echo JHTML::tooltip(substr(strip_tags($body), 0, 75) . ' ...', $subject, '', $subject); } echo '</td>'; echo '<td width="20%" align="center">' . $datasent . '</td>'; echo '<td width="8%" align="center">'; if (strlen($message->attachment) > 0) { echo $attach_img; } echo '</td>'; echo '</tr>'; $i++; } echo '</table>'; }
function getversionlist() { // Check for request forgeries JRequest::checkToken('request') or jexit('Invalid Token'); @ob_end_clean(); $id = JRequest::getInt('id', 0); $active = JRequest::getInt('active', 0); if (!$id) { return; } $revert = JHTML::image('administrator/components/com_flexicontent/assets/images/arrow_rotate_anticlockwise.png', JText::_('FLEXI_REVERT')); $view = JHTML::image('administrator/components/com_flexicontent/assets/images/magnifier.png', JText::_('FLEXI_VIEW')); $comment = JHTML::image('administrator/components/com_flexicontent/assets/images/comment.png', JText::_('FLEXI_COMMENT')); $model = $this->getModel('item'); $model->setId($id); $item = $model->getItem($id); $cparams = JComponentHelper::getParams('com_flexicontent'); $versionsperpage = $cparams->get('versionsperpage', 10); $currentversion = $item->version; $page = JRequest::getInt('page', 0); $versioncount = $model->getVersionCount(); $numpage = ceil($versioncount / $versionsperpage); if ($page > $numpage) { $page = $numpage; } elseif ($page < 1) { $page = 1; } $limitstart = ($page - 1) * $versionsperpage; $versions = $model->getVersionList(); $versions = $model->getVersionList($limitstart, $versionsperpage); $jt_date_format = FLEXI_J16GE ? 'FLEXI_DATE_FORMAT_FLEXI_VERSIONS_J16GE' : 'FLEXI_DATE_FORMAT_FLEXI_VERSIONS'; $df_date_format = FLEXI_J16GE ? "d/M H:i" : "%d/%m %H:%M"; $date_format = JText::_($jt_date_format); $date_format = $date_format == $jt_date_format ? $df_date_format : $date_format; $ctrl_task = FLEXI_J16GE ? 'task=items.edit' : 'controller=items&task=edit'; foreach ($versions as $v) { $class = $v->nr == $active ? ' id="active-version"' : ''; echo ' <tr' . $class . '> <td class="versions">#' . $v->nr . '</td> <td class="versions">' . JHTML::_('date', $v->nr == 1 ? $item->created : $v->date, $date_format) . '</td> <td class="versions">' . ($v->nr == 1 ? $item->creator : $v->modifier) . '</td> <td class="versions" align="center"> <a href="javascript:;" class="hasTooltip" title="' . JHtml::tooltipText(JText::_('FLEXI_COMMENT'), $v->comment ? $v->comment : 'No comment written', 0, 1) . '">' . $comment . '</a> ' . ((int) $v->nr == (int) $currentversion ? '<a onclick="javascript:return clickRestore(\'index.php?option=com_flexicontent&' . $ctrl_task . '&cid=' . $item->id . '&version=' . $v->nr . '\');" href="javascript:;">' . JText::_('FLEXI_CURRENT') . '</a>' : '<a class="modal-versions" href="index.php?option=com_flexicontent&view=itemcompare&cid[]=' . $item->id . '&version=' . $v->nr . '&tmpl=component" title="' . JText::_('FLEXI_COMPARE_WITH_CURRENT_VERSION') . '" rel="{handler: \'iframe\', size: {x:window.getSize().scrollSize.x-100, y: window.getSize().size.y-100}}">' . $view . '</a> <a onclick="javascript:return clickRestore(\'index.php?option=com_flexicontent&' . $ctrl_task . '&cid=' . $item->id . '&version=' . $v->nr . '&' . JSession::getFormToken() . '=1\');" href="javascript:;" title="' . JText::sprintf('FLEXI_REVERT_TO_THIS_VERSION', $v->nr) . '">' . $revert . '</a> ') . ' </td> </tr>'; } exit; }
function getversionlist() { // Check for request forgeries JRequest::checkToken('request') or jexit('Invalid Token'); @ob_end_clean(); $id = JRequest::getInt('id', 0); $active = JRequest::getInt('active', 0); if (!$id) { return; } $revert = JHTML::image('administrator/components/com_flexicontent/assets/images/arrow_rotate_anticlockwise.png', JText::_('FLEXI_REVERT')); $view = JHTML::image('administrator/components/com_flexicontent/assets/images/magnifier.png', JText::_('FLEXI_VIEW')); $comment = JHTML::image('administrator/components/com_flexicontent/assets/images/comment.png', JText::_('FLEXI_COMMENT')); $model = $this->getModel('item'); $model->setId($id); $item = $model->getItem($id); $cparams = JComponentHelper::getParams('com_flexicontent'); $versionsperpage = $cparams->get('versionsperpage', 10); $currentversion = $item->version; $page = JRequest::getInt('page', 0); $versioncount = $model->getVersionCount(); $numpage = ceil($versioncount / $versionsperpage); if ($page > $numpage) { $page = $numpage; } elseif ($page < 1) { $page = 1; } $limitstart = ($page - 1) * $versionsperpage; $versions = $model->getVersionList(); $versions = $model->getVersionList($limitstart, $versionsperpage); $jt_date_format = FLEXI_J16GE ? 'FLEXI_DATE_FORMAT_FLEXI_VERSIONS_J16GE' : 'FLEXI_DATE_FORMAT_FLEXI_VERSIONS'; $df_date_format = FLEXI_J16GE ? "d/M H:i" : "%d/%m %H:%M"; $date_format = JText::_($jt_date_format); $date_format = $date_format == $jt_date_format ? $df_date_format : $date_format; $ctrl_task = FLEXI_J16GE ? 'task=items.edit' : 'controller=items&task=edit'; foreach ($versions as $v) { $class = $v->nr == $active ? ' id="active-version"' : ''; echo "<tr" . $class . "><td class='versions'>#" . $v->nr . "</td>\n\t\t\t\t<td class='versions'>" . JHTML::_('date', $v->nr == 1 ? $item->created : $v->date, $date_format) . "</td>\n\t\t\t\t<td class='versions'>" . ($v->nr == 1 ? $item->creator : $v->modifier) . "</td>\n\t\t\t\t<td class='versions' align='center'><a href='#' class='hasTip' title='Comment::" . $v->comment . "'>" . $comment . "</a>"; if ((int) $v->nr == (int) $currentversion) { //is current version? echo "<a onclick='javascript:return clickRestore(\"index.php?option=com_flexicontent&" . $ctrl_task . "&cid=" . $item->id . "&version=" . $v->nr . "\");' href='#'>" . JText::_('FLEXI_CURRENT') . "</a>"; } else { echo "<a class='modal-versions' href='index.php?option=com_flexicontent&view=itemcompare&cid[]=" . $item->id . "&version=" . $v->nr . "&tmpl=component' title='" . JText::_('FLEXI_COMPARE_WITH_CURRENT_VERSION') . "' rel='{handler: \"iframe\", size: {x:window.getSize().scrollSize.x-100, y: window.getSize().size.y-100}}'>" . $view . "</a><a onclick='javascript:return clickRestore(\"index.php?option=com_flexicontent&" . $ctrl_task . "&cid=" . $item->id . "&version=" . $v->nr . "&" . (FLEXI_J30GE ? JSession::getFormToken() : JUtility::getToken()) . "=1\");' href='#' title='" . JText::sprintf('FLEXI_REVERT_TO_THIS_VERSION', $v->nr) . "'>" . $revert; } echo "</td></tr>"; } exit; }
static function legend($legend_array, $img_base = 'components/com_jinc/assets/images/') { echo '<table cellspacing="0" cellpadding="4" align="center">'; echo '<tr align="center">'; for ($i = 0; $i < count($legend_array); $i++) { $element = $legend_array[$i]; $text = JText::_($element['text']); $icon = $element['icon']; $alternate = isset($element['alt']) ? $element['alt'] : $text; $img_url = JURI::base() . $img_base . $icon; $img_options = array("height" => 16, "width" => 16); $img = JHTML::image($img_url, $alternate, $img_options); echo '<td>' . $img . ' '; echo $text . ' </td>'; } echo '</tr></table>'; }
function getIndividuals($project_id = 0) { if (!$project_id) { $this->setError(JText::_('COM_TRACKS_No_project_specified')); return null; } $query = ' SELECT i.id, i.first_name, i.last_name, i.country_code, i.picture, i.picture_small, ' . ' pi.number, pi.team_id, ' . ' t.name as team_name, t.picture_small AS team_logo, ' . ' CASE WHEN CHAR_LENGTH( i.alias ) THEN CONCAT_WS( \':\', i.id, i.alias ) ELSE i.id END AS slug, ' . ' CASE WHEN CHAR_LENGTH( t.alias ) THEN CONCAT_WS( \':\', t.id, t.alias ) ELSE t.id END AS teamslug ' . ' FROM #__tracks_participants as pi ' . ' INNER JOIN #__tracks_individuals as i ON i.id = pi.individual_id ' . ' LEFT JOIN #__tracks_teams as t ON t.id = pi.team_id ' . ' WHERE pi.project_id = ' . $project_id . ' ORDER BY pi.number ASC, i.last_name ASC, i.first_name ASC '; $this->_db->setQuery($query); $result = $this->_db->loadObjectList(); $count = count($result); for ($i = 0; $i < $count; $i++) { $obj =& $result[$i]; $attribs['class'] = "pic"; if ($obj->picture != '') { $obj->picture = JHTML::image(JURI::root() . $obj->picture, $obj->first_name . ' ' . $obj->last_name, $attribs); } else { $obj->picture = JHTML::image(JURI::root() . 'media/com_tracks/images/misc/tnnophoto.jpg', $obj->first_name . ' ' . $obj->last_name, $attribs); } } return $result; }
function quickiconButton($link, $image, $text, $id, $path = false, $modalclass = '') { $app = JFactory::getApplication(); $lang = JFactory::getLanguage(); $template = $app->getTemplate(); if (!$path) { $path = 'templates/' . $template . '/images/header/'; } //end if $modalref = $modalclass ? ' class="' . $modalclass . '" rel="{handler: \'iframe\' , size: {x:571, y:400}}"' : ''; if ($modalref) { if (!defined('ADD_MODAL_CLASS')) { $doc = JFactory::getDocument(); $doc->addScriptDeclaration("window.addEvent('domready', function()\n\t\t\t {\n \$\$('a.modal').each(function(el)\n {\n el.addEvent('click', function()\n {\n (function()\n {\n SqueezeBox.overlay.removeEvent('click',SqueezeBox.bound.close);\n }).delay(250);\n }); \n }); \n });"); define('ADD_MODAL_CLASS', 1); } } // RENDER BTN // the id is for auto firing of the buttons ?> <a id="jcktaskbtn_<?php echo $id; ?> " href="<?php echo $link; ?> "<?php echo $modalref; ?> > <?php echo JHTML::image(JUri::root() . $path . $image, $text); ?> <div><?php echo $text; ?> </div> </a> <?php }
/** * Display home page */ function show($feed, $logs) { JHTML::stylesheet('media/com_fabrik/css/admin.css'); jimport('joomla.html.pane'); $pane =& JPane::getInstance('Sliders'); JToolBarHelper::title(JText::_('WELCOME'), 'fabrik.png'); ?> <table class="adminForm" style="width: 100%"> <tbody> <tr> <td valign="top" style="width: 50%"> <a href="http://fabrikar.com"> <?php echo JHTML::image('media/com_fabrik/images/logo.png', 'Fabrik logo'); ?> </a> <div style="float:left;width:250px;margin-top:30px;"> <a href="http://fabrikar.com/index.php?option=com_acctexp&task=register&Itemid=44"> <?php echo JHTML::image('media/com_fabrik/images/box.png', 'Fabrik'); ?> </a> </div> <div style="margin-left:200px;margin-top:30px;"> <h1>Subscribe and get</h1> <ul> <li>Dedicated support</li> <li>Concise and clear documentation</li> <li>Video tutorials</li> </ul> <a href="http://fabrikar.com/index.php?option=com_acctexp&task=register&Itemid=44"> <?php echo JHTML::image('media/com_fabrik/images/subscribe-now.png', 'Fabrik'); ?> </a><br /> </div> </td> <td valign="top" style="width: 50%"><?php echo $pane->startPane("content-pane"); echo $pane->startPanel('About', "publish-page"); echo "<table class='adminlist'>\n\t\t\t<tr><td><p>Fabrik is an open source Joomla application builder\ncomponent.</p>\n<p>Fabrik gives people the power to create forms, tables and visualizations that run inside\nJoomla without requiring knowledge of mySQL and PHP, all from within the\nfamiliar Joomla administration interface.</p>\n<p>With Fabrik you can create\napplications that range in complexity from simple contact forms to\ncomplex applications such as a job application site or bug tracking\nsystems.</p></td></tr></table>"; echo $pane->endPanel(); echo $pane->startPanel('News', "publish-page"); echo $feed; echo $pane->endPanel(); echo $pane->startPanel('Stats', "publish-page"); ?> <table class='adminlist'> <thead> <tr> <th style="width:20%"><?php echo JText::_('DATE'); ?> </th> <th><?php echo JText::_('ACTION'); ?> </th> </tr> </thead> <tbody> <?php foreach ($logs as $log) { ?> <tr> <td> <?php echo $log->timedate_created; ?> </td> <td> <span class="editlinktip hasTip" title="<?php echo $log->message_type . "::" . $log->message; ?> "> <?php echo $log->message_type; ?> </span> </td> </tr> <?php } ?> </tbody> </table> <?php echo $pane->endPanel(); echo $pane->startPanel('Useful links', "publish-page"); ?> <table class='adminlist'> <tbody> <tr> <td> <ul> <li><a href="http://fabrikar.com/">Fabrik web site</a></li> <li><a href="http://fabrikar.com/forums">Forum</a> <li><a href="http://fabrikar.com/index.php?option=com_openwiki&Itemid=11">Documentation WIKI</a></li> </ul> </td> </tr> </tbody> </table> <?php echo $pane->endPanel(); echo $pane->startPanel('Tools', "publish-page"); ?> <table class='adminlist'> <tbody> <tr> <td> <ul> <li><a href="index.php?option=com_fabrik&task=installSampleData">Install Sample data</a></li> <li><a onclick="return confirm('Are you really sure this will wipe ALL your Fabrik data?');" href="index.php?option=com_fabrik&c=home&task=reset"><?php echo JText::_('Reset Fabrik'); ?> </a></li> </ul> </td> </tr> </tbody> </table> <?php echo $pane->endPanel(); echo $pane->endPane(); ?> </td> </tr> </tbody> </table> <?php }
function onDisplayFieldValue(&$field, $item, $values = null, $prop = 'display') { // execute the code only if the field type match the plugin type if (!in_array($field->field_type, self::$field_types)) { return; } // Get isMobile / isTablet Flags static $isMobile = null; static $isTablet = null; static $useMobile = null; if ($useMobile === null) { $cparams = JComponentHelper::getParams('com_flexicontent'); $force_desktop_layout = $cparams->get('force_desktop_layout', 0); //$start_microtime = microtime(true); $mobileDetector = flexicontent_html::getMobileDetector(); $isMobile = $mobileDetector->isMobile(); $isTablet = $mobileDetector->isTablet(); $useMobile = $force_desktop_layout ? $isMobile && !$isTablet : $isMobile; //$time_passed = round(1000000 * 10 * (microtime(true) - $start_microtime)) / 10; //printf('<br/>-- [Detect Mobile: %.3f s] ', $time_passed/1000000); } $field->label = JText::_($field->label); // some parameter shortcuts $target = $field->parameters->get('targetblank', 0); $target_param = $target ? ' target="_blank"' : ''; $display_hits = $field->parameters->get('display_hits', 0); $add_hits_img = $display_hits == 1 || $display_hits == 3; $add_hits_txt = $display_hits == 2 || $display_hits == 3 || $isMobile; $rel_nofollow = $field->parameters->get('add_rel_nofollow', 0) ? ' rel="nofollow"' : ''; // This is field 's MAIN value property $link_usage = $field->parameters->get('link_usage', 0); $default_link = $link_usage == 2 ? $field->parameters->get('default_value_link', '') : ''; // Optional value properties $usetitle = $field->parameters->get('use_title', 0); $title_usage = $field->parameters->get('title_usage', 0); $default_title = $title_usage == 2 ? JText::_($field->parameters->get('default_value_title', '')) : ''; // Get field values $values = $values ? $values : $field->value; // DO NOT terminate yet if value is empty since a default value on empty may have been defined // Handle default value loading, instead of empty value if (empty($values) && !strlen($default_link)) { $field->{$prop} = ''; return; } else { if (empty($values) && strlen($default_link)) { $values = array(); $values[0]['link'] = JText::_($default_link); $values[0]['title'] = JText::_($default_title); $values[0]['hits'] = 0; $values[0] = serialize($values[0]); } } // Value handling parameters $multiple = $field->parameters->get('allow_multiple', 1); // Prefix - Suffix - Separator parameters, replacing other field values if found $remove_space = $field->parameters->get('remove_space', 0); $pretext = FlexicontentFields::replaceFieldValue($field, $item, $field->parameters->get('pretext', ''), 'pretext'); $posttext = FlexicontentFields::replaceFieldValue($field, $item, $field->parameters->get('posttext', ''), 'posttext'); $separatorf = $field->parameters->get('separatorf', 1); $opentag = FlexicontentFields::replaceFieldValue($field, $item, $field->parameters->get('opentag', ''), 'opentag'); $closetag = FlexicontentFields::replaceFieldValue($field, $item, $field->parameters->get('closetag', ''), 'closetag'); if ($pretext) { $pretext = $remove_space ? $pretext : $pretext . ' '; } if ($posttext) { $posttext = $remove_space ? $posttext : ' ' . $posttext; } switch ($separatorf) { case 0: $separatorf = ' '; break; case 1: $separatorf = '<br />'; break; case 2: $separatorf = ' | '; break; case 3: $separatorf = ', '; break; case 4: $separatorf = $closetag . $opentag; break; case 5: $separatorf = ''; break; default: $separatorf = ' '; break; } // Optimization, do some stuff outside the loop static $hits_icon = null; if ($hits_icon === null && ($display_hits == 1 || $display_hits == 3)) { $_attribs = $display_hits == 1 ? 'class="hasTip" title=":: %s ' . JText::_('FLEXI_HITS', true) . '"' : ''; $hits_icon = FLEXI_J16GE ? JHTML::image('components/com_flexicontent/assets/images/' . 'user.png', JText::_('FLEXI_HITS'), $_attribs) : JHTML::_('image.site', 'user.png', 'components/com_flexicontent/assets/images/', NULL, NULL, JText::_('FLEXI_HITS'), $_attribs); } // needed for backend display //if ($display_hits) // $isAdmin = JFactory::getApplication()->isAdmin(); // initialise property $field->{$prop} = array(); $n = 0; foreach ($values as $value) { if (!strlen($value)) { continue; } // Compatibility for old unserialized values if (@unserialize($value) !== false || $value === 'b:0;') { $value = unserialize($value); } else { $value = array('link' => $value, 'title' => '', 'hits' => 0); } if (empty($value['link'])) { continue; } // no link ... // If not using property or property is empty, then use default property value // NOTE: default property values have been cleared, if (propertyname_usage != 2) $title = $usetitle && @$value['title'] ? $value['title'] : $default_title; $hits = (int) @$value['hits']; $link_params = $title ? ' title="' . $title . '"' : ''; $link_params .= $target_param; $link_params .= $rel_nofollow; if ($field->parameters->get('use_direct_link', 0)) { // Direct access to the web-link, hits counting not possible $href = $value['link']; } else { // Indirect access to the web-link, via calling FLEXIcontent component, thus counting hits too $href = JRoute::_('index.php?option=com_flexicontent&fid=' . $field->id . '&cid=' . $field->item_id . '&ord=' . ($n + 1) . '&task=weblink'); } // Create indirect link to web-link address with custom displayed text $linktext = $title ? $title : $this->cleanurl($value['link']); $field->{$prop}[$n] = $pretext . '<a href="' . $href . '" ' . $link_params . '>' . $linktext . '</a>' . $posttext; // HITS: either as icon or as inline text or both $hits_html = ''; if ($display_hits && $hits) { $hits_html = '<span class="fcweblink_hits">'; if ($add_hits_img && @$hits_icon) { $hits_html .= sprintf($hits_icon, $hits); } if ($add_hits_txt) { $hits_html .= '(' . $hits . ' ' . JTEXT::_('FLEXI_HITS') . ')'; } $hits_html .= '</span>'; if ($prop == 'display_hitsonly') { $field->{$prop}[$n] = $hits_html; } else { $field->{$prop}[$n] .= ' ' . $hits_html; } } $n++; if (!$multiple) { break; } // multiple values disabled, break out of the loop, not adding further values even if the exist } // Apply seperator and open/close tags if (count($field->{$prop})) { $field->{$prop} = implode($separatorf, $field->{$prop}); $field->{$prop} = $opentag . $field->{$prop} . $closetag; } else { $field->{$prop} = ''; } }
/* TO DO add width and height to the image */ if (!empty($this->product->product_availability)) { $stockhandle = VmConfig::get('stockhandle', 'none'); if ($stockhandle == 'risetime' and $this->product->product_in_stock - $this->product->product_ordered < 1) { ?> <div class="availability"> <?php echo JHTML::image(JURI::root() . VmConfig::get('assets_general_path') . 'images/availability/' . VmConfig::get('rised_availability', '7d.gif'), VmConfig::get('rised_availability', '7d.gif'), array('class' => 'availability')); ?> </div> <?php } else { ?> <div class="availability"> <?php echo JHTML::image(JURI::root() . VmConfig::get('assets_general_path') . 'images/availability/' . $this->product->product_availability, $this->product->product_availability, array('class' => 'availability')); ?> </div> <?php } } ?> <?php // Ask a question about this product if (VmConfig::get('ask_question', 1) == '1') { ?> <div class="ask-a-question"> <a class="ask-a-question" href="<?php echo $url; ?>
defined('_JEXEC') or die('Restricted access'); $tip_class = FLEXI_J30GE ? ' hasTooltip' : ' hasTip'; $btn_class = FLEXI_J30GE ? 'btn' : 'fc_button fcsimple'; $start_text = '<span class="label">' . JText::_('FLEXI_COLUMNS', true) . '</span>'; $end_text = '<div class="icon-arrow-up-2" title="' . JText::_('FLEXI_HIDE') . '" style="cursor: pointer;" onclick="fc_toggle_box_via_btn(\\\'mainChooseColBox\\\', document.getElementById(\\\'fc_mainChooseColBox_btn\\\'), \\\'btn-primary\\\');"></div>'; flexicontent_html::jscode_to_showhide_table('mainChooseColBox', 'adminListTableFCusers', $start_text, $end_text); // Dates displayed in the item form, are in user timezone for J2.5, and in site's default timezone for J1.5 $site_zone = JFactory::getApplication()->getCfg('offset'); $user_zone = JFactory::getUser()->getParam('timezone', $site_zone); $tz = new DateTimeZone($user_zone); $tz_offset = $tz->getOffset(new JDate()) / 3600; $tz_info = $tz_offset > 0 ? ' UTC +' . $tz_offset : ' UTC ' . $tz_offset; $tz_info .= ' (' . $user_zone . ')'; $date_note_msg = JText::sprintf(FLEXI_J16GE ? 'FLEXI_DATES_IN_USER_TIMEZONE_NOTE' : 'FLEXI_DATES_IN_SITE_TIMEZONE_NOTE', ' ', $tz_info); $date_note_attrs = ' class="fc-man-icon-s ' . $tip_class . '" title="' . flexicontent_html::getToolTip(null, $date_note_msg, 0, 1) . '" '; $date_zone_tip = JHTML::image('administrator/components/com_flexicontent/assets/images/comment.png', JText::_('FLEXI_NOTES'), $date_note_attrs); $list_total_cols = 13; // COMMON repeated texts $edit_entry = JText::_('FLEXI_EDIT_TAG', true); $view_entry = JText::_('FLEXI_VIEW', true); $rem_filt_txt = JText::_('FLEXI_REMOVE_FILTER'); $rem_filt_tip = ' class="' . $tip_class . ' filterdel" title="' . flexicontent_html::getToolTip('FLEXI_ACTIVE_FILTER', 'FLEXI_CLICK_TO_REMOVE_THIS_FILTER', 1, 1) . '" '; ?> <script type="text/javascript"> // the function overloads joomla standard event function submitform(pressbutton) { form = document.adminForm; // If formvalidator activated if( pressbutton == 'remove' ) {
function getUploadLimitsTxt(&$field) { $tip_class = FLEXI_J30GE ? ' hasTooltip' : ' hasTip'; $hint_image = JHTML::image('components/com_flexicontent/assets/images/comment.png', JText::_('FLEXI_NOTES'), ''); $upload_maxsize = $field->parameters->get('upload_maxsize'); $phpUploadLimit = flexicontent_upload::getPHPuploadLimit(); $server_limit_exceeded = $phpUploadLimit['value'] < $upload_maxsize; if ($server_limit_exceeded) { $warn_image = JHTML::image('components/com_flexicontent/assets/images/warning.png', JText::_('FLEXI_NOTES'), ''); } $conf_limit_class = $server_limit_exceeded ? '' : 'badge-success'; $conf_limit_style = $server_limit_exceeded ? 'text-decoration: line-through;' : ''; $conf_lim_image = $server_limit_exceeded ? $warn_image . $hint_image : $hint_image; $sys_limit_class = $server_limit_exceeded ? 'badge-important' : ''; return ' <span class="fc-img-field-upload-limits-box"> <span class="label label-info fc-upload-box-lbl">' . JText::_($server_limit_exceeded ? 'FLEXI_UPLOAD_LIMITS' : 'FLEXI_UPLOAD_LIMIT') . '</span> <span class="fc-php-upload-limit-box"> <span class="' . $tip_class . '" style="margin-left:24px;" title="' . flexicontent_html::getToolTip('FLEXI_FIELD_CONF_UPLOAD_MAX_LIMIT', 'FLEXI_FIELD_CONF_UPLOAD_MAX_LIMIT_DESC', 1, 1) . '">' . $conf_lim_image . '</span> <span class="badge ' . $conf_limit_class . '" style="' . $conf_limit_style . '">' . round($upload_maxsize / (1024 * 1024), 2) . ' M </span> </span> ' . ($server_limit_exceeded ? ' <span class="fc-sys-upload-limit-box"> <span class="' . $tip_class . '" style="margin-left:24px;" title="' . flexicontent_html::getToolTip(JText::_('FLEXI_SERVER_UPLOAD_MAX_LIMIT'), JText::sprintf('FLEXI_SERVER_UPLOAD_MAX_LIMIT_DESC', $phpUploadLimit['name']), 0, 1) . '">' . $hint_image . '</span> <span class="badge ' . $sys_limit_class . '">' . round($phpUploadLimit['value'] / (1024 * 1024), 2) . ' M </span> </span>' : '') . ' </span> '; }
protected function getInput() { $node =& $this->element; $attributes = get_object_vars($node->attributes()); $attributes = $attributes['@attributes']; $themes = flexicontent_tmpl::getTemplates(); $tmpls_all = $themes->category ? $themes->category : array(); $value = $this->value; //$value = $value ? $value : @$attributes['default']; $view = JRequest::getVar('view'); $controller = JRequest::getVar('controller'); $app = JFactory::getApplication(); $db = JFactory::getDBO(); $cparams = JComponentHelper::getParams('com_flexicontent'); // GET LIMITING to specific templates according to item's type, or according to type of new item $allowed_tmpls = array(); $all_tmpl_allowed = true; $conf_default_layout = ''; $conf_default_layout_mobile = ''; $tmpls = array(); $lays = array(); foreach ($tmpls_all as $tmpl) { if ($all_tmpl_allowed || in_array($tmpl->name, $allowed_tmpls)) { $tmpls[] = $tmpl; $lays[] = $tmpl->name; } } $lays = implode("','", $lays); if (@$attributes['enableparam']) { $cparams = JComponentHelper::getParams('com_flexicontent'); if (!$cparams->get($attributes['enableparam'])) { return FLEXI_J16GE ? '' : JText::_('FLEXI_DISABLED'); } } if (!@$attributes['skipparams']) { $doc = JFactory::getDocument(); $js = "\nvar tmpl = ['" . $lays . "'];\n\nfunction disablePanel(element) {\n\tif ( ! jQuery('#'+element+'-attribs-options') ) return;\n\t\n\tvar panel \t= jQuery('#'+element+'-attribs-options').next();\n\tvar selects = panel.find('select');\n\tvar inputs \t= panel.find('input');\n\tpanel.parent().addClass('pane-disabled');\n\tselects.each(function(index){\n\t\tjQuery(this).attr('disabled', 'disabled');\n\t});\n\tinputs.each(function(index){\n\t\tjQuery(this).attr('disabled', 'disabled');\n\t});\n\tpanel.parent().css('display','none');\n}\n\nfunction enablePanel(element) {\n\tif ( ! jQuery('#'+element+'-attribs-options') ) return;\n\t\n\tvar panel \t= jQuery('#'+element+'-attribs-options').next();\n\tvar selects = panel.find('select');\n\tvar inputs \t= panel.find('input');\n\tpanel.parent().removeClass('pane-disabled');\n\tselects.each(function(index){\n\t\tjQuery(this).removeAttr('disabled');\n\t});\n\tinputs.each(function(index){\n\t\tjQuery(this).removeAttr('disabled');\n\t});\n\tpanel.parent().css('display','');\n}\n\nfunction activatePanel(active) {\n\tvar inactives = jQuery.grep(tmpl, function( item, index ) {\n\t\treturn item != active;\n\t});\n\t\n\tinactives.each(function(el){\n\t\tdisablePanel(el);\n\t});\n\t\n\tif (active) {\n\t\tenablePanel(active);\n\t}\n}\n\njQuery(document).ready(function() {\n\tactivatePanel('" . $value . "');\n});\n"; $doc->addScriptDeclaration($js); } $layouts = array(); if (@$attributes['firstoption']) { $layouts[] = JHTMLSelect::option('', JText::_($attributes['firstoption'])); } else { $layouts[] = JHTMLSelect::option('', '-- ' . JText::_('FLEXI_USE_GLOBAL') . ' --'); } foreach ($tmpls as $tmpl) { $layouts[] = JHTMLSelect::option($tmpl->name, $tmpl->name); } $fieldname = $this->name; $element_id = $this->id; $attribs = ''; if (@$attributes['multiple'] == 'multiple' || @$attributes['multiple'] == 'true') { $attribs .= ' multiple="multiple" '; $attribs .= @$attributes['size'] ? ' size="' . @$attributes['size'] . '" ' : ' size="6" '; } if (@$attributes['class']) { $attribs .= 'class="' . $attributes['class'] . '"'; } if (!@$attributes['skipparams']) { $attribs .= ' onchange="activatePanel(this.value);"'; } if ($inline_tip = @$attributes['inline_tip']) { $tip_img = @$attributes['tip_img']; $tip_img = $tip_img ? $tip_img : 'comment.png'; $preview_img = @$attributes['preview_img']; $preview_img = $preview_img ? $preview_img : ''; $tip_class = @$attributes['tip_class']; $tip_class .= FLEXI_J30GE ? ' hasTooltip' : ' hasTip'; $hintmage = JHTML::image('administrator/components/com_flexicontent/assets/images/' . $tip_img, JText::_('FLEXI_NOTES'), ' style="max-height:24px; padding:0px; margin-left:12px; margin-right:0px;" '); $previewimage = $preview_img ? JHTML::image('administrator/components/com_flexicontent/assets/images/' . $preview_img, JText::_('FLEXI_NOTES'), ' style="max-height:24px; padding:0px; margin:0px;" ') : ''; $tip_text = '<span class="' . $tip_class . '" style="" title="' . flexicontent_html::getToolTip(null, $inline_tip, 1, 1) . '">' . $hintmage . $previewimage . '</span>'; } if ($inline_tip = @$attributes['inline_tip2']) { $tip_img = @$attributes['tip_img2']; $tip_img = $tip_img ? $tip_img : 'comment.png'; $preview_img = @$attributes['preview_img2']; $preview_img = $preview_img ? $preview_img : ''; $tip_class = @$attributes['tip_class2']; $tip_class .= FLEXI_J30GE ? ' hasTooltip' : ' hasTip'; $hintmage = JHTML::image('administrator/components/com_flexicontent/assets/images/' . $tip_img, JText::_('FLEXI_NOTES'), ' style="max-height:24px; padding:0px; margin-left:12px; margin-right:0px;" '); $previewimage = $preview_img ? JHTML::image('administrator/components/com_flexicontent/assets/images/' . $preview_img, JText::_('FLEXI_NOTES'), ' style="max-height:24px; padding:0px; margin:0px;" ') : ''; $tip_text2 = '<span class="' . $tip_class . '" style="" title="' . flexicontent_html::getToolTip(null, $inline_tip, 1, 1) . '">' . $hintmage . $previewimage . '</span>'; } return JHTML::_('select.genericlist', $layouts, $fieldname, $attribs, 'value', 'text', $value, $element_id) . @$tip_text . @$tip_text2; }
/** * returns html for events in tabs * @param object match * @param array project events * @param array match events * @param aray match substitutions * @param array $config * @return string */ function showEventsContainerInResults($matchInfo, $projectevents, $matchevents, $substitutions = null, $config) { $output = ''; $result = ''; if ($this->config['use_tabs_events']) { // Make event tabs with JPane integrated function in Joomla 1.5 API $result =& JPane::getInstance('tabs', array('startOffset' => 0)); $output .= $result->startPane('pane'); // Size of the event icons in the tabs (when used) $width = 20; $height = 20; $type = 4; // Never show event text or icon for each event list item (info already available in tab) $showEventInfo = 0; $cnt = 0; foreach ($projectevents as $event) { //display only tabs with events foreach ($matchevents as $me) { $cnt = 0; if ($me->event_type_id == $event->id) { $cnt++; break; } } if ($cnt == 0) { continue; } if ($this->config['show_events_with_icons'] == 1) { // Event icon as thumbnail on the tab (a placeholder icon is used when the icon does not exist) $imgTitle = JText::_($event->name); $tab_content = JoomleagueHelper::getPictureThumb($event->icon, $imgTitle, $width, $height, $type); } else { $tab_content = JText::_($event->name); } $output .= $result->startPanel($tab_content, $event->id); $output .= '<table class="matchreport" border="0">'; $output .= '<tr>'; // Home team events $output .= '<td class="list">'; $output .= '<ul>'; foreach ($matchevents as $me) { $output .= self::_formatEventContainerInResults($me, $event, $matchInfo->projectteam1_id, $showEventInfo); } $output .= '</ul>'; $output .= '</td>'; // Away team events $output .= '<td class="list">'; $output .= '<ul>'; foreach ($matchevents as $me) { $output .= self::_formatEventContainerInResults($me, $event, $matchInfo->projectteam2_id, $showEventInfo); } $output .= '</ul>'; $output .= '</td>'; $output .= '</tr>'; $output .= '</table>'; $output .= $result->endPanel(); } if (!empty($substitutions)) { if ($this->config['show_events_with_icons'] == 1) { // Event icon as thumbnail on the tab (a placeholder icon is used when the icon does not exist) $imgTitle = JText::_('COM_JOOMLEAGUE_IN_OUT'); $pic_tab = 'images/com_joomleague/database/events/' . $this->project->fs_sport_type_name . '/subst.png'; $tab_content = JoomleagueHelper::getPictureThumb($pic_tab, $imgTitle, $width, $height, $type); } else { $tab_content = JText::_('COM_JOOMLEAGUE_IN_OUT'); } $pic_time = JURI::root() . 'images/com_joomleague/database/events/' . $this->project->fs_sport_type_name . '/playtime.gif'; $pic_out = JURI::root() . 'images/com_joomleague/database/events/' . $this->project->fs_sport_type_name . '/out.png'; $pic_in = JURI::root() . 'images/com_joomleague/database/events/' . $this->project->fs_sport_type_name . '/in.png'; $imgTime = JHTML::image($pic_time, JText::_('COM_JOOMLEAGUE_MATCHREPORT_SUBSTITUTION_MINUTE'), array(' title' => JText::_('COM_JOOMLEAGUE_MATCHREPORT_SUBSTITUTION_MINUTE'))); $imgOut = JHTML::image($pic_out, JText::_('COM_JOOMLEAGUE_MATCHREPORT_SUBSTITUTION_WENT_OUT'), array(' title' => JText::_('COM_JOOMLEAGUE_MATCHREPORT_SUBSTITUTION_WENT_OUT'))); $imgIn = JHTML::image($pic_in, JText::_('COM_JOOMLEAGUE_MATCHREPORT_SUBSTITUTION_CAME_IN'), array(' title' => JText::_('COM_JOOMLEAGUE_MATCHREPORT_SUBSTITUTION_CAME_IN'))); $output .= $result->startPanel($tab_content, '0'); $output .= '<table class="matchreport" border="0">'; $output .= '<tr>'; $output .= '<td class="list">'; $output .= '<ul>'; foreach ($substitutions as $subs) { $output .= self::_formatSubstitutionContainerInResults($subs, $matchInfo->projectteam1_id, $imgTime, $imgOut, $imgIn); } $output .= '</ul>'; $output .= '</td>'; $output .= '<td class="list">'; $output .= '<ul>'; foreach ($substitutions as $subs) { $output .= self::_formatSubstitutionContainerInResults($subs, $matchInfo->projectteam2_id, $imgTime, $imgOut, $imgIn); } $output .= '</ul>'; $output .= '</td>'; $output .= '</tr>'; $output .= '</table>'; $output .= $result->endPanel(); } $output .= $result->endPane(); } else { $showEventInfo = $this->config['show_events_with_icons'] == 1 ? 1 : 2; $output .= '<table class="matchreport" border="0">'; $output .= '<tr>'; // Home team events $output .= '<td class="list-left">'; $output .= '<ul>'; foreach ((array) $matchevents as $me) { if ($me->ptid == $matchInfo->projectteam1_id) { $output .= self::_formatEventContainerInResults($me, $projectevents[$me->event_type_id], $matchInfo->projectteam1_id, $showEventInfo); } } $output .= '</ul>'; $output .= '</td>'; // Away team events $output .= '<td class="list-right">'; $output .= '<ul>'; foreach ($matchevents as $me) { if ($me->ptid == $matchInfo->projectteam2_id) { $output .= self::_formatEventContainerInResults($me, $projectevents[$me->event_type_id], $matchInfo->projectteam2_id, $showEventInfo); } } $output .= '</ul>'; $output .= '</td>'; $output .= '</tr>'; $output .= '</table>'; } return $output; }
$this->config['team_picture_height'], 1); */ ?> <a href="<?php echo $this->team->{$pic}; ?> " alt="<?php echo $this->team->name; ?> " title="<?php echo $this->team->name; ?> " class="highslide" onclick="return hs.expand(this)"> <?php echo JHTML::image($this->team->{$pic}, $this->team->name, array('title' => $this->team->name, 'width' => $this->config['team_picture_width'])); ?> </a> <?php ?> </div> <?php if ($this->config['show_club_info'] || $this->config['show_team_info']) { ?> <div class="right-column"> <?php if ($this->config['show_club_info']) { if ($this->club->address || $this->club->zipcode) { ?> <div class="jl_parentContainer"> <span class="clubinfo_listing_item"><?php
$isadvfilter = $row->isadvfilter && $supportadvfilter ? "filter.png" : "publish_x" . (!$supportadvfilter ? '_f2' : '') . ".png"; $isadvfilter_tip = $row->isadvfilter && $supportadvfilter ? $flexi_yes : ($supportadvfilter ? $flexi_no : $flexi_nosupport); } else { $advfilter_dirty = 1; $isadvfilter = $row->isadvfilter == -1 ? "disconnect.png" : "connect.png"; $isadvfilter_tip = ($row->isadvfilter == 2 ? $flexi_yes : $flexi_no) . ", " . $flexi_rebuild; } if ($canPublish) { $access = flexicontent_html::userlevel('access[' . $row->id . ']', $row->access, 'onchange="return listItemTask(\'cb' . $i . '\',\'' . $ctrl . 'access\')"'); } else { $access = $this->escape($row->access_level); } $checked = @JHTML::_('grid.checkedout', $row, $i); $orphan_warning = ' <span class="' . $tip_class . '" title="' . flexicontent_html::getToolTip('FLEXI_WARNING', 'FLEXI_NO_TYPES_ASSIGNED', 1, 1) . '"> ' . JHTML::image('administrator/components/com_flexicontent/assets/images/warning.png', JText::_('FLEXI_NO_TYPES_ASSIGNED'), ' class="fc-man-icon-s" ') . ' </span>'; ?> <tr class="<?php echo "row{$k}"; ?> " style="<?php echo $row_css; ?> "> <td><?php echo $this->pagination->getRowOffset($i); ?> </td> <td><?php echo $checked;
?> </h2> <div> <table class="event-file"> <tbody> <?php foreach ($this->row->attachments as $file) { ?> <tr> <td> <span class="event-file-dl-icon hasTip" title="<?php echo JText::_('COM_REDEVENT_Download') . ' ' . $this->escape($file->file) . '::' . $this->escape($file->description); ?> "> <?php echo JHTML::link('index.php?option=com_redevent&task=getfile&format=raw&file=' . $file->id, JHTML::image('components/com_redevent/assets/images/download_16.png', JText::_('COM_REDEVENT_Download'))); ?> </span> </td> <td class="event-file-name"><?php echo $this->escape($file->name ? $file->name : $file->file); ?> </td> </tr> </tbody> <?php } ?> </table> </div> <?php
$imageParams = 'title= "' . $imageTitle . '"'; echo JHTML::image($imageFileOk, $imageTitle, $imageParams); } ?> </td> <td class="center"> <?php if ($row->countStats == 0) { $imageFile = 'administrator/components/com_joomleague/assets/images/error.png'; $imageTitle = JText::_('COM_JOOMLEAGUE_ADMIN_P_POSITION_NO_STATISTICS'); $imageParams = 'title= "' . $imageTitle . '"'; echo JHTML::image($imageFile, $imageTitle, $imageParams); } else { $imageTitle = JText::sprintf('COM_JOOMLEAGUE_ADMIN_P_POSITION_NR_STATISTICS', $row->countStats); $imageParams = 'title= "' . $imageTitle . '"'; echo JHTML::image($imageFileOk, $imageTitle, $imageParams); } ?> </td> <td class="center"><?php echo $row->id; ?> </td> <td class="center"><?php echo $row->positiontoolid; ?> </td> </tr> <?php $k = 1 - $k; }
} ?> <div class="floattext"> <div class="catimg"> <?php if ($this->category->image) { ?> <?php echo redEVENTImage::modalimage($this->category->image, $this->category->name); ?> <?php } else { ?> <?php echo JHTML::image('components/com_redevent/assets/images/noimage.png', $this->category->name); ?> <?php } ?> </div> <div class="catdescription"> <?php echo $this->description; ?> </div> </div> <!--table--> <form action="<?php
function getDisplayTab($tab, $user, $ui) { $my = JFactory::getUser(); $database = &JFactory::getDBO(); if ($my->id != $user->user_id || !$my->id) { return; } $componentPath = JPATH_SITE . DS . 'components' . DS . 'com_bids'; require_once($componentPath.DS.'options.php'); $cfg = new BidConfig(); require_once($componentPath . DS . 'helpers' . DS . 'tools.php'); require_once($componentPath . DS . 'thefactory' . DS . 'front.userprofile.php'); require_once($componentPath . DS . 'helpers' . DS . 'profile.php'); JModel::addIncludePath($componentPath . DS . 'models'); $bidsUserModel = JModel::getInstance('user','bidsModel'); $bidsUserModel->loadUser($my->id); $bidsProfile = $bidsUserModel->get('profile'); $balance = $bidsUserModel->getBalance(); //here begins output $html = '<div> <table width="100%"> <tr> <td colspan="4">'; if($cfg->bid_opt_enable_acl) { $sellerImg = JURI::root() . 'components/com_bids/images/f_can_sell'.( !empty($bidsProfile->isSeller) ? '1':'2').'.gif'; $html .= '<div style="width:120px;float:left;">'. JHTML::image($sellerImg,'','style="margin-right:50px;" border="0"'). '</div>'; $bidderImg = JURI::root() . 'components/com_bids/images/f_can_buy'.( !empty($bidsProfile->isBidder) ? '1':'2').'.gif'; $html .= '<div style="width:120px;float:left;">'. JHTML::image($bidderImg,'','style="margin-right:60px;" border="0"'). '</div>'; } elseif(!empty($bidsProfile->powerseller)) { $sellerImg = JURI::root() . 'components/com_bids/images/f_can_sell'.( !empty($bidsProfile->isSeller) ? '1':'2').'.gif'; $html .= '<div style="width:120px;float:left;">'. JHTML::image($sellerImg,'','style="margin-right:50px;" border="0"'). '</div>'; } $verifiedImg = JURI::root() . 'components/com_bids/images/verified_'.( !empty($bidsProfile->verified) ? '1':'0').'.gif'; $html .= '<div style="width:120px;float:left;">'. JHTML::image($verifiedImg,'','style="margin-right:50px;" border="0"'). '</div> </td> </tr> <tr> <td colspan="4">'; if($cfg->bid_opt_enable_acl) { if (!empty($bidsProfile->isSeller)){ $html .= "<div style='width:120px;float:left;'>" . Jtext::_('COM_BIDS_acl_group_seller') . ":" . ($bidsProfile->powerseller ? JText::_('Powerseller') : JText::_('Seller')) . "</div>"; } else { $html .= "<div style='width:120px;float:left;'>" . Jtext::_('COM_BIDS_acl_group_seller') . ":" . ($bidsProfile->isSeller ? Jtext::_('COM_BIDS_YES') : Jtext::_('COM_BIDS_no') ) . "</div>"; } $html .= "<div style='width:120px;float:left;'>" . Jtext::_('COM_BIDS_acl_group_bidder') . ":" . ($bidsProfile->isBidder ? Jtext::_('COM_BIDS_YES') : Jtext::_('COM_BIDS_no') ) . "</div>"; } elseif(!empty($bidsProfile->powerseller)) { $html .= "<div style='width:120px;float:left;'>" . Jtext::_('COM_BIDS_acl_group_seller') . ":" . ($bidsProfile->powerseller ? JText::_('Powerseller') : JText::_('Seller')) . "</div>"; } $html .= "<div style='width:120px;float:left;'>" . Jtext::_('COM_BIDS_user_verified') . ":" . ( (isset($bidsProfile->verified) && $bidsProfile->verified) ? Jtext::_('COM_BIDS_YES') : Jtext::_('COM_BIDS_no') ) . "</div>". '</td> </tr> <tr> <td colspan="4">'; $tasklist = array( 'newauction' => 'f_newauction.png', 'myauctions' => 'f_myauctions.png ', 'mybids' => 'f_mybids.png', 'mywonbids' => 'f_mywonbids.png', 'mywatchlist' => 'f_mywatchlist.png', 'listcats' => 'f_listcats.png', 'listauctions' => 'f_listauctions.png', 'search' => 'f_search.png' ); $keys = array_keys($tasklist); $html .= '<table width="100%"> <tr>'; for ($i = 0; $i < count($keys) / 2; $i++) { $f_task = JRoute::_("index.php?option=com_bids&task=" . $keys[$i]); $html .= "<td width='100'><a href='$f_task'><img src='" . JURI::root() . "components/com_bids/images/menu/" . $tasklist[$keys[$i]] . "' border=0></a></td>"; } $html .= '</tr> <tr>'; for ($i = count($keys) / 2; $i < count($keys); $i++) { $f_task = JRoute::_("index.php?option=com_bids&task=" . $keys[$i]); $html .= "<td width='100'><a href='$f_task'><img src='" . JURI::root() . "components/com_bids/images/menu/" . $tasklist[$keys[$i]] . "' border=0></a></td>"; } $html .= '</tr> </table> </td> </tr>'; $html .= '<tr> <td> <div class="auction_credits">'. JText::_('COM_BIDS_YOUR_CURRENT_BALANCE_IS').' '. $balance->balance.' '.$balance->currency. '</div> <div> <a href="'.BidsHelperRoute::getAddFundsRoute().'">'. JText::_('COM_BIDS_ADD_FUNDS_TO_YOUR_BALANCE'). '</a> </div> <div> <a href="'.BidsHelperRoute::getPaymentsHistoryRoute().'">'. JText::_('COM_BIDS_SEE_MY_PAYMENTS_HISTORY'). '</a> </div> </td> </tr>'; $html .= '</table> </div>'; return $html; }
function editMember($member, $option) { JHTML::_('behavior.calendar'); $member_name = $member->nameFirst . " " . $member->nameLast; $member_transactions_link = JFilterOutput::ampReplace('index.php?option=' . $option . '&task=transactions&member_id=' . $member->id); $member_transactions_link_markup = "<a href=\"{$member_transactions_link}\" title=\"List transactions for {$member_name}\">{$member_name}'s transactions</a>"; $member_mailchimp_info_link = JFilterOutput::ampReplace('index.php?option=' . $option . '&task=viewMemberMailChimpInfo&cid[]=' . $member->id); $member_mailchimp_info_link_markup = "<a href=\"{$member_mailchimp_info_link}\" title=\"MailChimp raw subscription info for {$member_name}\">MailChimp Raw</a>"; $member_subscriptions_link = JFilterOutput::ampReplace('index.php?option=' . $option . '&task=editMailingListSubscription&cid[]=' . $member->id); $member_subscriptions_link_markup = "<a href=\"{$member_subscriptions_link}\" title=\"Mailing list subscriptions info for {$member_name}\">Subscription Info</a>"; ?> <form action="index.php" method="post" name="adminForm" id="adminForm"> <fieldset class="adminform"> <legend>Member Details</legend> <table class="admintable"> <tr> <tr> <td width="100" align="right" class="key"> First Name: </td> <td> <input class="text_area" type="text" name="nameFirst" id="nameFirst" size="20" maxlength="50" value="<?php echo $member->nameFirst; ?> " /> </td> </tr> <tr> <td width="100" align="right" class="key"> Last Name: </td> <td> <input class="text_area" type="text" name="nameLast" id="nameLast" size="20" maxlength="50" value="<?php echo $member->nameLast; ?> " /> </td> </tr> <tr> <td width="100" align="right" class="key"> Address 1: </td> <td> <input class="text_area" type="text" name="address1" id="address1" size="20" maxlength="50" value="<?php echo $member->address1; ?> "/> </td> </tr> <tr> <td width="100" align="right" class="key"> Address 2: </td> <td> <input class="text_area" type="text" name="address2" id="address2" size="20" maxlength="50" value="<?php echo $member->address2; ?> "/> </td> </tr> <tr> <td width="100" align="right" class="key"> City: </td> <td> <input class="text_area" type="text" name="city" id="city" size="20" maxlength="50" value="<?php echo $member->city; ?> "/> </td> </tr> <tr> <td width="100" align="right" class="key"> State: </td> <td> <input class="text_area" type="text" name="state" id="state" size="20" maxlength="50" value="<?php echo $member->state; ?> "/> </td> </tr> <tr> <td width="100" align="right" class="key"> Zip: </td> <td> <input class="text_area" type="text"name="zip" id="zip" size="20" maxlength="50" value="<?php echo $member->zip; ?> "/> </td> </tr> <tr> <td width="100" align="right" class="key"> Email Address: </td> <td> <input class="text_area" type="text" name="emailAddress" id="emailAddress" size="50" maxlength="250" value="<?php echo $member->emailAddress; ?> " /> </td> </tr> <tr> <td width="100" align="right" class="key"> Primary Phone: </td> <td> <input class="text_area" type="text" name="phoneMain" id="phoneMain" size="50" maxlength="250" value="<?php echo $member->phoneMain; ?> " /> </td> </tr> <tr> <td width="100" align="right" class="key"> Alternate Phone: </td> <td> <input class="text_area" type="text" name="phoneAlt" id="phoneAlt" size="50" maxlength="250" value="<?php echo $member->phoneAlt; ?> " /> </td> </tr> <tr> <td width="100" align="right" class="key"> Emergency Phone: </td> <td> <input class="text_area" type="text" name="phoneEmerg" id="phoneEmerg" size="50" maxlength="250" value="<?php echo $member->phoneEmerg; ?> " /> </td> </tr> <tr> <td width="100" align="right" class="key"> Transactions </td> <td> See <?php echo $member_transactions_link_markup; ?> </td> </tr> <tr> <td width="100" align="right" class="key"> E-mail Subscriptions: </td> <td> <?php echo $member_subscriptions_link_markup; ?> (<?php echo $member_mailchimp_info_link_markup; ?> ) </td> </tr> <!-- <tr> <td width="100" align="right" class="key"> Receive Email Status Reports? </td> <td> <input type="checkbox" name="emailStatus" id="emailStatus" <?php echo $member->emailStatus ? "checked" : ""; ?> /> </td> </tr> <tr> <td width="100" align="right" class="key"> Receive Email News? </td> <td> <input type="checkbox" name="emailNews" id="emailNews" <?php echo $member->emailNews ? "checked" : ""; ?> /> </td> </tr> <tr> <td width="100" align="right" class="key"> Receive Email Volunteer Opportunities? </td> <td> <input type="checkbox" name="emailVolunteerOpps" id="emailVolunteerOpps" <?php echo $member->emailVolunteerOpps ? "checked" : ""; ?> /> </td> </tr> --> <tr> <td width="100" align="right" class="key"> Current Member? </td> <td> <?php echo $member->isMember ? JHTML::image('administrator/images/tick.png', 'yes') : JHTML::image('administrator/images/publish_x.png', 'yes'); ?> <a href="/administrator/index.php?option=com_cbodb&task=renewmember&memberID=<?php echo $member->id; ?> ">Renew</a> </td> </tr> <tr> <td width="100" align="right" class="key"> Membership Expires: </td> <td> <?php echo $member->membershipExpire; ?> </td> </tr> <tr> <td width="100" align="right" class="key"> Groups: </td> <td> </td> </tr> <?php // list all group associations foreach (CbodbMember::$memberGroupArray as $groupNum => $groupName) { ?> <tr> <td width="100" align="right" class="key"> <?php echo $groupName; ?> </td> <td> <input type="checkbox" name="isGroup<?php echo $groupNum; ?> " id="isGroup<?php echo $groupNum; ?> " <?php echo $member->isInGroup($groupNum) ? "checked" : ""; ?> /> </td> </tr> <?php } ?> <tr> <td width="100" align="right" class="key"> <?php echo "Class 1: Intro"; ?> </td> <td> <input type="checkbox" name="custom1" id="custom1" <?php echo $member->custom1 ? "checked" : ""; ?> /> </td> </tr> <tr> <td width="100" align="right" class="key"> <?php echo "Class 2: Wheels"; ?> </td> <td> <input type="checkbox" name="custom2" id="custom2" <?php echo $member->custom2 ? "checked" : ""; ?> /> </td> </tr> <tr> <td width="100" align="right" class="key"> <?php echo "Class 3: Brakes"; ?> </td> <td> <input type="checkbox" name="custom3" id="custom3" <?php echo $member->custom3 ? "checked" : ""; ?> /> </td> </tr> <tr> <td width="100" align="right" class="key"> <?php echo "Class 4: Gears"; ?> </td> <td> <input type="checkbox" name="custom4" id="custom4" <?php echo $member->custom4 ? "checked" : ""; ?> /> </td> </tr> <tr> <td width="100" align="right" class="key"> <?php echo "Bike Driver's Ed"; ?> </td> <td> <input type="checkbox" name="custom5" id="custom5" <?php echo $member->custom5 ? "checked" : ""; ?> /> </td> </tr> <tr> <td width="100" align="right" class="key"> Record Last Updated: </td> <td> <?php echo $member->timeChanged; ?> </td> </tr> </table> </fieldset> <input type="hidden" name="id" value="<?php echo $member->id; ?> " /> <input type="hidden" name="option" value="<?php echo $option; ?> " /> <input type="hidden" name="task" value="" /> <input type="hidden" name="cbodb_mode" value="member" /> </form> <?php }
?> "><?php echo $this->escape($ticket->subject); ?> </a></td> <td><?php echo $this->escape(JText::_($ticket->status_name)); ?> </td> </tr> <?php if (isset($ticket->message)) { ?> <tr> <td colspan="2" bgcolor="#FFFFFF"><?php echo JHTML::image('components/com_rsticketspro/assets/images/smallicon4.gif', '', 'class="rsticketspro_smallicon"'); echo JText::_('RST_REPLY'); ?> : <a href="<?php echo RSTicketsProHelper::route('index.php?option=com_rsticketspro&view=ticket&cid=' . $ticket->id . ':' . JFilterOutput::stringURLSafe($ticket->subject)); ?> "><?php echo $this->trim(strip_tags($ticket->message)); ?> </a></td> </tr> <?php } ?> <?php }
?> "/></td> <td><input type="text" name="attached-name[]" style="width: 100%" value="<?php echo $file->name; ?> " /></td> <td><input type="text" name="attached-desc[]" style="width: 100%" value="<?php echo $file->description; ?> " /></td> <td><?php echo JHTML::_('select.genericlist', $this->access, 'attached-access[]', 'class="inputbox" size="3"', 'value', 'text', $file->access); ?> </td> <td><?php echo JHTML::image('administrator/components/com_redevent/assets/images/no.png', JText::_('COM_REDEVENT_REMOVE_ATTACHMENT'), array('id' => 'attach-remove' . $file->id, 'class' => 'attach-remove')); ?> </td> </tr> <?php } ?> <tr> <td> <input type="file" name="attach[]" class="attach-field" size="10"></input> </td> <td> <input type="text" name="attach-name[]" value="" style="width: 100%" /> </td> <td> <input type="text" name="attach-desc[]" value="" style="width: 100%" />
$stockhandle = VmConfig::get('stockhandle', 'none'); if ($this->product->product_in_stock - $this->product->product_ordered < 1) { if ($stockhandle == 'risetime' and VmConfig::get('rised_availability') and empty($this->product->product_availability)) { ?> <div class="availability"> <?php echo file_exists(JPATH_BASE . '/' . VmConfig::get('assets_general_path') . 'images/availability/' . VmConfig::get('rised_availability')) ? JHTML::image(JURI::root() . VmConfig::get('assets_general_path') . 'images/availability/' . VmConfig::get('rised_availability', '7d.gif'), VmConfig::get('rised_availability', '7d.gif'), array('class' => 'availability')) : JText::_(VmConfig::get('rised_availability')); ?> </div> <?php } else { if (!empty($this->product->product_availability)) { ?> <div class="availability"> <?php echo file_exists(JPATH_BASE . '/' . VmConfig::get('assets_general_path') . 'images/availability/' . $this->product->product_availability) ? JHTML::image(JURI::root() . VmConfig::get('assets_general_path') . 'images/availability/' . $this->product->product_availability, $this->product->product_availability, array('class' => 'availability')) : JText::_($this->product->product_availability); ?> </div> <?php } } } // Ask a question about this product if (VmConfig::get('ask_question', 1) == 1) { ?> <div class="ask-a-question"> <a class="ask-a-question" href="<?php echo $this->askquestion_url; ?> " ><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL');
</td> <td class="data"> <?php echo $away_end; ?> </td> </tr> <?php } else { ?> <tr> <td class="label"> <?php $imageTitle = JText::_('COM_JOOMLEAGUE_PERSON_AWAY'); echo " " . JHTML::image('images/com_joomleague/database/events/' . $this->project->fs_sport_type_name . '/away.gif', $imageTitle, array('title' => $imageTitle)); ?> </td> </tr> <tr> <td class="label"> <?php echo JText::_('COM_JOOMLEAGUE_PERSON_AWAY_DATE'); ?> </td> <td class="data"> <?php echo $away_date;