コード例 #1
0
ファイル: liste.php プロジェクト: AndreasWebdev/ivcms5
 public function get($data)
 {
     if ($this->opcol) {
         $this->add($this->opcol);
     }
     parent::get($data);
 }
コード例 #2
0
<style>
	code { background: none; border: none; width: 100%; overflow: auto; display: block; }
</style><?php 
if (empty($_GET['server'])) {
    $form = new form(IV_SELF, 'Pekete auflisten', 'get');
    $form->hidden('modul', 'iv.packageinspector');
    $form->text('server', 'Server-URL');
    $view->box($form, 'Paketliste abrufen');
} elseif (empty($_GET['package'])) {
    $url = $_GET['server'] . '?interface=iv.exchange&plain';
    if (!($packages = json_decode(file_get_contents($url), true))) {
        throw new Exception('Invalid Server');
    }
    $list = new list_array($link = MODUL_SELF . '&server=' . $_GET['server']);
    $list->text('Name', 'name');
    $list->text('Autor', 'autor');
    $list->text('Beschreibung', 'description');
    $list->add(new list_column_actions('Aktionen'))->add($link, 'package', 'Anzeigen', 'assets/small/camera.png');
    $view->box($list->get($packages), 'Paketliste');
} else {
    $url = $_GET['server'] . '?interface=iv.exchange&package=' . $_GET['package'] . '&plain';
    if (!($package = json_decode(file_get_contents($url), true))) {
        throw new Exception('Invalid Package');
    }
    foreach ($package['files'] as $file) {
        $view->box(highlight_string(base64_decode($file['content']), true), $file['path']);
    }
}
コード例 #3
0
    db()->update_migration->delRow($_GET['reset']);
    throw new redirect(MODUL_SELF);
}
if (!empty($_GET['install'])) {
    $view->format = 'plain';
    $migrations->install($_GET['install']);
} else {
    $all = globFiles('migration/*');
    $applied = db()->select('update_migration')->assocs('id');
    $result = $pending = array();
    foreach ($all as $id) {
        $result[] = array('id' => $id, 'status' => isset($applied[$id]) ? 'applied' : 'pending', 'date' => $applied['create_date']);
        if (empty($applied[$id])) {
            $pending[] = $id;
        }
    }
    $grid = $view->grid();
    $view->js('assets/js/migration.js');
    $form = new form_renderer(MODUL_SELF, 'Erstellen');
    $form->text('create', 'Migrationsname');
    $grid[0]->box($form, 'Migration erstellen');
    $grid[0]->box(template('iv.migrations.install')->render(array('pending' => $pending)), 'Migrationen anwenden');
    $list = new list_array(MODUL_SELF);
    $list->text('Datei', 'id');
    $list->text('Status', 'status');
    $list->date('Datum', 'date');
    $list->add($actions = new list_column_actions('Aktionen'));
    $actions->add(MODUL_SELF, 'apply', 'Mark Applied', 'assets/small/check.png');
    $actions->add(MODUL_SELF, 'reset', 'Reset', 'assets/small/undo.png');
    $grid[1]->box($list->get($result), 'Migrationen', '600px');
}