Marius Cramer
2013-11-14 b1a6a5a3991cec5cd08873b01376e45d0b247f18
server/lib/classes/system.inc.php
@@ -40,6 +40,8 @@
    *
    * @return system
    */
   public function system(){
      //global $go_info;
        //$this->server_id = $go_info['isp']['server_id'];
@@ -48,6 +50,8 @@
        $this->server_conf['shadow_datei'] = '/etc/shadow';
        $this->server_conf['group_datei'] = '/etc/group';
   }
   
   /**
    * Get the hostname from the server
@@ -76,6 +80,8 @@
        }
        return $hostname;
   }
   
   /**
    * Add an user to the system
@@ -118,6 +124,10 @@
     }
   }
   
   /**
    * Update users when someone edit it
    *
@@ -128,6 +138,10 @@
      //* Add the user again
        $this->adduser($user_username, $uid, $gid, $username, $homedir, $shell, $passwort);
   }
   
   /**
    * Lock the user
@@ -144,6 +158,8 @@
        $this->deluser($user_username);
        $this->adduser($user_username, $uid, $gid, $username, $homedir, $shell, $passwort);
   }
   /**
    * Delete a user from the system
    *
@@ -220,6 +236,10 @@
        }
   }
   
   /**
    * Add a usergroup to the system
    *
@@ -243,6 +263,10 @@
        }
   }
   
   /**
    * Update usersgroup in way to delete and add it again
    *
@@ -251,6 +275,10 @@
      $this->delgroup($group);
        $this->addgroup($group, $gid, $members);
   }
   
   /**
    * Delete a usergroup from the system
@@ -287,6 +315,8 @@
          return false;
        }
   }
   /**
    * Order usergroups
    *
@@ -356,6 +386,10 @@
        unset($arr);
   }
   
   /**
    * Find a user / group id
    *
@@ -424,6 +458,10 @@
        }
   }
   
   /**
    * Check if the users is really a user into the system
    *
@@ -443,6 +481,10 @@
        }
        return false;
   }
   
   /**
    * Check if the group is on this system
@@ -502,6 +544,10 @@
        return false;
   }
   
   /**
    * Get the groups of an user
    *
@@ -528,6 +574,10 @@
        return '';
   }
   
   /**
    * Get a user password
    *
@@ -550,6 +600,10 @@
          return false;
        }
   }
   
   /**
    * Get the user id from an user
@@ -574,6 +628,10 @@
        }
   }
   
   /**
    * Get the group id from an group
    *
@@ -596,6 +654,10 @@
          return false;
        }
   }
   
   /**
   * Return info about a group by name
@@ -625,6 +687,10 @@
         return posix_getgrnam($group);
      }
    }
   
   /**
    * Get all information from a user
@@ -657,6 +723,10 @@
          return false;
        }
   }
   
   /**
    * Edit the owner of a file
@@ -794,6 +864,10 @@
      return true;
   }
   
   /**
    * Add an user to a specific group
    *
@@ -922,6 +996,10 @@
        }
   }
   
   /**
    * Filter information from the commands
    *
@@ -972,6 +1050,10 @@
        }
   }
   
   /**
    * Strip content from fields
    *
@@ -994,6 +1076,10 @@
        }
   }
   
   /**
    * Get the content off a file
    *
@@ -1002,6 +1088,10 @@
      global $app;
        return $app->file->rf($file);
   }
   
   /**
    * Control services to restart etc
@@ -1078,6 +1168,10 @@
     return bindec($f1).'.'.bindec($f2).'.'.bindec($f3).'.'.bindec($f4);
   }
   
   /**
    * Make a broadcast address from an IP number in combination with netmask
    *
@@ -1092,6 +1186,10 @@
        list($f1,$f2,$f3,$f4) = explode('.', trim($broadcast_bin));
        return bindec($f1).'.'.bindec($f2).'.'.bindec($f3).'.'.bindec($f4);
   }
   
   /**
    * Get the network address information
@@ -1136,6 +1234,10 @@
          return false;
        }
   }
   
   /**
    * Configure the network settings from the system
@@ -1211,6 +1313,10 @@
     }
   }
   
   /**
    * Scan the trash for virusses infection
    *
@@ -1244,6 +1350,10 @@
        chown($datei,'admispconfig');
        chgrp($datei,'admispconfig');
   }
   
   /**
    * Get the current time
@@ -1616,4 +1726,5 @@
   }
}
?>