require_once ("LANGUAGE_FILE.php"); $cookie_user_info_arr = determine_user_priv(); $lim = 10; $page_type = 'critiques'; $page_num = 'on'; $clean = array(); if (empty($_REQUEST['type'])) { $clean['type'] = 'empty'; } else { switch($_REQUEST['type']) { case 'all': case 'written': case 'received': case 'qreceived': case 'quick': //comments for individual photos $clean['type'] = $_REQUEST['type']; break; default: header("HTTP/1.0 404 Not Found"); header("Location: /404.php"); exit; } } if (empty($_GET['offset'])) { $offset = 0; } else { $offset = intval($_GET['offset']) * $lim - $lim; } if (!empty($cookie_user_info_arr)) { $my_user_id = $cookie_user_info_arr['user_id']; } else { $my_user_id = 0; } if (empty($_GET['filter']) && ($clean['type'] == 'empty' || $clean['type'] == 'all' || $clean['type'] == 'loc')) { $set_type = 'photos'; $ctype = 'all'; if (empty($_GET['l'])) { if ($cookie_user_info_arr['disp_comments'] == 'Y') { $query = "SELECT STRAIGHT_JOIN DATE_FORMAT(c.critique_date, '%Y-%m-%d %k:%i') AS critique_date, p.photo_name, p.photo_id, p.num_favorites, p.swidth, p.sheight, ctrl.country_name, ctrl.continent_id, t.title_name, p.score AS photo_score, ctrl.nice_country_name, p.num_critiques, ua.user_workshop_score AS artist_workshop_score, ua.user_note_score AS artist_note_score, u.user_name AS critiquer_user_name, CONCAT(ui.first_name, ' ', ui.last_name) AS critiquer_full_name, u.user_score AS critiquer_score, u.user_critique_score AS critiquer_critique_score, u.score_sym AS critiquer_score_sym, ua.user_id AS artist_user_id, ua.user_name AS artist_user_name, CONCAT(uia.first_name, ' ', uia.last_name) AS artist_full_name, u.user_workshop_score AS critiquer_workshop_score, u.user_note_score AS critiquer_note_score, ua.user_score AS artist_score, ua.user_critique_score AS artist_critique_score, c.num_usefuls, ua.acct_status, u.acct_status AS critiquer_acct_status, p.original_photo_id, c.crit_type, u.user_id AS critiquer_user_id, ua.score_sym AS artist_score_sym, c.reply_exists, c.ws_exists, c.score, c.critique, c.critique_id FROM critiques AS c, users AS u, user_intros AS ui, photos AS p, loc_states AS s, loc_regions AS r, loc_countries_lang AS ctrl, users AS ua, user_intros AS uia, photo_titles AS t WHERE u.user_id = c.user_id AND p.photo_id = c.photo_id AND ua.user_id = p.user_id AND p.state_id = s.state_id AND s.region_id = r.region_id AND r.country_id = ctrl.country_id AND ctrl.lang_id = $lang_id AND s.lang_id = 0 AND r.lang_id = 0 AND p.cur_status = 'Active' AND ui.user_id = u.user_id AND ui.lang_id = 0 AND uia.user_id = ua.user_id AND uia.lang_id = 0 AND t.photo_id = p.photo_id AND t.lang_id = 0 AND c.cstatus = 'active' ORDER BY c.critique_date DESC LIMIT $offset, $lim"; } else { $query = "SELECT STRAIGHT_JOIN DATE_FORMAT(c.critique_date, '%Y-%m-%d %k:%i') AS critique_date, p.photo_name, p.photo_id, p.num_favorites, p.swidth, p.sheight, ctrl.country_name, ctrl.continent_id, t.title_name, p.score AS photo_score, ctrl.nice_country_name, p.num_critiques, ua.user_workshop_score AS artist_workshop_score, ua.user_note_score AS artist_note_score, u.user_id AS critiquer_user_id, u.user_name AS critiquer_user_name, CONCAT(ui.first_name, ' ', ui.last_name) AS critiquer_full_name, u.user_score AS critiquer_score, u.user_critique_score AS critiquer_critique_score, u.score_sym AS critiquer_score_sym, ua.user_id AS artist_user_id, ua.user_name AS artist_user_name, CONCAT(uia.first_name, ' ', uia.last_name) AS artist_full_name, c.score, c.critique, c.critique_id, u.user_workshop_score AS critiquer_workshop_score, u.user_note_score AS critiquer_note_score, ua.user_score AS artist_score, ua.user_critique_score AS artist_critique_score, c.num_usefuls, ua.acct_status, u.acct_status AS critiquer_acct_status, p.original_photo_id, c.crit_type, ua.score_sym AS artist_score_sym, c.reply_exists FROM critiques AS c, users AS u, user_intros AS ui, photos AS p, loc_states AS s, loc_regions AS r, loc_countries_lang AS ctrl, users AS ua, user_intros AS uia, photo_titles AS t WHERE u.user_id = c.user_id AND p.photo_id = c.photo_id AND ua.user_id = p.user_id AND p.state_id = s.state_id AND s.region_id = r.region_id AND r.country_id = ctrl.country_id AND ctrl.lang_id = $lang_id AND s.lang_id = 0 AND r.lang_id = 0 AND p.cur_status = 'Active' AND ui.user_id = u.user_id AND ui.lang_id = 0 AND uia.user_id = ua.user_id AND uia.lang_id = 0 AND c.crit_type = 'Critique' AND t.photo_id = p.photo_id AND t.lang_id = 0 AND c.cstatus = 'active' ORDER BY c.critique_date DESC LIMIT $offset, $lim"; } } else { switch ($_GET['l']) { case 4: //CONTINENT $query = "SELECT STRAIGHT_JOIN DATE_FORMAT(c.critique_date, '%Y-%m-%d %k:%i') AS critique_date, p.photo_name, p.photo_id, p.num_favorites, p.swidth, p.sheight, ctrl.country_name, ctrl.continent_id, t.title_name, p.score AS photo_score, ctrl.nice_country_name, p.num_critiques, ua.user_workshop_score AS artist_workshop_score, ua.user_note_score AS artist_note_score, u.user_id AS critiquer_user_id, u.user_name AS critiquer_user_name, CONCAT(ui.first_name, ' ', ui.last_name) AS critiquer_full_name, u.user_score AS critiquer_score, u.user_critique_score AS critiquer_critique_score, u.score_sym AS critiquer_score_sym, ua.user_id AS artist_user_id, ua.user_name AS artist_user_name, CONCAT(uia.first_name, ' ', uia.last_name) AS artist_full_name, c.score, c.critique, c.critique_id, u.user_workshop_score AS critiquer_workshop_score, u.user_note_score AS critiquer_note_score, ua.user_score AS artist_score, ua.user_critique_score AS artist_critique_score, c.num_usefuls, ua.acct_status, u.acct_status AS critiquer_acct_status, p.original_photo_id, c.crit_type, ua.score_sym AS artist_score_sym, c.reply_exists FROM critiques AS c, users AS u, user_intros AS ui, photos AS p, loc_states AS s, loc_regions AS r, loc_countries_lang AS ctrl, users AS ua, user_intros AS uia, photo_titles AS t WHERE ctrl.continent_id = ".intval($_GET['id'])." AND u.user_id = c.user_id AND p.photo_id = c.photo_id AND ua.user_id = p.user_id AND p.state_id = s.state_id AND s.region_id = r.region_id AND r.country_id = ctrl.country_id AND ctrl.lang_id = $lang_id AND s.lang_id = 0 AND r.lang_id = 0 AND p.cur_status = 'Active' AND ui.user_id = u.user_id AND ui.lang_id = 0 AND uia.user_id = ua.user_id AND uia.lang_id = 0 AND c.crit_type = 'Critique' AND t.photo_id = p.photo_id AND t.lang_id = 0 AND c.cstatus = 'active' ORDER BY c.critique_date DESC LIMIT $offset, $lim"; break; case 5: //COUNTRY $query = "SELECT STRAIGHT_JOIN DATE_FORMAT(c.critique_date, '%Y-%m-%d %k:%i') AS critique_date, p.photo_name, p.photo_id, p.num_favorites, p.swidth, p.sheight, ctrl.country_name, ctrl.continent_id, t.title_name, p.score AS photo_score, ctrl.nice_country_name, p.num_critiques, ua.user_workshop_score AS artist_workshop_score, ua.user_note_score AS artist_note_score, u.user_id AS critiquer_user_id, u.user_name AS critiquer_user_name, CONCAT(ui.first_name, ' ', ui.last_name) AS critiquer_full_name, u.user_score AS critiquer_score, u.user_critique_score AS critiquer_critique_score, u.score_sym AS critiquer_score_sym, ua.user_id AS artist_user_id, ua.user_name AS artist_user_name, CONCAT(uia.first_name, ' ', uia.last_name) AS artist_full_name, c.score, c.critique, c.critique_id, u.user_workshop_score AS critiquer_workshop_score, u.user_note_score AS critiquer_note_score, ua.user_score AS artist_score, ua.user_critique_score AS artist_critique_score, c.num_usefuls, ua.acct_status, u.acct_status AS critiquer_acct_status, p.original_photo_id, c.crit_type, ua.score_sym AS artist_score_sym, c.reply_exists FROM critiques AS c, users AS u, user_intros AS ui, photos AS p, loc_states AS s, loc_regions AS r, loc_countries_lang AS ctrl, users AS ua, user_intros AS uia, photo_titles AS t WHERE ctrl.country_id = ".intval($_GET['id'])." AND u.user_id = c.user_id AND p.photo_id = c.photo_id AND ua.user_id = p.user_id AND p.state_id = s.state_id AND s.region_id = r.region_id AND r.country_id = ctrl.country_id AND ctrl.lang_id = $lang_id AND s.lang_id = 0 AND r.lang_id = 0 AND p.cur_status = 'Active' AND ui.user_id = u.user_id AND ui.lang_id = 0 AND uia.user_id = ua.user_id AND uia.lang_id = 0 AND c.crit_type = 'Critique' AND t.photo_id = p.photo_id AND t.lang_id = 0 AND c.cstatus = 'active' ORDER BY c.critique_date DESC LIMIT $offset, $lim"; break; case '6': //REGION $query = "SELECT STRAIGHT_JOIN DATE_FORMAT(c.critique_date, '%Y-%m-%d %k:%i') AS critique_date, p.photo_name, p.photo_id, p.num_favorites, p.swidth, p.sheight, ctrl.country_name, ctrl.continent_id, t.title_name, p.score AS photo_score, ctrl.nice_country_name, p.num_critiques, ua.user_workshop_score AS artist_workshop_score, ua.user_note_score AS artist_note_score, u.user_id AS critiquer_user_id, u.user_name AS critiquer_user_name, CONCAT(ui.first_name, ' ', ui.last_name) AS critiquer_full_name, u.user_score AS critiquer_score, u.user_critique_score AS critiquer_critique_score, u.score_sym AS critiquer_score_sym, ua.user_id AS artist_user_id, ua.user_name AS artist_user_name, CONCAT(uia.first_name, ' ', uia.last_name) AS artist_full_name, c.score, c.critique, c.critique_id, u.user_workshop_score AS critiquer_workshop_score, u.user_note_score AS critiquer_note_score, ua.user_score AS artist_score, ua.user_critique_score AS artist_critique_score, c.num_usefuls, ua.acct_status, u.acct_status AS critiquer_acct_status, p.original_photo_id, c.crit_type, ua.score_sym AS artist_score_sym, c.reply_exists FROM critiques AS c, users AS u, user_intros AS ui, photos AS p, loc_states AS s, loc_regions AS r, loc_countries_lang AS ctrl, users AS ua, user_intros AS uia, photo_titles AS t WHERE r.region_id = ".intval($_GET['id'])." AND u.user_id = c.user_id AND p.photo_id = c.photo_id AND ua.user_id = p.user_id AND p.state_id = s.state_id AND s.region_id = r.region_id AND r.country_id = ctrl.country_id AND ctrl.lang_id = $lang_id AND s.lang_id = 0 AND r.lang_id = 0 AND p.cur_status = 'Active' AND ui.user_id = u.user_id AND ui.lang_id = 0 AND uia.user_id = ua.user_id AND uia.lang_id = 0 AND c.crit_type = 'Critique' AND t.photo_id = p.photo_id AND t.lang_id = 0 AND c.cstatus = 'active' ORDER BY c.critique_date DESC LIMIT $offset, $lim"; break; case '7': //STATE break; case '8': //CITY break; default: echo 'Invalid level'; } } //500 pages $count_total = 5000; if ($offset + 1 > $count_total) { header("HTTP/1.0 404 Not Found"); header("Location: /404.php"); exit; } } elseif (!empty($_GET['filter']) && ($clean['type'] == 'empty' || $clean['type'] == 'written' || $clean['type'] == 'received' || $clean['type'] == 'qreceived')) { $set_type = 'users'; if (!empty($_GET['l'])) { $ctype = 'loc'; } elseif ($clean['type'] == 'empty') { $ctype = 'written'; } else { $ctype = $clean['type']; } $user_name = $_GET['filter']; $user_name_len = strlen($user_name); if (strlen($user_name_len) <= 15 && strspn($_GET['filter'], "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_") == $user_name_len) { $this_user_info_arr = get_user_info($user_name); $user_id = $this_user_info_arr['user_id']; if ($this_user_info_arr['user_score'] > 17000 && $ctype != 'qreceived') { //why is straight join necessary for low pointers? $straight_join = ''; } else { $straight_join = 'STRAIGHT_JOIN '; } if (!isset($user_id)) { header("HTTP/1.0 404 Not Found"); header("Location: /404.php"); exit; } } else { header("HTTP/1.0 404 Not Found"); header("Location: /404.php"); exit; } switch ($ctype) { case 'written': $critiques_written = '' . _CRITIQUES_WRITTEN . ''; $critiques_received = '' . _CRITIQUES_RECEIVED . ''; $qcritiques_received = 'Comments'; $query = "SELECT " . $straight_join . "DATE_FORMAT(c.critique_date, '%Y-%m-%d %k:%i') AS critique_date, p.photo_name, p.photo_id, p.num_favorites, c.ws_exists, p.swidth, p.sheight, ctrl.country_name, ctrl.continent_id, t.title_name, p.score AS photo_score, ctrl.nice_country_name, p.num_critiques, u.user_id, u.user_name, CONCAT(ui.first_name, ' ', ui.last_name) AS full_name, u.user_score, u.user_critique_score, c.num_usefuls, c.score, c.critique, c.critique_id, u.user_workshop_score, u.user_note_score, u.acct_status, p.original_photo_id, c.crit_type, u.score_sym, cr.rating, c.reply_exists FROM critiques AS c INNER JOIN photos AS p ON c.photo_id = p.photo_id AND p.cur_status = 'Active' INNER JOIN loc_states AS s ON s.state_id = p.state_id AND s.lang_id = 0 INNER JOIN loc_regions AS r ON r.region_id = s.region_id AND r.lang_id = 0 INNER JOIN loc_countries_lang AS ctrl ON ctrl.country_id = r.country_id AND ctrl.lang_id = $lang_id INNER JOIN users AS u ON u.user_id = p.user_id INNER JOIN user_intros AS ui ON ui.user_id = u.user_id AND ui.lang_id = 0 INNER JOIN photo_titles AS t ON t.photo_id = p.photo_id AND t.lang_id = 0 LEFT JOIN critique_ratings AS cr ON cr.critique_id = c.critique_id AND cr.user_id = $my_user_id WHERE c.user_id = $user_id AND c.cstatus = 'active' ORDER BY c.critique_date DESC LIMIT $offset, $lim"; if ($this_user_info_arr['user_score'] >= 5000) //user_score is proxy for num_critiques written, most likely over 100 pages { $count_total = 1000; } else { $count_total_query = "SELECT COUNT(*) AS count FROM critiques AS cr, photos AS p WHERE cr.user_id = $user_id AND p.cur_status = 'Active' AND p.photo_id = cr.photo_id"; $count_result = mysql_query($count_total_query) or die ('Invalid cquery3'); $count_total = mysql_result($count_result, 0); } if ($offset + 1 > $count_total && $count_total > 0) //If go over page limit, give them a 404 { header("HTTP/1.0 404 Not Found"); header("Location: /404.php"); exit; } break; case 'received': $critiques_written = '' . _CRITIQUES_WRITTEN . ''; $critiques_received = '' . _CRITIQUES_RECEIVED . ''; $qcritiques_received = 'Comments'; $crit_type = 'Critique'; $query = "SELECT " . $straight_join . "DATE_FORMAT(c.critique_date, '%Y-%m-%d %k:%i') AS critique_date, p.photo_name, p.photo_id, p.num_favorites, c.ws_exists, p.swidth, p.sheight, ctrl.country_name, ctrl.continent_id, t.title_name, p.score AS photo_score, ctrl.nice_country_name, p.num_critiques, u.user_id, u.user_name, CONCAT(ui.first_name, ' ', ui.last_name) AS full_name, u.user_score, u.user_critique_score, c.num_usefuls, c.score, c.critique, c.critique_id, u.user_workshop_score, u.user_note_score, u.acct_status, p.original_photo_id, c.crit_type, u.score_sym, cr.rating, c.reply_exists FROM photos AS p INNER JOIN critiques AS c ON c.photo_id = p.photo_id AND c.cstatus = 'active' AND c.crit_type = '$crit_type' INNER JOIN loc_states AS s ON s.state_id = p.state_id AND s.lang_id = 0 INNER JOIN loc_regions AS r ON r.region_id = s.region_id AND r.lang_id = 0 INNER JOIN loc_countries_lang AS ctrl ON ctrl.country_id = r.country_id AND ctrl.lang_id = $lang_id INNER JOIN users AS u ON u.user_id = c.user_id INNER JOIN user_intros AS ui ON ui.user_id = u.user_id AND ui.lang_id = 0 INNER JOIN photo_titles AS t ON t.photo_id = p.photo_id AND t.lang_id = 0 LEFT JOIN critique_ratings AS cr ON cr.critique_id = c.critique_id AND cr.user_id = $my_user_id WHERE p.user_id = $user_id AND p.cur_status = 'Active' ORDER BY c.critique_date DESC LIMIT $offset, $lim"; if ($this_user_info_arr['user_score'] > 5000) //user_score is proxy for num_critiques written, most likely over 100 pages { $count_total = 1000; } else { $count_total_query = "SELECT COUNT(*) AS count FROM critiques AS cr, photos AS p WHERE p.cur_status = 'Active' AND p.photo_id = cr.photo_id AND p.user_id = $user_id"; $count_result = mysql_query($count_total_query) or die ('Invalid cquery1'); $count_total = mysql_result($count_result, 0); } if ($offset + 1 > $count_total && $count_total > 0) //If go over page limit, give them a 404 { header("HTTP/1.0 404 Not Found"); header("Location: /404.php"); exit; } break; case 'qreceived': $critiques_written = '' . _CRITIQUES_WRITTEN . ''; $critiques_received = '' . _CRITIQUES_RECEIVED . ''; $qcritiques_received = 'Comments'; $crit_type = 'Comment'; $query = "SELECT " . $straight_join . "DATE_FORMAT(c.critique_date, '%Y-%m-%d %k:%i') AS critique_date, p.photo_name, p.photo_id, p.num_favorites, c.ws_exists, p.swidth, p.sheight, ctrl.country_name, ctrl.continent_id, t.title_name, p.score AS photo_score, ctrl.nice_country_name, p.num_critiques, u.user_id, u.user_name, CONCAT(ui.first_name, ' ', ui.last_name) AS full_name, u.user_score, u.user_critique_score, c.num_usefuls, c.score, c.critique, c.critique_id, u.user_workshop_score, u.user_note_score, u.acct_status, p.original_photo_id, c.crit_type, u.score_sym, cr.rating, c.reply_exists FROM photos AS p INNER JOIN critiques AS c ON c.photo_id = p.photo_id AND c.cstatus = 'active' AND c.crit_type = '$crit_type' INNER JOIN loc_states AS s ON s.state_id = p.state_id AND s.lang_id = 0 INNER JOIN loc_regions AS r ON r.region_id = s.region_id AND r.lang_id = 0 INNER JOIN loc_countries_lang AS ctrl ON ctrl.country_id = r.country_id AND ctrl.lang_id = $lang_id INNER JOIN users AS u ON u.user_id = c.user_id INNER JOIN user_intros AS ui ON ui.user_id = u.user_id AND ui.lang_id = 0 INNER JOIN photo_titles AS t ON t.photo_id = p.photo_id AND t.lang_id = 0 LEFT JOIN critique_ratings AS cr ON cr.critique_id = c.critique_id AND cr.user_id = $my_user_id WHERE p.user_id = $user_id AND p.cur_status = 'Active' ORDER BY c.critique_date DESC LIMIT $offset, $lim"; if ($this_user_info_arr['user_score'] > 5000) //user_score is proxy for num_critiques written, most likely over 50 comment pages { $count_total = 500; } else { $count_total_query = "SELECT COUNT(*) AS count FROM critiques AS cq, photos AS p WHERE p.user_id = $user_id AND p.cur_status = 'Active' AND p.photo_id = cq.photo_id AND cq.crit_type = 'Comment'"; $count_result = mysql_query($count_total_query) or die ('Invalid cquery2'); $count_total = mysql_result($count_result, 0); } if ($offset + 1 > $count_total && $count_total > 0) //If go over page limit, give them a 404 { header("HTTP/1.0 404 Not Found"); header("Location: /404.php"); exit; } break; default: die('Unknown type ('.$ctype.')'); } } else { header("HTTP/1.0 404 Not Found"); header("Location: /404.php"); exit; } html_begin($title='Photo Critiques', $meta_keywords='', $meta_description='', $meta_robot='NOINDEX, FOLLOW'); display_critiques2($user_id, $offset, $lim, $ctype); html_end(); function display_critiques2 ($user_id, $offset, $limit, $ctype) { global $query, $ctype, $lang_id, $cookie_user_info_arr, $count_total, $user_name, $this_user_info_arr, $crit_type, $straight_join; $result = mysql_query($query) or die ('Invalid display_critiques2_query'); if ($count_total > 0) { echo '

' . _PHOTO . '' . _CRITIQUE . ' [' . _TRANSLATE . ']

' . "\n"; $count = 1; while ($row = mysql_fetch_array($result)) { switch ($ctype) { case 'written': $thumb_info_arr['user_id'] = $row['user_id']; $thumb_info_arr['user_name'] = $row['user_name']; $thumb_info_arr['full_name'] = $row['full_name']; $thumb_info_arr['user_score'] = $row['user_score']; $thumb_info_arr['user_critique_score'] = $row['user_critique_score']; $thumb_info_arr['user_workshop_score'] = $row['user_workshop_score']; $thumb_info_arr['user_note_score'] = $row['user_note_score']; $thumb_info_arr['score_sym'] = $row['score_sym']; $thumb_info_arr['acct_status'] = $row['acct_status']; $critiquer_score = $this_user_info_arr['user_score']; $critiquer_critique_score = $this_user_info_arr['user_critique_score']; $critiquer_workshop_score = $this_user_info_arr['user_workshop_score']; $critiquer_note_score = $this_user_info_arr['user_note_score']; $critiquer_score_sym = $this_user_info_arr['score_sym']; $critiquer_user_id = $this_user_info_arr['user_id']; $critiquer_user_name = $this_user_info_arr['user_name']; if ($row['critiquer_acct_status'] == 'Enabled') { $critiquer_full_name = $this_user_info_arr['first_name'] . ' ' . $this_user_info_arr['last_name']; } else { $critiquer_full_name = ''; } break; case 'all': $thumb_info_arr['user_id'] = $row['artist_user_id']; $thumb_info_arr['user_name'] = $row['artist_user_name']; $thumb_info_arr['user_score'] = $row['artist_score']; $thumb_info_arr['user_critique_score'] = $row['artist_critique_score']; $thumb_info_arr['user_workshop_score'] = $row['artist_workshop_score']; $thumb_info_arr['user_note_score'] = $row['artist_note_score']; $thumb_info_arr['score_sym'] = $row['artist_score_sym']; $critiquer_user_id = $row['critiquer_user_id']; $critiquer_user_name = $row['critiquer_user_name']; if ($row['critiquer_acct_status'] == 'Enabled') { $critiquer_full_name = $row['critiquer_full_name']; } else { $critiquer_full_name = ''; } $critiquer_score = $row['critiquer_score']; $critiquer_critique_score = $row['critiquer_critique_score']; $critiquer_workshop_score = $row['critiquer_workshop_score']; $critiquer_note_score = $row['critiquer_note_score']; $critiquer_score_sym = $row['critiquer_score_sym']; break; default: //received || qreceived $thumb_info_arr['user_id'] = $this_user_info_arr['user_id']; $thumb_info_arr['user_name'] = $this_user_info_arr['user_name']; $thumb_info_arr['full_name'] = $this_user_info_arr['first_name'] . ' ' . $this_user_info_arr['last_name']; $thumb_info_arr['user_score'] = $this_user_info_arr['user_score']; $thumb_info_arr['user_critique_score'] = $this_user_info_arr['user_critique_score']; $thumb_info_arr['user_workshop_score'] = $this_user_info_arr['user_workshop_score']; $thumb_info_arr['user_note_score'] = $this_user_info_arr['user_note_score']; $thumb_info_arr['score_sym'] = $this_user_info_arr['score_sym']; $thumb_info_arr['acct_status'] = $this_user_info_arr['acct_status']; $critiquer_score = $row['user_score']; $critiquer_critique_score = $row['user_critique_score']; $critiquer_workshop_score = $row['user_workshop_score']; $critiquer_note_score = $row['user_note_score']; $critiquer_score_sym = $row['score_sym']; $critiquer_user_id = $row['user_id']; $critiquer_user_name = $row['user_name']; if ($row['critiquer_acct_status'] == 'Enabled') { $critiquer_full_name = $row['full_name']; } else { $critiquer_full_name = ''; } } $score = $row['score']; $critique_date = $row['critique_date']; $crit_type = $row['crit_type']; $rating = $row['rating']; $reply_exists = $row['reply_exists']; $ws_exists = $row['ws_exists']; $critique = $row['critique']; $critique_id = $row['critique_id']; $num_usefuls = $row['num_usefuls']; $continent_info_arr = get_continent_info($row['continent_id']); if ($ctype != 'qreceived') { if ($score == 3 || $cookie_user_info_arr['site_type'] == 'noscore') { $score_image = ' '; } elseif ($score == 2) { $score_image = 'Great'; } elseif ($score == 1) { $score_image = 'Good'; } elseif ($score == 0) { $score_image = 'Needs Improvement'; } } $thumb_info_arr['photo_name'] = $row['photo_name']; $thumb_info_arr['photo_id'] = $row['photo_id']; $thumb_info_arr['original_photo_id'] = $row['original_photo_id']; $thumb_info_arr['swidth'] = $row['swidth']; $thumb_info_arr['sheight'] = $row['sheight']; $thumb_info_arr['country_name'] = $row['country_name']; $thumb_info_arr['nice_country_name'] = $row['nice_country_name']; $thumb_info_arr['nice_continent_name'] = $continent_info_arr['nice_continent_name']; $thumb_info_arr['num_critiques'] = $row['num_critiques']; $thumb_info_arr['num_favorites'] = $row['num_favorites']; $thumb_info_arr['score'] = $row['photo_score']; $thumb_info_arr['title_name'] = $row['title_name']; $thumb_info_arr['camera_name'] = ''; //Temporarily set to N for now $thumb_info_arr['large_exist'] = 'N'; if ($ws_exists == 'yes') { $workshop = '[workshop] [compare]'; } else { $workshop = ''; } if (!empty($cookie_user_info_arr['user_id'])) { $user_reply = ' [' . _REPLY . ']'; } else { $user_reply = ''; } if (!empty($workshop)) { $minus = ' - '; } else { $minus = ''; } if ($num_usefuls > 1) { $usefuls = ' [' . $num_usefuls . '] '; } else { $usefuls = ''; } if ($reply_exists == 'yes') { $msg = ' [+]'; } else { $msg = ''; } if ($crit_type == 'Comment' && $ctype != 'qreceived') { $crit_comment = ' [comment]'; } else { $crit_comment = ''; } echo '
' . "\n"; echo '
' . "\n"; if ($cookie_user_info_arr['cr_allow'] == 'Yes' && $crit_type == 'Critique' && $cookie_user_info_arr['user_name'] == $user_name && $ctype == 'received') { $give_crit = 'yes'; echo '
' . "\n"; } echo display_thumbnail ($thumb_info_arr, $header='country-link'); if ($give_crit == 'yes') { echo '
'; disp_crit_rating_form($rating, $critique_id, $style="background: transparent"); } echo '

' . $score_image . '

' . "\n"; echo '
' . "\n"; echo '
' . "\n"; echo '
' . "\n"; echo '' . $critiquer_user_name . '' . ' ' . get_user_score_status($critiquer_user_id, $critiquer_score, $critiquer_critique_score, $critiquer_workshop_score, $critiquer_note_score, $critiquer_score_sym) . ' [' . $critique_date . ']' . $usefuls . $crit_comment . $minus . ' ' . $workshop . $user_reply . $msg . '
'; echo '

' . nl2br($critique) . '

' . "\n"; echo '
' . "\n"; if ($give_crit == 'yes') { echo '' . "\n"; } echo '
' . "\n"; echo '
' . "\n"; $count++; } } else { echo 'No critiques. [View all critiques]' . "\n"; } echo ''; echo ''; echo '' . "\n"; } ?>