1523 |
|
|
1524 |
// try to add dir to script name to realm var |
// try to add dir to script name to realm var |
1525 |
if (is_dir("$fsRealmDir/$realm/".dirname($HTTP_SERVER_VARS[SCRIPT_NAME]))) { |
if (is_dir("$fsRealmDir/$realm/".dirname($HTTP_SERVER_VARS[SCRIPT_NAME]))) { |
1526 |
$realm .= "/".dirname($HTTP_SERVER_VARS[SCRIPT_NAME]); |
$realm .= dirname($HTTP_SERVER_VARS[SCRIPT_NAME]); |
1527 |
$realm_sep = "/"; |
$realm_sep = "/"; |
1528 |
} else { |
} else { |
1529 |
$realm_sep = "."; |
$realm_sep = "."; |
1818 |
// $A=Co : checkout file $D/$F |
// $A=Co : checkout file $D/$F |
1819 |
// $A=Ci : checkin file $D/$F |
// $A=Ci : checkin file $D/$F |
1820 |
// $A=V : view file (do nothing except log) |
// $A=V : view file (do nothing except log) |
1821 |
// $A=I : include file .$F.php from $gblFsRoot |
// $A=I : include file .$F.php from [$gblIncDir|realm]/include_php |
1822 |
// default : display directory $D |
// default : display directory $D |
1823 |
|
|
1824 |
switch ($A) { |
switch ($A) { |
1873 |
EndHTML() ; |
EndHTML() ; |
1874 |
exit; |
exit; |
1875 |
case "I" : |
case "I" : |
1876 |
$F=stripSlashes($F); |
if (! isset($F) || $F == "") |
1877 |
$inc_file="${gblFsRoot}/.${F}.php"; |
Error("Can't find file to include","Your request didn't specify file to include which should be in variable <tt>F</tt> like <tt>$HTTP_SERVER_VARS[REQUEST_URI]<b>&F=include_php_file</b></tt>",1); |
1878 |
if (!isset($F) || $F == "" || !file_exists($inc_file)) Error("Fatal error $inc_file"); // can't find file to include |
if (file_exists("$gblIncDir/include_php/$F.php")) { |
1879 |
|
$inc_file="$gblIncDir/include_php/${F}.php"; |
1880 |
|
} elseif (file_exists("$fsRealmDir/$realm/$F.php")) { |
1881 |
|
$inc_file="$fsRealmDir/$realm/${F}.php"; |
1882 |
|
} else { |
1883 |
|
Error("Can't find file to include","Can't find include file <tt>$F.php</tt> in <tt>$gblIncDir/include_php/<tt> nor <tt>$fsRealmDir/$realm/</tt>",1); |
1884 |
|
} |
1885 |
if (!is_readable($inc_file)) |
if (!is_readable($inc_file)) |
1886 |
Error("Read access to include file denied",".${F}.php"); |
Error("Read access to include file denied","Can't read PHP include file <tt>$inc_file</tt>. Fix permissions on it."); |
1887 |
$text = "Your include file should define \$text variable which holds this text and \$title variable which is page title"; |
$text = "Your include file should define \$text variable which holds this text and \$title variable which is page title"; |
1888 |
$title = "You should define \$title variable with page title"; |
$title = "You should define \$title variable with page title"; |
1889 |
include($inc_file); |
include($inc_file); |