Пример #1
0
    $vnav .= "<a href='index.php?id_view={$row['id_view']}'>View {$row['id_view']}</a> ";
}
//set nav throughout
$page->tags['Nav'] = "{$vnav} <a href='setup.php'>Setup</a> <a href='history.php'>History</a>";
//get view tags
$panetags = array();
if ($id_view) {
    foreach ($page->find_tags($viewtemplate) as $tag) {
        if (substr($tag, 0, 6) == "Pane::") {
            $panetags[] = substr($tag, 6);
        }
    }
}
//db fix
if ($do == 'fixdb') {
    $blackbox->check_dbase(true);
    $backto = "setup.php";
    //Display page
    $page->tags['PageTitle'] = 'Setup';
    $page->tags['Body'] = "\r\n\t\t<h2>Database setup</h2>\r\n\t\t<p>All good.</p>\r\n\t\t<div class='buttons'>\r\n\t\t\t<input type='button' value='Close'  onClick=\"document.location.href='{$backto}';\"  />\r\n\t\t</div>\r\n\t";
    $page->render();
}
//db check
if ($do == 'checkdb') {
    $errors = $blackbox->check_dbase();
    if ($errors) {
        $errors = implode("<br/>", $errors);
        $fwdto = "setup.php?do=fixdb";
        $bodyinsert = "\r\n\t\t\t<p>Your database needs to be setup to work with new blackbox modules.</p>\r\n\t\t\t<div style='margin:10px 0; background:#ddd;'>\r\n\t\t\t\t<p>{$errors}</p>\r\n\t\t\t</div>\r\n\t\t\t<p>Assuming that your database permissions are sufficient, the necessary changes will be made by clicking Proceed below.\r\n\t\t\t<div class='buttons right'>\r\n\t\t\t\t<input type='button' value='Proceed'  onClick=\"document.location.href='{$fwdto}';\"  />\r\n\t\t\t</div>\r\n\t\t";
    } else {
        $backto = "setup.php";