Пример #1
0
function vote_show_release_radios($vote_on_id, $flag)
{
    /*
    	$flag
    	project - 1
    	release - 2
    	forum_message - 3
    	user - 4
    */
    //html_blankimage($height,$width)
    $rating = vote_get_rating($vote_on_id, $flag);
    if ($rating == 0) {
        $rating = '2.5';
    }
    $rating = 16 * vote_get_rating($vote_on_id, $flag) - 15;
    global $REQUEST_URI;
    ?>
	<FONT SIZE="-2">
	<FORM ACTION="/survey/rating_resp.php" METHOD="POST">
	<INPUT TYPE="HIDDEN" NAME="vote_on_id" VALUE="<?php 
    echo $vote_on_id;
    ?>
">
	<INPUT TYPE="HIDDEN" NAME="redirect_to" VALUE="<?php 
    echo urlencode($REQUEST_URI);
    ?>
">
	<INPUT TYPE="HIDDEN" NAME="flag" VALUE="<?php 
    echo $flag;
    ?>
">
	<CENTER>
	<?php 
    echo html_image("images/rateit.png", "100", "9", array());
    ?>
	<BR>
	<?php 
    echo html_blankimage(1, $rating);
    echo html_image("images/ic/caret.png", "9", "6", array());
    ?>
	<BR>
	<INPUT TYPE="RADIO" NAME="response" VALUE=1>
	<INPUT TYPE="RADIO" NAME="response" VALUE=2>
	<INPUT TYPE="RADIO" NAME="response" VALUE=3>
	<INPUT TYPE="RADIO" NAME="response" VALUE=4>
	<INPUT TYPE="RADIO" NAME="response" VALUE=5>
	<BR>
	<INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="Rate">
	</CENTER>
	</FORM>
	</FONT>
	<?php 
}
Пример #2
0
/**
 * vote_show_release_radios() - Show release radio buttons
 *
 * @param		int		Survey ID
 * @param		string	The rating type
 */
function vote_show_release_radios($vote_on_id, $flag)
{
    /*
    	$flag
    	project - 1
    	release - 2
    	forum_message - 3
    	user - 4
    */
    //html_blankimage($height,$width)
    $rating = vote_get_rating($vote_on_id, $flag);
    if ($rating == 0) {
        $rating = '2.5';
    }
    $rating = 16 * vote_get_rating($vote_on_id, $flag) - 15;
    ?>
	
	<form action="/survey/rating_resp.php" method="post">
	<input type="radio" name="vote_on_id" value="<?php 
    echo $vote_on_id;
    ?>
" />
	<input type="radio" name="redirect_to" value="<?php 
    echo urlencode(getStringFromServer('REQUEST_URI'));
    ?>
" />
	<input type="radio" name="flag" value="<?php 
    echo $flag;
    ?>
" />
	<div align="center">
	<?php 
    echo html_image("rateit.png", "100", "9", array());
    ?>
	<br />
	<?php 
    echo html_blankimage(1, $rating);
    echo html_image("ic/caret.png", "9", "6", array());
    ?>
	<br />
	<input type="radio" name="response" value="1" />
	<input type="radio" name="response" value="2" />
	<input type="radio" name="response" value="3" />
	<input type="radio" name="response" value="4" />
	<input type="radio" name="response" value="5" />
	<br />
	<input type="submit" name="submit" value="Rate" />
	</div>
	</form>
	
	<?php 
}