finalized language support and fixed some more bugsmaster
parent
76ccecca7f
commit
ee582988e6
@ -1,47 +1,43 @@ |
||||
<?php |
||||
/***************************************************************************** |
||||
IP Reg, a PHP/MySQL IPAM tool |
||||
Copyright (C) 2007-2009 Wietse Warendorff |
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. |
||||
|
||||
For more information, visit http://sourceforge.net/projects/ipreg, |
||||
or contact me at wietsew@users.sourceforge.net |
||||
*****************************************************************************/ |
||||
|
||||
// start page |
||||
// includes |
||||
include("includes.php"); |
||||
|
||||
// start output |
||||
include("header.php"); |
||||
|
||||
// set template |
||||
$tp = new Template("tpl/about.tpl", $config_yapter_error); |
||||
|
||||
// set language variables |
||||
$tp->setvars($lang); |
||||
|
||||
// setup page |
||||
// set vars |
||||
$tp->set("config_version", $config_version); |
||||
|
||||
// end page |
||||
// output |
||||
$tp->parse(); |
||||
$tp->spit(); |
||||
|
||||
// end output |
||||
include("footer.php"); |
||||
<?php |
||||
/***************************************************************************** |
||||
IP Reg, a PHP/MySQL IPAM tool |
||||
Copyright (C) 2007-2009 Wietse Warendorff |
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. |
||||
|
||||
For more information, visit http://sourceforge.net/projects/ipreg, |
||||
or contact me at wietsew@users.sourceforge.net |
||||
*****************************************************************************/ |
||||
|
||||
// start page |
||||
// includes |
||||
include("includes.php"); |
||||
|
||||
// start output |
||||
include("header.php"); |
||||
|
||||
// set language variables |
||||
$smarty->assign($lang); |
||||
|
||||
// setup page |
||||
// set vars |
||||
$smarty->assign("config_version", $config_version); |
||||
|
||||
// end page |
||||
// output |
||||
$smarty->display("about.tpl"); |
||||
|
||||
// end output |
||||
include("footer.php"); |
||||
?> |
@ -1,129 +1,84 @@ |
||||
<?php |
||||
/***************************************************************************** |
||||
IP Reg, a PHP/MySQL IPAM tool |
||||
Copyright (C) 2007-2009 Wietse Warendorff |
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. |
||||
|
||||
For more information, visit http://sourceforge.net/projects/ipreg, |
||||
or contact me at wietsew@users.sourceforge.net |
||||
*****************************************************************************/ |
||||
|
||||
// start page |
||||
// includes |
||||
include("includes.php"); |
||||
|
||||
// start output |
||||
include("header.php"); |
||||
|
||||
// set template |
||||
$tp = new Template("tpl/asset.tpl", $config_yapter_error); |
||||
|
||||
// set language variables |
||||
$tp->setvars($lang); |
||||
|
||||
// create letter links |
||||
// build query |
||||
$query = "SELECT |
||||
SUBSTRING(UPPER(asset.asset_name),1,1) AS asset_letter |
||||
FROM |
||||
asset |
||||
GROUP BY |
||||
asset_letter |
||||
ORDER BY |
||||
asset_letter"; |
||||
|
||||
// run query |
||||
$alphabet = $db->db_select($query); |
||||
|
||||
// count results |
||||
$alphabet_counter = count($alphabet); |
||||
|
||||
// any letters? |
||||
if ($alphabet_counter>0) { |
||||
// get objects |
||||
foreach($alphabet AS $alphabet_letter) { |
||||
// to tpl |
||||
$tp->set("asset_letter", strtoupper($alphabet_letter['asset_letter'])); |
||||
|
||||
// parse every row |
||||
$tp->parse("letter_row"); |
||||
} |
||||
} |
||||
|
||||
// parse block |
||||
$tp->parse("letter_table"); |
||||
|
||||
// setup asset |
||||
// setup current letter |
||||
if(isset($_GET['asset_letter'])) { |
||||
$asset_letter = sanitize($_GET['asset_letter']); |
||||
} else { |
||||
$asset_letter = $alphabet[0]['asset_letter']; |
||||
} |
||||
|
||||
// build query |
||||
$query = "SELECT |
||||
asset.asset_id AS asset_id, |
||||
asset.asset_name AS asset_name, |
||||
assetclass.assetclass_id AS assetclass_id, |
||||
assetclass.assetclass_name AS assetclass_name |
||||
FROM |
||||
asset, |
||||
assetclass |
||||
WHERE |
||||
SUBSTRING(asset.asset_name,1,1) = '" . $asset_letter . "' |
||||
AND assetclass.assetclass_id=asset.assetclass_id |
||||
ORDER BY |
||||
asset.asset_name"; |
||||
|
||||
// run query |
||||
$assets = $db->db_select($query); |
||||
|
||||
// count results |
||||
$asset_counter = count($assets); |
||||
|
||||
// counter to tpl |
||||
$tp->set("asset_counter", $asset_counter); |
||||
|
||||
// any assets? |
||||
if ($asset_counter>0) { |
||||
// get objects |
||||
foreach($assets AS $asset) { |
||||
// send to tpl |
||||
$tp->set("asset_id", $asset['asset_id']); |
||||
$tp->set("asset_name", $asset['asset_name']); |
||||
|
||||
$tp->set("assetclass_id", $asset['assetclass_id']); |
||||
$tp->set("assetclass_name", $asset['assetclass_name']); |
||||
|
||||
// parse row |
||||
$tp->parse("asset_row"); |
||||
} |
||||
|
||||
// parse block |
||||
$tp->parse("asset_table"); |
||||
} else { |
||||
// hide block |
||||
$tp->hide("asset_table"); |
||||
} |
||||
|
||||
// end page |
||||
// output |
||||
$tp->parse(); |
||||
$tp->spit(); |
||||
|
||||
// end output |
||||
include("footer.php"); |
||||
?> |
||||
<?php |
||||
/***************************************************************************** |
||||
IP Reg, a PHP/MySQL IPAM tool |
||||
Copyright (C) 2007-2009 Wietse Warendorff |
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. |
||||
|
||||
For more information, visit http://sourceforge.net/projects/ipreg, |
||||
or contact me at wietsew@users.sourceforge.net |
||||
*****************************************************************************/ |
||||
|
||||
// start page |
||||
// includes |
||||
include("includes.php"); |
||||
|
||||
// start output |
||||
include("header.php"); |
||||
|
||||
// set language variables |
||||
$smarty->assign($lang); |
||||
|
||||
// create letter links |
||||
// build query |
||||
$query = "SELECT |
||||
SUBSTRING(UPPER(asset.asset_name),1,1) AS asset_letter |
||||
FROM |
||||
asset |
||||
GROUP BY |
||||
asset_letter |
||||
ORDER BY |
||||
asset_letter"; |
||||
|
||||
// run query |
||||
$alphabet = $db->db_select($query); |
||||
$smarty->assign("alphabet", $alphabet); |
||||
|
||||
// setup asset |
||||
// setup current letter |
||||
if(isset($_GET['asset_letter'])) { |
||||
$asset_letter = sanitize($_GET['asset_letter']); |
||||
} else { |
||||
$asset_letter = $alphabet[0]['asset_letter']; |
||||
} |
||||
|
||||
// build query |
||||
$query = "SELECT |
||||
asset.asset_id AS asset_id, |
||||
IF(LENGTH(asset.asset_name)>0, asset.asset_name, '...') AS asset_name, |
||||
asset.asset_info AS asset_info, |
||||
assetclass.assetclass_id AS assetclass_id, |
||||
assetclass.assetclass_name AS assetclass_name |
||||
FROM |
||||
asset, |
||||
assetclass |
||||
WHERE |
||||
SUBSTRING(asset.asset_name,1,1) = '" . $asset_letter . "' |
||||
AND assetclass.assetclass_id=asset.assetclass_id |
||||
ORDER BY |
||||
asset.asset_name"; |
||||
|
||||
// run query |
||||
$assets = $db->db_select($query); |
||||
|
||||
// counter to tpl |
||||
$smarty->assign("assets", $assets); |
||||
|
||||
// end page |
||||
// output |
||||
$smarty->display("asset.tpl"); |
||||
|
||||
// end output |
||||
include("footer.php"); |
||||
?> |
||||
|
@ -1,77 +1,59 @@ |
||||
<?php |
||||
/***************************************************************************** |
||||
IP Reg, a PHP/MySQL IPAM tool |
||||
Copyright (C) 2007-2009 Wietse Warendorff |
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. |
||||
|
||||
For more information, visit http://sourceforge.net/projects/ipreg, |
||||
or contact me at wietsew@users.sourceforge.net |
||||
*****************************************************************************/ |
||||
|
||||
// start page |
||||
// includes |
||||
include("includes.php"); |
||||
|
||||
// get id |
||||
if((isset($_GET['assetclass_id'])) ? $assetclass_id = sanitize($_GET['assetclass_id']) : $assetclass_id = ""); |
||||
|
||||
// start output |
||||
include("header.php"); |
||||
|
||||
// set template |
||||
$tp = new Template("tpl/assetadd.tpl", $config_yapter_error); |
||||
|
||||
// set language variables |
||||
$tp->setvars($lang); |
||||
|
||||
// setup assetclass |
||||
// build query |
||||
$query = "SELECT |
||||
assetclass.assetclass_id AS assetclass_id, |
||||
assetclass.assetclass_name AS assetclass_name |
||||
FROM |
||||
assetclass |
||||
ORDER BY |
||||
assetclass.assetclass_name"; |
||||
|
||||
// run query |
||||
$assetclasses = $db->db_select($query); |
||||
|
||||
foreach($assetclasses AS $assetclass) { |
||||
// send to tpl |
||||
$tp->set("assetclass_id", $assetclass['assetclass_id']); |
||||
$tp->set("assetclass_name", $assetclass['assetclass_name']); |
||||
|
||||
if($assetclass['assetclass_id']==$assetclass_id) { |
||||
$tp->set("assetclass_selected", "selected"); |
||||
} else { |
||||
$tp->set("assetclass_selected", ""); |
||||
} |
||||
|
||||
// parse block |
||||
$tp->parse("assetclass_row"); |
||||
} |
||||
|
||||
// parse block |
||||
$tp->parse("assetclass_table"); |
||||
|
||||
// end page |
||||
// output |
||||
$tp->parse(); |
||||
$tp->spit(); |
||||
|
||||
// end output |
||||
include("footer.php"); |
||||
<?php |
||||
/***************************************************************************** |
||||
IP Reg, a PHP/MySQL IPAM tool |
||||
Copyright (C) 2007-2009 Wietse Warendorff |
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. |
||||
|
||||
For more information, visit http://sourceforge.net/projects/ipreg, |
||||
or contact me at wietsew@users.sourceforge.net |
||||
*****************************************************************************/ |
||||
|
||||
// start page |
||||
// includes |
||||
include("includes.php"); |
||||
|
||||
// get id |
||||
if((isset($_GET['assetclass_id'])) ? $assetclass_id = sanitize($_GET['assetclass_id']) : $assetclass_id = ""); |
||||
|
||||
// start output |
||||
include("header.php"); |
||||
|
||||
// set language variables |
||||
$smarty->assign($lang); |
||||
|
||||
// setup assetclass |
||||
// build query |
||||
$query = "SELECT |
||||
assetclass.assetclass_id AS assetclass_id, |
||||
assetclass.assetclass_name AS assetclass_name |
||||
FROM |
||||
assetclass |
||||
ORDER BY |
||||
assetclass.assetclass_name"; |
||||
|
||||
// run query |
||||
$assetclasses = $db->db_select($query); |
||||
foreach ($assetclasses as $assetclass) { |
||||
$assetclass_options[$assetclass['assetclass_id']] = $assetclass['assetclass_name']; |
||||
} |
||||
$smarty->assign("assetclass_options", $assetclass_options); |
||||
|
||||
// end page |
||||
// output |
||||
$smarty->display("assetadd.tpl"); |
||||
|
||||
// end output |
||||
include("footer.php"); |
||||
?> |
@ -1,89 +1,61 @@ |
||||
<?php |
||||
/***************************************************************************** |
||||
IP Reg, a PHP/MySQL IPAM tool |
||||
Copyright (C) 2007-2009 Wietse Warendorff |
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. |
||||
|
||||
For more information, visit http://sourceforge.net/projects/ipreg, |
||||
or contact me at wietsew@users.sourceforge.net |
||||
*****************************************************************************/ |
||||
|
||||
// start page |
||||
// includes |
||||
include("includes.php"); |
||||
|
||||
// start output |
||||
include("header.php"); |
||||
|
||||
// set template |
||||
$tp = new Template("tpl/assetclass.tpl", $config_yapter_error); |
||||
|
||||
// set language variables |
||||
$tp->setvars($lang); |
||||
|
||||
// setup assetclass |
||||
// build query |
||||
$query = "SELECT |
||||
assetclass.assetclass_id AS assetclass_id, |
||||
assetclass.assetclass_name AS assetclass_name, |
||||
assetclassgroup.assetclassgroup_id AS assetclassgroup_id, |
||||
assetclassgroup.assetclassgroup_name AS assetclassgroup_name |
||||
FROM |
||||
assetclass, |
||||
assetclassgroup |
||||
WHERE |
||||
assetclassgroup.assetclassgroup_id=assetclass.assetclassgroup_id |
||||
ORDER BY |
||||
assetclass.assetclass_name"; |
||||
|
||||
// run query |
||||
$assetclasses = $db->db_select($query); |
||||
|
||||
// count results |
||||
$assetclass_counter = count($assetclasses); |
||||
|
||||
// counter to tpl |
||||
$tp->set("assetclass_counter", $assetclass_counter); |
||||
|
||||
// any assetclasses? |
||||
if ($assetclass_counter>0) { |
||||
// get objects |
||||
foreach($assetclasses AS $assetclass) { |
||||
// send to tpl |
||||
$tp->set("assetclass_id", $assetclass['assetclass_id']); |
||||
$tp->set("assetclass_name", $assetclass['assetclass_name']); |
||||
|
||||
$tp->set("assetclassgroup_id", $assetclass['assetclassgroup_id']); |
||||
$tp->set("assetclassgroup_name", $assetclass['assetclassgroup_name']); |
||||
|
||||
// parse row |
||||
$tp->parse("assetclass_row"); |
||||
} |
||||
|
||||
// parse block |
||||
$tp->parse("assetclass_table"); |
||||
} else { |
||||
// hide block |
||||
$tp->hide("assetclass_table"); |
||||
} |
||||
|
||||
// end page |
||||
// output |
||||
$tp->parse(); |
||||
$tp->spit(); |
||||
|
||||
// end output |
||||
include("footer.php"); |
||||
<?php |
||||
/***************************************************************************** |
||||
IP Reg, a PHP/MySQL IPAM tool |
||||
Copyright (C) 2007-2009 Wietse Warendorff |
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. |
||||
|
||||
For more information, visit http://sourceforge.net/projects/ipreg, |
||||
or contact me at wietsew@users.sourceforge.net |
||||
*****************************************************************************/ |
||||
|
||||
// start page |
||||
// includes |
||||
include("includes.php"); |
||||
|
||||
// start output |
||||
include("header.php"); |
||||
|
||||
// set language variables |
||||
$smarty->assign($lang); |
||||
|
||||
// setup assetclass |
||||
// build query |
||||
$query = "SELECT |
||||
assetclass.assetclass_id AS assetclass_id, |
||||
assetclass.assetclass_name AS assetclass_name, |
||||
assetclassgroup.assetclassgroup_id AS assetclassgroup_id, |
||||
assetclassgroup.assetclassgroup_name AS assetclassgroup_name |
||||
FROM |
||||
assetclass, |
||||
assetclassgroup |
||||
WHERE |
||||
assetclassgroup.assetclassgroup_id=assetclass.assetclassgroup_id |
||||
ORDER BY |
||||
assetclass.assetclass_name"; |
||||
|
||||
// run query |
||||
$assetclasses = $db->db_select($query); |
||||
|
||||
// counter to tpl |
||||
$smarty->assign("assetclasses", $assetclasses); |
||||
|
||||
|
||||
// end page |
||||
// output |
||||
$smarty->display("assetclass.tpl"); |
||||
|
||||
// end output |
||||
include("footer.php"); |
||||
?> |
@ -1,78 +1,45 @@ |
||||
<?php |
||||
/***************************************************************************** |
||||
IP Reg, a PHP/MySQL IPAM tool |
||||
Copyright (C) 2007-2009 Wietse Warendorff |
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. |
||||
|
||||
For more information, visit http://sourceforge.net/projects/ipreg, |
||||
or contact me at wietsew@users.sourceforge.net |
||||
*****************************************************************************/ |
||||
|
||||
// start page |
||||
// includes |
||||
include("includes.php"); |
||||
|
||||
// get id |
||||
if((isset($_GET['assetclassgroup_id'])) ? $assetclassgroup_id = sanitize($_GET['assetclassgroup_id']) : $assetclassgroup_id = ""); |
||||
|
||||
// start output |
||||
include("header.php"); |
||||
|
||||
// set template |
||||
$tp = new Template("tpl/assetclassadd.tpl", $config_yapter_error); |
||||
|
||||
// set language variables |
||||
$tp->setvars($lang); |
||||
|
||||
// setup assetclassgroup |
||||
// build query |
||||
$query = "SELECT |
||||
assetclassgroup.assetclassgroup_id AS assetclassgroup_id, |
||||
assetclassgroup.assetclassgroup_name AS assetclassgroup_name |
||||
FROM |
||||
assetclassgroup |
||||
ORDER BY |
||||
assetclassgroup.assetclassgroup_name"; |
||||
|
||||
// run query |
||||
$assetclassgroup = $db->db_select($query); |
||||
|
||||
// get objects |
||||
foreach($assetclassgroup AS $assetclassgroup) { |
||||
// send to tpl |
||||
$tp->set("assetclassgroup_id", $assetclassgroup['assetclassgroup_id']); |
||||
$tp->set("assetclassgroup_name", $assetclassgroup['assetclassgroup_name']); |
||||
|
||||
if($assetclassgroup['assetclassgroup_id']==$assetclassgroup_id) { |
||||
$tp->set("assetclassgroup_selected", "selected"); |
||||
} else { |
||||
$tp->set("assetclassgroup_selected", ""); |
||||
} |
||||
|
||||
// parse block |
||||
$tp->parse("assetclassgroup_row"); |
||||
} |
||||
|
||||
// parse block |
||||
$tp->parse("assetclassgroup_table"); |
||||
|
||||
// end page |
||||
// output |
||||
$tp->parse(); |
||||
$tp->spit(); |
||||
|
||||
// end output |
||||
include("footer.php"); |
||||
<?php |
||||
/***************************************************************************** |
||||
IP Reg, a PHP/MySQL IPAM tool |
||||
Copyright (C) 2007-2009 Wietse Warendorff |
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. |
||||
|
||||
For more information, visit http://sourceforge.net/projects/ipreg, |
||||
or contact me at wietsew@users.sourceforge.net |
||||
*****************************************************************************/ |
||||
|
||||
// start page |
||||
// includes |
||||
include("includes.php"); |
||||
|
||||
// get id |
||||
if((isset($_GET['assetclassgroup_id'])) ? $assetclassgroup_id = sanitize($_GET['assetclassgroup_id']) : $assetclassgroup_id = ""); |
||||
|
||||
// start output |
||||
include("header.php"); |
||||
|
||||
// set language variables |
||||
$smarty->assign($lang); |
||||
|
||||
// setup assetclassgroup |
||||
$smarty->assign("assetclassgroup_options", $db->options_assetclassgroup()); |
||||
|
||||
// end page |
||||
// output |
||||
$smarty->display("assetclassadd.tpl"); |
||||
|
||||
// end output |
||||
include("footer.php"); |
||||
?> |
@ -1,63 +1,59 @@ |
||||
<?php |
||||
/***************************************************************************** |
||||
IP Reg, a PHP/MySQL IPAM tool |
||||
Copyright (C) 2007-2009 Wietse Warendorff |
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. |
||||
|
||||
For more information, visit http://sourceforge.net/projects/ipreg, |
||||
or contact me at wietsew@users.sourceforge.net |
||||
*****************************************************************************/ |
||||
|
||||
// start page |
||||
// includes |
||||
include("includes.php"); |
||||
|
||||
// get id |
||||
$assetclass_id = sanitize($_GET['assetclass_id']); |
||||
|
||||
// start output |
||||
include("header.php"); |
||||
|
||||
// set template |
||||
$tp = new Template("tpl/assetclassdel.tpl", $config_yapter_error); |
||||
|
||||
// set language variables |
||||
$tp->setvars($lang); |
||||
|
||||
// setup assetclass |
||||
// build query |
||||
$query = "SELECT |
||||
assetclass.assetclass_id AS assetclass_id, |
||||
assetclass.assetclass_name AS assetclass_name |
||||
FROM |
||||
assetclass |
||||
WHERE |
||||
assetclass.assetclass_id=" . $assetclass_id; |
||||
|
||||
// run query |
||||
$assetclass = $db->db_select($query); |
||||
|
||||
// send to tpl |
||||
$tp->set("assetclass_id", $assetclass[0]['assetclass_id']); |
||||
$tp->set("assetclass_name", $assetclass[0]['assetclass_name']); |
||||
|
||||
// end page |
||||
// output |
||||
$tp->parse(); |
||||
$tp->spit(); |
||||
|
||||
// end output |
||||
include("footer.php"); |
||||
<?php |
||||
/***************************************************************************** |
||||
IP Reg, a PHP/MySQL IPAM tool |
||||
Copyright (C) 2007-2009 Wietse Warendorff |
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. |
||||
|
||||
For more information, visit http://sourceforge.net/projects/ipreg, |
||||
or contact me at wietsew@users.sourceforge.net |
||||
*****************************************************************************/ |
||||
|
||||
// start page |
||||
// includes |
||||
include("includes.php"); |
||||
|
||||
// get id |
||||
$assetclass_id = sanitize($_GET['assetclass_id']); |
||||
|
||||
// start output |
||||
include("header.php"); |
||||
|
||||
// set language variables |
||||
$smarty->assign($lang); |
||||
|
||||
// setup assetclass |
||||
// build query |
||||
$query = "SELECT |
||||
assetclass.assetclass_id AS assetclass_id, |
||||
assetclass.assetclass_name AS assetclass_name |
||||
FROM |
||||
assetclass |
||||
WHERE |
||||
assetclass.assetclass_id=" . $assetclass_id; |
||||
|
||||
// run query |
||||
$assetclass = $db->db_select($query); |
||||
|
||||
// send to tpl |
||||
$smarty->assign("assetclass_id", $assetclass[0]['assetclass_id']); |
||||
$smarty->assign("assetclass_name", $assetclass[0]['assetclass_name']); |
||||
|
||||
// end page |
||||
// output |
||||
$smarty->display("assetclassdel.tpl"); |
||||
|
||||
// end output |
||||
include("footer.php"); |
||||
?> |
@ -1,96 +1,65 @@ |
||||
<?php |
||||
/***************************************************************************** |
||||
IP Reg, a PHP/MySQL IPAM tool |
||||
Copyright (C) 2007-2009 Wietse Warendorff |
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. |
||||
|
||||
For more information, visit http://sourceforge.net/projects/ipreg, |
||||
or contact me at wietsew@users.sourceforge.net |
||||
*****************************************************************************/ |
||||
|
||||
// start page |
||||
// includes |
||||
include("includes.php"); |
||||
|
||||
// get id |
||||
$assetclass_id = sanitize($_GET['assetclass_id']); |
||||
|
||||
// start output |
||||
include("header.php"); |
||||
|
||||
// set template |
||||
$tp = new Template("tpl/assetclassedit.tpl", $config_yapter_error); |
||||
|
||||
// set language variables |
||||
$tp->setvars($lang); |
||||
|
||||
// setup assetclass |
||||
// build query |
||||
$query = "SELECT |
||||
assetclass.assetclass_id AS assetclass_id, |
||||
assetclass.assetclass_name AS assetclass_name, |
||||
assetclass.assetclassgroup_id AS assetclassgroup_id |
||||
FROM |
||||
assetclass |
||||
WHERE |
||||
assetclass.assetclass_id=" . $assetclass_id; |
||||
|
||||
// run query |
||||
$assetclass = $db->db_select($query); |
||||
|
||||
// send to tpl |
||||
$tp->set("assetclass_id", $assetclass[0]['assetclass_id']); |
||||
$tp->set("assetclass_name", $assetclass[0]['assetclass_name']); |
||||
|
||||
// setup assetclassgroup |
||||
// build query |
||||
$query = "SELECT |
||||
assetclassgroup.assetclassgroup_id AS assetclassgroup_id, |
||||
assetclassgroup.assetclassgroup_name AS assetclassgroup_name |
||||
FROM |
||||
assetclassgroup |
||||
ORDER BY |
||||
assetclassgroup.assetclassgroup_name"; |
||||
|
||||
// run query |
||||
$assetclassgroups = $db->db_select($query); |
||||
|
||||
// get objects |
||||
foreach($assetclassgroups AS $assetclassgroup) { |
||||
// send to tpl |
||||
$tp->set("assetclassgroup_id", $assetclassgroup['assetclassgroup_id']); |
||||
$tp->set("assetclassgroup_name", $assetclassgroup['assetclassgroup_name']); |
||||
|
||||
if($assetclassgroup['assetclassgroup_id']==$assetclass[0]['assetclassgroup_id']) { |
||||
$tp->set("assetclassgroup_selected", "selected"); |
||||
} else { |
||||
$tp->set("assetclassgroup_selected", ""); |
||||
} |
||||
|
||||
// parse block |
||||
$tp->parse("assetclassgroup_row"); |
||||
} |
||||
|
||||
// parse block |
||||
$tp->parse("assetclassgroup_table"); |
||||
|
||||
// end page |
||||
// output |
||||
$tp->parse(); |
||||
$tp->spit(); |
||||
|
||||
// end output |
||||
include("footer.php"); |
||||
<?php |
||||
/***************************************************************************** |
||||
IP Reg, a PHP/MySQL IPAM tool |
||||
Copyright (C) 2007-2009 Wietse Warendorff |
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. |
||||
|
||||
For more information, visit http://sourceforge.net/projects/ipreg, |
||||
or contact me at wietsew@users.sourceforge.net |
||||
*****************************************************************************/ |
||||
|
||||
// start page |
||||
// includes |
||||
include("includes.php"); |
||||
|
||||
// get id |
||||
$assetclass_id = sanitize($_GET['assetclass_id']); |
||||
|
||||
// start output |
||||
include("header.php"); |
||||
|
||||
// set language variables |
||||
$smarty->assign($lang); |
||||
|
||||
// setup assetclass |
||||
// build query |
||||
$query = "SELECT |
||||
assetclass.assetclass_id AS assetclass_id, |
||||
assetclass.assetclass_name AS assetclass_name, |
||||
assetclass.assetclassgroup_id AS assetclassgroup_id |
||||
FROM |
||||
assetclass |
||||
WHERE |
||||
assetclass.assetclass_id=" . $assetclass_id; |
||||
|
||||
// run query |
||||
$assetclass = $db->db_select($query); |
||||
|
||||
// send to tpl |
||||
$smarty->assign("assetclass_id", $assetclass[0]['assetclass_id']); |
||||
$smarty->assign("assetclass_name", $assetclass[0]['assetclass_name']); |
||||
$smarty->assign("assetclassgroup_id", $assetclass[0]['assetclassgroup_id']); |
||||
|
||||
// setup assetclassgroup |
||||
// build query |
||||
$smarty->assign("assetclassgroup_options", $db->options_assetclassgroup()); |
||||
|
||||
// end page |
||||
// output |
||||
$smarty->display("assetclassedit.tpl"); |
||||
|
||||
// end output |
||||
include("footer.php"); |
||||
?> |
@ -1,84 +1,54 @@ |
||||
<?php |
||||
/***************************************************************************** |
||||
IP Reg, a PHP/MySQL IPAM tool |
||||
Copyright (C) 2007-2009 Wietse Warendorff |
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. |
||||
|
||||
For more information, visit http://sourceforge.net/projects/ipreg, |
||||
or contact me at wietsew@users.sourceforge.net |
||||
*****************************************************************************/ |
||||
|
||||
// start page |
||||
// includes |
||||
include("includes.php"); |
||||
|
||||
// start output |
||||
include("header.php"); |
||||
|
||||
// set template |
||||
$tp = new Template("tpl/assetclassgroup.tpl", $config_yapter_error); |
||||
|
||||
// set language variables |
||||
$tp->setvars($lang); |
||||
|
||||
// setup assetclassgroup |
||||
// build query |
||||
$query = "SELECT |
||||
assetclassgroup.assetclassgroup_id AS assetclassgroup_id, |
||||
assetclassgroup.assetclassgroup_name AS assetclassgroup_name |
||||
FROM |
||||
assetclassgroup |
||||
ORDER BY |
||||
assetclassgroup.assetclassgroup_name"; |
||||
|
||||
// run query |
||||
$assetclassgroups = $db->db_select($query); |
||||
|
||||
// count results |
||||
$assetclassgroup_counter = count($assetclassgroups); |
||||
|
||||
// counter to tpl |
||||
$tp->set("assetclassgroup_counter", $assetclassgroup_counter); |
||||
|
||||
// any assetclassgroups? |
||||
if ($assetclassgroup_counter>0) { |
||||
// get objects |
||||
foreach($assetclassgroups AS $assetclassgroup) { |
||||
// send to tpl |
||||
$tp->set("assetclassgroup_id", $assetclassgroup['assetclassgroup_id']); |
||||
$tp->set("assetclassgroup_name", $assetclassgroup['assetclassgroup_name']); |
||||
|
||||
$tp->set("assetclassgroup_id", $assetclassgroup['assetclassgroup_id']); |
||||
$tp->set("assetclassgroup_name", $assetclassgroup['assetclassgroup_name']); |
||||
|
||||
// parse row |
||||
$tp->parse("assetclassgroup_row"); |
||||
} |
||||
|
||||
// parse block |
||||
$tp->parse("assetclassgroup_table"); |
||||
} else { |
||||
// hide block |
||||
$tp->hide("assetclassgroup_table"); |
||||
} |
||||
|
||||
// end page |
||||
// output |
||||
$tp->parse(); |
||||
$tp->spit(); |
||||
|
||||
// end output |
||||
include("footer.php"); |
||||
<?php |
||||
/***************************************************************************** |
||||
IP Reg, a PHP/MySQL IPAM tool |
||||
Copyright (C) 2007-2009 Wietse Warendorff |
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. |
||||
|
||||
For more information, visit http://sourceforge.net/projects/ipreg, |
||||
or contact me at wietsew@users.sourceforge.net |
||||
*****************************************************************************/ |
||||
|
||||
// start page |
||||
// includes |
||||
include("includes.php"); |
||||
|
||||
// start output |
||||
include("header.php"); |
||||
|
||||
// set language variables |
||||
$smarty->assign($lang); |
||||
|
||||
// setup assetclassgroup |
||||
// build query |
||||
$query = "SELECT |
||||
assetclassgroup.assetclassgroup_id AS assetclassgroup_id, |
||||
assetclassgroup.assetclassgroup_name AS assetclassgroup_name, |
||||
assetclassgroup.assetclassgroup_color AS assetclassgroup_color |
||||
FROM |
||||
assetclassgroup |
||||
ORDER BY |
||||
assetclassgroup.assetclassgroup_name"; |
||||
|
||||
// run query |
||||
$assetclassgroups = $db->db_select($query); |
||||
$smarty->assign("assetclassgroups", $assetclassgroups); |
||||
|
||||
// end page |
||||
// output |
||||
$smarty->display("assetclassgroup.tpl"); |
||||
|
||||
// end output |
||||
include("footer.php"); |
||||
?> |
@ -1,43 +1,39 @@ |
||||
<?php |
||||
/***************************************************************************** |
||||
IP Reg, a PHP/MySQL IPAM tool |
||||
Copyright (C) 2007-2009 Wietse Warendorff |
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. |
||||
|
||||
For more information, visit http://sourceforge.net/projects/ipreg, |
||||
or contact me at wietsew@users.sourceforge.net |
||||
*****************************************************************************/ |
||||
|
||||
// start page |
||||
// includes |
||||
include("includes.php"); |
||||
|
||||
// start output |
||||
include("header.php"); |
||||
|
||||
// set template |
||||
$tp = new Template("tpl/assetclassgroupadd.tpl", $config_yapter_error); |
||||
|
||||
// set language variables |
||||
$tp->setvars($lang); |
||||
|
||||
// end page |
||||
// output |
||||
$tp->parse(); |
||||
$tp->spit(); |
||||
|
||||
// end output |
||||
include("footer.php"); |
||||
<?php |
||||
/***************************************************************************** |
||||
IP Reg, a PHP/MySQL IPAM tool |
||||
Copyright (C) 2007-2009 Wietse Warendorff |
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. |
||||
|
||||
For more information, visit http://sourceforge.net/projects/ipreg, |
||||
or contact me at wietsew@users.sourceforge.net |
||||
*****************************************************************************/ |
||||
|
||||
// start page |
||||
// includes |
||||
include("includes.php"); |
||||
|
||||
// start output |
||||
include("header.php"); |
||||
|
||||
// set language variables |
||||
$smarty->assign($lang); |
||||
|
||||
// end page |
||||
// output |
||||
$smarty->display("assetclassgroupadd.tpl"); |
||||
|
||||
// end output |
||||
include("footer.php"); |
||||
?> |
@ -1,63 +1,59 @@ |
||||
<?php |
||||
/***************************************************************************** |
||||
IP Reg, a PHP/MySQL IPAM tool |
||||
Copyright (C) 2007-2009 Wietse Warendorff |
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. |
||||
|
||||
For more information, visit http://sourceforge.net/projects/ipreg, |
||||
or contact me at wietsew@users.sourceforge.net |
||||
*****************************************************************************/ |
||||
|
||||
// start page |
||||
// includes |
||||
include("includes.php"); |
||||
|
||||
// get id |
||||
$assetclassgroup_id = sanitize($_GET['assetclassgroup_id']); |
||||
|
||||
// start output |
||||
include("header.php"); |
||||
|
||||
// set template |
||||
$tp = new Template("tpl/assetclassgroupdel.tpl", $config_yapter_error); |
||||
|
||||
// set language variables |
||||
$tp->setvars($lang); |
||||
|
||||
// setup assetclassgroup |
||||
// build query |
||||
$query = "SELECT |
||||
assetclassgroup.assetclassgroup_id AS assetclassgroup_id, |
||||
assetclassgroup.assetclassgroup_name AS assetclassgroup_name |
||||
FROM |
||||
assetclassgroup |
||||
WHERE |
||||
assetclassgroup.assetclassgroup_id=" . $assetclassgroup_id; |
||||
|
||||
// run query |
||||
$assetclassgroup = $db->db_select($query); |
||||
|
||||
// send to tpl |
||||
$tp->set("assetclassgroup_id", $assetclassgroup[0]['assetclassgroup_id']); |
||||
$tp->set("assetclassgroup_name", $assetclassgroup[0]['assetclassgroup_name']); |
||||
|
||||
// end page |
||||
// output |
||||
$tp->parse(); |
||||
$tp->spit(); |
||||
|
||||
// end output |
||||
include("footer.php"); |
||||
<?php |
||||
/***************************************************************************** |
||||
IP Reg, a PHP/MySQL IPAM tool |
||||
Copyright (C) 2007-2009 Wietse Warendorff |
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. |
||||
|
||||
For more information, visit http://sourceforge.net/projects/ipreg, |
||||
or contact me at wietsew@users.sourceforge.net |
||||
*****************************************************************************/ |
||||
|
||||
// start page |
||||
// includes |
||||
include("includes.php"); |
||||
|
||||
// get id |
||||
$assetclassgroup_id = sanitize($_GET['assetclassgroup_id']); |
||||
|
||||
// start output |
||||
include("header.php"); |
||||
|
||||
// set language variables |
||||
$smarty->assign($lang); |
||||
|
||||
// setup assetclassgroup |
||||
// build query |
||||
$query = "SELECT |
||||
assetclassgroup.assetclassgroup_id AS assetclassgroup_id, |
||||
assetclassgroup.assetclassgroup_name AS assetclassgroup_name |
||||
FROM |
||||
assetclassgroup |
||||
WHERE |
||||
assetclassgroup.assetclassgroup_id=" . $assetclassgroup_id; |
||||
|
||||
// run query |
||||
$assetclassgroup = $db->db_select($query); |
||||
|
||||
// send to tpl |
||||
$smarty->assign("assetclassgroup_id", $assetclassgroup[0]['assetclassgroup_id']); |
||||
$smarty->assign("assetclassgroup_name", $assetclassgroup[0]['assetclassgroup_name']); |
||||
|
||||
// end page |
||||
// output |
||||
$smarty->display("assetclassgroupdel.tpl"); |
||||
|
||||
// end output |
||||
include("footer.php"); |
||||
?> |
@ -1,65 +1,62 @@ |
||||
<?php |
||||
/***************************************************************************** |
||||
IP Reg, a PHP/MySQL IPAM tool |
||||
Copyright (C) 2007-2009 Wietse Warendorff |
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. |
||||
|
||||
For more information, visit http://sourceforge.net/projects/ipreg, |
||||
or contact me at wietsew@users.sourceforge.net |
||||
*****************************************************************************/ |
||||
|
||||
// start page |
||||
// includes |
||||
include("includes.php"); |
||||
|
||||
// get id |
||||
$assetclassgroup_id = sanitize($_GET['assetclassgroup_id']); |
||||
|
||||
// start output |
||||
include("header.php"); |
||||
|
||||
// set template |
||||
$tp = new Template("tpl/assetclassgroupedit.tpl", $config_yapter_error); |
||||
|
||||
// set language variables |
||||
$tp->setvars($lang); |
||||
|
||||
// setup assetclassgroup |
||||
// build query |
||||
$query = "SELECT |
||||
assetclassgroup.assetclassgroup_id AS assetclassgroup_id, |
||||
assetclassgroup.assetclassgroup_name AS assetclassgroup_name, |
||||
assetclassgroup.assetclassgroup_color AS assetclassgroup_color |
||||
FROM |
||||
assetclassgroup |
||||
WHERE |
||||
assetclassgroup.assetclassgroup_id=" . $assetclassgroup_id; |
||||
|
||||
// run query |
||||
$assetclassgroup = $db->db_select($query); |
||||
|
||||
// send to tpl |
||||
$tp->set("assetclassgroup_id", $assetclassgroup[0]['assetclassgroup_id']); |
||||
$tp->set("assetclassgroup_name", $assetclassgroup[0]['assetclassgroup_name']); |
||||
$tp->set("assetclassgroup_color", $assetclassgroup[0]['assetclassgroup_color']); |
||||
|
||||
// end page |
||||
// output |
||||
$tp->parse(); |
||||
$tp->spit(); |
||||
|
||||
// end output |
||||
include("footer.php"); |
||||
<?php |
||||
/***************************************************************************** |
||||
IP Reg, a PHP/MySQL IPAM tool |
||||
Copyright (C) 2007-2009 Wietse Warendorff |
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. |
||||
|
||||
For more information, visit http://sourceforge.net/projects/ipreg, |
||||
or contact me at wietsew@users.sourceforge.net |
||||
*****************************************************************************/ |
||||
|
||||
// start page |
||||
// includes |
||||
include("includes.php"); |
||||
|
||||
// get id |
||||
$assetclassgroup_id = sanitize($_GET['assetclassgroup_id']); |
||||
|
||||
// start output |
||||
$smarty->assign("scripts", 'jscolor.js'); |
||||
include("header.php"); |
||||
|
||||
// set language variables |
||||
$smarty->assign($lang); |
||||
|
||||
// setup assetclassgroup |
||||
// build query |
||||
$query = "SELECT |
||||
assetclassgroup.assetclassgroup_id AS assetclassgroup_id, |
||||
assetclassgroup.assetclassgroup_name AS assetclassgroup_name, |
||||
assetclassgroup.assetclassgroup_color AS assetclassgroup_color |
||||
FROM |
||||
assetclassgroup |
||||
WHERE |
||||
assetclassgroup.assetclassgroup_id=" . $assetclassgroup_id; |
||||
|
||||
// run query |
||||
$assetclassgroup = $db->db_select($query); |
||||
|
||||
// send to tpl |
||||
$smarty->assign("assetclassgroup_id", $assetclassgroup[0]['assetclassgroup_id']); |
||||
$smarty->assign("assetclassgroup_name", $assetclassgroup[0]['assetclassgroup_name']); |
||||
$smarty->assign("assetclassgroup_color", $assetclassgroup[0]['assetclassgroup_color']); |
||||
|
||||
// end page |
||||
// output |
||||
$smarty->display("assetclassgroupedit.tpl"); |
||||
|
||||
// end output |
||||
include("footer.php"); |
||||
?> |
@ -1,105 +1,77 @@ |
||||
<?php |
||||
/***************************************************************************** |
||||
IP Reg, a PHP/MySQL IPAM tool |
||||
Copyright (C) 2007-2009 Wietse Warendorff |
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. |
||||
|
||||
For more information, visit http://sourceforge.net/projects/ipreg, |
||||
or contact me at wietsew@users.sourceforge.net |
||||
*****************************************************************************/ |
||||
|
||||
// start page |
||||
// includes |
||||
include("includes.php"); |
||||
|
||||
// get id |
||||
$assetclassgroup_id = sanitize($_GET['assetclassgroup_id']); |
||||
|
||||
// start output |
||||
include("header.php"); |
||||
|
||||
// set template |
||||
$tp = new Template("tpl/assetclassgroupview.tpl", $config_yapter_error); |
||||
|
||||
// set language variables |
||||
$tp->setvars($lang); |
||||
|
||||
// setup assetclassgroup |
||||
// build query |
||||
$query = "SELECT |
||||
assetclassgroup.assetclassgroup_id AS assetclassgroup_id, |
||||
assetclassgroup.assetclassgroup_name AS assetclassgroup_name, |
||||
assetclassgroup.assetclassgroup_color AS assetclassgroup_color |
||||
FROM |
||||
assetclassgroup |
||||
WHERE |
||||
assetclassgroup.assetclassgroup_id=" . $assetclassgroup_id; |
||||
|
||||
// run query |
||||
$assetclassgroup = $db->db_select($query); |
||||
|
||||
// send to tpl |
||||
$tp->set("assetclassgroup_id", $assetclassgroup[0]['assetclassgroup_id']); |
||||
$tp->set("assetclassgroup_name", $assetclassgroup[0]['assetclassgroup_name']); |
||||
$tp->set("assetclassgroup_color", $assetclassgroup[0]['assetclassgroup_color']); |
||||
|
||||
// setup assetclass |
||||
// build query |
||||
$query = "SELECT |
||||
assetclass.assetclass_id AS assetclass_id, |
||||
assetclass.assetclass_name AS assetclass_name |
||||
FROM |
||||
assetclass |
||||
WHERE |
||||
assetclass.assetclassgroup_id=" . $assetclassgroup_id . " |
||||
ORDER BY |
||||
assetclass.assetclass_name"; |
||||
|
||||
// run query |
||||
$assetclasses = $db->db_select($query); |
||||
|
||||
// count results |
||||
$assetclass_counter = count($assetclasses); |
||||
|
||||
// counter to tpl |
||||
$tp->set("assetclass_counter", $assetclass_counter); |
||||
|
||||
// any assets? |
||||
if ($assetclass_counter>0) { |
||||
// get objects |
||||
foreach($assetclasses AS $assetclass) { |
||||
// send to tpl |
||||
$tp->set("assetclass_id", $assetclass['assetclass_id']); |
||||
$tp->set("assetclass_name", $assetclass['assetclass_name']); |
||||
|
||||
// parse row |
||||
$tp->parse("assetclass_row"); |
||||
} |
||||
|
||||
// parse block |
||||
$tp->parse("assetclass_table"); |
||||
} else { |
||||
// hide block |
||||
$tp->hide("assetclass_table"); |
||||
} |
||||
|
||||
// end page |
||||
// output |
||||
$tp->parse(); |
||||
$tp->spit(); |
||||
|
||||
// end output |
||||
include("footer.php"); |
||||
<?php |
||||
/***************************************************************************** |
||||
IP Reg, a PHP/MySQL IPAM tool |
||||
Copyright (C) 2007-2009 Wietse Warendorff |
||||
|
||||