cno/dir/, cno/dir?p=x --> cno/dir/?p=x $cno = "/modulaware.com"; IF ( !strncasecmp ($cno, $REQUEST_URI, strlen($cno)) ){ header ("Location: http://www." . substr($REQUEST_URI, 1, strlen($REQUEST_URI))); exit; } /* Simple PHP website ring script written by g. dotzel, http://www.modulaware.com/mwcont.htm , 08-Oct-2002 for the Modula-2 ring at http://www.modulAware.com/m2wr/ This script is freeware, because it is so simple! Do whatever you want with it at your own risk. It would be nice if you make a link back to modula-2 website ring (something like "php ring script based on Modula-2 ring script), but it is not required. Adding ring member sites must be done manually by the ringmaster. so this script is not well suited without modification for a website ring which is growing fast. To add a new site to a ring using this script is about 3 minutes of work, but the new site must be verified for content anyway which also costs time. The advantage of this simple script is, that it does not need any database not file write access on the server. Installation and use: ===================== 1. To customize this script for other website rings: 1.1. Adapt the website ring name below. (this name is only used for the case that you want to handle more than one website ring with the same script.) 1.2. Adapt the number of websites in ring. 1.3. Adapt the URLs of member sites. 1.4. Adapt website URLs and site descriptions for your ring in file list.php 2. Upload this file as index.php to your ring home directory, e.g.: to www.mydomain.com/myring 3. Provide the ring members with their unique ring-id (1, 2, ...) and tell them to include the navigation code (see hub.php) in their page. 4. Start navigating your ring at http://www.mydomain.com/myring/ The files list.php and hub.php included below only contain static HTML-code. You can get these files at http://www.modulAware.com/m2wr/list.php http://www.modulAware.com/m2wr/hub.php save them to your computer, modify them according to your needs and upload to www.mydomain.com/myring */ // adapt first website ring name: IF ($ring == "modula2") { IF ($m == "hub") echo include ("list.php"); ELSEIF ($m == "addsite") include ("hub.php"); ELSEIF (($m == "random")|| ($m == "prev") || ($m == "next")) { // adapt number of websites in ring: $maxsite = 17; IF ($m == "random") { srand ((double) microtime() * 1000000); $id = rand(1, $maxsite); } ELSE { IF ($m == "prev") $id = $id - 1; IF ($m == "next") $id = $id + 1; IF ($id == 0) $id = $maxsite; IF ($id == ($maxsite+1)) $id = 1; } // adapt or add website URLs: IF ($id == 1) { header ("Location: http://www.modulaware.com/"); exit; } ELSEIF ($id == 2) { header ("Location: http://sc22wg13.twi.tudelft.nl/"); exit; } ELSEIF ($id == 3) { header ("Location: http://www.mathematik.uni-ulm.de/modula/"); exit; } ELSEIF ($id == 4) { header ("Location: http://www.info.uni-karlsruhe.de/~modula/"); exit; } ELSEIF ($id == 5) { header ("Location: http://www.arjay.bc.ca/Modula-2/m2faq.html"); exit; } ELSEIF ($id == 6) { header ("Location: http://www.designtools.co.nz/mod51.htm"); exit; } ELSEIF ($id == 7) { // header ("Location: http://www.fruttenboel.tomaatnet.nl/modula-2/"); exit; echo 'Modula-2 ring placeholder for non-functional member sites

Modula-2 ring placeholder for non-functional member sites

The ring navigator on www.fruttenboel.tomaatnet.nl/modula-2/ is not functional. The owner of the site was notified but did not yet correct the error.

Please continue to navigate to other sites of the Modula-2 ring:

List all | Random | << Prev | Next >> | Join '; exit; } ELSEIF ($id == 8) { header ("Location: http://www.uranus.ru/links.html"); exit; } ELSEIF ($id == 9) { header ("Location: http://www.mhccorp.com/modjava.shtml"); exit; } ELSEIF ($id == 10) { header ("Location: http://freepages.modula2.org"); exit; } ELSEIF ($id == 11) { header ("Location: http://www.arjay.bc.ca/Modula-2/index.htm"); exit; } ELSEIF ($id == 12) { header ("Location: http://www.scifac.ru.ac.za/cspt/modula2.htm"); exit; } ELSEIF ($id == 13) { header ("Location: http://www.excelsior-usa.com/xds.html"); exit; } ELSEIF ($id == 14) { header ("Location: http://www.modula2.org"); exit; } ELSEIF ($id == 15) { header ("Location: http://www.cfbsoftware.com/modula2/"); exit; } ELSEIF ($id == 16) { header ("Location: http://linux.aliboom.com:8000/index.html"); exit; } ELSEIF ($id == 17) { header ("Location: http://www.sysecol.ethz.ch/RAMSES/"); exit; } ELSE { include ("hub.php"); } } } // END first website ring // adapt second website name ring name if any: ELSEIF ($ring == "another_website_ring") { /* use same code as above */ } // END second website ring ELSE { include ("hub.php"); } ?>