";
}
mysql_free_result($result);
$imgcount = 0;
$result_count = mysql_query("SELECT * FROM s5t_tat AS t1, s5t_tat_images AS t2, s5t_tat_artist AS t3 WHERE t1.post = '1' AND t2.tat_images_post = '1' AND t1.tat_index_count = t2.details_tat_index_count AND t3.tat_artist_index_count = t1.tat_artist AND t1.tat_artist = $tat_artist_id GROUP BY t1.tat_index_count ORDER BY t1.tat_index_count DESC");
$number_results=mysql_num_rows($result_count);
mysql_free_result($result_count);
$result = mysql_query("SELECT * FROM s5t_tat AS t1, s5t_tat_images AS t2, s5t_tat_artist AS t3 WHERE t1.post = '1' AND t2.tat_images_post = '1' AND t1.tat_index_count = t2.details_tat_index_count AND t3.tat_artist_index_count = t1.tat_artist AND t1.tat_artist = $tat_artist_id GROUP BY t1.tat_index_count ORDER BY t1.tat_index_count DESC LIMIT $start_no, $show_no");
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
list($orig_width, $orig_height, $type, $attr) = getimagesize("images/tat/$row[tat_filename_big]");
list($orig_width_sm, $orig_height_sm, $type_sm, $attr_sm) = getimagesize("images/tat/$row[tat_filename_small]");
if($orig_height > 400) {$longimage=1;}else{$longimage=0;}
if($longimage==1){
echo"
";
} else
{
echo"
";
}
$imgcount ++;
if($imgcount == 4) { $imgcount = 0; echo "
"; }
}
mysql_free_result($result);
echo"
See more Details about the artist in the artist page. Click Here.
";
}
// END <-- Sort by Artist -->
// <-- Sort by Style -->
if($sort=="Styles" && $next_prev_valid == 1)
{
// <-- Start Basic Cover SQL Injection -->
// Force only enter 20 chars for string
$tat_type_id = substr($tat_type_id, 0,20);
// Use the php mysql for stoping injection
$tat_type_id = mysql_real_escape_string($tat_type_id);
// <-- End Basic Cover SQL Injection -->
echo"
Gallery: Sorted by $sort
$sort
Please see our Gallery sorted by $sort. This view of the gallery will only show the work done in one style. You can also view the complete gallery by clicking here.
Style
";
$imgcount = 0;
$result_count = mysql_query("SELECT * FROM s5t_tat AS t1, s5t_tat_images AS t2, s5t_tat_artist AS t3 WHERE t1.post = '1' AND t2.tat_images_post = '1' AND t1.tat_index_count = t2.details_tat_index_count AND t3.tat_artist_index_count = t1.tat_artist AND t1.tat_type = '$tat_type_id' GROUP BY t1.tat_index_count ORDER BY t1.tat_index_count DESC");
$number_results=mysql_num_rows($result_count);
mysql_free_result($result_count);
$result = mysql_query("SELECT * FROM s5t_tat AS t1, s5t_tat_images AS t2, s5t_tat_artist AS t3 WHERE t1.post = '1' AND t2.tat_images_post = '1' AND t1.tat_index_count = t2.details_tat_index_count AND t3.tat_artist_index_count = t1.tat_artist AND t1.tat_type = '$tat_type_id' GROUP BY t1.tat_index_count ORDER BY t1.tat_index_count DESC LIMIT $start_no, $show_no");
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
list($orig_width, $orig_height, $type, $attr) = getimagesize("images/tat/$row[tat_filename_big]");
list($orig_width_sm, $orig_height_sm, $type_sm, $attr_sm) = getimagesize("images/tat/$row[tat_filename_small]");
if($orig_height > 400) {$longimage=1;}else{$longimage=0;}
if($longimage==1){
echo"
";
} else
{
echo"
";
}
$imgcount ++;
if($imgcount == 4) { $imgcount = 0; echo "
"; }
}
mysql_free_result($result);
echo"
";
}
// END <-- Sort by Style -->
// <-- Next/Prev Page -->
if($next_prev_valid==1)
{
$current_displayed = $start_no + 28;
$old_displayed = $start_no - 28;
if($number_results > $current_displayed && $start_no == 0)
{ $next_page = '
next..';
$prev_page = '..previous';
}
if($number_results > $current_displayed && $start_no != 0)
{ $next_page = '
next..';
$prev_page = '
..previous';
}
if($number_results < $current_displayed && $start_no != 0)
{ $next_page = 'next..';
$prev_page = '
..previous';
}
}
else
{ $next_page = '
View Gallery';
$prev_page = 'Error in page counting, please start again.';
echo"
Error
Counter Reset
We have been unable to count your start or end number.
";
}
echo"
$prev_page
$next_page
";
// END <-- Next/Prev Page -->
// <-- Common Below -->
echo"
Organize Galleries
Artists or Styles
View Artist Galleries ";
$result = mysql_query("SELECT tat_artist_name, tat_artist_index_count FROM s5t_tat_artist AS t1, s5t_tat AS t2, s5t_tat_images AS t3 WHERE t3.tat_images_post = '1' AND t2.post = '1' AND t1.tat_artist_post = 1 AND t1.tat_artist_index_count = t2.tat_artist AND t2.tat_index_count = t3.details_tat_index_count GROUP BY t1.tat_artist_index_count ORDER BY t1.tat_artist_name ASC");
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
echo "| $row[tat_artist_name]'s gallery ";
}
mysql_free_result($result);
echo "|
View Style Galleries ";
$result = mysql_query("SELECT tat_type FROM s5t_tat_artist AS t1, s5t_tat AS t2, s5t_tat_images AS t3 WHERE t3.tat_images_post = '1' AND t2.post = '1' AND t2.tat_index_count = t3.details_tat_index_count GROUP BY t2.tat_type ORDER BY t2.tat_type ASC");
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
echo "| $row[tat_type] gallery ";
}
mysql_free_result($result);
echo "|
";
?>