Contest Code
  Home arrow Contest Code arrow Risk map output
Codewalker Forums 
  Tutorials  
Database Articles  
Miscellaneous  
Navigation Usability  
PEAR Articles  
Programming Basics  
Server Administration  
XML Tutorials  
  Reviews  
Database Book Reviews  
Linux Book Reviews  
Miscellaneous Reviews  
PHP Book Reviews  
PHP Software Reviews  
Server Admin Reviews  
SQL Tool Reviews  
  Code Gallery  
Content Management Code  
Contest Code  
Counters Code  
Database Code  
Date Time Code  
Discussion Board Code  
Email Code  
File Manipulation Code  
GUI Code  
Link Farm Code  
Miscellaneous Code  
Search Code  
Site Navigation Code  
User Management Code  
Forums Sitemap 
Dedicated Servers  
Download TestComplete 
IBM® developerWorks
Weekly Newsletter 
 
Developer Updates  
Free Website Content 
IBM Developerworks
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
CONTEST CODE

Risk map output
By: Codewalkers
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2003-07-03

    Table of Contents:

    Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Route your faxes to your email inbox. Private, secure fax numbers available from CallWave. Choose your fax number.

    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

     

    IBM® developerWorks developerWorks - FREE Tools!


    NEW! Cook up Web sites fast with CakePHP, Part 1: Adding related information and services

    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!


    NEW! Evaluate IBM Lotus Sametime Standard V8.0

    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!


    NEW! Evaluate WebSphere Extended Deployment Compute Grid V6.1

    Visit IBM developerWorks to download a free trial version of WebSphere Extended Deployment Compute Grid, which lets you schedule, execute, and monitor batch jobs. Because online transaction processing and batch jobs execute simultaneously on the same server resources, you can avoid costly duplication of resources. Compute Grid supports job types of Java transactional batch, compute-intensive and a new type called "native execution", which enables non-Java workloads to run on distributed end points.
    FREE! Go There Now!


    NEW! Expand the editing capabilities of OpenOffice with XSLT

    You might know that you can pull XML data into OpenOffice's spreadsheet program, Calc, but did you know that you can create a filter to make word-processing documents out of data stored as XML? This tutorial shows you how to use OpenOffice's import/export filters to open your XML data as though it's just a plain document. From there, users can edit the document much more naturally and then save it back to its native format. You can also use this feature to easily turn your documents into XML data.
    FREE! Go There Now!


    NEW! Implement new security capabilities in DB2 9.5, Part 2: Understanding trusted contexts

    IBM DB2 9.5 provides new options for tighter security, and allows for more granularity and flexibility in administration of the database. This tutorial is the second of two tutorials that cover roles and trusted contexts. Follow the exercises in this tutorial, and learn how to take advantage of the new DB2 feature trusted contexts in combination with other essential e-business technologies such as Web services, Web application server, and DB2 database server.
    FREE! Go There Now!


    NEW! Rational 'Talks to You' Teleconference Series

    This Fall, IBM Rational talks to you directly through a special teleconference series giving you access to the best minds in IBM Rational - product experts and market thought leaders who will answer your questions during these pre-scheduled telephone conference calls. Register today!
    FREE! Go There Now!


    NEW! Rational Talks to You: Scott Ambler on being agile in a global development environment

    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!


    NEW! Spot defects early with Continuous Integration

    Continuous Integration (or CI) is a process that consists of continuously compiling, testing, inspecting, and deploying source code. In many Continuous Integration environments, this means running a new build anytime code within a source code management repository changes. The benefit of CI is simple: assembling software often greatly increases the likelihood that you will spot defects early, when they still are relatively manageable. In this tutorial, a companion to his series In pursuit of code quality, Andrew Glover introduces the fundamental aspects of Continuous Integration and steps you through how to set up a CI process using best-of-breed open source technologies.
    FREE! Go There Now!


    NEW! Trial download: IBM Informix Dynamic Server Express Edition V11.0

    Informix Dynamic Server (IDS) Express Edition offers outstanding online transaction processing (OLTP) database performance, while helping to simplify and automate many of the tasks associated with deploying databases for small business applications. IDS 11 further extends the ease of management and applications integration with the Admin API and Scheduler, high availability with Continuous Log Restore for backup server recovery in case of a primary server failure, and column level encryption to protect personal and company private data.
    FREE! Go There Now!


    NEW! Trial download: IBM Rational Tester for SOA Quality V7.0.1

    Get a free trial download of the latest version of IBM Rational Tester for SOA Quality V7.0.1, a functional and regression testing tool that enables the creation, comprehension, modification and execution of testing GUI-less Web services.
    FREE! Go There Now!



    All FREE IBM® developerWorks Tools!

    CONTEST CODE ARTICLES

    - Visual Map Editor And Generator
    - Corridors map generator
    - PHP-JAVA Class Code Generator
    - Risk - print_map($game, $some_array_of_size_...
    - Risk: The Original ShowGame/Map
    - Showgame2
    - Risk map output
    - CTF-Judge, better "auto" controls
    - Capture The Flag -- The JUDGE


     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway