Advertisement
alchymyth

cat image map

May 9th, 2011
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.38 KB | None | 0 0
  1. <?php
  2. $regio[1]="<area shape=\"poly\" coords=\"83,138,120,181,120,216,164,255,144,302,105,326,119,397,42,388,25,274,10,167\"";
  3. $regio[2]="<area shape=\"poly\" coords=\"87,133,116,119,180,132,235,111,259,138,243,185,267,244,281,261,271,301,247,350,182,346,173,250,130,204,131,177\"";
  4. $regio[3]="<area shape=\"poly\" coords=\"246,107,270,102,338,114,344,133,383,144,373,184,333,254,379,270,403,262,424,309,381,377,309,365,325,293,287,295,291,257,252,185,275,134\"";
  5. $regio[4]="<area shape=\"poly\" coords=\"301,52,420,8,498,66,465,185,387,184,401,132,347,71,326,59\"";
  6. $regio[5]="<area shape=\"poly\" coords=\"374,194,505,179,549,226,495,343,421,277,358,241,357,241,369,219,370,217,371,209\"";
  7. $regio[6]="<area shape=\"poly\" coords=\"493,88,663,63,644,143,700,258,559,237,490,155,489,154,492,128\"";
  8. $regio[7]="<area shape=\"poly\" coords=\"549,245,679,267,671,457,545,488,454,369,544,326\"";
  9. $regio[8]="<area shape=\"poly\" coords=\"642,25,647,51,693,64,693,229,955,231,893,106,724,16\"";
  10. $regio[9]="<area shape=\"poly\" coords=\"703,238,864,244,915,380,776,443,733,522,688,430,687,429,693,358\"";
  11.  
  12. $cat_id = get_query_var('cat');
  13. $catlisting = get_categories('child_of=' . $cat_id);
  14. echo "<map name=\"map\">";
  15. $i = 1;
  16. foreach($catlisting as $catlist) {
  17.     echo $regio[$i] . " href=\"" . get_category_link($catlist->cat_ID) . "\" title=\"" . $catlist->cat_name . "\">";
  18.     $i++;
  19. }
  20. echo "</map>";
  21. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement