File manager - Edit - /home/capoccitel/www/wp-admin/mod_k2_user.tar
Back
tmpl/userblock.php 0000705 00000007542 15242037135 0010232 0 ustar 00 <?php /** * @version 2.11 (rolling release) * @package K2 * @author JoomlaWorks https://www.joomlaworks.net * @copyright Copyright (c) 2009 - 2024 JoomlaWorks Ltd. All rights reserved. * @license GNU/GPL: https://gnu.org/licenses/gpl.html */ // no direct access defined('_JEXEC') or die; ?> <div id="k2ModuleBox<?php echo $module->id; ?>" class="k2UserBlock<?php if ($params->get('moduleclass_sfx')) echo ' '.$params->get('moduleclass_sfx'); ?>"> <?php if ($userGreetingText): ?> <p class="ubGreeting"><?php echo $userGreetingText; ?></p> <?php endif; ?> <div class="k2UserBlockDetails"> <?php if ($params->get('userAvatar')): ?> <a class="k2Avatar ubAvatar" href="<?php echo JRoute::_(K2HelperRoute::getUserRoute($user->id)); ?>" title="<?php echo JText::_('K2_MY_PAGE'); ?>"> <img src="<?php echo K2HelperUtilities::getAvatar($user->id, $user->email); ?>" alt="<?php echo K2HelperUtilities::cleanHtml($user->name); ?>" style="width:<?php echo $avatarWidth; ?>px;height:auto;" /> </a> <?php endif; ?> <span class="ubName"><?php echo $user->name; ?></span> <span class="ubCommentsCount"><?php echo JText::_('K2_YOU_HAVE'); ?> <b><?php echo $user->numOfComments; ?></b> <?php if ($user->numOfComments==1) echo JText::_('K2_PUBLISHED_COMMENT'); else echo JText::_('K2_PUBLISHED_COMMENTS'); ?></span> <div class="clr"></div> </div> <ul class="k2UserBlockActions"> <?php if (isset($addItemLink)): ?> <li> <a data-k2-modal="edit" href="<?php echo $addItemLink; ?>"><?php echo JText::_('K2_ADD_NEW_ITEM'); ?></a> </li> <?php endif; ?> <li> <a href="<?php echo $viewProfileLink; ?>"><?php echo JText::_('K2_MY_PAGE'); ?></a> </li> <li> <a href="<?php echo $editProfileLink; ?>"><?php echo JText::_('K2_MY_ACCOUNT'); ?></a> </li> <?php if ($K2CommentsEnabled): ?> <li> <a data-k2-modal="iframe" href="<?php echo $editCommentsLink; ?>"><?php echo JText::_('K2_MODERATE_COMMENTS_TO_MY_PUBLISHED_ITEMS'); ?></a> </li> <?php endif; ?> </ul> <ul class="k2UserBlockRenderedMenu"> <?php $level = 1; foreach($menu as $key => $link): $level++; ?> <li class="linkItemId<?php echo $link->id; ?>"> <?php if ($link->type=='url' && $link->browserNav==0): ?> <a href="<?php echo $link->route; ?>"><?php echo $link->name; ?></a> <?php elseif (strpos($link->link,'option=com_k2&view=item&layout=itemform') || $link->browserNav==2): ?> <a data-k2-modal="edit" href="<?php echo $link->route; ?>"><?php echo $link->name; ?></a> <?php else: ?> <a href="<?php echo $link->route; ?>" <?php if ($link->browserNav==1) echo ' target="_blank"'; ?>><?php echo $link->name; ?></a> <?php endif; ?> <?php if (isset($menu[$key+1]) && $menu[$key]->level < $menu[$key+1]->level): ?> <ul> <?php endif; ?> <?php if (isset($menu[$key+1]) && $menu[$key]->level > $menu[$key+1]->level): ?> <?php echo str_repeat('</li></ul>', $menu[$key]->level - $menu[$key+1]->level); ?> <?php endif; ?> <?php if (isset($menu[$key+1]) && $menu[$key]->level == $menu[$key+1]->level): ?> </li> <?php endif; ?> <?php endforeach; ?> </ul> <form action="<?php echo JURI::root(true); ?>/index.php" method="post"> <input type="submit" name="Submit" class="button ubLogout" value="<?php echo JText::_('K2_LOGOUT'); ?>" /> <input type="hidden" name="option" value="<?php echo $option; ?>" /> <input type="hidden" name="task" value="<?php echo $task; ?>" /> <input type="hidden" name="return" value="<?php echo $return; ?>" /> <?php echo JHTML::_('form.token'); ?> </form> </div> tmpl/login.php 0000705 00000005215 15242037135 0007344 0 ustar 00 <?php /** * @version 2.11 (rolling release) * @package K2 * @author JoomlaWorks https://www.joomlaworks.net * @copyright Copyright (c) 2009 - 2024 JoomlaWorks Ltd. All rights reserved. * @license GNU/GPL: https://gnu.org/licenses/gpl.html */ // no direct access defined('_JEXEC') or die; ?> <div id="k2ModuleBox<?php echo $module->id; ?>" class="k2LoginBlock<?php if ($params->get('moduleclass_sfx')) echo ' '.$params->get('moduleclass_sfx'); ?>"> <form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure')); ?>" method="post" name="login" id="form-login"> <?php if ($params->get('pretext')): ?> <p class="preText"><?php echo $params->get('pretext'); ?></p> <?php endif; ?> <fieldset class="input"> <p id="form-login-username"> <label for="modlgn_username"><?php echo JText::_('K2_USERNAME') ?></label> <input id="modlgn_username" type="text" name="username" class="inputbox" size="18" /> </p> <p id="form-login-password"> <label for="modlgn_passwd"><?php echo JText::_('K2_PASSWORD') ?></label> <input id="modlgn_passwd" type="password" name="<?php echo $passwordFieldName; ?>" class="inputbox" size="18" /> </p> <?php if (JPluginHelper::isEnabled('system', 'remember')): ?> <p id="form-login-remember"> <label for="modlgn_remember"><?php echo JText::_('K2_REMEMBER_ME') ?></label> <input id="modlgn_remember" type="checkbox" name="remember" class="inputbox" value="yes" /> </p> <?php endif; ?> <input type="submit" name="Submit" class="button" value="<?php echo JText::_('K2_LOGIN') ?>" /> </fieldset> <ul> <li><a href="<?php echo $resetLink; ?>"><?php echo JText::_('K2_FORGOT_YOUR_PASSWORD'); ?></a></li> <li><a href="<?php echo $remindLink ?>"><?php echo JText::_('K2_FORGOT_YOUR_USERNAME'); ?></a></li> <?php if ($usersConfig->get('allowUserRegistration')): ?> <li><a href="<?php echo $registrationLink; ?>"><?php echo JText::_('K2_CREATE_AN_ACCOUNT'); ?></a></li> <?php endif; ?> </ul> <?php if ($params->get('posttext')): ?> <p class="postText"><?php echo $params->get('posttext'); ?></p> <?php endif; ?> <input type="hidden" name="option" value="<?php echo $option; ?>" /> <input type="hidden" name="task" value="<?php echo $task; ?>" /> <input type="hidden" name="return" value="<?php echo $return; ?>" /> <?php echo JHTML::_('form.token'); ?> </form> </div> helper.php 0000705 00000014515 15242037135 0006542 0 ustar 00 <?php /** * @version 2.11 (rolling release) * @package K2 * @author JoomlaWorks https://www.joomlaworks.net * @copyright Copyright (c) 2009 - 2024 JoomlaWorks Ltd. All rights reserved. * @license GNU/GPL: https://gnu.org/licenses/gpl.html */ // no direct access defined('_JEXEC') or die; JLoader::register('K2HelperRoute', JPATH_SITE.'/components/com_k2/helpers/route.php'); JLoader::register('K2HelperUtilities', JPATH_SITE.'/components/com_k2/helpers/utilities.php'); class modK2UserHelper { public static function getReturnURL($params, $type) { if ($itemid = $params->get($type)) { $app = JFactory::getApplication(); $menu = $app->getMenu(); $item = $menu->getItem($itemid); if (K2_JVERSION != '15') { $url = 'index.php?Itemid=' . $item->id; } else { $url = JRoute::_($item->link.'&Itemid='.$itemid, false); } } else { // stay on the same page $uri = JFactory::getURI(); $url = $uri->toString(array('path', 'query', 'fragment')); } return base64_encode($url); } public static function getType() { $user = JFactory::getUser(); return (!$user->get('guest')) ? 'logout' : 'login'; } public static function getProfile(&$params) { $user = JFactory::getUser(); $db = JFactory::getDbo(); $query = "SELECT * FROM #__k2_users WHERE userID=".(int)$user->id; $db->setQuery($query, 0, 1); $profile = $db->loadObject(); if ($profile) { if ($profile->image != '') { $profile->avatar = JURI::root().'media/k2/users/'.$profile->image; } require_once(JPATH_SITE.'/components/com_k2/helpers/permissions.php'); if (JRequest::getCmd('option') != 'com_k2') { K2HelperPermissions::setPermissions(); } if (K2HelperPermissions::canAddItem()) { $profile->addLink = JRoute::_('index.php?option=com_k2&view=item&task=add&tmpl=component&template=system&context=modalselector'); } return $profile; } } public static function countUserComments($userID) { $db = JFactory::getDbo(); $query = "SELECT COUNT(*) FROM #__k2_comments WHERE userID=".(int)$userID." AND published=1"; $db->setQuery($query); $result = $db->loadResult(); return $result; } public static function getMenu($params) { $items = array(); $children = array(); if ($params->get('menu')) { $app = JFactory::getApplication(); $menu = $app->getMenu(); $items = $menu->getItems('menutype', $params->get('menu')); } foreach ($items as $item) { if (K2_JVERSION != '15') { $item->name = $item->title; $item->parent = $item->parent_id; } $index = $item->parent; $list = @$children[$index] ? $children[$index] : array(); array_push($list, $item); $children[$index] = $list; } if (K2_JVERSION != '15') { $items = JHTML::_('menu.treerecurse', 1, '', array(), $children, 9999, 0, 0); } else { $items = JHTML::_('menu.treerecurse', 0, '', array(), $children, 9999, 0, 0); } $links = array(); foreach ($items as $item) { if (K2_JVERSION == '15') { $item->level = $item->sublevel; switch ($item->type) { case 'separator': continue 2; break; case 'url': if ((strpos($item->link, 'index.php?') === 0) && (strpos($item->link, 'Itemid=') === false)) { $item->url = $item->link.'&Itemid='.$item->id; } else { $item->url = $item->link; } break; default: $router = JSite::getRouter(); $item->url = $router->getMode() == JROUTER_MODE_SEF ? 'index.php?Itemid='.$item->id : $item->link.'&Itemid='.$item->id; break; } $iParams = class_exists('JParameter') ? new JParameter($item->params) : new JRegistry($item->params); $iSecure = $iParams->def('secure', 0); if ($item->home == 1) { $item->url = JURI::base(); } elseif (strcasecmp(substr($item->url, 0, 4), 'http') && (strpos($item->link, 'index.php?') !== false)) { $item->url = JRoute::_($item->url, true, $iSecure); } else { $item->url = str_replace('&', '&', $item->url); } $item->route = $item->url; } else { $item->flink = $item->link; switch ($item->type) { case 'separator': continue 2; case 'url': if ((strpos($item->link, 'index.php?') === 0) && (strpos($item->link, 'Itemid=') === false)) { $item->flink = $item->link.'&Itemid='.$item->id; } break; case 'alias': $item->flink = 'index.php?Itemid='.$item->params->get('aliasoptions'); break; default: $router = JSite::getRouter(); if ($router->getMode() == JROUTER_MODE_SEF) { $item->flink = 'index.php?Itemid='.$item->id; } else { $item->flink .= '&Itemid='.$item->id; } break; } if (strcasecmp(substr($item->flink, 0, 4), 'http') && (strpos($item->flink, 'index.php?') !== false)) { $item->flink = JRoute::_($item->flink, true, $item->params->get('secure')); } else { $item->flink = JRoute::_($item->flink); } $item->route = $item->flink; } $links[] = $item; } return $links; } } index.html 0000705 00000000054 15242037135 0006540 0 ustar 00 <html><body bgcolor="#FFFFFF"></body></html>