diff --git a/app/php_service/app_config.php b/app/php_service/app_config.php deleted file mode 100644 index 1c47bbc137..0000000000 --- a/app/php_service/app_config.php +++ /dev/null @@ -1,82 +0,0 @@ - \ No newline at end of file diff --git a/app/php_service/root.php b/app/php_service/root.php deleted file mode 100644 index 7b882438ea..0000000000 --- a/app/php_service/root.php +++ /dev/null @@ -1,50 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ - -// make sure the PATH_SEPARATOR is defined - if (!defined("PATH_SEPARATOR")) { - if ( strpos( $_ENV[ "OS" ], "Win" ) !== false ) { define("PATH_SEPARATOR", ";"); } else { define("PATH_SEPARATOR", ":"); } - } - -// make sure the document_root is set - $_SERVER["SCRIPT_FILENAME"] = str_replace("\\", "/", $_SERVER["SCRIPT_FILENAME"]); - $_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]); - $_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]); - //echo "DOCUMENT_ROOT: ".$_SERVER["DOCUMENT_ROOT"]."
\n"; - //echo "PHP_SELF: ".$_SERVER["PHP_SELF"]."
\n"; - //echo "SCRIPT_FILENAME: ".$_SERVER["SCRIPT_FILENAME"]."
\n"; - -// if the project directory exists then add it to the include path otherwise add the document root to the include path - if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){ - if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); } - set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' ); - } - else { - if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); } - set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] ); - } - -?> \ No newline at end of file diff --git a/app/php_service/v_php_service.php b/app/php_service/v_php_service.php deleted file mode 100644 index 4f71f9a274..0000000000 --- a/app/php_service/v_php_service.php +++ /dev/null @@ -1,176 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('php_service_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "includes/header.php"; -require_once "includes/paging.php"; - -/* -function pkg_is_service_running($servicename) -{ - exec("/bin/ps ax | awk '{ print $5 }'", $psout); - array_shift($psout); - foreach($psout as $line) { - $ps[] = trim(array_pop(explode(' ', array_pop(explode('/', $line))))); - } - if(is_service_running($servicename, $ps) or is_process_running($servicename) ) { - return true; - } - else { - return false; - } -} -*/ - -$order_by = $_GET["order_by"]; -$order = $_GET["order"]; - -//show the content - echo "
"; - echo "\n"; - echo "\n"; - echo " "; - echo ""; - echo "
\n"; - echo "
"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
PHP Service 
\n"; - echo "Manages multiple dynamic and customizable services. There are many possible uses including alerts, ssh access control, scheduling commands to run, and many others uses that are yet to be discovered.

\n"; - echo "
\n"; - - $sql = ""; - $sql .= " select * from v_php_services "; - $sql .= " where domain_uuid = '$domain_uuid' "; - if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $num_rows = count($result); - unset ($prep_statement, $result, $sql); - $rows_per_page = 10; - $param = ""; - $page = $_GET['page']; - if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } - list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page); - $offset = $rows_per_page * $page; - - $sql = ""; - $sql .= " select * from v_php_services "; - $sql .= " where domain_uuid = '$domain_uuid' "; - if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } - $sql .= " limit $rows_per_page offset $offset "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - unset ($prep_statement, $sql); - - $c = 0; - $row_style["0"] = "row_style0"; - $row_style["1"] = "row_style1"; - - echo "
\n"; - echo "\n"; - echo "\n"; - echo th_order_by('service_name', 'Name', $order_by, $order); - //echo th_order_by('service_group', 'Group', $order_by, $order); - echo th_order_by('service_enabled', 'Enabled', $order_by, $order); - echo th_order_by('service_description', 'Description', $order_by, $order); - echo "\n"; - echo "\n"; - - if ($result_count == 0) { - //no results - } - else { //received results - foreach($result as $row) { - echo "\n"; - echo " \n"; - //echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "\n"; - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach - unset($sql, $result, $row_count); - } //end if results - - echo "\n"; - echo "\n"; - echo "\n"; - - echo "
\n"; - if (permission_exists('php_service_add')) { - echo " $v_link_label_add\n"; - } - echo "
".$row[service_name]."".$row[service_group]."".$row[service_enabled]."".$row[service_description]." \n"; - if (permission_exists('php_service_edit')) { - echo " $v_link_label_edit\n"; - } - if (permission_exists('php_service_delete')) { - echo " $v_link_label_delete\n"; - } - echo "
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
 $paging_controls\n"; - if (permission_exists('php_service_add')) { - echo " $v_link_label_add\n"; - } - echo "
