Location: PHPKode > projects > PHPMyServer > server/includes/functions.php4.php
<?PHP
//
// PHPMyServer - A PHP System Information Script - Old project name was PHPMyStats
// http://www.phpmyserver.com/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
//
// $Id: index.php/index.php4.php/index.php5.php/etc ,v 2.6 13-08-2005 16:30 precision Exp $
//
// Date in $Id is as DD-MM-YY

//PHPMyServer - XML Server v2.6
//Build version:
//  split version at the DOT, before the DOT is the CORE version, AFTER the DOT is de RELEASE
//Every new release will get an higher number, so when i released version 2 of the script for the 126523st time, its version v2.126523

//Copyright 2004-2005 by KingOfDos Intra/Extra/Internet WebServices
//http://www.phpmyserver.com
//http://www.kingofdos.com
//http://www.kingofdos.com

$funct_version = '02f1051414bda3eb39439ce2c998abca'; //NEVER CHANGE THIS VALUE!!!!!!

class pmsFunc {
	//-------------------------------------------
	//---- MODULES ------------------------------
	//-------------------------------------------
	function OSIsWindows() {
		if ($val = $this->shell_mexec('ver') and eregi('windows',$val))
			return true;
		else
			return false;
	}

	function shell_mexec($command) {
		// http://nl3.php.net/manual/nl/function.system.php 
		// Script written by TweakBoy ( at http://gathering.tweakers.net )
		// Script debugged by KingOfDos ( error_reporting(E_ALL) returned some errors, the if(empty($out)) added )
		// original functionname = mysystem, renamed to shell_mexec
		if (!($p=popen("($command)2>&1","r"))) {
			return 126;
		}
	
		while (!feof($p)) {
			$line=fgets($p,1000);
			if(empty($out))
				$out = $line;
			else
				$out .= $line;
		}
		pclose($p);
		return $out;
	}

	function IsPHP5() {
		return false;
	}
	
	//-------------------------------------------
	//---- CONSTRUCTOR --------------------------
	//-------------------------------------------
	function pmsFunc() {

	}
}




function &pmsFuncStatic() {
	static $pmsFunc_instance;
	
	if(!isset($pmsFunc_instance)){
		$pmsFunc_instance=new pmsFunc();
	}
	return($pmsFunc_instance); 
}



?>
Return current item: PHPMyServer