/[clonezilla-sysresccd]/trunk/www/working/printable.php
ViewVC logotype

Annotation of /trunk/www/working/printable.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 77 - (hide annotations)
Thu Jun 17 22:25:06 2010 UTC (13 years, 9 months ago) by sng
File size: 4696 byte(s)
- usb.html: altering a newcode section, in order to be correctly displayed in the txtfile
- usb.html: added "using the extra space" section
- printable.php: added a missing class definition

1 sng 28 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2     <html>
3     <head>
4     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5     <link rel="alternate" type="application/rss+xml" title="RSS" href="http://clonezilla-sysresccd.hellug.gr/clonezilla-sysresccd.rss">
6     <link rel="shortcut icon" href="favicon.ico">
7     <?php
8     error_reporting(E_ALL);
9     ini_set('display_errors', '1');
10    
11     $pageUrlName=basename ($_SERVER['HTTP_REFERER']);
12     if ( $pageUrlName == 'clonezilla-sysresccd.hellug.gr' OR $pageUrlName == "localhost" OR $pageUrlName == "demo") $pageUrlName='index.html';
13    
14     $eReg="#.*";
15     $onlyURL=ereg_replace($eReg,"",$pageUrlName);
16    
17     // echo "pageUrlName = $pageUrlName";
18     if (substr($onlyURL,strlen($pageUrlName)-3,3) == "php" OR substr($onlyURL,strlen($pageUrlName)-6,6) == "php?el")
19     $thePage = "http://clonezilla-sysresccd.hellug.gr/" . $pageUrlName;
20     // $thePage = "http://localhost/" . $pageUrlName;
21     else {
22     //echo "Basename = $pageUrlName\n";
23     $thePage = getcwd() . '/' . basename ($_SERVER['HTTP_REFERER']);
24     $thePage = getcwd() . '/' . $pageUrlName;
25     }
26    
27     // echo "$thePage";
28     $file = file_get_contents ($thePage);
29    
30     $eReg="<title>[^<]*</title>";
31     $reg=array("0","0","0");
32     ereg($eReg,$file,$reg);
33     // echo "$reg[0]";
34    
35    
36     // // Find copyright and last update
37     $eReg="Copyright: .*@.*gr&gt;</a>";
38     if(ereg($eReg,$file,$reg)){
39     $copr="$reg[0]";
40     }else{
41     $eReg="Πνευματικά δικαιώματα: .*@.*gr&gt;</a>";
42     ereg($eReg,$file,$reg);
43     $copr="$reg[0]";
44     }
45     $eReg="<font size=\"-1\">[^<]*: [0-9][0-9]/[0-9][0-9]/[0-9][0-9][0-9][0-9]</font>";
46     ereg($eReg,$file,$reg);
47     $upd="$reg[0]";
48     ?>
49     <style type="text/css">
50     body { background : url(null) fixed no-repeat; background-color: White; }
51     H1,H2,H3{color: #990000; text-align: left;}
52     H1{margin-top: 4em; margin-bottom: 2em;}
53     H2{margin-top: 2em;}
54     H3{margin-top: 1.5em}
55     li{margin-top: 1em;}
56     :link { color: #0000C0; text-decoration: none; }
57     :visited { color: #0000C0; text-decoration: none; }
58     a:hover { color: #0000C0; text-decoration: underline; }
59     /*p,td,table,tr,li{margin-left: 15pt;}*/
60     .nav{margin-left: 0pt;}
61 sng 77 .otherpage{border: solid 1px darkgoldenrod; padding: 20pt; background-color: lemonchiffon;}
62 sng 28 .newcode{font-family : "Courier New", Courier, monospace, sans-serif, serif; font-weight: bold; background-color: #F2F2F2; border: solid 1px #DEDEDE;padding: 20pt;}
63     .note{margin-top: 30pt; margin-bottom: 30pt; text-align: center; background-color: #FFEFEF; border: solid 1px; border-color: #FFD5D5;}
64     hr{color: Black; background-color: Black; height: 1px; border: none;}
65     #header {color: #990000; }
66     </style>
67     <META NAME="Keywords" CONTENT="multiboot Multi Boot bootable cd rescue clonezilla sysresccd">
68     </head>
69     <body style="margin-left: 40pt; margin-right: 40pt;">
70     <?php
71     $eReg=".*<body[^>]*>";
72     $file = ereg_replace($eReg,"",$file);
73     $eReg="<.body>.*";
74     $file = ereg_replace($eReg,"",$file);
75    
76     $eReg= "<" . "!" . "--site-only--" . ">" . ".*" . "<hr style=\"margin: 0;\"><". "!" . "--end-site-only--" . ">";
77     $file = ereg_replace($eReg,"",$file);
78     $eReg= "<" . "!" . "--site-only--" . ">" . ".*" . "<". "!" . "--end-site-only--" . ">";
79     $file = ereg_replace($eReg,"",$file);
80    
81     // // Remove [^] links
82     $eReg="\[<a [^<]*\^\^*</a>\]";
83     //$eReg = '\[';
84     $file = ereg_replace($eReg,"",$file);
85    
86     // search for <!--H1--></H1>
87     // if found, this is site onepage.php
88     $eReg="<!--copyright data only here--></H1>";
89     if(strpos($file,$eReg) === false) $eReg="</H1>";
90     $toStr="</H1>\n<p><font size=\"-1\">" . $copr . "<br></font>" . $upd . "<br><br></p>";
91     $file = ereg_replace($eReg,$toStr,$file);
92    
93     //$eReg= "<div id=\"lphp\"" . ".*" . "<\/div>";
94     $eReg = "<div id=.rss.>.*<!-- docline-top-->";
95     $file = ereg_replace($eReg,"<!-- docline-top-->",$file);
96    
97    
98     $eReg = "<div id=.linkline.>.*<div id=.contarea.>";
99     $file = ereg_replace($eReg,"<div id=\"contarea\">",$file);
100    
101    
102     $eReg = "<div id=.lphp.*<H2>Clonezilla-SysRescCD</H2>";
103     $file = ereg_replace($eReg,"<H2>Clonezilla-SysRescCD</H2>",$file);
104    
105    
106     $eReg = "<div id=.menu.>.*</div>";
107     $file = ereg_replace($eReg,"",$file);
108    
109     $eReg = "</H2>[^<]*<H3>";
110     $file = ereg_replace($eReg,"<br>",$file);
111    
112     $eReg = "<H2 style=.margin-top: 0;.>";
113     $file = ereg_replace($eReg,"<H2 style=\"margin-top: 4em;\">",$file);
114    
115    
116     $file = str_replace("position: absolute; left: 0px;","position: absolute; left: 40pt;",$file);
117     $file = str_replace("position: absolute; right: 0px;","position: absolute; right: 40pt;",$file);
118     //position: absolute; right: 0px;
119    
120    
121     $eReg = "</H4></div>.*<div style=.position: absolute; right: 40pt;.><H4>";
122     $file = ereg_replace($eReg,"<br>",$file);
123    
124    
125     $eReg = "<div id=.footer.>.*</div>";
126     $file = ereg_replace($eReg,"",$file);
127    
128    
129     echo $file;
130     echo "</div>
131     ";
132    
133     ?>
134     </body>
135     </html>

Properties

Name Value
svn:executable *

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26