Exemplo n.º 1
0
    $delete = JTExt::_('delete');
    $edit = "title=\"" . $edit . "\" alt=\"" . $edit . "\"";
    $delete = "title=\"" . $delete . "\" alt=\"" . $delete . "\"";
    $k = 0;
    for ($i = 0, $n = count($this->rows); $i < $n; $i++) {
        $row = $this->rows[$i];
        $terrain = JtgHelper::parseMoreTerrains($this->sortedter, $row->terrain, "array");
        $terrain = implode(", ", $terrain);
        if ($this->cfg->unit == "Miles") {
            $distance = JtgHelper::getLocatedFloat(JtgHelper::getMiles($row->distance, "-", "Miles"));
        } else {
            $distance = JtgHelper::getLocatedFloat($row->distance, "-", "km");
        }
        $votes = LayoutHelper::parseVoteFloat($row->vote);
        $link = JRoute::_('index.php?option=com_jtg&view=files&layout=file&id=' . $row->id, false);
        $cats = JtgHelper::parseMoreCats($this->cats, $row->catid, "array");
        $cats = implode(", ", $cats);
        ?>
			<tr class="sectiontableentry<?php 
        echo $k;
        ?>
">
				<td align="center"><?php 
        echo $this->pagination->getRowOffset($i);
        ?>
					<a
					href="index.php?option=com_jtg&view=files&layout=form&id=<?php 
        echo $row->id;
        ?>
">
						<img <?php 
Exemplo n.º 2
0
<?php 
} else {
    ?>
		 else {
			submitform( pressbutton);
		}
<?php 
}
?>

}
</script>
<?php 
echo $this->lh;
//  if ( ($user->get('id')) AND ($juser->get('gid') >= $this->cfg->gid ) OR (isset($this->id)) ){
if (JtgHelper::userHasFrontendRights() or isset($this->id)) {
    ?>
<div class="componentheading">
	<?php 
    echo $title;
    ?>
</div>
<div>
	<form name="adminForm" id="adminForm" method="post"
		enctype="multipart/form-data" action="<?php 
    echo $this->action;
    ?>
">
		<table style="width:100%;">
			<tbody>
<?php 
Exemplo n.º 3
0
 /**
  * function_description
  *
  * @param   unknown_type  $mail  param_description
  *
  * @return return_description
  */
 protected function parseEMailIcon($mail)
 {
     $cfg = JtgHelper::getConfig();
     $link = "<img src=\"" . JUri::base() . "components/com_jtg/assets/template/" . $cfg->template . "/images/emailButton.png\" />";
     $return = JHtml::_('email.cloak', $mail, true, $link, 0);
     return $return;
 }
Exemplo n.º 4
0
    }
    $link = JRoute::_('index.php?option=com_jtg&view=files&layout=file&id=' . $row->id, false);
    $profile = JtgHelper::getProfileLink($row->uid, $row->user);
    $cat = JtgHelper::parseMoreCats($this->sortedcats, $row->catid, "list", true);
    $terrain = JtgHelper::parseMoreTerrains($this->sortedter, $row->terrain, "list", true);
    $hits = JtgHelper::getLocatedFloat($row->hits);
    $layoutHelper = new LayoutHelper();
    $votes = $layoutHelper->parseVoteFloat($row->vote, true);
    $links = null;
    if (!$row->distance) {
        $row->distance = 0;
    }
    if ($this->cfg->unit == "Miles") {
        $distance = JtgHelper::getLocatedFloat(JtgHelper::getMiles($row->distance, "-", "Miles"));
    } else {
        $distance = JtgHelper::getLocatedFloat($row->distance, "-", "km");
    }
    if ($profile != "") {
        $profile .= "&nbsp;";
    } else {
        $profile .= "<font class=\"emptyEntry\">" . JText::_('COM_JTG_NO_USER') . "</font>&nbsp;";
    }
    if ($this->uid != 0 and $this->uid == $row->uid or JFactory::getUser()->get('isRoot')) {
        // I can edit and delete my file (or I'm admin)
        $editlink = JRoute::_('index.php?option=com_jtg&view=files&layout=form&id=' . $row->id, false);
        $deletelink = JRoute::_('index.php?option=com_jtg&controller=files&task=delete&id=' . $row->id, false);
        $links = " <a href=\"" . $editlink . "\">" . "<img title=\"" . JText::_('JACTION_EDIT') . "\" alt=\"" . JText::_('JACTION_EDIT') . "\" src=\"" . JUri::base() . "components/com_jtg/assets/images/edit_f2.png\" width=\"16px\" />" . "</a> " . "<a href=\"" . $deletelink . "\">" . "<img title=\"" . JText::_('JACTION_DELETE') . "\" alt=\"" . JText::_('JACTION_DELETE') . "\" src=\"" . JUri::base() . "components/com_jtg/assets/images/cancel_f2.png\" width=\"16px\" />" . "</a>";
    }
    ?>
			<tr class="sectiontableentry<?php 
    echo $k;
Exemplo n.º 5
0
 /**
  * function_description
  *
  * @return return_description
  */
 function savecomment()
 {
     $mainframe = JFactory::getApplication();
     // Check for request forgeries
     JSession::checkToken() or jexit(JTEXT::_('JINVALID_TOKEN'));
     $cfg = JtgHelper::getConfig();
     $id = JRequest::getInt('id');
     if ($cfg->captcha == 1) {
         $return = false;
         $word = JFactory::getApplication()->input->get('word', false, '', 'CMD');
         $mainframe->triggerEvent('onCaptcha_confirm', array($word, &$return));
         if (!$return) {
             echo "<script> alert('" . JText::_('COM_JTG_CAPTCHA_WRONG') . "'); window.history.go(-1); </script>\n";
         } else {
             $model = $this->getModel('files');
             if (!$model->savecomment($id, $cfg)) {
                 $msg = JText::_('COM_JTG_COMMENT_NOT_SAVED');
             } else {
                 $msg = JText::_('COM_JTG_COMMENT_SAVED');
             }
             $this->setRedirect(JRoute::_('index.php?option=com_jtg&view=files&layout=file&id=' . $id . '#jtg_param_header_comment', false), $msg);
         }
     } else {
         $model = $this->getModel('files');
         if (!$model->savecomment($id, $cfg)) {
             $msg = JText::_('COM_JTG_COMMENT_NOT_SAVED');
         } else {
             $msg = JText::_('COM_JTG_COMMENT_SAVED');
         }
         $this->setRedirect(JRoute::_('index.php?option=com_jtg&view=files&layout=file&id=' . $id . '#jtg_param_header_comment', false), $msg);
     }
 }
Exemplo n.º 6
0
					<td><?php 
    echo JText::_('COM_JTG_HITS');
    ?>
:</td>
					<td><?php 
    echo $this->track->hits;
    ?>
</td>
				</tr>
				<tr>
					<td><?php 
    echo JText::_('COM_JTG_CATS');
    ?>
:</td>
					<td colspan="2"><?php 
    $JtgHelper = new JtgHelper();
    echo $JtgHelper->parseMoreCats($this->sortedcats, $this->track->catid, "TrackDetails", true);
    ?>
					</td>
				</tr>
				<tr>
					<td><?php 
    echo JText::_('COM_JTG_BIG_MAP');
    ?>
:</td>
					<td colspan="2"><a rel="width[1000];height[700];" class="jcebox"
						href="http://maps.google.com/maps?q=<?php 
    echo $this->track->start_n . "," . $this->track->start_e;
    ?>
"
						target="_blank">Google</a>, <a rel="width[1000];height[700];"