Modification of gatopeich's map HTML
By : webhappy
<?php
function drawMap ( $landowner, $nosoldiers )
{
$mapOutline='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type"
content="text/html; charset=ISO-8859-1">
<title>Risk Table Map</title>
<style type="text/css">
td { text-align: left; vertical-align: top;}
.N_America { background-color: #ffff22;}
.S_America { background-color: #2255ff;}
.Europe { background-color: #ff22ff;}
.Asia { background-color: #55ff55;}
.Africa { background-color: #aa5533;}
.Oceania { background-color: #ffa000;}
.bridge { background-color: #a0a0a0;}
.A { background-color: #ff0000;}
.B { background-color: #00ff00;}
.C { background-color: #0000ff;}
.D { background-color: #ffff00;}
.X { background-color: #808080;}
</style>
</head>
<body>
<h1>Risk Map</h1>
<table cellpadding="1" cellspacing="1" border="1" width="100%" bgcolor="#ddddff">
<tr>
<td>.</td><td>.</td><td>.</td><td>.</td><td>.</td>
<td class="N_America" rowspan="3" colspan="3">2<table align=center class="'.$landowner[2].'"><td>'.$nosoldiers[2].'</td></table>
</td>
<td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td>
<td class="Asia" rowspan="4" colspan="1">20<table align=center class="'.$landowner[20].'"><td>'.$nosoldiers[20].'</td></table>
</td>
<td class="Asia">21<table align=center class="'.$landowner[21].'"><td>'.$nosoldiers[21].'</td></table>
</td>
<td class="Asia" rowspan="3" colspan="1">22<table align=center class="'.$landowner[22].'"><td>'.$nosoldiers[22].'</td></table>
</td>
<td>.</td>
</tr>
<tr>
<td>.</td><td>.</td><td>.</td>
<td class="N_America" rowspan="2" colspan="2">1<table align=center class="'.$landowner[1].'"><td>'.$nosoldiers[1].'</td></table></td>
<td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td>
<td class="Asia" rowspan="4" colspan="2">19<table align=center class="'.$landowner[19].'"><td>'.$nosoldiers[19].'</td></table></td>
<td class="Asia">23<table align=center class="'.$landowner[23].'"><td>'.$nosoldiers[23].'</td></table></td>
<td class="bridge">-</td>
</tr>
<tr>
<td class="bridge">-</td>
<td class="N_America" rowspan="2" colspan="2">0<table align=center class="'.$landowner[0].'"><td>'.$nosoldiers[0].'</td></table></td>
<td class="bridge" rowspan="2" colspan="1">-</td>
<td>.</td>
<td>.</td>
<td class="Europe" rowspan="3" colspan="2">13<table align=center class="'.$landowner[13].'"><td>'.$nosoldiers[13].'</td></table></td>
<td class="Europe" rowspan="4" colspan="2">14<table align=center class="'.$landowner[14].'"><td>'.$nosoldiers[14].'</td></table></td>
<td class="Asia" rowspan="2" colspan="1">24<table align=center class="'.$landowner[24].'"><td>'.$nosoldiers[24].'</td></table></td>
<td>.</td>
</tr>
<tr>
<td>.</td>
<td class="N_America" rowspan="3" colspan="1">3<table align=center class="'.$landowner[3].'"><td>'.$nosoldiers[3].'</td></table></td>
<td class="N_America" rowspan="3" colspan="4">4<table align=center class="'.$landowner[4].'"><td>'.$nosoldiers[4].'</td></table></td>
<td class="Europe">12<table align=center class="'.$landowner[12].'"><td>'.$nosoldiers[12].'</td></table></td>
<td class="bridge">-</td>
<td class="Asia">25<table align=center class="'.$landowner[25].'"><td>'.$nosoldiers[25].'</td></table></td>
<td>.</td>
</tr>
<tr>
<td>.</td><td>.</td><td>.</td>
<td class="bridge" rowspan="1" colspan="2">-</td>
<td class="Europe" rowspan="2" colspan="1">15<table align=center class="'.$landowner[15].'"><td>'.$nosoldiers[15].'</td></table></td>
<td class="Asia" rowspan="3" colspan="2">29<table align=center class="'.$landowner[29].'"><td>'.$nosoldiers[29].'</td></table></td>
<td>.</td><td>.</td>
</tr>
<tr>
<td>.</td><td>.</td><td>.</td><td>.</td><td>.</td>
<td class="Europe" rowspan="1" colspan="2">17<table align=center class="'.$landowner[17].'"><td>'.$nosoldiers[17].'</td></table></td>
<td class="Asia" colspan="2" rowspan="1">27<table align=center class="'.$landowner[27].'"><td>'.$nosoldiers[27].'</td></table></td>
<td>.</td><td>.</td>
</tr>
<tr>
<td>.</td><td>.</td><td>.</td>
<td class="N_America" rowspan="2" colspan="2">5<table align=center class="'.$landowner[5].'"><td>'.$nosoldiers[5].'</td></table></td>
<td class="N_America" rowspan="2" colspan="2">6<table align=center class="'.$landowner[6].'"><td>'.$nosoldiers[6].'</td></table></td>
<td>.</td><td>.</td><td>.</td>
<td class="Europe" rowspan="2" colspan="1">16<table align=center class="'.$landowner[16].'"><td>'.$nosoldiers[16].'</td></table></td>
<td class="Europe" rowspan="1" colspan="3">18<table align=center class="'.$landowner[18].'"><td>'.$nosoldiers[18].'</td></table></td>
<td class="Asia" rowspan="4" colspan="2">26<table align=center class="'.$landowner[26].'"><td>'.$nosoldiers[26].'</td></table></td>
<td class="Asia" rowspan="5" colspan="1">28<table align=center class="'.$landowner[28].'"><td>'.$nosoldiers[28].'</td></table></td>
<td>.</td><td>.</td>
</tr>
<tr>
<td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td>
<td class="bridge">-</td>
<td>.</td>
<td class="Asia" rowspan="3" colspan="1">30<table align=center class="'.$landowner[30].'"><td>'.$nosoldiers[30].'</td></table></td>
<td>.</td><td>.</td><td>.</td>
</tr>
<tr>
<td>.</td><td>.</td><td>.</td><td>.</td>
<td class="N_America" rowspan="2" colspan="2">7<table align=center class="'.$landowner[7].'"><td>'.$nosoldiers[7].'</td></table></td>
<td>.</td><td>.</td><td>.</td><td>.</td>
<td class="Africa" rowspan="4" colspan="1">31<table align=center class="'.$landowner[31].'"><td>'.$nosoldiers[31].'</td></table></td>
<td class="Africa" rowspan="1" colspan="3">32<table align=center class="'.$landowner[32].'"><td>'.$nosoldiers[32].'</td></table></td>
<td>.</td><td>.</td><td>.</td>
</tr>
<tr>
<td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td>
<td class="Africa" rowspan="2" colspan="3">33<table align=center class="'.$landowner[33].'"><td>'.$nosoldiers[33].'</td></table></td>
<td class="bridge">-</td>
<td>.</td><td>.</td>
</tr>
<tr>
<td>.</td><td>.</td><td>.</td><td>.</td>
<td class="S_America" rowspan="1" colspan="3">8<table align=center class="'.$landowner[8].'"><td>'.$nosoldiers[8].'</td></table></td>
<td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td>
<td class="Oceania">36<table align=center class="'.$landowner[36].'"><td>'.$nosoldiers[36].'</td></table></td>
<td class="Oceania">37<table align=center class="'.$landowner[37].'"><td>'.$nosoldiers[37].'</td></table></td>
<td>.</td>
</tr>
<tr>
<td>.</td><td>.</td><td>.</td><td>.</td>
<td class="S_America" rowspan="2" colspan="2">10<table align=center class="'.$landowner[10].'"><td>'.$nosoldiers[10].'</td></table></td>
<td class="S_America" rowspan="3" colspan="3">9<table align=center class="'.$landowner[9].'"><td>'.$nosoldiers[9].'</td></table></td>
<td class="bridge">-</td>
<td class="Africa" rowspan="2" colspan="1">34<table align=center class="'.$landowner[34].'"><td>'.$nosoldiers[34].'</td></table></td>
<td class="Africa" rowspan="3" colspan="2">35<table align=center class="'.$landowner[35].'"><td>'.$nosoldiers[35].'</td></table></td>
<td>.</td><td>.</td><td>.</td><td>.</td>
<td class="Oceania" rowspan="2" colspan="1">38<table align=center class="'.$landowner[38].'"><td>'.$nosoldiers[38].'</td></table></td>
<td class="Oceania" rowspan="2" colspan="1">39<table align=center class="'.$landowner[39].'"><td>'.$nosoldiers[39].'</td></table></td>
<td>.</td>
</tr>
<tr>
<td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td>
<td>.</td><td>.</td><td>.</td>
</tr>
<tr>
<td>.</td><td>.</td><td>.</td><td>.</td><td>.</td>
<td class="S_America" rowspan="3" colspan="1">11<table align=center class="'.$landowner[11].'"><td>'.$nosoldiers[11].'</td></table></td>
<td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td>
<td>.</td><td>.</td>
</tr>
<tr>
<td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td>
<td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td>
<td>.</td><td>.</td><td>.</td><td>.</td>
</tr>
<tr>
<td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td>
<td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td>
<td>.</td><td>.</td><td>.</td><td>.</td>
</tr>
</table>
<p>made by <a href="mailto:ferrin@arrakis.es">gatopeich</a>
for <a href="http://www.codewalkers.com">Codewalkers</a>\' PHP \'Risk\' contest.</p>
';
echo $mapOutline;
}
?>
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |
More Contest Code Articles
More By Codewalkers
developerWorks - FREE Tools! |
This whitepaper presents the benefits of successfully introducing static analysis into your organization using IBM Rational Software Analyzer. Additionally, it identifies some common pitfalls that can hinder the effective use of static analysis tooling as well as presents 10 simple strategies designed to help you quickly realize the value of static analysis using Rational Software Analyzer. FREE! Go There Now!
|
|
|
|
Learn to enable users to both rate existing animations and to combine existing animations into new snippets. This is the third in a series of three tutorials that chronicle the building of a site that enables collaborative discussion and animation building using Domino and OpenLaszlo. FREE! Go There Now!
|
|
|
|
CakePHP is a stable production-ready, rapid-development aid for building Web sites in PHP. This "Cook up Web sites fast with CakePHP" series shows you how to build an online product catalog using CakePHP. FREE! Go There Now!
|
|
|
|
Join us for this on demand webcast to learn about developing complex systems more quickly and efficiently. We'll cover market drivers for developing, governing and reusing systems software assets and how you can develop system software assets with Rational Asset Manager. FREE! Go There Now!
|
|
|
|
Visit IBM developerWorks to download a free trial of the latest release of IBM Lotus Sametime Standard V8.0. Lotus Sametime Standard V8.0 is a platform for unified communications and collaboration that combines security features with an extensible, open solution including integrated Voice over IP, geographic location awareness, mobile clients, and a robust Business Partner community offering telephony and video integration. FREE! Go There Now!
|
|
|
|
As systems increase in complexity, communication between systems and software teams becomes more and more difficult. Now, there’s a way to improve product quality and communication.<br />Read the “Model Driven Systems Development” white paper to see how. Also included in this kit are more educational white papers, customer examples, tutorials, informative Webcasts, and best practices for designing, building and managing systems.<br /> FREE! Go There Now!
|
|
|
|
Listen to this webcast to get an overview of Info 2.0 and a technical demo of how to quickly build an enterprise mashup. IBM's Info 2.0 technology leverages emerging Web 2.0 technologies such as mashups, feeds, AJAX, and JSON in order to simplify assembly of information using feeds and services. Come learn about the technical elements of Info 2.0 including the Feed Generation framework, Mashup Engine, and mashup assembly components. Learn how to pull information from databases, departmental information, and the Web to create mashups critical to your company’s success. We will also discuss best practices to help you get started. FREE! Go There Now!
|
|
|
|
Join this Rational Talks to You teleconference on December 6 at 1:00 pm ET to participate in an agile application development discussion and get your questions answered on using IBM Rational Method Composer in a distributed environment.Get your questions answered! FREE! Go There Now!
|
|
|
|
You can now evaluate IBM Rational Asset Manager V7.0 online without installing or configuring it on your own system! Rational Asset Manager helps create, modify, govern, find, and reuse any type of development assets, including SOA and systems development assets. Rational Asset Manager helps you reduce software development costs and improve quality by facilitating the reuse of all types of software development-related assets. Visit developerWorks to learn more about this product and register to explore its capabilities online. FREE! Go There Now!
|
|
|
|
In this webcast, you'll get an introduction to the eXtreme Transaction Processing (XTP) features of WebSphere Extended Deployment and the common architectural traits required by XTP applications. See how WebSphere Extended Deployment's ObjectGrid feature provides a state-of-the-art infrastructure for hosting XTP applications. FREE! Go There Now!
|
|
|
|
All FREE IBM® developerWorks Tools! |