WebGUI 3.0.3 release

This commit is contained in:
JT Smith 2002-01-25 01:56:00 +00:00
parent 2845282544
commit d1c1445ea1
8 changed files with 27 additions and 13 deletions

View file

@ -233,9 +233,10 @@ sub www_view {
#-------------------------------------------------------------------
sub www_vote {
my ($voteGroup);
my ($voteGroup,$hasVoted);
($voteGroup) = WebGUI::SQL->quickArray("select voteGroup from Poll where widgetId='$session{form}{wid}'");
if (WebGUI::Privilege::isInGroup($voteGroup,$session{user}{userId})) {
($hasVoted) = WebGUI::SQL->quickArray("select count(*) from Poll_answer where widgetId=$session{form}{wid} and ((userId=$session{user}{userId} and userId<>1) or (userId=1 and ipAddress='$session{env}{REMOTE_ADDR}'))");
if (WebGUI::Privilege::isInGroup($voteGroup,$session{user}{userId}) && !($hasVoted)) {
WebGUI::SQL->write("insert into Poll_answer values ($session{form}{wid}, '$session{form}{answer}', $session{user}{userId}, '$session{env}{REMOTE_ADDR}')");
}
return "";

View file

@ -91,7 +91,7 @@ sub www_add {
$output .= tableFormRow(WebGUI::International::get(4,$namespace),WebGUI::Form::text("depth",20,2,0));
$output .= tableFormRow(WebGUI::International::get(6,$namespace),WebGUI::Form::text("indent",20,2,5));
$output .= tableFormRow(WebGUI::International::get(7,$namespace),WebGUI::Form::text("bullet",20,30,'&middot;'));
$output .= tableFormRow(WebGUI::International::get(8,$namespace),WebGUI::Form::text("bullet",20,1,1));
$output .= tableFormRow(WebGUI::International::get(8,$namespace),WebGUI::Form::text("lineSpacing",20,1,1));
$output .= formSave();
$output .= '</table></form>';
return $output;