9 |
// error_reporting(E_ERROR); |
// error_reporting(E_ERROR); |
10 |
ini_set('display_errors', '1'); |
ini_set('display_errors', '1'); |
11 |
|
|
12 |
// |
$curPage = basename( $_SERVER["REQUEST_URI"] ); |
13 |
// trunk or demo are the local folders used to develop |
// echo "pageURL = $curPage<br><br><br>"; |
14 |
// this file at my own private apache server |
if (substr($curPage,0,14) == "printable.php?" ) { |
15 |
// |
// |
16 |
$pageUrlName=basename ($_SERVER['HTTP_REFERER']); |
// This means we have a printable.php?xxx.html URL |
17 |
if ( $pageUrlName == 'clonezilla-sysresccd.hellug.gr' OR $pageUrlName == "localhost" OR $pageUrlName == "demo" OR $pageUrlName == "trunk" ) $pageUrlName='index.html'; |
// let's get the xxx.html part |
18 |
$eReg="{#.*}"; |
// |
19 |
$onlyURL=preg_replace($eReg,"",$pageUrlName); |
$pageUrlName = substr( $curPage,14,strlen($curPage) ); |
20 |
// echo "pageUrlName = $pageUrlName"; |
// echo "pageUrlName = $pageUrlName<br><br><br>"; |
21 |
|
} else { |
22 |
$thePage = getcwd() . '/' . basename ($_SERVER['HTTP_REFERER']); |
// |
23 |
|
// trunk or demo are the local folders used to develop |
24 |
|
// this file at my own private apache server |
25 |
|
// |
26 |
|
$pageUrlName=basename ($_SERVER['HTTP_REFERER']); |
27 |
|
if ( $pageUrlName == 'clonezilla-sysresccd.hellug.gr' OR $pageUrlName == "localhost" OR $pageUrlName == "demo" OR $pageUrlName == "trunk" ) $pageUrlName='index.html'; |
28 |
|
$eReg="{#.*}"; |
29 |
|
$onlyURL=preg_replace($eReg,"",$pageUrlName); |
30 |
|
// echo "pageUrlName = $pageUrlName<br><br><br>"; |
31 |
|
$thePage = getcwd() . '/' . basename ($_SERVER['HTTP_REFERER']); |
32 |
|
} |
33 |
$thePage = getcwd() . '/' . $pageUrlName; |
$thePage = getcwd() . '/' . $pageUrlName; |
34 |
// echo "thePage = $thePage<br><br><br>"; |
// echo "thePage = $thePage<br><br><br>"; |
35 |
|
|