\n"; - echo "
"; - echo "
"; - echo "

"; - echo "

"; - - echo "
"; - echo "
"; - echo "

"; - -//show the footer - require_once "includes/footer.php"; -?> diff --git a/app/php_service/v_php_service_delete.php b/app/php_service/v_php_service_delete.php deleted file mode 100644 index 7e718f5f34..0000000000 --- a/app/php_service/v_php_service_delete.php +++ /dev/null @@ -1,82 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('php_service_delete')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -if (count($_GET)>0) { - $id = check_str($_GET["id"]); -} - -if (strlen($id)>0) { - $sql = ""; - $sql .= "select * from v_php_services "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and php_service_uuid = '$id' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - foreach ($result as &$row) { - $service_name = $row["service_name"]; - $tmp_service_name = str_replace(" ", "_", $service_name); - break; //limit to 1 row - } - unset ($prep_statement, $result, $row); - - //delete the php service file - unlink($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/secure/php_service_'.$tmp_service_name.'.php'); - //delete the start up script - unlink($startup_script_dir.'/php_service_'.$tmp_service_name.'.sh'); - //delete the pid file - unlink($tmp_dir.'/php_service_'.$tmp_service_name.'.pid'); - - $sql = ""; - $sql .= "delete from v_php_services "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and php_service_uuid = '$id' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - unset($sql); -} - -require_once "includes/header.php"; -echo "\n"; -echo "
\n"; -echo "Delete Complete\n"; -echo "
\n"; - -require_once "includes/footer.php"; -return; - -?> - diff --git a/app/php_service/v_php_service_edit.php b/app/php_service/v_php_service_edit.php deleted file mode 100644 index 6534bd2161..0000000000 --- a/app/php_service/v_php_service_edit.php +++ /dev/null @@ -1,556 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('php_service_add') || permission_exists('php_service_edit')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -/* -function pkg_is_service_running($servicename) { - exec("/bin/ps ax | awk '{ print $5 }'", $psout); - array_shift($psout); - foreach($psout as $line) { - $ps[] = trim(array_pop(explode(' ', array_pop(explode('/', $line))))); - } - if(is_service_running($servicename, $ps) or is_process_running($servicename) ) { - return true; - } - else { - return false; - } -} - -function byte_convert( $bytes ) { - if ($bytes<=0) - return '0 Byte'; - - $convention=1000; //[1000->10^x|1024->2^x] - $s=array('B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB'); - $e=floor(log($bytes,$convention)); - return round($bytes/pow($convention,$e),2).' '.$s[$e]; -} -*/ - -function php_services_sync_package_php() { - global $db, $domain_uuid, $startup_script_dir, $tmp_dir; - $sql = ""; - $sql .= "select * from v_php_services "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $tmp_prep_statement = $db->prepare(check_sql($sql)); - $tmp_prep_statement->execute(); - $tmp_result = $tmp_prep_statement->fetchAll(PDO::FETCH_NAMED); - foreach ($tmp_result as &$row) { - $service_name = $row["service_name"]; - $tmp_service_name = str_replace(" ", "_", $service_name); - $service_script = base64_decode($row["service_script"]); - //$service_enabled = $row["service_enabled"]; - $service_description = $row["service_description"]; - $php_service_file = "php_service_".$tmp_service_name.".php"; - - if ($row['service_enabled'] == "false") { - //delete the php service file - unlink($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/secure/php_service_'.$tmp_service_name.'.php'); - //delete the start up script - unlink($startup_script_dir.'/php_service_'.$tmp_service_name.'.sh'); - //delete the pid file - unlink($tmp_dir.'/php_service_'.$tmp_service_name.'.pid'); - } - else { - //write the php service - $tmp = "\\n\";\n"; - //$tmp .= " } else {\n"; - //$tmp .= " fwrite(\$fp, \$syslogmsg);\n"; - //$tmp .= " fclose(\$fp);\n"; - //$tmp .= " }\n"; - //$tmp .= "\n"; - //$tmp .= "}\n"; - //$tmp .= "\n"; - //$tmp .= "\n"; - //$tmp .= "//\$msg = \"1.begin loop. \".date('r').\"\\n\";\n"; - //$tmp .= "//\$fp = fopen('/tmp/".$tmp_service_name.".txt', 'a');\n"; - //$tmp .= "//fwrite(\$fp, \$msg.\"\\n\");\n"; - //$tmp .= "//fclose(\$fp);\n"; - - //$tmp .= "\n"; - $tmp .= $service_script; - $tmp .= "\n"; - $tmp .= "?>"; - - $fout = fopen($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/secure/'.$php_service_file,"w"); - fwrite($fout, $tmp); - unset($tmp); - fclose($fout); - - //add execute permissions to the php service script - chmod($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/secure/'.$php_service_file, 0776); - - //write the start up script - // CYGWIN_NT-5.1 - // Darwin - // FreeBSD - // HP-UX - // IRIX64 - // Linux - // NetBSD - // OpenBSD - // SunOS - // Unix - // WIN32 - // WINNT - // Windows - switch (PHP_OS) { - case "FreeBSD": - // make sure the start up directory i set - if (strlen($startup_script_dir) > 0) { - $startup_script_dir = "/usr/local/etc/rc.d"; - } - $tmp = ""; - $tmp = "#!/bin/sh\n"; - $tmp .= "# This file was automatically generated\n"; - $tmp .= "# by the PHP Service handler.\n"; - $tmp .= "# \n"; - $tmp .= "# Copy this script to the startup directory.\n"; - $tmp .= "# cp -a ".$_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/secure/php_service_".$tmp_service_name.".sh ".$startup_script_dir."/php_service_".$tmp_service_name.".sh"; - $tmp .= "# \n"; - $tmp .= "# Usage: ./php_service_".$tmp_service_name.".sh {start|stop|restart}\n"; - $tmp .= "# ".$startup_script_dir."/./php_service_".$tmp_service_name.".sh start"; - $tmp .= "\n"; - $tmp .= "\n"; - $tmp .= "rc_start() {\n"; - $tmp .= " ".PHP_BINDIR."/php ".$_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/secure/".$php_service_file." >> /var/log/php_service_".$tmp_service_name.".log &\n"; - $tmp .= "}\n"; - $tmp .= "\n"; - $tmp .= "rc_stop() {\n"; - $tmp .= " rm ".$tmp_dir."/php_service_".$tmp_service_name.".pid\n"; - $tmp .= "}\n"; - $tmp .= "\n"; - $tmp .= "case \"\$1\" in\n"; - $tmp .= " start)\n"; - $tmp .= " echo \"Starting the service. \"\n"; - $tmp .= " rc_start\n"; - $tmp .= " ;;\n"; - $tmp .= " stop)\n"; - $tmp .= " echo \"Stopping the service. \"\n"; - $tmp .= " rc_stop\n"; - $tmp .= " ;;\n"; - $tmp .= " restart)\n"; - $tmp .= " echo \"Restarting the service. \"\n"; - $tmp .= " rc_stop\n"; - $tmp .= " rc_start\n"; - $tmp .= " ;;\n"; - $tmp .= " *)\n"; - $tmp .= " echo \"Usage: ".$startup_script_dir."/php_service_".$tmp_service_name.".sh {start|stop|restart}\"\n"; - $tmp .= " exit 1\n"; - $tmp .= " ;;\n"; - $tmp .= "esac\n"; - $fout = fopen($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/secure/php_service_".$tmp_service_name.".sh","w"); - fwrite($fout, $tmp); - unset($tmp); - fclose($fout); - - //add execute permissions to the start script - chmod($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/secure/php_service_".$tmp_service_name.".sh", 0755); - - break; - default: - // make sure the start up directory i set - if (strlen($startup_script_dir) > 0) { - $startup_script_dir = "/etc/init.d"; - } - $tmp = ""; - $tmp .= "#!/bin/sh\n"; - $tmp .= "# /etc/init.d/".$tmp_service_name."\n"; - $tmp .= "# This file was automatically generated\n"; - $tmp .= "# by the PHP Service handler.\n"; - $tmp .= "# \n"; - $tmp .= "# Copy this script to the startup directory.\n"; - $tmp .= "# cp -a ".$_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/secure/php_service_".$tmp_service_name.".sh ".$startup_script_dir."/php_service_".$tmp_service_name.".sh"; - $tmp .= "# \n"; - $tmp .= "# Usage: ./php_service_".$tmp_service_name.".sh {start|stop|restart}\n"; - $tmp .= "# ".$startup_script_dir."/./php_service_".$tmp_service_name.".sh start"; - $tmp .= "\n"; - $tmp .= "\n"; - $tmp .= "rc_start() {\n"; - $tmp .= " ".PHP_BINDIR."/php ".$_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/secure/".$php_service_file." >> /var/log/".tmp_service_name.".log &\n"; - $tmp .= "}\n"; - $tmp .= "\n"; - $tmp .= "rc_stop() {\n"; - $tmp .= " rm ".$tmp_dir."/php_service_".$tmp_service_name.".pid\n"; - $tmp .= "}\n"; - $tmp .= "\n"; - $tmp .= "case \"\$1\" in\n"; - $tmp .= " start)\n"; - $tmp .= " echo \"Starting the service. \"\n"; - $tmp .= " rc_start\n"; - $tmp .= " ;;\n"; - $tmp .= " stop)\n"; - $tmp .= " echo \"Stopping the service. \"\n"; - $tmp .= " rc_stop\n"; - $tmp .= " ;;\n"; - $tmp .= " restart)\n"; - $tmp .= " echo \"Restarting the service. \"\n"; - $tmp .= " rc_stop\n"; - $tmp .= " rc_start\n"; - $tmp .= " ;;\n"; - $tmp .= " *)\n"; - $tmp .= " echo \"Usage: ".$startup_script_dir."/".$tmp_service_name.".sh {start|stop|restart}\"\n"; - $tmp .= " exit 1\n"; - $tmp .= " ;;\n"; - $tmp .= "esac\n"; - $tmp .= "\n"; - $tmp .= "exit 0"; - $fout = fopen($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/secure/php_service_".$tmp_service_name.".sh","w"); - fwrite($fout, $tmp); - unset($tmp); - fclose($fout); - - //add execute permissions to the start script - chmod($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/secure/php_service_".$tmp_service_name.".sh", 0755); - } - } //end if enabled - } -} - -//set the action as an add or an update - if (isset($_REQUEST["id"])) { - $action = "update"; - $php_service_uuid = check_str($_REQUEST["id"]); - } - else { - $action = "add"; - } - -//set the http values to variabless -if (count($_POST)>0) { - $service_name = check_str($_POST["service_name"]); - $service_script = $_POST["service_script"]; - $service_enabled = check_str($_POST["service_enabled"]); - $service_description = check_str($_POST["service_description"]); - - //set defaults - $service_type = "php"; - - //setup the default script - $tmp_service_name = str_replace(" ", "_", $service_name); - if (strlen($service_script) == 0) { - $tmp = "\n"; - $tmp .= "\n"; - $tmp .= "\$x = 0;\n"; - $tmp .= "while(\$x == 0) {\n"; - $tmp .= "\n"; - $tmp .= "\n"; - $tmp .= "\n"; - $tmp .= "\n"; - $tmp .= "\n"; - $tmp .= "\n"; - $tmp .= "\n"; - $tmp .= "\n"; - $tmp .= "\n"; - $tmp .= " if(!file_exists('".$tmp_dir."/php_service_".$tmp_service_name.".pid')) { return; }\n"; - $tmp .= " usleep(1000000); //1 000 000 microseconds = 1 second\n"; - //$tmp .= " //if (\$x > 60){ exit; } //exit after 60 loops for testing\n"; - $tmp .= "} //end while\n"; - $service_script = $tmp; - } -} - -if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { - - $msg = ''; - if ($action == "update") { - $php_service_uuid = check_str($_POST["php_service_uuid"]); - } - - //check for all required data - if (strlen($service_name) == 0) { $msg .= "Please provide: Name
\n"; } - //if (strlen($service_script) == 0) { $msg .= "Please provide: Script
\n"; } - if (strlen($service_enabled) == 0) { $msg .= "Please provide: Enabled
\n"; } - //if (strlen($service_description) == 0) { $msg .= "Please provide: Description
\n"; } - if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { - require_once "includes/header.php"; - require_once "includes/persistformvar.php"; - echo "
\n"; - echo "
\n"; - echo $msg."
"; - echo "
\n"; - persistformvar($_POST); - echo "
\n"; - require_once "includes/footer.php"; - return; - } - - //add or update the database - if ($_POST["persistformvar"] != "true") { - if ($action == "add" && permission_exists('php_service_add')) { - $php_service_uuid = uuid(); - $sql = "insert into v_php_services "; - $sql .= "("; - $sql .= "domain_uuid, "; - $sql .= "php_service_uuid, "; - $sql .= "service_name, "; - $sql .= "service_script, "; - $sql .= "service_enabled, "; - $sql .= "service_description "; - $sql .= ")"; - $sql .= "values "; - $sql .= "("; - $sql .= "'$domain_uuid', "; - $sql .= "'$php_service_uuid', "; - $sql .= "'$service_name', "; - $sql .= "'".base64_encode($service_script)."', "; - $sql .= "'$service_enabled', "; - $sql .= "'$service_description' "; - $sql .= ")"; - $db->exec(check_sql($sql)); - unset($sql); - - //create the php service files - php_services_sync_package_php(); - - require_once "includes/header.php"; - echo "\n"; - echo "
\n"; - echo "Add Complete\n"; - echo "
\n"; - require_once "includes/footer.php"; - return; - } //if ($action == "add") - - if ($action == "update" && permission_exists('php_service_edit')) { - $sql = "update v_php_services set "; - $sql .= "service_name = '$service_name', "; - $sql .= "service_script = '".base64_encode($service_script)."', "; - $sql .= "service_enabled = '$service_enabled', "; - $sql .= "service_description = '$service_description' "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and php_service_uuid = '$php_service_uuid' "; - $db->exec(check_sql($sql)); - unset($sql); - - //create the php service files - php_services_sync_package_php(); - - require_once "includes/header.php"; - echo "\n"; - echo "
\n"; - echo "Update Complete\n"; - echo "
\n"; - require_once "includes/footer.php"; - return; - } //if ($action == "update") - } //if ($_POST["persistformvar"] != "true") -} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) - -//pre-populate the form - if (count($_GET)>0 && $_POST["persistformvar"] != "true") { - $php_service_uuid = $_GET["id"]; - $sql = ""; - $sql .= "select * from v_php_services "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and php_service_uuid = '$php_service_uuid' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - foreach ($result as &$row) { - $service_name = $row["service_name"]; - $tmp_service_name = str_replace(" ", "_", $service_name); - $service_script = base64_decode($row["service_script"]); - $service_enabled = $row["service_enabled"]; - $service_description = $row["service_description"]; - break; //limit to 1 row - } - unset ($prep_statement); - } - -//include the header - require_once "includes/header.php"; - -// edit area - echo " \n"; - echo " \n"; - - echo " "; - -//show the form - echo "
"; - echo "\n"; - - echo "\n"; - echo " "; - echo " "; - echo "
\n"; - echo "
"; - - echo "
\n"; - - echo "
\n"; - echo "\n"; - - echo "\n"; - if ($action == "add") { - echo "\n"; - } - if ($action == "update") { - echo "\n"; - } - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo " \n"; - echo " "; - echo "
PHP Service AddPHP Service Edit
\n"; - echo "Manages multiple dynamic and customizable services. There are many possible uses including alerts, ssh access control, scheduling commands to run, and many others uses that are yet to be discovered.

\n"; - echo "
\n"; - echo " Name:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Enter a name.\n"; - echo "
\n"; - echo " Script:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Enter the PHP script here.\n"; - echo "
\n"; - echo " Enabled:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "\n"; - echo "
\n"; - echo " Description:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "\n"; - echo "
\n"; - if ($action == "update") { - echo " \n"; - } - echo " \n"; - echo "
"; - echo ""; - - echo "
"; - echo "
"; - -//include the footer - require_once "includes/footer.php"; -?> \ No newline at end of file