$database->setQuery("SELECT catid FROM #__zoom WHERE subcat_id=0 AND pos=0 ORDER BY " . $orderMethod); } else { $database->setQuery("SELECT catid FROM #__zoom WHERE subcat_id=0 AND pos=0 AND published=1 ORDER BY " . $orderMethod); } $zoom->_result = $database->query(); $galleries = array(); while ($row = mysql_fetch_object($zoom->_result)) { $galleries[] = new gallery($row->catid, true); } ZMG_Template_Gallery::showGalleries($galleries, $zoom->_CONFIG['viewtype'], $Itemid, $zoom->_CONFIG['catcolsno'], $zoom->_CONFIG['galleryPrefix'], $zoom->_CONFIG['catImg'], $zoom->_CONFIG['showMetaBox']); ZMG_Template_Gallery::showFooter($zoom->_CONFIG['viewtype'], $Itemid, $zoom); } else { $catpass = mosGetParam($_REQUEST, 'catpass', ''); if (empty($catpass) && strlen($zoom->_gallery->_password) > 0 && !$zoom->_isAdmin && !$zoom->EditMon->isEdited($zoom->_gallery->_id, 'pass')) { $valid = false; ZMG_Template_Gallery::showPasswordForm($Itemid, $catid, $zoom->_tabclass); } elseif (!empty($catpass)) { if ($zoom->_gallery->checkPassword($catpass)) { $valid = true; } else { ?> <script language="javascript" type="text/javascript"> //<!-- alert('<?php echo html_entity_decode(_ZOOM_PASS_INNCORRECT); ?> '); location = '<?php echo sefRelToAbs("index" . $backend . ".php?option=com_zoom&Itemid=" . $Itemid . "&catid=" . $zoom->_gallery->_subcat_id); ?> ';