/Documentation/ReferenceManualScripts/related/index.php

https://github.com/aivanov-cern/cmssw · PHP · 95 lines · 75 code · 19 blank · 1 comment · 8 complexity · f4721a65eb18eb405717c080086a3043 MD5 · raw file

  1. <html>
  2. <head>
  3. <link type="text/css" rel="stylesheet" href="http://cmssdt.cern.ch/SDT/doxygen/doxygen_php_files/doxygen.css">
  4. <style>
  5. .roundbox{
  6. margin:5px;
  7. padding:5px;
  8. -moz-background-clip: border;
  9. -moz-background-inline-policy: continuous;
  10. -moz-background-origin: padding;
  11. -moz-border-radius-bottomleft: 15px;
  12. -moz-border-radius-bottomright: 15px;
  13. -moz-border-radius-topleft: 15px;
  14. -moz-border-radius-topright: 15px;
  15. -webkit-border-radius: 15px;
  16. -moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
  17. background: #cccccc none repeat scroll 0 0;
  18. width:115px;
  19. }
  20. </style>
  21. </head>
  22. <body style="padding:20px; background-color:lightBlue;">
  23. <center>
  24. <h1>CMSSW Reference Manual (doxygen)</h1>
  25. <h2>Click on a version </h2>
  26. </center>
  27. <?php
  28. function getDirectoryList ($directory)
  29. {
  30. $results = array();
  31. $handler = opendir($directory);
  32. while ($file = readdir($handler)) {
  33. if (is_dir($file) && strpos($file, "CMSSW") === 0) {
  34. $version = explode("_", $file);
  35. $version_list[$version[1]][$version[2]][$version[3]][] = $file;
  36. }
  37. }
  38. closedir($handler);
  39. return $version_list;
  40. }
  41. function getDirList()
  42. {
  43. $output = trim(shell_exec("ls -rs /data/doxygen | grep CMSSW | awk -F \" \" '{print $2}'"));
  44. $arr = explode("\n", $output);
  45. foreach($arr as $file){
  46. if (strpos($file, "CMSSW") === 0) {
  47. $version = explode("_", $file);
  48. $version_list[$version[1]][$version[2]][$version[3]][] = $file;
  49. }
  50. }
  51. return $version_list;
  52. }
  53. $BASE = "http://cmssdt.cern.ch/SDT/doxygen/";
  54. //$level1 = getDirectoryList("/data/sdt/SDT/doxygen");
  55. $level1 = getDirList();
  56. krsort($level1);
  57. while (list ($key1, $level2) = each ($level1) ){
  58. krsort($level2);
  59. while (list ($key2, $level3) = each ($level2) ) {
  60. krsort($level3);
  61. echo "<hr><div class=\"roundbox\"><b>CMSSW_".$key1."_".$key2."_* </b></div>";
  62. while (list ($key3, $values) = each ($level3) ) {
  63. echo "<div class=\"tabs\" style=\"margin-left:150px; width:auto\"><ul class=\"tablist\" style=\"margin:0px;\">";
  64. sort($values);
  65. while (list ($key, $value) = each ($values) ) {
  66. echo "<li><a target=\"_blank\" href=".$BASE.$value."/doc/html>".$value."</a></li> ";
  67. }
  68. echo("</ul></div>");
  69. }
  70. }
  71. }
  72. ?>
  73. <hr>
  74. <center><a href="mailto:mantas.stankevicius@cern.ch">Contact</a></center>
  75. </body>
  76. </html>