示例#1
0
      </tr>
    </thead>
    <tfoot>
      <tr>
        <td colspan="12"><?php 
echo $page->getListFooter();
?>
 </td>
      </tr>
    </tfoot>
    <?php 
$count = count($services);
if ($count > 0) {
    for ($i = 0; $i < $count; $i++) {
        $item = $services[$i];
        JFilterOutput::objectHtmlSafe($item);
        $title = JText::_('EDIT_SERVICES_') . " ID: " . $item->id;
        $linkEdit = sprintf($viewLink, 'edit', $item->id, $i);
        $deleted = $item->ws_core || $item->ws_default ? 0 : 1;
        $core = $item->ws_core ? '<sup style="color:red;">[' . JText::_('CORE') . ']</sub>' : '';
        ?>

    <tr>
      <td><?php 
        echo $page->getRowOffset($i);
        ?>
 </td>
      <td>
        <input type="radio" id="cb<?php 
        echo $item->id;
        ?>
    /**
     * Writes a list of the categories for a section
     * @param array An array of category objects
     * @param string The name of the category section
     */
    function show(&$rows, $section, $section_name, &$page, &$lists, $type)
    {
        $limitstart = JRequest::getVar('limitstart', '0', '', 'int');
        $user =& JFactory::getUser();
        //Ordering allowed ?
        $ordering = $lists['order'] == 'c.ordering';
        JHTML::_('behavior.tooltip');
        ?>
		<form action="index.php?option=com_categories&amp;section=<?php 
        echo $section;
        ?>
" method="post" name="adminForm">

		<table>
			<tr>
				<td align="left" width="100%">
					<?php 
        echo JText::_('Filter');
        ?>
:
					<input type="text" name="search" id="search" value="<?php 
        echo htmlspecialchars($lists['search']);
        ?>
" class="text_area" onchange="document.adminForm.submit();" />
					<button onclick="this.form.submit();"><?php 
        echo JText::_('Go');
        ?>
</button>
					<button onclick="document.getElementById('search').value='';this.form.getElementById('sectionid').value='-1';this.form.getElementById('filter_state').value='';this.form.submit();"><?php 
        echo JText::_('Reset');
        ?>
</button>
				</td>
				<td nowrap="nowrap">
					<?php 
        if ($section == 'com_content') {
            echo $lists['sectionid'];
        }
        ?>
					<?php 
        echo $lists['state'];
        ?>
				</td>
			</tr>
		</table>

		<table class="adminlist">
		<thead>
			<tr>
				<th width="10" align="left">
					<?php 
        echo JText::_('Num');
        ?>
				</th>
				<th width="20">
					<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php 
        echo count($rows);
        ?>
);" />
				</th>
				<th class="title">
					<?php 
        echo JHTML::_('grid.sort', 'Title', 'c.title', @$lists['order_Dir'], @$lists['order']);
        ?>
				</th>
				<th width="5%">
					<?php 
        echo JHTML::_('grid.sort', 'Published', 'c.published', @$lists['order_Dir'], @$lists['order']);
        ?>
				</th>
				<th width="8%" nowrap="nowrap">
					<?php 
        echo JHTML::_('grid.sort', 'Order by', 'c.ordering', @$lists['order_Dir'], @$lists['order']);
        ?>
					<?php 
        if ($ordering) {
            echo JHTML::_('grid.order', $rows);
        }
        ?>
				</th>
				<th width="7%">
					<?php 
        echo JHTML::_('grid.sort', 'Access', 'groupname', @$lists['order_Dir'], @$lists['order']);
        ?>
				</th>
				<?php 
        if ($section == 'com_content') {
            ?>
					<th width="20%"  class="title">
						<?php 
            echo JHTML::_('grid.sort', 'Section', 'section_name', @$lists['order_Dir'], @$lists['order']);
            ?>
					</th>
					<?php 
        }
        ?>
				<?php 
        if ($type == 'content') {
            ?>
					<th width="5%">
						<?php 
            echo JText::_('Num Active');
            ?>
					</th>
					<th width="5%">
						<?php 
            echo JText::_('Num Trash');
            ?>
					</th>
					<?php 
        }
        ?>
				<th width="1%" nowrap="nowrap">
					<?php 
        echo JHTML::_('grid.sort', 'ID', 'c.id', @$lists['order_Dir'], @$lists['order']);
        ?>
				</th>
			</tr>
		</thead>
		<tfoot>
		<tr>
			<td colspan="13">
				<?php 
        echo $page->getListFooter();
        ?>
			</td>
		</tr>
		</tfoot>
		<tbody>
		<?php 
        $k = 0;
        if (count($rows)) {
            for ($i = 0, $n = count($rows); $i < $n; $i++) {
                $row =& $rows[$i];
                JFilterOutput::objectHtmlSafe($row);
                $row->sect_link = JRoute::_('index.php?option=com_sections&task=edit&cid[]=' . $row->section);
                $link = 'index.php?option=com_categories&section=' . $section . '&task=edit&cid[]=' . $row->id . '&type=' . $type;
                $access = JHTML::_('grid.access', $row, $i);
                $checked = JHTML::_('grid.checkedout', $row, $i);
                $published = JHTML::_('grid.published', $row, $i);
                ?>
			<tr class="<?php 
                echo "row{$k}";
                ?>
">
				<td>
					<?php 
                echo $page->getRowOffset($i);
                ?>
				</td>
				<td>
					<?php 
                echo $checked;
                ?>
				</td>
				<td>
					<span class="editlinktip hasTip" title="<?php 
                echo JText::_('Title');
                ?>
::<?php 
                echo $row->title;
                ?>
">
					<?php 
                if (JTable::isCheckedOut($user->get('id'), $row->checked_out)) {
                    echo $row->title;
                } else {
                    ?>
						<a href="<?php 
                    echo JRoute::_($link);
                    ?>
">
							<?php 
                    echo $row->title;
                    ?>
</a>
						<?php 
                }
                ?>
</span>
				</td>
				<td align="center">
					<?php 
                echo $published;
                ?>
				</td>
				<td class="order">
					<span><?php 
                echo $page->orderUpIcon($i, $row->section == @$rows[$i - 1]->section, 'orderup', 'Move Up', $ordering);
                ?>
</span>
					<span><?php 
                echo $page->orderDownIcon($i, $n, $row->section == @$rows[$i + 1]->section, 'orderdown', 'Move Down', $ordering);
                ?>
</span>
					<?php 
                $disabled = $ordering ? '' : 'disabled="disabled"';
                ?>
					<input type="text" name="order[]" size="5" value="<?php 
                echo $row->ordering;
                ?>
" <?php 
                echo $disabled;
                ?>
 class="text_area" style="text-align: center" />
				</td>
				<td align="center">
					<?php 
                echo $access;
                ?>
				</td>
				<?php 
                if ($section == 'com_content') {
                    ?>
					<td>
						<a href="<?php 
                    echo $row->sect_link;
                    ?>
" title="<?php 
                    echo JText::_('Edit Section');
                    ?>
">
							<?php 
                    echo $row->section_name;
                    ?>
</a>
					</td>
					<?php 
                }
                ?>
				<?php 
                if ($type == 'content') {
                    ?>
					<td align="center">
						<?php 
                    echo $row->active;
                    ?>
					</td>
					<td align="center">
						<?php 
                    echo $row->trash;
                    ?>
					</td>
					<?php 
                }
                $k = 1 - $k;
                ?>
				<td align="center">
					<?php 
                echo $row->id;
                ?>
				</td>
			</tr>
			<?php 
            }
        } else {
            if ($type == 'content') {
                ?>
				<tr><td colspan="10"><?php 
                echo JText::_('There are no Categories');
                ?>
</td></tr>
				<?php 
            } else {
                ?>
				<tr><td colspan="8"><?php 
                echo JText::_('There are no Categories');
                ?>
</td></tr>
				<?php 
            }
        }
        ?>
		</tbody>
		</table>

		<input type="hidden" name="option" value="com_categories" />
		<input type="hidden" name="section" value="<?php 
        echo $section;
        ?>
" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="chosen" value="" />
		<input type="hidden" name="act" value="" />
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="type" value="<?php 
        echo $type;
        ?>
" />
		<input type="hidden" name="filter_order" value="<?php 
        echo $lists['order'];
        ?>
" />
		<input type="hidden" name="filter_order_Dir" value="<?php 
        echo $lists['order_Dir'];
        ?>
" />
		<?php 
        echo JHTML::_('form.token');
        ?>
		</form>
		<?php 
    }
示例#3
0
				<th class="title">
					<?php 
echo JText::_('BLBE_MENTOURN');
?>

				</th>
			</tr>
		</thead>
		
		<tbody>
		<?php 
$k = 0;
if (count($rows)) {
    for ($i = 0, $n = count($rows); $i < $n; $i++) {
        $row = $rows[$i];
        JFilterOutput::objectHtmlSafe($row);
        //$published 	= JHTML::_('grid.published', $row, $i);
        ?>

			<tr class="<?php 
        echo "row{$k}";
        ?>
">
				<td>
					<?php 
        echo $i + 1;
        ?>

				</td>
				
				<td>
        $einsatzgebiet = $einsatzgebiet . 'new google.maps.LatLng(' . $areas[0] . ',' . $areas[1] . '),';
    }
    $areas = explode(',', $alarmareas[0]);
    $einsatzgebiet = $einsatzgebiet . 'new google.maps.LatLng(' . $areas[0] . ',' . $areas[1] . '),';
    $einsatzgebiet = substr($einsatzgebiet, 0, strlen($einsatzgebiet) - 1);
    $einsatzgebiet = $einsatzgebiet . ' ]';
} else {
    $einsatzgebiet = '[[0,0]]';
}
// Einsatzarten als Kategorie setzen
$db = JFactory::getDBO();
$query = 'SELECT COUNT(r.data1) as total,r.data1,rd.marker,rd.marker,rd.icon,rd.title as einsatzart FROM #__eiko_einsatzberichte r JOIN #__eiko_einsatzarten rd ON r.data1 = rd.id WHERE r.state = "1" AND rd.state = "1" GROUP BY r.data1';
$db->setQuery($query);
$pie = $db->loadObjectList();
//print_r ($pie);
JFilterOutput::objectHtmlSafe($pie);
$catinit = '';
$cat_count = '';
$catbox = '';
$i = 0;
while ($i < count($pie)) {
    $catinit .= 'show("' . $pie[$i]->data1 . '");';
    $cat_count .= 'cat_count("' . $pie[$i]->data1 . '");';
    //$catbox .= '<span class="label"><input type="checkbox" id="'.$pie[$i]->data1.'box" onClick="boxclick(this,&#39;'.$pie[$i]->data1.'&#39;)" />&nbsp;&nbsp;<img src="'.JURI::base().$pie[$i]->icon.'" width="16px" height="16px" /><strong>'.$pie[$i]->data1.'</strong> </span> ';
    //$catbox .= '<div class="btn-group btn-group-xs eiko_gmap_toolbar"><label for="'.$pie[$i]->data1.'box"><button type="button" class="btn btn-default btn-xs " onClick="boxclick(&#39;'.$pie[$i]->data1.'&#39;)"  id="div_'.$pie[$i]->data1.'"><input type="checkbox" class="eiko_gmap_checkbox" id="'.$pie[$i]->data1.'box" /><img src="'.JURI::base().$pie[$i]->icon.'" width="32px" height="32px" />&nbsp;'.$pie[$i]->einsatzart.'<span class="pull-right" style ="font-size:9px;" ><span class="eiko_gmap_count" id="'.$pie[$i]->data1.'count"></span> / '.$pie[$i]->total.' Einsätze</span></button></label></div>';
    $catbox .= '<div class="eiko_gmap_toolbar"><label for="' . $pie[$i]->data1 . 'box"><button type="button" class="btn btn-default btn-xs eiko_gmap_toolbar_button" onClick="boxclick(&#39;' . $pie[$i]->data1 . '&#39;)"  id="div_' . $pie[$i]->data1 . '"><input type="checkbox" class="eiko_gmap_checkbox" id="' . $pie[$i]->data1 . 'box" /><img src="' . JURI::base() . $pie[$i]->icon . '" class="eiko_gmap_toolbar_icon" />&nbsp;' . $pie[$i]->einsatzart . '<span class="pull-right" style ="font-size:8px;" ><span class="eiko_gmap_count" id="' . $pie[$i]->data1 . 'count"></span> / ' . $pie[$i]->total . ' Einsätze</span></button></label></div>';
    $i++;
}
if ($this->params->get('display_einsatzkarte_einsatzgebiet', '1')) {
    $catbox .= '<div class="eiko_gmap_toolbar"><label for="area"><button type="button" class="btn btn-default btn-xs eiko_gmap_toolbar_button" onClick="togglearea()" id="div_area"><input type="checkbox" class="eiko_gmap_checkbox" id="area" onClick="togglearea()" checked/>&nbsp;&nbsp;<img src="' . JURI::base() . 'images/com_einsatzkomponente/images/map/icons/' . $this->params->get('einsatzkarte_orga_image', 'haus_rot.png') . '" class="eiko_gmap_toolbar_icon" />Einsatzgebiet anzeigen</button></label></div>';
}