File: index.example.php

package info (click to toggle)
dtc 0.35.5-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 18,824 kB
  • sloc: php: 50,739; sh: 8,596; makefile: 572; perl: 148; xml: 25
file content (92 lines) | stat: -rw-r--r-- 6,008 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?php

$doc_ind1 ='<h3><a
href="?chap=1&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#1">1 What is DTC?</a></h3>
<h4><a href="?chap=1&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#1.1">1.1 What does DTC do?</a></h4>
<h4><a href="?chap=1&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#1.2">1.2 Who should read this document?</a></h4>
<h4><a href="?chap=1&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#1.3">1.3 What are DTC good features?</a></h4>
<h4><a href="?chap=1&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#1.4">1.4 Technologies used by DTC</a></h4>
<h4><a href="?chap=1&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#1.5">1.5 DTC\'s possibilities</a></h4>
<h4><a href="?chap=1&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#1.6">1.6 How does it works</a></h4>
';
$doc_ind2 = '<h3><a href="#2?chap=2&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#2">2. Installation</a></h3>
<h4><a href="?chap=2&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#2.1">2.1 Before installing</a></h4>
<h4><a href="?chap=2&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#2.2">2.2 Configurating daemons before installing</a></h4>
<h5><a href="?chap=2&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#2.2.1">2.2.1 Mysql</a></h5>
<h5><a href="?chap=2&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#2.2.2">2.2.2 Apache</a></h5>
<h4><a href="?chap=2&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#2.3">2.3 Installation under debian</a></h4>
<h4><a href="?chap=2&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#2.4">2.4 Installation under redhat</a></h4>
<h4><a href="?chap=2&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#2.5">2.5 Installation under BSD/GENTOO</a></h4>
<h4><a href="?chap=2&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#2.6">2.6 Manuelle installation</a></h4>
<h4><a href="?chap=2&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#2.7">2.7 Post-Installation (protection via .htaccess)</a></h4>
';
$doc_ind3 = '<h3><a href="#3?chap=3&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#3">3. Configuration of DTC</a></h3>
<h4><a href="?chap=3&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#3.1">3.1 Access to configuration panel</a></h4>
<h4><a href="?chap=3&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#3.2">3.2 General configuration</a></h4>
<h4><a href="?chap=3&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#3.3">3.3 Configuration of the bind zone files</a></h4>
<h4><a href="?chap=3&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#3.4">3.4 Configuration of paths</a></h4>
';
$doc_ind4 = '<h3><a href="?chap=4&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#4">4. Using the DTC root panel</a></h3>
<h4><a href="?chap=4&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#4.1">4.1 General description</a></h4>
<h5><a href="?chap=4&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#4.1.1">4.1.1 How it works</a></h5>
<h5><a href="?chap=4&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#4.1.2">4.1.2 The web interface</a></h5>
<h4><a href="?chap=4&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#4.2">4.2 User management</a></h4>
<h5><a href="?chap=4&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#4.2.1">4.1.1 Adding a virtual admin</a></h5>
<h5><a href="?chap=4&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#4.2.2">4.2.2 Managing you client domains</a></h5>
<h4><a href="?chap=4&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#4.3">4.3 Generating daemon files</a></h4>
';
$doc_ind5 = '<h3><a href="?chap=5&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#5">5 Credit and Licence</a></h3>
<h4><a href="?chap=5&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#5.1">5.1 Licence</a></h4>
<h4><a href="?chap=5&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#5.2">5.2 Credits</a></h4>
<h4><a href="?chap=5&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'"#5.3>5.3 Greets</a></h4>
<h4><a href="?chap=5&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'#5.4">5.4 Contact</a></h4>
';
$doc_index= $doc_ind1.$doc_ind2.$doc_ind3.$doc_ind4.$doc_ind5;
$out .= '<link rel="STYLESHEET" type="text/css" href="rubs/softwares/dtc/doc.css">';
include("page_top.php");
$chap = $_REQUEST["chap"];

function read_content_file($fname){
	$fp = fopen($fname,"r");
	$out = fread($fp,filesize($fname));
	fclose($fp);
	return $out;
}

if($chap == "1" || $chap == "2" || $chap == "3" || $chap == "4" || $chap == "5"){
	$nav .= '<table width="100%" height="1"><tr>';
	$prev = $chap - 1;
	$next = $chap + 1;
	$nav .= '<td width="33%">';
	if($chap > 1)
		$nav .=  '<a href="?chap='. $prev
		.'&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'">Prev</a>';
	$nav .=  '</td><td width="33%">';
	$nav .=  '<div align="center"><a href="?chap=0&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'">Home</a>';
	$nav .=  '</div></td><td width="33%" align="right"><div align="right">';
	if($chap < 5)
		$nav .=  '<a href="?chap='. $next
		.'&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'">Next</a>';
	$nav .=  '</div></td></tr></table>';

	$out .= $nav;
	$ze_ind = "doc_ind".$chap;
	$out .= $$ze_ind;

	$fname = "rubs/softwares/dtc/".$chap.".html";
	$out .= read_content_file($fname);
}else if($chap == "all"){
	$out .= $doc_index;
	$out .= read_content_file("rubs/softwares/dtc/1.html");
	$out .= read_content_file("rubs/softwares/dtc/2.html");
	$out .= read_content_file("rubs/softwares/dtc/3.html");
	$out .= read_content_file("rubs/softwares/dtc/4.html");
	$out .= read_content_file("rubs/softwares/dtc/5.html");
}else{
	$out .= '<a href="?chap=all&rub='.$_REQUEST["rub"].'&sousrub='.$_REQUEST["sousrub"].'">All this doc in one unic big html page</a><br>';
	$out .= $doc_index;
}

echo $out;

?>