" . $vocab["advanced_search"] . " "; echo "
"; } if (!$search_str) { echo "';
}
}
if(!isset($search_pos) || ($search_pos <= 0))
$search_pos = 0;
elseif($search_pos >= $total)
$search_pos = $total - ($total % $search["count"]);
# Now we set up the "real" query using LIMIT to just get the stuff we want.
$sql = "SELECT distinct E.id, E.create_by, E.name, E.description, E.start_time, R.area_id, R.room_name
FROM grr_entry E, grr_room R ";
// Si l'utilisateur n'est pas administrateur, seuls les domaines auxquels il a accès sont pris en compte
// On adapte la requête (voir $sql_pred plus haut)
if(authGetUserLevel(getUserName(),-1) < 5)
$sql .= ", grr_j_user_area j, grr_area a ";
$sql .=" WHERE $sql_pred
AND E.room_id = R.id
ORDER BY E.start_time asc "
. sql_syntax_limit($search["count"], $search_pos);
# this is a flag to tell us not to display a "Next" link
$result = sql_query($sql);
if (! $result) fatal_error(0, sql_error());
$num_records = sql_count($result);
$has_prev = $search_pos > 0;
$has_next = $search_pos < ($total-$search["count"]);
if($has_prev || $has_next)
{
echo "" . $vocab["records"] . ($search_pos+1) . $vocab["through"] . ($search_pos+$num_records) . $vocab["of"] . $total . "
";
# display a "Previous" button if necessary
if($has_prev)
{
echo "";
}
echo "" . $vocab["previous"] . "";
if($has_prev)
echo "";
# print a separator for Next and Previous
echo(" | ");
# display a "Previous" button if necessary
if($has_next)
{
echo "";
}
echo "". $vocab["next"] ."";
if($has_next)
echo "";
}
?>
$row[6] - $vocab[view] | \n"; echo "" . htmlspecialchars($row[1]) . " | \n"; echo "" . htmlspecialchars($row[2]) . " | \n"; echo "" . htmlspecialchars($row[3]) . " | \n"; // generate a link to the day.php $link = getdate($row[4]); echo "" . time_date_string($row[4],$dformat) . " | "; echo "\n"; } echo "