function ListView($formData, $header, $data, $pageNav, $returnTask = '', $filters = null, $info = null, $showProgressBar = false) { global $mainframe, $jTips, $jLang; if ($showProgressBar) { $slidercode = "<script type='text/javascript'>window.addEvent('domready', function() {slider = new Fx.Slide('progressbar', {duration: 500});slider.hide();});</script>"; ?> <div class="progress" id="progressbar"> <span><img src="components/com_jtips/images/saving.gif" border="0" alt="<?php echo $jLang['_ADMIN_AJAX_PROCESSING']; ?> " /><br /> <?php echo $jLang['_ADMIN_AJAX_PROCESSING']; ?> </span> </div> <?php //BUG 258 - The javascript in J1.0 must be echoed after the DOM element if (isJoomla15()) { $mainframe->addCustomHeadTag($slidercode); } else { print $slidercode; } } ?> <form action='index2.php' method='post' name='adminForm' id="adminForm" enctype="multipart/form-data"> <input type="hidden" name="filter_order" value="<?php echo jTipsGetParam($_REQUEST, 'filter_order'); ?> " /> <input type="hidden" name="filter_order_Dir" value="<?php echo jTipsGetParam($_REQUEST, 'filter_order_Dir'); ?> " /> <input type='hidden' name='option' value='<?php echo jTipsGetParam($_REQUEST, 'option', 'com_jtips'); ?> '> <input type='hidden' name='task' value='<?php echo jTipsGetParam($_REQUEST, 'task', $returnTask); ?> '> <input type='hidden' name='module' value='<?php echo jTipsGetParam($_REQUEST, 'module', ''); ?> '> <input type='hidden' name='hidemainmenu' id="hidemainmenu" value=""> <input type='hidden' name='boxchecked' value='0'> <input type="hidden" name="<?php echo jTipsSpoofValue(); ?> " value="1" /> <?php if (isJoomla15()) { if (!isset($formData['icon']) or empty($formData['icon'])) { $formData['icon'] = 'generic'; } JToolBarHelper::title($formData['title'], $formData['icon']); } else { ?> <table class='adminheading' width="100%"> <tbody> <tr> <th valign="top" align="left" class="edit" nowrap><?php echo $formData['title']; ?> </th> </tr> </tbody> </table> <?php } if (is_array($filters) or !is_null($info)) { ?> <table width="100%" class="adminform"> <tbody><tr><td width="100%"> <?php echo $info; if (is_array($filters) and !empty($filters)) { ?> </td><td nowrap> <?php foreach ($filters as $label => $formField) { echo $formField; } } ?> </td></tr></tbody> <?php } if (!is_null($info) and false) { ?> <tfoot> <tr> <td colspan="<?php echo count($filters) + 1; ?> "><?php echo $info; ?> </td> </tr> </tfoot> <?php } ?> </table> <table class='adminlist'> <thead> <tr> <?php $hasIntCol = false; foreach ($header as $label) { if ($label == '' and !$hasIntCol) { ?> <th align='center' width='1'>#</th><?php $hasIntCol = true; } if ($label == '' and $hasIntCol) { ?> <th align='center' width='5'><input type="checkbox" name="toggle" onClick="checkAll(<?php echo count($data); ?> );" /></th><?php } else { ?> <th><?php echo $label; ?> </th> <?php } } ?> </tr> </thead> <tbody> <?php $i = 0; foreach ($data as $id => $row) { ?> <tr class="row<?php echo $i % 2; ?> "> <?php if ($header[0] == '') { ?> <td width='1'><?php echo $i + 1; ?> </td> <td width="5"><?php echo jTipsHTML::idBox($i, $id); ?> </td> <?php } foreach ($row as $cell) { if (is_numeric($cell)) { $align = "center"; } else { $align = "left"; } ?> <td align="<?php echo $align; ?> "><?php echo jTipsStripslashes($cell); ?> </td> <?php } //BUG 264 - When no checkbox is shown, the row number is never increased, so the style never changes $i++; ?> </tr> <?php } ?> </tbody> <?php if (isJoomla15() and !is_null($pageNav)) { // BUG 400 - colspan changed to be calculated rather than fixed at 50, caused display errors in IE ?> <tfoot> <tr> <td colspan="<?php echo count($header) + 1; ?> "><?php echo $pageNav->getListFooter(); ?> </td> </tr> </tfoot> <?php } ?> </table><?php if (!isJoomla15() and !is_null($pageNav)) { echo $pageNav->getListFooter(); } ?> </form> <?php }
function display() { global $jTips, $jLang; if (isJoomla15()) { JToolBarHelper::title($this->formData['title'], 'user'); } else { ?> <table class='adminheading'> <tr> <th><?php echo $this->formData['title']; ?> </th> </tr> </table> <?php } ?> <script type='text/javascript'> function submitbutton(pressbutton) { if (pressbutton != 'list') { //are any users selected? if(document.adminForm.boxchecked.value==0) { alert('<?php echo $jLang['_ADMIN_USER_NEW_NO_SELECTION']; ?> '); return; } //is a season selected? if ($('season_id').value == '') { alert("<?php echo $jLang['_ADMIN_SEASON_SELECT_ALERT']; ?> "); return; } } submitform(pressbutton); } </script> <form action='index2.php' name='adminForm' id='adminForm' method='post'> <input type="hidden" name="task" value="edit" /> <input type="hidden" name="option" value="com_jtips" /> <input type="hidden" name="module" value="Users" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="filter_order" value="<?php echo jTipsGetParam($_REQUEST, 'filter_order'); ?> " /> <input type="hidden" name="filter_order_Dir" value="<?php echo jTipsGetParam($_REQUEST, 'filter_order_Dir'); ?> " /> <input type="hidden" name="<?php echo jTipsSpoofValue(); ?> " value="1" /> <table class="adminform"> <?php foreach ($this->selectLists as $label => $list) { ?> <tr> <td width="20%"><?php echo $label; ?> : </td> <td><?php echo $list; ?> </td> <td> </td> </tr> <?php } ?> </table> <table class="adminlist"> <thead> <tr> <th align='center' width='1'>#</th> <th align="center" width='20'><input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count($this->users); ?> );" /></th> <th><a href="javascript:tableOrdering('name', '<?php echo $this->nextDir; ?> ', 'edit');"><?php echo $jLang['_ADMIN_USERS_FULLNAME']; ?> </a></th> <th><a href="javascript:tableOrdering('username', '<?php echo $this->nextDir; ?> ', 'edit');"><?php echo $jLang['_ADMIN_USERS_USERNAME']; ?> </a></th> <th><a href="javascript:tableOrdering('email', '<?php echo $this->nextDir; ?> ', 'edit');"><?php echo $jLang['_ADMIN_USERS_EMAIL']; ?> </a></th> </tr> </thead> <tbody> <?php $i = 0; foreach ($this->users as $user) { ?> <tr class="row<?php echo $i % 2; ?> "> <td align="center"><?php echo $i + 1; ?> </td> <td align="center"><?php echo jTipsHTML::idBox($i, $user->id); ?> </td> <td><label for="cb<?php echo $i; ?> "><?php echo $user->name; ?> </label></td> <td><?php echo $user->username; ?> </td> <td><a href="mailto:<?php echo $user->email; ?> "><?php echo $user->email; ?> </a></td> </tr> <?php $i++; } ?> </tbody> <?php if (isJoomla15()) { ?> <tfoot> <tr> <td colspan="50"><?php echo $this->pageNav->getListFooter(); ?> </td> </tr> </tfoot> <?php } ?> </table> <?php if (!isJoomla15()) { echo $this->pageNav->getListFooter(); } ?> </form> <?php }