first commit

This commit is contained in:
alazhar
2020-01-02 22:20:31 +07:00
commit 10eb3340ad
5753 changed files with 631345 additions and 0 deletions

View File

@ -0,0 +1,78 @@
<?php
/**
* @version $Id: default.php 1812 2013-01-14 18:45:06Z lefteris.kavadas $
* @package K2
* @author JoomlaWorks http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
defined('_JEXEC') or die;
?>
<form action="index.php" enctype="multipart/form-data" method="post" name="adminForm" id="adminForm">
<table class="admintable table">
<tr>
<td class="key"><?php echo JText::_('K2_NAME'); ?></td>
<td><?php echo $this->row->name; ?></td>
</tr>
<tr>
<td class="key"><?php echo JText::_('K2_GENDER'); ?></td>
<td><fieldset class="k2RadioButtonContainer"><?php echo $this->lists['gender']; ?></fieldset></td>
</tr>
<tr>
<td class="key"><?php echo JText::_('K2_USER_GROUP'); ?></td>
<td><?php echo $this->lists['userGroup']; ?></td>
</tr>
<tr>
<td class="key"><?php echo JText::_('K2_DESCRIPTION'); ?></td>
<td>
<div class="k2ItemFormEditor">
<?php echo $this->editor; ?>
<div class="dummyHeight"></div>
<div class="clr"></div>
</div>
</td>
</tr>
<tr>
<td class="key"><?php echo JText::_('K2_USER_IMAGE_AVATAR'); ?></td>
<td>
<input type="file" name="image" />
<?php if($this->row->image): ?>
<img class="k2AdminImage" src="<?php echo JURI::root().'media/k2/users/'.$this->row->image; ?>" alt="<?php echo $this->row->name; ?>" />
<input type="checkbox" name="del_image" id="del_image" />
<label for="del_image"><?php echo JText::_('K2_CHECK_THIS_BOX_TO_DELETE_CURRENT_IMAGE_OR_JUST_UPLOAD_A_NEW_IMAGE_TO_REPLACE_THE_EXISTING_ONE'); ?></label>
<?php endif; ?></td>
</tr>
<tr>
<td class="key"><?php echo JText::_('K2_URL'); ?></td>
<td><input type="text" size="50" value="<?php echo $this->row->url; ?>" name="url" /></td>
</tr>
<tr>
<td class="key"><?php echo JText::_('K2_NOTES'); ?></td>
<td><textarea name="notes" cols="60" rows="5"><?php echo $this->row->notes; ?></textarea></td>
</tr>
</table>
<?php if(count(array_filter($this->K2Plugins))): ?>
<?php foreach ($this->K2Plugins as $K2Plugin): ?>
<?php if(!is_null($K2Plugin)): ?>
<fieldset class="adminform">
<legend><?php echo $K2Plugin->name; ?></legend>
<?php echo $K2Plugin->fields; ?>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>
<input type="hidden" name="id" value="<?php echo $this->row->id; ?>" />
<input type="hidden" name="option" value="com_k2" />
<input type="hidden" name="view" value="user" />
<input type="hidden" name="task" value="<?php echo JRequest::getVar('task'); ?>" />
<input type="hidden" name="userID" value="<?php echo $this->row->userID; ?>" />
<input type="hidden" name="ip" value="<?php echo $this->row->ip; ?>" />
<input type="hidden" name="hostname" value="<?php echo $this->row->hostname; ?>" />
<?php echo JHTML::_('form.token'); ?>
</form>

View File

@ -0,0 +1,80 @@
<?php
/**
* @version $Id: view.html.php 1812 2013-01-14 18:45:06Z lefteris.kavadas $
* @package K2
* @author JoomlaWorks http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
defined('_JEXEC') or die;
jimport('joomla.application.component.view');
class K2ViewUser extends K2View
{
function display($tpl = null)
{
JRequest::setVar('hidemainmenu', 1);
$model = $this->getModel();
$user = $model->getData();
if (K2_JVERSION == '15')
{
JFilterOutput::objectHTMLSafe($user);
}
else
{
JFilterOutput::objectHTMLSafe($user, ENT_QUOTES, array('params', 'plugins'));
}
$joomlaUser = JUser::getInstance(JRequest::getInt('cid'));
$user->name = $joomlaUser->name;
$user->userID = $joomlaUser->id;
$this->assignRef('row', $user);
$wysiwyg = JFactory::getEditor();
$editor = $wysiwyg->display('description', $user->description, '480px', '250px', '', '', false);
$this->assignRef('editor', $editor);
$lists = array();
$genderOptions[] = JHTML::_('select.option', 'm', JText::_('K2_MALE'));
$genderOptions[] = JHTML::_('select.option', 'f', JText::_('K2_FEMALE'));
$lists['gender'] = JHTML::_('select.radiolist', $genderOptions, 'gender', '', 'value', 'text', $user->gender);
$userGroupOptions = $model->getUserGroups();
$lists['userGroup'] = JHTML::_('select.genericlist', $userGroupOptions, 'group', 'class="inputbox"', 'id', 'name', $user->group);
$this->assignRef('lists', $lists);
$params = JComponentHelper::getParams('com_k2');
$this->assignRef('params', $params);
JPluginHelper::importPlugin('k2');
$dispatcher = JDispatcher::getInstance();
$K2Plugins = $dispatcher->trigger('onRenderAdminForm', array(&$user, 'user'));
$this->assignRef('K2Plugins', $K2Plugins);
JToolBarHelper::title(JText::_('K2_USER'), 'k2.png');
JToolBarHelper::save();
JToolBarHelper::apply();
JToolBarHelper::cancel();
$toolbar = JToolBar::getInstance('toolbar');
if (K2_JVERSION != '15')
{
$buttonUrl = JURI::base().'index.php?option=com_users&view=user&task=user.edit&id='.$user->userID;
}
else
{
$buttonUrl = JURI::base().'index.php?option=com_users&view=user&task=edit&cid[]='.$user->userID;
}
$buttonText = JText::_('K2_EDIT_JOOMLA_USER');
$button = '<a target="_blank" href="'.$buttonUrl.'"><span class="icon-32-edit" title="'.$buttonText.'"></span>'.$buttonText.'</a>';
$toolbar->prependButton('Custom', $button);
parent::display($tpl);
}
}