| | |
| | | } |
| | | |
| | | //** OpenSuSE |
| | | elseif(file_exists("/etc/SuSE-release")) { |
| | | elseif(file_exists('/etc/SuSE-release')) { |
| | | if(stristr(file_get_contents('/etc/SuSE-release'),'11.0')) { |
| | | $distname = 'openSUSE'; |
| | | $distver = '11.0'; |
| | |
| | | |
| | | |
| | | //** Redhat |
| | | elseif(file_exists("/etc/redhat-release")) { |
| | | elseif(file_exists('/etc/redhat-release')) { |
| | | |
| | | $content = file_get_contents('/etc/redhat-release'); |
| | | |
| | |
| | | } |
| | | |
| | | //** Gentoo |
| | | elseif(file_exists("/etc/gentoo-release")) { |
| | | elseif(file_exists('/etc/gentoo-release')) { |
| | | |
| | | $content = file_get_contents('/etc/gentoo-release'); |
| | | |
| | |
| | | swriteln("Operating System: Gentoo $distver or compatible\n"); |
| | | |
| | | } else { |
| | | die('unrecognized Linux distribution'); |
| | | die('Unrecognized GNU/Linux distribution'); |
| | | } |
| | | |
| | | return array('name' => $distname, 'version' => $distver, 'id' => $distid, 'baseid' => $distbaseid); |
| | |
| | | } |
| | | |
| | | function ilog($msg){ |
| | | exec("echo `date` \"- [ISPConfig] - \"".$msg." >> ".ISPC_LOG_FILE); |
| | | exec("echo `date` \"- [ISPConfig] - \"".$msg.' >> '.ISPC_LOG_FILE); |
| | | } |
| | | |
| | | function error($msg){ |
| | |
| | | $lines = explode("\n", $users); |
| | | if(is_array($lines)){ |
| | | foreach($lines as $line){ |
| | | if(trim($line) != ""){ |
| | | list($f1, $f2, $f3, $f4, $f5, $f6, $f7) = explode(":", $line); |
| | | if(trim($line) != ''){ |
| | | list($f1, $f2, $f3, $f4, $f5, $f6, $f7) = explode(':', $line); |
| | | if($f1 == $user) return true; |
| | | } |
| | | } |
| | |
| | | $lines = explode("\n", $groups); |
| | | if(is_array($lines)){ |
| | | foreach($lines as $line){ |
| | | if(trim($line) != ""){ |
| | | list($f1, $f2, $f3, $f4) = explode(":", $line); |
| | | if(trim($line) != ''){ |
| | | list($f1, $f2, $f3, $f4) = explode(':', $line); |
| | | if($f1 == $group) return true; |
| | | } |
| | | } |