From d61ff6d21868d7310e06bdd0fe731658a0aafabe Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 21 Apr 2008 06:52:02 +0000 Subject: [PATCH] A better index page --- build/exe/doliwamp/index.php.install | 65 +++++++++++++++------------- 1 file changed, 36 insertions(+), 29 deletions(-) diff --git a/build/exe/doliwamp/index.php.install b/build/exe/doliwamp/index.php.install index 19ccc548761..dc571e23743 100644 --- a/build/exe/doliwamp/index.php.install +++ b/build/exe/doliwamp/index.php.install @@ -13,14 +13,14 @@ //chemin jusqu'aux fichiers alias $aliasDir = '../alias/'; - +$appDir = '../apps/'; //on récpères les versions des applis -$phpVersion = 'WAMPPHPVERSION'; -$apacheVersion = 'WAMPAPACHEVERSION'; -$mysqlVersion = 'WAMPMYSQLVERSION'; +$phpVersion = '5.2.5'; +$apacheVersion = '2.2.6'; +$mysqlVersion = '5.0.45'; @@ -41,10 +41,10 @@ $langues = array( 'versm' => 'MySQL Version :', 'phpExt' => 'Loaded Extensions : ', 'titrePage' => 'Tools', - 'txtProjet' => 'Your Projects', - 'txtNoProjet' => 'No projects yet.
To create a new one, just create a directory in \'www\'.', - 'txtAlias' => 'Your Aliases', - 'txtNoAlias' => 'No Alias yet.
To create a new one, use the WAMP5 menu.', + 'txtAlias' => 'Your aliased softwares', + 'txtNoAlias' => 'No Alias found.', + 'txtProjet' => 'Your Softwares', + 'txtNoProjet' => 'No softwares yet. To create a new one, just create a directory in \'www\'.', 'faq' => 'http://www.en.wampserver.com/faq.php' ), 'fr' => array( @@ -58,10 +58,10 @@ $langues = array( 'versm' => 'Version de MySQL:', 'phpExt' => 'Extensions Chargées: ', 'titrePage' => 'Outils', - 'txtProjet' => 'Vos Projets', - 'txtNoProjet' => 'Aucun projet.
Pour en ajouter un nouveau, créez simplement un répertoire dans \'www\'.', - 'txtAlias' => 'Vos Alias', - 'txtNoAlias' => 'Aucun alias.
Pour en ajouter un nouveau, utilisez le menu de WAMP5.', + 'txtAlias' => 'Alias d\'applications', + 'txtNoAlias' => 'Aucun alias.', + 'txtProjet' => 'Autres applications (sans alias)', + 'txtNoProjet' => 'Aucune application hors alias. Pour en ajouter un nouveau, créez simplement un répertoire dans \'www\'.', 'faq' => 'http://www.wampserver.com/faq.php' ) ); @@ -268,8 +268,15 @@ else } +// Read PHP extensions +$loaded_extensions = get_loaded_extensions(); +foreach ($loaded_extensions as $extension) + $phpExtContents .= "
  • ${extension}
  • "; -// recuperation des alias + + +// Read alias +$aliasarray=array(); if (is_dir($aliasDir)) { $handle=opendir($aliasDir); @@ -278,23 +285,29 @@ if (is_dir($aliasDir)) if (is_file($aliasDir.$file) && ereg('.conf',$file)) { $msg = ''; - $aliasContents .= '
  • '.ereg_replace('.conf','',$file).'
  • '; + $aliasContents .= '
  • '; + $file = ereg_replace('.conf','',$file); + if (eregi('dolibarr',$file)) $aliasContents .= $file.' (URL=http://ipofyourserver:81/'.$file.'/)'; + if (eregi('phpmyadmin',$file)) $aliasContents .= $file.' (URL=http://ipofyourserver:81/'.$file.'/)'; + $aliasContents.='
  • '; + $aliasarray[]=$file; } } closedir($handle); } if (!isset($aliasContents)) $aliasContents = $langues[$langue]['txtNoAlias']; + - -// recuperation des projets +// Read projects in www dir $handle=opendir("."); while ($file = readdir($handle)) { - if (is_dir($file) && !in_array($file,$projectsListIgnore)) + if (is_dir($file) && !in_array($file,$projectsListIgnore) && !in_array($file,$aliasarray)) { - $projectContents .= '
  • '.$file; - if ($file == 'dolibarr') $projectContents .= ' (URL=http://ipofyourserver:WAMPAPACHEPORT/'.$file.'/)'; + $projectContents .= '
  • '; + if (eregi('dolibarr',$file)) $projectContents .= $file.' (URL=http://ipofyourserver:81/'.$file.'/)'; + if (eregi('phpmyadmin',$file)) $projectContents .= $file.' (URL=http://ipofyourserver:81/'.$file.'/)'; $projectContents .= '
  • '; } } @@ -303,12 +316,6 @@ if (!isset($projectContents)) $projectContents = $langues[$langue]['txtNoProjet']; -// recuperation des extensions PHP -$loaded_extensions = get_loaded_extensions(); -foreach ($loaded_extensions as $extension) - $phpExtContents .= "
  • ${extension}
  • "; - - $pageContents = <<< EOPAGE @@ -464,14 +471,14 @@ a:hover {
  • phpinfo()
  • phpmyadmin
  • -

    {$langues[$langue]['txtProjet']}

    -

    {$langues[$langue]['txtAlias']}

    +

    {$langues[$langue]['txtProjet']}

    +