예제 #1
0
        if ($ad_slideshow) {
            $whereasc = $ad_sortby == 'ASC' ? '> ' : '< ';
            $wheredesc = $ad_sortby == 'DESC' ? '> ' : '< ';
            $order = $ad_sortby == 'DESC' ? 'DESC' : 'ASC';
            $db->setQuery('SELECT *' . ' FROM #__datsogallery' . ' WHERE id != ' . $obj->id . ' AND id ' . $whereasc . $obj->id . ' AND catid = ' . $obj->catid . ' AND published = 1' . ' AND approved = 1' . ' ORDER BY ordering ' . $order);
            $rows = $db->loadObjectList();
            if (count($rows)) {
                foreach ($rows as $row) {
                    echo "<a style=\"visibility:hidden;\" rel=\"shadowbox[screenshots];player=img\"\n                  href=\"" . JURI::root() . "index.php?option=com_datsogallery&task=sbox&catid=" . $obj->catid . "&id=" . $row->id . "&format=raw\" title=\"" . jsspecialchars($row->imgtitle) . "\"></a>\n";
                }
            }
            $db->setQuery('SELECT *' . ' FROM #__datsogallery' . ' WHERE id != ' . $obj->id . ' AND id ' . $wheredesc . $obj->id . ' AND catid = ' . $obj->catid . ' AND published = 1' . ' AND approved = 1' . ' ORDER BY ordering ' . $order);
            $rows = $db->loadObjectList();
            if (count($rows)) {
                foreach ($rows as $row) {
                    echo "<a style=\"visibility:hidden;\" rel=\"shadowbox[screenshots];player=img\"\n                  href=\"" . JURI::root() . "index.php?option=com_datsogallery&task=sbox&catid=" . $obj->catid . "&id=" . $row->id . "&format=raw\" title=\"" . jsspecialchars($row->imgtitle) . "\"></a>\n";
                }
            }
        }
    }
    $cachefile = getCacheFile($obj->imgoriginalname, $ad_maxwidth, $ad_maxheight, $obj->catid);
    $msize = getimagesize($cachefile);
    $hres = $msize[1] / 2 - $ad_thumbwidth1 / 2 + 10;
    ?>
  </div>
  <div style="position:absolute;left:0;top: <?php 
    echo $hres;
    ?>
px">
        <?php 
    $db->setQuery("SELECT * FROM #__datsogallery WHERE id = " . $pid);
예제 #2
0
/**
 * Generate a link that toggles display of an element on clicking.
 *
 * @todo Provide functionality to make those links accessible without JS (using GET parameter)
 * @uses toggle_display_by_id() (JS)
 * @param string ID (html) of the link
 * @param string ID (html) of the target to toggle displaying
 * @return string
 */
function get_link_showhide($link_id, $target_id, $text_when_displayed, $text_when_hidden, $display_hidden = true)
{
    $html = "<a id='{$link_id}' href='#' onclick='return toggle_display_by_id(\"{$link_id}\", \"{$target_id}\", \"" . jsspecialchars($text_when_displayed) . '", "' . jsspecialchars($text_when_hidden) . '")\'>' . ($display_hidden ? $text_when_hidden : $text_when_displayed) . '</a>';
    return $html;
}
예제 #3
0
            
        </div>
    </div>
</div>
</form>

    <script type="text/javascript" language="javascript">
        var map, layer, vectorLayer, featureMarker;




		<?php 
$markersJSString = '';
for ($i = 0; $i < count($_SESIZARI); $i++) {
    $markersJSString .= "{'ID':'" . intval($_SESIZARI[$i]['sesizare_id']) . "', 'NAME':'" . jsspecialchars($_SESIZARI[$i]['sesizare_titlu']) . "', 'LATITUDE':" . $_SESIZARI[$i]['coord_lat'] . ", 'LONGITUDE':" . $_SESIZARI[$i]['coord_lon'] . "}";
    if ($i < count($_SESIZARI) - 1) {
        $markersJSString .= ", ";
    }
}
?>
		var markers = [<?php 
echo $markersJSString;
?>
];	
		
		//console.log(markers);
		console.log("==========SORTING================");
		bubbleSortMarkersLon(markers);
		//console.log(markers);
		
예제 #4
0
function dgTip($dgtip, $image = 'dg-info-icon.png', $text = '', $href = '#', $class = '', $link = 0)
{
    $app = JFactory::getApplication('administrator');
    $document =& JFactory::getDocument();
    if (!$text) {
        $image = JURI::root(true) . '/components/com_datsogallery/images/customtheme/' . $image;
        $text = '<img src="' . $image . '" border="0" alt="dgtip" style="vertical-align:middle" />';
    }
    $style = 'style="cursor:help"';
    if ($href) {
        $style = '';
    } else {
        $href = '#';
    }
    $title = 'id="' . jsspecialchars($dgtip) . '"';
    $tip = "";
    if ($link) {
        $tip .= '<a href="' . $href . '"' . $class . ' class="dgtip" ' . $title . ' ' . $style . '>' . $text . '</a>';
    } else {
        $tip .= '<span class="dgtip" ' . $title . ' ' . $style . $class . '>' . $text . '</span>';
    }
    return $tip;
}
예제 #5
0
function dgTip($dgtip, $image = 'dg-info-icon.png', $text = '', $href = '#', $class = '', $link = 0)
{
    require JPATH_COMPONENT_ADMINISTRATOR . DS . 'config.datsogallery.php';
    $document = JFactory::getDocument();
    if (!$text) {
        $image = JURI::base(true) . '/components/com_datsogallery/images/' . $dg_theme . '/' . $image;
        $text = '<img src="' . $image . '" border="0" alt="dgtip" style="vertical-align:middle" />';
    }
    $style = 'style="text-decoration:none;color:#333;cursor:help"';
    if ($href) {
        $style = '';
    } else {
        $href = '#';
    }
    $title = 'id="' . jsspecialchars($dgtip) . '"';
    $tip = "";
    if ($link) {
        $tip .= '<a rel="nofollow" href="' . $href . '"' . $class . ' class="dgtip" ' . $title . ' ' . $style . '>' . $text . '</a>';
    } else {
        $tip .= '<span class="dgtip" ' . $title . ' ' . $style . $class . '>' . $text . '</span>';
    }
    return $tip;
}
    function showPictures(&$rows, &$clist, &$slist, &$lists, &$search, &$pagination)
    {
        $app = JFactory::getApplication('administrator');
        $db =& JFactory::getDBO();
        $uri = JFactory::getURI();
        require JPATH_COMPONENT . DS . 'config.datsogallery.php';
        $colspan = $ad_shop ? '16' : '14';
        $ordering = $lists['order'] == 'a.ordering';
        ?>

  <script type="text/javascript">
      window.addEvent('domready', function() {
         var limit_select = $('limit').options;
         if ( !limit_select ) return;
         for ( var i = 0; i < limit_select.length; i++ ) {
              if ( limit_select[i].value == 0 ) {
                 limit_select[i].value = 20;
                 limit_select[i].innerHTML = '- default -';
                 return false;
              }
         }
      });
  </script>

  <script type="text/javascript">
        function editEntry(number) {
            var elm = document.getElementById('cb' + number);
            if (elm) {
                elm.checked = true;
            }
        }
  </script>

  <form action="index.php" method="post" name="adminForm">
    <table>
      <tr>
    	<td align="left" width="100%">
    		<?php 
        echo JText::_('COM_DATSOGALLERY_FILTER');
        ?>
:
    		<input type="text" name="search" id="search" value="<?php 
        echo $search;
        ?>
" class="text_area" onchange="document.adminForm.submit();" />
            <input class="button" type="button" onclick="this.form.submit();" value="<?php 
        echo JText::_('COM_DATSOGALLERY_GO');
        ?>
" />
		    <input class="button" type="button" onclick="document.getElementById('search').value='';this.form.submit();" value="<?php 
        echo JText::_('COM_DATSOGALLERY_RESET');
        ?>
" />
    	</td>
        <td nowrap="nowrap">
          <?php 
        echo $clist;
        echo $slist;
        ?>
        </td>
      </tr>
    </table>

    <table class="adminlist">
      <thead>
        <tr>
          <th width="5">
		     <?php 
        echo JText::_('COM_DATSOGALLERY_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', JText::_('COM_DATSOGALLERY_TITLE'), 'a.imgtitle', $lists['order_Dir'], $lists['order']);
        ?>
          </th>
          <th class="title">
             <?php 
        echo JHTML::_('grid.sort', JText::_('COM_DATSOGALLERY_CATEGORY'), 'category', $lists['order_Dir'], $lists['order']);
        ?>
          </th>
          <th width="5%">
             <?php 
        echo JHTML::_('grid.sort', JText::_('COM_DATSOGALLERY_HITS'), 'a.imgcounter', $lists['order_Dir'], $lists['order']);
        ?>
          </th>
          <th width="5%">
             <?php 
        echo JHTML::_('grid.sort', JText::_('COM_DATSOGALLERY_DOWNLOADS'), 'a.imgdownloaded', $lists['order_Dir'], $lists['order']);
        ?>
          </th>
          <th width="5%">
             <?php 
        echo JHTML::_('grid.sort', JText::_('COM_DATSOGALLERY_RATING'), 'a.imgvotesum', $lists['order_Dir'], $lists['order']);
        ?>
          </th>
          <th width="7%">
		     <?php 
        echo JHTML::_('grid.sort', JText::_('COM_DATSOGALLERY_ORDER'), 'a.ordering', $lists['order_Dir'], $lists['order']);
        if ($ordering) {
            echo JHTML::_('grid.order', $rows);
        }
        ?>
		  </th>
          <th width="5%" nowrap="nowrap">
		     <?php 
        echo JHTML::_('grid.sort', JText::_('COM_DATSOGALLERY_PUBLISHED'), 'a.published', $lists['order_Dir'], $lists['order']);
        ?>
		  </th>
          <th width="5%" nowrap="nowrap">
				<?php 
        echo JHTML::_('grid.sort', JText::_('COM_DATSOGALLERY_APPROWED'), 'a.approved', $lists['order_Dir'], $lists['order']);
        ?>
		  </th>
          <?php 
        if ($ad_shop) {
            ?>
          <th width="5%" nowrap="nowrap">
		     <?php 
            echo JHTML::_('grid.sort', JText::_('COM_DATSOGALLERY_PRICE'), 'a.imgprice', $lists['order_Dir'], $lists['order']);
            ?>
		  </th>
          <th width="5%">
             <?php 
            echo JText::_('COM_DATSOGALLERY_SALES');
            ?>
          </th>
          <?php 
        }
        ?>
          <th width="10%">
             <?php 
        echo JHTML::_('grid.sort', JText::_('COM_DATSOGALLERY_OWNER'), 'u.username', $lists['order_Dir'], $lists['order']);
        ?>
          </th>
          <th width="2%">
             <?php 
        echo JText::_('COM_DATSOGALLERY_TYPE');
        ?>
          </th>
          <th width="8%">
             <?php 
        echo JHTML::_('grid.sort', JText::_('COM_DATSOGALLERY_DATE_ADD'), 'a.imgdate', $lists['order_Dir'], $lists['order']);
        ?>
          </th>
          <th width="1%" nowrap="nowrap">
             <?php 
        echo JHTML::_('grid.sort', JText::_('COM_DATSOGALLERY_ID'), 'a.id', $lists['order_Dir'], $lists['order']);
        ?>
          </th>
        </tr>
      </thead>

      <tfoot>
		<tr>
		  <td colspan="<?php 
        echo $colspan;
        ?>
">
		     <?php 
        echo $pagination->getListFooter();
        ?>
		  </td>
		</tr>
	  </tfoot>

      <tbody>
          <?php 
        $k = 0;
        for ($i = 0, $n = count($rows); $i < $n; $i++) {
            $row =& $rows[$i];
            if ($row->imgvotes > 0) {
                $fimgvotesum = number_format($row->imgvotesum / $row->imgvotes, 2, ",", ".");
                $frating = "{$fimgvotesum} / {$row->imgvotes}";
            } else {
                $frating = JText::_('COM_DATSOGALLERY_NO_VOTES');
            }
            $taska = $row->approved ? 'rejectpic' : 'approvepic';
            $imga = $row->approved ? 'dg-accept-icon.png' : 'dg-pending-icon.png';
            $task = $row->published ? 'unpublish' : 'publish';
            $img = $row->published ? 'dg-accept-icon.png' : 'dg-pending-icon.png';
            $db->setQuery("SELECT count(*) from #__datsogallery_purchases where image_id = " . $row->id);
            $sales = $db->loadResult();
            $ad_pathoriginals = str_replace('/', DS, $ad_pathoriginals);
            $imgprev = resize($row->imgoriginalname, 120, 120, $ad_crop, $ad_cropratio, 0, $row->catid);
            $info = getimagesize(JPATH_SITE . $ad_pathoriginals . DS . $row->imgoriginalname);
            $size = filesize(JPATH_SITE . $ad_pathoriginals . DS . $row->imgoriginalname);
            $type = array(1 => 'GIF', 2 => 'JPG', 3 => 'PNG');
            $info[2] = $type[$info[2]];
            $fsize = format_filesize($size);
            $overlib = '<table>';
            $overlib .= '<tr>';
            $overlib .= '<td>';
            $overlib .= JText::_('COM_DATSOGALLERY_ORG_WIDTH');
            $overlib .= '</td>';
            $overlib .= '<td>: ';
            $overlib .= $info[0] . ' ' . JText::_('COM_DATSOGALLERY_PIXELS');
            $overlib .= '</td>';
            $overlib .= '</tr>';
            $overlib .= '<tr>';
            $overlib .= '<td>';
            $overlib .= JText::_('COM_DATSOGALLERY_ORG_HEIGHT');
            $overlib .= '</td>';
            $overlib .= '<td>: ';
            $overlib .= $info[1] . ' ' . JText::_('COM_DATSOGALLERY_PIXELS');
            $overlib .= '</td>';
            $overlib .= '</tr>';
            $overlib .= '<tr>';
            $overlib .= '<td>';
            $overlib .= JText::_('COM_DATSOGALLERY_ORG_TYPE');
            $overlib .= '</td>';
            $overlib .= '<td>: ';
            $overlib .= $info[2];
            $overlib .= '</td>';
            $overlib .= '</tr>';
            $overlib .= '<tr>';
            $overlib .= '<td>';
            $overlib .= JText::_('COM_DATSOGALLERY_FILESIZE');
            $overlib .= '</td>';
            $overlib .= '<td>: ';
            $overlib .= $fsize;
            $overlib .= '</td>';
            $overlib .= '</tr>';
            $overlib .= '</table>';
            ?>
        <tr class="row<?php 
            echo $k;
            ?>
">
          <td align="center"><?php 
            echo $pagination->getRowOffset($i);
            ?>
</td>
          <td align="center"><input type="checkbox" id="cb<?php 
            echo $i;
            ?>
" name="cid[]" value="<?php 
            echo $row->id;
            ?>
" onclick="isChecked(this.checked);" /></td>
          <td><a href="javascript:editEntry(<?php 
            echo $i;
            ?>
); submitform('edit');"
          id="<strong><?php 
            echo jsspecialchars($row->imgtitle);
            ?>
</strong><br /><br />
          <img src='<?php 
            echo $imgprev;
            ?>
' class='dgimg' /><br /><br /><?php 
            echo $overlib;
            ?>
" class="dgtip"><?php 
            echo $row->imgtitle;
            ?>
</a></td>
          <td><a href="index.php?option=com_datsogallery&task=editcatg&cid=<?php 
            echo $row->catid;
            ?>
"><?php 
            echo $row->category;
            ?>
</a></td>
          <td align="center"><?php 
            echo $row->imgcounter;
            ?>
</td>
          <td align="center"><?php 
            echo $row->imgdownloaded;
            ?>
</td>
          <td align="center"><?php 
            echo $frating;
            ?>
</td>
          <td class="order">
              <?php 
            if ($ordering) {
                if ($lists['order_Dir'] == 'asc') {
                    $dirup = 'orderup';
                    $dirdown = 'orderdown';
                } else {
                    $dirup = 'orderdown';
                    $dirdown = 'orderup';
                }
                ?>
				<span><?php 
                echo $pagination->orderUpIcon($i, $row->catid == @$rows[$i - 1]->catid, $dirup, JText::_('COM_DATSOGALLERY_MOVE_UP'), $ordering);
                ?>
</span>
				<span><?php 
                echo $pagination->orderDownIcon($i, $n, $row->catid == @$rows[$i + 1]->catid, $dirdown, JText::_('COM_DATSOGALLERY_MOVE_DOWN'), $ordering);
                ?>
</span>
                <?php 
            }
            ?>
				<?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'><a href="javascript: void(0);" onclick="return listItemTask('cb<?php 
            echo $i;
            ?>
','<?php 
            echo $task;
            ?>
')"> <img src="<?php 
            echo $uri->root();
            ?>
components/com_datsogallery/images/<?php 
            echo $img;
            ?>
" width="16" height="16" border="0" alt="" /></a></td>
          <td align='center'><a href="javascript: void(0);" onclick="return listItemTask('cb<?php 
            echo $i;
            ?>
','<?php 
            echo $taska;
            ?>
')"> <img src="<?php 
            echo $uri->root();
            ?>
components/com_datsogallery/images/<?php 
            echo $imga;
            ?>
" width="16" height="16" border="0" alt="" /></a></td>
          <?php 
            if ($ad_shop) {
                ?>
          <td align="center"><b><?php 
                echo $row->imgprice;
                ?>
</b></td>
          <td align="center"><b><?php 
                echo $sales;
                ?>
</b></td>
          <?php 
            }
            ?>
          <td align="center"><a href="index.php?option=com_users&task=user.edit&id=<?php 
            echo $row->owner_id;
            ?>
"><?php 
            echo $row->username;
            ?>
</a></td>
          <td align="center"><?php 
            if ($row->useruploaded) {
                ?>
            <img src="<?php 
                echo $uri->root();
                ?>
components/com_datsogallery/images/dg-user-icon.png" title="<?php 
                echo JText::_('COM_DATSOGALLERY_USER_UPLOADED');
                ?>
">
            <?php 
            } else {
                ?>
            <img src="<?php 
                echo $uri->root();
                ?>
components/com_datsogallery/images/dg-admin-icon.png" title="<?php 
                echo JText::_('COM_DATSOGALLERY_ADMIN_UPLOADED');
                ?>
">
            <?php 
            }
            ?>
          </td>
          <td width="10%" align="center"><?php 
            echo strftime($ad_datef, $row->imgdate);
            ?>
</td>
          <td align="center"><?php 
            echo $row->id;
            ?>
</td>
          </tr>
        <?php 
            $k = 1 - $k;
        }
        ?>
     </tbody>
    </table>

    <input type="hidden" name="option" value="com_datsogallery" />
    <input type="hidden" name="task" value="" />
    <input type="hidden" name="boxchecked" value="0" />
    <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 
    }
예제 #7
0
        
        
    </div>
    <div class="grid_5">
    	<div id="map" class="contactMap"></div>
    </div>
</div>




    <script type="text/javascript">
        var map, layer, vectorLayer, featureMarker;
		<?php 
$markersJSString = '';
$markersJSString .= "{'ID':'" . intval(1) . "', 'NAME':'" . jsspecialchars('ActiveWatch - FreeEx ') . "', 'LATITUDE':" . '44.438763' . ", 'LONGITUDE':" . '26.076325' . "}";
?>
		var markers = [<?php 
echo $markersJSString;
?>
];		
		
        function initContact() {}
		
		//OpenLayers.ProxyHost = "openlayers/examples/proxy.cgi?url=";
		map = new OpenLayers.Map('map', {
			controls: [new OpenLayers.Control.PanZoom(), new OpenLayers.Control.Navigation() ]
		});
		
		layer = new OpenLayers.Layer.OSM("OpenStreetMap", null, { transitionEffect: 'resize' });
		map.addLayers([layer]);