Joomla!除了具有新闻/文章管理
源代码在线查看: admin.contact.html.php
/** * @version $Id: admin.contact.html.php 10559 2008-07-16 20:57:43Z instance $ * @package Joomla * @subpackage Contact * @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved. * @license GNU/GPL, see LICENSE.php * Joomla! is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * See COPYRIGHT.php for copyright notices and details. */ // no direct access defined( '_JEXEC' ) or die( 'Restricted access' ); /** * @package Joomla * @subpackage Contact */ class HTML_contact { function showContacts( &$rows, &$pageNav, $option, &$lists ) { $user =& JFactory::getUser(); //Ordering allowed ? $ordering = ($lists['order'] == 'cd.ordering'); JHTML::_('behavior.tooltip'); ?> : echo $lists['catid']; echo $lists['state']; ?> $k = 0; for ($i=0, $n=count($rows); $i < $n; $i++) { $row = $rows[$i]; $link = JRoute::_( 'index.php?option=com_contact&task=edit&cid[]='. $row->id ); $checked = JHTML::_('grid.checkedout', $row, $i ); $access = JHTML::_('grid.access', $row, $i ); $published = JHTML::_('grid.published', $row, $i ); $row->cat_link = JRoute::_( 'index.php?option=com_categories§ion=com_contact_details&task=edit&type=other&cid[]='. $row->catid ); $row->user_link = JRoute::_( 'index.php?option=com_users&task=editA&cid[]='. $row->user_id ); ?> if (JTable::isCheckedOut($user->get ('id'), $row->checked_out )) : echo $row->name; else : ?> endif; ?> $k = 1 - $k; } ?> } function editContact( &$row, &$lists, $option, &$params ) { JRequest::setVar( 'hidemainmenu', 1 ); if ($row->image == '') { $row->image = 'blank.png'; } JHTML::_('behavior.tooltip'); jimport('joomla.html.pane'); // TODO: allowAllClose should default true in J!1.6, so remove the array when it does. $pane = &JPane::getInstance('sliders', array('allowAllClose' => true)); JFilterOutput::objectHTMLSafe( $row, ENT_QUOTES, 'misc' ); $cparams = JComponentHelper::getParams ('com_media'); ?> function submitbutton(pressbutton) { var form = document.adminForm; if (pressbutton == 'cancel') { submitform( pressbutton ); return; } // do field validation if ( form.name.value == "" ) { alert( "" ); } else if ( form.catid.value == 0 ) { alert( "" ); } else { submitform( pressbutton ); } } //--> : : : : : : : if ($row->id) { ?> : } ?> : : : : : : : : : : : : : if (document.forms.adminForm.image.options.value!=''){ jsimg='..//' + getSelectedValue( 'adminForm', 'image' ); } else { jsimg='../images/M_images/blank.png'; } document.write(' echo $pane->startPane("menu-pane"); echo $pane->startPanel(JText :: _('Contact Parameters'), "param-page"); echo $params->render(); echo $pane->endPanel(); echo $pane->startPanel(JText :: _('Advanced Parameters'), "param-page"); echo $params->render('params', 'advanced'); echo $pane->endPanel(); echo $pane->startPanel(JText :: _('E-mail Parameters'), "param-page"); echo $params->render('params', 'email'); echo $pane->endPanel(); echo $pane->endPane(); ?> } }