Esempio n. 1
0
 public static function run()
 {
     require_once 'library/Smarty/Smarty.class.php';
     require_once 'core/Loader.class.php';
     date_default_timezone_set("Asia/Shanghai");
     Loader::init();
     Factory::run();
 }
Esempio n. 2
0
<?php

include 'config.php';
//上传文件处理
if (!empty($_FILES)) {
    foreach ($_FILES['dkAddFile']['error'] as $key => $error) {
        if ($error == UPLOAD_ERR_OK) {
            $tmp_name = $_FILES['dkAddFile']['tmp_name'][$key];
            $name = $_FILES['dkAddFile']['name'][$key];
            $fileName = $_FILES['dkAddFile']['name'];
            move_uploaded_file($tmp_name, "./{$name}");
        }
    }
}
isset($_GET['all']) && (print Factory::run($_GET['all']));
isset($_GET['ctnerId']) && (print Factory::run(explode(' ', $_GET['ctnerId'])));
isset($_GET['newCtnerName']) && (print Factory::run(explode(' ', $_GET['ctnerId']), $_GET['newCtnerName']));
isset($_GET['imgId']) && (print Factory::run(explode(' ', $_GET['imgId'])));
isset($_POST['dkTag']) && isset($_POST['dkFileData']) && (print Factory::run($_POST['dkTag'], $_POST['dkFileData']));
$_GET['target'] == 'DockerChart' && (print Factory::run());
$_GET['target'] == 'DockerInfo' && (print Factory::run());
if (isset($_GET['newTag'])) {
    list($newRepo, $newTag) = explode(':', $_GET['newTag']);
    if (!isset($newTag)) {
        $newTag = 'latest';
    }
    Factory::run(explode(' ', $_GET['imgId']), $newRepo, $newTag);
}
Esempio n. 3
0
<?php

require 'Classes/Factory.class.php';
$doc = new Factory();
$doc->run(0);
//参数 = 0 输出List格式的lua,参数 = 1 输出Map格式的lua