- md5
- 8552430e451f56bf9d5502e1b0486dcd
- sha1
- 14a0a03b19dc8bfe6a22ad32bd37b986fe42553f
- sha256
- f73a0526143e19a14c28badd8eb89b62775f6510cad81d3f2e709de9fe620d7f
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
<?php
/**
* @version $Id: admin.poll.html.php 5950 2006-12-06 22:42:31Z facedancer $
* @package Joomla
* @subpackage Polls
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html 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( '_VALID_MOS' ) or die( 'Restricted access' );
/**
* @package Joomla
* @subpackage Polls
*/
class HTML_poll {
function showPolls( &$rows, &$pageNav, $option ) {
global $my;
mosCommonHTML::loadOverlib();
?>
<form action="index2.php" method="post" name="adminForm">
<table class="adminheading">
<tr>
<th>Poll Manager</th>
</tr>
</table>
<table class="adminlist">
<tr>
<th width="5">
#
</th>
<th width="20">
<input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count( $rows ); ?>);" />
</th>
<th align="left">
Poll Title
</th>
<th width="10%" align="center">
Published
</th>
<th width="10%" align="center">
Options
</th>
<th width="10%" align="center">
Lag
</th>
</tr>
<?php
$k = 0;
for ($i=0, $n=count( $rows ); $i < $n; $i++) {
$row = &$rows[$i];
mosMakeHtmlSafe($row);
$link = 'index2.php?option=com_poll&task=editA&hidemainmenu=1&id='. $row->id;
$task = $row->published ? 'unpublish' : 'publish';
$img = $row->published ? 'publish_g.png' : 'publish_x.png';
$alt = $row->published ? 'Published' : 'Unpublished';
$checked = mosCommonHTML::CheckedOutProcessing( $row, $i );
?>
<tr class="<?php echo "row$k"; ?>">
<td>
<?php echo $pageNav->rowNumber( $i ); ?>
</td>
<td>
<?php echo $checked; ?>
</td>
<td>
<a href="<?php echo $link; ?>" title="Edit Poll">
<?php echo $row->title; ?>
</a>
</td>
<td align="center">
<a href="javascript: void(0);" onclick="return listItemTask('cb<?php echo $i;?>','<?php echo $task;?>')">
<img src="images/<?php echo $img;?>" width="12" height="12" border="0" alt="<?php echo $alt; ?>" />
</a>
</td>
<td align="center">
<?php echo $row->numoptions; ?>
</td>
<td align="center">
<?php echo $row->lag; ?>
</td>
</tr>
<?php
$k = 1 - $k;
}
?>
</table>
<?php echo $pageNav->getListFooter(); ?>
<input type="hidden" name="option" value="<?php echo $option;?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="hidemainmenu" value="0">
</form>
<?php
}
function editPoll( &$row, &$options, &$lists ) {
mosMakeHtmlSafe( $row, ENT_QUOTES );
?>
<script language="javascript" type="text/javascript">
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'cancel') {
submitform( pressbutton );
return;
}
// do field validation
if (form.title.value == "") {
alert( "Poll must have a title" );
} else if( isNaN( parseInt( form.lag.value ) ) ) {
alert( "Poll must have a non-zero lag time" );
//} else if (form.menu.options.value == ""){
// alert( "Poll must have pages." );
//} else if (form.adminForm.textfieldcheck.value == 0){
// alert( "Poll must have options." );
} else {
submitform( pressbutton );
}
}
</script>
<form action="index2.php" method="post" name="adminForm">
<table class="adminheading">
<tr>
<th>
Poll:
<small>
<?php echo $row->id ? 'Edit' : 'New';?>
</small>
</th>
</tr>
</table>
<table class="adminform">
<tr>
<th colspan="4">
Details
</th>
</tr>
<tr>
<td width="10%">
Title:
</td>
<td>
<input class="inputbox" type="text" name="title" size="60" value="<?php echo $row->title; ?>" />
</td>
<td width="20px">
</td>
<td width="100%" rowspan="20" valign="top">
Show on menu items:
<br />
<?php echo $lists['select']; ?>
</td>
</tr>
<tr>
<td>
Lag:
</td>
<td>
<input class="inputbox" type="text" name="lag" size="10" value="<?php echo $row->lag; ?>" /> (seconds between votes)
</td>
</tr>
<tr>
<td valign="top">
Published:
</td>
<td>
<?php echo $lists['published']; ?>
</td>
</tr>
<tr>
<td colspan="3">
Options:
</td>
</tr>
<?php
for ($i=0, $n=count( $options ); $i < $n; $i++ ) {
?>
<tr>
<td>
<?php echo ($i+1); ?>
</td>
<td>
<input class="inputbox" type="text" name="polloption[<?php echo $options[$i]->id; ?>]" value="<?php echo htmlspecialchars( stripslashes($options[$i]->text) ); ?>" size="60" />
</td>
</tr>
<?php
}
for (; $i < 12; $i++) {
?>
<tr>
<td>
<?php echo ($i+1); ?>
</td>
<td>
<input class="inputbox" type="text" name="polloption[]" value="" size="60"/>
</td>
</tr>
<?php
}
?>
</table>
<input type="hidden" name="task" value="">
<input type="hidden" name="option" value="com_poll" />
<input type="hidden" name="id" value="<?php echo $row->id; ?>" />
<input type="hidden" name="textfieldcheck" value="<?php echo $n; ?>" />
</form>
<?php
}
}
?>
No other release has this exact content. See every version of this file.