fix observations

fix the timezone import
This commit is contained in:
Henry Jordan
2020-06-15 17:42:10 +00:00
parent 1327b1766b
commit 09cbb6061d
6 changed files with 133 additions and 143 deletions

View File

@@ -1,37 +1,27 @@
<?php
use Illuminate\Support\Facades\Log;
try {
$category = (isset($_GET["category"]))? $_GET["category"] : null;
/* Render page */
$oHeadPublisher = headPublisher::getSingleton();
$pmDynaform = new PmDynaform(array());
$G_MAIN_MENU = "processmaker";
$G_ID_MENU_SELECTED = "ID_SCHEDULER_MNU_01";
$dateTime = new \ProcessMaker\Util\DateTime();
if (!empty($_SESSION['USER_LOGGED'])) {
$arrayTimeZoneId = \DateTimeZone::listIdentifiers();
$js = "" .
"<script type='text/javascript'>\n" .
"var timezoneArray = " . G::json_encode($arrayTimeZoneId) . ";\n" .
"</script>\n";
echo($js);
global $G_PUBLISH;
$G_PUBLISH = new Publisher();
$headPublisher = headPublisher::getSingleton();
$category = (isset($_GET["category"]))? $_GET["category"] : null;
/* Render page */
}
$pmDynaform = new PmDynaform([]);
if (!empty($_SESSION['USER_LOGGED'])) {
$arrayTimeZoneId = DateTimeZone::listIdentifiers();
$fields["timezoneArray"] = G::json_encode($arrayTimeZoneId);
}
$js = "" .
"<script type=\"text/javascript\" src=/js/ext/translation.".SYS_LANG.".".G::browserCacheFilesGetUid() .".js></script>\n".
"<script type='text/javascript'>\n" .
"var server = '" . System::getHttpServerHostnameRequestsFrontEnd() . "';\n" .
"var credentials = " . G::json_encode($pmDynaform->getCredentials()) . ";\n" .
"var category = '" . $category . "';\n" .
"var lang = '" . SYS_LANG . "';\n" .
"var workspace = '" .config("system.workspace") . "';\n" .
"</script>\n";
echo($js);
$fields["server"] = System::getHttpServerHostnameRequestsFrontEnd();
$fields["credentials"] = G::json_encode($pmDynaform->getCredentials());
$fields["category"] = $category;
$fields["lang"] = SYS_LANG;
$fields["workspace"] = config("system.workspace");
$fields["translation"] = "/js/ext/translation.".SYS_LANG.".".G::browserCacheFilesGetUid().".js";
$file = file_get_contents(PATH_HOME . 'public_html/lib/taskscheduler/index.html');
echo $file;
$G_PUBLISH->addContent('smarty','scheduler/index.html','', '', $fields); //Adding a HTML file .html
$G_PUBLISH->addContent('smarty',PATH_HOME . 'public_html/lib/taskscheduler/index.html'); //Adding a HTML file .html
G::RenderPage("publish", "raw");
} catch (Exception $e) {
}
?>
echo($e);
}