require_once "../ipplanlib.php"; require_once "../adodb/adodb.inc.php"; require_once "../class.dbflib.php"; require_once "../layout/class.layout"; require_once "../auth.php"; $auth = new SQLAuthenticator(REALM, REALMERROR); // And now perform the authentication $auth->authenticate(); // set language isset($_COOKIE["ipplanLanguage"]) && myLanguage($_COOKIE['ipplanLanguage']); //setdefault("window",array("bgcolor"=>"white")); //setdefault("table",array("cellpadding"=>"0")); //setdefault("text",array("size"=>"2")); $title = my_("Change user password"); newhtml($p); $w = myheading($p, $title); // explicitly cast variables as security measure against SQL injection list($user, $password1, $password2) = myRegister("S:user S:password1 S:password2"); $formerror = ""; $ds = new IPplanDbf() or myError($w, $p, my_("Could not connect to database")); if ($_POST) { $password1 = trim($password1); $password2 = trim($password2); if (strlen($password1) < 5 or strlen($password2) < 5) { $formerror .= my_("The password entered must be at least five characters") . "\n"; } if ($password1 != $password2) { $formerror .= my_("The passwords entered do not match") . "\n"; } if (!$formerror) { if ($user and getAuthUsername() == ADMINUSER) {
// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // require_once "config.php"; require_once "schema.php"; require_once "ipplanlib.php"; require_once "layout/class.layout"; // check for latest variable added to config.php file, if not there // user did not upgrade properly if (!defined("CONFIG_DIR")) { die("Your config.php file is inconsistent - you cannot use your old config.php file during upgrade"); } // set language isset($_COOKIE["ipplanLanguage"]) && myLanguage($_COOKIE['ipplanLanguage']); CheckSchema(); newhtml($p); insert($p, block("<script type=\"text/javascript\">\n</script>\n<noscript>\n<p><b>\n<font size=4 color=\"#FF0000\">\nYour browser must be JavaScript capable to use this application. Please turn JavaScript on.\n</font>\n</b>\n</noscript>\n")); $w = myheading($p, my_("Main Menu")); insert($w, block(my_("IPplan is a free (GPL), web based, multilingual, IP address management and tracking tool written in php 4, " . "simplifying the administration of your IP address space. IPplan goes beyond IP address management including DNS administration, " . "configuration file management, circuit management (customizable via templates) and storing of hardware information " . "(customizable via templates). IPplan can handle a single network or cater for multiple networks and customers with overlapping address space."))); printhtml($p); ?>
require_once "../auth.php"; $auth = new SQLAuthenticator(REALM, REALMERROR); // And now perform the authentication $grps = $auth->authenticate(); // set language isset($_COOKIE["ipplanLanguage"]) && myLanguage($_COOKIE['ipplanLanguage']); //setdefault("window",array("bgcolor"=>"white")); //setdefault("table",array("cellpadding"=>"0")); //setdefault("text",array("size"=>"2")); $title = my_("Modify/Copy/Move/Delete/Split/Join subnets"); newhtml($p); insert($p, $h = wheader("IPPlan - {$title}")); insert($h, script("", array("type" => "text/javascript", "src" => "../cookies.js"))); insert($h, script("", array("type" => "text/javascript", "src" => "../phpserializer.js"))); insert($h, script("", array("type" => "text/javascript", "src" => "../ipplanlib.js"))); $w = myheading($p, $title, true); // explicitly cast variables as security measure against SQL injection list($cust, $areaindex) = myRegister("I:cust I:areaindex"); // display opening text insert($w, heading(3, "{$title}.")); $ds = new IPplanDbf() or myError($w, $p, my_("Could not connect to database")); // start form insert($w, $f1 = form(array("name" => "THISFORM", "method" => "post", "action" => $_SERVER["PHP_SELF"]))); $cust = myCustomerDropDown($ds, $f1, $cust, $grps) or myError($w, $p, my_("No customers")); $areaindex = myAreaDropDown($ds, $f1, $cust, $areaindex); insert($w, $f2 = form(array("name" => "ENTRY", "method" => "get", "action" => "modifybase.php"))); // save customer name for actual post of data insert($f2, hidden(array("name" => "cust", "value" => "{$cust}"))); insert($f2, hidden(array("name" => "areaindex", "value" => "{$areaindex}"))); myRangeDropDown($ds, $f2, $cust, $areaindex); insert($f2, block("<p>"));
// disable or enable drop down menu on request page - default disabled define("MENU", FALSE); if (!REQUESTENABLED) { die("IP address request system has been disabled by the administrator."); } // set language isset($_COOKIE["ipplanLanguage"]) && myLanguage($_COOKIE['ipplanLanguage']); //setdefault("window",array("bgcolor"=>"white")); //setdefault("table",array("cellpadding"=>"0")); //setdefault("text",array("size"=>"2")); // explicitly cast variables as security measure against SQL injection list($cust, $request, $user, $location, $descrip, $hname, $telno, $macaddr, $ipplanCustomer) = myRegister("I:cust S:request S:user S:location S:descrip S:hname S:telno S:macaddr I:ipplanCustomer"); $formerror = ""; $title = my_("Request an IP address"); newhtml($p); $w = myheading($p, $title, MENU); $ds = new IPplanDbf() or myError($w, $p, my_("Could not connect to database")); if ($_POST) { $request = trim($request); $descrip = trim($descrip); if (strlen($request) == 0) { $formerror .= my_("You need to enter request details for the ip address request") . "\n"; } if (strlen($user) == 0) { $formerror .= my_("You need to enter user details for the request") . "\n"; } if (strlen($location) == 0) { $formerror .= my_("You need to enter location details for the request") . "\n"; } if (strlen($descrip) == 0) { $formerror .= my_("You need to enter description details for the request") . "\n";
<?php // IPplan v4.92b // Aug 24, 2001 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // include "config.php"; include "ipplanlib.php"; include "layout/class.layout"; newhtml($p); $w = myheading($p, "Legal"); $gpl = fread(fopen('gpl.html', "r"), filesize('gpl.html')); insert($w, block($gpl)); printhtml($p);
die("This version of IPplan will not work with PHP 6.x"); } require_once "../config.php"; //require_once("../schema.php"); require_once "../ipplanlib.php"; require_once "../layout/class.layout"; // check for latest variable added to config.php file, if not there // user did not upgrade properly if (!defined('CONFIG_DIR')) { die("Your config.php file is inconsistent - you cannot copy over your old config.php file during upgrade"); } // set language isset($_COOKIE["ipplanLanguage"]) && myLanguage($_COOKIE['ipplanLanguage']); newhtml($p); insert($p, block("<script type=\"text/javascript\">\n</script>\n<noscript>\n<p><b>\n<font size=4 color=\"#FF0000\">\nYour browser must be JavaScript capable to use this application. Please turn JavaScript on.\n</font>\n</b>\n</noscript>\n")); $w = myheading($p, my_("Install/Upgrade IPPlan"), false); insert($w, $t = container("div")); insert($t, heading(3, my_("IPplan v4.92b Installation System"))); // BEGIN INSTALLER LANGUAGE SUPPORT if (extension_loaded("gettext") and LANGCHOICE) { if ($_POST) { // set language cookie if language changed by user // language includes path of ipplan root seperated by : if ($lang) { setcookie("ipplanLanguage", $lang . ":" . dirname(dirname(__FILE__)), time() + 10000000, "/"); $_COOKIE['ipplanLanguage'] = $lang . ":" . dirname(dirname(__FILE__)); } } if (isset($_COOKIE["ipplanLanguage"])) { myLanguage($_COOKIE['ipplanLanguage']); }
require_once "../adodb/adodb.inc.php"; require_once "../class.dbflib.php"; require_once "../layout/class.layout"; require_once '../menus/lib/PHPLIB.php'; require_once '../menus/lib/layersmenu-common.inc.php'; require_once '../menus/lib/treemenu.inc.php'; require_once "../auth.php"; $auth = new BasicAuthenticator(ADMINREALM, REALMERROR); $auth->addUser(ADMINUSER, ADMINPASSWD); // And now perform the authentication $auth->authenticate(); // set language isset($_COOKIE["ipplanLanguage"]) && myLanguage($_COOKIE['ipplanLanguage']); newhtml($p); $myWwwPath = '../menus/'; $w = myheading($p, my_("User Manager")); insert($w, generic("link", array("rel" => "stylesheet", "href" => "{$myWwwPath}" . "layerstreemenu.css"))); insert($w, generic("link", array("rel" => "stylesheet", "href" => "{$myWwwPath}" . "layerstreemenu-hidden.css"))); insert($w, script("", array("language" => "JavaScript", "type" => "text/javascript", "src" => $myWwwPath . 'libjs/layerstreemenu-cookies.js'))); //Make this a stylesheet soon. insert($w, $t = table(array("cols" => "2", "width" => "100%", "border" => "1", "cellspacing" => "2", "frame" => "void", "rules" => "ALL", "cellpadding" => "5"))); // Create the view and editor containers. insert($t, $view = cell(array("align" => "left", "width" => "27%", "valign" => "top"))); insert($t, $editor1 = cell(array("align" => "left", "width" => "73%", "valign" => "top"))); insert($editor1, $editor = container("div", array("class" => "usermanager"))); // We just do this once and pass the variable around. $ds = new IPplanDbf() or myError($w, $p, my_("Could not connect to database")); // Next we check to see if the POST variables have been sent. // If so we handle this first. // For example, if we change the user information, // we want this to be immediately reflected in the user/group control in
define("SHOWRESERVED", TRUE); // maximum time per record to allow for DNS queries define("DNS_DELTA_TIME", "2"); $auth = new SQLAuthenticator(REALM, REALMERROR); // And now perform the authentication $grps = $auth->authenticate(); // set language isset($_COOKIE["ipplanLanguage"]) && myLanguage($_COOKIE['ipplanLanguage']); //setdefault("window",array("bgcolor"=>"white")); //setdefault("table",array("cellpadding"=>"0")); //setdefault("text",array("size"=>"2")); $title = my_("Results of your search"); newhtml($p); list($close) = myRegister("I:close"); // from modifyipform - close the popup? $w = myheading($p, $title, $close ? false : true); // explicitly cast variables as security measure against SQL injection list($baseindex, $block, $showactive, $showdns, $action) = myRegister("I:baseindex I:block I:showactive I:showdns S:action"); list($userfld) = myRegister("A:userfld"); // from modifyipform - need to add rest flds list($hname) = myRegister("S:hname"); // from modifyipformmul - need to add rest flds list($search, $expr) = myRegister("S:search S:expr"); // search fields list($user, $location, $descrip, $telno, $macaddr) = myRegister("S:user S:location S:descrip S:telno S:macaddr"); list($request) = myRegister("I:request"); // from modifyipform - dummy variable entered // from displayrequestip.php $formerror = ""; // $ip can be array or string or undefined! if (!isset($ip)) {