Location: PHPKode > projects > Multimedia2Multimedia > mm2mm/include/check_dependency.php
<?php
if ( $config['htmlcomm'] == true ) echo ("<!-- check_dependency.php BEGIN -->
");

if ( ( $what2check != false ) )
	system("exec 2>&1; mkdir -p /tmp/mm2mm/");

if ( ( $what2check == "lsdvd" ) OR ( $what2check == "all" ) )
	if (file_exists("/usr/bin/lsdvd")) $lsdvd = true;	else $lsdvd = false;

if ( ( $what2check == "transcode" ) OR ( $what2check == "all" ) )
	if (file_exists("/usr/bin/transcode")) $transcode = true; else $transcode = false;

if ( ( $what2check == "lame" ) OR ( $what2check == "all" ) )
	if (file_exists("/usr/bin/lame")) $lame = true;	else $lame = false;

if ( ( $what2check == "wwwincdgroup" ) OR ( $what2check == "all" ) ) {
	system("exec 2>&1; groups | grep -c cdrom > /tmp/mm2mm/group");
	$handle = fopen("/tmp/mm2mm/group", "r");
	$buffer = fgets($handle);
	if ( $buffer == 1 ) $wwwincdgroup = true; else $wwwincdgroup = false;
	}

if ( $what2check == "all" ) {
	if ( $lsdvd == false ) echo("Paket: \"lame\" fehlt<br>");
	if ( $transcode == false ) echo("Paket: \"transcode\" fehlt<br>");
	if ( $lame == false ) echo("Paket: \"lsdvd\" fehlt<br>");
	if ( $wwwincdgroup == false ) echo("User des Webservers \"www-data\" ist nicht in Gruppe \"cdrom\"");
	}
if ( $config['htmlcomm'] == true ) echo ("<!-- check_dependency.php END -->
");
?>
Return current item: Multimedia2Multimedia