PageRenderTime 22ms CodeModel.GetById 10ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 1ms

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