Agnaldo Posted December 1, 2011 Report Posted December 1, 2011 <?php /* Assim este arquivo fica bem menor e de fácil manutenção *//*################################################################################ Name: unitray_info.php# Developed By: The Uniform Server Development Team# Modified Last By: jAgnaldo (Ric)# Unitray Support file# Displays server information. Ports read from configuration files# Added support for USB plugin# V1.0 17-2-2010###############################################################################*///error_reporting(0); // Disable PHP errors and warnings // Comment to Enable for testing chdir(dirname(__FILE__)); // Change wd to this files locationinclude_once "../main/includes/config.inc.php";include_once "../main/includes/functions.php"; run_location_tracker(); // Have servers moved if moved update configurationprint"\n"; //=== Check for parameters passedif($argc == 2){ // Was a parameter passed $information = $argv[1] ; // yes: }else{ exit; // no: Give up} $mysql_port = get_mysql_port();$apache_port = get_apache_port();$ssl_port = get_apache_ssl_port(); $sURL_toStart[-2]="http://localhost:$apache_port/NewSite2/admin"; $sURL_toStart[-1]="http://localhost:$apache_port/NewSite1/admin"; $sURL_toStart[0]="http://www.google.com.br"; $sURL_toStart[1]="http://localhost:$apache_port/apanel/"; $sURL_toStart[2]="http://localhost:$apache_port/apanel/phpmyadmin/"; $sURL_toStart[3]="http://localhost:$apache_port/"; $sURL_toStart[4]="https://localhost:$ssl_port/"; $sURL_toStart[5]="http://localhost:$apache_port/server-info"; $sURL_toStart[6]="start http://localhost:$apache_port/server-status"; $sURL_toStart[7]="http://localhost:$apache_port/apanel/phpinfo.php"; //### Decide which browser to use either PC default browser or poetable Firefox ###if(file_exists(USF_HOSTS_PAC)){ // Does PAC file exists use portable Firefox start_firefox($sURL_toStart[$information]); exit;}else { // PAC does not exist use default brower $command = "start ".$sURL_toStart[$information]; exec($command,$dummy,$return); exit;}//end elseexit;?> Quote Agnaldo. Belo Horizonte - MG - Brasil
BobS Posted December 6, 2011 Report Posted December 6, 2011 Very interesting, Sehnor Agnaldo! Obrigado. After looking at the original code, I agree that this is factored much more effectively. I tried out the code, and it works properly. For the general audience, we'd probably not want Google do Brasil. Using your code as a base, I'll set it up for inclusion in an update to 7-Orion. Just now, we're still working on getting 8-Coral fully released. Ric does a great job of getting things running, but we all need help with the maintenance. Could I send you a list? ;-) (Just kidding, although that might be a line to follow...) Regards,BobS Quote
Agnaldo Posted December 10, 2011 Author Report Posted December 10, 2011 Estou aguardando a lista...Ajudarei no que for possível. Mas creio que a versão CORAL merece atenção total. Quote Agnaldo. Belo Horizonte - MG - Brasil
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.