diff options
494 files changed, 0 insertions, 51191 deletions
diff --git a/ldap-site-mngmt/generation-scripts/dhcp_generate.pl b/ldap-site-mngmt/generation-scripts/dhcp_generate.pl deleted file mode 100644 index 5623cc96..00000000 --- a/ldap-site-mngmt/generation-scripts/dhcp_generate.pl +++ /dev/null @@ -1,410 +0,0 @@ -#!/usr/bin/perl - -# Generate ISC DHCP Configuration File -# -# Reads DHCP Config Data form LDAP Directory and generates an -# include file "dhcp.master.inc" included in dhcpd.conf with: -# - Definitions of User-defined DHCP Options -# - DHCP Service Global Options -# - DHCP Subnet Declarations, Options and Dynamic Pools -# - DHCP Host Declarations and Options - - -use strict; -use warnings; -#use diagnostics; - -#use LSM::dhcpgen; -use Net::LDAP; -use Net::LDAP::LDIF; -use Getopt::Std; - -#$Getopt::Std::STANDARD_HELP_VERSION; -our $VERSION = "1.10"; - - -# Configuration Variables for Perl-Script -our ( $ldaphost, $basedn, $userdn, $passwd, $dhcpdn, $dhcpdconfpath, $dhcpdconffile, $opt_a, $opt_h, $opt_v ); -# Read Configuration Variables ... -require "dhcpgen.conf.pl"; - -my ( $ldap, $mesg, $failoverpeer, @searchbases ); - -#use LSM::dhcpgen; -my $acteptime = time(); -my $acttime = localtime(); -getopts('ahv'); - - -if ($opt_h){ print "HILFE Text\n"; exit (1); } -if ($opt_a){ print "Generate all Include Files:\n\n";} - - -# Bind with LDAP Server -$ldap = Net::LDAP->new( $ldaphost, debug => 0 ) or die "$@"; -$mesg = $ldap->bind( $userdn, password => $passwd ); -$mesg->code && die $mesg->error; - -my @dhcpunits = get_dhcpunits(); -@searchbases = searchbases($acteptime); -#print @searchbases; - -mkdir "$dhcpdconfpath/includes"; - - -################################################# -# DHCP MASTER INCLUDE FILE -my $writemaster; -my @dhcpdnarray = split /,/,$dhcpdn; -my $aurdn = $dhcpdnarray[2]; -my @auarray = split /=/,$aurdn; -my $au = $auarray[1]; -my $srvrdn = $dhcpdnarray[0]; -my @srvarray = split /=/,$srvrdn; -my $srv = $srvarray[1]; - -# File Header -$writemaster .= "# DHCP Config Master Include File \"dhcp.master.inc\"\n# DHCP Service: $srv\n# AU: $au\n# (DN: $dhcpdn)\n# generated: $acttime\n# Unix: $acteptime\n\n"; - -# LDAP Search: DHCP Service Object -my $dhcpsrventry = get_dhcpservice_object($ldap,$dhcpdn); - -# Definitions for user/self-defined DHCP Options -$writemaster .= "\n######################\n# Option Definitions\n######################\n\n"; -if ($dhcpsrventry->exists('OptionDefinition')) { - my @optdefinitions = $dhcpsrventry->get_value('OptionDefinition'); - foreach my $optdef (@optdefinitions) { - $writemaster .= "$optdef\n"; - } -} - -# Failover Information of DHCP Service, needed for DHCP Pool Declarations later -#my $failoverpeer; -if ($dhcpsrventry->exists( 'dhcpFailoverPeer' )) { - $failoverpeer = $dhcpsrventry->get_value( 'dhcpFailoverPeer' ); -} - -# Global DHCP Options (global Scope) -$writemaster .= "\n\n######################\n# Global Options\n######################\n\n"; -my $indent = ""; -$writemaster .= dhcpoptions( $dhcpsrventry, $indent ); - -# Include Directives (one for each DHCP Unit in LDAP Database) -$writemaster .= "\n\n######################\n# Includes\n######################\n\n"; -foreach my $dhcpunit ( @dhcpunits ){ - $writemaster .= "include \"$dhcpdconfpath/includes/dhcp.".lc $dhcpunit->get_value('ou').".inc\";\n"; - #$writemaster .= "include \"includes/dhcp.".lc $dhcpunit->get_value('ou').".inc\";\n"; -} - -# Write File -print "Generate DHCP Master Include File\n"; -open DATEI, "> $dhcpdconfpath/includes/dhcp.master.inc"; -print DATEI $writemaster; -close DATEI; -# Writing DHCP MASTER INCLUDE FILE Completed -################################################# - - -################################################# -# DHCP INCLUDE FILES, one for each AdministrativeUnit -foreach my $searchbase ( @searchbases ){ - - my $writeinc; - my $lastchange; - my $includedatei = lc "dhcp.$searchbase->{ou}.inc"; - my $audn = $searchbase->{dn}; - my $dhcpmtime = $searchbase->{dhcpmtime}; - #print "$includedatei\n"; - #print "$audn\n"; - - # Include File Header - $writeinc .= "# DHCP Config Include File \"$includedatei\"\n# AU: $searchbase->{ou}\n# (DN: $audn)\n# generated: $acttime\n# Unix: $acteptime\n\n"; - - ########################### - # DHCP SUBNETS (and POOLS) - # LDAP Search: DHCP Subnet Objects referencing to DHCP Service Object - my @subnets = get_dhcpsubnet_objects($ldap,$audn,$dhcpdn); - # write Subnet declarations - $writeinc .= "\n\n######################\n# DHCP Subnets\n######################\n\n"; - foreach my $subnetentry ( @subnets ) { - $writeinc .= dhcpsubnet($subnetentry); - } - - ########################### - # DHCP HOSTS - # LDAP Search: DHCP Host Objects referencing to DHCP Service Object - my @hosts = get_dhcphost_objects($ldap,$audn,$dhcpdn); - # write Host Declarations - $writeinc .= "\n\n######################\n# DHCP Hosts\n######################\n"; - foreach my $hostentry ( @hosts ) { - $writeinc .= dhcphost($hostentry); - } - - # Write File - if ($dhcpmtime == 0){ $lastchange = "not changed yet!"; } - else{ $lastchange = "last change: ".localtime($dhcpmtime); } - print "Generate Include-File $includedatei ($lastchange)\n"; - open DATEI, "> $dhcpdconfpath/includes/$includedatei"; - print DATEI $writeinc; - close DATEI; -} -# Writing DHCP INCLUDE FILES Completed -####################################### - - -# LDAP unbind -$mesg = $ldap->unbind; - - -exit (0); - - - -################################################################################################### -# Subroutines -############### - -# write DHCP Options, Parameter: DHCP Object LDAP Entry -sub dhcpoptions { - my $entry = shift; - my $indent = shift; - my @atts = $entry->attributes; - my $output = ""; - - # DHCP Option beginning with with 'option' - my @options1 = grep /dhcpopt/, @atts; - #printf "options: @options1\n"; - foreach my $option ( @options1 ){ - if ( $option ne "dhcpoptNetmask" ){ - my $value = $entry->get_value( $option ); - $option =~ s/dhcpopt//; - if ( $option eq "Domain-name"){ - $output .= $indent."option ".lc($option)." \"$value\";\n"; - }else{ - $output .= $indent."option ".lc($option)." $value;\n"; - } - } - } - # DHCP Options without 'option' - my @options2 = grep /dhcpOpt/, @atts; - #printf "Options: @options2\n"; - foreach my $option ( @options2 ){ - if ( $option ne "dhcpOptFixed-address" ){ - my $value = $entry->get_value( $option ); - $option =~ s/dhcpOpt//; - if ( $option eq "Filename"){ - $output .= $indent.lc($option)." \"$value\";\n"; - }else{ - $output .= $indent.lc($option)." $value;\n"; - } - } - } - - return $output; -} - - -# write DHCP Pool declaration (+ specific Options), Parameter: DHCP Object LDAP Entry -sub dhcppool { - my $entry = shift; - my $indent = shift; - my @atts = $entry->attributes; - my $output = ""; - # open Pool Declaration - $output .= $indent."pool {\n"; - # write DHCP Options in Pool Scope - my $poolindent = $indent." "; - if ( $failoverpeer ){ - $output .= $poolindent."failover peer \"$failoverpeer\";\n"; - $output .= $poolindent."deny dynamic bootp clients;\n"; - } - if ($entry->exists( 'dhcpRange' )) { - #foreach my $ranges ( @) { - my @range = split /_/,$entry->get_value( 'dhcpRange' ); - $output .= $poolindent."range $range[0] $range[1];\n"; - } - $output .= dhcpoptions($entry,$poolindent); - # close Pool Declaration - $output .= "$indent}\n"; - - return $output; -} - - -# write DHCP Subnet declaration (specific Options), Parameter: DHCP Object LDAP Entry -sub dhcpsubnet { - my $entry = shift; - my @atts = $entry->attributes; - my $output = ""; - - my $subnetdn = $entry->dn; - my $subnet = $entry->get_value( 'cn' ); - my $netmask = $entry->get_value( 'dhcpoptnetmask' ); - # open Subnet Declaration - $output .= "subnet $subnet netmask $netmask {\n"; - # write DHCP Options in Subnet Scope - my $optindent = " "; - $output .= dhcpoptions($entry,$optindent); - # write Pool Declarations in Subnet Declaration - # ldapsearch on Pool Objects referencing to DHCP Subnet Object - $mesg = $ldap->search(base=>$basedn, - scope => 'sub', - filter => '(&(objectclass=dhcpPool)(dhcphlpcont:dn:='.$subnetdn.'))'); - #Net::LDAP::LDIF->new( \*STDOUT,"w" )->write( $mesg->entries ); - $mesg->code && die $mesg->error; - my @pools = $mesg->sorted('cn'); - foreach my $poolentry ( @pools ) { - $output .= dhcppool($poolentry,$optindent); - } - # close Subnet Declaration - $output .= "}\n\n"; - - return $output; -} - - -# write DHCP Host declaration (specific Options), Parameter: DHCP Object LDAP Entry -sub dhcphost { - my $entry = shift; - my @atts = $entry->attributes; - my $output = ""; - - $output .= "\nhost ".lc $entry->get_value('hostname')." {\n"; - #printf DATEI "\nhost %s {\n", lc $entry->get_value( 'hostname' ); - # Host specific DHCP Options - if ($entry->exists('hwaddress')) { - $output .= " hardware ethernet ".$entry->get_value('hwaddress').";\n"; - } - if ($entry->exists('dhcpoptfixed-address')) { - if ( $entry->get_value('dhcpoptfixed-address') eq "ip" ){ - my @ip = split /_/, $entry->get_value('ipaddress'); - $output .= " fixed-address ".lc $ip[0].";\n"; - } - if ( $entry->get_value('dhcpoptfixed-address') eq "hostname" ){ - $output .= " fixed-address ".lc $entry->get_value('hostname').".".lc $entry->get_value('domainname').";\n"; - } - } - my @hwoptions = grep /Hw-/, @atts; - foreach my $hwoption ( @hwoptions ){ - $output .= " option ".lc($hwoption)." \"".$entry->get_value($hwoption)."\";\n"; - } - # remaining DHCP Options - my $optindent = " "; - $output .= dhcpoptions ($entry, $optindent); - $output .= "}\n"; - - return $output; -} - -sub get_dhcpservice_object { - my $ldap = shift; - my $basedn = shift; - # Ldapsearch on DHCP Service Object - - my $mesg = $ldap->search(base => $basedn, - scope => 'base', - filter => '(objectclass=dhcpService)'); - #Net::LDAP::LDIF->new( \*STDOUT,"w" )->write( $mesg->entries ); - $mesg->code && die $mesg->error; - my $dhcpservice = $mesg->count or die "DHCP Service Object does not exist in the System"; - my $dhcpsrventry = $mesg->entry(0); - - return $dhcpsrventry; -} - -# all Subnet Objects of one AU Container -sub get_dhcpsubnet_objects { - my $ldap = shift; - my $audn = shift; - my $dhcpdn = shift; - - # ldapsearch on Subnet Objects referencing to DHCP Service Object - $mesg = $ldap->search(base=>"cn=dhcp,".$audn, - scope => 'sub', - filter => '(&(objectclass=dhcpSubnet)(dhcphlpcont:dn:='.$dhcpdn.'))'); - #Net::LDAP::LDIF->new( \*STDOUT,"w" )->write( $mesg->entries ); - $mesg->code && die $mesg->error; - my @dhcpsubnets = $mesg->sorted('cn'); - - return @dhcpsubnets; -} - -# all Host Objects of one AU Container -sub get_dhcphost_objects { - my $ldap = shift; - my $audn = shift; - my $dhcpdn = shift; - - # ldapsearch on DHCP Host Objects referencing to DHCP Service Object - $mesg = $ldap->search(base=>"cn=computers,".$audn, - scope => 'sub', - filter => '(&(objectclass=dhcpHost)(dhcphlpcont:dn:='.$dhcpdn.'))'); - #Net::LDAP::LDIF->new( \*STDOUT,"w" )->write( $mesg->entries ); - $mesg->code && die $mesg->error; - my @dhcphosts = $mesg->sorted('dn'); - - return @dhcphosts; -} - -# all AU containers -sub get_dhcpunits { - #my $ldap = shift; - #my $basedn = shift; - - # ldapsearch on Subnet Objects referencing to DHCP Service Object - $mesg = $ldap->search(base=>$basedn, - scope => 'sub', - filter => '(objectclass=administrativeUnit)', - #filter => '(&(objectclass=administrativeUnit)(dhcpMTime>='.$yday.'))', - attrs => [ 'ou','dhcpMTime' ] ); - #Net::LDAP::LDIF->new( \*STDOUT,"w" )->write( $mesg->entries ); - $mesg->code && die $mesg->error; - my @adminunits = $mesg->entries; - - return @adminunits; -} - - -# Generate Searchbases-Array for AdminUnit-specific LDAP Search on DHCP Objects -sub searchbases { - my $acteptime = shift; ### falls noch plausibiltäts-test: acteptime > dhcpmtime - my $opta = $opt_a; - #print "opt_a: $opta \n"; - my @adunits = get_dhcpunits(); - if ( $opta ){ - # All Admin Units - foreach my $adunit (@adunits){ - push @searchbases, { dn => $adunit->dn, ou => $adunit->get_value('ou'), dhcpmtime => $adunit->get_value('dhcpMTime') }; - } - }else{ - # Only Admin Units which DHCP Data changed since last generation - foreach my $adunit (@adunits){ - my $changetime = "1"; - my $dhandle = 1; - open DAT, "< $dhcpdconfpath/includes/dhcp.".lc $adunit->get_value('ou').".inc" #or open DAT and my $incgen = 1; #or die "Can't open/generate Include File"; - #print $incgen; - or $dhandle = 0; - if ($dhandle){ - while (<DAT>){ - chomp; - if (/^# Unix: (\S+)/){ $changetime = $1; } - } - close DAT; - } - my $actualize = ""; - if ($adunit->exists( 'dhcpMTime' ) && $adunit->get_value('dhcpMTime') >= $changetime ) { - #printf "%s - %s\n", $adunit->dn, $adunit->get_value('dhcpMTime'); - $actualize = "needs to be actualized\n"; - push @searchbases, { dn => $adunit->dn, ou => $adunit->get_value('ou'), dhcpmtime => $adunit->get_value('dhcpMTime') }; - } - if ($opt_v){ - print $adunit->get_value('ou')."\n"; - print "dhcpmodify: ".$adunit->get_value('dhcpMTime')."\n"; - print "lastchange: $changetime\n"; - print $actualize; - print "------------------------\n"; - } - } - } - return @searchbases; -}
\ No newline at end of file diff --git a/ldap-site-mngmt/generation-scripts/pxelink b/ldap-site-mngmt/generation-scripts/pxelink deleted file mode 100755 index 7e9df8af..00000000 --- a/ldap-site-mngmt/generation-scripts/pxelink +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/sh -# the pxe-linking skript should be executed every new hour -# crontab entry: 0 * * * * root <absolute-path>/pxelink.sh - -pxedir='tftpboot/pxe/pxelinux.cfg/' -cd $pxedir -# delete all symbolic links (they are obsolete) -rm 01-* -if [ -e default ] ; then rm default ; fi - -# get actual time parameters (weekday and hour) -datum=`date +%a:%-k |sed 's/[a-z]/\U&/g'` -wday=`echo $datum | cut -d ":" -f 1` -time=`echo $datum | cut -d ":" -f 2` -echo "actual time: " $wday $time - -# get all PXE files (unique) under <timerange>/<pxefile> -pxenumber=`find -type f | cut -d "/" -f 3 | sort | sed '$!N; /^\(.*\) - \n\1$/!P; D' | wc -l` -pxe=`find -type f | cut -d "/" -f 3 | sort | sed '$!N; /^\(.*\)\n\1$ - /!P; D' ` -for ((j=0;j<$pxenumber;j++)) ; do - pxe_array[$j]=`echo $pxe | cut -d " " -f $[$j+1] ` - echo "pxe file: " ${pxe_array[j]} - lines=`find */${pxe_array[j]} | cut -d "/" -f 1 | wc -l` - ranges=`find */${pxe_array[j]} | cut -d "/" -f 1` - for ((i=0;i<$lines;i++)) ; do - timerange[$i]=`echo $ranges | cut -d " " -f $[$i+1] ` - #echo ${timerange[i]} - done - match=0 - - # get timerange corresponding to actual time parameters - while true; do - for ((i=0;i<$lines;i++)) ; do - trday=`echo ${timerange[i]} | cut -d "_" -f 1` - trbegin=`echo ${timerange[i]} | cut -d "_" -f 2` - trend=`echo ${timerange[i]} | cut -d "_" -f 3` - if [ $trday != "X" ] && [ $trbegin != "X" ] && [ $trday == $wday ] \ - && [ $trbegin -le $time ] && [ $time -le $trend ]; then - echo $wday $time "[D H H]match ->" ${timerange[i]} - ln -s ${timerange[i]}'/'${pxe_array[j]} ${pxe_array[j]} - echo "symlink: " ${pxe_array[j]} "->" ${timerange[i]}"/"${pxe_array[j]} - match=1 && break - fi - done - if [ $match == 1 ] ; then break ; fi - - for ((i=0;i<$lines;i++)) ; do - trday=`echo ${timerange[i]} | cut -d "_" -f 1` - trbegin=`echo ${timerange[i]} | cut -d "_" -f 2` - trend=`echo ${timerange[i]} | cut -d "_" -f 3` - if [ $trday == $wday ] && [ $trbegin == "X" ] && [ $trend == "X" ]; then - echo $wday $time "[D _ _]match ->" ${timerange[i]} - ln -s ${timerange[i]}"/"${pxe_array[j]} ${pxe_array[j]} - echo "symlink: " ${pxe_array[j]} "->" ${timerange[i]}"/"${pxe_array[j]} - match=1 && break - fi - done - if [ $match == 1 ] ; then break ; fi - - for ((i=0;i<$lines;i++)) ; do - trday=`echo ${timerange[i]} | cut -d "_" -f 1` - trbegin=`echo ${timerange[i]} | cut -d "_" -f 2` - trend=`echo ${timerange[i]} | cut -d "_" -f 3` - if [ $trday == "X" ] && [ $trbegin != "X" ] && [ $trend != "X" ] && \ - [ $trbegin -le $time ] && [ $time -le $trend ]; then - echo $wday $time "[_ H H]match ->" ${timerange[i]} - ln -s ${timerange[i]}"/"${pxe_array[j]} ${pxe_array[j]} - echo "symlink: " ${pxe_array[j]} "->" ${timerange[i]}"/"${pxe_array[j]} - match=1 && break - else - if [ ${timerange[i]} == "X_X_X" ]; then - echo $wday $time "[_ _ _]match ->" ${timerange[i]} - ln -s ${timerange[i]}"/"${pxe_array[j]} ${pxe_array[j]} - echo "symlink: " ${pxe_array[j]} "->" ${timerange[i]}"/"${pxe_array[j]} - fi - match=1 - fi - done - if [ $match == 1 ] ; then break ; fi - done -done -exit 0 diff --git a/ldap-site-mngmt/webinterface/au/au.dwt b/ldap-site-mngmt/webinterface/au/au.dwt deleted file mode 100755 index 16f0302c..00000000 --- a/ldap-site-mngmt/webinterface/au/au.dwt +++ /dev/null @@ -1,85 +0,0 @@ -<html> - -<head> - <title>{SEITENTITEL}</title> - <link rel='stylesheet' href='../styles.css' type='text/css'></head> -<body> - -<table cellpadding='0' cellspacing='0' border='0' width='100%' style='background-color: #F0F0F0;border-color: #505050; border-style: solid; border-width: 0 0 1 0;'> - <tr> - <td width='30%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr valign='top'> - <td width='1'></td> - <td><h2>Client / IP Management</h2></td> - </tr> - </table> - </td> - - <td width='45%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr valign='top' align='left'> - <td> - <h4><a href='../start.php' class='headerlink'>Startseite</a> - >> <a href='au.php' class='headerlink'>{AU}</a> [ {DOMAIN} ]</h4> - </td> - </tr> - </table> - </td> - <td width='25%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%' align='right'> - <tr valign='top' align='right'> - <td> - {LOGIN} - </td> - </tr> - </table> - </td> - </tr> - <tr> - <td colspan='3'>{MAINMENU}</td> - </tr> -</table> - -<!--<hr align='center' width='98%' noshade>--> -<br> - - -<table cellpadding='5' cellspacing='0' border='0' width='100%' height='85%'> - - <tr valign='top' height='100%'> - <td width='28%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr> - <td> - - {NAVIGATION} - - </td> - </tr> - <tr> - <td> - - {IPBLOCKS} - - </td> - </tr> - </table> - </td> - - <td width='72%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr><td> - - {HAUPTFENSTER} - - </td></tr> - </table> - </td> - - </tr> -</table> - -</body> - -</html> diff --git a/ldap-site-mngmt/webinterface/au/au.php b/ldap-site-mngmt/webinterface/au/au.php deleted file mode 100644 index c66784b1..00000000 --- a/ldap-site-mngmt/webinterface/au/au.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Filename of Template -$webseite = "au_start.dwt"; - -include('au_header.inc.php'); - -############################################################################### -# Menus - -$mnr = 0; -$sbmnr = -1; - -$childauDN = $_GET['dn']; - -createMainMenu($rollen, $mainnr); -createAUMenu($rollen, $mnr, $auDN, $sbmnr); - -############################################################################### -# Footer - -include("au_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/au/au_change.php b/ldap-site-mngmt/webinterface/au/au_change.php deleted file mode 100644 index 990d2155..00000000 --- a/ldap-site-mngmt/webinterface/au/au_change.php +++ /dev/null @@ -1,121 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# $_POST form variables -$cn = $_POST['commonname']; -$oldcn = $_POST['oldcn']; -$description = $_POST['description']; -$olddesc = $_POST['olddesc']; - -$cn = htmlentities($cn); -$oldcn = htmlentities($oldcn); -$description = htmlentities($description); -$olddesc = htmlentities($olddesc); - -#echo "new cn:"; print_r($cn); echo "<br>"; -#echo "old cn:"; print_r($oldcn); echo "<br>"; -#echo "new desc:"; print_r($description); echo "<br>"; -#echo "old desc:"; print_r($olddesc); echo "<br><br>"; - -$url = 'au_show.php'; - -echo " -<html> -<head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $oldcn == "" && $cn != "" ){ - echo "CN neu anlegen<br>"; - # hier noch Syntaxcheck - $entry['cn'] = $cn; - $result = ldap_mod_add($ds,$auDN,$entry); - if($result){ - $mesg = "AU Name erfolgreich eingetragen<br><br>"; - } - else{ - $mesg = "Fehler beim eintragen des AU Namen<br><br>"; - } -} - -if ( $oldcn != "" && $cn != "" && $oldcn != $cn ){ - echo "CN aendern<br>"; - # hier noch Syntaxcheck - $entry['cn'] = $cn; - $result = ldap_mod_replace($ds,$auDN,$entry); - if($result){ - $mesg = "AU Name erfolgreich geaendert<br><br>"; - } - else{ - $mesg = "Fehler beim aendern des AU Namen<br><br>"; - } -} - -if ( $oldcn != "" && $cn == "" ){ - echo "CN loeschen<br>"; - # hier noch Syntaxcheck - $entry['cn'] = $oldcn; - $result = ldap_mod_del($ds,$auDN,$entry); - if($result){ - $mesg = "AU Name erfolgreich geloescht<br><br>"; - } - else{ - $mesg = "Fehler beim loeschen des AU Namen<br><br>"; - } -} - -if ( $olddesc == "" && $description != "" ){ - echo "DESCR neu anlegen<br>"; - # hier noch Syntaxcheck - $entry2['description'] = $description; - $result = ldap_mod_add($ds,$auDN,$entry2); - if($result){ - $mesg = "AU Beschreibung erfolgreich eingetragen<br><br>"; - } - else{ - $mesg = "Fehler beim eintragen der AU Beschreibung<br><br>"; - } -} - -if ( $olddesc != "" && $description != "" && $olddesc != $description ){ - echo "DESCR aendern<br>"; - # hier noch Syntaxcheck - $entry2['description'] = $description; - $result = ldap_mod_replace($ds,$auDN,$entry2); - if($result){ - $mesg = "AU Beschreibung erfolgreich geandert<br><br>"; - } - else{ - $mesg = "Fehler beim aendern der AU Beschreibung<br><br>"; - } -} - -if ( $olddesc != "" && $description == "" ){ - echo "DESCR loeschen<br>"; - # hier noch Syntaxcheck - $entry2['description'] = $olddesc; - $result = ldap_mod_del($ds,$auDN,$entry2); - if($result){ - $mesg = "AU Beschreibung erfolgreich geloescht<br><br>"; - } - else{ - $mesg = "Fehler beim loeschen der AU Beschreibung<br><br>"; - } -} - -else{ - $mesg = "keine Aenderung<br>"; -} - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='au_show.php' style='publink'>back</a>"; -redirect(2, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body></html>"; - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/au/au_childs.dwt b/ldap-site-mngmt/webinterface/au/au_childs.dwt deleted file mode 100755 index 0d37b5c7..00000000 --- a/ldap-site-mngmt/webinterface/au/au_childs.dwt +++ /dev/null @@ -1,46 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Untergeordnete AUs von - <code class='font_object'>{AU}</code></h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr> - <td width='55%' class='tab_h'><b>Untergeordnete AU</b></td> - <td width='45%' class='tab_h'><b>Domain</b></td> - </tr> - - - - <!-- BEGIN DYNAMIC BLOCK: Childaus --> - <tr> - <td class='tab_d' height='40'>{CHILDOU} </td> - <td class='tab_d' height='40'>{CHILDDOMAIN} </td> - </tr> - <!-- END DYNAMIC BLOCK: Childaus --> - - </table></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td> - Zum Verwalten oder Löschen einer untergeordneten AU, wählen Sie links entsprechenden Submenü-Eintrag.<br> - Dort können Sie auch den DNS Domainnamen der untergeordneten AU bearbeiten bzw. neu zuordnen (d.h. im <br> - DNS der Organisation aufnehmen). - </td> - </tr> - - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>Neue untergeordnete AU anlegen</h4> >> - <a href='new_child.php?sbmnr=0' style='color:#FFFFFF;' class='small_loginform_button'> zur Eingabemaske </a> - </td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/au/au_childs.php b/ldap-site-mngmt/webinterface/au/au_childs.php deleted file mode 100644 index 7aa5dcb3..00000000 --- a/ldap-site-mngmt/webinterface/au/au_childs.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Filename of Template -$webseite = "au_childs.dwt"; - -include('au_header.inc.php'); - -############################################################################### -# Menus - -$mnr = 2; -$sbmnr = -1; - -createMainMenu($rollen, $mainnr); -createAUMenu($rollen, $mnr, $auDN, $sbmnr); - -############################################################################### -# Mainpage Data - -$template->assign(array("CHILDOU" => "Noch keine untergordnete AU angelegt", - "CHILDCN" => "", - "CHILDDN" => "", - "CHILDDOMAIN" => "", - "CHILDDESC" => "")); - -$childau_array = get_childau($auDN,array("dn","cn","ou","associateddomain","description","maxipblock")); - -$template->define_dynamic("Childaus", "Webseite"); - -foreach ($childau_array as $childau){ - $auname = "<a href='child_au.php?dn=".$childau['dn']."' class='headerlink'>".$childau['ou']."</a>"; - - $template->assign(array("CHILDOU" => $auname, - "CHILDCN" => $childau['cn'], - "CHILDDN" => $childau['dn'], - "CHILDDOMAIN" => $childau['associateddomain'], - "CHILDDESC" => $childau['description'], - "AUDN" => $auDN)); - $template->parse("CHILDAUS_LIST", ".Childaus"); -} - - -################################################################################### -# Footer - -include("au_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/au/au_footer.inc.php b/ldap-site-mngmt/webinterface/au/au_footer.inc.php deleted file mode 100644 index 37fa7808..00000000 --- a/ldap-site-mngmt/webinterface/au/au_footer.inc.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - - - -$template->assign(array("PFAD" => $START_PATH)); - -# Daten in die Vorlage parsen -$template->parse("LOGIN", "Login"); -$template->parse("MAINMENU", "Mmenu"); -$template->parse("NAVIGATION", "Menu"); -$template->parse("IPBLOCKS", "IPBlocks"); -$template->parse("HAUPTFENSTER", "Webseite"); -$template->parse("PAGE", "Vorlage"); - -# Fertige Seite an den Browser senden -$template->FastPrint("PAGE"); - -# Abmelden vom LDAP -ldap_unbind($ds); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/au/au_header.inc.php b/ldap-site-mngmt/webinterface/au/au_header.inc.php deleted file mode 100644 index 57e85f84..00000000 --- a/ldap-site-mngmt/webinterface/au/au_header.inc.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -################# - -# 1. Title -$titel = "Administrative Unit Management"; -# 2. Mainmenu Number (starting with 0) -$mainnr = 0; - - -$template = new FastTemplate("."); -# dem erstellten Template-Objekt eine Vorlage zuweisen -$definedTemplates = array("Vorlage" => "au.dwt", - "Login" => "../logout_form.inc.dwt", - "Mmenu" => "../hauptmenue.dwt", - "Menu" => "menu.dwt", - "IPBlocks" => "../common/ipblocks.dwt", - "Webseite" => $webseite); - -if (isset($additionalTemplates)) { - foreach ($additionalTemplates as $templateKey => $templateFile) { - $definedTemplates[$templateKey] = $templateFile; - } -} - -$template->define($definedTemplates); -$template->assign(array("SEITENTITEL" => $titel, - "ROLLE" => "mainadmin", - "AU" => $au_ou, - "DOMAIN" => $assocdom, - "USERCN" => $usercn)); - - -include("au_menu.php"); -include("../common/ip_blocks.inc.php"); - - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/au/au_menu.php b/ldap-site-mngmt/webinterface/au/au_menu.php deleted file mode 100644 index d912c7a5..00000000 --- a/ldap-site-mngmt/webinterface/au/au_menu.php +++ /dev/null @@ -1,236 +0,0 @@ -<?php - -function createAUMenu($rollen, $mnr, $auDN,$sbmnr) { - - global $template, $ds, $suffix, $START_PATH; - - # Mainmenu - $hauptmenu = array(array("link" => "au.php", - "text" => "Übersicht", - "zugriff" => "alle"), - array("link" => "au_show.php", - "text" => "Eigene AU", - "zugriff" => array("MainAdmin","DhcpAdmin","HostAdmin")), - array("link" => "au_childs.php", - "text" => "Untergeordnete AUs", - "zugriff" => array("MainAdmin")), - array("link" => "roles.php", - "text" => "Admin Rollen Management", - "zugriff" => array("MainAdmin","DhcpAdmin")), - #array("link" => "new_child.php", - # "text" => "Neue untergeordnete AU", - # "zugriff" => array("MainAdmin")) - ); - #echo "hauptmenu: ";print_r($hauptmenu);echo "<br><br>"; - - # Submenu - $childaus = array(); - $n = 0; - #$childau_array = get_childau($auDN,array("dn","cn","ou")); - #echo "childau_array: ";print_r($childau_array);echo "<br><br>"; - #if (count($childau_array)!= 0){ - # for ($n=0;$n<count($childau_array);$n++) { - # $childaus[] = array("link" => "child_au.php?dn=".$childau_array[$n]['dn']."&sbmnr=".$n, - # "text" => $childau_array[$n]['ou'], - # "zugriff" => array("MainAdmin")); - # } - # #$c=0+$n; - #} - #$c = $n; - $childaus[] = array("link" => "new_child.php?sbmnr=".$n, - "text" => "Neue untergeordnete AU", - "zugriff" => array("MainAdmin")); - - $adminroles = array(array("link" => "role_show.php?role=MainAdmin&sbmnr=0", - "text" => "Main Admins", - "zugriff" => array("MainAdmin")), - array("link" => "role_show.php?role=DhcpAdmin&sbmnr=1", - "text" => "DHCP Admins", - "zugriff" => array("MainAdmin")), - array("link" => "role_show.php?role=HostAdmin&sbmnr=2", - "text" => "Host Admins", - "zugriff" => array("MainAdmin","DhcpAdmin")), - array("link" => "role_show.php?role=RbsAdmin&sbmnr=3", - "text" => "RBS Admins", - "zugriff" => array("MainAdmin","DhcpAdmin")), - #array("link" => "role_show.php?role=ZoneAdmin&mnr=4", - # "text" => "DNS Admins", - # "zugriff" => array("MainAdmin")) - ); - - - $submenu = array(array(), - array(), - $childaus, - $adminroles - ); - #echo "submenu: ";print_r($submenu);echo "<br><br>"; - # Zusammenstellen der Menuleiste - $template->define_dynamic("Hauptmenu", "Menu"); - $template->define_dynamic("Submenu", "Menu"); - - $i=0; - $maxmenu = count($hauptmenu); - - foreach ($hauptmenu as $item) { - $template->clear_parse("SUBMENU_LIST"); - #echo "item: "; print_r($item); echo "<br>"; - if ($item['zugriff'] === "alle" || vergleicheArrays($rollen , $item['zugriff'])) { - - ######################################################################### - # SUBMENU - - $subempty = 0; - $j=0; - $maxsub = count($submenu[$mnr]); - #echo "maxsub: "; print_r($maxsub); echo "<br>"; - if ($maxsub > 0) { - foreach ($submenu[$mnr] as $item2) { - #echo "item2: "; print_r($item2); echo "<br>"; - if ($item2['zugriff'] === "alle" || vergleicheArrays($rollen, $item2['zugriff'])) { - if ($i != $mnr) { - $template->assign(array("SUB" => "")); - #"LINK_S" => "", - #"TEXT_S" => "")); - $template->parse("SUBMENU_LIST", ".Submenu"); - $template->clear_dynamic("Submenu"); - } - else { - if ($j==0) { - if ($sbmnr==0) { - if ($maxsub == 1) {$zwisch="branchbottom2";} - else {$zwisch="branch2";} - $lastaktive=true; - $farb="#505050"; - } - else { - if ($maxsub == 1) {$zwisch="branchbottom2";} - else {$zwisch="branch2";} - $farb="#A0A0A0"; - $lastaktive=false; - } - } - else { - if ($sbmnr==$j) { - if ($maxsub == $j+1) {$zwisch="branchbottom2";} - else {$zwisch="branch2";} - $lastaktive=true; - $farb="#505050"; - } - else { - $farb="#A0A0A0"; - if ($maxsub == $j+1) {$zwisch="branchbottom2";} - else {$zwisch="branch2";} - # if ($lastaktive) {$zwisch="branch";} - # else {$zwisch="branch";} - $lastaktive=false; - } - } - $htmlcode= " - <tr height='4'> - <td></td><td align='right'><img src='../pics/line2.gif' height='4'></td><td></td><td></td> - </tr> - <tr> - <td width='8%'> </td> - <td width='8%' align='right'><img src='../pics/".$zwisch.".gif'></td> - <td width='74%' align='left' style='border-width:1 1 1 1;border-color:#000000;border-style:solid;padding:4;padding-left:25px;background-color:{FARBE_S}'> - <a href='".$item2['link']."' style='text-decoration:none'><code class='submenue_schrift'>".$item2['text']."</code></a></td> - <td width='10%'> </td> - </tr>"; - - $template->assign(array("SUB" => $htmlcode)); - $template->assign(array("FARBE_S" => $farb)); - $template->parse("SUBMENU_LIST", ".Submenu"); - $template->clear_dynamic("Submenu"); - } - } - else { - $subempty++; - } - $j=$j+1; - } - } - if ($subempty == count($submenu[$mnr])) { - $template->assign(array("SUB" => "")); - #"LINK_S" => "", - #"TEXT_S" => "")); - $template->parse("SUBMENU_LIST", ".Submenu"); - $template->clear_dynamic("Submenu"); - } - # SUBMENU - ##################################################################### - - - if ($i==0) { - if ($mnr==0) { - if (count($submenu[$i][0]) != 0) { - if ($maxmenu == 1) {$zwisch="";} # {$zwisch="<img style='border-width:0;border-style=none;' src='../pics/minus2.gif'>";} - else {$zwisch="";} - } - else {$zwisch="";} - $lastaktive=true; - $farb="#505050"; - } - else { - if (count($submenu[$i][0]) != 0) { - if ($maxmenu == 1) { - $zwisch="<a href='{LINK_M}' style='border-style=none;text-decoration:none'> - <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>"; - } - else { - $zwisch="<a href='{LINK_M}' style='border-style=none;text-decoration:none'> - <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>"; - } - } - else {$zwisch="";} - $farb="#A0A0A0"; - $lastaktive=false; - } - } - else { - if ($mnr==$i) { - if (count($submenu[$mnr][0]) != 0) { - if ($maxmenu == $i+1) {$zwisch="";} - else {$zwisch="";} - } - else {$zwisch="";} - $lastaktive=true; - $farb="#505050"; - } - else { - $farb="#A0A0A0"; - if (count($submenu[$i][0]) != 0) { - if ($maxmenu == $i+1) { - $zwisch="<a href='{LINK_M}' style='border-style=none;text-decoration:none'> - <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>"; - } - else { - $zwisch="<a href='{LINK_M}' style='border-style=none;text-decoration:none'> - <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>"; - } - } - else {$zwisch="";} - #if ($lastaktive) {$zwisch="";} - #else {$zwisch="";} - $lastaktive=false; - } - } - $template->assign(array("ICON" => $zwisch, - "FARBE" => $farb, - "LINK_M" => $item["link"], - "TEXT_M" => $item["text"])); - $template->parse("HAUPTMENU_LIST", ".Hauptmenu"); - $template->clear_dynamic("Hauptmenu"); - } - $i=$i+1; - } - if ($lastaktive) { - $template->assign(array("ENDE" => "")); - } - else{ - $template->assign(array("ENDE" => "")); - } - -} - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/au/au_show.dwt b/ldap-site-mngmt/webinterface/au/au_show.dwt deleted file mode 100755 index f6bfe663..00000000 --- a/ldap-site-mngmt/webinterface/au/au_show.dwt +++ /dev/null @@ -1,88 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Administrative Unit - <code class='font_object'>{AU}</code></h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td> - Sie können den Namen und die Beschreibung bearbeiten. Zur Verwaltung, der ihnen - zugeordneten IP Adressbereiche benutzen Sie bitte das Modul <b>IP Management</b>.<br> - Wollen Sie ihren DNS Domainnamen ändern so wenden Sie sich an den Haupt-Administrator - ihrer übergeordneten AU - <b>{PARENTAU}</b> - (Email: <b>{EMAILMA}</b> ) - - </td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='au_change.php' method='post'> - - <tr height='45'> - <td width='45%' class='tab_h'><b>Attribut</b></td> - <td width='55%' class='tab_h'><b>Wert</b></td> - </tr> - <tr height='45'> - <td width='45%' class='tab_d'><b>Name: </b></td> - <td width='55%' class='tab_d'> - <input type='Text' name='commonname' value='{CN}' size='40' class='medium_form_field'> - <input type='hidden' name='oldcn' value='{CN}'> - <input type='hidden' name='audn' value='{AUDN}'> - </td> - </tr> - <tr height='45'> - <td width='45%' class='tab_d'><b>Bechreibung:</b></td> - <td width='55%' class='tab_d'> - <input type='Text' name='description' value='{DSC}' size='40' class='medium_form_field'> - <input type='hidden' name='olddesc' value='{DSC}'> - <input type='hidden' name='audn' value='{AUDN}'> - </td> - </tr> - <tr height='45'> - <td width='45%' class='tab_d'><b>DNS Domain:</b></td> - <td width='55%' class='tab_d'>{DOMAIN} </td> - </tr> - <tr height='45' valign='top'> - <td width='45%' class='tab_d'><b>IP Bereiche:</b></td> - <td width='55%' class='tab_d'>{MIPBS} </td> - </tr> - - </table></td> - </tr> - <tr> - <td><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - <!-- - <tr> - <td height='40'></td> - </tr> - <tr> - <td><h4>Weitere Statistiken zu Ihrer AU:</h4></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr height='1'> - <td width='45%' class='tab_h'> </td> - <td width='55%' class='tab_h'> </td> - </tr> - <tr height='45'> - <td width='45%' class='tab_d'><b>Hauptadministratoren:</b></td> - <td width='55%' class='tab_d'>...</td> - </tr> - <tr height='45'> - <td width='45%' class='tab_d'><b>Anzahl Rechner:</b></td> - <td width='55%' class='tab_d'>...</td> - </tr> - <tr height='45'> - <td width='45%' class='tab_d'><b>.... :</b></td> - <td width='55%' class='tab_d'>...</td> - </tr> - </table></td> - </tr> - --> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/au/au_show.php b/ldap-site-mngmt/webinterface/au/au_show.php deleted file mode 100644 index f29c1ef7..00000000 --- a/ldap-site-mngmt/webinterface/au/au_show.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php - -include('../standard_header.inc.php'); -# Filename of Template -$webseite = "au_show.dwt"; - -include('au_header.inc.php'); - -############################################################################### -# Menus - -$mnr = 1; -$sbmnr = -1; - -createMainMenu($rollen, $mainnr); -createAUMenu($rollen, $mnr, $auDN, $sbmnr); - -############################################################################### -# MainpageData - -# Parent AU, Email MainAdmin -$exp = explode(',',$auDN); -$parentau = array_slice($exp, 1, 1); -$parentau = substr($parentau[0],3); - -if ( $parentau != "RIPM"){ - $length = count($exp); - $out = array_slice($exp, 1, $length -1); - $parentauDN = implode(',',$out); - $rol = get_roles($parentauDN); - $mainadminDN = $rol['MainAdmin'][0]; - $emailMA = get_user_data($mainadminDN, array("mail")); - $emailCODE = "<a href'mailto:".$emailMA['mail']."' class='maillink' style='text-decoration:none'>".$emailMA['mail']."</a>"; -} - -$template->assign(array("OU" => $au_ou, - "CN" => $au_cn, - "DSC" => $au_desc, - "AUDN" => $auDN, - "PARENTAU" => $parentau, - "EMAILMA" => $emailCODE)); - -# MaxIPBlocks -$mipb = $au_mipb; -$mipbs = ""; -if (count($mipb) > 1) { - for ($i=0; $i < count($mipb) - 1; $i++) { - $exp = explode('_',$mipb[$i]); - $mipbs .= "$exp[0] - $exp[1]<br>"; - } - $exp = explode('_',$mipb[$i]); - $mipbs .= "$exp[0] - $exp[1]"; - $template->assign(array("MIPBS" => $mipbs)); -} -elseif (count($mipb) == 1) { - $exp = explode('_',$mipb); - $mipbs .= "$exp[0] - $exp[1]"; - $template->assign(array("MIPBS" => $mipbs)); -} -else { - $template->assign(array("MIPBS" => $mipbs)); -} - - -############################################################################### -# Footer - -include("au_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/au/au_start.dwt b/ldap-site-mngmt/webinterface/au/au_start.dwt deleted file mode 100755 index aeee690f..00000000 --- a/ldap-site-mngmt/webinterface/au/au_start.dwt +++ /dev/null @@ -1,31 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='90%'> - <tr> - <td colspan='2'><h3>Modul - AU Management: </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td> - <p>Dieses Modul dient der Verwaltung ihrer Abteilung oder Administrativen Einheit - (Administrative Unit - AU).<br> - Benutzen Sie die Navigation links, um die einzelnen Verwaltungsbereiche anzusteuern:</p> - <ul> - <li><p><b>Eigene AU</b></p> - Hier erhalten Sie eine Übersicht über Ihre Administrative Unit. Sie können bestimmte - Daten bearbeiten, z.B. den Name(cn) oder die Beschreibung. Zudem können Sie Statistiken - zu Ihrer AU einsehen. - - </li> - <li><p><b>Untergeordnete AUs</b></p> - Hier erhalten Sie eine Übersicht Ihrer untergeordneten eigenständigen Administrativen Einheiten. Sie können diese bearbeiten und löschen. Hier können Sie auch neue untergeordnete AUs anlegen. - </li> - <li><p><b>Admin Rollen Management</b></p> - Hier können Sie den Administratoren Rollen ihrer AU Benutzer zuweisen. - </li> - </ul> - - </td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/au/child_au.dwt b/ldap-site-mngmt/webinterface/au/child_au.dwt deleted file mode 100755 index 561d0b09..00000000 --- a/ldap-site-mngmt/webinterface/au/child_au.dwt +++ /dev/null @@ -1,131 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - - <tr> - <td colspan='4' height='20'><h4><a href='au_childs.php?' class='headerlink'><< Zurück zur Übersicht </a></h4></td> - </tr> - - <tr> - <td colspan='2'><h3>AU - <code class='font_object'>{CHILDCN}</code> verwalten:</h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='childau_change.php' method='post'> - - <tr> - <td width='45%' class='tab_h'><b>Attribut</b></td> - <td width='55%' class='tab_h'><b>Wert</b></td> - </tr> - - <tr height='50'> - <td class='tab_d'><b>Eindeutiger Name (ou):</b><br>(Teil des dn, ohne Leerzeichen eingeben) </td> - <td class='tab_d'> - <input type='Text' name='childou' value='{CHILDOU}' size='40' class='medium_form_field'> - <input type='hidden' name='oldchildou' value='{CHILDOU}'> - </td> - </tr> - <tr height='50'> - <td class='tab_d'><b>Name der Abteilung (cn): </b> </td> - <td class='tab_d'> - <input type='Text' name='childcn' value='{CHILDCN}' size='40' class='medium_form_field'> - <input type='hidden' name='oldchildcn' value='{CHILDCN}'> - </td> - </tr> - <tr height='50'> - <td class='tab_d'><b>DNS Domain :</b> </td> - <td class='tab_d'> - <input type='Text' name='childdomain' value='{CHILDDOMAIN}' size='25' class='medium_form_field'> - <input type='hidden' name='oldchilddomain' value='{CHILDDOMAIN}'> - <b><font size="+1">.uni-freiburg.de</font></b> - </td> - </tr> - - <input type='hidden' name='childdn' value='{CHILDDN}'> - <input type='hidden' name='submenu' value='{SBMNR}'> - - </table></td> - </tr> - <tr> - <td><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - - <tr> - <td height='20'></td> - </tr> - - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='ip_deleg_change.php' method='post'> - <tr> - <td class='tab_h'><b>Delegierte IP Bereiche</b></td> - </tr> - <tr> - <td class='tab_d'> - - <!-- BEGIN DYNAMIC BLOCK: Delegs --> - - <input type='Text' name='range1[]' value='{RANGE1}' size='15' class='medium_form_field'> - - - <input type='Text' name='range2[]' value='{RANGE2}' size='15' class='medium_form_field'><br> - <input type='hidden' name='oldrange1[]' value='{RANGE1}'> - <input type='hidden' name='oldrange2[]' value='{RANGE2}'> - - <!-- END DYNAMIC BLOCK: Delegs --> - - <input type='hidden' name='childdn' value='{CHILDDN}'> - <input type='hidden' name='submenu' value='{SBMNR}'> - - </td> - </tr> - </table></td> - </tr> - <tr> - <td><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - <tr> - <td height='40'></td> - </tr> - - <tr> - <td colspan='2'><h4>Untergeordnete AU <code class='font_object'>{CHILDCN}</code> löschen:</h4></td> - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <form action='childau_delete.php' method='post'> - - <tr> - <td colspan='2' class='tab_h'>Wählen Sie einen Modus:<br></td> - - </tr> - <tr> - <td class='tab_d'> - <input type='radio' name='delmodus' value='integrate' checked></td> - <td class='tab_d'> - Nur die untergeordnete AU löschen (nur eine Ebene). <br> - Rechner und DHCP Objekte werden aus dieser in eigene AU integrieren</td> - </tr> - <tr> - <td class='tab_d'> - <input type='radio' name='delmodus' value='complete'></td> - <td class='tab_d'> - Komplett löschen: untergeordnete AU und alle darunter angelegten AUs</td> - </tr> - <input type='hidden' name='childdn' value='{CHILDDN}'> - <input type='hidden' name='oldchilddomain' value='{CHILDDOMAIN}'> - <input type='hidden' name='childou' value='{CHILDOU}'> - - </table></td> - </tr><tr><td> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'> - </form></td></tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/au/child_au.php b/ldap-site-mngmt/webinterface/au/child_au.php deleted file mode 100644 index 665f1da2..00000000 --- a/ldap-site-mngmt/webinterface/au/child_au.php +++ /dev/null @@ -1,74 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Filename of Template -$webseite = "child_au.dwt"; - -include('au_header.inc.php'); - -############################################################################### -# Menus - -$mnr = 2; -$sbmnr = -1; - -#$sbmnr = $_GET['sbmnr']; - -createMainMenu($rollen, $mainnr); -createAUMenu($rollen, $mnr, $auDN, $sbmnr); - -############################################################################### -# MainPage Data - -$childauDN = $_GET['dn']; - -$childau = get_au_data($childauDN,array("dn","cn","ou","associateddomain","description","maxipblock")); -#print_r($childau); - -$domprefix = str_replace('.uni-freiburg.de','',$childau[0]['associateddomain']); -#print_r($domprefix); - -$template->assign(array("CHILDOU" => $childau[0]['ou'], - "CHILDCN" => $childau[0]['cn'], - "CHILDDN" => $childauDN, - "CHILDDOMAIN" => $domprefix, - "CHILDDESC" => $childau[0]['description'], - "RANGE1" => "", - "RANGE2" => "", - "AUDN" => $auDN, - "SBMNR" => $sbmnr)); - -# MaxIPBlocks -$mipb = $childau[0]['maxipblock']; - -# IP Delegs -$template->define_dynamic("Delegs", "Webseite"); -#print_r($mipb); -if (count($mipb) > 1){ - foreach ($mipb as $block){ - $exp = explode('_',$block); - $template->assign(array("RANGE1" => $exp[0], - "RANGE2" => $exp[1])); - $template->parse("DELEGS_LIST", ".Delegs"); - } - $template->clear_dynamic("Delegs"); -}elseif(count($mipb) == 1){ - $exp = explode('_',$mipb); - $template->assign(array("RANGE1" => $exp[0], - "RANGE2" => $exp[1])); - $template->parse("DELEGS_LIST", ".Delegs"); - $template->clear_dynamic("Delegs"); -} -$template->assign(array("RANGE1" => "", - "RANGE2" => "")); -$template->parse("DELEGS_LIST", ".Delegs"); -#$template->clear_dynamic("Delegs"); - - -############################################################################### -# Footer - -include("au_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/au/childau_add.php b/ldap-site-mngmt/webinterface/au/childau_add.php deleted file mode 100644 index 47fb9b55..00000000 --- a/ldap-site-mngmt/webinterface/au/childau_add.php +++ /dev/null @@ -1,146 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# $_POST form variables -$childou = $_POST['childou']; -$childcn = $_POST['childcn']; -$childdesc = $_POST['childdesc']; -$childdomain = $_POST['childdomain']; -$mainadmin = $_POST['adduser']; -$hosts = $_POST['addhost']; - -$childou = htmlentities($childou); -$childcn = htmlentities($childcn); -$childdesc = htmlentities($childdesc); -$childdomainfull = htmlentities($childdomain).".".$domsuffix ; - -/* -echo "AU dn:"; print_r($auDN); echo "<br>"; -echo "ou:"; print_r($childou); echo "<br>"; -echo "cn:"; print_r($childcn); echo "<br>"; -echo "desc:"; print_r($childdesc); echo "<br>"; -echo "domain:"; print_r($childdomainfull); echo "<br>"; -echo "mainadmin:"; print_r($mainadmin); echo "<br><br>"; -echo "hosts:"; print_r($hosts); echo "<br><br>"; -*/ - -$seconds = 2; -# $url = 'new_child.php?ou='.$childou.'&cn='.$get_childcn.'&desc='.$get_childdesc.'&childdomain='.$childdomain; - -echo " - <html> - <head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> - </head> - <body> - <table border='0' cellpadding='30' cellspacing='0'> - <tr><td>"; - -if ( $childou != "" && $mainadmin != none && $mainadmin != "") { - - # Formulareingaben anpassen - $expou = explode(" ",$childou); - foreach ($expou as $word) {$expuc[] = ucfirst($word);} - $childou = implode(" ",$expuc); - $childou = preg_replace ( '/\s+([0-9A-Z])/', '$1', $childou); - - # AU Objekt anlegen - # Test auf gleichnamige Geschwister-AUs - #$sisters = get_childau($auDN,array("ou")); - $sisters = get_all_aus(array("ou")); - $sister = 0; - foreach ($sisters as $item) { - if ( strtolower($item['ou']) == strtolower($childou) ) { - $mesg = "Es existiert bereits eine AU mit dem eingegebenen 'ou' Namen!<br> - Bitte geben Sie einen anderen 'ou' Namen ein.<br><br>"; - $get_childcn = str_replace ( " ", "_", $childcn ); - $get_childdesc = str_replace ( " ", "_", $childdesc ); - $url = "new_child.php?ou=Hier_andere_OU_eingeben&cn=".$get_childcn."&desc=".$get_childdesc."&childdomain=".$childdomain; - $sister = 1; - break; - } - } - if ($sister == 0) { - - $childDN = "ou=".$childou.",".$auDN; - if (new_childau($childDN,$childou,$childcn,$childdesc,$mainadmin)) { - - # Objekete verschieben - $i = array_search('none',$hosts); - #print_r($i); echo "<br>"; - if ($i === 0 ) {array_splice($hosts, $i, 1);} - #print_r($hosts ); echo "<br>"; - - if (count($hosts) != 0) { - foreach ($hosts as $host) { - $exp = explode('_',$host); - $hostDN = $exp[0]; - $hostname = $exp[1]; - print_r($hostDN); echo "<br>"; - print_r($hostname); echo "<br><br>"; - # IP Adresse nicht verschieben (IPs werden später delegiert) - $hoip = get_node_data($hostDN, array("ipaddress")); - # print_r($hoip); echo "<br>"; - if ($hoip['ipaddress'] != "") { - delete_ip_host($hostDN,$auDN); - } - if (move_subtree($hostDN, "hostname=".$hostname.",cn=computers,".$childDN)) { - # bestimmte Attribute loeschen ... - $newhostDN = "hostname=".$hostname.",cn=computers,".$childDN; - $dhcp = get_node_data($newhostDN, array("dhcphlpcont")); - # print_r($dhcp); echo "<br>"; - if ($dhcp['dhcphlpcont'] != "") { - $entrydel ['dhcphlpcont'] = array(); - #$entrydel ['objectclass'] = "dhcpHost"; - # print_r($dhcphlpcont); - ldap_mod_del($ds, "hostname=".$hostname.",cn=computers,".$childDN, $entrydel); - } - } - } - } - - # Domain anlegen falls erforderlich - if (new_child_domain($childdomain, $childDN, $assocdom, $domDN)) { - $mesg .= "<br>AU Domain erfolgreich eingetragen<br>"; - } - else { - $mesg .= "<br>Fehler beim eintragen der AU Domain<br>"; - } - - $mesg .= "<br>Untergeordnete AU erfolgreich angelegt<br>"; - } - else { - $mesg .= "<br>Fehler beim anlegen der untergeordneten AU<br>"; - } - - $url = 'au_childs.php'; - } -} - - -elseif ( $childou == "") { - $get_childcn = str_replace ( " ", "_", $childcn ); - $get_childdesc = str_replace ( " ", "_", $childdesc ); - $mesg = "Sie haben den OU der neuen AU nicht angegeben. Dieser ist aber ein notwendiges Attribut.<br> - Bitte geben Sie ihn an.<br><br>"; - $url = "new_child.php?ou=Hier_OU_eingeben&cn=".$get_childcn."&desc=".$get_childdesc."&childdomain=".$childdomain; -} - -elseif ($mainadmin == "none" || $mainadmin == "") { - $get_childcn = str_replace ( " ", "_", $childcn ); - $get_childdesc = str_replace ( " ", "_", $childdesc ); - $mesg = "Sie haben keinen MainAdmin für die neue AU gewählt.<br> - Bitte wählen Sie einen MainAdmin.<br><br>"; - $url = 'new_child.php?ou='.$childou.'&cn='.$get_childcn.'&desc='.$get_childdesc.'&childdomain='.$childdomain; -} - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body></html>"; - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/au/childau_change.php b/ldap-site-mngmt/webinterface/au/childau_change.php deleted file mode 100644 index 2406b4c2..00000000 --- a/ldap-site-mngmt/webinterface/au/childau_change.php +++ /dev/null @@ -1,157 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -$childcn = $_POST['childcn']; -$oldchildcn = $_POST['oldchildcn']; -$childou = $_POST['childou']; -$oldchildou = $_POST['oldchildou']; -$childdomain = $_POST['childdomain']; -$oldchilddomain = $_POST['oldchilddomain']; -$childDN = $_POST['childdn']; -$submenu = $_POST['submenu']; - -$childcn = htmlentities($childcn); -$oldchildcn = htmlentities($oldchildcn); -$childou = htmlentities($childou); -$oldchildou = htmlentities($oldchildou); -$childdomainfull = htmlentities($childdomain).".".$domsuffix ; -$oldchilddomainfull = htmlentities($oldchilddomain).".".$domsuffix; - -/* -echo "new ou:"; print_r($childou); echo "<br>"; -echo "old ou:"; print_r($oldchildou); echo "<br>"; -echo "new cn:"; print_r($childcn); echo "<br>"; -echo "old cn:"; print_r($oldchildcn); echo "<br>"; -echo "new domain:"; print_r($childdomain); echo "<br>"; -echo "old domain:"; print_r($oldchilddomain); echo "<br><br>"; -echo "child DN:"; print_r($childDN); echo "<br>"; -echo "new child DN:"; print_r($newchildDN); echo "<br>"; -echo "submenuNR:"; print_r($submenu); echo "<br><br>"; -*/ - -$seconds = 2; -$url = 'child_au.php?dn='.$childDN.'&sbmnr='.$submenu; - -echo " - <html> - <head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> - </head> - <body> - <table border='0' cellpadding='30' cellspacing='0'> - <tr><td>"; - -####################################### -# CN - -if ($oldchildcn == $childcn) { - #$mesg = "keine Aenderung<br>"; -} - -if ($oldchildcn == "" && $childcn != "") { - echo "CN neu anlegen<br>"; - # hier noch Syntaxcheck - $entry['cn'] = $childcn; - $result = ldap_mod_add($ds,$childDN,$entry); - if ($result) { - $mesg = "AU Name erfolgreich eingetragen<br><br>"; - } - else { - $mesg = "Fehler beim eintragen des AU Namen<br><br>"; - } -} - -if ($oldchildcn != "" && $childcn != "" && $oldchildcn != $childcn) { - echo "CN aendern<br>"; - # hier noch Syntaxcheck - $entry['cn'] = $childcn; - $result = ldap_mod_replace($ds,$childDN,$entry); - if ($result) { - $mesg = "AU Name erfolgreich geaendert<br><br>"; - } - else { - $mesg = "Fehler beim aendern des AU Namen<br><br>"; - } -} - -if ($oldchildcn != "" && $childcn == "") { - echo "CN loeschen<br>"; - # hier noch Syntaxcheck - $entry['cn'] = $oldchildcn; - $result = ldap_mod_del($ds,$childDN,$entry); - if ($result) { - $mesg = "AU Name erfolgreich geloescht<br><br>"; - } - else { - $mesg = "Fehler beim loeschen des AU Namen<br><br>"; - } -} - -####################################### -# OU - -if ($oldchildou == $childou) { - #$mesg = "keine Aenderung<br>"; -} - -if ($oldchildou != "" && $childou != "" && $oldchildou != $childou) { - echo "OU aendern<br>"; - # hier noch Syntaxcheck - # Formulareingaben anpassen - $expou = explode(" ",$childou); - foreach ($expou as $word) {$expuc[] = ucfirst($word);} - $childou = implode(" ",$expuc); - $childou = preg_replace ( '/\s+([0-9A-Z])/', '$1', $childou); - - $newchildDN = "ou=".$childou.",".$auDN; - modify_au_dn($childDN, $newchildDN); - - $url = 'au_childs.php'; -} - -if ($oldchildou != "" && $childou == "") { - echo "OU loeschen<br>"; - echo "Sie sind dabei einen Teil des DN zu loeschen.<br> - Dies geht nur, wenn Sie den gesamten Eintrag loeschen. <br> - Verwenden Sie dazu das Formular unten"; -} - -######################################## -# DOMAIN -if ($oldchilddomain == $domprefix && ($childdomain == "" || $childdomain == $domprefix)) { - #$mesg = "keine Aenderung<br>"; -} -if ($oldchilddomain == $childdomain) { - #$mesg = "keine Aenderung<br>"; -} - - -if ($oldchilddomain != "" && $childdomain != "" && $oldchilddomain != $childdomain && $childdomain != $domprefix) { - echo "Domain aendern<br>"; - # hier noch Syntaxcheck - if (change_child_domain($childdomain, $oldchilddomain, $childDN, $assocdom, $domDN, $domprefix)) { - $mesg = "Domain erfolgreich geandert<br><br>"; - } - else { - $mesg = "Fehler beim aendern der Domain<br><br>"; - } -} - - -if ($oldchilddomain != "" && $oldchilddomain != $domprefix && ($childdomain == "" || $childdomain == $domprefix)) { - echo "Domain loeschen bzw. integrieren<br><br>"; - $delmodus = "integrate"; - delete_child_domain($oldchilddomain,$assocdom,$childDN, $domDN, $delmodus); - $seconds = 5; -} - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body></html>"; - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/au/childau_delete.php b/ldap-site-mngmt/webinterface/au/childau_delete.php deleted file mode 100644 index f9bd75d7..00000000 --- a/ldap-site-mngmt/webinterface/au/childau_delete.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# $_POST form variables -$delmodus = $_POST['delmodus']; -$childDN = $_POST['childdn']; -$childou = $_POST['childou']; -$oldchilddomain = $_POST['oldchilddomain']; -#print_r($childDN); echo "<br>"; -#print_r($oldchilddomain); echo "<br>"; -#print_r($entrydel); echo "<br>"; - -$url = 'au_childs.php'; - -echo " - <html> - <head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> - </head> - <body> - <table border='0' cellpadding='30' cellspacing='0'> - <tr><td>"; - -$mesg = delete_childau($childDN,$childou,$delmodus); - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect(2, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body></html>"; - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/au/dom_delete.php b/ldap-site-mngmt/webinterface/au/dom_delete.php deleted file mode 100644 index b8c664b4..00000000 --- a/ldap-site-mngmt/webinterface/au/dom_delete.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# $_POST form variables -$delmodus = $_POST['delmodus']; -$oldchilddomain = $_POST['oldchilddomain']; -$childDN = $_POST['childdn']; -$submenu = $_POST['submenu']; - -$url = 'child_au.php?dn='.$childDN.'&sbmnr='.$submenu; - -echo " - <html> - <head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> - </head> - <body> - <table border='0' cellpadding='30' cellspacing='0'> - <tr><td>"; - -$mesg = delete_childau_domain($oldchilddomain,$childDN,$delmodus); - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect(2, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body></html>"; - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/au/ip_deleg_change.php b/ldap-site-mngmt/webinterface/au/ip_deleg_change.php deleted file mode 100644 index 19131837..00000000 --- a/ldap-site-mngmt/webinterface/au/ip_deleg_change.php +++ /dev/null @@ -1,194 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -#$auDN = $_POST['audn']; -$childauDN = $_POST['childdn']; -$oldrange1 = $_POST['oldrange1']; -$oldrange2 = $_POST['oldrange2']; -$newrange1 = $_POST['range1']; -$newrange2 = $_POST['range2']; - -/* -print_r($oldrange1);echo "<br>"; -print_r($newrange1);echo "<br><br>"; -print_r($oldrange2);echo "<br>"; -print_r($newrange2);echo "<br>"; -print_r($childauDN);echo "<br>"; -print_r($auDN);echo "<br><br>"; -*/ - -$syntax = new Syntaxcheck; -$url = "child_au.php?dn=".$childauDN."&sbmnr=".$sbmnr; -$seconds = 200; - -echo " -<html> -<head> - <title>IP Address Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - - -$diff1 = array_keys(array_diff_assoc($oldrange1,$newrange1)); -$diff2 = array_keys(array_diff_assoc($newrange1,$oldrange1)); -$tochange1 = array_unique(array_merge($diff1,$diff2)); - -$diff3 = array_keys(array_diff_assoc($oldrange2,$newrange2)); -$diff4 = array_keys(array_diff_assoc($newrange2,$oldrange2)); -$tochange2 = array_unique(array_merge($diff3,$diff4)); - -# print_r($tochange1);echo "<br><br>"; -# print_r($tochange2);echo "<br><br>"; - -$tochange = array_unique(array_merge($tochange1,$tochange2)); -#print_r($tochange);echo "<br><br>"; - - -foreach ($tochange as $i){ - - $childaudnexp = ldap_explode_dn($childauDN, 1); - $childau = $childaudnexp[0]; - #print_r($childau); - - if ( $oldrange1[$i] == "" && $oldrange2[$i] == "" && $newrange1[$i] != "" && $newrange2[$i] != "" ){ - - echo "Neuen IP Bereich an <b>$childau</b> delegieren:";echo "<br>";echo "<br>"; - echo "neue IP Range: ";print_r($newrange1[$i]);echo " - ";print_r($newrange2[$i]);echo "<br>"; - - if ($syntax->check_ip_syntax($newrange1[$i]) && $syntax->check_ip_syntax($newrange2[$i])){ - #echo "korrekte IP Syntax<br>"; - $newrange1[$i] = htmlentities($newrange1[$i]); - $newrange2[$i] = htmlentities($newrange2[$i]); - $newrange_array = array($newrange1[$i],$newrange2[$i]); - #print_r($newrange_array); - $newrange = implode('_',$newrange_array); - #print_r($newrange); - # $oldip[$i] = htmlentities($oldip[$i]); - if (new_ip_delegation($newrange,$childauDN,$auDN)){ - echo "<br>Neuer IP Bereich erfolgreich delegiert<br>"; - }else{echo "<br>Fehler beim delegieren des neuen IP Bereichs<br>";} - }else{echo "falsche IP Syntax<br>";} - - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=$url style='publink'>back</a>"; - redirect($seconds, $url, $mesg, $addSessionId = TRUE); - } - - elseif ( $oldrange1[$i] != "" && $oldrange2[$i] != "" && $newrange1[$i] == "" && $newrange2[$i] == "" ){ - - echo "IP Delegierung von <b>$childau</b> löschen:";echo "<br>";echo "<br>"; - echo "zu löschende IP Range: ";print_r($oldrange1[$i]);echo " - ";print_r($oldrange2[$i]);echo "<br>"; - - $oldrange1[$i] = htmlentities($oldrange1[$i]); - $oldrange2[$i] = htmlentities($oldrange2[$i]); - $oldip_array = array($oldrange1[$i],$oldrange2[$i]); - $oldrange = implode('_',$oldip_array); - if (delete_ip_delegation($oldrange,$childauDN,$auDN)){ - $mesg = "<br>IP Delegierung geloescht<br>"; - }else{ - $mesg = "<br>Fehler beim loeschen der IP Delegierung<br>"; - } - - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=$url style='publink'>back</a>"; - redirect($seconds, $url, $mesg, $addSessionId = TRUE); - } - - elseif ( $oldrange1[$i] != "" && $oldrange2[$i] != "" && $newrange1[$i] != "" && $newrange2[$i] != "" ){ - $or1 = ip2long($oldrange1[$i]); - $or2 = ip2long($oldrange2[$i]); - $nr1 = ip2long($newrange1[$i]); - $nr2 = ip2long($newrange2[$i]); - - if ( ($nr1 > $or1 || $nr2 < $or2) && !($nr1 < $or1 || $nr2 > $or2) ){ - - echo "IP Delegierung von <b>$childau</b> reduzieren:";echo "<br>";echo "<br>"; - echo "alte IP Range: ";print_r($oldrange1[$i]);echo " - ";print_r($oldrange2[$i]);echo "<br>"; - echo "neue IP Range: ";print_r($newrange1[$i]);echo " - ";print_r($newrange2[$i]);echo "<br>"; - - if ($syntax->check_ip_syntax($newrange1[$i]) && $syntax->check_ip_syntax($newrange2[$i])){ - #echo "korrekte IP Syntax<br>"; - - $newrange1[$i] = htmlentities($newrange1[$i]); - $newrange2[$i] = htmlentities($newrange2[$i]); - $newrange_array = array($newrange1[$i],$newrange2[$i]); - $newrange = implode('_',$newrange_array); - #print_r($newrange); - - $oldrange1[$i] = htmlentities($oldrange1[$i]); - $oldrange2[$i] = htmlentities($oldrange2[$i]); - $oldip_array = array($oldrange1[$i],$oldrange2[$i]); - $oldrange = implode('_',$oldip_array); - #print_r($oldrange); - - if (reduce_ip_delegation($oldrange,$newrange,$childauDN,$auDN)){ - $mesg = "<br>IP Range verkleinert<br>"; - }else{ - $mesg = "<br>Fehler beim verkleinern der IP Range<br>"; - } - }else{echo "falsche IP Syntax<br>";} - - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=$url style='publink'>back</a>"; - redirect($seconds, $url, $mesg, $addSessionId = TRUE); - - - }elseif( ($nr1 < $or1 || $nr2 > $or2) && !($nr1 > $or1 || $nr2 < $or2) ){ - - echo "IP Delegierung von <b>$childau</b> erweitern:";echo "<br>";echo "<br>"; - echo "alte IP Range: ";print_r($oldrange1[$i]);echo " - ";print_r($oldrange2[$i]);echo "<br>"; - echo "neue IP Range: ";print_r($newrange1[$i]);echo " - ";print_r($newrange2[$i]);echo "<br>"; - - if ($syntax->check_ip_syntax($newrange1[$i]) && $syntax->check_ip_syntax($newrange2[$i])){ - #echo "korrekte IP Syntax<br>"; - $newrange1[$i] = htmlentities($newrange1[$i]); - $newrange2[$i] = htmlentities($newrange2[$i]); - $newrange_array = array($newrange1[$i],$newrange2[$i]); - $newrange = implode('_',$newrange_array); - #print_r($newrange); - - $oldrange1[$i] = htmlentities($oldrange1[$i]); - $oldrange2[$i] = htmlentities($oldrange2[$i]); - $oldip_array = array($oldrange1[$i],$oldrange2[$i]); - $oldrange = implode('_',$oldip_array); - #print_r($oldrange); - - if (expand_ip_delegation($oldrange,$newrange,$childauDN,$auDN)){ - $mesg = "<br>IP Range erweitert<br>"; - }else{ - $mesg = "<br>Fehler beim erweitern der IP Range<br>"; - } - }else{ - echo "falsche IP Syntax<br>"; - } - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=$url style='publink'>back</a>"; - redirect($seconds, $url, $mesg, $addSessionId = TRUE); - } - else{ - $mesg = "<br>Verschieben (Shiften) der Delegierung nicht moeglich!<br> - Nur Vergroessern und Verkleinern moeglich!<br>"; - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=$url style='publink'>back</a>"; - redirect($seconds, $url, $mesg, $addSessionId = TRUE); - } - } - else{ - $mesg = "keine Aenderung<br>"; - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=$url style='publink'>back</a>"; - redirect($seconds, $url, $mesg, $addSessionId = TRUE); - } - - echo "<br><br>"; -} - -echo " -</td></tr></table> -</head> -</html>"; -?> diff --git a/ldap-site-mngmt/webinterface/au/menu.dwt b/ldap-site-mngmt/webinterface/au/menu.dwt deleted file mode 100755 index 20631be8..00000000 --- a/ldap-site-mngmt/webinterface/au/menu.dwt +++ /dev/null @@ -1,29 +0,0 @@ - -<table cellpadding='0' cellspacing='0' border='0' width='100%'> - - - <!-- BEGIN DYNAMIC BLOCK: Hauptmenu --> - - <tr valign='middle' align='left'> - - <td width='8%' align='right' style="border-style=none;">{ICON}</td> - <td width="8%" align="left" style="border-width:1 0 1 1;border-color:#000000;border-style:solid;padding:5;background-color:{FARBE}"> </td> - <td width="74%" align="left" style="border-width:1 1 1 0;border-color:#000000;border-style:solid;padding:5;background-color:{FARBE}"> - <a href="{LINK_M}" style="text-decoration:none"> - <code class="submenue_schrift">{TEXT_M}</code> - </a></td> - <td width='10%'> </td> - - </tr> - <!-- BEGIN DYNAMIC BLOCK: Submenu --> - - {SUB} - - <!-- END DYNAMIC BLOCK: Submenu --> - - <tr height='4'> - </tr> - - <!-- END DYNAMIC BLOCK: Hauptmenu --> - -</table> diff --git a/ldap-site-mngmt/webinterface/au/new_child.dwt b/ldap-site-mngmt/webinterface/au/new_child.dwt deleted file mode 100755 index 309737cc..00000000 --- a/ldap-site-mngmt/webinterface/au/new_child.dwt +++ /dev/null @@ -1,123 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Neue untergeordnete AU anlegen:</h3></td> - </tr> - <tr> - <td height='20'></td> - </tr> - <tr> - <td colspan='2'><h4>Notwendige Attribute (müssen angegeben werden):</h3></td> - </tr> - - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='childau_add.php' method='post'> - - <tr> - <td width='45%' class='tab_h'><b>Attribut</b></td> - <td width='55%' class='tab_h'><b>Wert</b></td> - </tr> - - <tr height='50'> - <td class='tab_d'><b>Eindeutiger Name (ou):</b><br>(Teil des dn, ohne Leerzeichen eingeben) </td> - <td class='tab_d'> - <input type='Text' name='childou' value='{CHILDOU}' size='40' class='medium_form_field'> - </td> - </tr> - - <tr height='50'> - <td class='tab_d'><b>MainAdmin neue AU:</b><br>(Wählen Sie einen Benutzer aus)</td> - <td class='tab_d'> - <select name='adduser' size='1' class='medium_form_selectbox'> - <option selected value='none'>----------</option> - - <!-- BEGIN DYNAMIC BLOCK: Users --> - <option value='{UDN}'>{USER}</option> - <!-- END DYNAMIC BLOCK: Users --> - - </select> - <input type='hidden' name='role' value='MainAdmin'> - </td> - </tr> - </table></td> - </tr> - <tr> - <td height='25'></td> - </tr> - <tr> - <td><h4>Optionale Attribute:</h3></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td width='45%' class='tab_h'><b>Attribut</b></td> - <td width='55%' class='tab_h'><b>Wert</b></td> - </tr> - - <tr height='50'> - <td class='tab_d'><b>Name der Abteilung (cn): </b> </td> - <td class='tab_d'> - <input type='Text' name='childcn' value='{CHILDCN}' size='40' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td class='tab_d'><b>DNS Domain :</b> </td> - <td class='tab_d'> - <input type='Text' name='childdomain' value='{CHILDDOMAIN}' size='24' class='medium_form_field'> - <b><font size="+1">.uni-freiburg.de</font></b> - </td> - </tr> - <tr height='50'> - <td class='tab_d'><b>Beschreibung der AU:</b> </td> - <td class='tab_d'> - <input type='Text' name='childdesc' value='{CHILDDESC}' size='40' class='medium_form_field'> - </td> - - - </tr> - </table></td> - </tr> - - <tr> - <td height='25'></td> - </tr> - <tr> - <td><h4>Objekte, die Sie in die neue untergeordnete AU verschieben möchten :</h3></td> - </tr> - - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td width='45%' class='tab_h'><b>Objekt</b></td> - <td width='55%' class='tab_h'><b>Auswahl</b></td> - </tr> - - <tr height='50'> - <td class='tab_d'><b>Rechner:</b><br> - (Wählen Sie die zu verschiebenden Rechner aus, <br>Mehrfachauswahl möglich)</td> - <td class='tab_d'> - <select name='addhost[]' size='{HOSTNUMBER}' class='medium_form_selectbox' multiple> - <option selected value='none'>----------</option> - - <!-- BEGIN DYNAMIC BLOCK: Hosts --> - <option value='{HDN}_{HOSTNAME}'>{HOSTNAME}</option> - <!-- END DYNAMIC BLOCK: Hosts --> - - </select> - </td> - </tr> - </table></td> - </tr> - - <tr> - <td height='5'></td> - </tr> - <tr> - <td style='border-width: 0 0 0 0;'><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'> - </form></td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/au/new_child.php b/ldap-site-mngmt/webinterface/au/new_child.php deleted file mode 100644 index f083050d..00000000 --- a/ldap-site-mngmt/webinterface/au/new_child.php +++ /dev/null @@ -1,74 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Filename of Template -$webseite = "new_child.dwt"; - -include('au_header.inc.php'); - -############################################################################### -# Menus - -$mnr = 2; -$sbmnr = -1; - -$sbmnr = $_GET['sbmnr']; - -createMainMenu($rollen, $mainnr); -createAUMenu($rollen, $mnr, $auDN, $sbmnr); - -################################################################################ -# Mainpage Data - -$childou = str_replace ( "_", " ", $_GET['ou']); -$childcn = str_replace ( "_", " ", $_GET['cn']); -$childdesc = str_replace ( "_", " ", $_GET['desc']); -$childdomain = $_GET['childdomain']; - -$domprefix = str_replace('.uni-freiburg.de','',$childau[0]['associateddomain']); - -$template->assign(array("CHILDOU" => $childou, - "CHILDCN" => $childcn, - "CHILDDOMAIN" => $childdomain, - "CHILDDESC" => $childdesc, - "AUDN" => $auDN)); - - -####################################### -# Admin anlegen - -$users_array = get_users(); -#print_r($users_array); echo "<br><br>"; - -if (count($users_array) != 0) { - $template->define_dynamic("Users", "Webseite"); - foreach ($users_array as $item) { - $template->assign(array("UDN" => $item['dn'], - "USER" => $item['uid'])); - $template->parse("USERS_LIST", ".Users"); - } -} -else { - $template->assign(array("UDN" => "","USER" => "")); -} - -####################################### -# Objekte zum verschieben - -$host_array = get_hosts($auDN,array("dn","hostname")); -#print_r($host_array); -$template->define_dynamic("Hosts", "Webseite"); -foreach ($host_array as $item){ - $template->assign(array("HDN" => $item['dn'], - "HOSTNAME" => $item['hostname'], - "HOSTNUMBER" => 5)); - $template->parse("HOSTS_LIST", ".Hosts"); -} - -############################################################################### -# Footer - -include("au_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/au/role_add.php b/ldap-site-mngmt/webinterface/au/role_add.php deleted file mode 100644 index c1729ed1..00000000 --- a/ldap-site-mngmt/webinterface/au/role_add.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - - -$adduser = $_POST['adduser']; -$role = $_POST['role']; -$menr = $_POST['menr']; - -$exp = explode('_',$adduser); -$adduserDN = $exp[0]; -$adduserUID = $exp[1]; - -echo " -<html> -<head> - <title>Administrative Unit Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -# print_r($adduser);echo "<br>"; -# print_r($adduserDN);echo "<br>"; -# print_r($adduserUID);echo "<br>"; -# print_r($role);echo "<br>"; -# print_r($menr);echo "<br><br>"; - -$url = 'role_show.php?role='.$role.'&sbmnr='.$menr; - -if ($adduser != 'none'){ - $res = new_role_member($adduserDN,$role,$auDN,$domDN); - if ($res == 1){ - $mesg = "Der Benutzer <b>".$adduserUID."</b> wurde erfolgreich als neuer <b>".$role."</b> aufgenommen.<br><br>"; - }else{ - $mesg = "Fehler! Der Benutzer <b>".$adduserUID."</b> konnte nicht aufgenommen werden<br><br>"; - } - $mesg .= "Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='role_show.php?role=$role&sbmnr=$menr' style='publink'>back</a>"; - redirect(3, $url, $mesg, $addSessionId = TRUE); -} - -else { - $mesg = "Sie haben keinen Benutzer ausgewählt<br><br> - Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='role_show.php?role=$role&sbmnr=$menr' style='publink'>back</a>"; - redirect(3, $url, $mesg, $addSessionId = TRUE); -} - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/au/role_delete.php b/ldap-site-mngmt/webinterface/au/role_delete.php deleted file mode 100644 index eccd4ce4..00000000 --- a/ldap-site-mngmt/webinterface/au/role_delete.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - - -$deluser = $_POST['deluser']; -$role = $_POST['role']; -$menr = $_POST['menr']; - -echo " -<html> -<head> - <title>Administrative Unit Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if (isset($_POST['deluser'])){ - - # print_r($deluser);echo "<br>"; - # print_r($role);echo "<br>"; - # print_r($menr);echo "<br>"; - - $url = 'role_show.php?role='.$role.'&sbmnr='.$menr; - $mesg = ""; - - foreach ($deluser as $item){ - $exp = explode('_',$item); - $deluserDN = $exp[0]; - $deluserUID = $exp[1]; - # print_r($deluserDN);echo "<br>"; - # print_r($deluserUID);echo "<br>"; - $res = delete_role_member($deluserDN,$role,$auDN,$domDN); - if ($res == 1){ - $mesg .= "Der Benutzer <b>".$deluserUID."</b> wurde erfolgreich aus der Rolle <b>".$role."</b> entfernt.<br>"; - }else{ - $mesg .= "<br><b>Fehler!</b> Der Benutzer <b>".$deluserUID."</b> konnte nicht entfernt werden<br>"; - } - } - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='role_show.php?role=$role&sbmnr=$menr' style='publink'>back</a><br><br>"; - redirect(3, $url, $mesg, $addSessionId = TRUE); - -} - -else { - $mesg .= "<br>Sie haben keinen Benutzer ausgewählt<br><br> - Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='role_show.php?role=$role&sbmnr=$menr' style='publink'>back</a>"; - redirect(3, $url, $mesg, $addSessionId = TRUE); -} - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/au/role_show.dwt b/ldap-site-mngmt/webinterface/au/role_show.dwt deleted file mode 100644 index 39c618c0..00000000 --- a/ldap-site-mngmt/webinterface/au/role_show.dwt +++ /dev/null @@ -1,70 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>{ROLE_DESC}</h3></td></tr><tr><td height='20'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr> - <td width='5%' class='tab_h'> </td> - <td width='25%' class='tab_h'><b>Benutzer</b></td> - <td width='25%' class='tab_h'><b>UID</b></td> - <td width='45%' class='tab_h'><b>Email</b></td> - </tr> - - <form action='role_delete.php' method='post'> - - <!-- BEGIN DYNAMIC BLOCK: Members --> - <tr> - <td class='tab_d'> - <input type='checkbox' name='deluser[]' value='{VALUE}_{UID}' size='15' class='medium_form_checkbox'></td> - <td class='tab_d'>{USERNAME} </td> - <td class='tab_d'>{UID} </td> - <td class='tab_d'><a href'mailto:{MAIL}' style='publink'>{MAIL}</a> </td> - </tr> - <!-- END DYNAMIC BLOCK: Members --> - <input type='hidden' name='role' value='{ROLE}'> - <input type='hidden' name='menr' value='{MENR}'> - - - <tr> - <td colspan='3' style='border-width: 0 0 0 0;'><input type='Submit' name='delete' value='entfernen' class='small_loginform_button'></td> - - </form> - </tr> - </table></td> - </tr> - - <tr height='30'></tr> - <tr> - <td colspan='2'><h4>Neuen Administrator anlegen:</h4></td> - </tr> - <tr><td height='10'></td></tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr> - - <form action='role_add.php' method='post'> - - <td width='60%' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'> - Wählen Sie einen Benutzer aus <br> - <select name='adduser' size='1' class='medium_form_selectbox'> - <option selected value='none'>----------</option> - - <!-- BEGIN DYNAMIC BLOCK: Users --> - <option value='{UDN}_{USER}'>{USER}</option> - <!-- END DYNAMIC BLOCK: Users --> - - </select> - <input type='hidden' name='role' value='{ROLE}'> - <input type='hidden' name='menr' value='{MENR}'> - </td> - </tr> - <tr> - <td style='border-width: 0 0 0 0;'><input type='Submit' name='add' value='anlegen' class='small_loginform_button'></td> - - </form> - </tr> - </table></td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/au/role_show.php b/ldap-site-mngmt/webinterface/au/role_show.php deleted file mode 100644 index 8e94d7ed..00000000 --- a/ldap-site-mngmt/webinterface/au/role_show.php +++ /dev/null @@ -1,114 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "role_show.dwt"; - -include("au_header.inc.php"); - -############################################################################### - -#$mnr = $_GET['mnr']; -$mnr = 3; - -$sbmnr = $_GET['sbmnr']; - -# Menuleiste erstellen -createMainMenu($rollen, $mainnr); -createAUMenu($rollen, $mnr, $auDN, $sbmnr); - -############################################################################### -# Admins anzeigen und loeschen - -$role = $_GET['role']; -$roles_array = get_roles($auDN); -# print_r($roles_array); - -# jeder Rolle entsprechend Members holen und Überschrift setzen -switch ($role){ -case 'MainAdmin': - $template->assign(array("ROLE" => "MainAdmin","ROLE_DESC" => "Haupt Administratoren","MENR" => $sbmnr)); - $members = $roles_array['MainAdmin']; - break; -case 'HostAdmin': - $template->assign(array("ROLE" => "HostAdmin","ROLE_DESC" => "Administratoren - Rechner","MENR" => $sbmnr)); - $members = $roles_array['HostAdmin']; - break; -case 'DhcpAdmin': - $template->assign(array("ROLE" => "DhcpAdmin","ROLE_DESC" => "Administratoren - DHCP","MENR" => $sbmnr)); - $members = $roles_array['DhcpAdmin']; - break; -case 'RbsAdmin': - $template->assign(array("ROLE" => "RbsAdmin","ROLE_DESC" => "Administratoren - Remote Boot Services","MENR" => $sbmnr)); - $members = $roles_array['RbsAdmin']; - break; -case 'ZoneAdmin': - $template->assign(array("ROLE" => "ZoneAdmin","ROLE_DESC" => "Administratoren - DNS Zone [ {DOM} ]","MENR" => $sbmnr)); - $members = $roles_array['ZoneAdmin']; - break; -} - -# print_r($members); echo "<br><br>"; - -# für jedes Member Daten holen (Benutzername, UID) -if ( count($members) != 0 ){ - $members_data = array(); - foreach ($members as $item){ - $members_data[] = get_user_data($item,array("dn","cn","uid","mail")); - # print_r(get_user_data($item,array("dn","cn","uid"))); echo "<br>"; - } -} -# echo "<br>"; -# print_r($members_data); echo "<br><br>"; - -if (count($members_data) != 0){ - $template->define_dynamic("Members", "Webseite"); - foreach ($members_data as $item){ - $template->assign(array("VALUE" => $item['dn'], - "USERNAME" => $item['cn'], - "UID" => $item['uid'], - "MAIL" => $item['mail'])); - $template->parse("MEMBERS_LIST", ".Members"); - } -}else{ - $template->assign(array("VALUE" => "","USERNAME" => "","UID" => "","MAIL" => "")); -} - - -############################################## -# Admin anlegen ... -$users_array = get_users(); -# print_r($users_array); echo "<br><br>"; - -if (count($members_data) != 0){ -for ($i=0; $i < count($users_array); $i++){ - foreach ($members_data as $item){ - if ($users_array[$i]['uid'] == $item['uid']){ - array_splice($users_array, $i, 1); - # break; - } - } -} -# print_r($users_array); echo "<br><br>"; -} - -# if (count($users_array) != 0){ - $template->define_dynamic("Users", "Webseite"); - foreach ($users_array as $item){ - $template->assign(array("UDN" => $item['dn'], - "USER" => $item['uid'])); - $template->parse("USERS_LIST", ".Users"); - } -#}else{ -# $template->assign(array("UDN" => "","USER" => "")); -# } - - - - - -############################################################################### - -include("au_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/au/roles.php b/ldap-site-mngmt/webinterface/au/roles.php deleted file mode 100644 index 608b7e30..00000000 --- a/ldap-site-mngmt/webinterface/au/roles.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$mnr = 0; -# 3. Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "roles_start.dwt"; - -#include("roles_header.inc.php"); -include("au_header.inc.php"); - -################################################################################### - -$mnr = 3; -$sbmnr = -1; - -# Menuleiste erstellen -createMainMenu($rollen, $mainnr); -createAUMenu($rollen, $mnr, $auDN, $sbmnr); - -################################################################################### - -include("au_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/au/roles_start.dwt b/ldap-site-mngmt/webinterface/au/roles_start.dwt deleted file mode 100644 index 27f55a2f..00000000 --- a/ldap-site-mngmt/webinterface/au/roles_start.dwt +++ /dev/null @@ -1,41 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='90%'> - <tr> - <td colspan='2'><h3>Modul - Administratoren Rollen Management: </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td> - <p>Dieses Modul dient der Verwaltung von Administratoren Rollen in ihrer Abteilung. - Benutzen Sie die Navigation links, um die Verwaltungsbereiche der einzelnen Rollen anzusteuern. - Dort koennen Sie dann Benutzer den Rollen zuweisen oder wieder entziehen.</p> - <p>Folgende administrative Rollen stehen zur Verfuegung:</p> - <ul> - <li><p><b>Main Admins</b></p> - Hauptadministratoren, der AU mit uneingeschraenkten Rechten. Sie verwalten: u.a. - untergeordnete AUs (anlegen/loeschen/im DNS anmelden), - Rollen, IP Adressen und deren Delegierung, Rechner (Gruppen), deren Hardware-Profile und - PXE Boot Konfigurationen, sowie die Dienste DHCP und DNS. - </li> - <li><p><b>DHCP Admins</b></p> - Verwalten den DHCP Dienst, d.h. Subnetz-, Pool-, Class-Objekte. - </li> - <li><p><b>Host Admins</b></p> - Diese verwalten Rechner (Gruppen), deren Hardware-Profile und PXE Boot Konfigurationen, - und koennen diese im DHCP und DNS anmelden (verwalten im DNS nur deren Namenseintraege). - </li> - <li><p><b>RBS Admins</b></p> - Diese verwalten Remote Boot Services: TFTP/PXE Konfiguration der Dienste, Default PXE Boot Konfigurationen und Generische Bootmenüeinträge. - </li> - <!-- - <li><p><b>DNS Admins</b></p> - Sind die Administratoren der mit der AU assozierten DNS Zone. D.h. sie verwalten SOA, - Include Direktiven untergeordneter Include Files, sowie alle Nameneintraege der Zone. - </li> --> - </ul> - - </td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/class.FastTemplate.php b/ldap-site-mngmt/webinterface/class.FastTemplate.php deleted file mode 100644 index d048ee5c..00000000 --- a/ldap-site-mngmt/webinterface/class.FastTemplate.php +++ /dev/null @@ -1,768 +0,0 @@ -<? -################################################ -#### Angepasst an PHP4 von #### -#### Timothy Burk - Webdesign & PC-Service #### -#### info@tburk.com #### -################################################ -/* - CVS Revision. 1.1.0 -*/ - -/* - eine weitere kleine Anpassung von Thomas Nunninger betrifft das append in der - parse-Funktion. Bei error_reporting(E_ALL) erschien sonst beim ersten Anhängen - an eine noch nicht vorhandene Variable eine Fehlermeldung. -*/ - -class FastTemplate { - - var $FILELIST = array(); // Holds the array of filehandles - // FILELIST[HANDLE] == "fileName" - - var $DYNAMIC = array(); // Holds the array of dynamic - // blocks, and the fileHandles they - // live in. - - var $PARSEVARS = array(); // Holds the array of Variable - // handles. - // PARSEVARS[HANDLE] == "value" - - var $LOADED = array(); // We only want to load a template - // once - when it's used. - // LOADED[FILEHANDLE] == 1 if loaded - // undefined if not loaded yet. - - var $HANDLE = array(); // Holds the handle names assigned - // by a call to parse() - - var $ROOT = ""; // Holds path-to-templates - - var $WIN32 = false; // Set to true if this is a WIN32 server - - var $ERROR = ""; // Holds the last error message - - var $LAST = ""; // Holds the HANDLE to the last - // template parsed by parse() - - var $STRICT = true; // Strict template checking. - // Unresolved vars in templates will - // generate a warning when found. - -// ************************************************************ - - function FastTemplate ($pathToTemplates = "") - { - global $php_errormsg; - - if(!empty($pathToTemplates)) - { - $this->set_root($pathToTemplates); - } - - } // end (new) FastTemplate () - - -// ************************************************************ -// All templates will be loaded from this "root" directory -// Can be changed in mid-process by re-calling with a new -// value. - - function set_root ($root) - { - $trailer = substr($root,-1); - - if(!$this->WIN32) - { - if( (ord($trailer)) != 47 ) - { - $root = "$root".chr(47); - } - - if(is_dir($root)) - { - $this->ROOT = $root; - } - else - { - $this->ROOT = ""; - $this->error("Specified ROOT dir [$root] is not a directory"); - } - } - else - { - // WIN32 box - no testing - if( (ord($trailer)) != 92 ) - { - $root = "$root".chr(92); - } - $this->ROOT = $root; - } - - } // End set_root() - - -// ************************************************************** -// Calculates current microtime -// I throw this into all my classes for benchmarking purposes -// It's not used by anything in this class and can be removed -// if you don't need it. - - - function utime () - { - $time = explode( " ", microtime()); - $usec = (double)$time[0]; - $sec = (double)$time[1]; - return $sec + $usec; - } - -// ************************************************************** -// Strict template checking, if true sends warnings to STDOUT when -// parsing a template with undefined variable references -// Used for tracking down bugs-n-such. Use no_strict() to disable. - - function strict () - { - $this->STRICT = true; - } - -// ************************************************************ -// Silently discards (removes) undefined variable references -// found in templates - - function no_strict () - { - $this->STRICT = false; - } - -// ************************************************************ -// A quick check of the template file before reading it. -// This is -not- a reliable check, mostly due to inconsistencies -// in the way PHP determines if a file is readable. - - function is_safe ($filename) - { - if(!file_exists($filename)) - { - $this->error("[$filename] does not exist",0); - return false; - } - return true; - } - -// ************************************************************ -// Grabs a template from the root dir and -// reads it into a (potentially REALLY) big string - - function get_template ($template) - { - if(empty($this->ROOT)) - { - $this->error("Cannot open template. Root not valid.",1); - return false; - } - - $filename = "$this->ROOT"."$template"; - - $contents = implode("",(@file($filename))); - if( (!$contents) or (empty($contents)) ) - { - $this->error("get_template() failure: [$filename] $php_errormsg",1); - } - - return $contents; - - } // end get_template - -// ************************************************************ -// Prints the warnings for unresolved variable references -// in template files. Used if STRICT is true - - function show_unknowns ($Line) - { - $unknown = array(); - if (ereg("({[A-Z0-9_]+})",$Line,$unknown)) - { - $UnkVar = $unknown[1]; - if(!(empty($UnkVar))) - { - @error_log("[FastTemplate] Warning: no value found for variable: $UnkVar ",0); - } - } - } // end show_unknowns() - -// ************************************************************ -// This routine get's called by parse() and does the actual -// {VAR} to VALUE conversion within the template. - - function parse_template ($template, $tpl_array) - { - while ( list ($key,$val) = each ($tpl_array) ) - { - if (!(empty($key))) - { - if(gettype($val) != "string") - { - settype($val,"string"); - } - - $template = ereg_replace("\{$key}","$val","$template"); - //$template = str_replace("\{$key}","$val","$template"); - } - } - - if(!$this->STRICT) - { - // Silently remove anything not already found - - $template = ereg_replace("\{([A-Z0-9_]+)}","",$template); - } - else - { - // Warn about unresolved template variables - if (ereg("(\{[A-Z0-9_]+})",$template)) - { - $unknown = split("\n",$template); - while (list ($Element,$Line) = each($unknown) ) - { - $UnkVar = $Line; - if(!(empty($UnkVar))) - { - $this->show_unknowns($UnkVar); - } - } - } - } - return $template; - - } // end parse_template(); - -// ************************************************************ -// The meat of the whole class. The magic happens here. - - function parse ( $ReturnVar, $FileTags ) - { - $append = false; - $this->LAST = $ReturnVar; - $this->HANDLE[$ReturnVar] = 1; - - if (gettype($FileTags) == "array") - { - unset($this->$ReturnVar); // Clear any previous data - - while ( list ( $key , $val ) = each ( $FileTags ) ) - { - if ( (!isset($this->$val)) || (empty($this->$val)) ) - { - $this->LOADED["$val"] = 1; - if(isset($this->DYNAMIC["$val"])) - { - $this->parse_dynamic($val,$ReturnVar); - } - else - { - $fileName = $this->FILELIST["$val"]; - $this->$val = $this->get_template($fileName); - } - } - - // Array context implies overwrite - - $this->$ReturnVar = $this->parse_template($this->$val,$this->PARSEVARS); - - // For recursive calls. - - $this->assign( array( $ReturnVar => $this->$ReturnVar ) ); - - } - } // end if FileTags is array() - else - { - // FileTags is not an array - - $val = $FileTags; - - if( (substr($val,0,1)) == '.' ) - { - // Append this template to a previous ReturnVar - - $append = true; - $val = substr($val,1); - } - - if ( (!isset($this->$val)) || (empty($this->$val)) ) - { - $this->LOADED["$val"] = 1; - if(isset($this->DYNAMIC["$val"])) - { - $this->parse_dynamic($val,$ReturnVar); - } - else - { - $fileName = $this->FILELIST["$val"]; - $this->$val = $this->get_template($fileName); - } - } - - if($append) - { - // Thomas> auch hier append korrigiert - if (isset($this->$ReturnVar)) { - $this->$ReturnVar .= $this->parse_template($this->$val,$this->PARSEVARS); - } else { - $this->$ReturnVar = $this->parse_template($this->$val,$this->PARSEVARS); - } - } - else - { - $this->$ReturnVar = $this->parse_template($this->$val,$this->PARSEVARS); - } - - // For recursive calls. - - $this->assign(array( $ReturnVar => $this->$ReturnVar) ); - - } - return; - } // End parse() - - -// ************************************************************ - - function FastPrint ( $template = "" ) - { - if(empty($template)) - { - $template = $this->LAST; - } - - if( (!(isset($this->$template))) || (empty($this->$template)) ) - { - $this->error("Nothing parsed, nothing printed",0); - return; - } - else - { - print $this->$template; - } - return; - } - -// ************************************************************ - - function fetch ( $template = "" ) - { - if(empty($template)) - { - $template = $this->LAST; - } - if( (!(isset($this->$template))) || (empty($this->$template)) ) - { - $this->error("Nothing parsed, nothing printed",0); - return ""; - } - - return($this->$template); - } - - -// ************************************************************ - - function define_dynamic ($Macro, $ParentName) - { - // A dynamic block lives inside another template file. - // It will be stripped from the template when parsed - // and replaced with the {$Tag}. - - $this->DYNAMIC["$Macro"] = $ParentName; - return true; - } - -// ************************************************************ - - function parse_dynamic ($Macro,$MacroName) - { - // The file must already be in memory. - - $ParentTag = $this->DYNAMIC["$Macro"]; - // Thomas> in Folgezeile !isset($this->$ParentTag eingefügt - if( (!isset($this->$ParentTag) || !$this->$ParentTag) or (empty($this->$ParentTag)) ) - { - $fileName = $this->FILELIST[$ParentTag]; - $this->$ParentTag = $this->get_template($fileName); - $this->LOADED[$ParentTag] = 1; - } - if($this->$ParentTag) - { - $template = $this->$ParentTag; - $DataArray = split("\n",$template); - $newMacro = ""; - $newParent = ""; - $outside = true; - $start = false; - $end = false; - while ( list ($lineNum,$lineData) = each ($DataArray) ) - { - $lineTest = trim($lineData); - if("<!-- BEGIN DYNAMIC BLOCK: $Macro -->" == "$lineTest" ) - { - $start = true; - $end = false; - $outside = false; - } - if("<!-- END DYNAMIC BLOCK: $Macro -->" == "$lineTest" ) - { - $start = false; - $end = true; - $outside = true; - } - if( (!$outside) and (!$start) and (!$end) ) - { - $newMacro .= "$lineData\n"; // Restore linebreaks - } - if( ($outside) and (!$start) and (!$end) ) - { - $newParent .= "$lineData\n"; // Restore linebreaks - } - if($end) - { - $newParent .= "\{$MacroName}\n"; - } - // Next line please - if($end) { $end = false; } - if($start) { $start = false; } - } // end While - - $this->$Macro = $newMacro; - $this->$ParentTag = $newParent; - return true; - - } // $ParentTag NOT loaded - MAJOR oopsie - else - { - @error_log("ParentTag: [$ParentTag] not loaded!",0); - $this->error("ParentTag: [$ParentTag] not loaded!",0); - } - return false; - } - -// ************************************************************ -// Strips a DYNAMIC BLOCK from a template. - - function clear_dynamic ($Macro="") - { - if(empty($Macro)) { return false; } - - // The file must already be in memory. - - $ParentTag = $this->DYNAMIC["$Macro"]; - - if( (!$this->$ParentTag) or (empty($this->$ParentTag)) ) - { - $fileName = $this->FILELIST[$ParentTag]; - $this->$ParentTag = $this->get_template($fileName); - $this->LOADED[$ParentTag] = 1; - } - - if($this->$ParentTag) - { - $template = $this->$ParentTag; - $DataArray = split("\n",$template); - $newParent = ""; - $outside = true; - $start = false; - $end = false; - while ( list ($lineNum,$lineData) = each ($DataArray) ) - { - $lineTest = trim($lineData); - if("<!-- BEGIN DYNAMIC BLOCK: $Macro -->" == "$lineTest" ) - { - $start = true; - $end = false; - $outside = false; - } - if("<!-- END DYNAMIC BLOCK: $Macro -->" == "$lineTest" ) - { - $start = false; - $end = true; - $outside = true; - } - if( ($outside) and (!$start) and (!$end) ) - { - $newParent .= "$lineData\n"; // Restore linebreaks - } - // Next line please - if($end) { $end = false; } - if($start) { $start = false; } - } // end While - - $this->$ParentTag = $newParent; - return true; - - } // $ParentTag NOT loaded - MAJOR oopsie - else - { - @error_log("ParentTag: [$ParentTag] not loaded!",0); - $this->error("ParentTag: [$ParentTag] not loaded!",0); - } - return false; - } - - -// ************************************************************ - - function define ($fileList) - { - while ( list ($FileTag,$FileName) = each ($fileList) ) - { - $this->FILELIST["$FileTag"] = $FileName; - } - return true; - } - -// ************************************************************ - - function clear_parse ( $ReturnVar = "") - { - $this->clear($ReturnVar); - } - -// ************************************************************ - - function clear ( $ReturnVar = "" ) - { - // Clears out hash created by call to parse() - - if(!empty($ReturnVar)) - { - if( (gettype($ReturnVar)) != "array") - { - unset($this->$ReturnVar); - return; - } - else - { - while ( list ($key,$val) = each ($ReturnVar) ) - { - unset($this->$val); - } - return; - } - } - - // Empty - clear all of them - - while ( list ( $key,$val) = each ($this->HANDLE) ) - { - $KEY = $key; - unset($this->$KEY); - } - return; - - } // end clear() - -// ************************************************************ - - function clear_all () - { - $this->clear(); - $this->clear_assign(); - $this->clear_define(); - $this->clear_tpl(); - - return; - - } // end clear_all - -// ************************************************************ - - function clear_tpl ($fileHandle = "") - { - if(empty($this->LOADED)) - { - // Nothing loaded, nothing to clear - - return true; - } - if(empty($fileHandle)) - { - // Clear ALL fileHandles - - while ( list ($key, $val) = each ($this->LOADED) ) - { - unset($this->$key); - } - unset($this->LOADED); - - return true; - } - else - { - if( (gettype($fileHandle)) != "array") - { - if( (isset($this->$fileHandle)) || (!empty($this->$fileHandle)) ) - { - unset($this->LOADED[$fileHandle]); - unset($this->$fileHandle); - return true; - } - } - else - { - while ( list ($Key, $Val) = each ($fileHandle) ) - { - unset($this->LOADED[$Key]); - unset($this->$Key); - } - return true; - } - } - - return false; - - } // end clear_tpl - -// ************************************************************ - - function clear_define ( $FileTag = "" ) - { - if(empty($FileTag)) - { - unset($this->FILELIST); - return; - } - - if( (gettype($Files)) != "array") - { - unset($this->FILELIST[$FileTag]); - return; - } - else - { - while ( list ( $Tag, $Val) = each ($FileTag) ) - { - unset($this->FILELIST[$Tag]); - } - return; - } - } - -// ************************************************************ -// Aliased function - used for compatibility with CGI::FastTemplate - /* function clear_parse () - { - $this->clear_assign(); - } */ - -// ************************************************************ -// Clears all variables set by assign() - - function clear_assign () - { - if(!(empty($this->PARSEVARS))) - { - while(list($Ref,$Val) = each ($this->PARSEVARS) ) - { - unset($this->PARSEVARS["$Ref"]); - } - } - } - -// ************************************************************ - - function clear_href ($href) - { - if(!empty($href)) - { - if( (gettype($href)) != "array") - { - unset($this->PARSEVARS[$href]); - return; - } - else - { - while (list ($Ref,$val) = each ($href) ) - { - unset($this->PARSEVARS[$Ref]); - } - return; - } - } - else - { - // Empty - clear them all - - $this->clear_assign(); - } - return; - } - -// ************************************************************ - - function assign ($tpl_array, $trailer="") - { - if(gettype($tpl_array) == "array") - { - while ( list ($key,$val) = each ($tpl_array) ) - { - if (!(empty($key))) - { - // Empty values are allowed - // Empty Keys are NOT - - $this->PARSEVARS["$key"] = $val; - } - } - } - else - { - // Empty values are allowed in non-array context now. - if (!empty($tpl_array)) - { - $this->PARSEVARS["$tpl_array"] = $trailer; - } - } - } - -// ************************************************************ -// Return the value of an assigned variable. -// Christian Brandel cbrandel@gmx.de - - function get_assigned($tpl_name = "") - { - if(empty($tpl_name)) { return false; } - if(isset($this->PARSEVARS["$tpl_name"])) - { - return ($this->PARSEVARS["$tpl_name"]); - } - else - { - return false; - } - } - -// ************************************************************ - - function error ($errorMsg, $die = 0) - { - $this->ERROR = $errorMsg; - echo "ERROR: $this->ERROR <BR> \n"; - if ($die == 1) - { - exit; - } - - return; - - } // end error() - - -// ************************************************************ - - - -// ************************************************************ - -} // End class.FastTemplate.php3 - -?> diff --git a/ldap-site-mngmt/webinterface/common/ip_blocks.inc.php b/ldap-site-mngmt/webinterface/common/ip_blocks.inc.php deleted file mode 100644 index 17795671..00000000 --- a/ldap-site-mngmt/webinterface/common/ip_blocks.inc.php +++ /dev/null @@ -1,74 +0,0 @@ -<?php - -# Max und Free IP Blocks -$mipb_array = get_maxipblocks_au($auDN); -$fipb_array = get_freeipblocks_au($auDN); -#print_r($fipb_array); echo "<br>"; -natsort($mipb_array); -natsort($fipb_array); -#print_r($fipb_array); echo "<br>"; -#print_r(count($mipb_array)); echo "<br>"; -#print_r(count($fipb_array)); echo "<br>"; -$ipblocks = ""; - -# print_r($mipb_array); -if ($mipb_array[0] != "" ){ - if (count($mipb_array) > 1 ){ - $ipblocks .= "<table border='1' cellpadding='2' cellspacing='0' width='100%' style='border-width: 0 0 0 0;'> - <tr><td colspan='3' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'> - <b>Zugewiesene IP Bereiche:</b></td></tr>"; - foreach ($mipb_array as $mipb){ - $exp = explode('_',$mipb); - $ipblocks .= "<tr><td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[0] </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - </td> - <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[1] </td></td></tr>"; - } - } - elseif (count($mipb_array) == 1){ - $ipblocks .= "<table border='1' cellpadding='2' cellspacing='0' width='100%' style='border-width: 0 0 0 0;'> - <tr><td colspan='3' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'> - <b>Zugewiesener IP Bereich:</b></td></tr>"; - $exp = explode('_',$mipb_array[0]); - $ipblocks .= "<tr><td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[0] </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - </td> - <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[1] </td></tr>"; - } - elseif( $fipb_array[0] == "" ){ - $ipblocks .= "<table border='0' cellpadding='2' cellspacing='0' width='100%' style='border-width: 0 0 0 0;'> - <tr><td><b>Keine IP Adressen mehr verfügbar</b></td></tr>"; - } - if (count($fipb_array) > 1 ){ - $ipblocks .= "<table border='1' cellpadding='2' cellspacing='0' width='100%' style='border-width: 0 0 0 0;'> - <tr valign='bottom' height='40'> - <td colspan='3' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'> - <b>Davon noch frei verfügbar:</b></td></tr>"; - foreach ($fipb_array as $fipb){ - $exp = explode('_',$fipb); - $ipblocks .= "<tr><td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[0] </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - </td> - <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[1] </td></tr>"; - } - } - elseif (count($fipb_array) == 1){ - $ipblocks .= "<table border='1' cellpadding='2' cellspacing='0' width='100%' style='border-width: 0 0 0 0;'> - <tr valign='bottom' height='40'> - <td colspan='3' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'> - <b>Davon noch frei verfügbar:</b></td></tr>"; - $exp = explode('_',$fipb_array[0]); - $ipblocks .= "<tr><td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[0] </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - </td> - <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[1] </td></tr>"; - } - -} - -if( $mipb_array[0] == "" ){ - $ipblocks .= "<table border='0' cellpadding='2' cellspacing='0' width='100%' style='border-width: 0 0 0 0;'> - <tr valign='bottom' height='40'> - <td><b>Ihnen wurden keine IP Adressen zugewiesen</b></td></tr>"; -} -$ipblocks .= "</table>"; - -$template->assign(array("IPBLOCKS" => $ipblocks)); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/common/ipblocks.dwt b/ldap-site-mngmt/webinterface/common/ipblocks.dwt deleted file mode 100644 index b77f53b3..00000000 --- a/ldap-site-mngmt/webinterface/common/ipblocks.dwt +++ /dev/null @@ -1,11 +0,0 @@ -<table cellpadding='5' cellspacing='0' border='1' width='100%' style='border-width: 0 0 0 0;'> - - <tr align='left'>
- <td width='8%'></td>
- <td width='82%' style='border-color: black; border-style: solid; border-width: 1 1 1 1;'>{IPBLOCKS}</td> - <td width='10%'></td> - - </tr> - <tr height='5'></tr>
- -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/computers.dwt b/ldap-site-mngmt/webinterface/computers/computers.dwt deleted file mode 100644 index 933ab60d..00000000 --- a/ldap-site-mngmt/webinterface/computers/computers.dwt +++ /dev/null @@ -1,85 +0,0 @@ -<html> - -<head> - <title>{SEITENTITEL}</title> - <link rel='stylesheet' href='../styles.css' type='text/css'></head> -<body> - -<table cellpadding='0' cellspacing='0' border='0' width='100%' style='background-color: #F0F0F0;border-color: #505050; border-style: solid; border-width: 0 0 1 0;'> - <tr> - <td width='30%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr valign='top'> - <td width='1'></td> - <td><h2>Client / IP Management</h2></td> - </tr> - </table> - </td> - - <td width='45%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr valign='top' align='left'> - <td> - <h4><a href='../start.php' class='headerlink'>Startseite</a> - >> <a href='../au/au.php' class='headerlink'>{AU}</a> [ {DOMAIN} ]</h4> - </td> - </tr> - </table> - </td> - <td width='25%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%' align='right'> - <tr valign='top' align='right'> - <td> - {LOGIN} - </td> - </tr> - </table> - </td> - </tr> - <tr> - <td colspan='3'>{MAINMENU}</td> - </tr> -</table> - -<!--<hr align='center' width='98%' noshade>--> -<br> - - -<table cellpadding='5' cellspacing='0' border='0' width='100%' height='85%'> - - <tr valign='top' height='100%'> - <td width='28%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr> - <td> - - {NAVIGATION} - - </td> - </tr> - <tr> - <td> - - {IPBLOCKS} - - </td> - </tr> - </table> - </td> - - <td width='72%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr><td> - - {HAUPTFENSTER} - - </td></tr> - </table> - </td> - - </tr> -</table> - -</body> - -</html> diff --git a/ldap-site-mngmt/webinterface/computers/computers.php b/ldap-site-mngmt/webinterface/computers/computers.php deleted file mode 100644 index ea365d76..00000000 --- a/ldap-site-mngmt/webinterface/computers/computers.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "computers_start.dwt"; - -include('computers_header.inc.php'); - -$mnr = 0; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/computers_footer.inc.php b/ldap-site-mngmt/webinterface/computers/computers_footer.inc.php deleted file mode 100644 index 7849823e..00000000 --- a/ldap-site-mngmt/webinterface/computers/computers_footer.inc.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -$template->assign(array("PFAD" => $START_PATH)); - -# Daten in die Vorlage parsen -$template->parse("LOGIN", "Login"); -$template->parse("MAINMENU", "Mmenu"); -$template->parse("NAVIGATION", "Menu"); -$template->parse("IPBLOCKS", "IPBlocks"); -$template->parse("HAUPTFENSTER", "Webseite"); -$template->parse("PAGE", "Vorlage"); - -# Fertige Seite an den Browser senden -$template->FastPrint("PAGE"); - -# Abmelden vom LDAP -ldap_unbind($ds); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/computers_header.inc.php b/ldap-site-mngmt/webinterface/computers/computers_header.inc.php deleted file mode 100644 index d6bc3746..00000000 --- a/ldap-site-mngmt/webinterface/computers/computers_header.inc.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php - -# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt. -$titel = "Computers Management"; -# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc. -$mainnr = 1; - - -$template = new FastTemplate("."); -# dem erstellten Template-Objekt eine Vorlage zuweisen -$definedTemplates = array("Vorlage" => "computers.dwt", - "Login" => "../logout_form.inc.dwt", - "Mmenu" => "../hauptmenue.dwt", - "Menu" => "menu.dwt", - "IPBlocks" => "../common/ipblocks.dwt", - "Webseite" => $webseite); -if (isset($additionalTemplates)) { - foreach ($additionalTemplates as $templateKey => $templateFile) { - $definedTemplates[$templateKey] = $templateFile; - } -} -$template->define($definedTemplates); -$template->assign(array("SEITENTITEL" => $titel, "AU" => $au_ou, "DOMAIN" => $assocdom, "USERCN" => $usercn)); - - -include("computers_menu.php"); -include("../common/ip_blocks.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/computers_menu.php b/ldap-site-mngmt/webinterface/computers/computers_menu.php deleted file mode 100644 index 1ab98526..00000000 --- a/ldap-site-mngmt/webinterface/computers/computers_menu.php +++ /dev/null @@ -1,250 +0,0 @@ -<?php - -function createComputersMenu($rollen , $mnr, $auDN, $sbmnr, $mcnr) { - - global $template, $ds, $suffix, $START_PATH; - - $mipb_array = get_maxipblocks_au($auDN); - #print_r($mipb_array); - if ( $mipb_array[0] == "" ){ - $iprechnerlink = "no_ip.php?mnr=2"; - }else{ - $iprechnerlink = "ip_rechner.php?sort=ipaddress"; - } - - # Struktur der Registerkartenleiste - # Hauptmenu - $hauptmenu = array( #array("link" => "computers.php", - # "text" => "Übersicht", - # "zugriff" => array("MainAdmin","HostAdmin","DhcpAdmin")), - array("link" => "hostoverview.php?sort=hostname", - "text" => "Übersicht Rechner", - "zugriff" => array("MainAdmin","HostAdmin","DhcpAdmin")), - array("link" => $iprechnerlink, - "text" => "IP Adressen Rechner", - "zugriff" => array("MainAdmin","DhcpAdmin","HostAdmin")), - #array("link" => "groupoverview.php", - # "text" => "Rechnergruppen", - # "zugriff" => array("MainAdmin")), - #array("link" => "machineconfig_default.php", - # "text" => "Default MachineConfigs", - # "zugriff" => array("MainAdmin","HostAdmin")), - #array("link" => "new_mcdef.php", - # "text" => "Neue MachineConfig", - # "zugriff" => array("MainAdmin","HostAdmin")), - array("link" => "pxeconfigs.php", - "text" => "PXE Configs", - "zugriff" => array("MainAdmin","DhcpAdmin"))); - - # Submenus - /*$computers_array = get_hosts($auDN,array("dn","hostname","ou")); - for($n=0;$n<count($computers_array);$n++){ - - $comps[] = array("link" => "host.php?dn=".$computers_array[$n]['dn']."&sbmnr=".$n, - "text" => $computers_array[$n]['hostname'], - "zugriff" => array("MainAdmin","HostAdmin","DhcpAdmin")); - # print_r($comps); echo "<br>"; - }*/ - $comps[] = array("link" => "new_host.php?sbmnr=0", #.$n, - "text" => "Neuen Rechner anlegen", - "zugriff" => array("MainAdmin","DhcpAdmin","HostAdmin")); - - $groups_array = get_groups($auDN,array("dn","cn")); - for($n=0;$n<count($groups_array);$n++){ - - $groups = array(); - $groups[] = array("link" => "group.php?dn=".$groups_array[$n]['dn']."&sbmnr=".$n, - "text" => $groups_array[$n]['cn'], - "zugriff" => array("MainAdmin","DhcpAdmin","HostAdmin")); - - } - $groups[] = array("link" => "new_group.php?sbmnr=".$n, - "text" => "Neue Gruppe anlegen", - "zugriff" => array("MainAdmin","DhcpAdmin","HostAdmin")); - - # default machine-configs - $mcdef_array = get_machineconfigs("cn=computers,".$auDN,array("dn","cn","timerange")); - for($n=0;$n<count($mcdef_array);$n++){ - $defmc [] = array("link" => "mcdef.php?dn=".$mcdef_array[$n]['dn']."&mnr=3&sbmnr=".$n, - "text" => $mcdef_array[$n]['cn'], - "zugriff" => array("MainAdmin","DhcpAdmin","HostAdmin")); - } - - $newpxe[] = array("link" => "new_pxe.php", - "text" => "Neue PXE Config anlegen", - "zugriff" => array("MainAdmin","DhcpAdmin")); - - $submenu = array(#array(), - $comps, - array(), - #$groups, - #$defmc, - $newpxe); - #echo "submenu: ";print_r($submenu);echo "<br><br>"; - - # Zusammenstellen der Menuleiste - $template->define_dynamic("Hauptmenu", "Menu"); - $template->define_dynamic("Submenu", "Menu"); - $i=0; - - $maxmenu = count($hauptmenu); - foreach($hauptmenu as $item){ - $template->clear_parse("SUBMENU_LIST"); - - if($item['zugriff'] === "alle" || vergleicheArrays($rollen , $item['zugriff'])) { - - ######################################################################### - # SUBMENU - - $subempty = 0; - $j=0; - $maxsub = count($submenu[$mnr]); - #echo "_"; print_r($maxsub); echo "_"; - if($maxsub > 0){ - foreach($submenu[$mnr] as $item2) { - - if($item2['zugriff'] === "alle" || vergleicheArrays($rollen, $item2['zugriff'])) { - - - if($i != $mnr){ - $template->assign(array("SUB" => "")); - # "LINK_S" => "", - # "TEXT_S" => "")); - $template->parse("SUBMENU_LIST", ".Submenu"); - $template->clear_dynamic("Submenu"); - } - else{ - if ($j==0) { - if ($sbmnr==0) { - if($maxsub == 1){$zwisch2="branchbottom2";} - else {$zwisch2="branch2";} - $lastaktive=true; - $farb="#505050"; - } - else{ - if ($maxsub == 1) {$zwisch2="branchbottom2";} - # Wenn Unter-Unter-Menu ... - #if(count($subsubmenu[$i][$j][0]) != 0){ - #if($maxsub == 1){$zwisch2="<a href='".$item2['link']."' style='border-style=none;text-decoration:none'> - # <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} - #else {$zwisch2="<a href='".$item2['link']."' style='border-style=none;text-decoration:none'> - # <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} - #} - else{$zwisch2="branch2";} - $farb="#A0A0A0"; - $lastaktive=false; - } - } - else { - if ($sbmnr==$j) { - if($maxsub == $j+1){$zwisch2="branchbottom2";} - else {$zwisch2="branch2";} - $lastaktive=true; - $farb="#505050"; - } - else { - if ($maxsub == $j+1) {$zwisch2="branchbottom2";} - # Wenn Unter-Unter-Menu ... - #if(count($subsubmenu[$i][$j][0]) != 0){ - # if($maxsub == $i+1){$zwisch2="<a href='".$item2['link']."' style='border-style=none;text-decoration:none'> - # <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} - # else {$zwisch2="<a href='".$item2['link']."' style='border-style=none;text-decoration:none'> - # <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} - #} - else{$zwisch2="branch2";} - $farb="#A0A0A0"; - $lastaktive=false; - } - } - $htmlcode= " - <tr height='4'> - <td></td><td align='right'><img src='../pics/line2.gif' height='4'></td><td></td><td></td> - </tr> - <tr> - <td width='8%'> </td> - <td width='8%' align='right'><img src='../pics/".$zwisch2.".gif'></td> - <td width='5%' align='left' style='border-width:1 0 1 1;border-color:#000000;border-style:solid;padding:4;background-color:{FARBE_S}'> </td> - <td width='69%' align='left' style='border-width:1 1 1 0;border-color:#000000;border-style:solid;padding:4;padding-left:12px;background-color:{FARBE_S}'> - <a href='".$item2['link']."' style='text-decoration:none'><code class='submenue_schrift'>".$item2['text']."</code></a></td> - <td width='10%'> </td> - </tr> - "; - $template->assign(array("SUB" => $htmlcode)); - $template->assign(array("FARBE_S" => $farb)); - $template->parse("SUBMENU_LIST", ".Submenu"); - $template->clear_dynamic("Submenu"); - } - } - else { - $subempty++; - } - $j=$j+1; - } - } - if($subempty == count($submenu[$mnr])) { - $template->assign(array("SUB" => "")); - # "LINK_S" => "", - # "TEXT_S" => "")); - $template->parse("SUBMENU_LIST", ".Submenu"); - $template->clear_dynamic("Submenu"); - - } - # SUBMENU - ##################################################################### - - if ($i==0) { - if ($mnr==0) { - if(count($submenu[$i][0]) != 0){ - if($maxmenu == 1){$zwisch="";} # {$zwisch="<img style='border-width:0;border-style=none;' src='../pics/minus2.gif'>";} - else {$zwisch="";} - }else{$zwisch="";} - $lastaktive=true; - $farb="#505050"; - } - else{ - if(count($submenu[$i][0]) != 0){ - if($maxmenu == 1){$zwisch="<a href='{LINK_M}' style='border-style=none;text-decoration:none'> - <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} - else {$zwisch="<a href='{LINK_M}' style='border-style=none;text-decoration:none'> - <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} - }else{$zwisch="";} - $farb="#A0A0A0"; - $lastaktive=false; - } - } - else { - if ($mnr==$i) { - if(count($submenu[$mnr][0]) != 0){ - if($maxmenu == $i+1){$zwisch="";} - else {$zwisch="";} - }else{$zwisch="";} - $lastaktive=true; - $farb="#505050"; - } - else { - - if(count($submenu[$i][0]) != 0){ - if($maxmenu == $i+1){$zwisch="<a href='{LINK_M}' style='border-style=none;text-decoration:none'> - <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} - else {$zwisch="<a href='{LINK_M}' style='border-style=none;text-decoration:none'> - <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} - }else{$zwisch="";} - $farb="#A0A0A0"; - $lastaktive=false; - } - } - $template->assign(array("ICON" => $zwisch, - "FARBE" => $farb, - "LINK_M" => $item["link"], - "TEXT_M" => $item["text"])); - $template->parse("HAUPTMENU_LIST", ".Hauptmenu"); - $template->clear_dynamic("Hauptmenu"); - } - $i=$i+1; - } - if ($lastaktive) {$template->assign(array("ENDE" => ""));} - else{ - $template->assign(array("ENDE" => "")); - } -} -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/computers_menu.save.php b/ldap-site-mngmt/webinterface/computers/computers_menu.save.php deleted file mode 100644 index 183d9309..00000000 --- a/ldap-site-mngmt/webinterface/computers/computers_menu.save.php +++ /dev/null @@ -1,188 +0,0 @@ -<?php - -function createComputersMenu($roles , $mnr, $auDN, $sbmnr) { - - global $template, $ds, $suffix, $START_PATH; - - # Struktur der Registerkartenleiste - # Hauptmenu - $hauptmenu = array(array("link" => "computers.php", - "text" => "Übersicht", - "zugriff" => "alle"), - array("link" => "hostoverview.php", - "text" => "Rechner", - "zugriff" => array("MainAdmin")), - array("link" => "computers.php", - "text" => "Neuen Rechner anlegen", - "zugriff" => array("MainAdmin")), - array("link" => "groupoverview.php", - "text" => "Rechnergruppen", - "zugriff" => array("MainAdmin")), - array("link" => "computers.php", - "text" => "Neue Gruppe anlegen", - "zugriff" => array("MainAdmin"))); - - # Submenu - $computers_array = get_hosts($auDN,array("dn","hostname","ou")); - for($n=0;$n<count($computers_array);$n++){ - $comps[] = array("link" => "host.php?dn=".$computers_array[$n]['dn']."&sbmnr=".$n, - "text" => $computers_array[$n]['hostname'], - "zugriff" => array("MainAdmin")); - } - $groups_array = get_groups($auDN,array("dn","cn")); - for($n=0;$n<count($groups_array);$n++){ - $groups[] = array("link" => "group.php?dn=".$groups_array[$n]['dn']."&sbmnr=".$n, - "text" => $groups_array[$n]['cn'], - "zugriff" => array("MainAdmin")); - } - $submenu = array(array(array()), - $comps, - array(array()), - $groups, - array(array())); - - $rollen = array_keys($roles); - - # Zusammenstellen der Menuleiste - $template->define_dynamic("Hauptmenu", "Menu"); - $template->define_dynamic("Submenu", "Menu"); - $i=0; - - $maxmenu = count($hauptmenu); - foreach($hauptmenu as $item){ - $template->clear_parse("SUBMENU_LIST"); - - if($item['zugriff'] === "alle" || vergleicheArrays($rollen , $item['zugriff'])) { - $subempty = 0; - $j=0; - $maxsub = count($submenu[$mnr]); - foreach($submenu[$mnr] as $item2) { - - if($item2['zugriff'] === "alle" || vergleicheArrays($rollen, $item2['zugriff'])) { - if($i != $mnr){ - $template->assign(array("SUB" => "")); - # "LINK_S" => "", - # "TEXT_S" => "")); - $template->parse("SUBMENU_LIST", ".Submenu"); - $template->clear_dynamic("Submenu"); - } - else{ - if ($j==0) { - if ($sbmnr==0) { - if($maxsub == 1){$zwisch="branchbottom2";} - else {$zwisch="branch2";} - $lastaktive=true; - $farb="#505050"; - } - else{ - if($maxsub == 1){$zwisch="branchbottom2";} - else {$zwisch="branch2";} - $farb="#A0A0A0"; - $lastaktive=false; - } - } - else { - if ($sbmnr==$j) { - if($maxsub == $j+1){$zwisch="branchbottom2";} - else {$zwisch="branch2";} - $lastaktive=true; - $farb="#505050"; - } - else { - $farb="#A0A0A0"; - if($maxsub == $j+1){$zwisch="branchbottom2";} - else {$zwisch="branch2";} - # if ($lastaktive) {$zwisch="branch";} - # else {$zwisch="branch";} - $lastaktive=false; - } - } - $htmlcode= " - <tr height='4'> - <td></td><td align='right'><img src='../pics/line2.gif' height='4'></td><td></td><td></td> - </tr> - <tr> - <td width='10%'> </td> - <td width='15%' align='right'><img src='../pics/".$zwisch.".gif'></td>
- <td width='65%' align='left' style='border-width:1 1 1 1;border-color:#000000;border-style:solid;padding:5;padding-left:30px;background-color:{FARBE_S}'> - <a href='".$item2['link']."' style='text-decoration:none'><b class='standard_schrift'>".$item2['text']."</b></a></td> - <td width='10%'> </td> - </tr> - "; - $template->assign(array("SUB" => $htmlcode)); - $template->assign(array("FARBE_S" => $farb)); - $template->parse("SUBMENU_LIST", ".Submenu"); - $template->clear_dynamic("Submenu"); - } - } - else { - $subempty++; - } - $j=$j+1; - - } - if($subempty == count($submenu[$mnr])) { - $template->assign(array("SUB" => "")); - # "LINK_S" => "", - # "TEXT_S" => "")); - $template->parse("SUBMENU_LIST", ".Submenu"); - $template->clear_dynamic("Submenu"); - } - - if ($i==0) { - if ($mnr==0) { - if(count($submenu[$i][0]) != 0){ - if($maxmenu == 1){$zwisch="";} # {$zwisch="<img style='border-width:0;border-style=none;' src='../pics/minus2.gif'>";} - else {$zwisch="";} - }else{$zwisch="";} - $lastaktive=true; - $farb="#505050"; - } - else{ - if(count($submenu[$i][0]) != 0){ - if($maxmenu == 1){$zwisch="<a href='{LINK_M}' style='border-style=none;text-decoration:none'> - <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} - else {$zwisch="<a href='{LINK_M}' style='border-style=none;text-decoration:none'> - <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} - }else{$zwisch="";} - $farb="#A0A0A0"; - $lastaktive=false; - } - } - else { - if ($mnr==$i) { - if(count($submenu[$mnr][0]) != 0){ - if($maxmenu == $i+1){$zwisch="";} - else {$zwisch="";} - }else{$zwisch="";} - $lastaktive=true; - $farb="#505050"; - } - else { - $farb="#A0A0A0"; - if(count($submenu[$i][0]) != 0){ - if($maxmenu == $i+1){$zwisch="<a href='{LINK_M}' style='border-style=none;text-decoration:none'> - <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} - else {$zwisch="<a href='{LINK_M}' style='border-style=none;text-decoration:none'> - <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} - }else{$zwisch="";} - #if ($lastaktive) {$zwisch="";} - #else {$zwisch="";} - $lastaktive=false; - } - } - $template->assign(array("ICON" => $zwisch, - "FARBE" => $farb, - "LINK_M" => $item["link"], - "TEXT_M" => $item["text"])); - $template->parse("HAUPTMENU_LIST", ".Hauptmenu"); - $template->clear_dynamic("Hauptmenu"); - } - $i=$i+1; - } - if ($lastaktive) {$template->assign(array("ENDE" => ""));} - else{ - $template->assign(array("ENDE" => "")); - } -} -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/computers_start.dwt b/ldap-site-mngmt/webinterface/computers/computers_start.dwt deleted file mode 100644 index 378e5d76..00000000 --- a/ldap-site-mngmt/webinterface/computers/computers_start.dwt +++ /dev/null @@ -1,42 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='90%'> - <tr> - <td colspan='2'><h3>Modul - Rechner und Rechnergruppen Management: </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td> - <p>Dieses Modul dient der Verwaltung der Rechner und Rechnergruppen in ihrer Abteilung - (AU), inklusive ihrer spezifischen Rechner- und PXE Boot Konfigurationen<br> - Benutzen Sie die Navigation links, um die einzelnen Verwaltungsbereiche anzusteuern:</p> - <ul> - <li><p><b>Rechner</b></p> - Hier verwalten Sie ihre Rechner (anlegen, bearbeiten, löschen), und können zu dem - einige Hardware-Parameter festlegen. Daneben verwalten Sie hier rechner-spezifische - Computer-Profile (MachineConfig) und PXE Boot Konfigurationen. - </li> - <li><p><b>Rechnergruppen</b></p> - Hier verwalten Sie die Rechnergruppen (anlegen, bearbeiten, löschen), sowie - ihre gemeinsamen Hardware-Parameter. Daneben verwalten Sie hier gruppen-spezifische - Computer-Profile (MachineConfig) und PXE Boot Konfigurationen. - </li> - <!-- <li><p><b>Default MachineConfig</b></p> - Hier verwalten Sie ihre Default Computer-Profile (bearbeiten, löschen, kopieren), - d.h. Computer-Profile, die beim booten von Rechnern verwendet werden, für die - keine rechner- oder gruppen-spezifischen MachineConfigs angelegt sind. - </li> - <li><p><b>Neue MachineConfig</b></p> - Hier köennen Sie neue Computer-Profile (MachineConfigs) als rechner-, gruppen- - spezifische, oder Default MachineConfigs anlegen. - </li> --> - <li><p><b>Neues PXE Bootmenü</b></p> - Hier können Sie neue PXE Bootmenüs (PXEConfigs) für ihre Rechner oder - Rechnergruppen anlegen. - </li> - </ul> - - </td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/delete_confirm.php b/ldap-site-mngmt/webinterface/computers/delete_confirm.php deleted file mode 100644 index 32eb4cf4..00000000 --- a/ldap-site-mngmt/webinterface/computers/delete_confirm.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$dn = $_POST['dn']; -$name = $_POST['name']; -$dhcphlpcont = $_POST['dhcphlpcont']; -$delurl = $_POST['delurl']; -$backurl = $_POST['backurl']; -$successurl = $_POST['successurl']; - -$pxedn = $_POST['pxedn']; -echo " -<html> -<head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> - <tr> - <td> - Wollen Sie das Objekt <b>".$name."</b> wirklich löschen?<br><br> - <form action='".$delurl."' method='post'> - Falls ja:<br><br> - <input type='hidden' name='dn' value='".$dn."'> - <input type='hidden' name='name' value='".$name."'> - <input type='hidden' name='dhcphlpcont' value='".$dhcphlpcont."'> - <input type='hidden' name='successurl' value='".$successurl."'> - <input type='hidden' name='pxedn' value='".$pxedn."'> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'><br><br> - </form> - <form action='".$backurl."' method='post'> - Falls, nein:<br><br> - <input type='Submit' name='apply' value='zurück' class='small_loginform_button'> - </form> - </td> - </tr> -</table> -</body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/dhcphost.dwt b/ldap-site-mngmt/webinterface/computers/dhcphost.dwt deleted file mode 100644 index 3bb5e756..00000000 --- a/ldap-site-mngmt/webinterface/computers/dhcphost.dwt +++ /dev/null @@ -1,69 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - - <tr> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 1;'><h4>{HOSTLINK} Allgemein </a></h4></td> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4><code class='font_object'>DHCP</code></h4></td> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{RBSLINK} RBS/PXE </a></h4></td> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{HWLINK} Geo/Hardware </a></h4></td> - <td> </td> - </tr> - <tr> - <td height='20'></td> - </tr> - <tr> - <td colspan='5'><h3>DHCP Setup - Rechner <code class='font_object'> {HOSTNAME} </code> </h3></td> - </tr> - - <tr><td colspan='5'> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='dhcphost_change.php' method='post'> - - <tr> - <td width='25%' class='tab_h'><b>DHCP Administration - Diensteinbindung, Optionen</b></td> - <td width='25%' class='tab_h'><b> </b></td> - <td width='50%' class='tab_h'><b> </b></td> - </tr> - - <tr valign='top'> - - {DHCPCONT} - - </tr> - - {HOST_DHCPOPT} - - <!--<tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Default Lease Time:</b></td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - <input type='Text' name='attribs[dhcpoptdefault-lease-time]' value='{DEFAULTLEASE}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[dhcpoptdefault-lease-time]' value='{DEFAULTLEASE}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Max Lease Time:</b></td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptmax-lease-time]' value='{MAXLEASE}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[dhcpoptmax-lease-time]' value='{MAXLEASE}'> - </td> - </tr>--> - - </table></td> - </tr> - - - <input type='hidden' name='olddhcp' value='{OLDDHCP}'> - <input type='hidden' name='oldfixadd' value='{OLDFIXADD}'> - <input type='hidden' name='oldrbs' value='{OLDRBS}'> - <input type='hidden' name='hostip' value='{IPADDRESS}'> - <input type='hidden' name='hostmac' value='{HWADDRESS}'> - <input type='hidden' name='hostdn' value='{HOSTDN}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - - <tr> - <td colspan='4'><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/dhcphost.php b/ldap-site-mngmt/webinterface/computers/dhcphost.php deleted file mode 100644 index 5e64000d..00000000 --- a/ldap-site-mngmt/webinterface/computers/dhcphost.php +++ /dev/null @@ -1,185 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "dhcphost.dwt"; - -include('computers_header.inc.php'); - -$mnr = 0; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$hostDN = $_GET['dn']; - -# Rechner Daten -$attributes = array("hostname","domainname","ipaddress","hwaddress","hlprbservice", - "dhcphlpcont","dhcpoptfixed-address","dhcpopthardware","dhcpoptfilename", - "dhcpoptnext-server","dhcpoptmax-lease-time","dhcpoptdefault-lease-time"); -$host = get_node_data($hostDN,$attributes); -$hostip = explode('_',$host['ipaddress']); -# print_r($hostip); echo "<br><br>"; -$dhcphlpcont = $host['dhcphlpcont']; -$dhcpmaxlease = $host['dhcpoptmax-lease-time']; -$dhcpdefaultlease = $host['dhcpoptdefault-lease-time']; -$objectDN = $dhcphlpcont; -$rbsDN = $host['hlprbservice']; - -$rbs_dhcpopt = ""; -$host_dhcpopt = ""; -$dhcp_selectbox = ""; - -########################################################## -# DHCP Setup - -# DHCP Daten -if ($dhcphlpcont == ""){ - $objecttype = "nodhcp"; - - # DHCP Selectbox - $altdhcp = alternative_dhcpobjects($objecttype,$objectDN,$hostip[0]); - $dhcp_selectbox .= "<td class='tab_d'> - <select name='dhcpcont' size='3' class='medium_form_selectbox'> - <option selected value='none'>----------</option>"; - if (count($altdhcp) != 0){ - foreach ($altdhcp as $item){ - $dhcp_selectbox .= " - <option value='".$item['dn']."'>".$item['cn']." ".$item['au']."</option>"; - } - } - $dhcp_selectbox .= "<option value=''>Kein DHCP</option> - </select></td>"; - - $dhcp = "<td class='tab_d_ohne' colspan='2'><b>Eingebunden in DHCP Dienst: </b> </td> - <td class='tab_d_ohne'> - Rechner ist in keinem DHCP Dienst angemeldet<br></td></tr> - <tr valign='top'><td class='tab_d' colspan='2'> - DHCP Dienst auswählen: <br></td>".$dhcp_selectbox; - - $rbs = "<td class='tab_d_ohne' colspan='2'> - Sie müssen den Rechner zuerst in einem DHCP Dienst anmelden, bevor Sie ihn - einem Remote Boot Dienst zuordnen können <br>(DHCP Optionen!!).<br></td> - </tr> - <input type='hidden' name='rbs' value='".$rbsDN."'>"; -}else{ - # Host in Service oder Subnet? - $objecttype = "service"; - $dhcp = ""; - - /*$ocarray = get_node_data($dhcphlpcont,array("objectclass","dhcphlpcont")); - #print_r($ocarray); echo "<br>"; - $sub = array_search('dhcpSubnet', $ocarray['objectclass']); - #print_r($sub); - if ($sub !== false ){ - $objecttype = "subnet"; - $exp0 = explode(',',$dhcphlpcont); - $expsub = explode('=',$exp0[0]); $dhcpsub = $expsub[1]; - $dhcp .= "Subnet <b>".$dhcpsub."</b> / "; - $dhcphlpcont = $ocarray['dhcphlpcont']; - }*/ - - $exp1 = explode(',',$dhcphlpcont); - $expdhcp = explode('=',$exp1[0]); $dhcpserv = $expdhcp[1]; - $expdhcpau = explode('=',$exp1[2]); $dhcpau = $expdhcpau[1]; - - # DHCP Selectbox - $altdhcp = alternative_dhcpobjects($objecttype,$objectDN,$hostip[0]); - $dhcp_selectbox .= "<td class='tab_d'> - <select name='dhcpcont' size='3' class='medium_form_selectbox'> - <option selected value='none'>----------</option>"; - if (count($altdhcp) != 0){ - foreach ($altdhcp as $item){ - $dhcp_selectbox .= " - <option value='".$item['dn']."'>".$item['cn']." ".$item['au']."</option>"; - } - } - $dhcp_selectbox .= "<option value=''>Kein DHCP</option> - </select></td>"; - - $dhcp .= "<td class='tab_d_ohne' colspan='2'><b>Eingebunden in DHCP Dienst: </b> </td> - <td class='tab_d_ohne'> - Service <b>".$dhcpserv."</b> / AU <b>".$dhcpau."</b><br></td></tr> - <tr valign='top'><td class='tab_d' colspan='2'> - DHCP Dienst ändern: <br></td>".$dhcp_selectbox; - - - $fixedaddselopt = "<option selected value='none'>------------</option>"; - switch ( $host['dhcpoptfixed-address'] ){ - case "": - $fixedaddress = "<b> - </b> <br>(dynamische Vergabe)"; - if ( $hostip[0] != "" ){ - $fixedaddselopt .= "<option value='ip'>".$hostip[0]." (IP Adresse)</option>"; - } - $fixedaddselopt .= "<option value='hostname'>".$host['hostname']." (Hostname)</option>"; - break; - case "ip": - $fixedaddress = "<b>".$hostip[0]."</b><br>(Fixe IP Adresse)"; - $fixedaddselopt .= "<option value='hostname'>".$host['hostname']." (Hostname)</option> - <option value=''>kein Eintrag (dynamische IP Vergabe)</option>"; - break; - case "hostname": - $fixedaddress = "<b>".$host['hostname']."</b><br>(Fixe IP Adresse über DNS aufgelöst)"; - if ( $hostip[0] != "" ){ - $fixedaddselopt .= "<option value='ip'>".$hostip[0]." (IP Adresse)</option>"; - } - $fixedaddselopt .= "<option value=''>kein Eintrag (dynamisch)</option>"; - break; - } - - - $host_dhcpopt = "<tr><td class='tab_d_ohne' colspan='2'><b>DHCP Optionen:</b></td></tr> - <tr valign='top'> - <td class='tab_d_ohne'><b>hardware ethernet: </b> </td> - <td class='tab_d_ohne'><b>".$host['hwaddress']."</b> </td> - <td class='tab_d_ohne'> </td> - </tr> - <tr valign='top'> - <td class='tab_d'><b>fixed-address:</b> </td> - <td class='tab_d'>".$fixedaddress." </td> - <td class='tab_d'> - <select name='fixadd' size='3' class='medium_form_selectbox'> - ".$fixedaddselopt." - </select> - </td> - </tr>"; - -} - -$template->assign(array("HOSTDN" => $hostDN, - "HOSTNAME" => $host['hostname'], - #"DOMAINNAME" => $host['domainname'], - "HWADDRESS" => $host['hwaddress'], - "IPADDRESS" => $hostip[0], - "OLDDHCP" => $objectDN, - "OLDFIXADD" => $host['dhcpoptfixed-address'], - "OLDRBS" => $rbsDN, - "DHCPCONT" => $dhcp, - "HOST_DHCPOPT" => $host_dhcpopt, - "NEXTSERVER" => $host['dhcpoptnext-server'], - "FILENAME" => $host['dhcpoptfilename'], - "DEFAULTLEASE" => $dhcpdefaultlease, - "MAXLEASE" => $dhcpmaxlease, - "HOSTLINK" => "<a href='host.php?dn=".$hostDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "RBSLINK" => "<a href='rbshost.php?dn=".$hostDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "HWLINK" => "<a href='hwhost.php?dn=".$hostDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "AUDN" => $auDN, - "SBMNR" => $sbmnr)); - - - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/dhcphost_change.php b/ldap-site-mngmt/webinterface/computers/dhcphost_change.php deleted file mode 100644 index cbfa7f9f..00000000 --- a/ldap-site-mngmt/webinterface/computers/dhcphost_change.php +++ /dev/null @@ -1,236 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$syntax = new Syntaxcheck; - -$dhcp = $_POST['dhcpcont']; -$olddhcp = $_POST['olddhcp']; - -$hostDN = $_POST['hostdn']; -$hostip = $_POST['hostip']; -$hostmac = $_POST['hostmac']; -$fixedaddress = $_POST['fixadd']; -$oldfixedaddress = $_POST['oldfixadd']; -$oldrbs = $_POST['oldrbs']; - -$sbmnr = $_POST['sbmnr']; - -$dhcp = htmlentities($dhcp); -$olddhcp = htmlentities($olddhcp); - -# sonstige Attribute -$attribs = $_POST['attribs']; -if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - $atts[$key] = htmlentities($attribs[$key]); - } -} -#print_r($atts); echo "<br><br>"; -$oldattribs = $_POST['oldattribs']; -if (count($oldattribs) != 0){ - foreach (array_keys($oldattribs) as $key){ - $oldatts[$key] = htmlentities($oldattribs[$key]); - } -} -#print_r($oldatts); echo "<br><br>"; - -/*echo "new dhcp:"; print_r($dhcp); echo "<br>"; -echo "old dhcp:"; print_r($olddhcp); echo "<br>"; -echo "new rbs:"; print_r($rbs); echo "<br>"; -echo "old rbs:"; print_r($oldrbs); echo "<br>"; -echo "Host DN:"; print_r($hostDN); echo "<br>"; -echo "submenuNR:"; print_r($sbmnr); echo "<br><br>";*/ - - -$seconds = 2; -$url = 'dhcphost.php?dn='.$hostDN.'&sbmnr='.$sbmnr; - -echo " -<html> -<head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -########################################## -# DHCP Einbindung - -if ($dhcp != "none" && $dhcp != $olddhcp){ - if ($dhcp != ""){ - $exp = ldap_explode_dn($dhcp, 1); - $dhcpcn = $exp[0]; - $dhcpau = $exp[2]; - - $entrydhcp ['dhcphlpcont'] = $dhcp; - if ($olddhcp != ""){ - echo "DHCP replace "; print_r($olddhcp); echo " with "; print_r($entrydhcp); echo "<br>"; - if ($result = ldap_mod_replace($ds,$hostDN,$entrydhcp)){ - update_dhcpmtime(array()); - $mesg = "Rechner erfolgreich in DHCP <b>".$dhcpcn." [Abt.: ".$dhcpau."]</b> angemeldet<br><br>"; - }else{ - $mesg = "Fehler beim ändern des DHCP Dienstes zu <b>".$dhcpcn."</b>!<br><br>"; - } - }else{ - if ( $hostmac != ""){ - if ( $hostip != "" ){ - $entrydhcp ['dhcpoptfixed-address'] = "ip"; - } - echo "DHCP add "; print_r($entrydhcp); echo "<br>"; - if ($result = ldap_mod_add($ds,$hostDN,$entrydhcp)){ - update_dhcpmtime(array()); - $mesg = "Rechner erfolgreich in DHCP <b>".$dhcpcn." [Abt.: ".$dhcpau."]</b> angemeldet<br><br>"; - }else{ - $mesg = "Fehler beim ändern des DHCP Dienstes zu <b>".$dhcpcn."</b>!<br><br>"; - } - }else{ - $mesg = "Es ist keine MAC Adresse für den Rechner eingetragen.<br> - Dies ist jedoch Voraussetzung für einen DHCP Eintrag.<br><br>"; - } - } - }else{ - $entrydhcp ['dhcphlpcont'] = array(); - if ( $oldfixedaddress != "" ){ - $entrydhcp ['dhcpoptfixed-address'] = array(); - } - #if ( $oldrbs != "" ){ - # $entrydhcp ['hlprbservice'] = array(); - #} - echo "DHCP delete "; echo "<br>"; - if ($result = ldap_mod_del($ds,$hostDN,$entrydhcp)){ - update_dhcpmtime(array()); - $mesg = "Rechner erfolgreich aus DHCP gelöscht<br><br>"; - }else{ - $mesg = "Fehler beim löschen aus DHCP Dienst!<br><br>"; - } - } - -} -if ($dhcp == "none"){ - echo " DHCP none <br>"; -} - - -############################# -# DHCP Option fixed-address - -if ($fixedaddress != "none" && $fixedaddress != $oldfixedaddress){ - if ($fixedaddress != ""){ - $entryfixadd ['dhcpoptfixed-address'] = $fixedaddress; - if ($oldfixedaddress != ""){ - echo "Fixed Address ändern"; echo "<br>"; - if ($result = ldap_mod_replace($ds,$hostDN,$entryfixadd)){ - update_dhcpmtime(array()); - $mesg = "Option Fixed-Address erfolgreich auf <b>".$fixedaddress."</b> geändert<br><br>"; - }else{ - $mesg = "Fehler beim ändern der Option Fixed-Address auf <b>".$fixedaddress."</b>!<br><br>"; - } - }else{ - echo "Fixed Address auf IP Adresse setzen"; echo "<br>"; - if ($result = ldap_mod_add($ds,$hostDN,$entryfixadd)){ - update_dhcpmtime(array()); - $mesg = "Option Fixed-Address erfolgreich auf <b>".$fixedaddress."</b> gesetzt<br><br>"; - }else{ - $mesg = "Fehler beim setzen der Option Fixed-Address auf <b>".$fixedaddress."</b>!<br><br>"; - } - } - }else{ - $entryfixadd ['dhcpoptfixed-address'] = array(); - echo "No Fixed Address"; echo "<br>"; - if ($result = ldap_mod_del($ds,$hostDN,$entryfixadd)){ - update_dhcpmtime(array()); - $mesg = "Option Fixed-Address erfolgreich gelöscht<br><br>"; - }else{ - $mesg = "Fehler beim löschen der Option Fixed-Address!<br><br>"; - } - } -} - -##################################### -# Restliche Attribute ... - -#if (count($atts) != 0){ - - $entryadd = array(); - $entrymod = array(); - $entrydel = array(); - - foreach (array_keys($atts) as $key){ - - if ( $oldatts[$key] == $atts[$key] ){ - - } - if ( $oldatts[$key] == "" && $atts[$key] != "" ){ - # hier noch Syntaxcheck - $entryadd[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] != "" && $oldatts[$key] != $atts[$key] ){ - # hier noch Syntaxcheck - $entrymod[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] == "" ){ - # hier noch Syntaxcheck - $entrydel[$key] = $oldatts[$key]; - } - } - - #print_r($entryadd); echo "<br>"; - #print_r($entrymod); echo "<br>"; - #print_r($entrydel); echo "<br>"; - - - if (count($entryadd) != 0 ){ - #print_r($entryadd); echo "<br>"; - #echo "neu anlegen<br>"; - foreach (array_keys($entryadd) as $key){ - $addatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_add($ds,$hostDN,$entryadd)){ - $mesg = "Attribute ".$addatts." erfolgreich eingetragen<br><br>"; - update_dhcpmtime(array()); - }else{ - $mesg = "Fehler beim eintragen der Attribute ".$addatts."<br><br>"; - } - } - - if (count($entrymod) != 0 ){ - #print_r($entrymod); echo "<br>"; - #echo "ändern<br>"; - foreach (array_keys($entrymod) as $key){ - $modatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_replace($ds,$hostDN,$entrymod)){ - $mesg = "Attribute ".$modatts." erfolgreich geaendert<br><br>"; - update_dhcpmtime(array()); - }else{ - $mesg = "Fehler beim aendern der Attribute ".$modatts."<br><br>"; - } - } - - if (count($entrydel) != 0 ){ - #print_r($entrydel); echo "<br>"; - #echo "löschen<br>"; - foreach (array_keys($entrydel) as $key){ - $delatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_del($ds,$hostDN,$entrydel)){ - $mesg = "Attribute ".$delatts." erfolgreich geloescht<br><br>"; - update_dhcpmtime(array()); - }else{ - $mesg = "Fehler beim loeschen der Attribute ".$delatts."<br><br>"; - } - } - -#} - -##################### - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/group.dwt b/ldap-site-mngmt/webinterface/computers/group.dwt deleted file mode 100644 index cda53f18..00000000 --- a/ldap-site-mngmt/webinterface/computers/group.dwt +++ /dev/null @@ -1,397 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Daten bearbeiten Gruppe <code class='font_object'>{GROUPCN}</code> </h3></td> - </tr> - <tr> - <td height='20'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='group_change.php' method='post'> - - <tr> - <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='55%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Eindeutiger Gruppenname (cn):</b><br>(Teil des dn, ohne Leerzeichen eingeben) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='groupcn' value='{GROUPCN}' size='40' class='medium_form_field'> - <input type='hidden' name='oldgroupcn' value='{GROUPCN}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Beschreibung: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='groupdesc' value='{GROUPDESC}' size='40' class='medium_form_field'> - <input type='hidden' name='oldgroupdesc' value='{GROUPDESC}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Gruppen-Rechner:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - - <b>Aktuelle Mitglieder</b> (zum Löschen bitte Häkchen setzen):<br> - <!-- BEGIN DYNAMIC BLOCK: Members --> - <input type='checkbox' name='delmember[]' value='{MEMBERDN}' size='40' class='medium_form_field'> {MEMBER}<br> - <!-- END DYNAMIC BLOCK: Members --> - <br> - - <b>Als neues Mitglied aufnehmen</b> (Mehrfachauswahl möglich)<br> - <select name='addmember[]' size='{HOSTNUMBER}' multiple class='medium_form_selectbox'> - <option selected value='none'>----------</option> - - <!-- BEGIN DYNAMIC BLOCK: Hosts --> - <option value='{HDN}_{HN}'>{HN}</option> - <!-- END DYNAMIC BLOCK: Hosts --> - - </select> - </td> - </tr> - - - <input type='hidden' name='groupdn' value='{GROUPDN}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - - </table></td> - </tr> - <tr> - <td><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - <tr> - <td height='40'></td> - </tr> - - <tr> - <td colspan='2'><h4>Gruppe - <code class='font_object'>{GROUPCN}</code> - löschen:</h4></td> - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'> - <form action='delete_confirm.php' method='post'> - - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - Die Rechnergruppe wird komplett gelöscht, <br>d.h. inklusive aller spezifisch für sie angelegten - Hardware-Profile (MachineConfig) und PXE Bootmenüs. - </tr> - - <input type='hidden' name='dn' value='{GROUPDN}'> - <input type='hidden' name='name' value='{GROUPCN}'> - <input type='hidden' name='delurl' value='group_delete.php'> - <input type='hidden' name='backurl' value='group.php?dn={GROUPDN}&sbmnr={SBMNR}'> - - - </table></td> - </tr> - <tr> - <td> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'> - </form></td> - </tr> - - - <tr> - <td height='50'></td> - </tr> - - <tr> - <td colspan='2'><h4>Wochen Übersicht Machine Configs Gruppe <code class='font_object'>{GROUPCN}</code> :</h4></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='0' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr align='center'> - <td width='9%' style='border-color: black; border-style: solid; border-width: 2 0 2 2;'><b>Uhrzeit</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Montag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Dienstag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Mittwoch</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Donnerstag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Freitag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Samstag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 2 2 1;'><b>Sonntag</b></td> - </tr> - <tr heigth='2' align='center'> - <td width='9%' style='border-color: black; border-style: solid; border-width: 0 0 0 2;'>0</td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G0}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G1}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>2</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G2}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G3}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>4</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G4}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G5}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>6</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G6}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G7}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>8</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G8}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G9}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>10</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G10}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G11}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>12</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G12}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G13}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>14</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G14}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G15}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>16</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G16}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G17}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>18</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G18}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G19}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>20</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G20}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G21}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>22</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G22}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{A23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{B23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{C23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{D23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{E23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{F23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 2 1;{G23}'> </td> - </tr> - - </table></td> - </tr> - - <tr> - <td height='10'></td> - </tr> - <tr> - <td colspan='2'><h4>Legende:</h4></td> - </tr> - <tr><td> - <table cellpadding='3' cellspacing='3' border='1' align='left' width='50%' style='border-width: 0 0 0 0;'> - <tr> - <td width='65%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Machine Config</b></td> - <td width='5%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Farbe</b></td> - </tr> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'>Keine Konfiguration </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 1 1 1;'> </td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: Legende --> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'>{DESCRIPTION} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 1 1 1;background-color:{COLOR};'> </td> - </tr> - <!-- END DYNAMIC BLOCK: Legende --> - - </table></td> - </tr> - - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/group.php b/ldap-site-mngmt/webinterface/computers/group.php deleted file mode 100644 index cfacd649..00000000 --- a/ldap-site-mngmt/webinterface/computers/group.php +++ /dev/null @@ -1,115 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "group.dwt"; - -include('computers_header.inc.php'); - -$mnr = 2; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$groupDN = $_GET['dn']; - -$group = get_node_data($groupDN,array("cn","description","member","dhcphlpcont")); - -$template->assign(array("GROUPDN" => $groupDN, - "GROUPCN" => $group['cn'], - "GROUPDESC" => $group['description'], - # "MEMBERS" => $anzahlmember, - "MEMBER" => $group['member'], - "DHCPCONT" => $group['dhcphlpcont'], - "AUDN" => $auDN, - "SBMNR" => $sbmnr)); - -$template->define_dynamic("Members", "Webseite"); - -if ( count($group['member']) == 1 ){ - $member = $group['member']; - $group = array(); - $group['member'][] = $member; -} - -if ( count($group['member']) != 0 ){ - sort($group['member']); - foreach ($group['member'] as $member){ - $exp = explode(',',$member); - $memberexp = explode('=',$exp[0]); - $membername = $memberexp[1]; - $template->assign(array("MEMBERDN" => $member, - "MEMBER" => $membername)); - $template->parse("MEMBERS_LIST", ".Members"); - } -} - -############################################## -# neues Member anlegen ... -$hosts_array = get_hosts($auDN,array("dn","hostname")); -# print_r($hosts_array); echo "<br><br>"; -$groups = get_groups($auDN, array("member")); -$template->assign(array("HN" => "")); - -foreach ($groups as $group){ - for ($i=0; $i < count($hosts_array); $i++){ - if (count($group['member']) > 1){ - foreach ($group['member'] as $item){ - if ($hosts_array[$i]['dn'] == $item){ - array_splice($hosts_array, $i, 1); - $i--; # da ja ein Member gelöscht wurde - } - } - } - if (count($group['member']) == 1){ - if ($hosts_array[$i]['dn'] == $group['member']){ - array_splice($hosts_array, $i, 1); - } - } - } -} -#print_r($hosts_array);echo"<br>"; - -$template->define_dynamic("Hosts", "Webseite"); -foreach ($hosts_array as $item){ - $template->assign(array("HDN" => $item['dn'], - "HN" => $item['hostname'], - "HOSTNUMBER" => 5)); - $template->parse("HOSTS_LIST", ".Hosts"); -} - - -########################################################## -# MC Wochenübersicht -$mc_array = get_machineconfigs($groupDN,array("dn","cn","timerange","description")); -# print_r($mc_array); -for ($i=0; $i<count($mc_array); $i++){ - # Timerange Komponenten - if (count($mc_array[$i]['timerange']) > 1 ){ - foreach ($mc_array[$i]['timerange'] as $tr){ - $exptime = array_merge(explode('_',$tr),$mc_array[$i]['description']); - $timeranges[$i][] = $exptime; # Für grafische Wo-Ansicht - } - }else{ - $exptime = array_merge(explode('_',$mc_array[$i]['timerange']), $mc_array[$i]['description']); - $timeranges[$i] = $exptime; # Für grafische Wo-Ansicht - } -} -include("mc_wochenplan.php"); - - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/group_add.php b/ldap-site-mngmt/webinterface/computers/group_add.php deleted file mode 100644 index dfc7fbe7..00000000 --- a/ldap-site-mngmt/webinterface/computers/group_add.php +++ /dev/null @@ -1,84 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$groupcn = $_POST['groupcn']; -$groupdesc = $_POST['groupdesc']; -$addmember = $_POST['addmember']; - -$groupcn = htmlentities($groupcn); -$groupdesc = htmlentities($groupdesc); - -/* -echo "AU dn:"; print_r($auDN); echo "<br>"; -echo "groupcn:"; print_r($groupcn); echo "<br>"; -echo "groupdesc:"; print_r($groupdesc); echo "<br>"; -echo "members to add:"; print_r($addmember); echo "<br>"; -*/ - -$seconds = 2; - -echo " -<html> -<head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $groupcn != ""){ - - # Formulareingaben anpassen - $expgr = explode(" ",$groupcn); - foreach ($expgr as $word){$expuc[] = ucfirst($word);} - $groupcn = implode(" ",$expuc); - $groupcn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $groupcn); - - # Host Objekt anlegen - $brothers = get_hosts($auDN,array("groupcn")); - $brother = 0; - foreach ($brothers as $item){ - if( $item['groupcn'] == $groupcn ){ - $mesg = "Es existiert bereits eine Gruppe mit dem eingegebenen Namen (CN)!<br> - Bitte geben Sie einen anderen Namen (CN) ein.<br><br>"; - $get_groupdesc = str_replace ( " ", "_", $groupdesc ); - $url = "new_group.php?groupcn=Hier_anderen_CN_eingeben&groupdesc=".$get_groupdesc; - $brother = 1; - break; - } - } - if ($brother == 0){ - $groupDN = "cn=".$groupcn.",cn=groups,".$auDN; - # print_r($groupDN); echo "<br>"; - - if (add_group($groupDN,$groupcn,$groupdesc,$addmember)){ - $mesg .= "<br>Neue Rechnergruppe erfolgreich angelegt<br>"; - } - else{ - $mesg .= "<br>Fehler beim anlegen der Rechnergruppe!<br>"; - } - - $url = 'groupoverview.php'; - } -} - - -elseif ( $groupcn == ""){ - - $get_groupdesc = str_replace ( " ", "_", $groupdesc ); - $mesg = "Sie haben den CN der neuen Gruppe nicht angegeben. Dieser ist aber ein notwendiges Attribut.<br> - Bitte geben Sie ihn an.<br><br>"; - $url = "new_group.php?ou=Hier_CN_eingeben&groupdesc=".$get_groupdesc; -} - - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/group_change.php b/ldap-site-mngmt/webinterface/computers/group_change.php deleted file mode 100644 index cb26a429..00000000 --- a/ldap-site-mngmt/webinterface/computers/group_change.php +++ /dev/null @@ -1,252 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$groupcn = $_POST['groupcn']; -$oldgroupcn = $_POST['oldgroupcn']; -$groupdesc = $_POST['groupdesc']; -$oldgroupdesc = $_POST['oldgroupdesc']; - -$delmember = $_POST['delmember']; - -$addmember = $_POST['addmember']; -$n = array_search('none',$addmember); -if ($n === 0 ){array_splice($addmember, $n, 1);} - -$groupDN = $_POST['groupdn']; -$sbmnr = $_POST['sbmnr']; - -$syntax = new Syntaxcheck; - -$groupcn = htmlentities($groupcn); -$oldgroupcn = htmlentities($oldgroupcn); -$groupdesc = htmlentities($groupdesc); -$oldgroupdesc = htmlentities($oldgroupdesc); - -/* -echo "new groupcn:"; print_r($groupcn); echo "<br>"; -echo "old groupcn:"; print_r($oldgroupcn); echo "<br>"; -echo "new groupdesc:"; print_r($groupdesc); echo "<br>"; -echo "old groupdesc:"; print_r($oldgroupdesc); echo "<br><br>"; - -echo "members to delete:"; print_r($delmember); echo "<br><br>"; -echo "members to add:"; print_r($addmember); echo "<br><br>"; - -echo "Group DN:"; print_r($groupDN); echo "<br>"; -echo "submenuNR:"; print_r($submenu); echo "<br><br>"; -*/ - -$seconds = 2; -$url = 'group.php?dn='.$groupDN.'&sbmnr='.$sbmnr; - -echo " -<html> -<head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -############################################## -# CN (DN) - -if ( $oldgroupcn == $groupcn ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( $oldgroupcn != "" && $groupcn != "" && $oldgroupcn != $groupcn ){ - echo "Gruppenname aendern<br>"; - # hier noch Syntaxcheck - # Formulareingaben anpassen - $expgr = explode(" ",$groupcn); - foreach ($expgr as $word){$expuc[] = ucfirst($word);} - $groupcn = implode(" ",$expuc); - $groupcn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $groupcn); - - - $newgroupDN = "cn=".$groupcn.",cn=groups,".$auDN; - print_r($newgroupDN); echo "<br><br>"; - - modify_group_dn($groupDN, $newgroupDN); - - # newsubmenu holen... - $url = 'group.php?dn='.$newgroupDN.'&sbmnr='.$sbmnr; -} - -if ( $oldgroupcn != "" && $groupcn == "" ){ - echo "Gruppenname loeschen!<br> - Dieses ist Teil des DN, Sie werden die Gruppe komplett löschen<br><br>"; - echo "Wollen Sie die Gruppe <b>".$oldgroupcn."</b>mit seinen Hardware-Profilen (MachineConfigs) - und PXE Bootmenüs wirklich löschen?<br><br> - <form action='group_delete.php' method='post'> - Falls ja:<br><br> - <input type='hidden' name='dn' value='".$groupDN."'> - <input type='hidden' name='name' value='".$oldgroupcn."'> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'><br><br> - </form> - <form action='".$url."' method='post'> - Falls, nein:<br><br> - <input type='Submit' name='apply' value='zurück' class='small_loginform_button'> - </form>"; - $seconds = 600; -} - - -######################################## -# Member löschen/aufnehmen - -if ( count($delmember) == 0 || count($addmember) == 0 ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( count($delmember) != 0 ){ - echo "Gruppen-Mitglieder löschen<br>"; - # hier noch Syntaxcheck - # print_r($delmember); echo "<br><br>"; - - $i = 0; - foreach ($delmember as $member){ - $entry['member'][$i] = $member; - $i++; - } - #print_r($entry); echo "<br><br>"; - - if ($result = ldap_mod_del($ds,$groupDN,$entry)){ - # Fehler hier muessen die verbliebenen Members hin!!! - # Filenames in PXEs die an der Gruppe hängen anpassen - $pxes = get_pxeconfigs($groupDN,array("dn")); - foreach ($pxes as $pxe){ - if ( $entry['member'] > 1 ){ - $j = 0; - foreach ($entry['member'] as $host){ - $macdata = get_node_data($host, array("hwaddress")); - $entryfilename ['filename'][$j] = "01-".$macdata['hwaddress']; - $j++; - } - } - if ( $entry['member'] == 1 ){ - $macdata = get_node_data($entry['member'], array("hwaddress")); - $entryfilename ['filename'] = "01-".$macdata['hwaddress']; - } - ldap_mod_del($ds,$pxe['dn'],$entryfilename); - } - $mesg = "Gruppen-Mitglieder erfolgreich gelöscht<br><br>"; - }else{ - $mesg = "Fehler beim löschen der Gruppen-Mitglieder<br><br>"; - } -} - -if ( count($addmember) != 0 ){ - - echo "Gruppen-Mitglieder anlegen<br>"; - # hier noch Syntaxcheck - $members = get_node_data($groupDN,array("member")); - if ( count($members['member']) == 1 ){ - $member = $members['member']; - $members = array(); - $members['member'][] = $member; - } - if (count($members['member']) != 0){ - foreach ($members['member'] as $member){ - $entry2['member'][] = $member; - } - } - $i = 0; - foreach ($addmember as $member){ - $exp = explode('_',$member); - # Falls ein neues Mitglied keine MAC hat und an der Gruppe PXEs hängen - # dann wird diese nicht aufgenommen ... - $macdata = get_node_data($exp[0], array("hwaddress")); - $pxes = get_pxeconfigs($groupDN,array("dn","filename")); - if ( count($pxes) != 0 && $macdata['hwaddress'] == "" ){ - echo "Rechner ".$exp[1]." hat keine MAC Adresse eingetragen. <br> - Fü die Gruppe sind PXE Bootmenüs definiert. <br> - Da MACs für die PXE Datei notwendig ist wird der Rechner nicht aufgenommen!"; - } - else{ - $entry2['member'][] = $exp[0]; - } - $i++; - - } - - #print_r($entry2); echo "<br><br>"; - - if ($result = ldap_mod_replace($ds, $groupDN, $entry2)){ - - # PXEs die an der Gruppe hängen anpassen - $pxes = get_pxeconfigs($groupDN,array("dn")); - foreach ($pxes as $pxe){ - if ( $entry2['member'] > 1 ){ - $j = 0; - foreach ($entry2['member'] as $host){ - $macdata = get_node_data($host, array("hwaddress")); - $entryfilename ['filename'][$j] = "01-".$macdata['hwaddress']; - $j++; - } - } - if ( $entry2['member'] == 1 ){ - $macdata = get_node_data($entry2['member'], array("hwaddress")); - $entryfilename ['filename'] = "01-".$macdata['hwaddress']; - } - ldap_mod_replace($ds,$pxe['dn'],$entryfilename); - } - $mesg = "Gruppen-Mitglieder erfolgreich angelegt<br><br>"; - }else{ - $mesg = "Fehler beim anlegen der Gruppen-Mitglieder<br><br>"; - } -} - - -##################################### -# Description - -if ( $oldgroupdesc == $groupdesc ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( $oldgroupdesc == "" && $groupdesc != "" ){ - echo "Gruppen-Beschreibung neu anlegen<br>"; - # hier noch Syntaxcheck - $entry['description'] = $groupdesc; - if($result = ldap_mod_add($ds,$groupDN,$entry)){ - $mesg = "Gruppen-Beschreibung erfolgreich eingetragen<br><br>"; - }else{ - $mesg = "Fehler beim eintragen der Gruppen-Beschreibung<br><br>"; - } -} - -if ( $oldgroupdesc != "" && $groupdesc != "" && $oldgroupdesc != $groupdesc ){ - echo "Gruppen-Beschreibung aendern<br>"; - # hier noch Syntaxcheck - $entry['description'] = $groupdesc; - if($result = ldap_mod_replace($ds,$groupDN,$entry)){ - $mesg = "Gruppen-Beschreibung erfolgreich geaendert<br><br>"; - }else{ - $mesg = "Fehler beim aendern der Gruppen-Beschreibung<br><br>"; - } -} - -if ( $oldgroupdesc != "" && $groupdesc == "" ){ - echo "Gruppen-Beschreibung loeschen<br>"; - # hier noch Syntaxcheck - $entry['description'] = $oldgroupdesc; - if($result = ldap_mod_del($ds,$groupDN,$entry)){ - $mesg = "Gruppen-Beschreibung erfolgreich geloescht<br><br>"; - }else{ - $mesg = "Fehler beim loeschen der Gruppen-Beschreibung<br><br>"; - } -} - - - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/group_delete.php b/ldap-site-mngmt/webinterface/computers/group_delete.php deleted file mode 100644 index 2a7e3d29..00000000 --- a/ldap-site-mngmt/webinterface/computers/group_delete.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$groupDN = $_POST['dn']; -$groupcn = $_POST['name']; -$groupDN = htmlentities($groupDN); -$groupcn = htmlentities($groupcn); - -/* -echo "AU dn:"; print_r($auDN); echo "<br>"; -echo "groupdn:"; print_r($groupDN); echo "<br>"; -echo "groupcn:"; print_r($groupcn); echo "<br>"; -*/ - -$seconds = 1; -$url = 'groupoverview.php'; - -echo " -<html> -<head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $groupDN != ""){ - - if ( delete_group($groupDN) ){ - $mesg = "Rechnergruppe <b>".$groupcn."</b> erfolgreich gelöscht!<br><br>"; - } - else{ - $mesg = "Fehler beim löschen der Rechnergruppe <b>".$groupcn."</b> !<br><br>"; - } - -} - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/groupoverview.dwt b/ldap-site-mngmt/webinterface/computers/groupoverview.dwt deleted file mode 100644 index d875c3be..00000000 --- a/ldap-site-mngmt/webinterface/computers/groupoverview.dwt +++ /dev/null @@ -1,38 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Rechnergruppen <code class='font_object'>{AU}</code> </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr> - <td width='20%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Rechnergruppe</b></td> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Anzahl Rechner</b></td> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>DHCP</b></td> - </tr> - - - - <!-- BEGIN DYNAMIC BLOCK: Gruppen --> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{GROUPCN} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{MEMBERS} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{DHCPCONT} </td> - </tr> - <!-- END DYNAMIC BLOCK: Gruppen --> - - </table></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td> - Zum Verwalten einer bestimmten Gruppe, wählen Sie links entsprechenden Submenü-Eintrag.<br> - - </td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/groupoverview.php b/ldap-site-mngmt/webinterface/computers/groupoverview.php deleted file mode 100644 index d14b9d0f..00000000 --- a/ldap-site-mngmt/webinterface/computers/groupoverview.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "groupoverview.dwt"; -include('computers_header.inc.php'); - -$mnr = 2; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$template->assign(array("DN" => "", - "GROUPCN" => "Noch keine Rechnergruppen angelegt", - "GROUPDESC" => "", - "MEMBERS" => "", - "DHCPCONT" => "")); - -$attributes = array("dn","cn","member","description","dhcphlpcont"); -$group_array = get_groups($auDN,$attributes); - -$template->define_dynamic("Gruppen", "Webseite"); - -foreach ($group_array as $group){ - - $groupname = "<a href='group.php?dn=".$group['dn']."&sbmnr=".$i."' class='headerlink'>".$group['cn']."</a>"; - $anzahlmember = count($group['member']); - - if ( count($group['dhcphlpcont']) != 0 ){ - $subnetCN = explode('cn=',$group['dhcphlpcont']); - $subnet = explode(',', $subnetCN[1]); - $dhcpcont = "Subnet $subnet[0]"; - }else{$dhcpcont = "";} - - $template->assign(array("DN" => $group['dn'], - "GROUPCN" => $groupname, - "GROUPDESC" => $group['description'], - "MEMBERS" => $anzahlmember, - # "MEMBER" => $group['member'], - "DHCPCONT" => $dhcpcont, - "AUDN" => $auDN )); - $template->parse("GRUPPEN_LIST", ".Gruppen"); -} - - - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/host.dwt b/ldap-site-mngmt/webinterface/computers/host.dwt deleted file mode 100644 index 4b3780a2..00000000 --- a/ldap-site-mngmt/webinterface/computers/host.dwt +++ /dev/null @@ -1,126 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - - <tr> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 1;'><h4><code class='font_object'>Allgemein</code></h4></td> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{DHCPLINK} DHCP </a></h4></td> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{RBSLINK} RBS/PXE </a></h4></td> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{HWLINK} Geo/Hardware </a></h4></td> - <td> </td> - </tr> - <tr> - <td height='20'></td> - </tr> - - <tr> - <td colspan='5'><h3>Administration Rechner <code class='font_object'> {HOSTNAME} </code> </h3></td> - </tr> - - <tr><td colspan='5'> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='host_change.php' method='post'> - - <tr> - <td width='45%' class='tab_h'><b>Attribut</b></td> - <td width='55%' class='tab_h'><b>Wert</b></td> - </tr> - - <tr height='50'> - <td class='tab_d'><b>Eindeutiger Rechnername (hostname):</b><br>(Teil des dn, ohne Leerzeichen eingeben) </td> - <td class='tab_d'> - <input type='Text' name='hostname' value='{HOSTNAME}' size='40' class='medium_form_field'> - <input type='hidden' name='oldhostname' value='{HOSTNAME}'> - </td> - </tr> - <tr height='50'> - <td class='tab_d'><b>Rechner Beschreibung: </td> - <td class='tab_d'> - <input type='Text' name='desc' value='{DESCRIPTION}' size='40' class='medium_form_field'> - <input type='hidden' name='olddesc' value='{DESCRIPTION}'> - - </td> - </tr> - <tr height='50'> - <td class='tab_d'><b>MAC Adresse:</b> </td> - <td class='tab_d'> - <input type='Text' name='mac' value='{HWADDRESS}' size='17' maxlength='17' class='medium_form_field'> - <input type='hidden' name='oldmac' value='{HWADDRESS}'> - (Format hex:hex:hex:hex:hex:hex) - </td> - </tr> - <tr height='50'> - <td class='tab_d'><b>IP Adresse:</b> </td> - <td class='tab_d'> - <input type='Text' name='ip' value='{IPADDRESS}' size='15' maxlength='15' class='medium_form_field'> - <input type='hidden' name='oldip' value='{IPADDRESS}'> - (Format xx.xx.xx.xx) - </td> - </tr> - - <input type='hidden' name='dhcphlpcont' value='{DHCPCONT}'> - <input type='hidden' name='dhcptype' value='{DHCPTYPE}'> - <input type='hidden' name='fixadd' value='{FIXADD}'> - <input type='hidden' name='hostdn' value='{HOSTDN}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - - </table></td> - </tr> - <tr> - <td colspan='4'><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - <!--<tr> - <td height='40'></td> - </tr> - - <tr> - <td colspan='4'><h4>Rechner <code class='font_object'>{HOSTNAME}</code> kopieren:</h4> - Geben Sie bitte den eindeutigen, noch nicht verwendeten Namen des neuen Rechnerobjekts an.</td> - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'> - <form action='host_copy.php' method='post'> - - </table></td> - </tr><tr><td> - <input type='Submit' name='apply' value='kopieren' class='small_loginform_button'> - </form></td></tr> - - <tr>--> - - <tr> - <td height='50'></td> - </tr> - - <tr> - <td colspan='4'><h4>Rechner <code class='font_object'>{HOSTNAME}</code> löschen:</h4></td> - </tr> - <tr> - <td colspan='4'> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'> - <form action='delete_confirm.php' method='post'> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - Der Rechner wird komplett gelöscht, <br>d.h. inklusive aller spezifisch für ihn angelegten - Hardware-Profile (MachineConfig) und PXE Bootmenüs. - </tr> - - <input type='hidden' name='dn' value='{HOSTDN}'> - <input type='hidden' name='name' value='{HOSTNAME}'> - <input type='hidden' name='dhcphlpcont' value='{DHCPCONT}'> - <input type='hidden' name='delurl' value='host_delete.php'> - <input type='hidden' name='backurl' value='host.php?dn={HOSTDN}&sbmnr={SBMNR}'> - - </table></td> - </tr> - <tr> - <td> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'> - </form></td> - </tr> - - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/host.php b/ldap-site-mngmt/webinterface/computers/host.php deleted file mode 100644 index 454847bb..00000000 --- a/ldap-site-mngmt/webinterface/computers/host.php +++ /dev/null @@ -1,92 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "host.dwt"; - -include('computers_header.inc.php'); - -$mnr = 0; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$hostDN = $_GET['dn']; - -$attributes = array("hostname","domainname","ipaddress","hwaddress","description","dhcphlpcont","dhcpoptfixed-address", - "hw-mouse","hw-graphic","hw-monitor"); -$host = get_node_data($hostDN,$attributes); -$hostip = explode('_',$host['ipaddress']); - -# dhcp Typ -if ($host['dhcphlpcont'] == ""){ - $dhcptype = "nodhcp"; -}else{ - $ocarray = get_node_data($host['dhcphlpcont'],array("objectclass")); - $subnet = array_search('dhcpSubnet', $ocarray['objectclass']); - if ($subnet !== false ){ - $dhcptype = "subnet"; - } - $service = array_search('dhcpService', $ocarray['objectclass']); - if ($service !== false ){ - $dhcptype = "service"; - } -} -#print_r($dhcptype); - -$template->assign(array("HOSTDN" => $hostDN, - "HOSTNAME" => $host['hostname'], - "DOMAINNAME" => $host['domainname'], - "HWADDRESS" => $host['hwaddress'], - "IPADDRESS" => $hostip[0], - "DESCRIPTION" => $host['description'], - "DHCPCONT" => $host['dhcphlpcont'], - "DHCPTYPE" => $dhcptype, - "FIXADD" => $host['dhcpoptfixed-address'] , - "MOUSE" => $host['hw-mouse'], - "GRAPHIC" => $host['hw-graphic'], - "MONITOR" => $host['hw-monitor'], - "DHCPLINK" => "<a href='dhcphost.php?dn=".$hostDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "RBSLINK" => "<a href='rbshost.php?dn=".$hostDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "HWLINK" => "<a href='hwhost.php?dn=".$hostDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "AUDN" => $auDN, - "SBMNR" => $sbmnr)); - - -########################################################## -# MC Wochenübersicht -$mc_array = get_machineconfigs($hostDN,array("dn","cn","timerange","description")); -# print_r($mc_array); -for ($i=0; $i<count($mc_array); $i++){ - # Timerange Komponenten - if (count($mc_array[$i]['timerange']) > 1 ){ - foreach ($mc_array[$i]['timerange'] as $tr){ - $exptime = array_merge(explode('_',$tr),$mc_array[$i]['description']); - $timeranges[$i][] = $exptime; # Für grafische Wo-Ansicht - } - }else{ - $exptime = array_merge(explode('_',$mc_array[$i]['timerange']), $mc_array[$i]['description']); - $timeranges[$i] = $exptime; # Für grafische Wo-Ansicht - } -} -include("mc_wochenplan.php"); - -########################################################### -# PXE Wochenübersicht - - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/host_add.php b/ldap-site-mngmt/webinterface/computers/host_add.php deleted file mode 100644 index 0f01fe75..00000000 --- a/ldap-site-mngmt/webinterface/computers/host_add.php +++ /dev/null @@ -1,103 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$hostname = $_POST['hostname']; -$hostdesc = $_POST['hostdesc']; -$mac = $_POST['mac']; -$ip = $_POST['ip']; -$dhcp = $_POST['dhcpcont']; - -$hostname = htmlentities($hostname); -$hostdesc = htmlentities($hostdesc); -$mac = htmlentities($mac); -$mac = strtolower($mac); -$ip = htmlentities($ip); - -/* -echo "AU dn:"; print_r($auDN); echo "<br>"; -echo "hostname:"; print_r($hostname); echo "<br>"; -echo "hostdesc:"; print_r($hostdesc); echo "<br>"; -echo "mac:"; print_r($mac); echo "<br>"; -echo "ip:"; print_r($ip); echo "<br><br>"; -*/ - -$attribs = $_POST['attribs']; -if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - $atts[$key] = htmlentities($attribs[$key]); - } -} - -$seconds = 2; - -echo " -<html> -<head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $hostname != ""){ - - # Formulareingaben anpassen - $exphn = explode(" ",$hostname); - foreach ($exphn as $word){$expuc[] = ucfirst($word);} - $hostname = implode(" ",$expuc); - $hostname = preg_replace ( '/\s+([0-9A-Z])/', '$1', $hostname); - - # Host Objekt anlegen - $brothers = get_hosts($auDN,array("hostname")); - $brother = 0; - foreach ($brothers as $item){ - if( $item['hostname'] == $hostname ){ - $mesg = "Es existiert bereits ein Rechner mit dem eingegebenen HOSTNAME!<br> - Bitte geben Sie einen anderen HOSTNAME ein.<br><br>"; - $get_hostdesc = str_replace ( " ", "_", $hostdesc ); - $get_mac = str_replace ( " ", "_", $mac ); - $get_ip = str_replace ( " ", "_", $ip ); - $url = "new_host.php?hostname=Hier_anderen_HOSTNAME_eingeben&hostdesc=".$get_hostdesc."&mac=".$get_mac."&ip=".$ip; - $brother = 1; - break; - } - } - if ($brother == 0){ - $hostDN = "HostName=".$hostname.",cn=computers,".$auDN; - # print_r($hostDN); echo "<br>"; - - if (add_host($hostDN,$hostname,$hostdesc,$mac,$ip,$atts,$dhcp)){ - $mesg .= "<br>Neuer Rechner erfolgreich angelegt<br>"; - } - else{ - $mesg .= "<br>Fehler beim anlegen des Rechners!<br>"; - } - - # DHCP - - $url = 'hostoverview.php'; - } -} - - -elseif ( $hostname == ""){ - - $get_hostdesc = str_replace ( " ", "_", $hostdesc ); - $get_mac = str_replace ( " ", "_", $mac ); - $get_ip = str_replace ( " ", "_", $ip ); - $mesg = "Sie haben den HOSTNAME des neuen Rechners nicht angegeben. Dieser ist aber ein notwendiges Attribut.<br> - Bitte geben Sie ihn an.<br><br>"; - $url = "new_host.php?ou=Hier_HOSTNAME_eingeben&hostdesc=".$get_hostdesc."&mac=".$get_mac."&ip=".$ip; -} - - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/host_change.php b/ldap-site-mngmt/webinterface/computers/host_change.php deleted file mode 100644 index 63e64f8a..00000000 --- a/ldap-site-mngmt/webinterface/computers/host_change.php +++ /dev/null @@ -1,427 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$hostname = $_POST['hostname']; -$oldhostname = $_POST['oldhostname']; -$mac = $_POST['mac']; -$oldmac = $_POST['oldmac']; -$ip = $_POST['ip']; -$oldip = $_POST['oldip']; -$desc = $_POST['desc']; -$olddesc = $_POST['olddesc']; - -$dhcphlpcont = $_POST['dhcphlpcont']; -$dhcptype = $_POST['dhcptype']; -$fixadd = $_POST['fixadd']; -$hostDN = $_POST['hostdn']; -$sbmnr = $_POST['sbmnr']; - -$syntax = new Syntaxcheck; - -$hostname = htmlentities($hostname); -$oldhostname = htmlentities($oldhostname); -$mac = htmlentities($mac); -$mac = strtolower($mac); -$oldmac = htmlentities($oldmac); -$ip = htmlentities($ip); -$oldip = htmlentities($oldip); -$desc = htmlentities($desc); -$olddesc = htmlentities($olddesc); - -/* -# sonstige Attribute -$attribs = $_POST['attribs']; -if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - $atts[$key] = htmlentities($attribs[$key]); - } -} -#print_r($atts); echo "<br><br>"; -$oldattribs = $_POST['oldattribs']; -if (count($oldattribs) != 0){ - foreach (array_keys($oldattribs) as $key){ - $oldatts[$key] = htmlentities($oldattribs[$key]); - } -}*/ -#print_r($oldatts); echo "<br><br>"; - -/* -echo "new hostname:"; print_r($hostname); echo "<br>"; -echo "old hostname:"; print_r($oldhostname); echo "<br>"; -echo "new mac:"; print_r($mac); echo "<br>"; -echo "old mac:"; print_r($oldmac); echo "<br>"; -echo "new ip:"; print_r($ip); echo "<br>"; -echo "old ip:"; print_r($oldip); echo "<br>"; -echo "new desc:"; print_r($desc); echo "<br>"; -echo "old desc:"; print_r($olddesc); echo "<br><br>"; -echo "Host DN:"; print_r($hostDN); echo "<br>"; -echo "submenuNR:"; print_r($submenu); echo "<br><br>"; -*/ - -$seconds = 2; -$url = 'host.php?dn='.$hostDN.'&sbmnr='.$sbmnr; - -echo " -<html> -<head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -############################################## -# Hostname - -if ( $oldhostname == $hostname ){ - $mesg = "keine Aenderung<br>"; -} - -if ( $oldhostname != "" && $hostname != "" && $oldhostname != $hostname ){ - echo "Hostname ändern<br><br>"; - # Check ob Host schon existiert in AU/Domain - $brothers = get_hosts($auDN,array("hostname"),""); - if ( check_hostname($hostname) ){ - $url = "hostoverview.php"; - $mesg = "Es existiert bereits ein Rechner mit dem Namen $hostname!<br><br> - Bitte geben Sie einen anderen Namen ein, oder löschen - Sie zunächst den gleichnamigen Rechner.<br><br> - <a href=".$url." style='publink'><< Übersicht Rechner</a>"; - redirect(4, $url, $mesg, $addSessionId = TRUE); - die; - }else{ - # Formulareingaben anpassen - $exphn = explode(" ",$hostname); - foreach ($exphn as $word){$expuc[] = ucfirst($word);} - $hostname = implode(" ",$expuc); - $hostname = preg_replace ( '/\s+([0-9A-Z])/', '$1', $hostname); - - $newhostDN = "hostname=".$hostname.",cn=computers,".$auDN; - # print_r($newhostDN); echo "<br><br>"; - modify_host_dn($hostDN, $newhostDN); - $hostDN = $newhostDN; - - # newsubmenu holen...hosts neu holen, sortieren, ->position - #$newhosts = get_hosts($auDN,array("dn")); - #print_r($newhosts); echo "<br><br>"; - #foreach ($newhosts as $item){ - # $newdnarray [] = $item['dn']; - #} - #$key = array_search($newhostDN, $newdnarray); - #print_r($key); echo "<br>"; - - $url = 'host.php?dn='.$newhostDN.'&sbmnr='.$sbmnr; - } -} - -if ( $oldhostname != "" && $hostname == "" ){ - echo "Hostname löschen!<br>>br> - Dies ist Teil des DN, Sie werden den Rechner komplett löschen<br><br>"; - echo "Wollen Sie den Rechner <b>".$oldhostname."</b> mit seinen Hardware-Profilen (MachineConfigs) - und PXE Bootmenüs wirklich löschen?<br><br> - <form action='host_delete.php' method='post'> - Falls ja:<br><br> - <input type='hidden' name='dn' value='".$hostDN."'> - <input type='hidden' name='name' value='".$oldhostname."'> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'><br><br> - </form> - <form action='".$url."' method='post'> - Falls, nein:<br><br> - <input type='Submit' name='apply' value='zurück' class='small_loginform_button'> - </form>"; - $seconds = 600; -} - - - -##################################### -# MAC - -if ( $oldmac == $mac ){ - #$mesg = "keine Aenderung<br>"; -} - -if ( $oldmac == "" && $mac != "" ){ - echo "MAC neu anlegen<br>"; - # hier noch Syntaxcheck - if( $syntax->check_mac_syntax($mac) ){ - $entry['hwaddress'] = $mac; - $result = ldap_mod_add($ds,$hostDN,$entry); - if($result){ - $mesg = "MAC erfolgreich eingetragen<br><br>"; - }else{ - $mesg = "Fehler beim eintragen der MAC<br><br>"; - } - }else{ - echo "Falsche MAC Syntax<br><br>"; - } -} - -if ( $oldmac != "" && $mac != "" && $oldmac != $mac ){ - echo "MAC aendern<br>"; - # hier noch Syntaxcheck - if( $syntax->check_mac_syntax($mac) ){ - $entry['hwaddress'] = $mac; - $pxemac = str_replace (":","-",$mac); - $pxeoldmac = str_replace (":","-",$oldmac); - $result = ldap_mod_replace($ds,$hostDN,$entry); - if($result){ - # in den PXEs auch ändern - $pxes = get_pxeconfigs($hostDN,array("dn","filename")); - if ( count($pxes) != 0 ){ - foreach ($pxes as $pxe){ - $entrynewmac ['filename'] = "01-".$pxemac; - ldap_mod_replace($ds,$pxe['dn'],$entrynewmac); - } - } - # und in Gruppen PXEs - $groups = get_groups_member($auDN,array("dn"),$hostDN); - if ( count($groups) != 0 ){ - $pxes = get_pxeconfigs($groups[0]['dn'],array("dn","filename")); - if ( count($pxes) != 0 ){ - foreach ($pxes as $pxe){ - if (count($pxe['filename']) > 1){ - for ($i=0; $i<count($pxe['filename']); $i++){ - if ($pxe['filename'][$i] == $pxeoldmac){ - $entrynewmac ['filename'][$i] = "01-".$pxemac; - }else{ - $entrynewmac ['filename'][$i] = $pxe['filename'][$i]; - } - } - } - if (count($pxe['filename']) == 1 && $pxe['filename'][$i] == $pxeoldmac){ - $entrynewmac ['filename'] = "01-".$pxemac; - } - ldap_mod_replace($ds,$pxe['dn'],$entrynewmac); - } - } - } - $mesg = "MAC erfolgreich geaendert<br><br> - Falls Rechner-Konfiguration via File, <b>Client-Conf</b> Dateiname in untergeordneten <br> - PXEs bitte auch ändern"; - }else{ - $mesg = "Fehler beim aendern der MAC<br><br>"; - } - }else{ - echo "Falsche MAC Syntax<br><br>"; - } -} - -if ( $oldmac != "" && $mac == "" ){ - echo "MAC loeschen<br>"; - # check ob PXEs am Rechnerobjekt hängen - $pxes = get_pxeconfigs($hostDN,array("dn","filename")); - $groups = get_groups_member($auDN,array("dn"),$hostDN); - if ( count($groups) != 0 ){ - $pxes2 = get_pxeconfigs($groups[0]['dn'],array("dn","filename")); - } - if ( count($pxes) != 0 || count($pxes2) != 0){ - echo "Für den Rechner sind PXE Bootmenüs angelegt welche die MAC Adresse als <br> - Dateinamen verwenden. Sie köennen die MAC erst löschen, wenn Sie diese PXEs <br> - entfernt haben.<br><br> - MAC nicht gelöscht!"; - } - else{ - $entry['hwaddress'] = $oldmac; - $dhcptext = ""; - if ($dhcphlpcont != ""){ - $entry['dhcphlpcont'] = array(); - $dhcptext = "Da die MAC-Adresse Voruassetzung für den - Eintrag DHCP Dienst ist, wurde der Client dort ausgetragen.<br>"; - } - $result = ldap_mod_del($ds,$hostDN,$entry); - if($result){ - $mesg = "MAC erfolgreich geloescht.<br>$dhcptext<br>"; - }else{ - $mesg = "Fehler beim loeschen der MAC<br><br>"; - } - } -} - - -######################################## -# IP - -if ( $oldip == $ip ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( $oldip == "" && $ip != "" ){ - echo "IP neu anlegen<br>"; - # hier noch Syntaxcheck - if( $syntax->check_ip_syntax($ip) ){ - $newip_array = array($ip,$ip); - $newip = implode('_',$newip_array); - # print_r($newip); echo "<br><br>"; - if (new_ip_host($newip,$hostDN,$auDN)){ - $mesg = "IP erfolgreich eingetragen<br><br>"; - #if ($dhcptype == "subnet"){ - # adjust_hostip_dhcpsubnet($ip,$hostDN,$dhcphlpcont); - #} - }else{ - $mesg = "Fehler beim eintragen der IP<br><br>"; - } - } - else{echo "Falsche IP Syntax<br><br>";} -} - -if ( $oldip != "" && $ip != "" && $oldip != $ip ){ - echo "IP aendern<br>"; - # hier noch Syntaxcheck - if( $syntax->check_ip_syntax($ip) ){ - $newip_array = array($ip,$ip); - $newip = implode('_',$newip_array); - # print_r($newip); echo "<br><br>"; - $oldip_array = array($oldip,$oldip); - $oldipp = implode('_',$oldip_array); - if (modify_ip_host($newip,$hostDN,$auDN,$fixadd)){ - $mesg = "IP erfolgreich geaendert<br><br>"; - if ($dhcptype == "subnet"){ - adjust_hostip_dhcpsubnet($ip,$hostDN,$dhcphlpcont); - } - adjust_hostip_tftpserverip($oldip,$ip); - }else{ - $mesg = "Fehler beim aendern der IP<br><br>"; - # oldip die schon gelöscht wurde wieder einfügen - new_ip_host($oldipp,$hostDN,$auDN); - } - } - else{echo "Falsche IP Syntax<br><br>";} -} - -if ( $oldip != "" && $ip == "" ){ - echo "IP loeschen<br>"; - - if(delete_ip_host($hostDN,$auDN)){ - $mesg = "IP erfolgreich geloescht<br><br>"; - adjust_hostip_tftpserverip($oldip,""); - }else{ - $mesg = "Fehler beim loeschen der IP<br><br>"; - } -} - - -##################################### -# Description - -if ( $olddesc == $desc ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( $olddesc == "" && $desc != "" ){ - echo "Rechner-Beschreibung neu anlegen<br>"; - # hier noch Syntaxcheck - $entry['description'] = $desc; - $result = ldap_mod_add($ds,$hostDN,$entry); - if($result){ - $mesg = "Rechner-Beschreibung erfolgreich eingetragen<br><br>"; - }else{ - $mesg = "Fehler beim eintragen der Rechner-Beschreibung<br><br>"; - } -} - -if ( $olddesc != "" && $desc != "" && $olddesc != $desc ){ - echo "Rechner-Beschreibung aendern<br>"; - # hier noch Syntaxcheck - $entry['description'] = $desc; - $result = ldap_mod_replace($ds,$hostDN,$entry); - if($result){ - $mesg = "Rechner-Beschreibung erfolgreich geaendert<br><br>"; - }else{ - $mesg = "Fehler beim aendern der Rechner-Beschreibung<br><br>"; - } -} - -if ( $olddesc != "" && $desc == "" ){ - echo "Rechner-Beschreibung loeschen<br>"; - # hier noch Syntaxcheck - $entry['description'] = $olddesc; - $result = ldap_mod_del($ds,$hostDN,$entry); - if($result){ - $mesg = "Rechner-Beschreibung erfolgreich geloescht<br><br>"; - }else{ - $mesg = "Fehler beim loeschen der Rechner-Beschreibung<br><br>"; - } -} - -#################################### -# restliche Attribute -/* -$entryadd = array(); -$entrymod = array(); -$entrydel = array(); - -foreach (array_keys($atts) as $key){ - - if ( $oldatts[$key] == $atts[$key] ){ - #$mesg = "keine Aenderung<br>"; - } - if ( $oldatts[$key] == "" && $atts[$key] != "" ){ - # hier noch Syntaxcheck - $entryadd[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] != "" && $oldatts[$key] != $atts[$key] ){ - # hier noch Syntaxcheck - $entrymod[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] == "" ){ - # hier noch Syntaxcheck - $entrydel[$key] = $oldatts[$key]; - } -} -#print_r($entryadd); echo "<br>"; -#print_r($entrymod); echo "<br>"; -#print_r($entrydel); echo "<br>"; - -if (count($entryadd) != 0 ){ - #print_r($entryadd); echo "<br>"; - #echo "neu anlegen<br>"; - foreach (array_keys($entryadd) as $key){ - $addatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_add($ds,$hostDN,$entryadd)){ - $mesg = "Attribute ".$addatts." erfolgreich eingetragen<br><br>"; - }else{ - $mesg = "Fehler beim eintragen der Attribute ".$addatts."<br><br>"; - } -} - -if (count($entrymod) != 0 ){ - #print_r($entrymod); echo "<br>"; - #echo "ändern<br>"; - foreach (array_keys($entrymod) as $key){ - $modatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_replace($ds,$hostDN,$entrymod)){ - $mesg = "Attribute ".$modatts." erfolgreich geaendert<br><br>"; - }else{ - $mesg = "Fehler beim aendern der Attribute ".$modatts."<br><br>"; - } -} - -if (count($entrydel) != 0 ){ - #print_r($entrydel); echo "<br>"; - #echo "löschen<br>"; - foreach (array_keys($entrydel) as $key){ - $delatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_del($ds,$hostDN,$entrydel)){ - $mesg = "Attribute ".$delatts." erfolgreich geloescht<br><br>"; - }else{ - $mesg = "Fehler beim loeschen der Attribute ".$delatts."<br><br>"; - } -} - -*/ -if ( $dhcphlpcont != "" ){ - update_dhcpmtime(array()); -} - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/host_delete.php b/ldap-site-mngmt/webinterface/computers/host_delete.php deleted file mode 100644 index 4d7a935b..00000000 --- a/ldap-site-mngmt/webinterface/computers/host_delete.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$hostDN = $_POST['dn']; -$hostname = $_POST['name']; -$dhcphlpcont = $_POST['dhcphlpcont']; -$hostDN = htmlentities($hostDN); -$hostname = htmlentities($hostname); - -/* -echo "AU dn:"; print_r($auDN); echo "<br>"; -echo "hostdn:"; print_r($hostDN); echo "<br>"; -echo "hostname:"; print_r($hostname); echo "<br>"; -*/ - -$seconds = 1; -$url = 'hostoverview.php'; - -echo " -<html> -<head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $hostDN != ""){ - - if ( delete_host($hostDN) ){ - if ( $dhcphlpcont != "" ){ - update_dhcpmtime(array()); - } - $mesg = "Rechner <b>".$hostname."</b> erfolgreich gelöscht!<br><br>"; - } - else{ - $mesg = "Fehler beim löschen von Rechner <b>".$hostname."</b> !<br><br>"; - } - -} - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/hostoverview.dwt b/ldap-site-mngmt/webinterface/computers/hostoverview.dwt deleted file mode 100644 index 2771ff76..00000000 --- a/ldap-site-mngmt/webinterface/computers/hostoverview.dwt +++ /dev/null @@ -1,40 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td width='80%'> - <h3>Rechner <code class='font_object'>{AU}</code> </h3> - Übersicht der in <b>AU {AU}</b> angelegten <b>Rechnerobjekte</b> und Informationen zu diesen:<br> - Rechnername, IP/MAC Adresse, Status und Art der Einbindung in die zentralen Dienste DHCP / PXE-Remote-Boot (RBS) und eine Beschreibung.<br><br> - Zur <b>Verwaltungsmaske</b> eines bestimmten Rechners gelangen Sie durch klicken auf entsprechenden Rechnernamen.<br> - Die <b>Eingabemaske</b> für einen <b>neuen Rechner</b> erreichen Sie über den Menüpunkt links: "Neuen Rechner anlegen". - </td> - <td> </td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td colspan='2'> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr> - <td width='17%' class='tab_h'><b><a href='hostoverview.php?sort=hostname' class='headerlink'>Rechnername</a></b></td> - <td width='13%' class='tab_h'><b><a href='hostoverview.php?sort=ipaddress' class='headerlink'>IP Adresse</a></b></td> - <td width='17%' class='tab_h'><b>MAC Adresse</b></td> - <td width='9%' class='tab_h'><b>DHCP</b></td> - <td width='16%' class='tab_h'><b>RBS</b></td> - <td width='29%' class='tab_h'><b>Beschreibung des Rechners</b></td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: Rechner --> - <tr valign='top' height='45'> - <td class='tab_d'><b>{HOSTNAME}</b> </td> - <td class='tab_d'>{IPADDRESS} </td> - <td class='tab_d'>{HWADDRESS} </td> - <td class='tab_d'>{FIXADD} </td> - <td class='tab_d'>{RBSCONT} </td> - <td class='tab_d'>{DESC} </td> - </tr> - <!-- END DYNAMIC BLOCK: Rechner --> - - </table></td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/hostoverview.php b/ldap-site-mngmt/webinterface/computers/hostoverview.php deleted file mode 100644 index b1728002..00000000 --- a/ldap-site-mngmt/webinterface/computers/hostoverview.php +++ /dev/null @@ -1,102 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "hostoverview.dwt"; - -include('computers_header.inc.php'); - -$mnr = 0; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$sort = "hostname"; -$sort = $_GET['sort']; - -$template->assign(array("DN" => "", - "HOSTNAME" => "Noch keine Rechner angelegt", - "DOMAINNAME" => "", - "HWADDRESS" => "", - "IPADDRESS" => "", - "DHCPCONT" => "", - "FIXADD" => "", - "DESC" => "", - "RBSCONT" => "")); - -$attributes = array("dn","hostname","domainname","hwaddress","ipaddress","description","dhcphlpcont","dhcpoptfixed-address","hlprbservice","dhcpoptnext-server"); -$host_array = get_hosts($auDN,$attributes,$sort); -#print_r($host_array); - -if ($sort == "ipaddress"){ - $host_array = array_natsort($host_array, "ipaddress", "ipaddress"); -} - -$template->define_dynamic("Rechner", "Webseite"); - -$i = 0; -foreach ($host_array as $host){ - - $hostname = "<a href='host.php?dn=".$host['dn']."&sbmnr=".$i."' class='headerlink'>".$host['hostname']."</a>"; - $hostip = explode('_',$host['ipaddress']); - - $dhcpcont = ""; - $dhcpfixadd = "-"; - if ( count($host['dhcphlpcont']) != 0 ){ - $dhcpexpdn = ldap_explode_dn($host['dhcphlpcont'],1); - $dhcpcn = $dhcpexpdn[0]; - #$ocarray = get_node_data($host['dhcphlpcont'],array("objectclass","dhcphlpcont")); - #$sub = array_search('dhcpSubnet', $ocarray['objectclass']); - #if ($sub !== false ){ - # $dhcpcont = "Subnet ".$dhcpexpdn[0]." <br>[".$dhcpexpdn[2]."]"; - #}else{ - $dhcpcont = $dhcpexpdn[0]." <br>[".$dhcpexpdn[2]."]"; - #} - $dhcpfixadd = "dyn"; - if ( $host['dhcpoptfixed-address'] == "ip" ){ - $dhcpfixadd = "fix"; - } - if ( $host['dhcpoptfixed-address'] == "hostname" ){ - $dhcpfixadd = "fix (DNS)"; - } - } - - - $rbscont = "-"; - $dhcpnxtsrv = ""; - if ( count($host['hlprbservice']) != 0 ){ - $rbsexpdn = ldap_explode_dn($host['hlprbservice'],1); - $dhcpnxtsrv = $host['dhcpoptnext-server']; - $rbscont = $rbsexpdn[0]." <br>[".$dhcpnxtsrv."]"; - - - } - - $template->assign(array("DN" => $host['dn'], - "HOSTNAME" => $hostname, - "DOMAINNAME" => $host['domainname'], - "HWADDRESS" => $host['hwaddress'], - "IPADDRESS" => $hostip[0], - "DHCPCONT" => $dhcpcont, - "FIXADD" => $dhcpfixadd, - "RBSCONT" => $rbscont, - "DESC" => $host['description'], - "AUDN" => $auDN )); - $template->parse("RECHNER_LIST", ".Rechner"); - - $i++; -} - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/hwhost.dwt b/ldap-site-mngmt/webinterface/computers/hwhost.dwt deleted file mode 100644 index 48c2cd1c..00000000 --- a/ldap-site-mngmt/webinterface/computers/hwhost.dwt +++ /dev/null @@ -1,74 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - - <tr> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 1;'><h4>{HOSTLINK} Allgemein </a></h4></td> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{DHCPLINK} DHCP </a></h4></td> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{RBSLINK} RBS/PXE </a></h4></td> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4><code class='font_object'>Geo/Hardware</code></h4></td> - <td> </td> - </tr> - <tr> - <td height='20'></td> - </tr> - <tr> - <td colspan='5'><h3>Geo / Hardware Optionen - Rechner <code class='font_object'> {HOSTNAME} </code> </h3></td> - </tr> - - <tr><td colspan='5'> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='hwhost_change.php' method='post'> - - <tr> - <td width='35%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='65%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Geographic Location </b> (Gebäude, Raum, ...) <b>:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[geolocation]' value='{GEOLOC}' size='50' class='medium_form_field'> - <input type='hidden' name='oldattribs[geolocation]' value='{GEOLOC}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Geo Coordinates: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[geoattribut]' value='{GEOATT}' size='50' class='medium_form_field'> - <input type='hidden' name='oldattribs[geoattribut]' value='{GEOATT}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>HW Mouse: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[hw-mouse]' value='{MOUSE}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[hw-mouse]' value='{MOUSE}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>HW Graphic: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[hw-graphic]' value='{GRAPHIC}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[hw-graphic]' value='{GRAPHIC}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>HW Monitor: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[hw-monitor]' value='{MONITOR}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[hw-monitor]' value='{MONITOR}'> - </td> - </tr> - - <input type='hidden' name='hostdn' value='{HOSTDN}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - - </table></td> - </tr> - <tr> - <td colspan='4'><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/hwhost.php b/ldap-site-mngmt/webinterface/computers/hwhost.php deleted file mode 100644 index e0b1f7f8..00000000 --- a/ldap-site-mngmt/webinterface/computers/hwhost.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "hwhost.dwt"; - -include('computers_header.inc.php'); - -$mnr = 0; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$hostDN = $_GET['dn']; - -$attributes = array("hostname","domainname","ipaddress","hwaddress","description","dhcphlpcont", - "hw-mouse","hw-graphic","hw-monitor","geolocation","geoattribut"); -$host = get_node_data($hostDN,$attributes); -$hostip = explode('_',$host['ipaddress']); - -$template->assign(array("HOSTDN" => $hostDN, - "HOSTNAME" => $host['hostname'], - "DOMAINNAME" => $host['domainname'], - "HWADDRESS" => $host['hwaddress'], - "IPADDRESS" => $hostip[0], - "DESCRIPTION" => $host['description'], - "DHCPCONT" => $host['dhcphlpcont'], - "GEOLOC" => $host['geolocation'], - "GEOATT" => $host['geoattribut'], - "MOUSE" => $host['hw-mouse'], - "GRAPHIC" => $host['hw-graphic'], - "MONITOR" => $host['hw-monitor'], - "DHCPLINK" => "<a href='dhcphost.php?dn=".$hostDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "HOSTLINK" => "<a href='host.php?dn=".$hostDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "RBSLINK" => "<a href='rbshost.php?dn=".$hostDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "AUDN" => $auDN, - "SBMNR" => $sbmnr)); - - -########################################################## -# MC Wochenübersicht -$mc_array = get_machineconfigs($hostDN,array("dn","cn","timerange","description")); -# print_r($mc_array); -for ($i=0; $i<count($mc_array); $i++){ - # Timerange Komponenten - if (count($mc_array[$i]['timerange']) > 1 ){ - foreach ($mc_array[$i]['timerange'] as $tr){ - $exptime = array_merge(explode('_',$tr),$mc_array[$i]['description']); - $timeranges[$i][] = $exptime; # Für grafische Wo-Ansicht - } - }else{ - $exptime = array_merge(explode('_',$mc_array[$i]['timerange']), $mc_array[$i]['description']); - $timeranges[$i] = $exptime; # Für grafische Wo-Ansicht - } -} -include("mc_wochenplan.php"); - -########################################################### -# PXE Wochenübersicht - - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/hwhost_change.php b/ldap-site-mngmt/webinterface/computers/hwhost_change.php deleted file mode 100644 index 83ab270d..00000000 --- a/ldap-site-mngmt/webinterface/computers/hwhost_change.php +++ /dev/null @@ -1,116 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$syntax = new Syntaxcheck; - -$hostDN = $_POST['hostdn']; -$sbmnr = $_POST['sbmnr']; - -# sonstige Attribute -$attribs = $_POST['attribs']; -if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - $atts[$key] = htmlentities($attribs[$key]); - } -} -#print_r($atts); echo "<br><br>"; -$oldattribs = $_POST['oldattribs']; -if (count($oldattribs) != 0){ - foreach (array_keys($oldattribs) as $key){ - $oldatts[$key] = htmlentities($oldattribs[$key]); - } -} -#print_r($oldatts); echo "<br><br>"; - - -$seconds = 2; -$url = 'hwhost.php?dn='.$hostDN.'&sbmnr='.$sbmnr; - -echo " -<html> -<head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -#################################### -# restliche Attribute - -$entryadd = array(); -$entrymod = array(); -$entrydel = array(); - -foreach (array_keys($atts) as $key){ - - if ( $oldatts[$key] == $atts[$key] ){ - #$mesg = "keine Aenderung<br>"; - } - if ( $oldatts[$key] == "" && $atts[$key] != "" ){ - # hier noch Syntaxcheck - $entryadd[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] != "" && $oldatts[$key] != $atts[$key] ){ - # hier noch Syntaxcheck - $entrymod[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] == "" ){ - # hier noch Syntaxcheck - $entrydel[$key] = $oldatts[$key]; - } -} -#print_r($entryadd); echo "<br>"; -#print_r($entrymod); echo "<br>"; -#print_r($entrydel); echo "<br>"; - -if (count($entryadd) != 0 ){ - #print_r($entryadd); echo "<br>"; - #echo "neu anlegen<br>"; - foreach (array_keys($entryadd) as $key){ - $addatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_add($ds,$hostDN,$entryadd)){ - $mesg = "Attribute ".$addatts." erfolgreich eingetragen<br><br>"; - }else{ - $mesg = "Fehler beim eintragen der Attribute ".$addatts."<br><br>"; - } -} - -if (count($entrymod) != 0 ){ - #print_r($entrymod); echo "<br>"; - #echo "ändern<br>"; - foreach (array_keys($entrymod) as $key){ - $modatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_replace($ds,$hostDN,$entrymod)){ - $mesg = "Attribute ".$modatts." erfolgreich geaendert<br><br>"; - }else{ - $mesg = "Fehler beim aendern der Attribute ".$modatts."<br><br>"; - } -} - -if (count($entrydel) != 0 ){ - #print_r($entrydel); echo "<br>"; - #echo "löschen<br>"; - foreach (array_keys($entrydel) as $key){ - $delatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_del($ds,$hostDN,$entrydel)){ - $mesg = "Attribute ".$delatts." erfolgreich geloescht<br><br>"; - }else{ - $mesg = "Fehler beim loeschen der Attribute ".$delatts."<br><br>"; - } -} - -#update_dhcpmtime(array()); - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/ip_rechner.dwt b/ldap-site-mngmt/webinterface/computers/ip_rechner.dwt deleted file mode 100644 index 88d67316..00000000 --- a/ldap-site-mngmt/webinterface/computers/ip_rechner.dwt +++ /dev/null @@ -1,40 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Folgende IP Adressen haben Sie an Rechner vergeben: </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b><a href='ip_rechner.php?sort=hostname' class='headerlink'>Rechner Name</a></b></td> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b><a href='ip_rechner.php?sort=ipaddress' class='headerlink'>IP Adresse</a></b></td> - <td width='50%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>DHCP</b></td> - </tr> - - <form action='ip_rechner_change.php' method='post'> - - <!-- BEGIN DYNAMIC BLOCK: Hosts --> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{HOSTNAME} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='newip[]' value='{IP}' size='15' class='medium_form_field'></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> {DHCPCONT} </td> - </tr> - <input type='hidden' name='oldip[]' value='{OLDIP}'> - <input type='hidden' name='hostdn[]' value='{HOSTDN}'> - <input type='hidden' name='fixadd[]' value='{FIXADD}'> - <input type='hidden' name='audn[]' value='{AUDN}'> - - <!-- END DYNAMIC BLOCK: Hosts --> - - </table></td> - </tr> - <tr> - <td> - <input type='Submit' name='apply' value='anwenden' class='small_loginform_button'></form> - </td> - </tr> -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/ip_rechner.php b/ldap-site-mngmt/webinterface/computers/ip_rechner.php deleted file mode 100644 index fcc04883..00000000 --- a/ldap-site-mngmt/webinterface/computers/ip_rechner.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# 3. Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "ip_rechner.dwt"; - -include('computers_header.inc.php'); - -############################################################################# - -$mnr = 1; -$sbmnr = -1; -$mcnr = -1; - -# Menuleiste erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -############################################################################# - -$sort = "hostname"; -$sort = $_GET['sort']; - -$template->assign(array("IP" => "", - "OLDIP" => "", - "DHCPCONT" => "", - "FIXADD" => "", - "HOSTNAME" => "Noch keine Rechner angelegt", - "HOSTDN" => "")); - -$host_array = get_hosts($auDN,array("dn","hostname","ipaddress","dhcphlpcont","dhcpoptfixed-address"),$sort); -# print_r ($host_array); - -if ($sort == "ipaddress"){ - $host_array = array_natsort($host_array, "ipaddress", "ipaddress"); -} - -$template->define_dynamic("Hosts", "Webseite"); - -foreach ($host_array as $host){ - $hostip = explode('_',$host['ipaddress']); - - $dhcpcont = ""; - $fixadd = ""; - if ( count($host['dhcphlpcont']) != 0 ){ #&& $host['ipaddress'] == "" ){ - $dhcpcont = " dynamisch"; - #$fixadd = $host['dhcpoptfixed-address']; - #}elseif( count($host['dhcphlpcont']) != 0 && $host['ipaddress'] != "" ){ - if ( $host['dhcpoptfixed-address'] == "ip") { - $dhcpcont = " fix"; - #$fixadd = $host['dhcpoptfixed-address']; - } - if ( $host['dhcpoptfixed-address'] == "hostname") { - $dhcpcont = " fix (über DNS Name)"; - #$fixadd = $host['dhcpoptfixed-address']; - } - $fixadd = $host['dhcpoptfixed-address']; - } - - $template->assign(array("IP" => $hostip[0], - "OLDIP" => $hostip[0], - "DHCPCONT" => $dhcpcont, - "FIXADD" => $fixadd, - "HOSTNAME" => $host['hostname'], - "HOSTDN" => $host['dn'], - "AUDN" => $auDN )); - $template->parse("HOSTS_LIST", ".Hosts"); -} - - -##################################################################################### - -include("computers_footer.inc.php"); - -?> diff --git a/ldap-site-mngmt/webinterface/computers/ip_rechner_change.php b/ldap-site-mngmt/webinterface/computers/ip_rechner_change.php deleted file mode 100644 index 4db8bed0..00000000 --- a/ldap-site-mngmt/webinterface/computers/ip_rechner_change.php +++ /dev/null @@ -1,122 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -$hostDN = $_POST['hostdn']; -$oldip = $_POST['oldip']; -$newip = $_POST['newip']; -$fixadd = $_POST['fixadd']; - -$syntax = new Syntaxcheck; -$url = "ip_rechner.php"; - -echo " -<html> -<head> - <title>IP Address Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - - -$diff1 = array_keys(array_diff_assoc($oldip,$newip)); -$diff2 = array_keys(array_diff_assoc($newip,$oldip)); -$tochange = array_unique(array_merge($diff1,$diff2)); - -foreach ($tochange as $i){ - - if ( $oldip[$i] == "" && $newip[$i] != "" ){ - echo "neue IP";echo "<br>";echo "<br>"; - echo "<br>"; - echo "alte IP: ";print_r($oldip[$i]);echo "<br>"; - echo "neue IP: ";print_r($newip[$i]);echo "<br>"; - - if ($syntax->check_ip_syntax($newip[$i])){ - echo "korrekte IP Syntax"; - $newip[$i] = htmlentities($newip[$i]); - $newip_array = array($newip[$i],$newip[$i]); - #print_r($newip_array); - $newipp = implode('_',$newip_array); - #print_r($newipp); - $oldip[$i] = htmlentities($oldip[$i]); - if (new_ip_host($newipp,$hostDN[$i],$auDN)){ - $mesg = "Neue IP Adresse eingetragen<br>"; - # falls Rechner in DHCP -> fixed-address auf IP Setzen... - # und update_dhcpmtime(array()); - }else{$mesg = "Fehler beim eintragen der neuen IP Adresse<br>";} - }else{echo "falsche IP Syntax";} - - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='ip_rechner.php' style='publink'>back</a>"; - redirect(4, $url, $mesg, $addSessionId = TRUE); - } - - elseif ( $oldip[$i] != "" && $newip[$i] != "" ){ - echo "aendern IP";echo "<br>";echo "<br>"; - echo "<br>"; - echo "alte IP: ";print_r($oldip[$i]);echo "<br>"; - echo "neue IP: ";print_r($newip[$i]);echo "<br>"; - - if ($syntax->check_ip_syntax($newip[$i])){ - echo "korrekte IP Syntax"; - $newip[$i] = htmlentities($newip[$i]); - $newip_array = array($newip[$i],$newip[$i]); - #print_r($newip_array); - $newipp = implode('_',$newip_array); - #print_r($newipp); - $oldip[$i] = htmlentities($oldip[$i]); - $oldip_array = array($oldip[$i],$oldip[$i]); - $oldipp = implode('_',$oldip_array); - if (modify_ip_host($newipp,$hostDN[$i],$auDN,$fixadd[$i])){ - $mesg = "IP Adresse geaendert<br>"; - adjust_hostip_tftpserverip($oldip[$i],$newip[$i]); - # Falls Rechner in DHCP - update_dhcpmtime(array()); - }else{ - $mesg = "Fehler beim aendern der IP Adresse<br>"; - # oldip die schon gelöscht wurde wieder einfügen - new_ip_host($oldipp,$hostDN[$i],$auDN);} - }else{echo "falsche IP Syntax";} - - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='ip_rechner.php' style='publink'>back</a>"; - redirect(4, $url, $mesg, $addSessionId = TRUE); - } - - elseif ( $oldip[$i] != "" && $newip[$i] == "" ){ - echo "loeschen IP";echo "<br>";echo "<br>"; - echo "<br>"; - echo "alte IP: ";print_r($oldip[$i]);echo "<br>"; - echo "neue IP: ";print_r($newip[$i]);echo "<br>"; - - echo "korrekte IP Syntax"; - $newip[$i] = htmlentities($newip[$i]); - $oldip[$i] = htmlentities($oldip[$i]); - if (delete_ip_host($hostDN[$i],$auDN)){ - $mesg = "IP Adresse geloescht<br>"; - adjust_hostip_tftpserverip($oldip[$i],""); - # falls Rechner in DHCP -> fixed-address auf dynamic/Hostname setzen - update_dhcpmtime(array()); - }else{$mesg = "Fehler beim loeschen der IP Adresse<br>";} - - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='ip_rechner.php' style='publink'>back</a>"; - redirect(4, $url, $mesg, $addSessionId = TRUE); - } - - else{ - $mesg = "keine Aenderung<br>"; - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='ip_rechner.php' style='publink'>back</a>"; - redirect(3, $url, $mesg, $addSessionId = TRUE); - } - -} - -echo " -</td></tr></table> -</head> -</html>"; -?> diff --git a/ldap-site-mngmt/webinterface/computers/machineconfig_default.dwt b/ldap-site-mngmt/webinterface/computers/machineconfig_default.dwt deleted file mode 100644 index 3596a0ce..00000000 --- a/ldap-site-mngmt/webinterface/computers/machineconfig_default.dwt +++ /dev/null @@ -1,323 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Default MachineConfigs (Konfigurationen) <code class='font_object'> {AU} </code> </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr> - <td width='40%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Machine Config</b></td> - <td width='60%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Gültigkeitsdauer (Time Range)</b></td> - </tr> - - - - <!-- BEGIN DYNAMIC BLOCK: Machineconf --> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{MCDESC} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{TRANGES} </td> - </tr> - <!-- END DYNAMIC BLOCK: Machineconf --> - - </table></td> - </tr> - <tr> - <td height='50'></td> - </tr> - - <tr> - <td colspan='2'><h4>Wochen Übersicht:</h4></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='0' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr align='center'> - <td width='9%' style='border-color: black; border-style: solid; border-width: 2 0 2 2;'><b>Uhrzeit</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Montag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Dienstag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Mittwoch</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Donnerstag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Freitag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Samstag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 2 2 1;'><b>Sonntag</b></td> - </tr> - <tr heigth='2' align='center'> - <td width='9%' style='border-color: black; border-style: solid; border-width: 0 0 0 2;'>0</td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G0}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G1}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>2</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G2}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G3}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>4</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G4}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G5}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>6</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G6}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G7}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>8</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G8}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G9}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>10</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G10}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G11}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>12</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G12}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G13}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>14</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G14}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G15}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>16</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G16}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G17}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>18</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G18}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G19}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>20</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G20}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G21}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>22</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G22}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{A23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{B23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{C23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{D23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{E23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{F23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 2 1;{G23}'> </td> - </tr> - - </table></td> - </tr> - - <tr> - <td height='10'></td> - </tr> - <tr> - <td colspan='2'><h4>Legende:</h4></td> - </tr> - <tr><td> - <table cellpadding='3' cellspacing='3' border='1' align='left' width='50%' style='border-width: 0 0 0 0;'> - <tr> - <td width='65%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Machine Config</b></td> - <td width='5%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Farbe</b></td> - </tr> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'>Keine Konfiguration </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 1 1 1;'> </td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: Legende --> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'>{MCDESC} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 1 1 1;background-color:{COLOR};'> </td> - </tr> - <!-- END DYNAMIC BLOCK: Legende --> - - </table></td> - </tr> - -</table> diff --git a/ldap-site-mngmt/webinterface/computers/machineconfig_default.php b/ldap-site-mngmt/webinterface/computers/machineconfig_default.php deleted file mode 100644 index ff52ced8..00000000 --- a/ldap-site-mngmt/webinterface/computers/machineconfig_default.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "machineconfig_default.dwt"; - -include('computers_header.inc.php'); - -$mnr = 3; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$template->assign(array("MCDN" => "", - "MCCN" => "Noch keine Default MachineConfig angelegt", - "TRANGES" => "", - "MCDESC" => "Noch keine Default MachineConfig angelegt")); - - -$mc_array = get_machineconfigs("cn=computers,".$auDN,array("dn","cn","timerange","description")); -# print_r($mc_array); - - -$template->define_dynamic("Machineconf", "Webseite"); - -for ($i=0; $i<count($mc_array); $i++){ - # Timerange Komponenten - $trange = ""; - if (count($mc_array[$i]['timerange']) > 1 ){ - foreach ($mc_array[$i]['timerange'] as $tr){ - $exptime = array_merge(explode('_',$tr),$mc_array[$i]['description']); - $timeranges[$i][] = $exptime; # Für grafische Wo-Ansicht - if ($exptime[0] == "X"){$exptime[0]="täglich";} - # if ($exptime[1] == "X" && $exptime[2] == "X"){$exptime[1] = ""; $exptime[2]= "";} - $trange .= $exptime[0].", von ".$exptime[1].":00 bis ".$exptime[2].":59 / "; - } - }else{ - $exptime = array_merge(explode('_',$mc_array[$i]['timerange']), $mc_array[$i]['description']); - $timeranges[$i] = $exptime; # Für grafische Wo-Ansicht - if ($exptime[0] == "X"){$exptime[0]="täglich";} - # if ($exptime[1] == "X" && $exptime[2] == "X"){$exptime[1] = ""; $exptime[2]= "";} - $trange .= $exptime[0].", von ".$exptime[1].":00 bis ".$exptime[2].":59"; - } - - $template->assign(array("MCDN" => $mc_array[$i]['dn'], - "MCCN" => $mc_array[$i]['cn'], - "TRANGES" => $trange, - "MCDESC" => $mc_array[$i]['description'], - "AUDN" => $auDN)); - $template->parse("MACHINECONF_LIST", ".Machineconf"); -} - -#get_entry_number($mc_array[3]['dn'],"machineconfig"); - -include("mc_wochenplan.php"); - - -################################################################################### - -include("computers_footer.inc.php"); - -?> diff --git a/ldap-site-mngmt/webinterface/computers/mc_wochenplan.php b/ldap-site-mngmt/webinterface/computers/mc_wochenplan.php deleted file mode 100644 index 3df7ab82..00000000 --- a/ldap-site-mngmt/webinterface/computers/mc_wochenplan.php +++ /dev/null @@ -1,154 +0,0 @@ -<?php - -##################################### -# Wochenübersicht - -$template->assign(array("A0" => "","B0" => "","C0" => "","D0" => "","E0" => "","F0" => "","G0" => "", - "A1" => "","B1" => "","C1" => "","D1" => "","E1" => "","F1" => "","G1" => "", - "A2" => "","B2" => "","C2" => "","D2" => "","E2" => "","F2" => "","G2" => "", - "A3" => "","B3" => "","C3" => "","D3" => "","E3" => "","F3" => "","G3" => "", - "A4" => "","B4" => "","C4" => "","D4" => "","E4" => "","F4" => "","G4" => "", - "A5" => "","B5" => "","C5" => "","D5" => "","E5" => "","F5" => "","G5" => "", - "A6" => "","B6" => "","C6" => "","D6" => "","E6" => "","F6" => "","G6" => "", - "A7" => "","B7" => "","C7" => "","D7" => "","E7" => "","F7" => "","G7" => "", - "A8" => "","B8" => "","C8" => "","D8" => "","E8" => "","F8" => "","G8" => "", - "A9" => "","B9" => "","C9" => "","D9" => "","E9" => "","F9" => "","G9" => "", - "A10" => "","B10" => "","C10" => "","D10" => "","E10" => "","F10" => "","G10" => "", - "A11" => "","B11" => "","C11" => "","D11" => "","E11" => "","F11" => "","G11" => "", - "A12" => "","B12" => "","C12" => "","D12" => "","E12" => "","F12" => "","G12" => "", - "A13" => "","B13" => "","C13" => "","D13" => "","E13" => "","F13" => "","G13" => "", - "A14" => "","B14" => "","C14" => "","D14" => "","E14" => "","F14" => "","G14" => "", - "A15" => "","B15" => "","C15" => "","D15" => "","E15" => "","F15" => "","G15" => "", - "A16" => "","B16" => "","C16" => "","D16" => "","E16" => "","F16" => "","G16" => "", - "A17" => "","B17" => "","C17" => "","D17" => "","E17" => "","F17" => "","G17" => "", - "A18" => "","B18" => "","C18" => "","D18" => "","E18" => "","F18" => "","G18" => "", - "A19" => "","B19" => "","C19" => "","D19" => "","E19" => "","F19" => "","G19" => "", - "A20" => "","B20" => "","C20" => "","D20" => "","E20" => "","F20" => "","G20" => "", - "A21" => "","B21" => "","C21" => "","D21" => "","E21" => "","F21" => "","G21" => "", - "A22" => "","B22" => "","C22" => "","D22" => "","E22" => "","F22" => "","G22" => "", - "A23" => "","B23" => "","C23" => "","D23" => "","E23" => "","F23" => "","G23" => "")); - -#print_r($timeranges); echo "<br>"; - -# vom spezifischsten zum unspezifischsten : -# FR_0_7 -> FR_X_X -> X_0_7 -> X_X_X -$daytime = array(); -$timex = array(); -$dayx = array(); -$allx = array(); -$legend = array(); -if(count($timeranges) != 0){ -foreach ($timeranges as $tr){ - if (count($tr[0]) > 1){ - foreach ($tr as $item){ - if ($item[0] != "X" && $item[1] != "X" && $item[2] != "X" && ($item[0] == "MO" || $item[0] == "DI" || $item[0] == "MI" || $item[0] == "DO" || $item[0] == "FR" || $item[0] == "SA" || $item[0] == "SO")){ - $daytime[] = $item; - } - if ($item[0] != "X" && $item[1] == "X" && $item[2] == "X"){ - $timex[] = $item; - } - if ($item[0] == "X" && $item[1] != "X" && $item[2] != "X"){ - $dayx[] = $item; - } - if ($item[0] == "X" && $item[1] == "X" && $item[2] == "X"){ - $allx[] = $item; - } - } - }else{ - if ($tr[0] != "X" && $tr[1] != "X" && $tr[2] != "X" && ($tr[0] == "MO" || $tr[0] == "DI" || $tr[0] == "MI" || $tr[0] == "DO" || $tr[0] == "FR" || $tr[0] == "SA" || $tr[0] == "SO")){ - $daytime[] = $tr; - } - if ($tr[0] != "X" && $tr[1] == "X" && $tr[2] == "X"){ - $timex[] = $tr; - } - if ($tr[0] == "X" && $tr[1] != "X" && $tr[2] != "X"){ - $dayx[] = $tr; - } - if ($tr[0] == "X" && $tr[1] == "X" && $tr[2] == "X"){ - $allx[] = $tr; - } - } -} - -#print_r($daytime); echo "<br>"; -#print_r($timex); echo "<br>"; -#print_r($dayx); echo "<br>"; -#print_r($allx); echo "<br>"; - -$daycode = array("MO" => "A", "DI" => "B", "MI" => "C", "DO" => "D", "FR" => "E", "SA" => "F", "SO" => "G"); -$allxcolors = array("#BEBEBE","A0A0A0","#696969","#EEDFCC","#D8BFD8","#505050"); -$dayxcolors = array("#483D8B","#7B68EE","#191970","#8470FF","#708090","#6A5ACD"); -$timexcolors = array("#CDC673","#A2CD5A","#BDB76B","#8B864E","#6B8E23","#CDBE70"); -$daytimecolors = array("880000","#CD6839","#CC3300","#CC6600","#993300","#8B4C39"); - - -if (count($allx) != 0){ - $c = 0; - foreach ($allx as $range){ - foreach ($daycode as $dc){ - for ($i = 0; $i <= 23; $i++){ - $template->assign(array($dc.$i => "background-color:".$allxcolors[$c].";")); - } - } - $legend[] = array($range ,$allxcolors[$c]); - $c++; - } -} - -if (count($dayx) != 0){ - $c = 0; - foreach ($dayx as $range){ - foreach ($daycode as $dc){ - for ($i = $range[1]; $i<= $range[2]; $i++){ - $template->assign(array($dc.$i => "background-color:".$dayxcolors[$c].";")); - } - } - $legend[] = array($range ,$dayxcolors[$c]); - $c++; - } -} - -if (count($timex) != 0){ - $c = 0; - foreach ($timex as $range){ - $dc = $daycode[$range[0]]; - for ($i = 0; $i<= 23; $i++){ - $template->assign(array($dc.$i => "background-color:".$timexcolors[$c].";")); - } - $legend[] = array($range ,$timexcolors[$c]); - $c++; - } -} - -if (count($daytime) != 0){ - $c = 0; - foreach ($daytime as $range){ - $dc = $daycode[$range[0]]; - for ($i = $range[1]; $i<= $range[2]; $i++){ - $template->assign(array($dc.$i => "background-color:".$daytimecolors[$c].";")); - } - $legend[] = array($range ,$daytimecolors[$c]); - $c++; - } -} - -} - -$template->assign(array("MCDESC" => "")); -#print_r($legend); -if (count($legend) != 0){ - $template->define_dynamic("Legende", "Webseite"); - foreach ($legend as $item){ - # Timerange Komponente - $color = $item[1]; - $template->assign(array("TR1" => $item[0][0], - "TR2" => $item[0][1], - "TR3" => $item[0][2], - "MCDESC" => $item[0][3], - "COLOR" => $color)); - $template->parse("LEGENDE_LIST", ".Legende"); - } -} - - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/mcdef.dwt b/ldap-site-mngmt/webinterface/computers/mcdef.dwt deleted file mode 100644 index 15f48548..00000000 --- a/ldap-site-mngmt/webinterface/computers/mcdef.dwt +++ /dev/null @@ -1,293 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>MachineConfig <code class='font_object'> {MCCN} </code> </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td colspan='2'><h4>Allgemein:</h4></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='mcdef_change.php' method='post'> - - <tr> - <td width='25%' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'><b>Eindeutiger Name (cn):</b><br>(Bitte ohne Leerzeichen eingeben) </td> - <td width='5%' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'> </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'> - <font size='+2'><b>MC_</b></font><input type='Text' name='mccn' value='{MCCN}' size='50' class='medium_form_field'> - <input type='hidden' name='oldmccn' value='{MCCN}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Machine Config <br>Beschreibung: </td> - <td width='5%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcdesc' value='{MCDESC}' size='60' class='medium_form_field'> - <input type='hidden' name='oldmcdesc' value='{MCDESC}'> - - </td> - </tr> - - - <tr valign='top'> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Gültigkeitsdauer <br>(Time Range(s)): </b> </td> - <td width='5%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> - <td width='35%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - Eines der folgenden:<br> - - - <b>Datum</b> (dd.mm, z.B. 21.03/01.11) <br> - - <b>Monatstag</b> (dd, z.B. 01 oder 25) <br> - - <b>Wochentag</b> (MO, DI, ... , SO) <br> - - <b>X</b> für <b>täglich</b> - - <td width='35%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - - <b>Uhrzeit</b> (Format: hh, z.B. 07-19)<br> - - <b>X</b> für rund um die Uhr - - </td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: TRanges --> - <tr valign='top'> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'>Zum Löschen einer Time Range<br>Häkchen setzen </td> - <td width='5%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - <input type='checkbox' name='deltr[]' value='{MCDAY}_{MCBEG}_{MCEND}'> - </td> - <td width='35%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - <input type='Text' name='mcday[]' value='{MCDAY}' size='5' maxlength='5' class='medium_form_field'> - <input type='hidden' name='oldmcday[]' value='{MCDAY}'> <br> - - - <td width='35%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - <input type='Text' name='mcbeg[]' value='{MCBEG}' size='2' maxlength='2' class='medium_form_field'> - <input type='hidden' name='oldmcbeg[]' value='{MCBEG}'> <b><font size='+1'>:00</b> - </font> - <input type='Text' name='mcend[]' value='{MCEND}' size='2' maxlength='2' class='medium_form_field'> - <input type='hidden' name='oldmcend[]' value='{MCEND}'> <b><font size='+1'>:59</b> Uhr</font><br> - </td> - </tr> - <!-- END DYNAMIC BLOCK: TRanges --> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>Neue Time Range hinzufügen </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='newmcday' value='' size='5' maxlength='5' class='medium_form_field'> - - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='newmcbeg' value='' size='2' maxlength='2' class='medium_form_field'> - <b><font size='+1'>:00</b> - </font> - <input type='Text' name='newmcend' value='' size='2' maxlength='2' class='medium_form_field'> - <b><font size='+1'>:59</b> Uhr</font><br> - - </td> - </tr> - - </table></td> - </tr> - - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>Dienste:</h4></td> - </tr> - - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='70%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start X: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[start-x]' value='{X}' size='10' maxlength='3' class='medium_form_field'> - <input type='hidden' name='oldattribs[start-x]' value='{X}'> ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start SNMP: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[start-snmp]' value='{SNMP}' size='10' maxlength='3' class='medium_form_field'> - <input type='hidden' name='oldattribs[start-snmp]' value='{SNMP}'> ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start SSHD: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[start-sshd]' value='{SSHD}' size='10' maxlength='3' class='medium_form_field'> - <input type='hidden' name='oldattribs[start-sshd]' value='{SSHD}'> ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start XDMCP: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[start-xdmcp]' value='{XDMCP}' size='10' maxlength='3' class='medium_form_field'> - <input type='hidden' name='oldattribs[start-xdmcp]' value='{XDMCP}'> ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start RWHOD: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[start-rwhod]' value='{RWHOD}' size='10' maxlength='3' class='medium_form_field'> - <input type='hidden' name='oldattribs[start-rwhod]' value='{RWHOD}'> ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start PRINT DAEMON: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[start-printdaemon]' value='{PRINTD}' size='10' maxlength='3' class='medium_form_field'> - <input type='hidden' name='oldattribs[start-printdaemon]' value='{PRINTD}'> ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>TEX Enable: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[tex-enable]' value='{TEX}' size='10' maxlength='3' class='medium_form_field'> - <input type='hidden' name='oldattribs[tex-enable]' value='{TEX}'> ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start CRON: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[start-cron]' value='{CRON}' size='10' maxlength='3' class='medium_form_field'> - <input type='hidden' name='oldattribs[start-cron]' value='{CRON}'> ( yes | no ) - </td> - </tr> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Crontab Entries:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <!-- BEGIN DYNAMIC BLOCK: Crontab --> - <input type='Text' name='crontab[]' value='{CRONTAB}' size='60' class='medium_form_field'> - <input type='hidden' name='oldcrontab[]' value='{CRONTAB}'> <br> - <!-- END DYNAMIC BLOCK: Crontab --> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Language: </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[language]' value='{LANG}' size='10' maxlength='2' class='medium_form_field'> - <input type='hidden' name='oldattribs[language]' value='{LANG}'> - - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>NETBIOS Workgroup: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[netbios-workgroup]' value='{NETBIOS}' size='40' class='medium_form_field'> - <input type='hidden' name='oldattribs[netbios-workgroup]' value='{NETBIOS}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>VMWARE: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[vmware]' value='{VMWARE}' size='40' class='medium_form_field'> - <input type='hidden' name='oldattribs[vmware]' value='{VMWARE}'> - </td> - </tr> - - <input type='hidden' name='nodedn' value='{NODEDN}'> - <input type='hidden' name='mcdn' value='{MCDN}'> - <input type='hidden' name='oldmccn' value='{MCCN}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - - </table></td> - </tr> - <tr> - <td><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - <tr> - <td height='40'></td> - </tr> - - <tr> - <td colspan='2'><h4>MachineConfig <code class='font_object'>{MCCN}</code> kopieren:</h4> - Beachten Sie, dass die Time Ranges der Machine Config nicht mit kopiert werden.<br> - Sie müssen diese anschließend neu setzen. <br> - Geben Sie bitte den eindeutigen Namen des neuen MachineConfig-Objektes an. - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'> - <form action='mcdef_copy.php' method='post'> - - <tr valign='top'> - <td style='border-color: black; border-style: solid; border-width: 3 0 1 0;'><b>Ziel Objekt:</b><br> - (Mehrfachauswahl möglich) </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'> - - <select name='copytargets[]' size='10' multiple class='medium_form_selectbox'> - <option selected value='none'>----------------------------</option> - <option value='{DEFDN}'>DEFAULT</option> - - <option value='none'>---- RECHNER -----</option> - <!-- BEGIN DYNAMIC BLOCK: Hosts --> - <option value='{HDN}'>{HN}</option> - <!-- END DYNAMIC BLOCK: Hosts --> - - <option value='none'>---- GRUPPEN -----</option> - <!-- BEGIN DYNAMIC BLOCK: Groups --> - <option value='{GDN}'>{GN}</option> - <!-- END DYNAMIC BLOCK: Groups --> - </select> - </td> - </tr> - <tr> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Eindeutiger Name (cn):</b><br>(Bitte ohne Leerzeichen eingeben) </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <font size='+2'><b>MC_</b></font><input type='Text' name='mccncp' value='{MCCN}' size='50' class='medium_form_field'> - <input type='hidden' name='oldmccncp' value='{MCCN}'> - </td> - </tr> - - <input type='hidden' name='mcdn' value='{MCDN}'> - <input type='hidden' name='oldmccn' value='{MCCN}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - <input type='hidden' name='deltr' value='{DELTR}'> - - </table></td> - </tr><tr><td> - <input type='Submit' name='apply' value='kopieren' class='small_loginform_button'> - </form></td></tr> - - <tr> - <td height='40'></td> - </tr> - - <tr> - <td colspan='2'><h4>Default MachineConfig <code class='font_object'>{MCCN}</code> löschen:</h4></td> - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'> - <form action='delete_confirm.php' method='post'> - - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - Die MachineConfig wird komplett gelöscht. - </tr> - - <input type='hidden' name='dn' value='{MCDN}'> - <input type='hidden' name='name' value='{MCCN}'> - <input type='hidden' name='delurl' value='mcdef_delete.php'> - <input type='hidden' name='backurl' value='mcdef.php?dn={MCDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}'> - - - </table></td> - </tr><tr><td> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'> - </form></td></tr> - -</table> diff --git a/ldap-site-mngmt/webinterface/computers/mcdef.php b/ldap-site-mngmt/webinterface/computers/mcdef.php deleted file mode 100644 index 51a760ba..00000000 --- a/ldap-site-mngmt/webinterface/computers/mcdef.php +++ /dev/null @@ -1,132 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "mcdef.dwt"; - -include('computers_header.inc.php'); - -$mnr = -1; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; -$mcnr = $_GET['mcnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$mcDN = $_GET['dn']; - -$attributes = array("dn","cn","description","timerange","language","start-x","start-snmp","start-sshd", - "start-xdmcp","start-rwhod","start-cron","start-printdaemon","crontab-entries", - "tex-enable","netbios-workgroup","vmware"); -$mc = get_node_data($mcDN,$attributes); -#print_r($mc); - -$exp = explode(',',$mcDN); -$node = array_slice($exp,1); -$nodeDN = implode(',',$node); - -# Timerange Komponenten -$template->define_dynamic("TRanges", "Webseite"); -if (count($mc['timerange']) > 1){ - foreach($mc['timerange'] as $tr){ - $exptime = explode('_',$tr); - $template->assign(array("MCDAY" => $exptime[0], - "MCBEG" => $exptime[1], - "MCEND" => $exptime[2])); - $template->parse("TRANGES_LIST", ".TRanges"); - } -}else{ - $exptime = explode('_',$mc['timerange']); - $template->assign(array("MCDAY" => $exptime[0], - "MCBEG" => $exptime[1], - "MCEND" => $exptime[2])); - $template->parse("TRANGES_LIST", ".TRanges"); -} - -$expcn = explode('_',$mc['cn']); -$name = array_slice($expcn,1); -$mccn = implode('_',$name); - -$template->assign(array("MCDN" => $mcDN, - "MCCN" => $mccn, - "MCDESC" => $mc['description'], - "LANG" => $mc['language'], - "X" => $mc['start-x'], - "SNMP" => $mc['start-snmp'], - "SSHD" => $mc['start-sshd'], - "XDMCP" => $mc['start-xdmcp'], - "RWHOD" => $mc['start-rwhod'], - "CRON" => $mc['start-cron'], - "CRONTAB" => "", - "PRINTD" => $mc['start-printdaemon'], - "TEX" => $mc['tex-enable'], - "NETBIOS" => $mc['netbios-workgroup'], - "VMWARE" => $mc['vmware'], - "NODEDN" => $nodeDN, - "DEFDN" => "cn=computers,".$auDN, - "MNR" => $mnr, - "SBMNR" => $sbmnr, - "MCNR" => $mcnr)); - -$template->define_dynamic("Crontab", "Webseite"); -if ( count($mc['crontab-entries']) != 0 ){ - if ( count($mc['crontab-entries']) > 1 ){ - foreach ($mc['crontab-entries'] as $crontab){ - $template->assign(array("CRONTAB" => $crontab)); - $template->parse("CRONTAB_LIST", ".Crontab"); - } - } - if ( count($mc['crontab-entries']) == 1 ){ - $template->assign(array("CRONTAB" => $mc['crontab-entries'])); - $template->parse("CRONTAB_LIST", ".Crontab"); - } -} -$template->assign(array("CRONTAB" => "")); -$template->parse("CRONTAB_LIST", ".Crontab"); - -################################################ -# MC kopieren - -$hostorgroup = $exp[0]; -$hgexp = explode('=',$exp[0]); - -$hosts_array = get_hosts($auDN,array("dn","hostname")); -$groups_array = get_groups($auDN,array("dn","cn")); - -$template->define_dynamic("Hosts", "Webseite"); -foreach ($hosts_array as $item){ - $template->assign(array("HDN" => $item['dn'], - "HN" => $item['hostname'])); - $template->parse("HOSTS_LIST", ".Hosts"); -} -$template->define_dynamic("Groups", "Webseite"); -foreach ($groups_array as $item){ - $template->assign(array("GDN" => $item['dn'], - "GN" => $item['cn'])); - $template->parse("GROUPS_LIST", ".Groups"); -} - - -# falls TR vorhanden dann soll sie gelöscht werden (flag deltr setzen) -if (count($mc['timerange']) != 0){ - $template->assign(array("DELTR" => "1")); -} -else{ - $template->assign(array("DELTR" => "0")); -} - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/mcdef_add.php b/ldap-site-mngmt/webinterface/computers/mcdef_add.php deleted file mode 100644 index efb86e87..00000000 --- a/ldap-site-mngmt/webinterface/computers/mcdef_add.php +++ /dev/null @@ -1,160 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$mccn = $_POST['mccn']; $mccn = htmlentities($mccn); -$mcdesc = $_POST['mcdesc']; $mcdesc = htmlentities($mcdesc); -$mcday = $_POST['mcday']; $mcday = htmlentities($mcday); -$mcbeg = $_POST['mcbeg']; $mcbeg = htmlentities($mcbeg); -$mcend = $_POST['mcend']; $mcend = htmlentities($mcend); - -$nodeDN = $_POST['nodedn']; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - -$targets = $_POST['targets']; -#print_r($targets); echo "<br>"; -$n = array_keys($targets,'none'); -#print_r($n); echo "<br>"; -for ($i=0; $i<count($n); $i++){ - $match = array_search('none',$targets); - array_splice($targets, $match, 1); -} -#echo "Zielobjekte: ";print_r($targets); echo "<br>"; - -$mcattribs = $_POST['mcattribs']; -if (count($mcattribs) != 0){ - foreach (array_keys($mcattribs) as $key){ - $mcatts[$key] = htmlentities($mcattribs[$key]); - } -} -# print_r($mcatts); echo "<br><br>"; - -$seconds = 2; -$get_mccn = str_replace ( " ", "_", $mccn ); -$get_mcdesc = str_replace ( " ", "_", $mcdesc ); -$get_mcday = str_replace ( " ", "_", $mcday ); -$get_mcbeg = str_replace ( " ", "_", $mcbeg ); -$get_mcend = str_replace ( " ", "_", $mcend ); -$url = "new_mcdef.php?mccn=".$get_mccn."&mcdesc=".$get_mcdesc."&mcday=".$get_mcday."&mcbeg=".$get_mcbeg."&mcend=".$get_mcend."&mnr=".$mnr."&sbmnr=".$sbmnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $mccn != "" && $mccn != "Hier_MC_NAME_eintragen"){ - - $mccn = "MC_".$mccn; - # Formulareingaben anpassen - $expmc = explode(" ",$mccn); - foreach ($expmc as $word){$expuc[] = ucfirst($word);} - $mccn = implode(" ",$expuc); - $mccn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $mccn); - - $mctimerange = ""; - - if (count($targets) != 0){ - foreach ($targets as $targetDN){ - - $exptargetdn = ldap_explode_dn($targetDN, 1); - $targetcn = $exptargetdn[0]; - $targettype = $exptargetdn[1]; - - # Check auf eindeutigen MC-Namen am Zielobjekt - $brothers = get_machineconfigs($targetDN,array("cn")); - $brother = 0; - foreach ($brothers as $item){ - if( $item['cn'] == $mccn ){ - $mesg = "Es existiert bereits ein PXE Boot Menü mit dem eingegebenen Namen!<br> - Bitte geben Sie einen anderen Namen ein.<br><br>"; - $url = "new_mcdef.php?mccn=".$get_mccn."&mcday=".$get_mcday."&mcbeg=".$get_mcbeg."&mcend=".$get_mcend."&mnr=".$mnr."&sbmnr=".$sbmnr; - $brother = 1; - break; - } - } - if ($brother == 0){ - - if ( $mcday != "" && $mcbeg != "" && $mcend != "" && $mcbeg <= $mcend ){ - - # TimeRange Syntax checken - $syntax = new Syntaxcheck; - if ($syntax->check_timerange_syntax($mcday,$mcbeg,$mcend)){ - - # in Grossbuchstaben - if (preg_match("/([a-z]+)/",$mcday)){$mcday = strtoupper($mcday);} - if (preg_match("/([a-z]+)/",$mcbeg)){$mcbeg = strtoupper($mcbeg);} - if (preg_match("/([a-z]+)/",$mcend)){$mcend = strtoupper($mcend);} - - # führende Nullen weg - $mcbeg = preg_replace ( '/0([0-9])/', '$1', $mcbeg); - $mcend = preg_replace ( '/0([0-9])/', '$1', $mcend); - - # TimeRange auf Ãœberschneidung mit vorhandenen checken - if(check_timerange($mcday,$mcbeg,$mcend,$targetDN,"")){ - $mctimerange = $mcday."_".$mcbeg."_".$mcend; - } - else{ - $mesg = "Es existiert bereits eine MachineConfig, die sich mit der eingegebenen Time Range - überschneidet!<br> - Die neue MachineConfig wird ohne Time Range angelegt.<br> - Bitte geben Sie diese anschließend ein.<br><br>"; - } - } - else{ - $mesg = "Falsche Syntax in der Time-Range-Eingabe! Die neue MachineConfig wird ohne Time Range angelegt.<br> - Bitte geben Sie diese anschließend ein.<br><br>"; - } - } - else{ - $mesg = "Keine vollständige Time-Range-Eingabe! Die neue MachineConfig wird ohne Time Range angelegt.<br> - Bitte geben Sie diese anschließend ein.<br><br>"; - } - - $mcDN = "cn=".$mccn.",".$targetDN; - print_r($mcDN); echo "<br>"; - - if (add_mc($mcDN,$mccn,$mctimerange,$mcdesc,$mcattribs)){ - $mesg .= "<br>Neue MachineConfig erfolgreich angelegt<br>"; - if ($targettype == "computers"){ - $url = "mcdef.php?dn=".$mcDN."&mnr=1"; - } - if ($targettype == "groups"){ - $url = "mcdef.php?dn=".$mcDN."&mnr=2"; - } - if ($targettype == $au_ou){ - $url = "machineconfig_default.php"; - } - } - else{ - $mesg .= "<br>Fehler beim anlegen der MachineConfig!<br>"; - } - } - } - } - else{ - $mesg .= "<br>Sie haben kein Ziel angegeben!<br>"; - } -} - -elseif ( $mccn == "" || $mccn == "Hier_MC_NAME_eintragen"){ - - $mesg = "Sie haben den Namen der neuen Machine Config nicht angegeben. Dieser ist aber ein notwendiges Attribut.<br> - Bitte geben Sie ihn an.<br><br>"; - $url = "new_mcdef.php?mccn=Hier_MC_NAME_eintragen&mcdesc=".$get_mcdesc."&mcday=".$get_mcday."&mcbeg=".$get_mcbeg."&mcend=".$get_mcend."&mnr=".$mnr."&sbmnr=".$sbmnr; -} - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/mcdef_change.php b/ldap-site-mngmt/webinterface/computers/mcdef_change.php deleted file mode 100644 index 4aaa29fe..00000000 --- a/ldap-site-mngmt/webinterface/computers/mcdef_change.php +++ /dev/null @@ -1,402 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$mccn = "MC_".$_POST['mccn']; -$mcdesc = $_POST['mcdesc']; $mcdesc = htmlentities($mcdesc); - -$mcday = $_POST['mcday']; -$mcbeg = $_POST['mcbeg']; -$mcend = $_POST['mcend']; -foreach (array_keys($mcday) as $key){ - $mcday[$key] = htmlentities($mcday[$key]); -} -foreach (array_keys($mcbeg) as $key){ - $mcbeg[$key] = htmlentities($mcbeg[$key]); -} -foreach (array_keys($mcend) as $key){ - $mcend[$key] = htmlentities($mcend[$key]); -} - -$deltr = $_POST['deltr']; - -$newmcday = $_POST['newmcday']; $newmcday = htmlentities($newmcday); -$newmcbeg = $_POST['newmcbeg']; $newmcbeg = htmlentities($newmcbeg); -$newmcend = $_POST['newmcend']; $newmcend = htmlentities($newmcend); - -$oldmcdesc = $_POST['oldmcdesc']; $oldmcdesc = htmlentities($oldmcdesc); -$oldmcday = $_POST['oldmcday']; -$oldmcbeg = $_POST['oldmcbeg']; -$oldmcend = $_POST['oldmcend']; - -$crontab = $_POST['crontab']; -$oldcrontab = $_POST['oldcrontab']; -foreach (array_keys($crontab) as $key){ - $crontab[$key] = htmlentities($crontab[$key]); -} - -$mcDN = $_POST['mcdn']; -$oldmccn = "MC_".$_POST['oldmccn']; - -$nodeDN = $_POST['nodedn']; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - -# sosntige Attribute -$attribs = $_POST['attribs']; -if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - $atts[$key] = htmlentities($attribs[$key]); - } -} -#print_r($atts); echo "<br><br>"; -$oldattribs = $_POST['oldattribs']; -if (count($oldattribs) != 0){ - foreach (array_keys($oldattribs) as $key){ - $oldatts[$key] = htmlentities($oldattribs[$key]); - } -} -#print_r($oldatts); echo "<br><br>"; - - -$seconds = 2; -$url = "mcdef.php?dn=".$mcDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -############################################## -# MC CN (DN) - -if ( $oldmccn == $mccn ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( $oldmccn != "" && $mccn != "" && $oldmccn != $mccn ){ - echo "Machine Config Name aendern<br>"; - # hier noch Syntaxcheck - # Formulareingaben anpassen - $expmc = explode(" ",$mccn); - foreach ($expmc as $word){$expuc[] = ucfirst($word);} - $mccn = implode(" ",$expuc); - $mccn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $mccn); - - - $newmcDN = "cn=".$mccn.",".$nodeDN; - print_r($newmcDN); echo "<br><br>"; - - if(modify_mc_dn($mcDN, $newmcDN)){ - $mesg = "MC Name erfolgreich geändert<br><br>"; - $mcDN = $newmcDN; - }else{ - $mesg = "Fehler beim ändern des MC Name!<br><br>"; - } - - - # newsubmenu holen... - $url = "mcdef.php?dn=".$newmcDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; -} - -if ( $oldmccn != "" && $mccn == "" ){ - echo "Gruppenname loeschen!<br> - Dieses ist Teil des DN, Sie werden die MachineConfig komplett löschen<br><br>"; - echo "Wollen Sie die MachineConfig <b>".$oldmccn."</b> wirklich löschen?<br><br> - <form action='mcdef_delete.php' method='post'> - Falls ja:<br><br> - <input type='hidden' name='dn' value='".$mcDN."'> - <input type='hidden' name='name' value='".$oldmccn."'> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'><br><br> - </form> - <form action='".$url."' method='post'> - Falls, nein:<br><br> - <input type='Submit' name='apply' value='zurück' class='small_loginform_button'> - </form>"; - $seconds = 600; -} - - -########################################## -# bereits vorhandene TimeRange(s) bearbeiten - -$entrymodtr = array(); -$modtr = 0; -# TimeRanges zusammensetzen -# $t = 0; # Laufvariable für $entrymodtr, da nicht jede Timerange ok sein muss -for ($i=0; $i<count($mcday); $i++){ - -$oldmctimerange = $oldmcday[$i]."_".$oldmcbeg[$i]."_".$oldmcend[$i]; - -if ( ($mcbeg[$i] <= $mcend[$i]) && ( ($mcday[$i] != $oldmcday[$i] && $mcday[$i] != "") || ($mcbeg[$i] != $oldmcbeg[$i] && $mcbeg[$i] != "") || ($mcend[$i] != $oldmcend[$i] && $mcend[$i] != "")) ){ - - - # TimeRange Syntax checken - $syntax = new Syntaxcheck; - if ($syntax->check_timerange_syntax($mcday[$i],$mcbeg[$i],$mcend[$i])){ - - # in Grossbuchstaben - if (preg_match("/([a-z]+)/",$mcday[$i])){$mcday[$i] = strtoupper($mcday[$i]);} - if (preg_match("/([a-z]+)/",$mcbeg[$i])){$mcbeg[$i] = strtoupper($mcbeg[$i]);} - if (preg_match("/([a-z]+)/",$mcend[$i])){$mcend[$i] = strtoupper($mcend[$i]);} - - # führende Nullen weg - $mcbeg[$i] = preg_replace ( '/0([0-9])/', '$1', $mcbeg[$i]); - $mcend[$i] = preg_replace ( '/0([0-9])/', '$1', $mcend[$i]); - - # TimeRange auf Ãœberschneidung mit vorhandenen checken außer mit eigener alter TR da diese - # ja geändert werden soll - if(check_timerange($mcday[$i],$mcbeg[$i],$mcend[$i],$nodeDN,$oldmctimerange)){ - - $mctimerange = $mcday[$i]."_".$mcbeg[$i]."_".$mcend[$i]; - $entrymodtr ['timerange'][$i] = $mctimerange; - $modtr = 1; - - } - else{ - $mesg = "Es existiert bereits eine MachineConfig, die sich mit der eingegebenen Time Range - überschneidet!<br> - Bitte geben Sie eine andere Time Range ein.<br><br>"; - $entrymodtr ['timerange'][$i] = $oldmctimerange; - } - } - else{ - $mesg = "Falsche Syntax in der Timerange-Eingabe!<br> - Bitte geben Sie die erneut Time Range ein.<br><br>"; - $entrymodtr ['timerange'][$i] = $oldmctimerange; - } - -} - - -elseif ( $mcday[$i] == "" || $mcbeg[$i] == "" || $mcend[$i] == "" || $mcbeg[$i] > $mcend[$i]){ - - $mesg = "Sie haben die Time Range <b>Nr.".$i."</b> nicht vollständig angegeben. Diese ist aber ein notwendiges Attribut.<br> - Diese Time Range wird nicht bearbeitet.<br><br>"; - $entrymodtr ['timerange'][$i] = $oldmctimerange; -} - -else{$entrymodtr ['timerange'][$i] = $oldmctimerange;} -} # Ende for-Schleife für jede Timerange -# jetzt noch alle gesammelten Änderungen Durchführen ... -if ($modtr == 1){ - # erst ändern - echo "Ändern: "; print_r($entrymodtr); echo "<br>"; - if($result = ldap_mod_replace($ds,$mcDN,$entrymodtr)){ - $mesg = "TimeRanges erfolgreich geändert<br><br>"; - }else{ - $mesg = "Fehler beim ändern der TimeRanges!<br><br>"; - } -} - - -if ( count($deltr) != 0 && $modtr == 0 ){ - # Time Range löschen - $j = 0; - foreach ($deltr as $delrange){ - $entrydeltr ['timerange'][$j] = $delrange; - $j++; - } - # dann löschen - echo "Löschen: "; print_r($entrydeltr); echo "<br>"; - if($result = ldap_mod_del($ds,$mcDN,$entrydeltr)){ - $mesg = "TimeRanges erfolgreich gelöscht<br><br>"; - }else{ - $mesg = "Fehler beim löschen der TimeRanges!<br><br>"; - } -}elseif(count($deltr) != 0 && $modtr == 1){ - echo "Nur Ändern (gleichzeitig Löschen und Ändern geht nicht)"; -} - -##################################### -# TimeRange hinzufügen - -if ( $newmcday != "" && $newmcbeg != "" && $newmcend != "" && $newmcbeg <= $newmcend ){ - - # TimeRange Syntax checken - $syntax = new Syntaxcheck; - if ($syntax->check_timerange_syntax($newmcday,$newmcbeg,$newmcend)){ - - # in Grossbuchstaben - if (preg_match("/([a-z]+)/",$newmcday)){$newmcday = strtoupper($newmcday);} - if (preg_match("/([a-z]+)/",$newmcbeg)){$newmcbeg = strtoupper($newmcbeg);} - if (preg_match("/([a-z]+)/",$newmcend)){$newmcend = strtoupper($newmcend);} - - # führende Nullen weg - $newmcbeg = preg_replace ( '/0([0-9])/', '$1', $newmcbeg); - $newmcend = preg_replace ( '/0([0-9])/', '$1', $newmcend); - - # TimeRange auf Ãœberschneidung mit vorhandenen checken - if(check_timerange($newmcday,$newmcbeg,$newmcend,$nodeDN,"")){ - - $newmctimerange = $newmcday."_".$newmcbeg."_".$newmcend; - $entrytr ['timerange'] = $newmctimerange; - if($result = ldap_mod_add($ds,$mcDN,$entrytr)){ - $mesg = "Zusätzliche TimeRange erfolgreich eingetragen<br><br>"; - }else{ - $mesg = "Fehler beim eintragen der zusätzlichen TimeRange!<br><br>"; - } - }else{ - $mesg = "Es existiert bereits eine MachineConfig, die sich mit der eingegebenen Time Range - überschneidet!<br> - Bitte geben Sie eine andere Time Range ein.<br><br>"; - } - }else{ - $mesg = "Falsche Syntax in der Timerange-Eingabe!<br> - Bitte geben Sie die erneut Time Range ein.<br><br>"; - } -} - -##################################### -# MC Description - -if ( $oldmcdesc == $mcdesc ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( $oldmcdesc == "" && $mcdesc != "" ){ - echo "MC-Beschreibung neu anlegen<br>"; - # hier noch Syntaxcheck - $entrymc['description'] = $mcdesc; - if(ldap_mod_add($ds,$mcDN,$entrymc)){ - $mesg = "MC-Beschreibung erfolgreich eingetragen<br><br>"; - }else{ - $mesg = "Fehler beim eintragen der MC-Beschreibung<br><br>"; - } -} - -if ( $oldmcdesc != "" && $mcdesc != "" && $oldmcdesc != $mcdesc ){ - echo "MC-Beschreibung aendern<br>"; - # hier noch Syntaxcheck - $entrymc['description'] = $mcdesc; - if(ldap_mod_replace($ds,$mcDN,$entrymc)){ - $mesg = "MC-Beschreibung erfolgreich geaendert<br><br>"; - }else{ - $mesg = "Fehler beim aendern der MC-Beschreibung<br><br>"; - } -} - -if ( $oldmcdesc != "" && $mcdesc == "" ){ - echo "Rechner-Beschreibung loeschen<br>"; - # hier noch Syntaxcheck - $entrymc['description'] = $oldmcdesc; - if(ldap_mod_del($ds,$mcDN,$entrymc)){ - $mesg = "MC-Beschreibung erfolgreich geloescht<br><br>"; - }else{ - $mesg = "Fehler beim loeschen der MC-Beschreibung<br><br>"; - } -} - -##################################### -# Crontab Entries - -if (count($crontab) != 0 && (count(array_diff_assoc($crontab,$oldcrontab)) != 0 || count(array_diff_assoc($oldcrontab,$crontab)) != 0) ){ - - $crontabentry = array(); - foreach ($crontab as $ct){ - if ($ct != ""){ - $crontabentry ['crontab-entries'][] = $ct; - } - } - $oldcrontabentry = array(); - foreach ($oldcrontab as $oldct){ - if ($oldct != ""){ - $oldcrontabentry ['crontab-entries'][] = $oldct; - } - } - - if (count($crontabentry) == 0){ - echo "Crontab Eintrag löschen<br>"; - ldap_mod_del($ds,$mcDN,$oldcrontabentry); - }else{ - echo "Crontab Eintrag ändern<br>"; - print_r($crontabentry); - ldap_mod_replace($ds,$mcDN,$crontabentry); - } -} - -##################################### -# Restliche Attribute - -$entryadd = array(); -$entrymod = array(); -$entrydel = array(); - -foreach (array_keys($atts) as $key){ - - if ( $oldatts[$key] == $atts[$key] ){ - - } - if ( $oldatts[$key] == "" && $atts[$key] != "" ){ - # hier noch Syntaxcheck - $entryadd[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] != "" && $oldatts[$key] != $atts[$key] ){ - # hier noch Syntaxcheck - $entrymod[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] == "" ){ - # hier noch Syntaxcheck - $entrydel[$key] = $oldatts[$key]; - } -} - -#print_r($entryadd); echo "<br>"; -#print_r($entrymod); echo "<br>"; -#print_r($entrydel); echo "<br>"; - - -if (count($entryadd) != 0 ){ - #print_r($entryadd); echo "<br>"; - #echo "neu anlegen<br>"; - foreach (array_keys($entryadd) as $key){ - $addatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_add($ds,$mcDN,$entryadd)){ - $mesg = "Attribute ".$addatts." erfolgreich eingetragen<br><br>"; - }else{ - $mesg = "Fehler beim eintragen der Attribute ".$addatts."<br><br>"; - } -} - -if (count($entrymod) != 0 ){ - #print_r($entrymod); echo "<br>"; - #echo "ändern<br>"; - foreach (array_keys($entrymod) as $key){ - $modatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_replace($ds,$mcDN,$entrymod)){ - $mesg = "Attribute ".$modatts." erfolgreich geaendert<br><br>"; - }else{ - $mesg = "Fehler beim aendern der Attribute ".$modatts."<br><br>"; - } -} - -if (count($entrydel) != 0 ){ - #print_r($entrydel); echo "<br>"; - #echo "löschen<br>"; - foreach (array_keys($entrydel) as $key){ - $delatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_del($ds,$mcDN,$entrydel)){ - $mesg = "Attribute ".$delatts." erfolgreich geloescht<br><br>"; - }else{ - $mesg = "Fehler beim loeschen der Attribute ".$delatts."<br><br>"; - } -} - - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/mcdef_copy.php b/ldap-site-mngmt/webinterface/computers/mcdef_copy.php deleted file mode 100644 index 313b22fc..00000000 --- a/ldap-site-mngmt/webinterface/computers/mcdef_copy.php +++ /dev/null @@ -1,111 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$mcDN = $_POST['mcdn']; -$mccn = "MC_".$_POST['mccncp']; -$oldmccn = "MC_".$_POST['oldmccncp']; - -$deltr = $_POST['deltr']; - -$nodeDN = $_POST['nodedn']; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - -$copytargets = $_POST['copytargets']; -#print_r($copytargets); echo "<br>"; -$n = array_keys($copytargets,'none'); -#print_r($n); echo "<br>"; -for ($i=0; $i<count($n); $i++){ - $match = array_search('none',$copytargets); - array_splice($copytargets, $match, 1); -} -print_r($copytargets); echo "<br>"; - - -$seconds = 2; -$url = "mcdef.php?dn=".$mcDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $mccn != ""){ - - # Formulareingaben anpassen - $expmc = explode(" ",$mccn); - foreach ($expmc as $word){$expuc[] = ucfirst($word);} - $mccn = implode(" ",$expuc); - $mccn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $mccn); - - - if (count($copytargets) != 0){ - foreach ($copytargets as $targetDN){ - - $brothers = get_machineconfigs($targetDN,array("cn")); - $brother = 0; - foreach ($brothers as $item){ - if( $item['cn'] == $mccn ){ - $mesg = "Es existiert bereits eine Machine Config mit dem eingegebenen Namen!<br> - Bitte geben Sie einen anderen Namen ein.<br><br>"; - $url = "mcdef.php?dn=".$mcDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - $brother = 1; - break; - } - } - if ($brother == 0){ - - print_r($targetDN); echo "<br>"; - $exptarget = explode(',',$targetDN); - $target = explode('=',$exptarget[0]); - - $newmcDN = "cn=".$mccn.",".$targetDN; - print_r($newmcDN); echo "<br>"; - - - if (dive_into_tree_cp($mcDN,$newmcDN)){ - if($deltr == 1){ - $entrydel ['timerange'] = array(); - # Timeranges im neuen Objekt löschen - if (ldap_mod_del($ds,$newmcDN,$entrydel)){ - $mesg .= "<br>MachineConfig erfolgreich nach ".$target[1]." kopiert<br>"; - } - else{ - ldap_delete($ds,$newmcDN); - $mesg .= "<br>Fehler beim kopieren der MachineConfig nach <b>".$target[1]."</b><br>"; - } - } - } - else{ - $mesg .= "<br>Fehler beim kopieren der MachineConfig nach <b>".$target[1]."</b><br>"; - } - } - } - } - else{ - $mesg .= "<br>Sie haben kein Ziel angegeben!<br>"; - } -} - -elseif ( $mccn == ""){ - - $mesg = "Sie haben den Namen der neuen Machine Config nicht angegeben. Dieser ist aber ein notwendiges Attribut.<br> - Bitte geben Sie ihn an.<br><br>"; - $url = "mcdef.php?dn=".$mcDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; -} - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/mcdef_delete.php b/ldap-site-mngmt/webinterface/computers/mcdef_delete.php deleted file mode 100644 index e191f703..00000000 --- a/ldap-site-mngmt/webinterface/computers/mcdef_delete.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$mcDN = $_POST['dn']; -$mccn = $_POST['name']; - -$seconds = 1; -$url = 'machineconfig_default.php'; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $mcDN != ""){ - - if ( dive_into_tree_del($mcDN,"") ){ - $mesg = "Machine Config <b>".$mccn."</b> erfolgreich gelöscht!<br><br>"; - } - else{ - $mesg = "Fehler beim löschen der Machine Config <b>".$mccn."</b> !<br><br>"; - } - -} - - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/menu.dwt b/ldap-site-mngmt/webinterface/computers/menu.dwt deleted file mode 100644 index 7d316674..00000000 --- a/ldap-site-mngmt/webinterface/computers/menu.dwt +++ /dev/null @@ -1,32 +0,0 @@ - -<table cellpadding='0' cellspacing='0' border='0' width='100%'> - - - <!-- BEGIN DYNAMIC BLOCK: Hauptmenu --> - - <tr valign='middle' align='left'> - - <td width='8%' align='right' style="border-style=none;">{ICON}</td> - <td width="8%" align="left" style="border-width:1 0 1 1;border-color:#000000;border-style:solid;padding:5;background-color:{FARBE}"> </td> - <td width="5%" align="left" style="border-width:1 0 1 0;border-color:#000000;border-style:solid;padding:5;background-color:{FARBE}"> </td> - <td width="69%" align="left" style="border-width:1 1 1 0;border-color:#000000;border-style:solid;padding:5;background-color:{FARBE}"> - <a href="{LINK_M}" style="text-decoration:none"> - <code class="submenue_schrift">{TEXT_M}</code> - </a> - </td> - <td width='10%'> </td> - - </tr> - - <!-- BEGIN DYNAMIC BLOCK: Submenu --> - - {SUB} - - <!-- END DYNAMIC BLOCK: Submenu --> - - <tr height='5'> - </tr> - -<!-- END DYNAMIC BLOCK: Hauptmenu --> - -</table> diff --git a/ldap-site-mngmt/webinterface/computers/menuentry.dwt b/ldap-site-mngmt/webinterface/computers/menuentry.dwt deleted file mode 100644 index 57c1e0d7..00000000 --- a/ldap-site-mngmt/webinterface/computers/menuentry.dwt +++ /dev/null @@ -1,249 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td height='20'><h4><a href='pxe.php?dn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}' class='headerlink'><< Zurück zu PXE Config {PXECN}</a></h4></td> - </tr> - <tr> - <td height='20'> </td> - </tr> - <tr> - <td colspan='2'><h3>Boot Menü Eintrag <code class='font_object'> {MECN} </code> </h3></td> - </tr> - <tr> - <td height='20'> </td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='menuentry_change.php' method='post'> - - <tr> - <td width='40%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='60%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Eindeutiger Name (cn):</b><br>(Teil des dn, ohne Leerzeichen eingeben) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mecn' value='{MECN}' size='50' class='medium_form_field'> - <input type='hidden' name='oldmecn' value='{MECN}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Label:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[label]' value='{LABEL}' size='50' class='medium_form_field'> - <input type='hidden' name='oldattribs[label]' value='{LABEL}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Generisches Boot Image: </b><br><br>(Angeboten von) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <h4>{GMECN}</h4> Abteilung: {GMEOU} [Remote Boot Dienst: {GMERBS}] - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Label:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menulabel]' value='{MELABEL}' size='50' class='medium_form_field'> - <input type='hidden' name='oldattribs[menulabel]' value='{MELABEL}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Default:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menudefault]' value='{MEDEF}' size='50' class='medium_form_field'> - <input type='hidden' name='oldattribs[menudefault]' value='{MEDEF}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Passwd:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menupasswd]' value='{MEPASSWD}' size='50' class='medium_form_field'> - <input type='hidden' name='oldattribs[menupasswd]' value='{MEPASSWD}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Hide:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menuhide]' value='{MEHIDE}' size='50' class='medium_form_field'> - <input type='hidden' name='oldattribs[menuhide]' value='{MEHIDE}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Localboot:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[localboot]' value='{LOCALBOOT}' size='50' class='medium_form_field'> - <input type='hidden' name='oldattribs[localboot]' value='{LOCALBOOT}'> - </td> - </tr> - - </table></td> - </tr> - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>APPEND Parameter:</h4></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td width='20%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='80%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Client Konfiguration via: </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[clientconfvia]' value='{CCV}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[clientconfvia]' value='{CCV}'> ( dhcp | file | ldap ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>vga: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[vga]' value='{VGA}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[vga]' value='{VGA}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>splash: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[splash]' value='{SPLASH}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[splash]' value='{SPLASH}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>vci: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[vci]' value='{VCI}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[vci]' value='{VCI}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>no ldsc: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[noldsc]' value='{NOLDSC}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[noldsc]' value='{NOLDSC}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>elevator: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[elevator]' value='{ELEVATOR}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[elevator]' value='{ELEVATOR}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>apic: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[apic]' value='{APIC}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[apic]' value='{APIC}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Union FS: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[unionfs]' value='{UNIONFS}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[unionfs]' value='{UNIONFS}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>cowloop: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[cowloop]' value='{COWLOOP}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[cowloop]' value='{COWLOOP}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Debug Level: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[debug]' value='{DEBUG}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[debug]' value='{DEBUG}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menü Position: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='menpos' value='{MENPOS}' size='2' class='medium_form_field'> - <input type='hidden' name='oldmenpos' value='{MENPOS}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Submenü Verweis: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[submenulink]' value='{SUBMENULINK}' size='50' class='medium_form_field'> - <br> - Dieses Feld sollte nur bei Verweisen auf Submenüs den vollständigen Link zu diesen enthalten - <br>(d.h. <TFTP-Server-IP>::/<TFTP-PXE-Pfad>/<Timerange>/<PXE-Dateiname>). <br> - Bei Textzeilen und Leerzeilen muss hier <b>"self"</b> stehen. <br> - Bei normalen Menüeinträgen (inklusive Localboot) muss diese Feld <b>leer</b> sein. - <input type='hidden' name='oldattribs[submenulink]' value='{SUBMENULINK}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Kernel: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[kernel]' value='{KERNEL}' size='50' class='medium_form_field'> - <br> - Angabe hier nur sinnvoll bei Leer-, Textzeilen oder Submenüverweisen, <br> - denn Eingabe wird, wenn der Menüeintrag auf ein generisches Boot Image verweist (siehe oben) <br> - bei der PXE Datei Generierung überschrieben. - <input type='hidden' name='oldattribs[kernel]' value='{KERNEL}'> - </td> - </tr> - - <input type='hidden' name='medn' value='{MEDN}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='timespan' value='{TIMERANGE}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - - </table></td> - </tr> - <tr> - <td><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - - <tr> - <td height='40'></td> - </tr> - - <tr> - <td colspan='2'><h4>Boot Menü Eintrag <code class='font_object'>{MECN}</code> löschen:</h4></td> - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'> - <form action='delete_confirm.php' method='post'> - - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - Das generische Boot Image wird komplett gelöscht. - </tr> - - <input type='hidden' name='dn' value='{MEDN}'> - <input type='hidden' name='name' value='{MECN}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='delurl' value='menuentry_delete.php'> - <input type='hidden' name='successurl' value='pxe.php?dn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}'> - <input type='hidden' name='backurl' value='menuentry.php?dn={MEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}'> - - - </table></td> - </tr> - <tr> - <td> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'> - </form></td> - </tr> - - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/menuentry.php b/ldap-site-mngmt/webinterface/computers/menuentry.php deleted file mode 100644 index 386178a3..00000000 --- a/ldap-site-mngmt/webinterface/computers/menuentry.php +++ /dev/null @@ -1,165 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "menuentry.dwt"; - -include('computers_header.inc.php'); - -$mnr = -1; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; -$mcnr = $_GET['mcnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$meDN = $_GET['dn']; - -$attributes = array("cn","genericmenuentrydn","label","menulabel","menudefault","menupasswd","vga","splash", - "noldsc","elevator","clientconfvia","apic", - "cowloop","unionfs","debug","vci","menuhide","menuposition","localboot","kernel","submenulink"); -$me = get_node_data($meDN,$attributes); -#print_r($me); - -# PXE DN -$exp = explode(',',$meDN); -$node = array_slice($exp,1); -$exppxecn = explode('=',$node[0]); -$pxecn = $exppxecn[1]; -$pxeDN = implode(',',$node); - -# Generic Menu Entry -$expgbm = ldap_explode_dn ($me['genericmenuentrydn'],1); -$gmecn = $expgbm[0]; -$gmerbs = $expgbm[1]; -$gmeou = $expgbm[3]; - -# PXE/RBS Daten -$pxe = get_node_data($pxeDN,array("rbservicedn","timerange")); -$timerange = $pxe['timerange']; -$rbsDN = $pxe['rbservicedn']; -$exp = explode(',',$rbsDN); -$exprbsau = explode('=',$exp[2]); $rbsau = $exprbsau[1]; -$rbsdata = get_node_data($rbsDN,array("cn","nfsserverip","exportpath","tftpserverip","tftppath")); - -# Bootmenu Daten -$template->assign(array("MEDN" => $meDN, - "MECN" => $me['cn'], - "GMECN" => $gmecn, - "GMEOU" => $gmeou, - "GMERBS" => $gmerbs, - "LABEL" => $me['label'], - "MELABEL" => $me['menulabel'], - "MEDEF" => $me['menudefault'], - "MEPASSWD" => $me['menupasswd'], - "MEHIDE" => $me['menuhide'], - "VGA" => $me['vga'], - "SPLASH" => $me['splash'], - "NOLDSC" => $me['noldsc'], - "ELEVATOR" => $me['elevator'], - "VCI" => $me['vci'], - "CCV" => $me['clientconfvia'], - "APIC" => $me['apic'], - "COWLOOP" => $me['cowloop'], - "UNIONFS" => $me['unionfs'], - "DEBUG" => $me['debug'], - "MENPOS" => $me['menuposition'], - "LOCALBOOT" => $me['localboot'], - "KERNEL" => $me['kernel'], - "SUBMENULINK" => $me['submenulink'], - "PXEDN" => $pxeDN, - "PXECN" => $pxecn, - "TIMERANGE" => $timerange, - "MNR" => $mnr, - "SBMNR" => $sbmnr, - "MCNR" => $mcnr)); - -#$template->define_dynamic("Submenulink", "Webseite"); -#if (count($me['submenulink']) != 0){ -# foreach ($me['submenulink'] as $sbml){ -# $template->assign(array("SUBMENULINK" => $sbml)); -# $template->parse("SUBMENULINK_LIST", ".Submenulink"); -# } -#} - -# Alternative RB Dienste holen -$altrbs = get_rbservices($auDN,array("dn","cn")); -if (count($altrbs) != 0){ - for ($i=0; $i < count($altrbs); $i++){ - if ($rbsDN == $altrbs[$i]['dn']){ - array_splice($altrbs, $i, 1); - } - } -} - - -if (count($altrbs) != 0){ -$template->define_dynamic("Altrbs", "Webseite"); - foreach ($altrbs as $item){ - $altrbsexp = explode(',',$item['dn']); - $altrbsau = explode('=',$altrebsexp[2]); - $template->assign(array("ALTRBSDN" => $item['dn'], - "ALTRBSCN" => $item['cn'], - "ALTRBSAU" => "[ ".$altrbsau[1]." ]")); - $template->parse("ALTRBS_LIST", ".Altrbs"); - } -}else{ - $template->assign(array("ALTRBSDN" => "", - "ALTRBSCN" => "", - "ALTRBSAU" => "")); -} - -################################################ -# Bootmenü Einträge - -$menuentries = get_menuentries($pxeDN,array("dn","menuposition","label","menulabel")); -#print_r($menuentries); echo "<br>"; - -$template->define_dynamic("Bootmenu", "Webseite"); - -foreach ($menuentries as $me){ - $template->assign(array("MENDN" => $me['dn'], - "MENULABEL" => $me['menulabel'], - "POSITION" => $me['menuposition'], - "AUDN" => $auDN)); - $template->parse("BOOTMENU_LIST", ".Bootmenu"); -} - - -################################################ -# PXE kopieren - -$hostorgroup = $exp[0]; -$hgexp = explode('=',$exp[0]); - -$hosts_array = get_hosts($auDN,array("dn","hostname")); -$groups_array = get_groups($auDN,array("dn","cn")); - -$template->define_dynamic("Hosts", "Webseite"); -foreach ($hosts_array as $item){ - $template->assign(array("HDN" => $item['dn'], - "HN" => $item['hostname'])); - $template->parse("HOSTS_LIST", ".Hosts"); -} -$template->define_dynamic("Groups", "Webseite"); -foreach ($groups_array as $item){ - $template->assign(array("GDN" => $item['dn'], - "GN" => $item['cn'])); - $template->parse("GROUPS_LIST", ".Groups"); -} - -################################################################################### - -include("computers_footer.inc.php"); - -?> diff --git a/ldap-site-mngmt/webinterface/computers/menuentry_add.php b/ldap-site-mngmt/webinterface/computers/menuentry_add.php deleted file mode 100644 index 4f02d2a6..00000000 --- a/ldap-site-mngmt/webinterface/computers/menuentry_add.php +++ /dev/null @@ -1,263 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$mecn = $_POST['mecn']; $mecn = htmlentities($mecn); -$gbmDN = $_POST['gbm']; -$menpos = $_POST['menpos']; -$maxpos = $_POST['maxpos']; - -$typ = $_POST['typ']; -$pxeDN = $_POST['pxedn']; -$timespan = $_POST['timerange']; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - -$meattribs = $_POST['attribs']; -if (count($meattribs) != 0){ - foreach (array_keys($meattribs) as $key){ - $meatts[$key] = htmlentities($meattribs[$key]); - } -} -# print_r($meatts); echo "<br><br>"; - -# PXE Typ (computers/groups) für Submenulinks -$pxearray = ldap_explode_dn($pxeDN, 1); -$pxetype = $pxearray[2]; - -$seconds = 2; -$get_mecn = str_replace ( " ", "_", $mecn ); -$url = "pxe_bootmenue.php?dn=".$pxeDN."&mecn=".$get_mecn."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; -# switch wäre besser ... -if ($typ == "newme" && $typ != "local" && $typ != "text" && $typ != "leer" && $typ != "submenu" ){ - - if ( $mecn != "" && $mecn != "Hier_NAME_eintragen" && $gbmDN != "none" ){ - - # Formulareingaben anpassen - $expme = explode(" ",$mecn); - foreach ($expme as $word){$expuc[] = ucfirst($word);} - $mecn = implode(" ",$expuc); - $mecn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $mecn); - - if ($menpos != ""){ - # Syntaxcheck Menüposition - #$syntax = new Syntaxcheck; - #if (!($syntax->check_menuposition($menpos))){ - # $menpos = $maxpos; - #} - }else{ - $menpos = $maxpos; - } - if (strlen($menpos) == 1){ - $menpos = "0".$menpos; - } - # nun doch führende Nullen erzwingen - # also obsolet: $menpos = preg_replace ( '/0([0-9])/', '$1', $menpos); - - $meDN = "cn=".$mecn.",".$pxeDN; - - if (add_me($meDN,$mecn,$gbmDN,$menpos,$meatts,$pxeDN)){ - $mesg .= "<br>Neuen Menü Eintrag erfolgreich angelegt<br>"; - $url = "pxe_bootmenue.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr;; - } - else{ - $mesg .= "<br>Fehler beim anlegen des Menü Eintrags!<br>"; - } - } - - elseif ( $mecn == "" || $mecn == "Hier_NAME_eintragen" || $gbmDN == "none" ){ - - $mesg = "Sie haben den Namen des neuen Menü Eintrags nicht angegeben oder kein - Generisches Boot Image ausgewählt. Beide sind aber ein notwendige Attribute.<br> - Bitte geben Sie sie an.<br><br>"; - $url = "new_menuentry.php?mecn=Hier_NAME_eintragen&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - } -} - -# Localboot Zeile hinzufügen -elseif ($typ == "local" && $typ != "newme" && $typ != "text" && $typ != "leer" && $typ != "submenu" ){ - - # Menu Position - $menpos = $_POST['localpos']; - if ($menpos != ""){ - # Syntaxcheck Menüposition - #$syntax = new Syntaxcheck; - #if (!($syntax->check_menuposition($menpos))){ - # $menpos = $maxpos; - #} - }else{ - $menpos = $maxpos; - } - if (strlen($menpos) == 1){ - $menpos = "0".$menpos; - } - # nun doch führende Nullen erzwingen - # also obsolet: $menpos = preg_replace ( '/0([0-9])/', '$1', $menpos); - - # CN bilden - $brothers = get_menuentries($pxeDN,array("dn","cn")); - $i=1; - $localcn = "localboot".$i; - if(count($brothers) != 0){ - for ($c=0; $c<count($brothers); $c++){ - foreach ($brothers as $item){ - if ($localcn == strtolower($item['cn'])){ - $i++; - $localcn = "localboot".$i; - } - } - } - } - $meDN = "cn=".$localcn.",".$pxeDN; - $entry ['objectclass'][0] = "MenuEntry"; - $entry ['objectclass'][1] = "top"; - $entry ['cn'] = $localcn; - $entry ['menuposition'] = $menpos; - $entry ['label'] = $localcn; - $entry ['menulabel'] = $_POST['locallabel']; - $entry ['menupasswd'] = $_POST['localpasswd']; - $entry ['localboot'] = "level 0"; - $pos = preg_replace ( '/0([0-9])/', '$1', $menpos); - increment_menupositions($pxeDN,$pos); # andere jeweils um 1 erhöhen - if (ldap_add($ds,$meDN,$entry)){ - $mesg .= "Localboot Zeile erfolgeich an Position ".$menpos." eingetragen"; - }else{ - $mesg .= "Fehler beim eintragen der Localboot Zeile!"; - } - $url = "pxe_bootmenue.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; -} - - -# Text Zeile hinzufügen -elseif ($typ == "text" && $typ != "newme" && $typ != "local" && $typ != "leer" && $typ != "submenu" ){ - - # Menu Position - $menpos = $_POST['textpos']; - if ($menpos != ""){ - # Syntaxcheck Menüposition - #$syntax = new Syntaxcheck; - #if (!($syntax->check_menuposition($menpos))){ - # $menpos = $maxpos; - #} - }else{ - $menpos = $maxpos; - } - if (strlen($menpos) == 1){ - $menpos = "0".$menpos; - } - # nun doch führende Nullen erzwingen - # also obsolet: $menpos = preg_replace ( '/0([0-9])/', '$1', $menpos); - - $text = $_POST['text']; - if($text != "" && $text != "TEXT"){ - $brothers = get_menuentries($pxeDN,array("dn","cn")); - $i=1; - $textcn = "textzeile".$i; - if(count($brothers) != 0){ - for ($c=0; $c<count($brothers); $c++){ - foreach ($brothers as $item){ - if ($textcn == strtolower($item['cn'])){ - $i++; - $textcn = "textzeile".$i; - } - } - } - } - $meDN = "cn=".$textcn.",".$pxeDN; - $entry ['objectclass'][0] = "MenuEntry"; - $entry ['objectclass'][1] = "top"; - $entry ['cn'] = $textcn; - $entry ['menuposition'] = $menpos; - $entry ['label'] = $text; - $entry ['kernel'] = "menu.c32"; - # Submenulink auf sich selbst - $pxedata = get_node_data($pxeDN,array("filename")); - $entry ['submenulink'] = "self"; - - $pos = preg_replace ( '/0([0-9])/', '$1', $menpos); - increment_menupositions($pxeDN,$pos); # andere jeweils um 1 erhöhen - if (ldap_add($ds,$meDN,$entry)){ - $mesg .= "Textzeile erfolgeich an Position ".$menpos." eingetragen"; - }else{ - $mesg .= "Fehler beim eintragen der Textzeile!"; - } - $url = "pxe_bootmenue.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - } -} - - -elseif ($typ == "leer" && $typ != "newme" && $typ != "local" && $typ != "text" && $typ != "submenu" ){ - - # Menu Position - $menpos = $_POST['leerpos']; - if ($menpos != ""){ - # Syntaxcheck Menüposition - #$syntax = new Syntaxcheck; - #if (!($syntax->check_menuposition($menpos))){ - # $menpos = $maxpos; - #} - }else{ - $menpos = $maxpos; - } - if (strlen($menpos) == 1){ - $menpos = "0".$menpos; - } - # nun doch führende Nullen erzwingen - # also obsolet: $menpos = preg_replace ( '/0([0-9])/', '$1', $menpos); - - # CN bilden - $brothers = get_menuentries($pxeDN,array("dn","cn")); - $i=1; - $leercn = "leerzeile".$i; - if(count($brothers) != 0){ - for ($c=0; $c<count($brothers); $c++){ - foreach ($brothers as $item){ - if ($leercn == strtolower($item['cn'])){ - $i++; - $leercn = "leerzeile".$i; - } - } - } - } - $meDN = "cn=".$leercn.",".$pxeDN; - $entry ['objectclass'][0] = "MenuEntry"; - $entry ['objectclass'][1] = "top"; - $entry ['cn'] = $leercn; - $entry ['menuposition'] = $menpos; - $entry ['kernel'] = "menu.c32"; - # Submenulink auf sich selbst - $pxedata = get_node_data($pxeDN,array("filename")); - $entry ['submenulink'] = "self"; - - # wieder führende Nullen weg für increment_menpos - $pos = preg_replace ( '/0([0-9])/', '$1', $menpos); - increment_menupositions($pxeDN,$pos); # andere jeweils um 1 erhöhen - if (ldap_add($ds,$meDN,$entry)){ - $mesg .= "Leerzeile erfolgeich an Position ".$menpos." eingetragen"; - }else{ - $mesg .= "Fehler beim eintragen der Leerzeile!"; - } - $url = "pxe_bootmenue.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; -} - - -elseif ($typ == "submenu" && $typ != "newme" && $typ != "local" && $typ != "text" && $typ != "leer" ){ -} - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/menuentry_change.php b/ldap-site-mngmt/webinterface/computers/menuentry_change.php deleted file mode 100644 index bf461f1f..00000000 --- a/ldap-site-mngmt/webinterface/computers/menuentry_change.php +++ /dev/null @@ -1,208 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$mecn = $_POST['mecn']; $mecn = htmlentities($mecn); -$oldmecn = $_POST['oldmecn']; - -$menpos = $_POST['menpos']; -if (strlen($menpos) == 1){ - $menpos = "0".$menpos; -} -$oldmenpos = $_POST['oldmenpos']; -if (strlen($oldmenpos) == 1){ - $oldmenpos = "0".$oldmenpos; -} - -$meDN = $_POST['medn']; -$pxeDN = $_POST['pxedn']; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - -$attribs = $_POST['attribs']; -if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - $atts[$key] = htmlentities($attribs[$key]); - } -} -# print_r($meatts); echo "<br><br>"; -$oldattribs = $_POST['oldattribs']; -if (count($oldattribs) != 0){ - foreach (array_keys($oldattribs) as $key){ - $oldatts[$key] = htmlentities($oldattribs[$key]); - } -} -#print_r($oldatts); echo "<br><br>"; - - - -$seconds = 2; -$get_mecn = str_replace ( " ", "_", $mecn ); -$url = "menuentry.php?dn=".$meDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -############################################## -# ME CN (DN) - -if ( $oldmecn == $mecn ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( $oldmecn != "" && $mecn != "" && $oldmecn != $mecn ){ - echo "Menü Eintrag Name aendern<br>"; - # hier noch Syntaxcheck - # Formulareingaben anpassen - $expme = explode(" ",$mecn); - foreach ($expme as $word){$expuc[] = ucfirst($word);} - $mecn = implode(" ",$expuc); - $mecn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $mecn); - - - $newmeDN = "cn=".$mecn.",".$pxeDN; - print_r($newmeDN); echo "<br><br>"; - - if(modify_me_dn($meDN, $newmeDN)){ - $mesg = "Menü Eintrag Name erfolgreich geändert<br><br>"; - $meDN = $newmeDN; - }else{ - $mesg = "Fehler beim ändern des PMenü Eintrag Namen!<br><br>"; - } - - - # newsubmenu holen... - $url = "menuentry.php?dn=".$newmeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; -} - -if ( $oldmecn != "" && $mecn == "" ){ - echo "Menü Eintrag Name loeschen!<br> - Dieses ist Teil des DN, Sie werden den Menü Eintrag komplett löschen<br><br>"; - echo "Wollen Sie den Menü Eintrag <b>".$oldmecn."</b> wirklich löschen?<br><br> - <form action='menuentry_delete.php' method='post'> - Falls ja:<br><br> - <input type='hidden' name='dn' value='".$meDN."'> - <input type='hidden' name='name' value='".$oldmecn."'> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'><br><br> - </form> - <form action='".$url."' method='post'> - Falls, nein:<br><br> - <input type='Submit' name='apply' value='zurück' class='small_loginform_button'> - </form>"; - $seconds = 600; -} - - -################################### -# Menu Position - -if ( $menpos == $oldmenpos || $menpos == "" ){ - # keine Änderung -} - -if ( $menpos != "" && $oldmenpos != $menpos ){ - echo "Menü Position ändern<br><br>"; - # Syntax Check fehlt noch - - # switch partner finden - $secmeDN = get_dn_menuposition($pxeDN,$menpos); - $entrysec ['menuposition'] = $oldmenpos; - if (ldap_mod_replace($ds,$secmeDN,$entrysec)){ - $entry ['menuposition'] = $menpos; - if (ldap_mod_replace($ds,$meDN,$entry)){ - #cleanup_menupositions($pxeDN); - $mesg .= "Menü Position erfolgeich nach <b>".$menpos."</b> geändert"; - }else{ - $mesg .= "Fehler beim ändern der Menü Position!"; - } - }else{ - $mesg .= "Fehler beim ändern der Menü Position!"; - } -} - -################################### -# restliche Attribute - -$entryadd = array(); -$entrymod = array(); -$entrydel = array(); - -foreach (array_keys($atts) as $key){ - - if ( $oldatts[$key] == $atts[$key] ){ - # nix - } - if ( $oldatts[$key] == "" && $atts[$key] != "" ){ - # hier noch Syntaxcheck - $entryadd[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] != "" && $oldatts[$key] != $atts[$key] ){ - # hier noch Syntaxcheck - $entrymod[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] == "" ){ - # hier noch Syntaxcheck - $entrydel[$key] = $oldatts[$key]; - } -} -#print_r($entryadd); echo "<br>"; -#print_r($entrymod); echo "<br>"; -#print_r($entrydel); echo "<br>"; - -if (count($entryadd) != 0 ){ - #print_r($entryadd); echo "<br>"; - #echo "neu anlegen<br>"; - foreach (array_keys($entryadd) as $key){ - $addatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_add($ds,$meDN,$entryadd)){ - $mesg = "Attribute ".$addatts." erfolgreich eingetragen<br><br>"; - }else{ - $mesg = "Fehler beim eintragen der Attribute ".$addatts."<br><br>"; - } -} - -if (count($entrymod) != 0 ){ - #print_r($entrymod); echo "<br>"; - #echo "ändern<br>"; - foreach (array_keys($entrymod) as $key){ - $modatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_replace($ds,$meDN,$entrymod)){ - $mesg = "Attribute ".$modatts." erfolgreich geaendert<br><br>"; - }else{ - $mesg = "Fehler beim aendern der Attribute ".$modatts."<br><br>"; - } -} - -if (count($entrydel) != 0 ){ - #print_r($entrydel); echo "<br>"; - #echo "löschen<br>"; - foreach (array_keys($entrydel) as $key){ - $delatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_del($ds,$meDN,$entrydel)){ - $mesg = "Attribute ".$delatts." erfolgreich geloescht<br><br>"; - }else{ - $mesg = "Fehler beim loeschen der Attribute ".$delatts."<br><br>"; - } -} - -################################### -# Ende, noch Redirect - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/menuentry_delete.php b/ldap-site-mngmt/webinterface/computers/menuentry_delete.php deleted file mode 100644 index ba06eb55..00000000 --- a/ldap-site-mngmt/webinterface/computers/menuentry_delete.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$meDN = $_POST['dn']; -$mecn = $_POST['name']; - -$pxeDN = $_POST['pxedn']; - -$seconds = 1; -$url = $_POST['successurl']; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $meDN != ""){ - - if ( dive_into_tree_del($meDN,"") ){ - cleanup_menupositions($pxeDN); - $mesg = "Bootmenü Eintrag <b>".$mecn."</b> erfolgreich gelöscht!<br><br>"; - } - else{ - $mesg = "Fehler beim löschen des Bootmenü Eintrags <b>".$mecn."</b> !<br><br>"; - } - -} - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/menuposition_down.php b/ldap-site-mngmt/webinterface/computers/menuposition_down.php deleted file mode 100644 index 53e82a21..00000000 --- a/ldap-site-mngmt/webinterface/computers/menuposition_down.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$meDN = $_GET['dn']; -$oldpos = $_GET['pos']; - -$pxeDN = $_GET['pxedn']; -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; -$mcnr = $_GET['mcnr']; - -$me = get_menuentries($pxeDN,array("cn")); -$maxpos = count($me); - -$oldpos = preg_replace ( '/0([0-9])/', '$1', $oldpos); -if ($oldpos < $maxpos){ - - $newpos = $oldpos +1; - if (strlen($newpos) == 1){ - $newpos = "0".$newpos; - } - if (strlen($oldpos) == 1){ - $oldpos = "0".$oldpos; - } - - if ($secmeDN = get_dn_menuposition($pxeDN,$newpos)){ - #echo "other meDN:"; print_r($secmeDN); echo "<br>"; - $entrysec ['menuposition'] = $oldpos; - if ($result = ldap_mod_replace($ds,$secmeDN,$entrysec)){ - $entrymenu ['menuposition'] = $newpos; - $result = ldap_mod_replace($ds,$meDN,$entrymenu); - } - } -} -$seconds = 0; -$url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr."&#menu"; -$mesg = ""; -#$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> -# Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/menuposition_up.php b/ldap-site-mngmt/webinterface/computers/menuposition_up.php deleted file mode 100644 index 4a314aca..00000000 --- a/ldap-site-mngmt/webinterface/computers/menuposition_up.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$meDN = $_GET['dn']; -$oldpos = $_GET['pos']; - -$pxeDN = $_GET['pxedn']; -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; -$mcnr = $_GET['mcnr']; - -$oldpos = preg_replace ( '/0([0-9])/', '$1', $oldpos); -if ($oldpos != 1){ - - $newpos = $oldpos-1; - if (strlen($newpos) == 1){ - $newpos = "0".$newpos; - } - if (strlen($oldpos) == 1){ - $oldpos = "0".$oldpos; - } - - if ($secmeDN = get_dn_menuposition($pxeDN,$newpos)){ - #echo "other meDN:"; print_r($secmeDN); echo "<br>"; - $entrysec ['menuposition'] = $oldpos; - if ($result = ldap_mod_replace($ds,$secmeDN,$entrysec)){ - $entrymenu ['menuposition'] = $newpos; - $result = ldap_mod_replace($ds,$meDN,$entrymenu); - } - - } -} -$seconds = 0; -$url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr."&#menu"; -$mesg = ""; -#$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> -# Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/new_group.dwt b/ldap-site-mngmt/webinterface/computers/new_group.dwt deleted file mode 100644 index ea9accf0..00000000 --- a/ldap-site-mngmt/webinterface/computers/new_group.dwt +++ /dev/null @@ -1,101 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Neue Rechnergruppe anlegen:</h3></td> - </tr> - <tr> - <td height='20'></td> - </tr> - <tr> - <td colspan='2'><h4>Notwendige Attribute (müssen angegeben werden):</h3></td> - </tr> - - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='group_add.php' method='post'> - - <tr> - <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='55%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Gruppen Name (cn):</b><br>(Teil des dn, ohne Leerzeichen eingeben) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='groupcn' value='{GROUPCN}' size='40' class='medium_form_field'> - </td> - </tr> - - </table></td> - </tr> - <tr> - <td height='40'></td> - </tr> - <tr> - <td><h4>Optionale Attribute:</h3></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='55%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Gruppen-Rechner:</b><br>(Mehrfachauswahl möglich) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <!-- BEGIN DYNAMIC BLOCK: Members --> - - <!-- END DYNAMIC BLOCK: Members --> - - <select name='addmember[]' size='{HOSTNUMBER}' multiple class='medium_form_selectbox'> - <option selected value='none'>----------</option> - - <!-- BEGIN DYNAMIC BLOCK: Hosts --> - <option value='{HDN}_{HOSTNAME}'>{HOSTNAME}</option> - <!-- END DYNAMIC BLOCK: Hosts --> - - </select> - </td> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Gruppen Beschreibung: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='groupdesc' value='{GROUPDESC}' size='40' class='medium_form_field'> - </td> - </tr> - - - </tr> - </table></td> - </tr> - - <tr> - <td height='25'></td> - </tr> - <tr> - <td><h4>Gruppe als Group-Objekt in den DHCP Dienst aufnehmen (optional):</h3></td> - </tr> - - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>DHCP Objekt</b></td> - <td width='55%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Auswahl</b></td> - </tr> - - </table></td> - </tr> - - <tr> - <td height='5'></td> - </tr> - <tr> - <td style='border-width: 0 0 0 0;'><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'> - </form></td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/new_group.php b/ldap-site-mngmt/webinterface/computers/new_group.php deleted file mode 100644 index 6d5f4257..00000000 --- a/ldap-site-mngmt/webinterface/computers/new_group.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "new_group.dwt"; - -include('computers_header.inc.php'); - -$mnr = 2; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - - -$groupcn = str_replace ( "_", " ", $_GET['groupcn']); -$groupdesc = str_replace ( "_", " ", $_GET['groupdesc']); - - - -$template->assign(array("GROUPCN" => $groupcn, - "GROUPDESC" => $groupdesc, - "AUDN" => $auDN)); - -# DHCP Stuff ... - - -############################################## -# neues Member anlegen ... -$hosts_array = get_hosts($auDN,array("dn","hostname")); -# print_r($users_array); echo "<br><br>"; -$groups = get_groups($auDN, array("member")); -# print_r($groups); -$template->assign(array("HOSTNAME" => "")); - -if (count($groups) != 0){ - foreach ($groups as $group){ - for ($i=0; $i < count($hosts_array); $i++){ - foreach ($group['member'] as $item){ # ist hier sicher dass member ein array ist auch bei 1 member? - if ($hosts_array[$i]['dn'] == $item){ - array_splice($hosts_array, $i, 1); - $i--; - } - } - } - } -} -# if (count($users_array) != 0){ - $template->define_dynamic("Hosts", "Webseite"); - foreach ($hosts_array as $item){ - $template->assign(array("HDN" => $item['dn'], - "HOSTNAME" => $item['hostname'], - "HOSTNUMBER" => 5)); - $template->parse("HOSTS_LIST", ".Hosts"); - } - - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/new_host.dwt b/ldap-site-mngmt/webinterface/computers/new_host.dwt deleted file mode 100644 index e2ae50ba..00000000 --- a/ldap-site-mngmt/webinterface/computers/new_host.dwt +++ /dev/null @@ -1,112 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td> - <h3>Neuer Rechner in <code class='font_object'>{AU}</code> anlegen:</h3> - - </td> - </tr> - - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='host_add.php' method='post'> - - <tr> - <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Notwendiges Attribut</b></td> - <td width='55%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Rechner Name (hostname):</b><br>(Teil des dn, ohne Leerzeichen eingeben) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='hostname' value='{HOSTNAME}' size='40' class='medium_form_field'> - </td> - </tr> - - </table></td> - </tr> - <tr> - <td height='25'></td> - </tr> - <tr> - <td><h4>Optionale Attribute:</h3></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='55%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Rechner Beschreibung: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='hostdesc' value='{HOSTDESC}' size='40' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>MAC Adresse (HWAddress) :</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mac' value='{MAC}' size='17' maxlength='17' class='medium_form_field'> - Bsp.: 00:12:03:aa:54:e6 - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>IP Adresse:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='ip' value='{IP}' size='15' maxlength='15' class='medium_form_field'> - </td> - </tr><tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>DHCP: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <select name='dhcpcont' size='2' class='medium_form_selectbox'> - <option selected value='none'>----------</option> - {DHCPSELECT} - </select> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Geographic Location </b> (Gebäude, Raum, ...) <b>:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[geolocation]' value='{GEOLOC}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Geo Coordinates: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[geoattribut]' value='{GEOATT}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>HW Mouse: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[hw-mouse]' value='{MOUSE}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>HW Graphic: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[hw-graphic]' value='{GRAPHIC}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>HW Monitor: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[hw-monitor]' value='{MONITOR}' size='30' class='medium_form_field'> - </td> - </tr> - - - </table></td> - </tr> - - <tr> - <td height='5'></td> - </tr> - <tr> - <td style='border-width: 0 0 0 0;'><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'> - </form></td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/new_host.php b/ldap-site-mngmt/webinterface/computers/new_host.php deleted file mode 100644 index 4ac144bc..00000000 --- a/ldap-site-mngmt/webinterface/computers/new_host.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "new_host.dwt"; - -include('computers_header.inc.php'); - -$mnr = 0; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - - -$hostname = str_replace ( "_", " ", $_GET['hostname']); -$hostdesc = str_replace ( "_", " ", $_GET['hostdesc']); -$mac = str_replace ( "_", " ", $_GET['mac']); -$ip = str_replace ( "_", " ", $_GET['ip']); - -# DHCP Einbindung -$objecttype = "nodhcp"; -$dhcp_selectbox = ""; -$altdhcp = alternative_dhcpobjects($objecttype,"",""); -if (count($altdhcp) != 0){ - foreach ($altdhcp as $item){ - $dhcp_selectbox .= " - <option value='".$item['dn']."'>".$item['cn']." ".$item['au']."</option>"; - } -} - -$template->assign(array("HOSTNAME" => $hostname, - "HOSTDESC" => $hostdesc, - "MAC" => $mac, - "IP" => $ip, - "DHCPSELECT" => $dhcp_selectbox, - "GEOLOC" => "", - "GEOATT" => "", - "MOUSE" => "", - "GRAPHIC" => "", - "MONITOR" => "", - "AUDN" => $auDN)); - - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/new_mcdef.dwt b/ldap-site-mngmt/webinterface/computers/new_mcdef.dwt deleted file mode 100644 index 72ebf72d..00000000 --- a/ldap-site-mngmt/webinterface/computers/new_mcdef.dwt +++ /dev/null @@ -1,184 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Neue Default MachineConfig anlegen:</h3></td> - </tr> - <tr> - <td height='10'> </td> - </tr> - <tr> - <td colspan='2'><h4>Allgemein:</h4></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='mcdef_add.php' method='post'> - <tr> - <td width='30%' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'><b>Eindeutiger Name (cn):</b><br>(Bitte ohne Leerzeichen eingeben) </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'> - <font size='+2'><b>MC_</b></font><input type='Text' name='mccn' value='{MCCN}' size='50' class='medium_form_field'> - </td> - </tr> - <tr> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Machine Config <br>Beschreibung: </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcdesc' value='{MCDESC}' size='60' class='medium_form_field'> - - </td> - </tr> - <tr valign='top'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Ziel Objekt:</b><br> - (Mehrfachauswahl möglich) </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <select name='targets[]' size='8' multiple class='medium_form_selectbox'> - <option selected value='none'>----------------------------</option> - <option value='{NODEDN}'>DEFAULT</option> - - <option value='none'>----- RECHNER spezif. MC -----</option> - <!-- BEGIN DYNAMIC BLOCK: Hosts --> - <option value='{HDN}'>{HN}</option> - <!-- END DYNAMIC BLOCK: Hosts --> - - <option value='none'>----- GRUPPEN MC -----</option> - <!-- BEGIN DYNAMIC BLOCK: Groups --> - <option value='{GDN}'>{GN}</option> - <!-- END DYNAMIC BLOCK: Groups --> - </select> - </td> - </tr> - - <tr valign='top'> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Gültigkeitsdauer <br>(Time Range): </b> </td> - <td width='40%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcday' value='{MCDAY}' size='5' maxlength='5' class='medium_form_field'> - <br> - Eines der folgenden:<br> - - - <b>Datum</b> (Format: dd.mm, z.B. 21.03/01.11) <br> - - <b>Monatstag</b> (Format: dd, z.B. 01 oder 25) <br> - - <b>Wochentag</b> (Format: MO, DI, ... , SO) <br> - - <b>X</b> für <b>täglich</b> - - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcbeg' value='{MCBEG}' size='2' maxlength='2' class='medium_form_field'> - <b><font size='+1'>:00</b> - </font> - <input type='Text' name='mcend' value='{MCEND}' size='2' maxlength='2' class='medium_form_field'> - <b><font size='+1'>:59</b> Uhr</font><br> - - <b>Uhrzeit</b> (Format: hh, z.B. 07-19)<br> - - <b>X</b> für rund um die Uhr - </td> - </tr> - - </table></td> - </tr> - - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>Dienste:</h4></td> - </tr> - - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='70%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start X: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcattribs[start-x]' value='' size='10' maxlength='3' class='medium_form_field'> - ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start SNMP: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcattribs[start-snmp]' value='' size='10' maxlength='3' class='medium_form_field'> - ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start SSHD: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcattribs[start-sshd]' value='' size='10' maxlength='3' class='medium_form_field'> - ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start XDMCP: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcattribs[start-xdmcp]' value='' size='10' maxlength='3' class='medium_form_field'> - ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start RWHOD: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcattribs[start-rwhod]' value='' size='10' maxlength='3' class='medium_form_field'> - ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start PRINT DAEMON: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcattribs[start-printdaemon]' value='' size='10' maxlength='3' class='medium_form_field'> - ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>TEX Enable: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcattribs[tex-enable]' value='' size='10' maxlength='3' class='medium_form_field'> - ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Start CRON: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcattribs[start-cron]' value='' size='10' maxlength='3' class='medium_form_field'> - ( yes | no ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>CRONTAB Entries: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcattribs[crontab-entries]' value='' size='50' class='medium_form_field'> - </td> - </tr> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Language: </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcattribs[language]' value='' size='10' class='medium_form_field'> - - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>NETBIOS Workgroup: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcattribs[netbios-workgroup]' value='' size='40' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>VMWARE: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mcattribs[vmware]' value='' size='40' class='medium_form_field'> - </td> - </tr> - - <input type='hidden' name='nodedn' value='{NODEDN}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - - </table></td> - </tr> - <tr> - <td><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'> - </form></td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/new_mcdef.php b/ldap-site-mngmt/webinterface/computers/new_mcdef.php deleted file mode 100644 index e36c76bb..00000000 --- a/ldap-site-mngmt/webinterface/computers/new_mcdef.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "new_mcdef.dwt"; - -include('computers_header.inc.php'); - -$mnr = 4; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$sbmnr = $_GET['sbmnr']; -$mcnr = $_GET['mcnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$mccn = str_replace ( "_", " ", $_GET['mccn']); -$mcdesc = str_replace ( "_", " ", $_GET['mcdesc']); -$mcday = str_replace ( "_", " ", $_GET['mcday']); -$mcbeg = str_replace ( "_", " ", $_GET['mcbeg']); -$mcend = str_replace ( "_", " ", $_GET['mcend']); - - -$template->assign(array("MCCN" => $mccn, - "MCDAY" => $mcday, - "MCBEG" => $mcbeg, - "MCEND" => $mcend, - "MCDESC" => $mcdesc, - "NODEDN" => "cn=computers,".$auDN, - "MNR" => $mnr, - "SBMNR" => $sbmnr, - "MCNR" => $mcnr)); - -################################################# -# Ziel Objekt (nur Rechner und Gruppen, Default) - -$hostorgroup = $exp[0]; -$hgexp = explode('=',$exp[0]); - -$hosts_array = get_hosts($auDN,array("dn","hostname")); -$groups_array = get_groups($auDN,array("dn","cn")); - -$template->define_dynamic("Hosts", "Webseite"); -foreach ($hosts_array as $item){ - $template->assign(array("HDN" => $item['dn'], - "HN" => $item['hostname'])); - $template->parse("HOSTS_LIST", ".Hosts"); -} -$template->define_dynamic("Groups", "Webseite"); -foreach ($groups_array as $item){ - $template->assign(array("GDN" => $item['dn'], - "GN" => $item['cn'])); - $template->parse("GROUPS_LIST", ".Groups"); -} - - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/new_menuentry.dwt b/ldap-site-mngmt/webinterface/computers/new_menuentry.dwt deleted file mode 100644 index 40baf438..00000000 --- a/ldap-site-mngmt/webinterface/computers/new_menuentry.dwt +++ /dev/null @@ -1,191 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td height='20'><h4>Zurück zu <a href='pxe_bootmenue.php?dn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}' class='headerlink'>{PXECN}</a></h4></td> - </tr> - <tr> - <td height='20'> </td> - </tr> - <tr> - <td colspan='2'><h3>Neuen Boot Menü Eintrag anlegen:</h3></td> - </tr> - <tr> - <td height='20'> </td> - </tr> - <tr> - <td colspan='2'><h4>Notwendige Attribute:</h4></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='menuentry_add.php' method='post'> - - <tr> - <td width='35%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='65%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Eindeutiger Name (cn):</b><br>(Teil des dn, ohne Leerzeichen eingeben) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mecn' value='{MECN}' size='60' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Label:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[label]' value='{LABEL}' size='60' class='medium_form_field'> - </td> - </tr> - <tr height='50' valign='top'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Generische Boot Images: </b><br>(Wählen Sie eines aus) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <select name='gbm' size='10' class='large_form_selectbox'> - <option selected value='none'>-----------------------</option> - <!-- BEGIN DYNAMIC BLOCK: Rbs --> - <option value='none'>----- Abteilung {RBSAU} [{RBSCN}] -----</option> - <!-- BEGIN DYNAMIC BLOCK: Gbms --> - <option value='{GBMDN}'>{GBMCN} </option> - <!-- END DYNAMIC BLOCK: Gbms --> - <!-- END DYNAMIC BLOCK: Rbs --> - </select> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menü Position: </b><br> - (Bitte ohne führende Null) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='menpos' value='{MAXPOS}' size='2' class='medium_form_field'> - </td> - </tr> - - </table></td> - </tr> - <tr> - <td height='40'> </td> - </tr> - <tr> - <td colspan='2'><h4>Optionale Attribute:</h4></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td width='35%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='65%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Label:</b> <br>(Wird im Bootmenü statt Label angezeigt) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menulabel]' value='{MELABEL}' size='50' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Passwd:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menupasswd]' value='{MEPASSWD}' size='50' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Hide:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menuhide]' value='{MEHIDE}' size='50' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Localboot:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[localboot]' value='{LOCALBOOT}' size='50' class='medium_form_field'> - </td> - </tr> - - </table></td> - </tr> - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>APPEND Parameter:</h4></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td width='20%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='80%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Client Konfiguration via: </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[clientconfvia]' value='{CCV}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>vga: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[vga]' value='{VGA}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>splash: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[splash]' value='{SPLASH}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>vci: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[vci]' value='{VCI}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>no ldsc: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[noldsc]' value='{NOLDSC}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>elevator: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[elevator]' value='{ELEVATOR}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>apic: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[apic]' value='{APIC}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Union FS: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[unionfs]' value='{UNIONFS}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>cowloop: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[cowloop]' value='{COWLOOP}' size='30' class='medium_form_field'> - </td> - </tr> - - <input type='hidden' name='typ' value='newme'> - <input type='hidden' name='maxpos' value='{MAXPOS}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - - </table></td> - </tr> - <tr> - <td><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'> - </form></td> - </tr> - - - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/new_menuentry.php b/ldap-site-mngmt/webinterface/computers/new_menuentry.php deleted file mode 100644 index c407f5e7..00000000 --- a/ldap-site-mngmt/webinterface/computers/new_menuentry.php +++ /dev/null @@ -1,145 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "new_menuentry.dwt"; - -include('computers_header.inc.php'); - -$mnr = -1; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; -$mcnr = $_GET['mcnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$mecn = str_replace ( "_", " ", $_GET['mecn']); - -$pxeDN = $_GET['dn']; -$dnexp = ldap_explode_dn($pxeDN, 1); -$pxecn = $dnexp[0]; - -# RBS Daten -$pxe = get_node_data($pxeDN,array("rbservicedn")); -$rbsDN = $pxe['rbservicedn']; -$exp = explode(',',$rbsDN); -$exprbsau = explode('=',$exp[2]); $rbsau = $exprbsau[1]; -$rbsdata = get_node_data($rbsDN,array("cn","nfsserverip","exportpath","tftpserverip","tftppath")); - -# Anzahl Menüeinträge -$menens = get_menuentries($pxeDN,array("dn")); -$maxpos = count($menens)+1; - - -# Bootmenu Daten -$template->assign(array("MECN" => $mecn, - "LABEL" => "", - "MELABEL" => "", - "MEDEF" => "", - "MEPASSWD" => "", - "MEHIDE" => "", - "VGA" => "", - "SPLASH" => "", - "NOLDSC" => "", - "ELEVATOR" => "", - "VCI" => "", - "CCV" => "", - "APIC" => "", - "COWLOOP" => "", - "UNIONFS" => "", - "DEBUG" => "", - "LOCALBOOT" => "", - "SUBMENULINK" => "", - "MENPOS" => "", - "MAXPOS" => $maxpos, - "PXEDN" => $pxeDN, - "PXECN" => $pxecn, - "MNR" => $mnr, - "SBMNR" => $sbmnr, - "MCNR" => $mcnr)); - - -# verwendbare GBMs holen -# eigene AU (andere noch über "offer" Attribut in RBS suchen) -$rbsoffers = get_rbsoffers($auDN); -# eigene AU -if (count($rbsoffers) != 0){ - $rbservices = get_rbservices($auDN,array("dn")); - # wenn eigene RBS anbietet dann diese GBMs als erstes (oben in der Liste) - if (count($rbservices) != 0){ - foreach ($rbservices as $rbs){ - for ($i=0; $i < count($rbsoffers); $i++){ - if ($rbs['dn'] == $rbsoffers[$i]){ - array_splice($rbsoffers, $i, 1); - } - } - } - # momentan maximal ein RBS in der AU - $rbsaudn[] = $rbservices[0]['dn']; - $rbsoffsorted = array_merge($rbsaudn,$rbsoffers); - } - # sonst die GBMs des für diese PXE genutzen RBS - else{ - for ($i=0; $i < count($rbsoffers); $i++){ - if ($rbsDN == $rbsoffers[$i]){ - array_splice($rbsoffers, $i, 1); - } - } - $rbsaudn[] = $rbsDN; - $rbsoffsorted = array_merge($rbsaudn,$rbsoffers); - } -} -#print_r($rbsoffsorted);echo "<br><br>"; -# RBS Offers nun in der Reihenfolge erst eigene AU dann Rest ... -$attributes = array("dn","cn","label","kernel","initrd","nfsroot","nbdroot","ipappend"); -$template->assign(array("GBMDN" => "", - "GBMCN" => "Keine generischen Boot Images verfügbar", - "RBSCN" => "", - "RBSAU" => "")); -if (count($rbsoffsorted) != 0){ - $template->define_dynamic("Rbs", "Webseite"); - $template->define_dynamic("Gbms", "Webseite"); - - foreach ($rbsoffsorted as $rbsoff){ - $template->clear_parse("GBMS_LIST"); - #print_r($rbsoff);echo "<br><br>"; - $rbsdnexp = ldap_explode_dn($rbsoff,1); - $rbsoffcn = $rbsdnexp[0]; - $rbsoffau = $rbsdnexp[2]; - - $gbm_array = get_menuentries($rbsoff,$attributes); - if (count($gbm_array) != 0){ - - foreach ($gbm_array as $item){ - $template->assign(array("GBMDN" => $item['dn'], - "GBMCN" => $item['cn'])); - $template->parse("GBMS_LIST", ".Gbms"); - $template->clear_dynamic("Gbms"); - } - - } - $template->assign(array("RBSCN" => $rbsoffcn, - "RBSAU" => $rbsoffau)); - $template->parse("RBS_LIST", ".Rbs"); - $template->clear_dynamic("Rbs"); - - } -} - - - -################################################################################### - -include("computers_footer.inc.php"); - -?> diff --git a/ldap-site-mngmt/webinterface/computers/new_pxe.dwt b/ldap-site-mngmt/webinterface/computers/new_pxe.dwt deleted file mode 100644 index 5bb7eee4..00000000 --- a/ldap-site-mngmt/webinterface/computers/new_pxe.dwt +++ /dev/null @@ -1,165 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Neues PXE Boot Menü anlegen:</h3></td> - </tr> - <tr> - <td height='10'> </td> - </tr> - <tr> - <td colspan='2'><h4>Allgemein:</h4></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='pxe_add.php' method='post'> - <tr> - <td width='30%' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'><b>Eindeutiger Name (cn):</b><br>(Bitte ohne Leerzeichen eingeben) </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'> - <font size='+2'><b>PXE_</b></font><input type='Text' name='pxecn' value='{PXECN}' size='50' class='medium_form_field'> - </td> - </tr> - <!--<tr valign='top'> - <td width='30%' class='tab_d'><b>Remote Boot Dienst <br> - auswählen: </b> </td> - <td colspan='2' class='tab_d'> - <select name='rbs' size='5' class='medium_form_selectbox'> - <option selected value='none'>----------</option> - - <!-- BEGIN DYNAMIC BLOCK: Altrbs --> - <option value='{ALTRBSDN}'>{ALTRBSCN} {ALTRBSAU}</option> - <!-- END DYNAMIC BLOCK: Altrbs --> - - </select> - </td> - </tr>--> - <tr valign='top'> - <td class='tab_d'><b>Ziel Objekt:</b><br> - (Mehrfachauswahl möglich) </td> - <td colspan='2' class='tab_d'> - <select name='targets[]' size='8' multiple class='medium_form_selectbox'> - <option selected value='none'>----- RECHNER spezif. PXE -----</option> - <!-- BEGIN DYNAMIC BLOCK: Hosts --> - <option value='{HDN}'>{HN}</option> - <!-- END DYNAMIC BLOCK: Hosts --> - - <option value='none'>----- GRUPPEN spezif. PXE -----</option> - <!-- BEGIN DYNAMIC BLOCK: Groups --> - <option value='{GDN}'>{GN}</option> - <!-- END DYNAMIC BLOCK: Groups --> - </select> - </td> - </tr> - <tr valign='top'> - <td width='30%' class='tab_d'><b>Gültigkeitsdauer <br>(Time Range): </b> </td> - <td width='40%' class='tab_d'> - <input type='Text' name='pxeday' value='{PXEDAY}' size='5' maxlength='5' class='medium_form_field'> - <br> - Eines der folgenden:<br> - - - <b>Datum</b> (Format: dd.mm, z.B. 21.03/01.11) <br> - - <b>Monatstag</b> (Format: dd, z.B. 01 oder 25) <br> - - <b>Wochentag</b> (Format: MO, DI, ... , SO) <br> - - <b>X</b> für <b>täglich</b> - - <td width='30%' class='tab_d'> - <input type='Text' name='pxebeg' value='{PXEBEG}' size='2' maxlength='2' class='medium_form_field'> - <b><font size='+1'>:00</b> - </font> - <input type='Text' name='pxeend' value='{PXEEND}' size='2' maxlength='2' class='medium_form_field'> - <b><font size='+1'>:59</b> Uhr</font><br> - - <b>Uhrzeit</b> (Format: hh, z.B. 07-19)<br> - - <b>X</b> für rund um die Uhr - </td> - </tr> - - </table></td> - </tr> - - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>Globale PXE Parameter:</h4></td> - </tr> - - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td width='30%' class='tab_h'><b>Attribut</b></td> - <td width='70%' class='tab_h'><b>Wert</b></td> - </tr> - - <tr> - <td class='tab_d'><b>Default: </b> </td> - <td class='tab_d'> - <select name='attribs[default]' size='2' class='small_form_selectbox'> - <option selected value='vesamenu.c32'>vesamenu.c32</option> - <option value='menu.c32'>menu.c32</option> - </select> - </td> - </tr> - <tr> - <td class='tab_d'><b>Menu Title: </b> </td> - <td class='tab_d'> - <input type='Text' name='attribs[menutitle]' value='{MENTIT}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td class='tab_d'><b>Menu Master Passwd: </b> </td> - <td class='tab_d'> - <input type='Text' name='attribs[menumasterpasswd]' value='{MENMPW}' size='20' class='medium_form_field'> - </td> - </tr> - <tr> - <td class='tab_d'><b>Timeout: </b> </td> - <td class='tab_d'> - <input type='Text' name='attribs[timeout]' value='{TIMEOUT}' size='10' class='medium_form_field'> - </td> - </tr> - <tr> - <td class='tab_d'><b>No Escape: </b> </td> - <td class='tab_d'> - <input type='Text' name='attribs[noescape]' value='{NOESC}' size='10' class='medium_form_field'> - </td> - </tr> - <tr> - <td class='tab_d'><b>Prompt: </b> </td> - <td class='tab_d'> - <input type='Text' name='attribs[prompt]' value='{PROMPT}' size='10' class='medium_form_field'> - </td> - </tr> - <tr> - <td class='tab_d'><b>Allow Options: </b> </td> - <td class='tab_d'> - <input type='Text' name='attribs[allowoptions]' value='{ALLOW}' size='10' class='medium_form_field'> - </td> - </tr> - <tr> - <td class='tab_d'><b>On Error: </b> </td> - <td class='tab_d'> - <input type='Text' name='attribs[onerror]' value='{ONERR}' size='20' class='medium_form_field'> - </td> - </tr> - <tr> - <td class='tab_d'><b>ON Timeout: </b> </td> - <td class='tab_d'> - <input type='Text' name='attribs[ontimeout]' value='{ONTIME}' size='20' class='medium_form_field'> - </td> - </tr> - <!--<tr> - <td class='tab_d'><b>Client-Conf Dateiname <br>(File URI): </td> - <td class='tab_d'> - <input type='Text' name='conffile' value='{FILEURI}' size='50' class='medium_form_field'> - - </td> - </tr>--> - - <input type='hidden' name='mnr' value='{MNR}'> - </table></td> - </tr> - <tr> - <td><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'> - </form></td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/new_pxe.php b/ldap-site-mngmt/webinterface/computers/new_pxe.php deleted file mode 100644 index 3c4be824..00000000 --- a/ldap-site-mngmt/webinterface/computers/new_pxe.php +++ /dev/null @@ -1,115 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "new_pxe.dwt"; - -include('computers_header.inc.php'); - -$mnr = 2; -$sbmnr = 0; -$mcnr = -1; - -################################################################################### - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$pxecn = str_replace ( "_", " ", $_GET['pxecn']); -$pxeday = str_replace ( "_", " ", $_GET['pxeday']); -$pxebeg = str_replace ( "_", " ", $_GET['pxebeg']); -$pxeend = str_replace ( "_", " ", $_GET['pxeend']); - -$template->assign(array("PXECN" => $pxecn, - "PXEDAY" => $pxeday, - "PXEBEG" => $pxebeg, - "PXEEND" => $pxeend, - #"FILEURI" => "", - "RBS" => "", - "RBSAU" => "", - "FILE" => "", - "ALLOW" => "", - #"CONSOLE" => "", - #"DISPLAY" => "", - #"FONT" => "", - "IMPLICIT" => "", - #"KBDMAP" => "", - "MENMPW" => "", - "MENTIT" => "", - "NOESC" => "1", - "ONERR" => "", - "ONTIME" => "", - "PROMPT" => "0", - #"SAY" => "", - "SERIAL" => "", - "TIMEOUT" => "600", - "NODEDN" => "cn=rbs,".$auDN, - "HDN" => "none", - "HN" => "", - "GDN" => "none", - "GN" => "", - "MNR" => $mnr)); - -############################################# -# RB Dienste holen -$rbsoffers = get_rbsoffers($auDN); - -$template->assign(array("ALTRBSDN" => "", - "ALTRBSCN" => "", - "ALTRBSAU" => "")); - -if (count($rbsoffers) != 0){ -$template->define_dynamic("Altrbs", "Webseite"); - foreach ($rbsoffers as $item){ - $rbsdnexp = ldap_explode_dn($item,1); - $rbsoffcn = $rbsdnexp[0]; - $rbsoffau = $rbsdnexp[2]; - #$auexp = explode(',',$item['auDN']); - #$altrbsau = explode('=',$auexp[0]); - $template->assign(array("ALTRBSDN" => $item, - "ALTRBSCN" => $rbsoffcn, - "ALTRBSAU" => " [ Abt.: ".$rbsoffau." ]")); - $template->parse("ALTRBS_LIST", ".Altrbs"); - } -} - -################################################# -# Ziel Objekt (nur Rechner und Gruppen, nicht Default) - -$hostorgroup = $exp[0]; -$hgexp = explode('=',$exp[0]); - -$hosts_array = get_hosts($auDN,array("dn","hostname","hlprbservice","hwaddress"),""); -if ( count($hosts_array) != 0 ){ - $template->define_dynamic("Hosts", "Webseite"); - foreach ($hosts_array as $item){ - # Nur Hosts die in DHCP/TFTP angemeldet und deren MAC eingetragen ist (für PXE-Filename) - if ( $item['hlprbservice'] != "" && $item['hwaddress'] != "" ){ - $template->assign(array("HDN" => $item['dn'], - "HN" => $item['hostname'])); - $template->parse("HOSTS_LIST", ".Hosts"); - } - } -} - -$groups_array = get_groups($auDN,array("dn","cn","hlprbservice")); -if ( count($groups_array) != 0 ){ - $template->define_dynamic("Groups", "Webseite"); - foreach ($groups_array as $item){ - if ( $item['hlprbservice'] != "" ){ - $template->assign(array("GDN" => $item['dn'], - "GN" => $item['cn'])); - $template->parse("GROUPS_LIST", ".Groups"); - } - } -} - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/no_ip.dwt b/ldap-site-mngmt/webinterface/computers/no_ip.dwt deleted file mode 100644 index 5bc09796..00000000 --- a/ldap-site-mngmt/webinterface/computers/no_ip.dwt +++ /dev/null @@ -1,11 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Diese Funktion steht Ihnen nicht zur Verfügung. </h3> - Sie verfügen über keine IP Adressen, die Sie an Rechner, DHCP Subnetze vergeben, - bzw. an untergeordnete AUs delegieren können.</td> - </tr> - <tr> - <td height='10'></td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/no_ip.php b/ldap-site-mngmt/webinterface/computers/no_ip.php deleted file mode 100644 index bfda6f02..00000000 --- a/ldap-site-mngmt/webinterface/computers/no_ip.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "no_ip.dwt"; - -include("computers_header.inc.php"); - -############################################################################### - -$mnr = 2; -$sbmnr = -1; -$mcnr = -1; - -$mnr = $_GET['mnr']; - -# Menuleiste erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -############################################################################### - -############################################################################### - -include("computers_footer.inc.php"); - -?> diff --git a/ldap-site-mngmt/webinterface/computers/pxe.dwt b/ldap-site-mngmt/webinterface/computers/pxe.dwt deleted file mode 100644 index 8ce34d26..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxe.dwt +++ /dev/null @@ -1,171 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - - <tr> - <td colspan='4' height='20'><h4><a href='pxeconfigs.php' class='headerlink'><< Zurück zur Übersicht PXE Configs</a></h4></td> - </tr> - <tr> - <td height='20'> </td> - </tr> - - <tr> - <td colspan='4'><h3>PXE Konfiguration <code class='font_object'> {PXECN} </code> </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 1;'><h4><code class='font_object'>Allgemein</code></h4></td> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{OPTLINK} Global Options </a></h4></td> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{BMLINK} Bootmenue </a></h4></td> - <td> </td> - </tr> - - <tr> - <td height='40'></td> - </tr> - - <tr><td colspan='4'> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='pxe_change.php' method='post'> - - <tr> - <td width='25%' class='tab_d'><b>Eindeutiger Name (cn):</b><br>(Bitte ohne Leerzeichen eingeben) </td> - <td width='5%' class='tab_d'> </td> - <td colspan='2' class='tab_d'> - <font size='+2'><b>PXE_</b></font><input type='Text' name='pxecn' value='{PXECN}' size='50' class='medium_form_field'> - <input type='hidden' name='oldpxecn' value='{PXECN}'> - </td> - </tr> - </table> - <tr> - <td height='20'></td> - </tr> - - - - <tr><td colspan='4'> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr> - <td colspan='4' class='tab_h'><h4>PXE Konfiguration zuordnen (mit Time Range):</h4></td> - </tr> - <tr valign='top'> - <td class='tab_d'><b>Rechner / Gruppen</b><br> - (Mehrfachauswahl <br>möglich) </td> - <td class='tab_d'> </td> - <td class='tab_d'> - <select name='targethosts[]' size='8' multiple class='small_form_selectbox'> - <option selected value='none'>----- RECHNER -----</option> - <!-- BEGIN DYNAMIC BLOCK: Hosts --> - <option value='{HDN}'>{HN}</option> - <!-- END DYNAMIC BLOCK: Hosts --> - </select> - </td> - <td class='tab_d'> - <select name='targetgroups[]' size='8' multiple class='small_form_selectbox'> - <option selected value='none'>----- GRUPPEN -----</option> - <!-- BEGIN DYNAMIC BLOCK: Groups --> - <option value='{GDN}'>{GN}</option> - <!-- END DYNAMIC BLOCK: Groups --> - </select> - </td> - </tr> - - <tr valign='top'> - <td width='25%' class='tab_d_ohne'><b>Gültigkeitsdauer <br>(Time Range(s)): </b><br> - Zum Löschen einer Time Range<br>Häkchen setzen </td> - <td width='5%' class='tab_d_ohne'> </td> - <td width='35%' class='tab_d_ohne'> - Eines der folgenden:<br> - - - <b>Datum</b> (dd.mm, z.B. 21.03/01.11) <br> - - <b>Monatstag</b> (dd, z.B. 01 oder 25) <br> - - <b>Wochentag</b> (MO, DI, ... , SO) <br> - - <b>X</b> für <b>täglich</b> - - <td width='35%' class='tab_d_ohne'> - - <b>Uhrzeit</b> (Format: hh, z.B. 07-19)<br> - - <b>X</b> für rund um die Uhr - - </td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: TRanges --> - <tr valign='top'> - <td width='25%' class='tab_d_ohne'> </td> - <td width='5%' class='tab_d_ohne'> - <input type='checkbox' name='deltr[]' value='{PXEDAY}_{PXEBEG}_{PXEEND}'> - </td> - <td width='35%' class='tab_d_ohne'> - <input type='Text' name='pxeday[]' value='{PXEDAY}' size='5' maxlength='5' class='medium_form_field'> - <input type='hidden' name='oldpxeday[]' value='{PXEDAY}'> <br> - - - <td width='35%' class='tab_d_ohne'> - <input type='Text' name='pxebeg[]' value='{PXEBEG}' size='2' maxlength='2' class='medium_form_field'> - <input type='hidden' name='oldpxebeg[]' value='{PXEBEG}'> <b><font size='+1'>:00</b> - </font> - <input type='Text' name='pxeend[]' value='{PXEEND}' size='2' maxlength='2' class='medium_form_field'> - <input type='hidden' name='oldpxeend[]' value='{PXEEND}'> <b><font size='+1'>:59</b> Uhr</font><br> - </td> - </tr> - <!-- END DYNAMIC BLOCK: TRanges --> - - <tr> - <td class='tab_d'>Neue Time Range hinzufügen </td> - <td class='tab_d'> </td> - <td class='tab_d'> - <input type='Text' name='newpxeday' value='' size='5' maxlength='5' class='medium_form_field'> - - <td class='tab_d'> - <input type='Text' name='newpxebeg' value='' size='2' maxlength='2' class='medium_form_field'> - <b><font size='+1'>:00</b> - </font> - <input type='Text' name='newpxeend' value='' size='2' maxlength='2' class='medium_form_field'> - <b><font size='+1'>:59</b> Uhr</font><br> - - </td> - </tr> - - </table></td> - </tr> - <tr> - <td> - <input type='hidden' name='nodedn' value='{NODEDN}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='oldpxecn' value='{PXECN}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - <input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - <tr> - <td height='60'></td> - </tr> - - <tr> - <td colspan='4'><h4>PXE Boot Menü <code class='font_object'>{PXECN}</code> löschen:</h4></td> - </tr> - <tr> - <td colspan='4'> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'> - <form action='delete_confirm.php' method='post'> - - - <tr> - <td class='tab_d_ohne'> - Die PXE Config wird inklusive aller Client-Zuordnungen auf sie komplett gelöscht. - </tr> - - <input type='hidden' name='dn' value='{PXEDN}'> - <input type='hidden' name='name' value='{PXECN}'> - <input type='hidden' name='delurl' value='pxe_delete.php'> - <input type='hidden' name='successurl' value='{NODETYP}.php?dn={NODEDN}&mnr={MNR}&sbmnr={SBMNR}'> - <input type='hidden' name='backurl' value='pxe.php?dn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}'> - - </table></td> - </tr><tr><td> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'> - </form></td></tr> - -</table> diff --git a/ldap-site-mngmt/webinterface/computers/pxe.php b/ldap-site-mngmt/webinterface/computers/pxe.php deleted file mode 100644 index f92146a2..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxe.php +++ /dev/null @@ -1,129 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "pxe.dwt"; - -include('computers_header.inc.php'); - -$mnr = -1; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$mnr = $_GET['mnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$pxeDN = $_GET['dn']; - -$template->assign(array("HDN" => "", - "HN" => "", - "GDN" => "", - "GN" => "")); - -# DN, CN des übergeordneten Nodes (Host oder Group) -$pxednarray = ldap_explode_dn($pxeDN, 0); -$nodeDN = implode(',',array_slice($pxednarray,2)); -#$nodeDN = $_GET['nodedn']; -$nodednarray = ldap_explode_dn($nodeDN, 1); - -$attributes = array("dn","cn","rbservicedn","filename","timerange","allowoptions","console","default", - "display","font","implicit","kbdmap","menumasterpasswd","menutitle", - "noescape","onerror","ontimeout","prompt","say","serial","timeout","ldapuri","fileuri"); -$pxe = get_node_data($pxeDN,$attributes); - -# RBS Daten -$rbsDN = $pxe['rbservicedn']; -$rbsdata = get_node_data($rbsDN,array("cn","tftpserverip","tftppath","tftpclientconfpath")); - -# Timerange Komponenten -$template->define_dynamic("TRanges", "Webseite"); -if (count($pxe['timerange']) > 1){ - foreach($pxe['timerange'] as $tr){ - $exptime = explode('_',$tr); - $template->assign(array("PXEDAY" => $exptime[0], - "PXEBEG" => $exptime[1], - "PXEEND" => $exptime[2])); - $template->parse("TRANGES_LIST", ".TRanges"); - } -}else{ - $exptime = explode('_',$pxe['timerange']); - $template->assign(array("PXEDAY" => $exptime[0], - "PXEBEG" => $exptime[1], - "PXEEND" => $exptime[2])); - $template->parse("TRANGES_LIST", ".TRanges"); -} - - -$expcn = explode('_',$pxe['cn']); -$name = array_slice($expcn,1); -$pxecn = implode('_',$name); - - -$template->assign(array("PXEDN" => $pxeDN, - "PXECN" => $pxecn, - "TIMERANGE" => $pxe['timerange'], - "NODEDN" => $nodeDN, - "NODE" => $nodednarray[0], - "DEFDN" => "cn=rbs,".$auDN, - "OPTLINK" => "<a href='pxe_globals.php?dn=".$pxeDN."&mnr=".$mnr."' class='headerlink'>", - "BMLINK" => "<a href='pxe_bootmenue.php?dn=".$pxeDN."&mnr=".$mnr."' class='headerlink'>", - "MNR" => $mnr, - "SBMNR" => $sbmnr, - "MCNR" => $mcnr)); - - - - -################################################ -# PXE zuordnen - -$hostorgroup = $exp[0]; -$hgexp = explode('=',$exp[0]); - - -$hosts_array = get_hosts($auDN,array("dn","hostname"),""); -$groups_array = get_groups($auDN,array("dn","cn")); - -$template->define_dynamic("Hosts", "Webseite"); -foreach ($hosts_array as $item){ - $template->assign(array("HDN" => $item['dn'], - "HN" => $item['hostname'])); - $template->parse("HOSTS_LIST", ".Hosts"); -} -$template->define_dynamic("Groups", "Webseite"); -foreach ($groups_array as $item){ - $template->assign(array("GDN" => $item['dn'], - "GN" => $item['cn'])); - $template->parse("GROUPS_LIST", ".Groups"); -} - -$dnexp = ldap_explode_dn($pxeDN, 1); -if ($dnexp[2] == "computers"){ - $nodetyp = "rbshost"; -} -if ($dnexp[2] == "groups"){ - $nodetyp = "group"; -} -# falls TR vorhanden dann soll sie gelöscht werden (flag deltr setzen) -if (count($pxe['timerange']) != 0){ - $template->assign(array("DELTR" => "1", - "NODETYP" => $nodetyp)); -} -else{ - $template->assign(array("DELTR" => "0", - "NODETYP" => $nodetyp)); -} - -################################################################################### - -include("computers_footer.inc.php"); - -?> diff --git a/ldap-site-mngmt/webinterface/computers/pxe_add.php b/ldap-site-mngmt/webinterface/computers/pxe_add.php deleted file mode 100644 index db1dabe2..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxe_add.php +++ /dev/null @@ -1,228 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$pxecn = $_POST['pxecn']; $pxecn = htmlentities($pxecn); -#$rbsDN = $_POST['rbs']; - -$pxeday = $_POST['pxeday']; $pxeday = htmlentities($pxeday); -$pxebeg = $_POST['pxebeg']; $pxebeg = htmlentities($pxebeg); -$pxeend = $_POST['pxeend']; $pxeend = htmlentities($pxeend); - -$conffile = $_POST['conffile']; $conffile = htmlentities($conffile); - -$mnr = $_POST['mnr']; - -$targets = $_POST['targets']; -#print_r($targets); echo "<br>"; -$n = array_keys($targets,'none'); -#print_r($n); echo "<br>"; -for ($i=0; $i<count($n); $i++){ - $match = array_search('none',$targets); - array_splice($targets, $match, 1); -} -#echo "Zielobjekte: ";print_r($targets); echo "<br>"; - -$pxeattribs = $_POST['attribs']; -if (count($pxeattribs) != 0){ - foreach (array_keys($pxeattribs) as $key){ - $pxeatts[$key] = htmlentities($pxeattribs[$key]); - } -} -# print_r($mcatts); echo "<br><br>"; - -$seconds = 20; -$get_pxecn = str_replace ( " ", "_", $pxecn ); -$get_pxeday = str_replace ( " ", "_", $pxeday ); -$get_pxebeg = str_replace ( " ", "_", $pxebeg ); -$get_pxeend = str_replace ( " ", "_", $pxeend ); -$url = "new_pxe.php?pxecn=".$get_pxecn."&pxeday=".$get_pxeday."&pxebeg=".$get_pxebeg."&pxeend=".$get_pxeend."&mnr=".$mnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $pxecn != "" && $pxecn != "Hier_PXE_NAME_eintragen" && $rbsDN != "none" ){ - - $pxecn = "PXE_".$pxecn; - # Formulareingaben anpassen - $exppxe = explode(" ",$pxecn); - foreach ($exppxe as $word){$expuc[] = ucfirst($word);} - $pxecn = implode(" ",$expuc); - $pxecn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $pxecn); - - $pxetimerange = ""; - $nomac = 0; - - if (count($targets) != 0){ - foreach ($targets as $targetDN){ - - $exptargetdn = ldap_explode_dn($targetDN, 1); - $targetcn = $exptargetdn[0]; - $targettype = $exptargetdn[1]; - - # falls Target keine MAC hat dann kann keine PXE angelegt werden - # jetzt schon vorher bei der Zielobjektauswahl abgefangen - if ($targettype == "computers"){ - $macdata = get_node_data($targetDN, array("hwaddress")); - if ($macdata['hwaddress'] == ""){ - $nomac = 1; - echo "Für den Ziel-Rechner ist keine MAC Adresse eingetragen <br> - Das PXE Bootmenü wird nicht angelegt. <br> - <br> - Tragen Sie zuerst eine MAC ein!<br><br>"; - } - } - if ($targettype == "groups"){ - $members = get_node_data($targetDN, array("member")); - if (count($members) > 1){ - foreach ($members['member'] as $hostDN){ - $macdata = get_node_data($hostDN, array("hwaddress","hostname")); - if ($macdata['hwaddress'] == ""){ - $nomac = 1; - echo "Für den Gruppen-Rechner <b>".$macdata['hostname']."</b> ist keine MAC Adresse eingetragen <br> - Das PXE Bootmenü für die Gruppe wird nicht angelegt. <br> - <br> - Tragen Sie zuerst bei Rechner <b>".$macdata['hostname']."</b> eine MAC ein!<br><br>"; - } - } - } - if (count($members) == 1){ - $macdata = get_node_data($members['member'], array("hwaddress")); - if ($macdata['hwaddress'] == ""){ - $nomac = 1; - echo "Für den Gruppen-Rechner <b>".$macdata['hostname']."</b> ist keine MAC Adresse eingetragen <br> - Das PXE Bootmenü für die Gruppe wird nicht angelegt. <br> - <br> - Tragen Sie zuerst bei Rechner <b>".$macdata['hostname']."</b> eine MAC ein!<br><br>"; - } - } - } - - # Check auf eindeutigen PXE-Namen (könnte man erweitern auf kompletten RBS) - $brothers = get_pxeconfigs($targetDN,array("cn")); - $brother = 0; - foreach ($brothers as $item){ - if( $item['cn'] == $pxecn ){ - $mesg = "Es existiert bereits ein PXE Boot Menü mit dem eingegebenen Namen!<br> - Bitte geben Sie einen anderen Namen ein.<br><br>"; - $url = "new_pxe.php?pxecn=".$get_pxecn."&pxeday=".$get_pxeday."&pxebeg=".$get_pxebeg."&pxeend=".$get_pxeend."&mnr=".$mnr."&sbmnr=".$sbmnr; - $brother = 1; - break; - } - } - if ($brother == 0 && $nomac == 0){ - - if ( $pxeday != "" && $pxebeg != "" && $pxeend != "" && $pxebeg <= $pxeend ){ - - # TimeRange Syntax checken - $syntax = new Syntaxcheck; - if ($syntax->check_timerange_syntax($pxeday,$pxebeg,$pxeend)){ - - # in Grossbuchstaben - if (preg_match("/([a-z]+)/",$pxeday)){$pxeday = strtoupper($pxeday);} - if (preg_match("/([a-z]+)/",$pxebeg)){$pxebeg = strtoupper($pxebeg);} - if (preg_match("/([a-z]+)/",$pxeend)){$pxeend = strtoupper($pxeend);} - - # führende Nullen weg - $pxebeg = preg_replace ( '/0([0-9])/', '$1', $pxebeg); - $pxeend = preg_replace ( '/0([0-9])/', '$1', $pxeend); - - # TimeRange auf Ãœberschneidung mit vorhandenen checken - if(check_timerange_pxe($pxeday,$pxebeg,$pxeend,$targetDN,"")){ - $pxetimerange = $pxeday."_".$pxebeg."_".$pxeend; - } - else{ - $mesg = "Es existiert bereits ein PXE Boot Menü, das sich mit der eingegebenen Time Range - überschneidet!<br> - Das neue PXE Boot Menü wird ohne Time Range angelegt.<br> - Bitte geben Sie diese anschließend ein.<br><br>"; - } - } - else{ - $mesg = "Falsche Syntax in der Time-Range-Eingabe! Das neue PXE Boot Menü wird ohne Time Range angelegt.<br> - Bitte geben Sie diese anschließend ein.<br><br>"; - } - } - else{ - $mesg = "Keine vollständige Time-Range-Eingabe! Das neue PXE Boot Menü wird ohne Time Range angelegt.<br> - Bitte geben Sie diese anschließend ein.<br><br>"; - } - - $pxeDN = "cn=".$pxecn.",".$targetDN; - - - # PXE Dateinamen bestimmen, MAC(s) - $filenames = array(); - if ($targettype == "computers"){ - $macdata = get_node_data($targetDN, array("hwaddress")); - $pxemac = str_replace (":","-",$macdata['hwaddress']); - $filenames[] = "01-".$pxemac; - } - if ($targettype == "groups"){ - $members = get_node_data($targetDN, array("member")); - if (count($members) > 1){ - foreach ($members['member'] as $hostDN){ - $macdata = get_node_data($hostDN, array("hwaddress")); - $pxemac = str_replace (":","-",$macdata['hwaddress']); - $filenames[] = "01-".$pxemac; - } - } - if (count($members) == 1){ - $macdata = get_node_data($members['member'], array("hwaddress")); - $pxemac = str_replace (":","-",$macdata['hwaddress']); - $filenames[] = "01-".$pxemac; - } - } - echo "filenames: ";print_r($filenames); echo "<br>"; - #$ldapuri = LDAP_HOST."/dn=cn=computers,".$auDN; - - # rbsDN bestimmen - $rbs = get_node_data($targetDN,array("hlprbservice")); - $rbsDN = $rbs['hlprbservice']; - print_r($rbsDN); - - if (add_pxe($pxeDN,$pxecn,$rbsDN,$pxetimerange,$pxeattribs,$filenames,$conffile)){ - $mesg .= "<br>Neues PXE Boot Menü erfolgreich angelegt<br>"; - if ($targettype == "computers"){ - $mnr=1; - } - if ($targettype == "groups"){ - $mnr=2; - } - $url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr; - } - else{ - $mesg .= "<br>Fehler beim anlegen des PXE Boot Menüs!<br>"; - } - } - } - } - else{ - $mesg .= "<br>Sie haben kein Ziel angegeben!<br>"; - } -} - - -elseif ( $pxecn == "" || $pxecn == "Hier_PXE_NAME_eintragen" || $rbsDN == "none" ){ - - $mesg = "Sie haben den Namen des neuen PXE Boot Menüs nicht angegeben oder den - Remote Boot Dienst nicht ausgewählt. Beide sind aber ein notwendige Attribute.<br> - Bitte geben Sie sie an.<br><br>"; - $url = "new_pxe.php?pxecn=Hier_PXE_NAME_eintragen&pxeday=".$get_pxeday."&pxebeg=".$get_pxebeg."&pxeend=".$get_pxeend."&mnr=".$mnr."&sbmnr=".$sbmnr; -} - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.dwt b/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.dwt deleted file mode 100644 index 5c3986b3..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.dwt +++ /dev/null @@ -1,176 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - - <tr> - <td colspan='4' height='20'><h4><a href='pxeconfigs.php' class='headerlink'><< Zurück zur Übersicht PXE Configs</a></h4></td> - </tr> - <tr> - <td height='20'> </td> - </tr> - - <tr> - <td colspan='4'><h3>PXE Konfiguration <code class='font_object'> {PXECN} </code> </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 1;'><h4>{PXELINK} Allgemein</code></a></h4></td> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{OPTLINK} Global Options </a></h4></td> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4><code class='font_object'> Bootmenue </h4></td> - <td> </td> - </tr> - <tr> - <td height='20'></td> - </tr> - - <tr> - <td colspan='4'><h4>PXE Bootmenü:</h4> - Klicken Sie auf einen Menüeintrag um zur Detailansicht zu gelangen und den Eintrag bearbeiten zu können</td> - </tr> - <tr> - <td colspan='4'> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='80%' style='border-color: black; border-style: solid; border-width: 2 2 2 2;'> - - <tr> - <td width='8%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>#</td> - <td width='8%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>Flags</td> - <td width='64%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>Menu Label </td> - <td width='5%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'> </td> - <td width='15%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'> </td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: Bootmenu --> - <form action='delete_confirm.php' method='post'> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;{BGCDEF}'>{POSITION} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;{BGCDEF}'>{MEDEF} {MEPWD} {MEHIDE} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;{BGCDEF}'><font size='+1'>{ANZEIGE} </font></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;{BGCDEF}'> - <a href='menuposition_up.php?dn={MENDN}&pos={POSITION}&pxedn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}'><img style='border-width:0;border-style=none;' src='../pics/up2.gif' height='15'></a> <br> - <a href='menuposition_down.php?dn={MENDN}&pos={POSITION}&pxedn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}'><img style='border-width:0;border-style=none;' src='../pics/down2.gif' height='15'></a></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;{BGCDEF}'> - <input type='hidden' name='dn' value='{MENDN}'> - <input type='hidden' name='name' value='{ANZEIGENAME}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='delurl' value='menuentry_delete.php'> - <input type='hidden' name='successurl' value='pxe_bootmenue.php?dn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}'> - <input type='hidden' name='backurl' value='pxe_bootmenue.php?dn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}'> - - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'> - </tr> - </form> - <!-- END DYNAMIC BLOCK: Bootmenu --> - - </table></td> - </tr> - <tr> - <td colspan='4'><h4>Flags:</h4></font> - <ul> - <li><b>D</b> -> Default Menüeintrag</li> - <li><b>P</b> -> Passwort geschützt</li> - <li><b>H</b> -> Hidden</li> - </ul> - </td> - </tr> - <tr> - <td height='20'></td> - </tr> - <tr> - <td colspan='4'><h4>Neuen Menüeintrag anlegen: </h4> - <a href='new_menuentry.php?dn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}' style='color:#FFFFFF;' class='small_loginform_button'> zur Eingabemaske </a> </td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td colspan='4'><h4>Standard Menüeinträge anlegen:</h4></td> - </tr> - <tr> - <td colspan='4'> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - - <tr> - <td width='20%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>Typ </td> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'> </td> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'> </td> - <td width='10%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>Position</td> - <td width='10%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'> </td> - </tr> - <tr valign='top'> - <form action='menuentry_add.php' method='post'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Localboot</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - Menu Label<br><input type='Text' name='locallabel' value='' size='20' class='medium_form_field'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - Passwort (optional)<br><input type='Text' name='localpasswd' value='' size='20' class='medium_form_field'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Text' name='localpos' value='{MAXPOS}' size='2' class='medium_form_field'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'></td> - <input type='hidden' name='typ' value='local'> - <input type='hidden' name='maxpos' value='{MAXPOS}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='timerange' value='{TIMERANGE}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - </form> - </tr> - <tr valign='top'> - <form action='menuentry_add.php' method='post'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Textzeile</b> </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Text' name='text' value='TEXT' size='50' class='medium_form_field'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Text' name='textpos' value='{MAXPOS}' size='2' class='medium_form_field'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'></td> - <input type='hidden' name='typ' value='text'> - <input type='hidden' name='maxpos' value='{MAXPOS}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='timerange' value='{TIMERANGE}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - </form> - </tr> - <tr valign='top'> - <form action='menuentry_add.php' method='post'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Leerzeile</b> </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Text' name='leerpos' value='{MAXPOS}' size='2' class='medium_form_field'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'></td> - <input type='hidden' name='typ' value='leer'> - <input type='hidden' name='maxpos' value='{MAXPOS}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='timerange' value='{TIMERANGE}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - </form> - </tr> - <tr valign='top'> - <form action='menuentry_add.php' method='post'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Verweis zu Submenü</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>Submenü Name<br> - <input type='Text' name='submenu' value='' size='20' class='medium_form_field'></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>Remote Boot Service - <select name='subrbs' size='3' class='small_form_selectbox'> - <option selected value='none'>----------</option> - <!-- BEGIN DYNAMIC BLOCK: Subrbs --> - <option value='{SUBRBSDN}'>{SUBRBSCN} {SUBRBSAU}</option> - <!-- END DYNAMIC BLOCK: Subrbs --> - </select> - </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Text' name='submenupos' value='{MAXPOS}' size='2' class='medium_form_field'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'></td> - <input type='hidden' name='typ' value='submenu'> - <input type='hidden' name='maxpos' value='{MAXPOS}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='timerange' value='{TIMERANGE}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - </form> - </tr> - - </table></td> - </tr> - - -</table> diff --git a/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.php b/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.php deleted file mode 100644 index 29d6e338..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxe_bootmenue.php +++ /dev/null @@ -1,151 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "pxe_bootmenue.dwt"; - -include('computers_header.inc.php'); - -$mnr = -1; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$mnr = $_GET['mnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$pxeDN = $_GET['dn']; -# DN, CN des übergeordneten Nodes (Host oder Group) -$pxednarray = ldap_explode_dn($pxeDN, 0); -$nodeDN = implode(',',array_slice($pxednarray,2)); -#$nodeDN = $_GET['nodedn']; -$nodednarray = ldap_explode_dn($nodeDN, 1); - -$attributes = array("dn","cn","rbservicedn","filename","timerange","allowoptions","console","default", - "display","font","implicit","kbdmap","menumasterpasswd","menutitle", - "noescape","onerror","ontimeout","prompt","say","serial","timeout","ldapuri","fileuri"); -$pxe = get_node_data($pxeDN,$attributes); - -# RBS Daten -$rbsDN = $pxe['rbservicedn']; -$rbsdata = get_node_data($rbsDN,array("cn","tftpserverip","tftppath","tftpclientconfpath")); - -# Timerange Komponenten -$template->define_dynamic("TRanges", "Webseite"); -if (count($pxe['timerange']) > 1){ - foreach($pxe['timerange'] as $tr){ - $exptime = explode('_',$tr); - $template->assign(array("PXEDAY" => $exptime[0], - "PXEBEG" => $exptime[1], - "PXEEND" => $exptime[2])); - $template->parse("TRANGES_LIST", ".TRanges"); - } -}else{ - $exptime = explode('_',$pxe['timerange']); - $template->assign(array("PXEDAY" => $exptime[0], - "PXEBEG" => $exptime[1], - "PXEEND" => $exptime[2])); - $template->parse("TRANGES_LIST", ".TRanges"); -} - -# Filenames -$template->define_dynamic("Filenames", "Webseite"); -if (count($pxe['filename']) > 1){ - foreach($pxe['filename'] as $fi){ - $template->assign(array("FILE" => $fi)); - $template->parse("FILENAMES_LIST", ".Filenames"); - } -}else{ - $exptime = explode('_',$pxe['filename']); - $template->assign(array("FILE" => $pxe['filename'])); - $template->parse("FILENAMES_LIST", ".Filenames"); -} - -$expcn = explode('_',$pxe['cn']); -$name = array_slice($expcn,1); -$pxecn = implode('_',$name); - -# Bootmenü Einträge -$menuentries = get_menuentries($pxeDN,array("dn","menuposition","label","menulabel","menudefault","menupasswd","menuhide")); -# print_r($menuentries); echo "<br>"; -$maxpos = count($menuentries)+1; - -# Globale Parameter -$template->assign(array("PXEDN" => $pxeDN, - "PXECN" => $pxecn, - "TIMERANGE" => $pxe['timerange'], - "MAXPOS" => $maxpos, - "NODEDN" => $nodeDN, - "NODE" => $nodednarray[0], - "DEFDN" => "cn=rbs,".$auDN, - "PXELINK" => "<a href='pxe.php?dn=".$pxeDN."&mnr=".$mnr."' class='headerlink'>", - "OPTLINK" => "<a href='pxe_globals.php?dn=".$pxeDN."&mnr=".$mnr."' class='headerlink'>", - "MNR" => $mnr, - "SBMNR" => $sbmnr)); - - -# Für Submenü Einträge -$template->assign(array("SUBRBSDN" => "", - "SUBRBSCN" => "", - "SUBRBSAU" => "")); -if (count($subrbs) != 0){ -$template->define_dynamic("Subrbs", "Webseite"); - foreach ($subrbs as $item){ - $rbsdnexp = ldap_explode_dn($item,1); - $subrbscn = $rbsdnexp[0]; - $subrbsau = $rbsdnexp[2]; - #$subrbsexp = explode(',',$item['dn']); - #$subrbsau = explode('=',$subrbsexp[2]); - $template->assign(array("SUBRBSDN" => $item, - "SUBRBSCN" => $subrbscn, - "SUBRBSAU" => "[ ".$subrbsau." ]")); - $template->parse("SUBRBS_LIST", ".Subrbs"); - } -} - -################################################ -# Bootmenü Einträge - -$template->define_dynamic("Bootmenu", "Webseite"); -$template->assign(array("MENDN" => "", - "MENULABEL" => "", - "ANZEIGE" => "Noch kein Bootmenü Eintrag angelegt", - "MEDEF" => "", - "MEPWD" => "", - "MEHIDE" => "", - "BGCDEF" => "", - "POSITION" => "")); -foreach ($menuentries as $me){ - $anzeige = ""; $medef = ""; $mepwd = ""; $mehide = ""; - if ($me['label'] != "" && $me['menulabel'] == ""){$anzeige .= $me['label'];} - if ($me['menulabel'] != ""){$anzeige .= $me['menulabel'];} - if ($me['menudefault'] == 1){$medef = "<b>D</b>"; $bgcdef = "background-color:#EEDD82;";} - if ($me['menupasswd'] != ""){$mepwd = "<b>P</b>";} - if ($me['menuhide'] == 1){$mehide = "<b>H</b>"; $bgcdef = "background-color:#A0A0A0;";} - $template->assign(array("MENDN" => $me['dn'], - "ANZEIGE" => "<a href='menuentry.php?dn=".$me['dn']."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr."' class='headerlink'>".$anzeige."</a>", - "ANZEIGENAME" => $anzeige, - "POSITION" => $me['menuposition'], - "MEDEF" => $medef, - "MEPWD" => $mepwd, - "MEHIDE" => $mehide, - "BGCDEF" => $bgcdef, - "AUDN" => $auDN)); - $template->parse("BOOTMENU_LIST", ".Bootmenu"); - $medef = ""; - $bgcdef = ""; -} - - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/pxe_change.php b/ldap-site-mngmt/webinterface/computers/pxe_change.php deleted file mode 100644 index 07af7ed5..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxe_change.php +++ /dev/null @@ -1,348 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$pxeDN = $_POST['pxedn']; -$oldpxecn = "PXE_".$_POST['oldpxecn']; -$pxecn = "PXE_".$_POST['pxecn']; - -$pxeday = $_POST['pxeday']; -$pxebeg = $_POST['pxebeg']; -$pxeend = $_POST['pxeend']; -foreach (array_keys($pxeday) as $key){ - $pxeday[$key] = htmlentities($pxeday[$key]); -} -foreach (array_keys($pxebeg) as $key){ - $pxebeg[$key] = htmlentities($pxebeg[$key]); -} -foreach (array_keys($pxeend) as $key){ - $pxeend[$key] = htmlentities($pxeend[$key]); -} - -$deltr = $_POST['deltr']; - -$newpxeday = $_POST['newpxeday']; $newpxeday = htmlentities($newpxeday); -$newpxebeg = $_POST['newpxebeg']; $newpxebeg = htmlentities($newpxebeg); -$newpxeend = $_POST['newpxeend']; $newpxeend = htmlentities($newpxeend); -$oldpxeday = $_POST['oldpxeday']; -$oldpxebeg = $_POST['oldpxebeg']; -$oldpxeend = $_POST['oldpxeend']; - - -$rbs = $_POST['rbs']; -$filename = $_POST['filename']; -if (count($filename) != 0){ - foreach (array_keys($filename) as $key){ - $file[$key] = htmlentities($filename[$key]); - } -} -$oldfilename = $_POST['oldfilename']; -if (count($oldfilename) != 0){ - foreach (array_keys($oldfilename) as $key){ - $oldfile[$key] = htmlentities($oldfilename[$key]); - } -} -$newfilename = $_POST['newfilename']; $newfilename = htmlentities($newfilename); - - -$nodeDN = $_POST['nodedn']; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - - -$seconds = 2; -$url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -############################################## -# PXE CN (DN) - -if ( $oldpxecn == $pxecn ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( $oldpxecn != "" && $pxecn != "" && $oldpxecn != $pxecn ){ - echo "PXE Name aendern<br>"; - # hier noch Syntaxcheck - # Formulareingaben anpassen - $exppxe = explode(" ",$pxecn); - foreach ($exppxe as $word){$expuc[] = ucfirst($word);} - $pxecn = implode(" ",$expuc); - $pxecn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $pxecn); - - - $newpxeDN = "cn=".$pxecn.",".$nodeDN; - print_r($newpxeDN); echo "<br><br>"; - - if(modify_pxe_dn($pxeDN, $newpxeDN)){ - $mesg = "PXE Name erfolgreich geändert<br><br>"; - $pxeDN = $newpxeDN; - }else{ - $mesg = "Fehler beim ändern des PXE Namen!<br><br>"; - } - - - # newsubmenu holen... - $url = "pxe.php?dn=".$newpxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; -} - -if ( $oldpxecn != "" && $pxecn == "" ){ - echo "PXE Name loeschen!<br> - Dieses ist Teil des DN, Sie werden das PXE Boot Menü komplett löschen<br><br>"; - echo "Wollen Sie das PXE Boot Menü <b>".$oldpxecn."</b> wirklich löschen?<br><br> - <form action='pxe_delete.php' method='post'> - Falls ja:<br><br> - <input type='hidden' name='dn' value='".$pxeDN."'> - <input type='hidden' name='name' value='".$oldpxecn."'> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'><br><br> - </form> - <form action='".$url."' method='post'> - Falls, nein:<br><br> - <input type='Submit' name='apply' value='zurück' class='small_loginform_button'> - </form>"; - $seconds = 600; -} - -########################################## -# Remote Boot Dienst - -if ($rbs != "none"){ - $exp = explode(',',$rbs); - $exprbscn = explode('=',$exp[0]); - $rbscn = $exprbscn[1]; - $exprbsau = explode('=',$exp[2]); - $rbsau = $exprbsau[1]; - - $entryrbs ['rbservicedn'] = $rbs; - if ($result = ldap_mod_replace($ds,$pxeDN,$entryrbs)){ - $mesg = "Remote Boot Service erfolgreich zu <b>".$rbscn."[Abt.: ".$rbsau."]</b> geändert<br><br>"; - }else{ - $mesg = "Fehler beim ändern des Remote Boot Services zu <b>".$rbscn."</b>!<br><br>"; - } -} - - -########################################## -# bereits vorhandene TimeRange(s) bearbeiten - -$entrymodtr = array(); -$modtr = 0; -# TimeRanges zusammensetzen -# $t = 0; # Laufvariable für $entrymodtr, da nicht jede Timerange ok sein muss -for ($i=0; $i<count($pxeday); $i++){ - -$oldpxetimerange = $oldpxeday[$i]."_".$oldpxebeg[$i]."_".$oldpxeend[$i]; - -if ( ($pxebeg[$i] <= $pxeend[$i]) && ( ($pxeday[$i] != $oldpxeday[$i] && $pxeday[$i] != "") || ($pxebeg[$i] != $oldpxebeg[$i] && $pxebeg[$i] != "") || ($pxeend[$i] != $oldpxeend[$i] && $pxeend[$i] != "")) ){ - - - # TimeRange Syntax checken - $syntax = new Syntaxcheck; - if ($syntax->check_timerange_syntax($pxeday[$i],$pxebeg[$i],$pxeend[$i])){ - - # in Grossbuchstaben - if (preg_match("/([a-z]+)/",$pxeday[$i])){$pxeday[$i] = strtoupper($pxeday[$i]);} - if (preg_match("/([a-z]+)/",$pxebeg[$i])){$pxebeg[$i] = strtoupper($pxebeg[$i]);} - if (preg_match("/([a-z]+)/",$pxeend[$i])){$pxeend[$i] = strtoupper($pxeend[$i]);} - - # führende Nullen weg - $pxebeg[$i] = preg_replace ( '/0([0-9])/', '$1', $pxebeg[$i]); - $pxeend[$i] = preg_replace ( '/0([0-9])/', '$1', $pxeend[$i]); - - # TimeRange auf Ãœberschneidung mit vorhandenen checken außer mit eigener alter TR da diese - # ja geändert werden soll - if(check_timerange_pxe($pxeday[$i],$pxebeg[$i],$pxeend[$i],$nodeDN,$oldpxetimerange)){ - - $pxetimerange = $pxeday[$i]."_".$pxebeg[$i]."_".$pxeend[$i]; - $entrymodtr ['timerange'][$i] = $pxetimerange; - $modtr = 1; - - } - else{ - $mesg = "Es existiert bereits ein PXE Boot Menü, das sich mit der eingegebenen Time Range - überschneidet!<br> - Bitte geben Sie eine andere Time Range ein.<br><br>"; - $entrymodtr ['timerange'][$i] = $oldpxetimerange; - } - } - else{ - $mesg = "Falsche Syntax in der Timerange-Eingabe!<br> - Bitte geben Sie die erneut Time Range ein.<br><br>"; - $entrymodtr ['timerange'][$i] = $oldpxetimerange; - } - -} - - -elseif ( $pxeday[$i] == "" || $pxebeg[$i] == "" || $pxeend[$i] == "" || $pxebeg[$i] > $pxeend[$i]){ - - $mesg = "Sie haben die Time Range <b>Nr.".$i."</b> nicht vollständig angegeben. Diese ist aber ein notwendiges Attribut.<br> - Diese Time Range wird nicht bearbeitet.<br><br>"; - $entrymodtr ['timerange'][$i] = $oldpxetimerange; -} - -else{$entrymodtr ['timerange'][$i] = $oldpxetimerange;} -} # Ende for-Schleife für jede Timerange -# jetzt noch alle gesammelten Änderungen Durchführen ... -if ($modtr == 1){ - # erst ändern - echo "Ändern: "; print_r($entrymodtr); echo "<br>"; - if($result = ldap_mod_replace($ds,$pxeDN,$entrymodtr)){ - $mesg = "TimeRanges erfolgreich geändert<br><br>"; - }else{ - $mesg = "Fehler beim ändern der TimeRanges!<br><br>"; - } -} - - -if ( count($deltr) != 0 && $modtr == 0 ){ - # Time Range löschen - $j = 0; - foreach ($deltr as $delrange){ - $entrydeltr ['timerange'][$j] = $delrange; - $j++; - } - # dann löschen - echo "Löschen: "; print_r($entrydeltr); echo "<br>"; - if($result = ldap_mod_del($ds,$pxeDN,$entrydeltr)){ - $mesg = "TimeRanges erfolgreich gelöscht<br><br>"; - }else{ - $mesg = "Fehler beim löschen der TimeRanges!<br><br>"; - } -}elseif(count($deltr) != 0 && $modtr == 1){ - echo "Nur Ändern (gleichzeitig Löschen und Ändern geht nicht)"; -} - -##################################### -# TimeRange hinzufügen - -if ( $newpxeday != "" && $newpxebeg != "" && $newpxeend != "" && $newpxebeg <= $newpxeend ){ - - # TimeRange Syntax checken - $syntax = new Syntaxcheck; - if ($syntax->check_timerange_syntax($newpxeday,$newpxebeg,$newpxeend)){ - - # in Grossbuchstaben - if (preg_match("/([a-z]+)/",$newpxeday)){$newpxeday = strtoupper($newpxeday);} - if (preg_match("/([a-z]+)/",$newpxebeg)){$newpxebeg = strtoupper($newpxebeg);} - if (preg_match("/([a-z]+)/",$newpxeend)){$newpxeend = strtoupper($newpxeend);} - - # führende Nullen weg - $newpxebeg = preg_replace ( '/0([0-9])/', '$1', $newpxebeg); - $newpxeend = preg_replace ( '/0([0-9])/', '$1', $newpxeend); - - # TimeRange auf Ãœberschneidung mit vorhandenen checken - if(check_timerange_pxe($newpxeday,$newpxebeg,$newpxeend,$nodeDN,"")){ - - $newpxetimerange = $newpxeday."_".$newpxebeg."_".$newpxeend; - $entrytr ['timerange'] = $newpxetimerange; - if($result = ldap_mod_add($ds,$pxeDN,$entrytr)){ - $mesg = "Zusätzliche TimeRange erfolgreich eingetragen<br><br>"; - }else{ - $mesg = "Fehler beim eintragen der zusätzlichen TimeRange!<br><br>"; - } - }else{ - $mesg = "Es existiert bereits ein PXE Boot Menü, das sich mit der eingegebenen Time Range - überschneidet!<br> - Bitte geben Sie eine andere Time Range ein.<br><br>"; - } - }else{ - $mesg = "Falsche Syntax in der Timerange-Eingabe!<br> - Bitte geben Sie die erneut Time Range ein.<br><br>"; - } -} - - - -##################################### -# PXE Filename(s) - -$filemod = array(); -$modfi = 0; -$filedel = array(); -$delfi = 0; -$j = 0; - -if (count($file) != 0){ - -for ($i=0; $i<count($file); $i++){ - - if ( $oldfile[$i] == $file[$i] ){ - $filemod ['filename'][$i] = $oldfile[$i]; - # $mesg = "keine Aenderung<br>"; - } - - if ( $oldfile[$i] != "" && $file[$i] != "" && $oldfile[$i] != $file[$i] ){ - echo "PXE Dateinamen aendern<br> - Vorsicht dies kann eine nicht verwendbare PXE Datei zur Folge haben!<br><br>"; - # hier noch Syntaxcheck - $filemod ['filename'][$i] = $file[$i]; - $modfi = 1; - } - - if ( $oldfile[$i] != "" && $file[$i] == "" ){ - echo "PXE Dateinamen loeschen!<br> - Achtung: aus ihren PXE Daten wird keine PXE Datei mehr generiert.<br> - Sie sind solange nicht mehr für den PXE Bootvorgang verwendbar bis Sie einen neuen Dateinamen anlegen!<br><br>"; - $filemod ['filename'][$i] = $oldfile[$i]; - $filedel ['filename'][$j] = $oldfile[$i]; - $j++; - $delfi = 1; - $seconds = 4; - } -} -#erst ändern -if ($modfi == 1){ - echo "Ändern: "; print_r($filemod); echo "<br>"; - if(ldap_mod_replace($ds,$pxeDN,$filemod)){ - $mesg = "PXE Dateiname(n) erfolgreich geändert<br><br>"; - }else{ - $mesg = "Fehler beim ändern des(r) PXE Dateinamens!<br><br>"; - } - $modfi = 0; -} -# dann löschen -if ($delfi == 1){ - echo "Löschen: "; print_r($filedel); echo "<br>"; - if(ldap_mod_del($ds,$pxeDN,$filedel)){ - $mesg = "PXE Dateiname(n) erfolgreich gelöscht<br><br>"; - }else{ - $mesg = "Fehler beim löschen des PXE Dateinamens !<br><br>"; - } - $delfi = 0; -} - -} - -# PXE Dateiname neu anlegen -if ($newfilename == ""){ -} -if ($newfilename != ""){ - echo "PXE Dateiname hinzufügen"; - $fileadd ['filename'] = $newfilename; - if(ldap_mod_add($ds,$pxeDN,$fileadd)){ - $mesg = "PXE Dateiname <b>".$newfilename."</b> erfolgreich angelegt<br><br>"; - }else{ - $mesg = "Fehler beim anlegen des PXE Dateinamens ".$newfilename." !<br><br>"; - } -} - - -######################### - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/pxe_copy.php b/ldap-site-mngmt/webinterface/computers/pxe_copy.php deleted file mode 100644 index 61760a8e..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxe_copy.php +++ /dev/null @@ -1,182 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$pxeDN = $_POST['pxedn']; -$pxecn = "PXE_".$_POST['pxecncp']; -$oldpxecn = "PXE_".$_POST['oldpxecncp']; - -$deltr = $_POST['deltr']; - -$oldpxeday = $_POST['oldpxedaycp']; $oldpxeday = htmlentities($oldpxeday); -$oldpxebeg = $_POST['oldpxebegcp']; $oldpxebeg = htmlentities($oldpxebeg); -$oldpxeend = $_POST['oldpxeendcp']; $oldpxeend = htmlentities($oldpxeend); - -$nodeDN = $_POST['nodedn']; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - -$copytargets = $_POST['copytargets']; -#print_r($copytargets); echo "<br>"; -$n = array_keys($copytargets,'none'); -#print_r($n); echo "<br>"; -for ($i=0; $i<count($n); $i++){ - $match = array_search('none',$copytargets); - array_splice($copytargets, $match, 1); -} -#print_r($copytargets); echo "<br>"; - - -$seconds = 2; -$url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $pxecn != ""){ - - # Formulareingaben anpassen - $exppxe = explode(" ",$pxecn); - foreach ($exppxe as $word){$expuc[] = ucfirst($word);} - $pxecn = implode(" ",$expuc); - $pxecn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $pxecn); - - $nomac = 0; - - if (count($copytargets) != 0){ - foreach ($copytargets as $targetDN){ - - $exptargetdn = ldap_explode_dn($targetDN, 1); - $targetcn = $exptargetdn[0]; - $targettype = $exptargetdn[1]; - - # falls Target keine MAC hat dann kann keine PXE angelegt werden - if ($targettype == "computers"){ - $macdata = get_node_data($targetDN, array("hwaddress")); - if ($macdata['hwaddress'] == ""){ - $nomac = 1; - echo "Für den Ziel-Rechner ist keine MAC Adresse eingetragen <br> - Das PXE Bootmenü wird nicht angelegt. <br> - <br> - Tragen Sie zuerst eine MAC ein!<br><br>"; - } - } - if ($targettype == "groups"){ - $members = get_node_data($targetDN, array("member")); - if (count($members) > 1){ - foreach ($members['member'] as $hostDN){ - $macdata = get_node_data($hostDN, array("hwaddress","hostname")); - if ($macdata['hwaddress'] == ""){ - $nomac = 1; - echo "Für den Gruppen-Rechner <b>".$macdata['hostname']."</b> ist keine MAC Adresse eingetragen <br> - Das PXE Bootmenü für die Gruppe wird nicht angelegt. <br> - <br> - Tragen Sie zuerst bei Rechner <b>".$macdata['hostname']."</b> eine MAC ein!<br><br>"; - } - } - } - if (count($members) == 1){ - $macdata = get_node_data($members['member'], array("hwaddress")); - if ($macdata['hwaddress'] == ""){ - $nomac = 1; - echo "Für den Gruppen-Rechner <b>".$macdata['hostname']."</b> ist keine MAC Adresse eingetragen <br> - Das PXE Bootmenü für die Gruppe wird nicht angelegt. <br> - <br> - Tragen Sie zuerst bei Rechner <b>".$macdata['hostname']."</b> eine MAC ein!<br><br>"; - } - } - } - - $brothers = get_pxeconfigs($targetDN,array("cn")); - $brother = 0; - foreach ($brothers as $item){ - if( $item['cn'] == $pxecn ){ - $mesg = "Es existiert bereits ein PXE Boot Menü mit dem eingegebenen Namen!<br> - Bitte geben Sie einen anderen Namen ein.<br><br>"; - $url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - $brother = 1; - break; - } - } - if ($brother == 0 && $nomac == 0){ - - $exptargetdn = ldap_explode_dn($targetDN, 1); - $target = $exptargetdn[0]; - $targettype = $exptargetdn[1]; - - $newpxeDN = "cn=".$pxecn.",".$targetDN; - print_r($newpxeDN); echo "<br>"; - - if (dive_into_tree_cp($pxeDN,$newpxeDN)){ - - # Filename anpassen - if ($targettype == "computers"){ - $macdata = get_node_data($targetDN, array("hwaddress")); - $pxemac = str_replace (":","-",$macdata['hwaddress']); - $entrymod ['filename'] = "01-".$pxemac; - #$entrymod ['fileuri'] = "01-".$macdata['hwaddress'].".tgz"; - } - if ($targettype == "groups"){ - $members = get_node_data($targetDN, array("member")); - if (count($members) != 0){ - foreach ($members['member'] as $hostDN){ - $macdata = get_node_data($hostDN, array("hwaddress")); - $pxemac = str_replace (":","-",$macdata['hwaddress']); - $entrymod ['filename'][] = "01-".$pxemac; - #$entrymod ['fileuri'] = $target.".tgz"; - } - } - } - if(ldap_mod_replace($ds,$newpxeDN,$entrymod)){ - if($deltr == 1){ - # Timeranges und FileURI im neuen Objekt löschen (todo: anpassen statt löschen) - $entrydel ['timerange'] = array(); - $entrydel ['fileuri'] = array(); - if ( ldap_mod_del($ds,$newpxeDN,$entrydel) ){ - $mesg .= "<br>PXE Boot Menü erfolgreich nach ".$target[1]." kopiert<br>"; - } - else{ - ldap_delete($ds,$newpxeDN); - $mesg .= "<br>Fehler beim kopieren des PXE Boot Menüs nach <b>".$target[1]."</b><br>"; - } - } - } - else{ - ldap_delete($ds,$newpxeDN); - $mesg .= "<br>Fehler beim kopieren des PXE Boot Menüs nach <b>".$target[1]."</b><br>"; - } - } - else{ - $mesg .= "<br>Fehler beim kopieren des PXE Boot Menüs nach <b>".$target[1]."</b><br>"; - } - } - } - } - else{ - $mesg .= "<br>Sie haben kein Ziel angegeben!<br>"; - } -} - -elseif ( $pxecn == ""){ - - $mesg = "Sie haben den Namen des neuen PXE Boot Menüs nicht angegeben. Dieser ist aber ein notwendiges Attribut.<br> - Bitte geben Sie ihn an.<br><br>"; - $url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; -} - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/pxe_delete.php b/ldap-site-mngmt/webinterface/computers/pxe_delete.php deleted file mode 100644 index a1b7a060..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxe_delete.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$pxeDN = $_POST['dn']; -$oldpxecn = $_POST['name']; - -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - -$seconds = 1; -$url = $_POST['successurl']; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $pxeDN != ""){ - - if ( dive_into_tree_del($pxeDN,"") ){ - $mesg = "PXE Boot Menü <b>".$pxecn."</b> erfolgreich gelöscht!<br><br>"; - } - else{ - $mesg = "Fehler beim löschen des PXE Boot Menüs <b>".$pxecn."</b> !<br><br>"; - } - -} - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/pxe_globals.dwt b/ldap-site-mngmt/webinterface/computers/pxe_globals.dwt deleted file mode 100644 index f0497183..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxe_globals.dwt +++ /dev/null @@ -1,128 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - - <tr> - <td colspan='4' height='20'><h4><a href='pxeconfigs.php' class='headerlink'><< Zurück zur Übersicht PXE Configs</a></h4></td> - </tr> - <tr> - <td height='20'> </td> - </tr> - - <tr> - <td colspan='4'><h3>PXE Konfiguration <code class='font_object'> {PXECN} </code> </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 1;'><h4>{PXELINK} Allgemein</code></a></h4></td> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4><code class='font_object'> Global Options </h4></td> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{BMLINK} Bootmenue </a></h4></td> - <td> </td> - </tr> - <tr> - <td height='20'></td> - </tr> - - - <tr> - <td colspan='4'><h4>Globale Optionen der PXE Konfiguration:</h4></td> - </tr> - - <tr><td colspan='4'> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='pxe_globals_change.php' method='post'> - - <tr> - <td width='20%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='80%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Default: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[default]' value='{DEFAULT}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[default]' value='{DEFAULT}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Title: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menutitle]' value='{MENTIT}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[menutitle]' value='{MENTIT}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Master Passwd: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menumasterpasswd]' value='{MENMPW}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[menumasterpasswd]' value='{MENMPW}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Timeout: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[timeout]' value='{TIMEOUT}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[timeout]' value='{TIMEOUT}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>No Escape: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[noescape]' value='{NOESC}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[noescape]' value='{NOESC}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Prompt: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[prompt]' value='{PROMPT}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[prompt]' value='{PROMPT}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Allow Options: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[allowoptions]' value='{ALLOW}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[allowoptions]' value='{ALLOW}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>On Error: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[onerror]' value='{ONERR}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[onerror]' value='{ONERR}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>ON Timeout: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[ontimeout]' value='{ONTIME}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[ontimeout]' value='{ONTIME}'> - </td> - </tr> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>File URI: </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <font size='+1'>tftp://{TFTP}/{TFTPFILE}</font><input type='Text' name='attribs[fileuri]' value='{FILEURI}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[fileuri]' value='{FILEURI}'> - - </td> - </tr> - - </table></td> - </tr> - <tr> - <td> - <input type='hidden' name='nodedn' value='{NODEDN}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='oldpxecn' value='{PXECN}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - <input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/pxe_globals.php b/ldap-site-mngmt/webinterface/computers/pxe_globals.php deleted file mode 100644 index 211a47c8..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxe_globals.php +++ /dev/null @@ -1,96 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "pxe_globals.dwt"; - -include('computers_header.inc.php'); - -$mnr = -1; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$mnr = $_GET['mnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$pxeDN = $_GET['dn']; -# DN, CN des übergeordneten Nodes (Host oder Group) -$pxednarray = ldap_explode_dn($pxeDN, 0); -$nodeDN = implode(',',array_slice($pxednarray,2)); -#$nodeDN = $_GET['nodedn']; -$nodednarray = ldap_explode_dn($nodeDN, 1); - -$attributes = array("dn","cn","rbservicedn","filename","timerange","allowoptions","console","default", - "display","font","implicit","kbdmap","menumasterpasswd","menutitle", - "noescape","onerror","ontimeout","prompt","say","serial","timeout","ldapuri","fileuri"); -$pxe = get_node_data($pxeDN,$attributes); - -# RBS Daten -$rbsDN = $pxe['rbservicedn']; -$rbsdata = get_node_data($rbsDN,array("cn","nfsserverip","exportpath","tftpserverip","tftppath","tftpclientconfpath")); - -# Timerange Komponenten -$template->define_dynamic("TRanges", "Webseite"); -if (count($pxe['timerange']) > 1){ - foreach($pxe['timerange'] as $tr){ - $exptime = explode('_',$tr); - $template->assign(array("PXEDAY" => $exptime[0], - "PXEBEG" => $exptime[1], - "PXEEND" => $exptime[2])); - $template->parse("TRANGES_LIST", ".TRanges"); - } -}else{ - $exptime = explode('_',$pxe['timerange']); - $template->assign(array("PXEDAY" => $exptime[0], - "PXEBEG" => $exptime[1], - "PXEEND" => $exptime[2])); - $template->parse("TRANGES_LIST", ".TRanges"); -} - - -# Globale Parameter -$template->assign(array("PXEDN" => $pxeDN, - "PXECN" => $pxecn, - "TIMERANGE" => $pxe['timerange'], - "TFTP" => $rbsdata['tftpserverip'], - "TFTPFILE" => $rbsdata['tftpclientconfpath'], - #"LDAPURI" => $pxe['ldapuri'], - "FILEURI" => $pxe['fileuri'], - "ALLOW" => $pxe['allowoptions'], - "CONSOLE" => $pxe['console'], - "DEFAULT" => $pxe['default'], - "DISPLAY" => $pxe['display'], - "FONT" => $pxe['font'], - "IMPLICIT" => $pxe['implicit'], - "KBDMAP" => $pxe['kbdmap'], - "MENMPW" => $pxe['menumasterpasswd'], - "MENTIT" => $pxe['menutitle'], - "NOESC" => $pxe['noescape'], - "ONERR" => $pxe['onerror'], - "ONTIME" => $pxe['ontimeout'], - "PROMPT" => $pxe['prompt'], - "SAY" => $pxe['say'], - "SERIAL" => $pxe['serial'], - "TIMEOUT" => $pxe['timeout'], - "NODEDN" => $nodeDN, - "NODE" => $nodednarray[0], - "DEFDN" => "cn=rbs,".$auDN, - "PXELINK" => "<a href='pxe.php?dn=".$pxeDN."&mnr=".$mnr."' class='headerlink'>", - "BMLINK" => "<a href='pxe_bootmenue.php?dn=".$pxeDN."&mnr=".$mnr."' class='headerlink'>", - "MNR" => $mnr, - "SBMNR" => $sbmnr)); - - -################################################################################### - -include("computers_footer.inc.php"); - -?> diff --git a/ldap-site-mngmt/webinterface/computers/pxe_globals_change.php b/ldap-site-mngmt/webinterface/computers/pxe_globals_change.php deleted file mode 100644 index 06f388bb..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxe_globals_change.php +++ /dev/null @@ -1,126 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$pxeDN = $_POST['pxedn']; -$oldpxecn = "PXE_".$_POST['oldpxecn']; -$pxecn = "PXE_".$_POST['pxecn']; - -$nodeDN = $_POST['nodedn']; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - -# sonstige Attribute -$attribs = $_POST['attribs']; -if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - $atts[$key] = htmlentities($attribs[$key]); - } -} -#print_r($atts); echo "<br><br>"; -$oldattribs = $_POST['oldattribs']; -if (count($oldattribs) != 0){ - foreach (array_keys($oldattribs) as $key){ - $oldatts[$key] = htmlentities($oldattribs[$key]); - } -} -#print_r($oldatts); echo "<br><br>"; - - -$seconds = 2; -$url = "pxe_globals.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - - - - - -################################################################## -# Restliche Attribute - -$entryadd = array(); -$entrymod = array(); -$entrydel = array(); - -foreach (array_keys($atts) as $key){ - - if ( $oldatts[$key] == $atts[$key] ){ - - } - if ( $oldatts[$key] == "" && $atts[$key] != "" ){ - # hier noch Syntaxcheck - $entryadd[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] != "" && $oldatts[$key] != $atts[$key] ){ - # hier noch Syntaxcheck - $entrymod[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] == "" ){ - # hier noch Syntaxcheck - $entrydel[$key] = $oldatts[$key]; - } -} - -#print_r($entryadd); echo "<br>"; -#print_r($entrymod); echo "<br>"; -#print_r($entrydel); echo "<br>"; - - -if (count($entryadd) != 0 ){ - #print_r($entryadd); echo "<br>"; - #echo "neu anlegen<br>"; - foreach (array_keys($entryadd) as $key){ - $addatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_add($ds,$pxeDN,$entryadd)){ - $mesg = "Attribute ".$addatts." erfolgreich eingetragen<br><br>"; - }else{ - $mesg = "Fehler beim eintragen der Attribute ".$addatts."<br><br>"; - } -} - -if (count($entrymod) != 0 ){ - #print_r($entrymod); echo "<br>"; - #echo "ändern<br>"; - foreach (array_keys($entrymod) as $key){ - $modatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_replace($ds,$pxeDN,$entrymod)){ - $mesg = "Attribute ".$modatts." erfolgreich geaendert<br><br>"; - }else{ - $mesg = "Fehler beim aendern der Attribute ".$modatts."<br><br>"; - } -} - -if (count($entrydel) != 0 ){ - #print_r($entrydel); echo "<br>"; - #echo "löschen<br>"; - foreach (array_keys($entrydel) as $key){ - $delatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_del($ds,$pxeDN,$entrydel)){ - $mesg = "Attribute ".$delatts." erfolgreich geloescht<br><br>"; - }else{ - $mesg = "Fehler beim loeschen der Attribute ".$delatts."<br><br>"; - } -} - - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/pxe_wochenplan.php b/ldap-site-mngmt/webinterface/computers/pxe_wochenplan.php deleted file mode 100644 index 8296762a..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxe_wochenplan.php +++ /dev/null @@ -1,262 +0,0 @@ -<?php - -##################################### -# Wochenübersicht - -$template->assign(array("A0" => "","B0" => "","C0" => "","D0" => "","E0" => "","F0" => "","G0" => "", - "A1" => "","B1" => "","C1" => "","D1" => "","E1" => "","F1" => "","G1" => "", - "A2" => "","B2" => "","C2" => "","D2" => "","E2" => "","F2" => "","G2" => "", - "A3" => "","B3" => "","C3" => "","D3" => "","E3" => "","F3" => "","G3" => "", - "A4" => "","B4" => "","C4" => "","D4" => "","E4" => "","F4" => "","G4" => "", - "A5" => "","B5" => "","C5" => "","D5" => "","E5" => "","F5" => "","G5" => "", - "A6" => "","B6" => "","C6" => "","D6" => "","E6" => "","F6" => "","G6" => "", - "A7" => "","B7" => "","C7" => "","D7" => "","E7" => "","F7" => "","G7" => "", - "A8" => "","B8" => "","C8" => "","D8" => "","E8" => "","F8" => "","G8" => "", - "A9" => "","B9" => "","C9" => "","D9" => "","E9" => "","F9" => "","G9" => "", - "A10" => "","B10" => "","C10" => "","D10" => "","E10" => "","F10" => "","G10" => "", - "A11" => "","B11" => "","C11" => "","D11" => "","E11" => "","F11" => "","G11" => "", - "A12" => "","B12" => "","C12" => "","D12" => "","E12" => "","F12" => "","G12" => "", - "A13" => "","B13" => "","C13" => "","D13" => "","E13" => "","F13" => "","G13" => "", - "A14" => "","B14" => "","C14" => "","D14" => "","E14" => "","F14" => "","G14" => "", - "A15" => "","B15" => "","C15" => "","D15" => "","E15" => "","F15" => "","G15" => "", - "A16" => "","B16" => "","C16" => "","D16" => "","E16" => "","F16" => "","G16" => "", - "A17" => "","B17" => "","C17" => "","D17" => "","E17" => "","F17" => "","G17" => "", - "A18" => "","B18" => "","C18" => "","D18" => "","E18" => "","F18" => "","G18" => "", - "A19" => "","B19" => "","C19" => "","D19" => "","E19" => "","F19" => "","G19" => "", - "A20" => "","B20" => "","C20" => "","D20" => "","E20" => "","F20" => "","G20" => "", - "A21" => "","B21" => "","C21" => "","D21" => "","E21" => "","F21" => "","G21" => "", - "A22" => "","B22" => "","C22" => "","D22" => "","E22" => "","F22" => "","G22" => "", - "A23" => "","B23" => "","C23" => "","D23" => "","E23" => "","F23" => "","G23" => "")); - -#print_r($timeranges); echo "<br>"; - -############################################################################ -# Default-Dienst PXE Timeranges -# vom spezifischsten zum unspezifischsten : -# FR_0_7 -> FR_X_X -> X_0_7 -> X_X_X -$daytime = array(); -$timex = array(); -$dayx = array(); -$allx = array(); -$legend = array(); -if(count($wopldeftranges) != 0){ -foreach ($wopldeftranges as $tr){ - if (count($tr[0]) > 1){ - foreach ($tr as $item){ - if ($item[0] != "X" && $item[1] != "X" && $item[2] != "X" && ($item[0] == "MO" || $item[0] == "DI" || $item[0] == "MI" || $item[0] == "DO" || $item[0] == "FR" || $item[0] == "SA" || $item[0] == "SO")){ - $daytime[] = $item; - } - if ($item[0] != "X" && $item[1] == "X" && $item[2] == "X"){ - $timex[] = $item; - } - if ($item[0] == "X" && $item[1] != "X" && $item[2] != "X"){ - $dayx[] = $item; - } - if ($item[0] == "X" && $item[1] == "X" && $item[2] == "X"){ - $allx[] = $item; - } - } - }else{ - if ($tr[0] != "X" && $tr[1] != "X" && $tr[2] != "X" && ($tr[0] == "MO" || $tr[0] == "DI" || $tr[0] == "MI" || $tr[0] == "DO" || $tr[0] == "FR" || $tr[0] == "SA" || $tr[0] == "SO")){ - $daytime[] = $tr; - } - if ($tr[0] != "X" && $tr[1] == "X" && $tr[2] == "X"){ - $timex[] = $tr; - } - if ($tr[0] == "X" && $tr[1] != "X" && $tr[2] != "X"){ - $dayx[] = $tr; - } - if ($tr[0] == "X" && $tr[1] == "X" && $tr[2] == "X"){ - $allx[] = $tr; - } - } -} - -#print_r($daytime); echo "<br>"; -#print_r($timex); echo "<br>"; -#print_r($dayx); echo "<br>"; -#print_r($allx); echo "<br>"; - -$daycode = array("MO" => "A", "DI" => "B", "MI" => "C", "DO" => "D", "FR" => "E", "SA" => "F", "SO" => "G"); -$daytimexcolors = array("#BEBEBE","A0A0A0","#696969","#EEDFCC","#D8BFD8","#505050"); -$allxcolors = array("#483D8B","#7B68EE","#191970","#8470FF","#708090","#6A5ACD"); -$dayxcolors = array("#CDC673","#A2CD5A","#BDB76B","#8B864E","#6B8E23","#CDBE70"); -$timecolors = array("880000","#CD6839","#CC3300","#CC6600","#993300","#8B4C39"); - - -if (count($allx) != 0){ - $c = 0; - foreach ($allx as $range){ - foreach ($daycode as $dc){ - for ($i = 0; $i <= 23; $i++){ - $template->assign(array($dc.$i => "background-color:".$allxcolors[$c].";")); - } - } - $legend[] = array($range ,$allxcolors[$c]); - $c++; - } -} - -if (count($dayx) != 0){ - $c = 0; - foreach ($dayx as $range){ - foreach ($daycode as $dc){ - for ($i = $range[1]; $i<= $range[2]; $i++){ - $template->assign(array($dc.$i => "background-color:".$dayxcolors[$c].";")); - } - } - $legend[] = array($range ,$dayxcolors[$c]); - $c++; - } -} - -if (count($timex) != 0){ - $c = 0; - foreach ($timex as $range){ - $dc = $daycode[$range[0]]; - for ($i = 0; $i<= 23; $i++){ - $template->assign(array($dc.$i => "background-color:".$timexcolors[$c].";")); - } - $legend[] = array($range ,$timexcolors[$c]); - $c++; - } -} - -if (count($daytime) != 0){ - $c = 0; - foreach ($daytime as $range){ - $dc = $daycode[$range[0]]; - for ($i = $range[1]; $i<= $range[2]; $i++){ - $template->assign(array($dc.$i => "background-color:".$daytimecolors[$c].";")); - } - $legend[] = array($range ,$daytimecolors[$c]); - $c++; - } -} - -} - -############################################################################ -# Rechner-spezifische PXE Timeranges -# vom spezifischsten zum unspezifischsten : -# FR_0_7 -> FR_X_X -> X_0_7 -> X_X_X -$daytime = array(); -$timex = array(); -$dayx = array(); -$allx = array(); - -if(count($wopltranges) != 0){ -foreach ($wopltranges as $tr){ - if (count($tr[0]) > 1){ - foreach ($tr as $item){ - if ($item[0] != "X" && $item[1] != "X" && $item[2] != "X" && ($item[0] == "MO" || $item[0] == "DI" || $item[0] == "MI" || $item[0] == "DO" || $item[0] == "FR" || $item[0] == "SA" || $item[0] == "SO")){ - $daytime[] = $item; - } - if ($item[0] != "X" && $item[1] == "X" && $item[2] == "X"){ - $timex[] = $item; - } - if ($item[0] == "X" && $item[1] != "X" && $item[2] != "X"){ - $dayx[] = $item; - } - if ($item[0] == "X" && $item[1] == "X" && $item[2] == "X"){ - $allx[] = $item; - } - } - }else{ - if ($tr[0] != "X" && $tr[1] != "X" && $tr[2] != "X" && ($tr[0] == "MO" || $tr[0] == "DI" || $tr[0] == "MI" || $tr[0] == "DO" || $tr[0] == "FR" || $tr[0] == "SA" || $tr[0] == "SO")){ - $daytime[] = $tr; - } - if ($tr[0] != "X" && $tr[1] == "X" && $tr[2] == "X"){ - $timex[] = $tr; - } - if ($tr[0] == "X" && $tr[1] != "X" && $tr[2] != "X"){ - $dayx[] = $tr; - } - if ($tr[0] == "X" && $tr[1] == "X" && $tr[2] == "X"){ - $allx[] = $tr; - } - } -} - -#print_r($daytime); echo "<br>"; -#print_r($timex); echo "<br>"; -#print_r($dayx); echo "<br>"; -#print_r($allx); echo "<br>"; - -$daycode = array("MO" => "A", "DI" => "B", "MI" => "C", "DO" => "D", "FR" => "E", "SA" => "F", "SO" => "G"); -$allxcolors = array("#BEBEBE","A0A0A0","#696969","#EEDFCC","#D8BFD8","#505050"); -$dayxcolors = array("#483D8B","#7B68EE","#191970","#8470FF","#708090","#6A5ACD"); -$timexcolors = array("#CDC673","#A2CD5A","#BDB76B","#8B864E","#6B8E23","#CDBE70"); -$daytimecolors = array("880000","#CD6839","#CC3300","#CC6600","#993300","#8B4C39"); - - -if (count($allx) != 0){ - $c = 0; - foreach ($allx as $range){ - foreach ($daycode as $dc){ - for ($i = 0; $i <= 23; $i++){ - $template->assign(array($dc.$i => "background-color:".$allxcolors[$c].";")); - } - } - $legend[] = array($range ,$allxcolors[$c]); - $c++; - } -} - -if (count($dayx) != 0){ - $c = 0; - foreach ($dayx as $range){ - foreach ($daycode as $dc){ - for ($i = $range[1]; $i<= $range[2]; $i++){ - $template->assign(array($dc.$i => "background-color:".$dayxcolors[$c].";")); - } - } - $legend[] = array($range ,$dayxcolors[$c]); - $c++; - } -} - -if (count($timex) != 0){ - $c = 0; - foreach ($timex as $range){ - $dc = $daycode[$range[0]]; - for ($i = 0; $i<= 23; $i++){ - $template->assign(array($dc.$i => "background-color:".$timexcolors[$c].";")); - } - $legend[] = array($range ,$timexcolors[$c]); - $c++; - } -} - -if (count($daytime) != 0){ - $c = 0; - foreach ($daytime as $range){ - $dc = $daycode[$range[0]]; - for ($i = $range[1]; $i<= $range[2]; $i++){ - $template->assign(array($dc.$i => "background-color:".$daytimecolors[$c].";")); - } - $legend[] = array($range ,$daytimecolors[$c]); - $c++; - } -} - -} - -$template->assign(array("PXEPLANDESC" => "")); -#print_r($legend); -if (count($legend) != 0){ - $template->define_dynamic("Legende", "Webseite"); - foreach ($legend as $item){ - # Timerange Komponente - $color = $item[1]; - $template->assign(array("TR1" => $item[0][0], - "TR2" => $item[0][1], - "TR3" => $item[0][2], - "PXEPLANDESC" => $item[0][3], - "COLOR" => $color)); - $template->parse("LEGENDE_LIST", ".Legende"); - } -} - - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/pxeconfigs.dwt b/ldap-site-mngmt/webinterface/computers/pxeconfigs.dwt deleted file mode 100644 index 428eb13b..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxeconfigs.dwt +++ /dev/null @@ -1,318 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='4'><h3>PXE Konfigurationen (Boot Menüs) <code class='font_object'> {AU} </code> </h3></td> - </tr> - - <tr><td colspan='4'> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr> - <td width='20%' class='tab_h'><b>PXE Config</b></td> - <td width='20%' class='tab_h'><b>gültig für Client(s)</b></td> - <td width='30%' class='tab_h'><b>Time Range (Gültigkeitsdauer)</b></td> - <td width='30%' class='tab_h'><b> </b></td> - </tr> - - - - <!-- BEGIN DYNAMIC BLOCK: Pxeconf --> - <tr valign='top'> - <td class='tab_d'>{PXECN} </td> - <td class='tab_d'>{PXECLIENTS} </td> - <td class='tab_d'>{TRANGES} </td> - <td class='tab_d'> </td> - </tr> - <!-- END DYNAMIC BLOCK: Pxeconf --> - - </table></td> - </tr> - - - <tr> - <td height='50'></td> - </tr> - - <tr> - <td colspan='4'><h4>Wochen Übersicht PXE Configs:</h4></td> - </tr> - <tr valign='top'> - <td width="70%"> - <table cellpadding='0' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr align='center'> - <td width='9%' style='border-color: black; border-style: solid; border-width: 2 0 2 2;'><b>Uhrzeit</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Montag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Dienstag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Mittwoch</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Donnerstag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Freitag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Samstag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 2 2 1;'><b>Sonntag</b></td> - </tr> - <tr heigth='2' align='center'> - <td width='9%' style='border-color: black; border-style: solid; border-width: 0 0 0 2;'>0</td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G0}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G1}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>2</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G2}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G3}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>4</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G4}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G5}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>6</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G6}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G7}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>8</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G8}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G9}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>10</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G10}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G11}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>12</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G12}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G13}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>14</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G14}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G15}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>16</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G16}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G17}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>18</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G18}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G19}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>20</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G20}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G21}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>22</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G22}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{A23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{B23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{C23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{D23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{E23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{F23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 2 1;{G23}'> </td> - </tr> - - </table></td> - - <td width="30%"> - <table cellpadding='3' cellspacing='3' border='1' align='left' width='50%' style='border-width: 0 0 0 0;'> - <tr> - <td width='65%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>PXE Config</b></td> - <td width='5%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Farbe</b></td> - </tr> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'>No Config </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 1 1 1;'> </td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: Legende --> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'>{PXEPLANDESC} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 1 1 1;background-color:{COLOR};'> </td> - </tr> - <!-- END DYNAMIC BLOCK: Legende --> - - </table></td> - </tr> - -</table> diff --git a/ldap-site-mngmt/webinterface/computers/pxeconfigs.php b/ldap-site-mngmt/webinterface/computers/pxeconfigs.php deleted file mode 100644 index 95d1abfd..00000000 --- a/ldap-site-mngmt/webinterface/computers/pxeconfigs.php +++ /dev/null @@ -1,92 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "pxeconfigs.dwt"; - -include('computers_header.inc.php'); - -################################################################################### - -$mnr = 2; -$sbmnr = -1; -$mcnr = -1; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$rbsDN = $_GET['rbsdn']; - -$template->assign(array("PXEDN" => "", - "PXECN" => "Noch keine PXE Boot Konfiguration angelegt", - "TRANGES" => "", - "PXECLIENTS" => "", - "RBS" => "", - "CN" => "")); - -$pxe_array = get_pxeconfigs2("",array("dn","cn","timerange","rbservicedn","pxeclientdn")); - -$template->define_dynamic("Pxeconf", "Webseite"); - -for ($i=0; $i<count($pxe_array); $i++){ - - # PXE Config Name - $pxename = "<a href='pxe.php?dn=".$pxe_array[$i]['dn']."&mnr=".$mnr."&sbmnr=".$i."' class='headerlink'>".$pxe_array[$i]['cn']."</a><br>"; - - # Timerange Komponenten - $trange = ""; - if (count($pxe_array[$i]['timerange']) > 1 ){ - foreach ($pxe_array[$i]['timerange'] as $tr){ - $exptime = array_merge(explode('_',$tr),$pxe_array[$i]['cn']); - $wopltranges[$i][] = $exptime; # Für grafische Wo-Ansicht - if ($exptime[0] == "X"){$exptime[0]="täglich";} - # if ($exptime[1] == "X" && $exptime[2] == "X"){$exptime[1] = ""; $exptime[2]= "";} - $trange .= $exptime[0].", von ".$exptime[1].":00 bis ".$exptime[2].":59 / "; - } - }elseif (count($pxe_array[$i]['timerange']) == 1 ){ - $exptime = array_merge(explode('_',$pxe_array[$i]['timerange']), array($pxe_array[$i]['cn'])); - $wopltranges[$i] = $exptime; # Für grafische Wo-Ansicht - if ($exptime[0] == "X"){$exptime[0]="täglich";} - # if ($exptime[1] == "X" && $exptime[2] == "X"){$exptime[1] = ""; $exptime[2]= "";} - $trange .= $exptime[0].", von ".$exptime[1].":00 bis ".$exptime[2].":59"; - } - - # PXE Config Clients - $pxeclients = ""; - if (count($pxe_array[$i]['pxeclientdn']) > 1 ){ - #echo "ClientsARRAY: "; print_r($pxe_array[$i]['pxeclientdn']); echo "<br>"; - foreach ($pxe_array[$i]['pxeclientdn'] as $item) { - $pxecldn = ldap_explode_dn($item, 1); - $pxeclients .= $pxecldn[0]."<br>"; - } - - }elseif (count($pxe_array[$i]['pxeclientdn']) == 1 ){ - $pxecldn = ldap_explode_dn($pxe_array[$i]['pxeclientdn'], 1); - $pxeclients = $pxecldn[0]; - } - - $template->assign(array("PXEDN" => $pxe_array[$i]['dn'], - "PXECN" => $pxename, - "TRANGES" => $trange, - "PXECLIENTS" => $pxeclients, - "RBS" => $rbsDN, - "MNR" => $mnr, - "SBMNR" => $sbmnr, - "AUDN" => $auDN)); - $template->parse("PXECONF_LIST", ".Pxeconf"); - -} - - -include("pxe_wochenplan.php"); - - -################################################################################### - -include("computers_footer.inc.php"); - -?> diff --git a/ldap-site-mngmt/webinterface/computers/rbshost.dwt b/ldap-site-mngmt/webinterface/computers/rbshost.dwt deleted file mode 100644 index abff2cd8..00000000 --- a/ldap-site-mngmt/webinterface/computers/rbshost.dwt +++ /dev/null @@ -1,385 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 1;'><h4>{HOSTLINK} Allgemein </a></h4></td> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{DHCPLINK} DHCP </a></h4></td> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4><code class='font_object'> RBS/PXE </code></h4></td> - <td align='center' width='15%' style='border-color: black; border-style: solid; border-width: 0 1 0 0;'><h4>{HWLINK} Geo/Hardware </a></h4></td> - <td> </td> - </tr> - <tr> - <td height='20'></td> - </tr> - - <tr> - <td colspan='5'><h3>RBS/PXE Setup - Rechner <code class='font_object'> {HOSTNAME} </code> </h3></td> - </tr> - <tr> - <td colspan='4' class='tab_d_ohne'>{NODHCP} </td> - </tr> - - <tr><td colspan='5'> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='rbshost_change.php' method='post'> - - <tr> - <td width='40%' class='tab_h'><b>Remote Boot Dienst Einbindung (DHCP/TFTP)</b></td> - <td width='60%' class='tab_h'><b> </b></td> - </tr> - - - - {RBS} - - - </table></td> - </tr> - - <input type='hidden' name='olddhcp' value='{OLDDHCP}'> - <input type='hidden' name='oldfixadd' value='{OLDFIXADD}'> - <input type='hidden' name='oldrbs' value='{OLDRBS}'> - <input type='hidden' name='hostip' value='{IPADDRESS}'> - <input type='hidden' name='hostdn' value='{HOSTDN}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - - <tr> - <td colspan='4'><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - - <tr> - <td height='20'></td> - </tr> - - <tr><td colspan='5'> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td colspan='3' width='50%' class='tab_h'><b>Rechner-spezifische PXE Konfigurationen (Bootmenüs)</b></td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: Rechnerpxes --> - <tr valign='top'> - <td width='20%' class='tab_d'>{PXECN} </td> - <td width='30%' class='tab_d'>{PXETR} </td> - <td class='tab_d'>{PXEDESC} </td> - </tr> - <!-- END DYNAMIC BLOCK: Rechnerpxes --> - - - </table></td> - </tr> - - <tr> - <td height='20'></td> - </tr> - - <tr><td colspan='5'> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td colspan='3' width='50%' class='tab_h'><b>Default PXE Konfigurationen des Remote Boot Dienstes</b></td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: Defpxes --> - <tr valign='top'> - <td width='20%' class='tab_d'>{DEFPXECN} </td> - <td width='30%' class='tab_d'>{DEFPXETR} </td> - <td class='tab_d'>{DEFPXEDESC} </td> - </tr> - <!-- END DYNAMIC BLOCK: Defpxes --> - - - </table></td> - </tr> - - - <tr> - <td height='50'></td> - </tr> - - <tr> - <td colspan='4'><h4>Wochen Übersicht PXE Configs für Rechner <code class='font_object'>{HOSTNAME}</code> :</h4></td> - </tr> - <tr><td colspan='4'> - <table cellpadding='0' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr align='center'> - <td width='9%' style='border-color: black; border-style: solid; border-width: 2 0 2 2;'><b>Uhrzeit</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Montag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Dienstag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Mittwoch</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Donnerstag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Freitag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Samstag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 2 2 1;'><b>Sonntag</b></td> - </tr> - <tr heigth='2' align='center'> - <td width='9%' style='border-color: black; border-style: solid; border-width: 0 0 0 2;'>0</td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G0}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G1}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>2</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G2}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G3}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>4</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G4}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G5}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>6</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G6}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G7}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>8</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G8}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G9}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>10</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G10}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G11}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>12</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G12}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G13}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>14</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G14}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G15}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>16</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G16}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G17}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>18</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G18}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G19}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>20</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G20}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G21}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>22</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G22}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{A23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{B23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{C23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{D23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{E23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{F23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 2 1;{G23}'> </td> - </tr> - - </table></td> - - <td colspan='2'> - <table cellpadding='3' cellspacing='3' border='1' align='left' width='50%' style='border-width: 0 0 0 0;'> - <tr> - <td width='65%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>PXE Config</b></td> - <td width='5%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Farbe</b></td> - </tr> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'>No Config </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 1 1 1;'> </td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: Legende --> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'>{PXEPLANDESC} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 1 1 1;background-color:{COLOR};'> </td> - </tr> - <!-- END DYNAMIC BLOCK: Legende --> - - </table></td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/rbshost.php b/ldap-site-mngmt/webinterface/computers/rbshost.php deleted file mode 100644 index b28e0726..00000000 --- a/ldap-site-mngmt/webinterface/computers/rbshost.php +++ /dev/null @@ -1,250 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "rbshost.dwt"; - -include('computers_header.inc.php'); - -$mnr = 0; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$hostDN = $_GET['dn']; - -# Rechner Daten -$attributes = array("hostname","domainname","ipaddress","hwaddress","description","hlprbservice", - "dhcphlpcont","dhcpoptfixed-address","dhcpopthardware","dhcpoptfilename", - "dhcpoptnext-server","hw-mouse","hw-graphic","hw-monitor"); -$host = get_node_data($hostDN,$attributes); -$hostip = explode('_',$host['ipaddress']); -# print_r($hostip); echo "<br><br>"; -$dhcphlpcont = $host['dhcphlpcont']; -$objectDN = $dhcphlpcont; -$rbsDN = $host['hlprbservice']; - -$rbs_dhcpopt = ""; -$host_dhcpopt = ""; -$dhcp_selectbox = ""; - -$rbs = ""; -$nodhcptext = ""; - -# Falls nicht DHCP Dienst dann Erklärung ... -if ($dhcphlpcont == ""){ - - $nodhcptext .= "Der Rechner ist in keinem DHCP Dienst eingetragen. Dies ist jedoch Voraussetzung, - um einen Remote Boot Dienst nutzen zu können.<br> - D.h. die hier verwalteten RBS-relevanten DHCP Optionen werden bzw. sind für den Client zentral gespeichert, - werden jedoch in keine DHCP Dienst Konfiguration ünernommen. - "; -} -# <input type='hidden' name='rbs' value='".$rbsDN."'> -########################################################### -# RBS Setup -$rbs_selectbox = ""; -$rbs_dhcpopt = ""; -$altrbs = alternative_rbservices($rbsDN); - - - $rbs_selectbox .= "<td class='tab_d'> - <select name='rbs' size='4' class='medium_form_selectbox'> - <option selected value='none'>----------</option>"; -if (count($altrbs) != 0){ - foreach ($altrbs as $item){ - $rbs_selectbox .= " - <option value='".$item['dn']."'>".$item['cn']." ".$item['au']."</option>"; - } -} -$rbs_selectbox .= "<option value=''>Kein RBS</option> - </select></td>"; - -# RBS Daten -if ($rbsDN == ""){ - - $rbs .= "<td class='tab_d_ohne'><b>Remote Boot Dienst: </b> </td> - <td class='tab_d_ohne'> - Rechner ist in keinem Remote Boot Dienst angemeldet<br></td></tr> - <tr valign='top'><td class='tab_d'> - RBS auswählen: <br></td>".$rbs_selectbox; -}else{ - - $rbsdata = get_node_data($rbsDN,array("tftpserverip")); - #print_r($rbsdata); echo "<br>"; - $exp2 = explode(',',$host['hlprbservice']); - $exprbs = explode('=',$exp2[0]); $rbserv = $exprbs[1]; - $exprbsau = explode('=',$exp2[2]); $rbsau = $exprbsau[1]; - $rbs .= "<tr valign='top'> - <td class='tab_d_ohne'><b>Remote Boot Dienst: </b> </td> - <td class='tab_d_ohne'> - Remote Boot Service <b>".$rbserv."</b> / AU <b>".$rbsau."</b></td> - </tr> - <tr> - <td class='tab_d_ohne'>DHCP Option <b>next-server</b> (TFTP Boot Server IP):</td> - <td class='tab_d_ohne'><b>".$host['dhcpoptnext-server']."</b> </td> - </tr> - <tr> - <td class='tab_d'>DHCP Option <b>filename</b> (initiale remote Bootdatei):</td> - <td class='tab_d'><b>".$host['dhcpoptfilename']."</b> </td> - </tr> - <tr valign='top'><td class='tab_d'> - RBS Einbindung ändern: <br></td>".$rbs_selectbox." - </tr>"; - - $rbs_dhcpopt = ""; - -} - - -$template->assign(array("HOSTDN" => $hostDN, - "HOSTNAME" => $host['hostname'], - "DOMAINNAME" => $host['domainname'], - "HWADDRESS" => $host['hwaddress'], - "IPADDRESS" => $hostip[0], - "DESCRIPTION" => $host['description'], - "OLDDHCP" => $objectDN, - "OLDFIXADD" => $host['dhcpoptfixed-address'], - "NODHCP" => $nodhcptext, - "OLDRBS" => $rbsDN, - "RBS" => $rbs, - "HOSTLINK" => "<a href='host.php?dn=".$hostDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "DHCPLINK" => "<a href='dhcphost.php?dn=".$hostDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "HWLINK" => "<a href='hwhost.php?dn=".$hostDN."&sbmnr=".$sbmnr."' class='headerlink'>", - "AUDN" => $auDN, - "SBMNR" => $sbmnr)); - - - - -# Rechnerspezifische PXEs -$hostpxeconfigs = get_pxeconfigs2($hostDN, array("dn","cn","description","timerange")); - -$template->assign(array("PXEDN" => "", - "PXECN" => "Keine PXE Config angelegt", - "PXEDESC" => "", - "PXETR" => "",)); -$template->define_dynamic("Rechnerpxes", "Webseite"); - -if (count($hostpxeconfigs) != 0){ - for ($i=0;$i<count($hostpxeconfigs);$i++){ - $pxelink = "<a href='pxe.php?dn=".$hostpxeconfigs[$i]['dn']."&mnr=1&sbmnr=".$sbmnr."&mcnr=".$i."&nodedn=".$hostDN."' class='headerlink'>".$hostpxeconfigs[$i]['cn']."</a>"; - - $trange = ""; - if (count($hostpxeconfigs[$i]['timerange']) > 1 ){ - foreach ($hostpxeconfigs[$i]['timerange'] as $tr){ - $exptime = array_merge(explode('_',$tr), array($hostpxeconfigs[$i]['cn'])); - $timeranges[$i][] = $exptime; # Für grafische Wo-Ansicht - if ($exptime[0] == "X"){$exptime[0]="täglich";} - # if ($exptime[1] == "X" && $exptime[2] == "X"){$exptime[1] = ""; $exptime[2]= "";} - $trange .= $exptime[0].", von ".$exptime[1].":00 bis ".$exptime[2].":59 <br> "; - } - }else{ - $exptime = array_merge(explode('_',$hostpxeconfigs[$i]['timerange']), array($hostpxeconfigs[$i]['cn'])); - $timeranges[$i] = $exptime; # Für grafische Wo-Ansicht - if ($exptime[0] == "X"){$exptime[0]="täglich";} - # if ($exptime[1] == "X" && $exptime[2] == "X"){$exptime[1] = ""; $exptime[2]= "";} - $trange .= $exptime[0].", von ".$exptime[1].":00 bis ".$exptime[2].":59"; - } - $template->assign(array("PXEDN" => $hostpxeconfigs[$i]['dn'], - "PXECN" => $pxelink, - #"PXEDESC" => $hostpxeconfigs['description'], - "PXETR" => $trange, )); - $template->parse("RECHNERPXES_LIST", ".Rechnerpxes"); - - } -} - - -# Default PXEs des RBS -$template->assign(array("DEFPXEDN" => "", - "DEFPXECN" => "Keine PXE Config angelegt", - "DEFPXEDESC" => "", - "DEFPXETR" => "", - "PXEPLANDESC" => "")); -$template->define_dynamic("Defpxes", "Webseite"); - -if ($rbsDN != ""){ - $defaultpxeconfigs = get_pxeconfigs($rbsDN,array("dn","cn","description","timerange","filename")); - - if (count($defaultpxeconfigs) != 0){ - for ($i=0;$i<count($defaultpxeconfigs);$i++){ - if ($defaultpxeconfigs[$i]['filename'] == "default"){ - $defpxelink = "<a href='showpxe.php?dn=".$defaultpxeconfigs[$i]['dn']."&mnr=1&sbmnr=".$sbmnr."&mcnr=-1&hostdn=".$hostDN."' class='headerlink'>".$defaultpxeconfigs[$i]['cn']."</a>"; - - $deftrange = ""; - if (count($defaultpxeconfigs[$i]['timerange']) > 1 ){ - foreach ($defaultpxeconfigs[$i]['timerange'] as $tr){ - $exptime = array_merge(explode('_',$tr), array($defaultpxeconfigs[$i]['cn'])); - $timeranges[$i][] = $exptime; # Für grafische Wo-Ansicht - if ($exptime[0] == "X"){$exptime[0]="täglich";} - # if ($exptime[1] == "X" && $exptime[2] == "X"){$exptime[1] = ""; $exptime[2]= "";} - $deftrange .= $exptime[0].", von ".$exptime[1].":00 bis ".$exptime[2].":59 <br> "; - } - }else{ - $exptime = array_merge(explode('_',$defaultpxeconfigs[$i]['timerange']), array($defaultpxeconfigs[$i]['cn'])); - $timeranges[$i] = $exptime; # Für grafische Wo-Ansicht - if ($exptime[0] == "X"){$exptime[0]="täglich";} - # if ($exptime[1] == "X" && $exptime[2] == "X"){$exptime[1] = ""; $exptime[2]= "";} - $deftrange .= $exptime[0].", von ".$exptime[1].":00 bis ".$exptime[2].":59"; - } - - $template->assign(array("DEFPXEDN" => $defaultpxeconfigs[$i]['dn'], - "DEFPXECN" => $defpxelink, - "DEFPXEDESC" => $defaultpxeconfigs['description'], - "DEFPXETR" => $deftrange, )); - $template->parse("DEFPXES_LIST", ".Defpxes"); - } - } - } -#} - -########################################################## -# PXE Wochenübersicht - -# erst Defaults vom RBS Dienst -for ($i=0; $i<count($defaultpxeconfigs); $i++){ - # Timerange Komponenten - if (count($defaultpxeconfigs[$i]['timerange']) > 1 ){ - foreach ($defaultpxeconfigs[$i]['timerange'] as $tr){ - $exptime = array_merge(explode('_',$tr),array($defaultpxeconfigs[$i]['cn'])); - $wopldeftranges[$i][] = $exptime; # Für grafische Wo-Ansicht - } - }else{ - $exptime = array_merge(explode('_',$defaultpxeconfigs[$i]['timerange']), array($defaultpxeconfigs[$i]['cn'])); - $wopldeftranges[$i] = $exptime; # Für grafische Wo-Ansicht - } -} -# Diese dann mit möglichen Rechnerspezifischen überschreiben -for ($i=0; $i<count($hostpxeconfigs); $i++){ - # Timerange Komponenten - if (count($hostpxeconfigs[$i]['timerange']) > 1 ){ - foreach ($hostpxeconfigs[$i]['timerange'] as $tr){ - $exptime = array_merge(explode('_',$tr),array($hostpxeconfigs[$i]['cn'])); - $wopltranges[$i][] = $exptime; # Für grafische Wo-Ansicht - } - }else{ - $exptime = array_merge(explode('_',$hostpxeconfigs[$i]['timerange']), array($hostpxeconfigs[$i]['cn'])); - $wopltranges[$i] = $exptime; # Für grafische Wo-Ansicht - } -} - -include("pxe_wochenplan.php"); - -} - -################################################################################### - -include("computers_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/rbshost_change.php b/ldap-site-mngmt/webinterface/computers/rbshost_change.php deleted file mode 100644 index 179451ad..00000000 --- a/ldap-site-mngmt/webinterface/computers/rbshost_change.php +++ /dev/null @@ -1,98 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$syntax = new Syntaxcheck; - -$hostip = $_POST['hostip']; - -$rbs = $_POST['rbs']; -$oldrbs = $_POST['oldrbs']; - -$hostDN = $_POST['hostdn']; -$sbmnr = $_POST['sbmnr']; - -$rbs = htmlentities($rbs); -$oldrbs = htmlentities($oldrbs); - - -/*echo "new dhcp:"; print_r($dhcp); echo "<br>"; -echo "old dhcp:"; print_r($olddhcp); echo "<br>"; -echo "new rbs:"; print_r($rbs); echo "<br>"; -echo "old rbs:"; print_r($oldrbs); echo "<br>"; -echo "Host DN:"; print_r($hostDN); echo "<br>"; -echo "submenuNR:"; print_r($sbmnr); echo "<br><br>";*/ - - -$seconds = 2; -$url = 'rbshost.php?dn='.$hostDN.'&sbmnr='.$sbmnr; - -echo " -<html> -<head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - - -########################################## -# RBS - -if ($rbs != "none" && $rbs != $oldrbs){ - if ($rbs != ""){ - $exp = ldap_explode_dn($rbs, 1); - $rbscn = $exp[0]; - $rbsau = $exp[2]; - - $dhcpdata = get_node_data($rbs,array("tftpserverip","initbootfile")); - $entryrbs ['hlprbservice'] = $rbs; - $entryrbs ['dhcpoptnext-server'] = $dhcpdata['tftpserverip']; - $entryrbs ['dhcpoptfilename'] = $dhcpdata['initbootfile']; - if ($oldrbs != ""){ - echo "RBS replace "; print_r($oldrbs); echo " with "; print_r($entryrbs); echo "<br>"; - if ($result = ldap_mod_replace($ds,$hostDN,$entryrbs)){ - update_dhcpmtime(array()); - rbs_adjust_host($hostDN, $rbs); - $mesg = "Remote Boot Service erfolgreich zu <b>".$rbscn." [Abt.: ".$rbsau."]</b> geändert<br><br>"; - }else{ - $mesg = "Fehler beim ändern des Remote Boot Services zu <b>".$rbscn."</b>!<br><br>"; - } - }else{ - echo "RBS add "; print_r($entryrbs); echo "<br>"; - if ($result = ldap_mod_add($ds,$hostDN,$entryrbs)){ - update_dhcpmtime(array()); - rbs_adjust_host($hostDN, $rbs); - $mesg = "Remote Boot Service erfolgreich zu <b>".$rbscn." [Abt.: ".$rbsau."]</b> geändert<br><br>"; - }else{ - $mesg = "Fehler beim ändern des Remote Boot Services zu <b>".$rbscn."</b>!<br><br>"; - } - } - }else{ - $entryrbs ['hlprbservice'] = array(); - $entryrbs ['dhcpoptnext-server'] = array(); - $entryrbs ['dhcpoptfilename'] = array(); - echo "RBS delete "; echo "<br>"; - if ($result = ldap_mod_del($ds,$hostDN,$entryrbs)){ - update_dhcpmtime(array()); - $mesg = "Rechner erfolgreich aus RBS gelöscht<br><br>"; - }else{ - $mesg = "Fehler beim löschen aus RBS!<br><br>"; - } - } -} -if ($rbs == "none"){ - echo "RBS none <br>"; -} - - -##################### - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/computers/showpxe.dwt b/ldap-site-mngmt/webinterface/computers/showpxe.dwt deleted file mode 100644 index d6f37f66..00000000 --- a/ldap-site-mngmt/webinterface/computers/showpxe.dwt +++ /dev/null @@ -1,57 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - - <tr> - <td height='20'><h4><a href='rbshost.php?dn={HOSTDN}&mnr=1&sbmnr={SBMNR}&mcnr=-1' class='headerlink'><< Zurück zu Rechner {HOST}</a></h4></td> - </tr> - <tr> - <td height='20'> </td> - </tr> - - <tr> - <td colspan='2'><h3>Default PXE Config <code class='font_object'> {PXECN} </code> </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - - <tr> - <td colspan='3'>Diese PXE Config wird vom RBS Betreiber verwaltet (Sie haben keine Schreibrechte).</td> - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='80%' style='border-color: black; border-style: solid; border-width: 2 2 2 2;'> - - <tr> - <td width='8%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>#</td> - <td width='12%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>Flags</td> - <td width='80%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>Menu Label </td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: Bootmenu --> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;{BGCDEF}'>{POSITION} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;{BGCDEF}'>{MEDEF} {MEPWD} {MEHIDE} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;{BGCDEF}'><font size='+1'>{ANZEIGE} </font></td> - </tr> - </form> - <!-- END DYNAMIC BLOCK: Bootmenu --> - - </table></td> - </tr> - <tr> - <td><h4>Flags:</h4></font> - <ul> - <li><b>D</b> -> Default Menüeintrag</li> - <li><b>P</b> -> Passwort geschützt</li> - <li><b>H</b> -> Hidden</li> - </ul> - </td> - </tr> - <tr> - <td height='20'></td> - </tr> - - - -</table> diff --git a/ldap-site-mngmt/webinterface/computers/showpxe.php b/ldap-site-mngmt/webinterface/computers/showpxe.php deleted file mode 100644 index 7386aa83..00000000 --- a/ldap-site-mngmt/webinterface/computers/showpxe.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "showpxe.dwt"; - -include('computers_header.inc.php'); - -$mnr = -1; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; -$mcnr = $_GET['mcnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createComputersMenu($rollen, $mnr, $auDN, $sbmnr, $mcnr); - -################################################################################### - -$pxeDN = $_GET['dn']; - -$hostdn = $_GET['hostdn']; -$hostdnarray = ldap_explode_dn($hostdn, 1); - -$attributes = array("dn","cn","rbservicedn","filename","timerange","kbdmap","menumasterpasswd","menutitle"); -$pxe = get_node_data($pxeDN,$attributes); -#print_r($pxe); -$expcn = explode('_',$pxe['cn']); -$name = array_slice($expcn,1); -$pxecn = implode('_',$name); - - - - -# Bootmenü Einträge -$menuentries = get_menuentries($pxeDN,array("dn","menuposition","label","menulabel","menudefault","menupasswd","menuhide")); -# print_r($menuentries); echo "<br>"; -$maxpos = count($menuentries)+1; - - -################################################ -# Bootmenü Einträge - -$template->define_dynamic("Bootmenu", "Webseite"); -$template->assign(array("PXECN" => $pxecn, - "HOSTDN" => $hostdn, - "HOST" => $hostdnarray[0], - "SBMNR" => $sbmnr, - "MENDN" => "", - "MENULABEL" => "", - "ANZEIGE" => "Kein Bootmenü Eintrag angelegt", - "MEDEF" => "", - "MEPWD" => "", - "MEHIDE" => "", - "BGCDEF" => "", - "POSITION" => "")); -foreach ($menuentries as $me){ - $anzeige = ""; - if ($me['label'] != "" && $me['menulabel'] == ""){$anzeige .= $me['label'];} - if ($me['menulabel'] != ""){$anzeige .= $me['menulabel'];} - if ($me['menudefault'] == 1){$medef = "<b>D</b>"; $bgcdef = "background-color:#EEDD82;";} - if ($me['menupasswd'] != ""){$mepwd = "<b>P</b>";} - if ($me['menuhide'] == 1){$mehide = "<b>H</b>"; $bgcdef = "background-color:#A0A0A0;";} - $template->assign(array("MENDN" => $me['dn'], - "ANZEIGE" => $anzeige, - "ANZEIGENAME" => $anzeige, - "POSITION" => $me['menuposition'], - "MEDEF" => $medef, - "MEPWD" => $mepwd, - "MEHIDE" => $mehide, - "BGCDEF" => $bgcdef, - "AUDN" => $auDN)); - $template->parse("BOOTMENU_LIST", ".Bootmenu"); - $medef = ""; - $bgcdef = ""; -} - - -################################################################################### - -include("computers_footer.inc.php"); - -?> diff --git a/ldap-site-mngmt/webinterface/dhcp/delete_confirm.php b/ldap-site-mngmt/webinterface/dhcp/delete_confirm.php deleted file mode 100644 index 3bb798b2..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/delete_confirm.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$dn = $_POST['dn']; -$name = $_POST['name']; -$delurl = $_POST['delurl']; -$backurl = $_POST['backurl']; -$successurl = $_POST['successurl']; -$mnr = $_POST['mnr']; - -echo " -<html> -<head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> - <tr> - <td> - Wollen Sie das Objekt <b>".$name."</b> wirklich löschen?<br><br> - <form action='".$delurl."' method='post'> - Falls ja:<br><br> - <input type='hidden' name='dn' value='".$dn."'> - <input type='hidden' name='name' value='".$name."'> - <input type='hidden' name='successurl' value='".$successurl."'> - <input type='hidden' name='mnr' value='".$mnr."'> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'><br><br> - </form> - <form action='".$backurl."' method='post'> - Falls, nein:<br><br> - <input type='Submit' name='apply' value='zurück' class='small_loginform_button'> - </form> - </td> - </tr> -</table> -</body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcp.dwt b/ldap-site-mngmt/webinterface/dhcp/dhcp.dwt deleted file mode 100644 index 9946aae9..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcp.dwt +++ /dev/null @@ -1,85 +0,0 @@ -<html> - -<head> - <title>{SEITENTITEL}</title> - <link rel='stylesheet' href='../styles.css' type='text/css'></head> -<body> - -<table cellpadding='0' cellspacing='0' border='0' width='100%' style='background-color: #F0F0F0;border-color: #505050; border-style: solid; border-width: 0 0 1 0;'> - <tr> - <td width='30%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr valign='top'> - <td width='1'></td> - <td><h2>Client / IP Management</h2></td> - </tr> - </table> - </td> - - <td width='45%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr valign='top' align='left'> - <td> - <h4><a href='../start.php' class='headerlink'>Startseite</a> - >> <a href='../au/au.php' class='headerlink'>{AU}</a> [ {DOMAIN} ]</h4> - </td> - </tr> - </table> - </td> - <td width='25%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%' align='right'> - <tr valign='top' align='right'> - <td> - {LOGIN} - </td> - </tr> - </table> - </td> - </tr> - <tr> - <td colspan='3'>{MAINMENU}</td> - </tr> -</table> - -<br> - - - -<table cellpadding='5' cellspacing='0' border='0' width='100%' height='85%'> - - <tr valign='top' height='100%'> - <td width='28%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr> - <td> - - {NAVIGATION} - - </td> - </tr> - <tr> - <td> - - {IPBLOCKS} - - </td> - </tr> - </table> - </td> - - <td width='72%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr><td> - - {HAUPTFENSTER} - - </td></tr> - </table> - </td> - - </tr> -</table> - -</body> - -</html> diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcp.php b/ldap-site-mngmt/webinterface/dhcp/dhcp.php deleted file mode 100644 index a54d5b17..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcp.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "dhcp_start.dwt"; - -include('dhcp_header.inc.php'); - -$mnr = 0; -$sbmnr = -1; - -################################################################################### - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createDhcpMenu($rollen, $mnr, $auDN, $sbmnr); - - -################################################################################### - -include("dhcp_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcp_footer.inc.php b/ldap-site-mngmt/webinterface/dhcp/dhcp_footer.inc.php deleted file mode 100644 index 7849823e..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcp_footer.inc.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -$template->assign(array("PFAD" => $START_PATH)); - -# Daten in die Vorlage parsen -$template->parse("LOGIN", "Login"); -$template->parse("MAINMENU", "Mmenu"); -$template->parse("NAVIGATION", "Menu"); -$template->parse("IPBLOCKS", "IPBlocks"); -$template->parse("HAUPTFENSTER", "Webseite"); -$template->parse("PAGE", "Vorlage"); - -# Fertige Seite an den Browser senden -$template->FastPrint("PAGE"); - -# Abmelden vom LDAP -ldap_unbind($ds); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcp_header.inc.php b/ldap-site-mngmt/webinterface/dhcp/dhcp_header.inc.php deleted file mode 100644 index 8cd98c00..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcp_header.inc.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php - -# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt. -$titel = "DHCP Management"; -# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc. -$mainnr = 2; - - -$template = new FastTemplate("."); -# dem erstellten Template-Objekt eine Vorlage zuweisen -$definedTemplates = array("Vorlage" => "dhcp.dwt", - "Login" => "../logout_form.inc.dwt", - "Mmenu" => "../hauptmenue.dwt", - "Menu" => "menu.dwt", - "IPBlocks" => "../common/ipblocks.dwt", - "Webseite" => $webseite); -if (isset($additionalTemplates)) { - foreach ($additionalTemplates as $templateKey => $templateFile) { - $definedTemplates[$templateKey] = $templateFile; - } -} -$template->define($definedTemplates); -$template->assign(array("SEITENTITEL" => $titel, "ROLLE" => "mainadmin", "AU" => $au_ou, "DOMAIN" => $assocdom, "USERCN" => $usercn)); - - -include("dhcp_menu.php"); -include("../common/ip_blocks.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcp_menu.php b/ldap-site-mngmt/webinterface/dhcp/dhcp_menu.php deleted file mode 100644 index 01ec5b92..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcp_menu.php +++ /dev/null @@ -1,215 +0,0 @@ -<?php - -function createDhcpMenu($rollen, $mnr, $auDN, $sbmnr) { - - global $template, $START_PATH, $rootAU; - - $mipbs = get_maxipblocks_au($auDN); - #echo "MIPB: "; print_r ($mipbs); echo "<br>"; - if ($mipbs[0] != ""){ - $hauptmenu = array(); - }else{ - $hauptmenu = array(array("link" => "no_dhcp.php", - "text" => "Übersicht", - "zugriff" => "alle")); - } - - $pools = get_dhcppools($auDN, array("dn")); - if (count($pools) == 0){ - $poollink = "dhcpnopool.php"; - }else{ - $poollink = "dhcppool.php"; - } - - $i=0; - if ( $auDN == $rootAU ) { - $dhcpservice_array = get_dhcpservices($auDN,array("dn","cn")); - if (count($dhcpservice_array) == 0){ - $dhcpsvlink = "new_dhcpservice.php?mnr=1"; - } - else { - $dhcpsvlink = "dhcpservice.php?mnr=1"; - } - $hauptmenu []= array("link" => $dhcpsvlink, - "text" => "DHCP Service", - "zugriff" => array("MainAdmin","DhcpAdmin")); - $i++; - } - if ($mipbs[0] != ""){ - if ( check_if_max_networks() ){ - $hauptmenu [] = array("link" => "dhcpsubnets.php?mnr=".$i, - "text" => "DHCP Subnets", - "zugriff" => array("MainAdmin","DhcpAdmin")); - - $subnets = array(); - # falls komplette Netze verfügbar, link zum Neuanlegen - if ( check_if_free_networks() ){ - #$dhcpsubnet_array = get_dhcpsubnets($auDN,array("dn","cn")); - /*for ($j=0;$j<count($dhcpsubnet_array);$j++){ - $subnets[] = array("link" => "dhcpsubnet.php?dn=".$dhcpsubnet_array[$j]['dn']."&mnr=".$i."&sbmnr=".$j, - "text" => $dhcpsubnet_array[$j]['cn'], - "zugriff" => array("MainAdmin","DhcpAdmin")); - }*/ - $subnets[] = array("link" => "new_dhcpsubnet.php?mnr=".$i."&sbmnr=0", - "text" => "Neues DHCP Subnet anlegen", - "zugriff" => array("MainAdmin","DhcpAdmin")); - } - $i++; - $hauptmenu [] = array("link" => $poollink."?mnr=".$i, - "text" => "Dynamische DHCP Pools", - "zugriff" => array("MainAdmin","DhcpAdmin")); - - $submenu = array(#array(), - $subnets, - array()); - }else{ - $hauptmenu [] = array("link" => $poollink."?mnr=".$i, - "text" => "Dynamische DHCP Pools", - "zugriff" => array("MainAdmin","DhcpAdmin")); - } - } - - # Zusammenstellen der Menuleiste - $template->define_dynamic("Hauptmenu", "Menu"); - $template->define_dynamic("Submenu", "Menu"); - $i=0; - $maxmenu = count($hauptmenu); - - foreach($hauptmenu as $item) { - $template->clear_parse("SUBMENU_LIST"); - if($item['zugriff'] === "alle" || vergleicheArrays($rollen , $item['zugriff'])) { - - $subempty = 0; - $j=0; - $maxsub = count($submenu[$mnr]); - if($maxsub > 0){ - foreach($submenu[$mnr] as $item2) { - - if($item2['zugriff'] === "alle" || vergleicheArrays($rollen, $item2['zugriff'])) { - if($i != $mnr){ - $template->assign(array("SUB" => "")); - # "LINK_S" => "", - # "TEXT_S" => "")); - $template->parse("SUBMENU_LIST", ".Submenu"); - $template->clear_dynamic("Submenu"); - } - else{ - if ($j==0) { - if ($sbmnr==0) { - if($maxsub == 1){$zwisch="";} - else {$zwisch="";} - $lastaktive=true; - $farb="#505050"; - } - else{ - if($maxsub == 1){$zwisch="";} - else {$zwisch="";} - $farb="#A0A0A0"; - $lastaktive=false; - } - } - else { - if ($sbmnr==$j) { - if($maxsub == $j+1){$zwisch="";} - else {$zwisch="";} - $lastaktive=true; - $farb="#505050"; - } - else { - $farb="#A0A0A0"; - if($maxsub == $j+1){$zwisch="";} - else {$zwisch="";} - # if ($lastaktive) {$zwisch="branch";} - # else {$zwisch="branch";} - $lastaktive=false; - } - } - $htmlcode= " - <tr height='4'> - <td></td><td></td><td></td><td></td> - </tr> - <tr> - <td width='8%'> </td> - <td width='8%' align='right'>".$zwisch."</td> - <td width='74%' align='left' style='border-width:1 1 1 1;border-color:#000000;border-style:solid;padding:2;padding-left:15px;background-color:{FARBE_S}'> - <a href='".$item2['link']."' style='text-decoration:none'><code class='submenue_schrift'>".$item2['text']."</code></a></td> - <td width='10%'> </td> - </tr> - "; - $template->assign(array("SUB" => $htmlcode)); - $template->assign(array("FARBE_S" => $farb)); - $template->parse("SUBMENU_LIST", ".Submenu"); - $template->clear_dynamic("Submenu"); - } - } - else { - $subempty++; - } - $j=$j+1; - } - } - if($subempty == count($submenu[$mnr])) { - $template->assign(array("SUB" => "")); - # "LINK_S" => "", - # "TEXT_S" => "")); - $template->parse("SUBMENU_LIST", ".Submenu"); - $template->clear_dynamic("Submenu"); - } - - # weiter im Hauptmenü - if ($i==0) { - if ($mnr==0) { - if(count($submenu[$i][0]) != 0){ - if($maxmenu == 1){$zwisch="";} # {$zwisch="<img style='border-width:0;border-style=none;' src='../pics/minus2.gif'>";} - else {$zwisch="";} - }else{$zwisch="";} - $lastaktive=true; - $farb="#505050"; - } - else{ - if(count($submenu[$i][0]) != 0){ - if($maxmenu == 1){$zwisch="<a href='{LINK_M}' style='border-style=none;text-decoration:none'> - <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} - else {$zwisch="<a href='{LINK_M}' style='border-style=none;text-decoration:none'> - <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} - }else{$zwisch="";} - $farb="#A0A0A0"; - $lastaktive=false; - } - } - else { - if ($mnr==$i) { - if(count($submenu[$mnr][0]) != 0){ - if($maxmenu == $i+1){$zwisch="";} - else {$zwisch="";} - }else{$zwisch="";} - $lastaktive=true; - $farb="#505050"; - } - else { - $farb="#A0A0A0"; - if(count($submenu[$i][0]) != 0){ - if($maxmenu == $i+1){$zwisch="<a href='{LINK_M}' style='border-style=none;text-decoration:none'> - <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} - else {$zwisch="<a href='{LINK_M}' style='border-style=none;text-decoration:none'> - <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} - }else{$zwisch="";} - #if ($lastaktive) {$zwisch="";} - #else {$zwisch="";} - $lastaktive=false; - } - } - $template->assign(array("ICON" => $zwisch, - "FARBE" => $farb, - "LINK_M" => $item["link"], - "TEXT_M" => $item["text"])); - $template->parse("HAUPTMENU_LIST", ".Hauptmenu"); - $template->clear_dynamic("Hauptmenu"); - } - $i=$i+1; - } - if ($lastaktive) {$template->assign(array("ENDE" => ""));} - else {$template->assign(array("ENDE" => ""));} -} - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcp_start.dwt b/ldap-site-mngmt/webinterface/dhcp/dhcp_start.dwt deleted file mode 100644 index a80c77d7..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcp_start.dwt +++ /dev/null @@ -1,32 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='90%'> - <tr> - <td colspan='2'><h3>Modul - DHCP Management: </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td> - <p>Modul zur Verwaltung von DHCP Subnets, dynamischen Pools und Classes <br> - Benutzen Sie die Navigation links, um die einzelnen Verwaltungsbereiche anzusteuern:</p> - <ul> - <li><p><b>DHCP Subnets</b><br> - Verwalten Sie ihre Subnetze ... </p> - </li> - <li><p><b>DHCP Pools</b><br> - Weisen Sie ihren DHCP Subnets IP Ranges zur dynamischen Adressvergabe zu ... </p> - </li> - <li><p><b>DHCP Classes</b><br> - Verwalten Sie Klassen von DHCP Objekten ...</p> - </li> - </ul> - - <br> - <p>Die Verwaltung von DHCP Hosts, etwa das Eintragen ihrer Rechner im zentralen DHCP Dienst, erfolgt über das<br> - Modul <a class='headerlink' href='../computers/computers.php' >Rechner Management</a>. - - </p> - </td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcpnopool.dwt b/ldap-site-mngmt/webinterface/dhcp/dhcpnopool.dwt deleted file mode 100644 index 63047a9a..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcpnopool.dwt +++ /dev/null @@ -1,53 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Dynamische DHCP Pools </h3></td> - </tr> - - <tr> - <td>Noch keine dynamischen DHCP Pools angelegt</td> - </tr> - - <tr> - <td height='30'></td> - </tr> - - <tr> - <td colspan='2'><h4>Dynamischen DHCP Pool hinzufügen </h4></td> - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'> - <form action='dhcppool_add.php' method='post'> - - <tr valign='bottom'> - <td width='50%' class='tab_h'><b>IP Range (innerhalb eines Subnetzes)</b><br> - weitere Ranges können später hinzugefügt werden</td> - <td width='50%' class='tab_h'><b>Unknown Clients</b></td> - </tr> - - <tr height='50' valign='top'> - <td class='tab_d'> - <input type='Text' name='addrange1' value='' size='15' maxlength='15' class='medium_form_field'> - - - <input type='Text' name='addrange2' value='' size='15' maxlength='15' class='medium_form_field'> - </td> - <td class='tab_d'> - <select name='unknownclients' size='3' class='small_form_selectbox'> - <option selected value='deny'> DENY </option> - <option value='allow'> ALLOW </option> - <option value='ignore'> IGNORE </option> - </select> - </td> - </tr> - <input type='hidden' name='mnr' value='{MNR}'> - - </table></td> - </tr> - <tr> - <td> - <input type='Submit' name='apply' value='anlegen' class='small_loginform_button'> - </form></td> - </tr> - - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcpnopool.php b/ldap-site-mngmt/webinterface/dhcp/dhcpnopool.php deleted file mode 100644 index fd198bc1..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcpnopool.php +++ /dev/null @@ -1,128 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "dhcpnopool.dwt"; - -include('dhcp_header.inc.php'); - -$mnr = 3; -$sbmnr = -1; - -################################################################################### - -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createDhcpMenu($rollen, $mnr, $auDN, $sbmnr); - -################################################################################### - -$template->assign(array("POOLDN" => "", - "CN" => "", - "SUBNETDN" => "", - "SUBNET" => "", - "RANGE1" => "", - "RANGE2" => "", - "DESCRIPTION" => "", - "STATEMENTS" => "", - "ALLOW" => "", - "DENY" => "", - "IGNORE" => "", - "DEFAULTLEASE" => "", - "MAXLEASE" => "", - "MNR" => $mnr)); -/* -# DHCP Pools Daten holen -$attributes = array("dn","cn","dhcphlpcont","dhcprange","description","dhcpstatements","dhcpoptallow", - "dhcpoptdefault-lease-time","dhcpoptdeny","dhcpoptignore","dhcpoptmax-lease-time", - "dhcpoptgeneric"); -$pools = get_dhcppools($auDN, $attributes); -#print_r($pools); - -$template->define_dynamic("Dhcppools", "Webseite"); -$template->define_dynamic("Dhcpranges", "Webseite"); - -# Für jeden Pool ... -foreach ($pools as $pool){ - - # DHCP Subnet des Pools - $subnet = ldap_explode_dn($pool['dhcphlpcont'],1); - $subnetdnexp = ldap_explode_dn( $pool['dhcphlpcont'], 0); - $subnetauexp = array_slice($subnetdnexp, 3); - $subnetau = implode(',',$subnetauexp); - - - $template->clear_parse("DHCPRANGES_LIST"); - - # DHCP Ranges - if (count($pool['dhcprange']) != 0){ - #$template->define_dynamic("Dhcpranges", "Webseite"); - if (count($pool['dhcprange']) > 1){ - foreach ($pool['dhcprange'] as $dhcprange){ - $iprange = explode('_',$dhcprange); - $template->assign(array( - "RANGE1" => $iprange[0], - "RANGE2" => $iprange[1], - "RPOOLDN" => $pool['dn'])); - $template->parse("DHCPRANGES_LIST", ".Dhcpranges"); - $template->clear_dynamic("Dhcpranges"); - } - }else{ - $iprange = explode('_',$pool['dhcprange']); - $template->assign(array( - "RANGE1" => $iprange[0], - "RANGE2" => $iprange[1], - "RPOOLDN" => $pool['dn'])); - $template->parse("DHCPRANGES_LIST", ".Dhcpranges"); - $template->clear_dynamic("Dhcpranges"); - } - } - - # Unknown-Clients - if ($pool['dhcpoptallow'] == "unknown-clients"){ - $unknownclients = "allow"; - $ucselectbox = "<option selected value='allow'> ALLOW </option> - <option value='deny'> DENY </option> - <option value='ignore'> IGNORE </option>"; - } - elseif ($pool['dhcpoptignore'] == "unknown-clients") { - $unknownclients = "ignore"; - $ucselectbox = "<option selected value='ignore'> IGNORE </option> - <option value='allow'> ALLOW </option> - <option value='deny'> DENY </option>"; - } - else{ - $unknownclients = "deny"; - $ucselectbox = "<option selected value='deny'> DENY </option> - <option value='allow'> ALLOW </option> - <option value='ignore'> IGNORE </option>"; - } - - $template->assign(array("POOLDN" => $pool['dn'], - "CN" => $pool['cn'], - "SUBNETDN" => $pool['dhcphlpcont'], - "SUBNET" => $subnet[0], - "SUBNETAU" => $subnetau, - "DESCRIPTION" => $pool['description'], - "STATEMENTS" => $pool['dhcpstatements'], - "UCSELECT" => $ucselectbox, - "UCNOW" => $unknownclients, - "ALLOW" => $pool['dhcpoptallow'], - "DENY" => $pool['dhcpoptdeny'], - "IGNORE" => $pool['dhcpoptignore'], - "DEFAULTLEASE" => $pool['dhcpoptdefault-lease-time'], - "MAXLEASE" => $pool['dhcpoptmax-lease-time'], - "MNR" => $mnr)); - $template->parse("DHCPPOOLS_LIST", ".Dhcppools"); - -} -*/ -################################################################################### - -include("dhcp_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcppool.dwt b/ldap-site-mngmt/webinterface/dhcp/dhcppool.dwt deleted file mode 100644 index a4a1f79b..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcppool.dwt +++ /dev/null @@ -1,123 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td width='80%'> - <h3>Dynamische DHCP Pools </h3> - Administration Ihrer eingetragenen <b>dynamischen DHCP Pools</b>:<br> - Bearbeiten von bzw. Anlegen neuer IP Ranges zur dynamischen Vergabe. Zulassen von unbekannten bzw. einschränken auf bekannte Clients (d.h. im DHCP angelegte Clients).<br> - Sie können IP Ranges nur entsprechend der Ihnen noch frei verfübaren IP Adressen definieren.<br><br> - Über die <b>Eingabemaske</b> unten können Sie weitere Pools anlegen - </td> - <td> </td> - </tr> - - <tr><td colspan='2'> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='dhcppools_change.php' method='post'> - - <tr> - <td width='30%' class='tab_h'><b>Subnetz</b></td> - <td width='50%' class='tab_h'><b>IP Ranges (innerhalb Subnetz)</b></td> - <td width='20%' class='tab_h'><b>Unknown Clients</b></td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: Dhcppools --> - - <tr height='50' valign='top'> - <td class='tab_d_ohne'><b>{SUBNET}/24</b><br><br> - <input type='checkbox' name='delpool[]' value='{POOLDN}' size='10' class='medium_form_field'> - Pool löschen</td> - - <td class='tab_d_ohne'> - - <!-- BEGIN DYNAMIC BLOCK: Dhcpranges --> - - <input type='Text' name='range1[]' value='{RANGE1}' size='15' maxlength='15' class='medium_form_field'> - - - <input type='Text' name='range2[]' value='{RANGE2}' size='15' maxlength='15' class='medium_form_field'> - <input type='hidden' name='oldrange1[]' value='{RANGE1}'> - <input type='hidden' name='oldrange2[]' value='{RANGE2}'><br> - <input type='hidden' name='rangepooldn[]' value='{RPOOLDN}'> - - <!-- END DYNAMIC BLOCK: Dhcpranges --> - - <input type='Text' name='addrange1[]' value='' size='15' maxlength='15' class='medium_form_field'> - - - <input type='Text' name='addrange2[]' value='' size='15' maxlength='15' class='medium_form_field'> - </td> - - <td class='tab_d_ohne'> - <select name='unknownclients[]' size='3' class='100_form_selectbox'> - {UCSELECT} - </select> - <input type='hidden' name='olduc[]' value='{UCNOW}'> - </td> - </tr> - <tr height='50' valign='top'> - <td class='tab_d'><b>Remote Boot Service:</b><br>{RBS}</td> - <td class='tab_d' colspan='2'>{RBSSELECT}</td> - </tr> - - <input type='hidden' name='pooldn[]' value='{POOLDN}'> - <input type='hidden' name='oldrbs[]' value='{OLDRBS}'> - <input type='hidden' name='subnet[]' value='{SUBNET}'> - <input type='hidden' name='subnetau[]' value='{SUBNETAU}'> - - <!-- END DYNAMIC BLOCK: Dhcppools --> - - <input type='hidden' name='mnr' value='{MNR}'> - - </table></td> - </tr> - <tr> - <td colspan='2'><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - <tr> - <td height='50' colspan='2'></td> - </tr> - <tr> - <td colspan='2'><h4>Dynamischen DHCP Pool hinzufügen </h4></td> - </tr> - - <tr> - <td colspan='2'> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'> - <form action='dhcppool_add.php' method='post'> - - <tr valign='bottom'> - <td width='50%' class='tab_h'><b>IP Range (innerhalb eines Subnetzes)</b><br> - weitere Ranges können später hinzugefügt werden</td> - <td width='20%' class='tab_h'><b>Unknown Clients</b></td> - <td width='30%' class='tab_h'><b>Remote Boot Service</b></td> - </tr> - - <tr height='50' valign='top'> - <td class='tab_d'> - <input type='Text' name='addrange1' value='' size='15' maxlength='15' class='medium_form_field'> - - - <input type='Text' name='addrange2' value='' size='15' maxlength='15' class='medium_form_field'> - </td> - <td class='tab_d'> - <select name='unknownclients' size='3' class='100_form_selectbox'> - <option selected value='deny'> DENY </option> - <option value='allow'> ALLOW </option> - <option value='ignore'> IGNORE </option> - </select> - </td> - <td class='tab_d'>{RBSADD} - </td> - </tr> - <input type='hidden' name='mnr' value='{MNR}'> - - </table> - </td> - </tr> - <tr> - <td> - <input type='Submit' name='apply' value='anlegen' class='small_loginform_button'> - </form></td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcppool.php b/ldap-site-mngmt/webinterface/dhcp/dhcppool.php deleted file mode 100644 index aa58201f..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcppool.php +++ /dev/null @@ -1,166 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "dhcppool.dwt"; - -include('dhcp_header.inc.php'); - -$mnr = 3; -$sbmnr = -1; - -################################################################################### - -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createDhcpMenu($rollen, $mnr, $auDN, $sbmnr); - -################################################################################### - -# DHCP Pools Daten holen -$attributes = array("dn","cn","dhcphlpcont","dhcprange","description","dhcpstatements","dhcpoptallow", - "dhcpoptdefault-lease-time","dhcpoptdeny","dhcpoptignore","dhcpoptmax-lease-time", - "dhcpoptgeneric","hlprbservice","dhcpoptfilename","dhcpoptnext-server"); -$pools = get_dhcppools($auDN, $attributes); - -if (count($pools) == 0){ - redirect(0, "dhcpnopool.php?mnr=".$mnr, "", $addSessionId = TRUE); - die; -} - -$template->assign(array("POOLDN" => "", - "CN" => "", - "SUBNETDN" => "", - "SUBNET" => "", - "RANGE1" => "", - "RANGE2" => "", - "DESCRIPTION" => "", - "STATEMENTS" => "", - "ALLOW" => "", - "DENY" => "", - "IGNORE" => "", - "RBS" => "", - "RBSSELECT" => "", - "DEFAULTLEASE" => "", - "MAXLEASE" => "", - "MNR" => $mnr)); - - -$template->define_dynamic("Dhcppools", "Webseite"); -$template->define_dynamic("Dhcpranges", "Webseite"); - -# Für jeden Pool ... -foreach ($pools as $pool){ - - # DHCP Subnet des Pools - $subnet = ldap_explode_dn($pool['dhcphlpcont'],1); - $subnetdnexp = ldap_explode_dn( $pool['dhcphlpcont'], 0); - $subnetauexp = array_slice($subnetdnexp, 3); - $subnetau = implode(',',$subnetauexp); - $rbsDN = $pool['hlprbservice']; - - - $template->clear_parse("DHCPRANGES_LIST"); - - # DHCP Ranges - if (count($pool['dhcprange']) != 0){ - #$template->define_dynamic("Dhcpranges", "Webseite"); - if (count($pool['dhcprange']) > 1){ - foreach ($pool['dhcprange'] as $dhcprange){ - $iprange = explode('_',$dhcprange); - $template->assign(array( - "RANGE1" => $iprange[0], - "RANGE2" => $iprange[1], - "RPOOLDN" => $pool['dn'])); - $template->parse("DHCPRANGES_LIST", ".Dhcpranges"); - $template->clear_dynamic("Dhcpranges"); - } - }else{ - $iprange = explode('_',$pool['dhcprange']); - $template->assign(array( - "RANGE1" => $iprange[0], - "RANGE2" => $iprange[1], - "RPOOLDN" => $pool['dn'])); - $template->parse("DHCPRANGES_LIST", ".Dhcpranges"); - $template->clear_dynamic("Dhcpranges"); - } - } - - # Unknown-Clients - if ($pool['dhcpoptallow'] == "unknown-clients"){ - $unknownclients = "allow"; - $ucselectbox = "<option selected value='allow'> ALLOW </option> - <option value='deny'> DENY </option> - <option value='ignore'> IGNORE </option>"; - } - elseif ($pool['dhcpoptignore'] == "unknown-clients") { - $unknownclients = "ignore"; - $ucselectbox = "<option selected value='ignore'> IGNORE </option> - <option value='allow'> ALLOW </option> - <option value='deny'> DENY </option>"; - } - else{ - $unknownclients = "deny"; - $ucselectbox = "<option selected value='deny'> DENY </option> - <option value='allow'> ALLOW </option> - <option value='ignore'> IGNORE </option>"; - } - - # RBS Setup - $rbs_selectbox = ""; - $rbs_addselectbox = ""; - $altrbs = alternative_rbservices($rbsDN); - - $rbs_selectbox .= "<select name='rbs[]' size='4' class='tftp_form_selectbox'> - <option selected value='none'>----------</option>"; - $rbs_addselectbox = "<select name='rbs' size='3' class='tftp_form_selectbox'> - <option selected value='none'>----------</option>"; - if (count($altrbs) != 0){ - foreach ($altrbs as $item){ - $rbs_selectbox .= "<option value='".$item['dn']."'>".$item['cn']." ".$item['au']."</option>"; - $rbs_addselectbox .= "<option value='".$item['dn']."'>".$item['cn']." ".$item['au']."</option>"; - } - } - $rbs_selectbox .= "<option value=''>Kein RBS</option></select>"; - $rbs_addselectbox .= "</select>"; - - if ($rbsDN == ""){ - $rbs = "Keine Einbindung"; - }else{ - $rbsdnexp = ldap_explode_dn($pool['hlprbservice'],1); - $rbs = $rbsdnexp[0]."<br>DHCP Next-Server: ".$pool['dhcpoptnext-server']."<br>DHCP Filename: ".$pool['dhcpoptfilename']; - } - - - $template->assign(array("POOLDN" => $pool['dn'], - "CN" => $pool['cn'], - "SUBNETDN" => $pool['dhcphlpcont'], - "SUBNET" => $subnet[0], - "SUBNETAU" => $subnetau, - "DESCRIPTION" => $pool['description'], - "STATEMENTS" => $pool['dhcpstatements'], - "UCSELECT" => $ucselectbox, - "UCNOW" => $unknownclients, - "ALLOW" => $pool['dhcpoptallow'], - "DENY" => $pool['dhcpoptdeny'], - "IGNORE" => $pool['dhcpoptignore'], - "RBS" => $rbs, - "RBSSELECT" => $rbs_selectbox, - "RBSADD" => $rbs_addselectbox, - "OLDRBS" => $rbsDN, - "DEFAULTLEASE" => $pool['dhcpoptdefault-lease-time'], - "MAXLEASE" => $pool['dhcpoptmax-lease-time'], - "MNR" => $mnr)); - $template->parse("DHCPPOOLS_LIST", ".Dhcppools"); - -} - -################################################################################### - -include("dhcp_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcppool_add.php b/ldap-site-mngmt/webinterface/dhcp/dhcppool_add.php deleted file mode 100644 index bddb8282..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcppool_add.php +++ /dev/null @@ -1,106 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$syntax = new Syntaxcheck; - -$range1 = $_POST['addrange1']; -$range2 = $_POST['addrange2']; -$unknownclients = $_POST['unknownclients']; -$rbs = $_POST['rbs']; - -$mnr = $_POST['mnr']; - -$seconds = 2; -$url = "dhcppool.php?mnr=".$mnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - - -if ($syntax->check_ip_syntax($range1) && $syntax->check_ip_syntax($range2)){ - - $fs = explode('.',$range1); - $fe = explode('.',$range2); - if ( $fs[0] == $fe[0] && $fs[1] == $fe[1] && $fs[2] == $fe[2] ) { - if ( $fs[3] <= $fe[3] ){ - - # DHCP Subnet DN finden - $subnet = implode(".", array($fs[0],$fs[1],$fs[2],"0")); - print_r($subnet);echo"<br><br>"; - if(!($result = uniLdapSearch($ds, "ou=RIPM,".$suffix, "(&(objectclass=dhcpSubnet)(cn=$subnet))", array("dn","dhcphlpcont"), "", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - #print_r($result);echo "<br><br>"; - if (count($result[0]) != 0){ - - $subnetdn = $result[0]['dn']; - $subnetdnexp = ldap_explode_dn( $subnetdn, 0); - $subnetauexp = array_slice($subnetdnexp, 3); - $subnetau = implode(',',$subnetauexp); - - # Range zusammenstellen - $range = implode("_", array($range1,$range2)); - - # Freie IP Bereiche testen - $fipb_array = get_freeipblocks_au($auDN); - for ($i=0; $i < count($fipb_array); $i++){ - if ( split_iprange($range,$fipb_array[$i]) != 0 ){ - $ipranges = split_iprange($range,$fipb_array[$i]); - array_splice($fipb_array, $i, 1, $ipranges); - break; - } - } - if ($i < count($fipb_array) ){ - foreach ( $fipb_array as $item ){ - $entry ['FreeIPBlock'][] = $item; - } - $results = ldap_mod_replace($ds,$auDN,$entry); - if ($results){ - echo "<br>Neue FIPBs erfolgreich eingetragen!<br>"; - $result = add_dhcppool($subnetdn,$range,$unknownclients,$result[0]['dhcphlpcont'],$rbs); - if ($result){ - echo "<br>Dynamischer DHCP Pool erfolgreich eingetragen!<br>" ; - update_dhcpmtime(array($subnetau)); - }else{ - echo "<br>Fehler beim eintragen des dynamischen DHCP Pools!<br>"; - # Range wieder in FIPBs aufnehmen. - $entry2 ['FreeIPBlock'] = $range; - ldap_mod_add($ds,$auDN,$entry2); - merge_ipranges($auDN); - } - }else{ - echo "<br>Fehler beim eintragen der FIPBs!<br>"; - } - }else{ - printf("<br>IP Range %s ist nicht im verfuegbaren Bereich!<br>", $range ); - } - }else{ - echo "DHCP Subnet nicht im System vorhanden!<br>"; - } - }else{ - echo "erster Range Wert grösser als zweiter Range Wert<br>"; - } - }else{ - echo "Range nicht im gleichen Subnetz<br>"; - } -}else{ - echo "falsche IP Syntax<br>"; -} - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcppool_new.dwt b/ldap-site-mngmt/webinterface/dhcp/dhcppool_new.dwt deleted file mode 100644 index 8c9aefdc..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcppool_new.dwt +++ /dev/null @@ -1,49 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Dynamische DHCP Pools </h3></td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: Poolform --> - {POOLFORMULAR} - <!-- END DYNAMIC BLOCK: Poolform --> - - <tr> - <td colspan='2'><h4>Dynamischen DHCP Pool hinzufügen </h4></td> - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'> - <form action='dhcppool_add.php' method='post'> - - <tr valign='bottom'> - <td width='50%' class='tab_h'><b>IP Range (innerhalb eines Subnetzes)</b><br> - weitere Ranges können später hinzugefügt werden</td> - <td width='50%' class='tab_h'><b>Unknown Clients</b></td> - </tr> - - <tr height='50' valign='top'> - <td class='tab_d'> - <input type='Text' name='addrange1' value='' size='15' maxlength='15' class='medium_form_field'> - - - <input type='Text' name='addrange2' value='' size='15' maxlength='15' class='medium_form_field'> - </td> - <td class='tab_d'> - <select name='unknownclients' size='3' class='small_form_selectbox'> - <option selected value='deny'> DENY </option> - <option value='allow'> ALLOW </option> - <option value='ignore'> IGNORE </option> - </select> - </td> - </tr> - <input type='hidden' name='mnr' value='{MNR}'> - - </table></td> - </tr> - <tr> - <td> - <input type='Submit' name='apply' value='anlegen' class='small_loginform_button'> - </form></td> - </tr> - - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcppool_new.php b/ldap-site-mngmt/webinterface/dhcp/dhcppool_new.php deleted file mode 100644 index 74592459..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcppool_new.php +++ /dev/null @@ -1,201 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "dhcppool.dwt"; - -include('dhcp_header.inc.php'); - -$mnr = 3; -$sbmnr = -1; - -################################################################################### - -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createDhcpMenu($rollen, $mnr, $auDN, $sbmnr); - -################################################################################### - -$template->define_dynamic("Poolform", "Webseite"); -$template->assign(array("POOLFORMULAR" => "", - #"POOLDN" => "", - "CN" => "", - "SUBNETDN" => "", - #"SUBNET" => "", - #"RANGE1" => "", - #"RANGE2" => "", - "DESCRIPTION" => "", - "STATEMENTS" => "", - "DEFAULTLEASE" => "", - "MAXLEASE" => "", - "MNR" => $mnr)); - -# DHCP Pools Daten holen -$attributes = array("dn","cn","dhcphlpcont","dhcprange","description","dhcpstatements","dhcpoptallow", - "dhcpoptdefault-lease-time","dhcpoptdeny","dhcpoptignore","dhcpoptmax-lease-time", - "dhcpoptgeneric"); -$pools = get_dhcppools($auDN, $attributes); -#print_r($pools); - -if (count($pools) != 0){ - - - -$poolform = " - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='dhcppools_change.php' method='post'> - - <tr> - <td width='30%' class='tab_h'><b>Subnetz</b></td> - <td width='50%' class='tab_h'><b>IP Ranges (innerhalb Subnetz)</b></td> - <td width='20%' class='tab_h'><b>Unknown Clients</b></td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: Dhcppools --> - - <tr height='50' valign='top'> - <td class='tab_d'><b>{SUBNET}/24</b><br><br> - <input type='checkbox' name='delpool[]' value='{POOLDN}' size='10' class='medium_form_field'> - Pool löschen (Häkchen setzen)</td> - - <td class='tab_d'> - - <!-- BEGIN DYNAMIC BLOCK: Dhcpranges --> - - <input type='Text' name='range1[]' value='{RANGE1}' size='15' maxlength='15' class='medium_form_field'> - - - <input type='Text' name='range2[]' value='{RANGE2}' size='15' maxlength='15' class='medium_form_field'> - <input type='hidden' name='oldrange1[]' value='{RANGE1}'> - <input type='hidden' name='oldrange2[]' value='{RANGE2}'><br> - <input type='hidden' name='rangepooldn[]' value='{RPOOLDN}'> - - <!-- END DYNAMIC BLOCK: Dhcpranges --> - - <input type='Text' name='addrange1[]' value='' size='15' maxlength='15' class='medium_form_field'> - - - <input type='Text' name='addrange2[]' value='' size='15' maxlength='15' class='medium_form_field'> - </td> - - <td class='tab_d'> - <select name='unknownclients[]' size='3' class='small_form_selectbox'> - {UCSELECT} - </select> - <input type='hidden' name='olduc[]' value='{UCNOW}'> - </td> - </tr> - <!--<tr> - <td colspan='3' class='tab_d'><input type='checkbox' name='delpool[]' value='{POOLDN}' size='10' class='medium_form_field'> - Pool löschen (Häkchen setzen)</td> - </tr>--> - - <input type='hidden' name='pooldn[]' value='{POOLDN}'> - <input type='hidden' name='subnet[]' value='{SUBNET}'> - <input type='hidden' name='subnetau[]' value='{SUBNETAU}'> - - <!-- END DYNAMIC BLOCK: Dhcppools --> - - <input type='hidden' name='mnr' value='{MNR}'> - - </table></td> - </tr> - <tr> - <td><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - <tr> - <td height='50'></td> - </tr>"; - -$template->assign(array("POOLFORMULAR" => $poolform)); -$template->parse("POOLFORM_LIST", "Poolform"); -#$template->clear_dynamic("Poolform"); -#$template->clear_parse("POOLFORM_LIST"); - -$template->define_dynamic("Dhcppools", "Webseite"); -$template->define_dynamic("Dhcpranges", "Webseite"); -# Für jeden Pool ... -foreach ($pools as $pool){ - - # DHCP Subnet des Pools - $subnet = ldap_explode_dn($pool['dhcphlpcont'],1); - $subnetdnexp = ldap_explode_dn( $pool['dhcphlpcont'], 0); - $subnetauexp = array_slice($subnetdnexp, 3); - $subnetau = implode(',',$subnetauexp); - - - $template->clear_parse("DHCPRANGES_LIST"); - - # DHCP Ranges - if (count($pool['dhcprange']) != 0){ - #$template->define_dynamic("Dhcpranges", "Webseite"); - if (count($pool['dhcprange']) > 1){ - foreach ($pool['dhcprange'] as $dhcprange){ - $iprange = explode('_',$dhcprange); - $template->assign(array( - "RANGE1" => $iprange[0], - "RANGE2" => $iprange[1], - "RPOOLDN" => $pool['dn'])); - $template->parse("DHCPRANGES_LIST", ".Dhcpranges"); - $template->clear_dynamic("Dhcpranges"); - } - }else{ - $iprange = explode('_',$pool['dhcprange']); - $template->assign(array( - "RANGE1" => $iprange[0], - "RANGE2" => $iprange[1], - "RPOOLDN" => $pool['dn'])); - $template->parse("DHCPRANGES_LIST", ".Dhcpranges"); - $template->clear_dynamic("Dhcpranges"); - } - } - - # Unknown-Clients - if ($pool['dhcpoptallow'] == "unknown-clients"){ - $unknownclients = "allow"; - $ucselectbox = "<option selected value='allow'> ALLOW </option> - <option value='deny'> DENY </option> - <option value='ignore'> IGNORE </option>"; - } - elseif ($pool['dhcpoptignore'] == "unknown-clients") { - $unknownclients = "ignore"; - $ucselectbox = "<option selected value='ignore'> IGNORE </option> - <option value='allow'> ALLOW </option> - <option value='deny'> DENY </option>"; - } - else{ - $unknownclients = "deny"; - $ucselectbox = "<option selected value='deny'> DENY </option> - <option value='allow'> ALLOW </option> - <option value='ignore'> IGNORE </option>"; - } - - $template->assign(array("POOLDN" => $pool['dn'], - "CN" => $pool['cn'], - "SUBNETDN" => $pool['dhcphlpcont'], - "SUBNET" => $subnet[0], - "SUBNETAU" => $subnetau, - "DESCRIPTION" => $pool['description'], - "STATEMENTS" => $pool['dhcpstatements'], - "UCSELECT" => $ucselectbox, - "UCNOW" => $unknownclients, - "DEFAULTLEASE" => $pool['dhcpoptdefault-lease-time'], - "MAXLEASE" => $pool['dhcpoptmax-lease-time'], - "MNR" => $mnr)); - $template->parse("DHCPPOOLS_LIST", ".Dhcppools"); - -} -} - -################################################################################### - -include("dhcp_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcppools_change.php b/ldap-site-mngmt/webinterface/dhcp/dhcppools_change.php deleted file mode 100644 index 1a62cfed..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcppools_change.php +++ /dev/null @@ -1,336 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$syntax = new Syntaxcheck; - -$pooldn = $_POST['pooldn']; -$subnet = $_POST['subnet']; -$subnetau = $_POST['subnetau']; -$delpool = $_POST['delpool']; -$poolranges = array(); -foreach ($pooldn as $dn){ - $poolranges [$dn] = get_dhcppoolranges($dn); -} -$range1 = $_POST['range1']; -$range2 = $_POST['range2']; -$oldrange1 = $_POST['oldrange1']; -$oldrange2 = $_POST['oldrange2']; -$rangepooldn = $_POST['rangepooldn']; -$addrange1 = $_POST['addrange1']; -$addrange2 = $_POST['addrange2']; -$uc = $_POST['unknownclients']; -$olduc = $_POST['olduc']; -$rbs = $_POST['rbs']; -$oldrbs = $_POST['oldrbs']; - -# Array to fill with AUs to update dhcpMTime -$au_to_update = array(); - -$mnr = $_POST['mnr']; - -#print_r($pooldn); echo "<br>"; -#print_r($subnet); echo "<br>"; -#print_r($subnetau); echo "<br>"; -#print_r($delpool); echo "<br><br>"; -#print_r($oldrange1); echo "<br>"; -#print_r($oldrange2); echo "<br>"; -#print_r($range1); echo "<br>"; -#print_r($range2); echo "<br>"; -#print_r($rangepooldn); echo "<br><br>"; -#print_r($addrange1); echo "<br>"; -#print_r($addrange2); echo "<br><br>"; -#print_r($olduc); echo "<br><br>"; -#print_r($uc); echo "<br><br>"; - -$seconds = 2; -$url = "dhcppool.php?mnr=".$mnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -######################################################################################### -# Pools löschen, entsprechende Arrays ($pooldn, $uc, ...) zur weiteren Verarbeitung anpassen -for ($i=0;$i<count($delpool);$i++){ - - $key = array_keys ( $pooldn, $delpool[$i] ); - $key_r = array_keys ( $rangepooldn, $delpool[$i] ); - - # Ranges wieder in FIPBs aufnehmen - if (count($key_r) > 1){ - foreach ($key_r as $item){ - $modentry['FreeIPBlock'][] = $oldrange1[$item]."_".$oldrange2[$item]; - } - }else{ - $modentry['FreeIPBlock'] = $oldrange1[$key_r[0]]."_".$oldrange2[$key_r[0]]; - } - print_r($modentry); echo "<br><br>"; - $add_fipb = ldap_mod_add($ds,$auDN,$modentry); - if ($add_fipb){ - echo "<br>geloeschte IP Range(s) erfolgreich als neuer FIPB in die AU eingetragen!<br>" ; - merge_ipranges($auDN); - - $delete = ldap_delete($ds,$delpool[$i]); - if ($delete){ - # Subnet-AU auf DHCP-Modify setzen - $au_to_update [] = $subnetau[$i]; - # Arrays von gelöschten Pools für weitere Verarbeitung bereinigen - foreach ( $key as $nr ){ - array_splice ( &$pooldn, $nr, 1 ); - array_splice ( &$addrange1, $nr, 1 ); - array_splice ( &$addrange2, $nr, 1 ); - array_splice ( &$uc, $nr, 1 ); - array_splice ( &$olduc, $nr, 1 ); - array_splice ( &$rbs, $nr, 1 ); - array_splice ( &$oldrbs, $nr, 1 ); - } - # da sich Arrays verkleinern, Wert in $key_r entsprechend verkleinern, - $j=0; # Variable $j als Zähler um wieviel - foreach ( $key_r as $nr ){ - array_splice ( &$rangepooldn, $nr-$j, 1 ); - array_splice ( &$range1, $nr-$j, 1 ); - array_splice ( &$range2, $nr-$j, 1 ); - array_splice ( &$oldrange1, $nr-$j, 1 ); - array_splice ( &$oldrange2, $nr-$j, 1 ); - $j++; - } - printf("Pool <b>%s</b> erfolgreich gelöscht<br>", $delpool[$i]); - }else{ - printf("Fehler beim Löschen des Pools <b>%s</b>", $delpool[$i]); - } - }else{ - echo "<br>Fehler beim eintragen der geloeschten IP Range(s) als neuen FIPB! <br>DHCP Pool nicht gelöscht<br>"; - } -} - -######################################################################################### -# Änderungen in bestehenden Pools (unknown-clients) und Ranges hinzufügen -for ($i=0;$i<count($pooldn);$i++){ - - $entrydel = array(); - $entryadd = array(); - $entryrbs = array(); - # DENY, ALLOW, IGNORE Unknown-clients verarbeiten - if ( $uc[$i] != $olduc[$i] ){ - $dhcpoptdel = "dhcpopt".$olduc[$i]; - $entrydel [$dhcpoptdel] = array(); - #print_r($entrydel); echo "<br>"; - ldap_mod_del($ds,$pooldn[$i],$entrydel); - $dhcpoptadd = "dhcpopt".$uc[$i]; - $entryadd [$dhcpoptadd] = "unknown-clients"; - #print_r($entryadd); echo "<br><br>"; - ldap_mod_add($ds,$pooldn[$i],$entryadd); - printf("Pool %s:<br>DHCP Option <b>unknown-clients</b> von <b>%s</b> auf <b>%s</b> geändert<br><br>",$pooldn[$i],$olduc[$i],$uc[$i]); - # Subnet-AU auf DHCP-Modify setzen - $au_to_update [] = $subnetau[$i]; - } - # RBS - if ( $rbs[$i] != "none" && $rbs[$i] != $oldrbs[$i] ){ - $dhcpdata = get_node_data($rbs[$i],array("tftpserverip","initbootfile")); - $entryrbs ['hlprbservice'] = $rbs[$i]; - $entryrbs ['dhcpoptnext-server'] = $dhcpdata['tftpserverip']; - $entryrbs ['dhcpoptfilename'] = $dhcpdata['initbootfile']; - if ( $oldrbs[$i] == "" ){ - echo "RBS add "; print_r($entryrbs); echo "<br>"; - if ($result = ldap_mod_add($ds,$pooldn[$i],$entryrbs)){ - echo "DHCP Pool erfolgreich in RBS eingebunden.<br>"; - } - }elseif ( $rbs[$i] == "" ){ - $entryrbs ['hlprbservice'] = array(); - $entryrbs ['dhcpoptnext-server'] = array(); - $entryrbs ['dhcpoptfilename'] = array(); - echo "RBS delete "; echo "<br>"; - if ($result = ldap_mod_del($ds,$pooldn[$i],$entryrbs)){ - echo "DHCP Pool erfolgreich aus RBS gelöscht.<br>"; - } - }else{ - echo "RBS replace "; print_r($oldrbs[$i]); echo " with "; print_r($entryrbs); echo "<br>"; - if ($result = ldap_mod_replace($ds,$pooldn[$i],$entryrbs)){ - echo "DHCP Pool RBS Einbindung erfolgreich geändert.<br>"; - } - } - } - - # Ranges hinzufügen - if ( $addrange1[$i] != "" && $addrange2[$i] != "" ){ - if ($syntax->check_ip_syntax($addrange1[$i]) && $syntax->check_ip_syntax($addrange2[$i])){ - $net = strrev(strchr(strrev($subnet[$i]), ".")); - $add1 = strrev(strchr(strrev($addrange1[$i]), ".")); - $add2 = strrev(strchr(strrev($addrange2[$i]), ".")); - if ( $net == $add1 && $net == $add2 ){ - - printf("Range in Pool %s hinzufügen<br>",$pooldn[$i]); - # Range zusammenstellen - $newrange = implode("_", array($addrange1[$i],$addrange2[$i])); - $result = add_dhcprange($newrange,$pooldn[$i]); - if ($result){ - # Subnet-AU auf DHCP-Modify setzen - $au_to_update [] = $subnetau[$i]; - printf("Neue dynamische IP Range %s - %s erfolgreich in Subnetz %s0 eingetragen!<br>",$addrange1[$i],$addrange2[$i],$net); - }else{ - echo "<br>Fehler beim eintragen des dynamischen DHCP Pools!<br>"; - } - - }else{ - printf("Neue Range %s - %s nicht in Subnetz %s0",$addrange1[$i],$addrange2[$i],$net); - } - }else{ - printf("falsche IP Syntax der neuen Range %s - %s<br>", $addrange1[$i],$addrange2[$i]); - } - } - -} - -######################################################################################### -# In Pools bereits angelegte Ranges verarbeiten (löschen, verkleinern, vergrößern) -# vorzunehmende Änderungen in Arrays ($mod_dhcpranges, $new_fibs) speichern -$fipbs = get_freeipblocks_au($auDN); -$new_fipbs ['freeipblock'] = $fipbs; -$mod_dhcpranges = array(); - -for ($i=0;$i<count($rangepooldn);$i++){ - - $range = implode('_',array($range1[$i],$range2[$i])); - $oldrange = implode('_',array($oldrange1[$i],$oldrange2[$i])); - - if ( $oldrange1[$i] != "" && $oldrange2[$i] != "" && $range1[$i] == "" && $range2[$i] == "" ){ - # Range löschen - $mod_dhcpranges [$rangepooldn[$i]] = $poolranges [$rangepooldn[$i]]; - $range_key = array_search ( $oldrange, $mod_dhcpranges[$rangepooldn[$i]] ); - #print_r($range_key); echo "<br>"; - array_splice ( &$mod_dhcpranges[$rangepooldn[$i]], $range_key, 1 ); - array_splice ( &$poolranges[$rangepooldn[$i]], $range_key, 1 ); - $new_fipbs ['freeipblock'][] = $oldrange; - # Subnet-AU auf DHCP-Modify setzen - $au_to_update [] = $subnetau[$i]; - } - elseif ( $oldrange1[$i] != "" && $oldrange2[$i] != "" && $range1[$i] != "" && $range2[$i] != "" ){ - $or1 = ip2long($oldrange1[$i]); - $or2 = ip2long($oldrange2[$i]); - $nr1 = ip2long($range1[$i]); - $nr2 = ip2long($range2[$i]); - - if ( ($nr1 > $or1 || $nr2 < $or2) && !($nr1 < $or1 || $nr2 > $or2) ){ - if ($syntax->check_ip_syntax($range1[$i]) && $syntax->check_ip_syntax($range2[$i])){ - # Range verkleinern - $diffrange = split_iprange($range,$oldrange); - echo "<br>diffrange: "; print_r($diffrange); echo "<br>"; - # array $poolranges aktualisieren (neue Ranges) - $mod_dhcpranges [$rangepooldn[$i]] = $poolranges [$rangepooldn[$i]]; - $range_key = array_search ( $oldrange, $mod_dhcpranges [$rangepooldn[$i]] ); - #print_r($range_key); echo "<br>"; - $poolranges [$rangepooldn[$i]][$range_key] = $range; - $mod_dhcpranges [$rangepooldn[$i]][$range_key] = $range; - # Subnet-AU auf DHCP-Modify setzen - $au_to_update [] = $subnetau[$i]; - - foreach ($diffrange as $dr){ - $new_fipbs ['freeipblock'][] = $dr; - } - }else{ - printf("falsche IP Syntax der neuen Range %s - %s<br>", $range1[$i],$range2[$i]); - } - } - elseif( ($nr1 < $or1 || $nr2 > $or2) && !($nr1 > $or1 || $nr2 < $or2) ){ - if ($syntax->check_ip_syntax($range1[$i]) && $syntax->check_ip_syntax($range2[$i])){ - # Range vergrößern - $addrange = split_iprange($oldrange,$range); - echo "addrange: "; print_r($addrange); echo "<br>"; - $mod_dhcpranges [$rangepooldn[$i]] = $poolranges [$rangepooldn[$i]]; - - foreach ($addrange as $ar){ - $test = 0; - for ($c=0; $c < count($new_fipbs['freeipblock']); $c++){ - if ( split_iprange($ar,$new_fipbs['freeipblock'][$c]) != 0 ){ - $ipranges = split_iprange($ar,$new_fipbs['freeipblock'][$c]); - array_splice($new_fipbs['freeipblock'], $c, 1, $ipranges); - $test = 1; - break; - } - } - if ( $test ){ - $poolranges [$rangepooldn[$i]][] = $ar; - $mod_dhcpranges [$rangepooldn[$i]][] = $ar; - # Subnet-AU auf DHCP-Modify setzen - $au_to_update [] = $subnetau[$i]; - } - } - }else{ - printf("falsche IP Syntax der neuen Range %s - %s<br>", $range1[$i],$range2[$i]); - } - } - #else{ - # $mesg = "<br>Verschieben (Shiften) einer IP Range nicht moeglich!<br> - # Nur Vergroessern und Verkleinern moeglich!<br>"; - # $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - # Falls nicht, klicken Sie hier <a href='dhcppool.php' style='publink'>back</a>"; - # redirect($seconds, $url, $mesg, $addSessionId = TRUE); - #} - } -} -#print_r($mod_dhcpranges); echo "<br>"; -#print_r($new_fipbs); echo "<br><br>"; - -######################################################################################### -# In Arrays $dhcp_modranges und $new_fipbs gespeicherte Änderungen im LDAP schreiben -$keys = array_keys($mod_dhcpranges); -foreach ($keys as $pdn){ - #print_r($pdn); echo "<br>"; - #print_r($mod_dhcpranges[$pdn]); echo "<br>"; - if ( count($mod_dhcpranges[$pdn]) == 0 ){ - printf("Pool %s löschen<br>",$pdn); - if ($res = ldap_delete($ds,$pdn)){ - printf("Pool %s erfolgreich gelöscht",$pdn); - }else{ - printf("Fehler beim Löschen von %s",$pdn); - } - }else{ - echo "Pool Ranges anpassen<br>"; - foreach ($mod_dhcpranges[$pdn] as $rg){ - $modpool ['dhcprange'][] = $rg; - } - #print_r($modpool); echo "<br>"; - $modpool ['dhcprange'] = merge_ipranges_array($modpool ['dhcprange']); - print_r($modpool); echo "<br>"; - if ($res = ldap_mod_replace($ds,$pdn,$modpool)){ - printf("Pool Ranges von %s erfolgreich angepasst",$pdn); - }else{ - printf("Fehler beim Anpassen der Pool Ranges von %s",$pdn); - } - } -} - -$diff = array_diff( $new_fipbs['freeipblock'], $fipbs ); -$revdiff = array_diff( $fipbs, $new_fipbs['freeipblock'] ); -if ( count($diff) != 0 || count($revdiff) != 0 ){ - echo "<br>FIPBS anpassen<br>"; - #print_r($new_fipbs['freeipblock']); echo "<br>"; - $new_fipbs['freeipblock'] = merge_ipranges_array($new_fipbs['freeipblock']); - print_r($new_fipbs); echo "<br>"; - if ($res = ldap_mod_replace($ds,$auDN,$new_fipbs)){ - printf("FIPBs erfolgreich angepasst"); - }else{ - printf("Fehler beim Anpassen der FIPBs"); - } -} - -######################################################################################### -# DHCP Modify Timestamps in betreffenden AUs aktualisieren -#echo "<br>Subnet-AU: ";print_r ($au_to_update); echo "<br>"; -update_dhcpmtime($au_to_update); - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcpservice.dwt b/ldap-site-mngmt/webinterface/dhcp/dhcpservice.dwt deleted file mode 100644 index eb8e99b6..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcpservice.dwt +++ /dev/null @@ -1,262 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>DHCP Service <code class='font_object'> {CN} </code> </h3></td> - </tr> - <tr> - <td height='20'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='dhcpservice_change.php' method='post'> - - <tr> - <td width='40%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='60%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Eindeutiger DHCP Service Name (cn):</b><br>(Teil des dn, ohne Leerzeichen eingeben) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <font size='+2'><b>DHCP_</b></font><input type='Text' name='cn' value='{CN}' size='40' class='medium_form_field'> - <input type='hidden' name='oldcn' value='{CN}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Beschreibung:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[description]' value='{DESCRIPTION}' size='50' class='medium_form_field'> - <input type='hidden' name='oldattribs[description]' value='{DESCRIPTION}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Dienst kann momentan genutzt werden von:</b><br></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'>Abteilung<b> {DHCPOFFERNOW}</b> (und allen Unterabteilungen) - </td> - </tr> - <tr height='50' valign='top'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Ändern:</b><br>(Wählen Sie eine andere Abteilung)</td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <select name='dhcpoffer' size='5' class='medium_form_selectbox'> - <option selected value='none'>----------</option> - - <!-- BEGIN DYNAMIC BLOCK: Dhcpoffers --> - <option value='{DHCPOFFER}'>{DHCPOFFEROU}</option> - <!-- END DYNAMIC BLOCK: Dhcpoffers --> - - <option value='off'>------ NIEMAND ------</option> - - </select> - <input type='hidden' name='olddhcpoffer' value='{DHCPOFFERNOWDN}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Failover Peer Name</b><br clear="all"><br> - Falls für Ihren Dienst ein Failoverpeer deklariert ist, tragen Sie seinen Namen hier ein. - (Damit werden für dynamische IP Ranges entsprechende Pool Deklarationen, mit Failover Peer generiert)</td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpfailoverpeer]' value='{FAILOVERPEER}' size='50' class='medium_form_field'> - <input type='hidden' name='oldattribs[dhcpfailoverpeer]' value='{FAILOVERPEER}'> - </td> - </tr> - - </table></td> - </tr> - - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>DHCP Optionen des Dienstes (Globaler Scope):</h4></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr valign='top'> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Option</b></td> - <td width='70%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert(e)</b></td> - </tr> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Default Lease Time:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - <input type='Text' name='attribs[dhcpoptdefault-lease-time]' value='{DEFAULTLEASE}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[dhcpoptdefault-lease-time]' value='{DEFAULTLEASE}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Max Lease Time:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptmax-lease-time]' value='{MAXLEASE}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[dhcpoptmax-lease-time]' value='{MAXLEASE}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Use Host DCL Names:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - <input type='Text' name='attribs[dhcpoptuse-host-decl-names]' value='{USEHOSTDCL}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[dhcpoptuse-host-decl-names]' value='{USEHOSTDCL}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>DHCP Max Message Size:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - <input type='Text' name='attribs[dhcpoptdhcp-max-message-size]' value='{MAXMESSIZE}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[dhcpoptdhcp-max-message-size]' value='{MAXMESSIZE}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>DDNS Update Style:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptddns-update-style]' value='{DDNSUPDATE}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[dhcpoptddns-update-style]' value='{DDNSUPDATE}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Domain Name:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - <input type='Text' name='attribs[dhcpoptdomain-name]' value='{DOMAINNAME}' size='60' class='medium_form_field'> - <input type='hidden' name='oldattribs[dhcpoptdomain-name]' value='{DOMAINNAME}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Domain Name Servers:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - <input type='Text' name='attribs[dhcpoptdomain-name-servers]' value='{DOMAINNAMESERVERS}' size='60' class='medium_form_field'> - <input type='hidden' name='oldattribs[dhcpoptdomain-name-servers]' value='{DOMAINNAMESERVERS}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>NTP Servers:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptntp-servers]' value='{NTPSERVERS}' size='40' class='medium_form_field'> - <input type='hidden' name='oldattribs[dhcpoptntp-servers]' value='{NTPSERVERS}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Allow:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - <input type='Text' name='attribs[dhcpoptallow]' value='{ALLOW}' size='40' class='medium_form_field'> - <input type='hidden' name='oldattribs[dhcpoptallow]' value='{ALLOW}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Deny:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptdeny]' value='{DENY}' size='40' class='medium_form_field'> - <input type='hidden' name='oldattribs[dhcpoptdeny]' value='{DENY}'> - </td> - </tr> - <tr> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Self-definierte Optionen:</b></td> - </tr> - {OPTDEF} - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Option hinzufügen:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='adddhcpoptdefinition' value='' size='40' class='medium_form_field'> - </td> - </tr> - - <input type='hidden' name='dhcpdn' value='{DHCPDN}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - - </table></td> - </tr> - <tr> - <td><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>Dem Dienst zugeordnete DHCP Subnets:</h4></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr valign='top'> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Subnet</b></td> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Netmask</b></td> - <td width='50%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Abteilung (AU)</b></td> - </tr> - <!-- BEGIN DYNAMIC BLOCK: Dhcpsubnets --> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{SUBNET} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{NETMASK} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{SUBNETAU} </td> - </tr> - <!-- END DYNAMIC BLOCK: Dhcpsubnets --> - - </table></td> - </tr> - - <tr> - <td height='50'></td> - </tr> - <tr> - <td colspan='2'><h3>Config File für DHCP Generator Script</h3></td> - </tr> - <tr> - <td colspan='2'>Speichern Sie dieses als <b>dhcpgen.conf.pl</b> im gleichen Verzeichnis wie ihr DHCP Dienst Generator Skript <b>dhcp_generator.pl</b></td> - </tr> - <tr> - <td> - <table cellpadding='20' cellspacing='0' border='0' align='left' width='90%' style='border-color: black; border-style: solid; border-width: 2 2 2 2;'> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - $ldaphost= "{DHCPGENLDAP}"; <br> - $basedn= "{DHCPGENBASE}"; <br> - $userdn= "{DHCPGENUDN}"; <br> - $passwd= "{DHCPGENPW}"; <br> - $dhcpservicedn= "{DHCPGENSVDN}"; - </td> - </tr> - - - </table></td> - </tr> - - - - <tr> - <td height='60'></td> - </tr> - - <tr> - <td colspan='2'><h4>DHCP Service <code class='font_object'>{CN}</code> löschen:</h4></td> - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'> - <form action='delete_confirm.php' method='post'> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - Der DHCP Dienst wird gelöscht, <br> - </tr> - - <input type='hidden' name='dn' value='{DHCPDN}'> - <input type='hidden' name='name' value='{CN}'> - <input type='hidden' name='type' value='dhcp'> - <input type='hidden' name='delurl' value='dhcpservice_delete.php'> - <input type='hidden' name='backurl' value='dhcpservice.php?dn={DHCPDN}&mnr={MNR}'> - </table></td> - </tr> - <tr> - <td> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'> - </form></td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcpservice.php b/ldap-site-mngmt/webinterface/dhcp/dhcpservice.php deleted file mode 100644 index 304739ca..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcpservice.php +++ /dev/null @@ -1,182 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "dhcpservice.dwt"; - -include('dhcp_header.inc.php'); - -$mnr = 0; -$sbmnr = -1; - -################################################################################### - -$mnr = $_GET['mnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createDhcpMenu($rollen, $mnr, $auDN, $sbmnr); - -################################################################################### - -$template->assign(array("DHCPDN" => "", - "CN" => "", - "PRIMARY" => "", - "SECONDARY" => "", - "DESCRIPTION" => "", - "STATEMENTS" => "", - "FAILOVERPEER" => "", - "ALLOW" => "", - "DENY" => "", - "IGNORE" => "", - "DDNSUPDATE" => "", - "DEFAULTLEASE" => "", - "MAXLEASE" => "", - "USEHOSTDCL" => "", - "DOMAINNAME" => "", - "DOMAINNAMESERVERS" => "", - "MAXMESSIZE" => "", - "NTPSERVERS" => "", - "OPTGENERIC" => "", - "OPTDEF" => "", - "OPTDEFINITION" => "", - "DHCPOFFERNOWDN" => "", - "DHCPOFFERNOW" => "", - "SUBNET" => "keine Subnetze zugewiesen", - "NETMASK" => "", - "SUBNETAU" => "")); - -# DHCP Service Daten -$dhcpsv_array = get_dhcpservices($auDN,array("dn","cn")); -$dhcpserviceDN = $dhcpsv_array[0]['dn']; -$attributes = array("dn","cn","dhcpprimarydn","dhcpsecondarydn","description","dhcpofferdn","dhcpstatements","dhcpfailoverpeer", - "dhcpoptallow","dhcpoptddns-update-style","dhcpoptdefault-lease-time","dhcpoptdeny","dhcpoptfilename", - "dhcpoptignore","dhcpoptmax-lease-time","dhcpoptnext-server","optiondefinition", - "dhcpoptuse-host-decl-names","dhcpoptbroadcast-address","dhcpoptdhcp-max-message-size", - "dhcpoptdomain-name","dhcpoptdomain-name-servers","dhcpoptgeneric","dhcpoptntp-servers", - "dhcpoptroot-path","dhcpoptrouters"); -$dhcpsv_data = get_node_data($dhcpserviceDN, $attributes); -#print_r($dhcpsv_data); - -# DHCP Service Anbieten -# momentanes Offer -# todo: falls dhcpofferDN leer dann standardwert AU teilbaum -$offerexp = ldap_explode_dn($dhcpsv_data['dhcpofferdn'], 1); -$dhcpoffernow = $offerexp[0]; -# alternative Offers -$expdn = ldap_explode_dn($auDN, 0); # Mit Merkmalen -$expdn = array_slice($expdn, 1); -$expou = ldap_explode_dn($auDN, 1); # nur Werte -$expou = array_slice($expou, 1, -3); -#print_r($expou); echo "<br>"; -#print_r($expdn); echo "<br>"; -for ($i=0; $i<count($expou); $i++){ - $dhcpoffers[$i]['ou'] = $expou[$i]; - $dhcpoffers[$i]['dn'] = implode(',',$expdn); - $expdn = array_slice($expdn, 1); -} -#print_r($dhcpoffers); - -$expcn = explode('_',$dhcpsv_data['cn']); -$name = array_slice($expcn,1); -$dhcpcn = implode('_',$name); - -$optdef = ""; -if (count($dhcpsv_data['optiondefinition']) == 1){ - $dhcpsv_data['optiondefinition'] = array($dhcpsv_data['optiondefinition']); -} -if (count($dhcpsv_data['optiondefinition']) > 0){ - foreach ($dhcpsv_data['optiondefinition'] as $optdefinition){ - $optdef .= " - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - <input type='Text' name='dhcpoptdefinition[]' value='".$optdefinition."' size='40' class='medium_form_field'> - <input type='hidden' name='olddhcpoptdefinition[]' value='".$optdefinition."'> - </td> - </tr>"; - } -} - -$template->assign(array("DHCPDN" => $dhcpsv_data['dn'], - "CN" => $dhcpcn, - "PRIMARY" => $dhcpsv_data['dhcpprimarydn'], - "SECONDARY" => $dhcpsv_data['dhcpsecondarydn'], - "DESCRIPTION" => $dhcpsv_data['description'], - "STATEMENTS" => $dhcpsv_data['dhcpstatements'], - "FAILOVERPEER" => $dhcpsv_data['dhcpfailoverpeer'], - "ALLOW" => $dhcpsv_data['dhcpoptallow'], - "DENY" => $dhcpsv_data['dhcpoptdeny'], - "IGNORE" => $dhcpsv_data['dhcpoptignore'], - "DDNSUPDATE" => $dhcpsv_data['dhcpoptddns-update-style'], - "DEFAULTLEASE" => $dhcpsv_data['dhcpoptdefault-lease-time'], - "MAXLEASE" => $dhcpsv_data['dhcpoptmax-lease-time'], - "USEHOSTDCL" => $dhcpsv_data['dhcpoptuse-host-decl-names'], - "MAXMESSIZE" => $dhcpsv_data['dhcpoptdhcp-max-message-size'], - "DOMAINNAME" => $dhcpsv_data['dhcpoptdomain-name'], - "DOMAINNAMESERVERS" => $dhcpsv_data['dhcpoptdomain-name-servers'], - "NEXTSERVER" => $dhcpsv_data['dhcpoptnext-server'], - "FILENAME" => $dhcpsv_data['dhcpoptfilename'], - "NTPSERVERS" => $dhcpsv_data['dhcpoptntp-servers'], - "DHCPOFFERNOWDN" => $dhcpsv_data['dhcpofferdn'], - "DHCPOFFERNOW" => $dhcpoffernow, - "OPTDEF" => $optdef, - "MNR" => $mnr, - "SBMNR" => $sbmnr)); - -$template->define_dynamic("Dhcpoffers", "Webseite"); -foreach ($dhcpoffers as $offer){ - $template->assign(array("DHCPOFFER" => $offer['dn'], - "DHCPOFFEROU" => $offer['ou'],)); - $template->parse("DHCPOFFERS_LIST", ".Dhcpoffers"); -} - - -# Subnetze und Hosts des Dienstes -$dhcpobjects = get_service_subnets($dhcpserviceDN, array("dn","cn","dhcpoptnetmask")); -#print_r($dhcpobjects); -$template->define_dynamic("Dhcpsubnets", "Webseite"); -foreach ($dhcpobjects as $subnet){ - $template->assign(array("SUBNET" => $subnet['cn'], - "NETMASK" => $subnet['dhcpoptnetmask'], - "SUBNETAU" => $subnet['auDN'])); - $template->parse("DHCPSUBNETS_LIST", ".Dhcpsubnets"); -} - -### Rechner -#$hostorgroup = $exp[0]; -#$hosts_array = get_hosts($auDN,array("dn","hostname","ipaddress")); -# -#$template->define_dynamic("TftpHosts", "Webseite"); -#$template->define_dynamic("NfsHosts", "Webseite"); -#$template->define_dynamic("NbdHosts", "Webseite"); -#foreach ($hosts_array as $item){ -# $template->assign(array("HDN" => $item['dn'], -# "HN" => $item['hostname'], -# "IP" => $item['ipaddress'])); -# $template->parse("TFTPHOSTS_LIST", ".TftpHosts"); -# $template->assign(array("HDN" => $item['dn'], -# "HN" => $item['hostname'], -# "IP" => $item['ipaddress'])); -# $template->parse("NFSHOSTS_LIST", ".NfsHosts"); -# $template->assign(array("HDN" => $item['dn'], -# "HN" => $item['hostname'], -# "IP" => $item['ipaddress'])); -# $template->parse("NBDHOSTS_LIST", ".NbdHosts"); -#} - -################################################ -# DHCP Generator Skript Config -$template->assign(array("DHCPGENLDAP" => LDAP_HOST, - "DHCPGENBASE" => "ou=RIPM,".$suffix, - "DHCPGENUDN" => $userDN, - "DHCPGENPW" => $userPassword, - "DHCPGENSVDN" => $dhcpserviceDN)); - - -################################################################################### - -include("dhcp_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcpservice_add.php b/ldap-site-mngmt/webinterface/dhcp/dhcpservice_add.php deleted file mode 100644 index ecaa27d9..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcpservice_add.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$cn = $_POST['cn']; -$dhcpoffer = $_POST['dhcpoffer']; - -# sonstige Attribute -$attribs = $_POST['attribs']; -if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - $atts[$key] = htmlentities($attribs[$key]); - } -} -#print_r($atts); echo "<br><br>"; - -$nodeDN = "cn=dhcp,".$auDN; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - -$get_dhcpcn = str_replace ( " ", "_", $cn ); -$seconds = 2; -$url = "new_dhcpservice.php?&mnr=1"; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $cn != "" && $cn != "Hier_DHCP_NAME_eintragen" ){ - - $dhcpcn = "DHCP_".$cn; - - # Formulareingaben anpassen - $exp = explode(" ",$dhcpcn); - foreach ($exp as $word){$expuc[] = ucfirst($word);} - $dhcpcn = implode(" ",$expuc); - $dhcpcn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $dhcpcn); - - #$dhcpDN = "cn=".$dhcpcn.",".$nodeDN; - #print_r($dhcpDN); echo "<br><br>"; - - if (add_dhcpservice ($dhcpcn,$dhcpoffer,$atts)){ - $mesg .= "<br>DHCP Service erfolgreich angelegt<br>"; - $url = "dhcpservice.php?mnr=1"; - }else{ - $mesg .= "<br>Fehler beim anlegen des DHCP Services!<br>"; - } -} - -elseif ( $cn == "" || $cn == "Hier_DHCP_NAME_eintragen" ){ - - $mesg = "Sie haben den Namen des neuen DHCP Service nicht angegeben. Dieser ist - aber ein notwendiges Attribut.<br> - Bitte geben Sie ihn an.<br><br>"; - $url = "new_dhcpservice.php?dhcpcn=Hier_DHCP_NAME_eintragen&mnr=1"; -} - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcpservice_change.php b/ldap-site-mngmt/webinterface/dhcp/dhcpservice_change.php deleted file mode 100644 index 687a5bbd..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcpservice_change.php +++ /dev/null @@ -1,229 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$cn = "DHCP_".$_POST['cn']; -$oldcn = "DHCP_".$_POST['oldcn']; -$dhcpoffer = $_POST['dhcpoffer']; -$olddhcpoffer = $_POST['olddhcpoffer']; -$dhcpoptdefinition = $_POST['dhcpoptdefinition']; -$olddhcpoptdefinition = $_POST['olddhcpoptdefinition']; -$adddhcpoptdefinition = $_POST['adddhcpoptdefinition']; - -$dhcpDN = $_POST['dhcpdn']; - -# sonstige Attribute -$attribs = $_POST['attribs']; -if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - $atts[$key] = htmlentities($attribs[$key]); - } -} -#print_r($atts); echo "<br><br>"; -$oldattribs = $_POST['oldattribs']; -if (count($oldattribs) != 0){ - foreach (array_keys($oldattribs) as $key){ - $oldatts[$key] = htmlentities($oldattribs[$key]); - } -} -#print_r($oldatts); echo "<br><br>"; - - -$nodeDN = "cn=dhcp,".$auDN; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - -#$deltr = $_POST['deltr']; - -$seconds = 2; -$url = "dhcpservice.php?dn=".$dhcpdn."&mnr=1"; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -############################################## -# DHCP Service CN (DN) - -if ( $oldcn == $cn ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( $oldcn != "" && $cn != "" && $oldcn != $cn ){ - echo "DHCP Service Name aendern<br>"; - # hier noch Syntaxcheck - # Formulareingaben anpassen - $exp = explode(" ",$cn); - foreach ($exp as $word){$expuc[] = ucfirst($word);} - $cn = implode(" ",$expuc); - $cn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $cn); - - $newdhcpDN = "cn=".$cn.",".$nodeDN; - print_r($newdhcpDN); echo "<br><br>"; - - if(move_subtree($dhcpDN, $newdhcpDN)){ - adjust_dhcpservice_dn($newdhcpDN, $dhcpDN); - $dhcpDN = $newdhcpDN; - $mesg = "DHCP Service Name erfolgreich geändert<br><br>"; - }else{ - $mesg = "Fehler beim ändern des DHCP Service Namen!<br><br>"; - } -} - -if ( $oldcn != "" && $cn == "" ){ - echo "DHCP Service Name loeschen!<br> - Dieser ist Teil des DN, Sie werden den DHCP Service komplett löschen<br><br>"; - echo "Wollen Sie den DHCP Service <b>".$oldcn."</b> wirklich löschen?<br><br> - <form action='dhcpservice_delete.php' method='post'> - Falls ja:<br><br> - <input type='hidden' name='dn' value='".$dhcpDN."'> - <input type='hidden' name='name' value='".$oldcn."'> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'><br><br> - </form> - <form action='".$url."' method='post'> - Falls, nein:<br><br> - <input type='Submit' name='apply' value='zurück' class='small_loginform_button'> - </form>"; - $seconds = 600; -} - -##################################### -# Offer ändern - -if ( $dhcpoffer != "none" ){ - - if ( ($dhcpoffer != "off" && $dhcpoffer == $olddhcpoffer) || ($dhcpoffer == "off" && $olddhcpoffer == "") ){ - $mesg = "Sie haben die gleiche Abteilung ausgewählt<br> - Keine Änderung!"; - } - - if ( $dhcpoffer != "off" && $dhcpoffer != $olddhcpoffer ){ - $entryoffer ['dhcpofferdn'] = $dhcpoffer; - if ($olddhcpoffer == ""){ - # Offer anlegen - if(ldap_mod_add($ds,$dhcpDN,$entryoffer)){ - $mesg = "DHCP Service Offer erfolgreich angelegt<br><br>"; - } - else{ - $mesg = "Fehler beim ändern des DHCP Service Offers!<br><br>"; - } - } - else{ - # Offer ändern - if(ldap_mod_replace($ds,$dhcpDN,$entryoffer)){ - $mesg = "DHCP Service Offer erfolgreich geändert<br><br>"; - } - else{ - $mesg = "Fehler beim ändern des DHCP Service Offers!<br><br>"; - } - } - } - - if ( $dhcpoffer == "off" && $olddhcpoffer != "" ){ - $entryoffer ['dhcpofferdn'] = array(); - if(ldap_mod_del($ds,$dhcpDN,$entryoffer)){ - $mesg = "DHCP Service Offer erfolgreich gelöscht<br><br>"; - cleanup_del_dhcpservice ($dhcpDN); - } - else{ - $mesg = "Fehler beim ändern des DHCP Service Offers!<br><br>"; - } - } - -} - -##################################### -# Selbstdefinierte Optionen - -if ( $adddhcpoptdefinition != "" ){ - echo "Selbst-definierte DHCP Option hinzufügen.<br>"; - $entryadd['optiondefinition'] = $adddhcpoptdefinition; - if(ldap_mod_add($ds,$dhcpDN,$entryadd)){ - $mesg = "Selbst-definierte DHCP Option erfolgreich eingetragen<br><br>"; - update_dhcpmtime(array()); - }else{ - $mesg = "Fehler beim eintragen Selbst-definierte DHCP Option<br><br>"; - } -} - -#todo: array_vergleich -> Änderung -> ldap_modify -#print_r($dhcpoptdefinition);echo "<br>"; -#print_r($olddhcpoptdefinition);echo "<br>"; - -##################################### -# Restliche Attribute - -$entryadd = array(); -$entrymod = array(); -$entrydel = array(); - -foreach (array_keys($atts) as $key){ - - if ( $oldatts[$key] == $atts[$key] ){ - - } - if ( $oldatts[$key] == "" && $atts[$key] != "" ){ - # hier noch Syntaxcheck - $entryadd[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] != "" && $oldatts[$key] != $atts[$key] ){ - # hier noch Syntaxcheck - $entrymod[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] == "" ){ - # hier noch Syntaxcheck - $entrydel[$key] = $oldatts[$key]; - } -} - - -if (count($entryadd) != 0 ){ - foreach (array_keys($entryadd) as $key){ - $addatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_add($ds,$dhcpDN,$entryadd)){ - $mesg = "Attribute ".$addatts." erfolgreich eingetragen<br><br>"; - update_dhcpmtime(array()); - }else{ - $mesg = "Fehler beim eintragen der Attribute ".$addatts."<br><br>"; - } -} - -if (count($entrymod) != 0 ){ - foreach (array_keys($entrymod) as $key){ - $modatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_replace($ds,$dhcpDN,$entrymod)){ - $mesg = "Attribute ".$modatts." erfolgreich geaendert<br><br>"; - update_dhcpmtime(array()); - }else{ - $mesg = "Fehler beim aendern der Attribute ".$modatts."<br><br>"; - } -} - -if (count($entrydel) != 0 ){ - foreach (array_keys($entrydel) as $key){ - $delatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_del($ds,$dhcpDN,$entrydel)){ - $mesg = "Attribute ".$delatts." erfolgreich geloescht<br><br>"; - update_dhcpmtime(array()); - }else{ - $mesg = "Fehler beim loeschen der Attribute ".$delatts."<br><br>"; - } -} - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcpservice_delete.php b/ldap-site-mngmt/webinterface/dhcp/dhcpservice_delete.php deleted file mode 100644 index 3d121397..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcpservice_delete.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$dhcpDN = $_POST['dn']; -$dhcpcn = $_POST['name']; - -$seconds = 2; -$url = "dhcpservice.php?mnr=1"; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $dhcpDN != ""){ - if ( dive_into_tree_del($dhcpDN,"") ){ - cleanup_del_dhcpservice($dhcpDN); - $mesg = "DHCP Service <b>".$dhcpcn."</b> erfolgreich gelöscht!<br><br>"; - } - else{ - $mesg = "Fehler beim löschen des DHCP Services <b>".$dhcpcn."</b> !<br><br>"; - } -} - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcpsubnet.dwt b/ldap-site-mngmt/webinterface/dhcp/dhcpsubnet.dwt deleted file mode 100644 index 9160219c..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcpsubnet.dwt +++ /dev/null @@ -1,219 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - - <tr> - <td colspan='4' height='20'><h4><a href='dhcpsubnets.php?mnr={MNR}' class='headerlink'><< Zurück zur Übersicht </a></h4></td> - </tr> - - <tr> - <td colspan='2'><h3>DHCP Subnet <code class='font_object'> {CN} / {NETMASK} </code> </h3></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='dhcpsubnet_change.php' method='post'> - - <tr> - <td width='40%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='60%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <!-- <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>DHCP Subnet (cn):</b><br>(Teil des dn, ohne Leerzeichen eingeben) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='cn' value='{CN}' size='15' maxlength='15' class='medium_form_field'> - <input type='hidden' name='oldcn' value='{CN}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Netmask:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='netmask' value='{NETMASK}' size='15' maxlength='15' class='medium_form_field'> - <input type='hidden' name='oldnetmask' value='{NETMASK}'> - </td> - </tr> --> - <tr valign='top'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Eingebunden in DHCP Dienst: <b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'>{DHCPSVNOW} - </td> - </tr> - <tr height='50' valign='top'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>DHCP Dienst ändern:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <select name='dhcpservice' size='5' class='medium_form_selectbox'> - <option selected value='none'>----------</option> - - <!-- BEGIN DYNAMIC BLOCK: Dhcpservices --> - <option value='{DHCPSVDN}'>{DHCPSVCN}{DHCPSVAU}</option> - <!-- END DYNAMIC BLOCK: Dhcpservices --> - - <option value='off'>-- keine DHCP Dienstzurordnung --</option> - - </select> - <input type='hidden' name='olddhcpservice' value='{DHCPOFFERNOWDN}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Beschreibung:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[description]' value='{DESCRIPTION}' size='50' class='medium_form_field'> - <input type='hidden' name='oldattribs[description]' value='{DESCRIPTION}'> - </td> - </tr> - </table></td> - </tr> - - <!--<tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>Subnet Ranges / Pools:</h4></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr valign='top'> - <td width='50%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>IP Range</b></td> - <td width='50%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Pool Declaration Options</b></td> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='range1' value='{RANGE1}' size='15' maxlength='15' class='medium_form_field'> - - - <input type='Text' name='range2' value='{RANGE2}' size='15' maxlength='15' class='medium_form_field'> - <input type='hidden' name='oldrange1' value='{RANGE1}'> - <input type='hidden' name='oldrange2' value='{RANGE2}'> - </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> </td> - </tr> - </table></td> - </tr>--> - - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>DHCP Optionen des Subnets (Subnet Scope):</h4></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr valign='top'> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Option</b></td> - <td width='70%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert(e)</b></td> - </tr> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Routers:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - <input type='Text' name='attribs[dhcpoptrouters]' value='{ROUTERS}' size='40' class='medium_form_field'> - <input type='hidden' name='oldattribs[dhcpoptrouters]' value='{ROUTERS}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Broadcast Address:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - <input type='Text' name='attribs[dhcpoptbroadcast-address]' value='{BROADCAST}' size='40' class='medium_form_field'> - <input type='hidden' name='oldattribs[dhcpoptbroadcast-address]' value='{BROADCAST}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Domain Name:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - <input type='Text' name='attribs[dhcpoptdomain-name]' value='{DOMAINNAME}' size='60' class='medium_form_field'> - <input type='hidden' name='oldattribs[dhcpoptdomain-name]' value='{DOMAINNAME}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Domain Name Servers:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptdomain-name-servers]' value='{DOMAINNAMESERVERS}' size='60' class='medium_form_field'> - <input type='hidden' name='oldattribs[dhcpoptdomain-name-servers]' value='{DOMAINNAMESERVERS}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Default Lease Time:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - <input type='Text' name='attribs[dhcpoptdefault-lease-time]' value='{DEFAULTLEASE}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[dhcpoptdefault-lease-time]' value='{DEFAULTLEASE}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Max Lease Time:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptmax-lease-time]' value='{MAXLEASE}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[dhcpoptmax-lease-time]' value='{MAXLEASE}'> - </td> - </tr> - <!-- <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>NTP Servers:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptntp-servers]' value='{NTPSERVERS}' size='40' class='medium_form_field'> - <input type='hidden' name='oldattribs[dhcpoptntp-servers]' value='{NTPSERVERS}'> - </td> - </tr> --> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Allow:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - <input type='Text' name='attribs[dhcpoptallow]' value='{ALLOW}' size='40' class='medium_form_field'> - <input type='hidden' name='oldattribs[dhcpoptallow]' value='{ALLOW}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Deny:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptdeny]' value='{DENY}' size='40' class='medium_form_field'> - <input type='hidden' name='oldattribs[dhcpoptdeny]' value='{DENY}'> - </td> - </tr> - - <input type='hidden' name='subnetdn' value='{SUBNETDN}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - - </table></td> - </tr> - <tr> - <td><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - - <tr> - <td height='60'></td> - </tr> - - <tr> - <td colspan='2'><h4>DHCP Subnet <code class='font_object'>{CN}</code> löschen:</h4></td> - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'> - <form action='delete_confirm.php' method='post'> - - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - Das DHCP Subnet wird gelöscht, <br> - </tr> - - <input type='hidden' name='dn' value='{SUBNETDN}'> - <input type='hidden' name='name' value='{CN}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='type' value='dhcp'> - <input type='hidden' name='delurl' value='dhcpsubnet_delete.php'> - <input type='hidden' name='backurl' value='dhcpsubnet.php?dn={SUBNETDN}&mnr={MNR}&sbmnr{SBMNR}'> - - </table></td> - </tr> - <tr> - <td> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'> - </form></td> - </tr> - - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcpsubnet.php b/ldap-site-mngmt/webinterface/dhcp/dhcpsubnet.php deleted file mode 100644 index a7da175d..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcpsubnet.php +++ /dev/null @@ -1,125 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "dhcpsubnet.dwt"; - -include('dhcp_header.inc.php'); - -$mnr = -1; -$sbmnr = -1; - -################################################################################### - -$mnr = $_GET['mnr']; -#$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createDhcpMenu($rollen, $mnr, $auDN, $sbmnr); - -################################################################################### - -$template->assign(array("SUBNETDN" => "", - "CN" => "", - "NETMASK" => "", - "RANGE1" => "", - "RANGE2" => "", - "DESCRIPTION" => "", - "STATEMENTS" => "", - "ALLOW" => "", - "DENY" => "", - "IGNORE" => "", - "DDNSUPDATE" => "", - "DEFAULTLEASE" => "", - "MAXLEASE" => "", - "USEHOSTDCL" => "", - "BROADCAST" => "", - "ROUTERS" => "", - "DOMAINNAME" => "", - "DOMAINNAMESERVERS" => "", - "NEXTSERVER" => "", - "FILENAME" => "", - "SRVIDENT" => "", - "NTPSERVERS" => "", - "OPTGENERIC" => "", - "DHCPOFFERNOWDN" => "", - "DHCPSVNOW" => "", - "MNR" => $mnr, - "SBMNR" => $sbmnr, - "MCNR" => $mcnr)); - -# DHCP Subnet Daten -$dhcpsubnetDN = $_GET['dn']; -$attributes = array("dn","cn","dhcpoptnetmask","dhcphlpcont","dhcprange","description","dhcpstatements","dhcpoptallow", - "dhcpoptddns-update-style","dhcpoptdefault-lease-time","dhcpoptdeny","dhcpoptfilename", - "dhcpoptignore","dhcpoptmax-lease-time","dhcpoptnext-server","dhcpoptserver-identifier", - "dhcpoptuse-host-decl-names","dhcpoptbroadcast-address","dhcpoptdhcp-max-message-size", - "dhcpoptdomain-name","dhcpoptdomain-name-servers","dhcpoptgeneric","dhcpoptntp-servers", - "dhcpoptroot-path","dhcpoptrouters"); -$subnet_data = get_node_data($dhcpsubnetDN, $attributes); -#print_r($subnet_data); - -# momentane DHCP Service Zuordnung -if ($subnet_data['dhcphlpcont'] != ""){ - $dhcpsvnowdn = ldap_explode_dn($subnet_data['dhcphlpcont'], 1); - $dhcpsvnow = "<b>".$dhcpsvnowdn[0]."</b> [AU: ".$dhcpsvnowdn[2]."]"; -}else{ - $dhcpsvnow = "<b>–</b>"; -} - -# DHCP Range -$iprange = explode('_',$subnet_data['dhcprange']); - -$template->assign(array("SUBNETDN" => $dhcpsubnetDN, - "CN" => $subnet_data['cn'], - "NETMASK" => $subnet_data['dhcpoptnetmask'], - "RANGE1" => $iprange[0], - "RANGE2" => $iprange[1], - "DESCRIPTION" => $subnet_data['description'], - "STATEMENTS" => $subnet_data['dhcpstatements'], - "ALLOW" => $subnet_data['dhcpoptallow'], - "DENY" => $subnet_data['dhcpoptdeny'], - "IGNORE" => $subnet_data['dhcpoptignore'], - "DDNSUPDATE" => $subnet_data['dhcpoptddns-update-style'], - "DEFAULTLEASE" => $subnet_data['dhcpoptdefault-lease-time'], - "MAXLEASE" => $subnet_data['dhcpoptmax-lease-time'], - "USEHOSTDCL" => $subnet_data['dhcpoptuse-host-decl-names'], - "BROADCAST" => $subnet_data['dhcpoptbroadcast-address'], - "ROUTERS" => $subnet_data['dhcpoptrouters'], - "DOMAINNAME" => $subnet_data['dhcpoptdomain-name'], - "DOMAINNAMESERVERS" => $subnet_data['dhcpoptdomain-name-servers'], - "NEXTSERVER" => $subnet_data['dhcpoptnext-server'], - "FILENAME" => $subnet_data['dhcpoptfilename'], - "SRVIDENT" => $subnet_data['dhcpoptserver-identifier'], - "NTPSERVERS" => $subnet_data['dhcpoptntp-servers'], - "OPTGENERIC" => $subnet_data['dhcpoptgeneric'], - "DHCPOFFERNOWDN" => $subnet_data['dhcphlpcont'], - "DHCPSVNOW" => $dhcpsvnow, - "MNR" => $mnr, - "SBMNR" => $sbmnr, - "MCNR" => $mcnr)); - - -# alternative DHCP Services -$altdhcp = alternative_dhcpservices($subnet_data['dhcphlpcont']); - -$template->assign(array("DHCPSVDN" => "", - "DHCPSVCN" => "", - "DHCPSVAU" => "")); -if (count($altdhcp) != 0){ - $template->define_dynamic("Dhcpservices", "Webseite"); - foreach ($altdhcp as $item){ - $template->assign(array("DHCPSVDN" => $item['dn'], - "DHCPSVCN" => $item['cn'], - "DHCPSVAU" => $item['au'])); - $template->parse("DHCPSERVICES_LIST", ".Dhcpservices"); - } -} - -################################################################################### - -include("dhcp_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcpsubnet_add.php b/ldap-site-mngmt/webinterface/dhcp/dhcpsubnet_add.php deleted file mode 100644 index 5fdc0dec..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcpsubnet_add.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$syntax = new Syntaxcheck; - -$subnet = $_POST['dhcpsubnet']; -$subnetexp = explode("|",$subnet); -$cn = $subnetexp[0]; -$netmask = $subnetexp[1]; -#print_r($subnet); echo "<br><br>"; -#print_r($cn); echo "<br><br>"; -#print_r($netmask); echo "<br><br>"; - -$dhcpservice = $_POST['dhcpservice']; -#$range1 = $_POST['range1']; -#$range2 = $_POST['range2']; -# sonstige Attribute -$attribs = $_POST['attribs']; -if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - $atts[$key] = htmlentities($attribs[$key]); - } -} -#print_r($atts); echo "<br><br>"; - -$nodeDN = "cn=dhcp,".$auDN; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; - -$get_dhcpcn = str_replace ( " ", "_", $cn ); -$seconds = 2; -$url = "new_dhcpsubnet.php?&mnr=2"; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $cn != "" && $cn != "Hier_Subnetz_eintragen" && $netmask != "" && $netmask != "Hier_Netzmaske_eintragen" ){ - - if ( $syntax->check_netip_syntax($cn) && $syntax->check_ip_syntax($netmask) ){ - - if (add_dhcpsubnet ($cn,$dhcpservice,$netmask,$atts)){ - $mesg .= "<br>DHCP Subnet erfolgreich angelegt<br>"; - $url = "dhcpsubnets.php?mnr=".$mnr; - }else{ - $mesg .= "<br>Fehler beim anlegen des DHCP Subnets!<br>"; - } - - }else{ - $mesg .= "Falsche IP Syntax! Geben Sie eine korrekte IP Adresse als Subnet Name oder Netzmaske ein."; - $url = "new_dhcpsubnet.php?subnetcn=Hier_Subnetz_eintragen&netmask=".$netmask."&mnr=".$mnr; - } -} - -elseif ( $cn == "" || $cn == "Hier_Subnetz_eintragen" || $netmask == "" || $netmask == "Hier_Netzmaske_eintragen" ){ - - if ( $cn == ""){ $cn = "Hier_Subnetz_eintragen";} - if ( $netmask == ""){ $netmask = "Hier_Netzmaske_eintragen";} - $mesg = "Sie haben die notwendigen Attribute: Name (IP) und Netzmaske des neuen DHCP Subnets nicht angegeben.<br> - Bitte geben Sie fehlende ein.<br><br>"; - $url = "new_dhcpsubnet.php?subnetcn=".$cn."&netmask=".$netmask."&mnr=".$mnr; -} - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcpsubnet_change.php b/ldap-site-mngmt/webinterface/dhcp/dhcpsubnet_change.php deleted file mode 100644 index 875f464b..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcpsubnet_change.php +++ /dev/null @@ -1,294 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$syntax = new Syntaxcheck; - -$cn = $_POST['cn']; -$oldcn = $_POST['oldcn']; -$netmask = $_POST['netmask']; -$oldnetmask = $_POST['oldnetmask']; -$dhcpservice = $_POST['dhcpservice']; -$olddhcpservice = $_POST['olddhcpservice']; -$newrange1 = $_POST['range1']; -$oldrange1 = $_POST['oldrange1']; -$newrange2 = $_POST['range2']; -$oldrange2 = $_POST['oldrange2']; - -$subnetDN = $_POST['subnetdn']; - -# sonstige Attribute -$attribs = $_POST['attribs']; -if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - $atts[$key] = htmlentities($attribs[$key]); - } -} -#print_r($atts); echo "<br><br>"; -$oldattribs = $_POST['oldattribs']; -if (count($oldattribs) != 0){ - foreach (array_keys($oldattribs) as $key){ - $oldatts[$key] = htmlentities($oldattribs[$key]); - } -} -#print_r($oldatts); echo "<br><br>"; - -$nodeDN = "cn=dhcp,".$auDN; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - -$seconds = 2; -$url = "dhcpsubnet.php?dn=".$subnetDN."&mnr=".$mnr."&sbmnr=".$sbmnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -############################################## -# DHCP Subnet CN (DN) - -if ( $oldcn == $cn ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( $oldcn != "" && $cn != "" && $oldcn != $cn ){ - - if ( $syntax->check_netip_syntax($cn) ){ - echo "Subnetz aendern<br>"; - $newsubnetDN = "cn=".$cn.",".$nodeDN; - print_r($newsubnetDN); echo "<br><br>"; - - if(modify_subnet_dn($subnetDN,$newsubnetDN)){ - $subnetDN = $newsubnetDN; - $mesg = "DHCP Subnet erfolgreich geändert<br><br>"; - $url = "dhcpsubnet.php?dn=".$subnetDN."&mnr=".$mnr."&sbmnr=".$sbmnr; - }else{ - $mesg = "Fehler beim ändern des DHCP Subnets!<br><br>"; - } - - }else{ - $mesg = "falsche IP Syntax<br>"; - } -} - -if ( $oldcn != "" && $cn == "" ){ - echo "DHCP Subnet loeschen!<br> - Dieser ist Teil des DN, Sie werden den DHCP Subnet komplett löschen<br><br>"; - echo "Wollen Sie den DHCP Subnet <b>".$oldcn."</b> wirklich löschen?<br><br> - <form action='dhcpsubnet_delete.php' method='post'> - Falls ja:<br><br> - <input type='hidden' name='dn' value='".$subnetDN."'> - <input type='hidden' name='name' value='".$oldcn."'> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'><br><br> - </form> - <form action='".$url."' method='post'> - Falls, nein:<br><br> - <input type='Submit' name='apply' value='zurück' class='small_loginform_button'> - </form>"; - $seconds = 600; -} - - -##################################### -# Netmask - -if ( $netmask != $oldnetmask ){ - - if ( $netmask == ""){ - echo "Die Subnetzmaske ist ein notwendiges Attribut.<br> - Keine Änderung!<br>"; - } - - if ( $netmask != "" ){ - if ( $syntax->check_ip_syntax($netmask) ){ - $entry ['dhcpoptnetmask'] = $netmask; - if(ldap_mod_replace($ds,$subnetDN,$entry)){ - $mesg = "Netzmaske erfolgreich geändert<br><br>"; - }else{ - $mesg = "Fehler beim ändern der Netzmaske!<br><br>"; - } - }else{ - $mesg = "falsche IP Syntax<br>"; - } - } - -} - - -##################################### -# DHCP Dienstzuordnung ändern - -if ( $dhcpservice != "none" ){ - - if ( $dhcpservice != "off" && $dhcpservice == $olddhcpservice ){ - $mesg = "Sie haben die gleiche Abteilung ausgewählt<br> - Keine Änderung!"; - } - - if ( $dhcpservice != "off" && $dhcpservice != $olddhcpservice ){ - $entrysv ['dhcphlpcont'] = $dhcpservice; - if(ldap_mod_replace($ds,$subnetDN,$entrysv)){ - $mesg = "DHCP Dienstzuordnung erfolgreich geändert<br><br>"; - } - else{ - $mesg = "Fehler beim ändern der DHCP Dienstzuordnung!<br><br>"; - } - } - - if ( $dhcpservice == "off" && $olddhcpservice != "" ){ - $entrysv ['dhcphlpcont'] = array(); - if(ldap_mod_del($ds,$subnetDN,$entrysv)){ - $mesg = "DHCP Dienstzuordnung erfolgreich geändert<br><br>"; - } - else{ - $mesg = "Fehler beim ändern der DHCP Dienstzuordnung!<br><br>"; - } - } - -} - - -##################################### -# DHCP Range - -if ( $newrange1 == $oldrange1 && $newrange2 == $oldrange2 ){ - # $mesg = "keine Aenderung<br>"; -}else{ - - if ( $newrange1 == "" xor $newrange2 == "" ){ - $mesg = "Bitte beide DHCP Range Felder ausfüllen, keine Aenderung<br>"; - } - - if ( $oldrange1 == "" && $oldrange2 == "" && $newrange1 != "" && $newrange2 != "" ){ - if ( $syntax->check_ip_syntax($newrange1) && $syntax->check_ip_syntax($newrange2) ){ - if ( check_ip_in_subnet($newrange1,$cn) && check_ip_in_subnet($newrange2,$cn)){ - $dhcprange = implode('_',array($newrange1,$newrange2)); - if ( new_ip_dhcprange($dhcprange,$subnetDN,$auDN) ){ - $mesg = "DHCP Range erfolgreich eingetragen"; - }else{ - $mesg = "Fehler beim eintragen der DHCP Range"; - } - }else{ - $mesg = "DHCP Range nicht in Subnetz ".$cn." enthalten"; - } - }else{ - $mesg = "falsche IP Syntax<br>"; - } - } - - if ( $oldrange1 != "" && $oldrange2 != "" && $newrange1 != "" && $newrange2 != "" ){ - if ( $syntax->check_ip_syntax($newrange1) && $syntax->check_ip_syntax($newrange2) ){ - if ( check_ip_in_subnet($newrange1,$cn) && check_ip_in_subnet($newrange2,$cn)){ - $dhcprange = implode('_',array($newrange1,$newrange2)); - $olddhcprange = implode('_',array($oldrange1,$oldrange2)); - if ( modify_ip_dhcprange($dhcprange,$subnetDN,$auDN) ){ - $mesg = "DHCP Range erfolgreich geändert"; - }else{ - $mesg = "Fehler beim ändern der DHCP Range"; - # alte Range wiederherstellen - new_ip_dhcprange($olddhcprange,$subnetDN,$auDN); - } - }else{ - $mesg = "DHCP Range nicht in Subnetz ".$cn." enthalten"; - } - }else{ - $mesg = "falsche IP Syntax<br>"; - } - } - - if ( $newrange1 == "" && $newrange2 == "" ){ - if ( delete_ip_dhcprange($subnetDN,$auDN) ){ - $mesg = "DHCP Range erfolgreich gelöscht"; - }else{ - $mesg = "Fehler beim löschen der DHCP Range"; - } - } - -} - -##################################### -# Restliche Attribute (u.a. Description) - -$entryadd = array(); -$entrymod = array(); -$entrydel = array(); - -foreach (array_keys($atts) as $key){ - - if ( $oldatts[$key] == $atts[$key] ){ - - } - if ( $oldatts[$key] == "" && $atts[$key] != "" ){ - # hier noch Syntaxcheck - $entryadd[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] != "" && $oldatts[$key] != $atts[$key] ){ - # hier noch Syntaxcheck - $entrymod[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] == "" ){ - # hier noch Syntaxcheck - $entrydel[$key] = $oldatts[$key]; - } -} - -#print_r($entryadd); echo "<br>"; -#print_r($entrymod); echo "<br>"; -#print_r($entrydel); echo "<br>"; - - -if (count($entryadd) != 0 ){ - #print_r($entryadd); echo "<br>"; - #echo "neu anlegen<br>"; - foreach (array_keys($entryadd) as $key){ - $addatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_add($ds,$subnetDN,$entryadd)){ - $mesg = "Attribute ".$addatts." erfolgreich eingetragen<br><br>"; - }else{ - $mesg = "Fehler beim eintragen der Attribute ".$addatts."<br><br>"; - } -} - -if (count($entrymod) != 0 ){ - #print_r($entrymod); echo "<br>"; - #echo "ändern<br>"; - foreach (array_keys($entrymod) as $key){ - $modatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_replace($ds,$subnetDN,$entrymod)){ - $mesg = "Attribute ".$modatts." erfolgreich geaendert<br><br>"; - }else{ - $mesg = "Fehler beim aendern der Attribute ".$modatts."<br><br>"; - } -} - -if (count($entrydel) != 0 ){ - #print_r($entrydel); echo "<br>"; - #echo "löschen<br>"; - foreach (array_keys($entrydel) as $key){ - $delatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_del($ds,$subnetDN,$entrydel)){ - $mesg = "Attribute ".$delatts." erfolgreich geloescht<br><br>"; - }else{ - $mesg = "Fehler beim loeschen der Attribute ".$delatts."<br><br>"; - } -} - - -update_dhcpmtime(array()); - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcpsubnet_delete.php b/ldap-site-mngmt/webinterface/dhcp/dhcpsubnet_delete.php deleted file mode 100644 index 28c8277b..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcpsubnet_delete.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$subnetDN = $_POST['dn']; -$cn = $_POST['name']; -$mnr = $_POST['mnr']; - -$seconds = 1; -$url = "dhcpsubnets.php?mnr=".$mnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $subnetDN != ""){ - if( delete_dhcpsubnet($subnetDN,$cn)){ - $mesg = "Subnet <b>".$cn."</b> erfolgreich gelöscht!<br><br>"; - update_dhcpmtime(array()); - }else{ - $mesg = "Fehler beim löschen des Subnets <b>".$cn."</b> !<br><br>"; - } -} - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcpsubnets.dwt b/ldap-site-mngmt/webinterface/dhcp/dhcpsubnets.dwt deleted file mode 100644 index 514f5b72..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcpsubnets.dwt +++ /dev/null @@ -1,36 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td width='80%'> - <h3>DHCP Subnets</h3> - Übersicht der in <b>{AU}</b> angelegten <b>DHCP Subnets</b>:<br> - Subnetz (-maske), Status der Einbindung in den zentralen DHCP Dienst, sowie Informationen zu angelegten dynamischen DHCP Pools des Subnetzes.<br><br> - Zur <b>Verwaltungsmaske</b> eines bestimmten Subnetzes gelangen Sie durch klicken auf entsprechendes Subnetz.<br><br> - DHCP Subnets können nur für Ihnen <b>komplett zugewiesene Subnetze</b> angelegt werden.<br> - Über die <b>Eingabemaske</b> können Sie noch nicht als DHCP Subnets anlegte komplette Subnetze eintragen (Menüpunkt links "Neues DHCP Subnet anlegen"). - </td> - <td> </td> - </tr> - - <tr><td colspan='2'> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr> - <td width='15%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Subnet</b></td> - <td width='15%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Netmask</b></td> - <td width='20%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>DHCP Service</b></td> - <td width='50%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Dynamic Pools (IP Ranges)</b></td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: Subnets --> - <tr height='45' valign='top'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{SUBNETCN} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{NETMASK} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{DHCP} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{POOLS} </td> - </tr> - <!-- END DYNAMIC BLOCK: Subnets --> - - </table></td> - </tr> - - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/dhcpsubnets.php b/ldap-site-mngmt/webinterface/dhcp/dhcpsubnets.php deleted file mode 100644 index 88e10576..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/dhcpsubnets.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "dhcpsubnets.dwt"; - -include('dhcp_header.inc.php'); - -$mnr = -1; -$sbmnr = -1; -$mcnr = -1; - -################################################################################### - -$mnr = $_GET['mnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createDhcpMenu($rollen, $mnr, $auDN, $sbmnr); - -################################################################################### - -$template->assign(array("SUBNETDN" => "", - "SUBNETCN" => "Noch keine Subnets angelegt", - "NETMASK" => "", - "DHCP" => "", - "POOLS" => "")); - -# rbservice und pxe daten (voerst nur ein rbs) -$subnet_array = get_dhcpsubnets($auDN,array("dn","cn","dhcpoptnetmask","dhcprange","dhcphlpcont")); - -$template->define_dynamic("Subnets", "Webseite"); -$template->define_dynamic("Pools", "Webseite"); - -foreach ($subnet_array as $subnet){ - # Pools des Subnetzes - $pools = get_dhcppools_subnet($subnet['dn'],array("dhcprange","dhcpoptallow","dhcpoptdeny","dhcpoptignore")); - #print_r($pools); echo "<br><br>"; - $poollist = "<ul>"; - foreach ($pools as $pool){ - $poollist .= "<li>"; - if (count($pool['dhcprange']) >1){ - for ($i=0; $i<count($pool['dhcprange']); $i++){ - $range = explode('_',$pool['dhcprange'][$i]); - $poollist .= $range[0]." - ".$range[1]; - if ($i+1 != count($pool['dhcprange'])){ - $poollist .= "<br>"; - } - } - }else{ - $range = explode('_',$pool['dhcprange']); - $poollist .= $range[0]." - ".$range[1]; - } - if ($pool['dhcpoptallow'] != ""){ - $poollist .= "<br>ALLOW ".$pool['dhcpoptallow']; - } - if ($pool['dhcpoptignore'] != ""){ - $poollist .= "<br>IGNORE ".$pool['dhcpoptignore']; - } - if ($pool['dhcpoptdeny'] != ""){ - $poollist .= "<br>DENY ".$pool['dhcpoptdeny']; - } - $poollist .= " [Abt.: ".$pool['poolAU']."]</li><br>"; - } - $poollist .= "</ul>"; - - # Dienstzuordnung des Subnetzes - $dhcpservice = ""; - if ($subnet['dhcphlpcont'] != ""){ - $exp = ldap_explode_dn($subnet['dhcphlpcont'],1); - $dhcpservice = $exp[0]."<br>[".$exp[2]."]"; - } - - $subnetcn = "<a href='dhcpsubnet.php?dn=".$subnet['dn']."&mnr=".$mnr."' class='headerlink'><b>".$subnet['cn']."</b></a>"; - $template->assign(array("SUBNETDN" => $subnet['dn'], - "SUBNETCN" => $subnetcn, - "NETMASK" => $subnet['dhcpoptnetmask'], - "DHCP" => $dhcpservice, - "POOLS" => $poollist)); - $template->parse("SUBNETS_LIST", ".Subnets"); -} - - -################################################################################### - -include("dhcp_footer.inc.php"); - -?> diff --git a/ldap-site-mngmt/webinterface/dhcp/menu.dwt b/ldap-site-mngmt/webinterface/dhcp/menu.dwt deleted file mode 100644 index 24e68a3c..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/menu.dwt +++ /dev/null @@ -1,32 +0,0 @@ - -<table cellpadding='0' cellspacing='0' border='0' width='100%'> - - - - <!-- BEGIN DYNAMIC BLOCK: Hauptmenu --> - - <tr valign='middle' align='left'> - - <td width='8%' align='right' style="border-style=none;">{ICON}</td> - <td width="8%" align="left" style="border-width:1 0 1 1;border-color:#000000;border-style:solid;padding:5;background-color:{FARBE}"> </td> - <td width="74%" align="left" style="border-width:1 1 1 0;border-color:#000000;border-style:solid;padding:5;background-color:{FARBE}"> - <a href="{LINK_M}" style="text-decoration:none"> - <code class="submenue_schrift">{TEXT_M}</code> - </a> - </td> - <td width='10%'> </td> - - </tr> - - <!-- BEGIN DYNAMIC BLOCK: Submenu --> - - {SUB} - - <!-- END DYNAMIC BLOCK: Submenu --> - - <tr height='5'></tr> - <!-- END DYNAMIC BLOCK: Hauptmenu --> - - - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/new_dhcpservice.dwt b/ldap-site-mngmt/webinterface/dhcp/new_dhcpservice.dwt deleted file mode 100644 index 7d964715..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/new_dhcpservice.dwt +++ /dev/null @@ -1,151 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>DHCP Service anlegen</td> - </tr> - <tr> - <td height='20'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='dhcpservice_add.php' method='post'> - - <tr> - <td width='40%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='60%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Eindeutiger DHCP Service Name (cn):</b><br>(Teil des dn, ohne Leerzeichen eingeben) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <font size='+2'><b>DHCP_</b></font><input type='Text' name='cn' value='{CN}' size='40' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Beschreibung:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[description]' value='{DESCRIPTION}' size='50' class='medium_form_field'> - </td> - </tr> - <tr height='50' valign='top'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <b>Wer soll Dienst nutzen dürfen:</b><br>(Wählen Sie eine Abteilung,<br> - impliziert alle Unterabteilungen) - </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <select name='dhcpoffer' size='5' class='medium_form_selectbox'> - <option selected value='{OFFERSELF}'>{SELFOU}</option> - - <!-- BEGIN DYNAMIC BLOCK: Dhcpoffers --> - <option value='{DHCPOFFER}'>{DHCPOFFEROU}</option> - <!-- END DYNAMIC BLOCK: Dhcpoffers --> - - </select> - </td> - </tr> - <!-- <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>PRIMARY DN:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[primary]' value='{PRIMARY}' size='50' class='medium_form_field'> - </td> - </tr> --> - - </table></td> - </tr> - - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>DHCP Optionen des Dienstes (Globaler Scope):</h4></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr valign='top'> - <td width='40%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Option</b></td> - <td width='60%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert(e)</b></td> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Server Identifier:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptserver-identifier]' value='{SRVIDENT}' size='40' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Default Lease Time:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptdefault-lease-time]' value='{DEFAULTLEASE}' size='40' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Max Lease Time:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptmax-lease-time]' value='{MAXLEASE}' size='40' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Use Host DCL Names:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptuse-host-decl-names]' value='{USEHOSTDCL}' size='40' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>DHCP Max Message Size:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptdhcp-max-message-size]' value='{MAXMESSIZE}' size='40' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>DDNS Update Style:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptddns-update-style]' value='{DDNSUPDATE}' size='40' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Domain Name:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptdomain-name]' value='{DOMAINNAME}' size='40' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Domain Name Servers:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptdomain-name-servers]' value='{DOMAINNAMESERVERS}' size='40' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>NTP Servers:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptntp-servers]' value='{NTPSERVERS}' size='40' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Allow:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptallow]' value='{ALLOW}' size='40' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Deny:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptdeny]' value='{DENY}' size='40' class='medium_form_field'> - </td> - </tr> - - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - - </table></td> - </tr> - <tr> - <td><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'> - </form></td> - </tr> - - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/new_dhcpservice.php b/ldap-site-mngmt/webinterface/dhcp/new_dhcpservice.php deleted file mode 100644 index 622bff20..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/new_dhcpservice.php +++ /dev/null @@ -1,75 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "new_dhcpservice.dwt"; - -include('dhcp_header.inc.php'); - -$mnr = 0; -$sbmnr = -1; - -################################################################################### - -$mnr = $_GET['mnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createDhcpMenu($rollen, $mnr, $auDN, $sbmnr); - -################################################################################### - -$dhcpcn = str_replace ( "_", " ", $_GET['dhcpcn']); -$template->assign(array("CN" => $dhcpcn, - "PRIMARY" => "", - "SECONDARY" => "", - "DESCRIPTION" => "", - "STATEMENTS" => "", - "ALLOW" => "", - "DENY" => "", - "IGNORE" => "", - "DDNSUPDATE" => "", - "DEFAULTLEASE" => "", - "MAXLEASE" => "", - "USEHOSTDCL" => "", - "DOMAINNAME" => "", - "DOMAINNAMESERVERS" => "", - "MAXMESSIZE" => "", - "SRVIDENT" => "", - "NTPSERVERS" => "", - "OPTGENERIC" => "", - "OFFERSELF" => $auDN, - "SELFOU" => $au_ou, - "MNR" => $mnr, - "SBMNR" => $sbmnr)); - - -# DHCP Service Anbieten (ausser eigene AU) -$expdn = ldap_explode_dn($auDN, 0); # Mit Merkmalen -$expdn = array_slice($expdn, 2); -$expou = ldap_explode_dn($auDN, 1); # nur Werte -$expou = array_slice($expou, 2, -3); -#print_r($expou); echo "<br>"; -#print_r($expdn); echo "<br>"; -for ($i=0; $i<count($expou); $i++){ - $dhcpoffers[$i]['ou'] = $expou[$i]; - $dhcpoffers[$i]['dn'] = implode(',',$expdn); - $expdn = array_slice($expdn, 1); -} -#print_r($dhcpoffers); - -$template->define_dynamic("Dhcpoffers", "Webseite"); -if ( count($dhcpoffers) != 0 ){ - foreach ($dhcpoffers as $offer){ - $template->assign(array("DHCPOFFER" => $offer['dn'], - "DHCPOFFEROU" => $offer['ou'],)); - $template->parse("DHCPOFFERS_LIST", ".Dhcpoffers"); - } -} - -################################################################################### - -include("dhcp_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/new_dhcpsubnet.dwt b/ldap-site-mngmt/webinterface/dhcp/new_dhcpsubnet.dwt deleted file mode 100644 index 61d052b1..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/new_dhcpsubnet.dwt +++ /dev/null @@ -1,144 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>DHCP Subnet anlegen </h3></td> - </tr> - <tr> - <td height='20'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='dhcpsubnet_add.php' method='post'> - - <tr> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='70%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <tr height='50' valign='top'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>DHCP Subnet (+ Netmask):</b><br> - (Noch freie verfügbare Netze) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <select name='dhcpsubnet' size='{SUBLIST}' class='medium_form_selectbox'> - - <!-- BEGIN DYNAMIC BLOCK: Dhcpsubnets --> - <option value='{SUBNET}'>{CN} / {NETMASK}</option> - <!-- END DYNAMIC BLOCK: Dhcpsubnets --> - - </select> - </td> - </tr> - <tr height='50' valign='top'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>DHCP Dienst wählen:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <select name='dhcpservice' size='{SRVLIST}' class='medium_form_selectbox'> - <option selected value='none'>----------</option> - - <!-- BEGIN DYNAMIC BLOCK: Dhcpservices --> - <option value='{DHCPSVDN}'>{DHCPSVCN} / {DHCPSVAU}</option> - <!-- END DYNAMIC BLOCK: Dhcpservices --> - - </select> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Beschreibung:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[description]' value='{DESCRIPTION}' size='50' class='medium_form_field'> - </td> - </tr> - <!--<tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>IP Range:</b><br>(Zur dynamischen Vergabe)</td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='range1' value='{RANGE1}' size='15' maxlength='15' class='medium_form_field'> - - - <input type='Text' name='range2' value='{RANGE2}' size='15' maxlength='15' class='medium_form_field'> - </td> - </tr>--> - - </table></td> - </tr> - - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>DHCP Optionen des Subnets (Subnet Scope):</h4></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr valign='top'> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Option</b></td> - <td width='70%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert(e)</b></td> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Routers:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptrouters]' value='{ROUTERS}' size='40' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Broadcast Address:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptbroadcast-address]' value='{BROADCAST}' size='40' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Domain Name:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptdomain-name]' value='{DOMAINNAME}' size='40' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Domain Name Servers:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptdomain-name-servers]' value='{DOMAINNAMESERVERS}' size='40' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Default Lease Time:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptdefault-lease-time]' value='{DEFAULTLEASE}' size='40' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Max Lease Time:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptmax-lease-time]' value='{MAXLEASE}' size='40' class='medium_form_field'> - </td> - </tr> - <!-- <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Next Server:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptnext-server]' value='{NEXTSERVER}' size='40' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Filename:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptfilename]' value='{FILENAME}' size='40' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>NTP Servers:</b></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[dhcpoptntp-servers]' value='{NTPSERVERS}' size='40' class='medium_form_field'> - </td> - </tr>--> - - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - - </table></td> - </tr> - <tr> - <td><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'> - </form></td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/new_dhcpsubnet.php b/ldap-site-mngmt/webinterface/dhcp/new_dhcpsubnet.php deleted file mode 100644 index 2d2835ec..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/new_dhcpsubnet.php +++ /dev/null @@ -1,109 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "new_dhcpsubnet.dwt"; - -include('dhcp_header.inc.php'); - -$mnr = 0; -$sbmnr = -1; - -################################################################################### - -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createDhcpMenu($rollen, $mnr, $auDN, $sbmnr); - -################################################################################### - -$subnetcn = str_replace ( "_", " ", $_GET['subnetcn']); -$netmask = str_replace ( "_", " ", $_GET['netmask']); -$template->assign(array("CN" => $subnetcn, - "NETMASK" => $netmask, - "DESCRIPTION" => "", - "STATEMENTS" => "", - "ALLOW" => "", - "DENY" => "", - "IGNORE" => "", - "DDNSUPDATE" => "", - "DEFAULTLEASE" => "", - "MAXLEASE" => "", - "USEHOSTDCL" => "", - "BROADCAST" => "", - "ROUTERS" => "", - "DOMAINNAME" => "", - "DOMAINNAMESERVERS" => "", - "NEXTSERVER" => "", - "FILENAME" => "", - "SRVIDENT" => "", - "NTPSERVERS" => "", - "OPTGENERIC" => "", - "DHCPSVNOW" => "", - "DHCPSVNOWAU" => "", - "MNR" => $mnr, - "SBMNR" => $sbmnr, - "MCNR" => $mcnr)); - - - -$freenets = get_networks(); -#print_r($freenets); -$subnets = array(); -if (count($freenets) != 0){ - $template->define_dynamic("Dhcpsubnets", "Webseite"); - - foreach ($freenets as $subnet){ - $netexp = explode(".",$subnet); - $mask = array(255,255,255,255); - for ($i=0; $i<count($netexp); $i++){ - if ($netexp[$i] == "0"){ - $mask[$i] = "0"; - } - } - $netmask = implode(".", $mask); - $subnets[] = $subnet."|".$netmask; - - $template->assign(array("SUBNET" => $subnet."|".$netmask, - "CN" => $subnet, - "NETMASK" => $netmask)); - $template->parse("DHCPSUBNETS_LIST", ".Dhcpsubnets"); - } - #print_r($subnets); - -# DHCP Services -$dhcpservices = get_dhcpoffers($auDN); -#print_r($dhcpservices); echo "<br>"; - -$template->assign(array("DHCPSVDN" => "", - "DHCPSVCN" => "", - "DHCPSVAU" => "")); -if (count($dhcpservices) != 0){ -$template->define_dynamic("Dhcpservices", "Webseite"); - foreach ($dhcpservices as $item){ - $exp = ldap_explode_dn($item,1); - - $template->assign(array("DHCPSVDN" => $item, - "DHCPSVCN" => $exp[0], - "DHCPSVAU" => $exp[2])); - $template->parse("DHCPSERVICES_LIST", ".Dhcpservices"); - } -} - -$template->assign(array("SUBLIST" => count($freenets)+1, - "SRVLIST" => count($dhcpservices)+1)); - -}else{ - # keine freie Netze mehr zur Verfügung - # wird schon über das DHCP Menu abgefangen ... -} - -################################################################################### - -include("dhcp_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/no_dhcp.dwt b/ldap-site-mngmt/webinterface/dhcp/no_dhcp.dwt deleted file mode 100644 index 4e83f948..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/no_dhcp.dwt +++ /dev/null @@ -1,27 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='90%'> - <tr> - <td colspan='2'><h3>Modul - DHCP Management: </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td> - <p>Verwaltung von DHCP Subnets, Pools (und Classes).<br> - <br> - <b>Sie verfügen über keine IP Adressen, so dass Sie keine dieser Objekte - anlegen bzw. verwalten können.</b><br> - <!--<b>Sie verfügen über keine kompletten Netzwerke!</b> <br> - x.x.x.0/24<br> - x.x.0.0/16<br> - x.0.0.0/8<br> - <br> - Sie können daher keine DHCP Dienst- bzw. DHCP Subnetz-Objekte anlegen. <br>--> - <br> - Sie können jedoch ihre Rechner im zentralen DHCP Dienst eintragen, über das<br> - Modul <a class='headerlink' href='../computers/computers.php' >Rechner Management</a>. - - </td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dhcp/no_dhcp.php b/ldap-site-mngmt/webinterface/dhcp/no_dhcp.php deleted file mode 100644 index 06fd226e..00000000 --- a/ldap-site-mngmt/webinterface/dhcp/no_dhcp.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "no_dhcp.dwt"; - -include('dhcp_header.inc.php'); - -$mnr = 0; -$sbmnr = -1; - -################################################################################### - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createDhcpMenu($rollen, $mnr, $auDN, $sbmnr); - -################################################################################### - -include("dhcp_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dns/dns.dwt b/ldap-site-mngmt/webinterface/dns/dns.dwt deleted file mode 100644 index 968d8c16..00000000 --- a/ldap-site-mngmt/webinterface/dns/dns.dwt +++ /dev/null @@ -1,76 +0,0 @@ -<html> - -<head> - <title>{SEITENTITEL}</title> - <link rel='stylesheet' href='../styles.css' type='text/css'></head> -<body> - -<table cellpadding='0' cellspacing='0' border='0' width='100%' style='background-color: #F0F0F0;border-color: #505050; border-style: solid; border-width: 0 0 1 0;'> - <tr> - <td width='30%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr valign='top'> - <td width='1'></td> - <td><h2>Client / IP Management</h2></td> - </tr> - </table> - </td> - - <td width='45%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr valign='top' align='left'> - <td> - <h4><a href='../start.php' class='headerlink'>Startseite</a> - >> <a href='../au/au.php' class='headerlink'>{AU}</a> [ {DOMAIN} ]</h4> - </td> - </tr> - </table> - </td> - <td width='25%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%' align='right'> - <tr valign='top' align='right'> - <td> - {LOGIN} - </td> - </tr> - </table> - </td> - </tr> - <tr> - <td colspan='3'>{MAINMENU}</td> - </tr> -</table> - -<!-- <hr align='center' width='98%' noshade> --> -<br> - - -<table cellpadding='5' cellspacing='0' border='0' width='100%' height='85%'> - - <tr valign='top' height='100%'> - <td width='28%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr><td> - - {NAVIGATION} - - </td></tr> - </table> - </td> - - <td width='72%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr><td> - - {HAUPTFENSTER} - - </td></tr> - </table> - </td> - - </tr> -</table> - -</body> - -</html> diff --git a/ldap-site-mngmt/webinterface/dns/dns.php b/ldap-site-mngmt/webinterface/dns/dns.php deleted file mode 100644 index 4368d6a9..00000000 --- a/ldap-site-mngmt/webinterface/dns/dns.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "dns_inwork.dwt"; - -include('dns_header.inc.php'); - -################################################################################### - -$mnr = 0; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createDNSMenu($rollen, $mnr); - -################################################################################### - -include("dns_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dns/dns_footer.inc.php b/ldap-site-mngmt/webinterface/dns/dns_footer.inc.php deleted file mode 100644 index 311721c5..00000000 --- a/ldap-site-mngmt/webinterface/dns/dns_footer.inc.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -$template->assign(array("PFAD" => $START_PATH)); - -# Daten in die Vorlage parsen -$template->parse("LOGIN", "Login"); -$template->parse("MAINMENU", "Mmenu"); -$template->parse("NAVIGATION", "Menu"); -$template->parse("HAUPTFENSTER", "Webseite"); -$template->parse("PAGE", "Vorlage"); - -# Fertige Seite an den Browser senden -$template->FastPrint("PAGE"); - -# Abmelden vom LDAP -ldap_unbind($ds); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dns/dns_header.inc.php b/ldap-site-mngmt/webinterface/dns/dns_header.inc.php deleted file mode 100644 index b6dfd984..00000000 --- a/ldap-site-mngmt/webinterface/dns/dns_header.inc.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt. -$titel = "DNS Zone Management"; -# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc. -$mainnr = 4; - - -$template = new FastTemplate("."); -# dem erstellten Template-Objekt eine Vorlage zuweisen -$definedTemplates = array("Vorlage" => "dns.dwt", - "Login" => "../logout_form.inc.dwt", - "Mmenu" => "../hauptmenue.dwt", - "Menu" => "menu.dwt", - "Webseite" => $webseite); -if (isset($additionalTemplates)) { - foreach ($additionalTemplates as $templateKey => $templateFile) { - $definedTemplates[$templateKey] = $templateFile; - } -} -$template->define($definedTemplates); -$template->assign(array("SEITENTITEL" => $titel, "ROLLE" => "mainadmin", "AU" => $au_ou, "DOMAIN" => $assocdom, "USERCN" => $usercn)); - - -include("dns_menu.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dns/dns_inwork.dwt b/ldap-site-mngmt/webinterface/dns/dns_inwork.dwt deleted file mode 100755 index d64dc090..00000000 --- a/ldap-site-mngmt/webinterface/dns/dns_inwork.dwt +++ /dev/null @@ -1,15 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='90%'> - <tr> - <td colspan='2'><h3>Modul - DNS Zonen Management: </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td> - <p>Dieses Modul steht noch nicht zur Verfügung ...<br> - - </td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dns/dns_menu.php b/ldap-site-mngmt/webinterface/dns/dns_menu.php deleted file mode 100644 index bf6e5bbe..00000000 --- a/ldap-site-mngmt/webinterface/dns/dns_menu.php +++ /dev/null @@ -1,73 +0,0 @@ -<?php - -function createDNSMenu($rollen , $mnr) { - global $template; - global $START_PATH; - # Struktur der Registerkartenleiste - $hauptmenu = array(array("link" => "dns.php", - "text" => "Übersicht", - "zugriff" => "alle"), - #array("link" => "dns.php", - # "text" => "SOA Record", - # "zugriff" => array("MainAdmin")), - #array("link" => "dns.php", - # "text" => "INCLUDE Direktiven", - # "zugriff" => array("MainAdmin","ZoneAdmin")), - #array("link" => "dns.php", - # "text" => "Zonen Delgierung", - # "zugriff" => array("MainAdmin")), - #array("link" => "dns.php", - # "text" => "Resource Records", - # "zugriff" => array("MainAdmin","HostAdmin","ZoneAdmin")) - ); - - #$rollen = array_keys($roles); - - # Zusammenstellen der Menuleiste - $template->define_dynamic("Hauptmenu", "Menu"); - $i=0; - foreach($hauptmenu as $item) { - if($item['zugriff'] === "alle" || vergleicheArrays($rollen , $item['zugriff'])) { - if ($i==0) { - if ($mnr==0) { - $zwisch=""; - $lastaktive=true; - $farb="#505050"; - } - else { - $zwisch=""; - $farb="#A0A0A0"; - $lastaktive=false; - } - } - else { - if ($mnr==$i) { - $zwisch=""; - $lastaktive=true; - $farb="#505050"; - } - else { - $farb="#A0A0A0"; - if ($lastaktive) {$zwisch="";} - else {$zwisch="";} - $lastaktive=false; - } - } - $template->assign(array("ZWISCHEN" => $zwisch, - "FARBE" => $farb, - "LINK_M" => $item["link"], - "TEXT_M" => $item["text"])); - $template->parse("HAUPTMENU_LIST", ".Hauptmenu"); - - } - $i=$i+1; - } - if ($lastaktive) {$template->assign(array("ENDE" => ""));} - else { - $template->assign(array("ENDE" => "")); - } - -} - - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dns/dns_start.dwt b/ldap-site-mngmt/webinterface/dns/dns_start.dwt deleted file mode 100644 index 0595dde7..00000000 --- a/ldap-site-mngmt/webinterface/dns/dns_start.dwt +++ /dev/null @@ -1,30 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='90%'> - <tr> - <td colspan='2'><h3>Modul - DNS Zonen Management: </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td> - <p>Dieses Modul dient der Verwaltung ...<br> - Benutzen Sie die Navigation links, um die einzelnen Verwaltungsbereiche anzusteuern:</p> - <ul> - <li><p><b>SOA Record</b></p> - Verwalten Sie hier den Start Of Authority (SOA) ihrer DNS Zone ... - </li> - <li><p><b>Include Direktiven</b></p> - Verwalten Sie hier die $INCLUDE Direktiven ihrer includeten Zonendateien ... - </li> - <li><p><b>Zonen Delegierung</b></p> - Delegieren Sie hier neue DNS Zonen ... - </li> - <li><p><b>Resource Records Zone</b></p> - Verwalten Sie hier alle weiteren Namenseintraege ihrer Zone und deren RRs ... - </li> - </ul> - - </td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/dns/menu.dwt b/ldap-site-mngmt/webinterface/dns/menu.dwt deleted file mode 100644 index a57ab962..00000000 --- a/ldap-site-mngmt/webinterface/dns/menu.dwt +++ /dev/null @@ -1,22 +0,0 @@ - -<table cellpadding='5' cellspacing='0' border='0' width='100%'> - - - - <!-- BEGIN DYNAMIC BLOCK: Hauptmenu --> - - <tr valign='middle' align='left'>
-
- <td width='8%' align='right' style="border-style=none;"></td> - <td width="8%" align="left" style="border-width:1 0 1 1;border-color:#000000;border-style:solid;padding:5;background-color:{FARBE}"> </td>
- <td width="74%" align="left" style="border-width:1 1 1 0;border-color:#000000;border-style:solid;padding:5;background-color:{FARBE}"> - <a href="{LINK_M}" style="text-decoration:none"><b class="standard_schrift">{TEXT_M}</b></a></td>
- <td width='10%'> </td> - - </tr> - <tr height='5'></tr> - <!-- END DYNAMIC BLOCK: Hauptmenu -->
- - - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/hauptmenue.dwt b/ldap-site-mngmt/webinterface/hauptmenue.dwt deleted file mode 100644 index 7295b5f6..00000000 --- a/ldap-site-mngmt/webinterface/hauptmenue.dwt +++ /dev/null @@ -1,16 +0,0 @@ -
-<table width='100%' height="25" border="0" cellspacing="0" cellpadding="3">
-<tr height="25">
- <td width='5'></td>
- <!-- BEGIN DYNAMIC BLOCK: Mainmenu -->
- <td width='2'></td>
- <td height="20" width="120" align="center" style="border-width:1 1 0 1;border-color:#505050;border-style:solid;background-color:{MFARBE}">
- <a href="{MLINK_M}" style="text-decoration:none"><code class="menue_schrift">
- {MTEXT_M}</code></a>
- </td>
- <!-- END DYNAMIC BLOCK: Mainmenu -->
- <td> </td>
-
-</tr>
-
-</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/home.dwt b/ldap-site-mngmt/webinterface/home.dwt deleted file mode 100644 index 9d89dadc..00000000 --- a/ldap-site-mngmt/webinterface/home.dwt +++ /dev/null @@ -1,72 +0,0 @@ -<table cellpadding='0' cellspacing='0' border='0' width='100%' style='background-color: #F0F0F0;border-color: #505050; border-style: solid; border-width: 0 0 1 0;'> - <tr valign='middle'> - <td width='35%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr> - <td width='1'></td> - <td><h2>Client / IP Management</h2></td> - </tr> - </table> - </td> - - <td width='40%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr valign='top' align='left'> - <td> - <h4><a href='start.php' class='headerlink'>Startseite</a> - >> </h4> - </td> - </tr> - </table> - </td> - <td width='25%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%' align='right'> - <tr valign='top' align='right'> - <td> - {LOGIN} - </td> - </tr> - </table> - </td> - </tr> -</table> - - -<table cellpadding='5' cellspacing='0' border='0' width='100%' height='85%'> - - <tr valign='top' height='100%'> - <td width='95%'> - - <table border='0' cellpadding='10' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Admin Units (AU) in denen Sie Administrator sind</h3> - Um zu den Administrations-Seiten einer AU zu kommen, wählen Sie entsprechenden Link. - </td> - </tr> - - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='100%' style='border-width: 0 0 0 0;'> - <tr> - <td width='70%' colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Administrative Einheiten</b></td> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Rolle</b></td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: Aus --> - <tr> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <a href='zwischen.php?audn={AUDN}&rollen={ROLLEN}' class='headerlink'>{AU}</a> </td> - <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{CN} </td> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{MA} </td> - </tr> - <!-- END DYNAMIC BLOCK: Aus --> - - </table> - </td> - </tr> - </table> - - </td> - </tr> -</table> - diff --git a/ldap-site-mngmt/webinterface/index.dwt b/ldap-site-mngmt/webinterface/index.dwt deleted file mode 100644 index 048a34cb..00000000 --- a/ldap-site-mngmt/webinterface/index.dwt +++ /dev/null @@ -1,27 +0,0 @@ -<html> - -<head> - <title>{SEITENTITEL}</title> - <link rel='stylesheet' href='styles.css' type='text/css'> - -</head> -<body> - -<!--<table cellpadding='0' cellspacing='0' border='0' align='center' width='100%' height='100%'> - <tr height='10'> - <td colspan='3'></td> - </tr> - <tr height='100%'> - <td width='2%'></td> - <td width='96%' style='border-color: #C0C0C0; border-style: solid; border-width: 1 1 1 1;'>--> - - {HAUPTFENSTER} - - <!--</td> - <td width='2%'></td> - </tr> -</table>--> - -</body> - -</html>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/index.php b/ldap-site-mngmt/webinterface/index.php deleted file mode 100644 index be6cfe50..00000000 --- a/ldap-site-mngmt/webinterface/index.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php -# Nach dem Logout wird die Session beim Aufruf der index.php zerstört. -if(isset($_POST['Logout']) || $_SESSION['status'] != "in") { - session_start(); - session_unregister('uid'); - session_unregister('userPassword'); - session_unregister('cn'); - session_unregister('dn'); - session_unregister('roles'); - session_unregister('au_dn'); - session_unregister('status'); - session_destroy(); -} - -########################################################### - -#Pfad festlegen wo die Dateien sich befinden -#include('standard_header.inc.php'); -include("class.FastTemplate.php"); - -$titel = "Zentrales Client / IP Management"; -$webseite = "start.dwt"; - -# neues Template-Objekt erstellen -$template = new FastTemplate("."); -# dem erstellten Template-Objekt eine Vorlage zuweisen -$template->define(array("Vorlage" => "index.dwt", - "Login" => "login_form.inc.html", - "Webseite" => $webseite)); -$template->assign(array("SEITENTITEL" => $titel)); - -############################################################ - -# Daten in die Vorlage parsen -$template->assign(array("PFAD" => $START_PATH)); - -# $template->parse("MAINMENU", "Mmenu"); -# $template->parse("NAVIGATION", "Menu"); -$template->parse("LOGIN", "Login"); -$template->parse("HAUPTFENSTER", "Webseite"); -$template->parse("PAGE", "Vorlage"); - -# Fertige Seite an den Browser senden -$template->FastPrint("PAGE"); - -?> diff --git a/ldap-site-mngmt/webinterface/ip/ip.dwt b/ldap-site-mngmt/webinterface/ip/ip.dwt deleted file mode 100644 index 9dd6a28e..00000000 --- a/ldap-site-mngmt/webinterface/ip/ip.dwt +++ /dev/null @@ -1,88 +0,0 @@ -<html> - -<head> - <title>{SEITENTITEL}</title> - <link rel='stylesheet' href='../styles.css' type='text/css'></head> -<body> - -<table cellpadding='0' cellspacing='0' border='0' width='95%' height='8%'> - <tr> - <td width='35%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr valign='top'> - <td width='1'></td> - <td><h2>Client / IP Management</h2></td> - </tr> - </table> - </td> - - <td width='40%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr valign='top' align='left'> - <td> - <h4><a href='../start.php' class='headerlink'>Startseite</a> - >> <a href='../au/au.php' class='headerlink'>{AU}</a> [ {DOMAIN} ]</h4> - </td> - </tr> - </table> - </td> - <td width='25%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%' align='right'> - <tr valign='top' align='right'> - <td> - {LOGIN} - </td> - </tr> - </table> - </td> - </tr> -</table> - -<table cellpadding='5' cellspacing='0' border='0' width='95%' height='7%'> -<tr> - <td>{MAINMENU}</td> -</tr> -</table> - -<hr align='center' width='98%' noshade> - - - -<table cellpadding='5' cellspacing='0' border='0' width='100%' height='85%'> - - <tr valign='top' height='100%'> - <td width='28%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr> - <td> - - {NAVIGATION} - - </td> - </tr> - <tr> - <td> - - {IPBLOCKS} - - </td> - </tr> - </table> - </td> - - <td width='72%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr><td> - - {HAUPTFENSTER} - - </td></tr> - </table> - </td> - - </tr> -</table> - -</body> - -</html>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/ip/ip.php b/ldap-site-mngmt/webinterface/ip/ip.php deleted file mode 100644 index 9566d124..00000000 --- a/ldap-site-mngmt/webinterface/ip/ip.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "ip_start.dwt"; - -include("ip_header.inc.php"); - -################################################################################### - -$mnr = 0; - -# Menuleiste erstellen -createMainMenu($rollen, $mainnr); -createIPMenu($rollen, $mnr); - -################################################################################### - -include("ip_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/ip/ip_blocks.inc.php b/ldap-site-mngmt/webinterface/ip/ip_blocks.inc.php deleted file mode 100644 index 8530e079..00000000 --- a/ldap-site-mngmt/webinterface/ip/ip_blocks.inc.php +++ /dev/null @@ -1,68 +0,0 @@ -<?php - -# Max und Free IP Blocks -$mipb_array = get_maxipblocks_au($auDN); -$fipb_array = get_freeipblocks_au($auDN); -#print_r(count($mipb_array)); echo "<br>"; -#print_r(count($fipb_array)); echo "<br>"; -$ipblocks = ""; - -# print_r($mipb_array); -if ($mipb_array[0] != "" ){ - if (count($mipb_array) > 1 ){ - $ipblocks .= "<table border='1' cellpadding='2' cellspacing='0' width='100%' style='border-width: 0 0 0 0;'> - <tr><td colspan='3' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'> - <h4>Zugewiesene IP Bereiche:</h4></td></tr>"; - foreach ($mipb_array as $mipb){ - $exp = explode('_',$mipb); - $ipblocks .= "<tr><td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[0] </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - </td> - <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[1] </td></td></tr>"; - } - } - elseif (count($mipb_array) == 1){ - $ipblocks .= "<table border='1' cellpadding='2' cellspacing='0' width='100%' style='border-width: 0 0 0 0;'> - <tr><td colspan='3' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'> - <h4>Zugewiesener IP Bereich:</h4></td></tr>"; - $exp = explode('_',$mipb_array[0]); - $ipblocks .= "<tr><td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[0] </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - </td> - <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[1] </td></tr>"; - } - elseif( $fipb_array[0] == "" ){ - $ipblocks .= "<table border='0' cellpadding='2' cellspacing='0' width='100%' style='border-width: 0 0 0 0;'> - <tr><td><h4>Keine IP Adressen mehr verfügbar</h4></td></tr>"; - } - if (count($fipb_array) > 1 ){ - $ipblocks .= "<table border='1' cellpadding='2' cellspacing='0' width='100%' style='border-width: 0 0 0 0;'> - <tr valign='bottom' height='50'> - <td colspan='3' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'> - <h4>Davon noch frei verfügbar:</h4></td></tr>"; - foreach ($fipb_array as $fipb){ - $exp = explode('_',$fipb); - $ipblocks .= "<tr><td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[0] </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - </td> - <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[1] </td></tr>"; - } - } - elseif (count($fipb_array) == 1){ - $ipblocks .= "<table border='1' cellpadding='2' cellspacing='0' width='100%' style='border-width: 0 0 0 0;'> - <tr><td colspan='3' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'> - <h4>Davon noch frei verfügbar:</h4></td></tr>"; - $exp = explode('_',$fipb_array[0]); - $ipblocks .= "<tr><td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[0] </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - </td> - <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[1] </td></tr>"; - } - -} - -if( $mipb_array[0] == "" ){ - $ipblocks .= "<table border='0' cellpadding='2' cellspacing='0' width='100%' style='border-width: 0 0 0 0;'> - <tr><td><h4>Ihnen wurden keine IP Adressen zugewiesen</h4></td></tr>"; -} -$ipblocks .= "</table>"; - -$template->assign(array("IPBLOCKS" => $ipblocks)); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/ip/ip_deleg.dwt b/ldap-site-mngmt/webinterface/ip/ip_deleg.dwt deleted file mode 100644 index 3eb0ea74..00000000 --- a/ldap-site-mngmt/webinterface/ip/ip_deleg.dwt +++ /dev/null @@ -1,40 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Folgende IP Adressen haben Sie an untergeordnete Abteilungen delegiert: </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr> - <td width='35%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Untergeordnete Abteilung</b></td> - <td width='65%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Delegierte IP Bereiche</b></td> - </tr> - - <form action='ip_deleg_change.php' method='post'> - - <!-- BEGIN DYNAMIC BLOCK: AUs --> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{CHILDOU} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - - <!-- BEGIN DYNAMIC BLOCK: Delegs --> - <input type='Text' name='range1[]' value='{RANGE1}' size='15' class='medium_form_field'> - - - <input type='Text' name='range2[]' value='{RANGE2}' size='15' class='medium_form_field'><br> - <input type='hidden' name='oldrange1[]' value='{RANGE1}'> - <input type='hidden' name='oldrange2[]' value='{RANGE2}'> - <input type='hidden' name='childaudn[]' value='{CHILDDN}'> - <input type='hidden' name='audn[]' value='{AUDN}'> - <!-- END DYNAMIC BLOCK: Delegs --> - </td> - </tr> - <!-- END DYNAMIC BLOCK: AUs --> - - </table></td> - <tr> - <td><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/ip/ip_deleg.php b/ldap-site-mngmt/webinterface/ip/ip_deleg.php deleted file mode 100644 index 6e15b6f2..00000000 --- a/ldap-site-mngmt/webinterface/ip/ip_deleg.php +++ /dev/null @@ -1,102 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt. -$titel = "IP Address Management"; -# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc. -$mainnr = 1; -$mnr = 2; -# 3. Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "ip_deleg.dwt"; - -include("../class.FastTemplate.php"); - -include("ip_header.inc.php"); - -############################################################################# - -# Menuleiste erstellen -createMainMenu($rollen, $mainnr); -createIPMenu($rollen, $mnr); - -include("ip_blocks.inc.php"); - - -############################################################################# - -$template->assign(array("CHILDOU" => "Noch keine untergeordnete AU angelegt", - "RANGE1" => "", - "RANGE2" => "", - "CHILDDN" => "")); - -$childau_array = get_childau($auDN,array("dn","ou","maxipblock")); -# print_r ($childau_array); - -$template->define_dynamic("Delegs", "Webseite"); -$template->define_dynamic("AUs", "Webseite"); - -foreach ($childau_array as $childau){ - - $template->clear_parse("DELEGS_LIST"); - if ( count($childau['maxipblock']) > 1 ){ - foreach ($childau['maxipblock'] as $j){ - $exp = explode('_',$j); - $template->assign(array("CHILDOU" => $childau['ou'], - "RANGE1" => $exp[0], - "RANGE2" => $exp[1], - "CHILDDN" => $childau['dn'], - "AUDN" => $auDN)); - $template->parse("DELEGS_LIST", ".Delegs"); - $template->clear_dynamic("Delegs"); - } - $template->assign(array("CHILDOU" => $childau['ou'], - "RANGE1" => "", - "RANGE2" => "", - "CHILDDN" => $childau['dn'], - "AUDN" => $auDN)); - $template->parse("DELEGS_LIST", ".Delegs"); - $template->clear_dynamic("Delegs"); - $template->assign(array("OU" => $childau['ou'])); - $template->parse("AUS_LIST", ".AUs"); - - }elseif ( count($childau['maxipblock']) == 1 ){ - - $exp = explode('_',$childau['maxipblock']); - $template->assign(array("CHILDOU" => $childau['ou'], - "RANGE1" => $exp[0], - "RANGE2" => $exp[1], - "CHILDDN" => $childau['dn'], - "AUDN" => $auDN)); - $template->parse("DELEGS_LIST", ".Delegs"); - $template->clear_dynamic("Delegs"); - $template->assign(array("CHILDOU" => $childau['ou'], - "RANGE1" => "", - "RANGE2" => "", - "CHILDDN" => $childau['dn'], - "AUDN" => $auDN)); - $template->parse("DELEGS_LIST", ".Delegs"); - $template->clear_dynamic("Delegs"); - $template->assign(array("OU" => $childau['ou'])); - $template->parse("AUS_LIST", ".AUs"); - - }else{ - $template->assign(array("CHILDOU" => $childau['ou'], - "RANGE1" => "", - "RANGE2" => "", - "CHILDDN" => $childau['dn'], - "AUDN" => $auDN)); - $template->parse("DELEGS_LIST", ".Delegs"); - $template->clear_dynamic("Delegs"); - $template->assign(array("OU" => $childau['ou'])); - $template->parse("AUS_LIST", ".AUs"); - } - -} - - -##################################################################################### - -include("ip_footer.inc.php"); - -?> diff --git a/ldap-site-mngmt/webinterface/ip/ip_deleg_change.php b/ldap-site-mngmt/webinterface/ip/ip_deleg_change.php deleted file mode 100644 index d9122eb0..00000000 --- a/ldap-site-mngmt/webinterface/ip/ip_deleg_change.php +++ /dev/null @@ -1,194 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -$auDN = $_POST['audn']; -$childauDN = $_POST['childaudn']; -$oldrange1 = $_POST['oldrange1']; -$oldrange2 = $_POST['oldrange2']; -$newrange1 = $_POST['range1']; -$newrange2 = $_POST['range2']; - -/* -print_r($oldrange1);echo "<br>"; -print_r($newrange1);echo "<br><br>"; -print_r($oldrange2);echo "<br>"; -print_r($newrange2);echo "<br>"; -print_r($childauDN);echo "<br>"; -print_r($auDN);echo "<br><br>"; -*/ - -$syntax = new Syntaxcheck; -$url = "ip_deleg.php"; -$seconds = 200; - -echo " -<html> -<head> - <title>IP Address Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - - -$diff1 = array_keys(array_diff_assoc($oldrange1,$newrange1)); -$diff2 = array_keys(array_diff_assoc($newrange1,$oldrange1)); -$tochange1 = array_unique(array_merge($diff1,$diff2)); - -$diff3 = array_keys(array_diff_assoc($oldrange2,$newrange2)); -$diff4 = array_keys(array_diff_assoc($newrange2,$oldrange2)); -$tochange2 = array_unique(array_merge($diff3,$diff4)); - -# print_r($tochange1);echo "<br><br>"; -# print_r($tochange2);echo "<br><br>"; - -$tochange = array_unique(array_merge($tochange1,$tochange2)); -#print_r($tochange);echo "<br><br>"; - - -foreach ($tochange as $i){ - - $childaudnexp = ldap_explode_dn($childauDN[$i], 1); - $childau = $childaudnexp[0]; - #print_r($childau); - - if ( $oldrange1[$i] == "" && $oldrange2[$i] == "" && $newrange1[$i] != "" && $newrange2[$i] != "" ){ - - echo "Neuen IP Bereich an <b>$childau</b> delegieren:";echo "<br>";echo "<br>"; - echo "neue IP Range: ";print_r($newrange1[$i]);echo " - ";print_r($newrange2[$i]);echo "<br>"; - - if ($syntax->check_ip_syntax($newrange1[$i]) && $syntax->check_ip_syntax($newrange2[$i])){ - #echo "korrekte IP Syntax<br>"; - $newrange1[$i] = htmlentities($newrange1[$i]); - $newrange2[$i] = htmlentities($newrange2[$i]); - $newrange_array = array($newrange1[$i],$newrange2[$i]); - #print_r($newrange_array); - $newrange = implode('_',$newrange_array); - #print_r($newrange); - # $oldip[$i] = htmlentities($oldip[$i]); - if (new_ip_delegation($newrange,$childauDN[$i],$auDN[$i])){ - echo "<br>Neuer IP Bereich erfolgreich delegiert<br>"; - }else{echo "<br>Fehler beim delegieren des neuen IP Bereichs<br>";} - }else{echo "falsche IP Syntax<br>";} - - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='ip_deleg.php' style='publink'>back</a>"; - redirect($seconds, $url, $mesg, $addSessionId = TRUE); - } - - elseif ( $oldrange1[$i] != "" && $oldrange2[$i] != "" && $newrange1[$i] == "" && $newrange2[$i] == "" ){ - - echo "IP Delegierung von <b>$childau</b> löschen:";echo "<br>";echo "<br>"; - echo "zu löschende IP Range: ";print_r($oldrange1[$i]);echo " - ";print_r($oldrange2[$i]);echo "<br>"; - - $oldrange1[$i] = htmlentities($oldrange1[$i]); - $oldrange2[$i] = htmlentities($oldrange2[$i]); - $oldip_array = array($oldrange1[$i],$oldrange2[$i]); - $oldrange = implode('_',$oldip_array); - if (delete_ip_delegation($oldrange,$childauDN[$i],$auDN[$i])){ - $mesg = "<br>IP Delegierung geloescht<br>"; - }else{ - $mesg = "<br>Fehler beim loeschen der IP Delegierung<br>"; - } - - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='ip_deleg.php' style='publink'>back</a>"; - redirect($seconds, $url, $mesg, $addSessionId = TRUE); - } - - elseif ( $oldrange1[$i] != "" && $oldrange2[$i] != "" && $newrange1[$i] != "" && $newrange2[$i] != "" ){ - $or1 = ip2long($oldrange1[$i]); - $or2 = ip2long($oldrange2[$i]); - $nr1 = ip2long($newrange1[$i]); - $nr2 = ip2long($newrange2[$i]); - - if ( ($nr1 > $or1 || $nr2 < $or2) && !($nr1 < $or1 || $nr2 > $or2) ){ - - echo "IP Delegierung von <b>$childau</b> reduzieren:";echo "<br>";echo "<br>"; - echo "alte IP Range: ";print_r($oldrange1[$i]);echo " - ";print_r($oldrange2[$i]);echo "<br>"; - echo "neue IP Range: ";print_r($newrange1[$i]);echo " - ";print_r($newrange2[$i]);echo "<br>"; - - if ($syntax->check_ip_syntax($newrange1[$i]) && $syntax->check_ip_syntax($newrange2[$i])){ - #echo "korrekte IP Syntax<br>"; - - $newrange1[$i] = htmlentities($newrange1[$i]); - $newrange2[$i] = htmlentities($newrange2[$i]); - $newrange_array = array($newrange1[$i],$newrange2[$i]); - $newrange = implode('_',$newrange_array); - #print_r($newrange); - - $oldrange1[$i] = htmlentities($oldrange1[$i]); - $oldrange2[$i] = htmlentities($oldrange2[$i]); - $oldip_array = array($oldrange1[$i],$oldrange2[$i]); - $oldrange = implode('_',$oldip_array); - #print_r($oldrange); - - if (reduce_ip_delegation($oldrange,$newrange,$childauDN[$i],$auDN[$i])){ - $mesg = "<br>IP Range verkleinert<br>"; - }else{ - $mesg = "<br>Fehler beim verkleinern der IP Range<br>"; - } - }else{echo "falsche IP Syntax<br>";} - - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='ip_deleg.php' style='publink'>back</a>"; - redirect($seconds, $url, $mesg, $addSessionId = TRUE); - - - }elseif( ($nr1 < $or1 || $nr2 > $or2) && !($nr1 > $or1 || $nr2 < $or2) ){ - - echo "IP Delegierung von <b>$childau</b> erweitern:";echo "<br>";echo "<br>"; - echo "alte IP Range: ";print_r($oldrange1[$i]);echo " - ";print_r($oldrange2[$i]);echo "<br>"; - echo "neue IP Range: ";print_r($newrange1[$i]);echo " - ";print_r($newrange2[$i]);echo "<br>"; - - if ($syntax->check_ip_syntax($newrange1[$i]) && $syntax->check_ip_syntax($newrange2[$i])){ - #echo "korrekte IP Syntax<br>"; - $newrange1[$i] = htmlentities($newrange1[$i]); - $newrange2[$i] = htmlentities($newrange2[$i]); - $newrange_array = array($newrange1[$i],$newrange2[$i]); - $newrange = implode('_',$newrange_array); - #print_r($newrange); - - $oldrange1[$i] = htmlentities($oldrange1[$i]); - $oldrange2[$i] = htmlentities($oldrange2[$i]); - $oldip_array = array($oldrange1[$i],$oldrange2[$i]); - $oldrange = implode('_',$oldip_array); - #print_r($oldrange); - - if (expand_ip_delegation($oldrange,$newrange,$childauDN[$i],$auDN[$i])){ - $mesg = "<br>IP Range erweitert<br>"; - }else{ - $mesg = "<br>Fehler beim erweitern der IP Range<br>"; - } - }else{ - echo "falsche IP Syntax<br>"; - } - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='ip_deleg.php' style='publink'>back</a>"; - redirect($seconds, $url, $mesg, $addSessionId = TRUE); - } - else{ - $mesg = "<br>Verschieben (Shiften) der Delegierung nicht moeglich!<br> - Nur Vergroessern und Verkleinern moeglich!<br>"; - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='ip_deleg.php' style='publink'>back</a>"; - redirect($seconds, $url, $mesg, $addSessionId = TRUE); - } - } - else{ - $mesg = "keine Aenderung<br>"; - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='ip_deleg.php' style='publink'>back</a>"; - redirect($seconds, $url, $mesg, $addSessionId = TRUE); - } - - echo "<br><br>"; -} - -echo " -</td></tr></table> -</head> -</html>"; -?> diff --git a/ldap-site-mngmt/webinterface/ip/ip_dhcp.dwt b/ldap-site-mngmt/webinterface/ip/ip_dhcp.dwt deleted file mode 100644 index b2739df1..00000000 --- a/ldap-site-mngmt/webinterface/ip/ip_dhcp.dwt +++ /dev/null @@ -1,39 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Folgende IP Adressen haben Sie in DHCP Ranges vergeben: </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr> - <td width='35%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>DHCP Subnet</b></td> - <td width='65%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Dynamisch zuweisbare IP Adressen (range)</b></td> - </tr> - - <form action='ip_dhcp_change.php' method='post'> - - <!-- BEGIN DYNAMIC BLOCK: Subnets --> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{SUBNET} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='range1[]' value='{RANGE1}' size='15' class='medium_form_field'> - - - <input type='Text' name='range2[]' value='{RANGE2}' size='15' class='medium_form_field'> - - <input type='hidden' name='oldrange1[]' value='{RANGE1}'> - <input type='hidden' name='oldrange2[]' value='{RANGE2}'> - <input type='hidden' name='dhcpdn[]' value='{DHCPDN}'> - <input type='hidden' name='audn[]' value='{AUDN}'> - - </td> - </tr> - <!-- END DYNAMIC BLOCK: Subnets --> - - </table></td> - <tr> - <td><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/ip/ip_dhcp.php b/ldap-site-mngmt/webinterface/ip/ip_dhcp.php deleted file mode 100644 index a1c2eea0..00000000 --- a/ldap-site-mngmt/webinterface/ip/ip_dhcp.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt. -$titel = "IP Address Management"; -# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc. -$mainnr = 1; -$mnr = 2; -# 3. Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "ip_dhcp.dwt"; - -include("../class.FastTemplate.php"); - -include("ip_header.inc.php"); - -############################################################################# - -# Menuleiste erstellen -createMainMenu($rollen, $mainnr); -createIPMenu($rollen, $mnr); - -include("ip_blocks.inc.php"); - - -############################################################################# - -$template->assign(array("SUBNET" => "Noch kein DHCP Objekt angelegt", - "RANGE1" => "", - "RANGE2" => "", - "DHCPDN" => "")); - -$subnet_array = get_subnets($auDN,array("dn","cn","dhcprange")); -# print_r ($subnet_array); - -$template->define_dynamic("Subnets", "Webseite"); - -foreach ($subnet_array as $subnet){ - $exp = explode('_',$subnet['dhcprange']); - - $template->assign(array("SUBNET" => $subnet['cn'], - "RANGE1" => $exp[0], - "RANGE2" => $exp[1], - "DHCPDN" => $subnet['dn'], - "AUDN" => $auDN )); - $template->parse("SUBNETS_LIST", ".Subnets"); -} - - -##################################################################################### - -include("ip_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/ip/ip_dhcp_change.php b/ldap-site-mngmt/webinterface/ip/ip_dhcp_change.php deleted file mode 100644 index 43474eec..00000000 --- a/ldap-site-mngmt/webinterface/ip/ip_dhcp_change.php +++ /dev/null @@ -1,146 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -$auDN = $_POST['audn']; -$dhcpDN = $_POST['dhcpdn']; -$oldrange1 = $_POST['oldrange1']; -$oldrange2 = $_POST['oldrange2']; -$newrange1 = $_POST['range1']; -$newrange2 = $_POST['range2']; - -/* -print_r($oldrange1);echo "<br>"; -print_r($newrange1);echo "<br><br>"; -print_r($oldrange2);echo "<br>"; -print_r($newrange2);echo "<br>"; -*/ - -$syntax = new Syntaxcheck; -$url = "ip_dhcp.php"; - -echo " -<html> -<head> - <title>IP Address Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - - -$diff1 = array_keys(array_diff_assoc($oldrange1,$newrange1)); -$diff2 = array_keys(array_diff_assoc($newrange1,$oldrange1)); -$tochange1 = array_unique(array_merge($diff1,$diff2)); - -$diff3 = array_keys(array_diff_assoc($oldrange2,$newrange2)); -$diff4 = array_keys(array_diff_assoc($newrange2,$oldrange2)); -$tochange2 = array_unique(array_merge($diff3,$diff4)); - -# print_r($tochange1);echo "<br><br>"; -# print_r($tochange2);echo "<br><br>"; - -$tochange = array_unique(array_merge($tochange1,$tochange2)); -# print_r($tochange);echo "<br><br>"; - - -foreach ($tochange as $i){ - - if ( $oldrange1[$i] == "" && $oldrange2[$i] == "" && $newrange1[$i] != "" && $newrange2[$i] != "" ){ - echo "neue IP Range";echo "<br>";echo "<br>"; - print_r($auDN[$i]);echo "<br>"; - print_r($dhcpDN[$i]);echo "<br>"; - echo "<br>"; - echo "alte IP Range: ";print_r($oldrange1[$i]);echo " - ";print_r($oldrange2[$i]);echo "<br>"; - echo "neue IP Range: ";print_r($newrange1[$i]);echo " - ";print_r($newrange2[$i]);echo "<br>"; - - if ($syntax->check_ip_syntax($newrange1[$i]) && $syntax->check_ip_syntax($newrange2[$i])){ - echo "korrekte IP Syntax<br>"; - $newrange1[$i] = htmlentities($newrange1[$i]); - $newrange2[$i] = htmlentities($newrange2[$i]); - $newrange_array = array($newrange1[$i],$newrange2[$i]); - print_r($newrange_array); - $newrange = implode('_',$newrange_array); - print_r($newrange); - # $oldip[$i] = htmlentities($oldip[$i]); - if (new_ip_dhcprange($newrange,$dhcpDN[$i],$auDN[$i])){ - $mesg = "Neue IP Range eingetragen<br>"; - }else{ - $mesg = "Fehler beim eintragen der neuen IP Range<br>"; - } - }else{echo "falsche IP Syntax<br>";} - - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='ip_dhcp.php' style='publink'>back</a>"; - redirect(4, $url, $mesg, $addSessionId = TRUE); - } - - elseif ( $oldrange1[$i] != "" && $oldrange2[$i] != "" && $newrange1[$i] == "" && $newrange2[$i] == "" ){ - echo "loeschen IP Range";echo "<br>";echo "<br>"; - print_r($auDN[$i]);echo "<br>"; - print_r($dhcpDN[$i]);echo "<br>"; - echo "<br>"; - echo "alte IP Range: ";print_r($oldrange1[$i]);echo " - ";print_r($oldrange2[$i]);echo "<br>"; - echo "neue IP Range: ";print_r($newrange1[$i]);echo " - ";print_r($newrange2[$i]);echo "<br>"; - - $newrange1[$i] = htmlentities($newrange1[$i]); - $newrange2[$i] = htmlentities($newrange2[$i]); - if (delete_ip_dhcprange($dhcpDN[$i],$auDN[$i])){ - $mesg = "IP Range geloescht<br>"; - }else{ - $mesg = "Fehler beim loeschen der IP Range<br>"; - } - - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='ip_dhcp.php' style='publink'>back</a>"; - redirect(4, $url, $mesg, $addSessionId = TRUE); - } - - elseif ( $oldrange1[$i] != "" && $oldrange2[$i] != "" && $newrange1[$i] != "" && $newrange2[$i] != "" ){ - echo "aendern IP Range";echo "<br>";echo "<br>"; - print_r($auDN[$i]);echo "<br>"; - print_r($dhcpDN[$i]);echo "<br>"; - echo "<br>"; - echo "alte IP Range: ";print_r($oldrange1[$i]);echo " - ";print_r($oldrange2[$i]);echo "<br>"; - echo "neue IP Range: ";print_r($newrange1[$i]);echo " - ";print_r($newrange2[$i]);echo "<br>"; - - if ($syntax->check_ip_syntax($newrange1[$i]) && $syntax->check_ip_syntax($newrange2[$i])){ - echo "korrekte IP Syntax<br>"; - $newrange1[$i] = htmlentities($newrange1[$i]); - $newrange2[$i] = htmlentities($newrange2[$i]); - $newrange_array = array($newrange1[$i],$newrange2[$i]); - $newrange = implode('_',$newrange_array); - print_r($newrange); - $oldrange1[$i] = htmlentities($oldrange1[$i]); - $oldrange2[$i] = htmlentities($oldrange2[$i]); - $oldrange_array = array($oldrange1[$i],$oldrange2[$i]); - $oldrange = implode('_',$oldrange_array); - if (modify_ip_dhcprange($newrange,$dhcpDN[$i],$auDN[$i])){ - $mesg = "IP Range geaendert<br>"; - }else{ - $mesg = "Fehler beim aendern der IP Range<br>"; - # alte Range wiederherstellen - new_ip_dhcprange($oldrange,$dhcpDN[$i],$auDN[$i]); - } - }else{echo "falsche IP Syntax<br>";} - - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='ip_dhcp.php' style='publink'>back</a>"; - redirect(4, $url, $mesg, $addSessionId = TRUE); - } - - else{ - $mesg = "keine Aenderung<br>"; - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='ip_dhcp.php' style='publink'>back</a>"; - redirect(4, $url, $mesg, $addSessionId = TRUE); - } - -} - -echo " -</td></tr></table> -</head> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/ip/ip_footer.inc.php b/ldap-site-mngmt/webinterface/ip/ip_footer.inc.php deleted file mode 100644 index 7849823e..00000000 --- a/ldap-site-mngmt/webinterface/ip/ip_footer.inc.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -$template->assign(array("PFAD" => $START_PATH)); - -# Daten in die Vorlage parsen -$template->parse("LOGIN", "Login"); -$template->parse("MAINMENU", "Mmenu"); -$template->parse("NAVIGATION", "Menu"); -$template->parse("IPBLOCKS", "IPBlocks"); -$template->parse("HAUPTFENSTER", "Webseite"); -$template->parse("PAGE", "Vorlage"); - -# Fertige Seite an den Browser senden -$template->FastPrint("PAGE"); - -# Abmelden vom LDAP -ldap_unbind($ds); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/ip/ip_header.inc.php b/ldap-site-mngmt/webinterface/ip/ip_header.inc.php deleted file mode 100644 index a07c513e..00000000 --- a/ldap-site-mngmt/webinterface/ip/ip_header.inc.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt. -$titel = "IP Address Management"; -# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc. -$mainnr = 1; - - -$template = new FastTemplate("."); - -# dem erstellten Template-Objekt eine Vorlage zuweisen -$definedTemplates = array("Vorlage" => "ip.dwt", - "Login" => "../logout_form.inc.dwt", - "Mmenu" => "../hauptmenue.dwt", - "Menu" => "menu.dwt", - "IPBlocks" => "ipblocks.dwt", - "Webseite" => $webseite); -if (isset($additionalTemplates)) { - foreach ($additionalTemplates as $templateKey => $templateFile) { - $definedTemplates[$templateKey] = $templateFile; - } -} -$template->define($definedTemplates); - -$template->assign(array("SEITENTITEL" => $titel, "ROLLE" => "mainadmin", "AU" => $au_ou, "DOMAIN" => $assocdom, "USERCN" => $usercn)); - - -include("ip_menu.php"); -include("ip_blocks.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/ip/ip_menu.php b/ldap-site-mngmt/webinterface/ip/ip_menu.php deleted file mode 100644 index 8b1ebd4c..00000000 --- a/ldap-site-mngmt/webinterface/ip/ip_menu.php +++ /dev/null @@ -1,82 +0,0 @@ -<?php - -function createIPMenu($rollen , $mnr) { - global $template; - global $START_PATH; - global $auDN; - - $mipb_array = get_maxipblocks_au($auDN); - #print_r($mipb_array); - if ( $mipb_array[0] == "" ){ - $iprechnerlink = "no_ip.php?mnr=1"; - $ipdhcplink = "no_ip.php?mnr=2"; - $ipdeleglink = "no_ip.php?mnr=3"; - }else{ - $iprechnerlink = "ip_rechner.php"; - $ipdhcplink = "ip_dhcp.php"; - $ipdeleglink = "ip_deleg.php"; - } - # Struktur der Registerkartenleiste - $hauptmenu = array(array("link" => "ip.php", - "text" => "Übersicht", - "zugriff" => "alle"), - array("link" => $iprechnerlink, - "text" => "IP Adressen Rechner", - "zugriff" => array("MainAdmin","DhcpAdmin","HostAdmin")), - #array("link" => $ipdhcplink, - # "text" => "IP Adressen DHCP", - # "zugriff" => array("MainAdmin","HostAdmin","DhcpAdmin")), - array("link" => $ipdeleglink, - "text" => "Delegierte IP Bereiche", - "zugriff" => array("MainAdmin"))); - - # $rollen = array_keys($roles); - - # Zusammenstellen der Menuleiste - $template->define_dynamic("Hauptmenu", "Menu"); - $i=0; - foreach($hauptmenu as $item) { - if($item['zugriff'] === "alle" || vergleicheArrays($rollen , $item['zugriff'])) { - if ($i==0) { - if ($mnr==0) { - $zwisch=""; - $lastaktive=true; - $farb="#505050"; - } - else { - $zwisch=""; - $farb="#A0A0A0"; - $lastaktive=false; - } - } - else { - if ($mnr==$i) { - $zwisch=""; - $lastaktive=true; - $farb="#505050"; - } - else { - $farb="#A0A0A0"; - if ($lastaktive) {$zwisch="";} - else {$zwisch="";} - $lastaktive=false; - } - } - $template->assign(array("ZWISCHEN" => $zwisch, - "FARBE" => $farb, - "LINK_M" => $item["link"], - "TEXT_M" => $item["text"])); - $template->parse("HAUPTMENU_LIST", ".Hauptmenu"); - - } - $i=$i+1; - } - if ($lastaktive) {$template->assign(array("ENDE" => ""));} - else { - $template->assign(array("ENDE" => "")); - } - -} - - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/ip/ip_rechner.dwt b/ldap-site-mngmt/webinterface/ip/ip_rechner.dwt deleted file mode 100644 index b300e88e..00000000 --- a/ldap-site-mngmt/webinterface/ip/ip_rechner.dwt +++ /dev/null @@ -1,40 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Folgende IP Adressen haben Sie an Rechner vergeben: </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Rechner Name</b></td> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>IP Adresse</b></td> - <td width='50%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>DHCP</b></td> - </tr> - - <form action='ip_rechner_change.php' method='post'> - - <!-- BEGIN DYNAMIC BLOCK: Hosts --> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{HOSTNAME} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='newip[]' value='{IP}' size='15' class='medium_form_field'></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> {DHCPCONT} </td> - </tr> - <input type='hidden' name='oldip[]' value='{OLDIP}'> - <input type='hidden' name='hostdn[]' value='{HOSTDN}'> - <input type='hidden' name='fixadd[]' value='{FIXADD}'> - <input type='hidden' name='audn[]' value='{AUDN}'> - - <!-- END DYNAMIC BLOCK: Hosts --> - - </table></td> - </tr> - <tr> - <td> - <input type='Submit' name='apply' value='anwenden' class='small_loginform_button'></form> - </td> - </tr> -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/ip/ip_rechner.php b/ldap-site-mngmt/webinterface/ip/ip_rechner.php deleted file mode 100644 index e49c6a40..00000000 --- a/ldap-site-mngmt/webinterface/ip/ip_rechner.php +++ /dev/null @@ -1,79 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt. -$titel = "IP Address Management"; -# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc. -$mainnr = 1; -$mnr = 1; -# 3. Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "ip_rechner.dwt"; - -include("../class.FastTemplate.php"); - -include("ip_header.inc.php"); - -############################################################################# - -# Menuleiste erstellen -createMainMenu($rollen, $mainnr); -createIPMenu($rollen, $mnr); - -include("ip_blocks.inc.php"); - -############################################################################# - -$template->assign(array("IP" => "", - "OLDIP" => "", - "DHCPCONT" => "", - "FIXADD" => "", - "HOSTNAME" => "Noch keine Rechner angelegt", - "HOSTDN" => "")); - -$host_array = get_hosts($auDN,array("dn","hostname","ipaddress","dhcphlpcont","dhcpoptfixed-address")); -# print_r ($host_array); - -$template->define_dynamic("Hosts", "Webseite"); - -foreach ($host_array as $host){ - $hostip = explode('_',$host['ipaddress']); - - $dhcpcont = ""; - $fixadd = ""; - if ( count($host['dhcphlpcont']) != 0 && $host['ipaddress'] == "" ){ - #$subnetCN = explode('cn=',$host['dhcphlpcont']); - #$dynsubnet = explode(',', $subnetCN[1]); - #$dhcpcont = " DYNAMISCH (DHCP, Subnet $dynsubnet[0])"; - $dhcpcont = " dynamisch"; - $fixadd = $host['dhcpoptfixed-address']; - }elseif( count($host['dhcphlpcont']) != 0 && $host['ipaddress'] != "" ){ - #$subnetCN = explode('cn=',$host['dhcphlpcont']); - #$dynsubnet = explode(',', $subnetCN[1]); - #$dhcpcont = " STATISCH (DHCP, Subnet $dynsubnet[0])"; - if ( $host['dhcpoptfixed-address'] == "ip") { - $dhcpcont = " fix"; - $fixadd = $host['dhcpoptfixed-address']; - } - if ( $host['dhcpoptfixed-address'] == "hostname") { - $dhcpcont = " fix (über DNS Name)"; - $fixadd = $host['dhcpoptfixed-address']; - } - } - - $template->assign(array("IP" => $hostip[0], - "OLDIP" => $hostip[0], - "DHCPCONT" => $dhcpcont, - "FIXADD" => $fixadd, - "HOSTNAME" => $host['hostname'], - "HOSTDN" => $host['dn'], - "AUDN" => $auDN )); - $template->parse("HOSTS_LIST", ".Hosts"); -} - - -##################################################################################### - -include("ip_footer.inc.php"); - -?> diff --git a/ldap-site-mngmt/webinterface/ip/ip_rechner_change.php b/ldap-site-mngmt/webinterface/ip/ip_rechner_change.php deleted file mode 100644 index 4db8bed0..00000000 --- a/ldap-site-mngmt/webinterface/ip/ip_rechner_change.php +++ /dev/null @@ -1,122 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -$hostDN = $_POST['hostdn']; -$oldip = $_POST['oldip']; -$newip = $_POST['newip']; -$fixadd = $_POST['fixadd']; - -$syntax = new Syntaxcheck; -$url = "ip_rechner.php"; - -echo " -<html> -<head> - <title>IP Address Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - - -$diff1 = array_keys(array_diff_assoc($oldip,$newip)); -$diff2 = array_keys(array_diff_assoc($newip,$oldip)); -$tochange = array_unique(array_merge($diff1,$diff2)); - -foreach ($tochange as $i){ - - if ( $oldip[$i] == "" && $newip[$i] != "" ){ - echo "neue IP";echo "<br>";echo "<br>"; - echo "<br>"; - echo "alte IP: ";print_r($oldip[$i]);echo "<br>"; - echo "neue IP: ";print_r($newip[$i]);echo "<br>"; - - if ($syntax->check_ip_syntax($newip[$i])){ - echo "korrekte IP Syntax"; - $newip[$i] = htmlentities($newip[$i]); - $newip_array = array($newip[$i],$newip[$i]); - #print_r($newip_array); - $newipp = implode('_',$newip_array); - #print_r($newipp); - $oldip[$i] = htmlentities($oldip[$i]); - if (new_ip_host($newipp,$hostDN[$i],$auDN)){ - $mesg = "Neue IP Adresse eingetragen<br>"; - # falls Rechner in DHCP -> fixed-address auf IP Setzen... - # und update_dhcpmtime(array()); - }else{$mesg = "Fehler beim eintragen der neuen IP Adresse<br>";} - }else{echo "falsche IP Syntax";} - - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='ip_rechner.php' style='publink'>back</a>"; - redirect(4, $url, $mesg, $addSessionId = TRUE); - } - - elseif ( $oldip[$i] != "" && $newip[$i] != "" ){ - echo "aendern IP";echo "<br>";echo "<br>"; - echo "<br>"; - echo "alte IP: ";print_r($oldip[$i]);echo "<br>"; - echo "neue IP: ";print_r($newip[$i]);echo "<br>"; - - if ($syntax->check_ip_syntax($newip[$i])){ - echo "korrekte IP Syntax"; - $newip[$i] = htmlentities($newip[$i]); - $newip_array = array($newip[$i],$newip[$i]); - #print_r($newip_array); - $newipp = implode('_',$newip_array); - #print_r($newipp); - $oldip[$i] = htmlentities($oldip[$i]); - $oldip_array = array($oldip[$i],$oldip[$i]); - $oldipp = implode('_',$oldip_array); - if (modify_ip_host($newipp,$hostDN[$i],$auDN,$fixadd[$i])){ - $mesg = "IP Adresse geaendert<br>"; - adjust_hostip_tftpserverip($oldip[$i],$newip[$i]); - # Falls Rechner in DHCP - update_dhcpmtime(array()); - }else{ - $mesg = "Fehler beim aendern der IP Adresse<br>"; - # oldip die schon gelöscht wurde wieder einfügen - new_ip_host($oldipp,$hostDN[$i],$auDN);} - }else{echo "falsche IP Syntax";} - - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='ip_rechner.php' style='publink'>back</a>"; - redirect(4, $url, $mesg, $addSessionId = TRUE); - } - - elseif ( $oldip[$i] != "" && $newip[$i] == "" ){ - echo "loeschen IP";echo "<br>";echo "<br>"; - echo "<br>"; - echo "alte IP: ";print_r($oldip[$i]);echo "<br>"; - echo "neue IP: ";print_r($newip[$i]);echo "<br>"; - - echo "korrekte IP Syntax"; - $newip[$i] = htmlentities($newip[$i]); - $oldip[$i] = htmlentities($oldip[$i]); - if (delete_ip_host($hostDN[$i],$auDN)){ - $mesg = "IP Adresse geloescht<br>"; - adjust_hostip_tftpserverip($oldip[$i],""); - # falls Rechner in DHCP -> fixed-address auf dynamic/Hostname setzen - update_dhcpmtime(array()); - }else{$mesg = "Fehler beim loeschen der IP Adresse<br>";} - - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='ip_rechner.php' style='publink'>back</a>"; - redirect(4, $url, $mesg, $addSessionId = TRUE); - } - - else{ - $mesg = "keine Aenderung<br>"; - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='ip_rechner.php' style='publink'>back</a>"; - redirect(3, $url, $mesg, $addSessionId = TRUE); - } - -} - -echo " -</td></tr></table> -</head> -</html>"; -?> diff --git a/ldap-site-mngmt/webinterface/ip/ip_start.dwt b/ldap-site-mngmt/webinterface/ip/ip_start.dwt deleted file mode 100644 index 2b451f4e..00000000 --- a/ldap-site-mngmt/webinterface/ip/ip_start.dwt +++ /dev/null @@ -1,36 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='90%'> - <tr> - <td colspan='2'><h3>Modul - IP Adress Management: </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td> - <p>Dieses Modul dient der Verwaltung von IP Adressen in ihrer Abteilung. - Benutzen Sie die Navigation links, um die einzelnen Bereiche anzusteuern. <br> - Unterhalb des Navigations-Menue haben Sie stets einen Ueberblick ueber die Ihnen - zugewiesenen IP Bereiche sowie ueber die davon noch frei verfuegbaren IP Adressen.</p> - <p> Folgende Bereiche stehen Ihnen zur Verfuegung:</p> - - <ul> - <li><p><b>IP Adressen Rechner</b></p> - Hier koennen Sie die IP Adressen ihrer Rechner verwalten. Sie koennen IP Adressen neu zuweisen, - aendern oder loeschen. - </li> - <!-- <li><p><b>IP Adressen DHCP</b></p> - In diesem Bereich koennen Sie die IP Adressen verwalten, die Sie fuer den DHCP Dienst reservieren. - D.h. die IP Adress Ranges, welche Sie DHCP Subnetzen oder Pools zugewiesen haben zur dynamischen - IP Adresszuweisung. - </li> --> - <li><p><b>Delegierte IP Adressen</b></p> - In diesem Bereich verwalten Sie ihre an untergeordnete Abteilungen delegierten - IP Adressbereiche. Sie koennen neue IP Bereiche delegieren, Delegierungen aendern oder - ganz zureucknehmen (loeschen). - </li> - </ul> - - </td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/ip/ipblocks.dwt b/ldap-site-mngmt/webinterface/ip/ipblocks.dwt deleted file mode 100644 index b77f53b3..00000000 --- a/ldap-site-mngmt/webinterface/ip/ipblocks.dwt +++ /dev/null @@ -1,11 +0,0 @@ -<table cellpadding='5' cellspacing='0' border='1' width='100%' style='border-width: 0 0 0 0;'> - - <tr align='left'>
- <td width='8%'></td>
- <td width='82%' style='border-color: black; border-style: solid; border-width: 1 1 1 1;'>{IPBLOCKS}</td> - <td width='10%'></td> - - </tr> - <tr height='5'></tr>
- -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/ip/menu.dwt b/ldap-site-mngmt/webinterface/ip/menu.dwt deleted file mode 100644 index 34b227c1..00000000 --- a/ldap-site-mngmt/webinterface/ip/menu.dwt +++ /dev/null @@ -1,22 +0,0 @@ - -<table cellpadding='0' cellspacing='0' border='0' width='100%'> - - - <!-- BEGIN DYNAMIC BLOCK: Hauptmenu --> - - <tr valign='middle' align='left'> -
- <td width='8%' align='right' style="border-style=none;"></td> - <td width="8%" align="left" style="border-width:1 0 1 1;border-color:#000000;border-style:solid;padding:5;background-color:{FARBE}"> </td>
- <td width="74%" align="left" style="border-width:1 1 1 0;border-color:#000000;border-style:solid;padding:5;background-color:{FARBE}"> - <a href="{LINK_M}" style="text-decoration:none"><b class="standard_schrift">{TEXT_M}</b></a></td>
- <td width='10%'> </td> - - </tr> - - <tr height='5'> - </tr> - -<!-- END DYNAMIC BLOCK: Hauptmenu --> - -</table> diff --git a/ldap-site-mngmt/webinterface/ip/no_ip.dwt b/ldap-site-mngmt/webinterface/ip/no_ip.dwt deleted file mode 100644 index 5bc09796..00000000 --- a/ldap-site-mngmt/webinterface/ip/no_ip.dwt +++ /dev/null @@ -1,11 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Diese Funktion steht Ihnen nicht zur Verfügung. </h3> - Sie verfügen über keine IP Adressen, die Sie an Rechner, DHCP Subnetze vergeben, - bzw. an untergeordnete AUs delegieren können.</td> - </tr> - <tr> - <td height='10'></td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/ip/no_ip.php b/ldap-site-mngmt/webinterface/ip/no_ip.php deleted file mode 100644 index 51a4b030..00000000 --- a/ldap-site-mngmt/webinterface/ip/no_ip.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "no_ip.dwt"; - -include("ip_header.inc.php"); - -############################################################################### - -$mnr = 1; - -$mnr = $_GET['mnr']; - -# Menuleiste erstellen -createMainMenu($rollen, $mainnr); -createIPMenu($rollen, $mnr); - -############################################################################### - -############################################################################### - -include("ip_footer.inc.php"); - -?> diff --git a/ldap-site-mngmt/webinterface/lib/au_management_functions.php b/ldap-site-mngmt/webinterface/lib/au_management_functions.php deleted file mode 100644 index d924aec0..00000000 --- a/ldap-site-mngmt/webinterface/lib/au_management_functions.php +++ /dev/null @@ -1,1333 +0,0 @@ -<?php - -/** -* au_management_functions.php - Administrative Unit Management Funktions-Bibliothek -* Diese Bibliothek enthält alle Funktionen für die Verwaltung von AUs, deren DNS Domains, sowie -* zum Rollen-Management -* -* @param string ldapError -* @param resource ds -* -* @author Tarik Gasmi -* @copyright Tarik Gasmi -*/ - -# Konfiguration laden -require_once("config.inc.php"); - -$ldapError = null; - -######################################################################################################## - - - -############################################################################### -# Funktionen zur Verwaltung der AU (und Child-AUs) -# - - -# Ändern des DN der AU, d.h. beim Ändern des Attributes 'ou' -function modify_au_dn($auDN, $newauDN){ - - global $ds, $suffix, $ldapError; - - if (move_subtree($auDN,$newauDN)){ - adjust_dn_entries($auDN,$newauDN);} -} - - - -# Anlegen neue untergeordnete AU -function new_childau($childDN,$childou,$childcn,$childdesc,$mainadmin){ - - global $ds, $suffix, $auDN, $ldapError; - - $entryAU ["objectclass"][0] = "administrativeunit"; - $entryAU ["objectclass"][1] = "organizationalunit"; - $entryAU ["objectclass"][2] = "top"; - $entryAU ["ou"] = $childou; - $entryAU ["dhcpmtime"] = 0; - if ($childcn != ""){$entryAU ["cn"] = $childcn;} - if ($childdesc != ""){$entryAU ["description"] = $childdesc;} - - if ($resultAU = ldap_add($ds,$childDN,$entryAU)){ - - # alle Au Container anlegen - $containers = array("computers","dhcp","groups","pxe","rbs","roles"); - foreach ($containers as $cont){ - $entryCont = array(); - $entryCont ['objectclass'] = "AUContainer"; - $entryCont ['cn'] = $cont; - #print_r($entryRolesCont); echo "<br><br>"; - $resultC = ldap_add($ds,"cn=".$cont.",".$childDN,$entryCont); - if (!($resultC)) break; - } - - # MainAdmin anlegen - $entryMA ['objectclass'] = "groupOfNames"; - $entryMA ['cn'] = "MainAdmin"; - $entryMA ['member'] = $mainadmin; - if ($resultMA = ldap_add($ds,"cn=MainAdmin,cn=roles,".$childDN,$entryMA)){ - #$admins = array("HostAdmin","DhcpAdmin","ZoneAdmin"); - #foreach ($admins as $admin){ - # $entryAdmin ['objectclass'] = "Admins"; - # $entryAdmin ['cn'] = $admin; - # ldap_add($ds,"cn=".$admin.",cn=roles,".$childDN,$entryAdmin); - #} - return 1; - } - else{ - return 0; - } - } - else{ - return 0; - } -} - - - -# Löschen untergeordnete AU (d.h. deren untergeordnete AUs werden als neue uAUs integriert) -function delete_childau($childDN,$childou,$delmodus){ - - global $ds, $suffix, $auDN, $domDN, $assocdom, $ldapError; - - if ( $delmodus == "integrate"){ - - # Associated DNS Domain integrieren - $childdc = get_domain_data($childDN,array("dn","associatedname")); - print_r($childdc); echo "<br>"; - # wenn einzige AU dann einfach in Parentdomain aufnehmen und betroffene Einträge löschen - if (count($childdc[0]['associatedname']) == 1 ){ - echo "einzige AU<br>"; - # dc Childs verschieben - $dcchilds = get_dc_childs($childdc[0]['dn'],array("dn","dc")); - # print_r($dcchilds); echo "<br>"; - if (count($dcchilds) != 0){ - foreach ($dcchilds as $dcc){ - # print_r($dcc['dn']); echo " >> "; print_r("dc=".$dcc['dc'].",".$domDN); echo "<br>"; - if(move_subtree($dcc['dn'],"dc=".$dcc['dc'].",".$domDN)){ - $newdom = $dcc['dc'].".".$assocdom; - #print_r($newdom); echo "<br><br>"; - dive_into_dctree_adapt("dc=".$dcc['dc'].",".$domDN,$newdom); - } - } - } - - # alten dc-Knoten löschen - dive_into_tree_del($childdc[0]['dn'],""); - - } - # wenn noch andere AUs in der Domain, dann nur betroffene Einträge entfernen - if (count($childdc[0]['associatedname']) > 1 ){ - echo "mehrere AUs<br>"; - # ChildAU-Rollen unterhalb dc-Knoten löschen (nur diese)(oder übernehmen: MA zu HA, HA zu HA) - $roles = get_roles($childDN); - #print_r($roles); echo "<br>"; - - # was ist wenn rollen nur noch ein member haben ... fehler - if(count($roles['MainAdmin']) != 0){ - $mainadmins = $roles['MainAdmin']; - for ($i=0; $i<count($mainadmins); $i++){ - $entryRoleMain ['member'][$i] = $mainadmins[$i]; - } - #print_r($entryRoleHost); echo "<br>"; - $resultMA = ldap_mod_del($ds,"cn=MainAdmin,cn=roles,".$childdc[0]['dn'],$entryRoleMain); - } - if(count($roles['HostAdmin']) != 0){ - $hostadmins = $roles['HostAdmin']; - for ($i=0; $i<count($hostadmins); $i++){ - $entryRoleHost ['member'][$i] = $hostadmins[$i]; - } - #print_r($entryRoleHost); echo "<br>"; - $resultHA = ldap_mod_del($ds,"cn=HostAdmin,cn=roles,".$childdc[0]['dn'],$entryRoleHost); - } - if(count($roles['ZoneAdmin']) != 0){ - $zoneadmins = $roles['ZoneAdmin']; - for ($i=0; $i<count($zoneadmins); $i++){ - $entryRoleZone ['member'][$i] = $zoneadmins[$i]; - } - $resultZA = ldap_mod_del($ds,"cn=ZoneAdmin,cn=roles,".$childdc[0]['dn'],$entryRoleZone); - } - - $entrydel ['associatedname'] = $childDN; - # print_r($entrydel); echo "<br>"; - ldap_mod_del($ds, $childdc[0]['dn'], $entrydel); - $zentries = get_zone_entries_assocname($childdc[0]['dn'],array("dn"),$childDN); - # print_r($zentries); echo "<br>"; - foreach ($zentries as $ze){ - # print_r($ze['dn']); echo "<br>"; - ldap_delete($ds, $ze['dn']); - } - } - - # Rechner (mit IP) + dranhängende MCs, PXEs verschieben - $hosts = get_hosts($childDN,array("dn","hostname")); - if (count($hosts) != 0){ - foreach ($hosts as $host){ - # print_r($host['dn']); echo "<br>"; - # print_r($host['hostname']); echo "<br>"; - # print_r("hostname=".$host['hostname']."-int-".$childou.",cn=computers,".$auDN); echo "<br><br>"; - if (move_subtree($host['dn'], "hostname=".$host['hostname']."-ex-".$childou.",cn=computers,".$auDN)){ - $newhostDN = "hostname=".$host['hostname']."-ex-".$childou.",cn=computers,".$auDN; - $dhcp = get_node_data($newhostDN, array("dhcphlpcont")); - # print_r($dhcp); echo "<br>"; - if ($dhcp['dhcphlpcont'] != ""){ - $entrydel ['dhcphlpcont'] = array(); - $entrydel ['objectclass'] = "dhcpHost"; - # print_r($dhcphlpcont); - ldap_mod_del($ds, $newhostDN, $entrydel); - } - } - } - } - # DHCP Objekte IP Ranges löschen - $subnets = get_subnets($childDN,array("dn")); - # print_r($subnets); echo "<br>"; - if (count($subnets) != 0){ - foreach ($subnets as $subnet){ - # print_r($subnet['dn']); echo "<br>"; - delete_ip_dhcprange($subnet['dn'],$childDN); - } - } # DHCP Pools auch noch - - # Freie IP Bereiche zurücknehmen - $fipb_array = get_freeipblocks_au($childDN); - # print_r($fipb_array); echo "<br>"; - # print_r(count($fipb_array)); echo "<br>"; - if (count($fipb_array) == 1 && $fipb_array[0] != ""){ - $entry_ipblock ['freeipblock'] = $fipb_array[0]; - # print_r($entry_ipblock); echo "<br>"; - ldap_mod_add($ds,$auDN,$entry_ipblock); - } - if (count($fipb_array) > 1 ){ - foreach ($fipb_array as $fipb){ - $entry_ipblock ['FreeIPBlock'][] = $fipb; - # print_r($entry_ipblock); echo "<br>"; - ldap_mod_add($ds,$auDN,$entry_ipblock); - } - } - merge_ipranges($auDN); - - - # Verschieben der Childs an neue Stelle - $child_childs = get_childau($childDN,array("dn","ou")); - # print_r($child_childs); echo "<br>"; - if (count($child_childs) != 0){ - foreach ($child_childs as $cc){ - $child_childDN = $cc['dn']; - $newccDN = "ou=".$cc['ou'].",".$auDN; - # print_r($child_childDN); echo " >> "; - # print_r($newccDN); echo "<br>"; - if (move_subtree($child_childDN,$newccDN)){ - adjust_dn_entries($child_childDN,$newccDN); - } - } - } - - # Löschen des AU Knotens - dive_into_tree_del($childDN,""); - - $mesg = "<br>Erfolgreich gelöscht mit Integration<br>"; - return $mesg; - } - - if ( $delmodus == "complete" ){ - # IP Bereiche zurück - # DNS Teilbaum Objekte löschen - # alles rekursive löschen - - /*if (dive_into_tree_del($dcDN,"")){ - $delentry ['objectclass'] = "domainrelatedobject"; - $delentry ['associateddomain'] = $domsuffix; - #print_r($delentry); echo "<br>"; - $delresult = ldap_mod_del($ds,$childDN,$delentry); - if ($delresult){ - $mesg = "Domain komplett gelöscht<br>"; - }else{$mesg = "Fehler! ldap_mod_del<br>";} - }else{$mesg = "Fehler! dive_into_tree_del<br>";} - */ - $mesg = "Komplettes löschen mometan noch nicht unterstützt.<br> - Nur eine Ebene mit Integration ...<br>"; - return $mesg; - } -} - - - - -############################################################################### -# Funktionen zur Verwaltung von Domains -# - - -# Anlegen Domain beim Anlegen einer Child-AU -function new_child_domain($childdomain, $childDN, $assocdom, $domDN){ - - global $ds, $suffix, $domprefix, $domsuffix, $ldapError; - $domsuffix_actual = $domsuffix; - - # ChildAU in gleicher Domain wie AU - if ( $childdomain == "" || $childdomain == $domprefix ){ - - $entryDC ["associatedname"] = $childDN; - $resultDC = ldap_mod_add($ds,$domDN,$entryDC); - if ($resultDC){ - # HostAdmins übernehmen, welche Admins noch? MainAdmin? - $roles = get_roles($childDN); - if(count($roles['MainAdmin']) != 0){ - $mainadmins = $roles['MainAdmin']; - for ($i=0; $i<count($mainadmins); $i++){ - $entryRoleMain ['member'][$i] = $mainadmins[$i]; - } - #print_r($entryRoleHost); echo "<br>"; - $resultMA = ldap_mod_add($ds,"cn=MainAdmin,cn=roles,".$domDN,$entryRoleMain); - } - #if(count($roles['HostAdmin']) != 0){ - # $dnsroles = get_roles($domDN); - # ... - # $hostadmins = $roles['HostAdmin']; - # for ($i=0; $i<count($hostadmins); $i++){ - # $entryRoleHost ['member'][$i] = $hostadmins[$i]; - # } - # #print_r($entryRoleHost); echo "<br>"; - # $resultHA = ldap_mod_add($ds,"cn=HostAdmin,cn=roles,".$domDN,$entryRoleHost); - #} - # Domainname zu associatedDomain der ChildAU - $entryAD['objectclass'] = "domainRelatedObject"; - $entryAD['associateddomain'] = $assocdom; - $resultAD = ldap_mod_add($ds,$childDN,$entryAD); - if($resultAD){return 1;}else{return 0;} - } - else{return 0;} - } - - # ChildAU in eigner Domain (inklusive Subdomain von AU Domain) - if ( $childdomain != "" && $childdomain != $domprefix ){ - - # entsprechenden DC Knoten anlegen, sowie Roles (MainAdmin, HostAdmin) - $dc_array = explode('.',$childdomain); - $dc_array = array_reverse($dc_array); - $dcDN = "ou=DNS,".$suffix; - # $childdomainfull = $childdomain.".".$domsuffix; - #print_r($dc_array); - foreach ($dc_array as $dc){ - $resultsum = false; - if (check_for_dc($dcDN,$dc)){ - echo "dc <b>".$dc."</b> schon vorhanden ... nächster dc<br>"; - $domsuffix_actual = $dc.".".$domsuffix_actual; - $dcDN = "dc=".$dc.",".$dcDN; - } - else{ - $dcDN = "dc=".$dc.",".$dcDN; - - $entryDC ["objectclass"][0] = "dnsdomain"; - $entryDC ["objectclass"][1] = "domainrelatedobject"; - $entryDC ["objectclass"][2] = "top"; - $entryDC ["dc"] = $dc; - $entryDC ["associatedname"] = $childDN; - $entryDC ["associateddomain"] = $dc.".".$domsuffix_actual; - #print_r($entryDC); echo "<br>"; - #print_r($dcDN); echo "<br><br>"; - $resultDC = ldap_add($ds,$dcDN,$entryDC); - if ($resultDC){ - $domsuffix_actual = $dc.".".$domsuffix_actual; - - #print_r($dcDN); echo"<br><br>"; - - $entryRolesCont ['objectclass'] = "AUContainer"; - $entryRolesCont ['cn'] = "roles"; - #print_r($entryRolesCont); echo "<br><br>"; - $resultRC = ldap_add($ds,"cn=roles,".$dcDN,$entryRolesCont); - if ($resultRC){ - # Rollen eintragen - $roles = get_roles($childDN); - #print_r($roles); echo "<br><br>"; - $mainadmins = $roles['MainAdmin']; - $entryRoleMain ['objectclass'] = "groupOfNames"; - $entryRoleMain ['cn'] = "MainAdmin"; - for ($i=0; $i<count($mainadmins); $i++){ - $entryRoleMain ['member'][$i] = $mainadmins[$i]; - } - #print_r($entryRoleMain); echo "<br>"; - $resultMA = ldap_add($ds,"cn=MainAdmin,cn=roles,".$dcDN,$entryRoleMain); - - if(count($roles['HostAdmin']) != 0){ - $entryRoleHost ['objectclass'] = "groupOfNames"; - $entryRoleHost ['cn'] = "HostAdmin"; - $hostadmins = $roles['HostAdmin']; - for ($i=0; $i<count($hostadmins); $i++){ - $entryRoleHost ['member'][$i] = $hostadmins[$i]; - } - #print_r($entryRoleHost); echo "<br>"; - $resultHA = ldap_add($ds,"cn=HostAdmin,cn=roles,".$dcDN,$entryRoleHost); - } - - #$entryRoleZone ['objectclass'] = "Admins"; - #$entryRoleZone ['cn'] = "ZoneAdmin"; - #$resultZA = ldap_add($ds,"cn=ZoneAdmin,cn=roles,".$dcDN,$entryRoleZone); - - if ($resultMA){$resultsum = true;} - } - } - break; # damit dc-Zuwachs immer nur um eine neue Ebene moeglich - } - } - # Domainname zu associatedDomain der ChildAU - if ($resultsum == true){ - $entryAD['objectclass'] = "domainRelatedObject"; - $entryAD['associateddomain'] = $domsuffix_actual; - $resultAD = ldap_mod_add($ds,$childDN,$entryAD); - } - # fixme: fehlt noch anlegen der INCLUDE-Direktive in der parentdomain - if($resultAD){return 1;} - else{return 0;} - } -} - - -# Domain einer Child-AU ändern -function change_child_domain($childdomain, $oldchilddomain, $childDN, $assocdom, $domDN, $domprefix){ - - global $ds, $suffix, $domsuffix, $ldapError; - #print_r($oldchilddomain); echo "<br>"; - #print_r($domprefix); echo "<br>"; - # dcDNnew - $dcDN = "ou=DNS,".$suffix; - $dc_array = explode('.',$childdomain); - $dc_array = array_reverse($dc_array); - $dcDNnew = ""; - foreach ($dc_array as $dc){ - if (check_for_dc($dcDN,$dc)){ - $dcDN = "dc=".$dc.",".$dcDN; - } - else{ - $dcDN = "dc=".$dc.",".$dcDN; - $dcDNnew .= $dcDN; - break; - } - } - # dcDNold - $dcDNold = "ou=DNS,".$suffix; - $dcold_array = explode('.',$oldchilddomain); - $dcold_array = array_reverse($dcold_array); - foreach ($dcold_array as $dc){ - $dcDNold = "dc=".$dc.",".$dcDNold; - } - - #print_r($dcDNnew); echo "<br>"; - #print_r($dcDNold); echo "<br>"; - # Aus eigener AU Domain heraus in neue nicht AU Domain, d.h. dcDNold = domDN - # Subdomain oder neue Domain anlegen - if ($oldchilddomain == $domprefix){ - - # associatedDomain aus ChildAU entfernen - $entryAD['objectclass'] = "domainRelatedObject"; - $entryAD['associateddomain'] = $assocdom; - #print_r($entryAD); echo "<br>"; - if ($resultAD = ldap_mod_del($ds,$childDN,$entryAD)){ - - # neuen dc Knoten anlegen mit Rollen ... - if(new_child_domain($childdomain, $childDN, $assocdom, $domDN)){ - - # associatedName ChildDN aus altem dc-Knoten entfernen - $entryAN ['associatedname'] = $childDN; - #print_r($entryAN); echo "<br>"; - $result = ldap_mod_del($ds,$domDN,$entryAN); - - # Eigene Rollen aus dc-Knoten entfernen - $roles = get_roles($childDN); - if(count($roles['MainAdmin']) != 0){ - $mainadmins = $roles['MainAdmin']; - if (count($mainadmins) > 1){ - for ($i=0; $i<count($mainadmins); $i++){ - $entryRoleMain ['member'][$i] = $mainadmins[$i]; - } - }else{ - $entryRoleMain ['member'] = $mainadmins[0]; - } - #print_r($entryRoleMain); echo "<br>"; - $resultMA = ldap_mod_del($ds,"cn=MainAdmin,cn=roles,".$dcDNold,$entryRoleMain); - } - if(count($roles['HostAdmin']) != 0){ - $hostadmins = $roles['HostAdmin']; - if (count($hostadmins) > 1){ - for ($i=0; $i<count($hostadmins); $i++){ - $entryRoleHost ['member'][$i] = $hostadmins[$i]; - } - }else{ - $entryRoleHost ['member'] = $hostadmins[0]; - } - #print_r($entryRoleHost); echo "<br>"; - $resultHA = ldap_mod_del($ds,"cn=HostAdmin,cn=roles,".$dcDNold,$entryRoleHost); - } - if(count($roles['ZoneAdmin']) != 0){ - $zoneadmins = $roles['ZoneAdmin']; - if (count($zoneadmins) > 1){ - for ($i=0; $i<count($zoneadmins); $i++){ - $entryRoleZone ['member'][$i] = $zoneadmins[$i]; - } - }else{ - $entryRoleZone ['member'] = $zoneadmins[0]; - } - #print_r($entryRoleZone); echo "<br>"; - $resultZA = ldap_mod_del($ds,"cn=ZoneAdmin,cn=roles,".$dcDNold,$entryRoleZone); - } - - - # DNS Einträge mit associatedName ChildDN verschieben - $zone_entries = get_zone_entries_assocname($domDN,array("dn","relativedomainname"),$childDN); - #echo "<br>"; print_r($zone_entries); echo "<br>"; - if (count($zone_entries) >= 1){ - foreach ($zone_entries as $ze){ - #print_r($ze['relativedomainname']); echo "<br>"; - #print_r($dcDNnew); echo "<br>"; - move_subtree($ze['dn'], "relativedomainname=".$ze['relativedomainname'].",".$dcDNnew); - $domsuffix = "uni-freiburg.de"; # neu setzen da es beim new_child_domain schon mal hochgezählt wurde - $newassocdom = $childdomain.".".$domsuffix; - $entryZE ['zonename'] = $newassocdom; - #print_r($entryZE); echo "<br>"; - $resultZE = ldap_mod_replace($ds,"relativedomainname=".$ze['relativedomainname'].",".$dcDNnew,$entryZE); - } - } - # fixme: fehlt noch anpassen der INCLUDE-Direktive in der parentdomain - return 1; - } - else{ - return 0; - } - } - else{ - return 0; - } - } - # Aus nicht AU Domain (aber eventuell Subdomain) in nicht AU Domain - # Verschieben des dc-Teilbaumes - if ($oldchilddomain != $domprefix){ - # Verschiebe dc-Baum von dcDNold nach dcDNnew - # dcDNnew - $dcDN = "ou=DNS,".$suffix; - $dc_array = explode('.',$childdomain); - $dc_array = array_reverse($dc_array); - $dcDNnew = ""; - foreach ($dc_array as $dc){ - if (check_for_dc($dcDN,$dc)){ - $dcDN = "dc=".$dc.",".$dcDN; - } - else{ - $dcDN = "dc=".$dc.",".$dcDN; - $dcDNnew .= $dcDN; - break; - } - } - - # dcDNold - $dcDNold = "ou=DNS,".$suffix; - $dcold_array = explode('.',$oldchilddomain); - $dcold_array = array_reverse($dcold_array); - foreach ($dcold_array as $dc){ - $dcDNold = "dc=".$dc.",".$dcDNold; - } - - # dc Baum verschieben - if ($dcDNnew != ""){ - if (move_subtree($dcDNold, $dcDNnew)){ - # rekursives anpassen im neue dc-Baum: - # associatedDomain, zoneName, includeFilename, includeOrigin - $newassocdom = $childdomain.".".$domsuffix; - if(dive_into_dctree_adapt($dcDNnew,$newassocdom)){ - return 1; - # fixme: fehlt noch anpassen der INCLUDE-Direktive in der parentdomain - } - else{ - return 0; - } - } - else{ - return 0; - } - }else{ - echo "Domain existiert schon, bitte anderen Domainnamen wählen!"; - return 0; - } - } -} - -function dive_into_dctree_adapt($dcDNnew,$newassocdom){ - - global $ds, $suffix, $domprefix, $domsuffix, $ldapError; - print_r($dcDNnew); echo "<br>"; - print_r($newassocdom); echo "<br><br>"; - - # associatedDomain in dc-Knoten und in allen (mehrere) associatedName-ou-Knoten - $entryAD['associateddomain'] = $newassocdom; - print_r($entryAD); echo "<br>"; - $resultAD = ldap_mod_replace($ds,$dcDNnew,$entryAD); - #$top_dcDN = str_replace("ou=DNS,","",$dcDNnew); - #print_r($top_dcDN); echo "<br>"; - $assocnames = get_dc_data($dcDNnew,array("associatedname")); # funkt nicht bei uni-freiburg.de - echo "<br>"; print_r($assocnames); echo "<br>"; - if (count($assocnames['associatedname']) > 1){ - foreach ($assocnames['associatedname'] as $aname){ - print_r($aname); echo "<br>"; - $resultAU = ldap_mod_replace($ds,$aname,$entryAD); - } - }else{ - $aname = $assocnames['associatedname']; - print_r($aname); echo "<br>"; - $resultAU = ldap_mod_replace($ds,$aname,$entryAD); - } - - # ZoneName in allen Knoten eine Ebene tiefer - $zone_entries = get_zone_entries($dcDNnew,array("dn","zonename")); - echo "<br>"; print_r($zone_entries); echo "<br>"; - foreach ($zone_entries as $ze){ - $entryZE ['zonename'] = $newassocdom; - print_r($entryZE); echo "<br>"; - $resultZE = ldap_mod_replace($ds,$ze['dn'],$entryZE); - } - - # Zonenamen in Reversezones ... Fehlt noch - - # Rekursion - # child dc für Rekursion - $dcchilds = get_dc_childs($dcDNnew,array("dn","dc")); - echo "<br>"; print_r($dcchilds); echo "<br>"; - foreach ($dcchilds as $dcc){ - $newassocdom = $dcc['dc'].".".$newassocdom; - print_r($dcc['dn']); echo " >> "; print_r($newassocdom); echo "<br>"; - dive_into_dctree_adapt($dcc['dn'],$newassocdom); - } - -} - - -function delete_child_domain($oldchilddomain,$assocdom,$childDN, $domDN, $delmodus){ - - global $ds, $suffix, $domprefix, $domsuffix, $ldapError; - #print_r($domDN); echo "<br>"; - - # dcDNold - $dcDNold = "ou=DNS,".$suffix; - $dcold_array = explode('.',$oldchilddomain); - $dcold_array = array_reverse($dcold_array); - foreach ($dcold_array as $dc){ - $dcDNold = "dc=".$dc.",".$dcDNold; - } - #print_r($dcDNold); echo "<br>"; - # dcDNnew = domDN - - if ( $delmodus == "integrate" ){ - - # associatedNames zu neuem dc-Knoten hinzufügen - $assocnames = get_dc_data($dcDNold,array("associatedname")); # funkt nicht bei uni-freiburg.de - # echo "<br>"; print_r($assocnames); echo "<br>"; - if (count($assocnames['associatedname']) > 1){ - foreach ($assocnames['associatedname'] as $aname){ - #print_r($aname); echo "<br>"; - $entryAN['associatedname'][] = $aname; - } - }else{ - $entryAN['associatedname'] = $assocnames['associatedname']; - $assocname = $assocnames['associatedname']; - $assocnames ['associatedname'] = array($assocname); - } - #print_r($entryAN); echo "<br>"; - $resultAN = ldap_mod_add($ds,$domDN,$entryAN); - if($resultAN){ - - # DNS Einträge verschieben und an neue Domain anpassen - $zone_entries = get_zone_entries($dcDNold,array("dn","relativedomainname")); - #echo "<br>"; print_r($zone_entries); echo "<br>"; - if (count($zone_entries) >= 1){ - foreach ($zone_entries as $ze){ - #print_r($ze['relativedomainname']); echo "<br>"; - #print_r($domDN); echo "<br>"; - move_subtree($ze['dn'], "relativedomainname=".$ze['relativedomainname'].",".$domDN); - $entryZE ['zonename'] = $assocdom; - print_r($entryZE); echo "<br>"; - $resultZE = ldap_mod_replace($ds,"relativedomainname=".$ze['relativedomainname'].",".$domDN,$entryZE); - } - } - - # Rollenmembers kopieren für jeden associatedName (ohne Duplikate zu generieren) - $newdom_roles = get_roles_dns($domDN); - #print_r($newdom_roles); echo "<br>"; - if (count($newdom_roles['MainAdmin']) != 0){$newmainadmins = $newdom_roles['MainAdmin'];}else{$newmainadmins = array();} - if (count($newdom_roles['HostAdmin']) != 0){$newhostadmins = $newdom_roles['HostAdmin'];}else{$newhostadmins = array();} - if (count($newdom_roles['ZoneAdmin']) != 0){$newzoneadmins = $newdom_roles['ZoneAdmin'];}else{$newzoneadmins = array();} - #print_r($newmainadmins); echo "<br>"; - #print_r($newhostadmins); echo "<br>"; - #print_r($newzoneadmins); echo "<br><br>"; - foreach ($assocnames['associatedname'] as $aname){ - #echo "_________________________________________<br>"; - #print_r($aname); echo "<br>"; - $roles = get_roles($aname); - #print_r($roles); echo "<br>"; - $mainadmins = $roles['MainAdmin']; - #print_r($mainadmins); echo "<br>"; - #print_r($newmainadmins); echo "<br>"; - $mainadmins = array_diff($mainadmins, $newmainadmins); - $mainadmins = array_merge($newmainadmins,$mainadmins); - #print_r($mainadmins); echo "<br>"; - if (count($mainadmins) > 1){ - for ($i=0; $i<count($mainadmins); $i++){ - $entryRoleMain ['member'][$i] = $mainadmins[$i]; - } - }else{ - $entryRoleMain ['member'] = $mainadmins[0]; - } - #print_r($entryRoleMain); echo "<br><br>"; - $resultMA = ldap_mod_replace($ds,"cn=MainAdmin,cn=roles,".$domDN,$entryRoleMain); - - if(count($roles['HostAdmin']) != 0){ - $hostadmins = $roles['HostAdmin']; - #print_r($hostadmins); echo "<br>"; - #print_r($newhostadmins); echo "<br>"; - $hostadmins = array_diff($hostadmins, $newhostadmins); - $hostadmins = array_merge($newhostadmins,$hostadmins); - #print_r($hostadmins); echo "<br>"; - if (count($hostadmins) > 1){ - for ($i=0; $i<count($hostadmins); $i++){ - $entryRoleHost ['member'][$i] = $hostadmins[$i]; - } - }else{ - $entryRoleHost ['member'] = $hostadmins[0]; - } - - #print_r($entryRoleHost); echo "<br><br>"; - $resultHA = ldap_mod_replace($ds,"cn=HostAdmin,cn=roles,".$domDN,$entryRoleHost); - - } - if(count($roles['ZoneAdmin']) != 0){ - $zoneadmins = $roles['ZoneAdmin']; - #print_r($zoneadmins); echo "<br>"; - #print_r($newzoneadmins); echo "<br>"; - $zoneadmins = array_diff($zoneadmins, $newzoneadmins); - $zoneadmins = array_merge($newzoneadmins,$zoneadmins); - #print_r($zoneadmins); echo "<br>"; - if (count($zoneadmins) > 1){ - for ($i=0; $i<count($zoneadmins); $i++){ - $entryRoleZone ['member'][$i] = $zoneadmins[$i]; - } - }else{ - $entryRoleZone ['member'] = $zoneadmins[0]; - } - #print_r($entryRoleZone); echo "<br><br>"; - $resultZA = ldap_mod_replace($ds,"cn=ZoneAdmin,cn=roles,".$domDN,$entryRoleZone); - - } - - # associatedDomain anpassen in allen AUs von $assocnames (alt) - $entryAD ['associateddomain'] = $assocdom; - #print_r($entryAD); echo "<br>"; - $resultAD = ldap_mod_replace($ds,$aname,$entryAD); - - #echo "_________________________________________<br>"; - } - - # Falls alter dc-Knoten noch Subdomains, d.h. dc-Teilbäume hat, diese verschieben mit - # rekursivem Anpassen aller Einträge - $dcchilds = get_dc_childs($dcDNold,array("dn","dc")); - #echo "<br><br>"; print_r($dcchilds); echo "<br>"; - if (count($dcchilds) != 0){ - foreach ($dcchilds as $dcc){ - print_r($dcc['dn']); echo " >> "; print_r("dc=".$dcc['dc'].",".$domDN); echo "<br>"; - if(move_subtree($dcc['dn'],"dc=".$dcc['dc'].",".$domDN)){ - $newdom = $dcc['dc'].".".$assocdom; - #print_r($newdom); echo "<br><br>"; - dive_into_dctree_adapt("dc=".$dcc['dc'].",".$domDN,$newdom); - } - } - } - - # alten dc-Knoten entfernen - dive_into_tree_del($dcDNold,""); - - # fixme: fehlt noch löschen der INCLUDE-Direktive in der parentdomain - - } - else{ - return 0; - } - } - - - if ( $delmodus == "complete" ){ - # if (dive_into_tree_del($dcDNold,"")){ - $delentry ['objectclass'] = "domainrelatedobject"; - $delentry ['associateddomain'] = $oldchilddomain.".".$domsuffix; - print_r($delentry); echo "<br>"; - # $delresult = ldap_mod_del($ds,$childDN,$delentry); - # if ($delresult){ - # $mesg = "Domain komplett gelöscht<br>"; - # }else{$mesg = "Fehler! ldap_mod_del<br>";} - # }else{$mesg = "Fehler! dive_into_tree_del<br>";} - } - - # return $mesg; -} - - -/* -function modify_childau_domain($childdomain, $oldchilddomain, $childDN){ - - global $ds, $suffix, $domsuffix, $ldapError; - $dcDN = "ou=DNS,".$suffix; - $dcoldDN = "ou=DNS,".$suffix; - - $dc_array = explode('.',$childdomain); - $dc_array = array_reverse($dc_array); - $dcold_array = explode('.',$oldchilddomain); - $dcold_array = array_reverse($dcold_array); - - foreach ($dcold_array as $dc){ - $dcoldDN = "dc=".$dc.",".$dcoldDN; - $aname = get_dc_data($dcoldDN,array("associatedname")); - if ($aname == $childDN){ - break; - } - } - #print_r($dcoldDN); echo "<br>"; - #print_r($domsuffix); echo "<br>"; - - $dcnewDN = ""; - foreach ($dc_array as $dc){ - if (check_for_dc($dc)){ - # echo "dc <b>".$dc."</b> schon vorhanden ... nächster dc<br>"; - $domsuffix = $dc.".".$domsuffix; - $dcDN = "dc=".$dc.",".$dcDN; - } - else{ - $dcDN = "dc=".$dc.",".$dcDN; - $domsuffix = $dc.".".$domsuffix; - $dcnewDN .= $dcDN; - break; - } - } - #print_r($dcnewDN); echo "<br>"; - #print_r($domsuffix); echo "<br>"; - - if ($dcnewDN != ""){ - if (move_subtree($dcoldDN,$dcnewDN)){ - $entryAD['associateddomain'] = $childdomain.".".$domsuffix; - $resultAD = ldap_mod_replace($ds,$childDN,$entryAD); - $resultAD2 = ldap_mod_replace($ds,$dcnewDN,$entryAD); - if ($resultAD && $resultAD2){return 1;}else{return 0;} - } - }else{ - echo "Domain existiert schon, bitte anderen Domainnamen wählen!"; - } - -} - - -function same_domain($assocdom, $dcDN, $childDN){ - - global $ds, $suffix, $domsuffix, $ldapError; - - $entryDC ["associatedname"] = $childDN; - $resultDC = ldap_mod_add($ds,$dcDN,$entryDC); - if ($resultDC){ - # HostAdmins übernehmen, welche Admins noch? MainAdmin? - $roles = get_roles($childDN); - if(count($roles['HostAdmin']) != 0){ - $hostadmins = $roles['HostAdmin']; - for ($i=0; $i<count($hostadmins); $i++){ - $entryRoleHost ['member'][$i] = $hostadmins[$i]; - } - #print_r($entryRoleHost); echo "<br>"; - $resultHA = ldap_mod_add($ds,"cn=HostAdmin,cn=roles,".$dcDN,$entryRoleHost); - } - # Domainname zu associatedDomain der ChildAU - $entryAD['objectclass'] = "domainRelatedObject"; - $entryAD['associateddomain'] = $assocdom; - $resultAD = ldap_mod_add($ds,$childDN,$entryAD); - if($resultAD){return 1;}else{return 0;} - } - else{return 0;} -} - - -function new_childau_domain($childdomain, $childDN){ - - global $ds, $suffix, $domsuffix, $ldapError; - - # entsprechenden DC Knoten anlegen, sowie Roles (MainAdmin, HostAdmin) - $dc_array = explode('.',$childdomain); - $dc_array = array_reverse($dc_array); - $dcDN = "ou=DNS,".$suffix; - # $childdomainfull = $childdomain.".".$domsuffix; - #print_r($dc_array); - foreach ($dc_array as $dc){ - $resultsum = false; - if (check_for_dc($dc)){ - echo "dc <b>".$dc."</b> schon vorhanden ... nächster dc<br>"; - $domsuffix = $dc.".".$domsuffix; - $dcDN = "dc=".$dc.",".$dcDN; - } - else{ - $dcDN = "dc=".$dc.",".$dcDN; - - $entryDC ["objectclass"][0] = "dnsdomain"; - $entryDC ["objectclass"][1] = "domainrelatedobject"; - $entryDC ["objectclass"][2] = "top"; - $entryDC ["dc"] = $dc; - $entryDC ["associatedname"] = $childDN; - $entryDC ["associateddomain"] = $dc.".".$domsuffix; - #print_r($entryDC); echo "<br>"; - #print_r($dcDN); echo "<br><br>"; - $resultDC = ldap_add($ds,$dcDN,$entryDC); - if ($resultDC){ - $domsuffix = $dc.".".$domsuffix; - - #print_r($dcDN); echo"<br><br>"; - - $entryRolesCont ['objectclass'] = "AUContainer"; - $entryRolesCont ['cn'] = "roles"; - #print_r($entryRolesCont); echo "<br><br>"; - $resultRC = ldap_add($ds,"cn=roles,".$dcDN,$entryRolesCont); - if ($resultRC){ - $roles = get_roles($childDN); - print_r($roles); echo "<br><br>"; - $mainadmins = $roles['MainAdmin']; - $entryRoleMain ['objectclass'] = "groupOfNames"; - $entryRoleMain ['cn'] = "MainAdmin"; - for ($i=0; $i<count($mainadmins); $i++){ - $entryRoleMain ['member'][$i] = $mainadmins[$i]; - } - #print_r($entryRoleMain); echo "<br>"; - $resultMA = ldap_add($ds,"cn=MainAdmin,cn=roles,".$dcDN,$entryRoleMain); - - if(count($roles['HostAdmin']) != 0){ - $hostadmins = $roles['HostAdmin']; - $entryRoleHost ['objectclass'] = "groupOfNames"; - $entryRoleHost ['cn'] = "HostAdmin"; - for ($i=0; $i<count($hostadmins); $i++){ - $entryRoleHost ['member'][$i] = $hostadmins[$i]; - } - #print_r($entryRoleHost); echo "<br>"; - $resultHA = ldap_add($ds,"cn=HostAdmin,cn=roles,".$dcDN,$entryRoleHost); - } - if ($resultMA){$resultsum = true;} - } - } - break; # damit dc-Zuwachs immer nur um eine neue Ebene moeglich - } - } - # Domainname zu associatedDomain der ChildAU - if ($resultsum == true){ - $entryAD['objectclass'] = "domainRelatedObject"; - $entryAD['associateddomain'] = $domsuffix; - $resultAD = ldap_mod_add($ds,$childDN,$entryAD); - } - if($resultAD){return 1;} - else{return 0;} - -} - - - -function delete_childau_domain($oldchilddomain,$childDN,$delmodus){ - - global $ds, $suffix, $domsuffix, $ldapError; - - $dcold_array = explode('.',$oldchilddomain); - $dcold_array = array_reverse($dcold_array); - $dcDN = "ou=DNS,".$suffix; - - foreach ($dcold_array as $dc){ - $dcDN = "dc=".$dc.",".$dcDN; - $aname = get_dc_data($dcDN,array("associatedname")); - $domsuffix = $dc.".".$domsuffix; - - if ($aname == $childDN){ - break; - } - } - #print_r($dcDN); echo "<br>"; - #print_r($domsuffix); echo "<br>"; - - if ( $delmodus == "complete" ){ - if (dive_into_tree_del($dcDN,"")){ - $delentry ['objectclass'] = "domainrelatedobject"; - $delentry ['associateddomain'] = $domsuffix; - #print_r($delentry); echo "<br>"; - $delresult = ldap_mod_del($ds,$childDN,$delentry); - if ($delresult){ - $mesg = "Domain komplett gelöscht<br>"; - }else{$mesg = "Fehler! ldap_mod_del<br>";} - }else{$mesg = "Fehler! dive_into_tree_del<br>";} - } - - if ( $delmodus == "integrate"){ - $mesg = "DNS Integration, noch nicht fertiggestellt"; - } - - return $mesg; -} -*/ - - - - -############################################################################### -# Funktionen für das Rollen Management -# - - -function new_role_member($userDN,$role,$auDN,$domDN){ - - global $ds, $suffix, $ldapError; - - $actroles = get_roles($auDN); - - $entry['member'] = $userDN; - - if ($domDN != ""){ - $actdnsroles = get_roles_dns($domDN); - switch ($role){ - case 'MainAdmin': - $roleDN1 = "cn=".$role.",cn=roles,".$auDN; - $roleDN2 = "cn=".$role.",cn=roles,".$domDN; - $results1 = ldap_mod_add($ds,$roleDN1,$entry); - $results2 = ldap_mod_add($ds,$roleDN2,$entry); - if ($results1 && $results2){ - return 1; - }else{ - return 0; - } - break; - case 'HostAdmin': - $roleDN1 = "cn=".$role.",cn=roles,".$auDN; - #$roleDN2 = "cn=".$role.",cn=roles,".$domDN; - if ( count($actroles['HostAdmin']) != 0 ){ - $results1 = ldap_mod_add($ds,$roleDN1,$entry); - #$results2 = ldap_mod_add($ds,$roleDN2,$entry); - }else{ - $entrynew ['objectclass'] = "groupOfNames"; - $entrynew ['cn'] = $role; - $entrynew ['member'] = $userDN; - $results1 = ldap_add($ds,$roleDN1,$entrynew); - #$results2 = ldap_add($ds,$roleDN2,$entryHA); - } - if ($results1){ #&& $results2){ - return 1; - }else{ - return 0; - } - break; - case 'DhcpAdmin': - $roleDN = "cn=".$role.",cn=roles,".$auDN; - if ( count($actroles['DhcpAdmin']) != 0 ){ - $results = ldap_mod_add($ds,$roleDN,$entry); - }else{ - $entrynew ['objectclass'] = "groupOfNames"; - $entrynew ['cn'] = $role; - $entrynew ['member'] = $userDN; - $results = ldap_add($ds,$roleDN,$entrynew); - } - if ($results){ - return 1; - }else{ - return 0; - } - break; - case 'RbsAdmin': - $roleDN = "cn=".$role.",cn=roles,".$auDN; - if ( count($actroles['RbsAdmin']) != 0 ){ - $results = ldap_mod_add($ds,$roleDN,$entry); - }else{ - $entrynew ['objectclass'] = "groupOfNames"; - $entrynew ['cn'] = $role; - $entrynew ['member'] = $userDN; - $results = ldap_add($ds,$roleDN,$entrynew); - } - if ($results){ - return 1; - }else{ - return 0; - } - break; - case 'ZoneAdmin': - $roleDN1 = "cn=".$role.",cn=roles,".$auDN; - #$roleDN2 = "cn=".$role.",cn=roles,".$domDN; - if ( count($actroles['ZoneAdmin']) != 0 ){ - $results1 = ldap_mod_add($ds,$roleDN1,$entry); - #$results2 = ldap_mod_add($ds,$roleDN2,$entry); - }else{ - $entrynew ['objectclass'] = "groupOfNames"; - $entrynew ['cn'] = $role; - $entrynew ['member'] = $userDN; - $results = ldap_add($ds,$roleDN1,$entrynew); - } - if ($results1){ #&& $results2){ - return 1; - }else{ - return 0; - } - break; - } - }else{ - switch ($role){ - case 'MainAdmin': - $roleDN = "cn=".$role.",cn=roles,".$auDN; - $results = ldap_mod_add($ds,$roleDN,$entry); - if ($results){ - return 1; - }else{ - return 0; - } - break; - case 'HostAdmin': - $roleDN = "cn=".$role.",cn=roles,".$auDN; - if ( count($actroles['HostAdmin']) != 0 ){ - $results = ldap_mod_add($ds,$roleDN,$entry); - }else{ - $entrynew ['objectclass'] = "groupOfNames"; - $entrynew ['cn'] = $role; - $entrynew ['member'] = $userDN; - $results = ldap_add($ds,$roleDN,$entrynew); - } - if ($results){ - return 1; - }else{ - return 0; - } - break; - case 'DhcpAdmin': - $roleDN = "cn=".$role.",cn=roles,".$auDN; - if ( count($actroles['DhcpAdmin']) != 0 ){ - $results = ldap_mod_add($ds,$roleDN,$entry); - }else{ - $entrynew ['objectclass'] = "groupOfNames"; - $entrynew ['cn'] = $role; - $entrynew ['member'] = $userDN; - $results = ldap_add($ds,$roleDN,$entrynew); - } - if ($results){ - return 1; - }else{ - return 0; - } - break; - case 'RbsAdmin': - $roleDN = "cn=".$role.",cn=roles,".$auDN; - if ( count($actroles['RbsAdmin']) != 0 ){ - $results = ldap_mod_add($ds,$roleDN,$entry); - }else{ - $entrynew ['objectclass'] = "groupOfNames"; - $entrynew ['cn'] = $role; - $entrynew ['member'] = $userDN; - $results = ldap_add($ds,$roleDN,$entrynew); - } - if ($results){ - return 1; - }else{ - return 0; - } - break; - case 'ZoneAdmin': - $roleDN = "cn=".$role.",cn=roles,".$auDN; - if ( count($actroles['ZoneAdmin']) != 0 ){ - $results = ldap_mod_add($ds,$roleDN,$entry); - }else{ - $entrynew ['objectclass'] = "groupOfNames"; - $entrynew ['cn'] = $role; - $entrynew ['member'] = $userDN; - $results = ldap_add($ds,$roleDN,$entrynew); - } - if ($results){ - return 1; - }else{ - return 0; - } - break; - } - } -} - - -function delete_role_member($userDN,$role,$auDN,$domDN){ - - global $ds, $suffix, $ldapError; - - $actroles = get_roles($auDN); - - $entry['member'] = $userDN; - - if ($domDN != ""){ - $actdnsroles = get_roles_dns($domDN); - - switch ($role){ - case 'MainAdmin': - $roleDN1 = "cn=".$role.",cn=roles,".$auDN; - $roleDN2 = "cn=".$role.",cn=roles,".$domDN; - if ( count($actroles['MainAdmin']) == 1 || count($actdnsroles['MainAdmin']) == 1 ){ - echo "Rolle <b>MainAdmin</b> muss mindestens ein Mitglied haben!<br> - <b>$userDN</b> wird nicht gelöscht.<br><br>"; - }else{ - $results1 = ldap_mod_del($ds,$roleDN1,$entry); - $results2 = ldap_mod_del($ds,$roleDN2,$entry); - } - if ($results1 && $results2){ - return 1; - }else{ - return 0; - } - break; - case 'HostAdmin': - $roleDN1 = "cn=".$role.",cn=roles,".$auDN; - #$roleDN2 = "cn=".$role.",cn=roles,".$domDN; - if ( count($actroles['HostAdmin']) == 1 ){ - $results1 = ldap_delete($ds,$roleDN1); - }else{ - $results1 = ldap_mod_del($ds,$roleDN1,$entry); - } - #$results2 = ldap_mod_del($ds,$roleDN2,$entry); - if ($results1){ #&& $results2){ - return 1; - }else{ - return 0; - } - break; - case 'DhcpAdmin': - $roleDN = "cn=".$role.",cn=roles,".$auDN; - if ( count($actroles['DhcpAdmin']) == 1 ){ - $results = ldap_delete($ds,$roleDN); - }else{ - $results = ldap_mod_del($ds,$roleDN,$entry); - } - if ($results){ - return 1; - }else{ - return 0; - } - break; - case 'RbsAdmin': - $roleDN = "cn=".$role.",cn=roles,".$auDN; - if ( count($actroles['RbsAdmin']) == 1 ){ - $results = ldap_delete($ds,$roleDN); - }else{ - $results = ldap_mod_del($ds,$roleDN,$entry); - } - if ($results){ - return 1; - }else{ - return 0; - } - break; - case 'ZoneAdmin': - $roleDN1 = "cn=".$role.",cn=roles,".$auDN; - #$roleDN2 = "cn=".$role.",cn=roles,".$domDN; - if ( count($actroles['ZoneAdmin']) == 1 ){ - $results1 = ldap_delete($ds,$roleDN1); - }else{ - $results1 = ldap_mod_del($ds,$roleDN1,$entry); - } - #$results2 = ldap_mod_del($ds,$roleDN2,$entry); - if ($results1){ #&& $results2){ - return 1; - }else{ - return 0; - } - break; - } - }else{ - switch ($role){ - case 'MainAdmin': - $roleDN = "cn=".$role.",cn=roles,".$auDN; - if ( count($actroles['MainAdmin']) == 1 ){ - echo "Rolle <b>MainAdmin</b> muss mindestens ein Mitglied haben!<br> - <b>$userDN</b> wird nicht gelöscht.<br><br>"; - }else{ - $results = ldap_mod_del($ds,$roleDN,$entry); - } - if ($results){ - return 1; - }else{ - return 0; - } - break; - case 'HostAdmin': - $roleDN = "cn=".$role.",cn=roles,".$auDN; - if ( count($actroles['HostAdmin']) == 1 ){ - $results = ldap_delete($ds,$roleDN); - }else{ - $results = ldap_mod_del($ds,$roleDN,$entry); - } - if ($results){ - return 1; - }else{ - return 0; - } - break; - case 'DhcpAdmin': - $roleDN = "cn=".$role.",cn=roles,".$auDN; - if ( count($actroles['DhcpAdmin']) == 1 ){ - $results = ldap_delete($ds,$roleDN); - }else{ - $results = ldap_mod_del($ds,$roleDN,$entry); - } - if ($results){ - return 1; - }else{ - return 0; - } - break; - case 'RbsAdmin': - $roleDN = "cn=".$role.",cn=roles,".$auDN; - if ( count($actroles['RbsAdmin']) == 1 ){ - $results = ldap_delete($ds,$roleDN); - }else{ - $results = ldap_mod_del($ds,$roleDN,$entry); - } - if ($results){ - return 1; - }else{ - return 0; - } - break; - case 'ZoneAdmin': - $roleDN = "cn=".$role.",cn=roles,".$auDN; - if ( count($actroles['ZoneAdmin']) == 1 ){ - $results = ldap_delete($ds,$roleDN); - }else{ - $results = ldap_mod_del($ds,$roleDN,$entry); - } - if ($results){ - return 1; - }else{ - return 0; - } - break; - } - } -} - - -function get_role_members($roleDN) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, $roleDN, "objectclass=*", array("member"), "", "one", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "search problem"; - die; - } else { - $members_array = array(); - $result = ldapArraySauber($result); - foreach ($result as $item){ - if (count($item['member']) > 1){ - $members_array = $item['member']; - } - else{ - $members_array[] = $item['member']; - } - } - } - return $members_array; -} - - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/lib/commonlib.inc.php b/ldap-site-mngmt/webinterface/lib/commonlib.inc.php deleted file mode 100644 index 95fc0776..00000000 --- a/ldap-site-mngmt/webinterface/lib/commonlib.inc.php +++ /dev/null @@ -1,554 +0,0 @@ -<?php - - -/** -* attributesToString($entry, $name, $delemiter = "", $pattern = "", $empty = " ") - -* Gibt die Attribute eines LDAP-Eintrages formatiert aus -* -* Gibt die Attribute des Schl�ssels $name des LDAP-Eintraes $entry aus. Mehrere Werte werden mit $delemiter -* voneinander getrennt. F�r jeden Wert des Attributes wird in $pattern an die Stelle "$name" (Dallarzeichen plus die Bezeichnung) -* das aktuelle Attribut eingef�gt - �hnlich (aber nicht gleich!) der String-Interpretation von PHP. Falls $pattern = "" wird -* einfach der Wert zur�ck gegeben. Falls f�r den Schl�ssel keine Attribut-Werte definiert sind, wird $empty zur�ck gegeben -* -* @param array entry LDAP-Array -* @param string name Hashbezeichnung -* @param string delimiter Trennzeichen -* @param string pattern Muster -* @param string empty Zeichen f�r leere Felder -* -* @return string Array-Werte als String -* -* @author Timothy Burk, lt. Musterl�sung -* -*/ - - function attributesToString($entry, $name, $delimiter = "", $pattern = "", $empty = "") { - $buffer = ""; - $name=strtolower($name); - if (isset($entry[$name])) { - $count = $entry[$name]['count']; - for ($i = 0; $i < $count; $i++) { - if ($pattern) { - $tmp = $pattern; - $buffer .= str_replace('$' . $name, $entry[$name][$i], $tmp); - } else { - $buffer .= $entry[$name][$i]; - } - if ($delimiter && ($i + 1) < $count) { - $buffer .= $delimiter; - } - } - } - - if ("" == $buffer && $empty) { - $buffer = $empty; - } - return $buffer; - } - -/* - * oneAttribute($entry, $name, $empty = "", $i = 0) { - * liefert den ($i-ten) Wert des Attributes $name aus $entry - * Eingabe ist entweder ein Datensatz aus dem ldapsearch-Ergebnis, oder - * ein um die Meta-Infos (count) bereinigtes Ergebnis - * sorry f�r die mangelhafte Doku - Thomas - */ - - function oneAttribute($entry, $name, $empty = "", $i = 0) { - $buffer = ""; - if (isset($entry[$name][$i])) { - $buffer = $entry[$name]; - } else if (isset($entry[$name])) { - $buffer = $entry[$name]; - } - - if ("" == $buffer && $empty) { - $buffer = $empty; - } - return $buffer; - } - - - /** - * redirect($seconds, $url, $msg = "", $addSessionId = TRUE) - leitet den Benutzer auf eine andere Seite weiter - * - * Leitet den Benuzter nach $seconds Sekunden auf die Seite $url weiter. W�hrend der Wartezeit bekommt der Benutzer - * die Information $msg mitgeteilt (Achtung: keine automatische Formatierung der $msg). Wenn $addSessionId TRUE ist, - * dann wird an den URL die SessionId angeh�ngt. - * - * @author Timothy Burk, lt. Musterl�sung - */ - - function redirect($seconds, $url, $msg = "", $addSessionId = TRUE) { - if ($addSessionId) { - if (strpos($url, "?") === FALSE) { - $url .= "?"; - } else { - $url .= "&"; - } - $url .= SID; - } - - echo "<html>\n" . - " <head>\n" . - ' <meta http-equiv="refresh" content="' . $seconds . "; URL=$url" . '">' . "\n" . - " </head>\n"; - if ($msg) { - echo " <body>\n" . - $msg . - " </body>\n"; - } - echo "</html>\n"; - } - - - -/** -* getRights($ds, $userDn) - ermittelt die Rechte eines Users. -* -* Die Funktion erwartet ein Directory-Handle und den vollst�ndigen Distiguished Name des -* Users. R�ckgabewert ist ein numerisches eindimensionales Array, welches die Rechte enth�lt. -* -* @param resource ds LDAP Directory Handle -* @param string userDn Distinguishedname des Users -* -* @return array rechte -* -* @author Timothy Burk -*/ - -function getRoles($ds, $userDN) { - global $ldapError, $suffix, $uid; - - if(!($result = uniLdapSearch($ds, "ou=RIPM,".$suffix, "(&(member=$userDN)(cn=*))", array("dn","cn"), "dn", "sub", 0, 0))) { - redirect(5, "index.php", $ldapError, FALSE); - die; - } - $result = ldapArraySauber($result); - $clean = array(); - - foreach($result as $item) { - $dn = ldap_explode_dn($item['dn'], 0); - $dnsub = array_slice($dn,3); - $auDN = implode(',',$dnsub); - $element['au'] = $auDN; - $element['role'] = $item['cn']; - $clean[] = $element; - } - - $res = array(); - foreach($clean as $item){ - $au = $item['au']; - $role = $item['role']; - if(array_key_exists($au,$res)){ - $res[$au][] = $role; - } - else{ - $res[$au] = array($role); - } - } - $i=0; - foreach (array_keys($res) as $key){ - $au_roles[$i]['au'] = $key; - $au_roles[$i]['role'] = $res[$key]; - $i++; - } - return $au_roles; -} - - -/** -* createMenu($rechte) - erstellt die Menuleiste abh�ngig von der Rechten des Users. -* -* Die Navigationsleiste wird dynamisch erzeugt und von dieser Funktion direkt in das -* entsprechende Template geparst. Dabei werden nur die Schaltfl�chen zur Verf�gung -* gestellt, die der User mit seinen Rechten anzeigen darf. -* -* @param array rechte Eindimensionales Array mit den Rechten des Users -* @param int mainnr Nummer des aktiven Hauptmenus -* -* @author Timothy Burk -*/ - -function createMainMenu($rollen , $mainnr) { - - global $template, $START_PATH, $auDN; - - # pre-checks - $mipbs = get_maxipblocks_au($auDN); - #echo "MIPB: "; print_r ($mipbs); echo "<br>"; - if ($mipbs[0] != ""){ - $dhcplink = "dhcp/dhcpsubnets.php?mnr=0"; - }else{ - $dhcplink = "dhcp/no_dhcp.php"; - } - - # Struktur der Registerkartenleiste - $mainmenu = array(array("link" => "au/au.php", - "text" => "AU Home", - "zugriff" => "alle"), - #array("link" => "roles/roles.php", - # "text" => "Admin Rollen", - # "zugriff" => array("MainAdmin","DhcpAdmin")), - #array("link" => "ip/ip.php", - # "text" => "IP Management", - # "zugriff" => array("MainAdmin","HostAdmin","DhcpAdmin")), - array("link" => "computers/hostoverview.php?sort=hostname", - "text" => "Rechner", - "zugriff" => array("MainAdmin","HostAdmin","DhcpAdmin")), - array("link" => $dhcplink, - "text" => "DHCP", - "zugriff" => array("MainAdmin","DhcpAdmin")), - array("link" => "rbs/rbs.php", - "text" => "RemoteBoot/PXE", - "zugriff" => array("MainAdmin","RbsAdmin")), - array("link" => "dns/dns.php", - "text" => "DNS", - "zugriff" => array("MainAdmin","ZoneAdmin"))); - - - # Zusammenstellen der Menuleiste - $template->define_dynamic("Mainmenu", "Mmenu"); - $i=0; - foreach($mainmenu as $item) { - if($item['zugriff'] === "alle" || vergleicheArrays($rollen , $item['zugriff'])) { - if ($i==0) { - if ($mainnr==0) { - $zwisch=""; - $lastaktive=true; - $farb="#505050"; - } - else { - $zwisch=""; - $farb="#A0A0A0"; - $lastaktive=false; - } - } - else { - if ($mainnr==$i) { - $zwisch=""; - $lastaktive=true; - $farb="#505050"; - } - else { - $farb="#A0A0A0"; - if ($lastaktive) {$zwisch="";} - else {$zwisch="";} - $lastaktive=false; - } - } - $template->assign(array("MZWISCHEN" => $zwisch, - "MFARBE" => $farb, - "MLINK_M" => $START_PATH.$item["link"], - "MTEXT_M" => $item["text"])); - $template->parse("MAINMENU_LIST", ".Mainmenu"); - } - $i=$i+1; - } - if ($lastaktive) {$template->assign(array("MENDE" => ""));} - else { - $template->assign(array("MENDE" => "")); - } - -} - - - -/** -* vergleicheArrays($a, $b) - Ermitteln der Schnittmenge zweier Arrays -* -* @param array a -* @param array b -* -* @return boolean TRUE, wenn die Schnittmenge von a und b nicht leer ist, sonst FALSE -* -* @author Timothy Burk -*/ - -function vergleicheArrays($a, $b) { - if((sizeof(array_unique($a)) + sizeof($b)) > sizeof(array_unique(array_merge($a, $b)))) { - return TRUE; - } else { - return FALSE; - } -} - - -/** -* inputArraySauber($Array) -* -* L�scht aus einem Array, welches POST-Daten enth�lt leere Felder. N�tig f�r die Formatierung -* vor dem Anlegen neuer Objekte. -* -* @param array _POST-Array -* -* @return array Bereinigtes Array. -* -* @author Timothy Burk -*/ -function inputArraySauber($Array) { - $b = array(); - foreach($Array as $key => $a) { - if(!is_array($a)) { - trim($a); - } - if (!$a == "") { - if(is_array($a)) { - $b[$key] = $a; - } else { - $b[$key] = htmlentities($a); - } - } - } - return $b; -} - - -/** -* numArraySauber($Array) -* -* L�scht aus einemn numerischen Array leere Felder. -* -* @param array Numerisches Array -* -* @return array Bereinigtes Array. -* -* @author Timothy Burk -*/ -function numArraySauber($Array) { - $b = array(); - $arr = array(); - if(!(is_array($Array))) { - $arr[] = $Array; - } else { - $arr = $Array; - } - foreach($arr as $key => $a) { - if (!$a == "") { - $b[] = $a; - } - } - return $b; -} - -/** -* ldapArraySauber($Array, [$delEmpty]) -* -* Bereinigt ein dreidimensionales Array, so wie es aus der Funktion uniLdapSearch kommt. -* Dabei werden alle count-Felder sowie alle numerischen Felder in denen der Schl�ssel -* gespeichert ist entfernt. Attributarrays mit nur einem Element werden gel�scht, das Element -* wir als Skalar gespeichert. -* Wenn $delEmpty = TRUE ist, werden nur nichtleere Felder gespeichert. -* -* @param array $Array uniLdapSearch()-Ausgabe -* @param boolean $delEmpty (Standard: $delEmpty = FALSE) -* -* @return array Bereinigtes Array. -* -* @author Timothy Burk -*/ -function ldapArraySauber($Array, $delEmpty = FALSE) { - $b = array(); - foreach($Array as $key => $item) { - if(is_array($item)) { - foreach($item as $key_attr => $attr) { - if(!is_int($key_attr)) { - if(is_array($attr)) { - if($attr['count'] == 1) { - $attr[0] = str_replace(chr(160),"",trim($attr[0])); - if(($delEmpty && $attr[0] != "") || !($delEmpty)) { - $b[$key][$key_attr] = $attr[0]; - } - } else { - for($i=0; $i < $attr['count']; $i++) { - $attr[$i] = str_replace(chr(160),"",trim($attr[$i])); - if(($delEmpty && $attr[$i] != "") || !($delEmpty)) { - $b[$key][$key_attr][$i] = $attr[$i]; - } - } - } - } else { - $attr = str_replace(chr(160),"",trim($attr)); - if(($delEmpty && $attr != "") || !($delEmpty)) { - $b[$key][$key_attr] = $attr; - } - } - } - } - } else { - if(is_int($key)) { - $item = str_replace(chr(160),"",trim($item)); - if(($delEmpty && $item != "") || !($delEmpty)) { - $b[$key] = $item; - } - } - } - } - return $b; -} - -/** -* personOptionen($rechte) -* -* Enth�lt die m�glichen Optionen, die auf einen User angewandt werden k�nnen als -* zweidimensionales Array mit folgenden Attributen: -* [ziel]: Aufzurufendes PHP-Skript -* [text]: Beschriftung der Schaltfl�che -* [desc]: Beschreibung der Funktion -* [rechte][]: Array mit den erforderlichen Rechten f�r die jeweilige Option. array("alle") steht f�r "ohne Einschr�nkung". -* -* Dieses in dieser Funktion gespeicherte Array wird abh�ngig von den �bergebenen -* Rechten um nicht erlaubte Optionen reduziert und dann ausgegeben. -* -* @param array $rechte Eindimensionales Array $_SESSION['rechte'] -* -* @return array Zweidimensionales Array mit den erlaubten Optionen. -* -* @author Timothy Burk -*/ -function personOptionen($rechte) { - global $utc_uid, $utc_cn, $START_PATH; - $optionen = array(); - $optionen[] = array("ziel" => $START_PATH."person/datensatz.php?aktion=edit", - "text" => "Userdaten bearbeiten", - "desc" => "Anzeigen und �ndern der pers�nlichen Daten des Users.", - "rechte" => array("writeMitarbeiter"), - "hidden" => array("aktion" => "edit")); - $optionen[] = array("ziel" => $START_PATH."person/datensatz.php", - "text" => "Datensatz l�schen", - "desc" => "Der User wird vollst�ndig mit allen Daten aus der Datenbank gel�scht.", - "rechte" => array("writeMitarbeiter"), - "hidden" => array("aktion" => "delete")); - $optionen[] = array("ziel" => $START_PATH."person/datensatz.php", - "text" => "User (de)aktivieren", - "desc" => "Diese Funktion legt einen User durch die Deaktivierung im Archiv ab. Von dort kann der Datensatz weiterhin eingesehen und ggf. reaktiviert werden.", - "rechte" => array("writeMitarbeiter"), - "hidden" => array("aktion" => "archiv")); - $optionen[] = array("ziel" => $START_PATH."person/vertrag_show.php", - "text" => "Vertr�ge bearbeiten", - "desc" => "Bearbeiten oder Anlegen eines Vertrages. Sie k�nnen dabei zwischen verschiedenen Vertragsarten w�hlen.", - "rechte" => array("writeVertrag", "readVertrag")); - $optionen[] = array("ziel" => $START_PATH."urlaub/krank_angabe.php", - "text" => "Krankheitstage", - "desc" => "Krankheitsdaten bearbeiten.", - "rechte" => array("writeKrankheitUrlaub"), - "hidden" => array("uidToChange" => $utc_uid, "GName" => $utc_cn)); - $optionen[] = array("ziel" => $START_PATH."urlaub/liste.php", - "text" => "Urlaubstage anzeigen", - "desc" => "Urlaubstage des Users in grafischer �bersicht anzeigen.", - "rechte" => array("readKrankheitUrlaub"), - "hidden" => array("wer" => $utc_uid, "wann" => "g", "sub" => $utc_cn)); - $optionen[] = array("ziel" => $START_PATH."person/rechte_show.php", - "text" => "Rechte vergeben", - "desc" => "Diese Option dient dazu, dem User bestimmte Rechte zuzuweisen, beispielsweise das Recht Urlaub zu beantragen, Vertragsdaten andere User zu bearbeiten oder einzusehen usw..", - "rechte" => array("writeRechte")); - $optionen[] = array("ziel" => $START_PATH."person/suchen.php", - "text" => "Abbrechen", - "desc" => " ", - "rechte" => array("alle")); - - $opt_reduced = array(); - foreach($optionen as $option) { - if(in_array("alle",$option['rechte']) || vergleicheArrays($option['rechte'],$rechte)) { - array_push($opt_reduced, $option); - } - } - return $opt_reduced; -} - - -/** -* makeArrFromAttribute($a, $attribute) -* -* Ein zweidimensionales Array wird nach der ersten Dimension durchlaufen. -* Dabei werden die Werte des angegebenen Attributes $attribute f�r alle -* Eintr�ge extrahiert und in einem neuen Array gespeichert, welches -* anschlie�end zur�ckgegeben wird. -* -* @param array $a Zweidimensionales Array -* @param string $attribute Schl�sselname der zweiten Dimension -* -* @return array Eindimensionales numerisches Array mit den Attributwerten. -* -* @author Timothy Burk -*/ -function makeArrFromAttribute($a, $attribute) { - $c = array(); - foreach($a as $b) { - $c[] = $b[$attribute]; - } - return $c; -} -?> - -<?php - - -/** -* sortArrayByKey sortiert die 1.Dimension von bis zu 5-dimensionalen Arrays -* nach den Werten in einem beliebigen Schl�ssel in beliebiger Dimension -* -* PS: die Funktion sortArrayByKey ist nur sinnvoll, wenn sich die Array-Eintr�ge -* der 1.Dim sehr �hnlich sind, sprich bei Suchergebnissen!! -* -* @param array $array : das zu sortierende Array -* @param string $sortKey : der Schl�ssel, nach dem sortiert werden soll -* Bsp.: -* es soll nach $array[$i][$j][$k]['sortkey'] sortiert werden -* => $sortKey = "$j#$k#sortkey" -* @param string $sortDirection : die Sortierrichtung, g�ltige Werte sind "up", "down" -* -* -* @author Daniel H�fler -*/ -function sortArrayByKey($array, $sortKey, $sortDirection = "up") { - $sortKeyArray = explode("#", $sortKey); - $count = count($sortKeyArray); - if($count < 5) { - switch($count) { - case 0: - foreach($array as $key => $item) { - $toSortKeys[$key] = $item; - } - break; - case 1: - foreach($array as $key => $item) { - $toSortKeys[$key] = $item[$sortKeyArray[0]]; - } - break; - case 2: - foreach($array as $key => $item) { - $toSortKeys[$key] = $item[$sortKeyArray[0]][$sortKeyArray[1]]; - } - break; - case 3: - foreach($array as $key => $item) { - $toSortKeys[$key] = $item[$sortKeyArray[0]][$sortKeyArray[1]][$sortKeyArray[2]]; - } - break; - case 4: - foreach($array as $key => $item) { - $toSortKeys[$key] = $item[$sortKeyArray[0]][$sortKeyArray[1]][$sortKeyArray[2]][$sortKeyArray[3]]; - } - break; - } - } else { - echo "zu viele Dimensionen!! H�chstens 4 Dimensionen m�glich"; - return false; - } - if($sortDirection == "up") { - asort($toSortKeys); - } elseif($sortDirection == "down") { - arsort($toSortKeys); - } else { - echo "Keine g�ltige Sortierrichtung!! W�hlen sie \"up\" oder \"down\"\n"; - return false; - } - $sortArray = array(); - foreach($toSortKeys as $key => $item) { - $sortArray[$key] = $array[$key]; - } - return($sortArray); -} - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/lib/config.inc.php b/ldap-site-mngmt/webinterface/lib/config.inc.php deleted file mode 100644 index 18a59409..00000000 --- a/ldap-site-mngmt/webinterface/lib/config.inc.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - - # URL and Root Path of LSM Webinterface - $START_PATH="https://dhcp.uni-freiburg.de/"; - #$START_PATH="http://localhost/lsm/"; - - ################################### - # LSM LDAP Directory Information - - # LDAP Server - # Master - define('LDAP_HOST', 'ldap://foo.ruf.uni-freiburg.de'); - #define('LDAP_HOST', 'ldaps://foo.ruf.uni-freiburg.de'); - # Slave - #define('LDAP_HOST', 'ldap://bar.ruf.uni-freiburg.de'); - #define('LDAP_HOST', 'ldaps://bar.ruf.uni-freiburg.de'); - - # Local for Testing - #define('LDAP_HOST', 'localhost'); - - define('LDAP_PORT', 389); - #define('LDAP_PORT', 636); - - $suffix = "dc=uni-freiburg,dc=de"; - $domsuffix = "uni-freiburg.de"; - $rootAU = "ou=UniFreiburg,ou=RIPM,dc=uni-freiburg,dc=de"; - ################################### - - - # einige Sachen, die aus Sicherheitsgr�nden in produktiven Umgebungen ge�ndert werden sollten!!! - #$dummyUid = "rz-ldap"; // Dummy-User f�r einige Aktionen - muss angelegt werden!!! - #$dummyPassword = "dummy"; - - #$standardPassword = "..."; // das Passwort mit dem alle User im Anwendungsldap angelegt werden!!! - -?> diff --git a/ldap-site-mngmt/webinterface/lib/dhcp_management_functions.php b/ldap-site-mngmt/webinterface/lib/dhcp_management_functions.php deleted file mode 100644 index 97259728..00000000 --- a/ldap-site-mngmt/webinterface/lib/dhcp_management_functions.php +++ /dev/null @@ -1,727 +0,0 @@ -<?php - -/** -* dhcp_management_functions.php - DHCP Management Funktions-Bibliothek -* Diese Bibliothek enthält alle Funktionen für die Verwaltung des DHCP Dienstes -* -* @param string ldapError -* @param resource ds -* -* @author Tarik Gasmi -* @copyright Tarik Gasmi -*/ - -# Konfiguration laden -require_once("config.inc.php"); - -$ldapError = null; - -################################################################################################### - -# wenn DHCP Objekte geändert werden DHCP modify time der AU aktualisieren, und auch der AUs -# referenzierter Objekte (Subnetz, RBS Dhcp Optionen) aktualisieren -function update_dhcpmtime($au_array){ - - global $ds, $auDN, $ldapError; - - $entry ['dhcpmtime'] = time(); - - # eigene AU - $results = ldap_mod_replace($ds,$auDN,$entry); - if ($results){ - echo "<br><b>dhcpMTime</b> erfolgreich in AU ".$auDN." aktualisiert!<br>" ; - #return 1; - }else{ - echo "<br>Fehler beim Aktualisieren der <b>dhcpMTime</b>!<br>" ; - } - - # andere AUs - if ( count($au_array) != 0 ) { - $au_array = array_unique($au_array); - # Bind als DHCP Manager - $dhcp_uid = "dhcpmanager"; - $dhcp_userPassword = "dhcpman02"; - if (!($dhcp_ds = uniLdapConnect($dhcp_uid,$dhcp_userPassword))){ - echo "Konnte nicht als <b>DHCP-Manager</b> mit LDAP Server verbinden"; - die; - }else{ - #echo "DHCP BIND erfolgreich"; - foreach ($au_array as $au){ - $results = ldap_mod_replace($dhcp_ds,$au,$entry); - if ($results){ - echo "<b>dhcpMTime</b> erfolgreich in AU ".$au." aktualisiert!<br>" ; - #return 1; - }else{ - echo "<br>Fehler beim Aktualisieren der <b>dhcpMTime</b>!<br>" ; - } - } - ldap_unbind($dhcp_ds); - } - } -} - - -# freie x.x.x.0/24 Netzwerke einer AU holen -function get_networks(){ - - global $ds, $suffix, $auDN, $ldapError; - - $networks = array(); - $fipb_array = get_freeipblocks_au($auDN); - foreach ( $fipb_array as $fipb ){ - $exp = explode('_',$fipb); - $fs = explode('.',$exp[0]); - $fe = explode('.',$exp[1]); - #print_r($fs); echo "<br>"; - #print_r($fe); echo "<br>"; - - if ($fs[3] == 0){$networks [] = $exp[0];} - $fs[2] = $fs[2] + 1; - $fs[3] = 0; - - while ( $fs[2] <= $fe[2] ){ - $iprange = implode('_',array(implode('.',$fs),implode('.',$fs))); - if (check_ip_in_iprange($iprange,$fipb)){ - $networks [] = implode('.',$fs); - if ($fs[2] == 255){ $fs[1] = $fs[1] + 1; $fs[2] = 0; } - else{ $fs[2] = $fs[2] + 1; } - } - } - } - #print_r($networks); echo "<br>"; - return $networks; -} - -# Check ob AU über noch freie x.x.x.0/24 Netzwerke verfügt (freie IP Blöcke) -function check_if_free_networks(){ - - global $ds, $suffix, $auDN, $ldapError; - - $networks = 0; - $fipb_array = get_freeipblocks_au($auDN); - if ( $fipb_array[0] != "" ){ - foreach ( $fipb_array as $fipb ){ - $exp = explode('_',$fipb); - $fs = explode('.',$exp[0]); - $fe = explode('.',$exp[1]); - - if ($fs[3] == 0){return 1; break;} - else{ - $fs[2] = $fs[2] + 1; - $fs[3] = 0; - - while ( $fs[2] <= $fe[2] ){ - $iprange = implode('_',array(implode('.',$fs),implode('.',$fs))); - if (check_ip_in_iprange($iprange,$fipb)){ - return 1; break 2; - } - if ($fs[2] == 255){ $fs[1] = $fs[1] + 1; $fs[2] = 0; } - else{ $fs[2] = $fs[2] + 1; } - } - } - } - } - return $networks; -} - -# Check ob AU über x.x.x.0/24 Netzwerke insgesamt verfügt (maximale IP Blöcke) -function check_if_max_networks(){ - - global $ds, $suffix, $auDN, $ldapError; - - $networks = 0; - $mipb_array = get_maxipblocks_au($auDN); - if ( $mipb_array[0] != "" ){ - foreach ( $mipb_array as $mipb ){ - $exp = explode('_',$mipb); - $fs = explode('.',$exp[0]); - $fe = explode('.',$exp[1]); - - if ($fs[3] == 0){return 1; break;} - else{ - $fs[2] = $fs[2] + 1; - $fs[3] = 0; - - while ( $fs[2] <= $fe[2] ){ - $iprange = implode('_',array(implode('.',$fs),implode('.',$fs))); - if (check_ip_in_iprange($iprange,$mipb)){ - return 1; break 2; - } - if ($fs[2] == 255){ $fs[1] = $fs[1] + 1; $fs[2] = 0; } - else{ $fs[2] = $fs[2] + 1; } - } - } - } - } - return $networks; -} - -################################################################################################### - -function get_dhcpoffers($auDN){ - - global $ds, $suffix, $auDN, $ldapError; - - $attribs = array("dn","dhcpofferdn"); - if(!($result = uniLdapSearch($ds, "ou=RIPM,".$suffix, "(objectclass=dhcpService)", $attribs, "dn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else{ - $result = ldapArraySauber($result); - #print_r($result);echo "<br><br>"; - - $dhcp_offers = array(); - foreach ($result as $dhcp){ - if ( strpos($auDN, $dhcp['dhcpofferdn']) !== false ) # && $dhcp['dn'] != $dhcpserviceDN - $dhcp_offers [] = $dhcp['dn']; - } - } - #print_r($dhcp_offers);echo "<br><br>"; - return $dhcp_offers; -} - -function alternative_dhcpservices($dhcpserviceDN){ - - global $ds, $suffix, $auDN, $ldapError; - - $alt_dhcp = array(); - - $dhcparray = get_dhcpoffers($auDN); - # print_r($dhcparray); echo "<br>"; - if (count($dhcparray) != 0){ - for ($i=0; $i < count($dhcparray); $i++){ - if ($dhcparray[$i] != $dhcpserviceDN){ - $exp = ldap_explode_dn ( $dhcparray[$i], 1 ); - $alt = array ("dn" => $dhcparray[$i], "cn" => $exp[0], "au" => " / ".$exp[2]); - $alt_dhcp[] = $alt; - } - } - } - - return $alt_dhcp; -} - -function alternative_dhcpsubnets($dhcpsubnetDN){ - - global $ds, $suffix, $auDN, $ldapError; - - $alt_subnet = array(); - $dhcpservices = get_dhcpoffers($auDN); - #print_r($dhcpservices); echo "<br>"; - if (count($dhcpservices) != 0){ - foreach ($dhcpservices as $servDN){ - $attribs = array("dn","cn","dhcphlpcont"); - #$servDN = $item['dn']; - #print_r($servDN); echo "<br>"; - $filter = "(&(objectclass=dhcpSubnet)(dhcphlpcont=$servDN))"; - if(!($result = uniLdapSearch($ds, "ou=RIPM,".$suffix, $filter, $attribs, "cn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - }else{ - $result = ldapArraySauber($result); - #print_r($result); echo "<br>"; - foreach ($result as $subnet){ - if ( check_subnet_mipb($subnet['cn']) && $subnet['dn'] != $dhcpsubnetDN){ - $exp = ldap_explode_dn ( $subnet['dn'], 1 ); - $alt = array ("dn" => $subnet['dn'], "cn" => $exp[0], "au" => " / ".$exp[2]); - $alt_subnet[] = $alt; - } - } - } - - } - } - - return $alt_subnet; -} - -function check_subnet_mipb($subnet){ - - global $ds, $suffix, $auDN, $ldapError; - - $subexp = explode('.',$subnet); - $ret = 0; - $mipb_array = get_maxipblocks_au($auDN); - if ( $mipb_array[0] != "" ){ - foreach ( $mipb_array as $mipb ){ - $exp = explode('_',$mipb); - $ms = explode('.',$exp[0]); - $me = explode('.',$exp[1]); - if ( $subexp[2] >= $ms[2] && $subexp[2] <= $me[2] ){ - $ret = 1; - break; - } - } - } - if ($ret){return 1;} - else{return 0;} - -} - -############################################################################### -# Funktionen zur Verwaltung von DHCP Service Objekten -# - -function add_dhcpservice ($dhcpserviceName,$dhcpoffer,$atts){ - - global $ds, $suffix, $auDN, $ldapError; - - #$dnarray = ldap_explode_dn ( $dhcpserviceDN, 1 ); - $dhcpserviceDN = "cn=".$dhcpserviceName.",cn=dhcp,".$auDN; - - $entrydhcp ['objectclass'][0] = "dhcpService"; - $entrydhcp ['objectclass'][1] = "dhcpOptions"; - $entrydhcp ['objectclass'][2] = "top"; - $entrydhcp ['cn'] = $dhcpserviceName; - $entrydhcp ['dhcpofferdn'] = $dhcpoffer; - - # weitere Attribute - foreach (array_keys($atts) as $key){ - if ($atts[$key] != ""){ - $entrydhcp[$key] = $atts[$key]; - } - } - print_r($entrydhcp); echo "<br>"; - print_r($dhcpserviceDN); echo "<br>"; - - if ($result = ldap_add($ds, $dhcpserviceDN, $entrydhcp)){ - return 1; - } - else{ - $mesg = "Fehler beim eintragen des neuen DHCP Service Objekts!"; - return 0; - } -} - - -# Löschen von Referenzen (dhcpHlpService) auf DHCP Service Objekt -function cleanup_del_dhcpservice ($dhcpserviceDN){ - - global $ds, $suffix, $auDN, $ldapError; - - $filter = "(&(|(objectClass=dhcpSubnet)(objectclass=dhcpHost))(dhcphlpcont=$dhcpserviceDN))"; - if(!($result = uniLdapSearch($ds, "ou=RIPM,".$suffix, $filter, array("dn"), "dn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - $delentry ['dhcphlpcont'] = $dhcpserviceDN; - foreach ($result as $item){ - ldap_mod_del($ds, $item['dn'], $delentry); - } -} - - -# Anpassen von Referenzen auf DHCP Service Objekt an neuen DN -function adjust_dhcpservice_dn ($newdhcpserviceDN,$dhcpserviceDN){ - - global $ds, $suffix, $auDN, $ldapError; - - $filter = "(&(|(objectClass=dhcpSubnet)(objectclass=dhcpHost))(dhcphlpcont=$dhcpserviceDN))"; - if(!($result = uniLdapSearch($ds, "ou=RIPM,".$suffix, $filter, array("dn"), "dn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - $modentry ['dhcphlpcont'] = $newdhcpserviceDN; - foreach ($result as $item){ - ldap_mod_replace($ds, $item['dn'], $modentry); - } - -} - - - -function alternative_dhcpobjects($objecttype,$objectDN,$ip){ - - global $ds, $suffix, $auDN, $assocdom, $ldapError; - - $alt_dhcp = array(); - $expip = explode('.',$ip); - $subnetDN = ""; - - /*if ($objecttype == "subnet"){ - # alternative DHCP Dienstobjekte eigene AU/übergeordnete AUs - $servarray = alternative_dhcpservices(""); - #print_r($servarray); echo "<br>"; - if (count($servarray) != 0){ - for ($i=0; $i < count($servarray); $i++){ - $alt_dhcp[] = $servarray[$i]; - } - } - if ($ip == ""){ - # alternative DHCP Subnetzobjekte eigene AU/übergeordnete AUs hinzufügen - $subarray = alternative_dhcpsubnets($objectDN); - #print_r($subarray); - if (count($subarray) != 0){ - for ($i=0; $i < count($subarray); $i++){ - $alt_dhcp[] = $subarray[$i]; - } - } - } - }*/ - - if ($objecttype == "service"){ - # alternative DHCP Dienstobjekte eigene AU/übergeordnete AUs - $servarray = alternative_dhcpservices($objectDN); - #print_r($servarray); echo "<br>"; - if (count($servarray) != 0){ - for ($i=0; $i < count($servarray); $i++){ - $alt_dhcp[] = $servarray[$i]; - } - } - /*# Subnetz entsprechend IP - $subarray = alternative_dhcpsubnets($objectDN); - #print_r($subarray); - if (count($subarray) != 0){ - for ($i=0; $i < count($subarray); $i++){ - $expsub = explode('.', $subarray[$i]['cn']); - if ($expip[0] == $expsub[0] && $expip[1] == $expsub[1] && $expip[2] == $expsub[2]){ - $alt_dhcp[] = $subarray[$i]; - $subnetDN = $subarray[$i]['dn']; - break; - } - } - } - # falls keine IP weitere Subnetze hinzufügen - #print_r($subarray); - if ( $ip == "" && count($subarray) != 0 ){ - for ($i=0; $i < count($subarray); $i++){ - if ($subnetDN != $subarray[$i]['dn']){ - $alt_dhcp[] = $subarray[$i]; - } - } - }*/ - } - - if ($objecttype == "nodhcp"){ - # alternative DHCP Dienstobjekte eigene AU/übergeordnete AUs - $servarray = alternative_dhcpservices(""); - #print_r($servarray); echo "<br>"; - if (count($servarray) != 0){ - for ($i=0; $i < count($servarray); $i++){ - $alt_dhcp[] = $servarray[$i]; - } - } - /*# Subnetz entsprechend IP - $subarray = alternative_dhcpsubnets($objectDN); - #print_r($subarray); - if (count($subarray) != 0){ - for ($i=0; $i < count($subarray); $i++){ - $expsub = explode('.', $subarray[$i]['cn']); - if ($expip[0] == $expsub[0] && $expip[1] == $expsub[1] && $expip[2] == $expsub[2]){ - $alt_dhcp[] = $subarray[$i]; - $subnetDN = $subarray[$i]['dn']; - break; - } - } - } - # falls keine IP weitere Subnetze hinzufügen - #print_r($subarray); echo "<br>";print_r($subnetDN); - if ( $ip == "" && count($subarray) != 0 ){ - for ($i=0; $i < count($subarray); $i++){ - if ($subnetDN != $subarray[$i]['dn']){ - $alt_dhcp[] = $subarray[$i]; - } - } - }*/ - } - #echo "<br>";print_r($alt_dhcp); - return $alt_dhcp; -} - - -############################################################################### -# Funktionen zur Verwaltung von DHCP Subnet Objekten -# - -function add_dhcpsubnet ($cn,$dhcpservice,$netmask,$atts){ - - global $ds, $suffix, $auDN, $ldapError; - - $subnet = implode('_',array($cn,$cn)); - - # IP checken und FIBS anpassen - $fipb_array = get_freeipblocks_au($auDN); - - for ($i=0; $i < count($fipb_array); $i++){ - if ( split_iprange($subnet,$fipb_array[$i]) != 0 ){ - $ipranges = split_iprange($subnet,$fipb_array[$i]); - array_splice($fipb_array, $i, 1, $ipranges); - break; - } - } - - if ($i < count($fipb_array) ){ - # ldap_mod_replace -> Array fipb_array aktualisiert die FIPB in AU mit $auDN - foreach ( $fipb_array as $item ){ - $entry ['FreeIPBlock'][] = $item; - } - - $results = ldap_mod_replace($ds,$auDN,$entry); - if ($results){ - echo "<br>Neue FIPBs erfolgreich eingetragen!<br>" ; - - $dhcpsubnetDN = "cn=".$cn.",cn=dhcp,".$auDN; - - $entrydhcp ['objectclass'][0] = "dhcpSubnet"; - $entrydhcp ['objectclass'][1] = "dhcpOptions"; - $entrydhcp ['objectclass'][2] = "top"; - $entrydhcp ['cn'] = $cn; - $entrydhcp ['dhcpoptnetmask'] = $netmask; - if ( $dhcpservice != "none" ){ - $entrydhcp ['dhcphlpcont'] = $dhcpservice; - } - # weitere Attribute - foreach (array_keys($atts) as $key){ - if ($atts[$key] != ""){ - $entrydhcp[$key] = $atts[$key]; - } - } - print_r($entrydhcp); echo "<br>"; - print_r($dhcpsubnetDN); echo "<br>"; - - if ($result = ldap_add($ds, $dhcpsubnetDN, $entrydhcp)){ - printf("Subnet <b>%s / %s</b> erfolgreich eingetragen",$cn,$netmask); - update_dhcpmtime(array()); - return 1; - #if ( check_ip_in_subnet($range1,$cn) && check_ip_in_subnet($range2,$cn)){ - # $dhcprange = implode('_',array($range1,$range2)); - # if ( $range = new_ip_dhcprange($dhcprange,$dhcpsubnetDN,$auDN) ){ - # echo "DHCP Range <b>".$range1." - ".$range2."</b> erfolgreich im Subnetobjekt eingetragen"; - # }else{ - # echo "DHCP Range <b>".$range1." - ".$range2."</b> konnte nicht im Subnetobjekt eingetragen werden!"; - # } - # return 1; - #}else{ - # echo "DHCP Range nicht in Subnetz ".$cn." enthalten.<br>Keine DHCP Range angelegt.<br>"; - # return 1; - #} - }else{ - echo "<br>Fehler beim anlegen des DHCP Subnet Objekts!<br>"; - return 0; - } - }else{ - echo "<br>Fehler beim eintragen der FIPBs!<br>"; - return 0; - } - } - else{ - printf("<br>Subnet %s nicht im verfuegbaren IP Bereich!<br>", $subnet ); - return 0; - } - -} - -function delete_dhcpsubnet($subnetDN,$cn){ - - global $ds, $suffix, $auDN, $ldapError; - - delete_ip_dhcprange($subnetDN,$auDN); - if ( dive_into_tree_del($subnetDN,"") ){ - cleanup_del_dhcpsubnet($subnetDN); - $oldsubnetip = implode("_",array($cn,$cn)); - $entry ['FreeIPBlock'] = $oldsubnetip; - $results = ldap_mod_add($ds,$auDN,$entry); - if ($results){ - merge_ipranges($auDN); - update_dhcpmtime(array()); - return 1; - }else{ - return 0; - } - }else{ - return 0; - } - -} - -function modify_subnet_dn($subnetDN,$newsubnetDN){ - - global $ds, $suffix, $auDN, $ldapError; - - # check IP-Net-Syntax ... - - # Subnet CNs (IP) in internes Range ".._.." Format bringen - $newcn = ldap_explode_dn($newsubnetDN,1); - $newcnarray = array($newcn[0],$newcn[0]); - $newsubnetip = implode("_",$newcnarray); - $oldcn = ldap_explode_dn($subnetDN,1); - $oldcnarray = array($oldcn[0],$oldcn[0]); - $oldsubnetip = implode("_",$oldcnarray); - - # IP checken und FIBS anpassen - $fipb_array = get_freeipblocks_au($auDN); - for ($i=0; $i < count($fipb_array); $i++){ - if ( split_iprange($newsubnetip,$fipb_array[$i]) != 0 ){ - $ipranges = split_iprange($newsubnetip,$fipb_array[$i]); - array_splice($fipb_array, $i, 1, $ipranges); - break; - } - } - - if ($i < count($fipb_array) ){ - - # zunächst alte DHCP Ranges löschen - delete_ip_dhcprange($subnetDN,$auDN); - # Move Subtree - if(move_subtree($subnetDN, $newsubnetDN)){ - adjust_dhcpsubnet_dn($newsubnetDN, $subnetDN); - printf("<br>Subnet Name (IP) erfolgreich von %s zu %s geändert!<br>", $oldcn[0], $newcn[0]); - # neue Subnetz-IP aus FIPBs entfernen - foreach ( $fipb_array as $item ){ - $entry ['FreeIPBlock'][] = $item; - } - # alte Subnetz-IP in FIPBs integrieren - $entry ['FreeIPBlock'][] = $oldsubnetip; - $results = ldap_mod_replace($ds,$auDN,$entry); - if ($results){ - merge_ipranges($auDN); - update_dhcpmtime(array()); - echo "<br>FIPBs erfolgreich angepasst!<br>" ; - return 1; - }else{ - echo "<br>Fehler beim Anpassen der FIPBs!<br>" ; - } - }else{ - echo "<br>Fehler beim ändern des Subnet Namens (IP)!<br>" ; - } - }else{ - printf("<br>Neues Subnet %s nicht im verfuegbaren IP Bereich!<br>", $newcn[0] ); - return 0; - } -} - -# wird eigentlich nicht benötigt wenn host deklarationen nicht in subnet scope sind ... -function cleanup_del_dhcpsubnet ($dhcpsubnetDN){ - - global $ds, $suffix, $auDN, $ldapError; - - $filter = "(&(objectclass=dhcpHost)(dhcphlpcont=$dhcpsubnetDN))"; - if(!($result = uniLdapSearch($ds, "ou=RIPM,".$suffix, $filter, array("dn"), "dn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - $delentry ['dhcphlpcont'] = $dhcpsubnetDN; - foreach ($result as $item){ - ldap_mod_del($ds, $item['dn'], $delentry); - } -} - - -# wird eigentlich nicht benötigt wenn host deklarationen nicht in subnet scope sind ... -function adjust_dhcpsubnet_dn ($newdhcpsubnetDN,$dhcpsubnetDN){ - - global $ds, $suffix, $auDN, $ldapError; - - $filter = "(&(objectclass=dhcpHost)(dhcphlpcont=$dhcpsubnetDN))"; - if(!($result = uniLdapSearch($ds, "ou=RIPM,".$suffix, $filter, array("dn"), "dn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - $modentry ['dhcphlpcont'] = $newdhcpsubnetDN; - foreach ($result as $item){ - ldap_mod_replace($ds, $item['dn'], $modentry); - } -} - - -# Nach Änderung der Host IP Adresse, überprüfen ob neue IP noch mit Subnet übereinstimmt -# Falls keine Ãœbereinstimmung mehr, dann Subnetzuordnung aus Host löschen. -# wird eigentlich nicht benötigt wenn host deklarationen nicht in subnet scope sind ... -function adjust_hostip_dhcpsubnet($ip,$hostDN,$dhcphlpcont) { - - global $ds, $suffix, $auDN, $ldapError; - - $subnet = ldap_explode_dn($dhcphlpcont, 1); - $expsub = explode('.', $subnet[0]); - print_r($expsub); echo "<br>"; - $expip = explode('.', $ip); - print_r($expsip); echo "<br>"; - if ($expip[0] != $expsub[0] || $expip[1] != $expsub[1] || $expip[2] != $expsub[2]){ - $entrydhcp ['dhcphlpcont'] = array(); - ldap_mod_del($ds,$hostDN,$entrydhcp); - echo "Host mit neuer IP <b>".$ip."</b> wurde aus DHCP Subnet <b>".$subnet[0]."</b> entfernt<br><br>"; - } -} - -function check_ip_in_subnet($ip,$subnet) { - - global $ds, $suffix, $auDN, $ldapError; - $ipchunks = explode('.',$ip); - $netchunks = explode('.',$subnet); - $return = 0; - for ($i=1; $i<4; $i++){ - if ( $netchunks[$i] == "0" ){ - if ( $ipchunks[$i-1] == $netchunks[$i-1] ){ - $return = 1; - } - break; - } - } - if ($return) { return 1; }else{ return 0; } -} - -######################### -# Pools -function add_dhcppool ($dhcpsubnetdn,$range,$unknownclients,$dhcpservicedn,$rbssrvdn){ - - global $ds, $suffix, $auDN, $ldapError; - - if(!($result = uniLdapSearch($ds, "cn=dhcp,".$auDN,"(objectclass=*)", array("cn"), "dn", "list", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - - $dhcpcn_array = array(); - foreach ($result as $item){ - $dhcpcn_array [] = $item['cn']; - } - print_r($dhcpcn_array);echo "<br><br>"; - for ($i=0;$i<100;$i++){ - if ( array_search ( "Pool".$i, $dhcpcn_array ) === false ){ - $cn = "Pool".$i; - break; - } - } - $dhcppoolDN = "cn=".$cn.",cn=dhcp,".$auDN; - - $entrydhcp ['objectclass'][0] = "dhcpPool"; - $entrydhcp ['objectclass'][1] = "dhcpOptions"; - $entrydhcp ['objectclass'][2] = "top"; - $entrydhcp ['cn'] = $cn; - $entrydhcp ['dhcphlpcont'] = $dhcpsubnetdn; - $entrydhcp ['dhcprange'] = $range; - if ($unknownclients == "allow"){ - $entrydhcp ['dhcpoptallow'] = "unknown-clients"; - }elseif ($unknownclients == "ignore"){ - $entrydhcp ['dhcpoptignore'] = "unknown-clients"; - }else{ - $entrydhcp ['dhcpoptdeny'] = "unknown-clients"; - } - if ( $rbssrvdn != "none" ){ - $entrydhcp ['hlprbservice'] = $rbssrvdn; - } - - print_r($dhcppoolDN);echo "<br><br>"; - print_r($entrydhcp);echo "<br><br>"; - - if ($result = ldap_add($ds,$dhcppoolDN,$entrydhcp)){ - return 1; - }else{return 0;} - -} - - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/lib/host_management_functions.php b/ldap-site-mngmt/webinterface/lib/host_management_functions.php deleted file mode 100644 index 502dccb2..00000000 --- a/ldap-site-mngmt/webinterface/lib/host_management_functions.php +++ /dev/null @@ -1,474 +0,0 @@ -<?php - -/** -* host_management_functions.php - Rechner und Gruppen Management Funktions-Bibliothek -* Diese Bibliothek enthält alle Funktionen für die Verwaltung von Rechnern und Rechnergruppen, -* sowie von MachineConfig-Objekten -* -* @param string ldapError -* @param resource ds -* -* @author Tarik Gasmi -* @copyright Tarik Gasmi -*/ - -# Konfiguration laden -require_once("config.inc.php"); - - -$ldapError = null; - -################################################################################################### - -############################################################################### -# Funktionen zur Verwaltung von Rechnern -# - -# Ändern des DN des Rechners, d.h. beim Ändern des Attributes 'hostname' -function modify_host_dn($hostDN, $newhostDN){ - - global $ds, $suffix, $auDN, $ldapError; - - if (move_subtree($hostDN,$newhostDN)){ - adjust_dn_entries($hostDN,$newhostDN); - - # Gruppen anpassen in denen Host Member ist - $groups = get_groups_member($auDN,array("dn","member"),$hostDN); - # print_r($groups); echo "<br>"; - if (count($groups != 0)){ - - foreach ($groups as $group){ - #$entry = array("member"); - if ( count($group['member']) > 1 ){ - for($i=0; $i<count($group['member']); $i++){ - if ($hostDN == $group['member'][$i]){ - $entry ['member'][$i] = $newhostDN; - }else{ - $entry ['member'][$i] = $group['member'][$i]; - } - } - # print_r($entry); echo "<br>"; - ldap_mod_replace($ds,$group['dn'],$entry); - } - if ( count($group['member']) == 1 && $group['member'] == $hostDN ){ - $entry['member'] = $newhostDN; - # print_r($entry); echo ""; - ldap_mod_replace($ds,$group['dn'],$entry); - } - } - } - - } -} - - -# Rechner neu anlegen -function add_host($hostDN,$hostname,$hostdesc,$mac,$ip,$atts,$dhcp){ - - global $ds, $suffix, $auDN, $assocdom, $ldapError; - - $syntax = new Syntaxcheck; - - $entryhost ['objectclass'][0] = "Host"; - $entryhost ['objectclass'][1] = "dhcpHost"; - $entryhost ['objectclass'][2] = "dhcpOptions"; - $entryhost ['objectclass'][3] = "top"; - $entryhost ["hostname"] = $hostname; - $entryhost ["domainname"] = $assocdom; - if ($hostdesc != ""){$entryhost ["description"] = $hostdesc;} - if ($mac != "" && $syntax->check_mac_syntax($mac) ){ - $entryhost ["hwaddress"] = $mac; - if ($dhcp != "none" && $dhcp != ""){ - $entryhost ["dhcphlpcont"] = $dhcp; - } - }else{ - echo "Keine MAC Adresse angelegt. Kein Eintrag im DHCP.<br>"; - } - foreach (array_keys($atts) as $key){ - if ($atts[$key] != ""){ - $entryhost[$key] = $atts[$key]; - } - } - - print_r($entryhost); echo "<br>"; - if ($result = ldap_add($ds, $hostDN, $entryhost)){ - - if($ip != ""){ - if( $syntax->check_ip_syntax($ip) ){ - $newip_array = array($ip,$ip); - $newip = implode('_',$newip_array); - print_r($newip); echo "<br><br>"; - if (new_ip_host($newip,$hostDN,$auDN)){ - echo "IP erfolgreich eingetragen<br><br>"; - if ($mac != "" && $dhcp != "none" && $dhcp != ""){ - $entryfa ["dhcpoptfixed-address"] = "ip"; - if (ldap_mod_add($ds,$hostDN,$entryfa)){ - echo "DHCP Fixed-Address erfolgreich auf IP gesetzt<br><br>"; - }else{ - echo "Fehler beim Setzen der DHCP Fixed-Address<br><br>"; - } - } - }else{ - echo "Fehler beim eintragen der IP<br><br>"; - } - }else{ - echo "Falsche IP Syntax! IP nicht eingetragen<br><br>"; - } - } - echo "Rechner erfolgreich eingetragen"; - if ($mac != "" && $dhcp != "none" && $dhcp != ""){ - update_dhcpmtime(array()); - } - return 1; - } - else{ - $mesg = "Fehler beim eintragen des neuen Rechners!"; - return 0; - } -} - - -# Rechner löschen -function delete_host($hostDN){ - - global $ds, $suffix, $auDN, $ldapError; - - $hostdata = get_node_data($hostDN,array("hwaddress","ipaddress")); - - # IP Adresse freigeben - if ($hostdata['ipaddress'] != ""){ - delete_ip_host($hostDN,$auDN); - } - - if (dive_into_tree_del($hostDN,"")){ - - # alle DN Objekte in denen Rechner stand ebenfalls löschen - # Member in Groups - $groups = get_groups_member($auDN,array("dn","cn"),$hostDN); - # echo "Rechner aus den Gruppen entfernen: <br>"; print_r($groups); echo "<br>"; - if (count($groups) != 0){ - $entrydel ['member'] = $hostDN; - foreach ($groups as $group){ - echo "Entferne gelöschten Rechner aus Gruppe <b>".$group['cn']."</b> <br>"; - $resultG = ldap_mod_del($ds, $group['dn'], $entrydel); - - # Filename in Gruppen-PXEs - $pxes = get_pxeconfigs($group['dn'],array("dn","cn")); - if ( count($pxes) != 0 && $hostdata['hwaddress'] != ""){ - foreach ($pxes as $pxe){ - $delfilename ['filename'] = "01-".$hostdata['hwaddress']; - $resultP = ldap_mod_del($ds,$pxe['dn'],$delfilename); - echo "Entferne MAC des gelöschten Rechners aus Gruppen-PXE <b>".$pxe['cn']."</b> <br>"; - } - } - } - } - - # DHCP, DNS, RBS Server ... noch todo - # ... - return 1; - } - else{ - return 0; - } -} - -function check_hostname($hostname){ - - global $ds, $suffix, $auDN, $ldapError; - - $brothercheck = 0; - $brotherhosts = get_hosts($auDN,array("hostname"),""); - - foreach ($brotherhosts as $item){ - if( $item['hostname'] == $hostname ){ - $brothercheck = 1; - break; - } - } - return $brothercheck; -} - -############################################################################### -# Funktionen zur Verwaltung von Rechnergruppen -# - -# Gruppen DN ändern -function modify_group_dn($groupDN, $newgroupDN){ - - global $ds, $suffix, $ldapError; - - if (move_subtree($groupDN,$newgroupDN)){ - adjust_dn_entries($groupDN,$newgroupDN);} -} - - -# Gruppe neu anlegen -function add_group($groupDN,$groupcn,$groupdesc,$addmember){ - - global $ds, $suffix, $auDN, $assocdom, $ldapError; - - $entrygroup ['objectclass'][0] = "groupOfComputers"; - $entrygroup ['objectclass'][1] = "top"; - $entrygroup ["cn"] = $groupcn; - if ($groupdesc != ""){$entrygroup ["description"] = $groupdesc;} - - # Members anlegen (zuerst 'none' rausnehmen) - $n = array_search('none',$addmember); - if ($n === 0 ){array_splice($addmember, $n, 1);} - - if (count($addmember) != 0){ - $i = 0; - foreach ($addmember as $member){ - $exp = explode('_',$member); - $entrygroup['member'][$i] = $exp[0]; - $i++; - } - } - print_r($entrygroup); echo "<br>"; - - if ($result = ldap_add($ds, $groupDN, $entrygroup)){ - return 1; - } - else{ - return 0; - } -} - - -# Gruppe löschen -function delete_group($groupDN){ - - global $ds, $suffix, $auDN, $ldapError; - - if (dive_into_tree_del($groupDN,"")){ - - # alle DN Objekte in denen Gruppe stand ebenfalls löschen - # DHCP ... noch todo - - return 1; - } - else{ - return 0; - } -} - - -function add_groupmember($groupDN,$member){ - - global $ds, $suffix, $auDN, $ldapError; - -} - - -function delete_groupmember($groupDN,$member){ - - global $ds, $suffix, $auDN, $ldapError; - -} - - -############################################################################### -# Funktionen zur Verwaltung von MachineConfigs -# - -function check_timerange($mcday,$mcbeg,$mcend,$nodeDN,$excepttimerange){ - - global $ds, $suffix, $auDN, $ldapError; - - $brothers = get_machineconfigs($nodeDN,array("timerange")); - # keine Ãœberschneidungen pro Spez.Ebene zulassen - #print_r($brothers); echo "<br><br>"; - if (count($brothers) != 0){ - - $intersect = 0; - foreach ($brothers as $item){ - - # Fall, dass Brother mehrere TimeRanges hat - if (count($item['timerange']) > 1){ - foreach ($item['timerange'] as $tr){ - - if($tr != $excepttimerange){ - $exptime = explode('_',$tr); - $bmcday = $exptime[0]; - $bmcbeg = $exptime[1]; - $bmcend = $exptime[2]; - #echo "mcday:"; print_r($mcday); echo "<br>"; - #echo "bmcday:"; print_r($bmcday); echo "<br>"; - #echo "mcbeg:"; print_r($mcbeg); echo "<br>"; - #echo "bmcbeg:"; print_r($bmcbeg); echo "<br>"; - #echo "mcend:"; print_r($mcend); echo "<br>"; - #echo "bmcend:"; print_r($bmcend); echo "<br>"; - - if ($mcday == $bmcday){ - if ( $mcbeg > $bmcend || $mcend < $bmcbeg ){ - # keine Ãœberschneidung in der Uhrzeit - }else{ - # Uhrzeit Ãœberschneidung - $intersect = 1; - $intersecttr = $bmcday."_".$bmcbeg."_".$bmcend; - break; - } - } - } - - } - } - # Fall, dass Brother nur eine TimeRange hat - elseif (count($item['timerange']) == 1){ - - if($item['timerange'] != $excepttimerange){ - $exptime = explode('_',$item['timerange']); - $bmcday = $exptime[0]; - $bmcbeg = $exptime[1]; - $bmcend = $exptime[2]; - #echo "mcday:"; print_r($mcday); echo "<br>"; - #echo "bmcday:"; print_r($bmcday); echo "<br>"; - #echo "mcbeg:"; print_r($mcbeg); echo "<br>"; - #echo "bmcbeg:"; print_r($bmcbeg); echo "<br>"; - #echo "mcend:"; print_r($mcend); echo "<br>"; - #echo "bmcend:"; print_r($bmcend); echo "<br>"; - - if ($mcday == $bmcday){ - if ( $mcbeg > $bmcend || $mcend < $bmcbeg ){ - # keine Ãœberschneidung in der Uhrzeit - }else{ - # Uhrzeit Ãœberschneidung - $intersect = 1; - $intersecttr = $bmcday."_".$bmcbeg."_".$bmcend; - break; - } - } - } - } - } - #echo "intersect: "; print_r($intersect); echo "<br>"; - if ($intersect == 1){ - echo "<b>[".$mcday."_".$mcbeg."_".$mcend."]</b> überschneidet sich mit der - bereits existierende <b>Time Range [".$intersecttr."]</b> !"; - return 0; - }else{ - return 1; - } - }else{ - return 1; - } -} - - - -function add_mc($mcDN,$mccn,$mctimerange,$mcdesc,$mcattribs){ - - global $ds, $suffix, $auDN, $ldapError; - - $mcentry ['objectclass'][0] = "MachineConfig"; - $mcentry ['objectclass'][1] = "top"; - $mcentry ['cn'] = $mccn; - if ($mctimerange != ""){$mcentry ['timerange'] = $mctimerange;} - if ($mcdesc != ""){$mcentry ['description'] = $mcdesc;} - if ($mcdesc == ""){$mcentry ['description'] = $mccn;} - foreach (array_keys($mcattribs) as $key){ - if ($mcattribs[$key] != ""){ - $mcentry[$key] = $mcattribs[$key]; - } - } - - #print_r($mcentry); echo "<br>"; - #print_r($mcDN); echo "<br>"; - if (ldap_add($ds,$mcDN,$mcentry)){ - return 1; - } - else{ - return 0; - } -} - -# MachineConfig CN (DN) ändern -function modify_mc_dn($mcDN, $newmcDN){ - - global $ds, $suffix, $ldapError; - - if (move_subtree($mcDN,$newmcDN)){ - return 1; - }else{ - return 0; - } -} - -function change_mc_timerange($mcDN,$newmcDN,$mctimerange){ - - global $ds, $suffix, $auDN, $ldapError; - - # move tree - if (move_subtree($mcDN,$newmcDN)){ - # timerange ändern - $entrymc ['timerange'] = $mctimerange; - if (ldap_mod_replace($ds,$newmcDN,$entrymc)){ - return 1; - } - else{ - return 0; - } - } - else{ - return 0; - } -} - -##################################################################### -# Natürliches Sortieren (x.x.4.9 vor x.x.4.11 ) von mehr-dim Arrays der Art: -# Array ( -# [0] => Array ( -# [hostname] = client01 -# [ipaddress] = 132.230.4.11 -# ) -# [1] => Array ( -# [hostname] = client02 -# [ipaddress] = 132.230.4.9 -# ) -# ) - -/** - * @return Returns the array sorted as required - * @param $aryData Array containing data to sort - * @param $strIndex Name of column to use as an index - * @param $strSortBy Column to sort the array by - * @param $strSortType String containing either asc or desc [default to asc] - * @desc Naturally sorts an array using by the column $strSortBy - */ -function array_natsort($aryData, $strIndex, $strSortBy, $strSortType=false){ - - // if the parameters are invalid - if (!is_array($aryData) || !$strIndex || !$strSortBy){ - // return the array - return $aryData; - } - // create our temporary arrays - $arySort = $aryResult = array(); - // loop through the array - foreach ($aryData as $aryRow){ - // set up the value in the array - $arySort[$aryRow[$strIndex]] = $aryRow[$strSortBy]; - } - // apply the natural sort - natsort($arySort); - // if the sort type is descending - if ($strSortType=="desc"){ - // reverse the array - arsort($arySort); - } - // loop through the sorted and original data - foreach ($arySort as $arySortKey => $arySorted){ - foreach ($aryData as $aryOriginal){ - // if the key matches - if ($aryOriginal[$strIndex]==$arySortKey){ - // add it to the output array - array_push($aryResult, $aryOriginal); - } - } - } - - return $aryResult; -} - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/lib/ip_management_functions.php b/ldap-site-mngmt/webinterface/lib/ip_management_functions.php deleted file mode 100644 index e5c30eca..00000000 --- a/ldap-site-mngmt/webinterface/lib/ip_management_functions.php +++ /dev/null @@ -1,1553 +0,0 @@ -<?php - -/** -* ip_management_functions.php - IP Management Funktions-Bibliothek -* Diese Bibliothek enthält alle Funktionen für die Verwaltung der IP Adressen. -* -* @param string ldapError -* @param resource ds -* -* @author Tarik Gasmi -* @copyright Tarik Gasmi -*/ - -# Konfiguration laden -require_once("config.inc.php"); - -$ldapError = null; - - -#################################################################################### -# Basisfunktionen zur Verarbeitung von IP Ranges - -/*PHP Funktionen ip2long(), long2ip() machen dasselbe und werden verwendet -function ip_dot_to_long($ip_dot) -{ - $ip_long = unpack('N*', pack('C*', preg_split('/\./',$ip_dot))); - return $ip_long; -} - -function ip_long_to_dot($ip_long) -{ - $ip_dot = join('.',unpack('C*',pack('N',$ip_long))); - return $ip_dot; -}*/ - -/** -* check_ip_in_iprange($iprange1, $iprange2) -* Prueft ob erste IP Range in zweiter IP Range enthalten ist. -* -* @param string iprange1 erste IP Range -* @param string iprange2 zweite IP Range -* -* @return boolean Erfolg bzw. Misserfolg -* -* @author Tarik Gasmi -*/ -function check_ip_in_iprange($iprange1,$iprange2) -{ - $ipr1exploded = explode('_',$iprange1); - $ipr2exploded = explode('_',$iprange2); - $ipr1s = ip2long($ipr1exploded[0]); - $ipr1e = ip2long($ipr1exploded[1]); - $ipr2s = ip2long($ipr2exploded[0]); - $ipr2e = ip2long($ipr2exploded[1]); - - if( $ipr1s >= $ipr2s && $ipr1e <= $ipr2e ){ return 1;} - else{ return 0;} -} - - -/** -* split_iprange($iprange1, $iprange2) -* Entnimmt erste IP Range aus der zweiten IP Range und gibt bei Erfolg Array verbleibender -* IP Ranges zurueck. -* -* @param string iprange1 erste IP Range -* @param string iprange2 zweite IP Range -* -* @return array bei Erfolg bzw. boolean 0 bei Misserfolg -* -* @author Tarik Gasmi -*/ -function split_iprange($iprange1,$iprange2) -{ - $iprange3; - $iprange4; - $ipranges = array(); - - if (check_ip_in_iprange($iprange1,$iprange2) == 1) - { - $ipr1exploded = explode('_',$iprange1); - $ipr2exploded = explode('_',$iprange2); - $ipr1s = ip2long($ipr1exploded[0]); - $ipr1e = ip2long($ipr1exploded[1]); - $ipr2s = ip2long($ipr2exploded[0]); - $ipr2e = ip2long($ipr2exploded[1]); - - $ipr3s = $ipr2s; - $ipr3e = $ipr1s - 1; - $ipr4s = $ipr1e + 1; - $ipr4e = $ipr2e; - - if ($ipr3s <= $ipr3e){$iprange3 = long2ip($ipr3s)."_".long2ip($ipr3e); $ipranges[] = $iprange3;} - if ($ipr4s <= $ipr4e){$iprange4 = long2ip($ipr4s)."_".long2ip($ipr4e); $ipranges[] = $iprange4;} - - #echo "MATCH!<br>"; - return $ipranges; - } - else - { - #echo "IPRange1 not in IPRange2: "; - return 0; - } -} - - -/** -* intersect_ipranges($iprange1, $iprange2) -* Bildet die Schnittmenge zweier IP Ranges. -* -* @param string iprange1 erste IP Range -* @param string iprange2 zweite IP Range -* -* @return string iprange3 Schnitt-IP-Range -* -* @author Tarik Gasmi -*/ -function intersect_ipranges($iprange1,$iprange2) -{ - $ipr1exploded = explode('_',$iprange1); - $ipr2exploded = explode('_',$iprange2); - $ipr1s = ip2long($ipr1exploded[0]); - $ipr1e = ip2long($ipr1exploded[1]); - $ipr2s = ip2long($ipr2exploded[0]); - $ipr2e = ip2long($ipr2exploded[1]); - - if ( $ipr1s >= $ipr2s ){$ipr3s = $ipr1s;}else{$ipr3s = $ipr2s;} - if ( $ipr1e <= $ipr2e ){$ipr3e = $ipr1e;}else{$ipr3e = $ipr2e;} - - if ($ipr3s <= $ipr3e){ - $iprange3 = long2ip($ipr3s)."_".long2ip($ipr3e); - return $iprange3; - } - else{ - return ""; - echo "No Intersection<br>"; - } -} - - -/** -* merge_2_ipranges($iprange1, $iprange2) -* Vereinigt 2 IP Ranges zu einer IP Range, falls sie adjazent sind oder sich ueberschneiden. -* -* @param string iprange1 erste IP Range -* @param string iprange2 zweite IP Range -* -* @return string iprange3 bei Erfolg bzw. boolean 0 bei Misserfolg. -* -* @author Tarik Gasmi -*/ -function merge_2_ipranges($iprange1,$iprange2) -{ - - $ipr1exploded = explode('_',$iprange1); - $ipr2exploded = explode('_',$iprange2); - $ipr1s = ip2long($ipr1exploded[0]); - $ipr1e = ip2long($ipr1exploded[1]); - $ipr2s = ip2long($ipr2exploded[0]); - $ipr2e = ip2long($ipr2exploded[1]); - - if ( ($ipr1e + 1) >= $ipr2s && $ipr1s <= ($ipr2e + 1) ){ - if ($ipr1s <= $ipr2s){ $ipr3s = $ipr1s; }else{ $ipr3s = $ipr2s; } - if ($ipr1e <= $ipr2e){ $ipr3e = $ipr2e; }else{ $ipr3e = $ipr1e; } - - if ($ipr3s <= $ipr3e){ - $iprange3 = long2ip($ipr3s)."_".long2ip($ipr3e); - printf("Merging: %s and %s -> %s<br>",$iprange1,$iprange2,$iprange3); - return $iprange3; - } - else{ - # printf("No Merging possible: %s and %s<br>",$iprange1,$iprange2); - return 0; } - } - else{ - # printf("No Merging possible: %s and %s<br>",$iprange1,$iprange2); - return 0; - } -} - - -######################################################################################### -# IP Management LDAP Grundfunktionen - -/** -* get_freeipblocks_au($auDN) -* Holt die FreeIPBlocks einer AU und gibt sie in einem Array zurueck. -* -* @param string auDN Distinguished Name des LDAP AU-Objektes -* -* @return array fipb_array FreeIPBlocks der AU. -* -* @author Tarik Gasmi -*/ -function get_freeipblocks_au($auDN) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, $auDN, "objectclass=*", array("FreeIPBlock"), "", "one", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "search problem"; - die; - } else { - $fipb_array = array(); - $result = ldapArraySauber($result); - foreach ($result as $item){ - if (count($item['freeipblock']) > 1){ - $fipb_array = $item['freeipblock']; - } - else{ - $fipb_array[] = $item['freeipblock']; - } - } - } - return $fipb_array; -} - -/** -* get_maxipblocks_au($auDN) -* Holt die MaxIPBlocks einer AU und gibt sie in einem Array zurueck. -* -* @param string auDN Distinguished Name des LDAP AU-Objektes -* -* @return array mipb_array MaxIPBlocks der AU. -* -* @author Tarik Gasmi -*/ -function get_maxipblocks_au($auDN) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, $auDN, "objectclass=*", array("MaxIPBlock"), "", "one", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "search problem"; - die; - } else { - $result = ldapArraySauber($result); - foreach ($result as $item){ - if (count($item['maxipblock']) > 1){ - $mipb_array = $item['maxipblock']; - } - else{ - $mipb_array[] = $item['maxipblock']; - } - } - } - return $mipb_array; -} - -# benutze IP Ranges (Rechner, Ranges, Delegs) -function get_used_ipblocks_au($auDN) -{ - global $ds, $suffix, $ldapError; - - $host_ips = array(); - $dhcps_ips = array(); - $dhcpr_ips = array(); - $deleg_ips = array(); - # Rechner IPs - if(!($result = uniLdapSearch($ds, "cn=computers,".$auDN, "(objectclass=Host)", array("IPAddress"), "", "list", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } else { - $result = ldapArraySauber($result); - foreach ($result as $item){ - if (count($item['ipaddress']) != 0){ - $host_ips [] = $item['ipaddress']; - } - } - } - echo "Rechner IPs:<br>"; print_r($host_ips); echo "<br><br>"; - - # DHCP Subnets - if(!($result = uniLdapSearch($ds, "cn=dhcp,".$auDN, "(objectclass=dhcpSubnet)", array("cn"), "", "list", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } else { - $result = ldapArraySauber($result); - foreach ($result as $item){ - $dhcps_ips [] = $item['cn']."_".$item['cn']; - } - } - echo "DHCP Subnets:<br>"; print_r($dhcps_ips); echo "<br><br>"; - - # DHCP Pool Ranges - if(!($result = uniLdapSearch($ds, "cn=dhcp,".$auDN, "(objectclass=dhcpPool)", array("dhcpRange"), "", "list", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } else { - $result = ldapArraySauber($result); - foreach ($result as $item){ - if (count($item['dhcprange']) > 1){ - foreach ($item['dhcprange'] as $range){ - $dhcpr_ips [] = $range; - } - } - elseif (count($item['dhcprange']) == 1){ - $dhcpr_ips [] = $item['dhcprange']; - } - } - } - echo "DHCP Pool Ranges:<br>"; print_r($dhcpr_ips); echo "<br><br>"; - - # Delegierte IPs - $childau_array = get_childau($auDN,array("dn","ou","maxipblock")); - #print_r($childau_array); - if (count($childau_array) != 0){ - foreach ($childau_array as $childau){ - if (count($childau['maxipblock']) > 1){ - foreach ($childau['maxipblock'] as $mipb){ - $deleg_ips [] = $mipb; - } - }elseif (count($childau['maxipblock']) == 1){ - $deleg_ips [] = $childau['maxipblock']; - } - } - } - echo "Delegiert IP Blocks:<br>"; print_r($deleg_ips); echo "<br><br>"; - - $used_ips = array_merge($host_ips, $dhcps_ips, $dhcpr_ips, $deleg_ips); - sort($used_ips); - $used_ips = merge_ipranges_array($used_ips); - - return $used_ips; -} - - -/** -* get_host_ip($hostDN) -* Holt die IP Adressen eines Hosts und gibt sie in einem Array zurueck. -* -* @param string hostDN Distinguished Name des LDAP Host-Objektes -* -* @return array host_array IPs des Hosts. -* -* @author Tarik Gasmi -*/ -function get_host_ip($hostDN) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, $hostDN, "(objectclass=Host)", array("hostName","IPAddress","dhcpOptFixed-address"), "hostName", "one", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - return 0; - } - else { - $result = ldapArraySauber($result); - $host_array = array(); - - foreach ($result as $item){ - $host_array['hostname'] = $item['hostname']; - $host_array['ipaddress'] = $item['ipaddress']; - #if ( $item['dhcpoptfixed-address'] != "" ){ - $host_array['dhcpoptfixed-address'] = $item['dhcpoptfixed-address']; - #} - # $host_array = array('hostname' => $item['hostname'], 'ipaddress' => $item['ipaddress']); - } - return $host_array; - } -} - - -/** -* get_dhcp_range($dhcpobjectDN) -* Holt die IP Ranges eines DHCP Subnets/Pools und gibt sie in einem Array zurueck. -* -* @param string dhcpobjectDN Distinguished Name des LDAP DHCP-Objektes -* -* @return array dhcp_array IP Ranges des Subnets/Pools. -* -* @author Tarik Gasmi -*/ -function get_dhcp_range($dhcpobjectDN) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, $dhcpobjectDN, "(objectclass=*)", array("cn","dhcpRange"), "cn", "one", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - return 0; - } - else { - $result = ldapArraySauber($result); - $dhcp_array = array(); - - foreach ($result as $item){ - $dhcp_array['cn'] = $item['cn']; - $dhcp_array['dhcprange'] = $item['dhcprange']; - } - return $dhcp_array; - } -} - -function get_dhcp_range2($dhcpobjectDN) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, $dhcpobjectDN, "(objectclass=*)", array("dhcpRange"), "", "one", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - return 0; - } - else { - $result = ldapArraySauber($result); - $dhcp_array = array(); - foreach ($result as $item){ - if ( count($item['dhcprange']) == 1 ){ - $dhcp_array[] = $item['dhcprange']; - } - if ( count($item['dhcprange']) > 1 ){ - foreach ($item['dhcprange'] as $range){ - $dhcp_array[] = $range; - } - } - } - return $dhcp_array; - } -} - - -/** -* merge_ipranges($auDN) -* Nimmt die Arrays von IP Ranges eines AU Objektes, MaxIPBlocks und FreeIPBlocks, und vereinigt -* rekusriv alle adjazenten/sich ueberschneidenden IP Ranges zu einer IP Range. -* -* @param string auDN Distinguished Name des LDAP AU-Objektes -* -* @author Tarik Gasmi -*/ -function merge_ipranges($auDN) -{ - global $ds, $suffix, $ldapError; - - $fipb_array = get_freeipblocks_au($auDN); - $mipb_array = get_maxipblocks_au($auDN); - if ( count($fipb_array) > 1) sort($fipb_array); - if ( count($mipb_array) > 1) sort($mipb_array); - - $c = count($fipb_array); - for ($i=0; $i < $c; $i++){ - for ($j=$i+1; $j < $c; $j++){ - if ( merge_2_ipranges($fipb_array[$i],$fipb_array[$j])){ - $fipb_array[$i] = merge_2_ipranges($fipb_array[$i],$fipb_array[$j]); - array_splice($fipb_array, $j, 1); - $c--; - $i=-1; - break; - } - } - } - #print_r($fipb_array);printf("<br>"); - foreach ( $fipb_array as $item ){ - $entry ['FreeIPBlock'][] = $item; - } - $results = ldap_mod_replace($ds,$auDN,$entry); - if ($results) echo "FIPBs erfolgreich zusammengefasst!<br>" ; - else echo "Fehler beim eintragen der FIPBs!<br>"; - - $d = count($mipb_array); - for ($i=0; $i < $d; $i++){ - for ($j=$i+1; $j < $d; $j++){ - if ( merge_2_ipranges($mipb_array[$i],$mipb_array[$j])){ - $mipb_array[$i] = merge_2_ipranges($mipb_array[$i],$mipb_array[$j]); - array_splice($mipb_array, $j, 1); - $d--; - $i=-1; - break; - } - } - } - #print_r($mipb_array);printf("<br>"); - foreach ( $mipb_array as $item ){ - $entry2 ['MaxIPBlock'][] = $item; - } - $results = ldap_mod_replace($ds,$auDN,$entry2); - if ($results) echo "MIPBs erfolgreich zusammengefasst!<br>" ; - else echo "Fehler beim eintragen der MIPBs!<br>"; -} - -function merge_dhcpranges($dhcpobjectDN) -{ - global $ds, $suffix, $ldapError; - - $dhcp_array = get_dhcp_range2($dhcpobjectDN); - if ( count($dhcp_array) > 1) sort($dhcp_array); - - $c = count($dhcp_array); - for ($i=0; $i < $c; $i++){ - for ($j=$i+1; $j < $c; $j++){ - if ( merge_2_ipranges($dhcp_array[$i],$dhcp_array[$j])){ - $dhcp_array[$i] = merge_2_ipranges($dhcp_array[$i],$dhcp_array[$j]); - array_splice($dhcp_array, $j, 1); - $c--; - $i=-1; - break; - } - } - } - foreach ( $dhcp_array as $item ){ - $entry ['dhcprange'][] = $item; - } - $results = ldap_mod_replace($ds,$dhcpobjectDN,$entry); - if ($results) echo "<br>DHCP Ranges erfolgreich zusammengefasst!<br><br>" ; - else echo "<br>Fehler beim eintragen der DHCP Ranges!<br><br>"; -} - -function merge_ipranges_array($ipranges_array) -{ - global $ds, $suffix, $ldapError; - - sort($ipranges_array); - $c = count($ipranges_array); - for ($i=0; $i < $c; $i++){ - for ($j=$i+1; $j < $c; $j++){ - if ( merge_2_ipranges($ipranges_array[$i],$ipranges_array[$j])){ - $ipranges_array[$i] = merge_2_ipranges($ipranges_array[$i],$ipranges_array[$j]); - array_splice($ipranges_array, $j, 1); - $c--; - $i=-1; - break; - } - } - } - return $ipranges_array; - # Rückgabewert ... -} - - - -/** -* new_ip_host($ip,$hostDN,$auDN) -* Weist einem Host eine IP Adresse neu zu, falls sie vergeben werden darf (in den FreeIPBlocks -* enthalten ist), und passt die FreeIPBlocks der AU an. -* -* @param string ip IP Adresse, die zugewiesen werden soll -* @param string hostDN Distinguished Name des LDAP Host-Objektes -* @param string auDN Distinguished Name des LDAP AU-Objektes -* -* @return boolean 1 bei Erfolg bzw. 0 bei Misserfolg -* -* @author Tarik Gasmi -*/ -function new_ip_host($ip,$hostDN,$auDN) -{ - global $ds, $suffix, $ldapError; - - $fipb_array = get_freeipblocks_au($auDN); - - for ($i=0; $i < count($fipb_array); $i++){ - if ( split_iprange($ip,$fipb_array[$i]) != 0 ){ - $ipranges = split_iprange($ip,$fipb_array[$i]); - array_splice($fipb_array, $i, 1, $ipranges); - break; - } - } - - if ($i < count($fipb_array) ){ - # ldap_mod_replace -> Array fipb_array aktualisiert die FIPB in AU mit $auDN - foreach ( $fipb_array as $item ){ - $entry ['FreeIPBlock'][] = $item; - } - - $results = ldap_mod_replace($ds,$auDN,$entry); - if ($results){ - echo "<br>Neue FIPBs erfolgreich eingetragen!<br>" ; - - # ldap_mod_add -> IPAddress = $ip , in Host mit $hostDN - $ipentry ['IPAddress'] = $ip; - $results = ldap_mod_add($ds,$hostDN,$ipentry); - if ($results){ - echo "<br>IP Adresse erfolgreich eingetragen!<br>" ; - return 1; - }else{ - echo "<br>Fehler beim eintragen der IP Adresse!<br>"; - return 0; - } - }else{ - echo "<br>Fehler beim eintragen der FIPBs!<br>"; - return 0; - } - } - else{ - printf("<br>IP Adresse %s nicht im verfuegbaren Bereich!<br>", $ip ); - return 0; - } -} - -/** -* new_ip_dhcprange($ip,$dhcpobjectDN,$auDN) -* Weist einem DHCP Subnet/Pool eine IP Range neu zu, falls sie vergeben werden darf (in den FreeIPBlocks -* enthalten ist), und passt die FreeIPBlocks der AU an. -* -* @param string ip IP Range, die zugewiesen werden soll -* @param string dhcpobjectDN Distinguished Name des LDAP DHCP-Objektes -* @param string auDN Distinguished Name des LDAP AU-Objektes -* -* @return boolean 1 bei Erfolg bzw. 0 bei Misserfolg -* -* @author Tarik Gasmi -*/ -function new_ip_dhcprange($ip,$dhcpobjectDN,$auDN) -{ - global $ds, $suffix, $ldapError; - - $fipb_array = get_freeipblocks_au($auDN); - - #print_r($fipb_array); - - for ($i=0; $i < count($fipb_array); $i++){ - if ( split_iprange($ip,$fipb_array[$i]) != 0 ){ - $ipranges = split_iprange($ip,$fipb_array[$i]); - array_splice($fipb_array, $i, 1, $ipranges); - break; - } - } - - if ($i < count($fipb_array) ){ - # ldap_mod_replace -> Array fipb_array aktualisiert die FIPB in AU mit $auDN - foreach ( $fipb_array as $item ){ - $entry ['FreeIPBlock'][] = $item; - } - - $results = ldap_mod_replace($ds,$auDN,$entry); - if ($results){ - echo "<br>Neue FIPBs erfolgreich eingetragen!<br>" ; - - # ldap_mod_add -> IPAddress = $ip , in Host mit $hostDN - $ipentry ['dhcpRange'] = $ip; - $results = ldap_mod_add($ds,$dhcpobjectDN,$ipentry); - if ($results){ - echo "<br>IP Adresse erfolgreich eingetragen!<br>" ; - return 1; - }else{ - echo "<br>Fehler beim eintragen der IP Adresse!<br>"; - return 0; - } - }else{ - echo "<br>Fehler beim eintragen der FIPBs!<br>"; - return 0; - } - }else{ - printf("<br>IP Range %s ist nicht im verfuegbaren Bereich!<br>", $ip ); - return 0; - } -} - -## Add Dhcprange in DHCP Pool -function add_dhcprange($newrange,$pooldn) { - - global $ds, $auDN, $suffix, $ldapError; - - # Freie IP Bereiche testen - $fipb_array = get_freeipblocks_au($auDN); - $test = 0; - for ($f=0; $f < count($fipb_array); $f++){ - if ( split_iprange($newrange,$fipb_array[$f]) != 0 ){ - $ipranges = split_iprange($newrange,$fipb_array[$f]); - array_splice($fipb_array, $f, 1, $ipranges); - $test = 1; - break; - } - } - if ( $test ){ - foreach ( $fipb_array as $item ){ - $entry ['FreeIPBlock'][] = $item; - } - $result1 = ldap_mod_replace($ds,$auDN,$entry); - if ($result1){ - echo "<br>Neue FIPBs erfolgreich eingetragen!<br>"; - $rangeentry ['dhcprange'] = $newrange; - print_r($rangeentry);echo "<br><br>"; - $result2 = ldap_mod_add($ds,$pooldn,$rangeentry); - if ($result2){ - merge_dhcpranges($pooldn); - #printf("Neue dynamische IP Range %s - %s erfolgreich in Subnetz %s0 eingetragen!<br>",$addrange1[$i],$addrange2[$i],$net); - return 1; - }else{ - # echo "<br>Fehler beim eintragen des dynamischen DHCP Pools!<br>"; - # Range wieder in FIPBs aufnehmen. - $entry2 ['FreeIPBlock'] = $newrange; - ldap_mod_add($ds,$auDN,$entry2); - merge_ipranges($auDN); - return 0; - } - }else{ - echo "<br>Fehler beim eintragen der FIPBs!<br>"; - return 0; - } - }else{ - printf("<br>IP Range %s ist nicht im verfuegbaren Bereich!<br>", $range ); - return 0; - } -} - - -/** -* delete_ip_host($hostDN,$auDN) -* Löscht die IP Adresse eines Hosts, und passt die FreeIPBlocks der AU an. -* -* @param string hostDN Distinguished Name des LDAP Host-Objektes -* @param string auDN Distinguished Name des LDAP AU-Objektes -* -* @return boolean 1 bei Erfolg bzw. 0 bei Misserfolg -* -* @author Tarik Gasmi -*/ -function delete_ip_host($hostDN,$auDN) -{ - global $ds, $suffix, $ldapError; - - $host_array = get_host_ip($hostDN); - $old_ip = $host_array['ipaddress']; # oder IP aus dem Formular - # print_r($host_array);printf("<br>"); - # printf($old_ip); - $delentry ['ipaddress'] = $old_ip; - if ( $host_array['dhcpoptfixed-address'] != "" ){ - $delentry ['dhcpoptfixed-address'] = array(); - } - # print_r($delentry);printf("<br>"); - - $results = ldap_mod_del($ds,$hostDN,$delentry); - if ($results){ - echo "<br>IP Adresse erfolgreich geloescht!<br>"; - $modentry['FreeIPBlock'] = $old_ip; - $results = ldap_mod_add($ds,$auDN,$modentry); - if ($results){ - echo "<br>geloeschte IP Adresse erfolgreich als neuer FIPB in die AU eingetragen!<br>" ; - merge_ipranges($auDN); - return 1; - } - else{ - echo "<br>Fehler beim eintragen der geloeschten IP Adresse als neuen FIPB!<br>"; - return 0; - } - } - else{ - echo "<br>Fehler beim loeschen der IP Adresse!<br>"; - return 0; - } -} - -/** -* delete_ip_dhcprange($dhcpobjectDN,$auDN) -* Loescht die IP Range eines DHCP Subnets/Pools, und passt die FreeIPBlocks der AU an. -* -* @param string dhcpobjectDN Distinguished Name des LDAP DHCP-Objektes -* @param string auDN Distinguished Name des LDAP AU-Objektes -* -* @return boolean 1 bei Erfolg bzw. 0 bei Misserfolg -* -* @author Tarik Gasmi -*/ -function delete_ip_dhcprange($dhcpobjectDN,$auDN) -{ - global $ds, $suffix, $ldapError; - - $dhcp_array = get_dhcp_range($dhcpobjectDN); - - if ( $dhcp_array['dhcprange'] != "" ){ - $old_ip = $dhcp_array['dhcprange']; # oder IP aus dem Formular besser da ja mehrere moeglich - # print_r($dhcp_array);printf("<br>"); - # printf($old_ip); - $delentry['dhcpRange'] = $old_ip; - # print_r($delentry);printf("<br>"); - - $results = ldap_mod_del($ds,$dhcpobjectDN,$delentry); - if ($results){ - echo "<br>DHCP IP Range erfolgreich geloescht!<br>"; - $modentry['FreeIPBlock'] = $old_ip; - $results = ldap_mod_add($ds,$auDN,$modentry); - if ($results){ - echo "<br>geloeschte IP Range erfolgreich als neuer FIPB in die AU eingetragen!<br>" ; - merge_ipranges($auDN); - return 1; - } - else{ - echo "<br>Fehler beim eintragen der geloeschten IP Range als neuen FIPB!<br>"; - # Transaktion simulieren und alte Range wieder eintragen ?? - return 0; - } - } - else{ - echo "<br>Fehler beim loeschen der DHCP IP Range!<br>"; - return 0; - } - } -} - -/** -* modify_ip_host($ip,$hostDN,$auDN) -* Aendert die IP Adresse eines Hosts, falls neue IP verfuegbar, und passt die FreeIPBlocks der AU an. -* -* @param string ip IP Adresse, die neu zugewiesen werden soll -* @param string hostDN Distinguished Name des LDAP Host-Objektes -* @param string auDN Distinguished Name des LDAP AU-Objektes -* -* @return boolean 1 bei Erfolg bzw. 0 bei Misserfolg -* -* @author Tarik Gasmi -*/ -function modify_ip_host($ip,$hostDN,$auDN,$fixadd) -{ - global $ds, $suffix, $ldapError; - - if ( delete_ip_host($hostDN,$auDN) ){ - if ( new_ip_host($ip,$hostDN,$auDN) ){ - if ( $fixadd != ""){ - $fa_entry ['dhcpoptfixed-address'] = $fixadd; - ldap_mod_add($ds,$hostDN,$fa_entry); - } - echo "<br>IP Adresse erfolgeich geaendert!<br>"; - return 1; - }else{ - echo "<br>Fehler beim Aendern der IP Adresse!<br>"; - return 0; - } - }else{ - echo "<br>Fehler beim Aendern der IP Adresse!<br>"; - return 0; - } -} - -/** -* modify_ip_dhcprange($ip,$dhcpobjectDN,$auDN) -* Aendert IP Range eines DHCP Subnet/Pool, falls neue Range verfuegbar ist, -* und passt die FreeIPBlocks der AU an. -* -* @param string ip IP Range, die neu zugewiesen werden soll -* @param string dhcpobjectDN Distinguished Name des LDAP DHCP-Objektes -* @param string auDN Distinguished Name des LDAP AU-Objektes -* -* @return boolean 1 bei Erfolg bzw. 0 bei Misserfolg -* -* @author Tarik Gasmi -*/ -function modify_ip_dhcprange($ip,$dhcpobjectDN,$auDN) -{ - global $ds, $suffix, $ldapError; - - if ( delete_ip_dhcprange($dhcpobjectDN,$auDN) ){ - if ( new_ip_dhcprange($ip,$dhcpobjectDN,$auDN) ){ - echo "<br>DHCP IP Range erfolgeich geaendert!<br>"; - return 1; - }else{ - echo "<br>Fehler beim Aendern der DHCP IP Range!<br>"; - return 0; - } - }else{ - echo "<br>Fehler beim Aendern der DHCP IP Range!<br>"; - return 0; - } -} - - -/** -* new_ip_delegation($ip,$childauDN,$auDN) -* Delegiert einen neuen IP Bereich an eine untergeordnete AU, falls dieser verfuegbar ist -* (in den FreeIPBlocks enthalten ist), und passt die FreeIPBlocks der AU an. -* -* @param string ip IP Bereich, der zugewiesen werden soll -* @param string childauDN Distinguished Name des untergeordneten (Child) LDAP AU-Objektes -* @param string auDN Distinguished Name des LDAP AU-Objektes -* -* @return boolean 1 bei Erfolg bzw. 0 bei Misserfolg -* -* @author Tarik Gasmi -*/ -function new_ip_delegation($ip,$childauDN,$auDN) -{ - global $ds, $suffix, $ldapError; - - $fipb_array = get_freeipblocks_au($auDN); - #echo "<br>---<br>";print_r($fipb_array);echo "<br>---<br>"; - for ($i=0; $i < count($fipb_array); $i++){ - if ( split_iprange($ip,$fipb_array[$i]) != 0 ){ - $ipranges = split_iprange($ip,$fipb_array[$i]); - array_splice($fipb_array, $i, 1, $ipranges); - break; - } - } - - if ($i < count($fipb_array) ){ - # ldap_mod_replace -> Array fipb_array aktualisiert die FIPB in AU mit $auDN - foreach ( $fipb_array as $item ){ - $entry ['FreeIPBlock'][] = $item; - } - - $results = ldap_mod_replace($ds,$auDN,$entry); - if ($results){ - echo "<br>Neue FIPBs erfolgreich eingetragen!<br>" ; - - # ldap_mod_add -> IPAddress = $ip , in Host mit $hostDN - $mipbentry['MaxIPBlock'] = $ip; - $mipbentry['FreeIPBlock'] = $ip; - #print_r($mipbentry); - - $results = ldap_mod_add($ds,$childauDN,$mipbentry); - if ($results){ - echo "<br>IP Adressblock erfolgreich delegiert!<br>" ; - merge_ipranges($childauDN); - return 1; - }else{ - echo "<br>Fehler beim eintragen der IP Adresse!<br>"; - return 0; - } - }else{ - echo "<br>Fehler beim eintragen der FIPBs!<br>"; - return 0; - } - } - else{ - printf("<br>Zu delegierende IP Range %s ist nicht im verfuegbaren Bereich!<br>", $ip ); - } -} - -/** -* delete_ip_delegation($oldmipb,$childauDN,$auDN) -* Einen an eine untergeordnete AU delegierten IP Bereich zuruecknehmen. Diese Funktion wird rekursiv fuer -* alle weiter-delegierten Teilbereiche abgearbeitet. FreeIPBlocks der AU und Child-AU, sowie MaxIPBlocks -* der Child-AU werden angepasst. -* -* @param string oldmipb delegierter maximaler IP Bereich, der zurueckgenommen werden soll -* @param string childauDN Distinguished Name des untergeordneten (Child) LDAP AU-Objektes -* @param string auDN Distinguished Name des LDAP AU-Objektes -* -* @return boolean 1 bei Erfolg bzw. 0 bei Misserfolg -* -* @author Tarik Gasmi -*/ -function delete_ip_delegation($oldmipb,$childauDN,$auDN) -{ - global $ds, $suffix, $ldapError; - - # Durch Reduzierung zu loeschende IP Ranges (Array) - $delip[] = $oldmipb; - #print_r($delip);printf("<br><br>"); - - # Finde unter allen Child-AUs diejenigen, die von Reduzierung betroffene Child-Child-AUs haben - # Diese sind werden rekursiv abgearbeitet - $cchild_array = get_childau($childauDN,array("dn","maxipblock")); - # print_r($cchild_array);printf("<br><br>"); - $cchild_todo = array(); - foreach ($delip as $delipitem){ - foreach ($cchild_array as $item){ - if( count($item['maxipblock']) > 1 ){ - foreach ($item['maxipblock'] as $item2 ){ - if ( intersect_ipranges($delipitem,$item2) != false ){ - $cchild_todo[] = array('coldmipb' => $item2, - 'ccauDN' => $item['dn'], - 'childauDN' => $childauDN ); - } - } - } - elseif ( count($item['maxipblock']) == 1 ){ - if ( intersect_ipranges($delipitem,$item['maxipblock']) != false ){ - $cchild_todo[] = array('coldmipb' => $item['maxipblock'], - 'ccauDN' => $item['dn'], - 'childauDN' => $childauDN ); - } - } - } - } - #print_r($cchild_todo);printf("<br><br>"); - - ################### - # Rekursionsaufruf (für jede Child-AU, die betroffene Child-Child-AU hat) - foreach ($cchild_todo as $item){ - delete_ip_delegation($item['coldmipb'],$item['ccauDN'],$item['childauDN']); - } - ################### - - # Ab hier: alles was bei jedem Fkt.Aufruf zu machen ist (in Ebene AU und Child-AU) - - # in CAU Check ob RechnerIPs oder DhcpIPs betroffen: - $del_objects = objects_to_delete($delip,$childauDN,$cchild_array); - # print_r($del_objects);printf("<br><br>"); - if ( count($del_objects['hostips']) != 0 ){ - printf("<br>Host IP Addresses that will be deleted: <br>"); - foreach ($del_objects['hostips'] as $item){ - printf("HostDN: %s IP Address: %s <br>",$item['dn'],$item['ip']); - } - } - if ( count($del_objects['dhcpranges']) != 0 ){ - printf("<br>Subnet IP Ranges that will be adjusted: <br>"); - foreach ($del_objects['dhcpranges'] as $item){ - printf("DhcpObjectDN: %s Zu loeschende IP Range: %s <br>",$item['dn'],$item['delrange']); - } - } - # hier kommte Abfrage ob wirklich Aenderung ausfuehren, ja dann weiter mit loeschen - # sonst Abbruch - # momentan: einfach loeschen - if ( count($del_objects['hostips']) != 0 ){ - foreach ($del_objects['hostips'] as $item){ - delete_ip_host($item['dn'],$item['auDN']); - } - } - if ( count($del_objects['dhcpranges']) != 0 ){ - foreach ($del_objects['dhcpranges'] as $item){ - delete_ip_dhcprange($item['dn'],$item['auDN']); - } - } - - # in Child-AU: oldmipb loeschen - $mipb_array = get_maxipblocks_au($childauDN); - #print_r($mipb_array);printf("<br><br>"); - foreach ($delip as $delipitem){ - # if ( count($mipb_array) > 1 ){ - for ($i=0; $i < count($mipb_array); $i++){ - if ( intersect_ipranges($delipitem,$mipb_array[$i]) != 0 ){ - #$ipranges = intersect_ipranges($newmipb,$mipb_array[$i]); - array_splice($mipb_array, $i, 1); - } - } - # }else{ - # if ( intersect_ipranges($delipitem,$mipb_array) != 0 ){ - # # $ipranges = intersect_ipranges($newmipb,$mipb_array); - # $mipb_array = array(); - # } - # } - } - # print_r($mipb_array);printf("<br><br>"); - # for ($i=0; $i < count($mipb_array); $i++){ - # if ($mipb_array[$i] == false){array_splice($mipb_array, $i, 1);} - # } - - #print_r($mipb_array);printf("<br><br>"); - if (count($mipb_array) == 0){ - $entry ['MaxIPBlock'] = array(); - #print_r($entry);printf("<br><br>"); - $results = ldap_mod_del($ds,$childauDN,$entry); - }else{ - foreach ( $mipb_array as $item ){ - $entry ['MaxIPBlock'][] = $item; - } - #print_r($entry);printf("<br><br>"); - $results = ldap_mod_replace($ds,$childauDN,$entry); - } - - if ($results){ - echo "<br>MIPBs in Child-AU erfolgreich geloescht!<br>" ; - - # in Child-AU: FIPBs anpassen - $fipb_array = get_freeipblocks_au($childauDN); - #print_r($fipb_array);printf("<br><br>"); - foreach ($delip as $delipitem){ - # if ( count($fipb_array) > 1 ){ - for ($i=0; $i < count($fipb_array); $i++){ - if ( intersect_ipranges($delipitem,$fipb_array[$i]) != 0 ){ - # $ipranges = intersect_ipranges($newmipb,$fipb_array[$i]); - array_splice($fipb_array, $i, 1); - } - } - # } - # else{ - # if ( intersect_ipranges($delipitem,$fipb_array) != 0 ){ - # # $ipranges = intersect_ipranges($newmipb,$fipb_array); - # $fipb_array = array(); - # } - # } - } - # print_r($fipb_array);printf("<br><br>"); - # for ($i=0; $i < count($fipb_array); $i++){ - # if ($fipb_array[$i] == false){array_splice($fipb_array, $i, 1);} - # } - - #print_r($fipb_array);printf("<br><br>"); - if (count($fipb_array) == 0){ - $entry1 ['FreeIPBlock'] = array(); - #print_r($entry1);printf("<br><br>"); - $results = ldap_mod_del($ds,$childauDN,$entry1); - }else{ - foreach ( $fipb_array as $item ){ - $entry1 ['FreeIPBlock'][] = $item; - } - #print_r($entry1);printf("<br><br>"); - $results = ldap_mod_replace($ds,$childauDN,$entry1); - } - - if ($results){ - echo "FIPBs in Child-AU erfolgreich geloescht!<br>" ; - - # in AU: Geloeschte IP Bereiche als neue FIPBs aufnehmen - foreach ($delip as $item){ - $entry2 ['FreeIPBlock'][] = $item; - } - #print_r($entry2);printf("<br><br>"); - $results = ldap_mod_add($ds,$auDN,$entry2); - if ($results){ - echo "FIPBs in AU erfolgreich aktualisiert!<br>" ; - - # IP Bloecke aufraeumen in Child-AU und AU (Merging) - merge_ipranges($auDN); - merge_ipranges($childauDN); - return 1; - }else{ - echo "Fehler beim aktualisieren der FIPBs in AU!<br>"; - return 0; - } - }else{ - echo "Fehler beim loeschen der FIPBs in Child-AU!<br>"; - return 0; - } - }else{ - echo "<br>Fehler beim loeschen der MIPBs in Child-AU!<br>"; - return 0; - } -} - - -/** -* reduce_ip_delegation($oldmipb,$newmipb,$childauDN,$auDN) -* Einen an eine untergeordnete AU delegierten IP Bereich verkleinern. Diese Funktion wird rekursiv fuer -* alle weiter-delegierten Teilbereiche abgearbeitet. FreeIPBlocks der AU und Child-AU, sowie MaxIPBlocks -* der Child-AU werden angepasst. -* -* @param string oldmipb delegierter maximaler IP Bereich, der verkleinert werden soll -* @param string newmipb delegierter maximaler IP Bereich nach der Verkleinerung -* @param string childauDN Distinguished Name des untergeordneten (Child) LDAP AU-Objektes -* @param string auDN Distinguished Name des LDAP AU-Objektes -* -* @return boolean 1 bei Erfolg bzw. 0 bei Misserfolg -* -* @author Tarik Gasmi -*/ -function reduce_ip_delegation($oldmipb,$newmipb,$childauDN,$auDN) -{ - global $ds, $suffix, $ldapError; - - # Durch Reduzierung zu loeschende IP Ranges (Array) - $delip = split_iprange($newmipb,$oldmipb); - #print_r($delip);printf("<br><br>"); - - # Finde unter allen Child-AUs diejenigen, die von Reduzierung betroffene Child-Child-AUs haben - # Diese sind werden rekursiv abgearbeitet - $cchild_array = get_childau($childauDN,array("dn","maxipblock")); - - $cchild_todo = array(); - foreach ($delip as $delipitem){ - foreach ($cchild_array as $item){ - if( count($item['maxipblock']) > 1 ){ - foreach ($item['maxipblock'] as $item2 ){ - if ( intersect_ipranges($delipitem,$item2) != false ){ - $cchild_todo[] = array('coldmipb' => $item2, - 'cnewmipb' => intersect_ipranges($newmipb,$item2), - 'ccauDN' => $item['dn'], - 'childauDN' => $childauDN ); - } - } - } - elseif ( count($item['maxipblock']) == 1 ){ - if ( intersect_ipranges($delipitem,$item['maxipblock']) != false ){ - $cchild_todo[] = array('coldmipb' => $item['maxipblock'], - 'cnewmipb' => intersect_ipranges($newmipb,$item['maxipblock']), - 'ccauDN' => $item['dn'], - 'childauDN' => $childauDN ); - } - } - } - } - #print_r($cchild_todo);printf("<br><br>"); - - ###################### - # Rekursionsaufruf (für jede Child-AU, die betroffene Child-Child-AU hat) - foreach ($cchild_todo as $item){ - if ($item['cnewmipb'] == false ){ - delete_ip_delegation($item['coldmipb'],$item['ccauDN'],$item['childauDN']); - } - else{ - reduce_ip_delegation($item['coldmipb'],$item['cnewmipb'],$item['ccauDN'],$item['childauDN']); - } - } - ###################### - - - # Ab hier: alles was bei jedem Fkt.Aufruf zu machen ist (auf Ebene AU und Child-AU) - - # in CAU Check ob RechnerIPs oder DhcpIPs betroffen: - # - falls ja: nochmals Abfrage (Hammermethode: diese auch loeschen) ob diese zu loeschen sind - # -> ja, betreffende IPs loeschen - # -> nein, Abbruch. - # - falls nein: fuer jedes FIPB in CAU intersect(FIPB,newmipb)-> Schnittmengen bilden die neuen FIPB - $del_objects = objects_to_adjust($newmipb,$delip,$childauDN,$cchild_array); - # print_r($del_objects);printf("<br><br>"); - if ( count($del_objects['hostips']) != 0 ){ - printf("<br>Host IP Addresses that will be deleted: <br>"); - foreach ($del_objects['hostips'] as $item){ - printf("HostDN: %s IP Address: %s <br>",$item['dn'],$item['ip']); - } - } - if ( count($del_objects['dhcpranges']) != 0 ){ - printf("<br>Subnet IP Ranges that will be adjusted: <br>"); - foreach ($del_objects['dhcpranges'] as $item){ - printf("DhcpObjectDN: %s New IP Range: %s <br>",$item['dn'],$item['newrange']); - } - } - - # momentan wird einfach geloescht: - if ( count($del_objects['hostips']) != 0 ){ - foreach ($del_objects['hostips'] as $item){ - delete_ip_host($item['dn'],$item['auDN']); - } - } - if ( count($del_objects['dhcpranges']) != 0 ){ - foreach ($del_objects['dhcpranges'] as $item){ - if ( count($item['newrange']) >= 1 ){ - modify_ip_dhcprange($item['newrange'],$item['dn'],$item['auDN']); - }else{ - delete_ip_dhcprange($item['dn'],$item['auDN']); - } - } - } - - # in Child-AU: oldmipb -> newmipb - $mipb_array = get_maxipblocks_au($childauDN); - # print_r($mipb_array);printf("<br><br>"); - foreach ($delip as $delipitem){ - for ($i=0; $i < count($mipb_array); $i++){ - if ( intersect_ipranges($delipitem,$mipb_array[$i]) != 0 ){ - $ipranges = intersect_ipranges($newmipb,$mipb_array[$i]); - array_splice($mipb_array, $i, 1, $ipranges); - } - } - } - # print_r($mipb_array);printf("<br><br>"); - for ($i=0; $i < count($mipb_array); $i++){ - if ($mipb_array[$i] == false){array_splice($mipb_array, $i, 1);} - } - #print_r($mipb_array);printf("<br><br>"); - if (count($mipb_array) == 0){ - $entry ['MaxIPBlock'] = array(); - #print_r($entry);printf("<br><br>"); - $results = ldap_mod_del($ds,$childauDN,$entry); - }else{ - foreach ( $mipb_array as $item ){ - $entry ['MaxIPBlock'][] = $item; - } - #print_r($entry);printf("<br><br>"); - $results = ldap_mod_replace($ds,$childauDN,$entry); - } - - if ($results){ - echo "<br>MIPBs in Child-AU erfolgreich aktualisiert!<br>" ; - - # in Child-AU: FIPBs anpassen - $fipb_array = get_freeipblocks_au($childauDN); - #print_r($fipb_array);printf("<br><br>"); - foreach ($delip as $delipitem){ - for ($i=0; $i < count($fipb_array); $i++){ - if ( intersect_ipranges($delipitem,$fipb_array[$i]) != 0 ){ - $ipranges = intersect_ipranges($newmipb,$fipb_array[$i]); - array_splice($fipb_array, $i, 1, $ipranges); - } - } - } - # print_r($fipb_array);printf("<br><br>"); - for ($i=0; $i < count($fipb_array); $i++){ - if ($fipb_array[$i] == false){array_splice($fipb_array, $i, 1);} - } - #print_r($fipb_array);printf("<br><br>"); - if (count($fipb_array) == 0){ - $entry1 ['FreeIPBlock'] = array(); - #print_r($entry1);printf("<br><br>"); - $results = ldap_mod_del($ds,$childauDN,$entry1); - }else{ - foreach ( $fipb_array as $item ){ - $entry1 ['FreeIPBlock'][] = $item; - } - #print_r($entry1);printf("<br><br>"); - $results = ldap_mod_replace($ds,$childauDN,$entry1); - } - - if ($results){ - echo "FIPBs in Child-AU erfolgreich aktualisiert!<br>" ; - - # in AU: Geloeschte IP Bereiche als neue FIPBs aufnehmen - foreach ($delip as $item){ - $entry2 ['FreeIPBlock'][] = $item; - } - #print_r($entry2);printf("<br><br>"); - $results = ldap_mod_add($ds,$auDN,$entry2); - if ($results){ - echo "FIPBs in AU erfolgreich aktualisiert!<br>" ; - - # IP Bloecke aufraeumen in Child-AU und AU (Merging) - merge_ipranges($auDN); - merge_ipranges($childauDN); - - return 1; - }else{ - echo "Fehler beim aktualisieren der FIPBs in AU!<br>"; - return 0; - } - }else{ - echo "Fehler beim aktualisieren der FIPBs in Child-AU!<br>"; - return 0; - } - }else{ - echo "<br>Fehler beim aktualisieren der MIPBs in Child-AU!<br>"; - return 0; - } -} - - -/** -* expand_ip_delegation($oldmipb,$newmipb,$childauDN,$auDN) -* Einen an eine untergeordnete AU delegierten IP Bereich erweitern. Diese Funktion wird rekursiv fuer -* alle weiter-delegierten Teilbereiche abgearbeitet. FreeIPBlocks der AU und Child-AU, sowie MaxIPBlocks -* der Child-AU werden angepasst. Entspricht einer Neu-Delegierung des erweiterten IP Bereichs. -* -* @param string oldmipb delegierter maximaler IP Bereich, der erweitert werden soll -* @param string newmipb delegierter maximaler IP Bereich nach der Erweiterung -* @param string childauDN Distinguished Name des untergeordneten (Child) LDAP AU-Objektes -* @param string auDN Distinguished Name des LDAP AU-Objektes -* -* @return boolean 1 bei Erfolg bzw. 0 bei Misserfolg -* -* @author Tarik Gasmi -*/ -function expand_ip_delegation($oldmipb,$newmipb,$childauDN,$auDN) -{ - global $ds, $suffix, $ldapError; - - $difference = split_iprange($oldmipb,$newmipb); - if ( new_ip_delegation($difference[0],$childauDN,$auDN) ){ - return 1; - }else{ - return 0; - } -} - - -/** -* objects_to_delete($delip,$childauDN,$cchild_array) -* Liefert die durch eine Rücknahme einer IP Delegierung betroffenen Host/DHCP-Objekte der Child-AU -* und Child-Child-AUs in einem Array. Dieses enthaelt fuer jedes Objekt dessen Distinguished Name, -* dessen IP Adresse(n)/Range(s) und den Distinguished Name der AU der das Objekt angehoert. Parameter -* die fuer die Funktionen delete_ip_host(), delete_ip_range() Benoetigt werden. -* -* @param string delip IP Bereich der geloescht wird -* @param string childauDN Distinguished Name des untergeordneten (Child) LDAP AU-Objektes -* @param array cchild_array Array von allen Child-Child-AUs (jedes Item enthaelt DN und MaxIPBlock) -* -* @return array objects_to_delete Array aller betroffenen Objekte (DN, IP, auDN) -* -* @author Tarik Gasmi -*/ -function objects_to_delete($delip,$childauDN,$cchild_array) -{ - global $ds, $suffix, $ldapError; - - # Hosts von child-AU, child-child-AU - $chosts = get_hosts($childauDN,array("dn","ipaddress")); - # print_r($chosts);printf("<br><br>"); - $cchosts = array(); - foreach ($cchild_array as $item){ - $cchostsitem = get_hosts($item['dn'],array("dn","ipaddress")); - foreach ($cchostsitem as $item2){ - $cchosts[] = $item2; - } - } - $chosts = array_merge($chosts,$cchosts); - # print_r($chosts);printf("<br><br>"); - - # Pools von child-AU, child-child-AU - $csubnets = get_dhcppools($childauDN,array("dn","dhcprange")); - # print_r($csubnets);printf("<br><br>"); - $ccsubnets = array(); - foreach ($cchild_array as $item){ - $ccsubnetsitem = get_hosts($item['dn'],array("dn","dhcprange")); - foreach ($ccsubnetsitem as $item2){ - $ccsubnets[] = $item2; - } - } - $csubnets = array_merge($csubnets,$ccsubnets); - # print_r($csubnets);printf("<br><br>"); - - - # Zu loeschende Hosts bestimmen - $chosts_todo = array(); - foreach ($delip as $delipitem){ - if ( count($chosts) != 0 ){ - foreach ($chosts as $item){ - if( count($item['ipaddress']) > 1 ){ - foreach ($item['ipaddress'] as $item2 ){ - if ( intersect_ipranges($delipitem,$item2) != false ){ - $chosts_todo[] = array('dn' => $item['dn'], - 'ip' => $item['ipaddress'], - 'auDN' => $item['auDN']); - } - } - } - elseif ( count($item['ipaddress']) == 1 ){ - if ( intersect_ipranges($delipitem,$item['ipaddress']) != false ){ - $chosts_todo[] = array('dn' => $item['dn'], - 'ip' => $item['ipaddress'], - 'auDN' => $item['auDN']); - } - } - } - } - } - # print_r($chosts_todo);printf("<br><br>"); - - # Zu loeschende Pools bestimmen, und wie IP Range anzupassen ist - $csubnets_todo = array(); - foreach ($delip as $delipitem){ - if ( count($csubnets) != 0 ){ - foreach ($csubnets as $item){ - if( count($item['dhcprange']) > 1 ){ - foreach ($item['dhcprange'] as $item2 ){ - # print_r(intersect_ipranges($delipitem,$item2)); - if ( intersect_ipranges($delipitem,$item2) != false ){ - $csubnets_todo[] = array('dn'=> $item['dn'], - 'delrange' => $item2['dhcprange'], - 'auDN' => $item['auDN']); - } - } - } - elseif ( count($item['dhcprange']) == 1 ){ - # print_r(intersect_ipranges($delipitem,$item['dhcprange'])); - if ( intersect_ipranges($delipitem,$item['dhcprange']) != false ){ - $csubnets_todo[] = array('dn'=> $item['dn'], - 'delrange' => $item['dhcprange'], - 'auDN' => $item['auDN']); - } - } - } - } - } - # print_r($csubnets_todo);printf("<br><br>"); - - $objects_to_delete = array('hostips' => $chosts_todo, - 'dhcpranges' => $csubnets_todo); - return $objects_to_delete; -} - - -/** -* objects_to_adjust($newmipb,$delip,$childauDN,$cchild_array) -* Liefert die durch eine Reduzierung einer IP Delegierung betroffenen Host/DHCP-Objekte der Child-AU -* und Child-Child-AUs in einem Array. Dieses enthaelt fuer jedes Objekt dessen Distinguished Name, -* dessen IP Adresse(n)/Range(s) und den Distinguished Name der AU der das Objekt angehoert. Parameter -* die fuer die Funktionen delete_ip_host(), delete_ip_dhcprange(), modify_ip_dhcprange() benoetigt werden. -* -* @param string newmipb IP Bereich der nach Reduzierung verbleibt -* @param string delip IP Bereich der durch Reduzierung wegfaellt -* @param string childauDN Distinguished Name des untergeordneten (Child) LDAP AU-Objektes -* @param array cchild_array Array von allen Child-Child-AUs (jedes Item enthaelt DN und MaxIPBlock) -* -* @return array objects_to_adjust Array aller betroffenen Objekte (DN, IP, auDN) -* -* @author Tarik Gasmi -*/ -function objects_to_adjust($newmipb,$delip,$childauDN,$cchild_array) -{ - global $ds, $suffix, $ldapError; - - # Hosts von child-AU, child-child-AU - $chosts = get_hosts($childauDN,array("dn","ipaddress")); - # print_r($chosts);printf("<br><br>"); - $cchosts = array(); - foreach ($cchild_array as $item){ - $cchostsitem = get_hosts($item['dn'],array("dn","ipaddress")); - foreach ($cchostsitem as $item2){ - $cchosts[] = $item2; - } - } - $chosts = array_merge($chosts,$cchosts); - # print_r($chosts);printf("<br><br>"); - - # Pools von child-AU, child-child-AU - $csubnets = get_dhcppools($childauDN,array("dn","dhcprange")); - # print_r($csubnets);printf("<br><br>"); - $ccsubnets = array(); - foreach ($cchild_array as $item){ - $ccsubnetsitem = get_hosts($item['dn'],array("dn","dhcprange")); - foreach ($ccsubnetsitem as $item2){ - $ccsubnets[] = $item2; - } - } - $csubnets = array_merge($csubnets,$ccsubnets); - # print_r($csubnets);printf("<br><br>"); - - - # Zu loeschende Hosts bestimmen - $chosts_todo = array(); - foreach ($delip as $delipitem){ - if ( count($chosts) != 0 ){ - foreach ($chosts as $item){ - if( count($item['ipaddress']) > 1 ){ - foreach ($item['ipaddress'] as $item2 ){ - if ( intersect_ipranges($delipitem,$item2) != false ){ - $chosts_todo[] = array('dn' => $item['dn'], - 'ip' => $item['ipaddress'], - 'auDN' => $item['auDN']); - } - } - } - elseif ( count($item['ipaddress']) == 1 ){ - if ( intersect_ipranges($delipitem,$item['ipaddress']) != false ){ - $chosts_todo[] = array('dn' => $item['dn'], - 'ip' => $item['ipaddress'], - 'auDN' => $item['auDN']); - } - } - } - } - } - # print_r($chosts_todo);printf("<br><br>"); - - # Zu loeschende Subnets bestimmen, und wie IP Range anzupassen ist - $csubnets_todo = array(); - foreach ($delip as $delipitem){ - if ( count($csubnets) != 0 ){ - foreach ($csubnets as $item){ - if( count($item['dhcprange']) > 1 ){ - foreach ($item['dhcprange'] as $item2 ){ - # print_r(intersect_ipranges($delipitem,$item2)); - if ( intersect_ipranges($delipitem,$item2) != false ){ - $csubnets_todo[] = array('dn'=> $item['dn'], - 'newrange' => intersect_ipranges($newmipb,$item2), - 'auDN' => $item['auDN']); - } - } - } - elseif ( count($item['dhcprange']) == 1 ){ - # print_r(intersect_ipranges($delipitem,$item['dhcprange'])); - if ( intersect_ipranges($delipitem,$item['dhcprange']) != false ){ - $csubnets_todo[] = array('dn'=> $item['dn'], - 'newrange' => intersect_ipranges($newmipb,$item['dhcprange']), - 'auDN' => $item['auDN']); - } - } - } - } - } - # print_r($csubnets_todo);printf("<br><br>"); - - - $objects_to_adjust = array('hostips' => $chosts_todo, - 'dhcpranges' => $csubnets_todo); - return $objects_to_adjust; -} - - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/lib/ldap.inc.php b/ldap-site-mngmt/webinterface/lib/ldap.inc.php deleted file mode 100644 index 79d50e61..00000000 --- a/ldap-site-mngmt/webinterface/lib/ldap.inc.php +++ /dev/null @@ -1,1117 +0,0 @@ -<?php -/** -* ldap.inc.php - LDAP-Bibliothek -* Diese Bibliothek enth�lt alle Funktionen f�r den Zugriff auf den LDAP-Server. -* -* @param string ldapError -* @param resource ds -* -* @author Timothy Burk, Mahir Yildirim, Johannes Sprenger, Daniel H�fler -* @copyright Timothy Burk, Mahir Yildirim, Johannes Sprenger, Daniel H�fler -*/ -//Konfiguration laden -require_once("config.inc.php"); - -$ldapError = null; - -/** -* uniLdapConnect($userRdn, $userPwd) - F�hrt den Bind am Gruppe1-LDAP-Server durch -* -* @param string userRdn UID f�r den Login -* @param string userPwd Loginpasswort -* -* @return boolean Erfolg bzw. Misserfolg -* -* @author Timothy Burk -*/ -function uniLdapConnect($userRdn = "", $userPwd = "") { - global $ldapError, $suffix; - if(!(defined("LDAP_HOST") && defined("LDAP_PORT"))) { - $ldapError = "Hostname und/oder Port des LDAP-Servers wurden nicht angegeben!"; - return FALSE; - } - if($ds = ldap_connect(LDAP_HOST, LDAP_PORT)) { - # Connect zum LDAP-Server OK - if(ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)) { - # Optionen gesetzt - #if (ldap_start_tls($ds)){ - if($userRdn != "" && $userPwd != "") { - # Anmeldung als User. - if($result = @ldap_bind($ds, "uid=".$userRdn.",ou=people,".$suffix, $userPwd)) { - # Bind erfolgreich ausgef�hrt - return $ds; - } else { - # Bind nicht erfolreich. - if(ldap_error($ds) == "Invalid credentials") { - $ldapError .= "Bind nicht erfolgreich: die Zugangsdaten sind nicht korrekt.<br>\n"; - } else { - $ldapError .= "Bind als User nicht erfolgreich: ".ldap_error($ds)."<br>\n"; - } - #print_r(ldap_error($ds));echo "<br><br>"; - return false; - } - } else { - # Anonymer Bind. - if($result = ldap_bind($ds)) { - # Anonymer Bind erfolgreich ausgef�hrt - return $ds; - } else { - # Anonymer Bind nicht erfolreich. - $ldapError .= "Anonymer Bind nicht erfolgreich: ".ldap_error($ds)."<br>\n"; - return false; - } - } - #} else { - # # TLS starten fehlgeschlagen - # $ldapError .= "TLS starten fehlgeschlagen: ".ldap_error($ds)."<br>\n"; - #} - } else { - # Optionen setzen fehlgeschlagen - $ldapError .= "Protokollversion setzen fehlgeschlagen: ".ldap_error($ds)."<br>\n"; - } - } else { - # Connect fehlgeschlagen. - $ldapError .= "Connect fehlgeschlagen: ".ldap_error($ds)."<br>\n"; - } -} - - -/** -* rzLdapConnect($userRdn, $userPwd) - F�hrt den Bind am RZ-LDAP-Server durch -* -* @param string userRdn UID f�r den Login -* @param string userPwd Loginpasswort -* -* @return boolean Erfolg bzw. Misserfolg -* -* @author Timothy Burk -*/ -function rzLdapConnect($userRdn = "", $userPwd = "") { - global $ldapError, $suffix_rz; - if(!(defined("LDAP_HOST_RZ") && defined("LDAP_PORT_RZ"))) { - $ldapError = "Hostname und/oder Port des LDAP-Servers wurden nicht angegeben!"; - return FALSE; - } - if($ds = ldap_connect(LDAP_HOST_RZ, LDAP_PORT_RZ)) { - # Connect zum LDAP-Server OK - if(ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)) { - # Optionen gesetzt - if($userRdn != "" && $userPwd != "") { - # Anmeldung als User. - if($result = @ldap_bind($ds, "uid=".$userRdn.",ou=people,".$suffix_rz, $userPwd)) { - # Bind erfolgreich ausgef�hrt - return $ds; - } else { - # Bind nicht erfolreich. - if(ldap_error($ds) == "Invalid credentials") { - $ldapError .= "Bind nicht erfolgreich: die Zugangsdaten sind nicht korrekt.<br>\n"; - } else { - $ldapError .= "Bind als User nicht erfolgreich: ".ldap_error($ds)."<br>\n"; - } - return false; - } - } else { - # Anonymer Bind. - if($result = ldap_bind($ds)) { - # Anonymer Bind erfolgreich ausgef�hrt - return $ds; - } else { - # Anonymer Bind nicht erfolreich. - $ldapError .= "Anonymer Bind nicht erfolgreich: ".ldap_error($ds)."<br>\n"; - return false; - } - } - } else { - # Optionen setzen fehlgeschlagen - $ldapError .= "Protokollversion setzen fehlgeschlagen: ".ldap_error($ds)."<br>\n"; - } - } else { - # Connect fehlgeschlagen. - $ldapError .= "Connect fehlgeschlagen: ".ldap_error($ds)."<br>\n"; - } -} - - /** - * uniLdapSearch($ds, $base, $filter, $attributes, $sort, $mode, $resultLimit, $timeout) - * Sucht Eintr�ge im LDAP-Server. - * - * Durchsucht den LDAP-Server vom Punkt $base ab nach Eintr�gen, die $filter entsprechen. Falls in $sort ein Feldname angegeben - * wurde, so wird danach sortiert. (ACHTUNG: die Funktion ldap_sort() ist nicht dokumentiert! Ich wei� nicht ob sie Sortierung - * nach mehreren Feldern zul�sst und wie sie sich verh�lt, wenn zu einem Attribut mehrere Werte existieren.) $mode definiert die - * Art der Suche, wohingegen $resultLimit und $timeout die Anzahl der Ergebnis-Eintr�ge bzw. die maximalen Suchdauer einschr�nken. - * Zur�ckgegeben werden die Attribute, die im Array $attributes aufgef�hrt sind. Im Erfolgsfalle wird ein multidimensionales Array - * zur�ckgeliefert, im Fehlerfalle FALSE. Dann steht die Fehlermeldung in der Variablen $ldapError. - * - * @param string $base die DN, das Verzeichnis, in dem die Suche startet - * - * @param string $filter die Suchbedingungen - * - * @param array attributes die Attributnamen, deren Werte im Ergebnis enthalten sein sollen. - * - * @param string $sort Sortiert die Ergebnis-Eintr�ge nach dem angegebenen Feldnamen (undokumentiert! s.o.) - * - * @param string $mode Der Modus: "one" liefert einen Eintrag, "list" alle Eintr�ge des Verzeichnisses und "sub" - * schlie�t alle Untervezeichnisse mit ein. - * - * @param int $resultLimit die maximale Anzahl zur�ckgegebener Eintr�ge - * - * @param int $timeout die maximale Suchzeit, bevor der LDAP-Server abbrechen soll - * - * @return mixed multidimensionales array mit den Eintr�gen im Erfolgsfall, FALSE wenn ein Fehler auftrat - * - * @see ldap_read() - * @see ldap_list() - * @see ldap_search() - * @see ldap_sort() - * @see ldap_get_entries() - * @see ldap_free_result() - * - * @author Timothy Burk - */ -function uniLdapSearch($ds, $base, $filter, $attributes, $sort, $mode, $resultLimit, $timeout) { - global $ldapError; - $abfrage = false; - if($mode == "one") { - if($resource = ldap_read($ds, $base, $filter, $attributes, 0, $resultLimit, $timeout)) { - # Abfrage erfolgreich! - $abfrage = true; - } else { - # Abfrage fehlgeschlagen. - $ldapError .= "Abfrage mit Mode $mode ist fehlgeschlagen: ".ldap_error($ds)."<br>\n"; - return false; - } - } else if($mode == "list") { - if($resource = ldap_list($ds, $base, $filter, $attributes, 0, $resultLimit, $timeout)) { - # Abfrage erfolgreich! - ldap_sort($ds,$resource,$sort); - $abfrage = true; - } else { - # Abfrage fehlgeschlagen. - $ldapError .= "Abfrage mit Mode $mode ist fehlgeschlagen: ".ldap_error($ds)."<br>\n"; - return false; - } - } else if($mode == "sub") { - if($resource = ldap_search($ds, $base, $filter, $attributes, 0, $resultLimit, $timeout)) { - # Abfrage erfolgreich! - ldap_sort($ds,$resource,$sort); - $abfrage = true; - } else { - # Abfrage fehlgeschlagen. - $ldapError .= "Abfrage mit Mode $mode ist fehlgeschlagen: ".ldap_error($ds)."<br>\n"; - return false; - } - } else { - # Kein g�ltiger Modus angegeben. - $ldapError .= "Es wurde kein g�ltiger Modus angegeben."; - return false; - } - if($abfrage && ($entries = ldap_get_entries($ds, $resource))) { - # Auslesen des Verzeichnisses erfolgreich. - ldap_free_result($resource); - return $entries; - } else { - # Auslesen des Verzeichnisses nicht erfolgreich. - $ldapError .= "Auslesen des Verzeichnisses nicht erfolgreich: ".ldap_error($ds)."<br>\n"; - return false; - } -} -/** -* uniLdapAdd($ds, $dn, $daten, [$objectclass]) -* -* F�gt ein neues Objekt in die LDAP-Datenbank ein. -* -* @param resource $ds Datenbankhandler -* @param string $dn Distinguished Name des neuen Eintrages -* @param array $daten Assoziatives Array mit den gew�nschten Attributen -* @param string $objectclass Objektklasse des neuen Eintrages (Standard = "") -* -* @return boolean TRUE wenn Eintrag erfolgreich, FALSE wenn ein Fehler aufgetreten ist. -* -* @see ldap_add() -* -* @author Timothy Burk -*/ -function uniLdapAdd($ds, $dn, $daten, $objectclass = "") { - if($objectclass != "") { - $daten['objectclass'] = $objectclass; - } - if(ldap_add($ds, $dn, $daten)) { - return true; - } else { - return false; - } -} - -/** -* uniLdapModify($ds, $dn, $daten_alt, $daten_neu, [$i]) -* -* Universalfunktion zum �ndern von Attributen und Werten. -* Bei �nderungsskripten muss zuerst ein Formular mit den alten Daten gef�llt werden. Die hierf�r -* durchgef�hrte Suche wird in einem unbehandelten Array in der SESSION gespeichert und wieder -* ausgelesen, sobald die �nderungen gespeichert werden sollen. Es wird anschlie�end an diese Funktion -* (als $daten_alt)gegeben, die das Array mit ldapArraySauber von allen unn�tigen Eintr�gen befreit. -* $daten_alt entspricht dann strukturell dem POST-Array des �nderungsformulars ($daten_neu). -* Letzteres wird nun durch laufen, alle Eintr�ge werden mit ihrer Entsprechnung aus $daten_alt verglichen -* und ggf. werden dann Attribute ge�ndert, gel�scht oder hinzugef�gt. -* -* @param resource $ds Datenbankhandler -* @param string $dn Distinguished Name des Eintrages -* @param array $daten_alt Dreidimensionales mixed Array der Form $array[int][string][int], so wie es von uniLdapSearch zur�ckgeliefert wird. -* @param array $daten_neu Zweidimensionales mixed Array der Form $array[string][int], so wie ein Formular in $_POST gespeichert ist. -* @param int $i Gibt an, welcher Eintrag der ersten Dimension von $daten_alt verwendet werden soll. (Standard: $i=0) -* -* @return boolean TRUE wenn �nderung erfolgreich, FALSE wenn ein Fehler aufgetreten ist. -* -* @see ldap_mod_replace() -* @see ldap_mod_add() -* @see ldap_mod_del() -* @see ldapArraySauber() -* @see numArraySauber() -* -* @author Timothy Burk -*/ -function uniLdapModify($ds, $dn, $daten_alt, $daten_neu, $i = 0) { - $meldung = ""; - $daten_alt = ldapArraySauber($daten_alt, FALSE); - $daten_alt = $daten_alt[$i]; - foreach($daten_neu as $key => $value_neu) { - $key = strtolower($key); - if(!(is_array($value_neu))) { - # Wenn $value_neu ein Skalar ist... - # (d.h., das Attribut $key darf nur einen Wert annehmen) - $value_neu = htmlentities(str_replace(chr(160),"",trim($value_neu))); // ungewollte Leerzeichen und l�schen - if (isset($daten_alt[$key])) { - $daten_alt[$key] = str_replace(chr(160),"",trim($daten_alt[$key])); // ungewollte Leerzeichen und l�schen - } else { - $daten_alt[$key] = ""; - } - if($daten_alt[$key] == "" && $value_neu != "") { - # FALL 1: - # Alter Wert ist leer, neuer Wert ist nicht leer. - # F�ge neues Attribut hinzu. - if(ldap_mod_add($ds, $dn, array($key => $value_neu))) { - $meldung .= "Add successfull: ".$key." -> ".$value_neu."<br>"; - } else { - $meldung .= "Add error: ".$key." -> ".$value_neu."<br>"; - } - - } else if($daten_alt[$key] != "" && $value_neu == "") { - # FALL 2: - # Alter Wert ist nicht leer, neuer Wert ist leer. - # L�sche Attribut. - if(ldap_mod_del($ds, $dn, array($key => $daten_alt[$key]))) { - $meldung .= "Delete successfull: ".$key." -> ".$daten_alt[$key]."<br>"; - } else { - $meldung .= "Delete error: ".$key." -> ".$daten_alt[$key]."<br>"; - } - - } else if($daten_alt[$key] != "" && $value_neu != "" && $daten_alt[$key] != $value_neu) { - # FALL 3: - # Alter und neuer Wert sind nicht leer und beide sind ungleich. - # �ndere das Attribut. Der bisherige Wert wird �berschrieben. - if(ldap_mod_replace($ds, $dn, array($key => $value_neu))) { - $meldung .= "Replace successfull: ".$key." -> ".$value_neu."<br>"; - } else { - $meldung .= "Replace error: ".$key." -> ".$value_neu."<br>"; - } - - } else { - # In allen anderen F�llen ist keine �nderung n�tig - } - } else { - # Wenn $value_neu ein Array ist... - # (d.h., das Attribut $key darf mehrere Werte annehmen) - $value_neu = numArraySauber($value_neu); - if (isset($daten_alt[$key])) { - $value_alt = numArraySauber($daten_alt[$key]); - foreach($value_alt as $item) { - #$item = htmlentities($item); - # L�sche alle alten Werte des Attributes $key. - if(ldap_mod_del($ds, $dn, array($key => $item))) { - $meldung .= "Delete successfull: ".$key." -> ".$item."<br>"; - } else { - $meldung .= "Delete error: ".$key." -> ".$item."<br>"; - } - } - } - foreach($value_neu as $item) { - $item = htmlentities($item); - # F�ge alle neuen Werte des Attributes $key ein. - if(ldap_mod_add($ds, $dn, array($key => $item))) { - $meldung .= "Add successfull: ".$key." -> ".$item."<br>"; - } else { - $meldung .= "Add error: ".$key." -> ".$item."<br>"; - } - - } - } - } - #return $meldung; - if(eregi("error",$meldung)) { - return FALSE; - } else { - return TRUE; - } -} - -/** -* uniLdapDelete l�scht beliebige Eintr�ge mit dessen Subtree aus der Datenbank. -* Dabei wird der wird der Baum ab dem Eintrag $dn zu allen Bl�ttern durchlaufen (Es -* k�nnen nur Bl�tter gel�scht werden!!) und die Eintr�ge von hinten her bis einschlie�lich -* $dn gel�scht -* -* @param resource ds LDAP Directory Handle -* @param string dn Distiguished Name -* -* @return boolean -* -* @author Daniel H�fler -*/ - -function uniLdapDelete($ds, $dn) { - # �berpr�fung, ob zu l�schender Eintrag vorhanden ist - if(!uniLdapSearch($ds, $dn, "objectclass=*", array("*"), "", "one", 0, 0)) { - $ldapError .= "L�schen fehlgeschlagen: Eintrag nicht gefunden".ldap_error($ds)."<br>\n"; - return false; - } - # Auslesen der Daten unterhalb von $dn - $daten = uniLdapSearch($ds, $dn, "objectclass=*", array("*"), "", "list", 0, 0); - # for-Schleife wird nur ausgef�hrt, falls sich unterhalb von $dn Eintr�ge befinden - for($i = 0; $i < $daten['count']; $i++){ - uniLdapDelete($ds, $daten[$i]['dn']); - } - # l�schen der Bl�tter - if(ldap_delete($ds, $dn)) { - return true; - } else { - $ldapError .= "L�schen fehlgeschlagen".ldap_error($ds)."<br>\n"; - return false; - } -} - -############################################################################################ -# -# Ab hier LDAP Funktionen (Tarik Gasmi) nutzen die zuvor definierten Funktionen -# von Timothy Burk, u.A. -# -############################################################################################ -# Weitere LDAP Funktionen - -# -# LDAP Funktionen um alle Objekte der AU eines bestimmten Typs mit gew�hlten Attributen zu holen -# -function get_hosts($auDN,$attributes,$sortattr) -{ - global $ds, $suffix, $ldapError; - - if ( $sortattr == ""){ - $sortattr = "hostname"; - } - - if(!($result = uniLdapSearch($ds, "cn=computers,".$auDN, "(objectclass=Host)", $attributes, $sortattr, "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else{ - $result = ldapArraySauber($result); - # print_r($result);printf("<br><br>"); - $host_array = array(); - foreach ($result as $item){ - foreach ($attributes as $att){ - $atts[$att] = $item[$att]; - } - $atts['auDN'] = $auDN; - $host_array[] = $atts; - } - if($attributes != false ){return $host_array;} - else{return $result;} - } -} - -function get_groups($auDN,$attributes) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, "cn=groups,".$auDN, "(objectclass=groupOfComputers)", $attributes, "cn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else{ - $result = ldapArraySauber($result); - # print_r($result);printf("<br><br>"); - $group_array = array(); - foreach ($result as $item){ - foreach ($attributes as $att){ - $atts[$att] = $item[$att]; - } - $atts['auDN'] = $auDN; - $group_array[] = $atts; - } - if($attributes != false ){return $group_array;} - else{return $result;} - } -} - -function get_groups_member($auDN,$attributes,$member) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, "cn=groups,".$auDN, "(&(objectclass=groupOfComputers)(member=$member))", $attributes, "cn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else{ - $result = ldapArraySauber($result); - # print_r($result);printf("<br><br>"); - $group_array = array(); - foreach ($result as $item){ - foreach ($attributes as $att){ - $atts[$att] = $item[$att]; - } - $atts['auDN'] = $auDN; - $group_array[] = $atts; - } - if($attributes != false ){return $group_array;} - else{return $result;} - } -} - -function get_machineconfigs($baseDN,$attributes) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, $baseDN, "(objectclass=MachineConfig)", $attributes, "", "list", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - elseif(count($result) == 0){return $result;} - else{ - $result = ldapArraySauber($result); - # print_r($result);printf("<br><br>"); - $mc_array = array(); - foreach ($result as $item){ - foreach ($attributes as $att){ - $atts[$att] = $item[$att]; - } - $atts['baseDN'] = $baseDN; - $atts['auDN'] = $auDN; - $mc_array[] = $atts; - } - if($attributes != false ){return $mc_array;} - else{return $result;} - } -} - -function get_pxeconfigs($baseDN,$attributes) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, $baseDN, "(objectclass=PxeConfig)", $attributes, "", "list", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - elseif(count($result) == 0){return $result;} - else{ - $result = ldapArraySauber($result); - # print_r($result);printf("<br><br>"); - $pxe_array = array(); - foreach ($result as $item){ - foreach ($attributes as $att){ - $atts[$att] = $item[$att]; - } - $atts['baseDN'] = $baseDN; - $atts['auDN'] = $auDN; - $pxe_array[] = $atts; - } - if($attributes != false ){return $pxe_array;} - else{return $result;} - } -} - -function get_pxeconfigs2($clientDN,$attributes) -{ - global $auDN, $ds, $suffix, $ldapError; - - if ($clientDN == ""){ - $filter = "(objectclass=PxeConfig)"; - }else{ - $filter = "(&(objectclass=PxeConfig)(pxeclientdn=$clientDN))"; - } - - if(!($result = uniLdapSearch($ds, "cn=pxe,".$auDN, $filter, $attributes, "", "list", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - elseif(count($result) == 0){return $result;} - else{ - $result = ldapArraySauber($result); - # print_r($result);printf("<br><br>"); - $pxe_array = array(); - foreach ($result as $item){ - foreach ($attributes as $att){ - $atts[$att] = $item[$att]; - } - $atts['baseDN'] = $baseDN; - $atts['auDN'] = $auDN; - $pxe_array[] = $atts; - } - if($attributes != false ){return $pxe_array;} - else{return $result;} - } -} - -function get_menuentries($baseDN,$attributes) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, $baseDN, "(objectclass=MenuEntry)", $attributes, "menuposition", "list", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - elseif(count($result) == 0){return $result;} - else{ - $result = ldapArraySauber($result); - # print_r($result);printf("<br><br>"); - $menent_array = array(); - foreach ($result as $item){ - foreach ($attributes as $att){ - $atts[$att] = $item[$att]; - } - $atts['baseDN'] = $baseDN; - $atts['auDN'] = $auDN; - $menent_array[] = $atts; - } - if($attributes != false ){return $menent_array;} - else{return $result;} - } -} - -function get_rbservices($auDN,$attributes) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, "cn=rbs,".$auDN, "(objectclass=RBService)", $attributes, "", "list", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - elseif(count($result) == 0){return $result;} - else{ - $result = ldapArraySauber($result); - # print_r($result);printf("<br><br>"); - $rbs_array = array(); - foreach ($result as $item){ - foreach ($attributes as $att){ - $atts[$att] = $item[$att]; - } - $atts['auDN'] = $auDN; - $rbs_array[] = $atts; - } - if($attributes != false ){return $rbs_array;} - else{return $result;} - } -} - -function get_subnets($auDN,$attributes) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, "cn=dhcp,".$auDN, "(objectclass=dhcpSubnet)", $attributes, "cn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else { - $result = ldapArraySauber($result); - $subnet_array = array(); - foreach ($result as $item){ - foreach ($attributes as $att){ - $atts[$att] = $item[$att]; - } - $atts['auDN'] = $auDN; - $subnet_array[] = $atts; - } - if($attributes != false ){return $subnet_array;} - else{return $result;} - } -} - -function get_dhcppools($auDN,$attributes) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, "cn=dhcp,".$auDN, "(objectclass=dhcpPool)", $attributes, "cn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else { - $result = ldapArraySauber($result); - - $pool_array = array(); - foreach ($result as $item){ - foreach ($attributes as $att){ - $atts[$att] = $item[$att]; - } - $atts['auDN'] = $auDN; - $pool_array[] = $atts; - } - if($attributes != false ){return $pool_array;} - else{return $result;} - } -} - -function get_dhcppools_subnet($subnetDN,$attributes) -{ - global $ds, $suffix, $auDN, $ldapError; - - if(!($result = uniLdapSearch($ds, $auDN, "(&(objectclass=dhcpPool)(dhcphlpcont=$subnetDN))", $attributes, "cn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else { - $result = ldapArraySauber($result); - - $pool_array = array(); - foreach ($result as $item){ - $poolexpdn = ldap_explode_dn($item['dn'], 1); - $poolau = $poolexpdn[2]; - foreach ($attributes as $att){ - $atts[$att] = $item[$att]; - } - $atts['poolAU'] = $poolau; - $pool_array[] = $atts; - } - if($attributes != false ){return $pool_array;} - else{return $result;} - } -} - -function get_dhcppoolranges($poolDN) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, $poolDN, "(objectclass=dhcpPool)", array("dhcprange"), "", "one", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else { - $result = ldapArraySauber($result); - #print_r($result); echo "<br><br>"; - $ranges_array = array(); - if ( count($result[0]['dhcprange']) == 1 ){ - $ranges_array [] = $result[0]['dhcprange']; - } - elseif ( count($result[0]['dhcprange']) > 1 ){ - foreach ($result[0]['dhcprange'] as $range){ - $ranges_array [] = $range; - } - } - return $ranges_array; - } -} - -function get_childau($auDN,$attributes) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, $auDN, "(objectclass=AdministrativeUnit)", $attributes, "ou", "list", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else { - $result = ldapArraySauber($result); - - $childau_array = array(); - foreach ($result as $item){ - foreach ($attributes as $att){ - $atts[$att] = $item[$att]; - } - $atts['auDN'] = $auDN; - $childau_array[] = $atts; - } - if($attributes != false ){return $childau_array;} - else{return $result;} - } -} - -function get_all_aus($attributes) -{ - global $ds, $auDN, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, "ou=RIPM,".$suffix, "(objectclass=AdministrativeUnit)", $attributes, "ou", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else { - $result = ldapArraySauber($result); - - $childau_array = array(); - foreach ($result as $item){ - foreach ($attributes as $att){ - $atts[$att] = $item[$att]; - } - $atts['auDN'] = $auDN; - $childau_array[] = $atts; - } - if($attributes != false ){return $childau_array;} - else{return $result;} - } -} - -function get_au_data($auDN,$attributes) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, $auDN, "(objectclass=AdministrativeUnit)", $attributes, "ou", "one", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else { - $result = ldapArraySauber($result); - - $au_array = array(); - foreach ($result as $item){ - foreach ($attributes as $att){ - $atts[$att] = $item[$att]; - } - $atts['auDN'] = $auDN; - $au_array[] = $atts; - } - if($attributes != false ){return $au_array;} - else{return $result;} - } -} - -function get_domain_data($auDN,$attributes) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, $suffix, "(&(objectclass=dnsdomain)(associatedname=$auDN))", $attributes, "", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else { - $result = ldapArraySauber($result); - - $domain_array = array(); - foreach ($result as $item){ - foreach ($attributes as $att){ - $atts[$att] = $item[$att]; - } - $atts['auDN'] = $auDN; - $domain_array[] = $atts; - } - if($attributes != false ){return $domain_array;} - else{return $result;} - } -} - - -function get_roles($auDN) -{ - global $ds, $suffix, $domDN, $ldapError; - - if(!($result = uniLdapSearch($ds, "cn=roles,".$auDN, "(|(objectclass=GroupOfNames)(objectclass=Admins))", array("cn","member"), "cn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else{ - $result = ldapArraySauber($result); - $roles_array = array(); - #print_r($result); - foreach ($result as $item){ - if ( count($item['member']) > 1 ){ - foreach ($item['member'] as $member){ - $roles_array[$item['cn']][] = $member; - } - } - if ( count($item['member']) == 1 ){ - $roles_array[$item['cn']][] = $item['member']; - } - } - return $roles_array; - } -} - -function get_roles_dns($domDN) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, "cn=roles,".$domDN, "(objectclass=GroupOfNames)", array("cn","member"), "cn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else{ - $result = ldapArraySauber($result); - $roles_array = array(); - foreach ($result as $item){ - if ( count($item['member']) > 1){ - foreach ($item['member'] as $member){ - $roles_array[$item['cn']][] = $member; - } - }else{ - $roles_array[$item['cn']][] = $item['member']; - } - } - return $roles_array; - } -} - - -function get_users(){ - - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, "ou=people,".$suffix, "(objectclass=inetOrgPerson)", array("dn","cn","sn","uid"), "", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else{ - $result = ldapArraySauber($result); - $users_array = array(); - # foreach ($result as $item){ - # $users_array[$item['cn']] = $item['member']; - # } - # return $users_array; - return $result; - } -} - -function get_user_data($userDN,$attributes) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, $userDN, "(objectclass=inetOrgPerson)", $attributes, "", "one", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else { - $result = ldapArraySauber($result); - foreach ($result as $item){ - foreach ($attributes as $att){ - $atts[$att] = $item[$att]; - } - $user_data = $atts; - } - if($attributes != false ){return $user_data;} - else{return $result;} - } -} - - -function get_dc_data($dcDN,$attributes) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, $dcDN, "(objectclass=dnsdomain)", $attributes, "", "one", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else { - $result = ldapArraySauber($result); - foreach ($result as $item){ - foreach ($attributes as $att){ - $atts[$att] = $item[$att]; - } - $dc_data = $atts; - } - if($attributes != false ){return $dc_data;} - else{return $result;} - } -} - -function get_node_data($nodeDN,$attributes) -{ - global $ds, $suffix, $ldapError; - - $node_data = array(); - - if(!($result = uniLdapSearch($ds, $nodeDN, "(objectclass=*)", $attributes, "", "one", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else { - $result = ldapArraySauber($result); - foreach ($result as $item){ - foreach ($attributes as $att){ - $node_data[$att] = $item[$att]; - } - } - if($attributes != false ){return $node_data;} - else{return $result;} - } -} - - - -function get_zone_entries($dcDN,$attributes) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, $dcDN, "(|(objectclass=dNSZone)(objectclass=dNSZoneIncludeDirective))", $attributes, "", "list", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else{ - $result = ldapArraySauber($result); - # print_r($result);printf("<br><br>"); - $zone_array = array(); - foreach ($result as $item){ - foreach ($attributes as $att){ - $atts[$att] = $item[$att]; - } - $atts['dcDN'] = $dcDN; - $zone_array[] = $atts; - } - if($attributes != false ){return $zone_array;} - else{return $result;} - } -} - - -function get_zone_entries_assocname($dcDN,$attributes,$assocname) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, $dcDN, "(&(|(objectclass=dNSZone)(objectclass=dNSZoneIncludeDirective))(associatedname=$assocname))", $attributes, "", "list", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else{ - $result = ldapArraySauber($result); - # print_r($result);printf("<br><br>"); - $zone_array = array(); - foreach ($result as $item){ - foreach ($attributes as $att){ - $atts[$att] = $item[$att]; - } - $atts['dcDN'] = $dcDN; - $zone_array[] = $atts; - } - if($attributes != false ){return $zone_array;} - else{return $result;} - } -} - -function get_dn_menuposition($pxeDN,$pos) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, $pxeDN, "(menuposition=$pos)", array("dn"), "", "list", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else { - $result = ldapArraySauber($result); - return $result[0]['dn']; - } -} - -function get_dhcpservices($auDN,$attributes) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, "cn=dhcp,".$auDN, "(objectclass=dhcpService)", $attributes, "", "list", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - elseif(count($result) == 0){return $result;} - else{ - $result = ldapArraySauber($result); - # print_r($result);printf("<br><br>"); - $dhcp_array = array(); - foreach ($result as $item){ - foreach ($attributes as $att){ - $atts[$att] = $item[$att]; - } - $atts['auDN'] = $auDN; - $dhcp_array[] = $atts; - } - if($attributes != false ){return $dhcp_array;} - else{return $result;} - } -} - -function get_dhcpsubnets($auDN,$attributes) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, "cn=dhcp,".$auDN, "(objectclass=dhcpSubnet)", $attributes, "", "list", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - elseif(count($result) == 0){return $result;} - else{ - $result = ldapArraySauber($result); - # print_r($result);printf("<br><br>"); - $dhcp_array = array(); - foreach ($result as $item){ - foreach ($attributes as $att){ - $atts[$att] = $item[$att]; - } - $atts['auDN'] = $auDN; - $dhcp_array[] = $atts; - } - if($attributes != false ){return $dhcp_array;} - else{return $result;} - } -} - -function get_service_subnets($dhcpserviceDN,$attributes) -{ - global $ds, $suffix, $ldapError; - - $filter = "(&(dhcphlpcont=".$dhcpserviceDN.")(objectclass=dhcpSubnet))"; - if(!($result = uniLdapSearch($ds, "ou=RIPM,".$suffix, $filter, $attributes, "", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - elseif(count($result) == 0){return $result;} - else{ - $result = ldapArraySauber($result); - # print_r($result); - $dhcpsubnets = array(); - foreach ($result as $item){ - foreach ($attributes as $att){ - $atts[$att] = $item[$att]; - } - $expdn = ldap_explode_dn($item['dn'],1); - $au = array_slice($expdn, 3, 1); - $atts['auDN'] = implode ( ',', $au ); - $dhcpsubnets [] = $atts; - } - #print_r($dhcpsubnets); - if($attributes != false ){ - return $dhcpsubnets; - } - else{return $result;} - } -} - -?> diff --git a/ldap-site-mngmt/webinterface/lib/ldap2.inc.php b/ldap-site-mngmt/webinterface/lib/ldap2.inc.php deleted file mode 100644 index 3d0b26d9..00000000 --- a/ldap-site-mngmt/webinterface/lib/ldap2.inc.php +++ /dev/null @@ -1,350 +0,0 @@ -<?php -/** -* ldap2.inc.php - LDAP-Bibliothek -* Diese Bibliothek enthält weitere LDAP Hilfs-Funktionen -* -* @param string ldapError -* @param resource ds -* -* @author Tarik Gasmi -* @copyright Tarik Gasmi -*/ -//Konfiguration laden -require_once("config.inc.php"); - -$ldapError = null; - - -# Liefert Array aller Child-Knoten mit bestimmten ausgwählten Attributen -function get_childs($baseDN,$attributes) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, $baseDN, "(objectclass=*)", $attributes, "", "list", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else { - $result = ldapArraySauber($result); - - $childau_array = array(); - foreach ($result as $item){ - foreach ($attributes as $att){ - $atts[$att] = $item[$att]; - } - $childau_array[] = $atts; - } - if($attributes != false ){return $childau_array;} - else{return $result;} - } -} - -# Liefert die RDNs aller Child-Knoten -function get_childs_rdn($baseDN){ - - $childs = get_childs($baseDN,array("dn")); - # print_r($childs); echo "<br><br>"; - - $childs_rdn = array(); - foreach ($childs as $item){ - $exp = explode(',',$item['dn']); - $rdn = $exp[0]; - $childs_rdn[] = $rdn; - } - - # print_r($childs_rdn); - return $childs_rdn; -} - - -# Attribute eines Knotens (Vorsicht Array enthält noch DN und COUNT) -# in einem Array wie er z.B. von ldap_add verwendet wird -function get_node_attributes($nodeDN){ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, $nodeDN, "(objectclass=*)", array(), "", "one", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - # print_r($result); - foreach ($result as $item){ - foreach (array_keys($item) as $merkmal) - $attrs[$merkmal] = $item[$merkmal]; - } - return $attrs; -} - -# Rekursives Kopieren -function dive_into_tree_cp($baseDN,$new_baseDN){ - - global $ds, $suffix, $ldapError; - - $expldn = ldap_explode_dn($new_baseDN,0); - $new_node_rdn = $expldn[0]; - $exp = explode('=',$new_node_rdn); - $new_node_rdn_merk = $exp[0]; - $new_node_rdn_val = $exp[1]; - $new_node_rdn_merk = strtolower($new_node_rdn_merk); - - $childs_rdn = get_childs_rdn($baseDN); - - $attrs = get_node_attributes($baseDN); - # print_r($attrs); echo "<br>"; - unset($attrs['dn']); - unset($attrs['count']); - $attrs["$new_node_rdn_merk"] = $new_node_rdn_val; - # print_r($attrs); echo "<br>"; - - $result = ldap_add($ds,$new_baseDN,$attrs); - - - //recursivly do dive for each child - foreach($childs_rdn as $rdn){ - dive_into_tree_cp( $rdn.",".$baseDN , $rdn.",".$new_baseDN); - } - return $result; -} - - -# -# Rekursives Loeschen -function dive_into_tree_del($baseDN,$except){ - - global $ds, $suffix, $ldapError; - - $childs_rdn = get_childs_rdn($baseDN); - //recursivly do dive for each child - foreach($childs_rdn as $rdn){ - dive_into_tree_del( $rdn.",".$baseDN , $except); - } - if($baseDN != $except){ - $result = ldap_delete($ds,$baseDN); - } - - return $result; -} - -# Rekursives Verschieben -function move_subtree($oldDN,$newDN){ - - if(dive_into_tree_cp($oldDN,$newDN)) - { - dive_into_tree_del($oldDN,""); - echo "Moved subtree<br>"; - return 1; - } - else echo "Moving subtree not possible!!!<br>"; -} - - -function adjust_dn_entries($oldDN,$newDN){ - - global $ds, $suffix, $ldapError; - - # single Attributes: - if(!($result = uniLdapSearch($ds, $newDN, "(objectclass=host)", array("dn","dhcphlpcont"), "", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - #print_r($result); echo "<br><br>"; - foreach ($result as $item){ - if (strpos($item['dhcphlpcont'],$oldDN) != false){ - $newvalue = str_replace($oldDN,$newDN,$item['dhcphlpcont']); - $entry['dhcphlpcont'] = $newvalue; - ldap_mod_replace($ds,$item['dn'],$entry); - } - } - - if(!($result = uniLdapSearch($ds, $newDN, "(objectclass=PXEConfig)", array("dn","rbservicedn"), "", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - #print_r($result); echo "<br><br>"; - foreach ($result as $item2){ - if (strpos($item2['rbservicedn'],$oldDN) != false){ - $newvalue = str_replace($oldDN,$newDN,$item2['rbservicedn']); - $entry2['rbservicedn'] = $newvalue; - ldap_mod_replace($ds,$item2['dn'],$entry2); - } - } - - if(!($result = uniLdapSearch($ds, $newDN, "(objectclass=dhcpService)", array("dn","dhcpprimarydn","dhcpsecondarydn"), "", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - #print_r($result); echo "<br><br>"; - foreach ($result as $item3){ - if (strpos($item3['dhcpprimarydn'],$oldDN) != false){ - $newvalue = str_replace($oldDN,$newDN,$item3['dhcpprimarydn']); - $entry3['dhcpprimarydn'] = $newvalue; - ldap_mod_replace($ds,$item3['dn'],$entry3); - } - if (strpos($item3['dhcpsecondarydn'],$oldDN) != false){ - $newvalue = str_replace($oldDN,$newDN,$item3['dhcpsecondarydn']); - $entry4['dhcpsecondarydn'] = $newvalue; - ldap_mod_replace($ds,$item3['dn'],$entry4); - } - } - - if(!($result = uniLdapSearch($ds, $newDN, "(objectclass=MenuEntry)", array("dn","genericmenuentrydn","ldapuri"), "", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - #print_r($result); echo "<br><br>"; - foreach ($result as $item4){ - if (strpos($item4['genericmenuentrydn'],$oldDN) != false){ - $newvalue = str_replace($oldDN,$newDN,$item4['genericmenuentrydn']); - $entry5['genericmenuentrydn'] = $newvalue; - ldap_mod_replace($ds,$item4['dn'],$entry5); - } - if (strpos($item4['ldapuri'],$oldDN) != false){ - $newvalue = str_replace($oldDN,$newDN,$item4['ldapuri']); - $entry6['ldapuri'] = $newvalue; - ldap_mod_replace($ds,$item4['dn'],$entry6); - } - } - - # Multi-Attribut member - if(!($result = uniLdapSearch($ds, $newDN, "(objectclass=groupOfComputers)", array("dn","member","dhcphlpcont"), "", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - #print_r($result); echo "<br><br>"; - foreach ($result as $item5){ - for ($i=0; $i<count($item5['member']); $i++){ - if (strpos($item5['member'][$i],$oldDN) != false){ - $newvalue = str_replace($oldDN,$newDN,$item5['member'][$i]); - $entry7['member'][$i] = $newvalue; - }else{ - $entry7['member'][$i] = $item5['member'][$i]; - } - ldap_mod_replace($ds,$item5['dn'],$entry7); - } - if (strpos($item5['dhcphlpcont'],$oldDN) != false){ - $newvalue = str_replace($oldDN,$newDN,$item5['dhcphlpcont']); - $entry8['dhcphlpcont'] = $newvalue; - ldap_mod_replace($ds,$item5['dn'],$entry8); - } - - } - - # Attribut AssociatedName in DNS Teilbaum - if(!($result = uniLdapSearch($ds, "ou=DNS,".$suffix , "(associatedname=$oldDN)", array("dn","associatedname"), "", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - #print_r($result); echo "<br><br>"; - foreach ($result as $item6){ - $newvalue = str_replace($oldDN,$newDN,$item6['associatedname']); - $entry9['associatedname'] = $newvalue; - ldap_mod_replace($ds,$item6['dn'],$entry9); - } - - # Attribut RelativeDomainName in DNS Teilbaum ... noch nicht fertig - $hostdnexpold = ldap_explode_dn($oldDN, 0); - $hostdnexpnew = ldap_explode_dn($newDN, 0); - $oldhostname = $hostdnexpold[0]; - $newhostname = $hostdnexpnew[0]; - if(!($result = uniLdapSearch($ds, "ou=DNS,".$suffix , "(relativedomainname=$oldhostname)", array("dn","relativedomainname"), "", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - #print_r($result); echo "<br><br>"; - foreach ($result as $item7){ - $newvalue = str_replace($oldhostname,$newhostname,$item7['relativedomainname']); - $entry10['relativedomainname'] = $newvalue; - ldap_mod_replace($ds,$item7['dn'],$entry10); - } - -} - - - -function check_for_dc($dn, $dc){ - global $ds, $suffix, $ldapError; - if(!($result = uniLdapSearch($ds, $dn, "(dc=$dc)", array("dc"), "", "list", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - if (count($result[0]['dc']) == 0 ) {return 0;} - elseif ($result[0]['dc'] == $dc){return 1;} -} - - -function get_dc_childs($baseDN,$attributes) -{ - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, $baseDN, "(objectclass=dnsdomain)", $attributes, "", "list", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else { - $result = ldapArraySauber($result); - - $childau_array = array(); - foreach ($result as $item){ - foreach ($attributes as $att){ - $atts[$att] = $item[$att]; - } - $childau_array[] = $atts; - } - if($attributes != false ){return $childau_array;} - else{return $result;} - } -} - -# Liefert die RDNs aller dc-Child-Knoten -function get_dc_childs_rdn($baseDN){ - - global $ds, $suffix, $ldapError; - - $childs = get_dc_childs($baseDN,array("dn")); - # print_r($childs); echo "<br><br>"; - - $childs_rdn = array(); - foreach ($childs as $item){ - $exp = explode(',',$item['dn']); - $rdn = $exp[0]; - $childs_rdn[] = $rdn; - } - - # print_r($childs_rdn); - return $childs_rdn; -} - -function get_entry_number($entryDN,$entryobjectclass){ - - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, $entryDN, "(objectclass=machineconfig)", array("count"), "", "one", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - print_r ($result); - -} - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/lib/rbs_management_functions.php b/ldap-site-mngmt/webinterface/lib/rbs_management_functions.php deleted file mode 100644 index 2e7d5348..00000000 --- a/ldap-site-mngmt/webinterface/lib/rbs_management_functions.php +++ /dev/null @@ -1,685 +0,0 @@ -<?php - -/** -* rbs_management_functions.php - Remote Boot Services Management Funktions-Bibliothek -* Diese Bibliothek enthält alle Funktionen für die Verwaltung von RBS Diensten, -* PXE Konfigurationsdateien ihren Menüeinträgen und ihren Genersichen Bootmenüeinträgen -* -* @param string ldapError -* @param resource ds -* -* @author Tarik Gasmi -* @copyright Tarik Gasmi -*/ - - -# Konfiguration laden -require_once("config.inc.php"); - -$ldapError = null; - - -####################################################################### -# Funktionen zur Verwaltung von RBS Diensten -# - -# -# Neues RBS Dienst-Objekt anlegen -# -function add_rbs($rbsDN,$rbscn,$rbsoffer,$server,$atts){ - - global $ds, $suffix, $auDN, $ldapError; - - $rbsentry ['objectclass'][0] = "RBService"; - $rbsentry ['objectclass'][1] = "top"; - $rbsentry ['cn'] = $rbscn; - $rbsentry ['rbsofferdn'] = $rbsoffer; - if (count($atts) != 0){ - foreach (array_keys($atts) as $key){ - if ($atts[$key] != ""){ - $rbsentry[$key] = $atts[$key]; - } - } - } - if (count($server) != 0){ - if ($server['tftp'] != ""){$rbsentry ['tftpserverip'] = $server['tftp'];} - if ($server['nfs'] != ""){$rbsentry ['nfsserverip'] = $server['nfs'];} - if ($server['nbd'] != ""){$rbsentry ['nbdserverip'] = $server['nbd'];} - } - # print_r($rbsentry); echo "<br>"; - print_r($rbsDN); echo "<br>"; - - # Standard Fallback Menü anlegen - $pxecn = "PXE_Fallback-No-Config"; - $pxeDN = "cn=".$pxecn.",".$rbsDN; - $filename = array("fallback-nopxe"); - $ldapuri = LDAP_HOST."/dn=cn=computers,".$auDN; # wirklich nötig?? - $mecn = "Fallback-Text"; - $meDN = "cn=".$mecn.",".$pxeDN; - $meattribs = array("label" => "Keine PXE Boot-Konfiguration fuer die aktuelle Zeit definiert", - "kernel" => "menu.c32", - "submenulink" => "fallback-nopxe"); - - if (ldap_add($ds,$rbsDN,$rbsentry)){ - if (add_pxe($pxeDN,$pxecn,$rbsDN,"",array(),$filename,$ldapuri)){ - if (add_me($meDN,$mecn,"","01",$meattribs,$pxeDN)){ - return 1; - } - else{ - return 0; - } - } - else{ - return 0; - } - } - else{ - return 0; - } -} - -# -# "RBS-Angebote" im Verzeichnis suchen, die die AU ($auDN) nutzen darf, -# Suche nach passenden RBS-Offer-DNs -# -function get_rbsoffers($auDN){ - - global $ds, $suffix, $auDN, $ldapError; - - $attribs = array("dn","rbsofferdn"); - if(!($result = uniLdapSearch($ds, "ou=RIPM,".$suffix, "(objectclass=RBService)", $attribs, "dn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else{ - $result = ldapArraySauber($result); - #print_r($result);echo "<br><br>"; - - $rbs_offers = array(); - foreach ($result as $rbs){ - #print_r(strpos($auDN, $rbs['rbsofferdn']));echo "<br>"; - if ( strpos($auDN, $rbs['rbsofferdn']) !== false ) - $rbs_offers [] = $rbs['dn']; - } - } - #print_r($rbs_offers);echo "<br><br>"; - return $rbs_offers; -} - - -# -# Beim Löschen von RBS-Objekten muss dafür gesorgt werden dass keine PXEs mehr auf -# diese zeigen, Ref. Abhängigkeiten -# -function clean_up_del_rbs($rbsDN){ - - global $ds, $suffix, $auDN, $ldapError; - - $attribs = array("dn"); - if(!($result = uniLdapSearch($ds, "ou=RIPM,".$suffix, "(&(objectclass=PXEConfig)(rbservicedn=$rbsDN))", $attribs, "dn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - #print_r($result); echo "<br><br>"; - $delentry ['rbservicedn'] = $rbsDN; - foreach ($result as $item){ - #print_r($item['dn']); echo "<br>"; - ldap_mod_del($ds, $item['dn'], $delentry); - } - - if(!($result = uniLdapSearch($ds, "ou=RIPM,".$suffix, "(&(objectclass=Host)(hlprbservice=$rbsDN))", $attribs, "dn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - #print_r($result); echo "<br><br>"; - $delentry2 ['hlprbservice'] = $rbsDN; - foreach ($result as $item){ - #print_r($item['dn']); echo "<br>"; - ldap_mod_del($ds, $item['dn'], $delentry2); - } - -} - -# -# beim ändern des CN (DN) des RBS muss dieses in allen referenzierenden PXEConfig-Objekten -# nachvollzogen werden, Ref. Abhängigkeiten -# -function adjust_rbs_dn($newrbsDN, $rbsDN){ - - global $ds, $suffix, $auDN, $ldapError; - - if(!($result = uniLdapSearch($ds, "ou=RIPM,".$suffix, "(&(objectclass=PXEConfig)(rbservicedn=$rbsDN))", array("dn"), "dn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - $modentry ['rbservicedn'] = $newrbsDN; - foreach ($result as $item){ - ldap_mod_replace($ds, $item['dn'], $modentry); - } - - if(!($result = uniLdapSearch($ds, "ou=RIPM,".$suffix, "(&(objectclass=Host)(hlprbservice=$rbsDN))", array("dn"), "dn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - $modentry2 ['hlprbservice'] = $newrbsDN; - foreach ($result as $item){ - ldap_mod_replace($ds, $item['dn'], $modentry2); - } -} - -function rbs_adjust_host($hostDN, $rbs){ - - global $ds, $suffix, $ldapError; - - $modentry ['rbservicedn'] = $rbs; - - $pxearray = get_pxeconfigs($hostDN,array("dn")); - if ( count($pxearray) != 0 ){ - foreach ( $pxearray as $item ){ - if ($result = ldap_mod_replace($ds,$item['dn'],$modentry)){ - return 1; - }else{ - return 0; - } - } - } -} - -# Bei Änderung der TFTP Server IP eines RBS-Objekts entsprechend DHCP Option next-server -# in den Hostobjekten anpassen und DHCP modify time in den AUs aktualisieren -function adjust_dhcpnextserver($tftpIP, $rbsDN){ - - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, "ou=RIPM,".$suffix, "(&(|(objectclass=Host)(objectclass=dhcpPool))(hlprbservice=$rbsDN))", array("dn"), "dn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - $host_au = array(); - if ($tftpIP == ""){ - $deltftpentry ['dhcpoptnext-server'] = array(); - foreach ($result as $item){ - ldap_mod_del($ds, $item['dn'], array()); - $expdn = array_slice(ldap_explode_dn($item['dn'], 0), 3); - $host_au [] = implode(",", $expdn); - } - }else{ - $modtftpentry ['dhcpoptnext-server'] = $tftpIP; - foreach ($result as $item){ - ldap_mod_replace($ds, $item['dn'], $modtftpentry); - $expdn = array_slice(ldap_explode_dn($item['dn'], 0), 3); - $host_au [] = implode(",", $expdn); - } - } - if ( count($host_au) != 0 ){ - $host_au = array_unique($host_au); - update_dhcpmtime($host_au); - } -} - -# Bei Änderung des PXE Init Boot File eines RBS-Objekts entsprechend DHCP Option Filename -# in den Hostobjekten anpassen -function adjust_dhcpfilename($initbootfile, $rbsDN, $type){ - - global $ds, $suffix, $ldapError; - - if(!($result = uniLdapSearch($ds, "ou=RIPM,".$suffix, "(&(objectclass=Host)(hlprbservice=$rbsDN))", array("dn"), "dn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - $host_au = array(); - if ($type == "add"){ - $modentry ['dhcpoptfilename'] = $initbootfile; - foreach ($result as $item){ - ldap_mod_add($ds, $item['dn'], $modentry); - } - } - elseif ($type == "delete"){ - $modentry ['dhcpoptfilename'] = array(); - foreach ($result as $item){ - ldap_mod_del($ds, $item['dn'], $modentry); - } - } - elseif ($type == "replace"){ - $modentry ['dhcpoptfilename'] = $initbootfile; - foreach ($result as $item){ - ldap_mod_replace($ds, $item['dn'], $modentry); - $expdn = array_slice(ldap_explode_dn($item['dn'], 0), 3); - $host_au [] = implode(",", $expdn); - } - } - if ( count($host_au) != 0 ){ - $host_au = array_unique($host_au); - update_dhcpmtime($host_au); - } -} - -# IP Adresse eines Host ändern -> RBS TFTP Server IP anpassen (inkl. dhcpNext-server) -function adjust_hostip_tftpserverip($oldip,$newip){ - - global $ds, $suffix, $ldapError, $auDN; - - if(!($result = uniLdapSearch($ds, "cn=rbs,".$auDN, "(&(objectclass=RBService)(tftpserverip=$oldip))", array("dn","tftpserverip"), "dn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - if (count($result) != 0){ - foreach ($result as $item){ - if ($newip == ""){ - $delentry ['tftpserverip'] = array(); - ldap_mod_del($ds, $item['dn'], $delentry); - adjust_dhcpnextserver("", $item['dn']); - }else{ - $modentry ['tftpserverip'] = $newip; - ldap_mod_replace($ds, $item['dn'], $modentry); - adjust_dhcpnextserver($newip, $item['dn']); - } - } - } -} - -# -# Sucht den Hostname zu einer IP im Rechnerteilbaum der AU -# Verwaltung der am RBS beteiligten Server -# -function get_hostname_from_ip($ip){ - - global $ds, $suffix, $ldapError, $auDN; - - $ipp = array($ip,$ip); - $ipaddress = implode('_',$ipp); - if(!($result = uniLdapSearch($ds, "cn=computers,".$auDN, "(&(objectclass=Host)(ipaddress=$ipaddress))", array("dn","hostname"), "", "list", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - #print_r($result); - $host ['hostname'] = $result[0]['hostname']; - $host ['dn'] = $result[0]['dn']; - return $host; -} - - -############################################################################### -# Funktionen zur Verwaltung von PXE Bootmenüs - -# -# Ãœberprüft, ob sich die angegebene Timerange auf einer der 4 Spezifikationsstufen mit anderen -# Timeranges des Objkets überschneidet -# -function check_timerange_pxe($pxeday,$pxebeg,$pxeend,$nodeDN,$excepttimerange){ - - global $ds, $suffix, $auDN, $ldapError; - - $brothers = get_pxeconfigs($nodeDN,array("timerange")); - # keine Ãœberschneidungen pro Spez.Ebene zulassen - # print_r($brothers); echo "<br><br>"; - if (count($brothers) != 0){ - - $intersect = 0; - foreach ($brothers as $item){ - - # Fall das Brother mehrere TimeRanges hat - if (count($item['timerange']) > 1){ - foreach ($item['timerange'] as $tr){ - - if($tr != $excepttimerange){ - $exptime = explode('_',$tr); - $bpxeday = $exptime[0]; - $bpxebeg = $exptime[1]; - $bpxeend = $exptime[2]; - #echo "pxeday:"; print_r($pxeday); echo "<br>"; - #echo "bpxeday:"; print_r($bpxeday); echo "<br>"; - #echo "pxebeg:"; print_r($pxebeg); echo "<br>"; - #echo "bpxebeg:"; print_r($bpxebeg); echo "<br>"; - #echo "pxeend:"; print_r($pxeend); echo "<br>"; - #echo "bpxeend:"; print_r($bpxeend); echo "<br>"; - - if ($pxeday == $bpxeday){ - if ( $pxebeg > $bpxeend || $pxeend < $bpxebeg ){ - # keine Ãœberschneidung in der Uhrzeit - }else{ - # Uhrzeit Ãœberschneidung - $intersect = 1; - $intersecttr = $bpxeday."_".$bpxebeg."_".$bpxeend; - break; - } - } - } - - } - } - # Fall das Brother nur eine TimeRange hat - elseif (count($item['timerange']) == 1){ - - if($item['timerange'] != $excepttimerange){ - $exptime = explode('_',$item['timerange']); - $bpxeday = $exptime[0]; - $bpxebeg = $exptime[1]; - $bpxeend = $exptime[2]; - #echo "pxeday:"; print_r($pxeday); echo "<br>"; - #echo "bpxeday:"; print_r($bpxeday); echo "<br>"; - #echo "pxebeg:"; print_r($pxebeg); echo "<br>"; - #echo "bpxebeg:"; print_r($bpxebeg); echo "<br>"; - #echo "pxeend:"; print_r($pxeend); echo "<br>"; - #echo "bmcend:"; print_r($bpxeend); echo "<br>"; - - if ($pxeday == $bpxeday){ - if ( $pxebeg > $bpxeend || $pxeend < $bpxebeg ){ - # keine Ãœberschneidung in der Uhrzeit - }else{ - # Uhrzeit Ãœberschneidung - $intersect = 1; - $intersecttr = $bpxeday."_".$bpxebeg."_".$bpxeend; - break; - } - } - } - } - } - #echo "intersect: "; print_r($intersect); echo "<br>"; - if ($intersect == 1){ - echo "<b>[".$pxeday."_".$pxebeg."_".$pxeend."]</b> überschneidet sich mit der - bereits existierende <b>Time Range [".$intersecttr."]</b> !<br><br>"; - return 0; - }else{ - return 1; - } - }else{ - return 1; - } -} - - -# -# Neues PXE Bootmenü anlegen -# -function add_pxe($pxeDN,$pxecn,$rbsDN,$pxetimerange,$pxeattribs,$filenames,$conffile){ - - global $ds, $suffix, $auDN, $ldapError; - - $pxeentry ['objectclass'][0] = "PXEConfig"; - $pxeentry ['objectclass'][1] = "top"; - $pxeentry ['cn'] = $pxecn; - $pxeentry ['rbservicedn'] = $rbsDN; - #$pxeentry ['ldapuri'] = $ldapuri; - if ($conffile != ""){$pxeentry ['fileuri'] = $conffile;} - if (count($filenames) > 1 ){ - for ($i=0; $i<count($filenames); $i++){ - $pxeentry ['filename'][$i] = $filenames[$i]; - } - } - if (count($filenames) == 1){ - $pxeentry ['filename'] = $filenames[0]; - } - if ($pxetimerange != ""){$pxeentry ['timerange'] = $pxetimerange;} - if (count($pxeattribs) != 0){ - foreach (array_keys($pxeattribs) as $key){ - if ($pxeattribs[$key] != ""){ - $pxeentry[$key] = $pxeattribs[$key]; - } - } - } - print_r($pxeentry); echo "<br>"; - print_r($pxeDN); echo "<br>"; - if (ldap_add($ds,$pxeDN,$pxeentry)){ - return 1; - } - else{ - return 0; - } -} - - -# -# PXE CN (DN) ändern, Teilbaum verschieben -# -function modify_pxe_dn($pxeDN, $newpxeDN){ - - global $ds, $suffix, $ldapError; - - if (move_subtree($pxeDN,$newpxeDN)){ - return 1; - }else{ - return 0; - } -} - - -# -# Timerange eines PXEConfig-Objekts ändern -# -function change_pxe_timerange($pxeDN,$newpxeDN,$pxetimerange){ - - global $ds, $suffix, $auDN, $ldapError; - - # move tree - if (move_subtree($pxeDN,$newpxeDN)){ - # timerange ändern - $entrypxe ['timerange'] = $pxetimerange; - if (ldap_mod_replace($ds,$newpxeDN,$entrypxe)){ - return 1; - } - else{ - return 0; - } - } - else{ - return 0; - } -} - -# -# nach dem Löschen von PXEConfig Menueinträgen müssen Menüpositionen in der PXEConfig -# angepasst werden (Lücken schließen) -# -function cleanup_menupositions($pxeDN){ - - global $ds, $suffix, $auDN, $ldapError; - - $me = get_menuentries($pxeDN,array("dn","menuposition")); - if (count($me) != 0){ - foreach ($me as $item){ - $pos = $item['menuposition']; - $pos = preg_replace ( '/0([0-9])/', '$1', $pos); - $menpos[$pos] = $item['dn']; - ksort($menpos); - } - $p = 1; - foreach ($menpos as $item){ - if (strlen($p) == 1){ - $p = "0".$p; - } - $entry ['menuposition'] = $p; - ldap_mod_replace($ds,$item,$entry); - $p++; - } - } -} - -# -# Hilfsfunktion zur Verarbeitung von Menüpositionen in PXEConfigs -# -function increment_menupositions($pxeDN,$menpos){ - - global $ds, $suffix, $auDN, $ldapError; - - if (strlen($menpos) == 1){ - $menpos = "0".$menpos; - } - $meDN = get_dn_menuposition($pxeDN,$menpos); - if ($meDN != ""){ - # zur Berechnung erst führende Nullen weg - $menpos = preg_replace ( '/0([0-9])/', '$1', $menpos); - $newpos = $menpos+1; - increment_menupositions($pxeDN,$newpos); - # zum Eintragen führenden Nullen wieder dazu - if (strlen($newpos) == 1){ - $newpos = "0".$newpos; - } - $entry ['menuposition'] = $newpos; - ldap_mod_replace($ds,$meDN,$entry); - } -} - -# -# Neuen Menüeintrag anlegen -# -function add_me($meDN,$mecn,$gbmDN,$menpos,$meattribs,$pxeDN){ - - global $ds, $suffix, $auDN, $ldapError; - - $mentry ['objectclass'][0] = "MenuEntry"; - $mentry ['objectclass'][1] = "top"; - $mentry ['cn'] = $mecn; - if($gbmDN != ""){$mentry ['genericmenuentrydn'] = $gbmDN;} - $mentry ['menuposition'] = $menpos; - if (count($meattribs) != 0){ - foreach (array_keys($meattribs) as $key){ - if ($meattribs[$key] != ""){ - $mentry[$key] = $meattribs[$key]; - } - } - } - print_r($mentry); echo "<br>"; - print_r($meDN); echo "<br>"; - increment_menupositions($pxeDN,$menpos); # andere jeweils um 1 erhöhen - if (ldap_add($ds,$meDN,$mentry)){ - return 1; - } - else{ - return 0; - } -} - - -# -# Menu Entry CN (DN) ändern -# -function modify_me_dn($meDN, $newmeDN){ - - global $ds, $suffix, $ldapError; - - if (move_subtree($meDN,$newmeDN)){ - return 1; - }else{ - return 0; - } -} - - - -##################################################################### -# Verwaltung von GBM -# - -function add_gbm($gbmDN,$gbmcn,$attribs){ - - global $ds, $suffix, $auDN, $ldapError; - - $entry ['objectclass'][0] = "MenuEntry"; - $entry ['objectclass'][1] = "top"; - $entry ['cn'] = $gbmcn; - if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - if ($attribs[$key] != ""){ - $entry[$key] = $attribs[$key]; - } - } - } - print_r($entry); echo "<br>"; - print_r($gbmDN); echo "<br>"; - if (ldap_add($ds,$gbmDN,$entry)){ - return 1; - } - else{ - return 0; - } -} - - -# -# beim löschen von GBMs muss dafür gesorgt werden, dass keine MEs mehr auf diese zeigen, -# Ref.Abhängigkeiten (sonst gibts Fehler beim PXE-Perlskript und die Nutzer wissen nicht dass ihr PXE Menü nicht -# mehr funktioniert, so kann man durch Fehlen des gbmDN wissen das es kein GBM mehr zu diesem ME gibt -# -function clean_up_del_gbm($gbmDN){ - - global $ds, $suffix, $auDN, $ldapError; - - $attribs = array("dn","genericmenuentrydn"); - if(!($result = uniLdapSearch($ds, "ou=RIPM,".$suffix, "(&(objectclass=MenuEntry)(genericmenuentrydn=$gbmDN))", $attribs, "dn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - #print_r($result); echo "<br><br>"; - $delentry ['genericmenuentrydn'] = $gbmDN; - foreach ($result as $item){ - #print_r($item['dn']); echo "<br>"; - ldap_mod_del($ds, $item['dn'], $delentry); - } - -} - - -# -# beim ändern des CN (DN) des GBM, Meüeinträge anpassen, Ref. Abhängigkeiten -# -function adjust_gbm_dn($newgbmDN, $gbmDN){ - - global $ds, $suffix, $auDN, $ldapError; - - if(!($result = uniLdapSearch($ds, "ou=RIPM,".$suffix, "(&(objectclass=MenuEntry)(genericmenuentrydn=$gbmDN))", array("dn"), "dn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - $result = ldapArraySauber($result); - $modentry ['genericmenuentrydn'] = $newgbmDN; - foreach ($result as $item){ - ldap_mod_replace($ds, $item['dn'], $modentry); - } -} - - - -function alternative_rbservices($rbsDN){ - - global $ds, $suffix, $auDN, $ldapError; - - $alt_rbs = array(); - - $rbsarray = get_rbsoffers($auDN); - # print_r($rbsarray); echo "<br>"; - if (count($rbsarray) != 0){ - for ($i=0; $i < count($rbsarray); $i++){ - if ($rbsarray[$i] != $rbsDN){ - $exp = ldap_explode_dn ( $rbsarray[$i], 1 ); - $alt = array ("dn" => $rbsarray[$i], "cn" => $exp[0], "au" => " / ".$exp[2]); - $alt_rbs[] = $alt; - } - } - } - - return $alt_rbs; -} - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/lib/syntax_check.php b/ldap-site-mngmt/webinterface/lib/syntax_check.php deleted file mode 100644 index 48926260..00000000 --- a/ldap-site-mngmt/webinterface/lib/syntax_check.php +++ /dev/null @@ -1,302 +0,0 @@ -<?php -/* - Syntaxcheck 1.2 2006/08/08 - - A class for checking syntax of forms data - Copyright (c) Tarik Gasmi, All Rights Reserved -*/ - - -class Syntaxcheck -{ - - var $ERROR = ""; - var $CLEAR = false; - - function Syntaxcheck () - { - return; - } - - function clear_error () - { - $this->ERROR = ""; - } - - - - - -# Ist "dotted quad IPAddress" in gueltigem Bereich? true or false -# Ueberprueft Format, fuehrende Nullen, und Werte > 255 -# -# Ueberprueft nicht nach reservierten oder nicht-route-baren IPs. -# -function check_ip_syntax($IP) -{ - if($this->CLEAR) { $this->clear_error();} - - $len = strlen($IP); - if( $len > 15 ){ - $this->ERROR = "check_ip_syntax: too long [$IP][$len]"; - return false; - } - - $badcharacter = eregi_replace("([0-9\.]+)","",$IP); - if(!empty($badcharacter)){ - $this->ERROR = "check_ip_syntax: Bad data in IP address [$badcharacter]"; - return false; - } - - $chunks = explode(".",$IP); - $count = count($chunks); - if ($count != 4){ - $this->ERROR = "check_ip_syntax: not a dotted quad [$IP]"; - return false; - } - - while ( list ($key,$val) = each ($chunks) ){ - if(ereg("^0",$val)){ - $this->ERROR = "check_ip_syntax: Invalid IP segment [$val]"; - return false; - } - $Num = $val; - settype($Num,"integer"); - if($Num > 255){ - $this->ERROR = "check_ip_syntax: Segment out of range [$Num]"; - return false; - } - } - - return true; - -} - -# Netzwerkaddresse -function check_netip_syntax($IP) -{ - if($this->CLEAR) { $this->clear_error();} - - if ( !($this->check_ip_syntax($IP)) ){ - return false; - } - $chunks = explode(".",$IP); - if ( $chunks[3] != "0" ){ - return false; - } - return true; -} - -# MAC Adresse -function check_mac_syntax($MAC) -{ - if($this->CLEAR) { $this->clear_error();} - - $len = strlen($MAC); - if( $len != 17 ){ - $this->ERROR = "check_mac_syntax: too long [$MAC][$len]"; - return false; - } - - $badcharacter = eregi_replace("([0-9a-fA-F\:]+)","",$MAC); - if(!empty($badcharacter)){ - $this->ERROR = "check_mac_syntax: Bad data in MAC address [$badcharacter]"; - return false; - } - - $chunks = explode(":",$MAC); - $count = count($chunks); - if ($count != 6){ - $this->ERROR = "check_mac_syntax: not in format hx:hx:hx:hx:hx:hx [$MAC]"; - return false; - } - foreach ($chunks as $chunk){ - $chunklen = strlen($chunk); - if( $len != 2 ){ - $this->ERROR = "check_mac_syntax: too long [$MAC][$len]"; - return false; - } - } - - return true; - -} - - -# Domainname - -# Hostname -function is_hostname ($hostname = ""){ - - if($this->CLEAR) { $this->clear_error(); } - - $web = false; - - if(empty($hostname)) - { - $this->ERROR = "is_hostname: No hostname submitted"; - return false; - } - - // Only a-z, 0-9, and "-" or "." are permitted in a hostname - - // Patch for POSIX regex lib by Sascha Schumann sas@schell.de - $Bad = eregi_replace("[-A-Z0-9\.]","",$hostname); - - if(!empty($Bad)) - { - $this->ERROR = "is_hostname: invalid chars [$Bad]"; - return false; - } - - // See if we're doing www.hostname.tld or hostname.tld - if(eregi("^www\.",$hostname)) - { - $web = true; - } - - // double "." is a not permitted - if(ereg("\.\.",$hostname)) - { - $this->ERROR = "is_hostname: Double dot in [$hostname]"; - return false; - } - if(ereg("^\.",$hostname)) - { - $this->ERROR = "is_hostname: leading dot in [$hostname]"; - return false; - } - - $chunks = explode(".",$hostname); - - if( (gettype($chunks)) != "array") - { - $this->ERROR = "is_hostname: Invalid hostname, no dot seperator [$hostname]"; - return false; - } - - $count = ( (count($chunks)) - 1); - - if($count < 1) - { - $this->ERROR = "is_hostname: Invalid hostname [$count] [$hostname]\n"; - return false; - } - - // Bug that can't be killed without doing an is_host, - // something.something will return TRUE, even if it's something - // stupid like NS.SOMETHING (with no tld), because SOMETHING is - // construed to BE the tld. The is_bigfour and is_country - // checks should help eliminate this inconsistancy. To really - // be sure you've got a valid hostname, do an is_host() on it. - - if( ($web) and ($count < 2) ) - { - $this->ERROR = "is_hostname: Invalid hostname [$count] [$hostname]\n"; - return false; - } - - $tld = $chunks[$count]; - - if(empty($tld)) - { - $this->ERROR = "is_hostname: No TLD found in [$hostname]"; - return false; - } - - if(!$this->is_bigfour($tld)) - { - if(!$this->is_country($tld)) - { - $this->ERROR = "is_hostname: Unrecognized TLD [$tld]"; - return false; - } - } - - - return true; -} - - -# Syntax Check für die Eingaben: Uhrzeit, Wochentag, Monatstag, Monatstag.Monat -function check_timerange_syntax($mcday,$mcbeg,$mcend){ - - if($this->CLEAR) { $this->clear_error();} - - $badcharacter = eregi_replace("([a-z0-9\.]+)","",$mcday); - if(!empty($badcharacter)){ - $this->ERROR = "check_ip_syntax: Bad data in MC Day [$badcharacter]"; - return false; - } - $badcharacter = eregi_replace("([x0-9]+)","",$mcbeg); - if(!empty($badcharacter)){ - $this->ERROR = "check_ip_syntax: Bad data in MC Begin [$badcharacter]"; - return false; - } - $badcharacter = eregi_replace("([x0-9]+)","",$mcend); - if(!empty($badcharacter)){ - $this->ERROR = "check_ip_syntax: Bad data in MC End [$badcharacter]"; - return false; - } - - $lenmcday = strlen($mcday); - if (eregi("([a-z]+)",$mcday)){ - if ($lenmcday > 2){$this->ERROR = "WOTAG > 2"; return false;} - if (eregi("([0-9\.]+)",$mcday)){$this->ERROR = "WOTAG enthaelt (0-9.)"; return false;} - #if (!(eregi("[mdsfx][aiorx]",$mcday))){return false;} - if (!(eregi("(m[io]|d[io]|s[ao]|fr|x)",$mcday))){$this->ERROR = "WOTAG falscher String"; return false;} - } - if (eregi("([0-9]+)",$mcday)){ - if (eregi("[\.]",$mcday)){ - preg_match("/[\.]/",$mcday,$treffer); - if (count($treffer) > 1){$this->ERROR = "mehr als 2 Punkte"; return false;}; - $exp = explode('.',$mcday); - $day = $exp[0]; - $lenday = strlen($day); - if ($lenday > 2){$this->ERROR = "TAG > 2"; return false;} - if (!(eregi("(0[1-9]|[0-2][0-9]|3[01])",$day))){$this->ERROR = "TAG nicht korrekt"; return false;} - $month = $exp[1]; - $lenmonth = strlen($month); - if ($lenmonth > 2){$this->ERROR = "MONAT > 2"; return false;} - if (!(eregi("(0[0-9]|0[0-9]|1[0-2])",$month))){$this->ERROR = "Monat nicht korrekt"; return false;} - - } - else{ - if ($lenmcday > 2){$this->ERROR = "TAG > 2"; return false;} - if (!(eregi("(0[0-9]|[0-2][0-9]|3[01])",$mcday))){$this->ERROR = "Tag nicht korrekt"; return false;} - } - } - - $lenmcbeg = strlen($mcbeg); - if ($lenmcbeg == 2){ - if (!(eregi("(0[0-9]|1[0-9]|2[0-3]|x)",$mcbeg))){$this->ERROR = "Uhrzeit nicht korrekt"; return false;} - } - if ($lenmcbeg == 1){ - if (!(eregi("([0-9]|x)",$mcbeg))){$this->ERROR = "Uhrzeit nicht korrekt"; return false;} - } - $lenmcend = strlen($mcend); - if ($lenmcend == 2){ - if (!(eregi("(0[0-9]|1[0-9]|2[0-3]|x)",$mcend))){$this->ERROR = "Uhrzeit nicht korrekt"; return false;} - } - if ($lenmcend == 1){ - if (!(eregi("([0-9]|x)",$mcend))){$this->ERROR = "Uhrzeit nicht korrekt"; return false;} - } - - return true; -} - - -# Überprüft ob Menuposition ein Zahl ist -function check_menuposition($menpos){ - - if($this->CLEAR) { $this->clear_error();} - - $badcharacter = eregi_replace("([0-9]+)","",$menpos); - if(!empty($badcharacter)){ - $this->ERROR = "check_menupostion: Bad data in Menu Position [$badcharacter]"; - return false; - } -} - -} -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/login_form.inc.html b/ldap-site-mngmt/webinterface/login_form.inc.html deleted file mode 100644 index f9e32891..00000000 --- a/ldap-site-mngmt/webinterface/login_form.inc.html +++ /dev/null @@ -1,29 +0,0 @@ -<form name="loginform" action="{PFAD}login_sicher.php" method="post"> - <table border="0" cellspacing="0" cellpadding="2"> - <!--<tr> - <td colspan="2"><p><b>Benutzerlogin:</b></p></td> - </tr>--> - <tr> - <td colspan="3"> </td> - </tr> - <tr> - <td><p class="small_loginform_text"><b>UserID:</b></p></td> - <td><input type="Text" name="uid" size="15" class="small_loginform_field" select> </td> - <td><p class="small_loginform_text"> </p></td> - </tr> - <tr> - <td><p class="small_loginform_text"><b>Passwort:</b></p></td> - <td><input type="Password" name="userPassword" size="15" class="small_loginform_field"> </td> - <td><p class="small_loginform_text"> </p></td> - </tr> - <tr> - <td><p class="small_loginform_text"> </p></td> - <td align="right"><input type="Submit" name="Login" value="Anmelden" class="small_loginform_button"></td> - <td><p class="small_loginform_text"> </p></td> - </tr> - </table> -</form> - -<script type="text/javascript"> - document.loginform.uid.focus(); -</script>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/login_sicher.php b/ldap-site-mngmt/webinterface/login_sicher.php deleted file mode 100644 index 307b7b92..00000000 --- a/ldap-site-mngmt/webinterface/login_sicher.php +++ /dev/null @@ -1,365 +0,0 @@ -<?php -/** -* login_sicher.php f�hrt einen Bind mit den eingegebenen Benutzerdaten durch. -* Dabei erfolgt die Authetifizierung entsprechend der Ausf�hrung bei der Pr�sentation des Projektes -* am RZ-LDAP. Das Passwort des Users wird aber nun nicht mehr auf dem Gruppe1 LDAP gespeichert. Dort -* legt das Skript ein Standardpasswort an. -* Im Fehlerfall wird eine Meldung ausgegeben und anschlie�end auf index.php weitergeleitet. -* Bei erfolgreichem nicht anonymem Bind werden die Benutzerrechte ausgelesen und davon abh�ngig -* die entsprechende Startseite aufgerufen. dn, uid, userPassword, cn und die Rechte werden in -* einer Session gespeichert. -* -* DIESE VERSION IST AKTUELL IM EINSATZ!!!! -* -* @version V3.2 -* @author Timothy Burk -*/ -session_cache_expire(30); -session_start(); - -# LDAP-Bibliothek einbinden -include("lib/ldap.inc.php"); -# Standard-Bibliothek einbinden -include("lib/commonlib.inc.php"); - -$uid = $_POST['uid']; -$userPassword = $_POST['userPassword']; -# $userDn_rz = "uid=".$uid.",ou=people,".$suffix_rz; -$userDN = "uid=".$uid.",ou=people,".$suffix; - -#echo "uid: "; print_r($uid); echo "<br>"; -#echo "pw: "; print_r($userPassword); echo "<br>"; - -checkLogin($uid,$userPassword); - -/** -* checkLogin($uid, $userPassword) - Authentifizierung am RZ-LDAP und Gruppe1-LDAP -* -* Wenn RZ-LDAP-Login UND Gruppe1-LDAP-Login erfolgreich sind, dann ist der User -* bereits im Gruppe1-LDAP eingetragen. -* -> Mache Datenabgleich und anschlie�enden Login am Gruppe1-LDAP -* Wenn RZ-LDAP-Login erfolgreich, Gruppe1-LDAP-Login jedoch nicht erfolgreich ist, -* dann unterscheide zwischen zwei M�glichkeiten: -* 1. Der User ist im Gruppe1-LDAP nicht angelegt, -* 2. Der User ist im Gruppe1-LDAP zwar angelegt, aber das Passwort wurde auf dem RZ-LDAP inzwischen ge�ndert. -* -> Login als Dummy und Check, ob UID vorhanden -* Wenn RZ-LDAP-Login nicht erfolgreich, Gruppe1-LDAP-Login jedoch erfolgreich ist, -* dann ist der User auf dem RZ-LDAP nicht gespeichert. -* -> Login am Gruppe1-LDAP -* In anderen F�llen waren die Zugangsdaten nicht korrekt. -* -> Redirect auf index.php. -* -* Schema siehe auch /home/gruppe1/Praesentation/Login und Personen.pps -* -* @param string UID -* @param string Password -* -* @see userLogin() -* @see datenabgleich() -* @see dummyUidCheck() -* @see userAnlegen() -* -* @author Timothy Burk -*/ -function checkLogin($uid = "", $userPassword = "") { - global $userDn_rz, $userDN, $suffix, $suffix_rz, $ldapError, $standardPassword; - # Abfrage, ob das Loginformular Daten enth�lt - if(!(($uid == "") || ($userPassword == ""))) { - # UID und Passwort wurden eingegeben - # Fallunterscheidung welche Logins m�glich sind - /* if(($ds_rz = rzLdapConnect($uid,$userPassword)) && ($ds = uniLdapConnect($uid, $standardPassword))) { - # Wenn RZ-LDAP-Login UND Gruppe1-LDAP-Login erfolgreich sind, dann ist der User - # bereits im Gruppe1-LDAP eingetragen. - # -> Mache Datenabgleich und anschlie�enden Login am Gruppe1-LDAP - datenabgleich($uid, $userPassword, $ds_rz, $ds); - ldap_unbind($ds); - ldap_unbind($ds_rz); - $userPassword = $standardPassword; - userLogin($uid, $userPassword); - } else if(($ds_rz = rzLdapConnect($uid,$userPassword)) && !($ds = uniLdapConnect($uid, $standardPassword))) { - # Wenn RZ-LDAP-Login erfolgreich, Gruppe1-LDAP-Login jedoch nicht erfolgreich ist, - # dann unterscheide zwischen zwei M�glichkeiten: - # 1. Der User ist im Gruppe1-LDAP nicht angelegt, - # 2. Der User ist im Gruppe1-LDAP zwar angelegt, aber das Passwort wurde auf dem RZ-LDAP - # inzwischen ge�ndert. - # -> Login als Dummy und Check, ob UID vorhanden - if(dummyUidCheck($uid)) { - #changePassword($uid,$userPassword); - $userPassword = $standardPassword; - } else { - userAnlegen($uid,$userPassword,$ds_rz); - } - ldap_unbind($ds_rz); - $userPassword = $standardPassword; - checkLogin($uid, $userPassword); - } else if(!($ds_rz = rzLdapConnect($uid,$userPassword)) && */ if ($ds = uniLdapConnect($uid,$userPassword)) { - # Wenn RZ-LDAP-Login nicht erfolgreich, Gruppe1-LDAP-Login jedoch erfolgreich ist, - # dann ist der User auf dem RZ-LDAP nicht gespeichert. - # -> Login am Gruppe1-LDAP - ldap_unbind($ds); - userLogin($uid, $userPassword); - } else { - # In anderen F�llen waren die Zugangsdaten nicht korrekt. - # -> Redirect auf index.php. - redirect(3, "index.php", "<h3>Bitte geben Sie korrekte Zugangsdaten ein.<h3>".$ldapError, FALSE); - die; - } - - } else { - # UID und/oder Passwort wurden NICHT eingegeben - redirect(3, "index.php", "<h3>Bitte geben Sie User-Id und Passwort ein.</h3>".$ldapError, FALSE); - die; - } -} - -/** -* dummyUidCheck($uid) - �berpr�ft, ob UID im Gruppe1-LPAD vorhanden ist. -* -* �ber den Dummyuser wird eine Verbindung zum Gruppe1-LDAP aufgebaut und die angegebene -* UID wird gesucht. -* -* @param string UID -* -* @return boolean TRUE = UID vorhanden, FALSE = UID nicht gefunden -* -* @author Timothy Burk -*/ -function dummyUidCheck($uid) { - global $userDn, $suffix, $suffix_rz, $ldapError, $dummyUid, $dummyPassword; - # Bei Erfolg stellen wir eine Verbindung mit unserem LDAP her. Dazu nutzen wir den Dummy: - if(!($ds_dummy = uniLdapConnect($dummyUid, $dummyPassword))) { - redirect(5, "index.php", "Dummy-Login fehlgeschlagen!<br>".$ldapError, FALSE); - die; - } - # Im n�chsten Schritt wird �berpr�ft, ob ein Eintrag mit der UID $uid schon vorliegt: - if(!($person_daten = uniLdapSearch($ds_dummy, "ou=people,".$suffix, "uid=$uid", array("*"), "", "list", 0, 0))) { - redirect(5, "index.php", $ldapError, FALSE); - die; - } - if($person_daten['count'] == 0) { - # Eintrag ist nicht vorhanden. -> Anlegen - ldap_unbind($ds_dummy); - return FALSE; - } else { - ldap_unbind($ds_dummy); - return TRUE; - } -} - -/** -* userAnlegen($uid,$userPassword,$ds_rz) -* -* Legt mithilfe des Dummyusers einen noch nicht bei uns gef�hrten User im Gruppe1-LDAP -* mit den Daten des Rechenzentrums an. Das Passwort ist dabei f�r alle User in der config.inc.php festgelegt. -* -* @param string UID -* @param string Password -* @param resource RZ-LDAP Directory Handle -* -* @author Timothy Burk -*/ -function userAnlegen($uid,$userPassword,$ds_rz) { - global $userDn_rz, $userDn, $suffix, $suffix_rz, $ldapError, $dummyUid, $dummyPassword, $standardPassword; - # Bei Erfolg stellen wir eine Verbindung mit unserem LDAP her. Dazu nutzen wir den Dummy: - if(!($ds_dummy = uniLdapConnect($dummyUid, $dummyPassword))) { - redirect(5, "index.php", "Dummy-Login fehlgeschlagen!<br>".$ldapError, FALSE); - die; - } - # Im n�chsten Schritt wird �berpr�ft, ob ein Eintrag mit der UID $uid schon vorliegt: - $ruffelder = array("uid", "sn", "givenname", "uidnumber", "gidnumber", "homedirectory", "loginshell", "rufnutzernummer", "rufanrede", "rufeinrichtung", "rufmatnr", "rufaccounttype", "ruffakultaet", "mail", "rufdienst"); - - if(!($person_daten = uniLdapSearch($ds_rz, "ou=people,".$suffix_rz, "uid=$uid", $ruffelder, "", "list", 0, 0))) { - redirect(5, "index.php", $ldapError, FALSE); - die; - } - $person_daten = ldapArraySauber($person_daten); - $person_daten = $person_daten[0]; - foreach($ruffelder as $ruffeld) { - $ruffeld = str_replace("ruf","",$ruffeld); - if($ruffeld == "accounttype") { - $gruppe1felder[] = "employeetype"; - } else if($ruffeld == "anrede") { - $gruppe1felder[] = "title"; - } else { - $gruppe1felder[] = $ruffeld; - } - } - $i = 0; - $neuerEintrag = array(); - foreach($gruppe1felder as $gruppe1feld) { - if (isset($person_daten[$ruffelder[$i]])) { - $neuerEintrag[$gruppe1feld] = $person_daten[$ruffelder[$i]]; - } else { - $neuerEintrag[$gruppe1feld] = ''; - } - $i++; - } - if($neuerEintrag['employeetype'] != "student") { - unset($neuerEintrag['employeetype']); - } else { - $neuerEintrag['employeetype'] = ucfirst($neuerEintrag['employeetype']); - } - $neuerEintrag['userPassword'] = $userPassword; - # Ermitteln der Initialen: Erster Buchstabe des Vornamens und erster Buchstabe des Nachnamens - $neuerEintrag['initials'] = substr($neuerEintrag['givenname'],0,1).".".substr($neuerEintrag['sn'],0,1)."."; - - # CN erstellen - $neuerEintrag['cn'] = $neuerEintrag['givenname']." ".$neuerEintrag['sn']; - - # Aktiv setzen - $neuerEintrag['aktiv'] = "yes"; - $neuerEintrag = inputArraySauber($neuerEintrag); - - # Festes Sicherungspasswort setzen - $neuerEintrag['userPassword'] = $standardPassword; - if(!($add = uniLdapAdd($ds_dummy, $userDn, $neuerEintrag, "personen"))) { - redirect(5, "index.php", "<b>Eintrag nicht erfolgreich</b><br>".$ldapError, FALSE); - die; - } -} - -/** -* datenabgleich($uid, $userPassword, $ds_rz, $ds) - �berschreibt bei jedem Login die Daten des -* Gruppe1-LDAP mit denen des RZ-LDAP mithilfe des Dummyusers. -* -* @param string UID -* @param string Password -* @param resource ds_rz RZ-LDAP Directory Handle -* @param resource ds Gruppe1-LDAP Directory Handle nach Bind mit Dummyuser -* -* @author Timothy Burk -*/ -function datenabgleich($uid, $userPassword, $ds_rz, $ds) { - global $userDn_rz, $userDn, $suffix, $suffix_rz, $ldapError, $dummyUid, $dummyPassword, $standardPassword; - # Bei Erfolg stellen wir eine Verbindung mit unserem LDAP her. Dazu nutzen wir den Dummy: - if(!($ds_dummy = uniLdapConnect($dummyUid, $dummyPassword))) { - redirect(5, "index.php", "Dummy-Login fehlgeschlagen!<br>".$ldapError, FALSE); - die; - } - # Im n�chsten Schritt wird �berpr�ft, ob ein Eintrag mit der UID $uid schon vorliegt: - $ruffelder = array("uid", "sn", "givenname", "uidnumber", "gidnumber", "homedirectory", "loginshell", "rufnutzernummer", "rufanrede", "rufeinrichtung", "rufmatnr", "rufaccounttype", "ruffakultaet", "mail", "rufdienst"); - - if(!($person_daten = uniLdapSearch($ds_rz, "ou=people,".$suffix_rz, "uid=$uid", $ruffelder, "", "list", 0, 0))) { - redirect(5, "index.php", $ldapError, FALSE); - die; - } - $person_daten = ldapArraySauber($person_daten); - $person_daten = $person_daten[0]; - foreach($ruffelder as $ruffeld) { - $ruffeld = str_replace("ruf","",$ruffeld); - if($ruffeld == "accounttype") { - $gruppe1felder[] = "employeetype"; - } else if($ruffeld == "anrede") { - $gruppe1felder[] = "title"; - } else { - $gruppe1felder[] = $ruffeld; - } - } - $i = 0; - $neuerEintrag = array(); - foreach($gruppe1felder as $gruppe1feld) { - if (isset($person_daten[$ruffelder[$i]])) { - $eintrag = $person_daten[$ruffelder[$i]]; - } else { - $eintrag = ''; - } - $neuerEintrag[$gruppe1feld] = $eintrag; //$person_daten[$ruffelder[$i]]; - $i++; - } - - if($neuerEintrag['employeetype'] != "student") { - unset($neuerEintrag['employeetype']); - } else { - $neuerEintrag['employeetype'] = ucfirst($neuerEintrag['employeetype']); - } - $neuerEintrag['userPassword'] = $userPassword; - # Ermitteln der Initialen: Erster Buchstabe des Vornamens und erster Buchstabe des Nachnamens - $neuerEintrag['initials'] = substr($neuerEintrag['givenname'],0,1).".".substr($neuerEintrag['sn'],0,1)."."; - - # CN erstellen - $neuerEintrag['cn'] = $neuerEintrag['givenname']." ".$neuerEintrag['sn']; - - # Aktiv setzen - $neuerEintrag['aktiv'] = "yes"; - $neuerEintrag = inputArraySauber($neuerEintrag); - - # Festes Sicherungspasswort setzen - $neuerEintrag['userPassword'] = $standardPassword; - - if(!($alteDaten = uniLdapSearch($ds_dummy, "ou=people,".$suffix, "uid=$uid", array("*"), "", "list", 0, 0))) { - redirect(5, "index.php", $ldapError, FALSE); - die; - } - - if(uniLdapModify($ds_dummy, $userDn, $alteDaten, $neuerEintrag, 0)) { - $meldung = "Daten abgeglichen"; - } - -} - -/** -* userLogin($uid, $userPassword) - F�hrt den Login am Gruppe1-LDAP durch. -* -* Nach erfolgreicher Identifikation und ggf. neuem Anlegen oder Datenabgleich wird -* mit userLogin() der Bind am Gruppe1-LDAP durchgef�hrt. -* Die Rechte und der CN des Users werden ausgelesen und in der Session gespeichert. -* Anschlie�end leitet das Skript auf die Startseite der Verwaltung (person_daten_show.php) weiter. -* -* @param string UID -* @param string Password -* -* @author Timothy Burk -*/ -function userLogin($uid, $userPassword) { - global $userDN, $suffix, $ldapError; - # Verbindung mit der Datenbank herstellen - if(($uid == "") || ($userPassword == "") || !($ds = uniLdapConnect($uid,$userPassword))) { - redirect(3, "index.php", "Falscher Login<br>".$ldapError, FALSE); - die; - } - - # cn abfragen - $cn = "Gast"; - if(!($person_daten = uniLdapSearch($ds, "ou=people,".$suffix, "uid=$uid", array("cn"), "", "list", 0, 0))) { - redirect(3, "index.php", $ldapError, FALSE); - die; - } else { - $cn = str_replace('\"', '', $person_daten[0]['cn'][0]); - } - - # Speichern der Sessionvariablen - $_SESSION['uid'] = $uid; - $_SESSION['userPassword'] = $userPassword; - $_SESSION['dn'] = $userDN; - $_SESSION['cn'] = $cn; - $_SESSION['audn'] = ""; - $_SESSION['status'] = "in"; - $_SESSION['error']; - - # LDAP-Bind aufheben - ldap_unbind($ds); - - $mesg = "<html> - <head> - <title>AdminUnit Management</title> - <link rel='stylesheet' href='styles.css' type='text/css'> - </head> - <body> - <table border='0' cellpadding='200' cellspacing='0' width='100%'> - <tr valign='middle'><td align='center'> - <h3>Bitte einen Moment Geduld, die Seite wird geladen ... <br> - Falls nicht, klicken Sie bitte <a href='start.php'>hier</a>.<h3> - </td></tr> - </table> - </body> - </html>"; - # Aufruf der Startseite: - - redirect(0, "start.php", $mesg, TRUE); - - # nichtmehr ben�tigte CSV-Dateien im tmp-Verzeichnis l�schen - # listen_sauber(); -} - - -?> diff --git a/ldap-site-mngmt/webinterface/logout_form.inc.dwt b/ldap-site-mngmt/webinterface/logout_form.inc.dwt deleted file mode 100644 index 0c6ce597..00000000 --- a/ldap-site-mngmt/webinterface/logout_form.inc.dwt +++ /dev/null @@ -1,9 +0,0 @@ -<form action="{PFAD}index.php" method="post">
- <table border="0" cellspacing="0" cellpadding="3">
- <tr valign='top' align='right'>
- <td><p class="tiny_loginform_text">Eingeloggt als: </td>
- <td><b> {USERCN} </b></td>
- <td><input type="Submit" name="Logout" value="Logout" class="tiny_loginform_button"></p></td>
- </tr>
- </table>
-</form>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/pics/arrow.png b/ldap-site-mngmt/webinterface/pics/arrow.png Binary files differdeleted file mode 100644 index f65dbf64..00000000 --- a/ldap-site-mngmt/webinterface/pics/arrow.png +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/branch.gif b/ldap-site-mngmt/webinterface/pics/branch.gif Binary files differdeleted file mode 100644 index 32e0f683..00000000 --- a/ldap-site-mngmt/webinterface/pics/branch.gif +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/branch2.gif b/ldap-site-mngmt/webinterface/pics/branch2.gif Binary files differdeleted file mode 100644 index a693647c..00000000 --- a/ldap-site-mngmt/webinterface/pics/branch2.gif +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/branchbottom.gif b/ldap-site-mngmt/webinterface/pics/branchbottom.gif Binary files differdeleted file mode 100644 index 55ceb453..00000000 --- a/ldap-site-mngmt/webinterface/pics/branchbottom.gif +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/branchbottom2.gif b/ldap-site-mngmt/webinterface/pics/branchbottom2.gif Binary files differdeleted file mode 100644 index a27a9c4c..00000000 --- a/ldap-site-mngmt/webinterface/pics/branchbottom2.gif +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/branchtop.gif b/ldap-site-mngmt/webinterface/pics/branchtop.gif Binary files differdeleted file mode 100644 index f6bd127b..00000000 --- a/ldap-site-mngmt/webinterface/pics/branchtop.gif +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/down.gif b/ldap-site-mngmt/webinterface/pics/down.gif Binary files differdeleted file mode 100644 index 51095d1c..00000000 --- a/ldap-site-mngmt/webinterface/pics/down.gif +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/down2.gif b/ldap-site-mngmt/webinterface/pics/down2.gif Binary files differdeleted file mode 100644 index 4fb87681..00000000 --- a/ldap-site-mngmt/webinterface/pics/down2.gif +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/folder-expanded.gif b/ldap-site-mngmt/webinterface/pics/folder-expanded.gif Binary files differdeleted file mode 100644 index f779acc7..00000000 --- a/ldap-site-mngmt/webinterface/pics/folder-expanded.gif +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/folder.gif b/ldap-site-mngmt/webinterface/pics/folder.gif Binary files differdeleted file mode 100644 index 842989f2..00000000 --- a/ldap-site-mngmt/webinterface/pics/folder.gif +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/header.png b/ldap-site-mngmt/webinterface/pics/header.png Binary files differdeleted file mode 100644 index 7155aa01..00000000 --- a/ldap-site-mngmt/webinterface/pics/header.png +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/header1.png b/ldap-site-mngmt/webinterface/pics/header1.png Binary files differdeleted file mode 100644 index ccb676fb..00000000 --- a/ldap-site-mngmt/webinterface/pics/header1.png +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/headerlayer.xcf b/ldap-site-mngmt/webinterface/pics/headerlayer.xcf Binary files differdeleted file mode 100644 index b906128f..00000000 --- a/ldap-site-mngmt/webinterface/pics/headerlayer.xcf +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/host.png b/ldap-site-mngmt/webinterface/pics/host.png Binary files differdeleted file mode 100644 index 5741243e..00000000 --- a/ldap-site-mngmt/webinterface/pics/host.png +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/host1.png b/ldap-site-mngmt/webinterface/pics/host1.png Binary files differdeleted file mode 100644 index 6cc7079d..00000000 --- a/ldap-site-mngmt/webinterface/pics/host1.png +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/hostfaulty.png b/ldap-site-mngmt/webinterface/pics/hostfaulty.png Binary files differdeleted file mode 100644 index c011fb15..00000000 --- a/ldap-site-mngmt/webinterface/pics/hostfaulty.png +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/hostfaulty1.png b/ldap-site-mngmt/webinterface/pics/hostfaulty1.png Binary files differdeleted file mode 100644 index 5c64ea02..00000000 --- a/ldap-site-mngmt/webinterface/pics/hostfaulty1.png +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/hostnoboot.png b/ldap-site-mngmt/webinterface/pics/hostnoboot.png Binary files differdeleted file mode 100644 index e5351514..00000000 --- a/ldap-site-mngmt/webinterface/pics/hostnoboot.png +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/hostnoboot1.png b/ldap-site-mngmt/webinterface/pics/hostnoboot1.png Binary files differdeleted file mode 100644 index 4325a841..00000000 --- a/ldap-site-mngmt/webinterface/pics/hostnoboot1.png +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/line.gif b/ldap-site-mngmt/webinterface/pics/line.gif Binary files differdeleted file mode 100644 index a567ef9e..00000000 --- a/ldap-site-mngmt/webinterface/pics/line.gif +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/line2.gif b/ldap-site-mngmt/webinterface/pics/line2.gif Binary files differdeleted file mode 100644 index 659e20fe..00000000 --- a/ldap-site-mngmt/webinterface/pics/line2.gif +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/linebottom.gif b/ldap-site-mngmt/webinterface/pics/linebottom.gif Binary files differdeleted file mode 100644 index a960f1ff..00000000 --- a/ldap-site-mngmt/webinterface/pics/linebottom.gif +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/minus.gif b/ldap-site-mngmt/webinterface/pics/minus.gif Binary files differdeleted file mode 100644 index a2bff127..00000000 --- a/ldap-site-mngmt/webinterface/pics/minus.gif +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/minus2.gif b/ldap-site-mngmt/webinterface/pics/minus2.gif Binary files differdeleted file mode 100644 index 4f31339e..00000000 --- a/ldap-site-mngmt/webinterface/pics/minus2.gif +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/minusbottom.gif b/ldap-site-mngmt/webinterface/pics/minusbottom.gif Binary files differdeleted file mode 100644 index cc33192e..00000000 --- a/ldap-site-mngmt/webinterface/pics/minusbottom.gif +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/minustop.gif b/ldap-site-mngmt/webinterface/pics/minustop.gif Binary files differdeleted file mode 100644 index 9e8fc36d..00000000 --- a/ldap-site-mngmt/webinterface/pics/minustop.gif +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/plus.gif b/ldap-site-mngmt/webinterface/pics/plus.gif Binary files differdeleted file mode 100644 index 5bc24cfb..00000000 --- a/ldap-site-mngmt/webinterface/pics/plus.gif +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/plus2.gif b/ldap-site-mngmt/webinterface/pics/plus2.gif Binary files differdeleted file mode 100644 index 1fee2d74..00000000 --- a/ldap-site-mngmt/webinterface/pics/plus2.gif +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/plusbottom.gif b/ldap-site-mngmt/webinterface/pics/plusbottom.gif Binary files differdeleted file mode 100644 index 4aa0bde9..00000000 --- a/ldap-site-mngmt/webinterface/pics/plusbottom.gif +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/plustop.gif b/ldap-site-mngmt/webinterface/pics/plustop.gif Binary files differdeleted file mode 100644 index 24e8a9ec..00000000 --- a/ldap-site-mngmt/webinterface/pics/plustop.gif +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/up.gif b/ldap-site-mngmt/webinterface/pics/up.gif Binary files differdeleted file mode 100644 index dfff04b4..00000000 --- a/ldap-site-mngmt/webinterface/pics/up.gif +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/pics/up2.gif b/ldap-site-mngmt/webinterface/pics/up2.gif Binary files differdeleted file mode 100644 index 48ac4a4b..00000000 --- a/ldap-site-mngmt/webinterface/pics/up2.gif +++ /dev/null diff --git a/ldap-site-mngmt/webinterface/rbs/delete_confirm.php b/ldap-site-mngmt/webinterface/rbs/delete_confirm.php deleted file mode 100644 index 11a04dfd..00000000 --- a/ldap-site-mngmt/webinterface/rbs/delete_confirm.php +++ /dev/null @@ -1,90 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$dn = $_POST['dn']; -$name = $_POST['name']; -$delurl = $_POST['delurl']; -$backurl = $_POST['backurl']; -$successurl = $_POST['successurl']; - -$type = $_POST['type']; -$pxedn = $_POST['pxedn']; - -echo " -<html> -<head> - <title>AU Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> - <tr> - <td>"; - - -if($type == "gbm"){ - $gbmDN = $dn; - $attribs = array("dn"); - if(!($result = uniLdapSearch($ds, "ou=RIPM,".$suffix, "(&(objectclass=MenuEntry)(genericmenuentrydn=$gbmDN))", $attribs, "dn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else{ - $result = ldapArraySauber($result); - if (count($result) > 0){ - echo "Folgende Menü Einträge sind davon betroffen: <br><br>"; - foreach ($result as $item){ - $exp = ldap_explode_dn($item['dn'], 1); - echo "Menü Eintrag <b>".$exp[0]."</b> in PXE Bootmenü <b>".$exp[1]."</b> [ Abteilung: ".$exp[4]." ]<br>"; - } - } - else{ - echo "Keine Menü Einträge davon betroffen!<br>"; - } - } -} - -if($type == "rbs"){ - $rbsDN = $dn; - $attribs = array("dn"); - if(!($result = uniLdapSearch($ds, "ou=RIPM,".$suffix, "(&(objectclass=PXEConfig)(rbservicedn=$rbsDN))", $attribs, "dn", "sub", 0, 0))) { - # redirect(5, "", $ldapError, FALSE); - echo "no search"; - die; - } - else{ - $result = ldapArraySauber($result); - if (count($result) > 0){ - echo "Folgende PXE Boot Menüs sind davon betroffen: <br><br>"; - foreach ($result as $item){ - $exp = ldap_explode_dn($item['dn'], 1); - echo "PXE Boot Menü <b>".$exp[0]."</b> an Objekt <b>".$exp[1]."</b> [ Abteilung: ".$exp[3]." ]<br>"; - } - } - else{ - echo "Keine PXE Boot Menüs davon betroffen!<br>"; - } - } -} - - echo "<br><br> - Wollen Sie das Objekt <b>".$name."</b> wirklich löschen?<br><br> - <form action='".$delurl."' method='post'> - Falls ja:<br><br> - <input type='hidden' name='dn' value='".$dn."'> - <input type='hidden' name='name' value='".$name."'> - <input type='hidden' name='successurl' value='".$successurl."'> - <input type='hidden' name='pxedn' value='".$pxedn."'> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'><br><br> - </form> - <form action='".$backurl."' method='post'> - Falls, nein:<br><br> - <input type='Submit' name='apply' value='zurück' class='small_loginform_button'> - </form> - </td> - </tr> -</table> -</body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/gbm.dwt b/ldap-site-mngmt/webinterface/rbs/gbm.dwt deleted file mode 100644 index 2c96ceaa..00000000 --- a/ldap-site-mngmt/webinterface/rbs/gbm.dwt +++ /dev/null @@ -1,189 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - - <tr> - <td height='20'><h4><a href='gbm_overview.php?rbsdn={RBSDN}&mnr={MNR}&sbmnr={SBMNR}' class='headerlink'><< Zurück zur GBM Übersicht</a></h4></td> - </tr> - <tr> - <td height='20'> </td> - </tr> - - <tr> - <td colspan='2'><h3>Generisches Boot Image <code class='font_object'> {GBMCN} </code> </h3></td> - </tr> - <tr> - <td height='20'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='gbm_change.php' method='post'> - - <tr> - <td width='40%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='60%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Eindeutiger Name (cn):</b><br>(Teil des dn, ohne Leerzeichen eingeben) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='gbmcn' value='{GBMCN}' size='50' class='medium_form_field'> - <input type='hidden' name='oldgbmcn' value='{GBMCN}'> - </td> - </tr> - - </table></td> - </tr> - - <tr> - <td height='40'></td> - </tr> - - <tr> - <td colspan='2'><h4>KERNEL und APPEND Parameter:</h4></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td width='20%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='35%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b> </b></td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>KERNEL</td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <font size='+1'>{TFTPIP}::{TFTPROOT}/{TFTPKERNEL}</font> - <input type='Text' name='attribs[kernel]' value='{KERNEL}' size='40' class='medium_form_field'> - <input type='hidden' name='oldattribs[kernel]' value='{KERNEL}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>APPEND</td> - <td align='right' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Initialram FS: </b></td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - <font size='+1'>initrd={TFTPIP}::{TFTPROOT}/{TFTPKERNEL}</font> - <input type='Text' name='attribs[initrd]' value='{INITRD}' size='40' class='medium_form_field'> - <input type='hidden' name='oldattribs[initrd]' value='{INITRD}'> - </td> - </tr> - <tr valign='top'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Root Filesystem: </b></td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - <font size='+1'>rootfs={ROOTFS}</font> - </td> - </tr> - <tr valign='top'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> <b>Ändern:</b><br> - {FSURISELECT} - </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - bei NFS eventuell um spezifischen Pfad erweitern:<br> - <input type='Text' name='rootfssuffix' value='' size='35' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Debug-Level: </b> </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - <font size='+1'>debug=</font> - <input type='Text' name='attribs[debug]' value='{DEBUG}' size='2' class='medium_form_field'> - <input type='hidden' name='oldattribs[debug]' value='{DEBUG}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Misc APPEND: </b><br>(wird hinten angefügt) </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[appendmisc]' value='{MISC}' size='80' class='medium_form_field'> - <input type='hidden' name='oldattribs[appendmisc]' value='{MISC}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>IPAPPEND: </b> </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[ipappend]' value='{IPAPPEND}' size='2' class='medium_form_field'> - <input type='hidden' name='oldattribs[ipappend]' value='{IPAPPEND}'> - </td> - </tr> - - <input type='hidden' name='gbmdn' value='{GBMDN}'> - <input type='hidden' name='rbsdn' value='{RBSDN}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - - </table></td> - </tr> - <tr> - <td><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - <tr> - <td height='50'></td> - </tr> - <tr> - <td colspan='2'><h3>Daraus ergibt sich folgender generischer Bootmenüeintrag</h3></td> - </tr> - <tr> - <td colspan='2'>Diesen können Nutzer des Dienstes für ihre PXE-Configs verwenden und zu eigenen Menüeinträgen erweitern.</td> - </tr> - <tr> - <td> - <table cellpadding='20' cellspacing='0' border='0' align='left' width='80%' style='border-color: black; border-style: solid; border-width: 2 2 2 2;'> - - <tr> - <td class='tab_d_ohne'> - LABEL ..... <br> - MENU LABEL ...... <br> - KERNEL {TFTPIP}::/{TFTPKERNEL}{KERNEL} <br> - APPEND initrd={TFTPIP}::/{TFTPKERNEL}{INITRD} rootfs={ROOTFS} debug={DEBUG} {MISC}<br> - IPAPPEND {IPAPPEND} - </td> - </tr> - - - </table></td> - </tr> - - <tr> - <td height='40'></td> - </tr> - - <tr> - <td colspan='2'><h4>Generisches Boot Image <code class='font_object'>{GBMCN}</code> löschen:</h4></td> - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'> - <form action='delete_confirm.php' method='post'> - - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - Das generische Boot Image wird komplett gelöscht. - </tr> - - <input type='hidden' name='dn' value='{GBMDN}'> - <input type='hidden' name='name' value='{GBMCN}'> - <input type='hidden' name='type' value='gbm'> - <input type='hidden' name='delurl' value='gbm_delete.php'> - <input type='hidden' name='backurl' value='gbm.php?dn={GBMDN}&mnr={MNR}&sbmnr={SBMNR}'> - - </table></td> - </tr> - <tr> - <td> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'> - </form></td> - </tr> - - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/gbm.php b/ldap-site-mngmt/webinterface/rbs/gbm.php deleted file mode 100644 index 9f822840..00000000 --- a/ldap-site-mngmt/webinterface/rbs/gbm.php +++ /dev/null @@ -1,134 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -# 3. Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "gbm.dwt"; - -include('rbs_header.inc.php'); - -################################################################################### - -$mnr = -1; -$sbmnr = -1; - -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createRBSMenu($rollen, $mnr, $auDN, $sbmnr); - -################################################################################### - -$gbmDN = $_GET['dn']; - -$template->assign(array("TFTPROOT" => "", - "TFTPKERNEL" => "", - "TFTPPXE" => "", - "TFTPCLIENTCONF" => "", - "NFS" => "", - "NFSPATH" => "", - "NBD" => "")); - -# rbservice und pxe daten (voerst nur ein rbs) -$rbs_array = get_rbservices($auDN,array("dn","cn")); -$rbsDN = $rbs_array[0]['dn']; -# RBS Daten -$rbs_data = get_node_data($rbsDN, array("cn","tftpserverip","tftproot","tftpkernelpath","tftpclientconfpath", - "tftppxepath","nfsserverip","exportpath","nbdserverip","fileserveruri")); -$template->assign(array("RBSCN" => $rbs_data['cn'], - "TFTPIP" => $rbs_data['tftpserverip'], - "TFTPROOT" => $rbs_data['tftproot'], - "TFTPKERNEL" => $rbs_data['tftpkernelpath'], - "TFTPPXE" => $rbs_data['tftppxepath'], - "TFTPCLIENTCONF" => $rbs_data['tftpclientconfpath'], - "NFS" => $rbs_data['nfsserverip'], - "NFSPATH" => $rbs_data['exportpath'], - "NBD" => $rbs_data['nbdserverip'])); - - -$template->assign(array("GBMDN" => $gbmDN, - "GBMCN" => "", - "LABEL" => "", - "KERNEL" => "", - "INITRD" => "", - "FSTYPE" => "", - "ROOTFS" => "", - "DEBUG" => "", - "MISC" => "", - "IPAPPEND" => "")); - -# GBM Daten -$attributes = array("dn","cn","label","kernel","initrd","rootfs","rootfstype","rootfspath","debug","appendmisc","ipappend"); -$gbm = get_node_data($gbmDN, $attributes); - -$selectboxmax = count($rbs_data['fileserveruri']) + 1; -$fsuriselectbox = "<select name='rootfs' size='".$selectboxmax."' class='rootfs_form_selectbox'> - <option value='none'>---------------------------------</option>"; -if ( $rbs_data['fileserveruri'] != "" ){ - foreach ($rbs_data['fileserveruri'] as $fsuri){ - $fsuriselectbox .= "<option value='".$fsuri."'>".$fsuri."</option>"; - } -} -$fsuriselectbox .= "</select> - <input type='hidden' name='oldrootfs' value='".$gbm['rootfs']."'>"; - -if ($gbm['rootfstype'] == 'nfs'){ - $options = "<select name='rootfstype' size='4' class='rootfs_form_selectbox'> - <option value='nfs' selected><b>nfs://".$rbs_data['nfsserverip'].":/".$rbs_data['exportpath']."</b></option> - <option value=''>---------------------------------</option> - <option value='nbd'>nbd://".$rbs_data['nbdserverip'].":</option> - <option value='dnbd'>dnbd://".$rbs_data['nbdserverip'].":</option> - </select> - <input type='hidden' name='oldrootfstype' value='".$gbm['rootfstype']."'>"; -} -if ($gbm['rootfstype'] == 'nbd'){ - $options = "<select name='rootfstype' size='4' class='rootfs_form_selectbox'> - <option value='nbd' selected><b>nbd://".$rbs_data['nbdserverip'].":</b></option> - <option value=''>---------------------------------</option> - <option value='nfs'>nfs://".$rbs_data['nfsserverip'].":/".$rbs_data['exportpath']."</option> - <option value='dnbd'>dnbd://".$rbs_data['nbdserverip'].":</option> - </select> - <input type='hidden' name='oldrootfstype' value='".$gbm['rootfstype']."'>"; -} -if ($gbm['rootfstype'] == 'dnbd'){ - $options = "<select name='rootfstype' size='4' class='rootfs_form_selectbox'> - <option value='dnbd' selected><b>dnbd://".$rbs_data['nbdserverip'].":</b></option> - <option value=''>---------------------------------</option> - <option value='nfs'>nfs://".$rbs_data['nfsserverip'].":/".$rbs_data['exportpath']."</option> - <option value='nbd'>nbd://".$rbs_data['nbdserverip'].":</option> - </select> - <input type='hidden' name='oldrootfstype' value='".$gbm['rootfstype']."'>"; -} -#if ($gbm['rootfstype'] != 'nfs' && $gbm['rootfstype'] != 'nbd' && $gbm['rootfstype'] != 'dnbd'){ -if ($gbm['rootfstype'] == 'none' ){ - $options = "<select name='rootfstype' size='4' class='rootfs_form_selectbox'> - <option value='' selected>---------------------------------</option> - <option value='nfs'><b>nfs://".$rbs_data['nfsserverip'].":/".$rbs_data['exportpath']."</b></option> - <option value='nbd'>nbd://".$rbs_data['nbdserverip'].":</option> - <option value='dnbd'>dnbd://".$rbs_data['nbdserverip'].":</option> - </select> - <input type='hidden' name='oldrootfstype' value='".$gbm['rootfstype']."'>"; -} - - -$template->assign(array("GBMCN" => $gbm['cn'], - "LABEL" => $gbm['label'], - "KERNEL" => $gbm['kernel'], - "INITRD" => $gbm['initrd'], - "FSURISELECT" => $fsuriselectbox, - "SELECTOPTIONS" => $options, - "ROOTFS" => $gbm['rootfs'], - "DEBUG" => $gbm['debug'], - "MISC" => $gbm['appendmisc'], - "IPAPPEND" => $gbm['ipappend'], - "RBSDN" => $rbsDN, - "MNR" => $mnr, - "SBMNR" => $sbmnr)); - - -################################################################################### - -include("rbs_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/gbm_add.php b/ldap-site-mngmt/webinterface/rbs/gbm_add.php deleted file mode 100644 index 2202b4fb..00000000 --- a/ldap-site-mngmt/webinterface/rbs/gbm_add.php +++ /dev/null @@ -1,68 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$gbmcn = $_POST['gbmcn']; $gbmcn = htmlentities($gbmcn); -$rbsDN = $_POST['rbsdn']; - -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; - -$attribs = $_POST['attribs']; -if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - $atts[$key] = htmlentities($attribs[$key]); - } -} -# print_r($meatts); echo "<br><br>"; - -$seconds = 2; -$get_gbmcn = str_replace ( " ", "_", $gbmcn ); -$url = "gbm.php?gbmcn=".$get_gbmcn."&mnr=".$mnr."&sbmnr=".$sbmnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - - -if ( $gbmcn != "" && $gbmcn != "Hier_NAME_eintragen" ){ - - # Formulareingaben anpassen - $expgbm = explode(" ",$gbmcn); - foreach ($expgbm as $word){$expuc[] = ucfirst($word);} - $gbmcn = implode(" ",$expuc); - $gbmcn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $gbmcn); - - $gbmDN = "cn=".$gbmcn.",".$rbsDN; - - if (add_gbm($gbmDN,$gbmcn,$atts)){ - $mesg .= "<br>Neuen Generischen Menü Eintrag erfolgreich angelegt<br>"; - $url = "gbm_overview.php"; - } - else{ - $mesg .= "<br>Fehler beim anlegen des Generischen Menü Eintrags!<br>"; - } -} - -elseif ( $gbmcn == "" || $gbmcn == "Hier_NAME_eintragen" ){ - - $mesg = "Sie haben den Namen des neuen Generischen Menü Eintrags nicht angegeben. - Dies ist aber ein notwendiges Attribut.<br> - Bitte geben Sie sie an.<br><br>"; - $url = "new_gbm.php?gbmcn=Hier_NAME_eintragen&mnr=".$mnr."&sbmnr=".$sbmnr; -} - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/gbm_change.php b/ldap-site-mngmt/webinterface/rbs/gbm_change.php deleted file mode 100644 index ff01865d..00000000 --- a/ldap-site-mngmt/webinterface/rbs/gbm_change.php +++ /dev/null @@ -1,236 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$gbmcn = $_POST['gbmcn']; $gbmcn = htmlentities($gbmcn); -$oldgbmcn = $_POST['oldgbmcn']; - -$gbmDN = $_POST['gbmdn']; -$rbsDN = $_POST['rbsdn']; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; - -$rootfs = $_POST['rootfs']; -#$oldrootfs = $_POST['oldrootfs']; -$rootfspath = $_POST['rootfspath']; -$rootfssuffix = $_POST['rootfssuffix']; -#$oldrootfstype = $_POST['oldrootfstype']; - -$attribs = $_POST['attribs']; -if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - $atts[$key] = htmlentities($attribs[$key]); - } -} -# print_r($meatts); echo "<br><br>"; -$oldattribs = $_POST['oldattribs']; -if (count($oldattribs) != 0){ - foreach (array_keys($oldattribs) as $key){ - $oldatts[$key] = htmlentities($oldattribs[$key]); - } -} -#print_r($oldatts); echo "<br><br>"; - - -$seconds = 2; -$get_mecn = str_replace ( " ", "_", $mecn ); -$url = "gbm.php?dn=".$gbmDN."&mnr=".$mnr."&sbmnr=".$sbmnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -############################################## -# GBM CN (DN) - -if ( $oldgbmcn == $gbmcn ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( $oldgbmcn != "" && $gbmcn != "" && $oldgbmcn != $gbmcn ){ - echo "Name Generisches Boot Menü aendern<br>"; - # hier noch Syntaxcheck - # Formulareingaben anpassen - $expgbm = explode(" ",$gbmcn); - foreach ($expgbm as $word){$expuc[] = ucfirst($word);} - $gbmcn = implode(" ",$expuc); - $gbmcn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $gbmcn); - - - $newgbmDN = "cn=".$gbmcn.",".$rbsDN; - print_r($newgbmDN); echo "<br><br>"; - - if(move_subtree($gbmDN, $newgbmDN)){ - adjust_gbm_dn($newgbmDN, $gbmDN); - $mesg = "Name Generisches Bootmenü erfolgreich geändert<br><br>"; - $gbmDN = $newgbmDN; - }else{ - $mesg = "Fehler beim ändern des Namen des Generischen Bootmenüs!<br><br>"; - } - - # newsubmenu holen... - $url = "gbm.php?dn=".$newgbmDN."&mnr=".$mnr."&sbmnr=".$sbmnr; -} - -if ( $oldgbmcn != "" && $gbmcn == "" ){ - echo "Name Generisches Bootmenü loeschen!<br> - Dieses ist Teil des DN, Sie werden des Generische Boot Menü komplett löschen<br><br>"; - echo "Wollen Sie das Generische Boot Menü <b>".$oldgbmcn."</b> wirklich löschen?<br><br> - <form action='gbm_delete.php' method='post'> - Falls ja:<br><br> - <input type='hidden' name='dn' value='".$gbmDN."'> - <input type='hidden' name='name' value='".$oldgbmcn."'> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'><br><br> - </form> - <form action='".$url."' method='post'> - Falls, nein:<br><br> - <input type='Submit' name='apply' value='zurück' class='small_loginform_button'> - </form>"; - $seconds = 600; -} - -################################### -# RootFS -if ( $rootfs != "" ){ - if ( $rootfs == "none" ){ - echo "Root FS löschen!<br>"; - $entrydel ['rootfs'] = array(); - if(ldap_mod_del($ds,$gbmDN,$entrydel)){ - $mesg = "Attribut <b>RootFS</b> erfolgreich gelöscht<br><br>"; - }else{ - $mesg = "Fehler beim löschen des Attributs <b>RootFS</b><br><br>"; - } - - }else{ - echo "Root FS ändern!<br>"; - $entrymod ['rootfs'] = $rootfs.$rootfssuffix; - if(ldap_mod_replace($ds,$gbmDN,$entrymod)){ - $mesg = "Attribut <b>RootFS</b> erfolgreich geändert<br><br>"; - }else{ - $mesg = "Fehler beim ändern des Attributs <b>RootFS</b><br><br>"; - } - } -} - -################################### -# RootFS Type - -#if ( $oldrootfstype == $rootfstype ){ -# # $mesg = "keine Aenderung<br>"; -#} - -#if ( $oldrootfstype == "" && $rootfstype != "" ){ -# $entryadd ['rootfstype'] = $rootfstype; -# if(ldap_mod_add($ds,$gbmDN,$entryadd)){ -# $mesg = "Attribute <b>RootfsType</b> erfolgreich eingetragen<br><br>"; -# }else{ -# $mesg = "Fehler beim eintragen der Attribute <b>RootfsType</b><br><br>"; -# } -#} - - -#if ( $oldrootfstype != "" && $rootfstype != "" && $oldrootfstype != $rootfstype ){ -# echo "Root FS Type ändern<br>"; -# $entrymod ['rootfstype'] = $rootfstype; -# if(ldap_mod_replace($ds,$gbmDN,$entrymod)){ -# $mesg = "Attribute <b>RootfsType</b> erfolgreich geaendert<br><br>"; -# }else{ -# $mesg = "Fehler beim aendern der Attribute <b>RootfsType</b><br><br>"; -# } -#} - - -#if ( $oldrootfstype != "" && $rootfstype == "" ){ -# echo "Root FS Type löschen!<br>"; -# $entrydel ['rootfstype'] = array(); -# if(ldap_mod_del($ds,$gbmDN,$entrydel)){ -# $mesg = "Attribute <b>RootfsType</b> erfolgreich geloescht<br><br>"; -# }else{ -# $mesg = "Fehler beim loeschen der Attribute <b>RootfsType</b><br><br>"; -# } -#} - - -################################### -# restliche Attribute - -$entryadd = array(); -$entrymod = array(); -$entrydel = array(); - -foreach (array_keys($atts) as $key){ - - if ( $oldatts[$key] == $atts[$key] ){ - # nix - } - if ( $oldatts[$key] == "" && $atts[$key] != "" ){ - # hier noch Syntaxcheck - $entryadd[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] != "" && $oldatts[$key] != $atts[$key] ){ - # hier noch Syntaxcheck - $entrymod[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] == "" ){ - # hier noch Syntaxcheck - $entrydel[$key] = $oldatts[$key]; - } -} -#print_r($entryadd); echo "<br>"; -#print_r($entrymod); echo "<br>"; -#print_r($entrydel); echo "<br>"; - -if (count($entryadd) != 0 ){ - #print_r($entryadd); echo "<br>"; - #echo "neu anlegen<br>"; - foreach (array_keys($entryadd) as $key){ - $addatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_add($ds,$gbmDN,$entryadd)){ - $mesg = "Attribute ".$addatts." erfolgreich eingetragen<br><br>"; - }else{ - $mesg = "Fehler beim eintragen der Attribute ".$addatts."<br><br>"; - } -} - -if (count($entrymod) != 0 ){ - #print_r($entrymod); echo "<br>"; - #echo "ändern<br>"; - foreach (array_keys($entrymod) as $key){ - $modatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_replace($ds,$gbmDN,$entrymod)){ - $mesg = "Attribute ".$modatts." erfolgreich geaendert<br><br>"; - }else{ - $mesg = "Fehler beim aendern der Attribute ".$modatts."<br><br>"; - } -} - -if (count($entrydel) != 0 ){ - #print_r($entrydel); echo "<br>"; - #echo "löschen<br>"; - foreach (array_keys($entrydel) as $key){ - $delatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_del($ds,$gbmDN,$entrydel)){ - $mesg = "Attribute ".$delatts." erfolgreich geloescht<br><br>"; - }else{ - $mesg = "Fehler beim loeschen der Attribute ".$delatts."<br><br>"; - } -} - - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/gbm_delete.php b/ldap-site-mngmt/webinterface/rbs/gbm_delete.php deleted file mode 100644 index 8777981a..00000000 --- a/ldap-site-mngmt/webinterface/rbs/gbm_delete.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$gbmDN = $_POST['dn']; -$gbmcn = $_POST['name']; - -$seconds = 1; -$url = "gbm_overview.php?"; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $gbmDN != ""){ - - clean_up_del_gbm($gbmDN); - if ( dive_into_tree_del($gbmDN,"") ){ - clean_up_del_gbm($gbmDN); - $mesg = "Generisches Bootmenü <b>".$gbmcn."</b> erfolgreich gelöscht!<br><br>"; - } - else{ - $mesg = "Fehler beim löschen des Generischen Bootmenüs <b>".$gbmcn."</b> !<br><br>"; - } - -} - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/gbm_overview.dwt b/ldap-site-mngmt/webinterface/rbs/gbm_overview.dwt deleted file mode 100644 index 794315e6..00000000 --- a/ldap-site-mngmt/webinterface/rbs/gbm_overview.dwt +++ /dev/null @@ -1,29 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Generische Boot Images</h3> - Diese Boot Images werden vom Remote Boot Service <code class='font_object'> {RBSCN} </code> - angeboten. Sie können für jedes Image festlegen, wer dieses Angebot in Anspruch nehmen - kann (Spektrum zwischen (a) ihrer Abteilung <code class='font_object'> {AU} </code> und ihrer Unterabteilungen, und (b) organisationsweit) </td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr> - <td width='50%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Generisches Boot Menü</b></td> - <td width='50%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Netzwerk Dateisystem</b></td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: Genericbm --> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{GBMCN} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{FS} </td> - </tr> - <!-- END DYNAMIC BLOCK: Genericbm --> - - </table></td> - </tr> - - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/gbm_overview.php b/ldap-site-mngmt/webinterface/rbs/gbm_overview.php deleted file mode 100644 index bd99cc55..00000000 --- a/ldap-site-mngmt/webinterface/rbs/gbm_overview.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# 3. Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "gbm_overview.dwt"; - -include('rbs_header.inc.php'); - -################################################################################### - -$mnr = -1; -$sbmnr = -1; -$mcnr = -1; - -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createRBSMenu($rollen, $mnr, $auDN, $sbmnr); - -################################################################################### - -$rbsDN = $_GET['rbsdn']; - -$template->assign(array("GBMDN" => "", - "GBMCN" => "Noch keine Generischen Boot Menüs angelegt", - "KERNEL" => "", - "FS" => "")); - -# Generic Bootmenüs -$generic_bms = get_menuentries($rbsDN,array("dn","cn","label","kernel","nfsroot","nbdroot")); - -$template->define_dynamic("Genericbm", "Webseite"); -$template->define_dynamic("Offers", "Webseite"); - -foreach ($generic_bms as $gbm){ - if ($gbm['nfsroot'] != ""){$fs = "NFS";} - if ($gbm['nbdroot'] != ""){$fs = "NBD";} - - $gbmname = "<a href='gbm.php?dn=".$gbm['dn']."&mnr=".$mnr."&sbmnr=".$sbmnr."' class='headerlink'>".$gbm['cn']."</a>"; - - $template->assign(array("GBMDN" => $gbm['dn'], - "GBMCN" => $gbmname, - "KERNEL" => $gbm['kernel'], - "FS" => $fs, - "MNR" => $mnr, - "SBMNR" => $sbmnr, - "RBSDN" => $rbsDN)); - $template->parse("GENERICBM_LIST", ".Genericbm"); -} - - -################################################################################### - -include("rbs_footer.inc.php"); - -?> diff --git a/ldap-site-mngmt/webinterface/rbs/menu.dwt b/ldap-site-mngmt/webinterface/rbs/menu.dwt deleted file mode 100644 index fe37aeee..00000000 --- a/ldap-site-mngmt/webinterface/rbs/menu.dwt +++ /dev/null @@ -1,31 +0,0 @@ - -<table cellpadding='0' cellspacing='0' border='0' width='100%'> - - - <!-- BEGIN DYNAMIC BLOCK: Hauptmenu --> - - <tr valign='middle' align='left'> -
- <td width='8%' align='right' style="border-style=none;">{ICON}</td> - <td width="8%" align="left" style="border-width:1 0 1 1;border-color:#000000;border-style:solid;padding:5;background-color:{FARBE}"> </td>
- <td width="74%" align="left" style="border-width:1 1 1 0;border-color:#000000;border-style:solid;padding:5;background-color:{FARBE}"> - <a href="{LINK_M}" style="text-decoration:none"><b class="standard_schrift">{TEXT_M}</b></a></td>
- <td width='10%'> </td> - - </tr> - - - - - <!-- BEGIN DYNAMIC BLOCK: Submenu --> - - {SUB} - - <!-- END DYNAMIC BLOCK: Submenu --> - - <tr height='5'> - </tr> - -<!-- END DYNAMIC BLOCK: Hauptmenu --> - -</table> diff --git a/ldap-site-mngmt/webinterface/rbs/menuentry.dwt b/ldap-site-mngmt/webinterface/rbs/menuentry.dwt deleted file mode 100644 index 07f71d95..00000000 --- a/ldap-site-mngmt/webinterface/rbs/menuentry.dwt +++ /dev/null @@ -1,247 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td height='20'><h4>Zurück zu <a href='pxe.php?dn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}' class='headerlink'>{PXECN}</a></h4></td> - </tr> - <tr> - <td height='20'> </td> - </tr> - <tr> - <td colspan='2'><h3>Boot Menü Eintrag <code class='font_object'> {MECN} </code> </h3></td> - </tr> - <tr> - <td height='20'> </td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='menuentry_change.php' method='post'> - - <tr> - <td width='40%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='60%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Eindeutiger Name (cn):</b><br>(Teil des dn, ohne Leerzeichen eingeben) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mecn' value='{MECN}' size='50' class='medium_form_field'> - <input type='hidden' name='oldmecn' value='{MECN}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Label:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[label]' value='{LABEL}' size='50' class='medium_form_field'> - <input type='hidden' name='oldattribs[label]' value='{LABEL}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Generisches Boot Image: </b><br><br>(Angeboten von) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <h4>{GMECN}</h4> Abteilung: {GMEOU} [Remote Boot Dienst: {GMERBS}] - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Label:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menulabel]' value='{MELABEL}' size='50' class='medium_form_field'> - <input type='hidden' name='oldattribs[menulabel]' value='{MELABEL}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Default:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menudefault]' value='{MEDEF}' size='50' class='medium_form_field'> - <input type='hidden' name='oldattribs[menudefault]' value='{MEDEF}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Passwd:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menupasswd]' value='{MEPASSWD}' size='50' class='medium_form_field'> - <input type='hidden' name='oldattribs[menupasswd]' value='{MEPASSWD}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Hide:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menuhide]' value='{MEHIDE}' size='50' class='medium_form_field'> - <input type='hidden' name='oldattribs[menuhide]' value='{MEHIDE}'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Localboot:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[localboot]' value='{LOCALBOOT}' size='50' class='medium_form_field'> - <input type='hidden' name='oldattribs[localboot]' value='{LOCALBOOT}'> - </td> - </tr> - - </table></td> - </tr> - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>APPEND Parameter:</h4></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td width='20%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='80%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Client Konfiguration via: </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[clientconfvia]' value='{CCV}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[clientconfvia]' value='{CCV}'> ( dhcp | file | ldap ) - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>vga: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[vga]' value='{VGA}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[vga]' value='{VGA}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>splash: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[splash]' value='{SPLASH}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[splash]' value='{SPLASH}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>vci: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[vci]' value='{VCI}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[vci]' value='{VCI}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>no ldsc: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[noldsc]' value='{NOLDSC}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[noldsc]' value='{NOLDSC}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>elevator: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[elevator]' value='{ELEVATOR}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[elevator]' value='{ELEVATOR}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>apic: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[apic]' value='{APIC}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[apic]' value='{APIC}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Union FS: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[unionfs]' value='{UNIONFS}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[unionfs]' value='{UNIONFS}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>cowloop: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[cowloop]' value='{COWLOOP}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[cowloop]' value='{COWLOOP}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Debug Level: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[debug]' value='{DEBUG}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[debug]' value='{DEBUG}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menü Position: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='menpos' value='{MENPOS}' size='2' class='medium_form_field'> - <input type='hidden' name='oldmenpos' value='{MENPOS}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Submenü Verweis: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[submenulink]' value='{SUBMENULINK}' size='50' class='medium_form_field'> - <br> - Dieses Feld sollte nur bei Verweisen auf Submenüs den vollständigen Link zu diesen enthalten - <br>(d.h. <TFTP-Server-IP>::/<TFTP-PXE-Pfad>/<Timerange>/<PXE-Dateiname>). <br> - Bei Textzeilen und Leerzeilen muss hier <b>"self"</b> stehen. <br> - Bei normalen Menüeinträgen (inklusive Localboot) muss diese Feld <b>leer</b> sein. - <input type='hidden' name='oldattribs[submenulink]' value='{SUBMENULINK}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Kernel: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[kernel]' value='{KERNEL}' size='50' class='medium_form_field'> - <br> - Angabe hier nur sinnvoll bei Leer-, Textzeilen oder Submenüverweisen, <br> - denn Eingabe wird, wenn der Menüeintrag auf ein generisches Boot Image verweist (siehe oben) <br> - bei der PXE Datei Generierung überschrieben. - <input type='hidden' name='oldattribs[kernel]' value='{KERNEL}'> - </td> - </tr> - - <input type='hidden' name='medn' value='{MEDN}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - - </table></td> - </tr> - <tr> - <td><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - - <tr> - <td height='40'></td> - </tr> - - <tr> - <td colspan='2'><h4>Boot Menü Eintrag <code class='font_object'>{MECN}</code> löschen:</h4></td> - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'> - <form action='delete_confirm.php' method='post'> - - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - Das generische Boot Image wird komplett gelöscht. - </tr> - - <input type='hidden' name='dn' value='{MEDN}'> - <input type='hidden' name='name' value='{MECN}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='delurl' value='menuentry_delete.php'> - <input type='hidden' name='successurl' value='pxe.php?dn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}'> - <input type='hidden' name='backurl' value='menuentry.php?dn={MEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}'> - - </table></td> - </tr> - <tr> - <td> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'> - </form></td> - </tr> - - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/menuentry.php b/ldap-site-mngmt/webinterface/rbs/menuentry.php deleted file mode 100644 index 44eb17d9..00000000 --- a/ldap-site-mngmt/webinterface/rbs/menuentry.php +++ /dev/null @@ -1,153 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# 3. Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "menuentry.dwt"; - -include('rbs_header.inc.php'); - -################################################################################### - -$mnr = 3; -$sbmnr = -1; -$mcnr = -1; - -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createRBSMenu($rollen, $mnr, $auDN, $sbmnr); - -################################################################################### - -$meDN = $_GET['dn']; - -$attributes = array("cn","genericmenuentrydn","label","menulabel","menudefault","menupasswd","vga","splash", - "noldsc","elevator","clientconfvia","apic", - "cowloop","unionfs","debug","vci","menuhide","menuposition","localboot","kernel","submenulink"); -$me = get_node_data($meDN,$attributes); -#print_r($me); - -# PXE DN -$exp = explode(',',$meDN); -$node = array_slice($exp,1); -$exppxecn = explode('=',$node[0]); -$pxecn = $exppxecn[1]; -$pxeDN = implode(',',$node); - -# Generic Menu Entry -$expgbm = ldap_explode_dn ($me['genericmenuentrydn'],1); -$gmecn = $expgbm[0]; -$gmerbs = $expgbm[1]; -$gmeou = $expgbm[3]; - -# RBS Daten -$pxe = get_node_data($pxeDN,array("rbservicedn")); -$rbsDN = $pxe['rbservicedn']; -$exp = explode(',',$rbsDN); -$exprbsau = explode('=',$exp[2]); $rbsau = $exprbsau[1]; -$rbsdata = get_node_data($rbsDN,array("cn","nfsserverip","exportpath","tftpserverip","tftppath")); - -# Bootmenu Daten -$template->assign(array("MEDN" => $meDN, - "MECN" => $me['cn'], - "GMECN" => $gmecn, - "GMEOU" => $gmeou, - "GMERBS" => $gmerbs, - "LABEL" => $me['label'], - "MELABEL" => $me['menulabel'], - "MEDEF" => $me['menudefault'], - "MEPASSWD" => $me['menupasswd'], - "MEHIDE" => $me['menuhide'], - "VGA" => $me['vga'], - "SPLASH" => $me['splash'], - "NOLDSC" => $me['noldsc'], - "ELEVATOR" => $me['elevator'], - "VCI" => $me['vci'], - "CCV" => $me['clientconfvia'], - "APIC" => $me['apic'], - "COWLOOP" => $me['cowloop'], - "UNIONFS" => $me['unionfs'], - "DEBUG" => $me['debug'], - "MENPOS" => $me['menuposition'], - "LOCALBOOT" => $me['localboot'], - "KERNEL" => $me['kernel'], - "SUBMENULINK" => $me['submenulink'], - "PXEDN" => $pxeDN, - "PXECN" => $pxecn, - "MNR" => $mnr, - "SBMNR" => $sbmnr, - "MCNR" => $mcnr)); - -# Alternative RB Dienste holen -$altrbs = get_rbservices($auDN,array("dn","cn")); -if (count($altrbs) != 0){ - for ($i=0; $i < count($altrbs); $i++){ - if ($rbsDN == $altrbs[$i]['dn']){ - array_splice($altrbs, $i, 1); - } - } -} - - -if (count($altrbs) != 0){ -$template->define_dynamic("Altrbs", "Webseite"); - foreach ($altrbs as $item){ - $altrbsexp = explode(',',$item['dn']); - $altrbsau = explode('=',$altrebsexp[2]); - $template->assign(array("ALTRBSDN" => $item['dn'], - "ALTRBSCN" => $item['cn'], - "ALTRBSAU" => "[ ".$altrbsau[1]." ]")); - $template->parse("ALTRBS_LIST", ".Altrbs"); - } -}else{ - $template->assign(array("ALTRBSDN" => "", - "ALTRBSCN" => "", - "ALTRBSAU" => "")); -} - -################################################ -# Bootmenü Einträge - -$menuentries = get_menuentries($pxeDN,array("dn","menuposition","label","menulabel")); -#print_r($menuentries); echo "<br>"; - -$template->define_dynamic("Bootmenu", "Webseite"); - -foreach ($menuentries as $me){ - $template->assign(array("MENDN" => $me['dn'], - "MENULABEL" => $me['menulabel'], - "POSITION" => $me['menuposition'], - "AUDN" => $auDN)); - $template->parse("BOOTMENU_LIST", ".Bootmenu"); -} - - -################################################ -# PXE kopieren - -$hostorgroup = $exp[0]; -$hgexp = explode('=',$exp[0]); - -$hosts_array = get_hosts($auDN,array("dn","hostname")); -$groups_array = get_groups($auDN,array("dn","cn")); - -$template->define_dynamic("Hosts", "Webseite"); -foreach ($hosts_array as $item){ - $template->assign(array("HDN" => $item['dn'], - "HN" => $item['hostname'])); - $template->parse("HOSTS_LIST", ".Hosts"); -} -$template->define_dynamic("Groups", "Webseite"); -foreach ($groups_array as $item){ - $template->assign(array("GDN" => $item['dn'], - "GN" => $item['cn'])); - $template->parse("GROUPS_LIST", ".Groups"); -} - -################################################################################### - -include("rbs_footer.inc.php"); - -?> diff --git a/ldap-site-mngmt/webinterface/rbs/menuentry_add.php b/ldap-site-mngmt/webinterface/rbs/menuentry_add.php deleted file mode 100644 index 8b0c4368..00000000 --- a/ldap-site-mngmt/webinterface/rbs/menuentry_add.php +++ /dev/null @@ -1,258 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$mecn = $_POST['mecn']; $mecn = htmlentities($mecn); -$gbmDN = $_POST['gbm']; -$menpos = $_POST['menpos']; -$maxpos = $_POST['maxpos']; - -$typ = $_POST['typ']; -$pxeDN = $_POST['pxedn']; -$timespan = $_POST['timerange']; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; - -$meattribs = $_POST['attribs']; -if (count($meattribs) != 0){ - foreach (array_keys($meattribs) as $key){ - $meatts[$key] = htmlentities($meattribs[$key]); - } -} -# print_r($meatts); echo "<br><br>"; - -$seconds = 2; -$get_mecn = str_replace ( " ", "_", $mecn ); -$url = "pxe.php?dn=".$pxeDN."&mecn=".$get_mecn."&mnr=".$mnr."&sbmnr=".$sbmnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; -# switch wäre besser ... -if ($typ == "newme" && $typ != "local" && $typ != "text" && $typ != "leer" && $typ != "submenu" ){ - - if ( $mecn != "" && $mecn != "Hier_NAME_eintragen" && $gbmDN != "none" ){ - - # Formulareingaben anpassen - $expme = explode(" ",$mecn); - foreach ($expme as $word){$expuc[] = ucfirst($word);} - $mecn = implode(" ",$expuc); - $mecn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $mecn); - - if ($menpos != ""){ - # Syntaxcheck Menüposition - #$syntax = new Syntaxcheck; - #if (!($syntax->check_menuposition($menpos))){ - # $menpos = $maxpos; - #} - }else{ - $menpos = $maxpos; - } - if (strlen($menpos) == 1){ - $menpos = "0".$menpos; - } - # nun doch führende Nullen erzwingen - # also obsolet: $menpos = preg_replace ( '/0([0-9])/', '$1', $menpos); - - $meDN = "cn=".$mecn.",".$pxeDN; - - if (add_me($meDN,$mecn,$gbmDN,$menpos,$meatts,$pxeDN)){ - $mesg .= "<br>Neuen Menü Eintrag erfolgreich angelegt<br>"; - $url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - } - else{ - $mesg .= "<br>Fehler beim anlegen des Menü Eintrags!<br>"; - } - } - - elseif ( $mecn == "" || $mecn == "Hier_NAME_eintragen" || $gbmDN == "none" ){ - - $mesg = "Sie haben den Namen des neuen Menü Eintrags nicht angegeben oder kein - Generisches Boot Image ausgewählt. Beide sind aber ein notwendige Attribute.<br> - Bitte geben Sie sie an.<br><br>"; - $url = "new_menuentry.php?mecn=Hier_NAME_eintragen&mnr=".$mnr."&sbmnr=".$sbmnr; - } -} - -# Localboot Zeile hinzufügen -elseif ($typ == "local" && $typ != "newme" && $typ != "text" && $typ != "leer" && $typ != "submenu" ){ - - # Menu Position - $menpos = $_POST['localpos']; - if ($menpos != ""){ - # Syntaxcheck Menüposition - #$syntax = new Syntaxcheck; - #if (!($syntax->check_menuposition($menpos))){ - # $menpos = $maxpos; - #} - }else{ - $menpos = $maxpos; - } - if (strlen($menpos) == 1){ - $menpos = "0".$menpos; - } - # nun doch führende Nullen erzwingen - # also obsolet: $menpos = preg_replace ( '/0([0-9])/', '$1', $menpos); - - # CN bilden - $brothers = get_menuentries($pxeDN,array("dn","cn")); - $i=1; - $localcn = "localboot".$i; - if(count($brothers) != 0){ - for ($c=0; $c<count($brothers); $c++){ - foreach ($brothers as $item){ - if ($localcn == strtolower($item['cn'])){ - $i++; - $localcn = "localboot".$i; - } - } - } - } - $meDN = "cn=".$localcn.",".$pxeDN; - $entry ['objectclass'][0] = "MenuEntry"; - $entry ['objectclass'][1] = "top"; - $entry ['cn'] = $localcn; - $entry ['menuposition'] = $menpos; - $entry ['label'] = $localcn; - $entry ['menulabel'] = $_POST['locallabel']; - $entry ['menupasswd'] = $_POST['localpasswd']; - $entry ['localboot'] = "level 0"; - $pos = preg_replace ( '/0([0-9])/', '$1', $menpos); - increment_menupositions($pxeDN,$pos); # andere jeweils um 1 erhöhen - if (ldap_add($ds,$meDN,$entry)){ - $mesg .= "Localboot Zeile erfolgeich an Position ".$menpos." eingetragen"; - }else{ - $mesg .= "Fehler beim eintragen der Localboot Zeile!"; - } - $url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; -} - - -# Text Zeile hinzufügen -elseif ($typ == "text" && $typ != "newme" && $typ != "local" && $typ != "leer" && $typ != "submenu" ){ - - # Menu Position - $menpos = $_POST['textpos']; - if ($menpos != ""){ - # Syntaxcheck Menüposition - #$syntax = new Syntaxcheck; - #if (!($syntax->check_menuposition($menpos))){ - # $menpos = $maxpos; - #} - }else{ - $menpos = $maxpos; - } - if (strlen($menpos) == 1){ - $menpos = "0".$menpos; - } - # nun doch führende Nullen erzwingen - # also obsolet: $menpos = preg_replace ( '/0([0-9])/', '$1', $menpos); - - $text = $_POST['text']; - if($text != "" && $text != "TEXT"){ - $brothers = get_menuentries($pxeDN,array("dn","cn")); - $i=1; - $textcn = "textzeile".$i; - if(count($brothers) != 0){ - for ($c=0; $c<count($brothers); $c++){ - foreach ($brothers as $item){ - if ($textcn == strtolower($item['cn'])){ - $i++; - $textcn = "textzeile".$i; - } - } - } - } - $meDN = "cn=".$textcn.",".$pxeDN; - $entry ['objectclass'][0] = "MenuEntry"; - $entry ['objectclass'][1] = "top"; - $entry ['cn'] = $textcn; - $entry ['menuposition'] = $menpos; - $entry ['label'] = $text; - $entry ['kernel'] = "menu.c32"; - # Submenulink auf sich selbst - $pxedata = get_node_data($pxeDN,array("filename")); - $entry ['submenulink'] = "self"; - - $pos = preg_replace ( '/0([0-9])/', '$1', $menpos); - increment_menupositions($pxeDN,$pos); # andere jeweils um 1 erhöhen - if (ldap_add($ds,$meDN,$entry)){ - $mesg .= "Textzeile erfolgeich an Position ".$menpos." eingetragen"; - }else{ - $mesg .= "Fehler beim eintragen der Textzeile!"; - } - $url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - } -} - - -elseif ($typ == "leer" && $typ != "newme" && $typ != "local" && $typ != "text" && $typ != "submenu" ){ - - # Menu Position - $menpos = $_POST['leerpos']; - if ($menpos != ""){ - # Syntaxcheck Menüposition - #$syntax = new Syntaxcheck; - #if (!($syntax->check_menuposition($menpos))){ - # $menpos = $maxpos; - #} - }else{ - $menpos = $maxpos; - } - if (strlen($menpos) == 1){ - $menpos = "0".$menpos; - } - # nun doch führende Nullen erzwingen - # also obsolet: $menpos = preg_replace ( '/0([0-9])/', '$1', $menpos); - - # CN bilden - $brothers = get_menuentries($pxeDN,array("dn","cn")); - $i=1; - $leercn = "leerzeile".$i; - if(count($brothers) != 0){ - for ($c=0; $c<count($brothers); $c++){ - foreach ($brothers as $item){ - if ($leercn == strtolower($item['cn'])){ - $i++; - $leercn = "leerzeile".$i; - } - } - } - } - $meDN = "cn=".$leercn.",".$pxeDN; - $entry ['objectclass'][0] = "MenuEntry"; - $entry ['objectclass'][1] = "top"; - $entry ['cn'] = $leercn; - $entry ['menuposition'] = $menpos; - $entry ['kernel'] = "menu.c32"; - # Submenulink auf sich selbst - $pxedata = get_node_data($pxeDN,array("filename")); - $entry ['submenulink'] = "self"; - - # wieder führende Nullen weg für increment_menpos - $pos = preg_replace ( '/0([0-9])/', '$1', $menpos); - increment_menupositions($pxeDN,$pos); # andere jeweils um 1 erhöhen - if (ldap_add($ds,$meDN,$entry)){ - $mesg .= "Leerzeile erfolgeich an Position ".$menpos." eingetragen"; - }else{ - $mesg .= "Fehler beim eintragen der Leerzeile!"; - } - $url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; -} - - -elseif ($typ == "submenu" && $typ != "newme" && $typ != "local" && $typ != "text" && $typ != "leer" ){ -} - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/menuentry_change.php b/ldap-site-mngmt/webinterface/rbs/menuentry_change.php deleted file mode 100644 index 40d5d60d..00000000 --- a/ldap-site-mngmt/webinterface/rbs/menuentry_change.php +++ /dev/null @@ -1,207 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$mecn = $_POST['mecn']; $mecn = htmlentities($mecn); -$oldmecn = $_POST['oldmecn']; - -$menpos = $_POST['menpos']; -if (strlen($menpos) == 1){ - $menpos = "0".$menpos; -} -$oldmenpos = $_POST['oldmenpos']; -if (strlen($oldmenpos) == 1){ - $oldmenpos = "0".$oldmenpos; -} - -$meDN = $_POST['medn']; -$pxeDN = $_POST['pxedn']; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; - -$attribs = $_POST['attribs']; -if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - $atts[$key] = htmlentities($attribs[$key]); - } -} -# print_r($meatts); echo "<br><br>"; -$oldattribs = $_POST['oldattribs']; -if (count($oldattribs) != 0){ - foreach (array_keys($oldattribs) as $key){ - $oldatts[$key] = htmlentities($oldattribs[$key]); - } -} -#print_r($oldatts); echo "<br><br>"; - - - -$seconds = 2; -$get_mecn = str_replace ( " ", "_", $mecn ); -$url = "menuentry.php?dn=".$meDN."&mnr=".$mnr."&sbmnr=".$sbmnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -############################################## -# ME CN (DN) - -if ( $oldmecn == $mecn ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( $oldmecn != "" && $mecn != "" && $oldmecn != $mecn ){ - echo "Menü Eintrag Name aendern<br>"; - # hier noch Syntaxcheck - # Formulareingaben anpassen - $expme = explode(" ",$mecn); - foreach ($expme as $word){$expuc[] = ucfirst($word);} - $mecn = implode(" ",$expuc); - $mecn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $mecn); - - - $newmeDN = "cn=".$mecn.",".$pxeDN; - print_r($newmeDN); echo "<br><br>"; - - if(modify_me_dn($meDN, $newmeDN)){ - $mesg = "Menü Eintrag Name erfolgreich geändert<br><br>"; - $meDN = $newmeDN; - }else{ - $mesg = "Fehler beim ändern des PMenü Eintrag Namen!<br><br>"; - } - - - # newsubmenu holen... - $url = "menuentry.php?dn=".$newmeDN."&mnr=".$mnr."&sbmnr=".$sbmnr; -} - -if ( $oldmecn != "" && $mecn == "" ){ - echo "Menü Eintrag Name loeschen!<br> - Dieses ist Teil des DN, Sie werden den Menü Eintrag komplett löschen<br><br>"; - echo "Wollen Sie den Menü Eintrag <b>".$oldmecn."</b> wirklich löschen?<br><br> - <form action='menuentry_delete.php' method='post'> - Falls ja:<br><br> - <input type='hidden' name='dn' value='".$meDN."'> - <input type='hidden' name='name' value='".$oldmecn."'> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'><br><br> - </form> - <form action='".$url."' method='post'> - Falls, nein:<br><br> - <input type='Submit' name='apply' value='zurück' class='small_loginform_button'> - </form>"; - $seconds = 600; -} - - -################################### -# Menu Position - -if ( $menpos == $oldmenpos || $menpos == "" ){ - # keine Änderung -} - -if ( $menpos != "" && $oldmenpos != $menpos ){ - echo "Menü Position ändern<br><br>"; - # Syntax Check fehlt noch - - # switch partner finden - $secmeDN = get_dn_menuposition($pxeDN,$menpos); - $entrysec ['menuposition'] = $oldmenpos; - if (ldap_mod_replace($ds,$secmeDN,$entrysec)){ - $entry ['menuposition'] = $menpos; - if (ldap_mod_replace($ds,$meDN,$entry)){ - #cleanup_menupositions($pxeDN); - $mesg .= "Menü Position erfolgeich nach <b>".$menpos."</b> geändert"; - }else{ - $mesg .= "Fehler beim ändern der Menü Position!"; - } - }else{ - $mesg .= "Fehler beim ändern der Menü Position!"; - } -} - -################################### -# restliche Attribute - -$entryadd = array(); -$entrymod = array(); -$entrydel = array(); - -foreach (array_keys($atts) as $key){ - - if ( $oldatts[$key] == $atts[$key] ){ - # nix - } - if ( $oldatts[$key] == "" && $atts[$key] != "" ){ - # hier noch Syntaxcheck - $entryadd[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] != "" && $oldatts[$key] != $atts[$key] ){ - # hier noch Syntaxcheck - $entrymod[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] == "" ){ - # hier noch Syntaxcheck - $entrydel[$key] = $oldatts[$key]; - } -} -#print_r($entryadd); echo "<br>"; -#print_r($entrymod); echo "<br>"; -#print_r($entrydel); echo "<br>"; - -if (count($entryadd) != 0 ){ - #print_r($entryadd); echo "<br>"; - #echo "neu anlegen<br>"; - foreach (array_keys($entryadd) as $key){ - $addatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_add($ds,$meDN,$entryadd)){ - $mesg = "Attribute ".$addatts." erfolgreich eingetragen<br><br>"; - }else{ - $mesg = "Fehler beim eintragen der Attribute ".$addatts."<br><br>"; - } -} - -if (count($entrymod) != 0 ){ - #print_r($entrymod); echo "<br>"; - #echo "ändern<br>"; - foreach (array_keys($entrymod) as $key){ - $modatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_replace($ds,$meDN,$entrymod)){ - $mesg = "Attribute ".$modatts." erfolgreich geaendert<br><br>"; - }else{ - $mesg = "Fehler beim aendern der Attribute ".$modatts."<br><br>"; - } -} - -if (count($entrydel) != 0 ){ - #print_r($entrydel); echo "<br>"; - #echo "löschen<br>"; - foreach (array_keys($entrydel) as $key){ - $delatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_del($ds,$meDN,$entrydel)){ - $mesg = "Attribute ".$delatts." erfolgreich geloescht<br><br>"; - }else{ - $mesg = "Fehler beim loeschen der Attribute ".$delatts."<br><br>"; - } -} - -################################### -# Ende, noch Redirect - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/menuentry_delete.php b/ldap-site-mngmt/webinterface/rbs/menuentry_delete.php deleted file mode 100644 index ba06eb55..00000000 --- a/ldap-site-mngmt/webinterface/rbs/menuentry_delete.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$meDN = $_POST['dn']; -$mecn = $_POST['name']; - -$pxeDN = $_POST['pxedn']; - -$seconds = 1; -$url = $_POST['successurl']; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $meDN != ""){ - - if ( dive_into_tree_del($meDN,"") ){ - cleanup_menupositions($pxeDN); - $mesg = "Bootmenü Eintrag <b>".$mecn."</b> erfolgreich gelöscht!<br><br>"; - } - else{ - $mesg = "Fehler beim löschen des Bootmenü Eintrags <b>".$mecn."</b> !<br><br>"; - } - -} - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/menuposition_down.php b/ldap-site-mngmt/webinterface/rbs/menuposition_down.php deleted file mode 100644 index d7b235ce..00000000 --- a/ldap-site-mngmt/webinterface/rbs/menuposition_down.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$meDN = $_GET['dn']; -$oldpos = $_GET['pos']; - -$pxeDN = $_GET['pxedn']; -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; - -$me = get_menuentries($pxeDN,array("cn")); -$maxpos = count($me); - -$oldpos = preg_replace ( '/0([0-9])/', '$1', $oldpos); -if ($oldpos < $maxpos){ - - $newpos = $oldpos +1; - if (strlen($newpos) == 1){ - $newpos = "0".$newpos; - } - if (strlen($oldpos) == 1){ - $oldpos = "0".$oldpos; - } - - if ($secmeDN = get_dn_menuposition($pxeDN,$newpos)){ - #echo "other meDN:"; print_r($secmeDN); echo "<br>"; - $entrysec ['menuposition'] = $oldpos; - if ($result = ldap_mod_replace($ds,$secmeDN,$entrysec)){ - $entrymenu ['menuposition'] = $newpos; - $result = ldap_mod_replace($ds,$meDN,$entrymenu); - } - } -} -$seconds = 0; -$url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&#menu"; -$mesg = ""; -#$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> -# Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/menuposition_up.php b/ldap-site-mngmt/webinterface/rbs/menuposition_up.php deleted file mode 100644 index c2611651..00000000 --- a/ldap-site-mngmt/webinterface/rbs/menuposition_up.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$meDN = $_GET['dn']; -$oldpos = $_GET['pos']; - -$pxeDN = $_GET['pxedn']; -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; - -$oldpos = preg_replace ( '/0([0-9])/', '$1', $oldpos); -if ($oldpos != 1){ - - $newpos = $oldpos-1; - if (strlen($newpos) == 1){ - $newpos = "0".$newpos; - } - if (strlen($oldpos) == 1){ - $oldpos = "0".$oldpos; - } - - if ($secmeDN = get_dn_menuposition($pxeDN,$newpos)){ - #echo "other meDN:"; print_r($secmeDN); echo "<br>"; - $entrysec ['menuposition'] = $oldpos; - if ($result = ldap_mod_replace($ds,$secmeDN,$entrysec)){ - $entrymenu ['menuposition'] = $newpos; - $result = ldap_mod_replace($ds,$meDN,$entrymenu); - } - - } -} -$seconds = 0; -$url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&#menu"; -$mesg = ""; -#$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> -# Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/new_gbm.dwt b/ldap-site-mngmt/webinterface/rbs/new_gbm.dwt deleted file mode 100644 index d5d21dc2..00000000 --- a/ldap-site-mngmt/webinterface/rbs/new_gbm.dwt +++ /dev/null @@ -1,91 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Neues generisches Boot Image für Dienst <code class='font_object'> {RBSCN} </code> anlegen </h3></td> - </tr> - <tr> - <td height='20'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='gbm_add.php' method='post'> - - <tr> - <td width='40%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='60%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Eindeutiger Name (cn):</b><br>(Teil des dn, ohne Leerzeichen eingeben) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='gbmcn' value='{GBMCN}' size='50' class='medium_form_field'> - </td> - </tr> - - </table></td> - </tr> - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>KERNEL und APPEND Parameter:</h4></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Server Pfad</b></td> - <td width='15%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>KERNEL Image: </td> - <td align='right' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <font size='+1'>{TFTP}::{TFTPPATH}</font></td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[kernel]' value='' size='45' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Initrd (APPEND): </b> </td> - <td align='right' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <font size='+1'>{TFTP}::{TFTPPATH}</font></td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[initrd]' value='' size='45' class='medium_form_field'> - - </td> - </tr> - <tr valign='top'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Root Filesystem <br>(APPEND rootfs=..): </b></td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <select name='attribs[rootfstype]' size='4' class='rootfs_form_selectbox'> - {SELECTOPTIONS} - </select></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[rootfspath]' value='{ROOTFS}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>IPAPPEND: </b> </td> - <td align='right' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[ipappend]' value='1' size='2' class='medium_form_field'> - </td> - </tr> - - <input type='hidden' name='rbsdn' value='{RBSDN}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - - </table></td> - </tr> - <tr> - <td><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'> - </form></td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/new_gbm.php b/ldap-site-mngmt/webinterface/rbs/new_gbm.php deleted file mode 100644 index 0e674399..00000000 --- a/ldap-site-mngmt/webinterface/rbs/new_gbm.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -# 3. Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "new_gbm.dwt"; - -include('rbs_header.inc.php'); - -################################################################################### - -$mnr = -1; -$sbmnr = -1; - -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createRBSMenu($rollen, $mnr, $auDN, $sbmnr); - -################################################################################### - -$rbsDN = $_GET['rbsdn']; - -$gbmcn = str_replace ( "_", " ", $_GET['gbmcn']); - -# RBS Daten -$rbs_data = get_node_data($rbsDN, array("cn","nfsserverip","exportpath","tftpserverip","tftppath","nbdserverip")); -$template->assign(array("RBSCN" => $rbs_data['cn'], - "TFTP" => $rbs_data['tftpserverip'], - "TFTPPATH" => $rbs_data['tftppath'], - "NFS" => $rbs_data['nfsserverip'], - "NFSPATH" => $rbs_data['exportpath'], - "NBD" => $rbs_data['nbdserverip'])); - - -$options = "<option value='none' selected>----------------------------</option> - <option value='nfs'><b>nfs://".$rbs_data['nfsserverip'].":/".$rbs_data['exportpath']."</b></option> - <option value='nbd'>nbd://".$rbs_data['nbdserverip'].":</option> - <option value='dnbd'>dnbd://".$rbs_data['nbdserverip'].":</option>"; - -$template->assign(array("GBMCN" => $gbmcn, - "LABEL" => "", - "KERNEL" => "", - "INITRD" => "", - "SELECTOPTIONS" => $options, - "ROOTFS" => "", - "IPAPPEND" => "", - "RBSDN" => $rbsDN, - "MNR" => $mnr, - "SBMNR" => $sbmnr)); - - - -################################################################################### - -include("rbs_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/new_menuentry.dwt b/ldap-site-mngmt/webinterface/rbs/new_menuentry.dwt deleted file mode 100644 index 2b0e7860..00000000 --- a/ldap-site-mngmt/webinterface/rbs/new_menuentry.dwt +++ /dev/null @@ -1,188 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td height='20'><h4>Zurück zu <a href='pxe.php?dn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}' class='headerlink'>{PXECN}</a></h4></td> - </tr> - <tr> - <td height='20'> </td> - </tr> - <tr> - <td colspan='2'><h3>Neuen Boot Menü Eintrag anlegen:</h3></td> - </tr> - <tr> - <td height='20'> </td> - </tr> - <tr> - <td colspan='2'><h4>Notwendige Attribute:</h4></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='menuentry_add.php' method='post'> - - <tr> - <td width='35%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='65%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Eindeutiger Name (cn):</b><br>(Teil des dn, ohne Leerzeichen eingeben) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='mecn' value='{MECN}' size='60' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Label:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[label]' value='{LABEL}' size='60' class='medium_form_field'> - </td> - </tr> - <tr height='50' valign='top'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Generische Boot Images: </b><br>(Wählen Sie eines aus) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <select name='gbm' size='5' class='large_form_selectbox'> - <option selected value='none'>----------</option> - <!-- BEGIN DYNAMIC BLOCK: Gbms --> - <option value='{GBMDN}'>{GBMCN} [Abt.: {RBSAU}]</option> - <!-- END DYNAMIC BLOCK: Gbms --> - </select> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menü Position: </b><br> - (Bitte ohne führende Null) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='menpos' value='{MAXPOS}' size='2' class='medium_form_field'> - </td> - </tr> - - </table></td> - </tr> - <tr> - <td height='40'> </td> - </tr> - <tr> - <td colspan='2'><h4>Optionale Attribute:</h4></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td width='35%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='65%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Label:</b> <br>(Wird im Bootmenü statt Label angezeigt) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menulabel]' value='{MELABEL}' size='50' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Passwd:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menupasswd]' value='{MEPASSWD}' size='50' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Hide:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menuhide]' value='{MEHIDE}' size='50' class='medium_form_field'> - </td> - </tr> - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Localboot:</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[localboot]' value='{LOCALBOOT}' size='50' class='medium_form_field'> - </td> - </tr> - - </table></td> - </tr> - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>APPEND Parameter:</h4></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td width='20%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='80%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Client Konfiguration via: </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[clientconfvia]' value='{CCV}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>vga: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[vga]' value='{VGA}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>splash: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[splash]' value='{SPLASH}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>vci: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[vci]' value='{VCI}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>no ldsc: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[noldsc]' value='{NOLDSC}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>elevator: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[elevator]' value='{ELEVATOR}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>apic: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[apic]' value='{APIC}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Union FS: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[unionfs]' value='{UNIONFS}' size='30' class='medium_form_field'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>cowloop: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[cowloop]' value='{COWLOOP}' size='30' class='medium_form_field'> - </td> - </tr> - - <input type='hidden' name='typ' value='newme'> - <input type='hidden' name='maxpos' value='{MAXPOS}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - - </table></td> - </tr> - <tr> - <td><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'> - </form></td> - </tr> - - - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/new_menuentry.php b/ldap-site-mngmt/webinterface/rbs/new_menuentry.php deleted file mode 100644 index a77f1129..00000000 --- a/ldap-site-mngmt/webinterface/rbs/new_menuentry.php +++ /dev/null @@ -1,161 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# 3. Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "new_menuentry.dwt"; - -include('rbs_header.inc.php'); - -################################################################################### - -$mnr = 3; -$sbmnr = -1; -$mcnr = -1; - -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createRBSMenu($rollen, $mnr, $auDN, $sbmnr); - -################################################################################### - -$mecn = str_replace ( "_", " ", $_GET['mecn']); - -$pxeDN = $_GET['dn']; -$dnexp = ldap_explode_dn($pxeDN, 1); -$pxecn = $dnexp[0]; - -# RBS Daten -$pxe = get_node_data($pxeDN,array("rbservicedn")); -$rbsDN = $pxe['rbservicedn']; -$exp = explode(',',$rbsDN); -$exprbsau = explode('=',$exp[2]); $rbsau = $exprbsau[1]; -$rbsdata = get_node_data($rbsDN,array("cn","nfsserverip","exportpath","tftpserverip","tftppath")); - -# Anzahl Menüeinträge -$menens = get_menuentries($pxeDN,array("dn")); -$maxpos = count($menens)+1; - -# Bootmenu Daten -$template->assign(array("MECN" => $mecn, - "LABEL" => "", - "MELABEL" => "", - "MEDEF" => "", - "MEPASSWD" => "", - "MEHIDE" => "", - "VGA" => "", - "SPLASH" => "", - "NOLDSC" => "", - "ELEVATOR" => "", - "VCI" => "", - "CCV" => "", - "APIC" => "", - "COWLOOP" => "", - "UNIONFS" => "", - "DEBUG" => "", - "LOCALBOOT" => "", - "SUBMENULINK" => "", - "MENPOS" => "", - "MAXPOS" => $maxpos, - "PXEDN" => $pxeDN, - "PXECN" => $pxecn, - "MNR" => $mnr, - "SBMNR" => $sbmnr, - "MCNR" => $mcnr)); - - -# verwendbare GBMs holen -# eigene AU (andere noch über "offer" Attribut in RBS suchen) -$attributes = array("dn","cn","label","kernel","initrd","nfsroot","nbdroot","ipappend"); -$gbm_array = get_menuentries($rbsDN,$attributes); -if (count($gbm_array) != 0){ -$template->define_dynamic("Gbms", "Webseite"); - foreach ($gbm_array as $item){ - $template->assign(array("GBMDN" => $item['dn'], - "GBMCN" => $item['cn'], - "GBMLABEL" => $item['label'], - "RBSAU" => $rbsau)); - $template->parse("GBMS_LIST", ".Gbms"); - } -}else{ - $template->assign(array("GBMDN" => "", - "GBMCN" => "Keine generischen Boot Images verfügbar", - "GBMLABEL" => "Keine generischen Boot Images verfügbar", - "RBSAU" => "")); -} - - -# Alternative RB Dienste holen -$altrbs = get_rbservices($auDN,array("dn","cn")); -if (count($altrbs) != 0){ - for ($i=0; $i < count($altrbs); $i++){ - if ($rbsDN == $altrbs[$i]['dn']){ - array_splice($altrbs, $i, 1); - } - } -} - - -if (count($altrbs) != 0){ -$template->define_dynamic("Altrbs", "Webseite"); - foreach ($altrbs as $item){ - $altrbsexp = explode(',',$item['dn']); - $altrbsau = explode('=',$altrebsexp[2]); - $template->assign(array("ALTRBSDN" => $item['dn'], - "ALTRBSCN" => $item['cn'], - "ALTRBSAU" => "[ ".$altrbsau[1]." ]")); - $template->parse("ALTRBS_LIST", ".Altrbs"); - } -}else{ - $template->assign(array("ALTRBSDN" => "", - "ALTRBSCN" => "", - "ALTRBSAU" => "")); -} - -################################################ -# Bootmenü Einträge - -$menuentries = get_menuentries($pxeDN,array("dn","menuposition","label","menulabel")); -#print_r($menuentries); echo "<br>"; - -$template->define_dynamic("Bootmenu", "Webseite"); - -foreach ($menuentries as $me){ - $template->assign(array("MENDN" => $me['dn'], - "MENULABEL" => $me['menulabel'], - "POSITION" => $me['menuposition'], - "AUDN" => $auDN)); - $template->parse("BOOTMENU_LIST", ".Bootmenu"); -} - - -################################################ -# PXE kopieren - -$hostorgroup = $exp[0]; -$hgexp = explode('=',$exp[0]); - - -$hosts_array = get_hosts($auDN,array("dn","hostname")); -$groups_array = get_groups($auDN,array("dn","cn")); - -$template->define_dynamic("Hosts", "Webseite"); -foreach ($hosts_array as $item){ - $template->assign(array("HDN" => $item['dn'], - "HN" => $item['hostname'])); - $template->parse("HOSTS_LIST", ".Hosts"); -} -$template->define_dynamic("Groups", "Webseite"); -foreach ($groups_array as $item){ - $template->assign(array("GDN" => $item['dn'], - "GN" => $item['cn'])); - $template->parse("GROUPS_LIST", ".Groups"); -} - -################################################################################### - -include("rbs_footer.inc.php"); - -?> diff --git a/ldap-site-mngmt/webinterface/rbs/new_pxe.dwt b/ldap-site-mngmt/webinterface/rbs/new_pxe.dwt deleted file mode 100644 index 3418d674..00000000 --- a/ldap-site-mngmt/webinterface/rbs/new_pxe.dwt +++ /dev/null @@ -1,144 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Neue PXE Config (DEFAULT) für Dienst <code class='font_object'> {RBSCN} </code> anlegen:</h3></td> - </tr> - <tr> - <td height='10'> </td> - </tr> - <tr> - <td colspan='2'><h4>Allgemein:</h4></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='pxe_add.php' method='post'> - <tr> - <td width='30%' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'><b>Eindeutiger Name (cn):</b><br>(Bitte ohne Leerzeichen eingeben) </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'> - <font size='+2'><b>PXE_</b></font><input type='Text' name='pxecn' value='{PXECN}' size='50' class='medium_form_field'> - </td> - </tr> - <tr valign='top'> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Gültigkeitsdauer <br>(Time Range): </b> </td> - <td width='40%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='pxeday' value='{PXEDAY}' size='5' maxlength='5' class='medium_form_field'> - <br> - Eines der folgenden:<br> - - - <b>Datum</b> (Format: dd.mm, z.B. 21.03/01.11) <br> - - <b>Monatstag</b> (Format: dd, z.B. 01 oder 25) <br> - - <b>Wochentag</b> (Format: MO, DI, ... , SO) <br> - - <b>X</b> für <b>täglich</b> - - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='pxebeg' value='{PXEBEG}' size='2' maxlength='2' class='medium_form_field'> - <b><font size='+1'>:00</b> - </font> - <input type='Text' name='pxeend' value='{PXEEND}' size='2' maxlength='2' class='medium_form_field'> - <b><font size='+1'>:59</b> Uhr</font><br> - - <b>Uhrzeit</b> (Format: hh, z.B. 07-19)<br> - - <b>X</b> für rund um die Uhr - </td> - </tr> - - </table></td> - </tr> - - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>Globale PXE Parameter:</h4></td> - </tr> - - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='70%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Default: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[default]' value='{DEFAULT}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[default]' value='{DEFAULT}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Title: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menutitle]' value='{MENTIT}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[menutitle]' value='{MENTIT}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Master Passwd: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menumasterpasswd]' value='{MENMPW}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[menumasterpasswd]' value='{MENMPW}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Timeout: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[timeout]' value='{TIMEOUT}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[timeout]' value='{TIMEOUT}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>No Escape: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[noescape]' value='{NOESC}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[noescape]' value='{NOESC}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Prompt: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[prompt]' value='{PROMPT}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[prompt]' value='{PROMPT}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Allow Options: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[allowoptions]' value='{ALLOW}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[allowoptions]' value='{ALLOW}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>On Error: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[onerror]' value='{ONERR}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[onerror]' value='{ONERR}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>ON Timeout: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[ontimeout]' value='{ONTIME}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[ontimeout]' value='{ONTIME}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Client-Conf Dateiname <br>(File URI): </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='conffile' value='{FILEURI}' size='50' class='medium_form_field'> - - </td> - </tr> - - <input type='hidden' name='oldpxecn' value='{PXECN}'> - <input type='hidden' name='rbsdn' value='{RBSDN}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - </table></td> - </tr> - <tr> - <td><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'> - </form></td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/new_pxe.php b/ldap-site-mngmt/webinterface/rbs/new_pxe.php deleted file mode 100644 index e51d21ec..00000000 --- a/ldap-site-mngmt/webinterface/rbs/new_pxe.php +++ /dev/null @@ -1,72 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# 3. Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "new_pxe.dwt"; - -include('rbs_header.inc.php'); - -################################################################################### - -$mnr = -1; -$sbmnr = -1; -$mcnr = -1; - -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; -$mcnr = $_GET['mcnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createRBSMenu($rollen, $mnr, $auDN, $sbmnr); - -################################################################################### - -$rbsDN = $_GET['rbsdn']; -$rbsdnexp = ldap_explode_dn($rbsDN, 1); - -$pxecn = str_replace ( "_", " ", $_GET['pxecn']); -$pxeday = str_replace ( "_", " ", $_GET['pxeday']); -$pxebeg = str_replace ( "_", " ", $_GET['pxebeg']); -$pxeend = str_replace ( "_", " ", $_GET['pxeend']); - -$template->assign(array("PXECN" => $pxecn, - "PXEDAY" => $pxeday, - "PXEBEG" => $pxebeg, - "PXEEND" => $pxeend, - "LDAPURI" => "", - "FILEURI" => "", - "RBSDN" => $rbsDN, - "RBSCN" => $rbsdnexp[0], - "RBSAU" => "", - "NFS" => "", - "NFSROOT" => "", - "TFTP" => "", - "TFTPROOT" => "", - "FILE" => "", - "ALLOW" => "", - "CONSOLE" => "", - "DEFAULT" => "menu.c32", - "DISPLAY" => "", - "FONT" => "", - "IMPLICIT" => "", - "KBDMAP" => "", - "MENMPW" => "", - "MENTIT" => "", - "NOESC" => "1", - "ONERR" => "", - "ONTIME" => "", - "PROMPT" => "0", - "SAY" => "", - "SERIAL" => "", - "TIMEOUT" => "600", - "MNR" => $mnr, - "SBMNR" => $sbmnr)); - - -################################################################################### - -include("rbs_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/new_rbservice.dwt b/ldap-site-mngmt/webinterface/rbs/new_rbservice.dwt deleted file mode 100644 index 52e693b5..00000000 --- a/ldap-site-mngmt/webinterface/rbs/new_rbservice.dwt +++ /dev/null @@ -1,117 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Remote Boot Service anlegen</h3></td> - </tr> - <tr> - <td height='20'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='rbservice_add.php' method='post'> - - <tr> - <td width='40%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='60%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <tr height='50'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Eindeutiger RBS Name (cn):</b><br>(Teil des dn, ohne Leerzeichen eingeben) </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <font size='+2'><b>RBS_</b></font><input type='Text' name='rbscn' value='{RBSCN}' size='40' class='medium_form_field'> - </td> - </tr> - <tr height='50' valign='top'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <b>Wer soll Dienst nutzen dürfen:</b><br>(Wählen Sie eine Abteilung,<br> - impliziert alle Unterabteilungen) - </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <select name='rbsoffer' size='4' class='medium_form_selectbox'> - <option selected value='{OFFERSELF}'>------ {SELFOU} ------</option> - - <!-- BEGIN DYNAMIC BLOCK: Rbsoffers --> - <option value='{RBSOFFER}'>{RBSOFFEROU}</option> - <!-- END DYNAMIC BLOCK: Rbsoffers --> - - </select> - </td> - </tr> - - </table></td> - </tr> - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>Boot Server System:</h4></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr valign='top'> - <td width='20%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Server</b></td> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>IP Adresse eingeben</b> oder<br><b>Rechner auswählen</b></td> - <td width='50%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Pfad</b> <br>(auf dem jeweiligen Server)</td> - </tr> - <tr valign='top'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>TFTP Server: </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='tftpserverip' value='' size='20' class='medium_form_field'> - <select name='tftpserver' size='4' class='small_form_selectbox'> - <option selected value='none'>----------------------------</option> - <!-- BEGIN DYNAMIC BLOCK: TftpHosts --> - <option value='{HDN}'>{HN}</option> - <!-- END DYNAMIC BLOCK: TftpHosts --> - </select> - </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - Initial Boot File <input type='Text' name='attribs[initbootfile]' value='{INITBOOTFILE}' size='25' class='medium_form_field'><br> - Kernel Path <input type='Text' name='attribs[tftpkernelpath]' value='{TFTPKERNEL}' size='25' class='medium_form_field'><br> - PXE Path<input type='Text' name='attribs[tftppxepath]' value='{TFTPPXE}' size='25' class='medium_form_field'><br> - Clientconf Path<input type='Text' name='attribs[tftpclientconfpath]' value='{TFTPCLIENTCONF}' size='25' class='medium_form_field'> - </td> - </tr> - <tr valign='top'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>NFS Server: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='nfsserverip' value='' size='20' class='medium_form_field'> - <select name='nfsserver' size='4' class='small_form_selectbox'> - <option selected value='none'>----------------------------</option> - <!-- BEGIN DYNAMIC BLOCK: NfsHosts --> - <option value='{HDN}'>{HN}</option> - <!-- END DYNAMIC BLOCK: NfsHosts --> - </select> - </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[exportpath]' value='{NFSPATH}' size='25' class='medium_form_field'> - </td> - </tr> - <tr valign='top'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>NBD Server: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='nbdserverip' value='' size='20' class='medium_form_field'> - <select name='nbdserver' size='4' class='small_form_selectbox'> - <option selected value='none'>----------------------------</option> - <!-- BEGIN DYNAMIC BLOCK: NbdHosts --> - <option value='{HDN}'>{HN}</option> - <!-- END DYNAMIC BLOCK: NbdHosts --> - </select> - </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> </td> - </tr> - - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - - </table></td> - </tr> - <tr> - <td><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'> - </form></td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/new_rbservice.php b/ldap-site-mngmt/webinterface/rbs/new_rbservice.php deleted file mode 100644 index 29d6a947..00000000 --- a/ldap-site-mngmt/webinterface/rbs/new_rbservice.php +++ /dev/null @@ -1,94 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -# 3. Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "new_rbservice.dwt"; - -include('rbs_header.inc.php'); - -################################################################################### - -$mnr = 0; -$sbmnr = -1; - -$mnr = $_GET['mnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createRBSMenu($rollen, $mnr, $auDN, $sbmnr); - -################################################################################### - -# nochmal zur Sicherheit: falls doch RBS angelegt - -$rbscn = str_replace ( "_", " ", $_GET['rbscn']); -$template->assign(array("RBSCN" => $rbscn, - "TFTP" => "", - "TFTPIP" => "", - "INITBOOTFILE" => "", - "TFTPKERNEL" => "", - "TFTPPXE" => "", - "TFTPCLIENTCONF" => "", - "NFS" => "", - "NFSIP" => "", - "NFSPATH" => "", - "NBD" => "", - "NBDIP" => "", - "HDN" => "", - "HN" => "", - "IP" => "", - "OFFERSELF" => $auDN, - "SELFOU" => $au_ou, - "MNR" => $mnr, - "SBMNR" => $sbmnr)); - - -# RBS Anbieten (ausser eigene AU) -$expdn = ldap_explode_dn($auDN, 0); # Mit Merkmalen -$expdn = array_slice($expdn, 2); -$expou = ldap_explode_dn($auDN, 1); # nur Werte -$expou = array_slice($expou, 2, -3); -#print_r($expou); echo "<br>"; -#print_r($expdn); echo "<br>"; -for ($i=0; $i<count($expou); $i++){ - $rbsoffers[$i]['ou'] = $expou[$i]; - $rbsoffers[$i]['dn'] = implode(',',$expdn); - $expdn = array_slice($expdn, 1); -} -#print_r($rbsoffers); - -$template->define_dynamic("Rbsoffers", "Webseite"); -foreach ($rbsoffers as $offer){ - $template->assign(array("RBSOFFER" => $offer['dn'], - "RBSOFFEROU" => $offer['ou'],)); - $template->parse("RBSOFFERS_LIST", ".Rbsoffers"); -} - -### Rechner -$hostorgroup = $exp[0]; -$hosts_array = get_hosts($auDN,array("dn","hostname","ipaddress")); - -$template->define_dynamic("TftpHosts", "Webseite"); -$template->define_dynamic("NfsHosts", "Webseite"); -$template->define_dynamic("NbdHosts", "Webseite"); -foreach ($hosts_array as $item){ - $template->assign(array("HDN" => $item['dn'], - "HN" => $item['hostname'], - "IP" => $item['ipaddress'])); - $template->parse("TFTPHOSTS_LIST", ".TftpHosts"); - $template->assign(array("HDN" => $item['dn'], - "HN" => $item['hostname'], - "IP" => $item['ipaddress'])); - $template->parse("NFSHOSTS_LIST", ".NfsHosts"); - $template->assign(array("HDN" => $item['dn'], - "HN" => $item['hostname'], - "IP" => $item['ipaddress'])); - $template->parse("NBDHOSTS_LIST", ".NbdHosts"); -} - - -################################################################################### - -include("rbs_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/no_rbservice.dwt b/ldap-site-mngmt/webinterface/rbs/no_rbservice.dwt deleted file mode 100644 index 2d7c1a87..00000000 --- a/ldap-site-mngmt/webinterface/rbs/no_rbservice.dwt +++ /dev/null @@ -1,22 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Remote Boot Service </h3> - - <p>Sie haben noch keinen <b>Remote Boot Service</b> eingerichtet.</p> - - <p>Um</p> - - <ul> - <li><p><b>Generische Boot Menüs</b></p></li> - <li><p><b>Default PXE Bootmenüs</b></p></li> - </ul> - - <p>anlegen zu können muss erst ein Remote Boot Service eingerichtet werden.</p> - - <p>Verwenden sie dafür den Link <b>"Remote Boot Service"</b> im Navigationsmenü links, um - zur Eingabemaske zu gelangen.</p> - - </td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/no_rbservice.php b/ldap-site-mngmt/webinterface/rbs/no_rbservice.php deleted file mode 100644 index 5c527bab..00000000 --- a/ldap-site-mngmt/webinterface/rbs/no_rbservice.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -# 3. Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "no_rbservice.dwt"; - -include('rbs_header.inc.php'); - -################################################################################### - -$mnr = 1; -$sbmnr = -1; - -$mnr = $_GET['mnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createRBSMenu($rollen, $mnr, $auDN, $sbmnr); - -################################################################################### - - -################################################################################### - -include("rbs_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/pxe.dwt b/ldap-site-mngmt/webinterface/rbs/pxe.dwt deleted file mode 100644 index ae1c112a..00000000 --- a/ldap-site-mngmt/webinterface/rbs/pxe.dwt +++ /dev/null @@ -1,461 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - - <tr> - <td height='20'><h4><a href='pxeconfig_default.php?rbsdn={RBSDN}&mnr={MNR}&sbmnr={SBMNR}' class='headerlink'><< Zurück zur PXE Übersicht</a></h4></td> - </tr> - <tr> - <td height='20'> </td> - </tr> - - <tr> - <td colspan='2'><h3>PXE Boot Menü <code class='font_object'> {PXECN} </code> </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - - <tr> - <td colspan='2'>Klicken Sie auf einen Menüeintrag um zur Detailansicht zu gelangen und den Eintrag bearbeiten zu können</td> - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='80%' style='border-color: black; border-style: solid; border-width: 2 2 2 2;'> - - <tr> - <td width='8%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>#</td> - <td width='8%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>Flags</td> - <td width='64%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>Menu Label </td> - <td width='5%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'> </td> - <td width='15%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'> </td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: Bootmenu --> - <form action='delete_confirm.php' method='post'> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;{BGCDEF}'>{BACKLINK}{POSITION}</a></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;{BGCDEF}'>{MEDEF} {MEPWD} {MEHIDE} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;{BGCDEF}'><font size='+1'>{ANZEIGE} </font></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;{BGCDEF}'> - <a href='menuposition_up.php?dn={MENDN}&pos={POSITION}&pxedn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}'><img style='border-width:0;border-style=none;' src='../pics/up2.gif' height='15'></a> <br> - <a href='menuposition_down.php?dn={MENDN}&pos={POSITION}&pxedn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}'><img style='border-width:0;border-style=none;' src='../pics/down2.gif' height='15'></a></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;{BGCDEF}'> - <input type='hidden' name='dn' value='{MENDN}'> - <input type='hidden' name='name' value='{ANZEIGENAME}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='delurl' value='menuentry_delete.php'> - <input type='hidden' name='successurl' value='pxe.php?dn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}'> - <input type='hidden' name='backurl' value='pxe.php?dn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}'> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'> - </tr> - </form> - <!-- END DYNAMIC BLOCK: Bootmenu --> - - </table></td> - </tr> - <tr> - <td><h4>Flags:</h4></font> - <ul> - <li><b>D</b> -> Default Menüeintrag</li> - <li><b>P</b> -> Passwort geschützt</li> - <li><b>H</b> -> Hidden</li> - </ul> - </td> - </tr> - <tr> - <td height='20'></td> - </tr> - <tr> - <td colspan='2'><h4>Neuen Menüeintrag anlegen: </h4> - <a href='new_menuentry.php?dn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}' style='color:#FFFFFF;' class='small_loginform_button'> zur Eingabemaske </a> </td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td colspan='2'><h4>Standard Menüeinträge anlegen:</h4></td> - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - - <tr> - <td width='20%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>Typ </td> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'> </td> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'> </td> - <td width='10%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>Position</td> - <td width='10%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'> </td> - </tr> - <tr valign='top'> - <form action='menuentry_add.php' method='post'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Localboot</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - Menu Label<br><input type='Text' name='locallabel' value='' size='20' class='medium_form_field'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - Passwort (optional)<br><input type='Text' name='localpasswd' value='' size='20' class='medium_form_field'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Text' name='localpos' value='{MAXPOS}' size='2' class='medium_form_field'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'></td> - <input type='hidden' name='typ' value='local'> - <input type='hidden' name='maxpos' value='{MAXPOS}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='timerange' value='{TIMERANGE}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - </form> - </tr> - <tr valign='top'> - <form action='menuentry_add.php' method='post'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Textzeile</b> </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Text' name='text' value='TEXT' size='50' class='medium_form_field'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Text' name='textpos' value='{MAXPOS}' size='2' class='medium_form_field'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'></td> - <input type='hidden' name='typ' value='text'> - <input type='hidden' name='maxpos' value='{MAXPOS}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='timerange' value='{TIMERANGE}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - </form> - </tr> - <tr valign='top'> - <form action='menuentry_add.php' method='post'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Leerzeile</b> </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Text' name='leerpos' value='{MAXPOS}' size='2' class='medium_form_field'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'></td> - <input type='hidden' name='typ' value='leer'> - <input type='hidden' name='maxpos' value='{MAXPOS}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='timerange' value='{TIMERANGE}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - </form> - </tr> - <tr valign='top'> - <form action='menuentry_add.php' method='post'> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Verweis zu Submenü</b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>Submenü Name<br> - <input type='Text' name='submenu' value='' size='20' class='medium_form_field'></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>Remote Boot Service - <select name='subrbs' size='3' class='small_form_selectbox'> - <option selected value='none'>----------</option> - <!-- BEGIN DYNAMIC BLOCK: Subrbs --> - <option value='{SUBRBSDN}'>{SUBRBSCN} {SUBRBSAU}</option> - <!-- END DYNAMIC BLOCK: Subrbs --> - </select> - </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Text' name='submenupos' value='{MAXPOS}' size='2' class='medium_form_field'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><input type='Submit' name='apply' value='anlegen' class='small_loginform_button'></td> - <input type='hidden' name='typ' value='submenu'> - <input type='hidden' name='maxpos' value='{MAXPOS}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='timerange' value='{TIMERANGE}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - </form> - </tr> - - </table></td> - </tr> - - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>Allgemeine Parameter:</h4></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='pxe_change.php' method='post'> - <tr> - <td width='25%' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'><b>Eindeutiger Name (cn):</b><br>(Bitte ohne Leerzeichen eingeben) </td> - <td width='5%' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'> </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'> - <font size='+2'><b>PXE_</b></font><input type='Text' name='pxecn' value='{PXECN}' size='50' class='medium_form_field'> - <input type='hidden' name='oldpxecn' value='{PXECN}'> - </td> - </tr> - - <tr valign='top'> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Gültigkeitsdauer <br>(Time Range(s)): </b><br> - Zum Löschen einer Time Range<br>Häkchen setzen </td> - <td width='5%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> - <td width='35%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - Eines der folgenden:<br> - - - <b>Datum</b> (dd.mm, z.B. 21.03/01.11) <br> - - <b>Monatstag</b> (dd, z.B. 01 oder 25) <br> - - <b>Wochentag</b> (MO, DI, ... , SO) <br> - - <b>X</b> für <b>täglich</b> - - <td width='35%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - - <b>Uhrzeit</b> (Format: hh, z.B. 07-19)<br> - - <b>X</b> für rund um die Uhr - - </td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: TRanges --> - <tr valign='top'> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> - <td width='5%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - <input type='checkbox' name='deltr[]' value='{PXEDAY}_{PXEBEG}_{PXEEND}'> - </td> - <td width='35%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - <input type='Text' name='pxeday[]' value='{PXEDAY}' size='5' maxlength='5' class='medium_form_field'> - <input type='hidden' name='oldpxeday[]' value='{PXEDAY}'> <br> - - - <td width='35%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - <input type='Text' name='pxebeg[]' value='{PXEBEG}' size='2' maxlength='2' class='medium_form_field'> - <input type='hidden' name='oldpxebeg[]' value='{PXEBEG}'> <b><font size='+1'>:00</b> - </font> - <input type='Text' name='pxeend[]' value='{PXEEND}' size='2' maxlength='2' class='medium_form_field'> - <input type='hidden' name='oldpxeend[]' value='{PXEEND}'> <b><font size='+1'>:59</b> Uhr</font><br> - </td> - </tr> - <!-- END DYNAMIC BLOCK: TRanges --> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>Neue Time Range hinzufügen </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='newpxeday' value='' size='5' maxlength='5' class='medium_form_field'> - - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='newpxebeg' value='' size='2' maxlength='2' class='medium_form_field'> - <b><font size='+1'>:00</b> - </font> - <input type='Text' name='newpxeend' value='' size='2' maxlength='2' class='medium_form_field'> - <b><font size='+1'>:59</b> Uhr</font><br> - - </td> - </tr> - - </table></td> - </tr> - - - - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>Globale PXE Parameter:</h4></td> - </tr> - - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr> - <td width='20%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Attribut</b></td> - <td width='80%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Wert</b></td> - </tr> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Default: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[default]' value='{DEFAULT}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[default]' value='{DEFAULT}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Title: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menutitle]' value='{MENTIT}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[menutitle]' value='{MENTIT}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Menu Master Passwd: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[menumasterpasswd]' value='{MENMPW}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[menumasterpasswd]' value='{MENMPW}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Timeout: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[timeout]' value='{TIMEOUT}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[timeout]' value='{TIMEOUT}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>No Escape: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[noescape]' value='{NOESC}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[noescape]' value='{NOESC}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Prompt: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[prompt]' value='{PROMPT}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[prompt]' value='{PROMPT}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Allow Options: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[allowoptions]' value='{ALLOW}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[allowoptions]' value='{ALLOW}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>On Error: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[onerror]' value='{ONERR}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[onerror]' value='{ONERR}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>ON Timeout: </b> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='Text' name='attribs[ontimeout]' value='{ONTIME}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[ontimeout]' value='{ONTIME}'> - </td> - </tr> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>File URI: </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <font size='+1'>tftp://{TFTP}/{TFTPFILE}</font><input type='Text' name='attribs[fileuri]' value='{FILEURI}' size='30' class='medium_form_field'> - <input type='hidden' name='oldattribs[fileuri]' value='{FILEURI}'> - - </td> - </tr> - - </table></td> - </tr> - - <tr> - <td height='20'></td> - </tr> - <tr> - <td colspan='2'><h4>PXE Dateiname:</h4> - Achtung: Änderungen hier können zu nicht verwendeten PXE Dateien führen!<br> - Sie sollten hier nur Änderungen vornehmen, wenn der PXE Datei offensichtlich ein falscher Name zugewiesen ist.<br> - Wird z.B. vom betroffenen Rechner die MAC Adresse geändert, so wird dies vom System automatisch an dieser Stelle nachvollzogen. - Diese Feld dient daher primär der Kontrolle.</td> - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr valign='top'> - <td width='40%' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'> - <b>PXE Dateiname(n): </b><br> - Bei PXE von Gruppen ist für jeden Mitgliedsrechner<br> - der PXE Dateiname aufgelistet. - </td> - <td style='border-color: black; border-style: solid; border-width: 3 0 1 0;'> - <!-- BEGIN DYNAMIC BLOCK: Filenames --> - <input type='Text' name='filename[]' value='{FILE}' size='40' class='medium_form_field'> - <input type='hidden' name='oldfilename[]' value='{FILE}'> - <!-- END DYNAMIC BLOCK: Filenames --> - <input type='Text' name='newfilename' value='' size='40' class='medium_form_field'> - </td> - </tr> - - </table></td> - </tr> - <tr> - <td> - <input type='hidden' name='nodedn' value='{NODEDN}'> - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='oldpxecn' value='{PXECN}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - <input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - - <tr> - <td height='50'></td> - </tr> - - <tr> - <td colspan='2'><h4>PXE Boot Menü <code class='font_object'>{PXECN}</code> kopieren:</h4> - Beachten Sie, dass die Time Ranges des PXE Boot Menüs nicht kopiert werden. Sie müssen diese anschließend - neu setzen. <br> - Geben Sie bitte den eindeutigen Namen des neuen PXE Boot Menüs an.</td> - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'> - <form action='pxe_copy.php' method='post'> - - <tr valign='top'> - <td style='border-color: black; border-style: solid; border-width: 3 0 1 0;'><b>Ziel Objekt:</b><br> - (Mehrfachauswahl möglich) </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'> - - <select name='copytargets[]' size='10' multiple class='medium_form_selectbox'> - <option selected value='none'>----------------------------</option> - <option value='{DEFDN}'>DEFAULT</option> - - <option value='none'>---- RECHNER -----</option> - <!-- BEGIN DYNAMIC BLOCK: Hosts --> - <option value='{HDN}'>{HN}</option> - <!-- END DYNAMIC BLOCK: Hosts --> - - <option value='none'>---- GRUPPEN -----</option> - <!-- BEGIN DYNAMIC BLOCK: Groups --> - <option value='{GDN}'>{GN}</option> - <!-- END DYNAMIC BLOCK: Groups --> - </select> - </td> - </tr> - <tr> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><b>Eindeutiger Name (cn):</b><br>(Bitte ohne Leerzeichen eingeben) </td> - <td colspan='2' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <font size='+2'><b>PXE_</b></font><input type='Text' name='pxecncp' value='{PXECN}' size='50' class='medium_form_field'> - <input type='hidden' name='oldpxecncp' value='{PXECN}'> - </td> - </tr> - - <input type='hidden' name='pxedn' value='{PXEDN}'> - <input type='hidden' name='oldpxecn' value='{PXECN}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - <input type='hidden' name='mcnr' value='{MCNR}'> - <input type='hidden' name='deltr' value='{DELTR}'> - - </table></td> - </tr><tr><td> - <input type='Submit' name='apply' value='kopieren' class='small_loginform_button'> - </form></td></tr> - - <tr> - <td height='50'></td> - </tr> - - <tr> - <td colspan='2'><h4>PXE Boot Menü <code class='font_object'>{PXECN}</code> löschen:</h4></td> - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'> - <form action='delete_confirm.php' method='post'> - - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> - Die MachineConfig wird komplett gelöscht. - </tr> - - <input type='hidden' name='dn' value='{PXEDN}'> - <input type='hidden' name='name' value='{PXECN}'> - <input type='hidden' name='delurl' value='pxe_delete.php'> - <input type='hidden' name='successurl' value='pxeconfig_default.php?&mnr={MNR}'> - <input type='hidden' name='backurl' value='pxe.php?dn={PXEDN}&mnr={MNR}&sbmnr={SBMNR}&mcnr={MCNR}'> - - </table></td> - </tr><tr><td> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'> - </form></td></tr> - -</table> diff --git a/ldap-site-mngmt/webinterface/rbs/pxe.php b/ldap-site-mngmt/webinterface/rbs/pxe.php deleted file mode 100644 index d1785081..00000000 --- a/ldap-site-mngmt/webinterface/rbs/pxe.php +++ /dev/null @@ -1,219 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# 3. Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "pxe.dwt"; - -include('rbs_header.inc.php'); - -################################################################################### - -$mnr = -1; -$sbmnr = -1; -# $mcnr = -1; - -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; -$mcnr = $_GET['mcnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createRBSMenu($rollen, $mnr, $auDN, $sbmnr); - -################################################################################### - -$pxeDN = $_GET['dn']; -#$rbsDN = $_GET['rbsdn']; - -$attributes = array("dn","cn","rbservicedn","filename","timerange","allowoptions","console","default", - "display","font","implicit","kbdmap","menumasterpasswd","menutitle", - "noescape","onerror","ontimeout","prompt","say","serial","timeout","ldapuri","fileuri"); -$pxe = get_node_data($pxeDN,$attributes); -#print_r($pxe); - -$exp = explode(',',$pxeDN); -$node = array_slice($exp,1); -$nodeDN = implode(',',$node); - -# RBS Daten -$rbsDN = $pxe['rbservicedn']; -$exp = explode(',',$rbsDN); -$exprbsau = explode('=',$exp[2]); $rbsau = $exprbsau[1]; -$rbsdata = get_node_data($rbsDN,array("cn","nfsserverip","exportpath","tftpserverip","tftppath","tftpclientconfpath")); - -# Timerange Komponenten -$template->define_dynamic("TRanges", "Webseite"); -if (count($pxe['timerange']) > 1){ - foreach($pxe['timerange'] as $tr){ - $exptime = explode('_',$tr); - $template->assign(array("PXEDAY" => $exptime[0], - "PXEBEG" => $exptime[1], - "PXEEND" => $exptime[2])); - $template->parse("TRANGES_LIST", ".TRanges"); - } -}else{ - $exptime = explode('_',$pxe['timerange']); - $template->assign(array("PXEDAY" => $exptime[0], - "PXEBEG" => $exptime[1], - "PXEEND" => $exptime[2])); - $template->parse("TRANGES_LIST", ".TRanges"); -} - -# Filenames -$template->define_dynamic("Filenames", "Webseite"); -if (count($pxe['filename']) > 1){ - foreach($pxe['filename'] as $fi){ - $template->assign(array("FILE" => $fi)); - $template->parse("FILENAMES_LIST", ".Filenames"); - } -}else{ - $exptime = explode('_',$pxe['filename']); - $template->assign(array("FILE" => $pxe['filename'])); - $template->parse("FILENAMES_LIST", ".Filenames"); -} - -$expcn = explode('_',$pxe['cn']); -$name = array_slice($expcn,1); -$pxecn = implode('_',$name); - -# Bootmenü Einträge -$menuentries = get_menuentries($pxeDN,array("dn","menuposition","label","menulabel","menudefault","menupasswd","menuhide")); -#print_r($menuentries); echo "<br>"; -$maxpos = count($menuentries)+1; - -# Globale Parameter -$template->assign(array("PXEDN" => $pxeDN, - "PXECN" => $pxecn, - "TIMERANGE" => $pxe['timerange'], - "RBSDN" => $rbsDN, - "RBS" => $rbsdata['cn'], - "RBSAU" => $rbsau, - "NFS" => $rbsdata['nfsserverip'], - "NFSROOT" => $rbsdata['exportpath'], - "TFTP" => $rbsdata['tftpserverip'], - "TFTPROOT" => $rbsdata['tftppath'], - "TFTPFILE" => $rbsdata['tftpclientconfpath'], - #"LDAP" => LDAP_HOST, - #"LDAPURI" => $pxe['ldapuri'], - "FILEURI" => $pxe['fileuri'], - "FILE" => $pxe['filename'], - "ALLOW" => $pxe['allowoptions'], - "CONSOLE" => $pxe['console'], - "DEFAULT" => $pxe['default'], - "DISPLAY" => $pxe['display'], - "FONT" => $pxe['font'], - "IMPLICIT" => $pxe['implicit'], - "KBDMAP" => $pxe['kbdmap'], - "MENMPW" => $pxe['menumasterpasswd'], - "MENTIT" => $pxe['menutitle'], - "NOESC" => $pxe['noescape'], - "ONERR" => $pxe['onerror'], - "ONTIME" => $pxe['ontimeout'], - "PROMPT" => $pxe['prompt'], - "SAY" => $pxe['say'], - "SERIAL" => $pxe['serial'], - "TIMEOUT" => $pxe['timeout'], - "MAXPOS" => $maxpos, - "NODEDN" => $nodeDN, - "DEFDN" => $rbsDN, - "MNR" => $mnr, - "SBMNR" => $sbmnr, - "MCNR" => $mcnr)); - -# RB Dienste für Submenüeinträge holen -# kommt wohl wieder raus (->Submenüs nur im eigenen RBS Bereich) -$subrbs = get_rbsoffers($auDN); - -# Für Submenü Einträge -$template->assign(array("SUBRBSDN" => "", - "SUBRBSCN" => "", - "SUBRBSAU" => "")); -if (count($subrbs) != 0){ -$template->define_dynamic("Subrbs", "Webseite"); - foreach ($subrbs as $item){ - $rbsdnexp = ldap_explode_dn($item,1); - $subrbscn = $rbsdnexp[0]; - $subrbsau = $rbsdnexp[2]; - #$subrbsexp = explode(',',$item['dn']); - #$subrbsau = explode('=',$subrbsexp[2]); - $template->assign(array("SUBRBSDN" => $item, - "SUBRBSCN" => $subrbscn, - "SUBRBSAU" => "[ ".$subrbsau." ]")); - $template->parse("SUBRBS_LIST", ".Subrbs"); - } -} - - -################################################ -# Bootmenü Einträge - -$template->define_dynamic("Bootmenu", "Webseite"); -$template->assign(array("MENDN" => "", - "MENULABEL" => "", - "ANZEIGE" => "Noch kein Bootmenü Eintrag angelegt", - "MEDEF" => "", - "MEPWD" => "", - "MEHIDE" => "", - "BGCDEF" => "", - "POSITION" => "")); -foreach ($menuentries as $me){ - $anzeige = ""; - if ($me['label'] != "" && $me['menulabel'] == ""){$anzeige .= $me['label'];} - if ($me['menulabel'] != ""){$anzeige .= $me['menulabel'];} - if ($me['menudefault'] == 1){$medef = "<b>D</b>"; $bgcdef = "background-color:#EEDD82;";} - if ($me['menupasswd'] != ""){$mepwd = "<b>P</b>";} - if ($me['menuhide'] == 1){$mehide = "<b>H</b>"; $bgcdef = "background-color:#A0A0A0;";} - $template->assign(array("MENDN" => $me['dn'], - "BACKLINK" => "<a href='menuentry.php?dn=".$me['dn']."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr."' class='headerlink'>", - "ANZEIGE" => "<a href='menuentry.php?dn=".$me['dn']."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr."' class='headerlink'>".$anzeige."</a>", - "ANZEIGENAME" => $anzeige, - "POSITION" => $me['menuposition'], - "MEDEF" => $medef, - "MEPWD" => $mepwd, - "MEHIDE" => $mehide, - "BGCDEF" => $bgcdef, - "AUDN" => $auDN)); - $template->parse("BOOTMENU_LIST", ".Bootmenu"); - $medef = ""; - $bgcdef = ""; -} - - - -################################################ -# PXE kopieren - -$hostorgroup = $exp[0]; -$hgexp = explode('=',$exp[0]); - -$hosts_array = get_hosts($auDN,array("dn","hostname")); -$groups_array = get_groups($auDN,array("dn","cn")); - -$template->define_dynamic("Hosts", "Webseite"); -foreach ($hosts_array as $item){ - $template->assign(array("HDN" => $item['dn'], - "HN" => $item['hostname'])); - $template->parse("HOSTS_LIST", ".Hosts"); -} -$template->define_dynamic("Groups", "Webseite"); -foreach ($groups_array as $item){ - $template->assign(array("GDN" => $item['dn'], - "GN" => $item['cn'])); - $template->parse("GROUPS_LIST", ".Groups"); -} - - -# falls TR vorhanden dann soll sie gelöscht werden (flag deltr setzen) -if (count($pxe['timerange']) != 0){ - $template->assign(array("DELTR" => "1")); -} -else{ - $template->assign(array("DELTR" => "0")); -} - -################################################################################### - -include("rbs_footer.inc.php"); - -?> diff --git a/ldap-site-mngmt/webinterface/rbs/pxe_add.php b/ldap-site-mngmt/webinterface/rbs/pxe_add.php deleted file mode 100644 index 793cb34f..00000000 --- a/ldap-site-mngmt/webinterface/rbs/pxe_add.php +++ /dev/null @@ -1,118 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$pxecn = $_POST['pxecn']; $pxecn = htmlentities($pxecn); -$rbsDN = $_POST['rbsdn']; -#print_r($rbsDN); -$pxeday = $_POST['pxeday']; $pxeday = htmlentities($pxeday); -$pxebeg = $_POST['pxebeg']; $pxebeg = htmlentities($pxebeg); -$pxeend = $_POST['pxeend']; $pxeend = htmlentities($pxeend); - -$conffile = $_POST['conffile']; $conffile = htmlentities($conffile); - -$pxeattribs = $_POST['pxeattribs']; -if (count($pxeattribs) != 0){ - foreach (array_keys($pxeattribs) as $key){ - $pxeatts[$key] = htmlentities($pxeattribs[$key]); - } -} -# print_r($pxeatts); echo "<br><br>"; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - - -$seconds = 2; -$get_pxecn = str_replace ( " ", "_", $pxecn ); -$get_pxeday = str_replace ( " ", "_", $pxeday ); -$get_pxebeg = str_replace ( " ", "_", $pxebeg ); -$get_pxeend = str_replace ( " ", "_", $pxeend ); -$url = "new_pxe.php?pxecn=".$get_pxecn."&pxeday=".$get_pxeday."&pxebeg=".$get_pxebeg."&pxeend=".$get_pxeend."&mnr=".$mnr."&sbmnr=".$sbmnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $pxecn != "" && $pxecn != "Hier_PXE_NAME_eintragen" && $rbsDN != "none" ){ - - $pxecn = "PXE_".$pxecn; - # Formulareingaben anpassen - $exppxe = explode(" ",$pxecn); - foreach ($exppxe as $word){$expuc[] = ucfirst($word);} - $pxecn = implode(" ",$expuc); - $pxecn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $pxecn); - - $pxetimerange = ""; - - if ( $pxeday != "" && $pxebeg != "" && $pxeend != "" && $pxebeg <= $pxeend ){ - - # TimeRange Syntax checken - $syntax = new Syntaxcheck; - if ($syntax->check_timerange_syntax($pxeday,$pxebeg,$pxeend)){ - - # in Grossbuchstaben - if (preg_match("/([a-z]+)/",$pxeday)){$pxeday = strtoupper($pxeday);} - if (preg_match("/([a-z]+)/",$pxebeg)){$pxebeg = strtoupper($pxebeg);} - if (preg_match("/([a-z]+)/",$pxeend)){$pxeend = strtoupper($pxeend);} - - # führende Nullen weg - $pxebeg = preg_replace ( '/0([0-9])/', '$1', $pxebeg); - $pxeend = preg_replace ( '/0([0-9])/', '$1', $pxeend); - - # TimeRange auf Ãœberschneidung mit vorhandenen checken - if(check_timerange_pxe($pxeday,$pxebeg,$pxeend,$rbsDN,"")){ - $pxetimerange = $pxeday."_".$pxebeg."_".$pxeend; - } - else{ - $mesg = "Es existiert bereits ein PXE Boot Menü, das sich mit der eingegebenen Time Range - überschneidet!<br> - Das neue PXE Boot Menü wird ohne Time Range angelegt.<br> - Bitte geben Sie diese anschließend ein.<br><br>"; - } - } - else{ - $mesg = "Falsche Syntax in der Time-Range-Eingabe! Das neue PXE Boot Menü wird ohne Time Range angelegt.<br> - Bitte geben Sie diese anschließend ein.<br><br>"; - } - } - else{ - $mesg = "Keine vollständige Time-Range-Eingabe! Das neue PXE Boot Menü wird ohne Time Range angelegt.<br> - Bitte geben Sie diese anschließend ein.<br><br>"; - } - - $pxeDN = "cn=".$pxecn.",".$rbsDN; - $filename = array("default"); - #$ldapuri = LDAP_HOST."/dn=cn=computers,".$auDN; - - if (add_pxe($pxeDN,$pxecn,$rbsDN,$pxetimerange,$pxeattribs,$filename,$conffile)){ - $mesg .= "<br>Neues PXE Boot Menü erfolgreich angelegt<br>"; - $url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - } - else{ - $mesg .= "<br>Fehler beim anlegen des PXE Boot Menüs!<br>"; - } -} - -elseif ( $pxecn == "" || $pxecn == "Hier_PXE_NAME_eintragen" || $rbsDN == "none" ){ - - $mesg = "Sie haben den Namen des neuen PXE Boot Menüs nicht angegeben oder den - Remote Boot Dienst nicht ausgewählt. Beide sind aber ein notwendige Attribute.<br> - Bitte geben Sie sie an.<br><br>"; - $url = "new_pxe.php?pxecn=Hier_PXE_NAME_eintragen&pxeday=".$get_pxeday."&pxebeg=".$get_pxebeg."&pxeend=".$get_pxeend."&mnr=".$mnr."&sbmnr=".$sbmnr; -} - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/pxe_change.php b/ldap-site-mngmt/webinterface/rbs/pxe_change.php deleted file mode 100644 index d122a830..00000000 --- a/ldap-site-mngmt/webinterface/rbs/pxe_change.php +++ /dev/null @@ -1,434 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$pxecn = "PXE_".$_POST['pxecn']; - -$pxeday = $_POST['pxeday']; -$pxebeg = $_POST['pxebeg']; -$pxeend = $_POST['pxeend']; -foreach (array_keys($pxeday) as $key){ - $pxeday[$key] = htmlentities($pxeday[$key]); -} -foreach (array_keys($pxebeg) as $key){ - $pxebeg[$key] = htmlentities($pxebeg[$key]); -} -foreach (array_keys($pxeend) as $key){ - $pxeend[$key] = htmlentities($pxeend[$key]); -} - -$deltr = $_POST['deltr']; - -$newpxeday = $_POST['newpxeday']; $newpxeday = htmlentities($newpxeday); -$newpxebeg = $_POST['newpxebeg']; $newpxebeg = htmlentities($newpxebeg); -$newpxeend = $_POST['newpxeend']; $newpxeend = htmlentities($newpxeend); - -$oldpxeday = $_POST['oldpxeday']; -$oldpxebeg = $_POST['oldpxebeg']; -$oldpxeend = $_POST['oldpxeend']; - -$pxeDN = $_POST['pxedn']; -$oldpxecn = "PXE_".$_POST['oldpxecn']; - -$rbs = $_POST['rbs']; -$filename = $_POST['filename']; -if (count($filename) != 0){ - foreach (array_keys($filename) as $key){ - $file[$key] = htmlentities($filename[$key]); - } -} -$oldfilename = $_POST['oldfilename']; -if (count($oldfilename) != 0){ - foreach (array_keys($oldfilename) as $key){ - $oldfile[$key] = htmlentities($oldfilename[$key]); - } -} -$newfilename = $_POST['newfilename']; $newfilename = htmlentities($newfilename); - -$nodeDN = $_POST['nodedn']; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - -# sonstige Attribute -$attribs = $_POST['attribs']; -if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - $atts[$key] = htmlentities($attribs[$key]); - } -} -#print_r($atts); echo "<br><br>"; -$oldattribs = $_POST['oldattribs']; -if (count($oldattribs) != 0){ - foreach (array_keys($oldattribs) as $key){ - $oldatts[$key] = htmlentities($oldattribs[$key]); - } -} -#print_r($oldatts); echo "<br><br>"; - - -$seconds = 2; -$url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -############################################## -# PXE CN (DN) - -if ( $oldpxecn == $pxecn ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( $oldpxecn != "" && $pxecn != "" && $oldpxecn != $pxecn ){ - echo "PXE Name aendern<br>"; - # hier noch Syntaxcheck - # Formulareingaben anpassen - $exppxe = explode(" ",$pxecn); - foreach ($exppxe as $word){$expuc[] = ucfirst($word);} - $pxecn = implode(" ",$expuc); - $pxecn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $pxecn); - - $newpxeDN = "cn=".$pxecn.",".$nodeDN; - print_r($newpxeDN); echo "<br><br>"; - - if(modify_pxe_dn($pxeDN, $newpxeDN)){ - $mesg = "PXE Name erfolgreich geändert<br><br>"; - $pxeDN = $newpxeDN; - }else{ - $mesg = "Fehler beim ändern des PXE Namen!<br><br>"; - } - - - # newsubmenu holen... - $url = "pxe.php?dn=".$newpxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; -} - -if ( $oldpxecn != "" && $pxecn == "" ){ - echo "Gruppenname loeschen!<br> - Dieses ist Teil des DN, Sie werden das PXE Boot Menü komplett löschen<br><br>"; - echo "Wollen Sie das PXE Boot Menü <b>".$oldpxecn."</b> wirklich löschen?<br><br> - <form action='pxe_delete.php' method='post'> - Falls ja:<br><br> - <input type='hidden' name='dn' value='".$pxeDN."'> - <input type='hidden' name='name' value='".$oldpxecn."'> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'><br><br> - </form> - <form action='".$url."' method='post'> - Falls, nein:<br><br> - <input type='Submit' name='apply' value='zurück' class='small_loginform_button'> - </form>"; - $seconds = 600; -} - -########################################## -# Remote Boot Dienst - -if ($rbs != "none"){ - $exp = explode(',',$rbs); - $exprbscn = explode('=',$exp[0]); - $rbscn = $exprbscn[1]; - $exprbsau = explode('=',$exp[2]); - $rbsau = $exprbsau[1]; - - $entryrbs ['rbservicedn'] = $rbs; - if ($result = ldap_mod_replace($ds,$pxeDN,$entryrbs)){ - $mesg = "Remote Boot Service erfolgreich zu <b>".$rbscn."[Abt.: ".$rbsau."]</b> geändert<br><br>"; - }else{ - $mesg = "Fehler beim ändern des Remote Boot Services zu <b>".$rbscn."</b>!<br><br>"; - } -} - - -########################################## -# bereits vorhandene TimeRange(s) bearbeiten - -$entrymodtr = array(); -$modtr = 0; -# TimeRanges zusammensetzen -# $t = 0; # Laufvariable für $entrymodtr, da nicht jede Timerange ok sein muss -for ($i=0; $i<count($pxeday); $i++){ - -$oldpxetimerange = $oldpxeday[$i]."_".$oldpxebeg[$i]."_".$oldpxeend[$i]; - -if ( ($pxebeg[$i] <= $pxeend[$i]) && ( ($pxeday[$i] != $oldpxeday[$i] && $pxeday[$i] != "") || ($pxebeg[$i] != $oldpxebeg[$i] && $pxebeg[$i] != "") || ($pxeend[$i] != $oldpxeend[$i] && $pxeend[$i] != "")) ){ - - - # TimeRange Syntax checken - $syntax = new Syntaxcheck; - if ($syntax->check_timerange_syntax($pxeday[$i],$pxebeg[$i],$pxeend[$i])){ - - # in Grossbuchstaben - if (preg_match("/([a-z]+)/",$pxeday[$i])){$pxeday[$i] = strtoupper($pxeday[$i]);} - if (preg_match("/([a-z]+)/",$pxebeg[$i])){$pxebeg[$i] = strtoupper($pxebeg[$i]);} - if (preg_match("/([a-z]+)/",$pxeend[$i])){$pxeend[$i] = strtoupper($pxeend[$i]);} - - # führende Nullen weg - $pxebeg[$i] = preg_replace ( '/0([0-9])/', '$1', $pxebeg[$i]); - $pxeend[$i] = preg_replace ( '/0([0-9])/', '$1', $pxeend[$i]); - - # TimeRange auf Ãœberschneidung mit vorhandenen checken außer mit eigener alter TR da diese - # ja geändert werden soll - if(check_timerange_pxe($pxeday[$i],$pxebeg[$i],$pxeend[$i],$nodeDN,$oldpxetimerange)){ - - $pxetimerange = $pxeday[$i]."_".$pxebeg[$i]."_".$pxeend[$i]; - $entrymodtr ['timerange'][$i] = $pxetimerange; - $modtr = 1; - - } - else{ - $mesg = "Es existiert bereits ein PXE Boot Menü, das sich mit der eingegebenen Time Range - überschneidet!<br> - Bitte geben Sie eine andere Time Range ein.<br><br>"; - $entrymodtr ['timerange'][$i] = $oldpxetimerange; - } - } - else{ - $mesg = "Falsche Syntax in der Timerange-Eingabe!<br> - Bitte geben Sie die erneut Time Range ein.<br><br>"; - $entrymodtr ['timerange'][$i] = $oldpxetimerange; - } - -} - - -elseif ( $pxeday[$i] == "" || $pxebeg[$i] == "" || $pxeend[$i] == "" || $pxebeg[$i] > $pxeend[$i]){ - - $mesg = "Sie haben die Time Range <b>Nr.".$i."</b> nicht vollständig angegeben. Diese ist aber ein notwendiges Attribut.<br> - Diese Time Range wird nicht bearbeitet.<br><br>"; - $entrymodtr ['timerange'][$i] = $oldpxetimerange; -} - -else{$entrymodtr ['timerange'][$i] = $oldpxetimerange;} -} # Ende for-Schleife für jede Timerange -# jetzt noch alle gesammelten Änderungen Durchführen ... -if ($modtr == 1){ - # erst ändern - echo "Ändern: "; print_r($entrymodtr); echo "<br>"; - if($result = ldap_mod_replace($ds,$pxeDN,$entrymodtr)){ - $mesg = "TimeRanges erfolgreich geändert<br><br>"; - }else{ - $mesg = "Fehler beim ändern der TimeRanges!<br><br>"; - } -} - - -if ( count($deltr) != 0 && $modtr == 0 ){ - # Time Range löschen - $j = 0; - foreach ($deltr as $delrange){ - $entrydeltr ['timerange'][$j] = $delrange; - $j++; - } - # dann löschen - echo "Löschen: "; print_r($entrydeltr); echo "<br>"; - if($result = ldap_mod_del($ds,$pxeDN,$entrydeltr)){ - $mesg = "TimeRanges erfolgreich gelöscht<br><br>"; - }else{ - $mesg = "Fehler beim löschen der TimeRanges!<br><br>"; - } -}elseif(count($deltr) != 0 && $modtr == 1){ - echo "Nur Ändern (gleichzeitig Löschen und Ändern geht nicht)"; -} - -##################################### -# TimeRange hinzufügen - -if ( $newpxeday != "" && $newpxebeg != "" && $newpxeend != "" && $newpxebeg <= $newpxeend ){ - - # TimeRange Syntax checken - $syntax = new Syntaxcheck; - if ($syntax->check_timerange_syntax($newpxeday,$newpxebeg,$newpxeend)){ - - # in Grossbuchstaben - if (preg_match("/([a-z]+)/",$newpxeday)){$newpxeday = strtoupper($newpxeday);} - if (preg_match("/([a-z]+)/",$newpxebeg)){$newpxebeg = strtoupper($newpxebeg);} - if (preg_match("/([a-z]+)/",$newpxeend)){$newpxeend = strtoupper($newpxeend);} - - # führende Nullen weg - $newpxebeg = preg_replace ( '/0([0-9])/', '$1', $newpxebeg); - $newpxeend = preg_replace ( '/0([0-9])/', '$1', $newpxeend); - - # TimeRange auf Ãœberschneidung mit vorhandenen checken - if(check_timerange_pxe($newpxeday,$newpxebeg,$newpxeend,$nodeDN,"")){ - - $newpxetimerange = $newpxeday."_".$newpxebeg."_".$newpxeend; - $entrytr ['timerange'] = $newpxetimerange; - if($result = ldap_mod_add($ds,$pxeDN,$entrytr)){ - $mesg = "Zusätzliche TimeRange erfolgreich eingetragen<br><br>"; - }else{ - $mesg = "Fehler beim eintragen der zusätzlichen TimeRange!<br><br>"; - } - }else{ - $mesg = "Es existiert bereits ein PXE Boot Menü, das sich mit der eingegebenen Time Range - überschneidet!<br> - Bitte geben Sie eine andere Time Range ein.<br><br>"; - } - }else{ - $mesg = "Falsche Syntax in der Timerange-Eingabe!<br> - Bitte geben Sie die erneut Time Range ein.<br><br>"; - } -} - - -##################################### -# PXE Filename(s) - -$filemod = array(); -$modfi = 0; -$filedel = array(); -$delfi = 0; -$j = 0; - -if (count($file) != 0){ - -for ($i=0; $i<count($file); $i++){ - - if ( $oldfile[$i] == $file[$i] ){ - $filemod ['filename'][$i] = $oldfile[$i]; - # $mesg = "keine Aenderung<br>"; - } - - if ( $oldfile[$i] != "" && $file[$i] != "" && $oldfile[$i] != $file[$i] ){ - echo "PXE Dateinamen aendern<br> - Vorsicht dies kann eine nicht verwendbare PXE Datei zur Folge haben!<br><br>"; - # hier noch Syntaxcheck - $filemod ['filename'][$i] = $file[$i]; - $modfi = 1; - } - - if ( $oldfile[$i] != "" && $file[$i] == "" ){ - echo "PXE Dateinamen loeschen!<br> - Achtung: aus ihren PXE Daten wird keine PXE Datei mehr generiert.<br> - Sie sind solange nicht mehr für den PXE Bootvorgang verwendbar bis Sie einen neuen Dateinamen anlegen!<br><br>"; - $filemod ['filename'][$i] = $oldfile[$i]; - $filedel ['filename'][$j] = $oldfile[$i]; - $j++; - $delfi = 1; - $seconds = 4; - } -} -#erst ändern -if ($modfi == 1){ - echo "Ändern: "; print_r($filemod); echo "<br>"; - if(ldap_mod_replace($ds,$pxeDN,$filemod)){ - $mesg = "PXE Dateiname(n) erfolgreich geändert<br><br>"; - }else{ - $mesg = "Fehler beim ändern des(r) PXE Dateinamens!<br><br>"; - } - $modfi = 0; -} -# dann löschen -if ($delfi == 1){ - echo "Löschen: "; print_r($filedel); echo "<br>"; - if(ldap_mod_del($ds,$pxeDN,$filedel)){ - $mesg = "PXE Dateiname(n) erfolgreich gelöscht<br><br>"; - }else{ - $mesg = "Fehler beim löschen des PXE Dateinamens !<br><br>"; - } - $delfi = 0; -} - -} - -# PXE Dateiname neu anlegen -if ($newfilename == ""){ -} -if ($newfilename != ""){ - echo "PXE Dateiname hinzufügen"; - $fileadd ['filename'] = $newfilename; - if(ldap_mod_add($ds,$pxeDN,$fileadd)){ - $mesg = "PXE Dateiname <b>".$newfilename."</b> erfolgreich angelegt<br><br>"; - }else{ - $mesg = "Fehler beim anlegen des PXE Dateinamens ".$newfilename." !<br><br>"; - } -} - - -################################################################## -# Restliche Attribute - -$entryadd = array(); -$entrymod = array(); -$entrydel = array(); - -foreach (array_keys($atts) as $key){ - - if ( $oldatts[$key] == $atts[$key] ){ - - } - if ( $oldatts[$key] == "" && $atts[$key] != "" ){ - # hier noch Syntaxcheck - $entryadd[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] != "" && $oldatts[$key] != $atts[$key] ){ - # hier noch Syntaxcheck - $entrymod[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] == "" ){ - # hier noch Syntaxcheck - $entrydel[$key] = $oldatts[$key]; - } -} - -#print_r($entryadd); echo "<br>"; -#print_r($entrymod); echo "<br>"; -#print_r($entrydel); echo "<br>"; - - -if (count($entryadd) != 0 ){ - #print_r($entryadd); echo "<br>"; - #echo "neu anlegen<br>"; - foreach (array_keys($entryadd) as $key){ - $addatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_add($ds,$pxeDN,$entryadd)){ - $mesg = "Attribute ".$addatts." erfolgreich eingetragen<br><br>"; - }else{ - $mesg = "Fehler beim eintragen der Attribute ".$addatts."<br><br>"; - } -} - -if (count($entrymod) != 0 ){ - #print_r($entrymod); echo "<br>"; - #echo "ändern<br>"; - foreach (array_keys($entrymod) as $key){ - $modatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_replace($ds,$pxeDN,$entrymod)){ - $mesg = "Attribute ".$modatts." erfolgreich geaendert<br><br>"; - }else{ - $mesg = "Fehler beim aendern der Attribute ".$modatts."<br><br>"; - } -} - -if (count($entrydel) != 0 ){ - #print_r($entrydel); echo "<br>"; - #echo "löschen<br>"; - foreach (array_keys($entrydel) as $key){ - $delatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_del($ds,$pxeDN,$entrydel)){ - $mesg = "Attribute ".$delatts." erfolgreich geloescht<br><br>"; - }else{ - $mesg = "Fehler beim loeschen der Attribute ".$delatts."<br><br>"; - } -} - - - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/pxe_copy.php b/ldap-site-mngmt/webinterface/rbs/pxe_copy.php deleted file mode 100644 index 92e6ba0b..00000000 --- a/ldap-site-mngmt/webinterface/rbs/pxe_copy.php +++ /dev/null @@ -1,189 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$pxeDN = $_POST['pxedn']; -$pxecn = "PXE_".$_POST['pxecncp']; -$oldpxecn = "PXE_".$_POST['oldpxecncp']; - -$deltr = $_POST['deltr']; - -$oldpxeday = $_POST['oldpxedaycp']; $oldpxeday = htmlentities($oldpxeday); -$oldpxebeg = $_POST['oldpxebegcp']; $oldpxebeg = htmlentities($oldpxebeg); -$oldpxeend = $_POST['oldpxeendcp']; $oldpxeend = htmlentities($oldpxeend); - -$nodeDN = $_POST['nodedn']; -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - -$copytargets = $_POST['copytargets']; -#print_r($copytargets); echo "<br>"; -$n = array_keys($copytargets,'none'); -#print_r($n); echo "<br>"; -for ($i=0; $i<count($n); $i++){ - $match = array_search('none',$copytargets); - array_splice($copytargets, $match, 1); -} -#print_r($copytargets); echo "<br>"; - - -$seconds = 2; -$url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $pxecn != ""){ - - # Formulareingaben anpassen - $exppxe = explode(" ",$pxecn); - foreach ($exppxe as $word){$expuc[] = ucfirst($word);} - $pxecn = implode(" ",$expuc); - $pxecn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $pxecn); - - $nomac = 0; - - if (count($copytargets) != 0){ - foreach ($copytargets as $targetDN){ - - $exptargetdn = ldap_explode_dn($targetDN, 1); - $targetcn = $exptargetdn[0]; - $targettype = $exptargetdn[1]; - - # falls Target keine MAC hat dann kann keine PXE angelegt werden - if ($targettype == "computers"){ - $macdata = get_node_data($targetDN, array("hwaddress")); - if ($macdata['hwaddress'] == ""){ - $nomac = 1; - echo "Für den Ziel-Rechner ist keine MAC Adresse eingetragen <br> - Das PXE Bootmenü wird nicht angelegt. <br> - <br> - Tragen Sie zuerst eine MAC ein!<br><br>"; - } - } - if ($targettype == "groups"){ - $members = get_node_data($targetDN, array("member")); - if (count($members) > 1){ - foreach ($members['member'] as $hostDN){ - $macdata = get_node_data($hostDN, array("hwaddress","hostname")); - if ($macdata['hwaddress'] == ""){ - $nomac = 1; - echo "Für den Gruppen-Rechner <b>".$macdata['hostname']."</b> ist keine MAC Adresse eingetragen <br> - Das PXE Bootmenü für die Gruppe wird nicht angelegt. <br> - <br> - Tragen Sie zuerst bei Rechner <b>".$macdata['hostname']."</b> eine MAC ein!<br><br>"; - } - } - } - if (count($members) == 1){ - $macdata = get_node_data($members['member'], array("hwaddress")); - if ($macdata['hwaddress'] == ""){ - $nomac = 1; - echo "Für den Gruppen-Rechner <b>".$macdata['hostname']."</b> ist keine MAC Adresse eingetragen <br> - Das PXE Bootmenü für die Gruppe wird nicht angelegt. <br> - <br> - Tragen Sie zuerst bei Rechner <b>".$macdata['hostname']."</b> eine MAC ein!<br><br>"; - } - } - } - - $brothers = get_pxeconfigs($targetDN,array("cn")); - $brother = 0; - foreach ($brothers as $item){ - if( $item['cn'] == $pxecn ){ - $mesg = "Es existiert bereits ein PXE Boot Menü mit dem eingegebenen Namen!<br> - Bitte geben Sie einen anderen Namen ein.<br><br>"; - $url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; - $brother = 1; - break; - } - } - if ($brother == 0 && $nomac == 0){ - - $exptargetdn = ldap_explode_dn($targetDN, 1); - $target = $exptargetdn[0]; - $targettype = $exptargetdn[1]; - - $oldpxetimerange = $oldpxeday."_".$oldpxebeg."_".$oldpxeend; - $newpxeDN = "cn=".$pxecn.",".$targetDN; - print_r($newpxeDN); echo "<br>"; - - if (dive_into_tree_cp($pxeDN,$newpxeDN)){ - - $delfileuri = 0; - # Filename anpassen - if ($targettype == "rbs"){ - $entrymod ['filename'] = "default"; - } - if ($targettype == "computers"){ - $macdata = get_node_data($targetDN, array("hwaddress")); - $entrymod ['filename'] = "01-".$macdata['hwaddress']; - $delfileuri = 1; - #$entrymod ['fileuri'] = "01-".$macdata['hwaddress'].".tgz"; - } - if ($targettype == "groups"){ - $members = get_node_data($targetDN, array("member")); - if (count($members) != 0){ - foreach ($members['member'] as $hostDN){ - $macdata = get_node_data($hostDN, array("hwaddress")); - $entrymod ['filename'][] = "01-".$macdata['hwaddress']; - $delfileuri = 1; - #$entrymod ['fileuri'] = $target.".tgz"; - } - } - } - if(ldap_mod_replace($ds,$newpxeDN,$entrymod)){ - if($deltr == 1){ - # Timeranges und FileURI im neuen Objekt löschen - $entrydel ['timerange'] = array(); - if ($delfileuri == 1){ - $entrydel ['fileuri'] = array(); - } - if ( ldap_mod_del($ds,$newpxeDN,$entrydel) ){ - $mesg .= "<br>PXE Boot Menü erfolgreich nach ".$target[1]." kopiert<br>"; - } - else{ - ldap_delete($ds,$newpxeDN); - $mesg .= "<br>Fehler beim kopieren des PXE Boot Menüs nach <b>".$target[1]."</b><br>"; - } - } - } - else{ - ldap_delete($ds,$newpxeDN); - $mesg .= "<br>Fehler beim kopieren des PXE Boot Menüs nach <b>".$target[1]."</b><br>"; - } - } - else{ - $mesg .= "<br>Fehler beim kopieren des PXE Boot Menüs nach <b>".$target[1]."</b><br>"; - } - } - } - } - else{ - $mesg .= "<br>Sie haben kein Ziel angegeben!<br>"; - } -} - -elseif ( $pxecn == ""){ - - $mesg = "Sie haben den Namen des neuen PXE Boot Menüs nicht angegeben. Dieser ist aber ein notwendiges Attribut.<br> - Bitte geben Sie ihn an.<br><br>"; - $url = "pxe.php?dn=".$pxeDN."&mnr=".$mnr."&sbmnr=".$sbmnr."&mcnr=".$mcnr; -} - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/pxe_delete.php b/ldap-site-mngmt/webinterface/rbs/pxe_delete.php deleted file mode 100644 index a1b7a060..00000000 --- a/ldap-site-mngmt/webinterface/rbs/pxe_delete.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$pxeDN = $_POST['dn']; -$oldpxecn = $_POST['name']; - -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - -$seconds = 1; -$url = $_POST['successurl']; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $pxeDN != ""){ - - if ( dive_into_tree_del($pxeDN,"") ){ - $mesg = "PXE Boot Menü <b>".$pxecn."</b> erfolgreich gelöscht!<br><br>"; - } - else{ - $mesg = "Fehler beim löschen des PXE Boot Menüs <b>".$pxecn."</b> !<br><br>"; - } - -} - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/pxe_wochenplan.php b/ldap-site-mngmt/webinterface/rbs/pxe_wochenplan.php deleted file mode 100644 index 7cb4d394..00000000 --- a/ldap-site-mngmt/webinterface/rbs/pxe_wochenplan.php +++ /dev/null @@ -1,154 +0,0 @@ -<?php - -##################################### -# Wochenübersicht - -$template->assign(array("A0" => "","B0" => "","C0" => "","D0" => "","E0" => "","F0" => "","G0" => "", - "A1" => "","B1" => "","C1" => "","D1" => "","E1" => "","F1" => "","G1" => "", - "A2" => "","B2" => "","C2" => "","D2" => "","E2" => "","F2" => "","G2" => "", - "A3" => "","B3" => "","C3" => "","D3" => "","E3" => "","F3" => "","G3" => "", - "A4" => "","B4" => "","C4" => "","D4" => "","E4" => "","F4" => "","G4" => "", - "A5" => "","B5" => "","C5" => "","D5" => "","E5" => "","F5" => "","G5" => "", - "A6" => "","B6" => "","C6" => "","D6" => "","E6" => "","F6" => "","G6" => "", - "A7" => "","B7" => "","C7" => "","D7" => "","E7" => "","F7" => "","G7" => "", - "A8" => "","B8" => "","C8" => "","D8" => "","E8" => "","F8" => "","G8" => "", - "A9" => "","B9" => "","C9" => "","D9" => "","E9" => "","F9" => "","G9" => "", - "A10" => "","B10" => "","C10" => "","D10" => "","E10" => "","F10" => "","G10" => "", - "A11" => "","B11" => "","C11" => "","D11" => "","E11" => "","F11" => "","G11" => "", - "A12" => "","B12" => "","C12" => "","D12" => "","E12" => "","F12" => "","G12" => "", - "A13" => "","B13" => "","C13" => "","D13" => "","E13" => "","F13" => "","G13" => "", - "A14" => "","B14" => "","C14" => "","D14" => "","E14" => "","F14" => "","G14" => "", - "A15" => "","B15" => "","C15" => "","D15" => "","E15" => "","F15" => "","G15" => "", - "A16" => "","B16" => "","C16" => "","D16" => "","E16" => "","F16" => "","G16" => "", - "A17" => "","B17" => "","C17" => "","D17" => "","E17" => "","F17" => "","G17" => "", - "A18" => "","B18" => "","C18" => "","D18" => "","E18" => "","F18" => "","G18" => "", - "A19" => "","B19" => "","C19" => "","D19" => "","E19" => "","F19" => "","G19" => "", - "A20" => "","B20" => "","C20" => "","D20" => "","E20" => "","F20" => "","G20" => "", - "A21" => "","B21" => "","C21" => "","D21" => "","E21" => "","F21" => "","G21" => "", - "A22" => "","B22" => "","C22" => "","D22" => "","E22" => "","F22" => "","G22" => "", - "A23" => "","B23" => "","C23" => "","D23" => "","E23" => "","F23" => "","G23" => "")); - -#print_r($timeranges); echo "<br>"; - -# vom spezifischsten zum unspezifischsten : -# FR_0_7 -> FR_X_X -> X_0_7 -> X_X_X -$daytime = array(); -$timex = array(); -$dayx = array(); -$allx = array(); -$legend = array(); -if(count($timeranges) != 0){ -foreach ($timeranges as $tr){ - if (count($tr[0]) > 1){ - foreach ($tr as $item){ - if ($item[0] != "X" && $item[1] != "X" && $item[2] != "X" && ($item[0] == "MO" || $item[0] == "DI" || $item[0] == "MI" || $item[0] == "DO" || $item[0] == "FR" || $item[0] == "SA" || $item[0] == "SO")){ - $daytime[] = $item; - } - if ($item[0] != "X" && $item[1] == "X" && $item[2] == "X"){ - $timex[] = $item; - } - if ($item[0] == "X" && $item[1] != "X" && $item[2] != "X"){ - $dayx[] = $item; - } - if ($item[0] == "X" && $item[1] == "X" && $item[2] == "X"){ - $allx[] = $item; - } - } - }else{ - if ($tr[0] != "X" && $tr[1] != "X" && $tr[2] != "X" && ($tr[0] == "MO" || $tr[0] == "DI" || $tr[0] == "MI" || $tr[0] == "DO" || $tr[0] == "FR" || $tr[0] == "SA" || $tr[0] == "SO")){ - $daytime[] = $tr; - } - if ($tr[0] != "X" && $tr[1] == "X" && $tr[2] == "X"){ - $timex[] = $tr; - } - if ($tr[0] == "X" && $tr[1] != "X" && $tr[2] != "X"){ - $dayx[] = $tr; - } - if ($tr[0] == "X" && $tr[1] == "X" && $tr[2] == "X"){ - $allx[] = $tr; - } - } -} - -#print_r($daytime); echo "<br>"; -#print_r($timex); echo "<br>"; -#print_r($dayx); echo "<br>"; -#print_r($allx); echo "<br>"; - -$daycode = array("MO" => "A", "DI" => "B", "MI" => "C", "DO" => "D", "FR" => "E", "SA" => "F", "SO" => "G"); -$allxcolors = array("#BEBEBE","A0A0A0","#696969","#EEDFCC","#D8BFD8","#505050"); -$dayxcolors = array("#483D8B","#7B68EE","#191970","#8470FF","#708090","#6A5ACD"); -$timexcolors = array("#CDC673","#A2CD5A","#BDB76B","#8B864E","#6B8E23","#CDBE70"); -$daytimecolors = array("880000","#CD6839","#CC3300","#CC6600","#993300","#8B4C39"); - - -if (count($allx) != 0){ - $c = 0; - foreach ($allx as $range){ - foreach ($daycode as $dc){ - for ($i = 0; $i <= 23; $i++){ - $template->assign(array($dc.$i => "background-color:".$allxcolors[$c].";")); - } - } - $legend[] = array($range ,$allxcolors[$c]); - $c++; - } -} - -if (count($dayx) != 0){ - $c = 0; - foreach ($dayx as $range){ - foreach ($daycode as $dc){ - for ($i = $range[1]; $i<= $range[2]; $i++){ - $template->assign(array($dc.$i => "background-color:".$dayxcolors[$c].";")); - } - } - $legend[] = array($range ,$dayxcolors[$c]); - $c++; - } -} - -if (count($timex) != 0){ - $c = 0; - foreach ($timex as $range){ - $dc = $daycode[$range[0]]; - for ($i = 0; $i<= 23; $i++){ - $template->assign(array($dc.$i => "background-color:".$timexcolors[$c].";")); - } - $legend[] = array($range ,$timexcolors[$c]); - $c++; - } -} - -if (count($daytime) != 0){ - $c = 0; - foreach ($daytime as $range){ - $dc = $daycode[$range[0]]; - for ($i = $range[1]; $i<= $range[2]; $i++){ - $template->assign(array($dc.$i => "background-color:".$daytimecolors[$c].";")); - } - $legend[] = array($range ,$daytimecolors[$c]); - $c++; - } -} - -} - -$template->assign(array("DESCRIPTION" => "")); -#print_r($legend); -if (count($legend) != 0){ - $template->define_dynamic("Legende", "Webseite"); - foreach ($legend as $item){ - # Timerange Komponente - $color = $item[1]; - $template->assign(array("TR1" => $item[0][0], - "TR2" => $item[0][1], - "TR3" => $item[0][2], - "CN" => $item[0][3], - "COLOR" => $color)); - $template->parse("LEGENDE_LIST", ".Legende"); - } -} - - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/pxeconfig_default.dwt b/ldap-site-mngmt/webinterface/rbs/pxeconfig_default.dwt deleted file mode 100644 index bb630723..00000000 --- a/ldap-site-mngmt/webinterface/rbs/pxeconfig_default.dwt +++ /dev/null @@ -1,323 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Default PXE Boot Menüs <code class='font_object'> {AU} </code> </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr> - <td width='40%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>PXE Boot Menü</b></td> - <td width='60%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Gültigkeitsdauer (Time Range)</b></td> - </tr> - - - - <!-- BEGIN DYNAMIC BLOCK: Pxeconf --> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{PXECN} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{TRANGES} </td> - </tr> - <!-- END DYNAMIC BLOCK: Pxeconf --> - - </table></td> - </tr> - <tr> - <td height='50'></td> - </tr> - - <tr> - <td colspan='2'><h4>Wochen Übersicht:</h4></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr><td> - <table cellpadding='0' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr align='center'> - <td width='9%' style='border-color: black; border-style: solid; border-width: 2 0 2 2;'><b>Uhrzeit</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Montag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Dienstag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Mittwoch</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Donnerstag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Freitag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 0 2 1;'><b>Samstag</b></td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 2 2 2 1;'><b>Sonntag</b></td> - </tr> - <tr heigth='2' align='center'> - <td width='9%' style='border-color: black; border-style: solid; border-width: 0 0 0 2;'>0</td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F0}'> </td> - <td width='13%' style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G0}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F1}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G1}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>2</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F2}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G2}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F3}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G3}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>4</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F4}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G4}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F5}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G5}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>6</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F6}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G6}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F7}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G7}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>8</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F8}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G8}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F9}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G9}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>10</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F10}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G10}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F11}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G11}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>12</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F12}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G12}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F13}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G13}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>14</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F14}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G14}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F15}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G15}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>16</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F16}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G16}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F17}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G17}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>18</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F18}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G18}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F19}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G19}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>20</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F20}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G20}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{A21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{B21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{C21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{D21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{E21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 1;{F21}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 0 1;{G21}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 2;'>22</td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{A22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{B22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{C22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{D22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{E22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 0 0 1;{F22}'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 2 0 1;{G22}'> </td> - </tr> - <tr heigth='2' align='center'> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 2;'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{A23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{B23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{C23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{D23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{E23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 2 1;{F23}'> </td> - <td style='border-color: black; border-style: solid; border-width: 0 2 2 1;{G23}'> </td> - </tr> - - </table></td> - </tr> - - <tr> - <td height='10'></td> - </tr> - <tr> - <td colspan='2'><h4>Legende:</h4></td> - </tr> - <tr><td> - <table cellpadding='3' cellspacing='3' border='1' align='left' width='50%' style='border-width: 0 0 0 0;'> - <tr> - <td width='65%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>PXE Boot Menü</b></td> - <td width='5%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> - <td width='30%' style='border-color: black; border-style: solid; border-width: 0 0 0 0;'><b>Farbe</b></td> - </tr> - - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'>Keine PXE Definition </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 1 1 1;'> </td> - </tr> - - <!-- BEGIN DYNAMIC BLOCK: Legende --> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'>{CN} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 0 0;'> </td> - <td style='border-color: black; border-style: solid; border-width: 1 1 1 1;background-color:{COLOR};'> </td> - </tr> - <!-- END DYNAMIC BLOCK: Legende --> - - </table></td> - </tr> - -</table> diff --git a/ldap-site-mngmt/webinterface/rbs/pxeconfig_default.php b/ldap-site-mngmt/webinterface/rbs/pxeconfig_default.php deleted file mode 100644 index b6d495d9..00000000 --- a/ldap-site-mngmt/webinterface/rbs/pxeconfig_default.php +++ /dev/null @@ -1,77 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - -# 3. Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "pxeconfig_default.dwt"; - -include('rbs_header.inc.php'); - -################################################################################### - -$mnr = -1; -$sbmnr = -1; -$mcnr = -1; - -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createRBSMenu($rollen, $mnr, $auDN, $sbmnr); - -################################################################################### - -$rbsDN = $_GET['rbsdn']; - -$template->assign(array("PXEDN" => "", - "PXECN" => "Noch kein Default PXE Boot Menü angelegt", - "TRANGES" => "", - "RBS" => "", - "CN" => "")); - -$pxe_array = get_pxeconfigs($rbsDN,array("dn","cn","timerange","rbservicedn")); -# print_r($pxe_array); - -$template->define_dynamic("Pxeconf", "Webseite"); - -for ($i=0; $i<count($pxe_array); $i++){ - # Timerange Komponenten - $trange = ""; - if (count($pxe_array[$i]['timerange']) > 1 ){ - foreach ($pxe_array[$i]['timerange'] as $tr){ - $exptime = array_merge(explode('_',$tr),$pxe_array[$i]['cn']); - $timeranges[$i][] = $exptime; # Für grafische Wo-Ansicht - if ($exptime[0] == "X"){$exptime[0]="täglich";} - # if ($exptime[1] == "X" && $exptime[2] == "X"){$exptime[1] = ""; $exptime[2]= "";} - $trange .= $exptime[0].", von ".$exptime[1].":00 bis ".$exptime[2].":59 / "; - } - }else{ - $exptime = array_merge(explode('_',$pxe_array[$i]['timerange']), array($pxe_array[$i]['cn'])); - $timeranges[$i] = $exptime; # Für grafische Wo-Ansicht - if ($exptime[0] == "X"){$exptime[0]="täglich";} - # if ($exptime[1] == "X" && $exptime[2] == "X"){$exptime[1] = ""; $exptime[2]= "";} - $trange .= $exptime[0].", von ".$exptime[1].":00 bis ".$exptime[2].":59"; - } - - $pxename = "<a href='pxe.php?dn=".$pxe_array[$i]['dn']."&mnr=".$mnr."&sbmnr=".$sbmnr."' class='headerlink'>".$pxe_array[$i]['cn']."</a>"; - - - $template->assign(array("PXEDN" => $pxe_array[$i]['dn'], - "PXECN" => $pxename, - "TRANGES" => $trange, - "RBS" => $rbsDN, - "MNR" => $mnr, - "SBMNR" => $sbmnr, - "AUDN" => $auDN)); - $template->parse("PXECONF_LIST", ".Pxeconf"); -} - -include("pxe_wochenplan.php"); - - -################################################################################### - -include("rbs_footer.inc.php"); - -?> diff --git a/ldap-site-mngmt/webinterface/rbs/rbs.dwt b/ldap-site-mngmt/webinterface/rbs/rbs.dwt deleted file mode 100644 index 31f62a70..00000000 --- a/ldap-site-mngmt/webinterface/rbs/rbs.dwt +++ /dev/null @@ -1,76 +0,0 @@ -<html> - -<head> - <title>{SEITENTITEL}</title> - <link rel='stylesheet' href='../styles.css' type='text/css'></head> -<body> - -<table cellpadding='0' cellspacing='0' border='0' width='100%' style='background-color: #F0F0F0;border-color: #505050; border-style: solid; border-width: 0 0 1 0;'> - <tr> - <td width='30%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr valign='top'> - <td width='1'></td> - <td><h2>Client / IP Management</h2></td> - </tr> - </table> - </td> - - <td width='45%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr valign='top' align='left'> - <td> - <h4><a href='../start.php' class='headerlink'>Startseite</a> - >> <a href='../au/au.php' class='headerlink'>{AU}</a> [ {DOMAIN} ]</h4> - </td> - </tr> - </table> - </td> - <td width='25%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%' align='right'> - <tr valign='top' align='right'> - <td> - {LOGIN} - </td> - </tr> - </table> - </td> - </tr> - <tr> - <td colspan='3'>{MAINMENU}</td> - </tr> -</table> - -<!--<hr align='center' width='98%' noshade>--> -<br> - - -<table cellpadding='5' cellspacing='0' border='0' width='100%' height='85%'> - - <tr valign='top' height='100%'> - <td width='28%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr><td> - - {NAVIGATION} - - </td></tr> - </table> - </td> - - <td width='72%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr><td> - - {HAUPTFENSTER} - - </td></tr> - </table> - </td> - - </tr> -</table> - -</body> - -</html> diff --git a/ldap-site-mngmt/webinterface/rbs/rbs.php b/ldap-site-mngmt/webinterface/rbs/rbs.php deleted file mode 100644 index ce1553e2..00000000 --- a/ldap-site-mngmt/webinterface/rbs/rbs.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -# 3. Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "rbs_start.dwt"; - -include('rbs_header.inc.php'); - -################################################################################### - -$mnr = -1; -$sbmnr = -1; - -$mnr = $_GET['mnr']; -$sbmnr = $_GET['sbmnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createRBSMenu($rollen, $mnr, $auDN, $sbmnr); - -################################################################################### - -include("rbs_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/rbs_footer.inc.php b/ldap-site-mngmt/webinterface/rbs/rbs_footer.inc.php deleted file mode 100644 index 311721c5..00000000 --- a/ldap-site-mngmt/webinterface/rbs/rbs_footer.inc.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -$template->assign(array("PFAD" => $START_PATH)); - -# Daten in die Vorlage parsen -$template->parse("LOGIN", "Login"); -$template->parse("MAINMENU", "Mmenu"); -$template->parse("NAVIGATION", "Menu"); -$template->parse("HAUPTFENSTER", "Webseite"); -$template->parse("PAGE", "Vorlage"); - -# Fertige Seite an den Browser senden -$template->FastPrint("PAGE"); - -# Abmelden vom LDAP -ldap_unbind($ds); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/rbs_header.inc.php b/ldap-site-mngmt/webinterface/rbs/rbs_header.inc.php deleted file mode 100644 index b663a2e4..00000000 --- a/ldap-site-mngmt/webinterface/rbs/rbs_header.inc.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt. -$titel = "Remote Boot Service Management"; -# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc. -$mainnr = 3; - - -$template = new FastTemplate("."); -# dem erstellten Template-Objekt eine Vorlage zuweisen -$definedTemplates = array("Vorlage" => "rbs.dwt", - "Login" => "../logout_form.inc.dwt", - "Mmenu" => "../hauptmenue.dwt", - "Menu" => "menu.dwt", - "Webseite" => $webseite); -if (isset($additionalTemplates)) { - foreach ($additionalTemplates as $templateKey => $templateFile) { - $definedTemplates[$templateKey] = $templateFile; - } -} -$template->define($definedTemplates); -$template->assign(array("SEITENTITEL" => $titel, "ROLLE" => "mainadmin", "AU" => $au_ou, "DOMAIN" => $assocdom, "USERCN" => $usercn)); - - -include("rbs_menu.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/rbs_menu.php b/ldap-site-mngmt/webinterface/rbs/rbs_menu.php deleted file mode 100644 index 63b3fa52..00000000 --- a/ldap-site-mngmt/webinterface/rbs/rbs_menu.php +++ /dev/null @@ -1,194 +0,0 @@ -<?php - -function createRBSMenu($rollen, $mnr, $auDN, $sbmnr) { - global $template; - global $START_PATH; - - # rbservices (momentan nur für einen RBS konzipiert) - $rbs_array = get_rbservices($auDN,array("dn","cn")); - - # Struktur der Registerkartenleiste - $hauptmenu = array(array("link" => "rbs.php?mnr=0", - "text" => "Übersicht", - "zugriff" => "alle")); - $submenu = array(array()); - - $n = 1; - if (count($rbs_array) != 0){ - for ($i=0;$i<count($rbs_array);$i++){ - - $hauptmenu [] = array("link" => "rbservice.php?rbsdn=".$rbs_array[$i]['dn']."&mnr=".$n, - "text" => $rbs_array[$i]['cn'], - "zugriff" => array("MainAdmin","RbsAdmin")); - $submenu [] = array( - array("link" => "gbm_overview.php?rbsdn=".$rbs_array[$i]['dn']."&mnr=".$n."&sbmnr=0", - "text" => "Generische Bootmenüs", - "zugriff" => array("MainAdmin","RbsAdmin")), - array("link" => "pxeconfig_default.php?rbsdn=".$rbs_array[$i]['dn']."&mnr=".$n."&sbmnr=1", - "text" => "Default PXE Configs", - "zugriff" => array("MainAdmin","RbsAdmin")), - array("link" => "new_gbm.php?rbsdn=".$rbs_array[$i]['dn']."&mnr=".$n."&sbmnr=2", - "text" => "Neues GBM anlegen", - "zugriff" => array("MainAdmin","RbsAdmin")), - array("link" => "new_pxe.php?rbsdn=".$rbs_array[$i]['dn']."&mnr=".$n."&sbmnr=3", - "text" => "Neue PXE Config anlegen", - "zugriff" => array("MainAdmin","RbsAdmin")), - ); - $n++; - } - } - $hauptmenu [] = array("link" => "new_rbservice.php?&mnr=".$n, - "text" => "Neuen RBS anlegen", - "zugriff" => array("MainAdmin","RbsAdmin")); - - $submenu [] = array(); - #print_r($hauptmenu); echo "<br><br>"; - #print_r($submenu); - - - # Zusammenstellen der Menuleiste - $template->define_dynamic("Hauptmenu", "Menu"); - $template->define_dynamic("Submenu", "Menu"); - $i=0; - $maxmenu = count($hauptmenu); - - foreach($hauptmenu as $item) { - $template->clear_parse("SUBMENU_LIST"); - - if($item['zugriff'] === "alle" || vergleicheArrays($rollen , $item['zugriff'])) { - - $subempty = 0; - $j=0; - $maxsub = count($submenu[$mnr]); - if($maxsub > 0){ - foreach($submenu[$mnr] as $item2) { - - if($item2['zugriff'] === "alle" || vergleicheArrays($rollen, $item2['zugriff'])) { - if($i != $mnr){ - $template->assign(array("SUB" => "")); - # "LINK_S" => "", - # "TEXT_S" => "")); - $template->parse("SUBMENU_LIST", ".Submenu"); - $template->clear_dynamic("Submenu"); - } - else{ - if ($j==0) { - if ($sbmnr==0) { - if($maxsub == 1){$zwisch="branchbottom2";} - else {$zwisch="branch2";} - $lastaktive=true; - $farb="#505050"; - } - else{ - if($maxsub == 1){$zwisch="branchbottom2";} - else {$zwisch="branch2";} - $farb="#A0A0A0"; - $lastaktive=false; - } - } - else { - if ($sbmnr==$j) { - if($maxsub == $j+1){$zwisch="branchbottom2";} - else {$zwisch="branch2";} - $lastaktive=true; - $farb="#505050"; - } - else { - $farb="#A0A0A0"; - if($maxsub == $j+1){$zwisch="branchbottom2";} - else {$zwisch="branch2";} - # if ($lastaktive) {$zwisch="branch";} - # else {$zwisch="branch";} - $lastaktive=false; - } - } - $htmlcode= " - <tr height='4'> - <td></td><td align='right'><img src='../pics/line2.gif' height='4'></td><td></td><td></td> - </tr> - <tr> - <td width='8%'> </td> - <td width='8%' align='right'><img src='../pics/".$zwisch.".gif'></td>
- <td width='74%' align='left' style='border-width:1 1 1 1;border-color:#000000;border-style:solid;padding:2;padding-left:30px;background-color:{FARBE_S}'> - <a href='".$item2['link']."' style='text-decoration:none'><b class='standard_schrift'>".$item2['text']."</b></a></td> - <td width='10%'> </td> - </tr> - "; - $template->assign(array("SUB" => $htmlcode)); - $template->assign(array("FARBE_S" => $farb)); - $template->parse("SUBMENU_LIST", ".Submenu"); - $template->clear_dynamic("Submenu"); - } - } - else { - $subempty++; - } - $j=$j+1; - } - } - if($subempty == count($submenu[$mnr])) { - $template->assign(array("SUB" => "")); - # "LINK_S" => "", - # "TEXT_S" => "")); - $template->parse("SUBMENU_LIST", ".Submenu"); - $template->clear_dynamic("Submenu"); - } - if ($i==0) { - if ($mnr==0) { - if(count($submenu[$i][0]) != 0){ - if($maxmenu == 1){$zwisch="";} # {$zwisch="<img style='border-width:0;border-style=none;' src='../pics/minus2.gif'>";} - else {$zwisch="";} - }else{$zwisch="";} - $lastaktive=true; - $farb="#505050"; - } - else{ - if(count($submenu[$i][0]) != 0){ - if($maxmenu == 1){$zwisch="<a href='{LINK_M}' style='border-style=none;text-decoration:none'> - <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} - else {$zwisch="<a href='{LINK_M}' style='border-style=none;text-decoration:none'> - <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} - }else{$zwisch="";} - $farb="#A0A0A0"; - $lastaktive=false; - } - } - else { - if ($mnr==$i) { - if(count($submenu[$mnr][0]) != 0){ - if($maxmenu == $i+1){$zwisch="";} - else {$zwisch="";} - }else{$zwisch="";} - $lastaktive=true; - $farb="#505050"; - } - else { - $farb="#A0A0A0"; - if(count($submenu[$i][0]) != 0){ - if($maxmenu == $i+1){$zwisch="<a href='{LINK_M}' style='border-style=none;text-decoration:none'> - <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} - else {$zwisch="<a href='{LINK_M}' style='border-style=none;text-decoration:none'> - <img style='border-width:0;border-style=none;' src='../pics/plus2.gif'></a>";} - }else{$zwisch="";} - #if ($lastaktive) {$zwisch="";} - #else {$zwisch="";} - $lastaktive=false; - } - } - $template->assign(array("ICON" => $zwisch, - "FARBE" => $farb, - "LINK_M" => $item["link"], - "TEXT_M" => $item["text"])); - $template->parse("HAUPTMENU_LIST", ".Hauptmenu"); - $template->clear_dynamic("Hauptmenu"); - } - $i=$i+1; - } - if ($lastaktive) {$template->assign(array("ENDE" => ""));} - else{ - $template->assign(array("ENDE" => "")); - } - -} - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/rbs_start.dwt b/ldap-site-mngmt/webinterface/rbs/rbs_start.dwt deleted file mode 100644 index 3436b4ee..00000000 --- a/ldap-site-mngmt/webinterface/rbs/rbs_start.dwt +++ /dev/null @@ -1,41 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='90%'> - <tr> - <td colspan='2'><h3>Modul - Remote Boot Services (PXE) Management: </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td> - <p>Dieses Modul dient der Verwaltung ihres <b>Remote Boot Services (RBS)</b><br> - Benutzen Sie die Navigation links, um die einzelnen Verwaltungsbereiche anzusteuern:</p> - <ul> - <li><p><b>Remote Boot Service</b></p> - Allgemeine Einstellungen Ihres Remote Boot Service.<br> - Falls Sie noch keinen RBS angelegt haben, können Sie dies hier tun. <br> - Daneben können Sie hier ihr RBS Bootserver-System (TFTP-, NFS-, NBD-Server) verwalten. - </li> - <li><p><b>Generische Boot Menüs</b></p> - Generische Boot Menues die Sie Nutzern ihres RBS anbieten wollen.<br> - Hier verwalten Sie Generische Boot Menues (GBM) oder legen neue an.<br><br> - GBMs enthalten alle Komponenten eines PXE Bootmenüs, welche - auf ihrem Bootserver-System gespeichert und von Ihnen verwaltet werden, d.h. - Kernel-Images, Initial-Ramdisks (initrd), usw. Diese sind unabhängig - von den PXE-Parametern, die das eigentliche Aussehen eines PXE Bootmenüs bestimmen, - wie z.B. Menu-Zeilen, oder PXE Parametern welche zur Bootclient Konfiguration verwendet - werden.<br> - Nutzer ihres RBS können aus diesen GBMs dann ihre individuellen PXE Boot - Menüs zusammenstellen. - - </li> - <li><p><b>Default PXE</b></p> - Default PXE Boot Konfigurationen, fuer die bootende Rechner ohne spezifische - PXEs.<br> - Hier können Sie Default PXEs anlegen und verwalten. - </li> - </ul> - - </td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/rbservice.dwt b/ldap-site-mngmt/webinterface/rbs/rbservice.dwt deleted file mode 100644 index e738d990..00000000 --- a/ldap-site-mngmt/webinterface/rbs/rbservice.dwt +++ /dev/null @@ -1,228 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>Remote Boot Service <code class='font_object'> {RBSCN} </code> </h3></td> - </tr> - <tr> - <td height='20'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <form action='rbservice_change.php' method='post'> - - <tr> - <td width='40%' class='tab_h'><b>Attribut</b></td> - <td width='60%' class='tab_h'><b>Wert</b></td> - </tr> - - <tr height='50'> - <td class='tab_d'><b>Eindeutiger RBS Name (cn):</b><br>(Teil des dn, ohne Leerzeichen eingeben) </td> - <td class='tab_d'> - <font size='+2'><b>RBS_</b></font><input type='Text' name='rbscn' value='{RBSCN}' size='40' class='medium_form_field'> - <input type='hidden' name='oldrbscn' value='{RBSCN}'> - </td> - </tr> - <tr> - <td class='tab_d_ohne'><b>Dienst kann momentan genutzt werden von:</b><br></td> - <td class='tab_d_ohne'>Abteilung<b> {RBSOFFERNOW}</b> (und allen Unterabteilungen) - </td> - </tr> - <tr height='50' valign='top'> - <td class='tab_d'><b>Ändern:</b><br>(Wählen Sie eine andere Abteilung)</td> - <td class='tab_d'> - <select name='rbsoffer' size='5' class='medium_form_selectbox'> - <option selected value='none'>----------</option> - - <!-- BEGIN DYNAMIC BLOCK: Rbsoffers --> - <option value='{RBSOFFER}'>{RBSOFFEROU}</option> - <!-- END DYNAMIC BLOCK: Rbsoffers --> - - <option value='off'>------ NIEMAND ------</option> - - </select> - <input type='hidden' name='oldrbsoffer' value='{RBSOFFERNOWDN}'> - </td> - </tr> - - </table></td> - </tr> - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>TFTP Boot Server:</h4></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr valign='top'> - <td width='15%' class='tab_h'> </td> - <td width='35%' class='tab_h'> </td> - <td colspan='2' class='tab_h'> </td> - </tr> - - <tr valign='top'> - <td class='tab_d_ohne'><b>TFTP Server: </td> - <td class='tab_d_ohne'> - <!--<input type='Text' name='tftpserverip' value='{TFTPIP}' size='15' class='medium_form_field'>--> - <input type='hidden' name='oldtftpserverip' value='{TFTPIP}'><font size='+1'>Hostname: <b>{TFTP}</b> [IP: <b>{TFTPIP}</b>]</font></td> - <td width='15%' class='tab_d_ohne'>TFTP Root</td> - <td width='30%' class='tab_d_ohne'> - <input type='Text' name='attribs[tftproot]' value='{TFTPROOT}' size='20' class='medium_form_field'> - <input type='hidden' name='oldattribs[tftproot]' value='{TFTPROOT}'></td> - </tr> - <tr valign='top'> - <td class='tab_d_ohne'>ändern:</td> - <td rowspan='2' class='tab_d_ohne'> - <select name='tftpserver' size='6' class='tftp_form_selectbox'> - <option selected value='none'>----------------------------</option> - <!-- BEGIN DYNAMIC BLOCK: TftpHosts --> - <option value='{HDN}'>{HN} [IP: {IP}]</option> - <!-- END DYNAMIC BLOCK: TftpHosts --> - </select></td> - <td class='tab_d_ohne'>PXE Path</td> - <td class='tab_d_ohne'>{TFTPROOT}/ - <input type='Text' name='attribs[tftppxepath]' value='{TFTPPXE}' size='20' class='medium_form_field'> - <input type='hidden' name='oldattribs[tftppxepath]' value='{TFTPPXE}'></td> - </tr> - <tr valign='top'> - <td class='tab_d_ohne'> </td> - <td class='tab_d_ohne'>Kernel Path</td> - <td class='tab_d_ohne'>{TFTPROOT}/ - <input type='Text' name='attribs[tftpkernelpath]' value='{TFTPKERNEL}' size='20' class='medium_form_field'> - <input type='hidden' name='oldattribs[tftpkernelpath]' value='{TFTPKERNEL}'></td> - </tr> - <tr valign='top'> - <td class='tab_d'>Initial Boot File</td> - <td class='tab_d'> - <input type='Text' name='initbootfile' value='{INITBOOTFILE}' size='25' class='medium_form_field'> - <input type='hidden' name='oldinitbootfile' value='{INITBOOTFILE}'></td> - <td class='tab_d'>Clientconf Path</td> - <td class='tab_d'>{TFTPROOT}/ - <input type='Text' name='attribs[tftpclientconfpath]' value='{TFTPCLIENTCONF}' size='20' class='medium_form_field'> - <input type='hidden' name='oldattribs[tftpclientconfpath]' value='{TFTPCLIENTCONF}'></td> - <input type='hidden' name='oldtftpserverdn' value='{TFTPDN}'> - </tr> - </table></td> - </tr> - <tr> - <td height='40'></td> - </tr> - <tr> - <td colspan='2'><h4>File Server URIs:</h4> - Diese sind in Generischen Boot Images als RootFS verwendbar.</td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - - <tr valign='top'> - <td width='20%' class='tab_h'> </td> - <td width='15%' class='tab_h'> </td> - <td width='25%' class='tab_h'> </td> - <td width='40%' class='tab_h'> </td> - </tr> - - <tr valign='top'> - <td class='tab_d'><b>Vorhandene URIs zu Root-Filesystemen: </b><br>(Zum Löschen einer URI Häkchen setzen)</td> - <td colspan='2' class='tab_d'> - <!-- BEGIN DYNAMIC BLOCK: Fsuris --> - <input type='checkbox' name='delfsuri[]' value='{FSURI}' size='10' class='medium_form_field'> <b>{FSURI}</b><br> - <!-- END DYNAMIC BLOCK: Fsuris --> - <td class='tab_d'> </td> - </tr> - <tr valign='top'> - <td class='tab_d_ohne'><b>Neue URI anlegen</b></td> - <td class='tab_d_ohne'>Filesystemtyp</td> - <td class='tab_d_ohne'>Fileserver IP</td> - <td class='tab_d_ohne'>NFS Export-Root bzw. (D)NBD <:Port[/Filesystem]></td> - </tr> - <tr valign='top'> - <td class='tab_d'> </td> - <td class='tab_d'> - <select name='addfsuri[]' size='5' class='tiny_form_selectbox'> - <option selected value='nfs'>nfs://</option> - <option value='nbd'>nbd://</option> - <option value='dnbd'>dnbd://</option> - <option value='dnbd2'>dnbd2://</option> - <option value='afs'>afs://</option> - </select> </td> - <td class='tab_d'><input type='Text' name='addfsuri[]' value='' size='15' class='medium_form_field'></td> - <td class='tab_d'><input type='Text' name='addfsuri[]' value='' size='25' class='medium_form_field'></td> - </tr> - - <input type='hidden' name='rbsdn' value='{RBSDN}'> - <input type='hidden' name='mnr' value='{MNR}'> - <input type='hidden' name='sbmnr' value='{SBMNR}'> - - </table></td> - </tr> - <tr> - <td><input type='Submit' name='apply' value='anwenden' class='small_loginform_button'> - </form></td> - </tr> - - - <tr> - <td height='50'></td> - </tr> - <tr> - <td colspan='2'><h3>Config File für PXE Generator Script</h3></td> - </tr> - <tr> - <td colspan='2'>Speichern Sie dieses als <b>pxegen.conf.pl</b> im gleichen Verzeichnis wie ihr PXE Generator Skript <b>pxe_generator.pl</b></td> - </tr> - <tr> - <td> - <table cellpadding='20' cellspacing='0' border='0' align='left' width='80%' style='border-color: black; border-style: solid; border-width: 2 2 2 2;'> - - <tr> - <td class='tab_d_ohne'> - $ldaphost= "{PXEGENLDAP}"; <br> - $basedn= "{PXEGENBASE}"; <br> - $userdn= "{PXEGENUDN}"; <br> - $passwd= "{PXEGENPW}"; <br> - $rbsdn= "{PXEGENRBS}"; - </td> - </tr> - - - </table></td> - </tr> - - - - <tr> - <td height='60'></td> - </tr> - - <tr> - <td colspan='2'><h4>Remote Boot Service <code class='font_object'>{RBSCN}</code> löschen:</h4></td> - </tr> - <tr> - <td> - <table cellpadding='7' cellspacing='0' border='0' align='left' width='90%' style='border-width: 0 0 0 0;'> - <form action='delete_confirm.php' method='post'> - - - <tr> - <td class='tab_d_ohne'> - Der Remote Boot Dienst wird komplett gelöscht, <br> - d.h. inklusive aller angelegten Generischen PXE Bootmenüs und Default PXEs. - </tr> - - <input type='hidden' name='dn' value='{RBSDN}'> - <input type='hidden' name='name' value='{RBSCN}'> - <input type='hidden' name='type' value='rbs'> - <input type='hidden' name='delurl' value='rbservice_delete.php'> - <input type='hidden' name='backurl' value='rbservice.php?dn={RBSDN}&mnr={MNR}'> - - </table></td> - </tr> - <tr> - <td> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'> - </form></td> - </tr> - - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/rbservice.php b/ldap-site-mngmt/webinterface/rbs/rbservice.php deleted file mode 100644 index e3df1efb..00000000 --- a/ldap-site-mngmt/webinterface/rbs/rbservice.php +++ /dev/null @@ -1,152 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -# 3. Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "rbservice.dwt"; - -include('rbs_header.inc.php'); - -################################################################################### - -$mnr = 0; -$sbmnr = -1; - -$mnr = $_GET['mnr']; - -# Menuleisten erstellen -createMainMenu($rollen, $mainnr); -createRBSMenu($rollen, $mnr, $auDN, $sbmnr); - -################################################################################### - -$rbsDN = $_GET['rbsdn']; - -$template->assign(array("RBSDN" => "", - "CN" => "", - "TFTP" => "", - "TFTPIP" => "", - "TFTPROOT" => "", - "INITBOOTFILE" => "", - "TFTPKERNEL" => "", - "TFTPPXE" => "", - "TFTPCLIENTCONF" => "", - "FSURI" => "", - "NFS" => "", - "NFSIP" => "", - "NFSPATH" => "", - "NBD" => "", - "NBDIP" => "", - "RBSOFFERNOWDN" => "", - "RBSOFFERNOW" => "", - "HDN" => "", - "HN" => "", - "IP" => "")); - -# RBS Daten -$attributes = array("dn","cn","rbsofferdn","tftpserverip","tftproot","tftpkernelpath","tftpclientconfpath", - "tftppxepath","nfsserverip","exportpath","nbdserverip","initbootfile","fileserveruri"); -$rbs_data = get_node_data($rbsDN, $attributes); - -# RBS Anbieten -# momentanes Offer -$offerexp = ldap_explode_dn($rbs_data['rbsofferdn'], 1); -$rbsoffernow = $offerexp[0]; -# alternative Offers -$expdn = ldap_explode_dn($auDN, 0); # Mit Merkmalen -$expdn = array_slice($expdn, 1); -$expou = ldap_explode_dn($auDN, 1); # nur Werte -$expou = array_slice($expou, 1, -3); -#print_r($expou); echo "<br>"; -#print_r($expdn); echo "<br>"; -for ($i=0; $i<count($expou); $i++){ - $rbsoffers[$i]['ou'] = $expou[$i]; - $rbsoffers[$i]['dn'] = implode(',',$expdn); - $expdn = array_slice($expdn, 1); -} -#print_r($rbsoffers); - -$expcn = explode('_',$rbs_data['cn']); -$name = array_slice($expcn,1); -$rbscn = implode('_',$name); - -# Server Hostnamen holen -$tftpserver = get_hostname_from_ip($rbs_data['tftpserverip']); -#print_r($tftpserver); - -$template->assign(array("RBSDN" => $rbs_data['dn'], - "RBSCN" => $rbscn, - "TFTP" => $tftpserver['hostname'], - "TFTPDN" => $tftpserver['dn'], - "TFTPIP" => $rbs_data['tftpserverip'], - "TFTPROOT" => $rbs_data['tftproot'], - "INITBOOTFILE" => $rbs_data['initbootfile'], - "TFTPKERNEL" => $rbs_data['tftpkernelpath'], - "TFTPPXE" => $rbs_data['tftppxepath'], - "TFTPCLIENTCONF" => $rbs_data['tftpclientconfpath'], - "NFS" => $nfsserver['hostname'], - "NFSDN" => $nfsserver['dn'], - "NFSIP" => $rbs_data['nfsserverip'], - "NFSPATH" => $rbs_data['exportpath'], - "NBD" => $nbdserver['hostname'], - "NBDDN" => $nbdserver['dn'], - "NBDIP" => $rbs_data['nbdserverip'], - "RBSOFFERNOWDN" => $rbs_data['rbsofferdn'], - "RBSOFFERNOW" => $rbsoffernow, - "MNR" => $mnr, - "SBMNR" => $sbmnr)); - -# RBS Offers -$template->define_dynamic("Rbsoffers", "Webseite"); -foreach ($rbsoffers as $offer){ - $template->assign(array("RBSOFFER" => $offer['dn'], - "RBSOFFEROU" => $offer['ou'],)); - $template->parse("RBSOFFERS_LIST", ".Rbsoffers"); -} - - -# Fileserver URIs -$template->define_dynamic("Fsuris", "Webseite"); -if ( count($rbs_data['fileserveruri']) > 1 ){ - foreach ($rbs_data['fileserveruri'] as $fsuri){ - $template->assign(array("FSURI" => $fsuri)); - $template->parse("FSURIS_LIST", ".Fsuris"); - } -}else{ - $template->assign(array("FSURI" => $rbs_data['fileserveruri'])); - $template->parse("FSURIS_LIST", ".Fsuris"); -} - -### Rechner -$hostorgroup = $exp[0]; -$hosts_array = get_hosts($auDN,array("dn","hostname","ipaddress")); - -$template->define_dynamic("TftpHosts", "Webseite"); -foreach ($hosts_array as $item){ - if ($item['ipaddress'] != "" && $item['hostname'] != $tftpserver['hostname']){ - $hostip = explode("_",$item['ipaddress']); - $template->assign(array("HDN" => $item['dn'], - "HN" => $item['hostname'], - "IP" => $hostip[0])); - $template->parse("TFTPHOSTS_LIST", ".TftpHosts"); - } -} - -################################################ -# PXE Generator Skript Config -$pxegen_ldap = LDAP_HOST; -$pxegen_base = "ou=RIPM,".$suffix; -$pxegen_udn = $userDN; -$pxegen_pw = $userPassword; -$pxegen_rbsdn = $rbsDN; -$template->assign(array("PXEGENLDAP" => $pxegen_ldap, - "PXEGENBASE" => $pxegen_base, - "PXEGENUDN" => $pxegen_udn, - "PXEGENPW" => $pxegen_pw, - "PXEGENRBS" => $pxegen_rbsdn)); - - -################################################################################### - -include("rbs_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/rbservice_add.php b/ldap-site-mngmt/webinterface/rbs/rbservice_add.php deleted file mode 100644 index 8c47a076..00000000 --- a/ldap-site-mngmt/webinterface/rbs/rbservice_add.php +++ /dev/null @@ -1,141 +0,0 @@ -<?php -include('../standard_header.inc.php'); -$syntax = new Syntaxcheck; - -$rbscn = $_POST['rbscn']; $rbscn = htmlentities($rbscn); - -$nodeDN = "cn=rbs,".$auDN; - -$rbsoffer = $_POST['rbsoffer']; - -$tftpserverip = $_POST['tftpserverip']; -$nfsserverip = $_POST['nfsserverip']; -$nbdserverip = $_POST['nbdserverip']; - -$tftpserver = $_POST['tftpserver']; -$nfsserver = $_POST['nfsserver']; -$nbdserver = $_POST['nbdserver']; - -$host_array = get_hosts($auDN,array("dn","hostname","ipaddress")); - -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - -# sosntige Attribute -$attribs = $_POST['attribs']; -if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - $atts[$key] = htmlentities($attribs[$key]); - } -} -#print_r($atts); echo "<br><br>"; - - -$get_rbscn = str_replace ( " ", "_", $rbscn ); -$seconds = 300; -$url = "new_rbservice.php?&mnr=1"; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $rbscn != "" && $rbscn != "Hier_RBS_NAME_eintragen" ){ - - $rbscn = "RBS_".$rbscn; - - # Formulareingaben anpassen - $exprbs = explode(" ",$rbscn); - foreach ($exprbs as $word){$expuc[] = ucfirst($word);} - $rbscn = implode(" ",$expuc); - $rbscn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $rbscn); - - $rbsDN = "cn=".$rbscn.",".$nodeDN; - print_r($rbsDN); echo "<br><br>"; - - # Server_array zusammenstellen - $server = array(); - # TFTP Server - if ($tftpserverip != ""){ - if ($syntax->check_ip_syntax($tftpserverip)){ - $tftpserverip = htmlentities($tftpserverip); - $mesg .= "Suche nach dem Rechner mit IP ".$tftpserverip." :<br>"; - foreach ($host_array as $host){ - $hostipexp = explode('_',$host['ipaddress']); - $hostip = $hostipexp[0]; - if ($tftpserverip == $hostip){ - $server ['tftp'] = $tftpserverip; - break; - }else{ - $mesg .= "Rechner ".$host['hostname'].": keine Übereinstimmung mit eingegebener IP ".$tftpserverip."!<br>"; - } - } - }else{$mesg .= "Falsche IP Syntax!<br>";} - } - # NFS Server - if ( $nfsserverip != "" ){ - if ($syntax->check_ip_syntax($nfsserverip)){ - $nfsserverip = htmlentities($nfsserverip); - $mesg .= "Suche nach dem Rechner mit IP ".$nfsserverip." :<br>"; - foreach ($host_array as $host){ - $hostipexp = explode('_',$host['ipaddress']); - $hostip = $hostipexp[0]; - if ($nfsserverip == $hostip){ - $server ['nfs'] = $nfsserverip; - break; - }else{ - $mesg .= "Rechner ".$host['hostname'].": keine Übereinstimmung mit eingegebener IP ".$nfsserverip."!<br>"; - } - } - }else{$mesg .= "Falsche IP Syntax!<br>";} - } - # NBD Server - if ( $nbdserverip != "" ){ - if ($syntax->check_ip_syntax($nbdserverip)){ - $nbdserverip = htmlentities($nbdserverip); - $mesg .= "Suche nach dem Rechner mit IP ".$nbdserverip." :<br>"; - foreach ($host_array as $host){ - $hostipexp = explode('_',$host['ipaddress']); - $hostip = $hostipexp[0]; - if ($nbdserverip == $hostip){ - $server ['nbd'] = $nbdserverip; - break; - }else{ - $mesg .= "Rechner ".$host['hostname'].": keine Übereinstimmung mit eingegebener IP ".$nbdserverip."!<br>"; - } - } - }else{$mesg .= "Falsche IP Syntax!<br>";} - } - echo "Server Array: ";print_r($server); echo "<br>"; - - if (add_rbs($rbsDN,$rbscn,$rbsoffer,$server,$atts)){ - $mesg .= "<br>Remote Boot Service erfolgreich angelegt<br>"; - $url = "rbservice.php?mnr=1"; - }else{ - $mesg .= "<br>Fehler beim anlegen des Remote Boot Services!<br>"; - } -} - -elseif ( $rbscn == "" || $rbscn == "Hier_RBS_NAME_eintragen" ){ - - $mesg = "Sie haben den Namen des neuen Remote Boot Service nicht angegeben. Dieser ist - aber ein notwendiges Attribut.<br> - Bitte geben Sie ihn an.<br><br>"; - $url = "new_rbservice.php?rbscn=Hier_RBS_NAME_eintragen&mnr=1"; -} - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/rbservice_change.php b/ldap-site-mngmt/webinterface/rbs/rbservice_change.php deleted file mode 100644 index b39478ba..00000000 --- a/ldap-site-mngmt/webinterface/rbs/rbservice_change.php +++ /dev/null @@ -1,394 +0,0 @@ -<?php -include('../standard_header.inc.php'); -$syntax = new Syntaxcheck; - -$rbscn = "RBS_".$_POST['rbscn']; -$oldrbscn = "RBS_".$_POST['oldrbscn']; -$rbsoffer = $_POST['rbsoffer']; -$oldrbsoffer = $_POST['oldrbsoffer']; - -$tftpserverip = $_POST['tftpserverip']; -$oldtftpserverip = $_POST['oldtftpserverip']; -#$nfsserverip = $_POST['nfsserverip']; -#$oldnfsserverip = $_POST['oldnfsserverip']; -#$nbdserverip = $_POST['nbdserverip']; -#$oldnbdserverip = $_POST['oldnbdserverip']; - -$tftpserver = $_POST['tftpserver']; -#$nfsserver = $_POST['nfsserver']; -#$nbdserver = $_POST['nbdserver']; -$oldtftpserverdn = $_POST['oldtftpserverdn']; -#$oldnfsserverdn = $_POST['oldnfsserverdn']; -#$oldnbdserverdn = $_POST['oldnbdserverdn']; - -$initbootfile = $_POST['initbootfile']; -$oldinitbootfile = $_POST['oldinitbootfile']; - -$delfsuri = $_POST['delfsuri']; -$addfsuri = $_POST['addfsuri']; -$fstype = $_POST['fstype']; -$fsip = $_POST['fsip']; -$fspath = $_POST['fspath']; - -$host_array = get_hosts($auDN,array("dn","hostname","ipaddress")); - -$rbsDN = $_POST['rbsdn']; -$nodeDN = "cn=rbs,".$auDN; - -$mnr = $_POST['mnr']; -$sbmnr = $_POST['sbmnr']; -$mcnr = $_POST['mcnr']; - -# sosntige Attribute -$attribs = $_POST['attribs']; -if (count($attribs) != 0){ - foreach (array_keys($attribs) as $key){ - $atts[$key] = htmlentities($attribs[$key]); - } -} -#print_r($atts); echo "<br><br>"; -$oldattribs = $_POST['oldattribs']; -if (count($oldattribs) != 0){ - foreach (array_keys($oldattribs) as $key){ - $oldatts[$key] = htmlentities($oldattribs[$key]); - } -} -#print_r($oldatts); echo "<br><br>"; - - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -############################################## -# RBS CN (DN) - -if ( $oldrbscn == $rbscn ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( $oldrbscn != "" && $rbscn != "" && $oldrbscn != $rbscn ){ - echo "RBS Name aendern<br>"; - # hier noch Syntaxcheck - # Formulareingaben anpassen - $exprbs = explode(" ",$rbscn); - foreach ($exprbs as $word){$expuc[] = ucfirst($word);} - $rbscn = implode(" ",$expuc); - $rbscn = preg_replace ( '/\s+([0-9A-Z])/', '$1', $rbscn); - - $newrbsDN = "cn=".$rbscn.",".$nodeDN; - print_r($newrbsDN); echo "<br><br>"; - - if(move_subtree($rbsDN, $newrbsDN)){ - adjust_rbs_dn($newrbsDN, $rbsDN); - $rbsDN = $newrbsDN; - $mesg = "RBS Name erfolgreich geändert<br><br>"; - }else{ - $mesg = "Fehler beim ändern des RBS Namen!<br><br>"; - } -} - -if ( $oldrbscn != "" && $rbscn == "" ){ - echo "Gruppenname loeschen!<br> - Dieses ist Teil des DN, Sie werden den RBS komplett löschen<br><br>"; - echo "Wollen Sie den RBS Dienst <b>".$oldrbscn."</b> wirklich löschen?<br><br> - <form action='rbservice_delete.php' method='post'> - Falls ja:<br><br> - <input type='hidden' name='dn' value='".$pxeDN."'> - <input type='hidden' name='name' value='".$oldrbscn."'> - <input type='Submit' name='apply' value='löschen' class='small_loginform_button'><br><br> - </form> - <form action='".$url."' method='post'> - Falls, nein:<br><br> - <input type='Submit' name='apply' value='zurück' class='small_loginform_button'> - </form>"; - $seconds = 600; -} - - -##################################### -# Offer ändern - -if ( $rbsoffer != "none" && $rbsoffer == $oldrbsoffer ){ - $mesg = "Sie haben die gleiche Abteilung ausgewählt<br> - Keine Änderung!"; -} - -if ( $rbsoffer != "none" && $rbsoffer != $oldrbsoffer ){ - $entryoffer ['rbsofferdn'] = $rbsoffer; - if(ldap_mod_replace($ds,$rbsDN,$entryoffer)){ - $mesg = "RBS Offer erfolgreich geändert<br><br>"; - } - else{ - $mesg = "Fehler beim ändern des RBS Offers!<br><br>"; - } -} - -/*if ( $rbsoffer == "off" && $olddhcpoffer != "" ){ - $entryoffer ['dhcpofferdn'] = array(); - if(ldap_mod_del($ds,$dhcpDN,$entryoffer)){ - $mesg = "DHCP Service Offer erfolgreich geändert<br><br>"; - } - else{ - $mesg = "Fehler beim ändern des DHCP Service Offers!<br><br>"; - } -}*/ - - -##################################### -# TFTP Server ändern - -# über IP Feld -/*if ( $tftpserverip == $oldtftpserverip ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( $tftpserverip != "" && $oldtftpserverip == "" ){ - if ($syntax->check_ip_syntax($tftpserverip)){ - $tftpserverip = htmlentities($tftpserverip); - - $mesg .= "Suche nach dem Rechner mit IP ".$tftpserverip." :<br>"; - foreach ($host_array as $host){ - $hostipexp = explode('_',$host['ipaddress']); - $hostip = $hostipexp[0]; - if ($tftpserverip == $hostip){ - $entrytftp ['tftpserverip'] = $tftpserverip; - if (ldap_mod_add($ds,$rbsDN,$entrytftp)){ - adjust_dhcpnextserver($tftpserverip, $rbsDN); - $mesg .= "Treffer: Rechner ".$host['hostname']."<br>TFTP Server erfolgreich eingetragen<br>"; - }else{ - $mesg .= "Fehler beim Eintragen des TFTP Servers!<br>"; - } - break; - }else{ - $mesg .= "Rechner ".$host['hostname'].": keine Übereinstimmung mit eingegebener IP ".$tftpserverip."!<br>"; - } - } - } - else{ - $mesg .= "Falsche IP Syntax!<br>"; - } -} - -if ( $tftpserverip != "" && $tftpserverip != $oldtftpserverip ){ - - if ($syntax->check_ip_syntax($tftpserverip)){ - $tftpserverip = htmlentities($tftpserverip); - - $mesg .= "Suche nach dem Rechner mit IP ".$tftpserverip." :<br>"; - foreach ($host_array as $host){ - $hostipexp = explode('_',$host['ipaddress']); - $hostip = $hostipexp[0]; - if ($tftpserverip == $hostip){ - $entrytftp ['tftpserverip'] = $tftpserverip; - if (ldap_mod_replace($ds,$rbsDN,$entrytftp)){ - adjust_dhcpnextserver($tftpserverip, $rbsDN); - $mesg .= "Treffer: Rechner ".$host['hostname']."<br>TFTP Server erfolgreich geändert<br>"; - }else{ - $mesg .= "Fehler beim ändern des TFTP Servers!<br>"; - } - break; - }else{ - $mesg .= "Rechner ".$host['hostname'].": keine Übereinstimmung mit eingegebener IP ".$tftpserverip."!<br>"; - } - } - } - else{ - $mesg .= "Falsche IP Syntax!<br>"; - } -} - -if ( $tftpserverip == "" && $oldtftpserverip != "" ){ - $entrytftp ['tftpserverip'] = array(); - if (ldap_mod_del($ds,$rbsDN,$entrytftp)){ - adjust_dhcpnextserver($tftpserverip, $rbsDN); - $mesg .= "Treffer: Rechner ".$host['hostname']."<br>TFTP Server erfolgreich gelöscht<br>"; - }else{ - $mesg .= "Fehler beim löschen des TFTP Servers!<br>"; - } -}*/ - -#über Selectbox an verfügbaren alternativen Rechnern mit IPs -if ($tftpserver != "none" && $tftpserver != $oldtftpserverdn){ - $host = get_host_ip($tftpserver); - $hostipexp = explode('_',$host['ipaddress']); - $entrytftp ['tftpserverip'] = $hostipexp[0]; - if (ldap_mod_replace($ds,$rbsDN,$entrytftp)){ - adjust_dhcpnextserver($hostipexp[0], $rbsDN); - $mesg .= "TFTP Server erfolgreich geändert<br>"; - }else{ - $mesg .= "Fehler beim ändern des TFTP Servers!<br>"; - } -} - - -##################################### -# Init Boot File - -if ( $initbootfile == $oldinitbootfile ){ - # $mesg = "keine Aenderung<br>"; -} - -if ( $initbootfile != "" && $oldinitbootfile == "" ){ - $entrydelibf ['initbootfile'] = $initbootfile; - if(ldap_mod_add($ds,$rbsDN,$entrydelibf)){ - adjust_dhcpfilename($initbootfile, $rbsDN, "add"); - $mesg = "Initial Boot File erfolgreich eingetragen<br><br>"; - } - else{ - $mesg = "Fehler beim eintragen von Initial Boot File!<br><br>"; - } -} - -if ( $initbootfile == "" && $oldinitbootfile != "" ){ - $entrydelibf ['initbootfile'] = array(); - if(ldap_mod_del($ds,$rbsDN,$entrydelibf)){ - adjust_dhcpfilename($initbootfile, $rbsDN, "delete"); - $mesg = "Initial Boot File erfolgreich gelöscht<br><br>"; - } - else{ - $mesg = "Fehler beim löschen von Initial Boot File!<br><br>"; - } -} - -if ( $initbootfile != "" && $initbootfile != $oldinitbootfile ){ - $entryibf ['initbootfile'] = $initbootfile; - if(ldap_mod_replace($ds,$rbsDN,$entryibf)){ - adjust_dhcpfilename($initbootfile, $rbsDN, "replace"); - $mesg = "Initial Boot File erfolgreich geändert<br><br>"; - } - else{ - $mesg = "Fehler beim ändern des Initial Boot Files!<br><br>"; - } -} - - -####################################### -# Fileserver URI anlegen - -if ( $addfsuri[1] != "" ){ - # tests: ipsyntax, und spezifische URI-Syntax-Checks... - if( $syntax->check_ip_syntax($addfsuri[1]) ){ - - $newfsuri = $addfsuri[0]."://".$addfsuri[1].$addfsuri[2]; - echo "FS URI <b>".$newfsuri."</b> anlegen<br>"; - - $entryfsadd ['fileserveruri'] = $newfsuri; - if(ldap_mod_add($ds,$rbsDN,$entryfsadd)){ - $mesg = "FS URI erfolgreich eingetragen<br><br>"; - }else{ - $mesg = "Fehler beim eintragen der FS URI<br><br>"; - } - } - else{echo "Falsche IP Syntax<br><br>";} -} - -##################################### -# Fileserver URIs löschen - -if ( count($delfsuri) != 0 ){ - echo "Fileserver URI löschen<br>"; - - $i = 0; - foreach ($delfsuri as $fsuri){ - $entry['fileserveruri'][$i] = $fsuri; - $i++; - } - #print_r($entry); echo "<br><br>"; - - if ($result = ldap_mod_del($ds,$rbsDN,$entry)){ - $mesg = "Zu löschende Fileserver URIs erfolgreich gelöscht<br><br>"; - }else{ - $mesg = "Fehler beim löschen der Fileserver URIs<br><br>"; - } -} - - -##################################### -# Restliche Attribute - -$entryadd = array(); -$entrymod = array(); -$entrydel = array(); - -foreach (array_keys($atts) as $key){ - - if ( $oldatts[$key] == $atts[$key] ){ - - } - if ( $oldatts[$key] == "" && $atts[$key] != "" ){ - # hier noch Syntaxcheck - $entryadd[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] != "" && $oldatts[$key] != $atts[$key] ){ - # hier noch Syntaxcheck - $entrymod[$key] = $atts[$key]; - } - if ( $oldatts[$key] != "" && $atts[$key] == "" ){ - # hier noch Syntaxcheck - $entrydel[$key] = $oldatts[$key]; - } -} - -#print_r($entryadd); echo "<br>"; -#print_r($entrymod); echo "<br>"; -#print_r($entrydel); echo "<br>"; - - -if (count($entryadd) != 0 ){ - #print_r($entryadd); echo "<br>"; - #echo "neu anlegen<br>"; - foreach (array_keys($entryadd) as $key){ - $addatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_add($ds,$rbsDN,$entryadd)){ - $mesg = "Attribute ".$addatts." erfolgreich eingetragen<br><br>"; - }else{ - $mesg = "Fehler beim eintragen der Attribute ".$addatts."<br><br>"; - } -} - -if (count($entrymod) != 0 ){ - #print_r($entrymod); echo "<br>"; - #echo "ändern<br>"; - foreach (array_keys($entrymod) as $key){ - $modatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_replace($ds,$rbsDN,$entrymod)){ - $mesg = "Attribute ".$modatts." erfolgreich geaendert<br><br>"; - }else{ - $mesg = "Fehler beim aendern der Attribute ".$modatts."<br><br>"; - } -} - -if (count($entrydel) != 0 ){ - #print_r($entrydel); echo "<br>"; - #echo "löschen<br>"; - foreach (array_keys($entrydel) as $key){ - $delatts .= "<b>".$key."</b>,"; - } - if(ldap_mod_del($ds,$rbsDN,$entrydel)){ - $mesg = "Attribute ".$delatts." erfolgreich geloescht<br><br>"; - }else{ - $mesg = "Fehler beim loeschen der Attribute ".$delatts."<br><br>"; - } -} - - -$url = "rbservice.php?rbsdn=".$rbsDN."&mnr=".$mnr; -$seconds = 2; - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/rbs/rbservice_delete.php b/ldap-site-mngmt/webinterface/rbs/rbservice_delete.php deleted file mode 100644 index 919987bd..00000000 --- a/ldap-site-mngmt/webinterface/rbs/rbservice_delete.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -$rbsDN = $_POST['dn']; -$rbscn = $_POST['name']; - -$seconds = 100; -$url = 'rbs.php'; - -echo " -<html> -<head> - <title>Computers Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if ( $rbsDN != ""){ - - if ( dive_into_tree_del($rbsDN,"") ){ - clean_up_del_rbs($rbsDN); - $mesg = "Remote Boot Service <b>".$rbscn."</b> erfolgreich gelöscht!<br><br>"; - } - else{ - $mesg = "Fehler beim löschen des Remote Boot Services <b>".$rbscn."</b> !<br><br>"; - } - -} - - - - -$mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href=".$url." style='publink'>back</a>"; -redirect($seconds, $url, $mesg, $addSessionId = TRUE); - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/roles/menu.dwt b/ldap-site-mngmt/webinterface/roles/menu.dwt deleted file mode 100644 index 9aadc1c5..00000000 --- a/ldap-site-mngmt/webinterface/roles/menu.dwt +++ /dev/null @@ -1,22 +0,0 @@ - -<table cellpadding='5' cellspacing='0' border='0' width='100%'> - - - - <!-- BEGIN DYNAMIC BLOCK: Hauptmenu --> - - <tr valign='middle' align='left'>
-
- <td width='8%' align='right' style="border-style=none;"> </td> - <td width="8%" align="left" style="border-width:1 0 1 1;border-color:#000000;border-style:solid;padding:5;background-color:{FARBE}"> </td>
- <td width="74%" align="left" style="border-width:1 1 1 0;border-color:#000000;border-style:solid;padding:5;background-color:{FARBE}"> - <a href="{LINK_M}" style="text-decoration:none"><b class="standard_schrift">{TEXT_M}</b></a></td>
- <td width='10%'> </td> - - </tr> - <tr height='5'></tr> - <!-- END DYNAMIC BLOCK: Hauptmenu -->
- - - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/roles/role_add.php b/ldap-site-mngmt/webinterface/roles/role_add.php deleted file mode 100644 index f4b80506..00000000 --- a/ldap-site-mngmt/webinterface/roles/role_add.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - - -$adduser = $_POST['adduser']; -$role = $_POST['role']; -$menr = $_POST['menr']; - -$exp = explode('_',$adduser); -$adduserDN = $exp[0]; -$adduserUID = $exp[1]; - -echo " -<html> -<head> - <title>Roles Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -# print_r($adduser);echo "<br>"; -# print_r($adduserDN);echo "<br>"; -# print_r($adduserUID);echo "<br>"; -# print_r($role);echo "<br>"; -# print_r($menr);echo "<br><br>"; - -$url = 'role_show.php?role='.$role.'&sbmnr='.$menr; - -if ($adduser != 'none'){ - $res = new_role_member($adduserDN,$role,$auDN,$domDN); - if ($res == 1){ - $mesg = "Der Benutzer <b>".$adduserUID."</b> wurde erfolgreich als neuer <b>".$role."</b> aufgenommen.<br><br>"; - }else{ - $mesg = "Fehler! Der Benutzer <b>".$adduserUID."</b> konnte nicht aufgenommen werden<br><br>"; - } - $mesg .= "Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='role_show.php?role=$role&sbmnr=$menr' style='publink'>back</a>"; - redirect(3, $url, $mesg, $addSessionId = TRUE); -} - -else { - $mesg = "Sie haben keinen Benutzer ausgewählt<br><br> - Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='role_show.php?role=$role&sbmnr=$menr' style='publink'>back</a>"; - redirect(3, $url, $mesg, $addSessionId = TRUE); -} - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/roles/role_delete.php b/ldap-site-mngmt/webinterface/roles/role_delete.php deleted file mode 100644 index 7a585331..00000000 --- a/ldap-site-mngmt/webinterface/roles/role_delete.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php - -include('../standard_header.inc.php'); - - -$deluser = $_POST['deluser']; -$role = $_POST['role']; -$menr = $_POST['menr']; - -echo " -<html> -<head> - <title>Roles Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> -</head> -<body> -<table border='0' cellpadding='30' cellspacing='0'> -<tr><td>"; - -if (isset($_POST['deluser'])){ - - # print_r($deluser);echo "<br>"; - # print_r($role);echo "<br>"; - # print_r($menr);echo "<br>"; - - $url = 'role_show.php?role='.$role.'&sbmnr='.$menr; - $mesg = ""; - - foreach ($deluser as $item){ - $exp = explode('_',$item); - $deluserDN = $exp[0]; - $deluserUID = $exp[1]; - # print_r($deluserDN);echo "<br>"; - # print_r($deluserUID);echo "<br>"; - $res = delete_role_member($deluserDN,$role,$auDN,$domDN); - if ($res == 1){ - $mesg .= "Der Benutzer <b>".$deluserUID."</b> wurde erfolgreich aus der Rolle <b>".$role."</b> entfernt.<br>"; - }else{ - $mesg .= "<br><b>Fehler!</b> Der Benutzer <b>".$deluserUID."</b> konnte nicht entfernt werden<br>"; - } - } - $mesg .= "<br>Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='role_show.php?role=$role&sbmnr=$menr' style='publink'>back</a><br><br>"; - redirect(3, $url, $mesg, $addSessionId = TRUE); - -} - -else { - $mesg .= "<br>Sie haben keinen Benutzer ausgewählt<br><br> - Sie werden automatisch auf die vorherige Seite zurückgeleitet. <br> - Falls nicht, klicken Sie hier <a href='role_show.php?role=$role&sbmnr=$menr' style='publink'>back</a>"; - redirect(3, $url, $mesg, $addSessionId = TRUE); -} - -echo "</td></tr></table></body> -</html>"; -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/roles/role_show.dwt b/ldap-site-mngmt/webinterface/roles/role_show.dwt deleted file mode 100644 index 3eb05b79..00000000 --- a/ldap-site-mngmt/webinterface/roles/role_show.dwt +++ /dev/null @@ -1,70 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='100%'> - <tr> - <td colspan='2'><h3>{ROLE_DESC}</h3></td></tr><tr><td height='20'></td> - </tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr> - <td width='5%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'> </td> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Benutzer</b></td> - <td width='25%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>UID</b></td> - <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'><b>Email</b></td> - </tr> - - <form action='role_delete.php' method='post'> - - <!-- BEGIN DYNAMIC BLOCK: Members --> - <tr> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - <input type='checkbox' name='deluser[]' value='{VALUE}_{UID}' size='15' class='medium_form_checkbox'></td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{USERNAME} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>{UID} </td> - <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'><a href'mailto:{MAIL}' style='publink'>{MAIL}</a> </td> - </tr> - <!-- END DYNAMIC BLOCK: Members --> - <input type='hidden' name='role' value='{ROLE}'> - <input type='hidden' name='menr' value='{MENR}'> - - - <tr> - <td colspan='3' style='border-width: 0 0 0 0;'><input type='Submit' name='delete' value='entfernen' class='small_loginform_button'></td> - - </form> - </tr> - </table></td> - </tr> - - <tr height='30'></tr> - <tr> - <td colspan='2'><h4>Neuen Administrator anlegen:</h4></td> - </tr> - <tr><td height='10'></td></tr> - <tr><td> - <table cellpadding='7' cellspacing='0' border='1' align='left' width='90%' style='border-width: 0 0 0 0;'> - <tr> - - <form action='role_add.php' method='post'> - - <td width='60%' style='border-color: black; border-style: solid; border-width: 3 0 1 0;'> - Wählen Sie einen Benutzer aus <br> - <select name='adduser' size='1' class='medium_form_selectbox'> - <option selected value='none'>----------</option> - - <!-- BEGIN DYNAMIC BLOCK: Users --> - <option value='{UDN}_{USER}'>{USER}</option> - <!-- END DYNAMIC BLOCK: Users --> - - </select> - <input type='hidden' name='role' value='{ROLE}'> - <input type='hidden' name='menr' value='{MENR}'> - </td> - </tr> - <tr> - <td style='border-width: 0 0 0 0;'><input type='Submit' name='add' value='anlegen' class='small_loginform_button'></td> - - </form> - </tr> - </table></td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/roles/role_show.php b/ldap-site-mngmt/webinterface/roles/role_show.php deleted file mode 100644 index c60b7fb2..00000000 --- a/ldap-site-mngmt/webinterface/roles/role_show.php +++ /dev/null @@ -1,123 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt. -$titel = "Roles Management"; -# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc. -$mainnr = 1; -$mnr = 1; -# 3. Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "role_show.dwt"; -$role = "MainAdmin"; - -include("../class.FastTemplate.php"); - -#include("roles_header.inc.php"); -include("au_header.inc.php"); - -############################################################################### - -#$mnr = $_GET['mnr']; -$mnr = 3; - -$sbmnr = $_GET['sbmnr']; - -# Menuleiste erstellen -createMainMenu($rollen, $mainnr); -createAUMenu($rollen, $mnr, $auDN, $sbmnr); - -#################################### -# Admins anzeigen und loeschen - -$role = $_GET['role']; -$roles_array = get_roles($auDN); -# print_r($roles_array); - -# jeder Rolle entsprechend Members holen und Überschrift setzen -switch ($role){ -case 'MainAdmin': - $template->assign(array("ROLE" => "MainAdmin","ROLE_DESC" => "Haupt Administratoren","MENR" => $sbmnr)); - $members = $roles_array['MainAdmin']; - break; -case 'HostAdmin': - $template->assign(array("ROLE" => "HostAdmin","ROLE_DESC" => "Administratoren - Rechner, Rechnergruppen, Remote Boot Services (PXE)","MENR" => $sbmnr)); - $members = $roles_array['HostAdmin']; - break; -case 'DhcpAdmin': - $template->assign(array("ROLE" => "DhcpAdmin","ROLE_DESC" => "Administratoren - DHCP","MENR" => $sbmnr)); - $members = $roles_array['DhcpAdmin']; - break; -case 'RbsAdmin': - $template->assign(array("ROLE" => "RbsAdmin","ROLE_DESC" => "Administratoren - Remote Boot Services","MENR" => $sbmnr)); - $members = $roles_array['RbsAdmin']; - break; -case 'ZoneAdmin': - $template->assign(array("ROLE" => "ZoneAdmin","ROLE_DESC" => "Administratoren - DNS Zone [ {DOM} ]","MENR" => $sbmnr)); - $members = $roles_array['ZoneAdmin']; - break; -} - -# print_r($members); echo "<br><br>"; - -# für jedes Member Daten holen (Benutzername, UID) -if ( count($members) != 0 ){ - $members_data = array(); - foreach ($members as $item){ - $members_data[] = get_user_data($item,array("dn","cn","uid","mail")); - # print_r(get_user_data($item,array("dn","cn","uid"))); echo "<br>"; - } -} -# echo "<br>"; -# print_r($members_data); echo "<br><br>"; - -if (count($members_data) != 0){ - $template->define_dynamic("Members", "Webseite"); - foreach ($members_data as $item){ - $template->assign(array("VALUE" => $item['dn'], - "USERNAME" => $item['cn'], - "UID" => $item['uid'], - "MAIL" => $item['mail'])); - $template->parse("MEMBERS_LIST", ".Members"); - } -}else{ - $template->assign(array("VALUE" => "","USERNAME" => "","UID" => "","MAIL" => "")); -} - - -############################################## -# Admin anlegen ... -$users_array = get_users(); -# print_r($users_array); echo "<br><br>"; - -if (count($members_data) != 0){ -for ($i=0; $i < count($users_array); $i++){ - foreach ($members_data as $item){ - if ($users_array[$i]['uid'] == $item['uid']){ - array_splice($users_array, $i, 1); - # break; - } - } -} -# print_r($users_array); echo "<br><br>"; -} - -# if (count($users_array) != 0){ - $template->define_dynamic("Users", "Webseite"); - foreach ($users_array as $item){ - $template->assign(array("UDN" => $item['dn'], - "USER" => $item['uid'])); - $template->parse("USERS_LIST", ".Users"); - } -#}else{ -# $template->assign(array("UDN" => "","USER" => "")); -# } - - - - - -############################################################################### - -include("au_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/roles/roles.dwt b/ldap-site-mngmt/webinterface/roles/roles.dwt deleted file mode 100644 index 48e8fe14..00000000 --- a/ldap-site-mngmt/webinterface/roles/roles.dwt +++ /dev/null @@ -1,79 +0,0 @@ -<html> - -<head> - <title>{SEITENTITEL}</title> - <link rel='stylesheet' href='../styles.css' type='text/css'></head> -<body> - -<table cellpadding='0' cellspacing='0' border='0' width='95%' height='8%'> - <tr> - <td width='35%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr valign='top'> - <td width='1'></td> - <td><h2>Client / IP Management</h2></td> - </tr> - </table> - </td> - - <td width='40%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr valign='top' align='left'> - <td> - <h4><a href='../start.php' class='headerlink'>Startseite</a> - >> <a href='../au/au.php' class='headerlink'>{AU}</a> [ {DOMAIN} ]</h4> - </td> - </tr> - </table> - </td> - <td width='25%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%' align='right'> - <tr valign='top' align='right'> - <td> - {LOGIN} - </td> - </tr> - </table> - </td> - </tr> -</table> -<table cellpadding='5' cellspacing='0' border='0' width='95%' height='7%'> -<tr> - <td>{MAINMENU}</td> -</tr> -</table> - - -<hr align='center' width='98%' noshade> - - - -<table cellpadding='5' cellspacing='0' border='0' width='100%' height='85%'> - - <tr valign='top' height='100%'> - <td width='28%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr><td> - - {NAVIGATION} - - </td></tr> - </table> - </td> - - <td width='72%'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr><td> - - {HAUPTFENSTER} - - </td></tr> - </table> - </td> - - </tr> -</table> - -</body> - -</html> diff --git a/ldap-site-mngmt/webinterface/roles/roles.php b/ldap-site-mngmt/webinterface/roles/roles.php deleted file mode 100644 index 8d418add..00000000 --- a/ldap-site-mngmt/webinterface/roles/roles.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php -include('../standard_header.inc.php'); - -# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt. -$titel = "Roles Management"; -# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc. -$mainnr = 1; -$mnr = 0; -# 3. Dateiname und evtl. Pfad des Templates für die Webseite -$webseite = "roles_start.dwt"; - -include("../class.FastTemplate.php"); - -#include("roles_header.inc.php"); -include("au_header.inc.php"); - -################################################################################### - -$mnr = 3; -$sbmnr = -1; - -# Menuleiste erstellen -createMainMenu($rollen, $mainnr); -createAUMenu($rollen, $mnr, $auDN, $sbmnr); - -################################################################################### - -include("au_footer.inc.php"); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/roles/roles_footer.inc.php b/ldap-site-mngmt/webinterface/roles/roles_footer.inc.php deleted file mode 100644 index 311721c5..00000000 --- a/ldap-site-mngmt/webinterface/roles/roles_footer.inc.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -$template->assign(array("PFAD" => $START_PATH)); - -# Daten in die Vorlage parsen -$template->parse("LOGIN", "Login"); -$template->parse("MAINMENU", "Mmenu"); -$template->parse("NAVIGATION", "Menu"); -$template->parse("HAUPTFENSTER", "Webseite"); -$template->parse("PAGE", "Vorlage"); - -# Fertige Seite an den Browser senden -$template->FastPrint("PAGE"); - -# Abmelden vom LDAP -ldap_unbind($ds); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/roles/roles_header.inc.php b/ldap-site-mngmt/webinterface/roles/roles_header.inc.php deleted file mode 100644 index 74c96f74..00000000 --- a/ldap-site-mngmt/webinterface/roles/roles_header.inc.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php -include("roles_menu.php"); - -$template = new FastTemplate("."); -# dem erstellten Template-Objekt eine Vorlage zuweisen -$definedTemplates = array("Vorlage" => "roles.dwt", - "Login" => "../logout_form.inc.dwt", - "Mmenu" => "../hauptmenue.dwt", - "Menu" => "menu.dwt", - "Webseite" => $webseite); -if (isset($additionalTemplates)) { - foreach ($additionalTemplates as $templateKey => $templateFile) { - $definedTemplates[$templateKey] = $templateFile; - } -} -$template->define($definedTemplates); -$template->assign(array("SEITENTITEL" => $titel, "AU" => $au_ou, "DOMAIN" => $assocdom, "USERCN" => $usercn)); - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/roles/roles_menu.php b/ldap-site-mngmt/webinterface/roles/roles_menu.php deleted file mode 100644 index 246601e8..00000000 --- a/ldap-site-mngmt/webinterface/roles/roles_menu.php +++ /dev/null @@ -1,95 +0,0 @@ -<?php - - -function createRolesMenu($rollen , $mnr, $assocdom) { - global $template; - global $START_PATH; - # Struktur der Registerkartenleiste - if ($assocdom != ""){ - $hauptmenu = array(array("link" => "roles.php", - "text" => "Übersicht", - "zugriff" => array("MainAdmin","DhcpAdmin")), - array("link" => "role_show.php?role=MainAdmin&mnr=1", - "text" => "Main Admins", - "zugriff" => array("MainAdmin")), - array("link" => "role_show.php?role=DhcpAdmin&mnr=2", - "text" => "DHCP Admins", - "zugriff" => array("MainAdmin")), - array("link" => "role_show.php?role=HostAdmin&mnr=3", - "text" => "Host Admins", - "zugriff" => array("MainAdmin","DhcpAdmin")), - array("link" => "role_show.php?role=RbsAdmin&mnr=4", - "text" => "RBS Admins", - "zugriff" => array("MainAdmin","DhcpAdmin")), - #array("link" => "role_show.php?role=ZoneAdmin&mnr=4", - # "text" => "DNS Admins", - # "zugriff" => array("MainAdmin")) - ); - }else{ - $hauptmenu = array(array("link" => "roles.php", - "text" => "Übersicht", - "zugriff" => array("MainAdmin","DhcpAdmin")), - array("link" => "role_show.php?role=MainAdmin&mnr=1", - "text" => "Main Admins", - "zugriff" => array("MainAdmin")), - array("link" => "role_show.php?role=DhcpAdmin&mnr=2", - "text" => "DHCP Admins", - "zugriff" => array("MainAdmin")), - array("link" => "role_show.php?role=HostAdmin&mnr=3", - "text" => "Host Admins", - "zugriff" => array("MainAdmin","DhcpAdmin")), - array("link" => "role_show.php?role=RbsAdmin&mnr=4", - "text" => "RBS Admins", - "zugriff" => array("MainAdmin","DhcpAdmin")) - ); - } - # $rollen = array_keys($roles); - - # Zusammenstellen der Menuleiste - $template->define_dynamic("Hauptmenu", "Menu"); - $i=0; - foreach($hauptmenu as $item) { - if($item['zugriff'] === "alle" || vergleicheArrays($rollen , $item['zugriff'])) { - if ($i==0) { - if ($mnr==0) { - $zwisch=""; - $lastaktive=true; - $farb="#505050"; - } - else { - $zwisch=""; - $farb="#A0A0A0"; - $lastaktive=false; - } - } - else { - if ($mnr==$i) { - $zwisch=""; - $lastaktive=true; - $farb="#505050"; - } - else { - $farb="#A0A0A0"; - if ($lastaktive) {$zwisch="";} - else {$zwisch="";} - $lastaktive=false; - } - } - $template->assign(array("ZWISCHEN" => $zwisch, - "FARBE" => $farb, - "LINK_M" => $item["link"], - "TEXT_M" => $item["text"])); - $template->parse("HAUPTMENU_LIST", ".Hauptmenu"); - - } - $i=$i+1; - } - if ($lastaktive) {$template->assign(array("ENDE" => ""));} - else { - $template->assign(array("ENDE" => "")); - } - -} - - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/roles/roles_start.dwt b/ldap-site-mngmt/webinterface/roles/roles_start.dwt deleted file mode 100644 index 665bed3f..00000000 --- a/ldap-site-mngmt/webinterface/roles/roles_start.dwt +++ /dev/null @@ -1,37 +0,0 @@ -<table border='0' cellpadding='5' cellspacing='0' width='90%'> - <tr> - <td colspan='2'><h3>Modul - Administratoren Rollen Management: </h3></td> - </tr> - <tr> - <td height='10'></td> - </tr> - <tr> - <td> - <p>Dieses Modul dient der Verwaltung von Administratoren Rollen in ihrer Abteilung. - Benutzen Sie die Navigation links, um die Verwaltungsbereiche der einzelnen Rollen anzusteuern. - Dort koennen Sie dann Benutzer den Rollen zuweisen oder wieder entziehen.</p> - <p>Folgende administrative Rollen stehen zur Verfuegung:</p> - <ul> - <li><p><b>Main Admins</b></p> - Hauptadministratoren, der AU mit uneingeschraenkten Rechten. Sie verwalten: u.a. - untergeordnete AUs (anlegen/loeschen/im DNS anmelden), - Rollen, IP Adressen und deren Delegierung, Rechner (Gruppen), deren Hardware-Profile und - PXE Boot Konfigurationen, sowie die Dienste DHCP und DNS. - </li> - <!-- <li><p><b>Host Admins</b></p> - Diese verwalten Rechner (Gruppen), deren Hardware-Profile und PXE Boot Konfigurationen, - und koennen diese im DHCP und DNS anmelden (verwalten im DNS nur deren Namenseintraege). - </li> - <li><p><b>DHCP Admins</b></p> - Verwalten den DHCP Dienst, d.h. Subnetz-, Pool-, Class-Objekte. - </li> - <li><p><b>DNS Admins</b></p> - Sind die Administratoren der mit der AU assozierten DNS Zone. D.h. sie verwalten SOA, - Include Direktiven untergeordneter Include Files, sowie alle Nameneintraege der Zone. - </li> --> - </ul> - - </td> - </tr> - -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/standard_footer.inc.php b/ldap-site-mngmt/webinterface/standard_footer.inc.php deleted file mode 100644 index afaf5a35..00000000 --- a/ldap-site-mngmt/webinterface/standard_footer.inc.php +++ /dev/null @@ -1,19 +0,0 @@ -<? - -echo " -</td> - <td width='2%'></td> - </tr> -</table> - -</body> - -</html> -"; - -echo "<br /><b>php_errormsg:</b> $php_errormsg"; -#$_SESSION['error'] .= $php_errormsg; - -#echo "Errors:<br>$_SESSION['error']"; - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/standard_header.inc.php b/ldap-site-mngmt/webinterface/standard_header.inc.php deleted file mode 100644 index 21483eee..00000000 --- a/ldap-site-mngmt/webinterface/standard_header.inc.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php -session_cache_expire(30); -session_start(); - - -include('lib/config.inc.php'); -include('lib/ldap.inc.php'); -include('lib/ldap2.inc.php'); -include('lib/commonlib.inc.php'); -include('syntax_check.php'); -include('lib/au_management_functions.php'); -include('lib/ip_management_functions.php'); -include('lib/host_management_functions.php'); -include('lib/dhcp_management_functions.php'); -include('lib/rbs_management_functions.php'); -include("class.FastTemplate.php"); - -//print_r($_SESSION['status']); -if ( !isset($_SESSION['status']) ){ - redirect(0,"../index.php","",$addSessionId = FALSE); - exit; -} -if ( $_SESSION['status'] != "in" ){ - //$_SESSION['status'] != "out"; - redirect(0,"../index.php","",$addSessionId = FALSE); - exit; -} - - // Fehlerausgabe im Browser anschalten -ini_set('display_errors', 0); -// nur Laufzeitfehler ausgeben -error_reporting(E_ALL ^ E_NOTICE | E_STRICT); - -$uid = $_SESSION['uid']; -$userPassword = $_SESSION['userPassword']; -$userDN = $_SESSION['dn']; -$usercn = $_SESSION['cn']; -$auDN = $_SESSION['audn']; -#echo "auDN: "; print_r($auDN); echo "<br>"; -$rollen = $_SESSION['rollen']; -#echo "rollen: "; print_r($rollen); echo "<br>"; - - -if (!($ds = uniLdapConnect($uid,$userPassword))){ - echo "<html> - <head> - <title>Zentrales Rechner / IP Management</title> - <link rel='stylesheet' href='../styles.css' type='text/css'> - </head> - <body> - <table border='0' cellpadding='30' cellspacing='0'> - <tr valign='middle'><td align='center'> - <h3>Es konnte keine Verbindung zum LDAP Server hergestellt werden!</h3> - </td></tr></table></body> - </html> - "; - die; -} - -if ($auDN != ""){ - - # AU Daten holen - $attributes = array("ou","associateddomain","maxipblock","freeipblock","cn","description"); - $au_data = get_au_data($auDN,$attributes); - $assocdom = $au_data[0]['associateddomain']; - $au_ou = $au_data[0]['ou']; - $au_cn = $au_data[0]['cn']; - $au_desc = $au_data[0]['description']; - $au_mipb = $au_data[0]['maxipblock']; - $au_fipb = $au_data[0]['freeipblock']; - - # AU Domain Daten holen - $domain_data = get_domain_data($auDN,array("dn")); - - $expAuDn = explode(",",$auDN); - if ($expAuDn[1] == "ou=RIPM"){ - $domDN = "ou=DNS,".$suffix; - } - else{$domDN = $domain_data[0]['dn']; } - - $domprefix = str_replace('.'.$domsuffix,'',$assocdom); - # print_r($domprefix); - -} - -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/start.dwt b/ldap-site-mngmt/webinterface/start.dwt deleted file mode 100644 index 526d8ce4..00000000 --- a/ldap-site-mngmt/webinterface/start.dwt +++ /dev/null @@ -1,57 +0,0 @@ - -<br><br> -<hr align='center' size='3' width='98%' noshade> - -<table cellpadding='5' cellspacing='0' border='0' width='100%' height='30%'> - - <tr valign='middle' height='100%'> - <td width='100%' align='center'> - <table cellpadding='5' cellspacing='0' border='0' width='100%'> - <tr><td align='center'> - - <h1>Zentrales Client / IP Management</h1> - - <h3> - <code class='font_object'><br> Registrierung / Administration von Rechnern in den zentralen RZ Diensten <br> - <font size=+3> DHCP, Remote Boot (PXE/TFTP) </font></code> - </h3> - </td></tr> - </table> - </td> - - </tr> -</table> - -<hr align='center' size='3' width='98%' noshade> - -<table cellpadding='5' cellspacing='0' border='0' width='100%' height='48%'> - - - <tr valign='middle'> - <td width='100%' align='center'> - <table cellspacing='0' cellpadding='5' border='0' width='30%' style='border-color: #505050; border-style: solid; border-width: 2 2 2 2;'> - <tr height="50"><td align='center' style='border-color: #505050; border-style: solid; border-width: 0 0 2 0;background-color: #808080; color: white;'> - <font size="+2"> LOGIN - Client / IP Management </font> - </td></tr> - <tr><td align='center'> - - {LOGIN} - - </td></tr> - </table> - </td> - - </tr> -</table> - - - -<table cellpadding='5' cellspacing='0' border='0' width='100%' height='10%'> - <tr valign='bottom'> - <td><hr align='center' size='1' width='100%' noshade></td> - </tr> - <tr valign='top'> - <td align='right'> Rechenzentrum Universität Freiburg - </td></tr> - </tr> -</table>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/start.php b/ldap-site-mngmt/webinterface/start.php deleted file mode 100644 index d0d34320..00000000 --- a/ldap-site-mngmt/webinterface/start.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php - -#Pfad festlegen wo die Dateien sich befinden -include('standard_header.inc.php'); - -$titel = "Rechner und IP Management Startseite"; -$webseite = "home.dwt"; - -# neues Template-Objekt erstellen -$template = new FastTemplate("."); -# dem erstellten Template-Objekt eine Vorlage zuweisen -$template->define(array("Vorlage" => "index.dwt", - "Login" => "logout_form.inc.dwt", - "Webseite" => $webseite)); - -$template->assign(array("SEITENTITEL" => $titel,"USERCN" => $usercn)); - -############################################################ - -$template->define_dynamic("Aus", "Webseite"); -#$template->define_dynamic("Roles", "Webseite"); - -$roles = getRoles($ds, $userDN); -#print_r($roles); echo "<br><br>"; -if (count($roles) == 1 ){ - $mesg = ""; - $rollenurlstring = implode('_',$roles[0]['role']); - $url = "zwischen.php?audn=".$roles[0]['au']."&rollen=".$rollenurlstring; - redirect(0, $url, $mesg, $addSessionId = TRUE); - die; -} - - -foreach ($roles as $item){ - - $auDN = $item['au']; - $expDN = explode(',',$auDN); - $expOU = explode('=',$expDN[0]); - $au = $expOU[1]; - $audata = get_au_data($auDN,array("cn","description")); - - $template->assign(array( "CN" => "","MA" => "", "HA" => "", "DA" => "", "ZA" => "", "RA" => "")); - $template->assign(array( "AU" => $au, "AUDN" => $auDN, "CN" => $audata[0]['cn'], "ROLLEN" => implode('_',$item['role']))); - - $rollen = ""; - foreach ($item['role'] as $role){ - $rollen .= $role." "; - $template->assign(array( "MA" => $rollen)); - - /*if ($role == MainAdmin){ - $template->assign(array( "MA" => $role)); - } - if ($role == HostAdmin){ - $template->assign(array( "HA" => $role)); - } - if ($role == DhcpAdmin){ - $template->assign(array( "DA" => $role)); - } - if ($role == ZoneAdmin){ - $template->assign(array( "ZA" => $role)); - } - if ($role == RbsAdmin){ - $template->assign(array( "RA" => $role)); - }*/ - } - $template->parse("AUS_LIST", ".Aus"); - $template->clear_dynamic("Aus"); -} - - -############################################################# - -# Daten in die Vorlage parsen -$template->assign(array("PFAD" => $START_PATH)); - -$template->parse("LOGIN", "Login"); -$template->parse("HAUPTFENSTER", "Webseite"); -$template->parse("PAGE", "Vorlage"); - -# Fertige Seite an den Browser senden -$template->FastPrint("PAGE"); - -?> diff --git a/ldap-site-mngmt/webinterface/styles.css b/ldap-site-mngmt/webinterface/styles.css deleted file mode 100644 index aec22d79..00000000 --- a/ldap-site-mngmt/webinterface/styles.css +++ /dev/null @@ -1,369 +0,0 @@ -p { - font-family: Arial; - font-size: 10pt; - color: #000000; -} -a:link { - color: #006BB6; - text-decoration:none; -} -a:visited { - color: #006BB6; - text-decoration:none; -} -a:hover { - color: #006BB6; - text-decoration:underline; -} -a:active { - color: #B9D9F0; - text-decoration:underline; -} -body { - font-family: helvetica, arial, sans-serif; - font-size: 10pt; - color: #000000; - background-color: #FFFFFF; - margin-top:0px; - margin-left:0px; -} -h1 { - font-family: arial, helvetica, sans-serif; - font-size: 25pt; - font-weight: bold; - color: #000000; -} -h2 { - font-family: arial, helvetica, sans-serif; - font-size: 15pt; - font-weight: bold; - color: #000000; -} -h3 { - font-family: arial, helvetica, sans-serif; - font-size: 12pt; - font-weight: bold; - color: #000000; -} -h4 { - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - font-weight: bold; - color: #000000; -} -.font_object { - font-family: arial, helvetica, sans-serif; - font-weight: bold; - color: #505050; -} -.balken { - font-family: arial, helvetica, sans-serif; - font-size: 12pt; - font-weight: bold; - color: #FFFFFF; - background-color: #006BB6; -} -.balken_mit_pd { - font-family: arial, helvetica, sans-serif; - font-size: 12pt; - font-weight: bold; - color: #FFFFFF; - background-color: #006BB6; - padding: 5; -} -.balken_kl { - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - color: #FFFFFF; - background-color: #006BB6; -} -.small_loginform_field { - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - color: #000000; - border-style: solid; - border-width: 1px 1px; - border-color: #000000; - background-color: #C0C0C0; - padding: 3px; - margin: 3px; -} -.small_loginform_button { - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - width: 80px; - color: #FFFFFF; - border-style: solid; - border-width: 1px 1px; - border-color: #000000; - background-color: #880000; - margin: 3px; -} -.small_loginform_text { - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - color: #000000; -} -.tiny_loginform_button { - font-family: Arial; - font-size: 8pt; - width: 60px; - color: #FFFFFF; - border-style: solid; - border-width: 1px 1px; - border-color: #000000; - background-color: #880000; -} -.tiny_loginform_text { - font-family: arial, helvetica, sans-serif; - font-size: 8pt; - color: #000000; -} -.small_form_selectbox { - font-family: Arial; - font-size: 10pt; - border-style: solid; - border-width: 1px 1px; - border-color: #000000; - width: 150; - padding-left: 10px; - margin: 5px; -} -.medium_form_field { - font-family: Arial; - font-size: 10pt; - color: #000000; - padding-left: 5px; - border-style: solid; - border-width: 1px 1px; - border-color: #000000; - background-color: #FFFFFF; - margin: 5px; -} -.medium_form_field_err { - font-family: Arial; - font-size: 10pt; - color: #000000; - border-style: solid; - border-width: 1px 1px; - border-color: #000000; - background-color: #FFFFFF; -} -.medium_form_button { - font-family: Arial; - font-size: 10pt; - color: #FFFFFF; - border-style: solid; - border-width: 1px 1px; - border-color: #000000; - background-color: #600000; - width: 50px; -} -.medium_form_text { - font-family: Arial; - font-size: 10pt; - color: #000000; -} -.medium_form_checkbox { - font-family: Arial; - font-size: 10pt; - border-style: solid; - border-width: 1px 1px; - border-color: #000000; -} -.medium_form_selectbox { - font-family: Arial; - font-size: 10pt; - border-style: solid; - border-width: 1px 1px; - border-color: #000000; - width: 300; - padding-left: 10px; - margin: 5px; -} -.tftp_form_selectbox { - font-family: Arial; - font-size: 10pt; - border-style: solid; - border-width: 1px 1px; - border-color: #000000; - width: 250; - padding-left: 10px; - margin: 5px; -} -.rootfs_form_selectbox { - font-family: Arial; - font-size: 10pt; - border-style: solid; - border-width: 1px 1px; - border-color: #000000; - width: 250; - padding-left: 5px; - margin: 5px; -} -.100_form_selectbox { - font-family: Arial; - font-size: 10pt; - border-style: solid; - border-width: 1px 1px; - border-color: #000000; - width: 100; - padding-left: 10px; - margin: 5px; -} -.tiny_form_selectbox { - font-family: Arial; - font-size: 10pt; - border-style: solid; - border-width: 1px 1px; - border-color: #000000; - width: 80; - padding-left: 10px; - margin: 5px; -} -.large_form_selectbox { - font-family: Arial; - font-size: 10pt; - border-style: solid; - border-width: 1px 1px; - border-color: #000000; - width: 430; - padding-left: 10px; - margin: 5px; -} - -.tabellen_platzhalter{ - font-size: 0pt; -} -.standard_schrift { - font-family: Arial; - font-size: 10pt; - color: #FFFFFF; -} -.menue_schrift { - font-family: Arial; - font-size: 11pt; - color: #FFFFFF; -} -.submenue_schrift { - font-family: Arial; - font-size: 10pt; - color: #FFFFFF; -} -.tabellenzeile_hell { - background-color: #E7F5FE; -} -.tabellenzeile_dunkel { - background-color: #B9D9F0; -} -.warnung { - color: #C40000; -} -.Textfeld { - font-family: Arial; - font-size: 10pt; - color: #000000; - border-style: solid; - border-width: 1px 1px; - border-color: #006BB6; - background-color: #E7F5FE; -} -.tab_h { - border-color: black; - border-style: solid; - border-width: 0px 0px 3px 0px; -} -.tab_d { - border-color: black; - border-style: solid; - border-width: 0px 0px 1px 0px; -} -.tab_d_ohne { - border-color: black; - border-style: solid; - border-width: 0px 0px 0px 0px; -} -.headerlink:link { - color: #000000; - text-decoration:underline; -} -.headerlink:visited { - color: #000000; - text-decoration:underline; -} -.headerlink:hover { - color: #505050; - text-decoration:none; -} -.headerlink:active { - color: #505050; - text-decoration:underline; -} -.publink:link { - color: #001B56; - text-decoration:none; -} -.publink:visited { - color: #001B56; - text-decoration:none; -} -.publink:hover { - color: #001B56; - text-decoration:underline; -} -.publink:active { - color: #B9D9F0; - text-decoration:underline; -} -.publink_leit:link { - color: #FFFFDF; - text-decoration:none; -} -.publink_leit:visited { - color: #FFFFDF; - text-decoration:none; -} -.publink_leit:hover { - color: #FFFFDF; - text-decoration:underline; -} -.publink_leit:active { - color: #FFFFDF; - text-decoration:underline; -} -.maillink:link { - color: #001B56; - text-decoration:none; -} -.maillink:visited { - color: #001B56; - text-decoration:none; -} -.maillink:hover { - color: #001B56; - text-decoration:underline; -} -.maillink:active { - color: #B9D9F0; - text-decoration:underline; -} -.formlink:link { - color: #FFFFFF; - text-decoration:none; -} -.formlink:visited { - color: #FFFFFF; - text-decoration:none; -} -.formlink:hover { - color: #FFFFFF; - text-decoration:none; -} -.formlink:active { - color: #FFFFFF; - text-decoration:none; -} -.no_size { - font-family: Arial; - font-size: 1pt; -}
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/syntax_check.php b/ldap-site-mngmt/webinterface/syntax_check.php deleted file mode 100644 index 5d714122..00000000 --- a/ldap-site-mngmt/webinterface/syntax_check.php +++ /dev/null @@ -1,304 +0,0 @@ -<?php -/* - Syntaxcheck 1.2 2006/08/08 - - A class for checking syntax of forms data - Copyright (c) Tarik Gasmi, All Rights Reserved -*/ - - -class Syntaxcheck -{ - - var $ERROR = ""; - var $CLEAR = false; - - function Syntaxcheck () - { - return; - } - - function clear_error () - { - $this->ERROR = ""; - } - - - - - -# Ist "dotted quad IPAddress" in gueltigem Bereich? true or false -# Ueberprueft Format, fuehrende Nullen, und Werte > 255 -# -# Ueberprueft nicht nach reservierten oder nicht-route-baren IPs. -# -function check_ip_syntax($IP) -{ - if($this->CLEAR) { $this->clear_error();} - - $len = strlen($IP); - if( $len > 15 ){ - $this->ERROR = "check_ip_syntax: too long [$IP][$len]"; - return false; - } - - $badcharacter = eregi_replace("([0-9\.]+)","",$IP); - if(!empty($badcharacter)){ - $this->ERROR = "check_ip_syntax: Bad data in IP address [$badcharacter]"; - return false; - } - - $chunks = explode(".",$IP); - $count = count($chunks); - if ($count != 4){ - $this->ERROR = "check_ip_syntax: not a dotted quad [$IP]"; - return false; - } - - while ( list ($key,$val) = each ($chunks) ){ - if(ereg("^0",$val) && strlen($val) != 1){ - $this->ERROR = "check_ip_syntax: Invalid IP segment [$val]"; - return false; - } - $Num = $val; - settype($Num,"integer"); - if($Num > 255){ - $this->ERROR = "check_ip_syntax: Segment out of range [$Num]"; - return false; - } - } - - return true; - -} - -# Netzwerkaddresse -function check_netip_syntax($IP) -{ - if($this->CLEAR) { $this->clear_error();} - - if ( !($this->check_ip_syntax($IP)) ){ - return false; - } - $chunks = explode(".",$IP); - if ( $chunks[3] != "0" ){ - return false; - } - return true; -} - -# MAC Adresse -function check_mac_syntax($MAC) -{ - if($this->CLEAR) { $this->clear_error();} - - $len = strlen($MAC); - if( $len != 17 ){ - $this->ERROR = "check_mac_syntax: too long [$MAC][$len]"; - return false; - } - - $badcharacter = eregi_replace("([0-9a-fA-F\:]+)","",$MAC); - #echo "badcharacter: ".$badcharacter."<br>"; - if(!empty($badcharacter)){ - $this->ERROR = "check_mac_syntax: Bad data in MAC address [$badcharacter]"; - return false; - } - - $chunks = explode(":",$MAC); - #print_r($chunks)."<br>"; - $count = count($chunks); - if ($count != 6){ - $this->ERROR = "check_mac_syntax: not in format hx:hx:hx:hx:hx:hx [$MAC]"; - return false; - } - foreach ($chunks as $chunk){ - $chunklen = strlen($chunk); - if( $chunklen != 2 ){ - $this->ERROR = "check_mac_syntax: too long [$MAC][$len]"; - return false; - } - } - - return true; - -} - - -# Domainname - -# Hostname -function is_hostname ($hostname = ""){ - - if($this->CLEAR) { $this->clear_error(); } - - $web = false; - - if(empty($hostname)) - { - $this->ERROR = "is_hostname: No hostname submitted"; - return false; - } - - // Only a-z, 0-9, and "-" or "." are permitted in a hostname - - // Patch for POSIX regex lib by Sascha Schumann sas@schell.de - $Bad = eregi_replace("[-A-Z0-9\.]","",$hostname); - - if(!empty($Bad)) - { - $this->ERROR = "is_hostname: invalid chars [$Bad]"; - return false; - } - - // See if we're doing www.hostname.tld or hostname.tld - if(eregi("^www\.",$hostname)) - { - $web = true; - } - - // double "." is a not permitted - if(ereg("\.\.",$hostname)) - { - $this->ERROR = "is_hostname: Double dot in [$hostname]"; - return false; - } - if(ereg("^\.",$hostname)) - { - $this->ERROR = "is_hostname: leading dot in [$hostname]"; - return false; - } - - $chunks = explode(".",$hostname); - - if( (gettype($chunks)) != "array") - { - $this->ERROR = "is_hostname: Invalid hostname, no dot seperator [$hostname]"; - return false; - } - - $count = ( (count($chunks)) - 1); - - if($count < 1) - { - $this->ERROR = "is_hostname: Invalid hostname [$count] [$hostname]\n"; - return false; - } - - // Bug that can't be killed without doing an is_host, - // something.something will return TRUE, even if it's something - // stupid like NS.SOMETHING (with no tld), because SOMETHING is - // construed to BE the tld. The is_bigfour and is_country - // checks should help eliminate this inconsistancy. To really - // be sure you've got a valid hostname, do an is_host() on it. - - if( ($web) and ($count < 2) ) - { - $this->ERROR = "is_hostname: Invalid hostname [$count] [$hostname]\n"; - return false; - } - - $tld = $chunks[$count]; - - if(empty($tld)) - { - $this->ERROR = "is_hostname: No TLD found in [$hostname]"; - return false; - } - - if(!$this->is_bigfour($tld)) - { - if(!$this->is_country($tld)) - { - $this->ERROR = "is_hostname: Unrecognized TLD [$tld]"; - return false; - } - } - - - return true; -} - - -# Syntax Check für die Eingaben: Uhrzeit, Wochentag, Monatstag, Monatstag.Monat -function check_timerange_syntax($mcday,$mcbeg,$mcend){ - - if($this->CLEAR) { $this->clear_error();} - - $badcharacter = eregi_replace("([a-z0-9\.]+)","",$mcday); - if(!empty($badcharacter)){ - $this->ERROR = "check_ip_syntax: Bad data in MC Day [$badcharacter]"; - return false; - } - $badcharacter = eregi_replace("([x0-9]+)","",$mcbeg); - if(!empty($badcharacter)){ - $this->ERROR = "check_ip_syntax: Bad data in MC Begin [$badcharacter]"; - return false; - } - $badcharacter = eregi_replace("([x0-9]+)","",$mcend); - if(!empty($badcharacter)){ - $this->ERROR = "check_ip_syntax: Bad data in MC End [$badcharacter]"; - return false; - } - - $lenmcday = strlen($mcday); - if (eregi("([a-z]+)",$mcday)){ - if ($lenmcday > 2){$this->ERROR = "WOTAG > 2"; return false;} - if (eregi("([0-9\.]+)",$mcday)){$this->ERROR = "WOTAG enthaelt (0-9.)"; return false;} - #if (!(eregi("[mdsfx][aiorx]",$mcday))){return false;} - if (!(eregi("(m[io]|d[io]|s[ao]|fr|x)",$mcday))){$this->ERROR = "WOTAG falscher String"; return false;} - } - if (eregi("([0-9]+)",$mcday)){ - if (eregi("[\.]",$mcday)){ - preg_match("/[\.]/",$mcday,$treffer); - if (count($treffer) > 1){$this->ERROR = "mehr als 2 Punkte"; return false;}; - $exp = explode('.',$mcday); - $day = $exp[0]; - $lenday = strlen($day); - if ($lenday > 2){$this->ERROR = "TAG > 2"; return false;} - if (!(eregi("(0[1-9]|[0-2][0-9]|3[01])",$day))){$this->ERROR = "TAG nicht korrekt"; return false;} - $month = $exp[1]; - $lenmonth = strlen($month); - if ($lenmonth > 2){$this->ERROR = "MONAT > 2"; return false;} - if (!(eregi("(0[0-9]|0[0-9]|1[0-2])",$month))){$this->ERROR = "Monat nicht korrekt"; return false;} - - } - else{ - if ($lenmcday > 2){$this->ERROR = "TAG > 2"; return false;} - if (!(eregi("(0[0-9]|[0-2][0-9]|3[01])",$mcday))){$this->ERROR = "Tag nicht korrekt"; return false;} - } - } - - $lenmcbeg = strlen($mcbeg); - if ($lenmcbeg == 2){ - if (!(eregi("(0[0-9]|1[0-9]|2[0-3]|x)",$mcbeg))){$this->ERROR = "Uhrzeit nicht korrekt"; return false;} - } - if ($lenmcbeg == 1){ - if (!(eregi("([0-9]|x)",$mcbeg))){$this->ERROR = "Uhrzeit nicht korrekt"; return false;} - } - $lenmcend = strlen($mcend); - if ($lenmcend == 2){ - if (!(eregi("(0[0-9]|1[0-9]|2[0-3]|x)",$mcend))){$this->ERROR = "Uhrzeit nicht korrekt"; return false;} - } - if ($lenmcend == 1){ - if (!(eregi("([0-9]|x)",$mcend))){$this->ERROR = "Uhrzeit nicht korrekt"; return false;} - } - - return true; -} - - -# Überprüft ob Menuposition ein Zahl ist -function check_menuposition($menpos){ - - if($this->CLEAR) { $this->clear_error();} - - $badcharacter = eregi_replace("([0-9]+)","",$menpos); - if(!empty($badcharacter)){ - $this->ERROR = "check_menupostion: Bad data in Menu Position [$badcharacter]"; - return false; - } -} - -} -?>
\ No newline at end of file diff --git a/ldap-site-mngmt/webinterface/zwischen.php b/ldap-site-mngmt/webinterface/zwischen.php deleted file mode 100644 index 21e5137a..00000000 --- a/ldap-site-mngmt/webinterface/zwischen.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php -session_cache_expire(30); -session_start(); - -$_SESSION['audn'] = $_GET['audn']; - -$rollen_string = $_GET['rollen']; -$_SESSION['rollen'] = explode('_',$rollen_string); - -include('lib/commonlib.inc.php'); - -$url = "au/au.php"; -$mesg = ""; -redirect(0, $url, $mesg, $addSessionId = TRUE); - -?>
\ No newline at end of file diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/bin/fltk2-config b/os-plugins/plugins/vmchooser/src/fltk-2/bin/fltk2-config deleted file mode 100755 index 1abb3220..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/bin/fltk2-config +++ /dev/null @@ -1,375 +0,0 @@ -#!/bin/sh -# -# "$Id: fltk2-config.in 4958 2006-04-15 17:43:12Z fabien $" -# -# FLTK configuration utility. -# -# Copyright 2000-2003 by Bill Spitzak and others. -# Original version Copyright 2000 by James Dean Palmer -# Adapted by Vincent Penne and Michael Sweet -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library 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 -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# Please report all bugs and problems to "fltk-bugs@fltk.org". -# - -MAJOR_VERSION=2 -MINOR_VERSION=0 -PATCH_VERSION=0 -VERSION="$MAJOR_VERSION.$MINOR_VERSION.$PATCH_VERSION" -APIVERSION="$MAJOR_VERSION.$MINOR_VERSION" - -### BEGIN fltk2-config - -# First, we need to figure out where we are, in case we are in a non-installed invocation -# BUT to do that we need to check if we were called via a symlink or not... -# AND some systems (e.g. mingw) have neither symlinks, nor readlink, nor which... -HAVE_READLINK=`type -p readlink` -if test -z "$HAVE_READLINK"; then -# We don't have readlink, so just use local dir as selfdir - selfdir=`dirname $0` -else -# We do have readlink - let us check if we were called via a symlink or not - selfdir=`readlink $0` - if test -n "$selfdir"; then -# Was a symlink, find the real selfdir - selfdir=`dirname $selfdir` - else -# Not a symlink, find the selfdir - selfdir=`dirname $0` - fi -fi - -prefix=/home/bastian/studium/hiwi/fltk-2/ -exec_prefix=${prefix} -exec_prefix_set=no -bindir=${exec_prefix}/bin -includedir=${prefix}/include -libdir=${exec_prefix}/lib -srcdir=. - -# compiler names -CXX="gcc" -CC="gcc" - -# post-process command (only needed for MacOS) -POSTBUILD=":" - -# flags for C++ compiler: -CFLAGS="" -CXXFLAGS="-I/usr/include/freetype2 -Wno-non-virtual-dtor" -LDFLAGS=" " -LDLIBS=" -lX11 -lXi -lXinerama -lXft -lpthread -lm -lXext -lsupc++" - -# libraries to link with: -LIBNAME="@LIBNAME@" -DSONAME="@DSONAME@" -DSOLINK="" -IMAGELIBS="-lpng -lfltk2_images -ljpeg -lz" -SHAREDSUFFIX="" - -# Check for local invocation, and update paths accordingly... -if test -e "$selfdir/fltk/Window.h"; then - bindir="$selfdir/fluid" - includedir="$selfdir" - libdir="$selfdir/lib" - prefix="$selfdir" - if test -f "$libdir/libfltk2_jpeg.a"; then - CFLAGS="-I$includedir/images/jpeg $CFLAGS" - CXXFLAGS="-I$includedir/images/jpeg $CXXFLAGS" - fi - - if test -f "$libdir/libfltk2_z.a"; then - CFLAGS="-I$includedir/images/zlib $CFLAGS" - CXXFLAGS="-I$includedir/images/zlib $CXXFLAGS" - fi - - if test -f "$libdir/libfltk2_png.a"; then - CFLAGS="-I$includedir/images/png $CFLAGS" - CXXFLAGS="-I$includedir/images/png $CXXFLAGS" - fi -fi - -usage () -{ - echo "Usage: fltk2-config [OPTIONS] -Options: - [--prefix[=DIR]] return/set where FLTK is installed - [--exec-prefix[=DIR]] - [--version] - [--api-version] - -Options telling what we are doing: - [--use-gl] use GL - [--use-images] use extra image formats (PNG, JPEG) - [--use-glut] use glut compatibility layer - [--use-forms] use forms compatibility layer - -Options telling what information we request: - [--cflags] return flags to compile C using FLTK - [--cxxflags] return flags to compile C++ using FLTK - [--ldflags] return flags to link against FLTK - [--ldstaticflags] return flags to link against static FLTK library - even if there are DSOs installed - [--libs] return FLTK libraries full path for dependencies - [--cxx] return name of C++ compiler used to build FLTK - [--cc] return name of C compiler used to build FLTK - -Option to compile and link an application: - [-g] compile the program with debugging information - [--compile program.cxx] - [--post program] -" - exit $1 -} - -if test $# -eq 0; then - usage 1 -fi - -no_plugins=no -compile= -post= -debug= - -# Parse command line options -while test $# -gt 0 -do - case "$1" in - -*=*) - optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` - ;; - *) - optarg= - ;; - esac - - case $1 in - --prefix=*) - prefix=$optarg - if test $exec_prefix_set = no ; then - exec_prefix=$optarg - fi -## FIXME -# This fixes --prefix=<path> bug - fltk2-config didn't return proper stuff - bindir=${exec_prefix} - includedir=${prefix}/include - libdir=${prefix}/lib - DSOLINK="-Wl,-rpath,${prefix}/lib" - ;; - --prefix) - echo_prefix=yes - ;; - --exec-prefix=*) - exec_prefix=$optarg - exec_prefix_set=yes - ;; - --exec-prefix) - echo_exec_prefix=yes - ;; - --version) - echo $VERSION - ;; - --api-version) - echo $APIVERSION - ;; - --use-gl | --use-glut) - use_gl=yes - ;; - --use-forms) - use_forms=yes - ;; - --use-images) - use_images=yes - ;; - --cflags) - echo_cflags=yes - ;; - --cxxflags) - echo_cxxflags=yes - ;; - --ldflags) - echo_ldflags=yes - ;; - --ldstaticflags) - echo_ldstaticflags=yes - ;; - --libs) - echo_libs=yes - ;; - -g) - debug=-g - ;; - --compile) - compile=$2 - post=$2 - shift - ;; - --cxx) - echo_cxx_name=yes - ;; - --cc) - echo_cc_name=yes - ;; - --post) - post=$2 - shift - ;; - *) - echo_help=yes - ;; - esac - shift -done - -if test "$includedir" != /usr/include; then - includes=-I$includedir -else - includes= -fi - -if test "$libdir" != /usr/lib -a "$libdir" != /usr/lib32; then - libs=-L$libdir -else - libs= -fi - -### -# Some MinGW variants still need -I/usr/include and -L/usr/lib ... -# -case `uname -s` in - MINGW*) - if test "$includedir" == /usr/include; then - includes=-I$includedir - fi - if test "$libdir" == /usr/lib; then - libs=-L$libdir - fi - ;; -esac -LDSTATIC_PATHS=$libs -LDLIBS_PATHS=$libs - -# Calculate needed libraries -LDSTATIC="$libdir/libfltk2.a $LDLIBS" -LDLIBS="$libs -lfltk2$SHAREDSUFFIX $LDLIBS" -LIBS="$LIBS $libdir/libfltk2.a" - -if test x$use_forms = xyes; then - LDLIBS="-lfltk2_forms$SHAREDSUFFIX $LDLIBS" - LDSTATIC="$libdir/libfltk2_forms.a $LDSTATIC" - LIBS="$LIBS $libdir/libfltk2_forms.a" -fi -if test x$use_gl = xyes; then - LDLIBS="-lfltk2_gl$SHAREDSUFFIX -lGLU -lGL $LDLIBS" - LDSTATIC="$libdir/libfltk2_gl.a -lGLU -lGL $LDSTATIC" - LIBS="$LIBS $libdir/libfltk2_gl.a" -fi -if test x$use_images = xyes; then - LDLIBS="-lfltk2_images$SHAREDSUFFIX $IMAGELIBS $LDLIBS" - LDSTATIC="$libdir/libfltk2_images.a $LDSTATIC $IMAGELIBS" -fi - -LDLIBS="$DSOLINK $LDLIBS" -LDSTATIC="$LDSTATIC_PATHS $LDSTATIC" - -# Answer to user requests -if test -n "$echo_help"; then - usage 1 -fi - -if test -n "$compile"; then - case $compile in - *.cxx) - prog=`basename $compile .cxx` - ;; - *.cpp) - prog=`basename $compile .cpp` - ;; - *.cc) - prog=`basename $compile .cc` - ;; - *.C) - prog=`basename $compile .C` - ;; - *) - echo "ERROR: Unknown/bad C++ source file extension on \"$compile\"!" - exit 1 - ;; - esac - - post=$prog - - echo $CXX $includes $CXXFLAGS $debug -o $prog $compile $LDSTATIC - $CXX $includes $CXXFLAGS $debug -o $prog $compile $LDSTATIC -fi - -if test -n "$post" -a "$POSTBUILD" != ":"; then - echo $POSTBUILD $post $includedir/fltk/mac.r - $POSTBUILD $post $includedir/fltk/mac.r -fi - -if test "$echo_prefix" = "yes"; then - echo $prefix -fi - -if test "$echo_exec_prefix" = "yes"; then - echo $exec_prefix -fi - -if test "$echo_cflags" = "yes"; then - echo $includes $CFLAGS -fi - -if test "$echo_cxxflags" = "yes"; then - echo $includes $CXXFLAGS -fi - -if test "$echo_ldflags" = "yes"; then - my_libs= - libdirs=$libs - - for i in $LDLIBS ; do - if test $i != -L$libdir ; then - if test -z "$my_libs" ; then - my_libs="$i" - else - my_libs="$my_libs $i" - fi - fi - done - echo $libdirs $my_libs -fi - -if test "$echo_ldstaticflags" = "yes"; then - echo $LDSTATIC -fi - -if test "$echo_libs" = "yes"; then - echo $LIBS -fi - -if test "$echo_cc_name" = "yes"; then - echo $CC -fi - -if test "$echo_cxx_name" = "yes"; then - echo $CXX -fi - -# -# End of "$Id: fltk2-config.in 4958 2006-04-15 17:43:12Z fabien $". -# diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/bin/fluid2 b/os-plugins/plugins/vmchooser/src/fltk-2/bin/fluid2 Binary files differdeleted file mode 100755 index 84cad20d..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/bin/fluid2 +++ /dev/null diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Adjuster.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Adjuster.h deleted file mode 100644 index 8010dc99..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Adjuster.h +++ /dev/null @@ -1,58 +0,0 @@ -// -// "$Id: Adjuster.h 4886 2006-03-30 09:55:32Z fabien $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -// Undocumented valuator provided for back-compatability. -// This may be removed before the final version. -// 3-button "slider", made for Nuke - -#ifndef fltk_Adjuster_h -#define fltk_Adjuster_h - -#include "Valuator.h" - -namespace fltk { - -class FL_API Adjuster : public Valuator { -public: - Adjuster(int x, int y, int w, int h, const char *l=0); - static NamedStyle* default_style; - void soft(int x) {soft_ = x;} - int soft() const {return soft_;} - int handle(int); - -protected: - void draw(); - void value_damage(); - -private: - int drag, highlight, last; - int ix; - int soft_; -}; - -} -#endif - -// -// End of "$Id: Adjuster.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/AlignGroup.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/AlignGroup.h deleted file mode 100644 index 08fc2a3d..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/AlignGroup.h +++ /dev/null @@ -1,65 +0,0 @@ -// Layout header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_AlignGroup_h -#define fltk_AlignGroup_h - -#include "Group.h" - -namespace fltk { - -class FL_API AlignGroup : public Group { - bool vertical_; - uchar n_to_break_,dw_,dh_; - Flags align_; - -public: - - void layout(); - - // WAS: this should have a begin=false argument added somehow. - AlignGroup(int X, int Y, int W, int H, const char* L = 0, - uchar n_to_break = 0, bool vertical = 1, - Flags align = ALIGN_LEFT, - uchar dw = 0,uchar dh = 0) - : Group(X,Y,W,H,L), - vertical_(vertical), n_to_break_(n_to_break), dw_(dw), dh_(dh), - align_(align) {} - - bool vertical() const {return vertical_;} - void vertical(bool v) {vertical_ = v;} - - uchar n_to_break() const {return n_to_break_;} - void n_to_break(uchar n) {n_to_break_ = n;} - - uchar dw() const {return dw_;} - void dw(uchar d) {dw_ = d;} - uchar dh() const {return dh_;} - void dh(uchar d) {dh_ = d;} - - Flags align() const {return align_;} - void align(Flags a) {align_ = a;} -}; - -} - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/AnsiWidget.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/AnsiWidget.h deleted file mode 100644 index c4dcc564..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/AnsiWidget.h +++ /dev/null @@ -1,92 +0,0 @@ -// "$Id: Widget.h 5600 2007-01-13 00:04:55Z spitzak $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// Original code Copyright Chris Warren-Smith. Permission to distribute under -// the LGPL for the FLTK library granted by Chris Warren-Smith. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -#ifndef FL_ANSI_WIDGET -#define FL_ANSI_WIDGET - -#include <fltk/Widget.h> -#include <fltk/draw.h> -#include <fltk/Image.h> - -using namespace fltk; - -class AnsiWidget : public Widget { - public: - AnsiWidget(int x, int y, int w, int h, int defsize); - virtual ~AnsiWidget(); - - // inherited methods - void draw(); - void layout(); - int handle(int e); - - // public api - void clearScreen(); - void print(const char *str); - void drawLine(int x1, int y1, int x2, int y2); - void drawRectFilled(int x1, int y1, int x2, int y2); - void drawRect(int x1, int y1, int x2, int y2); - void drawImage(Image* img, int x, int y, int sx, int sy, int w, int h); - void saveImage(const char* fn, int x, int y, int w, int h); - void setTextColor(long fg, long bg); - void setColor(long color); - int getX() {return curX;} - int getY() {return curY;} - void setPixel(int x, int y, int c); - int getPixel(int x, int y); - void setXY(int x, int y) {curX=x; curY=y;} - int textWidth(const char* s); - int textHeight(void); - int getWidth() {return w();} - int getHeight() {return h();} - void setFontSize(float i) {labelsize(i);} - int getFontSize() {return (int)labelsize();} - void beep() const; - static Color ansiToFltk(long color); - - private: - void init(); - void destroyImage(); - void initImage(); - bool setGraphicsRendition(char c, int escValue); - bool doEscape(unsigned char *&p); - int calcTab(int x) const; - void newLine(); - void reset(); - - Image* img; - bool underline; - bool invert; - bool bold; - bool italic; - bool resized; - int curY; - int curX; - int curYSaved; - int curXSaved; - int tabSize; -}; - -#endif - -// $Id: Fl_Ansi_Window.h,v 1.23 2006/08/03 10:28:12 zeeb90au Exp $ diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/BarGroup.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/BarGroup.h deleted file mode 100644 index 24affe24..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/BarGroup.h +++ /dev/null @@ -1,60 +0,0 @@ -// -// "$Id: BarGroup.h 5575 2007-01-02 17:31:40Z spitzak $" -// -// The BarGroup is a closable strip that can be put in the edges of a Pack, -// usually it contains toolbars or buttons. -// -// Copyright 2002-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_BarGroup_h -#define fltk_BarGroup_h - -#include "Group.h" - -namespace fltk { - -class FL_API BarGroup : public Group { - bool open_; - bool highlighted; - bool pushed; - int glyph_size_; - int saved_size; - void glyph_box(Rectangle&) const; -public: - BarGroup(int x,int y,int w ,int h,const char *l = 0,bool begin=false); - static NamedStyle* default_style; - void layout(); - int handle(int); - void draw(); - bool opened() const {return open_;} - bool opened(bool); - bool open() {return opened(true);} - bool close() {return opened(false);} - int glyph_size() const {return glyph_size_;} - void glyph_size(int v) {glyph_size_ = v;} -}; - -} -#endif - -// -// End of "$Id: BarGroup.h 5575 2007-01-02 17:31:40Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Box.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Box.h deleted file mode 100644 index 3319ae5f..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Box.h +++ /dev/null @@ -1,75 +0,0 @@ -// -// "$Id: Box.h 5865 2007-06-01 13:04:19Z sanel.z $" -// -// Define your own values for box() on a widget by making one of these. -// -// Copyright 2002 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_Box_h -#define fltk_Box_h - -#include "Color.h" -#include "Flags.h" -#include "Symbol.h" - -namespace fltk { - -typedef Symbol Box; - -class FL_API FrameBox : public Box { -protected: - const char* data_; - const Box* down_; -public: - const char* data() const {return data_;} - void data(const char* d) {data_ = d;} - void _draw(const Rectangle&) const; - void inset(Rectangle&) const; - bool fills_rectangle() const; - bool is_frame() const; - FrameBox(const char* name, int dx,int dy,int dw,int dh, const char* pattern, const Box* down=0) - : Box(name),data_(pattern),down_(down) {set_inset(dx,dy,-dw,-dh);} -}; - -class FL_API FlatBox : public Box { -public: - void _draw(const Rectangle&) const; - bool fills_rectangle() const; - bool is_frame() const; - FlatBox(const char* n); -}; - -class FL_API HighlightBox : public FlatBox { - const Box* down_; -public: - void _draw(const Rectangle&) const; - bool fills_rectangle() const; - bool is_frame() const; - HighlightBox(const char* n, const Box* d); -}; - -} - -#endif - -// -// End of "$Id: Box.h 5865 2007-06-01 13:04:19Z sanel.z $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Browser.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Browser.h deleted file mode 100644 index 459bf838..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Browser.h +++ /dev/null @@ -1,213 +0,0 @@ -// "$Id: Browser.h 5934 2007-07-23 20:12:39Z spitzak $" -// -// Copyright 2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -#ifndef fltk_Browser_h -#define fltk_Browser_h - -#include "Menu.h" -#include "Scrollbar.h" - -namespace fltk { - -class FL_API Browser : public Menu { -public: - - int handle(int); - void layout(); - void draw(); - - Browser(int X,int Y,int W,int H,const char*l=0); - static NamedStyle* default_style; - ~Browser(); - - enum { //<! values for type() - IS_MULTI = 1, - NORMAL = GROUP_TYPE, //!< means single selection can be achieved by user - MULTI = GROUP_TYPE+1 //!< means multiple selection can be achieved by user - }; - enum { // value for selected_column - NO_COLUMN_SELECTED = -1 //!< means that no column has been selected by user - }; - - class FL_API Mark { - friend class Browser; - unsigned level; // depth in hierarchy of the item - unsigned open_level; // depth of highest closed parent - int position; // distance in pixels from top of browser - unsigned indexes_size; // allocated size - int* indexes; // array of indexes - int index0; // used as *indexes if indexes_size==1 - public: - Mark() { - level = 0; - open_level = 0; - position = 0; - indexes_size = 1; - indexes = &index0; - index0 = 0; - } - Mark(const Mark&); - ~Mark() { - if (indexes != &index0) delete[] indexes; - } - const Mark& operator=(const Mark&); - int compare(const Mark& mark2) const; - void unset() {indexes[0] = -1;} - bool is_set() const {return indexes[0] >= 0;} - }; - - enum linepos { //!< Argument to make_item_visible() - NOSCROLL, //!< move as little as possible so item is visible - TOP, //!< position current item to top - MIDDLE, //!< position current item to middle - BOTTOM //!< position current item to bottom - }; - - int width() const {return width_;} - int height() const {return height_;} - int box_width() const {return interior.w();} - int box_height() const {return interior.h();} - int xposition() const {return xposition_;} - void xposition(int); - int yposition() const {return yposition_;} - void yposition(int); - bool indented() const {return indented_;} - void indented(bool v) {indented_ = v;} - - Scrollbar scrollbar; - Scrollbar hscrollbar; - - Widget* goto_top(); - Widget* goto_focus() {return goto_mark(FOCUS);} - Widget* goto_position(int y); - Widget* goto_index(const int* indexes, unsigned level); - Widget* goto_index(int); - Widget* goto_index(int,int,int=-1,int=-1,int=-1); - Widget* goto_mark(const Mark&); // set HERE to mark - Widget* next(); - Widget* next_visible(); - Widget* previous_visible(); - bool at_mark(const Mark& mark) const {return !HERE.compare(mark);} - int compare_to_mark(const Mark& mark) const {return HERE.compare(mark);} - bool item_is_visible() const; - bool item_is_parent() const; - bool item_is_open() const; - int item_h() const; - - bool set_focus(); - void set_mark(Mark& dest) const {dest = HERE;} - void set_mark_to_focus(Mark& dest) const {dest = FOCUS;} - bool set_item_selected(bool value = true, int do_callback = 0); - bool select_only_this(int do_callback = 0); - bool deselect(int do_callback = 0); - bool make_item_visible(linepos = NOSCROLL); - void damage_item() {damage_item(HERE);} - void damage_item(const Mark&); // make this item redraw - bool set_item_opened(bool); - bool set_item_visible(bool); - - int current_level() const {return HERE.level;} - const int* current_index() const {return HERE.indexes;} - int current_position() const {return HERE.position;} - - int focus_level() const {return FOCUS.level;} - const int* focus_index() const {return FOCUS.indexes;} - int focus_position() const {return FOCUS.position;} - - // Maybe these should be moved to base Menu class: - const int *column_widths() const { return column_widths_p; } - void column_widths(const int *pWidths); - const char **column_labels() const { return column_labels_; } - void column_labels(const char **pLabels); - int selected_column() { return selected_column_; } - int set_column_start(int column, int x); - - Widget *header(int col) { if(col<0 || col>=nHeader) return 0; return header_[col]; } - int nheader() const { return nHeader; } - - // Convienence functions for flat browsers: - void value(int v) {goto_index(v); set_focus();} - int value() const {return FOCUS.indexes[0];} - bool select(int line, bool value = true); - bool selected(int line); - int topline() const {return FIRST_VISIBLE.indexes[0];} - void topline(int line) {goto_index(line); make_item_visible(TOP);} - void bottomline(int line) {goto_index(line); make_item_visible(BOTTOM);} - void middleline(int line) {goto_index(line); make_item_visible();} - bool displayed(int line); - bool display(int line, bool value = true); - - bool display_lines() const; - void display_lines(bool display); - - int load(const char *filename); - - int multi() const {return type()&IS_MULTI;} - - const Symbol* leaf_symbol() const {return leaf_symbol_;} - void leaf_symbol(const Symbol* s) {leaf_symbol_ = s;} - const Symbol* group_symbol() const {return group_symbol_;} - void group_symbol(const Symbol* s) {group_symbol_ = s;} - -protected: - void handle_callback(int doit); // defines how cb are handled in the browser - -private: - bool displaylines_; - bool indented_; - const int *column_widths_; // original column widths - int *column_widths_i; // original column widths after user interaction - int *column_widths_p; // actual column widths - const char **column_labels_; - int xposition_, yposition_; - int width_, height_; - int scrolldx, scrolldy; - static void hscrollbar_cb(Widget*, void*); - static void scrollbar_cb(Widget*, void*); - void draw_item(int); - void draw_clip(const Rectangle&); - static void draw_clip_cb(void*,const Rectangle&); - Rectangle interior; // inside box edges and scrollbars - void set_belowmouse(); - void clear_belowmouse(); - - Widget **header_; - int nHeader, nColumn, selected_column_; - void set_level(unsigned); - enum {NUM_REDRAW = 2}; - Mark HERE, FOCUS, FIRST_VISIBLE, REDRAW[NUM_REDRAW], OPEN, BELOWMOUSE; - - Widget* goto_visible_focus(); // set HERE to focus if visible - - int siblings; // # of children of parent of HERE item - static void column_click_cb_(Widget*, void*); - - const Symbol* leaf_symbol_; - const Symbol* group_symbol_; -}; - -} - -#endif - -// -// End of "$Id: Browser.h 5934 2007-07-23 20:12:39Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Button.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Button.h deleted file mode 100644 index 20606f95..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Button.h +++ /dev/null @@ -1,57 +0,0 @@ -// -// "$Id: Button.h 5433 2006-09-16 03:00:02Z spitzak $" -// -// Push button widget -// -// Copyright 2002 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_Button_h -#define fltk_Button_h - -#ifndef fltk_Widget_h -#include "Widget.h" -#endif - -namespace fltk { - -class FL_API Button : public Widget { -public: - enum {HIDDEN=3}; // back-comptability value to hide the button - - bool value() const { return state(); } - bool value(bool v) { return state(v); } - - int handle(int); - int handle(int event, const Rectangle&); - Button(int,int,int,int,const char * = 0); - static NamedStyle* default_style; - - virtual void draw(); - void draw(int glyph_width) const; -}; - -} - -#endif - -// -// End of "$Id: Button.h 5433 2006-09-16 03:00:02Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/CheckButton.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/CheckButton.h deleted file mode 100644 index 91ebecb8..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/CheckButton.h +++ /dev/null @@ -1,46 +0,0 @@ -// -// "$Id: CheckButton.h 4910 2006-04-06 19:26:22Z fabien $" -// -// Button with a checkmark to the left of it. -// -// Copyright 2002 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -#ifndef fltk_CheckButton_h -#define fltk_CheckButton_h - -#include "Button.h" - -namespace fltk { - -class FL_API CheckButton : public Button { -public: - CheckButton(int x,int y,int w,int h,const char *l = 0); - static NamedStyle* default_style; - - virtual void draw(); -}; - -} - -#endif - -// -// End of "$Id: CheckButton.h 4910 2006-04-06 19:26:22Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Choice.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Choice.h deleted file mode 100644 index 47fff639..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Choice.h +++ /dev/null @@ -1,52 +0,0 @@ -// -// "$Id: Choice.h 4319 2005-05-08 19:18:50Z spitzak $" -// -// Popup list of items that the user can choose one of. Based on Motif -// but modern equivalent is the OS/X popup choices. -// -// This is not a "combo box". You should try this, but if you insist -// on that use the InputBrowser widget. -// -// Copyright 2002 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_Choice_h -#define fltk_Choice_h - -#include "Menu.h" - -namespace fltk { - -class FL_API Choice : public Menu { -public: - int handle(int); - int handle(int, const Rectangle&); - Choice(int,int,int,int,const char * = 0); - static NamedStyle* default_style; - void draw(); -}; - -} - -#endif - -// -// End of "$Id: Choice.h 4319 2005-05-08 19:18:50Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Clock.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Clock.h deleted file mode 100644 index 5ca22a92..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Clock.h +++ /dev/null @@ -1,68 +0,0 @@ -// -// "$Id: Clock.h 5197 2006-06-14 07:43:46Z spitzak $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_Clock_h -#define fltk_Clock_h - -#include "Widget.h" - -namespace fltk { - -// a ClockOutput can be used to display a program-supplied time: - -class FL_API ClockOutput : public Widget { -public: - enum {SQUARE = 0, ANALOG = 0, ROUND, DIGITAL}; - ClockOutput(int x,int y,int w,int h, const char *l = 0); - void value(unsigned long v); // set to this Unix time - void value(int,int,int); // set hour, minute, second - unsigned long value() const {return value_;} - int hour() const {return hour_;} - int minute() const {return minute_;} - int second() const {return second_;} -protected: - void draw(int, int, int, int); - void draw(); -private: - int hour_, minute_, second_; - unsigned long value_; - void drawhands(Color, Color); // part of draw -}; - -// a Clock displays the current time always by using a timeout: - -class FL_API Clock : public ClockOutput { -public: - int handle(int); - void update(); - Clock(int x,int y,int w,int h, const char *l = 0); - static NamedStyle* default_style; -}; - -} - -#endif - -// -// End of "$Id: Clock.h 5197 2006-06-14 07:43:46Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Color.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Color.h deleted file mode 100644 index 4ea49389..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Color.h +++ /dev/null @@ -1,127 +0,0 @@ -// -// "$Id: Color.h 5918 2007-06-26 18:49:21Z spitzak $" -// -// Color value. These are 32-bit unsigned numbers with RGB as the -// upper 3 bytes. The lowest-order byte is treated as an "index" -// for back compatabilty, or as an "alpha", depending on context. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to: -// -// http://www.fltk.org/str.php -// -/*! \file */ - -#ifndef fltk_Color_h -#define fltk_Color_h - -#include "FL_API.h" -#include "Flags.h" - -namespace fltk { - -typedef unsigned Color; - -/*! Symbolic names for some of the indexed colors. - - The 24-entry "gray ramp" is modified by fltk::set_background() so - that the color fltk::GRAY75 is the background color, and the others - are a nice range from black to a lighter version of the gray. These - are used to draw box edges. The gray levels are chosen to be evenly - spaced, listed here is the actual 8-bit and decimal gray level - assigned by default. Also listed here is the letter used for - fltk::FrameBox and the old fltk1.1 names used for these levels. - - The remiander of the colormap is a 5x8x5 color cube. This cube is - used to dither images on 8-bit screens X colormaps to reduce the - number of colors used. -*/ -enum { - NO_COLOR = 0, //!< Black, empty place holder in Style - - FREE_COLOR = 16, //!< Starting from index 16 is the FREE_COLOR area - NUM_FREE_COLOR= 16, //!< Number of free color slots starting from index FREE_COLOR - - GRAY00 = 32, //!< hex=00, dec=.00, framebox=A, fltk1 = GRAY0, GRAY_RAMP - GRAY05 = 33, //!< hex=0d, dec=.05, framebox=B - GRAY10 = 34, //!< hex=1a, dec=.10, framebox=C - GRAY15 = 35, //!< hex=27, dec=.15, framebox=D - GRAY20 = 36, //!< hex=34, dec=.20, framebox=E - GRAY25 = 37, //!< hex=41, dec=.25, framebox=F - GRAY30 = 38, //!< hex=4f, dec=.31, framebox=G - GRAY33 = 39, //!< hex=5c, dec=.36, framebox=H, fltk1 = DARK3 - GRAY35 = 40, //!< hex=69, dec=.41, framebox=I - GRAY40 = 41, //!< hex=76, dec=.46, framebox=J (18% gray card) - GRAY45 = 42, //!< hex=83, dec=.51, framebox=K - GRAY50 = 43, //!< hex=90, dec=.56, framebox=L - GRAY55 = 44, //!< hex=9e, dec=.62, framebox=M - GRAY60 = 45, //!< hex=ab, dec=.67, framebox=N, fltk1 = DARK2 - GRAY65 = 46, //!< hex=b8, dec=.72, framebox=O - GRAY66 = 47, //!< hex=c5, dec=.77, framebox=P, fltk1 = DARK1, INACTIVE_COLOR - GRAY70 = 48, //!< hex=d2, dec=.82, framebox=Q - GRAY75 = 49, //!< hex=e0, dec=.88, framebox=R, fltk1 = GRAY, SELECTION_COLOR - GRAY80 = 50, //!< hex=e5, dec=.90, framebox=S - GRAY85 = 51, //!< hex=ea, dec=.92, framebox=T, fltk1 = LIGHT1 - //unnamed entry hex=ef, dec=.94, framebox=U - GRAY90 = 53, //!< hex=f4, dec=.96, framebox=V, fltk1 = LIGHT2 - GRAY95 = 54, //!< hex=f9, dec=.98, framebox=W - GRAY99 = 55, //!< hex=ff, dec=1.0, framebox=X, fltk1 = LIGHT3 - - BLACK = 0x38, //!< Corner of color cube - RED = 0x58, //!< Corner of color cube - GREEN = 0x3f, //!< Corner of color cube - YELLOW = 0x5f, //!< Corner of color cube - BLUE = 0xd8, //!< Corner of color cube - MAGENTA = 0xf8, //!< Corner of color cube - CYAN = 0xdf, //!< Corner of color cube - WHITE = 0xff, //!< Corner of color cube - - DARK_RED = 72, - DARK_GREEN = 60, - DARK_YELLOW = 76, - DARK_BLUE = 136, - DARK_MAGENTA = 152, - DARK_CYAN = 140, - - WINDOWS_BLUE = 0x88 //!< default selection_color -}; - -inline Color color(unsigned char r, unsigned char g, unsigned char b) { - return Color((r<<24)+(g<<16)+(b<<8)); } -inline Color color(unsigned char g) { - return Color(g*0x1010100u); } -FL_API Color color(const char*); -FL_API Color parsecolor(const char*, unsigned length); -FL_API Color lerp(Color c0, Color c1, float f); -FL_API Color inactive(Color fg); -FL_API Color inactive(Color fg, Color bg); -FL_API Color contrast(Color fg, Color bg); -FL_API void split_color(Color c, unsigned char& r, unsigned char& g, unsigned char& b); -FL_API void set_color_index(Color index, Color); -FL_API Color get_color_index(Color index); -FL_API void set_background(Color); -FL_API Color nearest_index(Color); - -} - -#endif - -// -// End of "$Id: Color.h 5918 2007-06-26 18:49:21Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ColorChooser.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ColorChooser.h deleted file mode 100644 index 44e40243..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ColorChooser.h +++ /dev/null @@ -1,116 +0,0 @@ -// -// "$Id: ColorChooser.h 5197 2006-06-14 07:43:46Z spitzak $" -// -// Color chooser header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -// The color chooser object and the color chooser popup. The popup -// is just a window containing a single color chooser and some boxes -// to indicate the current and cancelled color. - -#ifndef fltk_ColorChooser_h -#define fltk_ColorChooser_h - -#include "Group.h" - -namespace fltk { - -class FL_API ccHueBox : public Widget { - int px, py; -protected: - void draw(); -public: - int handle(int); - ccHueBox(int X, int Y, int W, int H) : Widget(X,Y,W,H) { - px = py = 0;} -}; - -class FL_API ccValueBox : public Widget { - int py; - bool is_alpha() const; -protected: - void draw(); -public: - int handle(int); - ccValueBox(int X, int Y, int W, int H) : Widget(X,Y,W,H) { - py = 0;} -}; - -class FL_API ccCellBox : public Widget { -public: - ccCellBox(int X, int Y, int W, int H) : Widget(X,Y,W,H) {} - void draw(); - int handle(int); -}; - -class FL_API ColorChooser : public Group { - friend class ccHueBox; - friend class ccValueBox; - friend class ccCellBox; - ccHueBox huebox; - ccValueBox valuebox; - ccValueBox alphabox; - ccCellBox cellbox; - float hue_, saturation_, value_; - float r_, g_, b_, a_; - bool no_value_; - bool support_no_value; -public: - float h() const {return hue_;} - float s() const {return saturation_;} - float v() const {return value_;} - float r() const {return r_;} - float g() const {return g_;} - float b() const {return b_;} - float a() const {return a_;} - bool no_value() const {return no_value_;} - bool no_value(bool); - Color value() const; - bool value(Color); - bool hsv(float,float,float); - bool rgb(float,float,float); - bool a(float); - void hide_a(); - void hide_no_value() {support_no_value = false;} - static void hsv2rgb(float, float, float,float&,float&,float&); - static void rgb2hsv(float, float, float,float&,float&,float&); - ColorChooser(int,int,int,int,const char* = 0); - void layout(); - float setcell(int,float,float,float,float); - float getcell(int,float,float,float,float); -}; - -// Convience functions to pop-up a control panel: - -FL_API bool color_chooser(const char* name, float& r, float& g, float& b); -FL_API bool color_chooser(const char* name, float& r, float& g, float& b, float& a); -FL_API bool color_chooser(const char* name, uchar& r, uchar& g, uchar& b); -FL_API bool color_chooser(const char* name, uchar& r, uchar& g, uchar& b, uchar& a); -FL_API bool color_chooser(const char* name, Color& c); - -} - -#endif - -// -// End of "$Id: ColorChooser.h 5197 2006-06-14 07:43:46Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ComboBox.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ComboBox.h deleted file mode 100644 index bdd9be62..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ComboBox.h +++ /dev/null @@ -1,108 +0,0 @@ -// -// -// -// single line input field with predefined choices via popup menu -// -// Copyright 2002 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_ComboBox_h -#define fltk_ComboBox_h - -#include "Choice.h" -#include "Input.h" - -namespace fltk { - -class FL_API ComboBox : public Choice { -public: - ComboBox(int,int,int,int,const char * = 0); - ~ComboBox(); - static NamedStyle* default_style; - - void draw(); - void layout(); - int handle(int); - int popup(const Rectangle&,const char* title=0,bool menubar=false); - - int choice(int v); - int choice() const; - int find_choice() const; - bool text(const char *txt) - { return text_changed_(input_->text(txt)); } - bool text(const char *txt, int n) - { return text_changed_(input_->text(txt, n)); } - bool static_text(const char *txt) - { return text_changed_(input_->static_text(txt)); } - bool static_text(const char *txt, int n) - { return text_changed_(input_->static_text(txt, n)); } - const char* text() const { return input_->text();} - char at(int i) const { return input_->at(i); } - - int size(bool ofText) const - { return ofText ? input_->size() : Choice::size(); } - - int position() const { return input_->position();} - int mark() const { return input_->mark();} - void position(int p, int m) - { input_->position(p, m); text_changed_(); } - void position(int p) { position(p, p); } - void up_down_position(int p, bool m) - { input_->up_down_position(p, m); text_changed_(); } - void mark(int m) { position(position(), m);} - - virtual bool replace(int a, int b, const char *c, int d) - { return text_changed_(input_->replace(a, b, c, d)); } - bool cut() {return replace(position(), mark(), 0, 0);} - bool cut(int n) {return replace(position(), position()+n, 0, 0);} - bool cut(int a, int b) {return replace(a, b, 0, 0);} - bool insert(const char* t, int l=0) - { return replace(input_->position(), input_->mark(), t, l); } - bool replace(int a, int b, char c) { return replace(a,b,&c,1); } - bool copy(bool clipboard = true) { return input_->copy(clipboard); } - bool undo() { return text_changed_(input_->undo()); } - - int word_start(int i) const { return input_->word_start(i); } - int word_end(int i) const { return input_->word_end(i); } - int line_start(int i) const { return input_->line_start(i); } - int line_end(int i) const { return input_->line_end(i); } - int mouse_position(const Rectangle& r) const - { return input_->mouse_position(r); } - int xscroll() const { return input_->xscroll();} - int yscroll() const { return input_->yscroll();} - -protected: - bool text_changed_(bool ret=true); - -private: - Input *input_; -#if defined (_WIN32) || (defined( __GNUC__ ) && __GNUC__ < 3) - public: -#endif - static void input_callback_(Widget*,void*); -}; - -} - -#endif - -// -// -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Cursor.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Cursor.h deleted file mode 100644 index ef59faa8..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Cursor.h +++ /dev/null @@ -1,39 +0,0 @@ -// -// "$Id" -// -// Mouse cursor support for the Fast Light Tool Kit (FLTK). - -// This is likely to change! - -#ifndef fltk_Cursor_h -#define fltk_Cursor_h - -#include "FL_API.h" - -namespace fltk { - -struct Cursor; // this is not public - -class Image; -Cursor* cursor(Image*, int x, int y); -extern FL_API Cursor* cursor(void *raw); - -extern FL_API Cursor* const CURSOR_DEFAULT; // == NULL -extern FL_API Cursor* const CURSOR_ARROW; -extern FL_API Cursor* const CURSOR_CROSS; -extern FL_API Cursor* const CURSOR_WAIT; -extern FL_API Cursor* const CURSOR_INSERT; -extern FL_API Cursor* const CURSOR_HAND; -extern FL_API Cursor* const CURSOR_HELP; -extern FL_API Cursor* const CURSOR_MOVE; -extern FL_API Cursor* const CURSOR_NS; -extern FL_API Cursor* const CURSOR_WE; -extern FL_API Cursor* const CURSOR_NWSE; -extern FL_API Cursor* const CURSOR_NESW; -extern FL_API Cursor* const CURSOR_NO; -extern FL_API Cursor* const CURSOR_NONE; - -} -#endif - -// End of "$Id" diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/CycleButton.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/CycleButton.h deleted file mode 100644 index 3e40c117..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/CycleButton.h +++ /dev/null @@ -1,52 +0,0 @@ -// -// "$Id: CycleButton.h 4910 2006-04-06 19:26:22Z fabien $" -// -// Popup list of items that the user can choose one of. Based on Motif -// but modern equivalent is the OS/X popup choices. -// -// This is not a "combo box". You should try this, but if you insist -// on that use the InputBrowser widget. -// -// Copyright 2004 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_CycleButton_h -#define fltk_CycleButton_h - -#include "Menu.h" - -namespace fltk { - -class FL_API CycleButton : public Menu { -public: - int handle(int); - CycleButton(int,int,int,int,const char * = 0); - static NamedStyle* default_style; -protected: - void draw(); -}; - -} - -#endif - -// -// End of "$Id: CycleButton.h 4910 2006-04-06 19:26:22Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Dial.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Dial.h deleted file mode 100644 index 490f2794..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Dial.h +++ /dev/null @@ -1,64 +0,0 @@ -// -// "$Id: Dial.h 4910 2006-04-06 19:26:22Z fabien $" -// -// Rotating value control -// -// Copyright 2002 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_Dial_h -#define fltk_Dial_h - -#ifndef fltk_Valuator_h -#include "Valuator.h" -#endif - -namespace fltk { - -class FL_API Dial : public Valuator { - -public: - - enum {NORMAL = 0, LINE, FILL}; // values for type() - int handle(int); - Dial(int x,int y,int w,int h, const char *l = 0); - static NamedStyle* default_style; - short angle1() const {return a1;} - void angle1(short a) {a1 = a;} - short angle2() const {return a2;} - void angle2(short a) {a2 = a;} - void angles(short a, short b) {a1 = a; a2 = b;} - -protected: - - void draw(); - -private: - - short a1,a2; - -}; - -} -#endif - -// -// End of "$Id: Dial.h 4910 2006-04-06 19:26:22Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Divider.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Divider.h deleted file mode 100644 index 352b7a38..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Divider.h +++ /dev/null @@ -1,45 +0,0 @@ -// -// "$Id: Divider.h 4910 2006-04-06 19:26:22Z fabien $" -// -// Widget to draw a divider line in a menu -// -// Copyright 2002 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_Divider_h -#define fltk_Divider_h - -#ifndef fltk_Widget_h -# include "Widget.h" -#endif - -namespace fltk { - -class FL_API Divider : public Widget { -public: - void draw(); - void layout(); - int handle(int); - Divider(); -}; - -} - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/DoubleBufferWindow.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/DoubleBufferWindow.h deleted file mode 100644 index b3700b3f..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/DoubleBufferWindow.h +++ /dev/null @@ -1,27 +0,0 @@ -// This class is provided for back compatability only with some fltk2.0 -// versions. You can turn on double buffering on a normal window if -// you want it. - -#ifndef fltk_DoubleBufferWindow_h -#define fltk_DoubleBufferWindow_h - -#ifndef fltk_Window_h -# include "Window.h" -#endif - -namespace fltk { - -class DoubleBufferWindow : public Window { - -public: - DoubleBufferWindow(int x, int y, int w, int h, const char*l = 0) - : Window(x,y,w,h,l) {set_double_buffer();} - - DoubleBufferWindow(int w, int h, const char*l = 0) - : Window(w,h,l) {set_double_buffer();} - -}; - -} - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FL_API.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FL_API.h deleted file mode 100644 index 724133bc..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FL_API.h +++ /dev/null @@ -1,76 +0,0 @@ -// "$Id: FL_API.h 5448 2006-09-19 01:14:07Z spitzak $" -// -// This file is included by all FLTK header files. Originally it was to -// get that damn dllimport/export stuff on Windows. It now also turns -// off warnings on Windows so that you can use stdc functions, and -// defines the uchar type that is used by FLTK a lot. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -#ifndef FL_API - -#if _MSC_VER > 1000 -# pragma once -// suppress vc2005 warnings: -// C4312 because we have no problem to cast a smaller type to a greater (potentially 64bit) one -// and C4996 (deprecated C-lib calls like strcpy that should be _strcpy, etc ...) -# pragma warning(disable:4312 4996) -#endif - -#if !defined(DOXYGEN) && defined(_WIN32) && defined(FL_SHARED) -# ifdef FL_LIBRARY -# define FL_API __declspec(dllexport) -# else -# define FL_API __declspec(dllimport) -# endif -# ifdef FL_IMAGES_LIBRARY -# define FL_IMAGES_API __declspec(dllexport) -# else -# define FL_IMAGES_API __declspec(dllimport) -# endif -# ifdef FL_GLUT_LIBRARY -# define FL_GLUT_API __declspec(dllexport) -# else -# define FL_GLUT_API __declspec(dllimport) -# endif -# ifdef FL_FORMS_LIBRARY -# define FL_FORMS_API __declspec(dllexport) -# else -# define FL_FORMS_API __declspec(dllimport) -# endif -# ifdef FL_GL_LIBRARY -# define FL_GL_API __declspec(dllexport) -# else -# define FL_GL_API __declspec(dllimport) -# endif -#else -# define FL_API -# define FL_IMAGES_API -# define FL_GLUT_API -# define FL_FORMS_API -# define FL_GL_API -#endif - -typedef unsigned char uchar; - -#endif - -// -// End of "$Id: FL_API.h 5448 2006-09-19 01:14:07Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FL_VERSION.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FL_VERSION.h deleted file mode 100644 index 4266ee9b..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FL_VERSION.h +++ /dev/null @@ -1,39 +0,0 @@ -/*! \file - -The FLTK version number. Allows you to write conditionally compiled -code for different versions of FLTK. This file may be included by C -code in case you need it there. - -FL_VERSION is a macro double that describes the major, minor, and -patch version numbers. The integer value is the major number. One -digit is used for the minor number, and three for the "patch" number -which is increased for each binary differnt release (it can go to 999). - -Because double cannot be used in #if statements, the integer -numbers are in the FL_MAJOR_VERSION, FL_MINOR_VERSION, and -FL_PATCH_VERSION macro constants. - -*/ - -#ifndef FL_VERSION - -# define FL_MAJOR_VERSION 2 //!< The major release number, 1 or 2 -# define FL_MINOR_VERSION 1 //!< The minor release number, 0-9 -# define FL_PATCH_VERSION 0 //!< The patch number, 0-999 -# define FL_VERSION 2.1000 - -#if defined(__cplusplus) || defined(DOXYGEN) /* Allow this file to be included by C code */ -#include "FL_API.h" -namespace fltk { - -/*! - Returns the value of FL_VERSION that FLTK was compiled with. - This can be compared to the FL_VERSION macro to see if the shared - library of fltk your program linked with is up to date. -*/ -FL_API double version(); - -} -#endif - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FileBrowser.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FileBrowser.h deleted file mode 100644 index 5e86355f..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FileBrowser.h +++ /dev/null @@ -1,95 +0,0 @@ -// -// "$Id: FileBrowser.h 4926 2006-04-10 21:03:29Z fabien $" -// -// FileBrowser definitions. -// -// Copyright 1999-2006 by Michael Sweet. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -// -// Include necessary header files... -// - -#ifndef fltk_FileBrowser_h -#define fltk_FileBrowser_h - -#include <fltk/Browser.h> -#include <fltk/FileIcon.h> -#include <fltk/filename.h> - -namespace fltk { - - -// -// FileBrowser class... -// - -class FL_API FileBrowser : public Browser -{ - int filetype_; - const char *directory_; - float icon_size_; - const char *pattern_; - -public: - enum { FILES, DIRECTORIES }; - - FileBrowser(int, int, int, int, const char * = 0); - - float icon_size() const { - return (icon_size_ <0? (2.0f* textsize()) : icon_size_); - } - void icon_size(float f) { icon_size_ = f; redraw(); }; - - void filter(const char *pattern); - const char *filter() const { return (pattern_); }; - - int load(const char *directory, File_Sort_F *sort = (File_Sort_F*) fltk::numericsort); - - float textsize() const { return (Browser::textsize()); }; - void textsize(float s) { Browser::textsize(s); icon_size_ = (uchar)(3 * s / 2); }; - - int filetype() const { return (filetype_); }; - void filetype(int t) { filetype_ = t; }; - const char * directory() const {return directory_;} - - // adding or inserting a line into the fileBrowser - void insert(int n, const char* label, FileIcon* icon); - void insert(int n, const char* label, void* data){Menu::insert(n, label,data);} - void add(const char * line, FileIcon* icon); - - // Showing or not showing the hidden files, that's the question: -public: - // sets this flag if you want to see the hidden files in the browser - void show_hidden(bool show) { show_hidden_= show; } - bool show_hidden() const {return show_hidden_;} -private: - bool show_hidden_; -}; - -} - -#endif // !_Fl_File_Browser_H_ - -// -// End of "$Id: FileBrowser.h 4926 2006-04-10 21:03:29Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FileChooser.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FileChooser.h deleted file mode 100644 index 0e9927c8..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FileChooser.h +++ /dev/null @@ -1,165 +0,0 @@ -// generated by Fast Light User Interface Designer (fluid) version 2.0100 - -#ifndef FileChooser_h -#define FileChooser_h -// Header for //\n// "$Id: FileChooser.fl 5067 2006-05-02 12:00... -#include <fltk/DoubleBufferWindow.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <fltk/Group.h> -#include <fltk/Choice.h> -#include <fltk/PopupMenu.h> -#include <fltk/Button.h> -#include <fltk/Preferences.h> -#include <fltk/TiledGroup.h> -#include <fltk/FileBrowser.h> -#include <fltk/InvisibleBox.h> -#include <fltk/CheckButton.h> -#include <fltk/FileInput.h> -#include <fltk/ReturnButton.h> -#include <fltk/ask.h> - -namespace fltk { - -class FL_API FileChooser { -public: - enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 }; -private: - static fltk::Preferences prefs_; - void (*callback_)(FileChooser*, void *); - void *data_; - char directory_[1024]; - char pattern_[1024]; - char preview_text_[2048]; - int type_; - void favoritesButtonCB(); - void favoritesCB(fltk::Widget *w); - void fileListCB(); - void fileNameCB(); - void newdir(); - static void previewCB(FileChooser *fc); - void showChoiceCB(); - void update_favorites(); - void update_preview(); -public: - FileChooser(const char *d, const char *p, int t, const char *title); -private: - fltk::DoubleBufferWindow *window; - inline void cb_window_i(fltk::DoubleBufferWindow*, void*); - static void cb_window(fltk::DoubleBufferWindow*, void*); - fltk::Choice *showChoice; - inline void cb_showChoice_i(fltk::Choice*, void*); - static void cb_showChoice(fltk::Choice*, void*); - int favorites_showing; - fltk::PopupMenu *favoritesButton; - inline void cb_favoritesButton_i(fltk::PopupMenu*, void*); - static void cb_favoritesButton(fltk::PopupMenu*, void*); -public: - fltk::Button *newButton; -private: - inline void cb_newButton_i(fltk::Button*, void*); - static void cb_newButton(fltk::Button*, void*); - inline void cb__i(fltk::TiledGroup*, void*); - static void cb_(fltk::TiledGroup*, void*); - fltk::FileBrowser *fileList; - inline void cb_fileList_i(fltk::FileBrowser*, void*); - static void cb_fileList(fltk::FileBrowser*, void*); - fltk::InvisibleBox *previewBox; -public: - fltk::CheckButton *previewButton; -private: - inline void cb_previewButton_i(fltk::CheckButton*, void*); - static void cb_previewButton(fltk::CheckButton*, void*); -public: - fltk::CheckButton *showHiddenButton; -private: - inline void cb_showHiddenButton_i(fltk::CheckButton*, void*); - static void cb_showHiddenButton(fltk::CheckButton*, void*); - fltk::FileInput *fileName; - inline void cb_fileName_i(fltk::FileInput*, void*); - static void cb_fileName(fltk::FileInput*, void*); - fltk::ReturnButton *okButton; - inline void cb_okButton_i(fltk::ReturnButton*, void*); - static void cb_okButton(fltk::ReturnButton*, void*); - fltk::Button *cancelButton; - inline void cb_cancelButton_i(fltk::Button*, void*); - static void cb_cancelButton(fltk::Button*, void*); - fltk::DoubleBufferWindow *favWindow; - fltk::FileBrowser *favList; - inline void cb_favList_i(fltk::FileBrowser*, void*); - static void cb_favList(fltk::FileBrowser*, void*); - fltk::Button *favUpButton; - inline void cb_favUpButton_i(fltk::Button*, void*); - static void cb_favUpButton(fltk::Button*, void*); - fltk::Button *favDeleteButton; - inline void cb_favDeleteButton_i(fltk::Button*, void*); - static void cb_favDeleteButton(fltk::Button*, void*); - fltk::Button *favDownButton; - inline void cb_favDownButton_i(fltk::Button*, void*); - static void cb_favDownButton(fltk::Button*, void*); - fltk::Button *favCancelButton; - inline void cb_favCancelButton_i(fltk::Button*, void*); - static void cb_favCancelButton(fltk::Button*, void*); - fltk::ReturnButton *favOkButton; - inline void cb_favOkButton_i(fltk::ReturnButton*, void*); - static void cb_favOkButton(fltk::ReturnButton*, void*); -public: - ~FileChooser(); - void callback(void (*cb)(FileChooser *, void *), void *d = 0); - void color(Color c); - Color color(); - int count(); - void directory(const char *d); - char * directory(); - void filter(const char *p); - const char * filter(); - int filter_value(); - void filter_value(int f); - void hide(); - void icon_size(uchar s); - uchar icon_size(); - void label(const char *l); - const char * label(); - void ok_label(const char *l); - const char * ok_label(); - void preview(int e); - int preview() const { return previewButton->value(); }; - void rescan(); - void show(); - void show(int x, int y); - int shown(); - void textcolor(Color c); - Color textcolor(); - void textfont(Font* f); - Font* textfont(); - void textsize(float s); - float textsize(); - void type(int t); - int type(); - void * user_data() const; - void user_data(void *d); - const char *value(int f = 1); - void value(const char *filename); - int visible(); - void favorites(int e); - int favorites() const; - static const char *add_favorites_label; - static const char *all_files_label; - static const char *custom_filter_label; - static const char *existing_file_label; - static const char *favorites_label; - static const char *filename_label; - static const char *filesystems_label; - static const char *manage_favorites_label; - static const char *new_directory_label; - static const char *new_directory_tooltip; - static const char *preview_label; - static const char *save_label; - static const char *show_label; - static File_Sort_F *sort; -}; -extern FL_API void file_chooser_ok_label(const char*l); -} -// Header for //\n// End of "$Id: FileChooser.fl 5067 2006-05-0... -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FileIcon.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FileIcon.h deleted file mode 100644 index e92bca64..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FileIcon.h +++ /dev/null @@ -1,114 +0,0 @@ -// -// "$Id: FileIcon.h 5576 2007-01-03 00:20:28Z spitzak $" -// -// Fl_FileIcon definitions for the Fast Light Tool Kit (FLTK). -// -// Copyright 1997-1999 by Easy Software Products. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_FileIcon_h -#define fltk_FileIcon_h - -#include "FL_API.h" -#include "Color.h" -#include "Symbol.h" - -namespace fltk { - -class Widget; - -class FL_API FileIcon : public Symbol { - static FileIcon *first_; // Pointer to first icon/filetype - FileIcon *next_; // Pointer to next icon/filetype - const char *pattern_; // Pattern string - int type_; // Match only if directory or file? - int num_data_; // Number of data elements - int alloc_data_; // Number of allocated elements - short *data_; // Icon data - int w_,h_; - bool on_select_; // true if in browser or menu -public: - - enum // File types - { - ANY, // Any kind of file - PLAIN, // Only plain files - FIFO, // Only named pipes - DEVICE, // Only character and block devices - LINK, // Only symbolic links - DIRECTORY // Only directories - }; - - enum // Data opcodes - { - END, // End of primitive/icon - COLOR, // Followed by color index - LINE, // Start of line - CLOSEDLINE, // Start of closed line - POLYGON, // Start of polygon - OUTLINEPOLYGON, // Followed by outline color - VERTEX // Followed by scaled X,Y - }; - - FileIcon(const char *p, int t, int nd = 0, short *d = 0); - FileIcon(const FileIcon& f) ; - ~FileIcon(); - - short *add(short d); - short *add_color(Color c) - { short *d = add((short)COLOR); add((short)(c >> 16)); add((short)c); return (d); } - short *add_vertex(int x, int y) - { short *d = add(VERTEX); add(x); add(y); return (d); } - short *add_vertex(float x, float y) - { short *d = add(VERTEX); add((int)(x * 10000.0)); - add((int)(y * 10000.0)); return (d); } - void clear() { num_data_ = 0; } - - const Symbol* image() const {return image_;} - - void load(const char *f); - const char *pattern() { return (pattern_); } - int size() { return (num_data_); } - int type() { return (type_); } - short *data() { return (data_); } - - static FileIcon *find(const char *filename, int filetype = ANY); - static FileIcon *first() { return (first_); } - static void load_system_icons(void); - - void value(Widget* i, bool on_select=false); - - // virtual image overloads - void _measure(int& w, int& h) const; - void _draw(const Rectangle& r) const; -private: - void image(const Symbol* direct_raster, bool owned=true) {image_=direct_raster;owned_image_=owned;} - void load_fti(const char *fti); - const Symbol* image_; - bool owned_image_; -}; - -} - -#endif - -// -// End of "$Id: FileIcon.h 5576 2007-01-03 00:20:28Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FileInput.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FileInput.h deleted file mode 100644 index 414831fa..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FileInput.h +++ /dev/null @@ -1,67 +0,0 @@ -// -// "$Id: FileInput.h 4886 2006-03-30 09:55:32Z fabien $" -// -// File_Input header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2006 by Bill Spitzak and others. -// Original version Copyright 1998 by Curtis Edwards. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -#ifndef fltk_FileInput_H -# define fltk_FileInput_H - -# include "Input.h" - -namespace fltk { - -class FL_API FileInput : public Input { - Color errorcolor_; - char ok_entry_; - short buttons_[120]; - short pressed_; - - void draw_buttons(); - int handle_button(int event); - void update_buttons(); - -public: - - FileInput(int,int,int,int,const char *t=0); - - void draw_boxes(bool pressed, const Rectangle& r); - virtual int handle(int); - virtual void draw(); - - Color errorcolor() const { return errorcolor_; } - void errorcolor(Color c) { errorcolor_ = c; } - int text(const char*); - int text(const char*, int); - const char * text() { return Input::text(); } -}; - -} -#endif // !Fl_File_Input_H - - -// -// End of "$Id: FileInput.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FillDial.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FillDial.h deleted file mode 100644 index 747b90b7..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FillDial.h +++ /dev/null @@ -1,44 +0,0 @@ -// -// "$Id: FillDial.h 4910 2006-04-06 19:26:22Z fabien $" -// -// Copyright 2002 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_FillDial_h -#define fltk_FillDial_h - -#include "Dial.h" - -namespace fltk { - -/*! Dial but the constructor sets type() to FILL, so it draws a pie slice. */ -class FL_API FillDial : public Dial { -public: - FillDial(int x,int y,int w,int h, const char *l = 0) - : Dial(x,y,w,h,l) {type(FILL);} -}; - -} - -#endif - -// -// End of "$Id: FillDial.h 4910 2006-04-06 19:26:22Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FillSlider.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FillSlider.h deleted file mode 100644 index 7384753d..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FillSlider.h +++ /dev/null @@ -1,44 +0,0 @@ -// -// "$Id: FillSlider.h 5450 2006-09-19 02:33:42Z spitzak $" -// -// Copyright 2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_FillSlider_h -#define fltk_FillSlider_h - -#include "Slider.h" - -namespace fltk { - -/*! Vertical Slider that is filled from the end (like a progress bar) */ -class FL_API FillSlider : public Slider { -public: - FillSlider(int x,int y,int w,int h,const char *l=0) - : Slider(x,y,w,h,l) {slider_size(0);} -}; - -} - -#endif - -// -// End of "$Id: FillSlider.h 5450 2006-09-19 02:33:42Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Flags.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Flags.h deleted file mode 100644 index 15580918..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Flags.h +++ /dev/null @@ -1,109 +0,0 @@ -// -// "$Id: Flags.h 5433 2006-09-16 03:00:02Z spitzak $" -// -// Unified flags set for fltk. These flags control the appearance of -// boxes and widgets. This same value is used to: -// -// 1. store state and other information in a widget or menu item -// 2. provide hints to boxes, labeltypes, and images for how to draw -// 3. provide structural information to an array of menu items -// -// These are shared because various parts of the code, especially -// drawing, want all of this information at once, and providing it -// as a single word is the easiest way. -// - -// Copyright 2002 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -#ifndef fltk_Flags_h -#define fltk_Flags_h - -namespace fltk { - -/*! \file */ - -/*! Type returned by fltk::Widget::flags() and passed to fltk::Box - and many other drawing functions. */ -typedef int Flags; - -/*! For back compatability with fltk1.1 */ -typedef Flags Align; // for back compatability -enum { - NO_FLAGS = 0x00000000, - - // from Align, values are comptable with fltk 1.0: - // These control the location and appearance of labels: - // Warning: unused numbers may change behavior! - ALIGN_TOP = 0x00000001, //!< Label is centered above widget - ALIGN_BOTTOM = 0x00000002, //!< Label is centered below widget - ALIGN_LEFT = 0x00000004, //!< Label is to left of widget - ALIGN_RIGHT = 0x00000008, //!< Label is to right of widget - ALIGN_CENTER = 0x00000010, //!< (0) The label is centered inside widget - ALIGN_INSIDE = 0x00000020, //!< Label is inside widget, image centered - ALIGN_CLIP = 0x00000040, //!< The label is clipped to the widget - ALIGN_WRAP = 0x00000080, //!< The label is word-wrapped - ALIGN_MASK = 0x000000FF, //!< Used to split align() from flags() - ALIGN_POSITIONMASK = 0x0000000F, //!< Used to split align() from flags() - - ALIGN_TOPLEFT = (ALIGN_TOP|ALIGN_LEFT), //!< Label is left-justified above widget - ALIGN_BOTTOMLEFT = (ALIGN_BOTTOM|ALIGN_LEFT), //!< Label is left-justified below widget - ALIGN_TOPRIGHT = (ALIGN_TOP|ALIGN_RIGHT), //!< Label is right-justified above widget - ALIGN_BOTTOMRIGHT = (ALIGN_BOTTOM|ALIGN_RIGHT), //!< Label is right-justified below widget - ALIGN_CENTERLEFT = (ALIGN_CENTER|ALIGN_LEFT), //!< Label is centered in space left of widget - ALIGN_CENTERRIGHT = (ALIGN_CENTER|ALIGN_RIGHT), //!< Label is centered in space left of widget - ALIGN_INSIDE_TOP = (ALIGN_INSIDE|ALIGN_TOP), //!< Label is inside widget at top - ALIGN_INSIDE_BOTTOM = (ALIGN_INSIDE|ALIGN_BOTTOM), //!< Label is inside widget at bottom - ALIGN_INSIDE_LEFT = (ALIGN_INSIDE|ALIGN_LEFT), //!< Label is inside widget at left - ALIGN_INSIDE_TOPLEFT = (ALIGN_INSIDE|ALIGN_TOPLEFT), //!< Label is inside widget at top left - ALIGN_INSIDE_BOTTOMLEFT = (ALIGN_INSIDE|ALIGN_BOTTOMLEFT),//!< Label is inside widget at bottom left - ALIGN_INSIDE_RIGHT = (ALIGN_INSIDE|ALIGN_RIGHT), //!< Label is inside widget at right - ALIGN_INSIDE_TOPRIGHT = (ALIGN_INSIDE|ALIGN_TOPRIGHT), //!< Label is inside widget at top right - ALIGN_INSIDE_BOTTOMRIGHT= (ALIGN_INSIDE|ALIGN_BOTTOMRIGHT),//!< Label is inside widget bottom right - ALIGN_MENU = (ALIGN_INSIDE_LEFT|ALIGN_CLIP), //!< Label is inside widget bottom right - ALIGN_BROWSER = ALIGN_MENU, //!< Label is inside widget bottom right - - INACTIVE = 0x00000100, //!< !active() - OUTPUT = 0x00000200, //!< does not get events, draw text colors - STATE = 0x00000400, //!< state(), value() for buttons - SELECTED = 0x00000800, //!< chosen in browser/menu, draw selected colors - INVISIBLE = 0x00001000, //!< !visible(), draw_frame() - HIGHLIGHT = 0x00002000, //!< draw highlighted - CHANGED = 0x00004000, //!< value changed since last callback - COPIED_LABEL = 0x00008000, //!< copy_label() was called - RAW_LABEL = 0x00010000, //!< don't interpret & or @ in label - LAYOUT_VERTICAL = 0x00020000, //!< fltk::Pack puts this widget vertical - TAB_TO_FOCUS = 0x00040000, //!< Widget::tab_to_focus(); - CLICK_TO_FOCUS = 0x00080000, //!< Widget::click_to_focus() - INACTIVE_R = 0x00100000, //!< draw it grayed-out - FOCUSED = 0x00200000, //!< draw with keyboard focus - PUSHED = 0x00400000, //!< draw pushed-in - RESIZE_NONE = 0, //!< default behavior - RESIZE_FIT = 0x01000000, //!< proportionnaly resize img in widget - RESIZE_FILL = 0x00800000, //!< resize img to fill the widget - OPENED = STATE //!< opened browser hierarchy parent -}; - -} - -#endif - -// -// End of "$Id: Flags.h 5433 2006-09-16 03:00:02Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FloatInput.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FloatInput.h deleted file mode 100644 index 28f5da6b..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/FloatInput.h +++ /dev/null @@ -1,51 +0,0 @@ -// -// "$Id: FloatInput.h 4886 2006-03-30 09:55:32Z fabien $" -// -// NumericInput modified to only allow floating point to by -// typed. Currently this is implemented by the base class by checking -// type() but this may change in the future. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_FloatInput_h -#define fltk_FloatInput_h - -#include "NumericInput.h" - -namespace fltk { - -class FL_API FloatInput : public NumericInput { - virtual bool replace(int, int, const char*, int); -public: - enum { FLOAT = 1, INT = 2 }; - FloatInput(int x,int y,int w,int h,const char *l = 0) - : NumericInput(x,y,w,h,l) { type(FLOAT); } - long lvalue() const; - int ivalue() const { return int(lvalue()); } - double fvalue() const; -}; - -} -#endif - -// -// End of "$Id: FloatInput.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Font.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Font.h deleted file mode 100644 index ee02a7f3..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Font.h +++ /dev/null @@ -1,70 +0,0 @@ -// -// "$Id: Font.h 5461 2006-09-19 02:49:30Z spitzak $" -// -// Copyright 2004 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -#ifndef fltk_Font_h -#define fltk_Font_h - -#include "Style.h" - -namespace fltk { - -enum { // values for attributes: - BOLD = 1, - ITALIC = 2, - BOLD_ITALIC = 3 -}; - -struct FL_API Font { - const char* name_; - int attributes_; - // other fields are added here! - - const char* name() const; - - const char* name(int* p) {*p = attributes_; return name_;} - - Font* plus(int attributes); - Font* bold() {return plus(BOLD);} - Font* italic() {return plus(ITALIC);} - - int sizes(int*&); - - int encodings(const char**&); - - const char* system_name(); - - static const char* current_name(); - -}; - -// Find a Font from a name and attributes: -FL_API Font* font(const char* name, int attrib = 0); - -// Find a Font from an fltk1 integer font id: -FL_API Font* font(int); - -// Find and return every font on the system. -FL_API int list_fonts(Font**& arrayp); - -} - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/GlWindow.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/GlWindow.h deleted file mode 100644 index a7a4d63c..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/GlWindow.h +++ /dev/null @@ -1,108 +0,0 @@ -// -// "$Id: GlWindow.h 5892 2007-06-08 18:15:37Z spitzak $" -// -// OpenGL window. You must subclass this and implement draw() if -// you want this to work. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -#ifndef fltk_GlWindow_h -#define fltk_GlWindow_h - -#include "Window.h" - -namespace fltk { - -#ifndef GLContext // you can define this to the correct type if wanted -typedef void* GLContext; //!< Actually a GLXContext or HGLDC -#endif - -class GlChoice; // structure to hold result of glXChooseVisual -class GlOverlay; // used by X version for the overlay - -enum { - NO_AUTO_SWAP = 1024, - NO_ERASE_OVERLAY = 2048 -}; - -class FL_GL_API GlWindow : public Window { - -public: - - void create(); - void flush(); - void destroy(); - void layout(); - - char valid() const {return valid_;} - void valid(char i) {valid_ = i;} - void invalidate(); - - int mode() const {return mode_;} - bool mode(int a); - static bool can_do(int); - bool can_do() const {return can_do(mode_);} - - GLContext context() const {return context_;} - // this wrapper is so c++mangled name does not depend on GLContext type: - void context(GLContext v, bool destroy_flag = false) {_context(v,destroy_flag);} - void make_current(); - void swap_buffers(); - void ortho(); - - bool can_do_overlay(); - void redraw_overlay(); - void hide_overlay(); - void make_overlay_current(); - - ~GlWindow(); - GlWindow(int W, int H, const char *l=0) : Window(W,H,l) {init();} - GlWindow(int X, int Y, int W, int H, const char *l=0) - : Window(X,Y,W,H,l) {init();} - - virtual void draw() = 0; - virtual void draw_overlay(); - - virtual int handle( int event ); - -private: - - int mode_; - GlChoice *gl_choice; - GLContext context_; - void _context(void*, bool destroy_flag); - char valid_; - char damage1_; // damage() of back buffer - void init(); - - void *overlay; - void make_overlay(); - friend class GlOverlay; - - void draw_swap(); -}; - -} - -#endif - -// -// End of "$Id: GlWindow.h 5892 2007-06-08 18:15:37Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Group.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Group.h deleted file mode 100644 index 593fa2a4..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Group.h +++ /dev/null @@ -1,115 +0,0 @@ -// -// "$Id: Group.h 5915 2007-06-19 17:49:29Z spitzak $" -// -// Group is the base class for all container widgets. For historical -// reasons it also provides a default version of layout. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_Group_h -#define fltk_Group_h - -#ifndef fltk_Widget_h -# include "Widget.h" -#endif - -namespace fltk { - -class FL_API Group : public Widget { -public: - - int children() const {return children_;} - Widget* child(int n) const {return array_[n];} - - void draw(); - void layout(); - int handle(int); - - void begin() {current_ = this;} - void end() {current_ = (Group*)parent();} - static Group *current() {return current_;} - static void current(Group *g) {current_ = g;} - - int find(const Widget*) const; - int find(const Widget& o) const {return find(&o);} - - Group(int,int,int,int, const char * = 0, bool begin=false); - virtual ~Group(); - void add(Widget&); - void add(Widget* o) {add(*o);} - void insert(Widget&, int index); - void insert(Widget& o, Widget* before) {insert(o,find(before));} - void remove(int index); - void remove(Widget& o) {remove(find(o));} - void remove(Widget* o) {remove(find(*o));} - void remove_all(); - void replace(int index, Widget&); - void replace(Widget& old, Widget& o) {replace(find(old),o);} - void swap(int indexA, int indexB); - void clear(); - - void resizable(Widget& o) {resizable_ = &o;} - void resizable(Widget* o) {resizable_ = o;} - Widget* resizable() const {return resizable_;} - void add_resizable(Widget& o) {resizable_ = &o; add(o);} - void init_sizes(); - - void focus_index(int v) {focus_index_ = v;} - void set_focus(Widget* w) {focus_index_ = find(w);} - int focus_index() const {return focus_index_;} - static int navigation_key(); - - // back compatability function: - friend FL_FORMS_API void end_group(); // forms emulation function - void fix_old_positions(); - - Flags resize_align() const {return resize_align_;} - void resize_align(Flags f) {resize_align_ = f;} - -protected: - - void draw_child(Widget&) const; - void update_child(Widget&) const; - void draw_outside_label(Widget&) const ; - int initial_w, initial_h; - int* sizes(); - void layout(const Rectangle&, int layout_damage); - -private: - - int children_; - int focus_index_; - Widget** array_; - Widget* resizable_; - Flags resize_align_; - int *sizes_; // remembered initial sizes of children - - static Group *current_; - -}; - -} - -#endif - -// -// End of "$Id: Group.h 5915 2007-06-19 17:49:29Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/HelpDialog.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/HelpDialog.h deleted file mode 100644 index 587cbdc6..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/HelpDialog.h +++ /dev/null @@ -1,66 +0,0 @@ -// generated by Fast Light User Interface Designer (fluid) version 2.0100 - -#ifndef HelpDialog_h -#define HelpDialog_h -// Header for //\n// "$Id: HelpDialog.fl 4721 2005-12-19 16:52:... -#include <fltk/DoubleBufferWindow.h> -#include <fltk/HelpView.h> -#include <fltk/Group.h> -#include <fltk/Button.h> -#include <fltk/Input.h> - -namespace fltk { - -class FL_IMAGES_API HelpDialog { - int index_; - int max_; - int line_[100]; - char file_[100][256]; - int find_pos_; -public: - HelpDialog(); -private: - fltk::DoubleBufferWindow *window_; - fltk::HelpView *view_; - inline void cb_view__i(fltk::HelpView*, void*); - static void cb_view_(fltk::HelpView*, void*); - inline void cb_Close_i(fltk::Button*, void*); - static void cb_Close(fltk::Button*, void*); - fltk::Button *back_; - inline void cb_back__i(fltk::Button*, void*); - static void cb_back_(fltk::Button*, void*); - fltk::Button *forward_; - inline void cb_forward__i(fltk::Button*, void*); - static void cb_forward_(fltk::Button*, void*); - fltk::Button *smaller_; - inline void cb_smaller__i(fltk::Button*, void*); - static void cb_smaller_(fltk::Button*, void*); - fltk::Button *larger_; - inline void cb_larger__i(fltk::Button*, void*); - static void cb_larger_(fltk::Button*, void*); - fltk::Input *find_; - inline void cb_find__i(fltk::Input*, void*); - static void cb_find_(fltk::Input*, void*); -public: - ~HelpDialog(); - int h(); - void hide(); - void load(const char *f); - void position(int xx, int yy); - void resize(int xx, int yy, int ww, int hh); - void show(); - void show(int argc, char **argv); - void textsize(uchar s); - uchar textsize(); - void topline(const char *n); - void topline(int n); - void value(const char *f); - const char * value() const; - int visible(); - int w(); - int x(); - int y(); -}; -} -// Header for //\n// End of "$Id: HelpDialog.fl 4721 2005-12-19... -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/HelpView.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/HelpView.h deleted file mode 100644 index 152cf291..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/HelpView.h +++ /dev/null @@ -1,201 +0,0 @@ -// -// "$Id: HelpView.h 5860 2007-05-30 18:32:26Z sanel.z $" -// -// Help Viewer widget definitions. -// -// Copyright 1997-2006 by Easy Software Products. -// Image support donated by Matthias Melcher, Copyright 2000. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef HelpView_H -# define HelpView_H - -// -// Include necessary header files... -// - -# include <stdio.h> -# include <fltk/Group.h> -# include <fltk/Scrollbar.h> -# include <fltk/draw.h> -# include <fltk/SharedImage.h> - -namespace fltk { - -// -// HelpFunc type - link callback function for files... -// - - -typedef const char *(HelpFunc) (Widget *, const char *); - - -// -// HelpBlock structure... -// - -struct HelpBlock { - const char *start, // Start of text - *end; // End of text - uchar border; // Draw border? - Color bgcolor; // Background color - int x, // Indentation/starting X coordinate - y, // Starting Y coordinate - w, // Width - h; // Height - int line[32]; // Left starting position for each line -}; - -// -// HelpLink structure... -// - -struct HelpLink { - char filename[192], // Reference filename - name[32]; // Link target (blank if none) - int x, // X offset of link text - y, // Y offset of link text - w, // Width of link text - h; // Height of link text -}; - -// -// HelpTarget structure... -// - -struct HelpTarget { - char name[32]; // Target name - int y; // Y offset of target -}; - -// -// HelpView class... -// - -class FL_API HelpView : public Group //// Help viewer widget -{ - enum { RIGHT = -1, CENTER, LEFT }; // Alignments - - char title_[1024]; // Title string - Color defcolor_, // Default text color - bgcolor_, // Background color - textcolor_, // Text color - linkcolor_; // Link color - Font *textfont_; // Default font for text - int textsize_; // Default font size - const char *value_; // HTML text value - - int nblocks_, // Number of blocks/paragraphs - ablocks_; // Allocated blocks - HelpBlock *blocks_; // Blocks - - int nfonts_; // Number of fonts in stack - Font *fonts_[100]; // Font stack - int fontsizes_[100]; - - HelpFunc *link_; // Link transform function - - int nlinks_, // Number of links - alinks_; // Allocated links - HelpLink *links_; // Links - - int ntargets_, // Number of targets - atargets_; // Allocated targets - HelpTarget *targets_; // Targets - - char directory_[1024]; // Directory for current file - char filename_[1024]; // Current filename - int topline_, // Top line in document - leftline_, // Lefthand position - size_, // Total document length - hsize_; // Maximum document width - Scrollbar *scrollbar_, // Vertical scrollbar for document - *hscrollbar_; // Horizontal scrollbar - - HelpBlock *add_block (const char *s, int xx, int yy, int ww, int hh, - uchar border = 0); - void add_link (const char *n, int xx, int yy, int ww, int hh); - void add_target (const char *n, int yy); - static int compare_targets (const HelpTarget * t0, - const HelpTarget * t1); - int do_align (HelpBlock * block, int line, int xx, int a, int &l); - void write_text (const char * buf, const char * ptr, int X, int Y, int X1, int underline); - void draw (); - void format (); - void format_table (int *table_width, int *columns, const char *table); - int get_align (const char *p, int a); - const char *get_attr (const char *p, const char *n, char *buf, int bufsize); - Color get_color (const char *n, Color c); - SharedImage *get_image (const char *name, int W, int H); - int get_length (const char *l); - int handle (int); - - void initfont (Font *&f, int &s); - void pushfont (Font *f, int s); - void popfont (Font *&f, int &s); - -public: - - HelpView (int xx, int yy, int ww, int hh, const char *l = 0); - - ~HelpView (); - const char *directory () const { - if (directory_[0]) - return (directory_); - else - return ((const char *) 0); - } - const char *filename () const { - if (filename_[0]) - return (filename_); - else - return ((const char *) 0); - } void link (HelpFunc * fn) { - link_ = fn; - } - int load (const char *f); - void layout(); - int size () const { return (size_); } - - void textcolor (Color c); - void textfont (Font *f); - void textsize (int s); - - Color textcolor () const { return (defcolor_); } - Font *textfont () const { return (textfont_); } - int textsize () const { return (textsize_); } - const char *title () { return (title_); } - void topline (const char *n); - void topline (int); - int topline () const { return (topline_); } - void leftline (int); - int leftline () const { return (leftline_); } - void value (const char *v); - const char *value () const { return (value_); } - int find (const char *s,int p); -}; - -} // namespace fltk - -#endif // !HelpView_H - -// -// End of "$Id: HelpView.h 5860 2007-05-30 18:32:26Z sanel.z $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/HighlightButton.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/HighlightButton.h deleted file mode 100644 index fc496189..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/HighlightButton.h +++ /dev/null @@ -1,45 +0,0 @@ -// -// "$Id: HighlightButton.h 4886 2006-03-30 09:55:32Z fabien $" -// -// This button highlights even if the default style does not do so. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_HighlightButton_h -#define fltk_HighlightButton_h - -#include "Button.h" - -namespace fltk { - -class FL_API HighlightButton : public Button { -public: - HighlightButton(int x,int y,int w,int h,const char *l=0); - static NamedStyle* default_style; -}; - -} - -#endif - -// -// End of "$Id: HighlightButton.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Image.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Image.h deleted file mode 100644 index b3ec7146..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Image.h +++ /dev/null @@ -1,116 +0,0 @@ -// "$Id: Image.h 5768 2007-04-08 19:58:56Z spitzak $" -// -// Copyright 1998-2005 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -#ifndef fltk_Image_h -#define fltk_Image_h - -#include "Symbol.h" -# undef OPAQUE // fix for windows.h - -namespace fltk { - -class FL_API Widget; -struct Picture; // secret internal system-specific data - -class FL_API Image : public Symbol { - - PixelType pixeltype_; int w_, h_; - Picture* picture; - int flags; enum {COPIED=1, FETCHED=2, FORCEARGB32=4, MEASUREFETCH=8}; - - static unsigned long memused_; - -public: - - Image(const char* name=0) : - Symbol(name), pixeltype_(fltk::RGB32), w_(12), h_(12), - picture(0), flags(MEASUREFETCH) {} - Image(int w, int h, const char* name=0) : - Symbol(name), pixeltype_(fltk::RGB32), w_(w), h_(h), - picture(0), flags(0) {} - Image(PixelType p, int w, int h, const char* name=0) : - Symbol(name), pixeltype_(p), w_(w), h_(h), - picture(0), flags(0) {} - Image(const uchar* d, PixelType p, int w, int h) : - Symbol(), picture(0) {setimage(d,p,w,h);} - Image(const uchar* d, PixelType p, int w, int h, int linedelta) : - Symbol(), picture(0) {setimage(d,p,w,h,linedelta);} - ~Image(); - - PixelType pixeltype() const {return pixeltype_;} - int depth() const {return fltk::depth(pixeltype_);} - int w() const {return w_;} - int width() const {return w_;} - int h() const {return h_;} - int height() const {return h_;} - - void setpixeltype(PixelType); - void setsize(int w, int h); - void setpixels(const uchar* d, const Rectangle&, int linedelta); - void setpixels(const uchar* d, const Rectangle& r) {setpixels(d,r,depth()*r.w());} - void setpixels(const uchar* d, int y); - uchar* linebuffer(int y); - - void setimage(const uchar* d, PixelType p, int w, int h, int linedelta); - void setimage(const uchar* d, PixelType p, int w, int h) {setimage(d,p,w,h,fltk::depth(p)*w);} - - uchar* buffer(); - const uchar* buffer() const; - void set_forceARGB32(); - void clear_forceARGB32(); - bool forceARGB32() const {return (flags&FORCEARGB32) != 0;} - PixelType buffer_pixeltype() const; - int buffer_depth() const; - int buffer_width() const; - int buffer_height() const; - int buffer_linedelta() const; - void buffer_changed() {flags &= ~COPIED;} - void destroy(); - - void draw(int x, int y) const; - void draw(const Rectangle& r) const {_draw(r);} - void draw(const Rectangle& from, const Rectangle& to) const; - - void _draw(const Rectangle&) const; // Symbol virtual method - void _measure(int& W, int& H) const; // Symbol virtual method - bool fills_rectangle() const; // Symbol virtual method - virtual bool fetch(); // for image file reading subclasses - void fetch_if_needed() const; - void refetch() {flags &= ~FETCHED;} - - unsigned long mem_used() const; - static unsigned long total_mem_used() {return memused_;} - - // for back compatability with fltk1 only: - void label(Widget* o); - - // see also: GSave - void make_current(); - -}; - -} - -#endif - -// -// End of "$Id: Image.h 5768 2007-04-08 19:58:56Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Input.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Input.h deleted file mode 100644 index 9a8627e5..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Input.h +++ /dev/null @@ -1,132 +0,0 @@ -// -// "$Id: Input.h 4886 2006-03-30 09:55:32Z fabien $" -// -// One-line text input field. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_Input_h -#define fltk_Input_h - -#ifndef fltk_Widget_h -#include "Widget.h" -#endif - -namespace fltk { - -class FL_API Input : public Widget { -public: - enum { // values for type() - NORMAL = 0, - FLOAT_INPUT = 1, - INT_INPUT = 2, - SECRET = 3, - MULTILINE = 4, - WORDWRAP = 5 - }; - - Input(int, int, int, int, const char* = 0); - ~Input(); - static NamedStyle* default_style; - - void draw(); - void draw(const Rectangle&); - int handle(int); - int handle(int event, const Rectangle&); - bool handle_key(); - - bool text(const char*); - bool text(const char*, int); - bool static_text(const char*); - bool static_text(const char*, int); - const char* text() const {return text_;} - char at(int i) const {return text_[i];} -#ifdef FLTK_1_WIDGET // back-compatability section: - char index(int i) const {return text_[i];} -#endif -#ifndef SKIP_DEPRECIATED - bool value(const char* v) {return text(v);} - bool value(const char* v, int n) {return text(v,n);} - bool static_value(const char* v) {return static_text(v);} - const char* value() const {return text_;} -#endif - int size() const {return size_;} - void reserve(int newsize); - - int position() const {return position_;} - int mark() const {return mark_;} - void position(int p, int m); - void position(int p) {position(p, p);} - void up_down_position(int position, bool extend); - void mark(int m) { position(position(), m);} - - virtual bool replace(int, int, const char*, int); - bool cut() {return replace(position(), mark(), 0, 0);} - bool cut(int n) {return replace(position(), position()+n, 0, 0);} - bool cut(int a, int b) {return replace(a, b, 0, 0);} - bool insert(const char* t); - bool insert(const char* t, int l){return replace(position_, mark_, t, l);} - bool replace(int a, int b, char c) {return replace(a,b,&c,1);} - bool copy(bool clipboard = true); - bool undo(); - void maybe_do_callback(); - - int word_start(int i) const; - int word_end(int i) const; - int line_start(int i) const; - int line_end(int i) const; - int mouse_position(const Rectangle&) const; - int xscroll() const {return xscroll_;} - int yscroll() const {return yscroll_;} - -private: - - const char* text_; - char* buffer; - - int size_; - int bufsize; - int position_; - int mark_; - int xscroll_, yscroll_; - int mu_p; - int label_width; - - const char* expand(const char*, char*, int) const; - float expandpos(const char*, const char*, const char*, int*) const; - void minimal_update(int, int); - void minimal_update(int p); - void erase_cursor_at(int p); - - void setfont() const; - - void shift_position(int p); - void shift_up_down_position(int p); - -}; - -} - -#endif - -// -// End of "$Id: Input.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/InputBrowser.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/InputBrowser.h deleted file mode 100644 index d756e25c..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/InputBrowser.h +++ /dev/null @@ -1,100 +0,0 @@ -// -// "$Id: InputBrowser.h 5571 2006-12-30 08:20:02Z spitzak $" -// -// MicroSoft style "ComboBox" with the menu appearing below with a -// scrollbar. I would like to use the name "ComboBox" or "InputChoice" -// for a more user-friendly version which uses pop-up menus and -// positions the menu with the cursor pointing at the current item, -// but this version can be used to get what MicroSoft users expect. -// The implementation is a good example of how to get a widget to appear -// in a modal pop-up window. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_InputBrowser_h -#define fltk_InputBrowser_h - -#include "Menu.h" -#include "Input.h" - -namespace fltk { - -class ComboBrowser; -class ComboWindow; - -class FL_API InputBrowser : public Menu { -public: - enum { // values for type() - NORMAL = 0, - NONEDITABLE = 1, - INDENTED = 2, - NONEDITABLE_INDENTED = 3 - }; - - InputBrowser(int,int,int,int,const char * = 0); - ~InputBrowser(); - static NamedStyle* default_style; - - void popup(); - void hide_popup(); - virtual int popup(int x, int y, int w, int h) { InputBrowser::popup(); return Menu::popup(Rectangle(x,y,w,h)); } - - virtual int handle(int); - - Widget* item() const ; - Widget* item(Widget* v) const ; - - void minw(int i) { minw_ = i; } - void minh(int i) { minh_ = i; } - int minw() { return minw_; } - int minh() { return minh_; } - - void maxw(int i) { maxw_ = i; } - void maxh(int i) { maxh_ = i; } - int maxw() { return maxw_; } - int maxh() { return maxh_; } - - void text(const char *v) { m_input.text(v); } - const char *text() const { return m_input.text(); } - -protected: - virtual void draw(); - static void input_cb(Input *w, InputBrowser *ib); - - Input m_input; - - ComboWindow *win; - ComboBrowser *list; - - friend class ComboWindow; - friend class ComboBrowser; - - int minw_, minh_, maxw_, maxh_; - int over_now, over_last; -}; - -} - -#endif - -// -// End of "$Id: InputBrowser.h 5571 2006-12-30 08:20:02Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/IntInput.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/IntInput.h deleted file mode 100644 index 259178d3..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/IntInput.h +++ /dev/null @@ -1,42 +0,0 @@ -// -// "$Id: IntInput.h 4886 2006-03-30 09:55:32Z fabien $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_IntInput_h -#define fltk_IntInput_h - -#include "FloatInput.h" - -namespace fltk { - -class FL_API IntInput : public FloatInput { -public: - IntInput(int x,int y,int w,int h,const char *l = 0) - : FloatInput(x,y,w,h,l) { type(INT); } -}; - -} -#endif - -// -// End of "$Id: IntInput.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/InvisibleBox.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/InvisibleBox.h deleted file mode 100644 index b5042039..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/InvisibleBox.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// "$Id: InvisibleBox.h 5698 2007-02-19 05:40:36Z spitzak $" -// -// This is a box that is invisible due to not having a box. The -// label still prints so it can be used to position labels. Also -// this is useful as a resizable() widget. - -#ifndef fltk_InvisibleBox_h -#define fltk_InvisibleBox_h - -#include "Widget.h" - -namespace fltk { - -class FL_API InvisibleBox : public Widget { -public: - InvisibleBox(int x, int y, int w, int h, const char *l=0); - InvisibleBox(Box* b, int x, int y, int w, int h, const char *l); - static NamedStyle* default_style; - int handle(int); - void draw(); -}; - -} - -#endif - -// -// End of "$Id: InvisibleBox.h 5698 2007-02-19 05:40:36Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Item.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Item.h deleted file mode 100644 index bfc808a2..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Item.h +++ /dev/null @@ -1,57 +0,0 @@ -// -// "$Id: Item.h 5576 2007-01-03 00:20:28Z spitzak $" -// -// Widget designed to be a menu or browser item. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_Item_h -#define fltk_Item_h - -#ifndef fltk_Widget_h -#include "Widget.h" -#endif - -namespace fltk { - -class FL_API Item : public Widget { -public: - - void draw(); - void layout(); - int handle(int); - - Item(const char* label = 0); - Item(const char* label, const Symbol*); - Item(const char* label, int shortcut, Callback *callback=0, void *user_data_=0, int flags=0); - - static NamedStyle* default_style; - static void set_style(const Style*, bool menubar); - static void set_style(const Widget* w, bool f) {set_style(w->style(),f);} - static void clear_style() {set_style(Widget::default_style,false);} - -private: - void init(); // common constructor initialization -}; - -} - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ItemGroup.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ItemGroup.h deleted file mode 100644 index 715bc181..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ItemGroup.h +++ /dev/null @@ -1,75 +0,0 @@ -// -// "$Id: ItemGroup.h 5575 2007-01-02 17:31:40Z spitzak $" -// -// Widget designed to be a nested list in a menu or browser. This -// copies the drawing and style code from Item. I did not modify the -// base Menu class this way because the style inheritance would mess -// up the styles of MenuButton and MenuBar. Code is in Item.cxx -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_ItemGroup_h -#define fltk_ItemGroup_h - -#include "Menu.h" - -namespace fltk { - -class FL_API ItemGroup : public Menu { -public: - void draw(); - void layout(); - int handle(int); - ItemGroup(const char* label = 0, bool begin=false); - ItemGroup(const char* label, const Symbol*, bool begin=false); -}; - -/** \class MenuSection - This class will elegantly facilitate dynamic (& hand-made) menu code writing - by creating and calling begin() on an ItemGroup in the constructor and - calling end() in the destructor: - \code - mymenu->begin(); - new Item("in main menu"); - {MenuSection g("submenu title"); - new Item("in submenu"); - new Item("also in submenu"); - } // destructor ends the submenu - \endcode -*/ -class FL_API MenuSection { - ItemGroup* group_; -public: - //! build a typical submenu group section, then call begin() - MenuSection(const char* label = 0) { group_ = new ItemGroup(label,true); } - - MenuSection(const char* label, const Symbol* i) { group_ = new ItemGroup(label,i,true); } - - //! call end() at destruction - ~MenuSection() {group_->end();} - - //! The ItemGroup created by this. - ItemGroup* group() const {return group_;} -}; - -} - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/LabelType.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/LabelType.h deleted file mode 100644 index 85b0a419..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/LabelType.h +++ /dev/null @@ -1,61 +0,0 @@ -// -// "$Id: LabelType.h 5770 2007-04-10 10:42:07Z spitzak $" -// -// A LabelType determines how to draw the text of the label. This -// is not used very much, it can be used to draw engraved or shadowed -// labels. You could also put in code that interprets the text of -// the label and draws anything you want with it. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_LabelType_h -#define fltk_LabelType_h - -#include "Flags.h" -#include "Rectangle.h" - -namespace fltk { - -class Style; - -class FL_API LabelType { -public: - virtual void draw(const char*, const Rectangle&, Flags) const; - const char* name; - LabelType* next; - static LabelType* first; - LabelType(const char* n) : name(n), next(first) {first = this;} - static LabelType* find(const char* name); - virtual ~LabelType(); // virtual to shut up C++ warnings -}; - -// You can use this to draw overlapping patterns -class FL_API EngravedLabel : public LabelType { - const int* data; -public: - void draw(const char*, const Rectangle&, Flags) const; - EngravedLabel(const char * n, const int p[][3]) - : LabelType(n), data((const int*)p) {} -}; - -} - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/LightButton.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/LightButton.h deleted file mode 100644 index bbdac0da..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/LightButton.h +++ /dev/null @@ -1,45 +0,0 @@ -// -// "$Id: LightButton.h 4886 2006-03-30 09:55:32Z fabien $" -// -// Forms/XForms/Flame style button with indicator light on left -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_Light_Button_h -#define fltk_Light_Button_h - -#include "CheckButton.h" - -namespace fltk { - -class FL_API LightButton : public CheckButton { -public: - LightButton(int x,int y,int w,int h,const char *l = 0); - static NamedStyle* default_style; - static void default_glyph(const Widget*, int, int,int,int,int, Flags); -}; - -} -#endif - -// -// End of "$Id: LightButton.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/LineDial.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/LineDial.h deleted file mode 100644 index 68f08f93..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/LineDial.h +++ /dev/null @@ -1,44 +0,0 @@ -// -// "$Id: LineDial.h 4886 2006-03-30 09:55:32Z fabien $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_LineDial_h -#define fltk_LineDial_h - -#include "Dial.h" - -namespace fltk { - -/*! Dial but the constructor sets type() to LINE, so it draws a - pointer rather than a dot. */ -class FL_API LineDial : public Dial { -public: - LineDial(int x,int y,int w,int h, const char *l = 0) : - Dial(x,y,w,h,l) {type(LINE);} -}; - -} -#endif - -// -// End of "$Id: LineDial.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Menu.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Menu.h deleted file mode 100644 index 8659627d..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Menu.h +++ /dev/null @@ -1,152 +0,0 @@ -// "$Id: Menu.h 5708 2007-02-23 00:52:14Z spitzak $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -#ifndef fltk_Menu_h -#define fltk_Menu_h - -#include "Group.h" - -namespace fltk { - -class FL_API Menu; - -class FL_API List { -public: - virtual int children(const Menu*, const int* indexes, int level); - virtual Widget* child(const Menu*, const int* indexes, int level); - virtual void flags_changed(const Menu*, Widget*); - virtual ~List(); -}; - -enum { // Special flag values for add(), you can also use Flags.h values - // These match values from Fl_Menu_Item in fltk 1.0: - MENU_TOGGLE = 2, - MENU_RADIO = 8, - SUBMENU = 0x40, - MENU_DIVIDER = 0x80 -}; - -class FL_API Menu : public Group { - -public: - - Menu(int,int,int,int, const char* l=0, bool begin=false); - List* list() const {return list_;} - void list(List* l) {list_ = l;} - void layout(); - - static NamedStyle* default_style; - - int children(const int* indexes, int level) const ; - int children(int index) const; - int children() const ; - Widget* child(const int* indexes, int level) const ; - Widget* child(int index) const ; - - Widget* item() const {return item_;} - Widget* item(Widget* v) {return item_ = v;} - - bool set_item(const int* indexes, int level); - Widget* get_item(); - int value() const {return Group::focus_index();} - bool value(int v); - int size() const {return children();} - - void layout_in(Widget*,const int* indexes, int level) const; - void draw_in(Widget*,const int* indexes, int level, int, int) const; - int find_selected(Widget*,const int* indexes, int level, int, int) const; - Rectangle get_location(Widget*,const int* indexes, int level, int) const; - - int popup(const Rectangle&, const char* title=0,bool menubar=false); - int handle_shortcut(); - static void default_callback(Widget*, void*); - void execute(Widget*); - void global(); - - Widget* find(const char*) const; - void remove(const char* l) { delete find(l); } - Widget* add(const char*, unsigned shortcut, Callback*, void* = 0, int = 0); - Widget* replace(const char*, unsigned shortcut, Callback*, void* = 0, int = 0); - Widget* insert(int n, const char*, unsigned shortcut, Callback*, void* = 0, int = 0); - Widget* add(const char*, void* = 0); - Group* add_group(const char* label, Group* parent=0, void* data=0); - Widget* add_leaf(const char* label, Group* parent=0, void* data=0); - Widget* add_many(const char*); - Widget* replace(const char*, void* = 0); - Widget* insert(int n, const char*, void* = 0); - - // Undo the overrides of stuff from Group: - void add(Widget& o) {Group::add(o);} - void add(Widget* o) {add(*o);} - void insert(Widget& o, int n) {Group::insert(o, n);} - void replace(int index, Widget& o) {Group::replace(index, o);} - void replace(Widget& old, Widget& o) {Group::replace(old,o);} - void remove(int index) {Group::remove(index);} - void remove(Widget& o) {Group::remove(o);} - void remove(Widget* o) {Group::remove(o);} - -#ifdef Fl_Menu_Item_h - // Commented-out methods cannot be emulated. -//const Fl_Menu_Item* test_shortcut(); -//Fl_Menu_Item* menu() const; - void copy(const Fl_Menu_Item* m, void* data = 0) {clear(); m->add_to(this,data);} - void menu(const Fl_Menu_Item* m) {copy(m,0);} - void replace(int n, const char* s) { child(n)->label(s); } - void replace(const char* l, const char* s) { find(l)->label(s); } - void shortcut(const char* l, unsigned s) { find(l)->shortcut(s); } - void shortcut(unsigned s) {Widget::shortcut(s);} - unsigned shortcut() const {return Widget::shortcut();} - void shortcut(int i, unsigned s) { child(i)->shortcut(s); } -//int index(Fl_Menu_Item* m) const { return m - menu_; } -//int index(const char* label) const; -//void replace(Fl_Menu_Item* m, const char* s) { replace(index(m), s); } -//void remove(Fl_Menu_Item* m) { remove(index(m)); } -//void shortcut(Fl_Menu_Item* m, unsigned s) {shortcut(index(m), s);} -//void mode(int i,int x); -//void mode(Fl_Menu_Item* m, int x) {mode(index(m), x);} -//void mode(const char* l, int x) {mode(index(l), x);} - unsigned mode(int i) const {return child(i)->flags() >> 8;} -//unsigned mode(Fl_Menu_Item* m) const {return mode(index(m));} - unsigned mode(const char* l) const {return find(l)->flags() >> 8;} - - // in fltk 1.0 these returned/took an Fl_Menu_Item*: - Widget* mvalue() {return item();} -//void value(Widget* o) {set_item(o);} - - const char *text(int i) const {return i >= 0 ? child(i)->label() : 0;} - const char *text() const {Widget* w = item(); return w ? w->label() : 0;} -#endif - -protected: - Widget *try_popup(const Rectangle&,const char* title=0,bool menubar=false); - -private: - List* list_; - Widget* item_; -}; - -} - -#endif - -// -// End of "$Id: Menu.h 5708 2007-02-23 00:52:14Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/MenuBar.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/MenuBar.h deleted file mode 100644 index ef7a747d..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/MenuBar.h +++ /dev/null @@ -1,51 +0,0 @@ -// -// "$Id: MenuBar.h 4886 2006-03-30 09:55:32Z fabien $" -// -// Menu bar, each submenu is a pull-down menu. Any items act like -// a button in the menu bar. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_MenuBar_h -#define fltk_MenuBar_h - -#include "Menu.h" - -namespace fltk { - -class FL_API MenuBar : public Menu { -public: - MenuBar(int x,int y,int w,int h,const char *l=0); - static NamedStyle* default_style; - int handle(int); -protected: - void draw(); -private: - int highlight_, last_; - Widget *lastfocus_; -}; - -} -#endif - -// -// End of "$Id: MenuBar.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/MenuBuild.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/MenuBuild.h deleted file mode 100644 index 9814baf6..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/MenuBuild.h +++ /dev/null @@ -1,37 +0,0 @@ -// "$Id: MenuBuild.h 4319 2005-05-08 19:18:50Z spitzak $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -#ifndef fltk_Menu_Build_h -#define fltk_Menu_Build_h - -// include facility for building dynamic fltk2 menus -#include "ItemGroup.h" -#include "Item.h" -#include "Divider.h" -#include "MenuBar.h" -#include "Choice.h" -#include "PopupMenu.h" -#include "events.h" -#endif - -// -// End of "$Id: Menu.h 4319 2005-05-08 19:18:50Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/MenuWindow.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/MenuWindow.h deleted file mode 100644 index 9b9d16db..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/MenuWindow.h +++ /dev/null @@ -1,55 +0,0 @@ -// "$Id: MenuWindow.h 5600 2007-01-13 00:04:55Z spitzak $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -#ifndef fltk_MenuWindow_h -#define fltk_MenuWindow_h - -#include "Window.h" - -namespace fltk { - -class FL_API MenuWindow : public Window { - enum {NO_OVERLAY = 0x08000000}; - -public: - - virtual void create(); - virtual void flush(); - virtual void destroy(); - - static NamedStyle* default_style; - - int overlay() {return !flag(NO_OVERLAY);} - void set_overlay() {clear_flag(NO_OVERLAY);} - void clear_overlay() {set_flag(NO_OVERLAY);} - ~MenuWindow(); - MenuWindow(int W, int H, const char *l = 0); - MenuWindow(int X, int Y, int W, int H, const char *l = 0); - -}; - -} - -#endif - -// -// End of "$Id: MenuWindow.h 5600 2007-01-13 00:04:55Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Monitor.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Monitor.h deleted file mode 100644 index 2ddca44e..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Monitor.h +++ /dev/null @@ -1,46 +0,0 @@ -// "$Id: Monitor.h 4886 2006-03-30 09:55:32Z fabien $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -#ifndef fltk_Monitor_h -#define fltk_Monitor_h - -#include "Rectangle.h" - -namespace fltk { - -class FL_API Monitor : public Rectangle { - int depth_; - float dpi_x_; - float dpi_y_; - public: - Rectangle work; // Allows you to do rect->work.x(), etc. - int depth() const {return depth_;} - float dpi_x() const {return dpi_x_;} - float dpi_y() const {return dpi_y_;} - float dpi() const {return dpi_y_;} - static int list(const Monitor**); - static const Monitor& all(); - static const Monitor& find(int x, int y); -}; - -} - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/MultiBrowser.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/MultiBrowser.h deleted file mode 100644 index 813fbe03..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/MultiBrowser.h +++ /dev/null @@ -1,47 +0,0 @@ -// -// "$Id: MultiBrowser.h 4886 2006-03-30 09:55:32Z fabien $" -// -// Browser that lets the user select more than one item at a time. -// Most of the implementation is in the base Browser class. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_MultiBrowser_h -#define fltk_MultiBrowser_h - -#include "Browser.h" - -namespace fltk { - -// This class is entirely inline. If that changes, add FL_API to its declaration -class MultiBrowser : public Browser { -public: - MultiBrowser(int x,int y,int w,int h,const char *l=0) - : Browser(x,y,w,h,l) {type(MULTI);} -}; - -} - -#endif - -// -// End of "$Id: MultiBrowser.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/MultiImage.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/MultiImage.h deleted file mode 100644 index 2e95e8e9..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/MultiImage.h +++ /dev/null @@ -1,103 +0,0 @@ -// -// "$Id: MultiImage.h 5515 2006-10-10 09:46:05Z fabien $" -// -// Image type that draws a different image depending on the flags, -// for instace VALUE or SELECTED or HIGHLIGHT. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_MultiImage_h -#define fltk_MultiImage_h - -#include "Symbol.h" -#include <stdarg.h> - -namespace fltk { - -class FL_API MultiImage : public Symbol -{ - const Symbol* image0; - struct MultiImagePair { - const Symbol* image; - Flags flags; - }; - MultiImagePair* pairs; - unsigned n_images; - -public: - void _measure(int&, int&) const; - void _draw(const Rectangle&) const; - const Symbol* current_image() const; - void inset(Rectangle&) const; - bool fills_rectangle() const; - bool is_frame() const; - - ~MultiImage() { release();} - - //! for MultiImage arrays construction using set() for post initialization - MultiImage() { pairs=0; n_images = 0; } - - //! constructor for unlimited images state affectation - MultiImage(unsigned count, const Symbol* img0, va_list ap) { set(count,img0, ap); } - - void set (unsigned count, const Symbol* img0, ...); // fabien: need to be accessible because of MultiImage arrays with post (set) affectations - - void add(Flags flags, const Symbol& image); - - //! Destroys everything except image0. - void release() { delete[] pairs; pairs = 0; n_images = 0; } - - MultiImage(const Symbol& img0) : image0(&img0), pairs(0), n_images(0) {} - - /* compatibility convenient constructors */ - MultiImage(const Symbol& img0, Flags f1, const Symbol& img1) { set(2, &img0,f1,&img1); } - MultiImage(const Symbol& img0, Flags f1, const Symbol& img1,Flags f2, const Symbol& img2) { - set(3, &img0, f1, &img1, f2, &img2); - } - MultiImage(const Symbol& img0, Flags f1, const Symbol& img1, Flags f2, const Symbol& img2, Flags f3, const Symbol& img3) { - set(4, &img0, f1, &img1, f2, &img2, f3); - } - MultiImage(const Symbol& img0, Flags f1, const Symbol& img1, Flags f2, const Symbol& img2, Flags f3, const Symbol& img3, - Flags f4, const Symbol& img4) { - set(5, &img0, f1, &img1, f2, &img2, f3, &img3, f4, &img4); - } - MultiImage(const Symbol& img0, Flags f1, const Symbol& img1, Flags f2, const Symbol& img2, Flags f3, const Symbol& img3, - Flags f4, const Symbol& img4, Flags f5, const Symbol& img5) { - set(6, &img0, f1, &img1, f2, &img2, f3, &img3, f4, &img4, f5, &img5); - } - MultiImage(const Symbol& img0, Flags f1, const Symbol& img1, Flags f2, const Symbol& img2, Flags f3, const Symbol& img3, - Flags f4, const Symbol& img4, Flags f5, const Symbol& img5, Flags f6, const Symbol& img6) { - set(7, &img0, f1, &img1, f2, &img2, f3, &img3, f4, &img4, f5, &img5, f6, &img6); - } - MultiImage(const Symbol& img0, Flags f1, const Symbol& img1, Flags f2, const Symbol& img2, Flags f3, const Symbol& img3, - Flags f4, const Symbol& img4, Flags f5, const Symbol& img5, Flags f6, const Symbol& img6, Flags f7, const Symbol& img7 ) { - set(8, &img0, f1, &img1, f2, &img2, f3, &img3, f4, &img4, f5, &img5, f6, &img6, f7, &img7); - } -}; - -} - - -#endif - -// -// End of "$Id: MultiImage.h 5515 2006-10-10 09:46:05Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/MultiLineInput.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/MultiLineInput.h deleted file mode 100644 index 31c4b909..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/MultiLineInput.h +++ /dev/null @@ -1,48 +0,0 @@ -// -// "$Id: MultiLineInput.h 4886 2006-03-30 09:55:32Z fabien $" -// -// Allows you to edit a *small* number of lines of text. Does not have -// any scrollbars. You may want a TextEditor instead, it is designed for -// large amounts of text. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_MultiLineInput_h -#define fltk_MultiLineInput_h - -#include "Input.h" - -namespace fltk { - -// This class is entirely inline. If that changes, add FL_API to its declaration -class MultiLineInput : public Input { -public: - MultiLineInput(int x,int y,int w,int h,const char *l = 0) - : Input(x,y,w,h,l) {type(MULTILINE);} -}; - -} - -#endif - -// -// End of "$Id: MultiLineInput.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/MultiLineOutput.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/MultiLineOutput.h deleted file mode 100644 index 095eaa74..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/MultiLineOutput.h +++ /dev/null @@ -1,47 +0,0 @@ -// -// "$Id: MultiLineOutput.h 4886 2006-03-30 09:55:32Z fabien $" -// -// Displays a multi-line sequence of text, the user can select text -// and copy it to other programs. Does not have any scrollbars. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_MultiLineOutput_h -#define fltk_MultiLineOutput_h - -#include "Output.h" - -namespace fltk { - -// This class is entirely inline. If that changes, add FL_API to its declaration -class MultiLineOutput : public Output { -public: - MultiLineOutput(int x,int y,int w,int h,const char *l = 0) - : Output(x,y,w,h,l) {type(MULTILINE);} -}; - -} - -#endif - -// -// End of "$Id: MultiLineOutput.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/NumericInput.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/NumericInput.h deleted file mode 100644 index dcd8a163..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/NumericInput.h +++ /dev/null @@ -1,52 +0,0 @@ -// -// "$Id: NumericInput.h 4886 2006-03-30 09:55:32Z fabien $" -// -// One-line text input field, which handles up/down arrows to -// change the digit to the right of the cursor. This still allows -// arbitrary text such as a math expression to be typed, if you -// want to restrict the user to a number use FloatInput or IntInput. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_NumericInput_h -#define fltk_NumericInput_h - -#include "Input.h" - -namespace fltk { - -class FL_API NumericInput : public Input { - protected: - int handle_arrow(int); - public: - NumericInput(int x,int y, int w,int h,const char* l = 0) : - Input(x,y,w,h,l) {when(WHEN_ENTER_KEY|WHEN_RELEASE);} - void value(double); - void value(int); - int handle(int); -}; - -} -#endif - -// -// End of "$Id: NumericInput.h 4886 2006-03-30 09:55:32Z fabien $" -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Output.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Output.h deleted file mode 100644 index e845bb13..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Output.h +++ /dev/null @@ -1,49 +0,0 @@ -// -// "$Id: Output.h 4886 2006-03-30 09:55:32Z fabien $" -// -// One-line text output, the user can select text and copy it -// to other applications. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_Output_h -#define fltk_Output_h - -#include "Input.h" - -namespace fltk { - -class FL_API Output : public Input { - virtual bool replace(int, int, const char*, int); // does nothing -public: - Output(int x, int y, int w, int h, const char *l = 0); - int handle(int); - // this style is so Motif can have different color for output vs input: - static NamedStyle* default_style; -}; - -} - -#endif - -// -// End of "$Id: Output.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/PackedGroup.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/PackedGroup.h deleted file mode 100644 index 388039cd..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/PackedGroup.h +++ /dev/null @@ -1,70 +0,0 @@ -// -// "$Id: PackedGroup.h 5970 2007-11-13 23:05:48Z dejan $" -// -// Group that places all it's child widgets packed against the -// edges. The edge is decided by the PACK_VERTICAL flag stored on -// the child and by whether the child is before or after the -// resizable() child. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_PackedGroup_h -#define fltk_PackedGroup_h - -#include "Group.h" - -namespace fltk { - -class FL_API PackedGroup : public Group { - int spacing_; - int margin_left_; - int margin_right_; - int margin_top_; - int margin_bottom_;; -public: - enum { // values for type(int), for back-compatability - NORMAL = GROUP_TYPE, - ALL_CHILDREN_VERTICAL = GROUP_TYPE+1 - }; - void layout(); - PackedGroup(int x, int y, int w, int h, const char *l = 0, bool begin=false); - int spacing() const {return spacing_;} - void spacing(int i) {spacing_ = i;} - - int margin_left() const {return margin_left_;} - void margin_left(int m) {margin_left_ = m;} - int margin_right() const {return margin_right_;} - void margin_right(int m) {margin_right_ = m;} - int margin_top() const {return margin_top_;} - void margin_top(int m) {margin_top_ = m;} - int margin_bottom() const {return margin_bottom_;} - void margin_bottom(int m) {margin_bottom_ = m;} - - void margin(int m) {margin_left_ = margin_right_ = margin_top_ = margin_bottom_ = m;} -}; - -} - -#endif - -// -// End of "$Id: PackedGroup.h 5970 2007-11-13 23:05:48Z dejan $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/PixelType.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/PixelType.h deleted file mode 100644 index 01ccb768..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/PixelType.h +++ /dev/null @@ -1,63 +0,0 @@ -// "$Id: PixelType.h 1399 2006-08-11 02:15:20Z spitzak $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -/*! \file */ - -#ifndef fltk_PixelType_h -#define fltk_PixelType_h - -namespace fltk { - -/** - Enumeration describing how colors are stored in an array of bytes - that is a pixel. This is used as an argument for fltk::drawimage(), - fltk::readimage(), and fltk::Image. - - Notice that the order of the bytes in memory of ARGB32 or RGB32 is - a,r,g,b on a little-endian machine and b,g,r,a on a big-endian - machine. Due to the use of these types by Windows, this is often - the fastest form of data, if you have a choice. To convert an - fltk::Color to RGB32, shift it right by 8 (for ARGB32 shift the - alpha left 24 and or it in). - - More types may be added in the future. The set is as minimal as - possible while still covering the types I have actually encountered. -*/ -enum PixelType { - MASK = 0, //!< 1 byte of inverted mask, filled with current color - MONO = 1, //!< 1 byte of gray scale - RGBx = 2, //!< bytes in r,g,b,a,r,g,b,a... order, a byte is ignored - RGB = 3, //!< bytes in r,g,b,r,g,b... order - RGBA = 4, //!< bytes in r,g,b,a,r,g,b,a... order - RGB32 = 5, //!< 32-bit words containiing 0xaarrggbb (aa is ignored) - ARGB32= 6, //!< 32-bit words containing 0xaarrggbb - // unpremulitplied is not yet implemented, acts like RGBA/ARGB32: - RGBM = 7, //!< unpremultiplied bytes in r,g,b,a order - MRGB32= 8 //!< unpremultiplied 0xaarrggbb -}; - -/** - Turn a PixelType into the number of bytes needed to hold a pixel. -*/ -inline int depth(PixelType t) {return (t<2 ? 1 : t==3 ? 3 : 4);} - -} - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/PopupMenu.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/PopupMenu.h deleted file mode 100644 index c92c489c..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/PopupMenu.h +++ /dev/null @@ -1,56 +0,0 @@ -// -// "$Id: PopupMenu.h 4886 2006-03-30 09:55:32Z fabien $" -// -// Setting the type to POPUP* will make an invisible widget that can -// overlap any other widgets and provides a popup menu. The default -// type gives you something similar to a Choice except it does not -// display the current value. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_PopupMenu_h -#define fltk_PopupMenu_h - -#include "Menu.h" - -namespace fltk { - -class FL_API PopupMenu : public Menu { -public: - // values for type: - enum {NORMAL = GROUP_TYPE, POPUP1, POPUP2, POPUP12, - POPUP3, POPUP13, POPUP23, POPUP123}; - int handle(int); - int popup(); - PopupMenu(int,int,int,int,const char * =0); - static NamedStyle* default_style; - -protected: - void draw(); - -}; - -} -#endif - -// -// End of "$Id: PopupMenu.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Preferences.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Preferences.h deleted file mode 100644 index 57103b68..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Preferences.h +++ /dev/null @@ -1,109 +0,0 @@ -// "$Id: Preferences.H 4458 2005-07-26 07:59:01Z matt $" -// -// Copyright 2002-2005 by Matthias Melcher. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php - -#ifndef fltk_Preferences_h -#define fltk_Preferences_h - -#include "FL_API.h" - -namespace fltk { - -/** - * Preferences are a data tree containing a root, branches and leafs - */ -class FL_API Preferences -{ - -public: - - enum Root { SYSTEM=0, USER }; - - Preferences( Root root, const char *vendor, const char *application ); - Preferences( const char *path, const char *vendor, const char *application ); - Preferences( Preferences&, const char *group ); - Preferences( Preferences*, const char *group ); - ~Preferences(); - - int groups(); - const char *group( int ); - bool groupExists( const char *group ); - bool deleteGroup( const char *group ); - - int entries(); - const char *entry( int ); - bool entryExists( const char *entry ); - bool deleteEntry( const char *entry ); - - bool set( const char *entry, int value ); - bool set( const char *entry, float value ); - bool set( const char *entry, double value ); - bool set( const char *entry, const char *value ); - bool set( const char *entry, const void *value, int size ); - - bool get( const char *entry, int &value, int defaultValue ); - bool get( const char *entry, float &value, float defaultValue ); - bool get( const char *entry, double &value, double defaultValue ); - bool get( const char *entry, char *&value, const char *defaultValue ); - bool get( const char *entry, char *value, const char *defaultValue, int maxSize ); - bool get( const char *entry, void *&value, const void *defaultValue, int defaultSize ); - bool get( const char *entry, void *value, const void *defaultValue, int defaultSize, int maxSize ); - int size( const char *entry ); - - bool getUserdataPath( char *path, int pathlen ); - - void flush(); - - // bool export( const char *filename, Type fileFormat ); - // bool import( const char *filename ); - - class FL_API Name { - char *data_; - public: - Name( int n ); - Name( const char *format, ... ); - operator const char *() { return data_; } - ~Name() { delete[] data_; } - }; - -private: - - // make the following functions unavailable - Preferences(); - Preferences(const Preferences&); - Preferences &operator=(const Preferences&); - - class Node; - friend class Node; - Node *node; - - class RootNode; - friend class RootNode; - RootNode *rootNode; - -}; - -} - -#endif - -// End of "$Id: Preferences.H 4458 2005-07-26 07:59:01Z matt $". diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ProgressBar.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ProgressBar.h deleted file mode 100644 index f3ad8409..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ProgressBar.h +++ /dev/null @@ -1,62 +0,0 @@ -// -// "$Id: ProgressBar.h 4886 2006-03-30 09:55:32Z fabien $" -// -// Progress indicator with bar that fills up and text showing the -// job being done and expected time to go. Not fully implemented yet. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_ProgressBar_h -#define fltk_ProgressBar_h - -#include "Widget.h" - -namespace fltk { - -class FL_API ProgressBar : public Widget { -protected: - double mMin; - double mMax; - double mPresent; - double mStep; - bool mShowPct; - Color mTextColor; - void draw(); -public: - ProgressBar(int x, int y, int w, int h, const char *lbl = 0); - void range(double min, double max, double step = 1) { mMin = min; mMax = max; mStep = step; }; - void step(double step) { mPresent += step; redraw(); }; - double minimum() { return mMin; } - double maximum() { return mMax; } - void minimum(double nm) { mMin = nm; }; - void maximum(double nm) { mMax = nm; }; - double position() { return mPresent; } - double step() { return mStep; } - void position(double pos) { mPresent = pos; redraw(); } - void showtext(bool st) { mShowPct = st; } - bool showtext() { return mShowPct; } - void text_color(Color col) { mTextColor = col; } - Color text_color() { return mTextColor; } -}; - -} -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/RadioButton.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/RadioButton.h deleted file mode 100644 index b67484b1..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/RadioButton.h +++ /dev/null @@ -1,46 +0,0 @@ -// -// "$Id: RadioButton.h 4886 2006-03-30 09:55:32Z fabien $" -// -// Button with a circle indicator to it's left, turning it on turns -// off all other radio buttons in the same Group. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_RadioButton_h -#define fltk_RadioButton_h - -#include "CheckButton.h" - -namespace fltk { - -class FL_API RadioButton : public CheckButton { -public: - RadioButton(int x, int y, int w, int h, const char *l=0); - static NamedStyle* default_style; -}; - -} - -#endif - -// -// End of "$Id: RadioButton.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/RadioItem.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/RadioItem.h deleted file mode 100644 index baf2d5d4..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/RadioItem.h +++ /dev/null @@ -1,41 +0,0 @@ -// "$Id: RadioItem.h 5924 2007-07-13 13:25:31Z sanel.z $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_RadioItem_h -#define fltk_RadioItem_h - -#include "Item.h" - -namespace fltk { - -/** This widget makes a radio item in a popup or pulldown Menu. - It's behavior in a Browser or MultiBrowser is that it changes its status on multiple clicks (e.g. double click). */ -class RadioItem : public Item { -public: - RadioItem(const char* label = 0) : Item(label) {type(RADIO);} - RadioItem(const char* label,int shortcut,Callback *callback=0,void *user_data=0, int flags=0) - : Item(label,shortcut,callback,user_data,flags) {type(RADIO);} -}; - -} - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/RadioLightButton.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/RadioLightButton.h deleted file mode 100644 index 921932b1..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/RadioLightButton.h +++ /dev/null @@ -1,45 +0,0 @@ -// -// "$Id: RadioLightButton.h 4886 2006-03-30 09:55:32Z fabien $" -// -// LightButton that toggles off all others in the group when turned on. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_RadioLightButton_h -#define fltk_RadioLightButton_h - -#include "LightButton.h" - -namespace fltk { - -class RadioLightButton : public LightButton { -public: - RadioLightButton(int x, int y, int w, int h, const char *l=0) - : LightButton(x,y,w,h,l) {type(RADIO);} -}; - -} - -#endif - -// -// End of "$Id: RadioLightButton.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Rectangle.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Rectangle.h deleted file mode 100644 index 22637a58..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Rectangle.h +++ /dev/null @@ -1,122 +0,0 @@ -// "$Id: Rectangle.h 5454 2006-09-19 02:38:02Z spitzak $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -#ifndef fltk_Rectangle_h -#define fltk_Rectangle_h - -#include "FL_API.h" - -// rectangle macros that help keeping rectangle predicates as strict as possible -// even when not using rectangles in some situations (as when only using w h scalars) -// so that there is only one strict defintion for common predicates, -// if one change the following, it will be repercuted in all the core lib -#define FLTK_RECT_EMPTY(w,h) (w <= 0 || h <= 0) -// we should always use the same evaluation for center_x, center_y in all corelib code: -//#define FLTK_CENTER_X(coord, length) (coord + (length>>1)) -//#define FLTK_CENTER_Y(coord, length) (coord + (length>>1)) - -namespace fltk { - -class FL_API Rectangle { - int x_, y_, w_, h_; - - public: - - /*! Left edge */ - int x() const {return x_;} - /*! Top edge */ - int y() const {return y_;} - /*! Distance between left and right edges */ - int w() const {return w_;} - /*! Distance between top and bottom edges */ - int h() const {return h_;} - /*! Return x()+w(), the right edge of the rectangle. */ - int r() const {return x_+w_;} - /*! Return y()+h(), the bottom edge of the rectangle. */ - int b() const {return y_+h_;} - /*! Move the rectangle so the left edge is at \a v. */ - void x(int v) {x_ = v;} - /*! Move the rectangle so the top edge is at \a v. */ - void y(int v) {y_ = v;} - /*! Change w() by moving the right edge. x() does not change. */ - void w(int v) {w_ = v;} - /*! Change h() by moving the bottom edge. y() does not change. */ - void h(int v) {h_ = v;} - /*! Change x() without changing r(), by changing the width. */ - void set_x(int v) {w_ -= v-x_; x_ = v;} - /*! Change y() without changing b(), by changing the height. */ - void set_y(int v) {h_ -= v-y_; y_ = v;} - /*! Change r() without changing x(), by changine the width. */ - void set_r(int v) {w_ = v-x_;} - /*! Change b() without changing y(), by changine the height. */ - void set_b(int v) {h_ = v-y_;} - /*! Set x(), y(), w(), and h() all at once. */ - void set(int x, int y, int w, int h) {x_=x; y_=y; w_=w; h_=h;} - /*! Sets x, y, w, h so that's it's centered or aligned (if flags!=0) inside the source r */ - void set (const Rectangle& r, int w, int h, int flags = 0); - /*! Add \a d to x() without changing r() (it reduces w() by \a d). */ - void move_x(int d) {x_ += d; w_ -= d;} - /*! Add \a d to y() without changing b() (it reduces h() by \a d). */ - void move_y(int d) {y_ += d; h_ -= d;} - /*! Add \a d to r() and w(). */ - void move_r(int d) {w_ += d;} - /*! Add \a d to b() and h(). */ - void move_b(int d) {h_ += d;} - /*! Move all edges in by \a d. See also Symbol::inset() */ - void inset(int d) {x_ += d; y_ += d; w_ -= 2*d; h_ -= 2*d;} - /*! Move entire rectangle by given distance in x and y. */ - void move(int dx, int dy) {x_ += dx; y_ += dy;} - /*! True if w() or h() are less or equal to zero. */ - bool empty() const {return FLTK_RECT_EMPTY(w_, h_);} - /*! Same as !empty(), true if w() and h() are both greater than zero. */ - bool not_empty() const {return !FLTK_RECT_EMPTY(w_, h_);} - /*! Integer center position. Rounded to the left if w() is odd. */ - int center_x() const {return x_+(w_>>1);} - /*! Integer center position. Rounded to lower y if h() is odd. */ - int center_y() const {return y_+(h_>>1);} - /*! Where to put baseline to center current font nicely */ - int baseline_y() const; - - Rectangle() {} - - /*! Constructor that sets x(), y(), w(), and h(). */ - Rectangle(int x, int y, int w, int h) : x_(x), y_(y), w_(w), h_(h) {} - - /*! Constructor that sets x() and y() to zero, and sets w() and h(). */ - Rectangle(int w, int h) : x_(0), y_(0), w_(w), h_(h) {} - - /*! Copy constructor. */ - Rectangle(const Rectangle& r) : x_(r.x_),y_(r.y_),w_(r.w_),h_(r.h_) {} - - /*! Constructor that calls set(). */ - Rectangle(const Rectangle& r, int w, int h, int flags = 0) {set(r,w,h,flags);} - - /*! True if rectangle contains the pixel who's upper-left corner is at x,y */ - bool contains(int x, int y) const {return x>=x_ && y>=y_ && x<x_+w_ && y<y_+h_;} - - void merge(const Rectangle& r); - void intersect(const Rectangle& r); - -}; - -} - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/RepeatButton.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/RepeatButton.h deleted file mode 100644 index cfca27d4..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/RepeatButton.h +++ /dev/null @@ -1,47 +0,0 @@ -// -// "$Id: RepeatButton.h 4886 2006-03-30 09:55:32Z fabien $" -// -// This button does it's callback repeatedly (about 10/second) while -// the user holds the button down. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_RepeatButton_h -#define fltk_RepeatButton_h - -#include "Button.h" - -namespace fltk { - -class FL_API RepeatButton : public Button { - static void repeat_callback(void *); -public: - int handle(int); - RepeatButton(int x,int y,int w,int h,const char *l=0) : Button(x,y,w,h,l) {} -}; - -} - -#endif - -// -// End of "$Id: RepeatButton.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ReturnButton.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ReturnButton.h deleted file mode 100644 index bc8bfe8d..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ReturnButton.h +++ /dev/null @@ -1,41 +0,0 @@ -// "$Id: ReturnButton.h 4886 2006-03-30 09:55:32Z fabien $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -#ifndef fltk_ReturnButton_h -#define fltk_ReturnButton_h - -#include "Button.h" - -namespace fltk { - -class FL_API ReturnButton : public Button { -public: - ReturnButton(int x,int y,int w,int h,const char *l=0); - static NamedStyle* default_style; -protected: - void draw(); -}; - -} - -#endif - -// End of "$Id: ReturnButton.h 4886 2006-03-30 09:55:32Z fabien $". diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ScrollGroup.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ScrollGroup.h deleted file mode 100644 index 5a508844..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ScrollGroup.h +++ /dev/null @@ -1,90 +0,0 @@ -// -// "$Id: ScrollGroup.h 5575 2007-01-02 17:31:40Z spitzak $" -// -// Group that adds scrollbars so you can scroll around the area -// covered by all the child widgets. For most uses you will make -// a single child widget, this child may resize in it's layout() -// and the scrollbars will adjust to match. -// -// Due to clipping problems no subclasses of Window may be used -// as child widgets. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_ScrollGroup_h -#define fltk_ScrollGroup_h - -#include "Group.h" -#include "Scrollbar.h" - -namespace fltk { - -class FL_API ScrollGroup : public Group { - - int xposition_, yposition_; - int layoutdx, layoutdy; - int scrolldx, scrolldy; - bool enable_drag_scroll_; - bool drag_scrolling_; - bool delegate_alt_click_; - int drag_x_, drag_y_, pos_x_, pos_y_; - int max_x_scroll_, max_y_scroll_; - static void hscrollbar_cb(Widget*, void*); - static void scrollbar_cb(Widget*, void*); - static void draw_clip(void*,const Rectangle&); - -protected: - - void draw(); - -public: - - void bbox(Rectangle&); - Scrollbar scrollbar; - Scrollbar hscrollbar; - - void enable_drag_scroll( bool enable ) { enable_drag_scroll_ = true; } - - virtual int handle(int); - virtual void layout(); - - ScrollGroup(int x,int y,int w,int h, const char*l=0, bool begin=false); - - enum { // values for type() - HORIZONTAL = 1, - VERTICAL = 2, - BOTH = 3, - ALWAYS_ON = 4, - HORIZONTAL_ALWAYS = 5, - VERTICAL_ALWAYS = 6, - BOTH_ALWAYS = 7, - }; - - int xposition() const {return xposition_;} - int yposition() const {return yposition_;} - void scrollTo(int, int); -}; - -} - -#endif - -// -// End of "$Id: ScrollGroup.h 5575 2007-01-02 17:31:40Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Scrollbar.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Scrollbar.h deleted file mode 100644 index d764b81b..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Scrollbar.h +++ /dev/null @@ -1,64 +0,0 @@ -// -// "$Id: Scrollbar.h 5956 2007-10-17 19:57:31Z spitzak $" -// -// Scrollbar, controls an integer position of a window of a given -// size inside a data set of a given total size. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_Scrollbar_h -#define fltk_Scrollbar_h - -#include "Slider.h" - -namespace fltk { - -class FL_API Scrollbar : public Slider { - -public: - Scrollbar(int x,int y,int w,int h, const char *l = 0); - static NamedStyle* default_style; - - int value() const {return int(Slider::value());} - bool value(int position) {return Slider::value(position);} - bool value(int position, int size, int top, int total); - int handle(int); - - int pagesize() const {return pagesize_;} - void pagesize(int a) {pagesize_ = a;} - -protected: - void draw(); - -private: - int pagesize_; - static void timeout_cb(void*); - void increment_cb(); - -}; - -} - -#endif - -// -// End of "$Id: Scrollbar.h 5956 2007-10-17 19:57:31Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/SecretInput.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/SecretInput.h deleted file mode 100644 index f6d61516..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/SecretInput.h +++ /dev/null @@ -1,47 +0,0 @@ -// -// "$Id: SecretInput.h 4886 2006-03-30 09:55:32Z fabien $" -// -// One-line text input field that draws asterisks instead of the -// letters. It also prevents the user from cutting or copying the -// text and then pasting it somewhere. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_SecretInput_h -#define fltk_SecretInput_h - -#include "Input.h" - -namespace fltk { - -class SecretInput : public Input { -public: - SecretInput(int x,int y,int w,int h,const char *l = 0) - : Input(x,y,w,h,l) {type(SECRET);} -}; - -} - -#endif - -// -// End of "$Id: SecretInput.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ShapedWindow.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ShapedWindow.h deleted file mode 100644 index 863829bf..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ShapedWindow.h +++ /dev/null @@ -1,57 +0,0 @@ -// "$Id: ShapedWindow.h 5972 2007-11-14 16:49:25Z dejan $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -#ifndef fltk_ShapedWindow_h -#define fltk_ShapedWindow_h - -#include "Window.h" -// WAS: This needs to take an arbitrary Image as a mask! -#include "xbmImage.h" - -namespace fltk { - -class FL_API ShapedWindow : public Window { - void init() { shape_ = 0; lw = lh = 0; changed = 0; } - public: - ShapedWindow(int W, int H, const char *l = 0) : Window(W,H,l) { - border(false); - init(); - } - ShapedWindow(int X, int Y, int W, int H, const char *l = 0): Window(X,Y,W,H,l) { - border(false); - init(); - } - void shape(xbmImage* b) { shape_ = b; changed = 1; } - void shape(xbmImage& b) { shape_ =&b; changed = 1; } - - protected: - virtual void draw(); - xbmImage* shape_; - int lw, lh; - int changed; -}; - -} -#endif - -// -// End of "$Id: ShapedWindow.h 5972 2007-11-14 16:49:25Z dejan $" -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/SharedImage.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/SharedImage.h deleted file mode 100644 index 8ba434d9..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/SharedImage.h +++ /dev/null @@ -1,236 +0,0 @@ -// "$Id: SharedImage.h 5738 2007-03-12 18:07:45Z spitzak $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -/*! \class fltk::SharedImage - -Subclass of Image that can read a file or block of compressed data. -This provides several useful functions: -* Images are identified by filename. The static get() function will -return an existing instance if it was called before with the same filename. -The release() function will decrement the reference count and delete -the image if nobody wants it any more. -* An inline block of data may be provided that is the contents of the file, -so the file does not have to exist and you can link the image directly -into your program. -* You may set a memory usage limit. If Image::mem_used() goes above -this limit, it will call destroy() on least-recently-used images until -it goes below this limit. -* The get() function can determine the type of the file or block of -data and create the correct subclass. - -*/ - -#ifndef fltk_SharedImage_h -#define fltk_SharedImage_h - -#include "Image.h" - -namespace fltk { - -struct FL_IMAGES_API ImageType; - - -class FL_API SharedImage : public Image { -// fabien : introducing SharedImage handlers and uniform loading api inspired from 1.1.x -public: - /*! get an image of this name and dimensions , can be already loaded or not */ - static SharedImage *get(const char *n); // future impl. should care about W,H dims - - /*! a SharedImageHandler accepts handling a filename - by analizing its extension and/or eventually its header, - if it handles it it returns a non null pointer on the loaded concrete image - */ - /** fetch to the data/pixels unified buffer the image, return true if success. - this method() does NOT draw the image, it only prepares - a generic buffer and its info, this method should be used by all - non-progresive-reading read() methods so that we avoid redondant code - */ - typedef SharedImage *(*Handler)(const char * filename, uchar *header, int headerlen); - /*! adds a new handler for hanling a concrete type of image, typically one handler per image type should be registered */ - static void add_handler(Handler f); - /*! removes a concrete handler */ - static void remove_handler(Handler f); - -private: - static Handler *handlers_; // Additional format handlers - static int num_handlers_; // Number of format handlers - static int alloc_handlers_; // Allocated format handlers - -protected: - static const char* shared_image_root; - - static int image_used; - static unsigned mem_usage_limit; - - SharedImage* l1; // Left leaf in the binary tree - SharedImage* l2; // Right leaf in the binary tree - const char* name; // Used to indentify the image, and as filename - const uchar* datas; // If non zero, pointers on inlined compressed datas - unsigned int used; // Last time used, for cache handling purpose - int refcount; // Number of time this image has been get - - SharedImage() { }; // Constructor is protected on purpose, - // use the get function rather - //~SharedImage(); - - void find_less_used(); - static void check_mem_usage(); - - /*! Return the filename obtained from the concatenation - of the image root directory and this image name - WARNING : the returned pointer will be - available only until next call to get_filename */ - const char* get_filename() const; - - virtual bool fetch() = 0; // force fetch() to be defined by subclasses - - static void insert(SharedImage*& p, SharedImage* image); - static SharedImage* find(SharedImage* image, const char* name); - void remove_from_tree(SharedImage*& p, SharedImage* image); - -public: - - static SharedImage *first_image; - - /*! Return an SharedImage, using the create function if an image with - the given name doesn't already exist. Use datas, or read from the - file with filename name if datas==0. */ - static SharedImage* get(SharedImage* (*create)(), - const char* name, const uchar* datas=0); - - /*! Reload the image, useful if it has changed on disk, or if the datas - / in memory have changed (you can also give a new pointer on datas) */ - void reload(const uchar* datas=0); - static void reload(const char* name, const uchar* datas=0); - - /*! Remove an image from the database and delete it if its refcount has - fallen to zero - Each remove() decrements the refcount, each get() increments it - Return 1 if it has been really deleted. */ - int remove(); - static int remove(const char* name); - - /*! Clear the cache for this image and all of its children in the binary tree */ - void clear_cache(); - - /*! Set the position where images are looked for on disk */ - static void set_root_directory(const char* d); - - /*! Expand a name relative to root to see what file it will read */ - static const char* get_filename(const char*); - - /*! Set the size of the cache (0 = unlimited is the default) */ - static void set_cache_size(unsigned l); - - void _draw(const Rectangle&) const; - -}; - -//////////////////////////////////////////////////////////////// - -/*! Description of an Image file format */ -struct FL_IMAGES_API ImageType { - // Name of the filetype as it appear in the source code LOWERCASE!!! - const char* name; - // Function to test the filetype - bool (*test)(const uchar* datas, unsigned size); - // Function to get/create an image of this type - SharedImage* (*get)(const char* name, const uchar* datas); -}; -extern FL_IMAGES_API ImageType image_filetypes[]; - -/*! Try to guess the filetype - Beware that calling this force you to link in all image types ! */ -FL_IMAGES_API ImageType* guess_image(const char* name, const uchar* datas=0); - -//////////////////////////////////////////////////////////////// - -// -// bmp and gif classes are build in libfltk2 so they are FL_API -// - -class FL_API gifImage : public SharedImage { - gifImage() { } - static SharedImage* create() { return new gifImage; } -public: - static bool test(const uchar* datas, unsigned size=0); - static SharedImage* get(const char* name, const uchar* datas = 0) { - return SharedImage::get(create, name, datas); - } - bool fetch(); -}; - -class FL_API bmpImage : public SharedImage { - bmpImage() { } - static SharedImage* create() { return new bmpImage; } -public: - static bool test(const uchar* datas, unsigned size=0); - static SharedImage* get(const char* name, const uchar* datas = 0) { - return SharedImage::get(create, name, datas); - } - bool fetch(); -}; - -class FL_IMAGES_API xpmFileImage : public SharedImage { - xpmFileImage() { } - static SharedImage* create() { return new xpmFileImage; } -public: - static bool test(const uchar* datas, unsigned size=0); - static SharedImage* get(const char* name, const uchar* datas = 0) { - return SharedImage::get(create, name, datas); - } - bool fetch(); -}; - -// -// jpeg and png classes are in libfltk2_images so they are FL_IMAGES_API -// - -class FL_IMAGES_API jpegImage : public SharedImage { - jpegImage() { } - static SharedImage* create() { return new jpegImage; } -public: - static bool test(const uchar* datas, unsigned size=0); - static SharedImage* get(const char* name, const uchar* datas = 0) { - return SharedImage::get(create, name, datas); - } - bool fetch(); -}; - -class FL_IMAGES_API pngImage : public SharedImage { - pngImage() { } - static SharedImage* create() { return new pngImage; } // Instantiate -public: -// Check the given buffer if it is in PNG format - static bool test(const uchar* datas, unsigned size=0); - static SharedImage* get(const char* name, const uchar* datas = 0) { - return SharedImage::get(create, name, datas); - } - bool fetch(); -}; - - extern FL_IMAGES_API void register_images(); // return always true only for automatic lib init purpose see images_core.cxx trick - extern FL_IMAGES_API void unregister_images(); -} - -#endif - -// End of "$Id: SharedImage.h 5738 2007-03-12 18:07:45Z spitzak $" diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Slider.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Slider.h deleted file mode 100644 index c4610f4a..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Slider.h +++ /dev/null @@ -1,95 +0,0 @@ -// -// "$Id: Slider.h 5600 2007-01-13 00:04:55Z spitzak $" -// -// Slider value control. By default it moves vertically with the -// minimum number at the bottom. See HorizontalSlider for one that -// moves across (which is usually the default in other toolkits). -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_Slider_h -#define fltk_Slider_h - -#ifndef fltk_Valuator_h -#include "Valuator.h" -#endif - -namespace fltk { - -class FL_API Slider : public Valuator { - - unsigned short slider_size_; - unsigned short tick_size_; - -public: - - enum { // bit flags for type(): - LINEAR = 0, - TICK_ABOVE = 2, - TICK_LEFT = TICK_ABOVE, - TICK_BELOW = 4, - TICK_RIGHT = TICK_BELOW, - TICK_BOTH = TICK_ABOVE|TICK_BELOW, - LOG = 8 -#ifdef FLTK_1_SLIDER - // for back-compatability only - ,VERTICAL = 0, - HORIZONTAL = 1, - FILL = 16 -#endif - }; - bool horizontal() const {return !flag(LAYOUT_VERTICAL) || (type()&1);} - bool log() const {return (type()&LOG)!=0;} - - void draw(); - int handle(int); - - Slider(int x,int y,int w,int h, const char *l = 0); - static NamedStyle* default_style; - - unsigned short slider_size() const {return slider_size_;} - void slider_size(int n) {slider_size_ = (unsigned short)n;} - unsigned short tick_size() const {return tick_size_;} - void tick_size(int n) {tick_size_ = (unsigned short)n;} - -#ifdef FLTK_1_SLIDER - // back comptability: - Box* slider() const {return buttonbox();} - void slider(Box* b) {buttonbox(b);} - void slider_size(double v) {slider_size(int(v*w()));} -#endif - - //protected: - - int slider_position(double value, int w); - double position_value(int x, int w); - int handle(int event, const Rectangle&); - void draw_ticks(const Rectangle&, int min_spacing); - bool draw(const Rectangle&, Flags flags, bool slot); -}; - -} - -#endif - -// -// End of "$Id: Slider.h 5600 2007-01-13 00:04:55Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/StatusBarGroup.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/StatusBarGroup.h deleted file mode 100644 index ca5b36aa..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/StatusBarGroup.h +++ /dev/null @@ -1,90 +0,0 @@ -// -// "$Id" -// -// The Status StatusBarGroup is strip that can be put in the bottom edge of a Pack, -// usually it contains a status bar. -// it redims according to its parent width and keeps original given height -// -// Copyright 2002-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_StatusStatusBarGroup_h -#define fltk_StatusStatusBarGroup_h - -#include "Group.h" -#include "InvisibleBox.h" - -namespace fltk { - -class FL_API StatusBarGroup : public Group { -public: - StatusBarGroup(int x,int y,int w,int h, const char* l=0, bool begin=false) : - Group(x,y,w,h,l,begin) {init(); } - //! statusbar default constructor - StatusBarGroup(int H=24) : Group(0, 0, 0, H, 0) {init(); } - virtual ~StatusBarGroup(); - - static NamedStyle* default_style; - - void layout(); - void show(); - void hide(); - - enum Position { - SBAR_LEFT=0, //!< statusbar text left-aligned - SBAR_CENTER, //!< statusbar text centered - SBAR_RIGHT //!< statusbar text right-aligned (default) - }; - - /** set a simple string in the status bar - at a given Position 'pos' alignment spec. - */ - void set(const char * t, Position pos=SBAR_RIGHT); - /** set a formatable (printf-like) text in the status bar - at a given Position 'pos' alignment spec. - */ - void set(Position pos, const char * format, ... ); - //! set a default box to all texts inside the status bar - void child_box(Box* b) {for(int i=0;i<3;i++) child_box(b,(Position)i);} - //! set a default box to text at particular position inside the status bar - void child_box(Box* b, Position i) {b_[i]= b;if(tf_[i]) tf_[i]->box(b);} - -protected: - //! draw a label on a particular (left,middle, right) Position - void draw_label(Position pos, const char * label); - //! adapt box position and size according to Position pos and statusbar dimensions - void update_box(InvisibleBox *b, Position pos); - -private: - void init(); - void resize_from_parent(); - - // text fields up to three fields - InvisibleBox* tf_[3]; // 3 position possible and cumulable left, middle, center fields - Box* b_[3]; // box style for fields, default to no box - int saved_h_; -}; - -} -#endif - -// -// End of "$Id" -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/StringList.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/StringList.h deleted file mode 100644 index afda8436..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/StringList.h +++ /dev/null @@ -1,72 +0,0 @@ -// "$Id: StringList.h 5709 2007-02-23 01:03:47Z spitzak $" -// -// Copyright 1998-2007 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -#ifndef fltk_StringList_h -#define fltk_StringList_h - -#include "Menu.h" - -namespace fltk { - -class FL_API StringHierarchy : public List { - Widget* generated_item_; -public: - // fltk::List virtual functions: - virtual Widget* child(const Menu*, const int* indexes, int level); - // virtual functions to return hierarchy of strings: - virtual int children(const Menu*, const int* indexes, int level) = 0; - virtual const char* label(const Menu*, const int* indexes, int level)=0; - // label() can mess with this item to change flags, font, etc: - Widget* generated_item() {return generated_item_;} - StringHierarchy() {generated_item_ = 0;} - ~StringHierarchy() {delete generated_item_;} -}; - -class FL_API StringList : public StringHierarchy { -public: - // overrides of StringHierarchy virtual functions: - virtual int children(const Menu*, const int* indexes, int level); - virtual const char* label(const Menu*, const int* indexes, int level); - // new virtual funcitons: - virtual int children(const Menu*) = 0; - virtual const char* label(const Menu*, int index) = 0; -}; - -class FL_API StringArray : public StringList { - const char* const * array; - int children_; -public: - // overrides of StringList virtual functions: - virtual int children(const Menu*); - virtual const char* label(const Menu*, int index); - // Constructors to use a constant array of strings: - StringArray(const char*const* a, int n) : array(a), children_(n) {} - StringArray(const char*const* a) {set(a);} - StringArray(const char* s) {set(s);} - StringArray() {children_ = 0;} - // change the array: - void set(const char*const* a, int n) {array=a; children_ = n;} - void set(const char*const* a); - void set(const char* s); // nul-seperated list -}; - -} -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Style.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Style.h deleted file mode 100644 index ec97fa8c..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Style.h +++ /dev/null @@ -1,203 +0,0 @@ -// -// "$Id: Style.h 5810 2007-05-11 22:44:12Z spitzak $" -// -// Style structure used by Widgets -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// -/*! \file */ - -#ifndef fltk_Style_h -#define fltk_Style_h - -#include "Color.h" - -namespace fltk { - -class FL_API Widget; -class FL_API Rectangle; -class FL_API Symbol; -typedef Symbol Box; - -extern FL_API Box* const UP_BOX; -extern FL_API Box* const DOWN_BOX; -extern FL_API Box* const THIN_UP_BOX; -extern FL_API Box* const THIN_DOWN_BOX; -extern FL_API Box* const ENGRAVED_BOX; -extern FL_API Box* const EMBOSSED_BOX; -extern FL_API Box* const BORDER_BOX; -extern FL_API Box* const FLAT_BOX; -extern FL_API Box* const HIGHLIGHT_UP_BOX; -extern FL_API Box* const HIGHLIGHT_DOWN_BOX; -extern FL_API Box* const ROUND_UP_BOX; -extern FL_API Box* const ROUND_DOWN_BOX; -extern FL_API Box* const DIAMOND_UP_BOX; -extern FL_API Box* const DIAMOND_DOWN_BOX; -extern FL_API Box* const NO_BOX; -extern FL_API Box* const SHADOW_BOX; -extern FL_API Box* const ROUNDED_BOX; -extern FL_API Box* const RSHADOW_BOX; -extern FL_API Box* const RFLAT_BOX; -extern FL_API Box* const OVAL_BOX; -extern FL_API Box* const OSHADOW_BOX; -extern FL_API Box* const OFLAT_BOX; -extern FL_API Box* const BORDER_FRAME; -extern FL_API Box* const PLASTIC_UP_BOX; -extern FL_API Box* const PLASTIC_DOWN_BOX; - -struct Font; -extern FL_API Font* const HELVETICA; -extern FL_API Font* const HELVETICA_BOLD; -extern FL_API Font* const HELVETICA_ITALIC; -extern FL_API Font* const HELVETICA_BOLD_ITALIC; -extern FL_API Font* const COURIER; -extern FL_API Font* const COURIER_BOLD; -extern FL_API Font* const COURIER_ITALIC; -extern FL_API Font* const COURIER_BOLD_ITALIC; -extern FL_API Font* const TIMES; -extern FL_API Font* const TIMES_BOLD; -extern FL_API Font* const TIMES_ITALIC; -extern FL_API Font* const TIMES_BOLD_ITALIC; -extern FL_API Font* const SYMBOL_FONT; -extern FL_API Font* const SCREEN_FONT; -extern FL_API Font* const SCREEN_BOLD_FONT; -extern FL_API Font* const ZAPF_DINGBATS; - -class LabelType; -extern FL_API LabelType* const NO_LABEL; -extern FL_API LabelType* const NORMAL_LABEL; -extern FL_API LabelType* const SYMBOL_LABEL; // same as NORMAL_LABEL -extern FL_API LabelType* const SHADOW_LABEL; -extern FL_API LabelType* const ENGRAVED_LABEL; -extern FL_API LabelType* const EMBOSSED_LABEL; - -class Style; - -class FL_API Style { - public: - // Everything is public for various back-compatability hacks: - const Style* parent_; - Box* box_; - Box* buttonbox_; - Symbol* glyph_; - Font* labelfont_; - Font* textfont_; - LabelType* labeltype_; - Color color_; - Color textcolor_; - Color selection_color_; - Color selection_textcolor_; - Color buttoncolor_; - Color labelcolor_; - Color highlight_color_; - Color highlight_textcolor_; - float labelsize_; - float textsize_; - float leading_; - unsigned char scrollbar_align_; - unsigned char scrollbar_width_; - bool dynamic_; - // global settings: - static bool hide_underscore_; - static bool draw_boxes_inactive_; - static int wheel_scroll_lines_; - - // Get functions, which search parents if value is zero: - Box* box() const; - Box* buttonbox() const; - Symbol* glyph() const; - Font* labelfont() const; - Font* textfont() const; - LabelType* labeltype() const; - Color color() const; - Color textcolor() const; - Color selection_color() const; - Color selection_textcolor() const; - Color buttoncolor() const; - Color labelcolor() const; - Color highlight_color() const; - Color highlight_textcolor() const; - float labelsize() const; - float textsize() const; - float leading() const; - unsigned char scrollbar_align() const; - unsigned char scrollbar_width() const; - - bool hide_underscore() const {return hide_underscore_;} - bool draw_boxes_inactive() const {return draw_boxes_inactive_;} - int wheel_scroll_lines() const {return wheel_scroll_lines_;} - - // Set functions: - void box (Box* v) {box_ = v; } - void buttonbox (Box* v) {buttonbox_ = v; } - void glyph (Symbol* v) {glyph_ = v; } - void labelfont (Font* v) {labelfont_ = v; } - void textfont (Font* v) {textfont_ = v; } - void labeltype (LabelType* v) {labeltype_ = v; } - void color (Color v) {color_ = v; } - void textcolor (Color v) {textcolor_ = v; } - void selection_color (Color v) {selection_color_ = v; } - void selection_textcolor(Color v) {selection_textcolor_ = v;} - void buttoncolor (Color v) {buttoncolor_ = v; } - void labelcolor (Color v) {labelcolor_ = v; } - void highlight_color (Color v) {highlight_color_ = v; } - void highlight_textcolor(Color v) {highlight_textcolor_ = v;} - void labelsize (float v) {labelsize_ = v; } - void textsize (float v) {textsize_ = v; } - void leading (float v) {leading_ = v; } - void scrollbar_align (unsigned char v) {scrollbar_align_ = v;} - void scrollbar_width (unsigned char v) {scrollbar_width_ = v;} - - void hide_underscore (bool v) {hide_underscore_ = v; } - void draw_boxes_inactive(bool v) {draw_boxes_inactive_ = v;} - void wheel_scroll_lines(int v) {wheel_scroll_lines_ = v;} - - Style(); - bool dynamic() const {return dynamic_;} - - static Style* find(const char* name); -}; - -struct FL_API NamedStyle : public Style { - const char* name; - void (*revertfunc)(Style*); - NamedStyle** back_pointer; // used by StyleSet - static NamedStyle* first; - NamedStyle* next; - NamedStyle(const char* name, void (*revert)(Style*), NamedStyle** backptr); -}; - -extern "C" {typedef bool (*Theme)();} -extern FL_API Theme theme_; -inline Theme theme() {return theme_;} -inline void theme(Theme f) {theme_ = f;} -FL_API void load_theme(); -FL_API void reload_theme(); -FL_API bool reset_theme(); - -} - -extern "C" FL_API bool fltk_theme(); - -#endif - -// -// End of "$Id: Style.h 5810 2007-05-11 22:44:12Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/StyleSet.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/StyleSet.h deleted file mode 100644 index c6ff7139..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/StyleSet.h +++ /dev/null @@ -1,48 +0,0 @@ -// -// "$Id: StyleSet.h 4886 2006-03-30 09:55:32Z fabien $" -// -// Saves and restores all the styles used by Widget constructors. Fluid -// uses this so you can preview a style without fluid's own control -// panels changing. I think this is broken, anybody want to fix it? -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_StyleSet_h -#define fltk_StyleSet_h - -#include "Style.h" - -namespace fltk { - -class FL_API StyleSet { - NamedStyle* first_style; - Theme theme; - Color background; - void* reserved; // pointer to extra saved stuff -public: - StyleSet(); - void make_current(); - ~StyleSet(); -}; - -} - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Symbol.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Symbol.h deleted file mode 100644 index 372bd19f..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Symbol.h +++ /dev/null @@ -1,91 +0,0 @@ -// "$Id: Symbol.h 5865 2007-06-01 13:04:19Z sanel.z $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_Symbol_h -#define fltk_Symbol_h - -#include "FL_API.h" -#include "Color.h" -#include "Rectangle.h" -#include "PixelType.h" - -namespace fltk { - -class Style; - -class FL_API Symbol { - const char* name_; - Rectangle inset_; - - // Forbid use of copy contructor and assign operator - Symbol & operator=(const Symbol &); - Symbol(const Symbol &); - - static const char* text_; - static unsigned text_length_; - - public: - - Symbol(const char* name=0); - const char* name() const {return name_;} - void name(const char*); - - virtual void _measure(int& w, int& h) const; - void measure(int& w, int& h) const {_measure(w,h);} - - virtual void _draw(const Rectangle&) const = 0; - void draw(const Rectangle& r) const {_draw(r);} - virtual void draw_symbol_overlay(const Rectangle&) const; - - void set_inset(int x,int y,int w,int h) {inset_.set(x,y,w,h);} - void set_inset(int x,int y) {inset_.set(x,y,-2*x,-2*y);} - void set_inset(int x) {inset_.set(x,x,-2*x,-2*x);} - void set_inset(const Rectangle& r) {inset_ = r;} - const Rectangle& get_inset() const {return inset_;} - - int dx() const {return inset_.x();} - int dy() const {return inset_.y();} - int dw() const {return -inset_.w();} // inverted for back-compatability - int dh() const {return -inset_.h();} // inverted for back-compatability - - // Hints for widgets: - virtual void inset(Rectangle& r) const; - virtual bool fills_rectangle() const; - virtual bool is_frame() const; - - // hash table lookup: - static const Symbol* find(const char* name); - static const Symbol* find(const char* start, const char* end); - static const Symbol* iterate(int& index); - static void text(const char* s, unsigned n) {text_=s; text_length_=n;} - static const char* text() {return text_;} - static unsigned text_length() {return text_length_;} - - virtual ~Symbol(); -}; - -// Back-compatability constructor: -FL_API void add_symbol(const char* name, void (*drawit)(Color), int scalable); - -} - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/SystemMenuBar.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/SystemMenuBar.h deleted file mode 100644 index 0861b562..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/SystemMenuBar.h +++ /dev/null @@ -1,62 +0,0 @@ -// -// "$Id:$" -// -// MacOS system menu bar header file for the Fast Light Tool Kit (FLTK2). -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -#ifndef fltk_SystemMenuBar_h -#define fltk_SystemMenuBar_h - -#include "MenuBar.h" - -struct Fl_Menu_Item; - -namespace fltk { - -#ifdef __APPLE__ - -class FL_API SystemMenuBar : public MenuBar { -protected: - void draw(); -public: - SystemMenuBar(int x,int y,int w,int h,const char *l=0) - : MenuBar(x,y,w,h,l) { - deactivate(); // don't let the old area take events - } - void layout(); -}; - -#else - -typedef MenuBar SystemMenuBar; - -#endif - -} - -#endif - -// -// End of "$Id:$". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/TabGroup.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/TabGroup.h deleted file mode 100644 index b6810f5e..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/TabGroup.h +++ /dev/null @@ -1,141 +0,0 @@ -// -// "$Id: TabGroup.h 5575 2007-01-02 17:31:40Z spitzak $" -// -// For making a "tabbed dialog box". Each child widget creates a tab. -// Only one is visible at a time. This works best if all the children -// have the same size and they don't cover a strip at the top for the -// tabs. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_TabGroup_h -#define fltk_TabGroup_h - -#include "Group.h" - -#define MIN_TABSIZE 30 - -namespace fltk { - -class TabGroup; - - -enum {TAB_LEFT, TAB_RIGHT, TAB_SELECTED}; - -class FL_API TabGroupPager { -public: - - TabGroupPager() : shift_(0), border_(10), slope_(5), extra_space_(5),_noclip(false) {} - - /* Pager template methods definition */ - - /*! this method must update the tab positions and width array, returns the selected tab */ - virtual int update_positions(TabGroup* g, int numchildren, int& selected, - int& cumulated_width, int& available_width , int* tab_pos, int* tab_width) { return selected;} - /*! draw the tabs for this custom pager, return false means no custom draw is made */ - virtual bool draw_tabs(TabGroup* g, int selected, int* tab_pos, int* tab_width) { return false;} - /*! determine and return the index of the child group at the corresponding pos */ - virtual int which(TabGroup* g, int m_x,int m_y)=0; - /*! virtual copy from a prototype */ - virtual TabGroupPager* clone() const=0; - - virtual const char * mode_name() const = 0; - virtual int id() const = 0; - - /*! return max width available for drawing tab thumbnails */ - virtual int available_width(TabGroup *g ) const; - - // tab appearance - int border() const {return border_;} - int slope() const {return slope_;} - int extra_space() const {return extra_space_;} - void border(int v) {border_=v;} - void slope(int v) {slope_=v;} - void extra_space(int v) {extra_space_=v;} - - /*! shifting to nth+1 tab to draw, permit to 'keep' a position while - changing tabs and tab is in the interval - */ - int shift() const {return shift_;} - void shift(int v) {shift_=v;} - int spacing() const {return slope_+extra_space_;} - /*! determines if we forbid partial tabs drawing with clipping */ - void noclip(bool v) {_noclip=v;} - -private: - int shift_, border_, slope_, extra_space_; - bool _noclip; - -}; - -// fltk default factory pagers -const int PAGER_MENU = 0; //<-- two left and right buttons provide prev page and next page -const int PAGER_SHRINK = 1; //<-- tabs outside rect are shrinked to very small slice to fit - - -class FL_API TabGroup : public Group { - -public: - int handle(int); - - TabGroup(int,int,int,int,const char * = 0, bool begin=false); - ~TabGroup() {delete pager_;} - static NamedStyle* default_style; - - int value() const; - bool value(int); - int which(int event_x, int event_y); - Widget *selected_child(); - bool selected_child(Widget *); - void set_draw_outline( bool draw_outline ); - - //! setting the pager_ to a tabgroup, pager is _never_ null by design - void pager(TabGroupPager * value); - //! returning the current pager_ responsible of this instance - TabGroupPager * pager() const {return pager_;} - //! setting the default pager_ for future tabgroups, a default pager is _never_ null by design - static void default_pager(TabGroupPager * v); - //! setting the default pager_ from the built-in ones - static void default_pager(int factory_pager_index); - - int tab_height(); - int tab_positions(int*, int*); - - void draw_tab(int x1, int x2, int W, int H, Widget* o, int sel=0); - void draw_tab_background(); - -protected: - void draw(); - -private: - int push(Widget *); - bool _drawOutline; - TabGroupPager* pager_; - static TabGroupPager* default_pager_; -}; - -} - -#endif - -// -// End of "$Id: TabGroup.h 5575 2007-01-02 17:31:40Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/TextBuffer.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/TextBuffer.h deleted file mode 100644 index 3a1b386d..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/TextBuffer.h +++ /dev/null @@ -1,285 +0,0 @@ -// -// "$Id: TextBuffer.h 5432 2006-09-16 02:03:04Z spitzak $" -// -// Header file for TextBuffer class. -// -// Copyright 2001-2006 by Bill Spitzak and others. -// Original code Copyright Mark Edel. Permission to distribute under -// the LGPL for the FLTK library granted by Mark Edel. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -#ifndef _fltk_TextBuffer_h_ -#define _fltk_TextBuffer_h_ - -#include "FL_API.h" - -namespace fltk { - -/* Maximum length in characters of a tab or control character expansion - of a single buffer character */ -#define TEXT_MAX_EXP_CHAR_LEN 20 - -class FL_API TextSelection { -public: - TextSelection(); - - void set(int start, int end); - void set_rectangular(int start, int end, int rectstart, int rectend); - void update(int pos, int ndeleted, int ninserted); - bool rectangular() const { return rectangular_; } - int start() const { return start_; } - int end() const { return end_; } - int rectstart() const { return rectstart_; } - int rectend() const { return rectend_; } - bool selected() const { return selected_; } - void selected(bool b) { selected_ = b; } - bool zerowidth() const { return zerowidth_; } - void zerowidth(bool b) { zerowidth_ = b; } - bool includes(int pos, int lineStartPos, int dispIndex); - int position(int* start, int* end); - int position(int* start, int* end, int* isrect, int* rectstart, int* rectend); - -protected: - bool selected_; /*!< True if the selection is active */ - bool rectangular_; /*!< True if the selection is rectangular */ - bool zerowidth_; /*!< Width 0 selections aren't "real" selections, but - they can be useful when creating rectangular - selections from the keyboard. */ - int start_; /*!< Pos. of start of selection, or if rectangular - start of line containing it. */ - int end_; /*!< Pos. of end of selection, or if rectangular - end of line containing it. */ - int rectstart_; /*!< Indent of left edge of rect. selection */ - int rectend_; /*!< Indent of right edge of rect. selection */ -}; - - -typedef void (*Text_Modify_Cb)( int pos, int nInserted, int nDeleted, - int nRestyled, const char* deletedText, - void* cbArg); - -typedef void (*Text_Predelete_Cb)(int pos, int nDeleted, void* cbArg); - -/** TextBuffer */ -class FL_API TextBuffer { -public: - TextBuffer(int requestedsize = 0); - ~TextBuffer(); - - int length() const { return length_; } - - const char *text(); - void text(const char* text); - - char character(int pos); - char *text_range(int start, int end); - char *text_in_rectangle(int start, int end, int rectStart, int rectEnd); - - void insert(int pos, const char *text); - void append(const char *t) { insert(length(), t); } - void remove(int start, int end); - void replace(int start, int end, const char *text); - void copy(TextBuffer *from_buf, int from_start, int from_end, int to_pos); - - int undo(int *cp = 0); - void canUndo(char flag = 1); - - int insertfile(const char *file, int pos, int buflen = 128*1024); - int appendfile(const char *file, int buflen = 128*1024) - { return insertfile(file, length(), buflen); } - int loadfile(const char *file, int buflen = 128*1024) - { select(0, length()); remove_selection(); return appendfile(file, buflen); } - int outputfile(const char *file, int start, int end, int buflen = 128*1024); - int savefile(const char *file, int buflen = 128*1024) - { return outputfile(file, 0, length(), buflen); } - - void insert_column(int column, int startpos, const char *text, - int *chars_inserted, int *chars_deleted); - - void replace_rectangular(int start, int end, int rectstart, int rectend, - const char *text); - - void overlay_rectangular(int startpos, int rectStart, int rectEnd, - const char* text, int* charsInserted, - int* charsDeleted); - - void remove_rectangular(int start, int end, int rectStart, int rectEnd); - void clear_rectangular(int start, int end, int rectStart, int rectEnd); - int tab_distance() const { return tabdist_; } - void tab_distance(int tabDist); - - void select(int start, int end); - bool selected() const { return primary_.selected(); } - void unselect(); - - void select_rectangular(int start, int end, int rectStart, int rectEnd); - int selection_position(int* start, int* end); - - int selection_position(int* start, int* end, int* isRect, int* rectStart, - int* rectEnd); - - char *selection_text(); - void remove_selection(); - void replace_selection(const char* text); - void secondary_select(int start, int end); - void secondary_unselect(); - - void secondary_select_rectangular(int start, int end, int rectStart, - int rectEnd); - - int secondary_selection_position(int* start, int* end, int* isRect, - int* rectStart, int* rectEnd); - - char *secondary_selection_text(); - void remove_secondary_selection(); - void replace_secondary_selection(const char* text); - void highlight(int start, int end); - void unhighlight(); - void highlight_rectangular(int start, int end, int rectStart, int rectEnd); - - int highlight_position(int* start, int* end, int* isRect, int* rectStart, - int* rectEnd); - - char *highlight_text(); - void add_modify_callback(Text_Modify_Cb bufModifiedCB, void* cbArg); - void remove_modify_callback(Text_Modify_Cb bufModifiedCB, void* cbArg); - - void call_modify_callbacks() { call_modify_callbacks(0, 0, 0, 0, 0); } - - void add_predelete_callback(Text_Predelete_Cb bufPredelCB, void* cbArg); - void remove_predelete_callback(Text_Predelete_Cb predelCB, void* cbArg); - - void call_predelete_callbacks() { call_predelete_callbacks(0, 0); } - - char* line_text(int pos); - int line_start(int pos); - int line_end(int pos); - int word_start(int pos); - int word_end(int pos); - int expand_character(int pos, int indent, char *outStr); - - static int expand_character(char c, int indent, char* outStr, int tabDist, - char nullSubsChar); - - static int character_width(char c, int indent, int tabDist, char nullSubsChar); - int count_displayed_characters(int lineStartPos, int targetPos); - int count_displayed_characters_utf(int lineStartPos, int targetPos); - int skip_displayed_characters(int lineStartPos, int nChars); - int skip_displayed_characters_utf(int lineStartPos, int nChars); - int count_lines(int startPos, int endPos); - int skip_lines(int startPos, int nLines); - int rewind_lines(int startPos, int nLines); - - bool findchar_forward(int startPos, char searchChar, int* foundPos); - bool findchar_backward(int startPos, char searchChar, int* foundPos); - - bool findchars_forward(int startpos, const char *searchChars, int *foundPos); - bool findchars_backward(int startpos, const char *searchChars, int *foundPos); - - bool search_forward(int startPos, const char* searchString, int* foundPos, - bool matchCase = false); - - bool search_backward(int startPos, const char* searchString, int* foundPos, - bool matchCase = false); - - char null_substitution_character() { return nullsubschar_; } - TextSelection* primary_selection() { return &primary_; } - TextSelection* secondary_selection() { return &secondary_; } - TextSelection* highlight_selection() { return &highlight_; } - -protected: - void call_modify_callbacks(int pos, int nDeleted, int nInserted, - int nRestyled, const char* deletedText); - void call_predelete_callbacks(int pos, int nDeleted); - - int insert_(int pos, const char* text); - void remove_(int start, int end); - - void remove_rectangular_(int start, int end, int rectStart, int rectEnd, - int* replaceLen, int* endPos); - - void insert_column_(int column, int startPos, const char* insText, - int* nDeleted, int* nInserted, int* endPos); - - void overlay_rectangular_(int startPos, int rectStart, int rectEnd, - const char* insText, int* nDeleted, - int* nInserted, int* endPos); - - void redisplay_selection(TextSelection* oldSelection, - TextSelection* newSelection); - - void move_gap(int pos); - void reallocate_with_gap(int newGapStart, int newGapLen); - char *selection_text_(TextSelection *sel); - void remove_selection_(TextSelection *sel); - void replace_selection_(TextSelection *sel, const char* text); - - void rectangular_selection_boundaries(int lineStartPos, int rectStart, - int rectEnd, int* selStart, - int* selEnd); - - void update_selections(int pos, int nDeleted, int nInserted); - - TextSelection primary_; /* highlighted areas */ - TextSelection secondary_; - TextSelection highlight_; - - int length_; /*!< length of the text in the buffer (the length - of the buffer itself must be calculated: - gapend - gapstart + length) */ - char *buf_; /*!< allocated memory where the text is stored */ - int gapstart_; /*!< points to the first character of the gap */ - int gapend_; /*!< points to the first char after the gap */ - - int tabdist_; /*!< equiv. number of characters in a tab */ - bool usetabs_; /*!< True if buffer routines are allowed to use - tabs for padding in rectangular operations */ - - int nmodifyprocs_; /*!< number of modify-redisplay procs attached */ - Text_Modify_Cb *modifyprocs_; /* modified to redisplay contents */ - void **modifycbargs_; /*!< caller arguments for modifyprocs_ above */ - - int npredeleteprocs_; /*!< number of pre-delete procs attached */ - Text_Predelete_Cb *predeleteprocs_; /* procedure to call before text is deleted */ - /* from the buffer; at most one is supported. */ - void **prepeletecbargs_; /*!< caller argument for pre-delete proc above */ - - int cursorposhint_; /*!< hint for reasonable cursor position after - a buffer modification operation */ - char nullsubschar_; /*!< TextBuffer is based on C null-terminated strings, - so ascii-nul characters must be substituted - with something else. This is the else, but - of course, things get quite messy when you - use it */ - - char mCanUndo; /*!< if this buffer is used for attributes, it must - not do any undo calls */ -}; - -} /* namespace fltk */ - -#endif - -// -// End of "$Id: TextBuffer.h 5432 2006-09-16 02:03:04Z spitzak $". -// - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/TextDisplay.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/TextDisplay.h deleted file mode 100644 index 88771000..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/TextDisplay.h +++ /dev/null @@ -1,358 +0,0 @@ -// -// "$Id: TextDisplay.h 5432 2006-09-16 02:03:04Z spitzak $" -// -// Header file for TextDisplay class. -// -// Copyright 2001-2006 by Bill Spitzak and others. -// Original code Copyright Mark Edel. Permission to distribute under -// the LGPL for the FLTK library granted by Mark Edel. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -#ifndef _fltk_TextDisplay_h_ -#define _fltk_TextDisplay_h_ - -#include "draw.h" -#include "Group.h" -#include "Widget.h" -#include "Scrollbar.h" -#include "TextBuffer.h" -#include "Font.h" - -namespace fltk { - -typedef void (*UnfinishedStyleCb)(int, void *); - -/** TextDisplay */ -class FL_API TextDisplay: public Group { -public: - enum { - NORMAL_CURSOR, CARET_CURSOR, DIM_CURSOR, - BLOCK_CURSOR, HEAVY_CURSOR - }; - - enum { - CURSOR_POS, CHARACTER_POS - }; - - // drag types- they match fltk::event_clicks() so that single clicking to - // start a collection selects by character, double clicking selects by - // word and triple clicking selects by line. - enum { - DRAG_CHAR = 0, DRAG_WORD = 1, DRAG_LINE = 2 - }; - - enum { - ATTR_NONE = 0, - ATTR_UNDERLINE = 1, - ATTR_HIDDEN = 2 - }; - - struct StyleTableEntry { - Color color; - Font *font; - float size; - unsigned attr; - }; - - TextDisplay(int X, int Y, int W, int H, const char *l = 0); - ~TextDisplay(); - - // Emulation of Input widget: - int size() const { return buffer_->length(); } - const char* text() const { return buffer_->text(); } - void text( const char* v) { buffer_->text(v); } - void static_text( const char* v) { buffer_->text(v); } - char at(int i) const { return buffer_->character(i); } - - virtual int handle(int e); - virtual void draw(); - virtual void layout(); - - /** Associate 'buf' with display */ - void buffer(TextBuffer* buf); - /** Associate 'buf' with display */ - void buffer(TextBuffer& buf) { buffer(&buf); } - - /** Return attached buffer */ - TextBuffer* buffer() { return buffer_; } - /** Return attached buffer */ - const TextBuffer* buffer() const { return buffer_; } - - /** Append text to the end of the buffer */ - void append(const char *text) { insert_position(buffer()->length()); insert(text); } - /** Insert text to current cursor position */ - void insert(const char *text); - /** Overstrike text from current cursor position */ - void overstrike(const char *text); - - /** Set new cursor position */ - void insert_position(int newPos); - /** Return current cursor position */ - int insert_position() const { return cursor_pos_; } - /** Make cursor position visible in screen */ - void show_insert_position(); - - /** Show cursor */ - void show_cursor(bool b = true); - /** Hide cursor */ - void hide_cursor() { show_cursor(false); } - /** Return cursor visibility state */ - bool cursor_on() const { return cursor_on_; } - /** Set cursor style */ - void cursor_style(int style); - - /** Return cursor color */ - Color cursor_color() const { return cursor_color_;} - /** Set cursor color */ - void cursor_color(Color n) { cursor_color_ = n; } - - /** Return begining of the word where 'pos' is located */ - int word_start(int pos) { return buffer()->word_start(pos); } - /** Return end of the word where 'pos' is located */ - int word_end(int pos) { return buffer()->word_end(pos); } - /** Go to next word */ - void next_word(void); - /** Go to previous word */ - void previous_word(void); - - /** Set wrapping mode. wrap_margin is width to wrap at, zero means use w() */ - void wrap_mode(bool wrap, int wrap_margin=0); - - /** Set line number area width */ - void linenumber_width(int width); - /** Return line number area width */ - int linenumber_width() const { return linenumwidth_; } - - /** Set new highlight data */ - void highlight_data(TextBuffer *styleBuffer, - StyleTableEntry *styleTable, - int nStyles, char unfinishedStyle, - UnfinishedStyleCb unfinishedHighlightCB, - void *cbArg); - - /** Move cursor right */ - bool move_right(); - /** Move cursor left */ - bool move_left(); - /** Move cursor down */ - bool move_up(); - /** Move cursor down */ - bool move_down(); - - /** Redisplay text */ - void redisplay_range(int start, int end); - - /** Scroll to new position */ - void scroll(int topLineNum, int horizOffset); - - /** Returns true if position is inside selection */ - bool in_selection(int x, int y); - - /** Returns begining of the line where 'pos' is located */ - int line_start(int pos); - - /** Returns end of the line where 'pos' is located */ - int line_end(int pos, bool start_pos_is_line_start = false); - - /** Return number of visible lines */ - int visible_lines() const { return visiblelines_cnt_; } - - /** Return current visible topline */ - int top_line() const { return topline_num_; } - - /** Return current horizontal offset */ - int hor_offset() const { return horiz_offset_; } - - /** Find start of the next character, starting from 'pos' - * If 'pos' points to start of character already, it is returned. - * This is mainly used with UTF-8 strings - */ - int find_next_char(int pos); - - /** Find start of the previous character, starting from 'pos' - * If 'pos' points to start of character already, it is returned. - * This is mainly used with UTF-8 strings - */ - int find_prev_char(int pos); - - int xy_to_position(int X, int Y, int PosType = CHARACTER_POS); - - void xy_to_rowcol(int X, int Y, int *row, int *column, int PosType = CHARACTER_POS); - - bool position_to_xy(int pos, int *X, int *Y); - - int total_lines() {return count_lines(0, buffer_->length(), true);} - -protected: - void draw_text(int X, int Y, int W, int H); - void draw_range(int start, int end); - void draw_cursor(int, int); - - void draw_string(int style, int x, int y, int toX, const char *string, - int nChars); - - void draw_vline(int visLineNum, int leftClip, int rightClip, - int leftCharIndex, int rightCharIndex); - - void draw_line_numbers(bool clearAll); - - void clear_rect(int style, int x, int y, int width, int height); - void display_insert(); - - int count_lines(int start, int end, bool start_pos_is_line_start); - int skip_lines(int startPos, int nLines, bool startPosIsLineStart); - int rewind_lines(int startPos, int nLines); - int position_style(int lineStartPos, int lineLen, int lineIndex, int dispIndex); - - int wrapped_column(int row, int column); - int wrapped_row(int row); - - void offset_line_starts(int newTopLineNum); - - void calc_line_starts(int startLine, int endLine); - - void update_line_starts(int pos, int charsInserted, int charsDeleted, - int linesInserted, int linesDeleted, bool *scrolled); - - void calc_last_char(); - - bool position_to_line(int pos, int* lineNum); - int string_width(const char* string, int length, int style); - - static void buffer_predelete_cb(int pos, int nDeleted, void* cbArg); - static void buffer_modified_cb(int pos, int nInserted, int nDeleted, - int nRestyled, const char* deletedText, - void* cbArg); - - static void h_scrollbar_cb(Scrollbar* w, TextDisplay* d); - static void v_scrollbar_cb( Scrollbar* w, TextDisplay* d); - void update_v_scrollbar(); - void update_h_scrollbar(int longestvline = 0); - - void blank_cursor_protrusions(); - int measure_vline(int visLineNum); - int longest_vline(); - int empty_vlines(); - int vline_length(int visLineNum); - - void maintain_absolute_top_line_number(bool state); - int get_absolute_top_line_number(); - void absolute_top_line_number(int oldFirstChar); - int maintaining_absolute_top_line_number(); - void reset_absolute_top_line_number(); - bool position_to_linecol(int pos, int *lineNum, int *column); - void scroll_(int topLineNum, int horizOffset); - - void extend_range_for_styles(int* start, int* end); - - void find_wrap_range(const char *deletedText, int pos, int nInserted, - int nDeleted, int *modRangeStart, int *modRangeEnd, - int *linesInserted, int *linesDeleted); - void measure_deleted_lines(int pos, int nDeleted); - void wrapped_line_counter(TextBuffer *buf, int startPos, int maxPos, - int maxLines, bool startPosIsLineStart, - int styleBufOffset, int *retPos, int *retLines, - int *retLineStart, int *retLineEnd, - bool countLastLineMissingNewLine = true); - void find_line_end(int pos, bool start_pos_is_line_start, int *lineEnd, - int *nextLineStart); - int measure_proportional_character(TextBuffer *buf, int bufpos, int colNum, int pos); - int wrap_uses_character(int lineEndPos); - int range_touches_selection(TextSelection *sel, int rangeStart, int rangeEnd); - void text_drag_me(int pos); - - int damage_range1_start, damage_range1_end; - int damage_range2_start, damage_range2_end; - - int cursor_pos_; - bool cursor_on_; - int cursor_oldx_; /* X pos. of cursor for blanking */ - int cursor_oldy_; /* Y pos. of cursor for blanking */ - int cursor_hint_; /* Tells the buffer modified callback - where to move the cursor, to reduce - the number of redraw calls */ - int cursor_style_; /* One of enum cursorStyles above */ - int cursor_preferred_col_; /* Column for vert. cursor movement */ - int visiblelines_cnt_; /* # of visible (displayed) lines */ - int bufferlines_cnt_; /* # of newlines in the buffer */ - TextBuffer *buffer_; /* Contains text to be displayed */ - TextBuffer *stylebuffer_; /* Optional parallel buffer containing - color and font information */ - int firstchar_, lastchar_; /* Buffer positions of first and last - displayed character (lastChar points - either to a newline or one character - beyond the end of the buffer) */ - bool own_buffer; /* True if buffer_ created by constructor */ - bool continuous_wrap_; /* Wrap long lines when displaying */ - int wrapmargin_; /* Margin in # of char positions for - wrapping in continuousWrap mode */ - int *linestarts_; - int topline_num_; /* Line number of top displayed line - of file (first line of file is 1) */ - int abs_topline_num_; /* In continuous wrap mode, the line - number of the top line if the text - were not wrapped (note that this is - only maintained as needed). */ - bool need_abs_topline_num_; /* Externally settable flag to continue - maintaining absTopLineNum even if - it isn't needed for line # display */ - int horiz_offset_; /* Horizontal scroll pos. in pixels */ - int numstyles_; /* Number of entries in styleTable */ - const StyleTableEntry *styletable_; /* Table of fonts and colors for - coloring/syntax-highlighting */ - char unfinished_style_; /* Style buffer entry which triggers - on-the-fly reparsing of region */ - UnfinishedStyleCb unfinished_highlight_cb_; /* Callback to parse "unfinished" */ - /* regions */ - void *highlight_cbarg_; /* Arg to unfinishedHighlightCB */ - int fixed_fontwidth_; /* Font width if all current fonts are - fixed and match in width, else -1 */ - bool suppressresync_; /* Suppress resynchronization of line - starts during buffer updates */ - int nlinesdeleted_; /* Number of lines deleted during - buffer modification (only used - when resynchronization is suppressed) */ - - int stdfontwidth_; - int ascent_; - int descent_; - int maxsize_; - - Color cursor_color_; - - Scrollbar *hscrollbar; - Scrollbar *vscrollbar; - - Rectangle text_area; - - int dragpos_, dragtype_, dragging_; - int linenumleft_, linenumwidth_; /* Line number margin and width */ -}; - -} /* namespace fltk */ - -#endif - -// -// End of "$Id: TextDisplay.h 5432 2006-09-16 02:03:04Z spitzak $". -// - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/TextEditor.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/TextEditor.h deleted file mode 100644 index 89797ac6..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/TextEditor.h +++ /dev/null @@ -1,122 +0,0 @@ -// -// "$Id: TextEditor.h 4899 2006-04-04 13:53:37Z fabien $" -// -// Header file for TextEditor class. -// -// Copyright 2001-2006 by Bill Spitzak and others. -// Original code Copyright Mark Edel. Permission to distribute under -// the LGPL for the FLTK library granted by Mark Edel. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - - -#ifndef TEXT_EDITOR_H -#define TEXT_EDITOR_H - -#include "TextDisplay.h" - -namespace fltk { - -// key will match in any state -#define TEXT_EDITOR_ANY_STATE (-1L) - -/** TextEditor */ -class FL_API TextEditor : public TextDisplay { -public: - typedef int (*Key_Func)(int key, TextEditor* editor); - - struct Key_Binding { - int key; - int state; - Key_Func function; - Key_Binding* next; - }; - - static NamedStyle* default_style; - - TextEditor(int X, int Y, int W, int H, const char* l = 0); - ~TextEditor(); - - virtual int handle(int e); - - /** Set new insert mode. true=insert, false=overstrike */ - void insert_mode(bool b) { insert_mode_ = b; } - /** Return current insert mode */ - bool insert_mode() const { return insert_mode_; } - - void add_key_binding(int key, int state, Key_Func f, Key_Binding** list); - void add_key_binding(int key, int state, Key_Func f) - { add_key_binding(key, state, f, &key_bindings); } - void remove_key_binding(int key, int state, Key_Binding** list); - void remove_key_binding(int key, int state) - { remove_key_binding(key, state, &key_bindings); } - void remove_all_key_bindings(Key_Binding** list); - void remove_all_key_bindings() { remove_all_key_bindings(&key_bindings); } - void add_default_key_bindings(Key_Binding** list); - Key_Func bound_key_function(int key, int state, Key_Binding* list); - Key_Func bound_key_function(int key, int state) - { return bound_key_function(key, state, key_bindings); } - void default_key_function(Key_Func f) { default_key_function_ = f; } - - // functions for the built in default bindings - static int kf_default(int c, TextEditor* e); - static int kf_ignore(int c, TextEditor* e); - static int kf_backspace(int c, TextEditor* e); - static int kf_enter(int c, TextEditor* e); - static int kf_move(int c, TextEditor* e); - static int kf_shift_move(int c, TextEditor* e); - static int kf_ctrl_move(int c, TextEditor* e); - static int kf_c_s_move(int c, TextEditor* e); - static int kf_home(int, TextEditor* e); - static int kf_end(int c, TextEditor* e); - static int kf_left(int c, TextEditor* e); - static int kf_up(int c, TextEditor* e); - static int kf_right(int c, TextEditor* e); - static int kf_down(int c, TextEditor* e); - static int kf_page_up(int c, TextEditor* e); - static int kf_page_down(int c, TextEditor* e); - static int kf_insert(int c, TextEditor* e); - static int kf_delete(int c, TextEditor* e); - static int kf_copy(int c, TextEditor* e); - static int kf_cut(int c, TextEditor* e); - static int kf_paste(int c, TextEditor* e); - static int kf_select_all(int c, TextEditor* e); - static int kf_undo(int c, TextEditor* e); - -protected: - int handle_key(); - void maybe_do_callback(); - - bool insert_mode_; - Key_Binding* key_bindings; - static Key_Binding* global_key_bindings; - Key_Func default_key_function_; -}; - -} /* namespace fltk */ - -#endif - -// -// End of "$Id: TextEditor.h 4899 2006-04-04 13:53:37Z fabien $". -// - - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Threads.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Threads.h deleted file mode 100644 index 11f0f6d4..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Threads.h +++ /dev/null @@ -1,201 +0,0 @@ -#ifndef fltk_Threads_h -#define fltk_Threads_h -#include <fltk/FL_API.h> - -#if !defined( _WIN32) || defined(__CYGWIN__) -// pthreads: - -#include <pthread.h> - -namespace fltk { - -/** Hides whatever the system uses to identify a thread. Used so - the "toy" interface is portable. */ -typedef pthread_t Thread; - -/** Fork a new thread and make it run \a f(p). Returns negative number - on error, otherwise \a t is set to the new thread. */ -inline int create_thread(Thread& t, void *(*f) (void *), void* p) { - return pthread_create((pthread_t*)&t, 0, f, p); -} - -/** - "Mutual-exclusion lock" for simple multithreaded programs. Calling - lock() will wait until nobody else has the lock and then will - return. <i>Calling lock() more than once will "deadlock"!</i> - To avoid this, use RecursiveMutex. -*/ -class Mutex { - friend class SignalMutex; - pthread_mutex_t mutex; - Mutex(const Mutex&); - Mutex& operator=(const Mutex&); -protected: - Mutex(const pthread_mutexattr_t* a) {pthread_mutex_init(&mutex, a);} -public: - Mutex() {pthread_mutex_init(&mutex, 0);} - void lock() {pthread_mutex_lock(&mutex);} - void unlock() {pthread_mutex_unlock(&mutex);} - bool trylock() {return pthread_mutex_trylock(&mutex) == 0;} - ~Mutex() {pthread_mutex_destroy(&mutex);} -}; - -/** - A portable "semaphore". A thread that holds this lock() can call - wait(), which will unlock it, then wait for another thread to - call signal(), then lock() it again. - - The other thread can call signal() at any time, though usually - it will have called lock() as well, as the lock can be used to - protect the data that is actually being shared between the threads. - - If more than one thread is in wait(), then calling signal_one() - will only wake one of them up. This may be more efficient, and - can be done safely if all threads that call wait() also call - signal_one() just before calling unlock(). - - Warning: wait() can return even if signal() was not called. You - must then check other data (protected by the lock()) to see if - the condition really is fulfilled. In many cases this is the - best implementation, it is also necessary to work around design - errors in Windows, where always returns after 1/2 second to - avoid a deadlock due to the non-atomic nature of Windows calls. -*/ -class SignalMutex : public Mutex { - pthread_cond_t cond; -public: - SignalMutex() : Mutex() {pthread_cond_init(&cond, 0);} - void signal() {pthread_cond_broadcast(&cond);} - void signal_one() {pthread_cond_signal(&cond);} - void wait() {pthread_cond_wait(&cond, &mutex);} -}; - -// Linux supports recursive locks, use them directly, with some cheating: -#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP) || defined(PTHREAD_MUTEX_RECURSIVE) - -class RecursiveMutex : public Mutex { -public: - RecursiveMutex(); -}; - -#else // standard pthread mutexes need a bit of work to be recursive: - -/** - "Mutual exclusion lock" to protect data in multithreaded programs. - This is a "recursive lock". Calling lock() will wait until nobody - else has the lock and then will take it. Calling lock() multiple - times by the same thread is allowed, and unlock() must then be - called the same number of times before another thread can get the - lock. -*/ -class RecursiveMutex : public Mutex { - pthread_t owner; - int counter; -public: - RecursiveMutex() : Mutex(), counter(0) {} - void lock() { - if (!counter || owner != pthread_self()) { - Mutex::lock(); - owner = pthread_self(); - counter = 1; - } else { - ++counter; - } - } - bool trylock() { - if (!counter || owner != pthread_self()) { - if (!Mutex::trylock()) return false; - owner = pthread_self(); - } - counter++; - return true; - } - void unlock() {if (!--counter) Mutex::unlock();} -}; - -#endif - -#else // _WIN32: - -# define _WIN32_WINNT 0x0500 -# include <windows.h> -# include <process.h> -// undefine some of the more annoying crap: -# undef DELETE -# undef ERROR -# undef IN -# undef OUT -# undef POINT -# undef far -# undef max -# undef min -# undef near - -namespace fltk { - -typedef unsigned long Thread; - -inline int create_thread(Thread& t, void *(*f) (void *), void* p) { - return t = (Thread)_beginthread((void( __cdecl * )( void * ))f, 0, p); -} - -class FL_API Mutex { - CRITICAL_SECTION cs; - Mutex(const Mutex&); - Mutex& operator=(const Mutex&); -public: - Mutex() {InitializeCriticalSection(&cs);} - void lock() {while (!TryEnterCriticalSection(&cs)) SwitchToThread();} - void unlock() {LeaveCriticalSection(&cs);} - bool trylock() {return TryEnterCriticalSection(&cs);} - ~Mutex() {DeleteCriticalSection(&cs);} -}; - -// After many experiments we have determined that this very stupid -// implementation has the lowest overhead: -class FL_API SignalMutex : public Mutex { -public: - SignalMutex() : Mutex() {} - void signal() {} - void signal_one() {} - void wait() { - // the following three calls should be atomic, sigh... - unlock(); - SwitchToThread(); - lock(); - } -}; - -typedef Mutex RecursiveMutex; - -#endif - -/** - C++ convienence object for locking a Mutex. - Creating a local one of these will lock() the mutex and it means - unlock() will be called no matter how a function exits, because - the destructor ~Guard() does an unlock(). - -\code - static fltk::Mutex mutex; - function() { - fltk::Guard guard(mutex); - do_stuff; - throw_exceptions; - if (test()) return; - etc; - } -\endcode - -*/ -class FL_API Guard { - Mutex& lock; - public: - Guard(Mutex& m) : lock(m) {lock.lock();} - Guard(Mutex* m) : lock(*m) {lock.lock();} - ~Guard() {lock.unlock();} -}; - -} - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ThumbWheel.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ThumbWheel.h deleted file mode 100644 index bcf3c9f6..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ThumbWheel.h +++ /dev/null @@ -1,54 +0,0 @@ -// -// "$Id: ThumbWheel.h 4886 2006-03-30 09:55:32Z fabien $" -// -// Inventor-style thumbwheel control for a single floating point value. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_ThumbWheel_h -#define fltk_ThumbWheel_h - -#ifndef fltk_Valuator_h -#include "Valuator.h" -#endif - -namespace fltk { - -class FL_API ThumbWheel : public Valuator { -public: -#ifdef FLTK_1_SLIDER - // for back-compatability only - enum {HORIZONTAL = 1}; -#endif - int handle(int); - ThumbWheel(int X,int Y,int W,int H,const char* L=0); - -protected: - void draw(); -}; - -} - -#endif - -// -// End of "$Id: ThumbWheel.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/TiledGroup.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/TiledGroup.h deleted file mode 100644 index aa349a96..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/TiledGroup.h +++ /dev/null @@ -1,50 +0,0 @@ -// -// "$Id: TiledGroup.h 5575 2007-01-02 17:31:40Z spitzak $" -// -// The child widgets are expected to be all laid out to touch each other -// and fill this group. The user can then move the boundaries between -// them by grabbing the junctions between the children. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_TiledGroup_h -#define fltk_TiledGroup_h - -#include "Group.h" - -namespace fltk { - -class FL_API TiledGroup : public Group { -protected: - void layout(); -public: - int handle(int); - TiledGroup(int x,int y,int w,int h, const char*l=0, bool begin=false) : - Group(x,y,w,h,l,begin) {} - void position(int, int, int, int); -}; - -} -#endif - -// -// End of "$Id: TiledGroup.h 5575 2007-01-02 17:31:40Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/TiledImage.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/TiledImage.h deleted file mode 100644 index 267fb516..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/TiledImage.h +++ /dev/null @@ -1,50 +0,0 @@ -// -// "$Id: TiledImage.h 5810 2007-05-11 22:44:12Z spitzak $" -// -// A tiled image completely fills the bounding box passed to it with -// replications of the internal Image passed to it. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_TiledImage_h -#define fltk_TiledImage_h - -#include "Symbol.h" - -namespace fltk { - -class FL_API TiledImage : public Symbol { -protected: - const Symbol* image_; -public: - TiledImage(Symbol *i) : Symbol(0), image_(i) {} - const Symbol* image() const {return image_;} - void image(const Symbol* i) {image_ = i;} - void _measure(int& w, int& h) const; - void _draw(const Rectangle&) const; -}; - -} -#endif - -// -// End of "$Id: TiledImage.h 5810 2007-05-11 22:44:12Z spitzak $" -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ToggleButton.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ToggleButton.h deleted file mode 100644 index 75e0f18c..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ToggleButton.h +++ /dev/null @@ -1,44 +0,0 @@ -// -// "$Id: ToggleButton.h 4886 2006-03-30 09:55:32Z fabien $" -// -// Button that clicks on and off. You get the state with value(). -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_ToggleButton_h -#define fltk_ToggleButton_h - -#include "Button.h" - -namespace fltk { - -class ToggleButton : public Button { -public: - ToggleButton(int x,int y,int w,int h,const char *l=0) - : Button(x,y,w,h,l) {type(TOGGLE);} -}; - -} -#endif - -// -// End of "$Id: ToggleButton.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ToggleItem.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ToggleItem.h deleted file mode 100644 index e6f60094..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ToggleItem.h +++ /dev/null @@ -1,41 +0,0 @@ -// "$Id: ToggleItem.h 588 2003-06-24 21:10:19Z spitzak $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_ToggleItem_h -#define fltk_ToggleItem_h - -#include "Item.h" - -namespace fltk { - -/** This widget makes a checkmark in a popup or pulldown Menu. - It's behavior in a Browser or MultiBrowser is that it changes its status on multiple clicks (e.g. double click). */ -class ToggleItem : public Item { -public: - ToggleItem(const char* label = 0) : Item(label) {type(TOGGLE);} - ToggleItem(const char* label,int shortcut,Callback *callback=0,void *user_data=0, int flags=0) - : Item(label,shortcut,callback,user_data,flags) {type(TOGGLE);} -}; - -} - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Tooltip.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Tooltip.h deleted file mode 100644 index 5d4db9d1..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Tooltip.h +++ /dev/null @@ -1,86 +0,0 @@ -// "$Id: Tooltip.h 4886 2006-03-30 09:55:32Z fabien $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -#ifndef fltk_Tooltip_h -#define fltk_Tooltip_h - -#include "MenuWindow.h" - -namespace fltk { - -class FL_API Tooltip : public MenuWindow { -public: - Tooltip(); - void draw(); - void layout(); - - static float delay() { return delay_; } - static void delay(float f) { delay_ = f; } - static bool enabled() { return enabled_; } - static void enable(bool b = true) { enabled_ = b; } - static void disable() { enabled_ = false; } - - typedef const char* (*Generator)(Widget*, void*); - static void enter(Widget*, const Rectangle&, Generator, void* = 0); - static void enter(Widget*, const Rectangle&, const char* text); - static void enter(Widget*); - static void current(Widget*); - static void exit(); - - static Widget* current_widget() { return current_widget_; } - static const Rectangle& current_rectangle() { return current_rectangle_; } - static Generator current_generator() { return current_generator_; } - static void* current_data() { return current_data_; } - static Tooltip* instance() { return instance_; } - - static NamedStyle* default_style; -#ifdef FLTK_1_WIDGET // back-compatability section: - static Widget* current() { return current_widget_; } - static Font* font() { return default_style->textfont(); } - static void font(Font* i) { default_style->textfont(i); } - static float size() { return default_style->labelsize(); } - static void size(float s) { default_style->labelsize(s); } - static void textcolor(Color c){ default_style->labelcolor(c); } - static Color textcolor() { return default_style->labelcolor(); } - static void color(Color c) { default_style->color(c); } - static Color color() { return default_style->color(); } - static void box(Box* b) { default_style->box(b); } - static Box* box() { return default_style->box(); } -#endif - -private: - static float delay_; - static bool enabled_; - static Widget* current_widget_; - static Rectangle current_rectangle_; - static Generator current_generator_; - static void* current_data_; - static Tooltip* instance_; - static void tooltip_timeout(void*); -}; - -} - -#endif - -// -// End of "$Id: Tooltip.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Valuator.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Valuator.h deleted file mode 100644 index 82ec50dc..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Valuator.h +++ /dev/null @@ -1,93 +0,0 @@ -// "$Id: Valuator.h 5956 2007-10-17 19:57:31Z spitzak $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -#ifndef fltk_Valuator_h -#define fltk_Valuator_h - -#ifndef fltk_Widget_h -#include "Widget.h" -#endif - -namespace fltk { - -class FL_API Valuator : public Widget { - -public: - - double value() const {return value_;} - bool value(double); - - double minimum() const {return minimum_;} - void minimum(double a) {minimum_ = a;} - - double maximum() const {return maximum_;} - void maximum(double a) {maximum_ = a;} - - void range(double a, double b) {minimum_ = a; maximum_ = b;} - - double step() const {return step_;} - void step(double a) {step_ = a;} - - double linesize() const; - void linesize(double a) {linesize_ = a;} - double linesize_setting() const {return linesize_;} - - virtual int format(char*); - - int handle(int); - -#ifdef FLTK_1_SLIDER - void step(double a, int b) {step(a/b);} - void bounds(double a, double b) {minimum_=a; maximum_=b;} - void precision(int p) { - int B = 1; - for (int i=0; i<p; i++) B *= 10; - step_ = 1.0f/B; - } -#endif - -//protected: - - Valuator(int X, int Y, int W, int H, const char* L); - double previous_value() const {return previous_value_;} - void handle_push() {previous_value_ = value_;} - void handle_drag(double newvalue); - void handle_release(); - - virtual void value_damage(); // callback whenever value changes - void set_value(double v) {value_ = v;} // change w/o doing value_damage - -private: - - double value_; - static double previous_value_; - double minimum_; - double maximum_; - double step_; - double linesize_; - -}; - -} - -#endif - -// End of "$Id: Valuator.h 5956 2007-10-17 19:57:31Z spitzak $". diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ValueInput.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ValueInput.h deleted file mode 100644 index 0fa5a68b..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ValueInput.h +++ /dev/null @@ -1,58 +0,0 @@ -// -// "$Id: ValueInput.h 4886 2006-03-30 09:55:32Z fabien $" -// -// Text field for inputing a floating-point number -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_ValueInput_h -#define fltk_ValueInput_h - -#include "Valuator.h" -#include "FloatInput.h" - -namespace fltk { - -class FL_API ValueInput : public Valuator { -public: - FloatInput input; - - int handle(int); - void draw(); - ValueInput(int x,int y,int w,int h,const char *l=0); - ~ValueInput(); - -protected: - void layout(); - virtual void value_damage(); // cause damage() due to value() changing - -private: - static void input_cb(Widget*,void*); - void increment_cb(); - static void repeat_callback(void* v); -}; - -} -#endif - -// -// End of "$Id: ValueInput.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ValueOutput.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ValueOutput.h deleted file mode 100644 index 1c4a5b3d..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ValueOutput.h +++ /dev/null @@ -1,45 +0,0 @@ -// -// "$Id: ValueOutput.h 5197 2006-06-14 07:43:46Z spitzak $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@easysw.com". -// - -#ifndef fltk_ValueOutput_h -#define fltk_ValueOutput_h - -#include "Valuator.h" - -namespace fltk { - -class FL_API ValueOutput : public Valuator { -public: - void draw(); - int handle(int); - ValueOutput(int x,int y,int w,int h,const char *l = 0) - : Valuator(x, y, w, h, l) {align(ALIGN_LEFT);} -}; - -} - -#endif - -// -// End of "$Id: ValueOutput.h 5197 2006-06-14 07:43:46Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ValueSlider.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ValueSlider.h deleted file mode 100644 index 528ecf28..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ValueSlider.h +++ /dev/null @@ -1,52 +0,0 @@ -// -// "$Id: ValueSlider.h 4886 2006-03-30 09:55:32Z fabien $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_Value_Slider_h -#define fltk_Value_Slider_h - -#include "Slider.h" -#include "FloatInput.h" - -namespace fltk { - -class FL_API ValueSlider : public Slider { -public: - FloatInput input; - int handle(int); - void draw(); - ValueSlider(int x,int y,int w,int h, const char *l = 0); - ~ValueSlider(); - void layout(); - virtual void value_damage(); // cause damage() due to value() changing - -private: - static void input_cb(Widget*,void*); - void slider_rect(Rectangle&); -}; - -} -#endif - -// -// End of "$Id: ValueSlider.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Widget.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Widget.h deleted file mode 100644 index c916b03b..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Widget.h +++ /dev/null @@ -1,322 +0,0 @@ -// "$Id: Widget.h 5938 2007-08-02 14:18:25Z spitzak $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -#ifndef fltk_Widget_h -#define fltk_Widget_h - -#include "Style.h" -#include "Rectangle.h" - -namespace fltk { - -class FL_API Widget; -class FL_API Window; -class FL_API Symbol; -class FL_API Group; -struct Cursor; - -typedef void (Callback )(Widget*, void*); -typedef Callback* Callback_p; // needed for BORLAND -typedef void (Callback0)(Widget*); -typedef void (Callback1)(Widget*, long); - -#ifdef FLTK_1_WIDGET // back-compatability section: -FL_API Font* font(int); -#endif - -class FL_API Widget : public Rectangle { - // disable the copy assignment/constructors: - Widget & operator=(const Widget &); - Widget(const Widget &); - -public: - - Widget(int,int,int,int,const char* =0); - virtual ~Widget(); - - virtual void draw(); - virtual int handle(int); - int send(int event); - virtual void layout(); - - const Style* style() const { return style_; } - void style(const Style* s) { style_ = s; } - void style(const Style& s) { style_ = &s; } - bool copy_style(const Style* s); - static NamedStyle* default_style; - static Symbol* default_glyph; - - Group* parent() const { return parent_; } - void parent(Group* w) { parent_ = w; } - Window* window() const ; - - enum WidgetVisualType { - // Values for type() shared by Button and menu Item, and for fake RTTI: - RESERVED_TYPE = 0x64, - TOGGLE = RESERVED_TYPE+1, - RADIO = RESERVED_TYPE+2, - GROUP_TYPE = 0xe0, - WINDOW_TYPE = 0xf0 - }; - - uchar type() const { return type_; } - void type(uchar t) { type_ = t; } - bool is_group() const { return type_ >= GROUP_TYPE; } - bool is_window() const { return type_ >= WINDOW_TYPE; } - - bool resize(int x,int y,int w,int h); - bool position(int x, int y) ; - bool resize(int w, int h) ; - - void get_absolute_rect( Rectangle *rect ) const; - - const char* label() const { return label_; } - void label(const char* a); - void copy_label(const char* a); - - const Symbol* image() const { return image_; } - void image(const Symbol* a) { image_ = a; } - void image(const Symbol& a) { image_ = &a; } - - const char *tooltip() const { return tooltip_; } - void tooltip(const char *t) { tooltip_ = t; } - - unsigned shortcut() const ; - bool shortcut(unsigned key) ; - bool add_shortcut(unsigned key); - bool remove_shortcut(unsigned key); - bool remove_shortcuts() ; - unsigned label_shortcut() const; - bool test_label_shortcut() const; - bool test_shortcut() const ; - bool test_shortcut(bool) const; - - Callback_p callback() const { return callback_; } - void callback(Callback* c, void* p) { callback_=c; user_data_=p; } - void callback(Callback* c) { callback_=c; } - void callback(Callback0*c) { callback_=(Callback*)c; } - void callback(Callback1*c, long p=0) { callback_=(Callback*)c; user_data_=(void*)p; } - void* user_data() const { return user_data_; } - void user_data(void* v) { user_data_ = v; } - long argument() const { return (long)user_data_; } - void argument(long v) { user_data_ = (void*)v; } - uchar when() const { return when_; } - void when(uchar i) { when_ = i; } - - static void default_callback(Widget*, void*); - void do_callback() { callback_(this,user_data_); } - void do_callback(Widget* o,void* arg=0) { callback_(o,arg); } - void do_callback(Widget* o,long arg) { callback_(o,(void*)arg); } - bool contains(const Widget*) const; - bool inside(const Widget* o) const { return o && o->contains(this); } - bool pushed() const ; - bool focused() const ; - bool belowmouse() const ; - - Flags flags() const { return flags_; } - void flags(Flags f) { flags_ = f; } - void set_flag(unsigned f) { flags_ |= f; } - void clear_flag(unsigned f) { flags_ &= ~f; } - void invert_flag(unsigned f) { flags_ ^= f; } - void set_flag(unsigned f,bool b) { flags_ = (flags_&~f)|(b?f:0); } - bool flag(unsigned f) const { return (flags_ & f) != 0; } - bool any_of(unsigned f) const{ return (flags_ & f) != 0; } - bool all_of(unsigned f) const{ return (flags_ & f) == f; } - - bool state() const { return flag(STATE); } - bool state(bool); - bool set() { return state(true); } - bool clear() { return state(false); } - void setonly(); - - Flags align() const { return flags_&ALIGN_MASK; } - void align(unsigned a) { flags_ = (flags_ & (~ALIGN_MASK)) | a; } - bool visible() const { return !flag(INVISIBLE); } - bool visible_r() const ; - void show() ; - void hide() ; - void set_visible() { clear_flag(INVISIBLE); } - void clear_visible() { set_flag(INVISIBLE); } - bool active() const { return !flag(INACTIVE); } - bool active_r() const ; - void activate() ; - void activate(int b) { if (b) activate(); else deactivate(); } - void deactivate() ; - bool output() const { return flag(OUTPUT); } - void set_output() { set_flag(OUTPUT); } - void clear_output() { clear_flag(OUTPUT); } - bool takesevents() const { return !any_of(OUTPUT|INVISIBLE|INACTIVE); } - bool changed() const { return flag(CHANGED); } - void set_changed() { set_flag(CHANGED); } - void clear_changed() { clear_flag(CHANGED); } - bool selected() const { return flag(SELECTED); } - void set_selected() { set_flag(SELECTED); } - void clear_selected() { clear_flag(SELECTED); } - bool click_to_focus() { return flag(CLICK_TO_FOCUS); } - void set_click_to_focus() { set_flag(CLICK_TO_FOCUS); } - void clear_click_to_focus() { clear_flag(CLICK_TO_FOCUS); } - bool tab_to_focus() { return flag(TAB_TO_FOCUS); } - void set_tab_to_focus() { set_flag(TAB_TO_FOCUS); } - void clear_tab_to_focus() { clear_flag(TAB_TO_FOCUS|CLICK_TO_FOCUS); } - bool horizontal() const { return !flag(LAYOUT_VERTICAL);} - bool vertical() const { return flag(LAYOUT_VERTICAL);} - void set_horizontal() { clear_flag(LAYOUT_VERTICAL); } - void set_vertical() { set_flag(LAYOUT_VERTICAL); } - - bool take_focus() ; - void throw_focus() ; - - void redraw() ; - void redraw(uchar c) ; - void redraw_label() ; - void redraw_highlight() ; - void redraw(const Rectangle&); - uchar damage() const { return damage_; } - void set_damage(uchar c) { damage_ = c; } // should be called damage(c) - - void relayout() ; - void relayout(uchar damage) ; - uchar layout_damage() const { return layout_damage_; } - void layout_damage(uchar c) { layout_damage_ = c; } - - void add_timeout(float) ; - void repeat_timeout(float) ; - void remove_timeout() ; - - void make_current() const ; - void draw_background() const ; - void draw_frame() const ; - void draw_box() const ; - void draw_box(const Rectangle& r) const ; // multiple boxes drawing for a single Widget - void draw_label() const ; - void draw_label(const Rectangle&, Flags) const ; - void draw_glyph(int, const Rectangle&) const ; - void cursor(Cursor*) const ; - - void measure_label(int&, int&) const ; - - Box* box() const; - Box* buttonbox() const; - Symbol* glyph() const; - Font* labelfont() const; - Font* textfont() const; - LabelType* labeltype() const; - Color color() const; - Color textcolor() const; - Color selection_color() const; - Color selection_textcolor() const; - Color buttoncolor() const; - Color labelcolor() const; - Color highlight_color() const; - Color highlight_textcolor() const; - float labelsize() const; - float textsize() const; - float leading() const; - unsigned char scrollbar_align() const; - unsigned char scrollbar_width() const; - - void box(Box*) ; - void buttonbox(Box*) ; - void glyph(Symbol*) ; - void labelfont(Font*) ; - void textfont(Font*) ; - void labeltype(LabelType*) ; - void color(Color) ; - void textcolor(Color a) ; - void selection_color(Color) ; - void selection_textcolor(Color); - void buttoncolor(Color) ; - void labelcolor(Color) ; - void highlight_color(Color) ; - void highlight_textcolor(Color); - void labelsize(float a) ; - void textsize(float a) ; - void leading(float a) ; - void scrollbar_align(unsigned char); - void scrollbar_width(unsigned char); - -#ifdef FLTK_1_WIDGET // back-compatability section: - - Box* down_box() const { return box(); } - Box* slider() const { return buttonbox(); } - Box* box2() const { return box(); } - Box* fly_box() const { return box(); } - Color color2() const { return selection_color(); } - Color color3() const { return buttoncolor(); } - Color down_labelcolor() const { return selection_textcolor(); } - Color fly_color() const { return highlight_color(); } - Color selected_textcolor() const { return selection_textcolor(); } - Color cursor_color() const { return selection_color(); } - float text_size() const { return textsize(); } - float label_size() const { return labelsize(); } - - void down_box(Box* a) { box(a); } - void slider(Box* a) { buttonbox(a); } - void fly_box(Box*) { } - void color(Color a, Color b) { color(a); selection_color(b); } - void color2(Color a) { selection_color(a); } - void color3(Color a) { buttoncolor(a); } - void down_labelcolor(Color a) { selection_textcolor(a); } - void labelfont(unsigned a) { labelfont(font(a)); } - void fly_color(Color a) { highlight_color(a); } - void textfont(unsigned a) { textfont(font(a)); } - void selected_textcolor(Color a) { selection_textcolor(a); } - void cursor_color(Color a) { selection_color(a); } - void text_size(float n) { textsize(n); } - void label_size(float n) { labelsize(n); } - -#endif - -private: - - const char* label_; - const Symbol* image_; - unsigned flags_; - const Style* style_; - Callback* callback_; - void* user_data_; - const char* tooltip_; // make this into another widget? - Group* parent_; - uchar type_; - uchar damage_; - uchar layout_damage_; - uchar when_; - -}; - -enum { // Widget::when() values - WHEN_NEVER = 0, - WHEN_CHANGED = 1, - WHEN_RELEASE = 4, - WHEN_RELEASE_ALWAYS = 6, - WHEN_ENTER_KEY = 8, - WHEN_ENTER_KEY_ALWAYS =10, - WHEN_ENTER_KEY_CHANGED=11, - WHEN_NOT_CHANGED = 2 // modifier bit to disable changed() test -}; - -} - -#endif - -// -// End of "$Id: Widget.h 5938 2007-08-02 14:18:25Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Window.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Window.h deleted file mode 100644 index b7c71d2a..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/Window.h +++ /dev/null @@ -1,152 +0,0 @@ -// "$Id: Window.h 5600 2007-01-13 00:04:55Z spitzak $" -// -// Window widget. This must be the outermost group. You can also put -// them inside other widgets to use the system's window hierarchy. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -#ifndef fltk_Window_h -#define fltk_Window_h - -#include "Group.h" - -namespace fltk { - -// value for x,y to indicate window system places window -const int USEDEFAULT = ((int)0x80000000); // same as Win32 value - -class CreatedWindow; -class Monitor; - -class FL_API Window : public Group { -public: - - Window(int,int,int,int, const char* = 0, bool begin = false); - Window(int,int, const char* = 0); - static NamedStyle* default_style; - virtual ~Window(); - - const char* label() const {return Widget::label();} - const char* iconlabel() const {return iconlabel_;} - void label(const char*); - void iconlabel(const char*); - void label(const char* label, const char* iconlabel); - void copy_label(const char* c) {Widget::copy_label(c); label(label());} - const void* icon() const {return icon_;} - void icon(const void * ic) {icon_ = ic;} - static const char* xclass() {return xclass_;} - static void xclass(const char* v) {xclass_ = v;} - - void border(bool set) {set ? clear_flag(NOBORDER) : set_flag(NOBORDER);} - /*! \deprecated compat. api only, please use Window::border(bool)*/ - void clear_border() {set_flag(NOBORDER);} - bool border() const {return !flag(NOBORDER);} - void set_override() {set_flag(NOBORDER|OVERRIDE);} - bool override() const {return flag(OVERRIDE); } - const Window* child_of() const {return child_of_;} - void child_of(const Window* w); - void set_modal() {set_flag(MODAL);} // back compatability only! - void set_non_modal() {set_flag(NON_MODAL);} // back compatability only! - - bool double_buffer() const {return flag(DOUBLE);} - void set_double_buffer() {set_flag(DOUBLE);} - void clear_double_buffer() {clear_flag(DOUBLE);} - void free_backbuffer(); - - virtual void draw_overlay(); - void redraw_overlay(); - void erase_overlay(); - - void hotspot(int x, int y, bool offscreen = false); - void hotspot(const Widget*, bool offscreen = false); - void hotspot(const Widget& p, bool offscrn = false) {hotspot(&p,offscrn);} - void size_range(int a, int b, int c=0, int d=0, int e=0, int f=0) - { minw=(short)a; minh=(short)b; maxw=(short)c; maxh=(short)d; dw=(uchar)e; dh=(uchar)f; size_range_(); } - bool get_size_range( int *min_w, int *min_h, int *max_w, int *max_h ); - - bool shown() const {return i != 0;} - void show(); - void show(int, char**); - void show(const Window* parent); - bool exec(const Window* parent = 0, bool grab = false); - void make_exec_return(bool); - void show_inside(const Window* parent); - void iconize(); - bool iconic() const; - virtual void destroy(); - - void fullscreen(); - void fullscreen(const Monitor&); - void fullscreen_off(int,int,int,int); - - static void default_callback(Window*, void* v); - - virtual int handle(int); - virtual void layout(); - virtual void flush(); - virtual void draw(); - - static Window* first(); - static void first(Window*); - Window* next(); - - void borders( Rectangle *r ) const; - - static const Window* drawing_window() {return drawing_window_;} - static const Window* drawing_window_; - - // fabien: used for my cairo experimentations, - // not sure i'll keep that opaque backbuffer access : - // at least it shouldn't stay public - void* backbuffer() const; - -protected: - virtual void create(); - -private: - - friend class CreatedWindow; - CreatedWindow *i; // points at the system-specific stuff - const Window* child_of_; - const char* iconlabel_; - const void* icon_; - // size_range stuff: - short minw, minh, maxw, maxh; - unsigned char dw, dh, size_range_set; - void size_range_(); - // values for flags(): - enum { - MODAL = 0x80000000, - NOBORDER = 0x40000000, - OVERRIDE = 0x20000000, - NON_MODAL = 0x10000000, - DOUBLE = 0x08000000 - }; - static const char* xclass_; - void _Window(); // constructor innards -}; - -} - -#endif - -// -// End of "$Id: Window.h 5600 2007-01-13 00:04:55Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/WizardGroup.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/WizardGroup.h deleted file mode 100644 index 349d10ef..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/WizardGroup.h +++ /dev/null @@ -1,59 +0,0 @@ -// -// "$Id: WizardGroup.h 4288 2005-04-16 00:13:17Z mike $" -// -// WizardGroup widget definitions. -// -// Copyright 1999-2006 by Easy Software Products and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -// -// Include necessary header files... -// - -#ifndef _fltk_WizardGroup_h_ -#define _fltk_WizardGroup_h_ - -#include "Group.h" - -namespace fltk { - -class FL_API WizardGroup : public Group { - Widget * value_; -public: - WizardGroup(int x,int y,int w,int h, const char * l = 0, bool begin=false) - : Group(x,y,w,h,l,begin), value_(0) { box(THIN_UP_BOX);} - - void draw(); - void next(); - void prev(); - void value(Widget *); - //! return the current visible child. - Widget * value() const { return value_;} -}; - -} - -#endif - -// -// End of "$Id: WizardGroup.h 4288 2005-04-16 00:13:17Z mike $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/WordwrapInput.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/WordwrapInput.h deleted file mode 100644 index e0805019..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/WordwrapInput.h +++ /dev/null @@ -1,45 +0,0 @@ -// -// "$Id: WordwrapInput.h 4886 2006-03-30 09:55:32Z fabien $" -// -// Small text input field that word-wraps its contents. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_WordwrapInput_h -#define fltk_WordwrapInput_h - -#include "Input.h" - -namespace fltk { - -// This class is entirely inline. If that changes, add FL_API to its declaration -class WordwrapInput : public Input { -public: - WordwrapInput(int x,int y,int w,int h,const char *l = 0) - : Input(x,y,w,h,l) {type(WORDWRAP);} -}; - -} -#endif - -// -// End of "$Id: WordwrapInput.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/WordwrapOutput.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/WordwrapOutput.h deleted file mode 100644 index 7c39f4cb..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/WordwrapOutput.h +++ /dev/null @@ -1,45 +0,0 @@ -// -// "$Id: WordwrapOutput.h 4886 2006-03-30 09:55:32Z fabien $" -// -// Small text output field that word-wraps its contents. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_WordwrapOutput_h -#define fltk_WordwrapOutput_h - -#include "Output.h" - -namespace fltk { - -// This class is entirely inline. If that changes, add FL_API to its declaration -class WordwrapOutput : public Output { -public: - WordwrapOutput(int x,int y,int w,int h,const char *l = 0) - : Output(x,y,w,h,l) {type(WORDWRAP);} -}; - -} -#endif - -// -// End of "$Id: WordwrapOutput.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ask.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ask.h deleted file mode 100644 index 81b5d367..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/ask.h +++ /dev/null @@ -1,78 +0,0 @@ -// -// "$Id: ask.h 5968 2007-11-13 22:56:23Z dejan $" -// -// Utility pop-up windows for fltk -// -// Copyright 2002 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -/*! \file */ - -#ifndef fltk_ask_h -#define fltk_ask_h - -#include "FL_API.h" -#include "Style.h" - -namespace fltk { - -class Widget; - -enum { - BEEP_DEFAULT = 0, - BEEP_MESSAGE, - BEEP_ERROR, - BEEP_QUESTION, - BEEP_PASSWORD, - BEEP_NOTIFICATION -}; - -FL_API void message(const char *, ...); -FL_API void alert(const char *, ...); -FL_API int ask(const char *, ...); -FL_API int choice(const char *q, - const char *b0, const char *b1, const char *b2, ...); -FL_API int choice_alert(const char *q, - const char *b0, const char *b1, const char *b2, ...); -FL_API const char *input(const char *label, const char *deflt = 0, ...); -FL_API const char *password(const char *label, const char *deflt = 0, ...); -FL_API void beep(int type = BEEP_DEFAULT); -FL_API void beep_on_dialog(bool); -FL_API bool beep_on_dialog(); - -extern FL_API NamedStyle* icon_style; -extern FL_API NamedStyle* message_style; - -extern FL_API const char* message_window_label; -extern FL_API float message_window_timeout; - -extern FL_API bool message_window_scrollable; - -// pointers you can use to change FLTK to a foreign language: -extern FL_API const char* no; -extern FL_API const char* yes; -extern FL_API const char* ok; -extern FL_API const char* cancel; - -} - -#endif - -// -// End of "$Id: ask.h 5968 2007-11-13 22:56:23Z dejan $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Enumerations.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Enumerations.H deleted file mode 100644 index 418cf8ec..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Enumerations.H +++ /dev/null @@ -1,357 +0,0 @@ -// -// "$Id: Enumerations.H 5389 2006-09-01 15:39:19Z spitzak $" -// -// Enumerations for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef Fl_Enumerations_H -#define Fl_Enumerations_H - -# include <fltk/FL_API.h> -# include <fltk/FL_VERSION.h> - -enum Fl_Event { // these should match fltk/events.h - FL_NO_EVENT = 0, - FL_PUSH = 1, - FL_RELEASE = 2, - FL_ENTER = 3, - FL_LEAVE = 4, - FL_DRAG = 5, - FL_FOCUS = 6, - FL_UNFOCUS = 7, - FL_KEYDOWN = 8, - FL_KEYBOARD = FL_KEYDOWN, - FL_KEYUP = 9, - //FL_CLOSE = 10, // not in fltk2.0 - FL_MOVE = 11, - FL_SHORTCUT = 12, - FL_DEACTIVATE = 13, - FL_ACTIVATE = 14, - FL_HIDE = 15, - FL_SHOW = 16, - FL_PASTE = 17, - //FL_SELECTIONCLEAR = 18, // not in fltk2.0 - FL_MOUSEWHEEL = 19, - FL_DND_ENTER = 20, - FL_DND_DRAG = 21, - FL_DND_LEAVE = 22, - FL_DND_RELEASE = 23 -}; - -enum Fl_When { // These should match values in fltk/Widget.h - FL_WHEN_NEVER = 0, - FL_WHEN_CHANGED = 1, - FL_WHEN_RELEASE = 4, - FL_WHEN_RELEASE_ALWAYS= 6, - FL_WHEN_ENTER_KEY = 8, - FL_WHEN_ENTER_KEY_ALWAYS=10, - FL_WHEN_ENTER_KEY_CHANGED=11, - FL_WHEN_NOT_CHANGED = 2 // modifier bit to disable changed() test -}; - -// These should match symbols in fltk/events.h: -#define FL_Button 0 // old value was 0xfee8 -#define FL_LEFT_MOUSE 1 -#define FL_MIDDLE_MOUSE 2 -#define FL_RIGHT_MOUSE 3 -#define FL_BackSpace 0xff08 -#define FL_Tab 0xff09 -#define FL_Enter 0xff0d -#define FL_Pause 0xff13 -#define FL_Scroll_Lock 0xff14 -#define FL_Escape 0xff1b -#define FL_Home 0xff50 -#define FL_Left 0xff51 -#define FL_Up 0xff52 -#define FL_Right 0xff53 -#define FL_Down 0xff54 -#define FL_Page_Up 0xff55 -#define FL_Page_Down 0xff56 -#define FL_End 0xff57 -#define FL_Print 0xff61 -#define FL_Insert 0xff63 -#define FL_Menu 0xff67 // the "menu/apps" key on XFree86 -#define FL_Help 0xff68 // the 'help' key on Mac keyboards -#define FL_Num_Lock 0xff7f -#define FL_KP 0xff80 // use FL_KP+'x' for 'x' on numeric keypad -#define FL_KP_Enter 0xff8d // same as Fl_KP+'\r' -#define FL_KP_Last 0xffbd // use to range-check keypad -#define FL_F 0xffbd // use FL_F+n for function key n -#define FL_F_Last 0xffe0 // use to range-check function keys -#define FL_Shift_L 0xffe1 -#define FL_Shift_R 0xffe2 -#define FL_Control_L 0xffe3 -#define FL_Control_R 0xffe4 -#define FL_Caps_Lock 0xffe5 -#define FL_Meta_L 0xffe7 -#define FL_Meta_R 0xffe8 -#define FL_Alt_L 0xffe9 -#define FL_Alt_R 0xffea -#define FL_Delete 0xffff - -#define FL_SHIFT 0x00010000 -#define FL_CAPS_LOCK 0x00020000 -#define FL_CTRL 0x00040000 -#define FL_ALT 0x00080000 -#define FL_NUM_LOCK 0x00100000 // most X servers do this? -#define FL_META 0x00400000 -#define FL_SCROLL_LOCK 0x00800000 -#define FL_BUTTON1 0x01000000 -#define FL_BUTTON2 0x02000000 -#define FL_BUTTON3 0x04000000 -#define FL_BUTTONS 0x7f000000 // All possible buttons -#define FL_BUTTON(n) (0x00800000<<(n)) - -#ifdef __APPLE__ -# define FL_COMMAND FL_META -#else -# define FL_COMMAND FL_CTRL -#endif // __APPLE__ - -#include <fltk/Style.h> - -typedef fltk::Box* Fl_Boxtype; - -// Box types. Many of the FRAME types are deleted in fltk2.0, these have -// been replaced with the equivalent BOX which draws it's inner area: -#define FL_NO_BOX fltk::NO_BOX -#define FL_FLAT_BOX fltk::FLAT_BOX -#define FL_UP_BOX fltk::UP_BOX -#define FL_DOWN_BOX fltk::DOWN_BOX -#define FL_UP_FRAME fltk::UP_BOX // -#define FL_DOWN_FRAME fltk::DOWN_BOX // -#define FL_THIN_UP_BOX fltk::THIN_UP_BOX -#define FL_THIN_DOWN_BOX fltk::THIN_DOWN_BOX -#define FL_THIN_UP_FRAME fltk::THIN_UP_BOX // -#define FL_THIN_DOWN_FRAME fltk::THIN_DOWN_BOX // -#define FL_ENGRAVED_BOX fltk::ENGRAVED_BOX -#define FL_EMBOSSED_BOX fltk::EMBOSSED_BOX -#define FL_ENGRAVED_FRAME fltk::ENGRAVED_BOX // -#define FL_EMBOSSED_FRAME fltk::EMBOSSED_BOX // -#define FL_BORDER_BOX fltk::BORDER_BOX -#define FL_SHADOW_BOX fltk::SHADOW_BOX -#define FL_BORDER_FRAME fltk::BORDER_FRAME -#define FL_SHADOW_FRAME fltk::SHADOW_BOX // -#define FL_ROUNDED_BOX fltk::ROUNDED_BOX -#define FL_RSHADOW_BOX fltk::RSHADOW_BOX -#define FL_ROUNDED_FRAME fltk::ROUNDED_BOX // -#define FL_RFLAT_BOX fltk::RFLAT_BOX -#define FL_ROUND_UP_BOX fltk::ROUND_UP_BOX -#define FL_ROUND_DOWN_BOX fltk::ROUND_DOWN_BOX -#define FL_DIAMOND_UP_BOX fltk::DIAMOND_UP_BOX -#define FL_DIAMOND_DOWN_BOX fltk::DIAMOND_DOWN_BOX -#define FL_OVAL_BOX fltk::OVAL_BOX -#define FL_OSHADOW_BOX fltk::OSHADOW_BOX -#define FL_OVAL_FRAME fltk::OVAL_BOX // -#define FL_OFLAT_BOX fltk::OFLAT_BOX -#define FL_PLASTIC_UP_BOX fltk::PLASTIC_UP_BOX -#define FL_PLASTIC_DOWN_BOX fltk::PLASTIC_DOWN_BOX -#define FL_PLASTIC_UP_FRAME fltk::PLASTIC_UP_BOX // -#define FL_PLASTIC_DOWN_FRAME fltk::PLASTIC_DOWN_BOX // -//#define FL_FREE_BOXTYPE not used in fltk 2.0 - -// conversions of box types to other boxtypes: -//inline Fl_Boxtype fl_down(Fl_Boxtype b) // not implemented -//inline Fl_Boxtype fl_frame(Fl_Boxtype b) - -// back-compatability box types: -#define FL_FRAME FL_ENGRAVED_FRAME -#define FL_FRAME_BOX FL_ENGRAVED_BOX -#define FL_CIRCLE_BOX FL_ROUND_DOWN_BOX -#define FL_DIAMOND_BOX FL_DIAMOND_DOWN_BOX - -// labeltypes: -#define FL_NO_LABEL fltk::NO_LABEL -#define FL_NORMAL_LABEL fltk::NORMAL_LABEL -#define FL_SHADOW_LABEL fltk::SHADOW_LABEL -#define FL_ENGRAVED_LABEL fltk::ENGRAVED_LABEL -#define FL_EMBOSSED_LABEL fltk::EMBOSSED_LABEL -//#define FL_FREE_LABELTYPE not used in fltk2.0 -#define FL_SYMBOL_LABEL FL_NORMAL_LABEL - -#define Fl_Align fltk::Flags -enum { - FL_ALIGN_CENTER = 0, - FL_ALIGN_TOP = fltk::ALIGN_TOP, - FL_ALIGN_BOTTOM = fltk::ALIGN_BOTTOM, - FL_ALIGN_LEFT = fltk::ALIGN_LEFT, - FL_ALIGN_RIGHT = fltk::ALIGN_RIGHT, - FL_ALIGN_INSIDE = fltk::ALIGN_INSIDE, - FL_ALIGN_TEXT_OVER_IMAGE = fltk::ALIGN_BOTTOM|fltk::ALIGN_INSIDE, // - FL_ALIGN_IMAGE_OVER_TEXT = 0, - FL_ALIGN_CLIP = fltk::ALIGN_CLIP, - FL_ALIGN_WRAP = fltk::ALIGN_WRAP, - FL_ALIGN_MASK = fltk::ALIGN_MASK, - FL_ALIGN_TOP_LEFT = FL_ALIGN_TOP | FL_ALIGN_LEFT, - FL_ALIGN_TOP_RIGHT = FL_ALIGN_TOP | FL_ALIGN_RIGHT, - FL_ALIGN_BOTTOM_LEFT = FL_ALIGN_BOTTOM | FL_ALIGN_LEFT, - FL_ALIGN_BOTTOM_RIGHT = FL_ALIGN_BOTTOM | FL_ALIGN_RIGHT, - FL_ALIGN_LEFT_TOP = FL_ALIGN_TOP_LEFT, - FL_ALIGN_RIGHT_TOP = FL_ALIGN_TOP_RIGHT, - FL_ALIGN_LEFT_BOTTOM = FL_ALIGN_BOTTOM_LEFT, - FL_ALIGN_RIGHT_BOTTOM = FL_ALIGN_BOTTOM_RIGHT, - FL_ALIGN_NOWRAP = 0 -}; - -#define FL_HELVETICA fltk::HELVETICA -#define FL_HELVETICA_BOLD fltk::HELVETICA_BOLD -#define FL_HELVETICA_ITALIC fltk::HELVETICA_ITALIC -#define FL_HELVETICA_BOLD_ITALIC fltk::HELVETICA_BOLD_ITALIC -#define FL_COURIER fltk::COURIER -#define FL_COURIER_BOLD fltk::COURIER_BOLD -#define FL_COURIER_ITALIC fltk::COURIER_ITALIC -#define FL_COURIER_BOLD_ITALIC fltk::COURIER_BOLD_ITALIC -#define FL_TIMES fltk::TIMES -#define FL_TIMES_BOLD fltk::TIMES_BOLD -#define FL_TIMES_ITALIC fltk::TIMES_ITALIC -#define FL_TIMES_BOLD_ITALIC fltk::TIMES_BOLD_ITALIC -#define FL_SYMBOL fltk::SYMBOL_FONT -#define FL_SCREEN fltk::SCREEN_FONT -#define FL_SCREEN_BOLD fltk::SCREEN_BOLD_FONT -#define FL_ZAPF_DINGBATS fltk::ZAPF_DINGBATS -//#define FL_FREE_FONT -// These used to be added to the above fonts but were sometimes used alone -// because FL_HELVETICA was zero. Only using these by themselves works now: -#define FL_BOLD fltk::HELVETICA_BOLD -#define FL_ITALIC fltk::HELVETICA_ITALIC - -#define FL_NORMAL_SIZE (fltk::Widget::default_style->labelsize_) -#define FL_FOREGROUND_COLOR (fltk::Widget::default_style->labelcolor_) -#define FL_BACKGROUND2_COLOR (fltk::Widget::default_style->color_) -#define FL_SELECTION_COLOR (fltk::Widget::default_style->selection_color_) - -#define Fl_Color fltk::Color -enum { - FL_GRAY0 = fltk::GRAY00, - FL_DARK3 = fltk::GRAY33, - FL_DARK2 = fltk::GRAY60, - FL_DARK1 = fltk::GRAY66, - FL_GRAY = fltk::GRAY75, - FL_BACKGROUND_COLOR = fltk::GRAY75, - FL_LIGHT1 = fltk::GRAY85, - FL_LIGHT2 = fltk::GRAY90, - FL_LIGHT3 = fltk::GRAY99, - - FL_BLACK = fltk::BLACK, - FL_RED = fltk::RED, - FL_GREEN = fltk::GREEN, - FL_YELLOW = fltk::YELLOW, - FL_BLUE = fltk::BLUE, - FL_MAGENTA = fltk::MAGENTA, - FL_CYAN = fltk::CYAN, - FL_DARK_RED = 72, - - FL_DARK_GREEN = 60, - FL_DARK_YELLOW = 76, - FL_DARK_BLUE = 136, - FL_DARK_MAGENTA = 152, - FL_DARK_CYAN = 140, - - FL_WHITE = fltk::WHITE, - - FL_FREE_COLOR = 16, - FL_NUM_FREE_COLOR = 16, - FL_GRAY_RAMP = fltk::GRAY00, - FL_NUM_GRAY = 24, - FL_COLOR_CUBE = fltk::BLACK, - FL_NUM_RED = 5, - FL_NUM_GREEN = 8, - FL_NUM_BLUE = 5 -}; - -#define fl_inactive(c) fltk::inactive(c) -#define fl_contrast(a,b) fltk::contrast(a,b) -#define fl_color_average(a,b,c) fltk::lerp(b,a,c) -#define fl_lighter(c) fltk::lerp(fltk::WHITE,c,.67f) -#define fl_darker(c) fltk::lerp(fltk::BLACK,c,.67f) -#define fl_rgb_color fltk::color -#define fl_gray_ramp(i) (fltk::GRAY00+(i)) -#define fl_color_cube(r,g,b) (((b)*5+(r))*8+(g)+fltk::BLACK) - -#include <fltk/Cursor.h> -#define Fl_Cursor fltk::Cursor* -#define FL_CURSOR_DEFAULT fltk::CURSOR_DEFAULT -#define FL_CURSOR_ARROW fltk::CURSOR_ARROW -#define FL_CURSOR_CROSS fltk::CURSOR_CROSS -#define FL_CURSOR_WAIT fltk::CURSOR_WAIT -#define FL_CURSOR_INSERT fltk::CURSOR_INSERT -#define FL_CURSOR_HAND fltk::CURSOR_HAND -#define FL_CURSOR_HELP fltk::CURSOR_HELP -#define FL_CURSOR_MOVE fltk::CURSOR_MOVE -#define FL_CURSOR_NS fltk::CURSOR_NS -#define FL_CURSOR_WE fltk::CURSOR_WE -#define FL_CURSOR_NWSE fltk::CURSOR_NWSE -#define FL_CURSOR_NESW fltk::CURSOR_NESW -#define FL_CURSOR_NO fltk::CURSOR_NO -#define FL_CURSOR_NONE fltk::CURSOR_NONE -#define FL_CURSOR_N fltk::CURSOR_NS -#define FL_CURSOR_NE fltk::CURSOR_NESW -#define FL_CURSOR_E fltk::CURSOR_WE -#define FL_CURSOR_SE fltk::CURSOR_NWSE -#define FL_CURSOR_S fltk::CURSOR_NS -#define FL_CURSOR_SW fltk::CURSOR_NESW -#define FL_CURSOR_W fltk::CURSOR_WE -#define FL_CURSOR_NW fltk::CURSOR_NWSE - -enum { // must match values in fltk/run.h - FL_READ = 1, - FL_WRITE = 4, - FL_EXCEPT = 8 -}; - -enum Fl_Mode { // must match values in fltk/visual.h - FL_RGB = 0, - FL_INDEX = 1, - FL_SINGLE = 0, - FL_DOUBLE = 2, - FL_ACCUM = 4, - FL_ALPHA = 8, - FL_DEPTH = 16, - FL_STENCIL = 32, - FL_RGB8 = 64, - FL_MULTISAMPLE= 128, - FL_STEREO = 256, - FL_FAKE_SINGLE = 512 // Fake single buffered windows using double-buffer -}; - -#include <fltk/damage.h> -enum Fl_Damage { - FL_DAMAGE_CHILD = fltk::DAMAGE_CHILD, - FL_DAMAGE_EXPOSE = fltk::DAMAGE_EXPOSE, - FL_DAMAGE_SCROLL = fltk::DAMAGE_SCROLL, - FL_DAMAGE_OVERLAY = fltk::DAMAGE_OVERLAY, - FL_DAMAGE_ALL = fltk::DAMAGE_ALL -}; - -// FLTK 1.0.x compatibility definitions... -# ifdef FLTK_1_0_COMPAT -# define contrast fl_contrast -# define down fl_down -# define frame fl_frame -# define inactive fl_inactive -# endif // FLTK_1_0_COMPAT - -#endif - -// -// End of "$Id: Enumerations.H 5389 2006-09-01 15:39:19Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl.H deleted file mode 100644 index 7f168d92..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl.H +++ /dev/null @@ -1,67 +0,0 @@ -#ifndef Fl_H -# define Fl_H - -#include "Enumerations.H" -#include <fltk/run.h> -#include <fltk/events.h> -#include <fltk/Color.h> -#include <fltk/Font.h> -#include <fltk/Box.h> -#include <fltk/error.h> -#include <fltk/visual.h> -#include <fltk/Monitor.h> -#include <fltk/Widget.h> - -namespace Fl = fltk; - -typedef fltk::TimeoutHandler Fl_Timeout_Handler; - -namespace fltk { - - class Widget; - - // fltk2 does not keep track of selection owner: - inline fltk::Widget* selection_owner() {return 0;} - inline void selection_owner(fltk::Widget*) {} - inline void selection(fltk::Widget &owner, const char* b, int len) {copy(b,len,false);} - - inline void visible_focus(int) {} // fltk2 always acts like this is off - - inline int x() {return Monitor::all().x();} - inline int y() {return Monitor::all().y();} - inline int w() {return Monitor::all().w();} - inline int h() {return Monitor::all().h();} - - inline void set_color(Color c, uchar r, uchar g, uchar b) { - set_color_index(c,color(r,g,b)); - } - inline void set_color(Color c, Color d) {set_color_index(c,d);} - inline Color get_color(Color c) {return get_color_index(c);} - inline void get_color(Color c, uchar&r, uchar&g, uchar&b) {split_color(c,r,g,b);} - //inline void free_color(Color, bool overlay=false); - - inline const char* get_font(Font* f) {return f->system_name();} - inline const char* get_font_name(Font* f, int* attributes = 0) { - if (attributes) return f->name(attributes); - else return f->name(); - } - inline int get_font_sizes(Font* f, int*& sizep) {return f->sizes(sizep);} - - inline int box_dx(const Box* b) {return b->dx();} - inline int box_dy(const Box* b) {return b->dy();} - inline int box_dw(const Box* b) {return b->dw();} - inline int box_dh(const Box* b) {return b->dh();} - - inline int event_key(int k) {return event_key_state(k);} - - inline void add_handler(int (*h)(int)) { - // rather unsafe typecast of function: - add_event_handler((int(*)(int,Window*))(h)); - } - - inline void delete_widget(Widget* w) {delete w;} - inline void do_widget_deletion() {} - -} - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Adjuster.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Adjuster.H deleted file mode 100644 index d9f04881..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Adjuster.H +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef Fl_Adjuster_H -#define Fl_Adjuster_H - -#include <fltk/Adjuster.h> -typedef fltk::Adjuster Fl_Adjuster; - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Box.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Box.H deleted file mode 100644 index 31c082d4..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Box.H +++ /dev/null @@ -1,17 +0,0 @@ -// -// "$Id: Fl_Box.H 4922 2006-04-10 09:30:57Z fabien $" -// -// Back-compatability widget. - -#ifndef Fl_Box_H -#define Fl_Box_H - -#include "Fl_Widget.H" -#include <fltk/InvisibleBox.h> -typedef fltk::InvisibleBox Fl_Box; - -#endif - -// -// End of "$Id: Fl_Box.H 4922 2006-04-10 09:30:57Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Browser.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Browser.H deleted file mode 100644 index b94f76b7..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Browser.H +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef Fl_Browser_H -#define Fl_Browser_H - -#include "Fl_Scrollbar.H" -#include "Fl_Menu_.H" -#include <fltk/Browser.h> -class Fl_Browser : public fltk::Browser { -public: - Fl_Browser(int x, int y, int w, int h, const char* l = 0) - :fltk::Browser(x,y,w,h,l) {} - - void make_visible(int n) {goto_index(n); make_item_visible();} - bool load(const char* fname) {/* NYI */ return true;} - void position(int y) {goto_position(y);} -}; - -enum { - FL_NORMAL_BROWSER = fltk::Browser::NORMAL, - FL_SELECT_BROWSER = fltk::Browser::NORMAL, - FL_HOLD_BROWSER = fltk::Browser::NORMAL, - FL_MULTI_BROWSER = fltk::Browser::MULTI -}; - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Button.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Button.H deleted file mode 100644 index a49c809c..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Button.H +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef Fl_Button_H -#define Fl_Button_H - -#include "Fl_Widget.H" -#include <fltk/Button.h> -typedef fltk::Button Fl_Button; - -enum { - FL_NORMAL_BUTTON = 0, - FL_TOGGLE_BUTTON = fltk::Button::TOGGLE, - FL_RADIO_BUTTON = fltk::Button::RADIO, - FL_HIDDEN_BUTTON = fltk::Button::HIDDEN // may not work in 2.0 -}; - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Chart.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Chart.H deleted file mode 100644 index eb66b4b8..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Chart.H +++ /dev/null @@ -1,83 +0,0 @@ -// -// "$Id: Fl_Chart.H 4886 2006-03-30 09:55:32Z fabien $" -// -// Forms chart header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef Fl_Chart_H -#define Fl_Chart_H - -#include <fltk/Widget.h> - -// values for type() -#define FL_BAR_CHART 0 -#define FL_HORBAR_CHART 1 -#define FL_LINE_CHART 2 -#define FL_FILL_CHART 3 -#define FL_SPIKE_CHART 4 -#define FL_PIE_CHART 5 -#define FL_SPECIALPIE_CHART 6 - -#define FL_FILLED_CHART FL_FILL_CHART // compatibility - -#define FL_CHART_MAX 128 -#define FL_CHART_LABEL_MAX 18 - -struct FL_FORMS_API FL_CHART_ENTRY { - float val; - uchar col; - char str[FL_CHART_LABEL_MAX+1]; -}; - -class FL_FORMS_API Fl_Chart : public fltk::Widget { -public: - Fl_Chart(int,int,int,int,const char * = 0); - ~Fl_Chart(); - void clear(); - void add(double, const char * =0, uchar=0); - void insert(int, double, const char * =0, uchar=0); - void replace(int, double, const char * =0, uchar=0); - void bounds(double *a,double *b) const {*a = min; *b = max;} - void bounds(double a,double b); - int size() const {return numb;} - int maxsize() const {return maxnumb;} - void maxsize(int); - uchar autosize() const {return autosize_;} - void autosize(uchar n) {autosize_ = n;} - -protected: - void draw(); - -private: - uchar autosize_; - int numb; - int maxnumb; - int sizenumb; - FL_CHART_ENTRY *entries; - double min,max; -}; - -#endif - -// -// End of "$Id: Fl_Chart.H 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Check_Button.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Check_Button.H deleted file mode 100644 index 7351aa02..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Check_Button.H +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef Fl_Check_Button_H -#define Fl_Check_Button_H - -#include <fltk/CheckButton.h> -typedef fltk::CheckButton Fl_Check_Button; - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Choice.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Choice.H deleted file mode 100644 index 39c26906..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Choice.H +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef Fl_Choice_H -#define Fl_Choice_H - -#include "Fl_Menu_.H" -#include <fltk/Choice.h> -typedef fltk::Choice Fl_Choice; - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Clock.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Clock.H deleted file mode 100644 index 8366d69c..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Clock.H +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef Fl_Clock_H -#define Fl_Clock_H - -#include "Fl_Widget.H" -#include <fltk/Clock.h> - -typedef fltk::ClockOutput Fl_Clock_Output; -typedef fltk::Clock Fl_Clock; - -enum { - FL_SQUARE_CLOCK = fltk::Clock::SQUARE, - FL_ROUND_CLOCK = fltk::Clock::ROUND, - FL_ANALOG_CLOCK = fltk::Clock::SQUARE, - FL_DIGITAL_CLOCK = fltk::Clock::DIGITAL // nyi -}; - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Color_Chooser.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Color_Chooser.H deleted file mode 100644 index 6cb6965f..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Color_Chooser.H +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef Fl_Color_Chooser_H -#define Fl_Color_Chooser_H - -#include <fltk/ColorChooser.h> -typedef fltk::ColorChooser Fl_Color_Chooser; -#define fl_color_chooser fltk::color_chooser - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Counter.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Counter.H deleted file mode 100644 index 935c3d5f..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Counter.H +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef Fl_Counter_H -#define Fl_Counter_H - -#include <fltk/ValueInput.h> -class Fl_Counter : public fltk::ValueInput { -public: - Fl_Counter(int x, int y, int w, int h, const char* l = 0) - : fltk::ValueInput(x,y,w,h,l) {align(fltk::ALIGN_BOTTOM);} -}; - -// these don't do anything: -#define FL_NORMAL_COUNTER 0 -#define FL_SIMPLE_COUNTER 1 - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Dial.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Dial.H deleted file mode 100644 index f947cf9a..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Dial.H +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef Fl_Dial_H -#define Fl_Dial_H - -#include "Fl_Widget.H" -#include <fltk/Dial.h> -typedef fltk::Dial Fl_Dial; - -enum { - FL_NORMAL_DIAL = fltk::Dial::NORMAL, - FL_LINE_DIAL = fltk::Dial::LINE, - FL_FILL_DIAL = fltk::Dial::FILL -}; - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Double_Window.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Double_Window.H deleted file mode 100644 index fec00af4..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Double_Window.H +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef Fl_Double_Window_H -#define Fl_Double_Window_H - -#include "Fl_Window.H" - -class Fl_Double_Window : public Fl_Window { - -public: - Fl_Double_Window(int x, int y, int w, int h, const char*l = 0) - : Fl_Window(x,y,w,h,l) {set_double_buffer();} - - Fl_Double_Window(int x, int y, const char*l = 0) - : Fl_Window(x,y,l) {set_double_buffer();} - -}; - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_File_Chooser.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_File_Chooser.H deleted file mode 100644 index 4f6a40d7..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_File_Chooser.H +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef Fl_File_Chooser_H -#define Fl_File_Chooser_H - -#include "Fl_Widget.H" - -#include <fltk/FileChooser.h> -typedef fltk::FileChooser Fl_File_Chooser; - -#include <fltk/file_chooser.h> - -//char *fl_dir_chooser(const char *message,const char *fname,int relative=0); -inline const char *fl_file_chooser(const char *message,const char *pat,const char *fname,int /*relative*/ = 0) { - return fltk::file_chooser(message, pat, fname); -} - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Gl_Window.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Gl_Window.H deleted file mode 100644 index 5b390cb5..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Gl_Window.H +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef Fl_Gl_Window_H -#define Fl_Gl_Window_H - -#include "Fl_Window.H" - -#include <fltk/GlWindow.h> -typedef fltk::GlWindow Fl_Gl_Window; - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Group.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Group.H deleted file mode 100644 index c11ac3f1..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Group.H +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef Fl_Group_H -#define Fl_Group_H - -#include "Fl_Widget.H" -#include <fltk/Group.h> - -class Fl_Group : public fltk::Group { - -public: - Fl_Group(int x, int y, int w, int h, const char*l = 0) - : fltk::Group(x,y,w,h,l) {begin();} - static Fl_Group* current() {return (Fl_Group*)(fltk::Group::current());} -}; - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Hold_Browser.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Hold_Browser.H deleted file mode 100644 index 773d6edd..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Hold_Browser.H +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef Fl_Hold_Browser_H -#define Fl_Hold_Browser_H - -#include "Fl_Browser.H" -typedef Fl_Browser Fl_Hold_Browser; - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Hor_Slider.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Hor_Slider.H deleted file mode 100644 index d542978d..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Hor_Slider.H +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef Fl_Hor_Slider_H -#define Fl_Hor_Slider_H - -#include "Fl_Slider.H" -typedef fltk::Slider Fl_Hor_Slider; - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Hor_Value_Slider.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Hor_Value_Slider.H deleted file mode 100644 index dbad5493..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Hor_Value_Slider.H +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef Fl_Hor_Value_Slider_H -#define Fl_Hor_Value_Slider_H - -#include "Fl_Value_Slider.H" -typedef fltk::ValueSlider Fl_Hor_Value_Slider; - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Input.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Input.H deleted file mode 100644 index 78480088..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Input.H +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef Fl_Input_H -#define Fl_Input_H - -#include "Fl_Widget.H" -#include <fltk/Input.h> -class Fl_Input : public fltk::Input { -public: - Fl_Input(int x, int y, int w, int h, const char* l=0) : fltk::Input(x,y,w,h,l) {} - int wrap() const { return type() == fltk::Input::WORDWRAP; } - void wrap(int b) { type(b ? fltk::Input::WORDWRAP : fltk::Input::MULTILINE);} -}; - -enum { - FL_NORMAL_INPUT = fltk::Input::NORMAL, - FL_FLOAT_INPUT = 1, // probably needs the IntInput subclass! - FL_INT_INPUT = 2, -//FL_HIDDEN_INPUT // not in fltk2.0 - FL_MULTILINE_INPUT = fltk::Input::MULTILINE, - FL_SECRET_INPUT = fltk::Input::SECRET, -//FL_INPUT_TYPE = 7, -//FL_INPUT_READONLY = 8, - FL_INPUT_WRAP = fltk::Input::WORDWRAP, - FL_MULTILINE_INPUT_WRAP = fltk::Input::WORDWRAP -}; - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Int_Input.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Int_Input.H deleted file mode 100644 index 469e9aa6..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Int_Input.H +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef Fl_Int_Input_H -#define Fl_Int_Input_H - -#include <fltk/IntInput.h> -typedef fltk::IntInput Fl_Int_Input; - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Light_Button.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Light_Button.H deleted file mode 100644 index ab0ac92a..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Light_Button.H +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef Fl_Light_Button_H -#define Fl_Light_Button_H - -#include "Fl_Button.H" -#include <fltk/LightButton.h> -typedef fltk::LightButton Fl_Light_Button; - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Menu_.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Menu_.H deleted file mode 100644 index 49a909ec..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Menu_.H +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef Fl_Menu__H -#define Fl_Menu__H - -#include "Fl_Menu_Item.H" -#include <fltk/Menu.h> -typedef fltk::Menu Fl_Menu_; - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Menu_Bar.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Menu_Bar.H deleted file mode 100644 index 465d58eb..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Menu_Bar.H +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef Fl_Menu_Bar_H -#define Fl_Menu_Bar_H - -#include "Fl_Menu_.H" -#include <fltk/MenuBar.h> -typedef fltk::MenuBar Fl_Menu_Bar; - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Menu_Button.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Menu_Button.H deleted file mode 100644 index 269e992d..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Menu_Button.H +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef Fl_Menu_Button_H -#define Fl_Menu_Button_H - -#include "Fl_Menu_.H" -#include <fltk/PopupMenu.h> -typedef fltk::PopupMenu Fl_Menu_Button; - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Menu_Item.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Menu_Item.H deleted file mode 100644 index 6b7a31a4..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Menu_Item.H +++ /dev/null @@ -1,163 +0,0 @@ -// -// "$Id: Fl_Menu_Item.H 4886 2006-03-30 09:55:32Z fabien $" -// -// Back-compatability menu items for FLTK. The new fltk::Menu class -// converts these tables into child fltk::Item and fltk::ItemGroup widgets. -// You should not use this for new programs. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef Fl_Menu_Item_h -#define Fl_Menu_Item_h - -#include <fltk/Widget.h> - -enum { // values for flags: - FL_MENU_INACTIVE = 1, - FL_MENU_TOGGLE= 2, - FL_MENU_VALUE = 4, - FL_MENU_RADIO = 8, - FL_MENU_INVISIBLE = 0x10, - FL_SUBMENU_POINTER = 0x20, - FL_SUBMENU = 0x40, - FL_MENU_DIVIDER = 0x80, - FL_MENU_HORIZONTAL = 0x100 // not used! -}; - -namespace fltk { - class FL_API Menu; -} - -struct FL_API Fl_Menu_Item { - const char *text; - int shortcut_; - fltk::Callback *callback_; - void *user_data_; - int flags; - fltk::LabelType* labeltype_; - fltk::Font* labelfont_; - unsigned labelsize_; - fltk::Color labelcolor_; - - // Used to add or set an fltk::Menu widget: - void add_to(fltk::Menu*, void* data = 0) const; - - // popup menus without using an fltk::Menu widget: - // Warning: this is now quite expensive, as it creates a temporary - // fltk::Menu and child widgets! These also do not match the fltk 1.0 - // calls, if there is any callback it is called directly (with the - // dummy fltk::Menu as an argument). - const Fl_Menu_Item* - pulldown(int X, int Y, int W, int H, - const Fl_Menu_Item* picked = 0, - const char* title = 0) const; - const Fl_Menu_Item* - popup(int X, int Y, const char* title=0, - const Fl_Menu_Item* picked = 0) const { - return pulldown(X, Y, 0, 0, picked, title);} - const Fl_Menu_Item* - test_shortcut() const; - - // return offset of terminating null item: - int size() const ; - - // advance a pointer by N items, skipping submenus: - const Fl_Menu_Item *next(int=1) const; - Fl_Menu_Item *next(int i=1) { - return (Fl_Menu_Item*)(((const Fl_Menu_Item*)this)->next(i));} - - const char* label() const {return text;} - fltk::LabelType* labeltype() const {return labeltype_;} - fltk::Color labelcolor() const {return labelcolor_;} - fltk::Font* labelfont() const {return labelfont_;} - unsigned labelsize() const {return labelsize_;} - fltk::Callback_p callback() const {return callback_;} - void* user_data() const {return user_data_;} - long argument() const {return (long)user_data_;} - int shortcut() const {return shortcut_;} - int submenu() const {return flags&(FL_SUBMENU|FL_SUBMENU_POINTER);} - int checkbox() const {return flags&FL_MENU_TOGGLE;} - int radio() const {return flags&FL_MENU_RADIO;} - int value() const {return flags&FL_MENU_VALUE;} - int visible() const {return !(flags&FL_MENU_INVISIBLE);} - int active() const {return !(flags&FL_MENU_INACTIVE);} - int activevisible() const {return !(flags&0x11);} - - void label(const char* a) {text=a;} - void label(fltk::LabelType* a,const char* b) {labeltype_ = a; text = b;} - void labeltype(fltk::LabelType* a) {labeltype_ = a;} - void labelcolor(uchar a) {labelcolor_ = a;} - void labelfont(fltk::Font* a) {labelfont_ = a;} - void labelsize(uchar a) {labelsize_ = a;} - void callback(fltk::Callback* c, void* p) {callback_=c; user_data_=p;} - void callback(fltk::Callback* c) {callback_=c;} - void callback(fltk::Callback0*c) {callback_=(fltk::Callback*)c;} - void callback(fltk::Callback1*c, long p=0) {callback_=(fltk::Callback*)c; user_data_=(void*)p;} - void user_data(void* v) {user_data_ = v;} - void argument(long v) {user_data_ = (void*)v;} - void shortcut(int s) {shortcut_ = s;} - void set() {flags |= FL_MENU_VALUE;} - void clear() {flags &= ~FL_MENU_VALUE;} - void setonly(); - void show() {flags &= ~FL_MENU_INVISIBLE;} - void hide() {flags |= FL_MENU_INVISIBLE;} - void activate() {flags &= ~FL_MENU_INACTIVE;} - void deactivate() {flags |= FL_MENU_INACTIVE;} - - const Fl_Menu_Item* find_shortcut(int *ip=0) const; - - void do_callback(fltk::Widget* o) const {callback_(o, user_data_);} - void do_callback(fltk::Widget* o,void* arg) const {callback_(o, arg);} - void do_callback(fltk::Widget* o,long arg) const {callback_(o, (void*)arg);} - - // back-compatability, do not use: - int checked() const {return flags&FL_MENU_VALUE;} - void check() {flags |= FL_MENU_VALUE;} - void uncheck() {flags &= ~FL_MENU_VALUE;} - -#if 0 - int add(const char*, int shortcut, fltk::Callback*, void* =0, int = 0); - int add(const char*a, const char* b, fltk::Callback* c, - void* d = 0, int e = 0) { - return add(a,fltk::old_shortcut(b),c,d,e);} -#endif -}; - -typedef Fl_Menu_Item Fl_Menu; // back compatability with fltk < 1.0 - -enum { // back-compatability enum: - FL_PUP_NONE = 0, - FL_PUP_GREY = FL_MENU_INACTIVE, - FL_PUP_GRAY = FL_MENU_INACTIVE, - FL_MENU_BOX = FL_MENU_TOGGLE, - FL_PUP_BOX = FL_MENU_TOGGLE, - FL_MENU_CHECK = FL_MENU_VALUE, - FL_PUP_CHECK = FL_MENU_VALUE, - FL_PUP_RADIO = FL_MENU_RADIO, - FL_PUP_INVISIBLE = FL_MENU_INVISIBLE, - FL_PUP_SUBMENU = FL_SUBMENU_POINTER -}; - -#endif - -// -// End of "$Id: Fl_Menu_Item.H 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Output.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Output.H deleted file mode 100644 index cd375ca7..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Output.H +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef Fl_Output_H -#define Fl_Output_H - -#include "Fl_Input.H" -#include <fltk/Output.h> -typedef fltk::Output Fl_Output; - -enum { - FL_NORMAL_OUTPUT = fltk::Input::NORMAL, - FL_MULTILINE_OUTPUT = fltk::Input::MULTILINE, - FL_MULTILINE_OUTPUT_WRAP = fltk::Input::WORDWRAP -}; - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Overlay_Window.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Overlay_Window.H deleted file mode 100644 index 3a6641f8..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Overlay_Window.H +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef Fl_Overlay_Window_H -#define Fl_Overlay_Window_H - -#include "Fl_Window.H" -typedef Fl_Window Fl_Overlay_Window; - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Pack.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Pack.H deleted file mode 100644 index ecd3846c..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Pack.H +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef Fl_Pack_H -#define Fl_Pack_H - -#include "Fl_Group.H" -#include <fltk/PackedGroup.h> - -class Fl_Pack : public fltk::PackedGroup { - -public: - Fl_Pack(int x, int y, int w, int h, const char*l = 0) - : fltk::PackedGroup(x,y,w,h,l) {begin();} - -}; // Fl_Pack class - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Pixmap.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Pixmap.H deleted file mode 100644 index 15b06382..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Pixmap.H +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef Fl_Pixmap_H -#define Fl_Pixmap_H - -#include "Fl_Widget.H" -#include "fltk/xpmImage.h" - -typedef fltk::xpmImage Fl_Pixmap; - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Return_Button.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Return_Button.H deleted file mode 100644 index 506a2977..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Return_Button.H +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef Fl_Return_Button_H -#define Fl_Return_Button_H - -#include <fltk/ReturnButton.h> -typedef fltk::ReturnButton Fl_Return_Button; - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Roller.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Roller.H deleted file mode 100644 index 6e966f1f..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Roller.H +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef Fl_Roller_H -#define Fl_Roller_H - -#include "Fl_Valuator.H" -#include <fltk/ThumbWheel.h> - -class Fl_Roller : public fltk::ThumbWheel { -public: - Fl_Roller(int x, int y, int w, int h, const char*l = 0) - : fltk::ThumbWheel(x,y,w,h,l) {set_vertical();} -}; - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Scroll.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Scroll.H deleted file mode 100644 index e677e312..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Scroll.H +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef Fl_Scroll_H -#define Fl_Scroll_H - -#include "Fl_Group.H" -#include <fltk/ScrollGroup.h> - -class Fl_Scroll : public fltk::ScrollGroup { - -public: - Fl_Scroll(int x, int y, int w, int h, const char*l = 0) - : fltk::ScrollGroup(x,y,w,h,l) {begin();} -}; - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Scrollbar.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Scrollbar.H deleted file mode 100644 index 922539a6..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Scrollbar.H +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef Fl_Scrollbar_H -#define Fl_Scrollbar_H - -#include "Fl_Slider.H" -#include <fltk/Scrollbar.h> - -class Fl_Scrollbar : public fltk::Scrollbar { -public: - Fl_Scrollbar(int x, int y, int w, int h, const char*l = 0) - : fltk::Scrollbar(x,y,w,h,l) {set_vertical();} -}; - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Select_Browser.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Select_Browser.H deleted file mode 100644 index ffebc0d1..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Select_Browser.H +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef Fl_Select_Browser_H -#define Fl_Select_Browser_H - -#include "Fl_Browser.H" -typedef Fl_Browser Fl_Select_Browser; - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Shared_Image.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Shared_Image.H deleted file mode 100644 index 70a4de32..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Shared_Image.H +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef Fl_Shared_Image_H -#define Fl_Shared_Image_H - -#include <fltk/SharedImage.h> -#define Fl_Shared_Image fltk::SharedImage -#define Fl_Image fltk::Image - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Single_Window.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Single_Window.H deleted file mode 100644 index 312e9b80..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Single_Window.H +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef Fl_Single_Window_H -#define Fl_Single_Window_H - -#include "Fl_Window.H" -typedef Fl_Window Fl_Single_Window; - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Slider.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Slider.H deleted file mode 100644 index 4a46afcc..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Slider.H +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef Fl_Slider_H -#define Fl_Slider_H - -#include "Fl_Widget.H" -#define FLTK_1_SLIDER 1 -#include <fltk/Slider.h> - -class Fl_Slider : public fltk::Slider { -public: - Fl_Slider(int x, int y, int w, int h, const char*l = 0) - : fltk::Slider(x,y,w,h,l) {set_vertical();} -}; - -enum { - FL_VERT_SLIDER = fltk::Slider::LINEAR, - FL_HOR_SLIDER = fltk::Slider::HORIZONTAL, - FL_VERT_FILL_SLIDER = fltk::Slider::FILL, - FL_HOR_FILL_SLIDER = fltk::Slider::HORIZONTAL+fltk::Slider::FILL, - FL_VERT_NICE_SLIDER = fltk::Slider::LINEAR, - FL_HOR_NICE_SLIDER = fltk::Slider::HORIZONTAL -}; - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Tabs.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Tabs.H deleted file mode 100644 index 202a7056..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Tabs.H +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef Fl_Tabs_H -#define Fl_Tabs_H - -#include "Fl_Group.H" -#include <fltk/TabGroup.h> - -class Fl_Tabs : public fltk::TabGroup { - -public: - Fl_Tabs(int x, int y, int w, int h, const char*l = 0) - : fltk::TabGroup(x,y,w,h,l) {begin();} -}; - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Text_Buffer.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Text_Buffer.H deleted file mode 100644 index 5886681b..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Text_Buffer.H +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef Fl_Text_Buffer_H -#define Fl_Text_Buffer_H - -#include "Fl_Widget.H" -#include <fltk/TextBuffer.h> -typedef fltk::TextBuffer Fl_Text_Buffer; - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Text_Editor.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Text_Editor.H deleted file mode 100644 index 789b9710..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Text_Editor.H +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef Fl_Text_Editor_H -#define Fl_Text_Editor_H - -#include "Fl_Text_Buffer.H" -#include <fltk/TextEditor.h> -typedef fltk::TextEditor Fl_Text_Editor; -#define Style_Table_Entry StyleTableEntry - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Tile.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Tile.H deleted file mode 100644 index 89799ee2..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Tile.H +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef Fl_Tile_H -#define Fl_Tile_H - -#include "Fl_Widget.H" -#include <fltk/TiledGroup.h> - -class Fl_Tile : public fltk::TiledGroup { - -public: - Fl_Tile(int x, int y, int w, int h, const char*l = 0) - : fltk::TiledGroup(x,y,w,h,l) {begin();} -}; - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Toggle_Button.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Toggle_Button.H deleted file mode 100644 index 6fc7bc60..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Toggle_Button.H +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef Fl_Toggle_Button_H -#define Fl_Toggle_Button_H - -#include "Fl_Button.H" - -class Fl_Toggle_Button : public Fl_Button { -public: - Fl_Toggle_Button(int X,int Y,int W,int H,const char *l=0) - : Fl_Button(X,Y,W,H,l) {type(FL_TOGGLE_BUTTON);} -}; - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Toggle_Light_Button.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Toggle_Light_Button.H deleted file mode 100644 index 8eae1a32..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Toggle_Light_Button.H +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef Fl_Toggle_Light_Button_H -#define Fl_Toggle_Light_Button_H - - -#include "Fl_Button.H" -#include <fltk/LightButton.h> -typedef fltk::LightButton Fl_Toggle_Light_Button; - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Valuator.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Valuator.H deleted file mode 100644 index be391c77..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Valuator.H +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef Fl_Valuator_H -#define Fl_Valuator_H - -#include <fltk/Valuator.h> -#define Fl_Valuator fltk::Valuator - -enum { - FL_VERTICAL = 0, - FL_HORIZONTAL = 1 -}; - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Value_Input.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Value_Input.H deleted file mode 100644 index 03d719f1..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Value_Input.H +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef Fl_Value_Input_H -#define Fl_Value_Input_H - -#include <fltk/ValueInput.h> -typedef fltk::ValueInput Fl_Value_Input; - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Value_Output.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Value_Output.H deleted file mode 100644 index ea4115e3..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Value_Output.H +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef Fl_Value_Output_H -#define Fl_Value_Output_H - -// The fltk1.1 allowed the user to change the value by dragging the mouse. -// The fltk2.0 version is strictly for displaying a numeric value. -// If you want the user to be able to change it, replace with a Value_Input. - -#include <fltk/ValueOutput.h> -typedef fltk::ValueOutput Fl_Value_Output; - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Value_Slider.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Value_Slider.H deleted file mode 100644 index 9afda08c..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Value_Slider.H +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef Fl_Value_Slider_H -#define Fl_Value_Slider_H - -#include "Fl_Slider.H" -#include <fltk/ValueSlider.h> - -class Fl_Value_Slider : public fltk::ValueSlider { -public: - Fl_Value_Slider(int x, int y, int w, int h, const char*l = 0) - : fltk::ValueSlider(x,y,w,h,l) {set_vertical();} -}; - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Widget.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Widget.H deleted file mode 100644 index 16b918af..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Widget.H +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef Fl_Widget_H -#define Fl_Widget_H - -#include "Enumerations.H" -#define FLTK_1_WIDGET 1 -#include <fltk/Widget.h> - -typedef fltk::Widget Fl_Widget; - -typedef fltk::Callback Fl_Callback; -typedef Fl_Callback* Fl_Callback_p; // needed for BORLAND -typedef fltk::Callback0 Fl_Callback0; -typedef fltk::Callback1 Fl_Callback1; - -enum { - FL_RESERVED_TYPE = fltk::Widget::RESERVED_TYPE -}; - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Window.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Window.H deleted file mode 100644 index fbb3b843..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/Fl_Window.H +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef Fl_Window_H -#define Fl_Window_H - -#include "Fl_Group.H" -#include <fltk/Window.h> - -class Fl_Window : public fltk::Window { - -public: - Fl_Window(int x, int y, int w, int h, const char*l = 0) - : fltk::Window(x,y,w,h,l) {begin();} - - Fl_Window(int x, int y, const char*l = 0) - : fltk::Window(x,y,l) {begin();} - - void border(bool v) { - if (!v) clear_border(); // set_border does not work - } -}; - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/filename.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/filename.H deleted file mode 100644 index 08dcd86b..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/filename.H +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef fl_filename_H -#define fl_filename_H - -#include <fltk/filename.h> -#include <string.h> - -#define fl_filename_name fltk::filename_name -#define fl_filename_ext fltk::filename_ext -#define fl_filename_match fltk::filename_match -#define fl_filename_isdir fltk::filename_isdir -#define fl_filename_list fltk::filename_list - -inline char *fl_filename_setext(char * name, const char *ext) { - strcpy(fltk::filename_ext(name), ext ? ext : ""); - return name; -} -#define FL_PATH_MAX PATH_MAX // all buffers are assummed to be at least this long -FL_API bool fl_filename_expand(char *, const char *from); -FL_API bool fl_filename_absolute(char *, const char *from, const char* pwd=0); - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/fl_ask.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/fl_ask.H deleted file mode 100644 index fdef11e2..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/fl_ask.H +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef fl_ask_H -#define fl_ask_H - -#include <fltk/ask.h> - -#define fl_message fltk::message -#define fl_alert fltk::alert -#define fl_ask fltk::ask -#define fl_choice fltk::choice -#define fl_input fltk::input -#define fl_password fltk::password - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/fl_draw.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/fl_draw.H deleted file mode 100644 index 12cd1bd4..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/fl_draw.H +++ /dev/null @@ -1,214 +0,0 @@ -#ifndef fl_draw_H -#define fl_draw_H - -#include "Enumerations.H" -#include <fltk/draw.h> -#include <fltk/Font.h> - -inline void fl_color(fltk::Color c) {fltk::setcolor(c);} -inline void fl_color(uchar r, uchar g, uchar b) {fltk::setcolor(fltk::color(r,g,b));} -inline fltk::Color fl_color() {return fltk::getcolor();} - -// clip: -inline void fl_push_clip(int x, int y, int w, int h) {fltk::push_clip(x,y,w,h);} -inline void fl_push_no_clip() {fltk::push_no_clip();} -#define fl_clip fl_push_clip -#define fl_pop_clip fltk::pop_clip -inline int fl_not_clipped(int x, int y, int w, int h) {return fltk::not_clipped(fltk::Rectangle(x,y,w,h));} -inline int fl_clip_box(int X, int Y, int W, int H, int& x, int& y, int& w, int& h) { - fltk::Rectangle r(X,Y,W,H); - int i = intersect_with_clip(r); - x = r.x(); y = r.y(); w = r.w(); h = r.h(); - return i; -} - -// points: -inline void fl_point(int x, int y) {fltk::drawpoint(x,y);} - -// line type: -#define fl_line_style fltk::line_style -enum { - FL_SOLID = fltk::SOLID, - FL_DASH = fltk::DASH, - FL_DOT = fltk::DOT, - FL_DASHDOT = fltk::DASHDOT, - FL_DASHDOTDOT = fltk::DASHDOTDOT, - FL_CAP_FLAT = fltk::CAP_FLAT, - FL_CAP_ROUND = fltk::CAP_ROUND, - FL_CAP_SQUARE = fltk::CAP_SQUARE, - FL_JOIN_MITER = fltk::JOIN_MITER, - FL_JOIN_ROUND = fltk::JOIN_ROUND, - FL_JOIN_BEVEL = fltk::JOIN_BEVEL -}; - -// rectangles tweaked to exactly fill the pixel rectangle: -inline void fl_rect(int x, int y, int w, int h) {fltk::strokerect(fltk::Rectangle(x,y,w,h));} -inline void fl_rect(int x, int y, int w, int h, fltk::Color c) {fltk::setcolor(c); fltk::strokerect(fltk::Rectangle(x,y,w,h));} -inline void fl_rectf(int x, int y, int w, int h) {fltk::fillrect(fltk::Rectangle(x,y,w,h));} -inline void fl_rectf(int x, int y, int w, int h, fltk::Color c) {fltk::setcolor(c); fltk::fillrect(fltk::Rectangle(x,y,w,h));} - -// line segments: -inline void fl_line(int x0,int y0, int x1,int y1) {fltk::drawline(x0,y0,x1,y1);} -inline void fl_line(int x0,int y0, int x1,int y1, int x2,int y2) { - fltk::addvertex(x0,y0); - fltk::addvertex(x1,y1); - fltk::addvertex(x2,y2); - fltk::strokepath(); -} - -// closed line segments: -inline void fl_loop(int x0,int y0, int x1,int y1, int x2,int y2) { - fltk::addvertex(x0,y0); - fltk::addvertex(x1,y1); - fltk::addvertex(x2,y2); - fltk::closepath(); - fltk::strokepath(); -} -inline void fl_loop(int x0,int y0, int x1,int y1, int x2,int y2, int x3,int y3) { - fltk::addvertex(x0,y0); - fltk::addvertex(x1,y1); - fltk::addvertex(x2,y2); - fltk::addvertex(x3,y3); - fltk::closepath(); - fltk::strokepath(); -} - -// filled polygons -inline void fl_polygon(int x0,int y0, int x1,int y1, int x2,int y2) { - fltk::addvertex(x0,y0); - fltk::addvertex(x1,y1); - fltk::addvertex(x2,y2); - fltk::closepath(); - fltk::fillpath(); -} -inline void fl_polygon(int x0,int y0, int x1,int y1, int x2,int y2, int x3,int y3) { - fltk::addvertex(x0,y0); - fltk::addvertex(x1,y1); - fltk::addvertex(x2,y2); - fltk::addvertex(x3,y3); - fltk::closepath(); - fltk::fillpath(); -} - -// draw rectilinear lines, horizontal segment first: -inline void fl_xyline(int x, int y, int x1) { - fltk::drawline(x,y,x1,y); -} -inline void fl_xyline(int x, int y, int x1, int y2) { - fltk::addvertex(x,y); - fltk::addvertex(x1,y); - fltk::addvertex(x1,y2); - fltk::strokepath(); -} -inline void fl_xyline(int x, int y, int x1, int y2, int x3) { - fltk::addvertex(x,y); - fltk::addvertex(x1,y); - fltk::addvertex(x1,y2); - fltk::addvertex(x3,y2); - fltk::strokepath(); -} - -// draw rectilinear lines, vertical segment first: -inline void fl_yxline(int x, int y, int y1) { - fltk::drawline(x,y,x,y1); -} -inline void fl_yxline(int x, int y, int y1, int x2) { - fltk::addvertex(x,y); - fltk::addvertex(x,y1); - fltk::addvertex(x2,y1); - fltk::strokepath(); -} -inline void fl_yxline(int x, int y, int y1, int x2, int y3) { - fltk::addvertex(x,y); - fltk::addvertex(x,y1); - fltk::addvertex(x2,y1); - fltk::addvertex(x2,y3); - fltk::strokepath(); -} - -inline void fl_arc(int x,int y,int w,int h,float a,float a2) {fltk::addchord(fltk::Rectangle(x,y,w,h),a,a2); fltk::strokepath();} -inline void fl_pie(int x,int y,int w,int h,float a,float a2) {fltk::addpie(fltk::Rectangle(x,y,w,h),a,a2); fltk::fillpath();} -inline void fl_chord(int x,int y,int w,int h,float a,float a2) {fltk::addchord(fltk::Rectangle(x,y,w,h),a,a2); fltk::fillpath();} - -// scalable drawing code (code in fl_vertex.C and fl_arc.C): -#define fl_push_matrix fltk::push_matrix -#define fl_pop_matrix fltk::pop_matrix -#define fl_scale fltk::scale -#define fl_translate fltk::translate -#define fl_rotate fltk::rotate -#define fl_mult_matrix fltk::concat -#define fl_begin_points fltk::newpath -#define fl_begin_line fltk::newpath -#define fl_begin_loop fltk::newpath -#define fl_begin_polygon fltk::newpath -#define fl_vertex fltk::addvertex -#define fl_curve fltk::addcurve -inline void fl_arc(float x,float y,float r, float a1, float a2) {fltk::addarc(x-r,y-r,2*r,2*r,a1,a2);} -#define fl_circle fltk::addcircle -#define fl_end_points fltk::drawpoints -#define fl_end_line fltk::strokepath -inline void fl_end_loop() {fltk::closepath();fltk::strokepath();} -#define fl_end_polygon fltk::fillpath -#define fl_begin_complex_polygon fltk::newpath -#define fl_gap fltk::closepath -#define fl_end_complex_polygon fltk::fillpath - -// current font: (size was an int in fltk1.1) -inline void fl_font(fltk::Font* f, float size) {fltk::setfont(f,size);} -inline void fl_font(int f, float size) {fltk::setfont(fltk::font(f),size);} -inline fltk::Font* fl_font() {return fltk::getfont();} -inline float fl_size() {return fltk::getsize();} - -// information you can get about the current font: -inline float fl_height() {return fltk::getascent()+fltk::getdescent();} -inline float fl_height(int, float size) {return size;} -inline float fl_descent() {return fltk::getdescent();} -inline float fl_width(const char* c) {return fltk::getwidth(c);} -inline float fl_width(const char* c, int n) {return fltk::getwidth(c,n);} -inline float fl_width(char c) {return fltk::getwidth(&c,1);} - -// draw using current font: -inline void fl_draw(const char* s, int x, int y) {fltk::drawtext(s,x,y);} -inline void fl_draw(const char* s, int n, int x, int y) {fltk::drawtext(s,n,x,y);} -inline void fl_measure(const char* s, int& x, int& y) {fltk::measure(s,x,y);} -inline void fl_draw(const char* s, int x,int y,int w,int h, fltk::Flags f) {fltk::drawtext(s,fltk::Rectangle(x,y,w,h),f);} - -// boxtypes: -//void fl_frame(const char* s, int x, int y, int w, int h); -//void fl_frame2(const char* s, int x, int y, int w, int h); -// This no longer works because boxes take a style, not a color: -// #include <fltk/Box.h> -// inline void fl_draw_box(fltk::Box* b, int x, int y, int w, int h, fltk::Color c) {b->draw(x,y,w,h,c);} - -// images: -static inline fltk::PixelType fromdelta(int d) {return d==1?fltk::MONO:d==3?fltk::RGB:fltk::RGBx;} -inline void fl_draw_image(const uchar* p, int x,int y,int w,int h, int delta, int ldelta) {fltk::drawimage(p,fromdelta(delta),fltk::Rectangle(x,y,w,h),ldelta);} -inline void fl_draw_image(const uchar* p, int x,int y,int w,int h, int delta) {fltk::drawimage(p,fromdelta(delta),fltk::Rectangle(x,y,w,h));} - -inline void fl_draw_image_mono(const uchar* p, int x,int y,int w,int h, int delta, int ldelta) {fltk::drawimage(p,fltk::MONO,fltk::Rectangle(x,y,w,h),ldelta);} -inline void fl_draw_image_mono(const uchar* p, int x,int y,int w,int h, int delta=1) {fltk::drawimage(p,fltk::MONO,fltk::Rectangle(x,y,w,h));} - -typedef fltk::DrawImageCallback Fl_Draw_Image_Cb; -inline void fl_draw_image(Fl_Draw_Image_Cb cb, void* p, int x,int y,int w,int h, int delta=3) {fltk::drawimage(cb,p,fromdelta(delta),fltk::Rectangle(x,y,w,h));} -inline void fl_draw_image_mono(Fl_Draw_Image_Cb cb, void* p, int x,int y,int w,int h, int delta=1) {fltk::drawimage(cb,p,fltk::MONO,fltk::Rectangle(x,y,w,h));} - -inline uchar *fl_read_image(uchar *p, int x,int y, int w, int h, int alpha=0) {return fltk::readimage(p, alpha?fltk::RGBA:fltk::RGB, fltk::Rectangle(x,y,w,h));} - -inline void fl_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b) {fltk::setcolor(fltk::color(r,g,b)); fltk::fillrect(fltk::Rectangle(x,y,w,h));} - -#define fl_draw_pixmap fltk::draw_xpm -#define fl_measure_pixmap fltk::measure_xpm -#define fl_scroll fltk::scrollrect -#define fl_shortcut_label fltk::key_name -#define fl_overlay_rect fltk::overlay_rect -#define fl_overlay_clear fltk::overlay_clear -#define fl_draw_symbol fltk::draw_symbol -#define fl_add_symbol fltk::add_symbol -#define fl_frame fltk::drawframe2 -#define fl_frame2 fltk::drawframe - -#endif - -// -// End of "$Id: fl_draw.H 5939 2007-08-02 14:19:28Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/fl_message.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/fl_message.H deleted file mode 100644 index 4f81d690..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/fl_message.H +++ /dev/null @@ -1 +0,0 @@ -#include "fl_ask.H" diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/forms.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/forms.H deleted file mode 100644 index ab96944a..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/forms.H +++ /dev/null @@ -1,857 +0,0 @@ -// -// "$Id: forms.H 4886 2006-03-30 09:55:32Z fabien $" -// -// Forms emulation header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef __FORMS_H__ -#define __FORMS_H__ - -#include <fltk/Window.h> -#include <fltk/run.h> -#include <fltk/draw.h> -#include <fltk/Color.h> -#include <fltk/Style.h> - -typedef fltk::Widget FL_OBJECT; -typedef fltk::Window FL_FORM; - -//////////////////////////////////////////////////////////////// -// Random constants & symbols defined by forms.h file: - -#ifndef NULL -#define NULL 0 -#endif -#ifndef FALSE -#define FALSE 0 -#define TRUE 1 -#endif - -#define FL_ON 1 -#define FL_OK 1 -#define FL_VALID 1 -#define FL_PREEMPT 1 -#define FL_AUTO 2 -#define FL_WHEN_NEEDED FL_AUTO -#define FL_OFF 0 -#define FL_NONE 0 -#define FL_CANCEL 0 -#define FL_INVALID 0 -#define FL_IGNORE -1 -#define FL_CLOSE -2 - -#define FL_LCOL fltk::BLACK -#define FL_COL1 fltk::GRAY75 -#define FL_MCOL fltk::GRAY85 -#define FL_LEFT_BCOL fltk::GRAY99 -#define FL_TOP_BCOL fltk::GRAY90 -#define FL_BOTTOM_BCOL fltk::GRAY35 -#define FL_RIGHT_BCOL fltk::GRAY20 -#define FL_INACTIVE fltk::GRAY66 -#define FL_INACTIVE_COL fltk::GRAY66 -#define FL_FREE_COL1 fltk::Color(16) -#define FL_FREE_COL2 fltk::Color(17) -#define FL_FREE_COL3 fltk::Color(18) -#define FL_FREE_COL4 fltk::Color(19) -#define FL_FREE_COL5 fltk::Color(20) -#define FL_FREE_COL6 fltk::Color(21) -#define FL_FREE_COL7 fltk::Color(22) -#define FL_FREE_COL8 fltk::Color(23) -#define FL_FREE_COL9 fltk::Color(24) -#define FL_FREE_COL10 fltk::Color(25) -#define FL_FREE_COL11 fltk::Color(26) -#define FL_FREE_COL12 fltk::Color(27) -#define FL_FREE_COL13 fltk::Color(28) -#define FL_FREE_COL14 fltk::Color(29) -#define FL_FREE_COL15 fltk::Color(30) -#define FL_FREE_COL16 fltk::Color(31) -#define FL_TOMATO fltk::Color(131) -#define FL_INDIANRED fltk::Color(164) -#define FL_SLATEBLUE fltk::Color(195) -#define FL_DARKGOLD fltk::Color(84) -#define FL_PALEGREEN fltk::Color(157) -#define FL_ORCHID fltk::Color(203) -#define FL_DARKCYAN fltk::Color(189) -#define FL_DARKTOMATO fltk::Color(113) -#define FL_WHEAT fltk::Color(174) - -#define FL_ALIGN_BESIDE fltk::ALIGN_INSIDE - -#define FL_PUP_TOGGLE 2 // FL_MENU_TOGGLE -#define FL_PUP_INACTIVE 1 // FL_MENU_INACTIVE -#define FL_NO_FRAME fltk::NO_BOX -#define FL_ROUNDED3D_UPBOX fltk::ROUND_UP_BOX -#define FL_ROUNDED3D_DOWNBOX fltk::ROUND_DOWN_BOX -#define FL_OVAL3D_UPBOX fltk::ROUND_UP_BOX -#define FL_OVAL3D_DOWNBOX fltk::ROUND_DOWN_BOX - -#define FL_MBUTTON1 1 -#define FL_LEFTMOUSE 1 -#define FL_MBUTTON2 2 -#define FL_MIDDLEMOUSE 2 -#define FL_MBUTTON3 3 -#define FL_RIGHTMOUSE 3 -#define FL_MBUTTON4 4 -#define FL_MBUTTON5 5 - -#define FL_INVALID_STYLE 255 -#define FL_NORMAL_STYLE 0 -#define FL_BOLD_STYLE 1 -#define FL_ITALIC_STYLE 2 -#define FL_BOLDITALIC_STYLE 3 -#define FL_FIXED_STYLE 4 -#define FL_FIXEDBOLD_STYLE 5 -#define FL_FIXEDITALIC_STYLE 6 -#define FL_FIXEDBOLDITALIC_STYLE 7 -#define FL_TIMES_STYLE 8 -#define FL_TIMESBOLD_STYLE 9 -#define FL_TIMESITALIC_STYLE 10 -#define FL_TIMESBOLDITALIC_STYLE 11 - -// hacks to change the labeltype() when passed to fl_set_object_lstyle(): -#define FL_SHADOW_STYLE 0x100 -#define FL_ENGRAVED_STYLE 0x200 -#define FL_EMBOSSED_STYLE 0x300 - -// size values are different from XForms, match older Forms: -#define FL_TINY_SIZE 8 -#define FL_SMALL_SIZE 11 // 10 -#undef FL_NORMAL_SIZE -#define FL_NORMAL_SIZE 14 // 12 -#define FL_MEDIUM_SIZE 18 // 14 -#define FL_LARGE_SIZE 24 // 18 -#define FL_HUGE_SIZE 32 // 24 -#define FL_DEFAULT_SIZE FL_SMALL_SIZE -#define FL_TINY_FONT FL_TINY_SIZE -#define FL_SMALL_FONT FL_SMALL_SIZE -#define FL_NORMAL_FONT FL_NORMAL_SIZE -#define FL_MEDIUM_FONT FL_MEDIUM_SIZE -#define FL_LARGE_FONT FL_LARGE_SIZE -#define FL_HUGE_FONT FL_HUGE_SIZE -#define FL_NORMAL_FONT1 FL_SMALL_FONT -#define FL_NORMAL_FONT2 FL_NORMAL_FONT -#define FL_DEFAULT_FONT FL_SMALL_FONT - -#define FL_RETURN_END_CHANGED FL_WHEN_RELEASE -#define FL_RETURN_CHANGED FL_WHEN_CHANGED -#define FL_RETURN_END FL_WHEN_RELEASE_ALWAYS -#define FL_RETURN_ALWAYS (FL_WHEN_CHANGED|FL_WHEN_NOT_CHANGED) - -#define FL_BOUND_WIDTH 3 - -typedef int FL_Coord; -typedef int FL_COLOR; - -//////////////////////////////////////////////////////////////// -// fltk interaction: - -#define FL_CMD_OPT void -extern FL_FORMS_API void fl_initialize(int*, char*[], const char*, FL_CMD_OPT*, int); -inline void fl_finish() {} - -typedef void (*FL_IO_CALLBACK) (int, void*); -inline void fl_add_io_callback(int fd, short w, FL_IO_CALLBACK cb, void* v) { - Fl::add_fd(fd,w,cb,v);} -inline void fl_remove_io_callback(int fd, short, FL_IO_CALLBACK) { - Fl::remove_fd(fd);} // removes all the callbacks! - -// type of callback is different and no "id" number is returned: -inline void fl_add_timeout(long msec, void (*cb)(void*), void* v) { - Fl::add_timeout(msec*.001, (Fl_Timeout_Handler)cb, v);} -inline void fl_remove_timeout(int) {} - -// type of callback is different! -inline void fl_set_idle_callback(void (*cb)()) {Fl::set_idle(cb);} - -FL_FORMS_API Fl_Widget* fl_do_forms(void); -FL_FORMS_API Fl_Widget* fl_check_forms(); -inline Fl_Widget* fl_do_only_forms(void) {return fl_do_forms();} -inline Fl_Widget* fl_check_only_forms(void) {return fl_check_forms();} - -// because of new redraw behavior, these are no-ops: -inline void fl_freeze_object(Fl_Widget*) {} -inline void fl_unfreeze_object(Fl_Widget*) {} -inline void fl_freeze_form(Fl_Window*) {} -inline void fl_unfreeze_form(Fl_Window*) {} -inline void fl_freeze_all_forms() {} -inline void fl_unfreeze_all_forms() {} - -inline void fl_set_focus_object(Fl_Window*, Fl_Widget* o) {Fl::focus(o);} -inline void fl_reset_focus_object(Fl_Widget* o) {Fl::focus(o);} -#define fl_set_object_focus fl_set_focus_object - -// void fl_set_form_atclose(Fl_Window*w,int (*cb)(Fl_Window*,void*),void* v) -// void fl_set_atclose(int (*cb)(Fl_Window*,void*),void*) -// fl_set_form_atactivate/atdeactivate not implemented! - -//////////////////////////////////////////////////////////////// -// Fl_Widget: - -inline void fl_set_object_boxtype(Fl_Widget* o, Fl_Boxtype a) {o->box(a);} -inline void fl_set_object_lsize(Fl_Widget* o,int s) {o->label_size(s);} -FL_FORMS_API void fl_set_object_lstyle(Fl_Widget* o,int a); -inline void fl_set_object_lcol(Fl_Widget* o, unsigned a) {o->label_color((Fl_Color)a);} -#define fl_set_object_lcolor fl_set_object_lcol -inline void fl_set_object_lalign(Fl_Widget* o, Fl_Align a) { o->clear_flag(FL_ALIGN_MASK); o->set_flag(a);} -#define fl_set_object_align fl_set_object_lalign -inline void fl_set_object_color(Fl_Widget* o,unsigned a,unsigned b) {o->color((Fl_Color)a); o->selection_color((Fl_Color)b);} -inline void fl_set_object_label(Fl_Widget* o, const char* a) {o->label(a); o->redraw();} -inline void fl_set_object_position(Fl_Widget*o,int x,int y) {o->position(x,y);} -inline void fl_set_object_size(Fl_Widget* o, int w, int h) {o->size(w,h);} -inline void fl_set_object_geometry(Fl_Widget* o,int x,int y,int w,int h) {o->resize(x,y,w,h);} - -inline void fl_get_object_geometry(Fl_Widget* o,int*x,int*y,int*w,int*h) { - *x = o->x(); *y = o->y(); *w = o->w(); *h = o->h();} -inline void fl_get_object_position(Fl_Widget* o,int*x,int*y) { - *x = o->x(); *y = o->y();} - -typedef void (*Forms_CB)(Fl_Widget*, long); -inline void fl_set_object_callback(Fl_Widget*o,Forms_CB c,long a) {o->callback(c,a);} -#define fl_set_call_back fl_set_object_callback -inline void fl_call_object_callback(Fl_Widget* o) {o->do_callback();} -inline void fl_trigger_object(Fl_Widget* o) {o->do_callback();} -inline void fl_set_object_return(Fl_Widget* o, int v) { - o->when(v|FL_WHEN_RELEASE);} - -inline void fl_redraw_object(Fl_Widget* o) {o->redraw();} -inline void fl_show_object(Fl_Widget* o) {o->show();} -inline void fl_hide_object(Fl_Widget* o) {o->hide();} -inline void fl_free_object(Fl_Widget* x) {delete x;} -inline void fl_delete_object(Fl_Widget* o) {((Fl_Group*)(o->parent()))->remove(*o);} -inline void fl_activate_object(Fl_Widget* o) {o->activate();} -inline void fl_deactivate_object(Fl_Widget* o) {o->deactivate();} - -inline void fl_add_object(Fl_Window* f, Fl_Widget* x) {f->add(x);} -inline void fl_insert_object(Fl_Widget* o, Fl_Widget* b) { - ((Fl_Group*)(b->parent()))->insert(*o,b);} - -inline Fl_Window* FL_ObjWin(Fl_Widget* o) {return o->window();} - -//////////////////////////////////////////////////////////////// -// things that appered in the demos a lot that I don't emulate, but -// I did not want to edit out of all the demos... - -inline int fl_get_border_width() {return 3;} -inline void fl_set_border_width(int) {} -inline void fl_set_object_dblbuffer(Fl_Widget*, int) {} -inline void fl_set_form_dblbuffer(Fl_Window*, int) {} - -//////////////////////////////////////////////////////////////// -// Fl_Window: - -inline void fl_free_form(Fl_Window* x) {delete x;} -inline void fl_redraw_form(Fl_Window* f) {f->redraw();} - -inline Fl_Window* fl_bgn_form(Fl_Boxtype b,int w,int h) { - Fl_Window* g = new Fl_Window(w,h,0); - g->box(b); - return g; -} -inline void fl_addto_form(Fl_Window* f) {f->begin();} -inline Fl_Group* fl_bgn_group() {return new Fl_Group(0,0,0,0,0);} -inline void fl_addto_group(Fl_Widget* o) {((Fl_Group* )o)->begin();} -FL_FORMS_API void fl_end_group(); -FL_FORMS_API void fl_end_form(); -#define resizebox _ddfdesign_kludge() - -inline void fl_scale_form(Fl_Window* f, double x, double y) { - f->resizable(f); f->size(int(f->w()*x),int(f->h()*y));} -inline void fl_set_form_position(Fl_Window* f,int x,int y) {f->position(x,y);} -inline void fl_set_form_size(Fl_Window* f, int w, int h) {f->size(w,h);} -inline void fl_set_form_geometry(Fl_Window* f,int x,int y,int w,int h) { - f->resize(x,y,w,h);} -#define fl_set_initial_placement fl_set_form_geometry -inline void fl_adjust_form_size(Fl_Window*) {} - -FL_FORMS_API void fl_show_form(Fl_Window* f,int p,int b,const char* n); -enum { // "p" argument values: - FL_PLACE_FREE = 0, // make resizable - FL_PLACE_MOUSE = 1, // mouse centered on form - FL_PLACE_CENTER = 2, // center of the screen - FL_PLACE_POSITION = 4,// fixed position, resizable - FL_PLACE_SIZE = 8, // fixed size, normal fltk behavior - FL_PLACE_GEOMETRY =16,// fixed size and position - FL_PLACE_ASPECT = 32, // keep aspect ratio (ignored) - FL_PLACE_FULLSCREEN=64,// fill screen - FL_PLACE_HOTSPOT = 128,// enables hotspot - FL_PLACE_ICONIC = 256,// iconic (ignored) - FL_FREE_SIZE=(1<<14), // force resizable - FL_FIX_SIZE =(1<<15) // force off resizable -}; -#define FL_PLACE_FREE_CENTER (FL_PLACE_CENTER|FL_FREE_SIZE) -#define FL_PLACE_CENTERFREE (FL_PLACE_CENTER|FL_FREE_SIZE) -enum { // "b" arguement values: - FL_NOBORDER = 0, - FL_FULLBORDER, - FL_TRANSIENT -//FL_MODAL = (1<<8) // not implemented yet in Forms -}; -inline void fl_set_form_hotspot(Fl_Window* w,int x,int y) {w->hotspot(x,y);} -inline void fl_set_form_hotobject(Fl_Window* w, Fl_Widget* o) {w->hotspot(o);} -extern FL_FORMS_API char fl_flip; // in forms.C -inline void fl_flip_yorigin() {fl_flip = 1;} - -#define fl_prepare_form_window fl_show_form -inline void fl_show_form_window(Fl_Window*) {} - -inline void fl_raise_form(Fl_Window* f) {f->show();} - -inline void fl_hide_form(Fl_Window* f) {f->hide();} -inline void fl_pop_form(Fl_Window* f) {f->show();} - -extern FL_FORMS_API char fl_modal_next; // in forms.C -inline void fl_activate_all_forms() {} -inline void fl_deactivate_all_forms() {fl_modal_next = 1;} -inline void fl_deactivate_form(Fl_Window*w) {w->deactivate();} -inline void fl_activate_form(Fl_Window*w) {w->activate();} - -inline void fl_set_form_title(Fl_Window* f, const char* s) {f->label(s);} -inline void fl_title_form(Fl_Window* f, const char* s) {f->label(s);} - -typedef void (*Forms_FormCB)(Fl_Widget*); -inline void fl_set_form_callback(Fl_Window* f,Forms_FormCB c) {f->callback(c);} -#define fl_set_form_call_back fl_set_form_callback - -inline void fl_init() {} -inline void fl_set_graphics_mode(int r, int /*d*/) { - Fl::visual(r ? FL_RGB : FL_INDEX); - // d should add FL_DOUBLE, but that always fails in fltk 2.0 -} - -inline int fl_form_is_visible(Fl_Window* f) {return f->visible();} - -inline int fl_mouse_button() {return Fl::event_button();} -#define fl_mousebutton fl_mouse_button - -#define fl_free free -#define fl_malloc malloc -#define fl_calloc calloc -#define fl_realloc realloc - -//////////////////////////////////////////////////////////////// -// Drawing functions. Only usable inside an Fl_Free object? - -#if 0 -inline void fl_drw_box(Fl_Boxtype b,int x,int y,int w,int h,Fl_Color bgc,int=3) { - b->draw(x,y,w,h,bgc);} -inline void fl_drw_frame(Fl_Boxtype b,int x,int y,int w,int h,Fl_Color bgc,int=3) { - b->draw(x,y,w,h,bgc,FL_FRAME_ONLY);} -#endif - -inline void fl_drw_text(Fl_Align align, int x, int y, int w, int h, - Fl_Color fgcolor, int size, Fl_Font style, - const char* s) { - fl_font(style,size); - fl_color(fgcolor); - fl_draw(s,x,y,w,h,align); -} - -// this does not work except for CENTER... -inline void fl_drw_text_beside(Fl_Align align, int x, int y, int w, int h, - Fl_Color fgcolor, int size, Fl_Font style, - const char* s) { - fl_font(style,size); - fl_color(fgcolor); - fl_draw(s,x,y,w,h,align); -} - -//inline void fl_set_font_name(Fl_Font n,const char* s) {fl_set_font(n,s);} - -inline void fl_mapcolor(Fl_Color c, uchar r, uchar g, uchar b) { - fl_set_color(c,fl_rgb(r,g,b));} -#define fl_set_clipping(x,y,w,h) fl_clip(x,y,w,h) -#define fl_unset_clipping() fl_pop_clip() - -//////////////////////////////////////////////////////////////// -// Forms classes: - -inline Fl_Widget* fl_add_new(Fl_Widget* p) {return p;} -inline Fl_Widget* fl_add_new(uchar t,Fl_Widget* p) {p->type(t); return p;} - -#define forms_constructor(type,name) \ -inline type* name(uchar t,int x,int y,int w,int h,const char* l) { \ - return (type*)(fl_add_new(t, new type(x,y,w,h,l)));} -#define forms_constructort(type,name) \ -inline type* name(uchar t,int x,int y,int w,int h,const char* l) { \ - return (type*)(fl_add_new(new type(t,x,y,w,h,l)));} -#define forms_constructorb(type,name) \ -inline type* name(Fl_Boxtype t,int x,int y,int w,int h,const char* l) { \ - return (type*)(fl_add_new(new type(t,x,y,w,h,l)));} - -#include "Fl_FormsBitmap.h" -#define FL_NORMAL_BITMAP FL_NO_BOX -forms_constructorb(Fl_FormsBitmap, fl_add_bitmap) -inline void fl_set_bitmap_data(Fl_Widget* o, int w, int h, const uchar* b) { - ((Fl_FormsBitmap*)o)->set(w,h,b); -} - -#include "Fl_FormsPixmap.h" -#define FL_NORMAL_PIXMAP FL_NO_BOX -forms_constructorb(Fl_FormsPixmap, fl_add_pixmap) -inline void fl_set_pixmap_data(Fl_Widget* o, char*const* b) { - ((Fl_FormsPixmap*)o)->set(b); -} -//inline void fl_set_pixmap_file(Fl_Widget*, const char*); -inline void fl_set_pixmap_align(Fl_Widget* o,Fl_Align a,int,int) { o->clear_flag(FL_ALIGN_MASK); o->set_flag(a);} -//inline void fl_set_pixmap_colorcloseness(int, int, int); - -#include <fltk/Fl_Box.h> -forms_constructorb(Fl_Box, fl_add_box) - -#include <fltk/Fl_Browser.h> -forms_constructor(Fl_Browser, fl_add_browser) - -inline void fl_clear_browser(Fl_Widget* o) { - ((Fl_Browser*)o)->clear();} -inline void fl_add_browser_line(Fl_Widget* o, const char* s) { - ((Fl_Browser*)o)->add(s);} -inline void fl_addto_browser(Fl_Widget* o, const char* s) { - ((Fl_Browser*)o)->add(s);} /* should also scroll to bottom */ -//inline void fl_addto_browser_chars(Fl_Widget*, const char*) -//#define fl_append_browser fl_addto_browser_chars -inline void fl_insert_browser_line(Fl_Widget* o, int n, const char* s) { - ((Fl_Browser*)o)->insert(n,s);} -inline void fl_delete_browser_line(Fl_Widget* o, int n) { - ((Fl_Browser*)o)->remove(n);} -inline void fl_replace_browser_line(Fl_Widget* o, int n, const char* s) { - ((Fl_Browser*)o)->replace(n,s);} -inline char* fl_get_browser_line(Fl_Widget* o, int n) { - return (char*)(((Fl_Browser*)o)->text(n));} -FL_FORMS_API int fl_load_browser(Fl_Widget* o, const char* f); -inline void fl_select_browser_line(Fl_Widget* o, int n) { - ((Fl_Browser*)o)->select(n,1);} -inline void fl_deselect_browser_line(Fl_Widget* o, int n) { - ((Fl_Browser*)o)->select(n,0);} -inline void fl_deselect_browser(Fl_Widget* o) { - ((Fl_Browser*)o)->deselect();} -inline int fl_isselected_browser_line(Fl_Widget* o, int n) { - return ((Fl_Browser*)o)->selected(n);} -inline int fl_get_browser_topline(Fl_Widget* o) { - return ((Fl_Browser*)o)->topline();} -inline int fl_get_browser(Fl_Widget* o) { - return ((Fl_Browser*)o)->value();} -inline int fl_get_browser_maxline(Fl_Widget* o) { - return ((Fl_Browser*)o)->size();} -//linline int fl_get_browser_screenlines(Fl_Widget*); -inline void fl_set_browser_topline(Fl_Widget* o, int n) { - ((Fl_Browser*)o)->topline(n);} -inline void fl_set_browser_fontsize(Fl_Widget* o, int s) { - ((Fl_Browser*)o)->text_size(s);} -inline void fl_set_browser_fontstyle(Fl_Widget* o, int s) { - ((Fl_Browser*)o)->text_font(fl_fonts+s);} -inline void fl_set_browser_specialkey(Fl_Widget* o, char c) { - ((Fl_Browser*)o)->format_char(c);} -//inline void fl_set_browser_vscrollbar(Fl_Widget*, int); -//inline void fl_set_browser_hscrollbar(Fl_Widget*, int); -//inline void fl_set_browser_leftslider(Fl_Widget*, int); -//#define fl_set_browser_leftscrollbar fl_set_browser_leftslider -//inline void fl_set_browser_line_selectable(Fl_Widget*, int, int); -//inline void fl_get_browser_dimension(Fl_Widget*,int*,int*,int*,int*); -//inline void fl_set_browser_dblclick_callback(Fl_Widget*,FL_CALLBACKPTR,long); -//inline void fl_set_browser_xoffset(Fl_Widget*, FL_Coord); -//inline void fl_set_browser_scrollbarsize(Fl_Widget*, int, int); -inline void fl_setdisplayed_browser_line(Fl_Widget* o, int n, int i) { - ((Fl_Browser*)o)->display(n,i);} -inline int fl_isdisplayed_browser_line(Fl_Widget* o, int n) { - return ((Fl_Browser*)o)->displayed(n);} - -#include <fltk/Fl_Button.h> - -#define FL_NORMAL_BUTTON 0 -//#define FL_HIDDEN_BUTTON -#define FL_TOUCH_BUTTON 4 -#define FL_INOUT_BUTTON 5 -#define FL_RETURN_BUTTON 6 -#define FL_HIDDEN_RET_BUTTON 7 -#define FL_PUSH_BUTTON FL_TOGGLE_BUTTON -#define FL_MENU_BUTTON 9 - -extern FL_FORMS_API int fl_old_shortcut(const char*); - -FL_FORMS_API Fl_Button* fl_add_button(uchar t,int x,int y,int w,int h,const char* l); -inline int fl_get_button(Fl_Widget* b) {return ((Fl_Button*)b)->value();} -inline void fl_set_button(Fl_Widget* b, int v) {((Fl_Button*)b)->value(v);} -inline int fl_get_button_numb(Fl_Widget*) {return Fl::event_button();} -inline void fl_set_object_shortcut(Fl_Widget* b, const char* s, int=0) { - b->shortcut(fl_old_shortcut(s));} -#define fl_set_button_shortcut fl_set_object_shortcut - -#include <fltk/Fl_Light_Button.h> -forms_constructor(Fl_Light_Button, fl_add_lightbutton) - -#include <fltk/Fl_Round_Button.h> -forms_constructor(Fl_Round_Button, fl_add_roundbutton) -forms_constructor(Fl_Round_Button, fl_add_round3dbutton) - -#include <fltk/Fl_Check_Button.h> -forms_constructor(Fl_Check_Button, fl_add_checkbutton) - -inline Fl_Widget* fl_add_bitmapbutton(int t,int x,int y,int w,int h,const char* l) {Fl_Widget* o = fl_add_button(t,x,y,w,h,l); return o;} -inline void fl_set_bitmapbutton_data(Fl_Widget* o,int a,int b,uchar* c) { - (new Fl_Bitmap(c,a,b))->label(o);} // does not delete old Fl_Bitmap! - -inline Fl_Widget* fl_add_pixmapbutton(int t,int x,int y,int w,int h,const char* l) {Fl_Widget* o = fl_add_button(t,x,y,w,h,l); return o;} -inline void fl_set_pixmapbutton_data(Fl_Widget* o, const char*const* c) { - (new Fl_Pixmap(c))->label(o);} // does not delete old Fl_Pixmap! - -// Fl_Canvas object not yet implemented! - -#include "Fl_Chart.h" - -forms_constructor(Fl_Chart, fl_add_chart) -inline void fl_clear_chart(Fl_Widget* o) { - ((Fl_Chart*)o)->clear();} -inline void fl_add_chart_value(Fl_Widget* o,double v,const char* s,uchar c){ - ((Fl_Chart*)o)->add(v,s,c);} -inline void fl_insert_chart_value(Fl_Widget* o, int i, double v, const char* s, uchar c) { - ((Fl_Chart*)o)->insert(i,v,s,c);} -inline void fl_replace_chart_value(Fl_Widget* o, int i, double v, const char* s, uchar c) { - ((Fl_Chart*)o)->replace(i,v,s,c);} -inline void fl_set_chart_bounds(Fl_Widget* o, double a, double b) { - ((Fl_Chart*)o)->bounds(a,b);} -inline void fl_set_chart_maxnumb(Fl_Widget* o, int v) { - ((Fl_Chart*)o)->maxsize(v);} -inline void fl_set_chart_autosize(Fl_Widget* o, int v) { - ((Fl_Chart*)o)->autosize(v);} -inline void fl_set_chart_lstyle(Fl_Widget* o, Fl_Font v) { - ((Fl_Chart*)o)->text_font(v);} -inline void fl_set_chart_lsize(Fl_Widget* o, int v) { - ((Fl_Chart*)o)->text_size(v);} -inline void fl_set_chart_lcolor(Fl_Widget* o, unsigned v) { - ((Fl_Chart*)o)->text_color((Fl_Color)v);} -#define fl_set_chart_lcol fl_set_chart_lcolor - -#include <fltk/Fl_Choice.h> - -#define FL_NORMAL_CHOICE 0 -#define FL_NORMAL_CHOICE2 0 -#define FL_DROPLIST_CHOICE 0 - -forms_constructor(Fl_Choice, fl_add_choice) -inline void fl_clear_choice(Fl_Widget* o) { - ((Fl_Choice*)o)->clear();} -inline void fl_addto_choice(Fl_Widget* o, const char* s) { - ((Fl_Choice*)o)->add(s);} -inline void fl_replace_choice(Fl_Widget* o, int i, const char* s) { - ((Fl_Choice*)o)->replace(i-1,s);} -inline void fl_delete_choice(Fl_Widget* o, int i) { - ((Fl_Choice*)o)->remove(i-1);} -inline void fl_set_choice(Fl_Widget* o, int i) { - ((Fl_Choice*)o)->value(i-1);} -// inline void fl_set_choice_text(Fl_Widget*, const char*); -inline int fl_get_choice(Fl_Widget* o) { - return ((Fl_Choice*)o)->value()+1;} -// inline const char* fl_get_choice_item_text(Fl_Widget*, int); -// inline int fl_get_choice_maxitems(Fl_Widget*); -inline const char* fl_get_choice_text(Fl_Widget* o) { - return ((Fl_Choice*)o)->text();} -inline void fl_set_choice_fontsize(Fl_Widget* o, int x) { - ((Fl_Choice*)o)->text_size(x);} -inline void fl_set_choice_fontstyle(Fl_Widget* o, Fl_Font x) { - ((Fl_Choice*)o)->text_font(x);} -// inline void fl_set_choice_item_mode(Fl_Widget*, int, unsigned); -// inline void fl_set_choice_item_shortcut(Fl_Widget*, int, const char*); - -#include <fltk/Fl_Clock.h> -forms_constructor(Fl_Clock, fl_add_clock) -inline void fl_get_clock(Fl_Widget* o, int* h, int* m, int* s) { - *h = ((Fl_Clock*)o)->hour(); - *m = ((Fl_Clock*)o)->minute(); - *s = ((Fl_Clock*)o)->second(); -} - -#include <fltk/Fl_Counter.h> -forms_constructor(Fl_Counter, fl_add_counter) -inline void fl_set_counter_value(Fl_Widget* o, double v) { - ((Fl_Counter*)o)->value(v);} -inline void fl_set_counter_bounds(Fl_Widget* o, double a, double b) { - ((Fl_Counter*)o)->range(a,b);} -inline void fl_set_counter_step(Fl_Widget* o, double a, double b) { - ((Fl_Counter*)o)->step(a / b);} -inline void fl_set_counter_precision(Fl_Widget* o, int v) { -// ((Fl_Counter*)o)->precision(v);} - ((Fl_Counter*)o)->step(1/(10^v));} -inline void fl_set_counter_return(Fl_Widget* o, int v) { - ((Fl_Counter*)o)->when(v|FL_WHEN_RELEASE);} -inline double fl_get_counter_value(Fl_Widget* o) { - return ((Fl_Counter*)o)->value();} -inline void fl_get_counter_bounds(Fl_Widget* o, float* a, float* b) { - *a = float(((Fl_Counter*)o)->minimum()); - *b = float(((Fl_Counter*)o)->maximum()); -} -//inline void fl_set_counter_filter(Fl_Widget*,const char* (*)(Fl_Widget*,double,int)); - -// Cursor stuff cannot be emulated because it uses X stuff -inline void fl_set_cursor(Fl_Window* w, Fl_Cursor c) {w->cursor(c);} -#define FL_INVISIBLE_CURSOR FL_CURSOR_NONE -#define FL_DEFAULT_CURSOR FL_CURSOR_DEFAULT - -#include <fltk/Fl_Dial.h> - -#define FL_DIAL_COL1 FL_GRAY -#define FL_DIAL_COL2 37 - -forms_constructor(Fl_Dial, fl_add_dial) -inline void fl_set_dial_value(Fl_Widget* o, double v) { - ((Fl_Dial*)o)->value(v);} -inline double fl_get_dial_value(Fl_Widget* o) { - return ((Fl_Dial*)o)->value();} -inline void fl_set_dial_bounds(Fl_Widget* o, double a, double b) { - ((Fl_Dial*)o)->range(a, b);} -inline void fl_get_dial_bounds(Fl_Widget* o, float* a, float* b) { - *a = float(((Fl_Dial*)o)->minimum()); - *b = float(((Fl_Dial*)o)->maximum()); -} -inline void fl_set_dial_return(Fl_Widget* o, int i) { - ((Fl_Dial*)o)->when(i|FL_WHEN_RELEASE);} -inline void fl_set_dial_angles(Fl_Widget* o, int a, int b) { - ((Fl_Dial*)o)->angles(a, b);} -//inline void fl_set_dial_cross(Fl_Widget* o, int); -// inline void fl_set_dial_direction(Fl_Widget* o, uchar d) { -// ((Fl_Dial*)o)->direction(d);} -inline void fl_set_dial_step(Fl_Widget* o, double v) { - ((Fl_Dial*)o)->step(v);} - -// Frames: - -inline Fl_Widget* fl_add_frame(Fl_Boxtype i,int x,int y,int w,int h,const char* l) { - return fl_add_box(i,x-3,y-3,w+6,h+6,l);} - -// labelframe nyi -inline Fl_Widget* fl_add_labelframe(Fl_Boxtype i,int x,int y,int w,int h,const char* l) { - Fl_Widget* o = fl_add_box(i,x-3,y-3,w+6,h+6,l); - o->clear_flag(FL_ALIGN_MASK); - o->set_flag(FL_ALIGN_TOP | FL_ALIGN_LEFT); - return o; -} - -#include "Fl_Free.h" -inline Fl_Free* -fl_add_free(int t,double x,double y,double w,double h,const char* l, - FL_HANDLEPTR hdl) { - return (Fl_Free*)(fl_add_new( - new Fl_Free(t,int(x),int(y),int(w),int(h),l,hdl))); -} - -#include <fltk/fl_ask.h> -#include <fltk/fl_show_colormap.h> - -inline int fl_show_question(const char* c, int = 0) {return fl_ask(c);} -FL_FORMS_API void fl_show_message(const char *,const char *,const char *); -FL_FORMS_API void fl_show_alert(const char *,const char *,const char *,int=0); -FL_FORMS_API int fl_show_question(const char *,const char *,const char *); -inline const char *fl_show_input(const char *l,const char*d=0) {return fl_input(l,d);} -/*const*/ char *fl_show_simple_input(const char *label, const char *deflt = 0); -int fl_show_choice( - const char *m1, - const char *m2, - const char *m3, - int numb, - const char *b0, - const char *b1, - const char *b2); - -inline void fl_set_goodies_font(int a, unsigned b) { - fl_message_style->label_font = fl_fonts+a; - fl_message_style->label_size = b; -} -#define fl_show_messages fl_message -inline int fl_show_choices(const char* c,int n,const char* b1,const char* b2, - const char* b3, int) { - return fl_show_choice(0,c,0,n,b1,b2,b3); -} - -#include <fltk/filename.h> -#include <fltk/fl_file_chooser.h> -inline int do_matching(char* a, const char* b) {return filename_match(a,b);} - -// Forms-compatable file chooser (implementation in fselect.C): -FL_FORMS_API char* fl_show_file_selector(const char* message,const char* dir, - const char* pat,const char* fname); -FL_FORMS_API char* fl_get_directory(); -FL_FORMS_API char* fl_get_pattern(); -FL_FORMS_API char* fl_get_filename(); - -#include <fltk/Fl_Input.h> -forms_constructor(Fl_Input, fl_add_input) -inline void fl_set_input(Fl_Widget* o, const char* v) { - ((Fl_Input*)o)->value(v);} -inline void fl_set_input_return(Fl_Widget* o, int x) { - ((Fl_Input*)o)->when(x | FL_WHEN_RELEASE);} -inline void fl_set_input_color(Fl_Widget* o, unsigned a, unsigned /*b*/) { - ((Fl_Input*)o)->text_color((Fl_Color)a); -// ((Fl_Input*)o)->cursor_color((Fl_Color)b); -} -// inline void fl_set_input_scroll(Fl_Widget*, int); -inline void fl_set_input_cursorpos(Fl_Widget* o, int x, int /*y*/) { - ((Fl_Input*)o)->position(x);} -// inline void fl_set_input_selected(Fl_Widget*, int); -// inline void fl_set_input_selected_range(Fl_Widget*, int, int); -// inline void fl_set_input_maxchars(Fl_Widget*, int); -// inline void fl_set_input_format(Fl_Widget*, int, int); -// inline void fl_set_input_hscrollbar(Fl_Widget*, int); -// inline void fl_set_input_vscrollbar(Fl_Widget*, int); -// inline void fl_set_input_xoffset(Fl_Widget*, int); -// inline void fl_set_input_topline(Fl_Widget*, int); -// inline void fl_set_input_scrollbarsize(Fl_Widget*, int, int); -// inline int fl_get_input_topline(Fl_Widget*); -// inline int fl_get_input_screenlines(Fl_Widget*); -inline int fl_get_input_cursorpos(Fl_Widget* o, int*x, int*y) { - *x = ((Fl_Input*)o)->position(); *y = 0; return *x;} -// inline int fl_get_input_numberoflines(Fl_Widget*); -// inline void fl_get_input_format(Fl_Widget*, int*, int*); -inline const char* fl_get_input(Fl_Widget* o) {return ((Fl_Input*)o)->value();} - -#include <fltk/Fl_Menu_Button.h> - -// types are not implemented, they all act like FL_PUSH_MENU: -#define FL_TOUCH_MENU 0 -#define FL_PUSH_MENU 1 -#define FL_PULLDOWN_MENU 2 -forms_constructor(Fl_Menu_Button, fl_add_menu) - -inline void fl_clear_menu(Fl_Widget* o) { - ((Fl_Menu_Button*)o)->clear();} -inline void fl_set_menu(Fl_Widget* o, const char* s) { - ((Fl_Menu_Button*)o)->clear(); ((Fl_Menu_Button*)o)->add(s);} -inline void fl_addto_menu(Fl_Widget* o, const char* s) { - ((Fl_Menu_Button*)o)->add(s);} -inline void fl_replace_menu_item(Fl_Widget* o, int i, const char* s) { - ((Fl_Menu_Button*)o)->replace(i-1,s);} -inline void fl_delete_menu_item(Fl_Widget* o, int i) { - ((Fl_Menu_Button*)o)->remove(i-1);} -inline void fl_set_menu_item_shortcut(Fl_Widget* o, int i, const char* s) { - ((Fl_Menu_Button*)o)->shortcut(i-1,fl_old_shortcut(s));} -// inline void fl_set_menu_item_mode(Fl_Widget* o, int i, long x) { -// ((Fl_Menu_Button*)o)->mode(i-1,x);} -inline void fl_show_menu_symbol(Fl_Widget*, int ) { -/* ((Fl_Menu_Button*)o)->show_menu_symbol(i); */} -// inline void fl_set_menu_popup(Fl_Widget*, int); -inline int fl_get_menu(Fl_Widget* o) { - return ((Fl_Menu_Button*)o)->value()+1;} -inline const char* fl_get_menu_item_text(Fl_Widget* o, int i) { - return ((Fl_Menu_Button*)o)->text(i);} -inline int fl_get_menu_maxitems(Fl_Widget* o) { - return ((Fl_Menu_Button*)o)->size();} -inline int fl_get_menu_item_mode(Fl_Widget* o, int i) { - return ((Fl_Menu_Button*)o)->mode(i);} -inline const char* fl_get_menu_text(Fl_Widget* o) { - return ((Fl_Menu_Button*)o)->text();} - -#include "Fl_Positioner.h" -#define FL_NORMAL_POSITIONER 0 -forms_constructor(Fl_Positioner, fl_add_positioner) -inline void fl_set_positioner_xvalue(Fl_Widget* o, double v) { - ((Fl_Positioner*)o)->xvalue(v);} -inline double fl_get_positioner_xvalue(Fl_Widget* o) { - return ((Fl_Positioner*)o)->xvalue();} -inline void fl_set_positioner_xbounds(Fl_Widget* o, double a, double b) { - ((Fl_Positioner*)o)->xbounds(a,b);} -inline void fl_get_positioner_xbounds(Fl_Widget* o, float* a, float* b) { - *a = float(((Fl_Positioner*)o)->xminimum()); - *b = float(((Fl_Positioner*)o)->xmaximum()); -} -inline void fl_set_positioner_yvalue(Fl_Widget* o, double v) { - ((Fl_Positioner*)o)->yvalue(v);} -inline double fl_get_positioner_yvalue(Fl_Widget* o) { - return ((Fl_Positioner*)o)->yvalue();} -inline void fl_set_positioner_ybounds(Fl_Widget* o, double a, double b) { - ((Fl_Positioner*)o)->ybounds(a,b);} -inline void fl_get_positioner_ybounds(Fl_Widget* o, float* a, float* b) { - *a = float(((Fl_Positioner*)o)->yminimum()); - *b = float(((Fl_Positioner*)o)->ymaximum()); -} -inline void fl_set_positioner_xstep(Fl_Widget* o, double v) { - ((Fl_Positioner*)o)->xstep(v);} -inline void fl_set_positioner_ystep(Fl_Widget* o, double v) { - ((Fl_Positioner*)o)->ystep(v);} -inline void fl_set_positioner_return(Fl_Widget* o, int v) { - ((Fl_Positioner*)o)->when(v|FL_WHEN_RELEASE);} - -#include <fltk/Fl_Slider.h> - -#define FL_HOR_BROWSER_SLIDER FL_HOR_SLIDER -#define FL_VERT_BROWSER_SLIDER FL_VERT_SLIDER - -forms_constructor(Fl_Slider, fl_add_slider) -#define FL_SLIDER_COL1 FL_GRAY -inline void fl_set_slider_value(Fl_Widget* o, double v) { - ((Fl_Slider*)o)->value(v);} -inline double fl_get_slider_value(Fl_Widget* o) { - return ((Fl_Slider*)o)->value();} -inline void fl_set_slider_bounds(Fl_Widget* o, double a, double b) { - ((Fl_Slider*)o)->range(a, b);} -inline void fl_get_slider_bounds(Fl_Widget* o, float* a, float* b) { - *a = float(((Fl_Slider*)o)->minimum()); - *b = float(((Fl_Slider*)o)->maximum()); -} -inline void fl_set_slider_return(Fl_Widget* o, int i) { - ((Fl_Slider*)o)->when(i|FL_WHEN_RELEASE);} -inline void fl_set_slider_step(Fl_Widget* o, double v) { - ((Fl_Slider*)o)->step(v);} -// inline void fl_set_slider_increment(Fl_Widget* o, double v, double); -inline void fl_set_slider_size(Fl_Widget* o, double v) { - ((Fl_Slider*)o)->slider_size(v);} - -#include <fltk/Fl_Value_Slider.h> -forms_constructor(Fl_Value_Slider, fl_add_valslider) - -inline void fl_set_slider_precision(Fl_Widget* o, int i) { - double v = 1.0; - while (i--) v /= 10.0; - ((Fl_Value_Slider*)o)->step(v); -} - -// The forms text object was the same as an Fl_Box except it inverted the -// meaning of FL_ALIGN_INSIDE. Implementation in forms.C -class FL_FORMS_API Fl_FormsText : public Fl_Widget { -protected: - void draw(); -public: - Fl_FormsText(Fl_Boxtype b, int x, int y, int w, int h, const char* l=0) - : Fl_Widget(x,y,w,h,l) {box(b); clear_flag(FL_ALIGN_MASK); set_flag(FL_ALIGN_LEFT);} -}; -#define FL_NORMAL_TEXT FL_NO_BOX -forms_constructorb(Fl_FormsText, fl_add_text) - -#include "Fl_Timer.h" -forms_constructort(Fl_Timer, fl_add_timer) -inline void fl_set_timer(Fl_Widget* o, double v) {((Fl_Timer*)o)->value(v);} -inline double fl_get_timer(Fl_Widget* o) {return ((Fl_Timer*)o)->value();} -inline void fl_suspend_timer(Fl_Widget* o) {((Fl_Timer*)o)->suspended(1);} -inline void fl_resume_timer(Fl_Widget* o) {((Fl_Timer*)o)->suspended(0);} -inline void fl_set_timer_countup(Fl_Widget* o,char d) {((Fl_Timer*)o)->direction(d);} -FL_FORMS_API void fl_gettime(long* sec, long* usec); - -// Fl_XYPlot nyi - - -// stuff from DDForms: - -inline int fl_double_click() {return Fl::event_clicks();} -inline void fl_draw() {Fl::flush();} - -#endif /* define __FORMS_H__ */ - -// -// End of "$Id: forms.H 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/gl.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/gl.h deleted file mode 100644 index b6cba63d..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/gl.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef FL_gl_H -#define FL_gl_H - -#include <fltk/gl.h> - -#define gl_start fltk::glstart -#define gl_finish fltk::glfinish -#define gl_color fltk::glsetcolor -#define gl_rect fltk::glstrokerect -#define gl_rectf fltk::glfillrect -#define gl_font fltk::glsetfont -inline float gl_height() {return fltk::glgetascent()+fltk::glgetdescent();} -#define gl_descent fltk::glgetdescent -#define gl_width fltk::glgetwidth -#define gl_draw fltk::gldrawtext -//void gl_measure(const char*, int& x, int& y); -#define gl_draw_image fltk::gldrawimage - -#endif // !FL_gl_H diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/glut.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/glut.H deleted file mode 100644 index 9545e9a9..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/glut.H +++ /dev/null @@ -1,2 +0,0 @@ -#include "Fl_Widget.H" -#include <fltk/glut.h> diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/math.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/math.h deleted file mode 100644 index 5353cc0d..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/math.h +++ /dev/null @@ -1 +0,0 @@ -#include <fltk/math.h> diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/menubar.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/menubar.h deleted file mode 100644 index 83b3af80..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/menubar.h +++ /dev/null @@ -1,65 +0,0 @@ -// This is an additional header file for "DDForms", which was our internal -// enhancement of Forms. This defines the precursor of the Fl_Menu class. -// -// Unfortunately it defined the callbacks as taking a long rather -// than a void* argument, requiring some dubious casts to emulate it: - -#include "Fl_Menu_Bar.h" - -struct FL_API MenuEntry { - const char *text; /*initial character indicates "type", 0 = end of menu*/ - ulong bind; /* key binding in forms format (#x, etc) */ - void (*cb)(Fl_Widget *,long); /* callback */ - long data; /* value for callback */ - int flags; /* see below for flags */ - uchar labeltype; - uchar labelfont; - uchar labelsize; - uchar labelcolor; -}; - -#define CHECKED FL_MENU_CHECK -#define UNCHECKED FL_MENU_BOX -#define DISABLED FL_MENU_INACTIVE - -/* Turn a box into a menu bar: */ -inline void MenuBar(Fl_Widget *o,MenuEntry *m) { - Fl_Menu_Bar *mb = new Fl_Menu_Bar(o->x(),o->y(),o->w(),o->h()); - mb->menu((Fl_Menu_Item*)m); - mb->box(0); - Fl_Group *g = (Fl_Group *)(o->parent()); - int i = g->find(*o); - g->insert(*mb, i<g->children()-1 ? g->child(i+1) : 0); -} - -/* advance to the Nth item in menu, skipping submenus: */ -inline MenuEntry *MenuGetEntry(MenuEntry *m,int i) { - return (MenuEntry*)(((Fl_Menu_Item*)m)->next(i)); -} - -/* Init the shortcuts for a widget with a popup menu: */ -inline void MenuSetShortcuts(Fl_Widget *, MenuEntry *) {} - -inline void MenuAdd( - MenuEntry m[], - int, /* number of entries in menutable, ignored here */ - const char *text, - const char *bind, - void (*cb)(Fl_Widget *,long), - long data, - int flags) { - ((Fl_Menu_Item*)m)->add(text,bind,(Fl_Callback*)cb,(void *)data,flags); -} - -inline MenuEntry *MenuPopup(Fl_Widget *o,const char *title,MenuEntry *m, - int x, int y) { - const Fl_Menu_Item* v = ((Fl_Menu_Item*)m)->popup(x,y,title); - if (v && v->callback_) v->do_callback(o); - return (MenuEntry *)v; -} - -inline MenuEntry *MenuHandleShortcut(Fl_Widget *o,MenuEntry *m,char) { - const Fl_Menu_Item* v = ((Fl_Menu_Item*)m)->test_shortcut(); - if (v && v->callback_) v->do_callback(o); - return (MenuEntry *)v; -} diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/x.H b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/x.H deleted file mode 100644 index 3278a21e..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/compat/FL/x.H +++ /dev/null @@ -1,24 +0,0 @@ -// This emulation header was designed to get flwm to compile. It -// probably does not work for any other x fltk program. - -#ifndef Fl_X_H -#define Fl_X_H - -#include "Enumerations.H" -#include <fltk/x.h> - -#define Fl_X fltk::CreatedWindow -#define fl_display fltk::xdisplay -#define fl_screen fltk::xscreen -#define fl_xevent (&fltk::xevent) -#define fl_colormap fltk::xcolormap -#define fl_open_display fltk::open_display -#define fl_visual fltk::xvisual -#define fl_xid(w) fltk::xid(w) -#define fl_event_time fltk::event_time -#define fl_xpixel(x) fltk::xpixel(x) -#define fl_window fltk::xwindow -#define fl_gc fltk::gc -#define fl_xfont fltk::xfont() - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/damage.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/damage.h deleted file mode 100644 index 43865bdd..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/damage.h +++ /dev/null @@ -1,54 +0,0 @@ -/*! \file - Values of the bits stored in Widget::damage(). - - When redrawing your widgets you should look at the damage bits to - see what parts of your widget need redrawing. The Widget::handle() - method can then set individual damage bits to limit the amount of - drawing that needs to be done, and the Widget::draw() method can - test these bits to decide what to draw: - -\code -MyClass::handle(int event) { - ... - if (change_to_part1) damage(1); - if (change_to_part2) damage(2); - if (change_to_part3) damage(4); -} - -MyClass::draw() { - if (damage() & fltk::DAMAGE_ALL) { - ... draw frame/box and other static stuff ... - } - if (damage() & (fltk::DAMAGE_ALL | 1)) draw_part1(); - if (damage() & (fltk::DAMAGE_ALL | 2)) draw_part2(); - if (damage() & (fltk::DAMAGE_ALL | 4)) draw_part3(); -} -\endcode - - Except for DAMAGE_ALL, each widget is allowed to assign any meaning - to any of the bits it wants. The enumerations are just to provide - suggested meanings. - -*/ - -#ifndef fltk_damage_h -#define fltk_damage_h - -namespace fltk { - -enum { - DAMAGE_VALUE = 0x01, - DAMAGE_PUSHED = 0x02, - DAMAGE_SCROLL = 0x04, - DAMAGE_OVERLAY = 0x04, // reused value - DAMAGE_HIGHLIGHT = 0x08, - DAMAGE_CHILD = 0x10, - DAMAGE_CHILD_LABEL = 0x20, - DAMAGE_EXPOSE = 0x40, - DAMAGE_CONTENTS = 0x40, // reused value - DAMAGE_ALL = 0x80 -}; - -} - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/dirent.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/dirent.h deleted file mode 100644 index 3e03e610..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/dirent.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// "$Id: dirent.h 4886 2006-03-30 09:55:32Z fabien $" -// -// Directory header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -/* this file is for back-compatability only */ -#include "filename.h" - -// -// End of "$Id: dirent.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/draw.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/draw.h deleted file mode 100644 index 5eadfcd2..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/draw.h +++ /dev/null @@ -1,232 +0,0 @@ -// "$Id: draw.h 5939 2007-08-02 14:19:28Z spitzak $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -/*! \file - - The FLTK drawing library, used by all widgets to draw themselves. - - These functions can only be called when FLTK is setup to draw - things. This is only true: - - Inside the Widget::draw() virtual function. - - Inside the Symbol::draw() virtual function. - - After calling Widget::make_current(), before calling wait() or flush(). - Calling the drawing functions at other times produces undefined results, - including crashing. - -*/ - -#ifndef fltk_draw_h -#define fltk_draw_h - -#include "Flags.h" // for alignment values -#include "Color.h" -#include "Rectangle.h" -#include "PixelType.h" - -namespace fltk { - -struct Font; -class Style; - -class FL_API GSave { - void* data[4]; // hopefully big enough for everybody... - public: - GSave(); - ~GSave(); -}; - -/// \name Transformation -//@{ -FL_API void push_matrix(); -FL_API void pop_matrix(); -FL_API void scale(float x, float y); -FL_API void scale(float x); -FL_API void translate(float x, float y); -FL_API void translate(int x, int y); -FL_API void rotate(float d); -FL_API void concat(float, float, float, float, float, float); -FL_API void load_identity(); - -// get and use transformed positions: -FL_API void transform(float& x, float& y); -FL_API void transform_distance(float& x, float& y); -FL_API void transform(int& x, int& y); -FL_API void transform(const Rectangle& from, Rectangle& to); -FL_API void transform(int& x, int& y, int& w, int& h); -//@} - -/// \name Clipping -//@{ -FL_API void push_clip(const Rectangle&); -//! Same as push_clip(Rectangle(x,y,w,h)) but faster: -FL_API void push_clip(int X,int Y, int W, int H); -FL_API void clipout(const Rectangle&); -FL_API void pop_clip(); -FL_API void push_no_clip(); -FL_API bool not_clipped(const Rectangle&); -FL_API int intersect_with_clip(Rectangle&); -//@} - -FL_API void setcolor(Color); -FL_API void setcolor_alpha(Color, float alpha); -extern FL_API Color current_color_; -inline Color getcolor() {return current_color_;} - -extern FL_API Color current_bgcolor_; -inline void setbgcolor(Color c) {current_bgcolor_ = c;} -inline Color getbgcolor() {return current_bgcolor_;} - -extern FL_API const Style* drawstyle_; -void FL_API drawstyle(const Style* s, Flags); -inline const Style* drawstyle() {return drawstyle_;} - -extern FL_API Flags drawflags_; -inline void setdrawflags(Flags f) {drawflags_ = f;} -inline Flags drawflags() {return drawflags_;} -inline Flags drawflags(Flags f) {return drawflags_ & f;} - -// line type: -FL_API void line_style(int, float width=0, const char* dashes=0); -enum { - SOLID = 0, - DASH = 1, - DOT = 2, - DASHDOT = 3, - DASHDOTDOT = 4, - - CAP_FLAT = 0x100, - CAP_ROUND = 0x200, - CAP_SQUARE = 0x300, - - JOIN_MITER = 0x1000, - JOIN_ROUND = 0x2000, - JOIN_BEVEL = 0x3000 -}; -extern FL_API int line_style_; -inline FL_API int line_style() {return line_style_;} -extern FL_API float line_width_; -inline FL_API float line_width() {return line_width_;} -extern FL_API const char* line_dashes_; -inline FL_API const char* line_dashes() {return line_dashes_;} - -/// \name Path construction -//@{ -FL_API void newpath(); -FL_API void addvertex(float x, float y); -FL_API void addvertex(int x, int y); -FL_API void addvertices(int n, const float v[][2]); -FL_API void addvertices(int n, const int v[][2]); -FL_API void addvertices_transformed(int n, const float v[][2]); -FL_API void addcurve(float,float, float,float, float,float, float,float); -FL_API void addarc(float x,float y,float w,float h, float a1, float a2); -FL_API void addpie(const Rectangle& r, float a, float a2); -FL_API void addchord(const Rectangle& r,float a,float a2); -FL_API void closepath(); -//@} - -/// \name Shapes and lines -//@{ -FL_API void strokepath(); -FL_API void fillpath(); -FL_API void fillstrokepath(Color); - -FL_API void fillrect(int, int, int, int); -inline void fillrect(const Rectangle& r) {fillrect(r.x(),r.y(),r.w(),r.h());} -FL_API void strokerect(int, int, int, int); -inline void strokerect(const Rectangle& r) {strokerect(r.x(),r.y(),r.w(),r.h());} -FL_API void drawline(int x0, int y0, int x1, int y1); -FL_API void drawline(float x0, float y0, float x1, float y1); -FL_API void drawpoint(int x, int y); -FL_API void drawpoint(float x, float y); -//@} - -/// \name Text -//@{ -FL_API void setfont(Font*, float size); -FL_API void setfont(const char*, float size); -FL_API void setfont(const char*, int attributes, float size); - -// change the encoding used to draw bytes (depreciated) -extern FL_API const char* encoding_; -inline const char* get_encoding() {return encoding_;} -FL_API void set_encoding(const char*); - -// information you can get about the current font+size+encoding: -extern FL_API Font* current_font_; -extern FL_API float current_size_; // should be 2x2 transformation matrix -inline Font* getfont() {return current_font_;} -inline float getsize() {return current_size_;} - -// measure things in the current font: -FL_API float getwidth(const char*); -FL_API float getwidth(const char*, int length); -FL_API float getascent(); -FL_API float getdescent(); - -// draw using current font: -FL_API void drawtext_transformed(const char*, int n, float x, float y); -FL_API void drawtext(const char*, float x, float y); -FL_API void drawtext(const char*, int length, float x, float y); - -// the label text formatter: -FL_API void measure(const char*, int& w, int& h, Flags = 0); -FL_API void measure(float (*getwidth)(const char*, int),const char*, float& w, float& h, Flags = 0); -FL_API void drawtext(const char*, const Rectangle&, Flags); -FL_API void drawtext(void (*textfunction)(const char*,int,float,float), - float (*getwidth)(const char*, int), - const char* str, const Rectangle& r, Flags flags); - -// set where \t characters go in label text formatter: -extern FL_API const int* column_widths_; -inline const int* column_widths() {return column_widths_;} -inline void column_widths(const int* i) {column_widths_ = i;} -// see also Symbol.h for @-sign commands -//@} - -/// \name Images -//@{ -FL_API void drawimage(const uchar*, PixelType, const Rectangle&); -FL_API void drawimage(const uchar*, PixelType, const Rectangle&, int linedelta); - -typedef const uchar* (*DrawImageCallback)(void* data, int x, int y, int w, uchar* buffer); -FL_API void drawimage(DrawImageCallback, void*, PixelType, const Rectangle&); - -FL_API uchar *readimage(uchar *p, PixelType, const Rectangle&); -FL_API uchar *readimage(uchar *p, PixelType, const Rectangle&, int linedelta); - -FL_API void scrollrect(const Rectangle&, int dx, int dy, - void (*draw_area)(void*, const Rectangle&), void*); -//@} - -#ifndef DOXYGEN /* depreciated: */ -FL_API void drawframe(const char* s, int x, int y, int w, int h); -FL_API void drawframe2(const char* s, int x, int y, int w, int h); -FL_API void overlay_rect(int,int,int,int); -FL_API void overlay_clear(); -#endif - -} - -#endif - -// -// End of "$Id: draw.h 5939 2007-08-02 14:19:28Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/error.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/error.h deleted file mode 100644 index f24246c8..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/error.h +++ /dev/null @@ -1,19 +0,0 @@ -/*! \file - Functions to report errors and possibly kill the program. - You can change these pointers from their default values so that - fltk calls your code instead. -*/ - -#ifndef fltk_error_h -#define fltk_error_h - -#include "FL_API.h" - -namespace fltk { - -extern FL_API void (*warning)(const char*, ...); -extern FL_API void (*error)(const char*, ...); -extern FL_API void (*fatal)(const char*, ...); - -} -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/events.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/events.h deleted file mode 100644 index e074bdfc..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/events.h +++ /dev/null @@ -1,324 +0,0 @@ -// -// "$Id: events.h 5931 2007-07-13 14:20:38Z spitzak $" -// -// Event types and data. A Widget::handle() method needs this. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -#ifndef fltk_events_h -#define fltk_events_h - -#include "FL_API.h" - -namespace fltk { - -/*! Numbers passed to Widget::handle() and returned by event(). */ -enum { - NO_EVENT = 0, - PUSH = 1, - RELEASE = 2, - ENTER = 3, - LEAVE = 4, - DRAG = 5, - FOCUS = 6, - UNFOCUS = 7, - KEY = 8, - KEYUP = 9, - FOCUS_CHANGE = 10, - MOVE = 11, - SHORTCUT = 12, - DEACTIVATE = 13, - ACTIVATE = 14, - HIDE = 15, - SHOW = 16, - PASTE = 17, - TIMEOUT = 18, - MOUSEWHEEL = 19, - DND_ENTER = 20, - DND_DRAG = 21, - DND_LEAVE = 22, - DND_RELEASE = 23, - TOOLTIP = 24 -}; - -/*! Values returned by event_key(), passed to event_key_state() and - get_key_state(), and used for the low 16 bits of add_shortcut(). - - The actual values returned are based on X11 keysym values, though - fltk always returns "unshifted" values much like Windows does. A - given key always returns the same value no matter what shift keys - are held down. Use event_text() to see the results of any shift - keys. - - The lowercase letters 'a' through 'z' and the ascii symbols - '`', '-', '=', '[', ']', '\\', ',', '.', '/', ';', '\'' and space - are used to identify the keys in the main keyboard. - - On X systems unrecognized keys are returned unchanged as their - X keysym value. If they have no keysym it uses the scan code - or'd with 0x8000, this is what all those blue buttons on a - Microsoft keyboard will do. I don't know how to get those - buttons on Windows. -*/ -enum { - LeftButton = 1, /*!< PUSH/RELEASE set event_key to this */ - MiddleButton = 2, /*!< PUSH/RELEASE set event_key to this */ - RightButton = 3, /*!< PUSH/RELEASE set event_key to this */ - SpaceKey = 32, /*!< Same as ' ' or 32 */ - // 'a'-'z', and all punctuation go here in numerical order - BackSpaceKey = 0xff08, /*!< Backspace */ - TabKey = 0xff09, /*!< Tab */ - ClearKey = 0xff0b, /*!< On some systems with NumLock off '5' produces this */ - ReturnKey = 0xff0d, /*!< Main Enter key, Windows and X documentation calls this "Return" */ - PauseKey = 0xff13, /*!< Pause + Break button */ - ScrollLockKey = 0xff14, /*!< Scroll Lock button */ - EscapeKey = 0xff1b, /*!< Esc */ - HomeKey = 0xff50, /*!< Home */ - LeftKey = 0xff51, /*!< Left */ - UpKey = 0xff52, /*!< Up arrow */ - RightKey = 0xff53, /*!< Right arrow */ - DownKey = 0xff54, /*!< Down arrow */ - PageUpKey = 0xff55, /*!< Page Up */ - PageDownKey = 0xff56, /*!< Page Down */ - EndKey = 0xff57, /*!< End */ - PrintKey = 0xff61, /*!< Print Scrn key + SysRq key */ - InsertKey = 0xff63, /*!< Insert */ - MenuKey = 0xff67, /*!< Key in lower-right with picture of popup menu */ - HelpKey = 0xff68, /*!< Help key on Macintosh keyboards */ - NumLockKey = 0xff7f, /*!< NumLock key */ - Keypad = 0xff80, /*!< Add ASCII to get keypad keys */ - KeypadEnter = Keypad+'\r', /*!< Keypad+'\\r' */ - MultiplyKey = Keypad+'*', /*!< Keypad+'*' */ - AddKey = Keypad+'+', /*!< Keypad+'+' */ - SubtractKey = Keypad+'-', /*!< Keypad+'-' */ - DecimalKey = Keypad+'.', /*!< Keypad+'.' */ - DivideKey = Keypad+'/', /*!< Keypad+'/' */ - Keypad0 = Keypad+'0', /*!< Keypad+'0' */ - Keypad1 = Keypad+'1', /*!< Keypad+'1' */ - Keypad2 = Keypad+'2', /*!< Keypad+'2' */ - Keypad3 = Keypad+'3', /*!< Keypad+'3' */ - Keypad4 = Keypad+'4', /*!< Keypad+'4' */ - Keypad5 = Keypad+'5', /*!< Keypad+'5' */ - Keypad6 = Keypad+'6', /*!< Keypad+'6' */ - Keypad7 = Keypad+'7', /*!< Keypad+'7' */ - Keypad8 = Keypad+'8', /*!< Keypad+'8' */ - Keypad9 = Keypad+'9', /*!< Keypad+'9' */ - KeypadLast = 0xffbd, /*!< Keypad+'=', largest legal keypad key */ - F0Key = 0xffbd, /*!< Add a number to get function key */ - F1Key = F0Key+1, /*!< F0Key+1 */ - F2Key = F0Key+2, /*!< F0Key+2 */ - F3Key = F0Key+3, /*!< F0Key+3 */ - F4Key = F0Key+4, /*!< F0Key+4 */ - F5Key = F0Key+5, /*!< F0Key+5 */ - F6Key = F0Key+6, /*!< F0Key+6 */ - F7Key = F0Key+7, /*!< F0Key+7 */ - F8Key = F0Key+8, /*!< F0Key+8 */ - F9Key = F0Key+9, /*!< F0Key+9 */ - F10Key = F0Key+10, /*!< F0Key+10 */ - F11Key = F0Key+11, /*!< F0Key+11 */ - F12Key = F0Key+12, /*!< F0Key+12 */ - // use F0Key+n to get function key n - LastFunctionKey = F0Key+35, /*!< F0Key+35, largest legal function key */ - LeftShiftKey = 0xffe1, /*!< Left-hand Shift */ - RightShiftKey = 0xffe2, /*!< Right-hand Shift */ - LeftCtrlKey = 0xffe3, /*!< Left-hand Ctrl */ - RightCtrlKey = 0xffe4, /*!< Right-hand Ctrl */ - CapsLockKey = 0xffe5, /*!< Caps Lock */ - LeftMetaKey = 0xffe7, /*!< The left "Windows" or "Apple" key */ - RightMetaKey = 0xffe8, /*!< The right "Windows" or "Apple" key */ - LeftAltKey = 0xffe9, /*!< Left-hand Alt (option on Mac) */ - RightAltKey = 0xffea, /*!< Right-hand Alt (option on Mac) */ - DeleteKey = 0xffff, /*!< Delete */ -#if defined(__APPLE__) - LeftAccKey = LeftCtrlKey, - RightAccKey = RightCtrlKey, - LeftCmdKey = LeftMetaKey, - RightCmdKey = RightMetaKey -#else - LeftAccKey = LeftAltKey, - RightAccKey = RightAltKey, - LeftCmdKey = LeftCtrlKey, - RightCmdKey = RightCtrlKey -#endif -}; - -/*! Flags returned by event_state(), and used as the high 16 bits - of Widget::add_shortcut() values (the low 16 bits are all zero, so these - may be or'd with key values). - - The inline function BUTTON(n) will turn n (1-8) into the flag for a - mouse button. -*/ -enum { - SHIFT = 0x00010000, /*!< Either shift key held down */ - CAPSLOCK = 0x00020000, /*!< Caps lock is toggled on */ - CTRL = 0x00040000, /*!< Either ctrl key held down */ - ALT = 0x00080000, /*!< Either alt key held down */ - NUMLOCK = 0x00100000, /*!< Num Lock turned on */ - META = 0x00400000, /*!< "Windows" or the "Apple" keys held down */ - SCROLLLOCK = 0x00800000, /*!< Scroll Lock turned on */ - BUTTON1 = 0x01000000, /*!< Left mouse button held down */ - BUTTON2 = 0x02000000, /*!< Middle mouse button held down */ - BUTTON3 = 0x04000000, /*!< Right mouse button held down */ - ANY_BUTTON = 0x7f000000, /*!< Any mouse button (up to 8) */ -#if defined(__APPLE__) - ACCELERATOR = CTRL, - OPTION = ALT, - COMMAND = META -#else - ACCELERATOR = ALT, //!< ALT on Windows/Linux, CTRL on OS/X, use for menu accelerators - COMMAND = CTRL, //!< CTRL on Windows/Linux, META on OS/X, use for menu shortcuts - OPTION = ALT|META //!< ALT|META on Windows/Linux, just ALT on OS/X, use as a drag modifier -#endif -}; - -inline unsigned BUTTON(int n) {return 0x00800000 << n;} - -/*! Device identifier returned by event_device(). This enumeration - is useful to get the device type that caused a PUSH, RELEASE, - DRAG or MOVE event -*/ -enum { - DEVICE_MOUSE = 0, /*!< Event triggered by the system mouse */ - DEVICE_STYLUS = 1, /*!< Event triggered by a pen on a tablet, givin pressure and tilt information */ - DEVICE_ERASER = 2, /*!< Event triggered by an eraser on a tablet, givin pressure and tilt information */ - DEVICE_CURSOR = 3, /*!< Event triggered by a puck style device on a tablet */ - DEVICE_AIRBRUSH = 4, /*!< Event triggered by an airbrush on a tablet, giving pressure and tilt information */ - DEVICE_TOUCH = 5 /*!< Event triggered by touch a touch screen device */ -}; - -class Rectangle; -class Widget; -class Window; - -#ifndef DOXYGEN - -//////////////////////////////////////////////////////////////// -// Do not use these variables, they may not exist in future versions: - -extern FL_API int e_type; -extern FL_API int e_x; -extern FL_API int e_y; -extern FL_API int e_dx; -extern FL_API int e_dy; -extern FL_API int e_x_root; -extern FL_API int e_y_root; -extern FL_API unsigned e_state; -extern FL_API int e_clicks; -extern FL_API unsigned e_is_click; -extern FL_API unsigned e_keysym; -extern FL_API unsigned e_length; -extern FL_API const char* e_text; -extern FL_API unsigned e_key_repeated; -extern FL_API float e_pressure; -extern FL_API float e_x_tilt; -extern FL_API float e_y_tilt; -extern FL_API int e_device; -extern FL_API int compose_state; -extern FL_API Widget* belowmouse_; -extern FL_API Widget* pushed_; -extern FL_API Widget* focus_; -extern FL_API Widget* modal_; -extern FL_API bool grab_; -extern FL_API bool exit_modal_; - -//////////////////////////////////////////////////////////////// -#endif - -inline int event() {return e_type;} -inline int event_x() {return e_x;} -inline int event_y() {return e_y;} -inline int event_dx() {return e_dx;} -inline int event_dy() {return e_dy;} -inline int event_x_root() {return e_x_root;} -inline int event_y_root() {return e_y_root;} -inline int event_clicks() {return e_clicks;} -inline void event_clicks(int i) {e_clicks = i;} -inline bool event_is_click() {return e_is_click != 0;} -inline void event_is_click(bool) {e_is_click = 0;} // only false works! -inline unsigned event_state() {return e_state;} -inline bool event_state(unsigned i) {return (e_state&i) != 0;} -inline unsigned event_key() {return e_keysym;} -inline unsigned event_button() {return e_keysym;} -FL_API bool event_key_state(unsigned); -inline const char* event_text() {return e_text;} -inline unsigned event_length() {return e_length;} -inline unsigned event_key_repeated() {return e_key_repeated;} -inline float event_pressure() {return e_pressure;} -inline float event_x_tilt() {return e_x_tilt;} -inline float event_y_tilt() {return e_y_tilt;} -inline int event_device() {return e_device;} - -// tests on current event: -FL_API bool event_inside(const Rectangle&); -FL_API bool compose(int &del); -inline void compose_reset() {compose_state = 0;} - -// shortcuts: -/*! Structure created by Widget::add_shortcut() and returned by list_shortcuts(). */ -struct ShortcutAssignment {Widget* widget; unsigned key;}; -FL_API const ShortcutAssignment* list_shortcuts(unsigned key, unsigned& count); -FL_API const ShortcutAssignment* list_shortcuts(const Widget*,unsigned& count); -FL_API const ShortcutAssignment* list_shortcuts(unsigned& count); -FL_API const ShortcutAssignment* list_matching_shortcuts(unsigned& count); -FL_API bool try_shortcut(); -FL_API const char* key_name(unsigned key); -FL_API unsigned key(const char* name); - -// get current information, not info from last event: -FL_API bool get_key_state(unsigned); -FL_API void get_mouse(int &,int &); -FL_API bool warp_mouse(int, int); - -// event destinations: -FL_API bool handle(int, Window*); -FL_API void add_event_handler(int (*h)(int, Window*)); -inline Widget* belowmouse() {return belowmouse_;} -FL_API void belowmouse(Widget*); -inline void belowmouse(Widget& w) {belowmouse(&w);} -inline Widget* pushed() {return pushed_;} -FL_API void pushed(Widget*); -inline void pushed(Widget& w) {pushed(&w);} -inline Widget* focus() {return focus_;} -FL_API void focus(Widget*); -inline void focus(Widget& w) {focus(&w);} - -// cut/paste/dnd: -FL_API void copy(const char* stuff, int len, bool clipboard = false); -FL_API void paste(Widget &receiver, bool clipboard = false); -FL_API bool dnd(); - -// Modal widgets (block events going to any other widgets): -FL_API void modal(Widget*, bool grab = false); -inline Widget* modal() {return modal_;} -inline bool grab() {return grab_;} -inline void exit_modal() {exit_modal_ = true;} -inline bool exit_modal_flag() {return exit_modal_;} - -// for debugging purpose : -const char *event_name(int event); /// see STR #508 - -} - -#endif - -// -// $Id: events.h 5931 2007-07-13 14:20:38Z spitzak $ -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/file_chooser.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/file_chooser.h deleted file mode 100644 index bceafaec..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/file_chooser.h +++ /dev/null @@ -1,45 +0,0 @@ -// "$Id: file_chooser.h 5197 2006-06-14 07:43:46Z spitzak $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -/*! \file - Popup file chooser dialog, using the FileChooser widget. */ - -#ifndef fltk_file_chooser_h -#define fltk_file_chooser_h - -#include "FL_API.h" - -namespace fltk { - -FL_API void use_system_file_chooser(bool = true); - -FL_API const char *dir_chooser(const char *message,const char *fname,int relative=0); -FL_API const char *file_chooser(const char *message,const char *pattern, - const char *filename, int relative = 0); -FL_API void file_chooser_callback(void (*cb)(const char *)); - -} - -#endif - -// -// End of "$Id: file_chooser.h 5197 2006-06-14 07:43:46Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/filename.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/filename.h deleted file mode 100644 index 48f1490e..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/filename.h +++ /dev/null @@ -1,114 +0,0 @@ -// "$Id: filename.h 5776 2007-04-10 10:47:51Z spitzak $" -/*! \file - Some functions to manipulate filenames, to make portable programs. -*/ - -/* Copyright 1998-2006 by Bill Spitzak and others. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Please report all bugs and problems to "fltk-bugs@fltk.org". - * - * These functions are not in the fltk namespace because they really - * should not be part of fltk. They are used by the file chooser. - * THESE FUNCTIONS MAY BE CHANGED OR DELETED IN FUTURE VERSIONS. DO - * NOT USE THEM, AS THEY ARE NOT AN OFFICIAL PART OF fltk! - */ - -#ifndef fltk_filename_h -#define fltk_filename_h - -#include "FL_API.h" - -//////////////////////////////////////////////////////////////// -#ifndef DOXYGEN -// dirent (what a pain)... - -#if defined(__WATCOMC__) - -# include <sys/types.h> -# include "direct.h" - -#elif defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__) -// Dummy version used on win32 that just holds a name: - -struct dirent {char d_name[1];}; - -#elif defined(__linux) -// Newest Linux libc is broken when it emulates the 32-bit dirent, it -// generates errors when the data like the inode number does not fit, even -// though we are not going to look at anything other than the name. This -// code seems to force the 64-bit version to be used: - -# ifndef _GNU_SOURCE -# define _GNU_SOURCE -# endif -# include <features.h> -# include <sys/types.h> -# include <dirent.h> -# define dirent dirent64 -# define scandir scandir64 - -#else -// warning: on some systems (very few nowadays?) <dirent.h> may not exist. -// The correct information is in one of these three files: -// #include <sys/ndir.h> -// #include <sys/dir.h> -// #include <ndir.h> -// plus you must do the following #define: -// #define dirent direct -// I recommend you create a /usr/include/dirent.h containing the correct info - -# include <sys/types.h> -# include <dirent.h> - -#endif - -#ifndef PATH_MAX -# ifdef _MAX_PATH -# define PATH_MAX _MAX_PATH -# else -# define PATH_MAX 1024 -# endif -#endif - -#endif -//////////////////////////////////////////////////////////////// - -namespace fltk { - -FL_API int filename_absolute(char *to, int tolen, const char *from, const char* cwd=0); -FL_API int filename_relative(char *to, int tolen, const char *from, const char* cwd=0); -FL_API const char *filename_name(const char *); -inline char* filename_name(char* a) {return (char*)(filename_name((const char*)a));} -FL_API const char *filename_ext(const char *); -inline char* filename_ext(char* a) {return (char*)(filename_ext((const char*)a));} -FL_API bool filename_match(const char *, const char *pattern); // glob match -FL_API bool filename_exist(const char*); -FL_API bool filename_isdir(const char*); -FL_API long long unsigned filename_size(const char *); // return size of file -FL_API long int filename_mtime(const char *); // return modification time - -typedef int (File_Sort_F)(const dirent*const*, const dirent*const*); -FL_API int alphasort(const dirent*const*, const dirent*const*); -FL_API int casealphasort(const dirent*const*, const dirent*const*); -FL_API int casenumericsort(const dirent*const*, const dirent*const*); -FL_API int numericsort(const dirent*const*, const dirent*const*); -FL_API int filename_list(const char *d, dirent ***list, File_Sort_F *sort); -FL_API int filename_list(const char *d, dirent ***list); // uses numericsort - -} - -#endif - -// End of "$Id: filename.h 5776 2007-04-10 10:47:51Z spitzak $". diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/fltk_cairo.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/fltk_cairo.h deleted file mode 100644 index 1536a750..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/fltk_cairo.h +++ /dev/null @@ -1,48 +0,0 @@ -// fltk_cairo.h -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -/** \file - "Portably" include cairo common definitions for fltk. If fltk is - compiled correctly, you can create a cairo "surface" from an fltk - Window and then make your own cairo context to draw into it. - - FLTK may also be compiled to use cairo for \e all it's drawing, by - adding --enable_cairo when running ./configure. In this case this - has already been done when draw() is called, and the cairo context - is in fltk::cc. -*/ - -#ifndef fltk_cairo_h -#define fltk_cairo_h - -#include <fltk/FL_API.h> - -#include <cairo.h> -namespace fltk { - extern FL_API cairo_t * cc; - class Window; - FL_API cairo_surface_t * cairo_create_surface(Window* w); -} - -#endif - -// End of fltk_cairo.h - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/forms.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/forms.h deleted file mode 100644 index 78ea6960..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/forms.h +++ /dev/null @@ -1,854 +0,0 @@ -// -// "$Id: forms.h 4886 2006-03-30 09:55:32Z fabien $" -// -// Forms emulation header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef __FORMS_H__ -#define __FORMS_H__ - -#include <fltk/Fl.h> -#include <fltk/Fl_Group.h> -#include <fltk/Fl_Window.h> -#include <fltk/fl_draw.h> - -typedef Fl_Widget FL_OBJECT; -typedef Fl_Window FL_FORM; - -//////////////////////////////////////////////////////////////// -// Random constants & symbols defined by forms.h file: - -#ifndef NULL -#define NULL 0 -#endif -#ifndef FALSE -#define FALSE 0 -#define TRUE 1 -#endif - -#define FL_ON 1 -#define FL_OK 1 -#define FL_VALID 1 -#define FL_PREEMPT 1 -#define FL_AUTO 2 -#define FL_WHEN_NEEDED FL_AUTO -#define FL_OFF 0 -#define FL_NONE 0 -#define FL_CANCEL 0 -#define FL_INVALID 0 -#define FL_IGNORE -1 -#define FL_CLOSE -2 - -#define FL_LCOL FL_BLACK -#define FL_COL1 FL_GRAY -#define FL_MCOL FL_LIGHT1 -#define FL_LEFT_BCOL FL_LIGHT3 // 53 is better match -#define FL_TOP_BCOL FL_LIGHT2 // 51 -#define FL_BOTTOM_BCOL FL_DARK2 // 40 -#define FL_RIGHT_BCOL FL_DARK3 // 36 -#define FL_INACTIVE FL_INACTIVE_COLOR -#define FL_INACTIVE_COL FL_INACTIVE_COLOR -#define FL_FREE_COL1 FL_FREE_COLOR -#define FL_FREE_COL2 ((Fl_Color)(FL_FREE_COLOR+1)) -#define FL_FREE_COL3 ((Fl_Color)(FL_FREE_COLOR+2)) -#define FL_FREE_COL4 ((Fl_Color)(FL_FREE_COLOR+3)) -#define FL_FREE_COL5 ((Fl_Color)(FL_FREE_COLOR+4)) -#define FL_FREE_COL6 ((Fl_Color)(FL_FREE_COLOR+5)) -#define FL_FREE_COL7 ((Fl_Color)(FL_FREE_COLOR+6)) -#define FL_FREE_COL8 ((Fl_Color)(FL_FREE_COLOR+7)) -#define FL_FREE_COL9 ((Fl_Color)(FL_FREE_COLOR+8)) -#define FL_FREE_COL10 ((Fl_Color)(FL_FREE_COLOR+9)) -#define FL_FREE_COL11 ((Fl_Color)(FL_FREE_COLOR+10)) -#define FL_FREE_COL12 ((Fl_Color)(FL_FREE_COLOR+11)) -#define FL_FREE_COL13 ((Fl_Color)(FL_FREE_COLOR+12)) -#define FL_FREE_COL14 ((Fl_Color)(FL_FREE_COLOR+13)) -#define FL_FREE_COL15 ((Fl_Color)(FL_FREE_COLOR+14)) -#define FL_FREE_COL16 ((Fl_Color)(FL_FREE_COLOR+15)) -#define FL_TOMATO ((Fl_Color)(131)) -#define FL_INDIANRED ((Fl_Color)(164)) -#define FL_SLATEBLUE ((Fl_Color)(195)) -#define FL_DARKGOLD ((Fl_Color)(84)) -#define FL_PALEGREEN ((Fl_Color)(157)) -#define FL_ORCHID ((Fl_Color)(203)) -#define FL_DARKCYAN ((Fl_Color)(189)) -#define FL_DARKTOMATO ((Fl_Color)(113)) -#define FL_WHEAT ((Fl_Color)(174)) - -#define FL_ALIGN_BESIDE FL_ALIGN_INSIDE - -#define FL_PUP_TOGGLE 2 // FL_MENU_TOGGLE -#define FL_PUP_INACTIVE 1 // FL_MENU_INACTIVE -#define FL_NO_FRAME FL_NO_BOX -#define FL_ROUNDED3D_UPBOX FL_ROUND_UP_BOX -#define FL_ROUNDED3D_DOWNBOX FL_ROUND_DOWN_BOX -#define FL_OVAL3D_UPBOX FL_ROUND_UP_BOX -#define FL_OVAL3D_DOWNBOX FL_ROUND_DOWN_BOX - -#define FL_MBUTTON1 1 -#define FL_LEFTMOUSE 1 -#define FL_MBUTTON2 2 -#define FL_MIDDLEMOUSE 2 -#define FL_MBUTTON3 3 -#define FL_RIGHTMOUSE 3 -#define FL_MBUTTON4 4 -#define FL_MBUTTON5 5 - -#define FL_INVALID_STYLE 255 -#define FL_NORMAL_STYLE 0 -#define FL_BOLD_STYLE 1 -#define FL_ITALIC_STYLE 2 -#define FL_BOLDITALIC_STYLE 3 -#define FL_FIXED_STYLE 4 -#define FL_FIXEDBOLD_STYLE 5 -#define FL_FIXEDITALIC_STYLE 6 -#define FL_FIXEDBOLDITALIC_STYLE 7 -#define FL_TIMES_STYLE 8 -#define FL_TIMESBOLD_STYLE 9 -#define FL_TIMESITALIC_STYLE 10 -#define FL_TIMESBOLDITALIC_STYLE 11 - -// hacks to change the labeltype() when passed to fl_set_object_lstyle(): -#define FL_SHADOW_STYLE 0x100 -#define FL_ENGRAVED_STYLE 0x200 -#define FL_EMBOSSED_STYLE 0x300 - -// size values are different from XForms, match older Forms: -#define FL_TINY_SIZE 8 -#define FL_SMALL_SIZE 11 // 10 -#undef FL_NORMAL_SIZE -#define FL_NORMAL_SIZE 14 // 12 -#define FL_MEDIUM_SIZE 18 // 14 -#define FL_LARGE_SIZE 24 // 18 -#define FL_HUGE_SIZE 32 // 24 -#define FL_DEFAULT_SIZE FL_SMALL_SIZE -#define FL_TINY_FONT FL_TINY_SIZE -#define FL_SMALL_FONT FL_SMALL_SIZE -#define FL_NORMAL_FONT FL_NORMAL_SIZE -#define FL_MEDIUM_FONT FL_MEDIUM_SIZE -#define FL_LARGE_FONT FL_LARGE_SIZE -#define FL_HUGE_FONT FL_HUGE_SIZE -#define FL_NORMAL_FONT1 FL_SMALL_FONT -#define FL_NORMAL_FONT2 FL_NORMAL_FONT -#define FL_DEFAULT_FONT FL_SMALL_FONT - -#define FL_RETURN_END_CHANGED FL_WHEN_RELEASE -#define FL_RETURN_CHANGED FL_WHEN_CHANGED -#define FL_RETURN_END FL_WHEN_RELEASE_ALWAYS -#define FL_RETURN_ALWAYS (FL_WHEN_CHANGED|FL_WHEN_NOT_CHANGED) - -#define FL_BOUND_WIDTH 3 - -typedef int FL_Coord; -typedef int FL_COLOR; - -//////////////////////////////////////////////////////////////// -// fltk interaction: - -#define FL_CMD_OPT void -extern FL_FORMS_API void fl_initialize(int*, char*[], const char*, FL_CMD_OPT*, int); -inline void fl_finish() {} - -typedef void (*FL_IO_CALLBACK) (int, void*); -inline void fl_add_io_callback(int fd, short w, FL_IO_CALLBACK cb, void* v) { - Fl::add_fd(fd,w,cb,v);} -inline void fl_remove_io_callback(int fd, short, FL_IO_CALLBACK) { - Fl::remove_fd(fd);} // removes all the callbacks! - -// type of callback is different and no "id" number is returned: -inline void fl_add_timeout(long msec, void (*cb)(void*), void* v) { - Fl::add_timeout(msec*.001, (Fl_Timeout_Handler)cb, v);} -inline void fl_remove_timeout(int) {} - -// type of callback is different! -inline void fl_set_idle_callback(void (*cb)()) {Fl::set_idle(cb);} - -FL_FORMS_API Fl_Widget* fl_do_forms(void); -FL_FORMS_API Fl_Widget* fl_check_forms(); -inline Fl_Widget* fl_do_only_forms(void) {return fl_do_forms();} -inline Fl_Widget* fl_check_only_forms(void) {return fl_check_forms();} - -// because of new redraw behavior, these are no-ops: -inline void fl_freeze_object(Fl_Widget*) {} -inline void fl_unfreeze_object(Fl_Widget*) {} -inline void fl_freeze_form(Fl_Window*) {} -inline void fl_unfreeze_form(Fl_Window*) {} -inline void fl_freeze_all_forms() {} -inline void fl_unfreeze_all_forms() {} - -inline void fl_set_focus_object(Fl_Window*, Fl_Widget* o) {Fl::focus(o);} -inline void fl_reset_focus_object(Fl_Widget* o) {Fl::focus(o);} -#define fl_set_object_focus fl_set_focus_object - -// void fl_set_form_atclose(Fl_Window*w,int (*cb)(Fl_Window*,void*),void* v) -// void fl_set_atclose(int (*cb)(Fl_Window*,void*),void*) -// fl_set_form_atactivate/atdeactivate not implemented! - -//////////////////////////////////////////////////////////////// -// Fl_Widget: - -inline void fl_set_object_boxtype(Fl_Widget* o, Fl_Boxtype a) {o->box(a);} -inline void fl_set_object_lsize(Fl_Widget* o,int s) {o->label_size(s);} -FL_FORMS_API void fl_set_object_lstyle(Fl_Widget* o,int a); -inline void fl_set_object_lcol(Fl_Widget* o, unsigned a) {o->label_color((Fl_Color)a);} -#define fl_set_object_lcolor fl_set_object_lcol -inline void fl_set_object_lalign(Fl_Widget* o, Fl_Align a) { o->clear_flag(FL_ALIGN_MASK); o->set_flag(a);} -#define fl_set_object_align fl_set_object_lalign -inline void fl_set_object_color(Fl_Widget* o,unsigned a,unsigned b) {o->color((Fl_Color)a); o->selection_color((Fl_Color)b);} -inline void fl_set_object_label(Fl_Widget* o, const char* a) {o->label(a); o->redraw();} -inline void fl_set_object_position(Fl_Widget*o,int x,int y) {o->position(x,y);} -inline void fl_set_object_size(Fl_Widget* o, int w, int h) {o->size(w,h);} -inline void fl_set_object_geometry(Fl_Widget* o,int x,int y,int w,int h) {o->resize(x,y,w,h);} - -inline void fl_get_object_geometry(Fl_Widget* o,int*x,int*y,int*w,int*h) { - *x = o->x(); *y = o->y(); *w = o->w(); *h = o->h();} -inline void fl_get_object_position(Fl_Widget* o,int*x,int*y) { - *x = o->x(); *y = o->y();} - -typedef void (*Forms_CB)(Fl_Widget*, long); -inline void fl_set_object_callback(Fl_Widget*o,Forms_CB c,long a) {o->callback(c,a);} -#define fl_set_call_back fl_set_object_callback -inline void fl_call_object_callback(Fl_Widget* o) {o->do_callback();} -inline void fl_trigger_object(Fl_Widget* o) {o->do_callback();} -inline void fl_set_object_return(Fl_Widget* o, int v) { - o->when(v|FL_WHEN_RELEASE);} - -inline void fl_redraw_object(Fl_Widget* o) {o->redraw();} -inline void fl_show_object(Fl_Widget* o) {o->show();} -inline void fl_hide_object(Fl_Widget* o) {o->hide();} -inline void fl_free_object(Fl_Widget* x) {delete x;} -inline void fl_delete_object(Fl_Widget* o) {((Fl_Group*)(o->parent()))->remove(*o);} -inline void fl_activate_object(Fl_Widget* o) {o->activate();} -inline void fl_deactivate_object(Fl_Widget* o) {o->deactivate();} - -inline void fl_add_object(Fl_Window* f, Fl_Widget* x) {f->add(x);} -inline void fl_insert_object(Fl_Widget* o, Fl_Widget* b) { - ((Fl_Group*)(b->parent()))->insert(*o,b);} - -inline Fl_Window* FL_ObjWin(Fl_Widget* o) {return o->window();} - -//////////////////////////////////////////////////////////////// -// things that appered in the demos a lot that I don't emulate, but -// I did not want to edit out of all the demos... - -inline int fl_get_border_width() {return 3;} -inline void fl_set_border_width(int) {} -inline void fl_set_object_dblbuffer(Fl_Widget*, int) {} -inline void fl_set_form_dblbuffer(Fl_Window*, int) {} - -//////////////////////////////////////////////////////////////// -// Fl_Window: - -inline void fl_free_form(Fl_Window* x) {delete x;} -inline void fl_redraw_form(Fl_Window* f) {f->redraw();} - -inline Fl_Window* fl_bgn_form(Fl_Boxtype b,int w,int h) { - Fl_Window* g = new Fl_Window(w,h,0); - g->box(b); - return g; -} -inline void fl_addto_form(Fl_Window* f) {f->begin();} -inline Fl_Group* fl_bgn_group() {return new Fl_Group(0,0,0,0,0);} -inline void fl_addto_group(Fl_Widget* o) {((Fl_Group* )o)->begin();} -FL_FORMS_API void fl_end_group(); -FL_FORMS_API void fl_end_form(); -#define resizebox _ddfdesign_kludge() - -inline void fl_scale_form(Fl_Window* f, double x, double y) { - f->resizable(f); f->size(int(f->w()*x),int(f->h()*y));} -inline void fl_set_form_position(Fl_Window* f,int x,int y) {f->position(x,y);} -inline void fl_set_form_size(Fl_Window* f, int w, int h) {f->size(w,h);} -inline void fl_set_form_geometry(Fl_Window* f,int x,int y,int w,int h) { - f->resize(x,y,w,h);} -#define fl_set_initial_placement fl_set_form_geometry -inline void fl_adjust_form_size(Fl_Window*) {} - -FL_FORMS_API void fl_show_form(Fl_Window* f,int p,int b,const char* n); -enum { // "p" argument values: - FL_PLACE_FREE = 0, // make resizable - FL_PLACE_MOUSE = 1, // mouse centered on form - FL_PLACE_CENTER = 2, // center of the screen - FL_PLACE_POSITION = 4,// fixed position, resizable - FL_PLACE_SIZE = 8, // fixed size, normal fltk behavior - FL_PLACE_GEOMETRY =16,// fixed size and position - FL_PLACE_ASPECT = 32, // keep aspect ratio (ignored) - FL_PLACE_FULLSCREEN=64,// fill screen - FL_PLACE_HOTSPOT = 128,// enables hotspot - FL_PLACE_ICONIC = 256,// iconic (ignored) - FL_FREE_SIZE=(1<<14), // force resizable - FL_FIX_SIZE =(1<<15) // force off resizable -}; -#define FL_PLACE_FREE_CENTER (FL_PLACE_CENTER|FL_FREE_SIZE) -#define FL_PLACE_CENTERFREE (FL_PLACE_CENTER|FL_FREE_SIZE) -enum { // "b" arguement values: - FL_NOBORDER = 0, - FL_FULLBORDER, - FL_TRANSIENT -//FL_MODAL = (1<<8) // not implemented yet in Forms -}; -inline void fl_set_form_hotspot(Fl_Window* w,int x,int y) {w->hotspot(x,y);} -inline void fl_set_form_hotobject(Fl_Window* w, Fl_Widget* o) {w->hotspot(o);} -extern FL_FORMS_API char fl_flip; // in forms.C -inline void fl_flip_yorigin() {fl_flip = 1;} - -#define fl_prepare_form_window fl_show_form -inline void fl_show_form_window(Fl_Window*) {} - -inline void fl_raise_form(Fl_Window* f) {f->show();} - -inline void fl_hide_form(Fl_Window* f) {f->hide();} -inline void fl_pop_form(Fl_Window* f) {f->show();} - -extern FL_FORMS_API char fl_modal_next; // in forms.C -inline void fl_activate_all_forms() {} -inline void fl_deactivate_all_forms() {fl_modal_next = 1;} -inline void fl_deactivate_form(Fl_Window*w) {w->deactivate();} -inline void fl_activate_form(Fl_Window*w) {w->activate();} - -inline void fl_set_form_title(Fl_Window* f, const char* s) {f->label(s);} -inline void fl_title_form(Fl_Window* f, const char* s) {f->label(s);} - -typedef void (*Forms_FormCB)(Fl_Widget*); -inline void fl_set_form_callback(Fl_Window* f,Forms_FormCB c) {f->callback(c);} -#define fl_set_form_call_back fl_set_form_callback - -inline void fl_init() {} -inline void fl_set_graphics_mode(int r, int /*d*/) { - Fl::visual(r ? FL_RGB : FL_INDEX); - // d should add FL_DOUBLE, but that always fails in fltk 2.0 -} - -inline int fl_form_is_visible(Fl_Window* f) {return f->visible();} - -inline int fl_mouse_button() {return Fl::event_button();} -#define fl_mousebutton fl_mouse_button - -#define fl_free free -#define fl_malloc malloc -#define fl_calloc calloc -#define fl_realloc realloc - -//////////////////////////////////////////////////////////////// -// Drawing functions. Only usable inside an Fl_Free object? - -#if 0 -inline void fl_drw_box(Fl_Boxtype b,int x,int y,int w,int h,Fl_Color bgc,int=3) { - b->draw(x,y,w,h,bgc);} -inline void fl_drw_frame(Fl_Boxtype b,int x,int y,int w,int h,Fl_Color bgc,int=3) { - b->draw(x,y,w,h,bgc,FL_FRAME_ONLY);} -#endif - -inline void fl_drw_text(Fl_Align align, int x, int y, int w, int h, - Fl_Color fgcolor, int size, Fl_Font style, - const char* s) { - fl_font(style,size); - fl_color(fgcolor); - fl_draw(s,x,y,w,h,align); -} - -// this does not work except for CENTER... -inline void fl_drw_text_beside(Fl_Align align, int x, int y, int w, int h, - Fl_Color fgcolor, int size, Fl_Font style, - const char* s) { - fl_font(style,size); - fl_color(fgcolor); - fl_draw(s,x,y,w,h,align); -} - -//inline void fl_set_font_name(Fl_Font n,const char* s) {fl_set_font(n,s);} - -inline void fl_mapcolor(Fl_Color c, uchar r, uchar g, uchar b) { - fl_set_color(c,fl_rgb(r,g,b));} -#define fl_set_clipping(x,y,w,h) fl_clip(x,y,w,h) -#define fl_unset_clipping() fl_pop_clip() - -//////////////////////////////////////////////////////////////// -// Forms classes: - -inline Fl_Widget* fl_add_new(Fl_Widget* p) {return p;} -inline Fl_Widget* fl_add_new(uchar t,Fl_Widget* p) {p->type(t); return p;} - -#define forms_constructor(type,name) \ -inline type* name(uchar t,int x,int y,int w,int h,const char* l) { \ - return (type*)(fl_add_new(t, new type(x,y,w,h,l)));} -#define forms_constructort(type,name) \ -inline type* name(uchar t,int x,int y,int w,int h,const char* l) { \ - return (type*)(fl_add_new(new type(t,x,y,w,h,l)));} -#define forms_constructorb(type,name) \ -inline type* name(Fl_Boxtype t,int x,int y,int w,int h,const char* l) { \ - return (type*)(fl_add_new(new type(t,x,y,w,h,l)));} - -#include "Fl_FormsBitmap.h" -#define FL_NORMAL_BITMAP FL_NO_BOX -forms_constructorb(Fl_FormsBitmap, fl_add_bitmap) -inline void fl_set_bitmap_data(Fl_Widget* o, int w, int h, const uchar* b) { - ((Fl_FormsBitmap*)o)->set(w,h,b); -} - -#include "Fl_FormsPixmap.h" -#define FL_NORMAL_PIXMAP FL_NO_BOX -forms_constructorb(Fl_FormsPixmap, fl_add_pixmap) -inline void fl_set_pixmap_data(Fl_Widget* o, char*const* b) { - ((Fl_FormsPixmap*)o)->set(b); -} -//inline void fl_set_pixmap_file(Fl_Widget*, const char*); -inline void fl_set_pixmap_align(Fl_Widget* o,Fl_Align a,int,int) { o->clear_flag(FL_ALIGN_MASK); o->set_flag(a);} -//inline void fl_set_pixmap_colorcloseness(int, int, int); - -#include <fltk/Fl_Box.h> -forms_constructorb(Fl_Box, fl_add_box) - -#include <fltk/Fl_Browser.h> -forms_constructor(Fl_Browser, fl_add_browser) - -inline void fl_clear_browser(Fl_Widget* o) { - ((Fl_Browser*)o)->clear();} -inline void fl_add_browser_line(Fl_Widget* o, const char* s) { - ((Fl_Browser*)o)->add(s);} -inline void fl_addto_browser(Fl_Widget* o, const char* s) { - ((Fl_Browser*)o)->add(s);} /* should also scroll to bottom */ -//inline void fl_addto_browser_chars(Fl_Widget*, const char*) -//#define fl_append_browser fl_addto_browser_chars -inline void fl_insert_browser_line(Fl_Widget* o, int n, const char* s) { - ((Fl_Browser*)o)->insert(n,s);} -inline void fl_delete_browser_line(Fl_Widget* o, int n) { - ((Fl_Browser*)o)->remove(n);} -inline void fl_replace_browser_line(Fl_Widget* o, int n, const char* s) { - ((Fl_Browser*)o)->replace(n,s);} -inline char* fl_get_browser_line(Fl_Widget* o, int n) { - return (char*)(((Fl_Browser*)o)->text(n));} -FL_FORMS_API int fl_load_browser(Fl_Widget* o, const char* f); -inline void fl_select_browser_line(Fl_Widget* o, int n) { - ((Fl_Browser*)o)->select(n,1);} -inline void fl_deselect_browser_line(Fl_Widget* o, int n) { - ((Fl_Browser*)o)->select(n,0);} -inline void fl_deselect_browser(Fl_Widget* o) { - ((Fl_Browser*)o)->deselect();} -inline int fl_isselected_browser_line(Fl_Widget* o, int n) { - return ((Fl_Browser*)o)->selected(n);} -inline int fl_get_browser_topline(Fl_Widget* o) { - return ((Fl_Browser*)o)->topline();} -inline int fl_get_browser(Fl_Widget* o) { - return ((Fl_Browser*)o)->value();} -inline int fl_get_browser_maxline(Fl_Widget* o) { - return ((Fl_Browser*)o)->size();} -//linline int fl_get_browser_screenlines(Fl_Widget*); -inline void fl_set_browser_topline(Fl_Widget* o, int n) { - ((Fl_Browser*)o)->topline(n);} -inline void fl_set_browser_fontsize(Fl_Widget* o, int s) { - ((Fl_Browser*)o)->text_size(s);} -inline void fl_set_browser_fontstyle(Fl_Widget* o, int s) { - ((Fl_Browser*)o)->text_font(fl_fonts+s);} -inline void fl_set_browser_specialkey(Fl_Widget* o, char c) { - ((Fl_Browser*)o)->format_char(c);} -//inline void fl_set_browser_vscrollbar(Fl_Widget*, int); -//inline void fl_set_browser_hscrollbar(Fl_Widget*, int); -//inline void fl_set_browser_leftslider(Fl_Widget*, int); -//#define fl_set_browser_leftscrollbar fl_set_browser_leftslider -//inline void fl_set_browser_line_selectable(Fl_Widget*, int, int); -//inline void fl_get_browser_dimension(Fl_Widget*,int*,int*,int*,int*); -//inline void fl_set_browser_dblclick_callback(Fl_Widget*,FL_CALLBACKPTR,long); -//inline void fl_set_browser_xoffset(Fl_Widget*, FL_Coord); -//inline void fl_set_browser_scrollbarsize(Fl_Widget*, int, int); -inline void fl_setdisplayed_browser_line(Fl_Widget* o, int n, int i) { - ((Fl_Browser*)o)->display(n,i);} -inline int fl_isdisplayed_browser_line(Fl_Widget* o, int n) { - return ((Fl_Browser*)o)->displayed(n);} - -#include <fltk/Fl_Button.h> - -#define FL_NORMAL_BUTTON 0 -//#define FL_HIDDEN_BUTTON -#define FL_TOUCH_BUTTON 4 -#define FL_INOUT_BUTTON 5 -#define FL_RETURN_BUTTON 6 -#define FL_HIDDEN_RET_BUTTON 7 -#define FL_PUSH_BUTTON FL_TOGGLE_BUTTON -#define FL_MENU_BUTTON 9 - -FL_FORMS_API Fl_Button* fl_add_button(uchar t,int x,int y,int w,int h,const char* l); -inline int fl_get_button(Fl_Widget* b) {return ((Fl_Button*)b)->value();} -inline void fl_set_button(Fl_Widget* b, int v) {((Fl_Button*)b)->value(v);} -inline int fl_get_button_numb(Fl_Widget*) {return Fl::event_button();} -inline void fl_set_object_shortcut(Fl_Widget* b, const char* s, int=0) { - b->shortcut(fltk::key(s));} -#define fl_set_button_shortcut fl_set_object_shortcut - -#include <fltk/Fl_Light_Button.h> -forms_constructor(Fl_Light_Button, fl_add_lightbutton) - -#include <fltk/Fl_Round_Button.h> -forms_constructor(Fl_Round_Button, fl_add_roundbutton) -forms_constructor(Fl_Round_Button, fl_add_round3dbutton) - -#include <fltk/Fl_Check_Button.h> -forms_constructor(Fl_Check_Button, fl_add_checkbutton) - -inline Fl_Widget* fl_add_bitmapbutton(int t,int x,int y,int w,int h,const char* l) {Fl_Widget* o = fl_add_button(t,x,y,w,h,l); return o;} -inline void fl_set_bitmapbutton_data(Fl_Widget* o,int a,int b,uchar* c) { - (new Fl_Bitmap(c,a,b))->label(o);} // does not delete old Fl_Bitmap! - -inline Fl_Widget* fl_add_pixmapbutton(int t,int x,int y,int w,int h,const char* l) {Fl_Widget* o = fl_add_button(t,x,y,w,h,l); return o;} -inline void fl_set_pixmapbutton_data(Fl_Widget* o, const char*const* c) { - (new Fl_Pixmap(c))->label(o);} // does not delete old Fl_Pixmap! - -// Fl_Canvas object not yet implemented! - -#include "Fl_Chart.h" - -forms_constructor(Fl_Chart, fl_add_chart) -inline void fl_clear_chart(Fl_Widget* o) { - ((Fl_Chart*)o)->clear();} -inline void fl_add_chart_value(Fl_Widget* o,double v,const char* s,uchar c){ - ((Fl_Chart*)o)->add(v,s,c);} -inline void fl_insert_chart_value(Fl_Widget* o, int i, double v, const char* s, uchar c) { - ((Fl_Chart*)o)->insert(i,v,s,c);} -inline void fl_replace_chart_value(Fl_Widget* o, int i, double v, const char* s, uchar c) { - ((Fl_Chart*)o)->replace(i,v,s,c);} -inline void fl_set_chart_bounds(Fl_Widget* o, double a, double b) { - ((Fl_Chart*)o)->bounds(a,b);} -inline void fl_set_chart_maxnumb(Fl_Widget* o, int v) { - ((Fl_Chart*)o)->maxsize(v);} -inline void fl_set_chart_autosize(Fl_Widget* o, int v) { - ((Fl_Chart*)o)->autosize(v);} -inline void fl_set_chart_lstyle(Fl_Widget* o, Fl_Font v) { - ((Fl_Chart*)o)->text_font(v);} -inline void fl_set_chart_lsize(Fl_Widget* o, int v) { - ((Fl_Chart*)o)->text_size(v);} -inline void fl_set_chart_lcolor(Fl_Widget* o, unsigned v) { - ((Fl_Chart*)o)->text_color((Fl_Color)v);} -#define fl_set_chart_lcol fl_set_chart_lcolor - -#include <fltk/Fl_Choice.h> - -#define FL_NORMAL_CHOICE 0 -#define FL_NORMAL_CHOICE2 0 -#define FL_DROPLIST_CHOICE 0 - -forms_constructor(Fl_Choice, fl_add_choice) -inline void fl_clear_choice(Fl_Widget* o) { - ((Fl_Choice*)o)->clear();} -inline void fl_addto_choice(Fl_Widget* o, const char* s) { - ((Fl_Choice*)o)->add(s);} -inline void fl_replace_choice(Fl_Widget* o, int i, const char* s) { - ((Fl_Choice*)o)->replace(i-1,s);} -inline void fl_delete_choice(Fl_Widget* o, int i) { - ((Fl_Choice*)o)->remove(i-1);} -inline void fl_set_choice(Fl_Widget* o, int i) { - ((Fl_Choice*)o)->value(i-1);} -// inline void fl_set_choice_text(Fl_Widget*, const char*); -inline int fl_get_choice(Fl_Widget* o) { - return ((Fl_Choice*)o)->value()+1;} -// inline const char* fl_get_choice_item_text(Fl_Widget*, int); -// inline int fl_get_choice_maxitems(Fl_Widget*); -inline const char* fl_get_choice_text(Fl_Widget* o) { - return ((Fl_Choice*)o)->text();} -inline void fl_set_choice_fontsize(Fl_Widget* o, int x) { - ((Fl_Choice*)o)->text_size(x);} -inline void fl_set_choice_fontstyle(Fl_Widget* o, Fl_Font x) { - ((Fl_Choice*)o)->text_font(x);} -// inline void fl_set_choice_item_mode(Fl_Widget*, int, unsigned); -// inline void fl_set_choice_item_shortcut(Fl_Widget*, int, const char*); - -#include <fltk/Fl_Clock.h> -forms_constructor(Fl_Clock, fl_add_clock) -inline void fl_get_clock(Fl_Widget* o, int* h, int* m, int* s) { - *h = ((Fl_Clock*)o)->hour(); - *m = ((Fl_Clock*)o)->minute(); - *s = ((Fl_Clock*)o)->second(); -} - -#include <fltk/Fl_Counter.h> -forms_constructor(Fl_Counter, fl_add_counter) -inline void fl_set_counter_value(Fl_Widget* o, double v) { - ((Fl_Counter*)o)->value(v);} -inline void fl_set_counter_bounds(Fl_Widget* o, double a, double b) { - ((Fl_Counter*)o)->range(a,b);} -inline void fl_set_counter_step(Fl_Widget* o, double a, double b) { - ((Fl_Counter*)o)->step(a / b);} -inline void fl_set_counter_precision(Fl_Widget* o, int v) { -// ((Fl_Counter*)o)->precision(v);} - ((Fl_Counter*)o)->step(1/(10^v));} -inline void fl_set_counter_return(Fl_Widget* o, int v) { - ((Fl_Counter*)o)->when(v|FL_WHEN_RELEASE);} -inline double fl_get_counter_value(Fl_Widget* o) { - return ((Fl_Counter*)o)->value();} -inline void fl_get_counter_bounds(Fl_Widget* o, float* a, float* b) { - *a = float(((Fl_Counter*)o)->minimum()); - *b = float(((Fl_Counter*)o)->maximum()); -} -//inline void fl_set_counter_filter(Fl_Widget*,const char* (*)(Fl_Widget*,double,int)); - -// Cursor stuff cannot be emulated because it uses X stuff -inline void fl_set_cursor(Fl_Window* w, Fl_Cursor c) {w->cursor(c);} -#define FL_INVISIBLE_CURSOR FL_CURSOR_NONE -#define FL_DEFAULT_CURSOR FL_CURSOR_DEFAULT - -#include <fltk/Fl_Dial.h> - -#define FL_DIAL_COL1 FL_GRAY -#define FL_DIAL_COL2 37 - -forms_constructor(Fl_Dial, fl_add_dial) -inline void fl_set_dial_value(Fl_Widget* o, double v) { - ((Fl_Dial*)o)->value(v);} -inline double fl_get_dial_value(Fl_Widget* o) { - return ((Fl_Dial*)o)->value();} -inline void fl_set_dial_bounds(Fl_Widget* o, double a, double b) { - ((Fl_Dial*)o)->range(a, b);} -inline void fl_get_dial_bounds(Fl_Widget* o, float* a, float* b) { - *a = float(((Fl_Dial*)o)->minimum()); - *b = float(((Fl_Dial*)o)->maximum()); -} -inline void fl_set_dial_return(Fl_Widget* o, int i) { - ((Fl_Dial*)o)->when(i|FL_WHEN_RELEASE);} -inline void fl_set_dial_angles(Fl_Widget* o, int a, int b) { - ((Fl_Dial*)o)->angles(a, b);} -//inline void fl_set_dial_cross(Fl_Widget* o, int); -// inline void fl_set_dial_direction(Fl_Widget* o, uchar d) { -// ((Fl_Dial*)o)->direction(d);} -inline void fl_set_dial_step(Fl_Widget* o, double v) { - ((Fl_Dial*)o)->step(v);} - -// Frames: - -inline Fl_Widget* fl_add_frame(Fl_Boxtype i,int x,int y,int w,int h,const char* l) { - return fl_add_box(i,x-3,y-3,w+6,h+6,l);} - -// labelframe nyi -inline Fl_Widget* fl_add_labelframe(Fl_Boxtype i,int x,int y,int w,int h,const char* l) { - Fl_Widget* o = fl_add_box(i,x-3,y-3,w+6,h+6,l); - o->clear_flag(FL_ALIGN_MASK); - o->set_flag(FL_ALIGN_TOP | FL_ALIGN_LEFT); - return o; -} - -#include "Fl_Free.h" -inline Fl_Free* -fl_add_free(int t,double x,double y,double w,double h,const char* l, - FL_HANDLEPTR hdl) { - return (Fl_Free*)(fl_add_new( - new Fl_Free(t,int(x),int(y),int(w),int(h),l,hdl))); -} - -#include <fltk/fl_ask.h> -#include <fltk/fl_show_colormap.h> - -inline int fl_show_question(const char* c, int = 0) {return fl_ask(c);} -FL_FORMS_API void fl_show_message(const char *,const char *,const char *); -FL_FORMS_API void fl_show_alert(const char *,const char *,const char *,int=0); -FL_FORMS_API int fl_show_question(const char *,const char *,const char *); -inline const char *fl_show_input(const char *l,const char*d=0) {return fl_input(l,d);} -/*const*/ char *fl_show_simple_input(const char *label, const char *deflt = 0); -int fl_show_choice( - const char *m1, - const char *m2, - const char *m3, - int numb, - const char *b0, - const char *b1, - const char *b2); - -inline void fl_set_goodies_font(int a, unsigned b) { - fl_message_style->label_font = fl_fonts+a; - fl_message_style->label_size = b; -} -#define fl_show_messages fl_message -inline int fl_show_choices(const char* c,int n,const char* b1,const char* b2, - const char* b3, int) { - return fl_show_choice(0,c,0,n,b1,b2,b3); -} - -#include <fltk/filename.h> -#include <fltk/fl_file_chooser.h> -inline int do_matching(char* a, const char* b) {return filename_match(a,b);} - -// Forms-compatable file chooser (implementation in fselect.C): -FL_FORMS_API char* fl_show_file_selector(const char* message,const char* dir, - const char* pat,const char* fname); -FL_FORMS_API char* fl_get_directory(); -FL_FORMS_API char* fl_get_pattern(); -FL_FORMS_API char* fl_get_filename(); - -#include <fltk/Fl_Input.h> -forms_constructor(Fl_Input, fl_add_input) -inline void fl_set_input(Fl_Widget* o, const char* v) { - ((Fl_Input*)o)->text(v);} -inline void fl_set_input_return(Fl_Widget* o, int x) { - ((Fl_Input*)o)->when(x | FL_WHEN_RELEASE);} -inline void fl_set_input_color(Fl_Widget* o, unsigned a, unsigned /*b*/) { - ((Fl_Input*)o)->text_color((Fl_Color)a); -// ((Fl_Input*)o)->cursor_color((Fl_Color)b); -} -// inline void fl_set_input_scroll(Fl_Widget*, int); -inline void fl_set_input_cursorpos(Fl_Widget* o, int x, int /*y*/) { - ((Fl_Input*)o)->position(x);} -// inline void fl_set_input_selected(Fl_Widget*, int); -// inline void fl_set_input_selected_range(Fl_Widget*, int, int); -// inline void fl_set_input_maxchars(Fl_Widget*, int); -// inline void fl_set_input_format(Fl_Widget*, int, int); -// inline void fl_set_input_hscrollbar(Fl_Widget*, int); -// inline void fl_set_input_vscrollbar(Fl_Widget*, int); -// inline void fl_set_input_xoffset(Fl_Widget*, int); -// inline void fl_set_input_topline(Fl_Widget*, int); -// inline void fl_set_input_scrollbarsize(Fl_Widget*, int, int); -// inline int fl_get_input_topline(Fl_Widget*); -// inline int fl_get_input_screenlines(Fl_Widget*); -inline int fl_get_input_cursorpos(Fl_Widget* o, int*x, int*y) { - *x = ((Fl_Input*)o)->position(); *y = 0; return *x;} -// inline int fl_get_input_numberoflines(Fl_Widget*); -// inline void fl_get_input_format(Fl_Widget*, int*, int*); -inline const char* fl_get_input(Fl_Widget* o) {return ((Fl_Input*)o)->text();} - -#include <fltk/Fl_Menu_Button.h> - -// types are not implemented, they all act like FL_PUSH_MENU: -#define FL_TOUCH_MENU 0 -#define FL_PUSH_MENU 1 -#define FL_PULLDOWN_MENU 2 -forms_constructor(Fl_Menu_Button, fl_add_menu) - -inline void fl_clear_menu(Fl_Widget* o) { - ((Fl_Menu_Button*)o)->clear();} -inline void fl_set_menu(Fl_Widget* o, const char* s) { - ((Fl_Menu_Button*)o)->clear(); ((Fl_Menu_Button*)o)->add(s);} -inline void fl_addto_menu(Fl_Widget* o, const char* s) { - ((Fl_Menu_Button*)o)->add(s);} -inline void fl_replace_menu_item(Fl_Widget* o, int i, const char* s) { - ((Fl_Menu_Button*)o)->replace(i-1,s);} -inline void fl_delete_menu_item(Fl_Widget* o, int i) { - ((Fl_Menu_Button*)o)->remove(i-1);} -inline void fl_set_menu_item_shortcut(Fl_Widget* o, int i, const char* s) { - ((Fl_Menu_Button*)o)->shortcut(i-1,fltk::key(s));} -// inline void fl_set_menu_item_mode(Fl_Widget* o, int i, long x) { -// ((Fl_Menu_Button*)o)->mode(i-1,x);} -inline void fl_show_menu_symbol(Fl_Widget*, int ) { -/* ((Fl_Menu_Button*)o)->show_menu_symbol(i); */} -// inline void fl_set_menu_popup(Fl_Widget*, int); -inline int fl_get_menu(Fl_Widget* o) { - return ((Fl_Menu_Button*)o)->value()+1;} -inline const char* fl_get_menu_item_text(Fl_Widget* o, int i) { - return ((Fl_Menu_Button*)o)->text(i);} -inline int fl_get_menu_maxitems(Fl_Widget* o) { - return ((Fl_Menu_Button*)o)->size();} -inline int fl_get_menu_item_mode(Fl_Widget* o, int i) { - return ((Fl_Menu_Button*)o)->mode(i);} -inline const char* fl_get_menu_text(Fl_Widget* o) { - return ((Fl_Menu_Button*)o)->text();} - -#include "Fl_Positioner.h" -#define FL_NORMAL_POSITIONER 0 -forms_constructor(Fl_Positioner, fl_add_positioner) -inline void fl_set_positioner_xvalue(Fl_Widget* o, double v) { - ((Fl_Positioner*)o)->xvalue(v);} -inline double fl_get_positioner_xvalue(Fl_Widget* o) { - return ((Fl_Positioner*)o)->xvalue();} -inline void fl_set_positioner_xbounds(Fl_Widget* o, double a, double b) { - ((Fl_Positioner*)o)->xbounds(a,b);} -inline void fl_get_positioner_xbounds(Fl_Widget* o, float* a, float* b) { - *a = float(((Fl_Positioner*)o)->xminimum()); - *b = float(((Fl_Positioner*)o)->xmaximum()); -} -inline void fl_set_positioner_yvalue(Fl_Widget* o, double v) { - ((Fl_Positioner*)o)->yvalue(v);} -inline double fl_get_positioner_yvalue(Fl_Widget* o) { - return ((Fl_Positioner*)o)->yvalue();} -inline void fl_set_positioner_ybounds(Fl_Widget* o, double a, double b) { - ((Fl_Positioner*)o)->ybounds(a,b);} -inline void fl_get_positioner_ybounds(Fl_Widget* o, float* a, float* b) { - *a = float(((Fl_Positioner*)o)->yminimum()); - *b = float(((Fl_Positioner*)o)->ymaximum()); -} -inline void fl_set_positioner_xstep(Fl_Widget* o, double v) { - ((Fl_Positioner*)o)->xstep(v);} -inline void fl_set_positioner_ystep(Fl_Widget* o, double v) { - ((Fl_Positioner*)o)->ystep(v);} -inline void fl_set_positioner_return(Fl_Widget* o, int v) { - ((Fl_Positioner*)o)->when(v|FL_WHEN_RELEASE);} - -#include <fltk/Fl_Slider.h> - -#define FL_HOR_BROWSER_SLIDER FL_HOR_SLIDER -#define FL_VERT_BROWSER_SLIDER FL_VERT_SLIDER - -forms_constructor(Fl_Slider, fl_add_slider) -#define FL_SLIDER_COL1 FL_GRAY -inline void fl_set_slider_value(Fl_Widget* o, double v) { - ((Fl_Slider*)o)->value(v);} -inline double fl_get_slider_value(Fl_Widget* o) { - return ((Fl_Slider*)o)->value();} -inline void fl_set_slider_bounds(Fl_Widget* o, double a, double b) { - ((Fl_Slider*)o)->range(a, b);} -inline void fl_get_slider_bounds(Fl_Widget* o, float* a, float* b) { - *a = float(((Fl_Slider*)o)->minimum()); - *b = float(((Fl_Slider*)o)->maximum()); -} -inline void fl_set_slider_return(Fl_Widget* o, int i) { - ((Fl_Slider*)o)->when(i|FL_WHEN_RELEASE);} -inline void fl_set_slider_step(Fl_Widget* o, double v) { - ((Fl_Slider*)o)->step(v);} -// inline void fl_set_slider_increment(Fl_Widget* o, double v, double); -inline void fl_set_slider_size(Fl_Widget* o, double v) { - ((Fl_Slider*)o)->slider_size(v);} - -#include <fltk/Fl_Value_Slider.h> -forms_constructor(Fl_Value_Slider, fl_add_valslider) - -inline void fl_set_slider_precision(Fl_Widget* o, int i) { - double v = 1.0; - while (i--) v /= 10.0; - ((Fl_Value_Slider*)o)->step(v); -} - -// The forms text object was the same as an Fl_Box except it inverted the -// meaning of FL_ALIGN_INSIDE. Implementation in forms.C -class FL_FORMS_API Fl_FormsText : public Fl_Widget { -protected: - void draw(); -public: - Fl_FormsText(Fl_Boxtype b, int x, int y, int w, int h, const char* l=0) - : Fl_Widget(x,y,w,h,l) {box(b); clear_flag(FL_ALIGN_MASK); set_flag(FL_ALIGN_LEFT);} -}; -#define FL_NORMAL_TEXT FL_NO_BOX -forms_constructorb(Fl_FormsText, fl_add_text) - -#include "Fl_Timer.h" -forms_constructort(Fl_Timer, fl_add_timer) -inline void fl_set_timer(Fl_Widget* o, double v) {((Fl_Timer*)o)->value(v);} -inline double fl_get_timer(Fl_Widget* o) {return ((Fl_Timer*)o)->value();} -inline void fl_suspend_timer(Fl_Widget* o) {((Fl_Timer*)o)->suspended(1);} -inline void fl_resume_timer(Fl_Widget* o) {((Fl_Timer*)o)->suspended(0);} -inline void fl_set_timer_countup(Fl_Widget* o,char d) {((Fl_Timer*)o)->direction(d);} -FL_FORMS_API void fl_gettime(long* sec, long* usec); - -// Fl_XYPlot nyi - - -// stuff from DDForms: - -inline int fl_double_click() {return Fl::event_clicks();} -inline void fl_draw() {Fl::flush();} - -#endif /* define __FORMS_H__ */ - -// -// End of "$Id: forms.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/gl.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/gl.h deleted file mode 100644 index 3b61935a..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/gl.h +++ /dev/null @@ -1,109 +0,0 @@ -// "$Id: gl.h 5880 2007-06-06 17:48:47Z spitzak $" -// Copyright 1998-2006 by Bill Spitzak and others. -// -// You must include this instead of GL/gl.h to get the Microsoft -// APIENTRY stuff included (from <windows.h>) prior to the OpenGL -// header files. -// -// This file also provides "missing" OpenGL functions, and -// gl_start() and gl_finish() to allow OpenGL to be used in any window -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -/*! \file - Portably include the OpenGL header files, and define a few OpenGL - drawing functions provided by fltk. You may want to use the - OpenGL Extension Wrangler (glew), which will make it much easier - to call modern OpenGL extensions. If so, include glew.h before - this file, or define USE_GLEW to 1 before including this. -*/ - -#ifndef gl_draw_H -#define gl_draw_H - -#ifndef DOXYGEN -#include "Color.h" -#include "Flags.h" - -#if USE_GLEW -# include <GL/glew.h> -#elif defined(__GLEW_H__) - /* do nothing if they included glew.h */ -#else - -# define GL_GLEXT_PROTOTYPES 1 -# ifdef _WIN32 -# include <windows.h> -# undef OPAQUE -# undef DELETE -# undef ERROR -# undef IN -# undef OUT -# undef POINT -# undef far -# undef max -# undef min -# undef near -# include <GL/gl.h> -# elif defined(__APPLE__) -# ifndef APIENTRY -# define APIENTRY -# endif -# include <OpenGL/gl.h> -# else -# include <GL/gl.h> -# endif - -# if !defined(GL_VERSION_1_4) || defined(DOXYGEN) -FL_GL_API void glWindowPos2i(int x, int y); -# endif - -#endif -#endif - -namespace fltk { - -struct Font; - -FL_GL_API void glstart(); -FL_GL_API void glfinish(); - -FL_GL_API void glsetcolor(Color); - -FL_GL_API void glstrokerect(int x,int y,int w,int h); -inline void glfillrect(int x,int y,int w,int h) {glRecti(x,y,x+w,y+h);} - -FL_GL_API void glsetfont(Font* f, float size); -FL_GL_API float glgetascent(); -FL_GL_API float glgetdescent(); -FL_GL_API float glgetwidth(const char *); -FL_GL_API float glgetwidth(const char *, int n); - -FL_GL_API void gldrawtext(const char*); -FL_GL_API void gldrawtext(const char*, int n); -FL_GL_API void gldrawtext(const char*, float x, float y, float z = 0); -FL_GL_API void gldrawtext(const char*, int n, float x, float y, float z = 0); - -FL_GL_API void gldrawimage(const uchar *, int x,int y,int w,int h, int d=3, int ld=0); - -} -#endif - -// -// End of "$Id: gl.h 5880 2007-06-06 17:48:47Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/gl2opengl.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/gl2opengl.h deleted file mode 100644 index 021827ae..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/gl2opengl.h +++ /dev/null @@ -1,35 +0,0 @@ -/* gl.h - - GL to OpenGL translator. - If you include this, you might be able to port old GL programs. - There are also much better emulators available on the net. - -*/ - -#include <fltk/gl.h> -#include "gl_draw.h" - -inline void clear() {glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);} -#define RGBcolor(r,g,b) glColor3ub(r,g,b) -#define bgnline() glBegin(GL_LINE_STRIP) -#define bgnpolygon() glBegin(GL_POLYGON) -#define bgnclosedline() glBegin(GL_LINE_LOOP) -#define endline() glEnd() -#define endpolygon() glEnd() -#define endclosedline() glEnd() -#define v2f(v) glVertex2fv(v) -#define v2s(v) glVertex2sv(v) -#define cmov(x,y,z) glRasterPos3f(x,y,z) -#define charstr(s) gl_draw(s) -#define fmprstr(s) gl_draw(s) -typedef float Matrix[4][4]; -inline void pushmatrix() {glPushMatrix();} -inline void popmatrix() {glPopMatrix();} -inline void multmatrix(Matrix m) {glMultMatrixf((float *)m);} -inline void color(int n) {glIndexi(n);} -inline void rect(int x,int y,int r,int t) {gl_rect(x,y,r-x,t-y);} -inline void rectf(int x,int y,int r,int t) {glRectf(x,y,r+1,t+1);} -inline void recti(int x,int y,int r,int t) {gl_rect(x,y,r-x,t-y);} -inline void rectfi(int x,int y,int r,int t) {glRecti(x,y,r+1,t+1);} -inline void rects(int x,int y,int r,int t) {gl_rect(x,y,r-x,t-y);} -inline void rectfs(int x,int y,int r,int t) {glRects(x,y,r+1,t+1);} diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/glut.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/glut.h deleted file mode 100644 index 89b14159..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/glut.h +++ /dev/null @@ -1,490 +0,0 @@ -// -// "$Id: glut.h 5389 2006-09-01 15:39:19Z spitzak $" -// -// GLUT emulation header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -// Emulation of GLUT using fltk. - -// GLUT is Copyright (c) Mark J. Kilgard, 1994, 1995, 1996: -// "This program is freely distributable without licensing fees and is -// provided without guarantee or warrantee expressed or implied. This -// program is -not- in the public domain." - -// Although I have copied the GLUT API, none of my code is based on -// any GLUT implementation details and is therefore covered by the LGPL. - -// FLTK does not include the GLUT drawing functions (such as -// glutWireTeapot()) or the stroke fonts but the declarations for the -// drawing functions are included here because otherwise there is no -// way to get them along with this. To use them you will have to -// link in the original GLUT library, put -lglut *after* -lfltk2. - -// Commented out lines indicate parts of GLUT that are not emulated. - -#ifndef __glut_h__ -# define __glut_h__ - -# include "gl.h" - -//////////////////////////////////////////////////////////////// -// GLUT is emulated using this window class and these static variables -// (plus several more static variables hidden in glut.C): - -# include <fltk/run.h> -# include <fltk/events.h> -# include <fltk/GlWindow.h> -# include <fltk/Cursor.h> -# include <fltk/visual.h> - -namespace fltk { - - class FL_GLUT_API GlutWindow : public fltk::GlWindow { - void _init(); - int mouse_down; - protected: - void draw(); - void draw_overlay(); - int handle(int); - public: // so the inline functions work - int number; - int menu[3]; - void make_current(); - void (*display)(); - void (*overlaydisplay)(); - void (*reshape)(int w, int h); - void (*keyboard)(uchar, int x, int y); - void (*mouse)(int b, int state, int x, int y); - void (*motion)(int x, int y); - void (*passivemotion)(int x, int y); - void (*entry)(int); - void (*visibility)(int); - void (*special)(int, int x, int y); - GlutWindow(int w, int h, const char *); - GlutWindow(int x, int y, int w, int h, const char *); - ~GlutWindow(); - }; -} - -extern FL_GLUT_API fltk::GlutWindow *glut_window; // the current window -extern FL_GLUT_API int glut_menu; // the current menu - -// function pointers that are not per-window: -extern FL_GLUT_API void (*glut_idle_function)(); -extern FL_GLUT_API void (*glut_menustate_function)(int); -extern FL_GLUT_API void (*glut_menustatus_function)(int,int,int); - -//////////////////////////////////////////////////////////////// - -//# define GLUT_API_VERSION This does not match any version of GLUT exactly... - -FL_GLUT_API void glutInit(int *argcp, char **argv); // creates first window - -FL_GLUT_API void glutInitDisplayMode(unsigned int mode); -enum { - GLUT_RGB = fltk::RGB_COLOR, - GLUT_RGBA = fltk::RGB_COLOR, - GLUT_INDEX = fltk::INDEXED_COLOR, - GLUT_SINGLE = fltk::SINGLE_BUFFER, - GLUT_DOUBLE = fltk::DOUBLE_BUFFER, - GLUT_ACCUM = fltk::ACCUM_BUFFER, - GLUT_ALPHA = fltk::ALPHA_BUFFER, - GLUT_DEPTH = fltk::DEPTH_BUFFER, - GLUT_STENCIL = fltk::STENCIL_BUFFER, - GLUT_MULTISAMPLE = fltk::MULTISAMPLE, - GLUT_STEREO = fltk::STEREO -//GLUT_LUMINANCE = 512 -}; - -FL_GLUT_API void glutInitWindowPosition(int x, int y); - -FL_GLUT_API void glutInitWindowSize(int w, int h); - -FL_GLUT_API void glutMainLoop(); - -FL_GLUT_API int glutCreateWindow(const char *title); - -FL_GLUT_API int glutCreateSubWindow(int win, int x, int y, int width, int height); - -FL_GLUT_API void glutDestroyWindow(int win); - -inline void glutPostRedisplay() {glut_window->redraw();} - -FL_GLUT_API void glutPostWindowRedisplay(int win); - -FL_GLUT_API void glutSwapBuffers(); - -inline int glutGetWindow() {return glut_window->number;} - -FL_GLUT_API void glutSetWindow(int win); - -inline void glutSetWindowTitle(const char *t) {glut_window->label(t);} - -inline void glutSetIconTitle(const char *t) {glut_window->iconlabel(t);} - -inline void glutPositionWindow(int x, int y) {glut_window->position(x,y);} - -inline void glutReshapeWindow(int w, int h) {glut_window->resize(w,h);} - -inline void glutPopWindow() {glut_window->show();} - -//inline void glutPushWindow(); - -inline void glutIconifyWindow() {glut_window->iconize();} - -inline void glutShowWindow() {glut_window->show();} - -inline void glutHideWindow() {glut_window->hide();} - -inline void glutFullScreen() {glut_window->fullscreen();} - -inline void glutSetCursor(fltk::Cursor* cursor) {glut_window->cursor(cursor);} -// notice that the numeric values are different than glut: - -//#define GLUT_CURSOR_RIGHT_ARROW -//#define GLUT_CURSOR_LEFT_ARROW -#define GLUT_CURSOR_INFO fltk::CURSOR_HAND -//#define GLUT_CURSOR_DESTROY -#define GLUT_CURSOR_HELP fltk::CURSOR_HELP -//#define GLUT_CURSOR_CYCLE -//#define GLUT_CURSOR_SPRAY -#define GLUT_CURSOR_WAIT fltk::CURSOR_WAIT -#define GLUT_CURSOR_TEXT fltk::CURSOR_INSERT -#define GLUT_CURSOR_CROSSHAIR fltk::CURSOR_CROSS -#define GLUT_CURSOR_UP_DOWN fltk::CURSOR_NS -#define GLUT_CURSOR_TOP_SIDE fltk::CURSOR_NS -#define GLUT_CURSOR_BOTTOM_SIDE fltk::CURSOR_NS -#define GLUT_CURSOR_LEFT_RIGHT fltk::CURSOR_WE -#define GLUT_CURSOR_LEFT_SIDE fltk::CURSOR_WE -#define GLUT_CURSOR_RIGHT_SIDE fltk::CURSOR_WE -#define GLUT_CURSOR_TOP_LEFT_CORNER fltk::CURSOR_NWSE -#define GLUT_CURSOR_TOP_RIGHT_CORNER fltk::CURSOR_NESW -#define GLUT_CURSOR_BOTTOM_RIGHT_CORNER fltk::CURSOR_NWSE -#define GLUT_CURSOR_BOTTOM_LEFT_CORNER fltk::CURSOR_NESW -#define GLUT_CURSOR_INHERIT fltk::CURSOR_DEFAULT -#define GLUT_CURSOR_NONE fltk::CURSOR_NONE -#define GLUT_CURSOR_FULL_CROSSHAIR fltk::CURSOR_CROSS -//inline void glutWarpPointer(int x, int y); - -inline void glutEstablishOverlay() {glut_window->make_overlay_current();} - -inline void glutRemoveOverlay() {glut_window->hide_overlay();} - -inline void glutUseLayer(GLenum layer) { - layer ? glut_window->make_overlay_current() : glut_window->make_current();} -enum {GLUT_NORMAL, GLUT_OVERLAY}; - -inline void glutPostOverlayRedisplay() {glut_window->redraw_overlay();} - -inline void glutShowOverlay() {glut_window->redraw_overlay();} - -inline void glutHideOverlay() {glut_window->hide_overlay();} - -FL_GLUT_API int glutCreateMenu(void (*)(int)); - -FL_GLUT_API void glutDestroyMenu(int menu); - -inline int glutGetMenu() {return glut_menu;} - -inline void glutSetMenu(int m) {glut_menu = m;} - -FL_GLUT_API void glutAddMenuEntry(const char *label, int value); - -FL_GLUT_API void glutAddSubMenu(const char *label, int submenu); - -FL_GLUT_API void glutChangeToMenuEntry(int item, const char *label, int value); - -FL_GLUT_API void glutChangeToSubMenu(int item, const char *label, int submenu); - -FL_GLUT_API void glutRemoveMenuItem(int item); - -inline void glutAttachMenu(int b) {glut_window->menu[b] = glut_menu;} - -inline void glutDetachMenu(int b) {glut_window->menu[b] = 0;} - -inline void glutDisplayFunc(void (*f)()) {glut_window->display = f;} - -inline void glutReshapeFunc(void (*f)(int w, int h)) {glut_window->reshape=f;} - -inline void glutKeyboardFunc(void (*f)(uchar key, int x, int y)) { - glut_window->keyboard = f;} - -inline void glutMouseFunc(void (*f)(int b, int state, int x, int y)) { - glut_window->mouse = f;} -enum { - GLUT_LEFT_BUTTON = 0, - GLUT_MIDDLE_BUTTON = 1, - GLUT_RIGHT_BUTTON = 2, - GLUT_DOWN = 0, - GLUT_UP = 1 -}; - -inline void glutMotionFunc(void (*f)(int x, int y)) {glut_window->motion= f;} - -inline void glutPassiveMotionFunc(void (*f)(int x, int y)) { - glut_window->passivemotion= f;} - -inline void glutEntryFunc(void (*f)(int s)) {glut_window->entry = f;} -enum {GLUT_LEFT, GLUT_ENTERED}; - -inline void glutVisibilityFunc(void (*f)(int s)) {glut_window->visibility=f;} -enum {GLUT_NOT_VISIBLE, GLUT_VISIBLE}; - -inline void glutIdleFunc(void (*f)()) {fltk::set_idle(f);} - -// Warning: this cast may not work on all machines: -inline void glutTimerFunc(unsigned int msec, void (*f)(int), int value) { - fltk::add_timeout(msec*.001f, (fltk::TimeoutHandler)f, (void *)value); -} - -inline void glutMenuStateFunc(void (*f)(int state)) { - glut_menustate_function = f;} - -inline void glutMenuStatusFunc(void (*f)(int status, int x, int y)) { - glut_menustatus_function = f;} -enum {GLUT_MENU_NOT_IN_USE, GLUT_MENU_IN_USE}; - -inline void glutSpecialFunc(void (*f)(int key, int x, int y)) { - glut_window->special = f;} -enum { - GLUT_KEY_F1 = 1, - GLUT_KEY_F2 = 2, - GLUT_KEY_F3 = 3, - GLUT_KEY_F4 = 4, - GLUT_KEY_F5 = 5, - GLUT_KEY_F6 = 6, - GLUT_KEY_F7 = 7, - GLUT_KEY_F8 = 8, - GLUT_KEY_F9 = 9, - GLUT_KEY_F10 = 10, - GLUT_KEY_F11 = 11, - GLUT_KEY_F12 = 12, -// WARNING: Different values than Glut uses: - GLUT_KEY_LEFT = fltk::LeftKey, - GLUT_KEY_UP = fltk::UpKey, - GLUT_KEY_RIGHT = fltk::RightKey, - GLUT_KEY_DOWN = fltk::DownKey, - GLUT_KEY_PAGE_UP = fltk::PageUpKey, - GLUT_KEY_PAGE_DOWN = fltk::PageDownKey, - GLUT_KEY_HOME = fltk::HomeKey, - GLUT_KEY_END = fltk::EndKey, - GLUT_KEY_INSERT = fltk::InsertKey -}; -//inline void glutSpaceballMotionFunc(void (*)(int x, int y, int z)); - -//inline void glutSpaceballRotateFunc(void (*)(int x, int y, int z)); - -//inline void glutSpaceballButtonFunc(void (*)(int button, int state)); - -//inline void glutButtonBoxFunc(void (*)(int button, int state)); - -//inline void glutDialsFunc(void (*)(int dial, int value)); - -//inline void glutTabletMotionFunc(void (*)(int x, int y)); - -//inline void glutTabletButtonFunc(void (*)(int button, int state, int x, int y)); - -inline void glutOverlayDisplayFunc(void (*f)()) { - glut_window->overlaydisplay = f;} - -//inline void glutWindowStatusFunc(void (*)(int state)); -//enum {GLUT_HIDDEN, GLUT_FULLY_RETAINED, GLUT_PARTIALLY_RETAINED, -// GLUT_FULLY_COVERED}; - -//inline void glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue); - -//inline GLfloat glutGetColor(int ndx, int component); -//#define GLUT_RED 0 -//#define GLUT_GREEN 1 -//#define GLUT_BLUE 2 - -//inline void glutCopyColormap(int win); - -// Warning: values are changed from GLUT! -// Also relies on the GL_ symbols having values greater than 100 -int glutGet(GLenum type); -enum { - GLUT_RETURN_ZERO = 0, - GLUT_WINDOW_X, - GLUT_WINDOW_Y, - GLUT_WINDOW_WIDTH, - GLUT_WINDOW_HEIGHT, - GLUT_WINDOW_PARENT, -//GLUT_WINDOW_NUM_CHILDREN, -//GLUT_WINDOW_CURSOR, - GLUT_SCREEN_WIDTH, - GLUT_SCREEN_HEIGHT, -//GLUT_SCREEN_WIDTH_MM, -//GLUT_SCREEN_HEIGHT_MM, - GLUT_MENU_NUM_ITEMS, - GLUT_DISPLAY_MODE_POSSIBLE, - GLUT_INIT_WINDOW_X, - GLUT_INIT_WINDOW_Y, - GLUT_INIT_WINDOW_WIDTH, - GLUT_INIT_WINDOW_HEIGHT, - GLUT_INIT_DISPLAY_MODE, -//GLUT_ELAPSED_TIME, - GLUT_WINDOW_BUFFER_SIZE -}; - -# define GLUT_WINDOW_STENCIL_SIZE GL_STENCIL_BITS -# define GLUT_WINDOW_DEPTH_SIZE GL_DEPTH_BITS -# define GLUT_WINDOW_RED_SIZE GL_RED_BITS -# define GLUT_WINDOW_GREEN_SIZE GL_GREEN_BITS -# define GLUT_WINDOW_BLUE_SIZE GL_BLUE_BITS -# define GLUT_WINDOW_ALPHA_SIZE GL_ALPHA_BITS -# define GLUT_WINDOW_ACCUM_RED_SIZE GL_ACCUM_RED_BITS -# define GLUT_WINDOW_ACCUM_GREEN_SIZE GL_ACCUM_GREEN_BITS -# define GLUT_WINDOW_ACCUM_BLUE_SIZE GL_ACCUM_BLUE_BITS -# define GLUT_WINDOW_ACCUM_ALPHA_SIZE GL_ACCUM_ALPHA_BITS -# define GLUT_WINDOW_DOUBLEBUFFER GL_DOUBLEBUFFER -# define GLUT_WINDOW_RGBA GL_RGBA -# define GLUT_WINDOW_COLORMAP_SIZE GL_INDEX_BITS -# ifdef GL_SAMPLES_SGIS -# define GLUT_WINDOW_NUM_SAMPLES GL_SAMPLES_SGIS -# else -# define GLUT_WINDOW_NUM_SAMPLES GLUT_RETURN_ZERO -# endif -# define GLUT_WINDOW_STEREO GL_STEREO - -//int glutDeviceGet(GLenum type); -//#define GLUT_HAS_KEYBOARD 600 -//#define GLUT_HAS_MOUSE 601 -//#define GLUT_HAS_SPACEBALL 602 -//#define GLUT_HAS_DIAL_AND_BUTTON_BOX 603 -//#define GLUT_HAS_TABLET 604 -//#define GLUT_NUM_MOUSE_BUTTONS 605 -//#define GLUT_NUM_SPACEBALL_BUTTONS 606 -//#define GLUT_NUM_BUTTON_BOX_BUTTONS 607 -//#define GLUT_NUM_DIALS 608 -//#define GLUT_NUM_TABLET_BUTTONS 609 - -// WARNING: these values are different than Glut uses: -enum { - GLUT_ACTIVE_SHIFT = fltk::SHIFT, - GLUT_ACTIVE_CTRL = fltk::CTRL, - GLUT_ACTIVE_ALT = fltk::ALT -}; -inline int glutGetModifiers() {return fltk::event_state() & (GLUT_ACTIVE_SHIFT | GLUT_ACTIVE_CTRL | GLUT_ACTIVE_ALT);} - -int glutLayerGet(GLenum); -# define GLUT_OVERLAY_POSSIBLE 800 -//#define GLUT_LAYER_IN_USE 801 -//#define GLUT_HAS_OVERLAY 802 -# define GLUT_TRANSPARENT_INDEX 803 -# define GLUT_NORMAL_DAMAGED 804 -# define GLUT_OVERLAY_DAMAGED 805 - -//inline int glutVideoResizeGet(GLenum param); -//#define GLUT_VIDEO_RESIZE_POSSIBLE 900 -//#define GLUT_VIDEO_RESIZE_IN_USE 901 -//#define GLUT_VIDEO_RESIZE_X_DELTA 902 -//#define GLUT_VIDEO_RESIZE_Y_DELTA 903 -//#define GLUT_VIDEO_RESIZE_WIDTH_DELTA 904 -//#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA 905 -//#define GLUT_VIDEO_RESIZE_X 906 -//#define GLUT_VIDEO_RESIZE_Y 907 -//#define GLUT_VIDEO_RESIZE_WIDTH 908 -//#define GLUT_VIDEO_RESIZE_HEIGHT 909 - -//inline void glutSetupVideoResizing(); - -//inline void glutStopVideoResizing(); - -//inline void glutVideoResize(int x, int y, int width, int height); - -//inline void glutVideoPan(int x, int y, int width, int height); - -//////////////////////////////////////////////////////////////// -// Emulated GLUT drawing functions: - -// Font argument must be a void* for compatability, so... -extern FL_GLUT_API struct Glut_Bitmap_Font {fltk::Font* font; int size;} - glutBitmap9By15, glutBitmap8By13, glutBitmapTimesRoman10, - glutBitmapTimesRoman24, glutBitmapHelvetica10, glutBitmapHelvetica12, - glutBitmapHelvetica18; -# define GLUT_BITMAP_9_BY_15 (&glutBitmap9By15) -# define GLUT_BITMAP_8_BY_13 (&glutBitmap8By13) -# define GLUT_BITMAP_TIMES_ROMAN_10 (&glutBitmapTimesRoman10) -# define GLUT_BITMAP_TIMES_ROMAN_24 (&glutBitmapTimesRoman24) -# define GLUT_BITMAP_HELVETICA_10 (&glutBitmapHelvetica10) -# define GLUT_BITMAP_HELVETICA_12 (&glutBitmapHelvetica12) -# define GLUT_BITMAP_HELVETICA_18 (&glutBitmapHelvetica18) - -FL_GLUT_API void glutBitmapCharacter(void *font, int character); -FL_GLUT_API int glutBitmapWidth(void *font, int character); -FL_GLUT_API int glutBitmapLength(void *font, const unsigned char* string); - -//////////////////////////////////////////////////////////////// -// GLUT drawing functions. These are NOT emulated but you can -// link in the glut library to get them. This assumes the object -// files in GLUT remain as they currently are so that there are -// not symbol conflicts with the above. - -extern "C" { - -extern int APIENTRY glutExtensionSupported(char *name); - -/* Stroke font constants (use these in GLUT program). */ -# ifdef WIN32 -# define GLUT_STROKE_ROMAN ((void*)0) -# define GLUT_STROKE_MONO_ROMAN ((void*)1) -# else -extern void *glutStrokeRoman; -# define GLUT_STROKE_ROMAN (&glutStrokeRoman) -extern void *glutStrokeMonoRoman; -# define GLUT_STROKE_MONO_ROMAN (&glutStrokeMonoRoman) -# endif - -/* GLUT font sub-API */ -extern void APIENTRY glutStrokeCharacter(void *font, int character); -extern int APIENTRY glutStrokeWidth(void *font, int character); - -/* GLUT pre-built models sub-API */ -extern void APIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks); -extern void APIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks); -extern void APIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); -extern void APIENTRY glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); -extern void APIENTRY glutWireCube(GLdouble size); -extern void APIENTRY glutSolidCube(GLdouble size); -extern void APIENTRY glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); -extern void APIENTRY glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); -extern void APIENTRY glutWireDodecahedron(); -extern void APIENTRY glutSolidDodecahedron(); -extern void APIENTRY glutWireTeapot(GLdouble size); -extern void APIENTRY glutSolidTeapot(GLdouble size); -extern void APIENTRY glutWireOctahedron(); -extern void APIENTRY glutSolidOctahedron(); -extern void APIENTRY glutWireTetrahedron(); -extern void APIENTRY glutSolidTetrahedron(); -extern void APIENTRY glutWireIcosahedron(); -extern void APIENTRY glutSolidIcosahedron(); - -} - -#endif /* !__glut_h__ */ - -// -// End of "$Id: glut.h 5389 2006-09-01 15:39:19Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/layout.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/layout.h deleted file mode 100644 index a144a276..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/layout.h +++ /dev/null @@ -1,42 +0,0 @@ -/*! \file - Values of the bits stored in Widget::layout_damage(). - - When a widget resized or moved (or when it is initially created), - flags are set in Widget::layout_damage() to indicate the layout is - damaged. This will cause the virtual function Widget::layout() to be - called just before fltk attempts to draw the windows on the screen. - This is useful because often calculating the new layout is quite - expensive, this expense is now deferred until the user will actually - see the new size. - - Some Group widgets such as fltk::PackedGroup will also use the - virtual Widget::layout() function to find out how big a widget - should be. A Widget is allowed to change it's own dimensions in - layout() (except it is not allowed to change it if called a second - time with no changes other than it's x/y position). This allows - widgets to resize to fit their contents. - - The layout bits are turned on by calling Widget::relayout(). -*/ - -#ifndef fltk_layout_h -#define fltk_layout_h - -namespace fltk { - -enum { - LAYOUT_X = 0x01, /*!< Widget::x() changed by resize() */ - LAYOUT_Y = 0x02, /*!< Widget::y() changed by resize() */ - LAYOUT_XY = 0x03, /*!< Same as LAYOUT_X|LAYOUT_Y */ - LAYOUT_W = 0x04, /*!< Widget::w() changed by resize() */ - LAYOUT_H = 0x08, /*!< Widget::h() changed by resize() */ - LAYOUT_WH = 0x0C, /*!< Same as LAYOUT_W|LAYOUT_H */ - LAYOUT_XYWH = 0x0F, /*!< Same as LAYOUT_XY|LAYOUT_WH */ - LAYOUT_CHILD = 0x10, /*!< Widget::layout() needs to be called on a child of this group widget. */ - LAYOUT_USER = 0x20, /*!< The moving/resizing is being caused by the user and not internal code. */ - LAYOUT_DAMAGE = 0x80 /*!< Widget::relayout() was called. */ -}; - -} - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/load_plugin.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/load_plugin.h deleted file mode 100644 index fe234b17..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/load_plugin.h +++ /dev/null @@ -1,14 +0,0 @@ -/*! \file - This is a convienence function for portable loading of a plugin - and possibly returing a symbol in that plugin. The function is - \e not in the fltk namespace! -*/ - -#ifndef fl_load_plugin_h -#define fl_load_plugin_h - -#include "FL_API.h" - -FL_API void* load_plugin(const char* name, const char* symbol); - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/mac.r b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/mac.r deleted file mode 100644 index 7501143d..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/mac.r +++ /dev/null @@ -1,13 +0,0 @@ -data 'MBAR' (128) { - $"0001 0080" /* ...x */ -}; - -data 'MENU' (128, "Apple") { - $"0080 0000 0000 0000 0000 FFFF FFFB 0114" /* .x........xxxx.. */ - $"0A41 626F 7574 2046 4C54 4B00 0000 0001" /* xAbout FLTK..... */ - $"2D00 0000 0000" /* -..... */ -}; - -data 'carb' (0) { -}; - diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/math.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/math.h deleted file mode 100644 index ae56143c..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/math.h +++ /dev/null @@ -1,92 +0,0 @@ -// -// "$Id: math.h 4886 2006-03-30 09:55:32Z fabien $" -// -// The purpose of this header file is to make math.h look the same as -// Unix on other operating systems. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fl_math_h -#define fl_math_h - -#include <math.h> - -#if defined(_WIN32) && !defined(__CYGWIN__) -/* things missing from <math.h> on Windows: */ -# include <float.h> - -# ifndef M_PI -# define M_PI 3.14159265358979323846 -# define M_PI_2 1.57079632679489661923 -# define M_PI_4 0.78539816339744830962 -# define M_1_PI 0.31830988618379067154 -# define M_2_PI 0.63661977236758134308 -# define M_SQRT2 1.41421356237309504880 -# define M_SQRT1_2 0.70710678118654752440 -# endif - -# define rint(v) floor((v)+.5) -# define copysign _copysign -# define drand48() ((double)rand()/RAND_MAX) -# define srand48(n) srand((n)); - -#endif - -#ifdef __EMX__ -# include <float.h> -#endif - -// define missing 'f' versions of functions: -#if 1 // All systems seem to be missing rintf: -# define rintf(v) floorf((v)+.5f) -#endif -#if defined(__APPLE__) || defined(__sun__) || defined(__BORLANDC__) -# define floorf(a) ((float)floor(a)) -# define ceilf(a) ((float)ceil(a)) -# define fmodf(a,b) ((float)fmod(a,b)) -# undef fabsf -# define fabsf(a) ((float)fabs(a)) -# define sinf(a) ((float)sin(a)) -# define cosf(a) ((float)cos(a)) -# define tanf(a) ((float)tan(a)) -# define asinf(a) ((float)asin(a)) -# define acosf(a) ((float)acos(a)) -# define atanf(a) ((float)atan(a)) -# define atan2f(a,b) ((float)atan2(a,b)) -# define expf(a) ((float)exp(a)) -# define logf(a) ((float)log(a)) -# define log10f(a) ((float)log10(a)) -# undef sqrtf -# define sqrtf(a) ((float)sqrt(a)) -#endif -#ifdef __alpha // powf is broken on alphas, at least in gcc -# define powf(a,b) ((float)pow(a,b)) -#endif -#ifdef _WIN32 -# define expm1f(a) ((float)expm1(a)) -# define log1pf(a) ((float)log1p(a)) -#endif - -#endif - -// -// End of "$Id: math.h 4886 2006-03-30 09:55:32Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/osx.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/osx.h deleted file mode 100644 index 94e4310c..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/osx.h +++ /dev/null @@ -1,143 +0,0 @@ -// "$Id: osx.h 5578 2007-01-03 04:06:26Z spitzak $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -/** \file - -Declarations of FLTK symbols and interfaces that only exist if FLTK is -compiled on Windows. It is recommended you avoid using this header -file, and that you segregate code requiring it to it's own source -file. - -FLTK is currently using the Carbon interface, and this includes -the <Carbon/Carbon.h> header file. A macro is used to rename the -Carbon "Style" as "XStyle" to avoid conflicts with FLTK. (all -drawing is using Quartz, however!) - -Many of the functions have the same name and purpose as ones defined -in x11.h, just with different return types. Due to how Doxygen works, -the X version of these is described here. -*/ - -#ifndef fltk_osx_h -#define fltk_osx_h - -# ifndef DOXYGEN -// Standard MacOS Carbon API includes... -# define Style XStyle -# include <Carbon/Carbon.h> -# undef Style - -// Now make some fixes to the headers... -# undef check // Dunno where this comes from... -# endif - -# include "draw.h" - -//////////////////////////////////////////////////////////////// -// Emulate X somewhat: - -namespace fltk { - -//////////////////////////////////////////////////////////////// -// constant information about the display: - -//extern FL_API void *qdisplay; -extern FL_API void open_display(); -extern FL_API void close_display(); -extern FL_API WindowPtr quartz_window; -extern FL_API CGContextRef quartz_gc; -extern FL_API Handle system_menu; -extern FL_API class SystemMenuBar *system_menu_bar; - -//////////////////////////////////////////////////////////////// -// event handling: - -// we want some way to access last message from system - -// Register a function to call when user opens a file in finder: -extern void open_callback(void (*cb)(const char* name)); - -//////////////////////////////////////////////////////////////// -// drawing functions: - -extern FL_API void clip_region(RgnHandle); -extern FL_API RgnHandle clip_region(); -extern FL_API void draw_into(CGContextRef xid, int w, int h); -extern FL_API void stop_drawing(CGImageRef xid); -# define HFONT const char* // points at name of font! -extern FL_API HFONT xfont(); - -extern FL_API void clear_quartz_clipping(); -extern FL_API void begin_quartz_image(CGRect&, const Rectangle&); -extern FL_API void end_quartz_image(); - -//////////////////////////////////////////////////////////////// -# ifdef fltk_Window_h // only include this if <fltk/Window.h> was included - -// When fltk tells X about a window, one of these objects is created. -// Warning: this object is highly subject to change! It's definition -// is only here so that fltk::xid(Window) can be declared inline: - -class FL_API CreatedWindow { -public: - WindowPtr xid; // used by main windows - Window* window; - RgnHandle region; // damage region - void expose(const Rectangle&); - CreatedWindow* next; - RgnHandle subRegion; // region which clips out children - CreatedWindow *children, *brother; - bool wait_for_expose; - bool need_new_subRegion; - bool overlay; - static CreatedWindow* first; - static CreatedWindow* find(const Window* window) {return window->i;} - static int borders(const Window* w, int& dx, int& dy, int& dw, int& dh); - // Quartz additions: - CGContextRef gc; -}; - -extern FL_API void fill_quartz_context(); -extern FL_API void release_quartz_context(CreatedWindow *x=0); - -// convert xid <-> Window: -//inline WindowPtr xid(const Window*w) {return CreatedWindow::find(w)->xid;} -WindowPtr xid(const Window*); -Window* find(WindowPtr xid); - -extern CursPtr default_cursor; -extern CursPtr current_cursor; -extern const Widget* cursor_for; - -# endif //Fl_Window_H - -} - -# if USE_CAIRO -# include <fltk/fltk_cairo.h> -# include <cairo-quartz.h> -# else - typedef struct _cairo cairo_t; -# endif - -#endif - -// End of "$Id: osx.h 5578 2007-01-03 04:06:26Z spitzak $". diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/pnmImage.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/pnmImage.h deleted file mode 100644 index f151c7b9..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/pnmImage.h +++ /dev/null @@ -1,45 +0,0 @@ -// "$Id: pnmImage.h 4288 2005-04-16 00:13:17Z mike $" -// -// PNM image header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2005 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// - -#ifndef fltk_pnm_Image_h -#define fltk_pnm_Image_h - -#include "SharedImage.h" - -namespace fltk { - -class FL_IMAGES_API pnmImage : public SharedImage { -public: - pnmImage(const char* filename); - // virtual function overrides - bool fetch(); -}; - -} - -#endif - -// End of "$Id: pnmImage.h 4288 2005-04-16 00:13:17Z mike $". diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/rgbImage.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/rgbImage.h deleted file mode 100644 index 88cde8b4..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/rgbImage.h +++ /dev/null @@ -1,50 +0,0 @@ -// -// "$Id: rgbImage.h 5568 2006-12-30 07:54:24Z spitzak $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -// This is an obsolete class from fltk2 development. All functionality -// has been moved to the base Image class. - -#ifndef fltk_rgbImage_h -#define fltk_rgbImage_h - -#include "Image.h" - -namespace fltk { - -class FL_API rgbImage : public Image { -public: - //bool write_jpeg(const char *filename, int quality=75, int dpi=150); - rgbImage(const char* name=0) : Image(name) {} - rgbImage(const uchar* d, PixelType p, int W, int H) : - Image(d,p,W,H,fltk::depth(p)*W) {} - rgbImage(const uchar* d, PixelType p, int W, int H, int linedelta) : - Image(d,p,W,H,linedelta) {} -}; - -} - -#endif - -// -// End of "$Id: rgbImage.h 5568 2006-12-30 07:54:24Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/run.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/run.h deleted file mode 100644 index 74929488..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/run.h +++ /dev/null @@ -1,90 +0,0 @@ -// "$Id: run.h 5916 2007-06-19 17:50:14Z spitzak $" -// -/*! \file - The basic fltk runtime. Every program needs to call this somewhere. -*/ -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -#ifndef fltk_run_h -#define fltk_run_h - -#include "FL_API.h" -#ifdef check -# undef check -#endif - -namespace fltk { - -FL_API void display(const char*); -FL_API int arg(int, char**, int&); -FL_API int args(int, char**, int&, int (*)(int,char**,int&) = 0); -extern FL_API const char* const help; -FL_API void args(int, char**); -FL_API bool enable_tablet_events(); - -FL_API int wait(); -FL_API int wait(float time); -FL_API int check(); -FL_API int ready(); -FL_API int run(); -FL_API void flush(); -FL_API void redraw(); -extern FL_API int damage_; -inline void damage(int d) {damage_ = d;} -inline int damage() {return damage_;} - -/*! Type of function passed to add_timeout(), add_check(), and add_idle() */ -typedef void (*TimeoutHandler)(void*); - -FL_API double get_time_secs(); - -FL_API void add_timeout(float t, TimeoutHandler, void* v = 0); -FL_API void repeat_timeout(float t, TimeoutHandler,void* = 0); -FL_API bool has_timeout(TimeoutHandler, void* = 0); -FL_API void remove_timeout(TimeoutHandler, void* = 0); - -FL_API void add_check(TimeoutHandler, void* = 0); -FL_API bool has_check(TimeoutHandler, void* = 0); -FL_API void remove_check(TimeoutHandler, void* = 0); - -FL_API void add_idle(TimeoutHandler, void* = 0); -FL_API bool has_idle(TimeoutHandler, void* = 0); -FL_API void remove_idle(TimeoutHandler, void* = 0); - -// For back-compatability only: -extern FL_API void (*idle)(); -inline void set_idle(void (*cb)()) {idle = cb;} - -/*! Type of function passed to add_fd() */ -typedef void (*FileHandler)(int fd, void*); -enum {READ = 1, WRITE = 4, EXCEPT = 8}; -FL_API void add_fd(int fd, int when, FileHandler, void* =0); -FL_API void add_fd(int fd, FileHandler, void* = 0); -FL_API void remove_fd(int, int when = -1); - -FL_API void lock(); -FL_API void unlock(); -FL_API void awake(void* message = 0); -FL_API void* thread_message(); -FL_API bool in_main_thread(); - -} - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/show_colormap.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/show_colormap.h deleted file mode 100644 index 693b255a..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/show_colormap.h +++ /dev/null @@ -1,40 +0,0 @@ -// "$Id: show_colormap.h 5197 2006-06-14 07:43:46Z spitzak $" -/*! \file -Pretty much obsolete popup color chooser that lets you pick one -of the 256 indexed colors in fltk. -*/ -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_show_colormap_h -#define fltk_show_colormap_h - -#include "FL_API.h" -#include "Color.h" - -namespace fltk { -FL_API Color show_colormap(Color oldcol); -} - -#endif - -// -// End of "$Id: show_colormap.h 5197 2006-06-14 07:43:46Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/string.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/string.h deleted file mode 100644 index 84e283a2..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/string.h +++ /dev/null @@ -1,89 +0,0 @@ -/* "$Id: string.h 5961 2007-10-17 20:54:58Z spitzak $" - * - * Copyright 1998-2006 by Bill Spitzak and others. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Please report all bugs and problems to "fltk-bugs@fltk.org". - */ - -/*! \file - - Provides definitions for C string manipulation functions so that - portable programs may be written. None of these functions are in - the fltk namespace. - - In most cases the functions are provided by your operation system, - or are simple renames of operating system functions. - - This file is designed to work on Windows, Linux, and BSD systems. - It may need to be edited to work on other systems. Please try - to do this by adding #if statements so this file remains portable. - - Some versions of fltk wrote this file using autoconf. I never liked - this because I could not share the header file between systems, so - I have reverted to a constant version. -*/ - -#ifndef fltk_string_h -#define fltk_string_h - -#ifndef DOXYGEN - -# include <string.h> -# include <stdarg.h> /* for va_list */ -# include <stdio.h> /* for sprintf, vsprintf, snprintf and vsnprintf */ - -/* Windows has equivalent functions, but being Microsoft they added - gratuitoius changes to the names to stop code from being portable: */ -#if (defined(_WIN32) && !defined(__CYGWIN__)) || defined(__EMX__) -# define strcasecmp(s,t) _stricmp(s, t) -# define strncasecmp(s,t,n) _strnicmp(s, t, n) -# define vsnprintf _vsnprintf -# define snprintf _snprintf -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#endif - -#include "FL_API.h" - -FL_API extern char* newstring(const char *); - -#if defined(DOXYGEN) || defined(__MWERKS__) -FL_API extern int strcasecmp(const char *, const char *); -FL_API extern int strncasecmp(const char *, const char *, size_t); -#endif - -#if defined(DOXYGEN) || !defined(__linux) && !defined(_WIN32) && !defined(__FreeBSD__) && !defined(__APPLE__) -FL_API extern int snprintf(char *, size_t, const char *, ...); -FL_API extern int vsnprintf(char *, size_t, const char *, va_list ap); -#endif - -#if defined(DOXYGEN) || !defined(__FreeBSD__) && !defined(__APPLE__) -FL_API extern size_t strlcat(char *, const char *, size_t); -FL_API extern size_t strlcpy(char *, const char *, size_t); -#endif - -#ifdef __cplusplus -} -#endif - -#endif - -/* - * End of "$Id: string.h 5961 2007-10-17 20:54:58Z spitzak $". - */ diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/utf.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/utf.h deleted file mode 100644 index 05509cde..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/utf.h +++ /dev/null @@ -1,54 +0,0 @@ -/* "$Id: utf.h 5197 2006-06-14 07:43:46Z spitzak $" - * - * Copyright 1998-2006 by Bill Spitzak and others. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Please report all bugs and problems to "fltk-bugs@fltk.org". - */ -/*! \file - Functions to manipulate UTF-8 strings and convert from/to legacy - encodings. These functions are \e not in the fltk namespace. -*/ - -#ifndef fltk_utf_h -#define fltk_utf_h - -#include "FL_API.h" -#include <stdlib.h> - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -FL_API int utf8bytes(unsigned ucs); - -FL_API unsigned utf8decode(const char*, const char* end, int* len); -FL_API int utf8encode(unsigned, char*); -FL_API const char* utf8fwd(const char*, const char* start, const char* end); -FL_API const char* utf8back(const char*, const char* start, const char* end); - -FL_API unsigned utf8towc(const char*, unsigned, wchar_t*, unsigned); -FL_API unsigned utf8tomb(const char*, unsigned, char*, unsigned); -FL_API unsigned utf8toa (const char*, unsigned, char*, unsigned); -FL_API unsigned utf8fromwc(char*, unsigned, const wchar_t*, unsigned); -FL_API unsigned utf8frommb(char*, unsigned, const char*, unsigned); -FL_API unsigned utf8froma (char*, unsigned, const char*, unsigned); -FL_API int utf8locale(); -FL_API int utf8test(const char*, unsigned); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/visual.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/visual.h deleted file mode 100644 index 2ce1fa96..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/visual.h +++ /dev/null @@ -1,53 +0,0 @@ -// "$Id: visual.h 5230 2006-06-23 22:31:13Z spitzak $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -/*! \file */ - -#ifndef fltk_visual_h -#define fltk_visual_h - -#include "FL_API.h" - -namespace fltk { - -enum { - RGB_COLOR = 0, - INDEXED_COLOR = 1, - SINGLE_BUFFER = 0, - DOUBLE_BUFFER = 2, - ACCUM_BUFFER = 4, - ALPHA_BUFFER = 8, - DEPTH_BUFFER = 16, - STENCIL_BUFFER= 32, - RGB24_COLOR = 64, - MULTISAMPLE = 128, - STEREO = 256 -}; - -extern FL_API bool visual(int); - -extern FL_GL_API bool glVisual(int); - -extern FL_API void own_colormap(); - -} - -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/win32.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/win32.h deleted file mode 100644 index e9e331ee..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/win32.h +++ /dev/null @@ -1,190 +0,0 @@ -// "$Id: win32.h 5583 2007-01-06 21:26:09Z fabien $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -/** \file - -Declarations of FLTK symbols and interfaces that only exist if FLTK is -compiled on Windows. It is recommended you avoid using this header -file, and that you segregate code requiring it to it's own source -file. - -This header includes the horrible <windows.h> header file, followed -by a large list of undef's to get rid of name conflicts. It is recommended -you use this if you need any windows functions rather than including -that file directly. - -You can probably combine FLTK with other libraries that make their own -WIN32 window classes. The easiest way is to call fltk::wait(), it -will call DispatchMessage() for all messages to the other windows. If -your other library insists on reading all the events, it will still -work (as long as it calls DispatchMessage()), but you will -have to arrange for the function fltk::flush() to be called regularily -so that widgets are updated. Timeouts, the idle function, and file -descriptor callbacks will not work in this case. - -Many of the functions have the same name and purpose as ones defined -in x11.h, just with different return types. Due to how Doxygen works, -the X version of these is described here. -*/ - -#if defined(_MSC_VER) -# pragma once /* speeds up compilation */ -#endif - -#ifndef fltk_win32_h -#define fltk_win32_h - -#ifndef DOXYGEN - -#ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -#endif - -# include <windows.h> -# include <winuser.h> -# undef DELETE -# undef ERROR -# undef IN -# undef OPAQUE -# undef OUT -# undef POINT -//#undef far -# undef max -# undef min -//#undef near - -#if USE_CAIRO -# include <fltk/fltk_cairo.h> -# include <cairo-win32.h> -#endif - -extern "C" { - -// Function pointer declarations -// WAS: I suspect these can be put into win32/run.cxx! - -typedef HWND (WINAPI *pfCreateWindowExW)(DWORD dwExStyle, LPCWSTR lpClassName, LPCWSTR lpWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam); -typedef HMODULE (WINAPI *pfLoadLibraryW)(LPCWSTR lpFileName); -typedef BOOL (WINAPI *pfPeekMessage)(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg); -typedef BOOL (WINAPI *pfGetMessage)(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax); -typedef LRESULT (WINAPI *pfDispatchMessage)(const MSG *lpmsg); -typedef BOOL (WINAPI *pfSetWindowTextW)(HWND hWnd, LPCWSTR lpString); -typedef LRESULT (WINAPI *pfDefWindowProc)(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); -typedef BOOL (WINAPI *pfPostMessage)(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); -typedef int (WINAPI *pfMessageBoxW)(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType); - -typedef HFONT (WINAPI *pfCreateFontIndirectW)(CONST LOGFONTW *); -typedef BOOL (WINAPI *pfGetTextMetricsW)(HDC, LPTEXTMETRICW); - -extern pfCreateWindowExW __CreateWindowExW; -extern pfLoadLibraryW __LoadLibraryW; -extern pfPeekMessage __PeekMessage; -extern pfGetMessage __GetMessage; -extern pfDispatchMessage __DispatchMessage; -extern pfSetWindowTextW __SetWindowTextW; -extern pfDefWindowProc __DefWindowProc; -extern pfPostMessage __PostMessage; -extern pfMessageBoxW __MessageBoxW; - -extern pfCreateFontIndirectW __CreateFontIndirectW; -extern pfGetTextMetricsW __GetTextMetricsW; - -}; /* extern "C" */ -#endif // !DOXYGEN - -#include "draw.h" - -namespace fltk { - -//////////////////////////////////////////////////////////////// -// constant information about the display: - -extern FL_API void open_display(); -extern FL_API void close_display(); -extern FL_API HINSTANCE xdisplay; -extern FL_API HPALETTE xpalette; // non-zero only on 8-bit displays! - -//////////////////////////////////////////////////////////////// -// event handling: - -extern FL_API MSG msg; - -//////////////////////////////////////////////////////////////// -// drawing functions: - -extern FL_API HDC dc; -extern FL_API HDC getDC(); -extern FL_API HFONT xfont(); -extern FL_API TEXTMETRICW* textmetric(); -extern FL_API COLORREF current_xpixel; -extern FL_API COLORREF xpixel(Color i); -extern FL_API HPEN setpen(); -extern FL_API HBRUSH setbrush(); -extern FL_API void clip_region(HRGN); -extern FL_API HRGN clip_region(); - -extern FL_API void draw_into(HBITMAP, int w, int h); -extern FL_API void stop_drawing(HBITMAP); -extern FL_API void stop_drawing(HWND); - -//////////////////////////////////////////////////////////////// -#ifdef fltk_Window_h // only include this if <fltk/Fl_Window.h> was included - -// When fltk tells X about a window, one of these objects is created. -// Warning: this object is highly subject to change! It's definition -// is only here so that fl_xid can be declared inline: - -class FL_API CreatedWindow { -public: - HWND xid; - HDC dc; - HBITMAP backbuffer; - HDC bdc; - Window* window; - HRGN region; - void expose(const Rectangle&); - CreatedWindow* next; - bool wait_for_expose; - bool backbuffer_bad; // used for XDBE - bool overlay; // true if redraw_overlay was called - HCURSOR cursor; - const Widget* cursor_for; - static CreatedWindow* first; - static CreatedWindow* find(const Window* window) {return window->i;} - void set_minmax(LPMINMAXINFO minmax); - static void create(Window*); -}; - -// convert xid <-> Window: -inline HWND xid(const Window*w) {return CreatedWindow::find(w)->xid;} -Window* find(HWND xid); - -extern FL_API HCURSOR default_cursor; - -#endif // Fl_Window_H - -} - -#endif - -// -// End of "$Id: win32.h 5583 2007-01-06 21:26:09Z fabien $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/x.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/x.h deleted file mode 100644 index 9377b312..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/x.h +++ /dev/null @@ -1,47 +0,0 @@ -// "$Id: x.h 5586 2007-01-07 07:23:21Z spitzak $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -/** \file - "Portably" include either x11.h, win32.h, or osx.h header files, - depending on your system. Since the system-specific interfaces - resemble each other somewhat, use of this header and some macros - may allow you to merge system-specific code for different systems - together. -*/ - -#ifndef fltk_x_h -# define fltk_x_h -# if defined(_WIN32) && !USE_X11 -# include "win32.h" -# elif defined(__APPLE__) && !USE_X11 -# include "osx.h" -# else -# define USE_X11 1 -# include "x11.h" -# endif -#endif - -#if USE_CAIRO -# include "fltk_cairo.h" -#endif -// -// End of "$Id: x.h 5586 2007-01-07 07:23:21Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/x11.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/x11.h deleted file mode 100644 index 2be48157..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/x11.h +++ /dev/null @@ -1,180 +0,0 @@ -// "$Id: x.h 5140 2006-05-22 04:46:07Z spitzak $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -/** \file - -Declarations of FLTK symbols and interfaces that only exist if FLTK -is compiled to use X11, as it is by default on Unix. It is recommended -you avoid using this header file, and that you segregate code requiring -it to it's own source file. - -This header includes the Xlib.h, Xutil.h, Xatom.h, XInput.h, and XI.h -header files, with sufficent wrappers to avoid conflicts with FLTK. -In particular a macro is used so that "Window" is replaced by "XWindow" -in these headers. You should use this rather than including the X -header files directly. - -*/ - -#ifndef fltk_x11_h -# define fltk_x11_h - -//////////////////////////////////////////////////////////////// -// Try to get the parts of Xlib.h included while avoiding warnings: - -# ifndef DOXYGEN -# define Window XWindow - -// pragmas are to fix the broken SGI Irix Xlib header files: -# if !defined(__GNUC__) && (defined(_ABIN32) || defined(_ABI64)) -# pragma set woff 3322 -# endif -# include <X11/Xlib.h> -# include <X11/Xutil.h> -# if !defined(__GNUC__) && (defined(_ABIN32) || defined(_ABI64)) -# pragma reset woff 3322 -# endif - -# include <X11/Xatom.h> - -# if USE_XFT && !MAKEDEPEND -# include <X11/Xft/Xft.h> -# else - typedef struct _XftDraw XftDraw; - typedef struct _XftFont XftFont; -# endif - -# include <X11/extensions/XInput.h> -# include <X11/extensions/XI.h> - -# undef Window - -# if defined(__FreeBSD__) || defined(__APPLE__) || defined(__CYGWIN__) - typedef unsigned long ulong; - typedef unsigned int uint; - typedef unsigned char uchar; -# endif - -# endif // !DOXYGEN - -#include "draw.h" - -extern FL_API Region XRectangleRegion(int x, int y, int w, int h); - -namespace fltk { - -//////////////////////////////////////////////////////////////// -// constant info about the X server connection: - -extern FL_API void open_display(); -extern FL_API void open_display(Display*); -extern FL_API void close_display(); - -extern FL_API Display* xdisplay; -extern FL_API XWindow message_window; -extern FL_API int xscreen; -extern FL_API XVisualInfo* xvisual; -extern FL_API Colormap xcolormap; - -//////////////////////////////////////////////////////////////// -// event handling: - -// feed events into fltk by setting xevent and calling handle: -extern FL_API XEvent xevent; -extern FL_API bool handle(); - -// set by last xevent with a timestamp: -extern FL_API ulong event_time; - -//////////////////////////////////////////////////////////////// -// DnD: - -extern FL_API XWindow dnd_source_window; -extern FL_API Atom *dnd_source_types; -extern FL_API Atom dnd_type; -extern FL_API Atom dnd_source_action; -extern FL_API Atom dnd_action; - -//////////////////////////////////////////////////////////////// -// drawing functions: - -extern FL_API XftDraw* xftc; -extern FL_API GC gc; -extern FL_API XWindow xwindow; -extern FL_API ulong current_xpixel; -extern FL_API ulong xpixel(Color i); -extern FL_API void clip_region(Region); -extern FL_API Region clip_region(); - -extern FL_API void draw_into(XWindow, int w, int h); -extern FL_API void stop_drawing(XWindow); - -extern FL_API XFontStruct* xfont(); -extern FL_API XftFont* xftfont(); - -//////////////////////////////////////////////////////////////// -// only include this if <fltk/Window.h> was included: -# if defined(fltk_Window_h) || defined(DOXYGEN) - -/** - When fltk tells X about a window, one of these objects is created. - Warning: this object is highly subject to change! It's definition - is only here so that xid(Window) can be declared inline: -*/ -class FL_API CreatedWindow { -public: - XWindow xid; - XWindow backbuffer; - XWindow frontbuffer; - Window *window; - Region region; - void expose(const Rectangle&); - CreatedWindow *next; - bool wait_for_expose; - bool backbuffer_bad; // used for XDBE - bool overlay; // true if redraw_overlay was called - ::Cursor cursor; - const Widget* cursor_for; - static CreatedWindow* first; - static CreatedWindow* find(const Window* window) {return window->i;} - void sendxjunk(); - static void create(Window*, - XVisualInfo*, Colormap, - int background = -1); - static CreatedWindow* set_xid(Window*, XWindow); - Rectangle current_size; -}; - -// convert xid <-> Window: -inline XWindow xid(const Window*w) {return CreatedWindow::find(w)->xid;} -Window* find(XWindow xid); - -# endif // Window_h - -} // namespace fltk - -# if USE_CAIRO -# include <fltk/fltk_cairo.h> -# include <cairo-xlib.h> -# else - typedef struct _cairo cairo_t; -# endif -#endif diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/xbmImage.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/xbmImage.h deleted file mode 100644 index f2bd7735..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/xbmImage.h +++ /dev/null @@ -1,50 +0,0 @@ -// -// "$Id: xbmImage.h 5581 2007-01-05 03:04:04Z spitzak $" -// -// Image subclass for in-memory xbm data (you #include the .xbm file -// and then construct this). -// -// Copyright 2002 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_xbmImage_h -#define fltk_xbmImage_h - -#include "Image.h" - -namespace fltk { - -class FL_API xbmImage : public Image { -public: - const unsigned char *array; - xbmImage(const unsigned char *bits, int w,int h) : - Image(fltk::MASK,w,h), array(bits) {} - xbmImage(const char *bits, int w, int h) : - Image(fltk::MASK,w,h), array((const unsigned char *)bits) {} - bool fetch(); -}; - -} - -#endif - -// -// End of "$Id: xbmImage.h 5581 2007-01-05 03:04:04Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/xpmImage.h b/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/xpmImage.h deleted file mode 100644 index de0ebb03..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/include/fltk/xpmImage.h +++ /dev/null @@ -1,59 +0,0 @@ -// -// "$Id: xpmImage.h 5568 2006-12-30 07:54:24Z spitzak $" -// -// Image subclass that draws the data from an xpm format file. -// XPM is a file format designed for small icons in X, it can -// be convienently #include'd to inline the image into a program. -// Just pass the pointer defined by the file to the constructor. -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fltk_xpmImage_h -#define fltk_xpmImage_h - -#include "Image.h" - -namespace fltk { - -class FL_API xpmImage : public Image { -public: - const char * const * data; - // XPM files define the data all kinds of ways, so the constructor - // is overloaded to accept all the ones we have seen: - xpmImage(const char * const * d, const char* name = 0) : - Image(name), data(d) {} - xpmImage(const unsigned char* const * d, const char* name = 0) : - Image(name), data((char**)d) {} - xpmImage(char ** d, const char* name = 0) : - Image(name), data(d) {} - bool fetch(); - - //! For xpmFileImage to reuse fetch() code. - static bool fetch(Image&, const char* const* data); -}; - -} - -#endif - -// -// End of "$Id: xpmImage.h 5568 2006-12-30 07:54:24Z spitzak $". -// diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/lib/libfltk2.a b/os-plugins/plugins/vmchooser/src/fltk-2/lib/libfltk2.a Binary files differdeleted file mode 100644 index 71e3f37f..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/lib/libfltk2.a +++ /dev/null diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/lib/libfltk2_gl.a b/os-plugins/plugins/vmchooser/src/fltk-2/lib/libfltk2_gl.a Binary files differdeleted file mode 100644 index 5d45a12e..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/lib/libfltk2_gl.a +++ /dev/null diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/lib/libfltk2_glut.a b/os-plugins/plugins/vmchooser/src/fltk-2/lib/libfltk2_glut.a Binary files differdeleted file mode 100644 index dabd1810..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/lib/libfltk2_glut.a +++ /dev/null diff --git a/os-plugins/plugins/vmchooser/src/fltk-2/lib/libfltk2_images.a b/os-plugins/plugins/vmchooser/src/fltk-2/lib/libfltk2_images.a Binary files differdeleted file mode 100644 index 89b655bf..00000000 --- a/os-plugins/plugins/vmchooser/src/fltk-2/lib/libfltk2_images.a +++ /dev/null diff --git a/os-plugins/plugins/vmchooser/src/vmchooser/Doxyfile b/os-plugins/plugins/vmchooser/src/vmchooser/Doxyfile deleted file mode 100644 index 3c5258cb..00000000 --- a/os-plugins/plugins/vmchooser/src/vmchooser/Doxyfile +++ /dev/null @@ -1,283 +0,0 @@ -# Doxyfile 1.5.1-KDevelop - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = SessChoo -PROJECT_NUMBER = 1 -OUTPUT_DIRECTORY = -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -USE_WINDOWS_ENCODING = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = YES -STRIP_FROM_PATH = /home/bastian/studium/hiwi/fltk-2/SessChoo/ -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 8 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = NO -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = NO -EXTRACT_PRIVATE = NO -EXTRACT_STATIC = NO -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = YES -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = NO -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = /home/bastian/studium/hiwi/fltk-2/SessChoo -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.d \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.idl \ - *.odl \ - *.cs \ - *.php \ - *.php3 \ - *.inc \ - *.m \ - *.mm \ - *.dox \ - *.py \ - *.C \ - *.CC \ - *.C++ \ - *.II \ - *.I++ \ - *.H \ - *.HH \ - *.H++ \ - *.CS \ - *.PHP \ - *.PHP3 \ - *.M \ - *.MM \ - *.PY \ - *.C \ - *.H \ - *.tlh \ - *.diff \ - *.patch \ - *.moc \ - *.xpm \ - *.dox -RECURSIVE = yes -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = * -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = NO -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -REFERENCES_LINK_SOURCE = YES -USE_HTAGS = NO -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = YES -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = yes -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = SessChoo.tag -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = NO -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = NO -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = NO -CALLER_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1024 -MAX_DOT_GRAPH_DEPTH = 1000 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO diff --git a/os-plugins/plugins/vmchooser/src/vmchooser/Makefile b/os-plugins/plugins/vmchooser/src/vmchooser/Makefile deleted file mode 100644 index 05120692..00000000 --- a/os-plugins/plugins/vmchooser/src/vmchooser/Makefile +++ /dev/null @@ -1,26 +0,0 @@ - -STATIC= -static -CXX=g++ -CFLAGS=-c -O2 -I../fltk-2/include/ -I. -Wall -XMLFLAG=`xml2-config --cflags` -LDFLAGS=`../fltk-2/bin/fltk2-config --ldstaticflags` -lXrender -lfontconfig -lxml2 -lXft -lXdmcp -lXau -ldl -lz -lfreetype -lX11 - -all: main SWindow readXmlDir runImage - ${CXX} ${STATIC} main.o SWindow.o runImage.o readXmlDir.o -o vmchooser ${LDFLAGS} - strip vmchooser - -SWindow: - ${CXX} ${CFLAGS} -c SWindow.cxx -o SWindow.o - -readXmlDir: - ${CXX} ${CFLAGS} ${XMLFLAG} -o readXmlDir.o readXmlDir.cxx - -runImage: - ${CXX} ${CFLAGS} -o runImage.o runImage.cxx - -main: - ${CXX} ${CFLAGS} -c main.cxx -o main.o - - -clean: - rm -rf *.o vmchooser diff --git a/os-plugins/plugins/vmchooser/src/vmchooser/SWindow.cxx b/os-plugins/plugins/vmchooser/src/vmchooser/SWindow.cxx deleted file mode 100644 index d37fb01e..00000000 --- a/os-plugins/plugins/vmchooser/src/vmchooser/SWindow.cxx +++ /dev/null @@ -1,65 +0,0 @@ - -#include "inc/SWindow.h" -#include <iostream> - -using namespace fltk; -using namespace std; - -void SWindow::cb_return() -{ - // TODO start something - cout << " Pressed Button!" << endl; -} - - -void SWindow::cb_select() -{ - if (sel.item_is_parent() ) - { - sel.set_item_opened(true); - } -} - - -void SWindow::cb_info() -{ -} - -void SWindow::set_lin_entries(DataEntry** ent) -{ - this->lin_ent = ent; - lin_entgroup = (ItemGroup*) sel.add_group("------- LINUX DESKTOP ------"); - for (int i=0; ent[i] != NULL; i++) - { - sel.add_leaf(ent[i]->short_description.c_str() , lin_entgroup, (void*)ent[i] ); - } - - lin_entgroup->end(); -} - -void SWindow::set_entries(DataEntry** ent) -{ - this->ent = ent; - - entgroup = (ItemGroup*)sel.add_group("-------- VMWARE ----------"); - for (int i=0; ent[i] != NULL; i++) - { - sel.add_leaf(ent[i]->short_description.c_str(), lin_entgroup, (void*)ent[i] ); - } - for (int c=0; c < 5; c++) - { - sel.add_leaf("Blubber 1", entgroup); - } - entgroup->end(); -} - - -void SWindow::free_entries() -{ - for (int i=0; ent[i] != NULL; i++) - { - free(ent[i]); - } - free(ent); -} - diff --git a/os-plugins/plugins/vmchooser/src/vmchooser/SessChoo.kdevelop b/os-plugins/plugins/vmchooser/src/vmchooser/SessChoo.kdevelop deleted file mode 100644 index 1211830d..00000000 --- a/os-plugins/plugins/vmchooser/src/vmchooser/SessChoo.kdevelop +++ /dev/null @@ -1,227 +0,0 @@ -<?xml version = '1.0'?> -<kdevelop> - <general> - <author>Bastian Wissler</author> - <email>bw21@mars.uni-freiburg.de</email> - <version>1</version> - <projectmanagement>KDevCustomProject</projectmanagement> - <primarylanguage>C++</primarylanguage> - <ignoreparts/> - <projectname>SessChoo</projectname> - <projectdirectory>.</projectdirectory> - <absoluteprojectpath>false</absoluteprojectpath> - <description></description> - <defaultencoding></defaultencoding> - <versioncontrol></versioncontrol> - </general> - <kdevcustomproject> - <run> - <directoryradio>executable</directoryradio> - <mainprogram>/home/bastian/studium/hiwi/fltk-2/SessChoo/test</mainprogram> - <programargs>-p xmltest</programargs> - <globaldebugarguments>-p xmltest</globaldebugarguments> - <globalcwd>/home/bastian/studium/hiwi/fltk-2/SessChoo</globalcwd> - <useglobalprogram>false</useglobalprogram> - <terminal>false</terminal> - <autocompile>false</autocompile> - <autoinstall>false</autoinstall> - <autokdesu>false</autokdesu> - <envvars/> - </run> - <filetypes> - <filetype>*.java</filetype> - <filetype>*.h</filetype> - <filetype>*.H</filetype> - <filetype>*.hh</filetype> - <filetype>*.hxx</filetype> - <filetype>*.hpp</filetype> - <filetype>*.c</filetype> - <filetype>*.C</filetype> - <filetype>*.cc</filetype> - <filetype>*.cpp</filetype> - <filetype>*.c++</filetype> - <filetype>*.cxx</filetype> - <filetype>Makefile</filetype> - <filetype>CMakeLists.txt</filetype> - </filetypes> - <blacklist/> - <build> - <buildtool>make</buildtool> - <builddir></builddir> - </build> - <other> - <prio>0</prio> - <otherbin></otherbin> - <defaulttarget></defaulttarget> - <otheroptions></otheroptions> - <selectedenvironment>default</selectedenvironment> - <environments> - <default/> - </environments> - </other> - <make> - <abortonerror>false</abortonerror> - <numberofjobs>0</numberofjobs> - <prio>0</prio> - <dontact>false</dontact> - <makebin></makebin> - <defaulttarget></defaulttarget> - <makeoptions></makeoptions> - <selectedenvironment>default</selectedenvironment> - <environments> - <default/> - </environments> - </make> - </kdevcustomproject> - <kdevdebugger> - <general> - <dbgshell></dbgshell> - <gdbpath></gdbpath> - <configGdbScript></configGdbScript> - <runShellScript></runShellScript> - <runGdbScript></runGdbScript> - <breakonloadinglibs>true</breakonloadinglibs> - <separatetty>false</separatetty> - <floatingtoolbar>false</floatingtoolbar> - <raiseGDBOnStart>false</raiseGDBOnStart> - </general> - <display> - <staticmembers>false</staticmembers> - <demanglenames>true</demanglenames> - <outputradix>10</outputradix> - </display> - </kdevdebugger> - <kdevdoctreeview> - <ignoretocs> - <toc>ada</toc> - <toc>ada_bugs_gcc</toc> - <toc>bash</toc> - <toc>bash_bugs</toc> - <toc>clanlib</toc> - <toc>fortran_bugs_gcc</toc> - <toc>gnome1</toc> - <toc>gnustep</toc> - <toc>gtk</toc> - <toc>gtk_bugs</toc> - <toc>haskell</toc> - <toc>haskell_bugs_ghc</toc> - <toc>java_bugs_gcc</toc> - <toc>java_bugs_sun</toc> - <toc>kde2book</toc> - <toc>opengl</toc> - <toc>pascal_bugs_fp</toc> - <toc>php</toc> - <toc>php_bugs</toc> - <toc>perl</toc> - <toc>perl_bugs</toc> - <toc>python</toc> - <toc>python_bugs</toc> - <toc>qt-kdev3</toc> - <toc>ruby</toc> - <toc>ruby_bugs</toc> - <toc>sdl</toc> - <toc>sw</toc> - <toc>w3c-dom-level2-html</toc> - <toc>w3c-svg</toc> - <toc>w3c-uaag10</toc> - <toc>wxwidgets_bugs</toc> - </ignoretocs> - <ignoreqt_xml> - <toc>Guide to the Qt Translation Tools</toc> - <toc>Qt Assistant Manual</toc> - <toc>Qt Designer Manual</toc> - <toc>Qt Reference Documentation</toc> - <toc>qmake User Guide</toc> - </ignoreqt_xml> - <ignoredoxygen> - <toc>KDE Libraries (Doxygen)</toc> - </ignoredoxygen> - </kdevdoctreeview> - <kdevfilecreate> - <filetypes/> - <useglobaltypes> - <type ext="ui" /> - <type ext="cpp" /> - <type ext="h" /> - </useglobaltypes> - </kdevfilecreate> - <kdevcppsupport> - <qt> - <used>false</used> - <version>3</version> - <includestyle>3</includestyle> - <root>/usr/qt/3</root> - <designerintegration>EmbeddedKDevDesigner</designerintegration> - <qmake>/usr/qt/3/bin/qmake</qmake> - <designer>/usr/qt/3/bin/designer</designer> - <designerpluginpaths/> - </qt> - <codecompletion> - <automaticCodeCompletion>false</automaticCodeCompletion> - <automaticArgumentsHint>true</automaticArgumentsHint> - <automaticHeaderCompletion>true</automaticHeaderCompletion> - <codeCompletionDelay>250</codeCompletionDelay> - <argumentsHintDelay>400</argumentsHintDelay> - <headerCompletionDelay>250</headerCompletionDelay> - <showOnlyAccessibleItems>false</showOnlyAccessibleItems> - <completionBoxItemOrder>0</completionBoxItemOrder> - <howEvaluationContextMenu>true</howEvaluationContextMenu> - <showCommentWithArgumentHint>true</showCommentWithArgumentHint> - <statusBarTypeEvaluation>false</statusBarTypeEvaluation> - <namespaceAliases>std=_GLIBCXX_STD;__gnu_cxx=std</namespaceAliases> - <processPrimaryTypes>true</processPrimaryTypes> - <processFunctionArguments>false</processFunctionArguments> - <preProcessAllHeaders>true</preProcessAllHeaders> - <parseMissingHeadersExperimental>true</parseMissingHeadersExperimental> - <resolveIncludePathsUsingMakeExperimental>false</resolveIncludePathsUsingMakeExperimental> - <alwaysParseInBackground>true</alwaysParseInBackground> - <usePermanentCaching>true</usePermanentCaching> - <alwaysIncludeNamespaces>false</alwaysIncludeNamespaces> - <includePaths>.;</includePaths> - </codecompletion> - <creategettersetter> - <prefixGet></prefixGet> - <prefixSet>set</prefixSet> - <prefixVariable>m_,_</prefixVariable> - <parameterName>theValue</parameterName> - <inlineGet>true</inlineGet> - <inlineSet>true</inlineSet> - </creategettersetter> - <splitheadersource> - <enabled>false</enabled> - <synchronize>true</synchronize> - <orientation>Vertical</orientation> - </splitheadersource> - <references> - <pcs>automatic_%2Fhome%2Fbastian%2Fstudium%2Fhiwi%2Ffltk-2%2FSessChoo</pcs> - </references> - </kdevcppsupport> - <cppsupportpart> - <filetemplates> - <interfacesuffix>.h</interfacesuffix> - <implementationsuffix>.cxx</implementationsuffix> - </filetemplates> - </cppsupportpart> - <ctagspart> - <customArguments></customArguments> - <customTagfilePath>/home/bastian/studium/hiwi/fltk-2/SessChoo/tags</customTagfilePath> - <activeTagsFiles/> - </ctagspart> - <kdevdocumentation> - <projectdoc> - <docsystem></docsystem> - <docurl></docurl> - <usermanualurl></usermanualurl> - </projectdoc> - </kdevdocumentation> - <kdevfileview> - <tree> - <hidepatterns>*.o,*.lo,CVS</hidepatterns> - <hidenonprojectfiles>false</hidenonprojectfiles> - </tree> - <groups> - <hidenonprojectfiles>false</hidenonprojectfiles> - <hidenonlocation>false</hidenonlocation> - </groups> - </kdevfileview> -</kdevelop> diff --git a/os-plugins/plugins/vmchooser/src/vmchooser/SessChoo.kdevelop.filelist b/os-plugins/plugins/vmchooser/src/vmchooser/SessChoo.kdevelop.filelist deleted file mode 100644 index 7645f8f4..00000000 --- a/os-plugins/plugins/vmchooser/src/vmchooser/SessChoo.kdevelop.filelist +++ /dev/null @@ -1,10 +0,0 @@ -# KDevelop Custom Project File List -Makefile -SWindow.cxx -inc -inc/DataEntry.h -inc/SWindow.h -inc/functions.h -main.cxx -readXmlDir.cxx -runImage.cxx diff --git a/os-plugins/plugins/vmchooser/src/vmchooser/SessChoo.kdevelop.pcs b/os-plugins/plugins/vmchooser/src/vmchooser/SessChoo.kdevelop.pcs Binary files differdeleted file mode 100644 index 80b8a69c..00000000 --- a/os-plugins/plugins/vmchooser/src/vmchooser/SessChoo.kdevelop.pcs +++ /dev/null diff --git a/os-plugins/plugins/vmchooser/src/vmchooser/SessChoo.kdevses b/os-plugins/plugins/vmchooser/src/vmchooser/SessChoo.kdevses deleted file mode 100644 index a7624c64..00000000 --- a/os-plugins/plugins/vmchooser/src/vmchooser/SessChoo.kdevses +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE KDevPrjSession> -<KDevPrjSession> - <DocsAndViews NumberOfDocuments="4" > - <Doc0 NumberOfViews="1" URL="file:///home/bastian/studium/hiwi/fltk-2/SessChoo/main.cxx" > - <View0 Encoding="" line="39" Type="Source" /> - </Doc0> - <Doc1 NumberOfViews="1" URL="file:///home/bastian/studium/hiwi/fltk-2/SessChoo/readXmlDir.cxx" > - <View0 Encoding="" line="152" Type="Source" /> - </Doc1> - <Doc2 NumberOfViews="1" URL="file:///home/bastian/studium/hiwi/fltk-2/SessChoo/runImage.cxx" > - <View0 Encoding="" line="31" Type="Source" /> - </Doc2> - <Doc3 NumberOfViews="1" URL="file:///home/bastian/studium/hiwi/fltk-2/SessChoo/SWindow.cxx" > - <View0 Encoding="" line="26" Type="Source" /> - </Doc3> - </DocsAndViews> - <pluginList> - <kdevdebugger> - <breakpointList/> - <showInternalCommands value="0" /> - </kdevdebugger> - <kdevastyle> - <Extensions ext="*.cpp *.h,*.c *.h,*.cxx *.hxx,*.c++ *.h++,*.cc *.hh,*.C *.H,*.diff,*.inl,*.java,*.moc,*.patch,*.tlh,*.xpm" /> - <AStyle IndentPreprocessors="0" FillCount="4" PadParenthesesOut="1" IndentNamespaces="1" IndentLabels="1" Fill="Tabs" MaxStatement="40" Brackets="Break" MinConditional="-1" IndentBrackets="0" PadParenthesesUn="1" BlockBreak="0" KeepStatements="1" KeepBlocks="1" BlockIfElse="0" IndentSwitches="1" PadOperators="0" FStyle="GNU" IndentCases="0" FillEmptyLines="0" BracketsCloseHeaders="0" BlockBreakAll="0" PadParenthesesIn="1" IndentClasses="1" IndentBlocks="0" FillForce="0" /> - </kdevastyle> - <kdevbookmarks> - <bookmarks/> - </kdevbookmarks> - <kdevvalgrind> - <executable path="" params="" /> - <valgrind path="" params="" /> - <calltree path="" params="" /> - <kcachegrind path="" /> - </kdevvalgrind> - </pluginList> -</KDevPrjSession> diff --git a/os-plugins/plugins/vmchooser/src/vmchooser/inc/DataEntry.h b/os-plugins/plugins/vmchooser/src/vmchooser/inc/DataEntry.h deleted file mode 100644 index cc8460c4..00000000 --- a/os-plugins/plugins/vmchooser/src/vmchooser/inc/DataEntry.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef DATAENTRY_H_ -#define DATAENTRY_H_ - -#include <string> -using namespace std; - -enum ImgType { - LINUX, - VMWARE, - VBOX -}; - -struct DataEntry { - - string short_description; - string description; - - string creator; - string email; - string phone; - - string imgname; - ImgType imgtype; - string os; - string network; - - bool active; - string pools; - string xdm; - int priority; - - string command; - -}; - -#endif /*DATAENTRY_H_*/ diff --git a/os-plugins/plugins/vmchooser/src/vmchooser/inc/SWindow.h b/os-plugins/plugins/vmchooser/src/vmchooser/inc/SWindow.h deleted file mode 100644 index e3888dd8..00000000 --- a/os-plugins/plugins/vmchooser/src/vmchooser/inc/SWindow.h +++ /dev/null @@ -1,72 +0,0 @@ - -#ifndef SWindow_h -#define SWindow_h - -#include <fltk/Window.h> -#include <fltk/ReturnButton.h> -#include <fltk/MultiBrowser.h> -#include <fltk/TextDisplay.h> -#include <fltk/ItemGroup.h> - -#include "DataEntry.h" -#include <map> - -class SWindow : public fltk::Window { - -private: - - fltk::ReturnButton go; - fltk::MultiBrowser sel; - fltk::TextDisplay info; - fltk::TextBuffer buf; - - fltk::ItemGroup* entgroup; - fltk::ItemGroup* lin_entgroup; - - DataEntry** ent; - DataEntry** lin_ent; - SWindow(char* p = "Choose your session!") : - fltk::Window(fltk::USEDEFAULT,fltk::USEDEFAULT,500,650,p, true), - go(10,630, 490, 20, "Ausführen"), - sel(10,10, 480, 500), - info(10, 510, 480, 110), - buf() - { - go.callback(cb_return,this); - sel.callback(cb_select, this); - info.callback(cb_info, this); - end(); - }; - -public: - static SWindow* getInstance() { - static SWindow instance; - return &instance; - } - - ~SWindow() { }; - - static void cb_return(fltk::Widget*, void* w) { - ((SWindow*)w)->cb_return(); - }; - static void cb_select(fltk::Widget*, void* w) { - ((SWindow*)w)->cb_select(); - }; - static void cb_info(fltk::Widget*, void* w) { - ((SWindow*)w)->cb_info(); - }; - - void cb_return(); - void cb_select(); - void cb_info(); - - void set_entries(DataEntry** ent); - void set_lin_entries(DataEntry** ent); - - void free_entries(); - -}; - - -#endif - diff --git a/os-plugins/plugins/vmchooser/src/vmchooser/inc/functions.h b/os-plugins/plugins/vmchooser/src/vmchooser/inc/functions.h deleted file mode 100644 index d45c6d4b..00000000 --- a/os-plugins/plugins/vmchooser/src/vmchooser/inc/functions.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _FUNCTIONS_H_ -#define _FUNCTIONS_H_ - -#include <fltk/Widget.h> - -#include <glob.h> - -#include "DataEntry.h" - -DataEntry** readXmlDir(char* path); /* Attention: returns malloced array */ -DataEntry** readLinSession(char* path); - -void runImage(fltk::Widget* , void* p); /* This is thought as a callback-function for the Select-Browser */ -string buildCommand(DataEntry*); /* building command for different Virtualizer */ - -glob_t* globber(char* path, char* filetype); /* Globs for a specific filetype */ - - -#endif /* _FUNCTIONS_H_ */ - diff --git a/os-plugins/plugins/vmchooser/src/vmchooser/main.cxx b/os-plugins/plugins/vmchooser/src/vmchooser/main.cxx deleted file mode 100644 index d33468a4..00000000 --- a/os-plugins/plugins/vmchooser/src/vmchooser/main.cxx +++ /dev/null @@ -1,96 +0,0 @@ - -#include <fltk/run.h> - -#include <iostream> -#include <stdlib.h> -#include "inc/SWindow.h" -#include "inc/DataEntry.h" -#include "inc/functions.h" - -using namespace std; -using namespace fltk; - -/** - * MAIN - * - */ -int main(int argc, char** argv) -{ - - if (argc > 1 ) - { - if (strcmp(argv[1],"-h") | strcmp(argv[1], "--help") ) - { - /* print help */ - printf("SessionChooser \n"); - printf("\t{-p |--path=}[path to xml files]\n"); - printf("\t{-g |--group=}[group name]\n"); - printf("\t{-h |--help}[ as first parameter - prints help ]\n"); - exit(0); - } - } - - char* xmlpath = NULL; - char* slxgroup = NULL; - - for (int i=0; i<argc; i++) - { - /* Get path parameter - path to XML files */ - if (strstr(argv[i],"-p") != NULL) - { - i++; - xmlpath = argv[i]; - } - if (strstr(argv[i],"--path=") != NULL) - { - char* temp = strpbrk("=", argv[i] ); - xmlpath = (temp ++); - } - - /* Get group parameter - SLXGroup */ - if (strstr(argv[i],"-g") != NULL) - { - i++; - slxgroup = argv[i]; - } - if (strstr(argv[i],"--group=") != NULL) - { - char* temp = strpbrk("=", argv[i] ); - slxgroup =( temp ++ ); - } - } - - if (xmlpath == NULL) - { - xmlpath = "xmltest"; - } - if (slxgroup == NULL) - { - slxgroup = "default"; - } - - - /* read xml files */ - DataEntry** sessions = NULL; - if (xmlpath != NULL) - { - sessions = readXmlDir(xmlpath); - } - else - { - fprintf(stderr,"Please give a path to xml directory for session images!"); - exit(1); - } - - SWindow& win = *SWindow::getInstance(); - - if (sessions != NULL) - { - win.set_entries(sessions); - } - - win.show(argc,argv); - - return run(); -} - diff --git a/os-plugins/plugins/vmchooser/src/vmchooser/readXmlDir.cxx b/os-plugins/plugins/vmchooser/src/vmchooser/readXmlDir.cxx deleted file mode 100644 index a6c54266..00000000 --- a/os-plugins/plugins/vmchooser/src/vmchooser/readXmlDir.cxx +++ /dev/null @@ -1,258 +0,0 @@ -/** - * author: Bastian Wissler - * purpose: Scan a given folder for XML-Files and get information - * about installed Images / SessionManagers - */ -#include <stdio.h> -#include <glob.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <libxml/parser.h> -#include <libxml/tree.h> - -#include "inc/DataEntry.h" - - -#ifdef LIBXML_TREE_ENABLED - -char* getAttribute(xmlNode* from, char* name) -{ - xmlNode* temp; - for (temp = from->children;temp != NULL; temp = from->next) - { - if (temp->type == XML_ELEMENT_NODE && strcmp((const char*) temp->name, name) ) - { - return (char*) xmlGetProp(temp, (const xmlChar*) "param"); - } - else - { - continue; - } - } - return NULL; -} - -DataEntry* get_entry(xmlNode * root) -{ - xmlNode *eintrag = NULL; - char *tempc = NULL; - DataEntry* de = (DataEntry*) malloc( sizeof(DataEntry) ); - - eintrag = root->children; - - if (eintrag == NULL ) - { - fprintf(stderr, "Out of memory!\n"); - return NULL; - } - if (! strcmp((const char*) eintrag->name, "eintrag") ) - { - fprintf(stderr, "Didn't find \"eintrag\"-element!"); - return NULL; - } - tempc = (char*) getAttribute(eintrag,"short_description"); - if (tempc != NULL ) - { - de->short_description = tempc; - } - tempc = NULL; - - if (de->short_description.empty()) - { - free(de); - fprintf(stderr, "No short_description given\n"); - return NULL; - } - - tempc = getAttribute(eintrag,"long_description"); - if (tempc != NULL ) - { - de->description = tempc; - } - tempc = NULL; - - tempc = getAttribute(eintrag,"creator"); - if (tempc != NULL ) - { - de->creator = tempc; - } - tempc = NULL; - - tempc = getAttribute(eintrag,"email"); - if (tempc != NULL ) - { - de->email = tempc; - } - tempc = NULL; - - tempc = getAttribute(eintrag,"phone"); - if (tempc != NULL ) - { - de->phone = tempc; - } - tempc = NULL; - - tempc = getAttribute(eintrag,"name"); - if (tempc != NULL ) - { - de->imgname = tempc; - } - tempc = NULL; - - tempc = getAttribute(eintrag,"os"); - if (tempc != NULL ) - { - de->os = tempc; - } - tempc = NULL; - - tempc = getAttribute(eintrag,"network"); - if (tempc != NULL ) - { - de->network = tempc; - } - tempc = NULL; - - tempc = getAttribute(eintrag,"virtualmachine"); - if (tempc != NULL ) - { - if ( strcmp(tempc,"vmware") ) - { - de->imgtype = VMWARE; - } - else - { - de->imgtype = VBOX; - } - } - tempc = NULL; - - tempc = getAttribute(eintrag,"active"); - if (tempc != NULL ) - { - de->active = (strstr(tempc,"true")!= NULL?true:false); - } - tempc = NULL; - - tempc = getAttribute(eintrag,"pools"); - if (tempc != NULL ) - { - de->pools = tempc; - } - tempc = NULL; - - tempc = getAttribute(eintrag,"xdm"); - if (tempc != NULL ) - { - de->xdm = tempc; - } - tempc = NULL; - - tempc = getAttribute(eintrag,"priority"); - if (tempc != NULL ) - { - de->priority = atoi(tempc); - } - tempc = NULL; - - return de; -} - -static int errorfunc(const char* errpath, int errno) -{ - fprintf(stderr, "GLOB(): Fehler aufgetreten unter %s mit Fehlernummer %d \n",errpath, errno); - return 0; -} - - -static glob_t* globber(char* path, const char* filetype) -{ - glob_t* gResult = (glob_t*) malloc(sizeof(glob_t)); - char* temp = (char*) malloc(strlen(path)+strlen(filetype)-1); - strcpy(temp, path); - strcat(temp, filetype); - - if (glob(path, GLOB_NOSORT, &errorfunc, gResult)) - { - fprintf(stderr, "Fehler beim öffnen des Ordners!\n"); - return NULL; - } - return gResult; - -} - - -DataEntry** readXmlDir(char* path) -{ - LIBXML_TEST_VERSION - if ( path== NULL) - { - return NULL; - } - glob_t *gResult = globber(path, "/*.xml"); - - if ( gResult == NULL ) - { - return NULL; - } - - if ( gResult->gl_pathc == 0 ) - { - return NULL; - } - xmlDoc *doc = NULL; - xmlNode *root_element = NULL; - int c = 0; - - DataEntry** result = (DataEntry**) malloc(gResult->gl_pathc * sizeof(DataEntry*) +1); - - for (int i=0; gResult->gl_pathv[i] != NULL; i++) - { - if (strstr(gResult->gl_pathv[i], "Vorlage") != NULL) - { - continue; - } - /* DEBUG */ - /* printf("%s\n", gResult->gl_pathv[i]); - */ - struct stat m; - stat(gResult->gl_pathv[i], &m); - - if ( S_ISDIR(m.st_mode) ) - { - continue; - } - - doc = xmlReadFile(gResult->gl_pathv[i], NULL, XML_PARSE_RECOVER); - if (doc == NULL) - { - fprintf(stderr, "error: could not parse file %s\n", gResult->gl_pathv[i]); - continue; - } - - root_element = xmlDocGetRootElement(doc); - if (!root_element) - { - fprintf(stderr, "Some error regarding reading of xml file!"); - exit(1); - } - - result[c] = get_entry(root_element); - if (result[c] != NULL) - { - c++; - } - xmlFreeDoc(doc); - } - - free(gResult); - result[c] = NULL; - return result; - -} - -#else - -#error "Tree Support for libxml2 must be available!" - -#endif diff --git a/os-plugins/plugins/vmchooser/src/vmchooser/runImage.cxx b/os-plugins/plugins/vmchooser/src/vmchooser/runImage.cxx deleted file mode 100644 index 76b183b2..00000000 --- a/os-plugins/plugins/vmchooser/src/vmchooser/runImage.cxx +++ /dev/null @@ -1,32 +0,0 @@ -#include <fltk/Widget.h> - -#include "inc/DataEntry.h" -#include "inc/SWindow.h" - - -void runImage(fltk::Widget*, void* p) -{ - if ( p == NULL ) - { - return; - } - DataEntry& dat = *((DataEntry*) p); - SWindow& win = *SWindow::getInstance(); - - if (! dat.command.empty()) - { - system(dat.command.c_str()); - win.hide(); - } - exit(0); -} - - -string buildCommand(DataEntry& dat) -{ - if (dat.imgtype == VMWARE) - { - return string("vmrun ").append(dat.imgname); - } - return string(); -} |