Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($is_logged_in && $_GET['orderby'] == 'user') {
- $query = '
- SELECT drawings.id, thumbnail_url, url, model, comment, UNIX_TIMESTAMP(date) as unix_date, ratingcount, ratingavg' . $rating_optional . '
- FROM drawings INNER JOIN elgg_artists ON drawings.id = elgg_artists.drawingid
- ' . $where_optional . ' AND elgg_artists.userid = ' . $_SESSION['current_user_id'] .
- ' AND drawings.id not in (select drawingid from flaggings where useragent = \'' . $useragent . '\' and ip = INET_ATON(\'' . $_SERVER['REMOTE_ADDR'] . '\'))';
- } else {
- $query = '
- SELECT id, url, thumbnail_url, model, comment, UNIX_TIMESTAMP(date) as unix_date, ratingcount, ratingavg' . $rating_optional . '
- FROM drawings
- ' . $where_optional .
- ' AND id not in (select drawingid from flaggings where useragent = \'' . $useragent . '\' and ip = INET_ATON(\'' . $_SERVER['REMOTE_ADDR'] . '\'))';
- }
Add Comment
Please, Sign In to add comment