4 $public_html =
"$home_path/public_html/";
7 $http_scheme = $SYSENV[
'require_encryption'] ?
'https' :
'http';
8 $http_url =
"{$http_scheme}://{$_SERVER['HTTP_HOST']}";
10 $dp = popen(
"ls -1ra ${public_html}.*.html",
"r");
14 $filename = fgets($dp, 4096);
15 if ($filename ==
"") {
18 $filename = str_replace(
"\n",
"", $filename);
19 $fp = fopen (
"$filename",
"r");
22 $buffer = fgets($fp, 4096);
23 if (preg_match (
"/<title>(.*)<\/title>/i",$buffer,$matches)){
31 $filename = str_replace($public_html .
".",
"", $filename);
33 if (trim($filename !=
"")) {
40 "link" =>
"javascript:openwin('$filename')" 46 <script type=
"text/javascript">
47 var cu =
"<?php echo $chome; ?>";
48 var host =
"<?php echo $http_url; ?>";
50 var gridData = <?php echo HCU_JsonEncode($fileArray); ?>;
53 $(document).ready(
function(e) {
54 gridFiles = $(
"#gridFiles").kendoGrid({
59 template:
"No editable web pages were found." 63 title:
"Available Web Pages" 65 rowTemplate: kendo.template($(
"#gridRowTamplate").html())
69 function openwin(file) {
71 var date =
new Date();
72 var link = host +
"/fi/" + cu +
"/." + file +
"?t=" + date.getTime();
74 var wnd = window.open(link,
"FORM",
"scrollbars=yes, resizable=yes");
78 <script type=
"text/x-kendo-tmpl" id=
"gridRowTamplate">
79 <tr data-uid=
"#: uid #">
81 <span
class=
"fa fa-file"></span> 
82 <a href=
"#: data.link #">#: data.name #</a>
87 <style type=
"text/css"></style>
89 <div
class=
"container-fluid">
90 <h2>Editable Web Pages</h2>
91 <div
id=
"gridFiles"></div>