/** * Category manager * * @param array $rows database rows of categeories * @param string $search * @param string $slist * @param string $olist * @param object $pageNav */ function Joom_ShowCategories_HTML(&$rows, $search, &$slist, &$olist, $pageNav) { $config = Joom_getConfig(); $database =& JFactory::getDBO(); jimport('joomla.filesystem.file'); ?> <div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div> <script language="Javascript" src="../includes/js/overlib_mini.js"></script> <form action="index.php" method="post" name="adminForm"> <table cellpadding="4" cellspacing="0" border="0" width="100%"> <tr> <td width="100%"></td> <td> <?php echo JText::_('JGA_SEARCH') . ':'; ?> <br /> <input type="text" name="search" value="<?php echo $search; ?> " class="inputbox" onChange="document.adminForm.submit();" /> </td> <td nowrap> <?php echo JText::_('JGA_SORT_BY_ORDER'); ?> <br /> <?php echo $olist; ?> </td> <td> <?php echo JText::_('JGA_SORT_BY_TYPE'); ?> <br /> <?php echo $slist; ?> </td> </tr> <tr> <td width="100%"></td> </tr> </table> <table width="100%" border="0" cellpadding="4" cellspacing="0" class="adminlist"> <tr> <th width="20"> <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($rows); ?> );" /> </th> <th width="10%"></th> <th width="5%" align="left">ID</th> <th width="85%" class="title"> <?php echo JText::_('JGA_CATEGORY'); ?> </th> <th nowrap align="left"> <?php echo JText::_('JGA_PARENT_CATEGORY'); ?> </th> <th nowrap> <?php echo JText::_('JGA_PUBLISHED'); ?> </th> <th width="5%"> <?php echo JText::_('JGA_OWNER'); ?> </th> <th width="5%"> <?php echo JText::_('JGA_TYPE'); ?> </th> <th nowrap> <?php echo JText::_('JGA_HIT'); ?> </th> <th colspan="2" nowrap> <div align="center"> <?php echo JText::_('JGA_REORDER'); ?> </div> </th> <th align="center"> <a href="javascript: saveorder(<?php echo count($rows) - 1; ?> )"> <img src="images/filesave.png" border="0" width="16" height="16" alt="<?php echo JText::_('JGA_SAVE_ORDER'); ?> " /> </a> </th> </tr> <?php $k = 0; $i = 0; for ($i = 0, $n = count($rows); $i < $n; $i++) { $row =& $rows[$i]; $catpath = Joom_GetCatPath($row->cid); ?> <tr class="row<?php echo $k; ?> "> <td width="20"> <input type="checkbox" id="cb<?php echo $i; ?> " name="cid[]" value="<?php echo $row->cid; ?> " onClick="isChecked(this.checked);" /> </td> <td width="10%"> <?php if ($row->catimage != '') { if (JFile::exists(JPATH_ROOT . DS . $config->jg_paththumbs . $catpath . $row->catimage)) { $imginfo = getimagesize(JPath::clean(JPATH_ROOT . DS . $config->jg_paththumbs . $catpath . $row->catimage)); $imgsource = _JOOM_LIVE_SITE . $config->jg_paththumbs . $catpath . $row->catimage; $srcWidth = $imginfo[0]; $srcHeight = $imginfo[1]; $thumbexists = 1; } else { $thumbexists = 0; } if ($thumbexists) { ?> <a href="#" onmouseover="return overlib('<img src=\'<?php echo $imgsource; ?> \' />',WIDTH,<?php echo $srcWidth; ?> , HEIGHT,<?php echo $srcHeight; ?> )" onmouseout="return nd()"; alt=""/> <img src="<?php echo $imgsource; ?> " border="0" width="24" height="24" /> </a> <?php } else { ?> <?php } } ?> </td> <td width="5%" ><?php echo $row->cid; ?> </td> <td width="85%" > <div align="left"> <a href="#edit" onclick="return listItemTask('cb<?php echo $i; ?> ', 'editcatg')"> <?php if ($row->parent > 0) { ?> » <?php } ?> <?php echo $row->name; ?> </a> </div> </td> <td align="center" nowrap> <?php echo Joom_ShowCategoryPath($row->parent); ?> </td> <?php $task = $row->published ? 'unpublishcatg' : 'publishcatg'; $img = $row->published ? 'tick.png' : 'publish_x.png'; ?> <td width="10%" align="center" nowrap> <a href="javascript: void(0);" onClick="return listItemTask('cb<?php echo $i; ?> ','<?php echo $task; ?> ')"> <img src="images/<?php echo $img; ?> " border="0" alt="" /> </a> </td> <td width="5%" align="center"> <?php if ($row->owner != null) { $owner = JFactory::getUser($row->owner); ?> <?php echo Joom_GetDisplayName($row->owner, true); ?> [<?php echo $config->jg_realname ? $owner->get('username') : $owner->get('name'); ?> (<?php echo $row->owner; ?> )] <?php } else { ?> Administrator[def] <?php } ?> </td> <td width="5%" align="center"> <?php if ($row->owner != null) { ?> <img src="../includes/js/ThemeOffice/users.png" alt="<?php echo JText::_('JGA_USER_UPLOAD'); ?> " title="<?php echo JText::_('JGA_USER_UPLOAD'); ?> " /> <?php } else { ?> <img src="../includes/js/ThemeOffice/credits.png" alt="<?php echo JText::_('JGA_ADMIN_UPLOAD'); ?> " title="<?php echo JText::_('JGA_ADMIN_UPLOAD'); ?> " /> <?php } ?> </td> <td width="10%" align="center" nowrap> <?php echo $row->groupname; ?> </td> <td> <?php if ($i > 0 || $i + $pageNav->limitstart > 0) { ?> <div align="center"> <a href="#reorder" onclick="return listItemTask('cb<?php echo $i; ?> ', 'orderupcatg')"> <img src="images/uparrow.png" border="0"<?php /* portierung: width und height entfernt */ ?> alt="<?php echo JText::_('JGA_UP'); ?> " /> </a> </div> <?php } else { ?> <?php } ?> </td> <td> <?php if ($i < $n - 1 || $i + $pageNav->limitstart < $pageNav->total - 1) { ?> <div align="center"> <a href="#reorder" onclick="return listItemTask('cb<?php echo $i; ?> ', 'orderdowncatg')"> <img src="images/downarrow.png" border="0"<?php /* portierung: width und height entfernt */ ?> alt="<?php echo JText::_('JGA_DOWN'); ?> " /> </a> </div> <?php } ?> </td> <td align="center"> <input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?> " class="text_area" style="text-align: center" /> </td> <?php $k = 1 - $k; ?> </tr> <?php } ?> <tr> <td colspan="12"> <?php echo $pageNav->getListFooter(); ?> </td> </tr> </table> <input type="hidden" name="option" value="<?php echo _JOOM_OPTION; ?> " /> <input type="hidden" name="task" value="categories" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="returntask" value="catg" /> </form> <?php }
function Joom_User_CatsShow_HTML(&$rows) { $config = Joom_getConfig(); $user =& JFactory::getUser(); $count_cat = count($rows); ?> <div class="jg_userpanelview"> <?php if ($config->jg_newpicnote && !$this->adminlogged) { ?> <div class="jg_uploadquotas"> <span class="jg_quotatitle"> <?php echo JText::_('JGS_NEW_CATEGORY_NOTE'); ?> </span><br /> <?php echo JText::_('JGS_NEW_CATEGORY_MAXCOUNT') . $config->jg_maxusercat; ?> <br /> <?php echo JText::_('JGS_NEW_CATEGORY_YOURCOUNT') . $count_cat; ?> <br /> <?php echo JText::_('JGS_NEW_CATEGORY_REMAINDER') . ($config->jg_maxusercat - $count_cat); ?> <br /> </div> <?php } //wenn max. Anzahl Kategorien erreicht, Button nicht anzeigen //nicht fuer Admins if ($this->adminlogged || $config->jg_maxusercat - $count_cat > 0) { ?> <div class="jg_up_head"> <input type="button" name="Button" value="<?php echo JText::_('JGS_NEW_CATEGORY'); ?> " onclick = "javascript:location.href='<?php echo JRoute::_('index.php?option=com_joomgallery&func=newusercat' . _JOOM_ITEMID, false); ?> ';" class="button" /> </div> <?php } ?> <div class="sectiontableheader"> <div class="jg_up_entry"> <div class="jg_up_ename"> <?php echo JText::_('JGS_CATEGORY'); ?> </div> <div class="jg_up_ehits"> <?php echo JText::_('JGS_PICTURES'); ?> </div> <div class="jg_up_ecat"> <?php echo JText::_('JGS_PARENT_CATEGORY'); ?> </div> <div class="jg_up_eact"> <?php echo JText::_('JGS_ACTION'); ?> </div> <div class="jg_up_eappr"> <?php echo JText::_('JGS_PUBLISHED'); ?> </div> </div> </div> <?php $k = 0; if (count($rows)) { foreach ($rows as $row) { $k = 1 - $k; $p = $k + 1; $catpath = Joom_GetCatPath($row->cid); //Link auf Kategorieansicht in Usergalerie, nur wenn published if ($row->published) { $catlink = JRoute::_('index.php?option=com_joomgallery&func=viewcategory&catid=' . $row->cid . _JOOM_ITEMID); } ?> <div class="<?php echo "sectiontableentry" . $p; ?> "> <div class="jg_up_entry"> <div class="jg_up_ename"> <?php if ($config->jg_showminithumbs) { if ($row->catimage != '') { ?> <img src="<?php echo _JOOM_LIVE_SITE . $config->jg_paththumbs . $catpath . $row->catimage; ?> " border="0" height="30" alt="" /> <?php } else { ?> <div class="jg_floatleft"> <img src="<?php echo _JOOM_LIVE_SITE . 'components/com_joomgallery/assets/images/arrow.png'; ?> " class="pngfile jg_icon" alt="arrow" /> </div> <?php } } if ($row->published) { ?> <a href="<?php echo $catlink; ?> "> <?php } ?> <?php echo $row->name; ?> <?php if ($row->published) { ?> </a> <?php } ?> </div> <div class="jg_up_ehits"> <?php echo $row->piccount; ?> </div> <div class="jg_up_ecat"> <?php if ($row->parent == 0) { ?> <?php echo '-'; ?> <?php } else { ?> <?php echo Joom_ShowCategoryPath($row->parent); ?> <?php } ?> </div> <div class="jg_up_esub1"> <a href="<?php echo JRoute::_('index.php?option=com_joomgallery&func=editusercat&catid=' . $row->cid . _JOOM_ITEMID); ?> " title="<?php echo JText::_('JGS_EDIT'); ?> "> <img src="<?php echo _JOOM_LIVE_SITE; ?> components/com_joomgallery/assets/images/edit.png" border="0" width="16" height="16" alt="<?php echo JText::_('JGS_EDIT'); ?> " class="pngfile jg_icon" /> </a> </div> <div class="jg_up_esub2"> <?php if ($row->allowdel == true) { ?> <a href="javascript:if (confirm('<?php echo JText::_('JGS_ALERT_SURE_DELETE_SELECTED_ITEM', true); ?> ')){ location.href='<?php echo JRoute::_('index.php?option=com_joomgallery&func=deleteusercat&catid=' . $row->cid . _JOOM_ITEMID, false); ?> ';}" title="<?php echo JText::_('JGS_DELETE'); ?> "> <img src="<?php echo _JOOM_LIVE_SITE; ?> components/com_joomgallery/assets/images/edit_trash.png" border="0" width="16" height="16" alt="<?php echo JText::_('JGS_DELETE'); ?> " class="pngfile jg_icon" /> </a> <?php } else { ?> <?php echo ' '; ?> <?php } ?> </div> <?php if ($row->published) { $a_pic = 'tick.png'; } else { $a_pic = 'cross.png'; } ?> <div class="jg_up_eappr"> <img src="<?php echo _JOOM_LIVE_SITE; ?> components/com_joomgallery/assets/images/<?php echo $a_pic; ?> " width="16" height="16" border="0" alt="pngfile" class="pngfile jg_icon" /> </div> </div> </div> <?php } } else { $p = $k + 1; ?> <div class="jg_txtrow"> <div class="<?php echo "sectiontableentry" . $p; ?> "> <img src="<?php echo _JOOM_LIVE_SITE . 'components/com_joomgallery/assets/images/arrow.png'; ?> " class="pngfile jg_icon" alt="arrow" /> <?php echo JText::_('JGS_YOU_NOT_HAVE_CATEGORY'); ?> </div> </div> <?php } ?> </div> <div class="jg_txtrow"> <input type="button" name="Button" value="<?php echo JText::_('JGS_BACK_TO_USER_PANEL'); ?> " onclick = "javascript:location.href='<?php echo JRoute::_('index.php?option=com_joomgallery&func=userpanel' . _JOOM_ITEMID, false); ?> ';" class="button" /> </div> <?php }
/** * Move pictures * * @param int $id * @param string $Lists * @param array of objects $items */ function Joom_ShowMovePictures_HTML($id, &$Lists, &$items) { $config = Joom_getConfig(); $database =& JFactory::getDBO(); jimport('joomla.filesystem.file'); ?> <form action="index.php" method="post" name="adminForm" > <table cellpadding="4" cellspacing="0" border="0" width="100%"> <tr> <td align="center"> <b><?php echo JText::_('JGA_MOVE_PICTURE_TO_CATEGORY'); ?> :</b> <?php echo $Lists['catgs']; ?> </td> </tr> </table> <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist"> <tr> <td align="left" valign="top" width="20%"> <strong> <?php echo JText::_('JGA_PICTURES_TO_MOVE'); ?> : </strong> </td> </tr> </table> <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist"> <tr> <th width="5%"></th> <th class="title" width="40%"> <?php echo JText::_('JGA_TITLE'); ?> </th> <th width="55%"> <div align="left"> <?php echo JText::_('JGA_PREVIOUS_CATEGORY'); ?> </div> </th> </tr> <?php foreach ($items as $item) { $catpath = Joom_GetCatPath($item->catid); ?> <tr> <td> <img src="<?php echo _JOOM_LIVE_SITE . $config->jg_paththumbs . $catpath . $item->imgfilename; ?> " border="0" width="24" height="24" alt="" /> </td> <td align="left"> <?php echo $item->imgtitle; ?> </td> <td> <div align="left"> <?php echo Joom_ShowCategoryPath($item->catid); ?> </div> </td> </tr> <?php } ?> <tr> <th align="center" colspan="3"> </th> </tr> </table> <input type="hidden" name="option" value="<?php echo _JOOM_OPTION; ?> " /> <input type="hidden" name="task" value="savemovepic" /> <input type="hidden" name="boxchecked" value="1" /> <?php foreach ($id as $ids) { echo "\n <input type=\"hidden\" name=\"id[]\" value=\"{$ids}\" />"; } ?> </form> <?php }