You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(49) |
Sep
(25) |
Oct
(2) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(24) |
Nov
(50) |
Dec
(4) |
2004 |
Jan
(2) |
Feb
(2) |
Mar
(5) |
Apr
|
May
(10) |
Jun
|
Jul
(10) |
Aug
(22) |
Sep
(10) |
Oct
|
Nov
(57) |
Dec
(5) |
2005 |
Jan
(24) |
Feb
(12) |
Mar
|
Apr
|
May
(3) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
(9) |
May
(5) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: <il...@pr...> - 2004-09-18 01:31:53
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6111 Modified Files: footer.inc Log Message: The mesh db has been published in 2003 and 2004. Index: footer.inc =================================================================== RCS file: /cvsroot/meshdb/www/db2/footer.inc,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- footer.inc 7 Oct 2002 11:06:02 -0000 1.2 +++ footer.inc 18 Sep 2004 01:31:45 -0000 1.3 @@ -16,4 +16,4 @@ ?> <a href="../">Brisbane Mesh home</a> <br> -<a href="../copyright.html">© 2002</a> +<a href="../copyright.html">© 2002-2004</a> |
From: <il...@pr...> - 2004-09-16 22:59:40
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24541 Modified Files: map2d.inc Log Message: We need to shift the coordinates on the location map to make them appear correctly. Index: map2d.inc =================================================================== RCS file: /cvsroot/meshdb/www/db2/map2d.inc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- map2d.inc 22 Oct 2003 04:52:52 -0000 1.3 +++ map2d.inc 16 Sep 2004 22:59:23 -0000 1.4 @@ -59,7 +59,7 @@ $postproc = "| djpeg | bin/pnmscale -xysize ${w} ${h} | bin/pnmtopng"; } else if ($src == "local") { /* Local map stuff */ - list($lat,$lon) = cvtlatlon($e,$n,$noshift=1); + list($lat,$lon) = cvtlatlon($e,$n); $sc = intval(1.0/doubleval($s)); $cmd = "(cd ../mapdata && ./bin/psplot -g${w}x${h} -- $lat $lon $sc < templ.ps" ."| ./bin/gdps -g${w}x${h} > $tmpfile ) 2>$errfile"; |
From: <il...@pr...> - 2004-09-16 22:58:55
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24300 Modified Files: map2b.php Log Message: Removed the old hard-coded shift hack. Index: map2b.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/map2b.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- map2b.php 9 May 2004 03:32:30 -0000 1.6 +++ map2b.php 16 Sep 2004 22:58:47 -0000 1.7 @@ -92,7 +92,7 @@ else $type = "x"; - list($x, $y) = coord($row["e"] + 100, $row["n"] + 300); + list($x, $y) = coord($row["e"], $row["n"]); /* echo "x=$x y=$y type=$type\n"; */ |
From: <il...@pr...> - 2004-09-16 22:58:28
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24204 Modified Files: util.php Log Message: Do the coordinate shifting the right way around. Index: util.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/util.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- util.php 10 Aug 2002 03:33:55 -0000 1.1.1.1 +++ util.php 16 Sep 2004 22:58:16 -0000 1.2 @@ -18,7 +18,7 @@ $N1 = doubleval($N); $latlon = mybacktick("bin/rf -F \"%l %L\" -z $ZONE -g $E1 $N1 2>&1"); if (!$noshift) - $latlon = mybacktick("bin/shift -r -S ${SHIFTFILE} -- $latlon"); + $latlon = mybacktick("bin/shift -S ${SHIFTFILE} -- $latlon"); list($Lat,$Lon) = split(" ", $latlon, 2); $Lat = doubleval($Lat); $Lon = doubleval($Lon); @@ -31,7 +31,7 @@ return array("",""); $Lat = doubleval($Lat); $Lon = doubleval($Lon); - $latlon = mybacktick("bin/shift -S ${SHIFTFILE} -- $Lat $Lon"); + $latlon = mybacktick("bin/shift -r -S ${SHIFTFILE} -- $Lat $Lon"); $enz = mybacktick("bin/rf -F \"%e %n %z\" -l $latlon 2>&1"); list($E,$N,$Z) = split(" ", $enz, 3); if ($Z != $ZONE) |
From: <ma...@pr...> - 2004-08-29 14:31:37
|
Update of /cvsroot/meshdb/www/ipdb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1744 Modified Files: index.php iprequest.php login.php nodes.php pods.php zones.php Log Message: added login/logout, cleaned up include file handling, added auth roles Index: index.php =================================================================== RCS file: /cvsroot/meshdb/www/ipdb/index.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- index.php 28 Aug 2004 14:35:38 -0000 1.2 +++ index.php 29 Aug 2004 14:31:24 -0000 1.3 @@ -1,3 +1,4 @@ +<?php include_once("include/globals.php"); ?> <html><!-- InstanceBegin template="/Templates/default.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <!-- InstanceBeginEditable name="doctitle" --> @@ -13,15 +14,6 @@ <link rel="SHORTCUT ICON" href="images/mesh-favico.ico"> <!-- InstanceEndEditable --> </head> -<?php include_once("include/variables.php"); ?> -<?php include_once("include/stringutils.php"); ?> -<?php - $pageName = after_last("/", getServerVariable("PHP_SELF")); - if ($pageName != "login.php") { - session_start(); - setSessionVariable("cookieTest", "OK"); - } -?> <body> <table width="100%" border="1" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> @@ -55,18 +47,19 @@ <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="zones.php">Browse</a></font></div></td> </tr> + <?php if (issetSessionVariable("username") && isUserInRole(getSessionVariable("username"), "admin")) { ?> <tr> - <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Administration</font></div></td> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="admin.php">Administration</a></font></div></td> </tr> + <?php } ?> <?php if (issetSessionVariable("username")) { ?> <tr> - <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Log - Out</font></div></td> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="logout.php">Logout</a></font></div></td> </tr> <?php } else { ?> <tr> - <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Log - In</font></div></td> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="login.php">Log + In</a></font></div></td> </tr> <?php } ?> </table> Index: iprequest.php =================================================================== RCS file: /cvsroot/meshdb/www/ipdb/iprequest.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- iprequest.php 28 Aug 2004 14:35:38 -0000 1.2 +++ iprequest.php 29 Aug 2004 14:31:24 -0000 1.3 @@ -1,3 +1,4 @@ +<?php include_once("include/globals.php") ?> <?php if ($_POST['Submit'] = 'Submit') { Index: login.php =================================================================== RCS file: /cvsroot/meshdb/www/ipdb/login.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- login.php 28 Aug 2004 14:35:38 -0000 1.2 +++ login.php 29 Aug 2004 14:31:24 -0000 1.3 @@ -1,25 +1,35 @@ +<?php include_once("include/globals.php") ?> <?php // authenticate the user & create the session cookie - include_once("include/variables.php"); - include_once("include/stringutils.php"); - if (getServerVariable("REQUEST_METHOD") == "POST") { - session_start(); - if (getRequestVariable("username") == "test") { - setSessionVariable("username", getRequestVariable("username")); + if (getServerVariable("REQUEST_METHOD") == "POST" && getRequestVariable("username") != "") { + // lookup password for username + mysql_select_db($database_meship, $meship); + $query_password = sprintf("SELECT * FROM auth WHERE userid='%s'", getRequestVariable("username")); + $password = mysql_query($query_password, $meship) or die(mysql_error()); + $row_password = mysql_fetch_assoc($password); + $totalRows_password = mysql_num_rows($password); + if (($totalRows_password == 1) && $row_password['password'] == getRequestVariable("password")) { + // start session (maybe change expiry for "remember me") + session_start(); + // login succeeded + setSessionVariable("username", getRequestVariable("username")); // redirect to home page header("Location: http://" . getServerVariable("HTTP_HOST") . dirname(getServerVariable("PHP_SELF")) . "/index.php"); } else { + // start session (maybe change expiry fot "remember me") + session_start(); // user failed authentication unsetSessionVariable("username"); - setSessionVariable("errorMessage", "Your login details are incorrect! (bwarp bwarp)"); + // error message + setSessionVariable("errorMessage", "Your login details are incorrect!"); } - } ?> -<html><!-- InstanceBegin template="/Templates/default.dwt.php" codeOutsideHTMLIsLocked="false" --> +<html> +<!-- InstanceBegin template="/Templates/default.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> -<!-- InstanceBeginEditable name="doctitle" --> +<!-- InstanceBeginEditable name="doctitle" --> <title>Untitled Document</title> <!-- InstanceEndEditable --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> @@ -27,39 +37,27 @@ <link rel="SHORTCUT ICON" href="images/mesh-favico.ico"> <!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --> </head> -<?php include_once("include/variables.php"); ?> -<?php include_once("include/stringutils.php"); ?> -<?php - $pageName = after_last("/", getServerVariable("PHP_SELF")); - if ($pageName != "login.php") { - session_start(); - setSessionVariable("cookieTest", "OK"); - } -?> <body> <table width="100%" border="1" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> <td width="203" bgcolor="#FFFFFF"> <div align="center"><img src="images/mesh-small.gif" width="137" height="86"></div></td> <!-- InstanceBeginEditable name="banner" --> - <td bordercolor="#FFFFFF" bgcolor="#FFFFFF"> - <h2>Authentication</h2></td> + <td bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <h2>Authentication</h2></td> <!-- InstanceEndEditable --> </tr> <tr> <td width="203" valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Client IP: <?php echo getServerVariable("REMOTE_ADDR"); ?></font></div></td> - <td valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"> - <div align="right"> - <?php if (issetSessionVariable("username")) { ?> - <font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged - in as <strong><?php echo getSessionVariable("username"); ?></strong> <a href="logout.php">[log out] - </a></font> - <?php } else { ?> - <font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged - in as <strong>nobody</strong> <a href="login.php">[log in]</a></font> - <?php } ?> - </div> - </td> + <td valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"> <div align="right"> + <?php if (issetSessionVariable("username")) { ?> + <font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged + in as <strong><?php echo getSessionVariable("username"); ?></strong> <a href="logout.php">[log + out] </a></font> + <?php } else { ?> + <font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged + in as <strong>nobody</strong> <a href="login.php">[log in]</a></font> + <?php } ?> + </div></td> </tr> <tr> <td width="203" valign="top" bgcolor="#FFFFFF"> <div align="center"> @@ -70,37 +68,29 @@ <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="zones.php">Browse</a></font></div></td> </tr> + <?php if (issetSessionVariable("username") && isUserInRole(getSessionVariable("username"), "admin")) { ?> <tr> - <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Administration</font></div></td> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="admin.php">Administration</a></font></div></td> </tr> + <?php } ?> <?php if (issetSessionVariable("username")) { ?> <tr> - <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Log - Out</font></div></td> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="logout.php">Logout</a></font></div></td> </tr> <?php } else { ?> <tr> - <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Log - In</font></div></td> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="login.php">Log + In</a></font></div></td> </tr> <?php } ?> </table> </div></td> <!-- InstanceBeginEditable name="body" --> - <td valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> - <p align="center"> <font color="#FF0000" face="Times New Roman, Times, serif"> - <em> - <?php if (issetSessionVariable('errorMsg')) { echo getSessionVariable('errorMsg'); } else { echo " "; } ?> - </em> </font> </p> - <form name="login" method="post" action="login.php"> - <?php - if (!issetSessionVariable('cookieTest')) { - ?> - <p align="center"><em><strong>Please enable cookies in your browser.</strong></em></p> - <?php - } - ?> - </div> + <td valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <form name="login" method="post" action="login.php"> + <p align="center"> </p> + <p align="center"><em> + <?php if (issetSessionVariable("errorMessage")) { echo getSessionVariable("errorMessage"); } else { echo " "; } ?> + </em></p> <table align="center"> <tr> <td><font face="Times New Roman, Times, serif">Username:</font><font face="Arial, Helvetica, sans-serif"> </font></td> @@ -127,9 +117,20 @@ </font></td> </tr> </table> + <p> + <?php + if (!issetSessionVariable("cookieTest")) { + ?> + </p> + <p align="center"><em>Warning: this site requires cookies to be enabled + in your browser.</em></p> + <?php + } + ?> </form> <p> </p></td> <!-- InstanceEndEditable --> </tr> </table> </body> -<!-- InstanceEnd --></html> \ No newline at end of file +<!-- InstanceEnd --> +</html> Index: nodes.php =================================================================== RCS file: /cvsroot/meshdb/www/ipdb/nodes.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- nodes.php 28 Aug 2004 14:35:38 -0000 1.2 +++ nodes.php 29 Aug 2004 14:31:24 -0000 1.3 @@ -1,5 +1,4 @@ -<?php require_once('Connections/meship.php'); ?> -<?php require_once('include/network.php'); ?> +<?php include_once("include/globals.php") ?> <?php $colzone_nodes = "1"; if (isset($HTTP_GET_VARS['zone'])) { @@ -50,15 +49,6 @@ <link rel="SHORTCUT ICON" href="images/mesh-favico.ico"> <!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --> </head> -<?php include_once("include/variables.php"); ?> -<?php include_once("include/stringutils.php"); ?> -<?php - $pageName = after_last("/", getServerVariable("PHP_SELF")); - if ($pageName != "login.php") { - session_start(); - setSessionVariable("cookieTest", "OK"); - } -?> <body> <table width="100%" border="1" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> @@ -93,18 +83,19 @@ <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="zones.php">Browse</a></font></div></td> </tr> + <?php if (issetSessionVariable("username") && isUserInRole(getSessionVariable("username"), "admin")) { ?> <tr> - <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Administration</font></div></td> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="admin.php">Administration</a></font></div></td> </tr> + <?php } ?> <?php if (issetSessionVariable("username")) { ?> <tr> - <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Log - Out</font></div></td> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="logout.php">Logout</a></font></div></td> </tr> <?php } else { ?> <tr> - <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Log - In</font></div></td> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="login.php">Log + In</a></font></div></td> </tr> <?php } ?> </table> Index: pods.php =================================================================== RCS file: /cvsroot/meshdb/www/ipdb/pods.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- pods.php 28 Aug 2004 14:35:38 -0000 1.2 +++ pods.php 29 Aug 2004 14:31:24 -0000 1.3 @@ -1,5 +1,4 @@ -<?php require_once('Connections/meship.php'); ?> -<?php require_once('include/network.php'); ?> +<?php include_once("include/globals.php"); ?> <?php $colname_zone = "1"; if (isset($HTTP_GET_VARS['zone'])) { @@ -37,15 +36,6 @@ <link rel="SHORTCUT ICON" href="images/mesh-favico.ico"> <!-- InstanceEndEditable --> </head> -<?php include_once("include/variables.php"); ?> -<?php include_once("include/stringutils.php"); ?> -<?php - $pageName = after_last("/", getServerVariable("PHP_SELF")); - if ($pageName != "login.php") { - session_start(); - setSessionVariable("cookieTest", "OK"); - } -?> <body> <table width="100%" border="1" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> @@ -81,18 +71,19 @@ <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="zones.php">Browse</a></font></div></td> </tr> + <?php if (issetSessionVariable("username") && isUserInRole(getSessionVariable("username"), "admin")) { ?> <tr> - <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Administration</font></div></td> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="admin.php">Administration</a></font></div></td> </tr> + <?php } ?> <?php if (issetSessionVariable("username")) { ?> <tr> - <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Log - Out</font></div></td> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="logout.php">Logout</a></font></div></td> </tr> <?php } else { ?> <tr> - <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Log - In</font></div></td> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="login.php">Log + In</a></font></div></td> </tr> <?php } ?> </table> Index: zones.php =================================================================== RCS file: /cvsroot/meshdb/www/ipdb/zones.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- zones.php 28 Aug 2004 14:35:38 -0000 1.2 +++ zones.php 29 Aug 2004 14:31:24 -0000 1.3 @@ -1,5 +1,4 @@ -<?php require_once('Connections/meship.php'); ?> -<?php require_once('include/network.php'); ?> +<?php include_once("include/globals.php"); ?> <?php mysql_select_db($database_meship, $meship); $query_zones = "SELECT * FROM `zone`"; @@ -17,15 +16,6 @@ <link rel="SHORTCUT ICON" href="images/mesh-favico.ico"> <!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --> </head> -<?php include_once("include/variables.php"); ?> -<?php include_once("include/stringutils.php"); ?> -<?php - $pageName = after_last("/", getServerVariable("PHP_SELF")); - if ($pageName != "login.php") { - session_start(); - setSessionVariable("cookieTest", "OK"); - } -?> <body> <table width="100%" border="1" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> @@ -59,18 +49,19 @@ <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="zones.php">Browse</a></font></div></td> </tr> + <?php if (issetSessionVariable("username") && isUserInRole(getSessionVariable("username"), "admin")) { ?> <tr> - <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Administration</font></div></td> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="admin.php">Administration</a></font></div></td> </tr> + <?php } ?> <?php if (issetSessionVariable("username")) { ?> <tr> - <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Log - Out</font></div></td> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="logout.php">Logout</a></font></div></td> </tr> <?php } else { ?> <tr> - <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Log - In</font></div></td> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="login.php">Log + In</a></font></div></td> </tr> <?php } ?> </table> |
From: <ma...@pr...> - 2004-08-29 14:31:33
|
Update of /cvsroot/meshdb/www/ipdb/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1744/include Added Files: authroles.php globals.php Log Message: added login/logout, cleaned up include file handling, added auth roles --- NEW FILE: authroles.php --- <?php function getUserRoles($user) { global $meship; if (isset($user)) { /* get auth id */ $queryAuthId = sprintf("SELECT authid FROM auth WHERE userid = '%s'", $user); $authId = mysql_query($queryAuthId, $meship) or die(mysql_error()); $row_authId = mysql_fetch_assoc($authId); $totalRows_authId = mysql_num_rows($authId); if ($totalRows_authId == 1) { /* keep an array of roles */ $retVal = array(); /* get list of roles for this user */ $queryRoleList = sprintf("SELECT roleid FROM role_mappings WHERE authid = %s", $row_authId['authid']); $roleList = mysql_query($queryRoleList, $meship) or die(mysql_error()); $row_roleList = mysql_fetch_assoc($roleList); $totalRows_roleList = mysql_num_rows($roleList); if ($totalRows_roleList > 0) { do { $queryRoleDetail = sprintf("SELECT * FROM role_names WHERE roleid = %s ORDER BY name ASC", $row_roleList['roleid']); $roleDetail = mysql_query($queryRoleDetail, $meship) or die(mysql_error()); $row_roleDetail = mysql_fetch_assoc($roleDetail); $index_name = ""; if (isset($row_roleDetail['qualifier'])) { $index_name = $row_roleDetail['name'] . "-" . $row_roleDetail['qualifier']; } else { $index_name = $row_roleDetail['name']; } $retVal[$index_name] = $row_roleDetail; } while ($row_roleList = mysql_fetch_assoc($roleList)); } mysql_free_result($authId); mysql_free_result($roleDetail); mysql_free_result($roleList); return $retVal; } else { # user has no authid (ie. no entry in "auth" table) mysql_free_result($authId); #die ("the user '" . getSessionVariable("username") . "' does not exist"); return array(); } } else { # no user logged in # die ("no username in session (not logged in)"); return ""; } } function isUserInRole($user, $role, $qualifier=-1) { $roles = getUserRoles($user); if (isset($roles)) { if ($qualifier != -1) { $index_name = $role . "-" . $qualifier; } else { $index_name = $role; } return isset($roles[$index_name]); } else { return ""; // false } } function auth_check($role, $qualifier=-1) { if (!isUserInRole(getSessionVariable("username"), "admin")) { header("Location: http://" . getServerVariable("HTTP_HOST") . dirname(getServerVariable("PHP_SELF")) . "/index.php"); die("evil person detected!"); } } ?> --- NEW FILE: globals.php --- <?php require_once("Connections/meship.php"); ?> <?php require_once("include/network.php"); ?> <?php require_once("include/variables.php"); ?> <?php require_once("include/stringutils.php"); ?> <?php require_once("include/authroles.php"); ?> <?php /* the login page starts it's own session */ $pageName = after_last("/", getServerVariable("PHP_SELF")); if ($pageName != "login.php") { session_start(); /* login.php uses this to detect cookies */ setSessionVariable("cookieTest", "OK"); } ?> |
From: <ma...@pr...> - 2004-08-28 14:35:47
|
Update of /cvsroot/meshdb/www/ipdb/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15932/include Modified Files: network.php Added Files: stringutils.php variables.php Log Message: added some php utility functions, added html for login functionality --- NEW FILE: stringutils.php --- <? /* from: http://au2.php.net/manual/en/function.substr.php after ('@', 'bio...@on...'); returns 'online.ge' from the first occurrence of '@' before ('@', 'bio...@on...'); returns 'biohazard' from the first occurrence of '@' between ('@', '.', 'bio...@on...'); returns 'online' from the first occurrence of '@' after_last ('[', 'sin[90]*cos[180]'); returns '180]' from the last occurrence of '[' before_last ('[', 'sin[90]*cos[180]'); returns 'sin[90]*cos[' from the last occurrence of '[' between_last ('[', ']', 'sin[90]*cos[180]'); returns '180' from the last occurrence of '[' */ function after ($this, $inthat) { if (!is_bool(strpos($inthat, $this))) return substr($inthat, strpos($inthat,$this)+strlen($this)); }; function after_last ($this, $inthat) { if (!is_bool(strrevpos($inthat, $this))) return substr($inthat, strrevpos($inthat, $this)+strlen($this)); }; function before ($this, $inthat) { return substr($inthat, 0, strpos($inthat, $this)); }; function before_last ($this, $inthat) { return substr($inthat, 0, strrevpos($inthat, $this)); }; function between ($this, $that, $inthat) { return before($that, after($this, $inthat)); }; function between_last ($this, $that, $inthat) { return after_last($this, before_last($that, $inthat)); }; // USES function strrevpos($instr, $needle) { $rev_pos = strpos (strrev($instr), strrev($needle)); if ($rev_pos===false) return false; else return strlen($instr) - $rev_pos - strlen($needle); }; ?> --- NEW FILE: variables.php --- <? /* from http://www.massless.org/_tests/phpgetvars/?style=text */ /* VARIABLE FUNCTIONS */ /** * Returns the value of a variable from the globals collection. * * Returns the value of a variable from PHP global variables. * Accesses the value in a portable manner by testing for the presence * of the $_REQUEST object. * *@access public *@param string $strParam The name of the variable *@return string The value of the variable */ function getRequestVariable($strParam) { $value=""; if (!empty($_REQUEST)) { if (!empty($_REQUEST[$strParam])) {$value=$_REQUEST[$strParam];} } else { eval("global \$".$strParam."; \$value=\$".$strParam.";"); } return $value; } /** * Returns the value of a server variable from the globals collection. * * Returns the value of a server variable from PHP global variables. * Accesses the value in a portable manner by testing for the presence * of the $_SERVER object. * *@access public *@param string $strParam The name of the variable *@return string The value of the variable */ function getServerVariable($strParam) { $value=""; if (!empty($_SERVER)) { if (!empty($_SERVER[$strParam])) {$value=$_SERVER[$strParam];} } else { eval("global \$".$strParam."; \$value=\$".$strParam.";"); } return $value; } /** * Returns the value of a session variable from the globals collection. * * Returns the value of a session variable from PHP global variables. * Accesses the value in a portable manner by testing for the presence * of the $_SESSION object. * *@access public *@param string $strParam The name of the variable *@return string The value of the variable */ function getSessionVariable($strParam) { global $HTTP_SESSION_VARS; if (isset($_SESSION)) { if (isset($_SESSION[$strParam])) { return $_SESSION[$strParam]; } else {return false;} } else if (isset($HTTP_SESSION_VARS)) { if (isset($HTTP_SESSION_VARS[$strParam])) { return $HTTP_SESSION_VARS[$strParam]; } else {return false;} } } /** * Set the value of a session variable from the globals collection. * *@access public *@param string $strParam The name of the variable *@param string $value The value *@return void */ function setSessionVariable($strParam,$value) { global $HTTP_SESSION_VARS; if (isset($_SESSION)) { $_SESSION[$strParam]=$value; } else if (isset($HTTP_SESSION_VARS)) { eval("global \$".$strParam.";"); eval("\$".$strParam."=\"\";"); eval("\$".$strParam."= \"".$value."\";"); eval("session_register('".$strParam."');"); } } /** * Set the value of a session variable from the globals collection to some object. * *@access public *@param string $strParam The name of the variable *@param string $obj The object *@return void */ function setObjectInSession($strParam,$obj) { global $HTTP_SESSION_VARS; if (isset($_SESSION)) { $_SESSION[$strParam]=$obj; } else if (isset($HTTP_SESSION_VARS)) { $thisObj = $obj; $stringObj = serialize( $thisObj ); eval("global \$".$strParam.";"); eval("\$".$strParam."=\"\";"); eval("\$".$strParam."= \"\$stringObj\";"); eval("session_register('".$strParam."');"); } } /** * Get the value of a object in a session variable from the globals collection. * *@access public *@param string $strParam The name of the variable *@return object An object stored in session */ function getObjectFromSession($strParam) { global $HTTP_SESSION_VARS; if (isset($_SESSION)) { if (isset($_SESSION[$strParam])) { return $_SESSION[$strParam]; } else {return false;} } else if (isset($HTTP_SESSION_VARS)) { if (isset($HTTP_SESSION_VARS[$strParam])) { return unserialize($HTTP_SESSION_VARS[$strParam]); } else {return false;} } } /** * Unset the value of a session variable from the globals collection. * *@access public *@param string $strParam The name of the variable *@return void */ function unsetSessionVariable($strParam) { global $HTTP_SESSION_VARS; if (isset($_SESSION)) { if (isset($_SESSION[$strParam])) { unset($_SESSION[$strParam]); } else {return false;} } else if (isset($HTTP_SESSION_VARS)) { if (isset($HTTP_SESSION_VARS[$strParam])) { unset($HTTP_SESSION_VARS[$strParam]); } else {return false;} } } /** * Test for the existence of a session variable from the globals collection. * *@access public *@param string $strParam The name of the variable *@return boolean Whether the session variable exists */ function issetSessionVariable($strParam) { global $HTTP_SESSION_VARS; if (isset($_SESSION)) { if (isset($_SESSION[$strParam])) { return true; } else {return false;} } else if (isset($HTTP_SESSION_VARS)) { if (isset($HTTP_SESSION_VARS[$strParam])) { return true; } else {return false;} } } /** * Print all variables contained in the globals collection. */ function PrintAllServerVariables() { foreach($GLOBALS as $key=>$value) { print $key . " = " . $value . "<br />"; } } ?> Index: network.php =================================================================== RCS file: /cvsroot/meshdb/www/ipdb/include/network.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- network.php 1 Aug 2004 11:30:45 -0000 1.1 +++ network.php 28 Aug 2004 14:35:38 -0000 1.2 @@ -61,6 +61,7 @@ $first_bin = str_pad(decbin(ip2long($first)), 32, "0", STR_PAD_LEFT); $netmask_bin = str_pad(str_repeat("1", (integer)$netmask), 32, "0", STR_PAD_RIGHT); + $last_bin = ""; for ($i = 0; $i < 32; $i++) { if ($netmask_bin[$i] == "1") |
From: <ma...@pr...> - 2004-08-28 14:35:47
|
Update of /cvsroot/meshdb/www/ipdb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15932 Modified Files: index.php iprequest.php login.php nodes.php pods.php zones.php Log Message: added some php utility functions, added html for login functionality Index: index.php =================================================================== RCS file: /cvsroot/meshdb/www/ipdb/index.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- index.php 1 Aug 2004 11:30:44 -0000 1.1 +++ index.php 28 Aug 2004 14:35:38 -0000 1.2 @@ -11,30 +11,43 @@ <link href="css/style.css" rel="stylesheet" type="text/css"> <link rel="SHORTCUT ICON" href="images/mesh-favico.ico"> -<!-- InstanceEndEditable --> +<!-- InstanceEndEditable --> </head> - +<?php include_once("include/variables.php"); ?> +<?php include_once("include/stringutils.php"); ?> +<?php + $pageName = after_last("/", getServerVariable("PHP_SELF")); + if ($pageName != "login.php") { + session_start(); + setSessionVariable("cookieTest", "OK"); + } +?> <body> <table width="100%" border="1" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> - <td width="203" bgcolor="#FFFFFF"> - <div align="center"><img src="images/mesh-small.gif" width="137" height="86"></div></td> + <td width="203" bgcolor="#FFFFFF"> <div align="center"><img src="images/mesh-small.gif" width="137" height="86"></div></td> <!-- InstanceBeginEditable name="banner" --> <td><h1>Mesh IP Assignment</h1> </td><!-- InstanceEndEditable --> </tr> <tr> <td width="203" valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Client - IP: <?php echo $HTTP_SERVER_VARS['REMOTE_ADDR']; ?></font></div></td> - <td valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"><div align="right"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged - in as <strong> <a href="login.php"> - <?php if ($HTTP_SESSION_VARS['username']) { echo $HTTP_SESSION_VARS['username']; } else { echo "public"; } ?> - </a> </strong> </font></div></td> + IP: <?php echo getServerVariable("REMOTE_ADDR"); ?></font></div></td> + <td valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"> + <div align="right"> + <?php if (issetSessionVariable("username")) { ?> + <font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged + in as <strong><?php echo getSessionVariable("username"); ?></strong> <a href="logout.php">[log out] + </a></font> + <?php } else { ?> + <font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged + in as <strong>nobody</strong> <a href="login.php">[log in]</a></font> + <?php } ?> + </div> + </td> </tr> <tr> - <td width="203" valign="top" bgcolor="#FFFFFF"> - <div align="center"> - + <td width="203" valign="top" bgcolor="#FFFFFF"> <div align="center"> <table width="80%" border="0" cellpadding="2" cellspacing="2" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="index.php">Home</a></font></div></td> @@ -45,9 +58,17 @@ <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Administration</font></div></td> </tr> + <?php if (issetSessionVariable("username")) { ?> <tr> - <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Logout</font></div></td> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Log + Out</font></div></td> </tr> + <?php } else { ?> + <tr> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Log + In</font></div></td> + </tr> + <?php } ?> </table> </div></td> <!-- InstanceBeginEditable name="body" --> Index: iprequest.php =================================================================== RCS file: /cvsroot/meshdb/www/ipdb/iprequest.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- iprequest.php 1 Aug 2004 11:30:44 -0000 1.1 +++ iprequest.php 28 Aug 2004 14:35:38 -0000 1.2 @@ -69,6 +69,11 @@ <td><input name="node_id" type="text" id="node_id" value="<?php echo $node_id ?>" size="6" maxlength="6"> (*)</td> </tr> + <tr> + <td nowrap>Node Name</td> + <td><input name="node_name" type="text" id="node_name" value="<?php echo $node_name ?>" size="12" maxlength="6"> + (*)</td> + </tr> <tr> <td nowrap>Member Id</td> <td><input name="member_id" type="text" id="member_id" value="<?php echo $member_id ?>" size="6" maxlength="6"> @@ -88,6 +93,10 @@ <td nowrap>Phone</td> <td><input name="member_phone" type="text" id="member_phone" value="<?php echo $member_phone ?>"></td> </tr> + <tr> + <td nowrap> </td> + <td> </td> + </tr> </table></td> </tr> </table> Index: login.php =================================================================== RCS file: /cvsroot/meshdb/www/ipdb/login.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- login.php 1 Aug 2004 11:30:44 -0000 1.1 +++ login.php 28 Aug 2004 14:35:38 -0000 1.2 @@ -1,3 +1,22 @@ +<?php // authenticate the user & create the session cookie + include_once("include/variables.php"); + include_once("include/stringutils.php"); + if (getServerVariable("REQUEST_METHOD") == "POST") { + session_start(); + if (getRequestVariable("username") == "test") { + setSessionVariable("username", getRequestVariable("username")); + // redirect to home page + header("Location: http://" . getServerVariable("HTTP_HOST") + . dirname(getServerVariable("PHP_SELF")) + . "/index.php"); + } else { + // user failed authentication + unsetSessionVariable("username"); + setSessionVariable("errorMessage", "Your login details are incorrect! (bwarp bwarp)"); + } + + } +?> <html><!-- InstanceBegin template="/Templates/default.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <!-- InstanceBeginEditable name="doctitle" --> @@ -6,14 +25,21 @@ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="css/style.css" rel="stylesheet" type="text/css"> <link rel="SHORTCUT ICON" href="images/mesh-favico.ico"> -<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --> +<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --> </head> - +<?php include_once("include/variables.php"); ?> +<?php include_once("include/stringutils.php"); ?> +<?php + $pageName = after_last("/", getServerVariable("PHP_SELF")); + if ($pageName != "login.php") { + session_start(); + setSessionVariable("cookieTest", "OK"); + } +?> <body> <table width="100%" border="1" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> - <td width="203" bgcolor="#FFFFFF"> - <div align="center"><img src="images/mesh-small.gif" width="137" height="86"></div></td> + <td width="203" bgcolor="#FFFFFF"> <div align="center"><img src="images/mesh-small.gif" width="137" height="86"></div></td> <!-- InstanceBeginEditable name="banner" --> <td bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <h2>Authentication</h2></td> @@ -21,16 +47,22 @@ <tr> <td width="203" valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Client - IP: <?php echo $HTTP_SERVER_VARS['REMOTE_ADDR']; ?></font></div></td> - <td valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"><div align="right"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged - in as <strong> <a href="login.php"> - <?php if ($HTTP_SESSION_VARS['username']) { echo $HTTP_SESSION_VARS['username']; } else { echo "public"; } ?> - </a> </strong> </font></div></td> + IP: <?php echo getServerVariable("REMOTE_ADDR"); ?></font></div></td> + <td valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"> + <div align="right"> + <?php if (issetSessionVariable("username")) { ?> + <font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged + in as <strong><?php echo getSessionVariable("username"); ?></strong> <a href="logout.php">[log out] + </a></font> + <?php } else { ?> + <font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged + in as <strong>nobody</strong> <a href="login.php">[log in]</a></font> + <?php } ?> + </div> + </td> </tr> <tr> - <td width="203" valign="top" bgcolor="#FFFFFF"> - <div align="center"> - + <td width="203" valign="top" bgcolor="#FFFFFF"> <div align="center"> <table width="80%" border="0" cellpadding="2" cellspacing="2" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="index.php">Home</a></font></div></td> @@ -41,18 +73,34 @@ <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Administration</font></div></td> </tr> + <?php if (issetSessionVariable("username")) { ?> <tr> - <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Logout</font></div></td> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Log + Out</font></div></td> + </tr> + <?php } else { ?> + <tr> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Log + In</font></div></td> </tr> + <?php } ?> </table> </div></td> <!-- InstanceBeginEditable name="body" --> <td valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <p align="center"> <font color="#FF0000" face="Times New Roman, Times, serif"> <em> - <?php if ($HTTP_SESSION_VARS['errorMsg'] != "") { echo $HTTP_SESSION_VARS['errorMsg']; } else { echo " "; } ?> + <?php if (issetSessionVariable('errorMsg')) { echo getSessionVariable('errorMsg'); } else { echo " "; } ?> </em> </font> </p> <form name="login" method="post" action="login.php"> + <?php + if (!issetSessionVariable('cookieTest')) { + ?> + <p align="center"><em><strong>Please enable cookies in your browser.</strong></em></p> + <?php + } + ?> + </div> <table align="center"> <tr> <td><font face="Times New Roman, Times, serif">Username:</font><font face="Arial, Helvetica, sans-serif"> </font></td> @@ -68,11 +116,9 @@ </tr> <tr> <td> </td> - <td nowrap> <div align="left"> - <p> <font face="Arial, Helvetica, sans-serif"> - <input type="checkbox" name="checkbox" value="checkbox"> - <font size="-1">Restrict to this ip address</font></font></p> - </div></td> + <td><font face="Arial, Helvetica, sans-serif"> + <input type="checkbox" name="rememberme" value="checkbox"> + </font>Remember me</td> </tr> <tr> <td><font face="Arial, Helvetica, sans-serif"> </font></td> @@ -86,4 +132,4 @@ <!-- InstanceEndEditable --> </tr> </table> </body> -<!-- InstanceEnd --></html> +<!-- InstanceEnd --></html> \ No newline at end of file Index: nodes.php =================================================================== RCS file: /cvsroot/meshdb/www/ipdb/nodes.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- nodes.php 1 Aug 2004 11:30:44 -0000 1.1 +++ nodes.php 28 Aug 2004 14:35:38 -0000 1.2 @@ -48,14 +48,21 @@ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="css/style.css" rel="stylesheet" type="text/css"> <link rel="SHORTCUT ICON" href="images/mesh-favico.ico"> -<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --> +<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --> </head> - +<?php include_once("include/variables.php"); ?> +<?php include_once("include/stringutils.php"); ?> +<?php + $pageName = after_last("/", getServerVariable("PHP_SELF")); + if ($pageName != "login.php") { + session_start(); + setSessionVariable("cookieTest", "OK"); + } +?> <body> <table width="100%" border="1" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> - <td width="203" bgcolor="#FFFFFF"> - <div align="center"><img src="images/mesh-small.gif" width="137" height="86"></div></td> + <td width="203" bgcolor="#FFFFFF"> <div align="center"><img src="images/mesh-small.gif" width="137" height="86"></div></td> <!-- InstanceBeginEditable name="banner" --> <td> <h3 align="center">Node Listing for Zone "<?php echo $row_zone['name']; ?>", Pod #<?php echo $row_pod['podid']; ?></h3> <h3 align="center">Network: <?php echo cidr_split($row_zone['cidr'],$row_pod['podid'],$row_zone['bits']); ?></h3></td> @@ -63,16 +70,22 @@ <tr> <td width="203" valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Client - IP: <?php echo $HTTP_SERVER_VARS['REMOTE_ADDR']; ?></font></div></td> - <td valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"><div align="right"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged - in as <strong> <a href="login.php"> - <?php if ($HTTP_SESSION_VARS['username']) { echo $HTTP_SESSION_VARS['username']; } else { echo "public"; } ?> - </a> </strong> </font></div></td> + IP: <?php echo getServerVariable("REMOTE_ADDR"); ?></font></div></td> + <td valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"> + <div align="right"> + <?php if (issetSessionVariable("username")) { ?> + <font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged + in as <strong><?php echo getSessionVariable("username"); ?></strong> <a href="logout.php">[log out] + </a></font> + <?php } else { ?> + <font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged + in as <strong>nobody</strong> <a href="login.php">[log in]</a></font> + <?php } ?> + </div> + </td> </tr> <tr> - <td width="203" valign="top" bgcolor="#FFFFFF"> - <div align="center"> - + <td width="203" valign="top" bgcolor="#FFFFFF"> <div align="center"> <table width="80%" border="0" cellpadding="2" cellspacing="2" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="index.php">Home</a></font></div></td> @@ -83,9 +96,17 @@ <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Administration</font></div></td> </tr> + <?php if (issetSessionVariable("username")) { ?> <tr> - <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Logout</font></div></td> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Log + Out</font></div></td> </tr> + <?php } else { ?> + <tr> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Log + In</font></div></td> + </tr> + <?php } ?> </table> </div></td> <!-- InstanceBeginEditable name="body" --> Index: pods.php =================================================================== RCS file: /cvsroot/meshdb/www/ipdb/pods.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- pods.php 1 Aug 2004 11:30:44 -0000 1.1 +++ pods.php 28 Aug 2004 14:35:38 -0000 1.2 @@ -35,14 +35,21 @@ <link href="css/style.css" rel="stylesheet" type="text/css"> <link rel="SHORTCUT ICON" href="images/mesh-favico.ico"> -<!-- InstanceEndEditable --> +<!-- InstanceEndEditable --> </head> - +<?php include_once("include/variables.php"); ?> +<?php include_once("include/stringutils.php"); ?> +<?php + $pageName = after_last("/", getServerVariable("PHP_SELF")); + if ($pageName != "login.php") { + session_start(); + setSessionVariable("cookieTest", "OK"); + } +?> <body> <table width="100%" border="1" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> - <td width="203" bgcolor="#FFFFFF"> - <div align="center"><img src="images/mesh-small.gif" width="137" height="86"></div></td> + <td width="203" bgcolor="#FFFFFF"> <div align="center"><img src="images/mesh-small.gif" width="137" height="86"></div></td> <!-- InstanceBeginEditable name="banner" --><td> <h3 align="center">Pod Listing for Zone "<?php echo $row_zone['name']; ?>"</h3> <h3 align="center"> Network: <?php echo $row_zone['cidr']; ?><br> @@ -51,16 +58,22 @@ <tr> <td width="203" valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Client - IP: <?php echo $HTTP_SERVER_VARS['REMOTE_ADDR']; ?></font></div></td> - <td valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"><div align="right"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged - in as <strong> <a href="login.php"> - <?php if ($HTTP_SESSION_VARS['username']) { echo $HTTP_SESSION_VARS['username']; } else { echo "public"; } ?> - </a> </strong> </font></div></td> + IP: <?php echo getServerVariable("REMOTE_ADDR"); ?></font></div></td> + <td valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"> + <div align="right"> + <?php if (issetSessionVariable("username")) { ?> + <font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged + in as <strong><?php echo getSessionVariable("username"); ?></strong> <a href="logout.php">[log out] + </a></font> + <?php } else { ?> + <font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged + in as <strong>nobody</strong> <a href="login.php">[log in]</a></font> + <?php } ?> + </div> + </td> </tr> <tr> - <td width="203" valign="top" bgcolor="#FFFFFF"> - <div align="center"> - + <td width="203" valign="top" bgcolor="#FFFFFF"> <div align="center"> <table width="80%" border="0" cellpadding="2" cellspacing="2" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="index.php">Home</a></font></div></td> @@ -71,9 +84,17 @@ <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Administration</font></div></td> </tr> + <?php if (issetSessionVariable("username")) { ?> <tr> - <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Logout</font></div></td> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Log + Out</font></div></td> </tr> + <?php } else { ?> + <tr> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Log + In</font></div></td> + </tr> + <?php } ?> </table> </div></td> <!-- InstanceBeginEditable name="body" --> Index: zones.php =================================================================== RCS file: /cvsroot/meshdb/www/ipdb/zones.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- zones.php 1 Aug 2004 11:30:44 -0000 1.1 +++ zones.php 28 Aug 2004 14:35:38 -0000 1.2 @@ -15,30 +15,43 @@ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="css/style.css" rel="stylesheet" type="text/css"> <link rel="SHORTCUT ICON" href="images/mesh-favico.ico"> -<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --> +<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --> </head> - +<?php include_once("include/variables.php"); ?> +<?php include_once("include/stringutils.php"); ?> +<?php + $pageName = after_last("/", getServerVariable("PHP_SELF")); + if ($pageName != "login.php") { + session_start(); + setSessionVariable("cookieTest", "OK"); + } +?> <body> <table width="100%" border="1" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> - <td width="203" bgcolor="#FFFFFF"> - <div align="center"><img src="images/mesh-small.gif" width="137" height="86"></div></td> + <td width="203" bgcolor="#FFFFFF"> <div align="center"><img src="images/mesh-small.gif" width="137" height="86"></div></td> <!-- InstanceBeginEditable name="banner" --> <td><h3>Zone Listing - All Networks</h3></td> <!-- InstanceEndEditable --> </tr> <tr> <td width="203" valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Client - IP: <?php echo $HTTP_SERVER_VARS['REMOTE_ADDR']; ?></font></div></td> - <td valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"><div align="right"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged - in as <strong> <a href="login.php"> - <?php if ($HTTP_SESSION_VARS['username']) { echo $HTTP_SESSION_VARS['username']; } else { echo "public"; } ?> - </a> </strong> </font></div></td> + IP: <?php echo getServerVariable("REMOTE_ADDR"); ?></font></div></td> + <td valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"> + <div align="right"> + <?php if (issetSessionVariable("username")) { ?> + <font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged + in as <strong><?php echo getSessionVariable("username"); ?></strong> <a href="logout.php">[log out] + </a></font> + <?php } else { ?> + <font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged + in as <strong>nobody</strong> <a href="login.php">[log in]</a></font> + <?php } ?> + </div> + </td> </tr> <tr> - <td width="203" valign="top" bgcolor="#FFFFFF"> - <div align="center"> - + <td width="203" valign="top" bgcolor="#FFFFFF"> <div align="center"> <table width="80%" border="0" cellpadding="2" cellspacing="2" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="index.php">Home</a></font></div></td> @@ -49,9 +62,17 @@ <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Administration</font></div></td> </tr> + <?php if (issetSessionVariable("username")) { ?> <tr> - <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Logout</font></div></td> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Log + Out</font></div></td> </tr> + <?php } else { ?> + <tr> + <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Log + In</font></div></td> + </tr> + <?php } ?> </table> </div></td> <!-- InstanceBeginEditable name="body" --> |
From: <il...@pr...> - 2004-08-05 08:04:52
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8030 Modified Files: view-netloc.inc.php Log Message: Refer to circular polarisation in terms of handedness rather than clockwiseness. Index: view-netloc.inc.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/view-netloc.inc.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- view-netloc.inc.php 27 Jul 2004 08:12:27 -0000 1.3 +++ view-netloc.inc.php 5 Aug 2004 08:04:43 -0000 1.4 @@ -97,8 +97,8 @@ NULL => "Unspecified", "horiz" => "Horizontal", "vert" => "Vertical", - "cw" => "Clockwise", - "ccw" => "Counter clockwise", + "rhcp" => "Right hand circular", + "lhcp" => "Left hand circular", ))?></td> <?=edithelp("polarisation of the radiation emitted")?> </tr> |
From: <ma...@pr...> - 2004-08-04 13:23:15
|
Update of /cvsroot/meshdb/www/ipdb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20659 Removed Files: mysql_schema.sql Log Message: bad place for this.. --- mysql_schema.sql DELETED --- |
From: <ma...@pr...> - 2004-08-04 12:21:47
|
Update of /cvsroot/meshdb/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10436/data Log Message: Directory /cvsroot/meshdb/data added to the repository |
From: <il...@pr...> - 2004-08-02 12:39:37
|
Update of /cvsroot/meshdb/www/db2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31882 Modified Files: submit.php Log Message: Fixed missing last-updated-by IP string. Index: submit.php =================================================================== RCS file: /cvsroot/meshdb/www/db2/submit.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- submit.php 27 Jul 2004 08:09:33 -0000 1.10 +++ submit.php 2 Aug 2004 12:39:24 -0000 1.11 @@ -41,7 +41,8 @@ /* Take note of whether the remote host matches the last update. */ if ($notify_info["updatedip"] != $_SERVER["REMOTE_ADDR"]) - $ipchangedstring = "\nLast updated from different address: $updatedip\n"; + $ipchangedstring = "\nLast updated from different address: ". + $notify_info["updatedip"]."\n"; else $ipchangedstring = ""; |
From: <ma...@pr...> - 2004-08-01 13:49:28
|
Update of /cvsroot/meshdb/www/ipdb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32625 Added Files: README Log Message: add README file for developers --- NEW FILE: README --- This is the draft mesh ip assignment application. It has been written using Macromedia Dreamweaver MX, and as a result has a Connections/ folder and a Templates/ folder. Both of these are dreamweaver "features" which encapsulate the database connection parameters and the single page templates for the whole site. While it would be nice if you could use Dreamweaver MX (versions before that just dont bother), it's just PHP after all so you could just use your favourite text editor. If you dont use Dreamweaver MX, please observer the following: 1. Don't edit the dreamweaver code sections at the top of each page 2. Do change the template *and* the target file to avoid problems. Dreameaver templates are not include files, they are design-time schisms which are used to automatically generate pages, and to automatically update many files when the template those files are based on changes. Pages based on a template have html to define the start and stop of editable region(s) of a file which are based on a template. These resions will not be changed when a file is updated due to it's template changing. Also, code before the first <html> tag should be treated with care as editing a macromedia generated php code makes that element uneditable except as plain old php scrpting, which screws up the UI somewhat. eg: <!-- InstanceBeginEditable name="doctitle" --> <p>Blah Blah</p> <!-- InstanceEndEditable --> The above sections will be unmolested by template updates, as will php code sections before the first <html> tag. I expect the whole template thing may be stripped out, but for the initial development i'd like to stick with the GUI so deveopment is faster. Dreamweaver produces reasonable php, so it's best just to leave it alone. Cheers Brett Maxfield |
From: <ma...@pr...> - 2004-08-01 11:34:47
|
Update of /cvsroot/meshdb/www/ipdb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11801 Added Files: mysql_schema.sql Log Message: first basic schema, no not even started (so certainly not finished) --- NEW FILE: mysql_schema.sql --- -- MySQL dump 10.7 -- -- Host: localhost Database: meship -- ------------------------------------------------------ -- Server version 4.1.3-beta /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */; -- -- Table structure for table `auth` -- DROP TABLE IF EXISTS `auth`; CREATE TABLE `auth` ( `nodeid` int(11) NOT NULL default '0', `admin` char(1) NOT NULL default 'N', `password` char(1) NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `auth` -- /*!40000 ALTER TABLE `auth` DISABLE KEYS */; LOCK TABLES `auth` WRITE; INSERT INTO `auth` VALUES (99,'N','9'); UNLOCK TABLES; /*!40000 ALTER TABLE `auth` ENABLE KEYS */; -- -- Table structure for table `node` -- DROP TABLE IF EXISTS `node`; CREATE TABLE `node` ( `nodeid` int(10) unsigned NOT NULL default '0', `zoneid` int(11) unsigned NOT NULL default '0', `podid` int(11) unsigned NOT NULL default '0', `contact` varchar(100) NOT NULL default '0', PRIMARY KEY (`nodeid`,`zoneid`,`podid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `node` -- /*!40000 ALTER TABLE `node` DISABLE KEYS */; LOCK TABLES `node` WRITE; INSERT INTO `node` VALUES (1,1,1,'Bob'),(1,2,1,'Joe'); UNLOCK TABLES; /*!40000 ALTER TABLE `node` ENABLE KEYS */; -- -- Table structure for table `pod` -- DROP TABLE IF EXISTS `pod`; CREATE TABLE `pod` ( `podid` int(11) NOT NULL default '0', `zoneid` int(11) NOT NULL default '0', `reserved` tinyint(1) NOT NULL default '0', `bits` int(11) NOT NULL default '0', `contact` varchar(100) NOT NULL default '0', PRIMARY KEY (`zoneid`,`podid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `pod` -- /*!40000 ALTER TABLE `pod` DISABLE KEYS */; LOCK TABLES `pod` WRITE; INSERT INTO `pod` VALUES (1,1,0,6,'Bob Smith'),(2,1,0,6,'Bill Smith'),(0,1,1,6,'Rojer Bannister'),(1,2,0,6,'Fred'); UNLOCK TABLES; /*!40000 ALTER TABLE `pod` ENABLE KEYS */; -- -- Table structure for table `zone` -- DROP TABLE IF EXISTS `zone`; CREATE TABLE `zone` ( `zoneid` int(11) unsigned NOT NULL auto_increment, `name` varchar(100) NOT NULL default '', `bits` int(2) unsigned NOT NULL default '8', `cidr` varchar(100) NOT NULL default '', PRIMARY KEY (`zoneid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `zone` -- /*!40000 ALTER TABLE `zone` DISABLE KEYS */; LOCK TABLES `zone` WRITE; INSERT INTO `zone` VALUES (1,'Temporarily In Use',7,'10.160.0.0/16'),(2,'Brisbane North West',8,'10.161.0.0/16'),(3,'Brisbane North East',8,'10.162.0.0/16'),(4,'Brisbane South East',8,'10.163.0.0/16'),(5,'Brisbane South West',8,'10.164.0.0/16'),(6,'Brisbane CBD',8,'10.165.0.0/16'),(7,'Brisbane Backbone',8,'10.166.0.0/16'); UNLOCK TABLES; /*!40000 ALTER TABLE `zone` ENABLE KEYS */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; |
From: <ma...@pr...> - 2004-08-01 11:30:54
|
Update of /cvsroot/meshdb/www/ipdb/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11180/images Added Files: mesh-favico.ico mesh-small.gif Log Message: first vaguely operating ipdb prototype (browses structure only) --- NEW FILE: mesh-favico.ico --- (This appears to be a binary file; contents omitted.) --- NEW FILE: mesh-small.gif --- (This appears to be a binary file; contents omitted.) |
From: <ma...@pr...> - 2004-08-01 11:30:53
|
Update of /cvsroot/meshdb/www/ipdb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11180 Added Files: index.php iprequest.php login.php nodes.php pods.php zones.php Log Message: first vaguely operating ipdb prototype (browses structure only) --- NEW FILE: index.php --- <html><!-- InstanceBegin template="/Templates/default.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <!-- InstanceBeginEditable name="doctitle" --> <title>Untitled Document</title> <!-- InstanceEndEditable --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="css/style.css" rel="stylesheet" type="text/css"> <link rel="SHORTCUT ICON" href="images/mesh-favico.ico"> <!-- InstanceBeginEditable name="head" --> <link href="css/style.css" rel="stylesheet" type="text/css"> <link rel="SHORTCUT ICON" href="images/mesh-favico.ico"> <!-- InstanceEndEditable --> </head> <body> <table width="100%" border="1" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> <td width="203" bgcolor="#FFFFFF"> <div align="center"><img src="images/mesh-small.gif" width="137" height="86"></div></td> <!-- InstanceBeginEditable name="banner" --> <td><h1>Mesh IP Assignment</h1> </td><!-- InstanceEndEditable --> </tr> <tr> <td width="203" valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Client IP: <?php echo $HTTP_SERVER_VARS['REMOTE_ADDR']; ?></font></div></td> <td valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"><div align="right"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged in as <strong> <a href="login.php"> <?php if ($HTTP_SESSION_VARS['username']) { echo $HTTP_SESSION_VARS['username']; } else { echo "public"; } ?> </a> </strong> </font></div></td> </tr> <tr> <td width="203" valign="top" bgcolor="#FFFFFF"> <div align="center"> <table width="80%" border="0" cellpadding="2" cellspacing="2" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="index.php">Home</a></font></div></td> </tr> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="zones.php">Browse</a></font></div></td> </tr> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Administration</font></div></td> </tr> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Logout</font></div></td> </tr> </table> </div></td> <!-- InstanceBeginEditable name="body" --> <td valign="top"> <p> </p> <p>Welcome to the mesh ip assignment program.</p> </td> <!-- InstanceEndEditable --> </tr> </table> </body> <!-- InstanceEnd --></html> --- NEW FILE: iprequest.php --- <?php if ($_POST['Submit'] = 'Submit') { // set these ! $myname = "IP Assigner"; $myemail = "bri...@sp..."; // mail headers $headers = "MIME-Version: 1.0\r \n"; $headers .= "Content-type: text/plain; charset=iso-8859-1\r \n"; $headers .= "From: \"$myname\" <$myemail>\r \n"; $headers .= "Reply-To: \"$myname\" <$myemail>\r \n"; $headers .= "X-Priority: 3\r \n"; $headers .= "X-MSMail-Priority: High\r \n"; $headers .= "X-Mailer: Mesh IP Request Script"; $headers .= "Subject: Mesh IP Request"; // the message body $message = "IP Assignment Request\r\n"; $message .= "---------------------\r\n"; // send the email mail($myemail, "IP Assignment Request", $message, $headers); } ?> <?php $node_id = ''; $member_id = ''; $member_name = ''; $member_email = ''; $member_phone = ''; ?> <?php if ($HTTP_GET_VARS['prefill_node_id'] > 0) { $node_id = $HTTP_GET_VARS['prefill_node_id']; $URI = 'http://www.itee.uq.edu.au/~mesh/db2/select.php?q=SELECT+contactname,contactemail,contactphone+FROM+contact+WHERE+nodeid=3%0D%0A&format=csv'; $file_array = file($URI); $csv_text = $file_array[0]; list ($member_name, $member_email, $member_phone) = split(",", $csv_text); } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <h1 align="center">IP Allocation Request Form</h1> <h3>Prefill from Mesh Database:</h3> <form name="prefill" method="get" action="iprequest.php"> <table> <tr> <td>Node Number (*)</td> <td> <input name="prefill_node_id" type="text" id="prefill_node_id" size="6" maxlength="6"> <input type="submit" value="Prefill from Mesh DB"> </td> </tr> </table> </form> <form name="iprequest" method="post" action="iprequest.php"> <h3>Node Information</h3> <table border="1"> <tr> <td align="center"> <table> <tr> <td nowrap>Node Id</td> <td><input name="node_id" type="text" id="node_id" value="<?php echo $node_id ?>" size="6" maxlength="6"> (*)</td> </tr> <tr> <td nowrap>Member Id</td> <td><input name="member_id" type="text" id="member_id" value="<?php echo $member_id ?>" size="6" maxlength="6"> (*)</td> </tr> <tr> <td nowrap>Your Name</td> <td nowrap><input name="member_name" type="text" id="member_name" value="<?php echo $member_name ?>"> (*) </td> </tr> <tr> <td nowrap>Email</td> <td><input name="member_email" type="text" id="member_email" value="<?php echo $member_email ?>"> .nospam (*)</td> </tr> <tr> <td nowrap>Phone</td> <td><input name="member_phone" type="text" id="member_phone" value="<?php echo $member_phone ?>"></td> </tr> </table></td> </tr> </table> <h3>About your IP Request:</h3> <table border="1"> <tr> <td> <table align="center"> <tr> <td width="120" valign="top">Access Point</td> <td width="367" valign="top"> <input name="alloc_ap" type="text" id="alloc_ap" size="6" maxlength="6"> (normally, each AP gets a /28) </td> </tr> <tr> <td width="120" valign="top">LAN</td> <td width="367" valign="top"> <p> <input name="alloc_lan" type="text" id="alloc_lan" size="6" maxlength="6"> ( where you run your public services)</p> </td> </tr> <tr> <td width="120" valign="top">Point to Point</td> <td width="367" valign="top"> <input name="alloc_ptp" type="text" id="alloc_ptp" size="6" maxlength="6"> (PTP between two mesh nodes) </td> </tr> <tr> <td width="120" valign="top"> <p>Other Use</p></td> <td width="367"><p> <input name="alloc_other" type="text" id="alloc_other" size="6" maxlength="6"> Please describe:</p> <p> <textarea name="alloc_other_desc" cols="40" rows="4" id="alloc_other_desc"></textarea> </p></td> </tr> </table></td> </tr> </table> <h3>About your peers:</h3> <table width="100%" border="1"> <tr align="left" valign="middle"> <td> <p>Who is your upstream link peer(s). EG Who are you connecting to? (These should be nodes that are “FULL”/Active) :</p></td> <td> <p>(node numbers seperated by commas) <input name="current_uplink" type="text" id="current_uplink" value="" size="40" maxlength="40"> </p></td> </tr> <tr align="left" valign="middle"> <td>Downlink Node Number(s): Who is your downstream link peer(s). EG Who are you connecting to? (These should be nodes that are “FULL”/Active) :</td> <td> <p>(node numbers seperated by commas) <input name="current_downlink" type="text" id="current_downlink" size="40" maxlength="40"> </p></td> </tr> <tr align="left" valign="middle"> <td>Potential Uplinks:Nodes you might have LOS to in a Point to Point configuration (you as a client):</td> <td> <p> (node numbers seperated by commas) <input name="potential_uplink" type="text" id="potential_uplink" size="40" maxlength="40"> </p></td> </tr> <tr align="left" valign="middle"> <td>Potential Downlinks:Nodes who may be able to connect to one of your AP's (them as a client):</td> <td>(node numbers seperated by commas) <input name="potential_downlink" type="text" id="potential_downlink" size="40" maxlength="40"> </td> </tr> </table> <h3>Other Comments</h3> <p> <textarea name="textarea" cols="80" rows="5"></textarea> </p> <p> <input type="submit" name="Submit" value="Submit"> </p> </form> <p> </p> </body> </html> --- NEW FILE: login.php --- <html><!-- InstanceBegin template="/Templates/default.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <!-- InstanceBeginEditable name="doctitle" --> <title>Untitled Document</title> <!-- InstanceEndEditable --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="css/style.css" rel="stylesheet" type="text/css"> <link rel="SHORTCUT ICON" href="images/mesh-favico.ico"> <!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --> </head> <body> <table width="100%" border="1" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> <td width="203" bgcolor="#FFFFFF"> <div align="center"><img src="images/mesh-small.gif" width="137" height="86"></div></td> <!-- InstanceBeginEditable name="banner" --> <td bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <h2>Authentication</h2></td> <!-- InstanceEndEditable --> </tr> <tr> <td width="203" valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Client IP: <?php echo $HTTP_SERVER_VARS['REMOTE_ADDR']; ?></font></div></td> <td valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"><div align="right"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged in as <strong> <a href="login.php"> <?php if ($HTTP_SESSION_VARS['username']) { echo $HTTP_SESSION_VARS['username']; } else { echo "public"; } ?> </a> </strong> </font></div></td> </tr> <tr> <td width="203" valign="top" bgcolor="#FFFFFF"> <div align="center"> <table width="80%" border="0" cellpadding="2" cellspacing="2" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="index.php">Home</a></font></div></td> </tr> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="zones.php">Browse</a></font></div></td> </tr> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Administration</font></div></td> </tr> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Logout</font></div></td> </tr> </table> </div></td> <!-- InstanceBeginEditable name="body" --> <td valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <p align="center"> <font color="#FF0000" face="Times New Roman, Times, serif"> <em> <?php if ($HTTP_SESSION_VARS['errorMsg'] != "") { echo $HTTP_SESSION_VARS['errorMsg']; } else { echo " "; } ?> </em> </font> </p> <form name="login" method="post" action="login.php"> <table align="center"> <tr> <td><font face="Times New Roman, Times, serif">Username:</font><font face="Arial, Helvetica, sans-serif"> </font></td> <td><font face="Arial, Helvetica, sans-serif"> <input name="username" type="text" size="20"> </font></td> </tr> <tr> <td><font face="Times New Roman, Times, serif">Password:</font><font face="Arial, Helvetica, sans-serif"> </font></td> <td><font face="Arial, Helvetica, sans-serif"> <input name="password" type="password" size="20"> </font></td> </tr> <tr> <td> </td> <td nowrap> <div align="left"> <p> <font face="Arial, Helvetica, sans-serif"> <input type="checkbox" name="checkbox" value="checkbox"> <font size="-1">Restrict to this ip address</font></font></p> </div></td> </tr> <tr> <td><font face="Arial, Helvetica, sans-serif"> </font></td> <td><font face="Arial, Helvetica, sans-serif"> <input type="submit" name="Login" value="Login"> </font></td> </tr> </table> </form> <p> </p></td> <!-- InstanceEndEditable --> </tr> </table> </body> <!-- InstanceEnd --></html> --- NEW FILE: nodes.php --- <?php require_once('Connections/meship.php'); ?> <?php require_once('include/network.php'); ?> <?php $colzone_nodes = "1"; if (isset($HTTP_GET_VARS['zone'])) { $colzone_nodes = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['zone'] : addslashes($HTTP_GET_VARS['zone']); } $colpod_nodes = "1"; if (isset($HTTP_GET_VARS['pod'])) { $colpod_nodes = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['pod'] : addslashes($HTTP_GET_VARS['pod']); } mysql_select_db($database_meship, $meship); $query_nodes = sprintf("SELECT * FROM node WHERE zoneid = %s AND podid = %s", $colzone_nodes,$colpod_nodes); $nodes = mysql_query($query_nodes, $meship) or die(mysql_error()); $row_nodes = mysql_fetch_assoc($nodes); $totalRows_nodes = mysql_num_rows($nodes); $colname_zone = "1"; if (isset($HTTP_GET_VARS['zone'])) { $colname_zone = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['zone'] : addslashes($HTTP_GET_VARS['zone']); } mysql_select_db($database_meship, $meship); $query_zone = sprintf("SELECT * FROM `zone` WHERE zoneid = %s", $colname_zone); $zone = mysql_query($query_zone, $meship) or die(mysql_error()); $row_zone = mysql_fetch_assoc($zone); $totalRows_zone = mysql_num_rows($zone); $colpod_pod = "1"; if (isset($HTTP_GET_VARS['pod'])) { $colpod_pod = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['pod'] : addslashes($HTTP_GET_VARS['pod']); } $colzone_pod = "1"; if (isset($HTTP_GET_VARS['zone'])) { $colzone_pod = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['zone'] : addslashes($HTTP_GET_VARS['zone']); } mysql_select_db($database_meship, $meship); $query_pod = sprintf("SELECT * FROM pod WHERE podid = %s AND zoneid=%s", $colpod_pod,$colzone_pod); $pod = mysql_query($query_pod, $meship) or die(mysql_error()); $row_pod = mysql_fetch_assoc($pod); $totalRows_pod = mysql_num_rows($pod); ?> <html><!-- InstanceBegin template="/Templates/default.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <!-- InstanceBeginEditable name="doctitle" --> <title>Untitled Document</title> <!-- InstanceEndEditable --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="css/style.css" rel="stylesheet" type="text/css"> <link rel="SHORTCUT ICON" href="images/mesh-favico.ico"> <!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --> </head> <body> <table width="100%" border="1" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> <td width="203" bgcolor="#FFFFFF"> <div align="center"><img src="images/mesh-small.gif" width="137" height="86"></div></td> <!-- InstanceBeginEditable name="banner" --> <td> <h3 align="center">Node Listing for Zone "<?php echo $row_zone['name']; ?>", Pod #<?php echo $row_pod['podid']; ?></h3> <h3 align="center">Network: <?php echo cidr_split($row_zone['cidr'],$row_pod['podid'],$row_zone['bits']); ?></h3></td> <!-- InstanceEndEditable --> </tr> <tr> <td width="203" valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Client IP: <?php echo $HTTP_SERVER_VARS['REMOTE_ADDR']; ?></font></div></td> <td valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"><div align="right"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged in as <strong> <a href="login.php"> <?php if ($HTTP_SESSION_VARS['username']) { echo $HTTP_SESSION_VARS['username']; } else { echo "public"; } ?> </a> </strong> </font></div></td> </tr> <tr> <td width="203" valign="top" bgcolor="#FFFFFF"> <div align="center"> <table width="80%" border="0" cellpadding="2" cellspacing="2" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="index.php">Home</a></font></div></td> </tr> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="zones.php">Browse</a></font></div></td> </tr> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Administration</font></div></td> </tr> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Logout</font></div></td> </tr> </table> </div></td> <!-- InstanceBeginEditable name="body" --> <td valign="top"> <h3>Available Nodes:</h3> <?php if ($totalRows_nodes > 0) { // Show if recordset not empty ?> <table width="100%" border="1"> <tr> <th nowrap>Node</th> <th nowrap>Usable Range</th> <th nowrap>Usable Hosts</th> <th nowrap>Network</th> <th nowrap>Default Gateway</th> <th nowrap> <div align="center">Contact</div></th> </tr> <?php do { ?> <?php $cidr = cidr_split($row_zone['cidr'],$row_pod['podid'],$row_zone['bits']); $cidr_node = cidr_split($cidr,$row_nodes['nodeid'],$row_pod['bits']); $network = substr($cidr, 0, strpos($cidr_node, "/")); $bits = substr(strstr($cidr, "/"), 1); $bits_node = substr(strstr($cidr_node, "/"), 1); $router = cidr_split($cidr, 1, 32-$bits); $router = substr($router, 0, strpos($router, "/")); ?> <tr> <td height="25"><?php echo $row_nodes['nodeid']; ?></td> <td><?php echo cidr_firstip($cidr_node) . " - " . cidr_lastip($cidr_node); ?></td> <td><?php echo cidr_numhosts($cidr_node) ; ?></td> <td><?php echo $cidr_node; ?></td> <td><?php echo $router; ?></td> <td><?php echo $row_nodes['contact']; ?></td> </tr> <?php } while ($row_nodes = mysql_fetch_assoc($nodes)); ?> </table> <?php } // Show if recordset not empty ?> <?php if ($totalRows_nodes == 0) { // Show if recordset empty ?> <p align="left">No nodes defined.</p> <?php } // Show if recordset empty ?></td> <!-- InstanceEndEditable --> </tr> </table> </body> <!-- InstanceEnd --></html> <?php mysql_free_result($nodes); mysql_free_result($zone); mysql_free_result($pod); ?> --- NEW FILE: pods.php --- <?php require_once('Connections/meship.php'); ?> <?php require_once('include/network.php'); ?> <?php $colname_zone = "1"; if (isset($HTTP_GET_VARS['zone'])) { $colname_zone = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['zone'] : addslashes($HTTP_GET_VARS['zone']); } mysql_select_db($database_meship, $meship); $query_zone = sprintf("SELECT * FROM `zone` WHERE zoneid = %s", $colname_zone); $zone = mysql_query($query_zone, $meship) or die(mysql_error()); $row_zone = mysql_fetch_assoc($zone); $totalRows_zone = mysql_num_rows($zone); $colname_pods = "1"; if (isset($HTTP_GET_VARS['zone'])) { $colname_pods = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['zone'] : addslashes($HTTP_GET_VARS['zone']); } mysql_select_db($database_meship, $meship); $query_pods = sprintf("SELECT * FROM pod WHERE zoneid = %s ORDER BY podid ASC", $colname_pods); $pods = mysql_query($query_pods, $meship) or die(mysql_error()); $row_pods = mysql_fetch_assoc($pods); $totalRows_pods = mysql_num_rows($pods); ?> <html><!-- InstanceBegin template="/Templates/default.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <!-- InstanceBeginEditable name="doctitle" --> <title>Untitled Document</title> <!-- InstanceEndEditable --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="css/style.css" rel="stylesheet" type="text/css"> <link rel="SHORTCUT ICON" href="images/mesh-favico.ico"> <!-- InstanceBeginEditable name="head" --> <link href="css/style.css" rel="stylesheet" type="text/css"> <link rel="SHORTCUT ICON" href="images/mesh-favico.ico"> <!-- InstanceEndEditable --> </head> <body> <table width="100%" border="1" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> <td width="203" bgcolor="#FFFFFF"> <div align="center"><img src="images/mesh-small.gif" width="137" height="86"></div></td> <!-- InstanceBeginEditable name="banner" --><td> <h3 align="center">Pod Listing for Zone "<?php echo $row_zone['name']; ?>"</h3> <h3 align="center"> Network: <?php echo $row_zone['cidr']; ?><br> </h3> </td><!-- InstanceEndEditable --> </tr> <tr> <td width="203" valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Client IP: <?php echo $HTTP_SERVER_VARS['REMOTE_ADDR']; ?></font></div></td> <td valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"><div align="right"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged in as <strong> <a href="login.php"> <?php if ($HTTP_SESSION_VARS['username']) { echo $HTTP_SESSION_VARS['username']; } else { echo "public"; } ?> </a> </strong> </font></div></td> </tr> <tr> <td width="203" valign="top" bgcolor="#FFFFFF"> <div align="center"> <table width="80%" border="0" cellpadding="2" cellspacing="2" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="index.php">Home</a></font></div></td> </tr> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="zones.php">Browse</a></font></div></td> </tr> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Administration</font></div></td> </tr> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Logout</font></div></td> </tr> </table> </div></td> <!-- InstanceBeginEditable name="body" --> <td valign="top"> <h3>Pod Listing:</h3> <?php if ($totalRows_pods > 0) { // Show if recordset not empty ?> <table width="100%" border="1"> <tr> <th nowrap>Pod</th> <th nowrap>Network</th> <th nowrap>Router</th> <th nowrap>Overall Range</th> <th nowrap>Contact</th> <th nowrap><div align="center">Capacity</div></th> </tr> <?php do { ?> <?php $col_zone_nodes = "1"; if (isset($HTTP_GET_VARS['zone'])) { $col_zone_nodes = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['zone'] : addslashes($HTTP_GET_VARS['zone']); } $col_pod_nodes = "1"; if (isset($row_pods['podid'])) { $col_pod_nodes = $row_pods['podid']; } mysql_select_db($database_meship, $meship); $query_nodes = sprintf("SELECT * FROM node WHERE zoneid = %s and podid = %s", $col_zone_nodes,$col_pod_nodes); $nodes = mysql_query($query_nodes, $meship) or die(mysql_error()); $row_nodes = mysql_fetch_assoc($nodes); $totalRows_nodes = mysql_num_rows($nodes); ?> <?php $cidr = cidr_split($row_zone['cidr'],$row_pods['podid'],$row_zone['bits']); $network = substr($cidr, 0, strpos($cidr, "/")); $bits = substr(strstr($cidr, "/"), 1); $router = cidr_split($cidr, 1, 32-$bits); $router = substr($router, 0, strpos($router, "/")); ?> <tr> <td><a href="nodes.php?zone=<?php echo $row_zone['zoneid']; ?>&pod=<?php echo $row_pods['podid']; ?>"><?php echo $row_pods['podid']; ?></a></td> <td><a href="nodes.php?zone=<?php echo $row_zone['zoneid']; ?>&pod=<?php echo $row_pods['podid']; ?>"><?php echo $cidr; ?></a></td> <td><a href="nodes.php?zone=<?php echo $row_zone['zoneid']; ?>&pod=<?php echo $row_pods['podid']; ?>"><?php echo $router; ?></a></td> <td><a href="nodes.php?zone=<?php echo $row_zone['zoneid']; ?>&pod=<?php echo $row_pods['podid']; ?>"><?php echo cidr_conv($cidr); ?></a></td> <td><a href="nodes.php?zone=<?php echo $row_zone['zoneid']; ?>&pod=<?php echo $row_pods['podid']; ?>"><?php echo $row_pods['contact']; ?></a></td> <td> <?php if ($row_pods['reserved'] == 0) { ?> <div align="center"><a href="nodes.php?zone=<?php echo $row_zone['zoneid']; ?>&pod=<?php echo $row_pods['podid']; ?>"><?php echo $totalRows_nodes ?>/<?php echo pow(2, $row_zone['bits'] - $row_pods['bits']); ?></a></div> <?php } else { ?> <div align="center"><em> RESERVED </em></div> <?php } ?> </td> </tr> <?php } while ($row_pods = mysql_fetch_assoc($pods)); ?> </table> <?php } // Show if recordset not empty ?> <?php if ($totalRows_pods == 0) { // Show if recordset empty ?> <p align="left">No pods defined for this zone.</p> <?php } // Show if recordset empty ?></td> <!-- InstanceEndEditable --> </tr> </table> </body> <!-- InstanceEnd --></html> <?php mysql_free_result($zone); mysql_free_result($pods); //mysql_free_result($nodes); ?> --- NEW FILE: zones.php --- <?php require_once('Connections/meship.php'); ?> <?php require_once('include/network.php'); ?> <?php mysql_select_db($database_meship, $meship); $query_zones = "SELECT * FROM `zone`"; $zones = mysql_query($query_zones, $meship) or die(mysql_error()); $row_zones = mysql_fetch_assoc($zones); $totalRows_zones = mysql_num_rows($zones); ?> <html><!-- InstanceBegin template="/Templates/default.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <!-- InstanceBeginEditable name="doctitle" --> <title>Untitled Document</title> <!-- InstanceEndEditable --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="css/style.css" rel="stylesheet" type="text/css"> <link rel="SHORTCUT ICON" href="images/mesh-favico.ico"> <!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --> </head> <body> <table width="100%" border="1" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> <td width="203" bgcolor="#FFFFFF"> <div align="center"><img src="images/mesh-small.gif" width="137" height="86"></div></td> <!-- InstanceBeginEditable name="banner" --> <td><h3>Zone Listing - All Networks</h3></td> <!-- InstanceEndEditable --> </tr> <tr> <td width="203" valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Client IP: <?php echo $HTTP_SERVER_VARS['REMOTE_ADDR']; ?></font></div></td> <td valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"><div align="right"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged in as <strong> <a href="login.php"> <?php if ($HTTP_SESSION_VARS['username']) { echo $HTTP_SESSION_VARS['username']; } else { echo "public"; } ?> </a> </strong> </font></div></td> </tr> <tr> <td width="203" valign="top" bgcolor="#FFFFFF"> <div align="center"> <table width="80%" border="0" cellpadding="2" cellspacing="2" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="index.php">Home</a></font></div></td> </tr> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="zones.php">Browse</a></font></div></td> </tr> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Administration</font></div></td> </tr> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Logout</font></div></td> </tr> </table> </div></td> <!-- InstanceBeginEditable name="body" --> <td valign="top"> <h3>Available Zones:</h3> <?php if ($totalRows_zones > 0) { // Show if recordset not empty ?> <table width="100%" border="1"> <tr> <th nowrap>Zone</th> <th nowrap>Name</th> <th nowrap><div align="left">Overall Range</div></th> <th nowrap><div align="left">Network</div></th> <th nowrap><div align="center">Capacity</div></th> </tr> <?php do { ?> <?php mysql_select_db($database_meship, $meship); $query_pods = "SELECT * FROM pod WHERE zoneid = " . $row_zones['zoneid']; $pods = mysql_query($query_pods, $meship) or die(mysql_error()); $row_pods = mysql_fetch_assoc($pods); $totalRows_pods = mysql_num_rows($pods); ?> <tr> <td><a href="pods.php?zone=<?php echo $row_zones['zoneid']; ?>"><?php echo $row_zones['zoneid']; ?></a></td> <td><a href="pods.php?zone=<?php echo $row_zones['zoneid']; ?>"><?php echo $row_zones['name']; ?></a></td> <td><div align="left"><a href="pods.php?zone=<?php echo $row_zones['zoneid']; ?>"></a><a href="pods.php?zone=<?php echo $row_zones['zoneid']; ?>"><?php echo cidr_conv($row_zones['cidr']); ?></a></div></td> <td><div align="left"><a href="pods.php?zone=<?php echo $row_zones['zoneid']; ?>"><?php echo $row_zones['cidr']; ?></a></div></td> <td><p align="center"><?php echo $totalRows_pods ?>/<?php echo pow(2, $row_zones['bits']); ?></p></td> </tr> <?php } while ($row_zones = mysql_fetch_assoc($zones)); ?> </table> <?php } // Show if recordset not empty ?> <?php if ($totalRows_zones == 0) { // Show if recordset empty ?> <p align="left">No zones defined.</p> <?php } // Show if recordset empty ?></td> <!-- InstanceEndEditable --> </tr> </table> </body> <!-- InstanceEnd --></html> <?php mysql_free_result($zones); mysql_free_result($pods); ?> |
From: <ma...@pr...> - 2004-08-01 11:30:53
|
Update of /cvsroot/meshdb/www/ipdb/css In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11180/css Added Files: style.css Log Message: first vaguely operating ipdb prototype (browses structure only) --- NEW FILE: style.css --- h1 { font-family: Helvetica; } h2 { font-family: Helvetica; } body { background: white; } table { border-style: hidden } td.figure { text-align: center; } td.caption { font-size: smaller; font-family: Helvetica; text-align: center; } td.desc { font-style: italic; font-family: Helvetica; font-size: smaller; text-align: center; } th { text-align: left; } th.major { font-weight: bold; font-family: Helvetica; background: yellow; } th.minor { font-weight: bold; font-family: Helvetica; font-size: smaller; background: silver; } table.figure { border: solid; float: right; clear: right; caption-side: bottom; } table.figure caption { font-size: smaller; font-style: italic; } td[status="full"] { foreground: green; } td[status="test"] { foreground: lime; } td[status="build"] { foreground: maroon; } td[status="gather"] { foreground: brown; } td[status="waiting"] { foreground: black; } td[status="interest"] { foreground: gray; } span.tbd { font-style: italic; font-size: smaller; color: gray; } table.aside { width: 50%; float: right; } table.aside td { background: rgb(95%, 95%, 95%); } table.aside p { font-size: smaller; } strong.matched { background: yellow; } p.minor { font-size: smaller; color: gray; } |
From: <ma...@pr...> - 2004-08-01 11:30:53
|
Update of /cvsroot/meshdb/www/ipdb/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11180/include Added Files: network.php Log Message: first vaguely operating ipdb prototype (browses structure only) --- NEW FILE: network.php --- <?php function cidr_split($cidr_address, $cidr_index, $cidr_bits) { $before_first = substr($cidr_address, 0, strpos($cidr_address, "/")); $before_netmask = substr(strstr($cidr_address, "/"), 1); $after_netmask = $before_netmask + $cidr_bits; if ($after_netmask > 32) { return NULL; } else { if ($cidr_index > (pow(2,$cidr_bits)-1)) { return NULL; } else { $start = substr(str_pad(decbin(ip2long($before_first)), 32, "0", STR_PAD_LEFT), 0, $before_netmask); $middle = str_pad(decbin($cidr_index), $cidr_bits, "0", STR_PAD_LEFT); $end = str_repeat("0", 32 - $after_netmask); $ip = long2ip(bindec($start.$middle.$end)); return $ip."/".$after_netmask; } } } function cidr_network($cidr) { return substr($cidr, 0, strpos($cidr, "/")); } function cidr_netmask($cidr) { return substr(strstr($cidr, "/"), 1); } function cidr_firstip($cidr) { $bits = cidr_netmask($cidr); return cidr_host(cidr_split($cidr, 1, 32-$bits)); } function cidr_lastip($cidr) { $bits = cidr_netmask($cidr); return cidr_host(cidr_split($cidr, pow(2, 32-$bits)-2, 32-$bits)); } function cidr_numhosts($cidr) { $bits = cidr_netmask($cidr); return pow(2, 32-$bits) - 2; } function cidr_host($cidr) { $bits = cidr_netmask($cidr); if ($bits = 32) { return cidr_network($cidr); } else { return $cidr; } } function cidr_summary($cidr) { return cidr_firstip($cidr) . " - " . cidr_lastip($cidr) . " (" . cidr_numhosts(cidr) + " hosts)"; } function cidr_conv($cidr) { $first = substr($cidr, 0, strpos($cidr, "/")); $netmask = substr(strstr($cidr, "/"), 1); $first_bin = str_pad(decbin(ip2long($first)), 32, "0", STR_PAD_LEFT); $netmask_bin = str_pad(str_repeat("1", (integer)$netmask), 32, "0", STR_PAD_RIGHT); for ($i = 0; $i < 32; $i++) { if ($netmask_bin[$i] == "1") $last_bin .= $first_bin[$i]; else $last_bin .= "1"; } $last = long2ip(bindec($last_bin)); return "$first - $last"; } ?> |
From: <ma...@pr...> - 2004-08-01 11:30:53
|
Update of /cvsroot/meshdb/www/ipdb/Templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11180/Templates Added Files: default.dwt.php Log Message: first vaguely operating ipdb prototype (browses structure only) --- NEW FILE: default.dwt.php --- <html> <head> <!-- TemplateBeginEditable name="doctitle" --> <title>Untitled Document</title> <!-- TemplateEndEditable --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="../css/style.css" rel="stylesheet" type="text/css"> <link rel="SHORTCUT ICON" href="../img/mesh-favico.ico"> <!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable --> </head> <body> <table width="100%" border="1" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> <td width="203" bgcolor="#FFFFFF"> <div align="center"><img src="../img/mesh-small.gif" width="137" height="86"></div></td> <!-- TemplateBeginEditable name="banner" --> <td width="479" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> </td> <!-- TemplateEndEditable --> </tr> <tr> <td width="203" valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Client IP: <?php echo $HTTP_SERVER_VARS['REMOTE_ADDR']; ?></font></div></td> <td valign="top" nowrap bordercolor="#0099FF" bgcolor="#0099FF"><div align="right"><font color="#FFFFFF" size="-1" face="Arial, Helvetica, sans-serif">Logged in as <strong> <a href="../login.php"> <?php if ($HTTP_SESSION_VARS['username']) { echo $HTTP_SESSION_VARS['username']; } else { echo "public"; } ?> </a> </strong> </font></div></td> </tr> <tr> <td width="203" valign="top" bgcolor="#FFFFFF"> <div align="center"> <table width="80%" border="0" cellpadding="2" cellspacing="2" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="../index.php">Home</a></font></div></td> </tr> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><a href="../zones.php">Browse</a></font></div></td> </tr> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Administration</font></div></td> </tr> <tr> <td nowrap bordercolor="#FFFFFF" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif">Logout</font></div></td> </tr> </table> </div></td> <!-- TemplateBeginEditable name="body" --> <td valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> </td> <!-- TemplateEndEditable --> </tr> </table> </body> </html> |
From: <ma...@pr...> - 2004-08-01 11:30:53
|
Update of /cvsroot/meshdb/www/ipdb/Connections In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11180/Connections Added Files: meship.php Log Message: first vaguely operating ipdb prototype (browses structure only) --- NEW FILE: meship.php --- <?php # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" $hostname_meship = "127.0.0.1"; $database_meship = "meship"; $username_meship = "meship"; $password_meship = "meship"; $meship = mysql_pconnect($hostname_meship, $username_meship, $password_meship) or die(mysql_error()); ?> |
From: <ma...@pr...> - 2004-08-01 11:28:26
|
Update of /cvsroot/meshdb/www/ipdb/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11021/include Log Message: Directory /cvsroot/meshdb/www/ipdb/include added to the repository |
From: <ma...@pr...> - 2004-08-01 11:24:03
|
Update of /cvsroot/meshdb/www/ipdb/css In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8162/css Log Message: Directory /cvsroot/meshdb/www/ipdb/css added to the repository |
From: <ma...@pr...> - 2004-08-01 11:24:03
|
Update of /cvsroot/meshdb/www/ipdb/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8162/images Log Message: Directory /cvsroot/meshdb/www/ipdb/images added to the repository |
From: <ma...@pr...> - 2004-08-01 11:23:28
|
Update of /cvsroot/meshdb/www/ipdb/Templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6232/Templates Log Message: Directory /cvsroot/meshdb/www/ipdb/Templates added to the repository |
From: <ma...@pr...> - 2004-08-01 11:22:58
|
Update of /cvsroot/meshdb/www/ipdb/Connections In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5312/Connections Log Message: Directory /cvsroot/meshdb/www/ipdb/Connections added to the repository |