<?php

//print_r($_GET);

$div = $_GET['i'];

#print "IMG=($div)<br>\n";

/*
	image sets
*/
require "files.php";


$img = preg_replace('!/?hover/!', "", $fname[$div]);
$names = str_replace("|", "&nbsp;&nbsp;&nbsp;&nbsp;", $cname[$div]);

if(false) {
print <<<END
IMG=$img<br>
names=$names
<br>
END;
}

$link = '';
$buy = '';
if(!empty($pname[$div])) {
	$l = $pname[$div];
	$link = "<br><a href='/card/$l'>More info</a>";
}
if(!empty($rname[$div])) {
	$l = $rname[$div];
	$lk = "https://www.redbubble.com/people/tarotmuertos/works/" .
		$l; 	# - add title
			#27453502-Devil
	$buy = "&nbsp;&nbsp;<a href='$lk' target=_blank>Buy me</a>";
}

print <<<END
<table>
<tr height=30>
<tr>
<td width=30>
<th><h2>$names
$link$buy
</h2>
<tr>
<td>
<td align=center>
<img src='$img' height=800>
<tr><td>
<td align=center>
<b>
Dia Images are copyright 2015-17
Laurel Thorndike,
Licensed by Rich Roth<br>
See <a href='http://www.diadelosmuertostarot.com/contact-us-for-image-licensing/' target="_blank">
for details and permissions for use in Social media</a>
</table>
END;
