source: trunk/xgraph/jpgraph/Examples/listallflags.php

Last change on this file was 42, checked in by marrucho, 10 years ago
File size: 933 bytes
Line 
1<?php // content="text/plain; charset=utf-8"
2// List all current supported flags.
3// $Id: listallflags.php,v 1.1.2.1 2003/06/29 15:28:12 aditus Exp $
4require_once ('jpgraph/jpgraph.php');
5require_once ('jpgraph/jpgraph_flags.php');
6
7// Flag size to use in table
8$s = FLAGSIZE2 ;
9$w = 60;
10$flags = new FlagImages($s) ;
11
12// Create a nice table wil all flags and their full name (and index)
13echo "<table width=100%><tr>\n";
14$cols=0;
15while( list($key,$val) = each($flags->iCountryNameMap) ) {
16
17    echo '<td width=20%><a href="javascript:window.open(\'listallflags_helper.php?size=4&idx='.$val.'\',\'_new\',\'width=500,height=350\');void(0)"><img src="listallflags_helper.php?size='.$s.'&idx='.$val.'"></a><br>';
18    echo "<small>$key</small><br><small><font color=blue><i>idx=$val</i></font></small></td>\n";
19   
20    if( ++$cols == 5 ) {
21        echo "</tr>\n<tr>";
22        $cols=0;
23    }
24}
25
26echo "</tr></table>";
27
28?>
29
Note: See TracBrowser for help on using the repository browser.