{code}
<?php
define("ABSOLUTE_PATH", "/var/www/html/spgm-1.4.7/");
define("VIRT_PATH", "/vvspgm/");
$doc =& JFactory::getDocument();
$gal = JRequest::getVar('spgmGal', null);
//$uri = JUri::getInstance();
//echo $uri->toString();
$doc->setTitle("Galerii". ($gal?": ".$gal : ""));
$doc->addStyleSheet( '/vvspgm/css/style_joomla.css' );
$doc->addStyleSheet( '/vvspgm/flavors/default/spgm_style2_joomla.css' );
$doc->addStyleSheet( '/vvspgm/SmoothGallery-2.1dev/css/jd.gallery.css','text/css', 'screen' );
$doc->addStyleDeclaration("body { min-height: 640px; }#myGallery{width: 640px !important;height: 480px !important;display: none;background: #000; }");
JHtml::_("behavior.framework");
JHtml::_("behavior.modal");
$doc->addScript("/vvspgm/SmoothGallery-2.1dev/scripts/jd.gallery.js");
$doc->addScript("/vvspgm/SmoothGallery-2.1dev/scripts/jd.gallery.set.js");
///$doc->addScript("/vvspgm/SmoothGallery-2.1dev/scripts/jd.gallery.transitions.js");
$doc->addScript("/vvspgm/spgm.js");
$doc->addScript("/vvspgm/contrib/overlib410/overlib.js");
require(ABSOLUTE_PATH . "spgm_joomla3.php");
// check if user is logged in
if ($user->guest == 0 && in_array(6, $user->getAuthorisedViewLevels()) )
{
//echo 'Hello '.$user->name;
echo '<p style="text-align:left;"><a href="https://www.kuusalu.edu.ee/vvspgm/tools/webmin.php" target="_new">Administreeri</a></p>';
}
?>
{/code}