コード例 #1
0
ファイル: locations.php プロジェクト: rair/yacs
 /**
  * list user locations
  *
  * @param int the offset from the start of the list; usually, 0 or 1
  * @param int the number of items to display
  * @param string the list variant, if any
  * @return NULL on error, else an ordered array with $url => ($prefix, $label, $suffix, $icon)
  *
  * @see locations/map_on_google.php
  */
 public static function list_users_by_date($offset = 0, $count = 10, $variant = 'full')
 {
     global $context;
     // limit the scope of the request
     $query = "SELECT * FROM " . SQL::table_name('locations') . " AS locations" . " WHERE locations.anchor LIKE 'user:%'" . " ORDER BY locations.edit_date DESC, locations.geo_place_name LIMIT " . $offset . ',' . $count;
     // the list of locations
     $output = Locations::list_selected(SQL::query($query), $variant);
     return $output;
 }