<form action="<?php echo $action_search; ?> " method="post" name="browse"> <?php ZMG_Template_Main::createKeywordsDropdown($zoom->_getKeywordsList(), 'sstring', '<option value="">>>' . _ZOOM_SEARCH_KEYWORD . '<<</option>', 1); ?> </form> </td> <td align="center" valign="top" class="<?php echo $zoom->_tabclass[$tabcnt]; ?> "> <form name="searchzoom" action="<?php echo sefReltoAbs('index.php?option=com_zoom&Itemid=' . $Itemid); ?> " target=_top method="post"> <input type="hidden" name="option" value="com_zoom" /> <input type="hidden" name="Itemid" value="<?php echo $Itemid; ?> " /> <input type="hidden" name="page" value="search" /> <input type="hidden" name="type" value="quicksearch" /> <input type="hidden" name="sorting" value="3" /> <input type="text" name="sstring" style="border: 1px solid; font: 10px Arial" onblur="if(this.value=='') this.value='<?php echo $suchstring; ?> ';" onfocus="if(this.value=='<?php echo $suchstring;
function showHeader($use_tables = true, $Itemid, $title = "zOOm Media Gallery", $show_logo, $show_search, $show_keywords, &$keywords) { global $mosConfig_live_site, $mainframe; if ($use_tables) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="left" class="componentheader" width="30%"><h3><?php echo $title; ?> </h3></td> <?php if ($show_search && $show_keywords) { ?> <td align="right" valign="bottom" class="componentheader"> <div align="right"> <form action="<?php echo sefRelToAbs("index.php?option=com_zoom&Itemid=" . $Itemid . "&page=search&type=quicksearch"); ?> " method="post" name="browse"> <?php ZMG_Template_Main::createKeywordsDropdown($keywords, 'sstring', '<option value="">>>' . _ZOOM_SEARCH_KEYWORD . '<<</option>', 1); ?> </form> </div> </td> <?php } ?> <td align="right" valign="bottom" class="componenentheader" width="200"> <div align="right"> <?php if ($show_logo) { ?> <a href="http://www.zoomfactory.org" target="_blank"><img src="<?php echo $mosConfig_live_site; ?> /components/com_zoom/www/images/zoom_logo_small.gif" border="0" alt="" /></a> <?php } if ($show_search) { ?> <form name="searchzoom" action="<?php echo sefReltoAbs('index.php?option=com_zoom&Itemid=' . $Itemid); ?> " target="_top" method="post"> <input type="hidden" name="option" value="com_zoom" /> <input type="hidden" name="Itemid" value="<?php echo $Itemid; ?> " /> <input type="hidden" name="page" value="search" /> <input type="hidden" name="type" value="quicksearch" /> <input type="hidden" name="sorting" value="3" /> <input type="text" name="sstring" onblur="if(this.value=='') this.value='<?php echo _ZOOM_SEARCH_BOX; ?> ';" onfocus="if(this.value=='<?php echo _ZOOM_SEARCH_BOX; ?> ') this.value='';" value="<?php echo _ZOOM_SEARCH_BOX; ?> " class="inputbox" /> <a href="javascript:document.forms.searchzoom.submit();"> <img src="<?php echo $mosConfig_live_site; ?> /components/com_zoom/www/images/find.png" border="0" alt="" width="16" height="16" /></a> </form> </div> <?php } ?> </td> </tr> </table> <?php } else { ?> <h2 class="componentheading"><?php echo $title; ?> </h2> <?php if ($show_logo) { ?> <div class="zoom-logo"> <a href="http://www.zoomfactory.org/" target="_blank"><img src="<?php echo $mosConfig_live_site; ?> /components/com_zoom/www/images/zoom_logo_small.gif" border="0" alt="" /></a> </div> <?php } if ($show_search && $show_keywords) { ?> <div class="zoom-keywords"> <form action="index.php?option=com_zoom&Itemid=<?php echo $Itemid; ?> &page=search&type=quicksearch" method="post" name="browse"> <?php ZMG_Template_Main::createKeywordsDropdown($keywords, 'sstring', '<option value="" style="background-color:white;">>>' . _ZOOM_SEARCH_KEYWORD . '<<</option>', 1); ?> </form> </div> <?php } if ($show_search) { ?> <div class="zoom-search"> <form name="searchzoom" action="<?php echo sefReltoAbs('index.php?option=com_zoom&Itemid=' . $Itemid); ?> " target="_top" method="post"> <input type="hidden" name="option" value="com_zoom" /> <input type="hidden" name="Itemid" value="<?php echo $Itemid; ?> " /> <input type="hidden" name="page" value="search" /> <input type="hidden" name="type" value="quicksearch" /> <input type="hidden" name="sorting" value="3" /> <span class="search-zg"><label for="search-this-gallery"><?php echo _ZOOM_SEARCH_BOX; ?> </label></span><br /> <input type="text" name="sstring" id="search-this-gallery" style="background-color:white;" alt="Search this gallery" value="" class="inputbox" /> <input type="submit" value="Go" class="button" /> </form> </div> <?php } ?> <div class="clr"></div> <?php } }
} $descr = str_replace("'", "'", $descr); if ($zoom->toolbox->processImage($image, $filename, $tags, $keywords, $imgname, $descr, $rotatelt, $degrees, (bool) $ignoresizes)) { $zoom->_counter++; } } // end of foreach-loop if ($zoom->toolbox->_err_num > 0) { $zoom->toolbox->displayErrors(); } echo '<p><center><h4>' . $zoom->_counter . ' ' . _ZOOM_ALERT_UPLOADSOK . '</h4></center></p>'; } else { // Display form... ?> <form name="scan_form" method="post" action="<?php echo $zoom->_isBackend ? "index2.php?option=com_zoom&Itemid=" . $Itemid . "&page=upload&formtype=scan" : sefReltoAbs("index.php?option=com_zoom&Itemid=" . $Itemid . "&page=upload&formtype=scan"); ?> " onsubmit="showMe();"> <table border="0" cellpadding="3" cellspacing="3"> <?php // if php safe_mode restriction is in use, warn the user! -> added by mic if (ini_get('safe_mode') == 1) { ?> <tr> <td> </td> <td colspan="2"><strong><font color="red"><?php echo _ZOOM_A_MESS_SAFEMODE1; ?> </font></strong></td> </tr> <?php
/** * Cloaks html link whith javascript * * @param string The cloaking URL * @param string The link text * @return string HTML */ function _htmlLinkCloaking($url = '', $text = '') { $link = sefReltoAbs($url); if ($this->linkCloaking) { //return mosHTML::Link("", $text, array('onclick'=>'"window.location.href=\''.josURL($url).'\';return false;"')); return '<a href="#" onclick="window.location.href=\'' . $link . '\'; return false;">' . $text . '</a>'; } else { //return mosHTML::Link(josURL($url), "$text"); return '<a href="' . $link . '">' . $text . '</a>'; } }
" /> <strong><font size="4"><?php echo _ZOOM_MOVEFILES; ?> </font></strong> </td> <td width="33%" align="right"> </td> </tr> </table> <h3><?php echo _ZOOM_MOVEFILES_STEP1; ?> </h3> <form name="select_cat" action="<?php echo $zoom->_isBackend ? "index2.php" : sefReltoAbs("index.php?option=com_zoom&page=movefiles&Itemid=" . $Itemid); ?> " method="post"> <center> <?php echo $zoom->createCatDropDown('movecat', '<option value="">--- ' . _ZOOM_PICK . ' ---</option>', 0, 0, $zoom->_gallery->_id); foreach ($keys as $key) { ?> <input type="hidden" name="keys[]" value="<?php echo $key; ?> " /> <?php } ?> <br /><br />
/** * @return string * @desc Create the HTML body of the Media Manager. * @access public */ function createMediaEditForm($option, $page, $Itemid, $catid, $backend, $PageNo = 1) { global $mosConfig_live_site, $mosConfig_absolute_path; $this->createCheckAllScript(); $i = 0; $this->_counter = 0; $table_class = ""; $header_class = " class=\"sectiontableheader\""; if ($this->_isBackend) { $table_class = " class=\"adminlist\""; $header_class = ""; $this->_tabclass = array("row0", "row1"); } $i = 1; $startRow = 0; $PageSize = empty($_SESSION['zoom_mediapp']) ? 10 : $_SESSION['zoom_mediapp']; //Set the page no $startRow = ($PageNo - 1) * $PageSize; //Total of record $RecordCount = $this->_gallery->getNumOfImages(); //Number of files in gallery $endRow = $startRow + $PageSize - 1; // subtract one or it's one more than requested if ($endRow >= $RecordCount) { $endRow = $RecordCount - 1; } //Set Maximum Page $MaxPage = ceil($RecordCount % $PageSize); if ($RecordCount % $PageSize == 0) { $MaxPage = ceil($RecordCount / $PageSize); } else { $MaxPage = ceil($RecordCount / $PageSize); } //Set the counter start $CounterStart = 1; //Counter End $CounterEnd = $MaxPage; ?> <table width="80%" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center" width="50%"> <?php $c = 0; //Print Page No for ($c = $CounterStart; $c <= $CounterEnd; $c++) { if ($c < $MaxPage) { if ($c == $PageNo) { if ($c % $RecordCount == 0) { echo "<u><strong>{$c}</strong></u> "; } else { echo "<u><strong>{$c}</strong></u> | "; } } elseif ($c % $RecordCount == 0) { echo "<a href=\"" . ($this->_isBackend ? "index2.php?option=com_zoom&page=" . $page . "&Itemid=" . $Itemid . "&catid=" . $catid . "&PageNo=" . $c : sefReltoAbs("index.php?option=com_zoom&page=" . $page . "&Itemid=" . $Itemid . "&catid=" . $catid . "&PageNo=" . $c)) . "\"><strong>{$c}</strong></a> "; } else { echo "<a href=\"" . ($this->_isBackend ? "index2.php?option=com_zoom&page=" . $page . "&Itemid=" . $Itemid . "&catid=" . $catid . "&PageNo=" . $c : sefReltoAbs("index.php?option=com_zoom&page=" . $page . "&Itemid=" . $Itemid . "&catid=" . $catid . "&PageNo=" . $c)) . "\"><strong>{$c}</strong></a> | "; } //END IF } else { if ($PageNo == $MaxPage) { echo "<u><strong>{$c}</strong></u> "; } else { echo "<a href=\"" . ($this->_isBackend ? "index2.php?option=com_zoom&page=" . $page . "&Itemid=" . $Itemid . "&catid=" . $catid . "&PageNo=" . $c : sefReltoAbs("index.php?option=com_zoom&page=" . $page . "&Itemid=" . $Itemid . "&catid=" . $catid . "&PageNo=" . $c)) . "\"><strong>{$c}</strong></a> "; } } } echo $this->createMediaPPDropdown($PageSize); ?> </td> <?php if (!$this->_isBackend) { ?> <td align="right"> <div align="right"> <?php if ($this->_isAdmin || $this->privileges->hasPrivilege('priv_upload')) { ?> <a href="<?php echo $this->_isBackend ? "index" . $backend . ".php?option=com_zoom&page=upload&return=mediamgr&catid=" . $catid . "&Itemid=" . $Itemid . "&PageNo=" . $PageNo : sefReltoAbs("index.php?option=com_zoom&page=upload&return=mediamgr&catid=" . $catid . "&Itemid=" . $Itemid . "&PageNo=" . $PageNo); ?> " onmouseover="return overlib('<?php echo _ZOOM_UPLOAD; ?> ');" onmouseout="return nd();"><img src="<?php echo $mosConfig_live_site; ?> /components/com_zoom/www/images/admin/new.png" alt="" border="0" onmouseover="MM_swapImage('new','','<?php echo $mosConfig_live_site; ?> /components/com_zoom/www/images/admin/new_f2.png',1);" onmouseout="MM_swapImgRestore();" name="new" /></a> <?php } if ($this->_isAdmin || $this->privileges->hasPrivilege('priv_editmedium')) { ?> <a href="javascript:submitbutton('edtimg');" onmouseover="return overlib('<?php echo _ZOOM_BUTTON_EDIT; ?> ');" onmouseout="return nd();"><img src="<?php echo $mosConfig_live_site; ?> /components/com_zoom/www/images/admin/edit.png" alt="" border="0" onmouseover="MM_swapImage('edit','','<?php echo $mosConfig_live_site; ?> /components/com_zoom/www/images/admin/edit_f2.png',1);" onmouseout="MM_swapImgRestore();" name="edit" /></a> <?php } if ($this->_isAdmin) { ?> <a href="javascript:submitbutton('move');" onmouseover="return overlib('<?php echo _ZOOM_MOVEFILES; ?> ');" onmouseout="return nd();"><img src="<?php echo $mosConfig_live_site; ?> /components/com_zoom/www/images/admin/move.png" alt="" border="0" onmouseover="MM_swapImage('movefiles','','<?php echo $mosConfig_live_site; ?> /components/com_zoom/www/images/admin/move_f2.png',1);" onmouseout="MM_swapImgRestore();" name="movefiles" /></a> <?php } if ($this->_isAdmin || $this->privileges->hasPrivilege('priv_delmedium')) { ?> <a href="javascript:submitbutton('delete');" onmouseover="return overlib('<?php echo _ZOOM_DELETE; ?> ');" onmouseout="return nd();"><img src="<?php echo $mosConfig_live_site; ?> /components/com_zoom/www/images/admin/delete.png" alt="" border="0" onmouseover="MM_swapImage('delete','','<?php echo $mosConfig_live_site; ?> /components/com_zoom/www/images/admin/delete_f2.png',1);" onmouseout="MM_swapImgRestore();" name="delete" /></a> <?php } ?> </div> </td> <?php } ?> </tr> </table> <form name="mediamgr" action="<?php echo $this->_isBackend ? "index2.php?option=com_zoom&page=mediamgr&Itemid=" . $Itemid : sefReltoAbs("index.php?option=com_zoom&page=mediamgr&Itemid=" . $Itemid); ?> " method="post"> <input type="hidden" name="task" value="" /> <input type="hidden" name="return" value="mediamgr" /> <input type="hidden" name="catid" value="<?php echo $this->_gallery->_id; ?> " /> <input type="hidden" name="mediapp" value="" /> <input type="hidden" name="PageNo" value="<?php echo $PageNo; ?> " /> <table width="80%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center"> <div align="center"> <?php echo "\t\t\t<table cellpadding=\"3\" cellspacing=\"0\" border=\"0\" width=\"100%\"{$table_class}>\n" . "\t\t\t<tr{$header_class}>\n" . "\t\t\t\t<th width=\"50\"> </th>\n" . "\t\t\t\t<th align=\"left\">" . _ZOOM_NAME . "</th>\n" . "\t\t\t\t<th align=\"left\">" . _ZOOM_FILENAME . "</th>\n" . "\t\t\t\t<th align=\"left\">" . _ZOOM_HD_PREVIEW . "</th>\n" . "\t\t\t</tr>\n"; if ($this->privileges->hasPrivilege('priv_editmedium') | $this->privileges->hasPrivilege('priv_delmedium') || $this->_isAdmin) { for ($counter = $startRow; $counter <= $endRow; $counter++) { $image = $this->_gallery->_images[$counter]; $i++; $image->getInfo(); $bgcolor = $i & 1 ? $this->_tabclass[1] : $this->_tabclass[0]; if ($this->_isAdmin || $this->privileges->hasPrivilege('priv_editmedium')) { if ($this->_isBackend) { $edit_link = "index2.php?option=com_zoom&page=mediamgr&task=edtimg&catid=" . $image->_catid . "&key=" . $counter . "&Itemid=" . $Itemid . "&PageNo=" . $PageNo; } else { $edit_link = sefReltoAbs("index.php?option=com_zoom&page=mediamgr&task=edtimg&catid=" . $image->_catid . "&key=" . $counter . "&Itemid=" . $Itemid . "&PageNo=" . $PageNo); } } else { $edit_link = "javascript:void(0);"; } echo "\t\t\t<tr class=\"" . $bgcolor . "\">\n" . "\t\t\t\t<td align=\"center\" width=\"10\"><input type=\"checkbox\" name=\"keys[]\" value=\"" . $counter . "\" id=\"mediumno_{$i}\" /></td>\n" . "\t\t\t\t<td onmousedown=\"document.getElementById('mediumno_{$i}').checked = (document.getElementById('mediumno_{$i}').checked ? false : true);\"><a href=\"" . $edit_link . "\">" . $image->_name . "</a><br /></td>\n" . "\t\t\t\t<td onmousedown=\"document.getElementById('mediumno_{$i}').checked = (document.getElementById('mediumno_{$i}').checked ? false : true);\">" . $image->_filename . "<br />\n" . "\t\t\t\t</td>\n" . "\t\t\t\t<td onmousedown=\"document.getElementById('mediumno_{$i}').checked = (document.getElementById('mediumno_{$i}').checked ? false : true);\"><img src=\"" . $this->hotlinkImage($catid, '2', $image->_id, null) . "\" alt=\"\" border=\"0\" /></td>\n" . "\t\t\t</tr>\n"; $this->_counter++; } } echo "\t\t\t<tr{$header_class}>\n" . "\t\t\t\t<th height=\"20\" align=\"center\"><input type=\"checkbox\" name=\"checkall\" onclick=\"checkUncheckAll(this, 'keys[]');\" id=\"checkall\" /></th>\n" . "\t\t\t\t<th height=\"20\" align=\"left\" onmousedown=\"document.getElementById('checkall').checked = (document.getElementById('checkall').checked ? false : true);checkUncheckAll(document.getElementById('checkall'), 'keys[]');\">\n" . "\t\t\t<strong><label onclick=\"javascript: return (document.getElementById('checkall') ? false : true);checkUncheckAll(document.getElementById('checkall'), 'keys[]');\" for=\"checkall\">" . _ZOOM_HD_CHECKALL . "</label></strong>\n" . "\t\t\t\t</th>\n" . "\t\t\t\t<th height=\"20\" align=\"center\">"; $c = 0; //Print Page No for ($c = $CounterStart; $c <= $CounterEnd; $c++) { if ($c < $MaxPage) { if ($c == $PageNo) { if ($c % $RecordCount == 0) { echo "<u><strong>{$c}</strong></u> "; } else { echo "<u><strong>{$c}</strong></u> | "; } } elseif ($c % $RecordCount == 0) { echo "<a href=\"" . ($this->_isBackend ? "index2.php?option=com_zoom&page=" . $page . "&Itemid=" . $Itemid . "&catid=" . $catid . "&PageNo=" . $c : sefReltoAbs("index.php?option=com_zoom&page=" . $page . "&Itemid=" . $Itemid . "&catid=" . $catid . "&PageNo=" . $c)) . "\"><strong>{$c}</strong></a> "; } else { echo "<a href=\"" . ($this->_isBackend ? "index2.php?option=com_zoom&page=" . $page . "&Itemid=" . $Itemid . "&catid=" . $catid . "&PageNo=" . $c : sefReltoAbs("index.php?option=com_zoom&page=" . $page . "&Itemid=" . $Itemid . "&catid=" . $catid . "&PageNo=" . $c)) . "\"><strong>{$c}</strong></a> | "; } //END IF } else { if ($PageNo == $MaxPage) { echo "<u><strong>{$c}</strong></u> "; } else { echo "<a href=\"" . ($this->_isBackend ? "index2.php?option=com_zoom&page=" . $page . "&Itemid=" . $Itemid . "&catid=" . $catid . "&PageNo=" . $c : sefReltoAbs("index.php?option=com_zoom&page=" . $page . "&Itemid=" . $Itemid . "&catid=" . $catid . "&PageNo=" . $c)) . "\"><strong>{$c}</strong></a> "; } } } echo $this->createMediaPPDropdown($PageSize); echo "</th>\n" . "\t\t\t\t<th height=\"20\" align=\"center\"> </th>\n" . "\t\t\t</tr>\n" . "\t\t\t</table>\n" . "\t\t\t</div>" . "\t\t</td>" . "\t</tr>" . "\t</table>" . "\t</form>"; }
/** * Add a comment to the medium. * * @param string $uname * @param string $comment * @return void * @access public */ function addComment($uname, $comment) { global $database, $zoom, $Itemid, $catid, $key, $mainframe, $mosConfig_live_site; $comment = str_replace("'", "'", $comment); if (!$zoom->EditMon->isEdited($this->_id, 'comment')) { $uname = $zoom->cleanString($uname); $comment = $zoom->cleanString($comment); if (strlen($comment) > $zoom->_CONFIG['cmtLength']) { $comment = substr($comment, 0, $zoom->_CONFIG['cmtLength'] - 4) . "..."; } $database->setQuery("INSERT INTO #__zoom_comments (imgid,cmtname,cmtcontent,cmtdate) VALUES ('" . $this->_id . "','" . $zoom->escapeString($uname) . "','" . $zoom->escapeString($comment) . "', NOW() )"); $database->query(); $zoom->EditMon->setEditMon($this->_id, 'comment'); $subject = "New comments added!"; $body = "Name: " . $uname . "\n\nComment: " . $comment . "\n\nLink: " . sefReltoAbs($mosConfig_live_site . "/index.php?option=com_zoom&Itemid=" . $Itemid . "&page=view&catid=" . $catid . "&key=" . $key); $database->setQuery("SELECT b.email AS email FROM #__zoomfiles a, #__users b WHERE a.imgid=" . $this->_id . " AND a.uid=b.id"); $result = $database->loadResult(); $sentmail = mosMail('', '', $result, $subject, $body); echo "<script language=\"JavaScript\" type=\"text/JavaScript\"> alert('" . html_entity_decode(_ZOOM_ALERT_COMMENTOK) . "'); </script>"; } else { echo "<script language=\"JavaScript\" type=\"text/JavaScript\"> alert('" . html_entity_decode(_ZOOM_ALERT_COMMENTERROR) . "'); </script>"; } // reload/ refill comments array... $this->getComments(); }
<td align="center" width="100%"><a href="<?php echo $zoom->_isBackend ? "index2.php?option=com_zoom&Itemid=" . $Itemid . "&page=admin" : sefReltoAbs("index.php?option=com_zoom&Itemid=" . $Itemid . "&page=admin"); ?> "> <img src="<?php echo $mosConfig_live_site; ?> /components/com_zoom/www/images/home.gif" alt="<?php echo _ZOOM_MAINSCREEN; ?> " border="0" /> <?php echo _ZOOM_MAINSCREEN; ?> </a> | <a href="<?php echo $zoom->_isBackend ? "index2.php?option=com_zoom&page=mediamgr&catid=" . $catid . "&Itemid=" . $Itemid : sefReltoAbs("index.php?option=com_zoom&page=mediamgr&catid=" . $catid . "&Itemid=" . $Itemid); ?> "> <img src="<?php echo $mosConfig_live_site; ?> /components/com_zoom/www/images/back.png" alt="<?echo _ZOOM_BACK;?>" border="0" /> <?php echo _ZOOM_BACK; ?> </a> </td> </tr> <?php } ?> <tr>
} if (!empty($catid)) { // display form containing editable media from the specified gallery... $PageNo = intval(trim(mosGetParam($_REQUEST, 'PageNo', 1))); $zoom->createCheckAllScript(); ?> <script language="Javasript" type="text/javascript"> <!-- function submitbutton(theTask, mediapp){ document.mediamgr.elements['task'].value = theTask; if (theTask == "mediapp") { document.mediamgr.mediapp.value = mediapp; } if (theTask == "upload") document.location = "<?php echo $zoom->_isBackend ? "index2.php?option=com_zoom&page=upload&return=mediamgr&catid=" . $catid . "&Itemid=" . $Itemid . "&PageNo=" . $PageNo : sefReltoAbs("index.php?option=com_zoom&page=upload&return=mediamgr&catid=" . $catid . "&Itemid=" . $Itemid . "&PageNo=" . $PageNo); ?> "; else document.mediamgr.submit(); return false; } //--> </script> <?php echo $zoom->createMediaEditForm($option, $page, $Itemid, $catid, $backend, $PageNo); } ?> </div> <?php }
function showPanel() { global $database, $mainframe, $params, $my, $Itemid, $acl; if (isset($my->id) && $my->id > 0) { if (!empty($my->username)) { $greeting_message = _HI . ' ' . $my->username; } else { $greeting_message = ''; } backHTML::controlPanelBottonStart(_UCP_USER_MENU, 'cpanel.png'); $link = 'index.php?option=com_acajoom&act=show&Itemid=' . $Itemid; if ($GLOBALS[ACA . 'use_sef'] and function_exists('sefRelToAbs')) { $link = sefReltoAbs($link); } backHTML::quickiconButton($link, 'addusers.png', _UCP_USER_CONTACT, false, 'Registered', false); if (class_exists('pro')) { $aro_id = isset($my->id) && $my->id > 0 ? $acl->get_object_id('users', $my->id, 'ARO') : 1; $qacl = "SELECT `group_id` FROM `#__core_acl_groups_aro_map` WHERE `aro_id` =" . $aro_id; $database->setQuery($qacl); $usergid = $database->loadResult(); $gidAdmin = $acl->get_group_id('Administrator', 'ARO'); $ex_groups = $acl->get_group_children($gidAdmin, 'ARO', 'RECURSE'); $ex_groups[] = $gidAdmin; if (in_array($usergid, $ex_groups)) { $link = 'index.php?option=com_acajoom&act=list&Itemid=' . $Itemid; if ($GLOBALS[ACA . 'use_sef'] and function_exists('sefRelToAbs')) { $link = sefReltoAbs($link); } backHTML::quickiconButton($link, 'addedit.png', _ACA_MENU_LIST, false, 'admin', false); } else { $lists = lists::getLists(0, 0, true); $access = false; foreach ($lists as $list) { $bit = acajoom::checkPermissions('hello', 0, $list->acc_level); if ($bit) { $access = true; break; } } $link = 'index.php?option=com_acajoom&act=list&Itemid=' . $Itemid; if ($GLOBALS[ACA . 'use_sef'] and function_exists('sefRelToAbs')) { $link = sefReltoAbs($link); } if ($access) { backHTML::quickiconButton($link, 'addedit.png', _ACA_MENU_LIST, false, 'Registered', false); } } } else { $link = 'index.php?option=com_acajoom&act=list&Itemid=' . $Itemid; if ($GLOBALS[ACA . 'use_sef'] and function_exists('sefRelToAbs')) { $link = sefReltoAbs($link); } backHTML::quickiconButton($link, 'addedit.png', _ACA_MENU_LIST, false, 'admin', false); } backHTML::controlPanelBottomEnd(); if (class_exists('auto')) { auto::otherPanel(); } } }
?> " border="0" name="save" /></button> <button onclick="submitbutton('cancel');" onmouseout="MM_swapImgRestore();return nd();" onmouseover="MM_swapImage('cancel','','images/cancel_f2.png',1);return overlib('<?php echo _CMN_CANCEL; ?> ');" class="button"><img src="images/cancel.png" alt="<?php echo _CMN_CANCEL; ?> " border="0" name="cancel" /></button></td> </tr> </table> <?php } ?> <form enctype="multipart/form-data" name="adminForm" method="post" action="<?php echo $zoom->_isBackend ? "index2.php" : sefReltoAbs("index.php?option=com_zoom&page=settings"); ?> "> <?php $tabs = new mosTabs(1); $tabs->startPane("modules-cpanel"); $tabs->startTab(_ZOOM_SETTINGS_TAB1, "module19"); ?> <table border="0" cellspacing="0" cellpadding="5" width="100%" class="adminform"> <tr> <td width="20"> </td> <td><strong><?php echo _ZOOM_SYSTEM_TITLE; ?> </strong></td> <td> </td>
quickiconButton($link, 'settings_f2.png', _ZOOM_SETTINGS, '/components/com_zoom/www/images/admin/', _ZOOM_SETTINGS_DESCR); if ($zoom->_isBackend) { $link = "index" . $backend . ".php?option=com_zoom&page=admin&action=optimize&Itemid=" . $Itemid; } else { $link = sefReltoAbs("index.php?option=com_zoom&page=admin&action=optimize&Itemid=" . $Itemid); } quickiconButton($link, 'tables_f2.png', _ZOOM_OPTIMIZE, '/components/com_zoom/www/images/admin/', _ZOOM_OPTIMIZE_DESCR); } ?> </div> </td> </tr> <tr> <td align="left" style="text-align:left;"> <a href="<?php echo $zoom->_isBackend ? "index2.php?option=com_zoom&page=credits&Itemid=" . $Itemid : sefReltoAbs("index.php?option=com_zoom&page=credits&Itemid=" . $Itemid); ?> "> <img src="<?php echo $mosConfig_live_site; ?> /components/com_zoom/www/images/credits.gif" alt="<?php echo _ZOOM_CREDITS; ?> " border="0" /> <?php echo _ZOOM_CREDITS; ?> </a> </td> </tr> </table>
$thumbzoomcode .= ' caption=(' . $captionAlttext . ')'; break; } $thumbzoomcode .= '}'; $thumbzoomcode = stripslashes($thumbzoomcode); echo '<form name="zoomthumbcode">'; //@work@ add copytoclipboard button; echo '<textarea rows="3" cols="25" name="zoomthumbcode">' . $thumbzoomcode . '</textarea>'; //echo '<input type="text" name="zoomthumbcode" size="40" value="'.$thumbzoomcode.'">'; echo '</form>'; break; case "step1": //select source gallery //select source gallery default: //step 1 //@version@: add language, add better list by using mothernames as well echo '<div align="left"><p id="step"><strong>Step 1 :: choose gallery</strong></p>'; $zoom->_CAT_LIST = null; $zoom->_getCatList(0, '> ', '> '); if (isset($zoom->_CAT_LIST)) { foreach ($zoom->_CAT_LIST as $category) { echo '<p><a href="' . ($zoom->_isBackend ? 'index2.php?option=com_zoom&Itemid=' . $Itemid . '&page=zoomthumb&task=step2&catid=' . $category['id'] : sefReltoAbs('index.php?option=com_zoom&Itemid=' . $Itemid . '&page=zoomthumb&task=step2&catid=' . $category['id'])) . '">Select:: </a> ' . $category['catname'] . '</p>'; } } else { //@version@::get language here echo '<p>No gallery found.</p>'; } } //too much fluf at the bottom of the page right now due to all the embedding. So i add a lot of height to clear things up echo '<div align="left" style="clear: both; height: 300px;"></div><a href="http://forge.joomla.org/sf/projects/zoomthumb">Zoom Thumb</a>, use your Zoom gallery images in your Joomla! content.<hr></div>';
} } } function endCallback(callback) { hideMe(); } catsmgrStart(); //--> </script> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <?php if (!$zoom->_isBackend) { ?> <tr> <td align="center" width="100%"><a href="<?php echo $zoom->_isBackend ? "index2.php?option=com_zoom&Itemid=" . $Itemid . "&page=admin" : sefReltoAbs("index.php?option=com_zoom&Itemid=" . $Itemid . "&page=admin"); ?> "> <img src="<?php echo $mosConfig_live_site; ?> /components/com_zoom/www/images/home.gif" alt="<?echo _ZOOM_MAINSCREEN;?>" border="0" /> <?php echo _ZOOM_MAINSCREEN; ?> </a> </td> </tr> <?php } ?> <tr>
echo $mosConfig_live_site; ?> /components/com_zoom/www/images/ecard_big.png" border="0" alt="<?php echo _ZOOM_ECARD_SENDAS; ?> " /> <b><font size="4"><?php echo _ZOOM_ECARD_SENDAS; ?> </font></b></td> </tr> </table> <br /><br /><center><h5> <?php if ($zoom->ecard->save($imgid, $to_name, $from_name, $to_email, $from_email, $message)) { if ($zoom->ecard->send()) { echo _ZOOM_ECARD_SUCCESS . "<br />" . "<a href=\"" . sefReltoAbs("index.php?option=com_zoom&Itemid=" . $Itemid . "&page=ecard&task=viewcard&ecdid=" . $zoom->ecard->_id) . "\"> " . _ZOOM_ECARD_CLICKHERE . "</a>"; } else { echo _ZOOM_ECARD_ERROR . " {$to_email}!"; } } else { echo _ZOOM_ECARD_ERROR . " {$to_email}!"; } echo "\t</h5></center>\n"; } elseif ($task == 'viewcard') { // Delete overdue records of eCards from the database, before anyone can see them... $now = date("Y-m-d"); $database->setQuery("DELETE FROM #__zoom_ecards WHERE end_date <= {$now}"); $database->query(); $ecdid = trim(mosGetParam($_REQUEST, 'ecdid')); $back = (bool) trim(mosGetParam($_REQUEST, 'back', false)); $zoom->setEcard($ecdid);
function recordVote() { global $database, $mosConfig_live_site, $mosConfig_offset; $user_rating = mosGetParam($_REQUEST, 'user_rating', 0); $cid = mosGetParam($_REQUEST, 'cid', 0); $cid = intval($cid); $Itemid = mosGetParam($_REQUEST, 'Itemid', 0); $Itemid = intval($Itemid); $user_rating = intval($user_rating); $now = date('Y-m-d H:i:s', time() + $mosConfig_offset * 60 * 60); $url = sefReltoAbs("index.php?option=com_content&task=view&id={$cid}&Itemid={$Itemid}"); if ($user_rating >= 1 and $user_rating <= 5) { $currip = getenv('REMOTE_ADDR'); $query = "SELECT * FROM #__content as c WHERE id = {$cid} AND (c.state = '1' OR c.state = '-1')" . "\n AND (c.publish_up = '0000-00-00 00:00:00' OR c.publish_up <= '{$now}')" . "\n AND (c.publish_down = '0000-00-00 00:00:00' OR c.publish_down >= '{$now}')"; $database->setQuery($query); $database->loadObject($row); if ($row != NULL) { $query = "SELECT * FROM #__content_rating WHERE content_id = {$cid}"; $database->setQuery($query); $votesdb = NULL; if (!$database->loadObject($votesdb)) { $query = "INSERT INTO #__content_rating ( content_id, lastip, rating_sum, rating_count )" . "\n VALUES ( '{$cid}', '{$currip}', '{$user_rating}', '1' )"; $database->setQuery($query); $database->query() or die($database->stderr()); } else { if ($currip != $votesdb->lastip) { $query = "UPDATE #__content_rating" . "\n SET rating_count = rating_count + 1," . "\n rating_sum = rating_sum + {$user_rating}," . "\n lastip = '{$currip}'" . "\n WHERE content_id = " . $cid; $database->setQuery($query); $database->query() or die($database->stderr()); } else { mosRedirect($url, T_('You already voted for this poll today!')); } } mosRedirect($url, T_('Thanks for your vote!')); } else { mosRedirect($url, T_('The rating for this item is not allowed!')); } } }