コード例 #1
0
ファイル: index.php プロジェクト: CicadaMikoto/generatedata
// used in the settings page
$pageParams["allCountryPlugins"] = Core::$countryPlugins;
$pageParams["allExportTypes"] = $exportTypes;
$pageParams["groupedDataTypes"] = Core::$dataTypePlugins;
$pageParams["allDataTypes"] = $dataTypes;
$pageParams["allTranslations"] = Core::$translations->getList();
$useMinifiedResources = Core::isUsingMinifiedResources();
$pageParams["useMinifiedResources"] = $useMinifiedResources;
if ($useMinifiedResources) {
    $pageParams["minifiedResourcePaths"] = Minification::getMinifiedResourcePaths();
}
$pageParams["dataTypeJSModules"] = $dataTypeJSModules;
$pageParams["exportTypeJSModules"] = $exportTypeJSModules;
$pageParams["exportTypeAdditionalSettings"] = $exportTypeAdditionalSettings;
$pageParams["settings"] = $settings;
$pageParams["cssIncludes"] = $cssIncludes;
$pageParams["codeMirrorIncludes"] = ExportTypePluginHelper::getExportTypeCodeMirrorModes($exportTypes);
$pageParams["defaultExportType"] = Core::$user->getDefaultExportType();
$pageParams["defaultNumRows"] = Core::getDefaultNumRows();
if (Core::checkIsLoggedIn()) {
    $pageParams["isLoggedIn"] = true;
    $pageParams["accountType"] = Core::$user->getAccountType();
    $pageParams["selectedDataTypes"] = Core::$user->getSelectedDataTypes();
    $pageParams["selectedExportTypes"] = Core::$user->getSelectedExportTypes();
    $pageParams["selectedCountries"] = Core::$user->getSelectedCountries();
} else {
    $pageParams["isLoggedIn"] = false;
    $pageParams["accountType"] = "";
}
Templates::displayPage("resources/templates/index.tpl", $pageParams);
コード例 #2
0
<?php

require_once "library.php";
Core::init();
// if need be, redirect to the install instructions page
Utils::maybeShowInstallationPage();
if (Core::checkIsLoggedIn()) {
    header("location: ./");
    exit;
}
$pageParams = array();
Templates::displayPage("resources/templates/login.tpl", $pageParams);
コード例 #3
0
ファイル: install.php プロジェクト: mdb-webdev/generatedata
<?php

require_once "library.php";
Core::init("installation");
// if the script is already installed, redirect them to the index page.
if (Core::checkIsInstalled()) {
    header("location: index.php");
    exit;
}
$currentPage = 1;
if (Core::checkSettingsFileExists()) {
    $currentPage = 3;
    if (Settings::getSetting("installationStepComplete_Core") == "yes") {
        $currentPage = 4;
    }
}
$params = array();
$params["theme"] = Core::getDefaultTheme();
$params["randomPassword"] = Utils::generateRandomAlphanumericStr("CVxxCxV");
$params["tablePrefix"] = Core::getDbTablePrefix();
$params["currentPage"] = $currentPage;
Templates::displayPage("resources/templates/install.tpl", $params);
コード例 #4
0
 /**
  * Helper function for use by any of the modules (or Core). It lets
  * @param string $template the template (.tpl file) and path from the Generate Data root.
  * @param array $placeholders
  * @return string
  */
 public static function evalSmartyTemplate($template, $placeholders)
 {
     return Templates::displayPage($template, $placeholders, "return");
 }