Ejemplo n.º 1
0
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/
/*
Lilac Resource
*/
include_once 'includes/config.inc';
require_once 'NagiosResource.php';
$resourceCfg = NagiosResourcePeer::doSelectOne(new Criteria());
if (!$resourceCfg) {
    $resourceCfg = new NagiosResource();
    $resourceCfg->save();
}
if (isset($_POST['request'])) {
    if ($_POST['request'] == 'update') {
        $resourceCfg->setUser1($_POST['resource_config']['user1']);
        $resourceCfg->setUser2($_POST['resource_config']['user2']);
        $resourceCfg->setUser3($_POST['resource_config']['user3']);
        $resourceCfg->setUser4($_POST['resource_config']['user4']);
        $resourceCfg->setUser5($_POST['resource_config']['user5']);
        $resourceCfg->setUser6($_POST['resource_config']['user6']);
        $resourceCfg->setUser7($_POST['resource_config']['user7']);
        $resourceCfg->setUser8($_POST['resource_config']['user8']);
        $resourceCfg->setUser9($_POST['resource_config']['user9']);
        $resourceCfg->setUser10($_POST['resource_config']['user10']);
        $resourceCfg->setUser11($_POST['resource_config']['user11']);
        $resourceCfg->setUser12($_POST['resource_config']['user12']);
        $resourceCfg->setUser13($_POST['resource_config']['user13']);
        $resourceCfg->setUser14($_POST['resource_config']['user14']);
        $resourceCfg->setUser15($_POST['resource_config']['user15']);
        $resourceCfg->setUser16($_POST['resource_config']['user16']);
        $resourceCfg->setUser17($_POST['resource_config']['user17']);