[davedina-commit] CVS: dad/htdocs/lib ratings_inexec.inc.php,1.9,1.10 ratings_overview.inc.php,1.1,1
Status: Pre-Alpha
Brought to you by:
thomasvs
From: Kristof De J. <sw...@us...> - 2003-02-09 17:51:19
|
Update of /cvsroot/davedina/dad/htdocs/lib In directory sc8-pr-cvs1:/tmp/cvs-serv10905 Modified Files: ratings_inexec.inc.php ratings_overview.inc.php Log Message: little bug in / 1000; fixed now Index: ratings_inexec.inc.php =================================================================== RCS file: /cvsroot/davedina/dad/htdocs/lib/ratings_inexec.inc.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ratings_inexec.inc.php 9 Feb 2003 17:16:26 -0000 1.9 --- ratings_inexec.inc.php 9 Feb 2003 17:51:15 -0000 1.10 *************** *** 58,61 **** header("location: ".$refresh.""); - ?> --- 58,60 ---- Index: ratings_overview.inc.php =================================================================== RCS file: /cvsroot/davedina/dad/htdocs/lib/ratings_overview.inc.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ratings_overview.inc.php 24 Jan 2003 18:40:49 -0000 1.1 --- ratings_overview.inc.php 9 Feb 2003 17:51:15 -0000 1.2 *************** *** 72,79 **** print "</TD>\n"; # FIXME: update scores to be ratings between 0 and 1 $lower = 0; $higher = 1000; ! if (!empty ($_POST["lower"])) { $lower = $_POST["lower"] / 1.0; } ! if (!empty ($_POST["higher"])) { $higher = $_POST["higher"] / 1.0; } print '<TD><INPUT name="lower" value="' . $lower . '" size=4>'; print '</INPUT></TD>'; --- 72,81 ---- print "</TD>\n"; # FIXME: update scores to be ratings between 0 and 1 + # 09/02/03 - Kris : deleted '/ 0.1' on line 77&78 ? -> ok ? + # : on line 89 && 99 $lower & $higer / 1000 -> ok ? $lower = 0; $higher = 1000; ! if (!empty ($_POST["lower"])) { $lower = $_POST["lower"]; } ! if (!empty ($_POST["higher"])) { $higher = $_POST["higher"]; } print '<TD><INPUT name="lower" value="' . $lower . '" size=4>'; print '</INPUT></TD>'; *************** *** 94,99 **** $query = "SELECT audio.audio_id,rate FROM score,audio WHERE score.audio_id = audio.audio_id AND cat_id = $cat_id "; if ($user_id != 0) { $query .= "AND user_id = $user_id "; } ! if (isset ($lower)) { $query .= "AND rate >= $lower "; } ! if (isset ($higher)) { $query .= "AND rate <= $higher "; } $daddb->query($query); --- 96,109 ---- $query = "SELECT audio.audio_id,rate FROM score,audio WHERE score.audio_id = audio.audio_id AND cat_id = $cat_id "; if ($user_id != 0) { $query .= "AND user_id = $user_id "; } ! if (isset ($lower)) ! { ! $lower = $lower / 1000; ! $query .= "AND rate >= $lower "; ! } ! if (isset ($higher)) ! { ! $higher = $higher / 1000; ! $query .= "AND rate <= $higher "; ! } $daddb->query($query); |