[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: polls admin.php,1.16.2.1,1.16.2.2 admin_addanswe
From: |
Dave Hall <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: polls admin.php,1.16.2.1,1.16.2.2 admin_addanswer.php,1.14.2.1,1.14.2.2 admin_editanswer.php,1.6,1.6.2.1 |
Date: |
Fri, 22 Nov 2002 20:24:12 -0500 |
Update of /cvsroot/phpgroupware/polls
In directory subversions:/tmp/cvs-serv24586
Modified Files:
Tag: Version-0_9_14-branch
admin.php admin_addanswer.php admin_editanswer.php
Log Message:
fixing the broken fix and a few other bugs
Index: admin.php
===================================================================
RCS file: /cvsroot/phpgroupware/polls/admin.php,v
retrieving revision 1.16.2.1
retrieving revision 1.16.2.2
diff -C2 -r1.16.2.1 -r1.16.2.2
*** admin.php 15 Nov 2002 17:26:52 -0000 1.16.2.1
--- admin.php 23 Nov 2002 01:24:09 -0000 1.16.2.2
***************
*** 88,92 ****
$GLOBALS['phpgw']->template->set_var('row_answer',stripslashes($GLOBALS['phpgw']->db->f('option_text')));
$GLOBALS['phpgw']->template->set_var('row_title',stripslashes($GLOBALS['phpgw']->db->f('poll_title')));
! $GLOBALS['phpgw']->template->set_var('row_edit','<a
href="' . $GLOBALS['phpgw']->link('/polls/admin_editanswer.php','vote_id=' .
$GLOBALS['phpgw']->db->f('vote_id')) . '">' . lang('Edit') . '</a>');
$GLOBALS['phpgw']->template->set_var('row_delete','<a
href="' . $GLOBALS['phpgw']->link('/polls/admin_deleteanswer.php','vote_id=' .
$GLOBALS['phpgw']->db->f('vote_id')) . '">' . lang('Delete') . '</a>');
}
--- 88,95 ----
$GLOBALS['phpgw']->template->set_var('row_answer',stripslashes($GLOBALS['phpgw']->db->f('option_text')));
$GLOBALS['phpgw']->template->set_var('row_title',stripslashes($GLOBALS['phpgw']->db->f('poll_title')));
! $GLOBALS['phpgw']->template->set_var('row_edit','<a
href="' . $GLOBALS['phpgw']->link('/polls/admin_editanswer.php',
!
array
('vote_id' => $GLOBALS['phpgw']->db->f('vote_id'),
!
'poll_id' => $GLOBALS['phpgw']->db->f('poll_id')
!
) )
.'">' . lang('Edit') . '</a>');
$GLOBALS['phpgw']->template->set_var('row_delete','<a
href="' . $GLOBALS['phpgw']->link('/polls/admin_deleteanswer.php','vote_id=' .
$GLOBALS['phpgw']->db->f('vote_id')) . '">' . lang('Delete') . '</a>');
}
Index: admin_addanswer.php
===================================================================
RCS file: /cvsroot/phpgroupware/polls/admin_addanswer.php,v
retrieving revision 1.14.2.1
retrieving revision 1.14.2.2
diff -C2 -r1.14.2.1 -r1.14.2.2
*** admin_addanswer.php 15 Nov 2002 17:26:52 -0000 1.14.2.1
--- admin_addanswer.php 23 Nov 2002 01:24:09 -0000 1.14.2.2
***************
*** 25,33 ****
$GLOBALS['phpgw']->template->set_block('admin','row','row');
! if($POST['submit'])
{
! $poll_id = $HTTP_POST_VARS['poll_Id'];
$answer = $HTTP_POST_VARS['answer'];
! $vote_id = $HTTP_POST_VARS['vote_Id'];
$GLOBALS['phpgw']->db->query("select max(vote_id)+1 from
phpgw_polls_data where poll_id='$poll_id'",__LINE__,__FILE__);
--- 25,33 ----
$GLOBALS['phpgw']->template->set_block('admin','row','row');
! if($HTTP_POST_VARS['submit'])
{
! $poll_id = $HTTP_POST_VARS['poll_id'];
$answer = $HTTP_POST_VARS['answer'];
! $vote_id = $HTTP_POST_VARS['vote_id'];
$GLOBALS['phpgw']->db->query("select max(vote_id)+1 from
phpgw_polls_data where poll_id='$poll_id'",__LINE__,__FILE__);
Index: admin_editanswer.php
===================================================================
RCS file: /cvsroot/phpgroupware/polls/admin_editanswer.php,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -C2 -r1.6 -r1.6.2.1
*** admin_editanswer.php 21 Dec 2001 14:59:46 -0000 1.6
--- admin_editanswer.php 23 Nov 2002 01:24:09 -0000 1.6.2.1
***************
*** 1,70 ****
! <?php
! /**************************************************************************\
! * phpGroupWare - Polls *
! * http://www.phpgroupware.org *
! * -------------------------------------------- *
! * This program is free software; you can redistribute it and/or modify it *
! * under the terms of the GNU General Public License as published by the *
! * Free Software Foundation; either version 2 of the License, or (at your *
! * option) any later version. *
! \**************************************************************************/
!
! /* $Id$ */
!
! $phpgw_info = array();
! $GLOBALS['phpgw_info']['flags'] = array(
! 'admin_only' => True,
! 'currentapp' => 'polls',
! 'enable_nextmatchs_class' => True,
! 'admin_header' => True
! );
! include('../header.inc.php');
!
! $GLOBALS['phpgw']->template->set_file(array('admin' =>
'admin_form.tpl'));
! $GLOBALS['phpgw']->template->set_block('admin','form','form');
! $GLOBALS['phpgw']->template->set_block('admin','row','row');
!
! if ($submit)
! {
! $GLOBALS['phpgw']->db->query("update phpgw_polls_data set
poll_id='$poll_id',option_text='"
! . addslashes($answer) . "' where
vote_id='$vote_id'",__LINE__,__FILE__);
! $GLOBALS['phpgw']->template->set_var('message',lang('Answer has
been updated'));
! }
! else
! {
! $GLOBALS['phpgw']->template->set_var('message','');
! }
!
! $GLOBALS['phpgw']->db->query("select * from phpgw_polls_data where
vote_id='$vote_id'");
! $GLOBALS['phpgw']->db->next_record();
! $answer_value = $GLOBALS['phpgw']->db->f('option_text');
! $poll_id = $GLOBALS['phpgw']->db->f('poll_id');
!
! $GLOBALS['phpgw']->template->set_var('header_message',lang('Edit
answer'));
! $GLOBALS['phpgw']->template->set_var('td_message',' ');
!
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
!
$GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/polls/admin_editanswer.php','vote_id='
. $vote_id));
! $GLOBALS['phpgw']->template->set_var('form_button_1','<input
type="submit" name="submit" value="' . lang('Edit') . '">');
! $GLOBALS['phpgw']->template->set_var('form_button_2','</form><form
method="POST" action="' .
$GLOBALS['phpgw']->link('/polls/admin.php','show=answers')
! . '"><input type="submit" name="submit" value="' .
lang('Cancel') . '">'
! );
!
! $poll_select = '<select name="poll_id">';
! $GLOBALS['phpgw']->db->query("select * from
phpgw_polls_desc",__LINE__,__FILE__);
! while ($GLOBALS['phpgw']->db->next_record())
! {
! $poll_select .= '<option value="' .
$GLOBALS['phpgw']->db->f('poll_id') . '"';
! if ($poll_id == $GLOBALS['phpgw']->db->f('poll_id'))
! {
! $poll_select .= ' selected';
! }
! $poll_select .= '>' . $GLOBALS['phpgw']->db->f('poll_title') .
'</option>';
! }
! $poll_select .= '</select>';
!
! add_template_row($p,lang('Which poll'),$poll_select);
! add_template_row($p,lang('Answer'),'<input name="answer" value="' .
$answer_value . '">');
!
! $GLOBALS['phpgw']->template->pparse('out','form');
! $GLOBALS['phpgw']->common->phpgw_footer();
! ?>
--- 1,70 ----
! <?php
! /**************************************************************************\
! * phpGroupWare - Polls *
! * http://www.phpgroupware.org *
! * -------------------------------------------- *
! * This program is free software; you can redistribute it and/or modify it *
! * under the terms of the GNU General Public License as published by the *
! * Free Software Foundation; either version 2 of the License, or (at your *
! * option) any later version. *
! \**************************************************************************/
!
! /* $Id$ */
!
! $phpgw_info = array();
! $GLOBALS['phpgw_info']['flags'] = array(
! 'admin_only' => True,
! 'currentapp' => 'polls',
! 'enable_nextmatchs_class' => True,
! 'admin_header' => True
! );
! include('../header.inc.php');
!
! $GLOBALS['phpgw']->template->set_file(array('admin' =>
'admin_form.tpl'));
! $GLOBALS['phpgw']->template->set_block('admin','form','form');
! $GLOBALS['phpgw']->template->set_block('admin','row','row');
!
! if ($submit)
! {
! $GLOBALS['phpgw']->db->query("update phpgw_polls_data set
poll_id='$poll_id',option_text='"
! . addslashes($answer) . "' where
vote_id='$vote_id'",__LINE__,__FILE__);
! $GLOBALS['phpgw']->template->set_var('message',lang('Answer has
been updated'));
! }
! else
! {
! $GLOBALS['phpgw']->template->set_var('message','');
! }
!
! $GLOBALS['phpgw']->db->query("select * from phpgw_polls_data where
vote_id=$vote_id AND poll_id=$poll_id");
! $GLOBALS['phpgw']->db->next_record();
! $answer_value = $GLOBALS['phpgw']->db->f('option_text');
! $poll_id = $GLOBALS['phpgw']->db->f('poll_id');
!
! $GLOBALS['phpgw']->template->set_var('header_message',lang('Edit
answer'));
! $GLOBALS['phpgw']->template->set_var('td_message',' ');
!
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
!
$GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/polls/admin_editanswer.php','vote_id='
. $vote_id));
! $GLOBALS['phpgw']->template->set_var('form_button_1','<input
type="submit" name="submit" value="' . lang('Edit') . '">');
! $GLOBALS['phpgw']->template->set_var('form_button_2','</form><form
method="POST" action="' .
$GLOBALS['phpgw']->link('/polls/admin.php','show=answers')
! . '"><input type="submit" name="submit" value="' .
lang('Cancel') . '">'
! );
!
! $poll_select = '<select name="poll_id">';
! $GLOBALS['phpgw']->db->query("select * from
phpgw_polls_desc",__LINE__,__FILE__);
! while ($GLOBALS['phpgw']->db->next_record())
! {
! $poll_select .= '<option value="' .
$GLOBALS['phpgw']->db->f('poll_id') . '"';
! if ($poll_id == $GLOBALS['phpgw']->db->f('poll_id'))
! {
! $poll_select .= ' selected';
! }
! $poll_select .= '>' . $GLOBALS['phpgw']->db->f('poll_title') .
'</option>';
! }
! $poll_select .= '</select>';
!
! add_template_row($GLOBALS['phpgw']->template,lang('Which
poll'),$poll_select);
! add_template_row($GLOBALS['phpgw']->template,lang('Answer'),'<input
name="answer" value="' . $answer_value . '">');
!
! $GLOBALS['phpgw']->template->pparse('out','form');
! $GLOBALS['phpgw']->common->phpgw_footer();
! ?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: polls admin.php,1.16.2.1,1.16.2.2 admin_addanswer.php,1.14.2.1,1.14.2.2 admin_editanswer.php,1.6,1.6.2.1,
Dave Hall <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: polls/inc functions.inc.php,1.11,1.11.2.1
- Next by Date:
[Phpgroupware-cvs] CVS: polls admin.php,1.16.2.2,1.16.2.3 admin_deleteanswer.php,1.6,1.6.2.1
- Previous by thread:
[Phpgroupware-cvs] CVS: polls/inc functions.inc.php,1.11,1.11.2.1
- Next by thread:
[Phpgroupware-cvs] CVS: polls admin.php,1.16.2.2,1.16.2.3 admin_deleteanswer.php,1.6,1.6.2.1
- Index(es):