Exemplo n.º 1
0
            headerFunction("../projects/viewproject.php?id={$project}&msg=deleteFile&" . session_name() . "=" . session_id());
            exit;
        }
    }
}
$tmpquery = "WHERE pro.id = '{$project}'";
$projectDetail = new request();
$projectDetail->openProjects($tmpquery);
if ($task != "0") {
    $tmpquery = "WHERE tas.id = '{$task}'";
    $taskDetail = new request();
    $taskDetail->openTasks($tmpquery);
}
include '../themes/' . THEME . '/header.php';
$blockPage = new block();
$blockPage->openBreadcrumbs();
$blockPage->itemBreadcrumbs($blockPage->buildLink("../projects/listprojects.php?", $strings["projects"], in));
$blockPage->itemBreadcrumbs($blockPage->buildLink("../projects/viewproject.php?id=" . $projectDetail->pro_id[0], $projectDetail->pro_name[0], in));
if ($task != "0") {
    $blockPage->itemBreadcrumbs($blockPage->buildLink("../tasks/listtasks.php?project=" . $projectDetail->pro_id[0], $strings["tasks"], in));
    $blockPage->itemBreadcrumbs($blockPage->buildLink("../tasks/viewtask.php?id=" . $taskDetail->tas_id[0], $taskDetail->tas_name[0], in));
}
$blockPage->itemBreadcrumbs($strings["unlink_files"]);
$blockPage->closeBreadcrumbs();
if ($msg != "") {
    include '../includes/messages.php';
    $blockPage->messagebox($msgLabel);
}
$block1 = new block();
$block1->form = "saC";
$block1->openForm("../linkedcontent/deletefiles.php?project={$project}&task={$task}&action=delete&id={$id}&sendto={$sendto}&" . session_name() . "=" . session_id());
Exemplo n.º 2
0
function upgrade2_4()
{
    include "../languages/help_en.php";
    $setTitle = "PhpCollab Upgrade";
    $blank = "true";
    include "../themes/" . THEME . "/block.class.php";
    include '../themes/' . THEME . '/header.php';
    //Get this file..
    $script = "upgrade.php";
    $step = getParameter('step');
    if (empty($step)) {
        $step = 1;
    }
    // Create new block and start the breadcrumbs
    $blockPage = new block();
    $blockPage->openBreadcrumbs();
    $blockPage->itemBreadcrumbs("<a href='../installation/{$script}'>Upgrade</a>");
    //Content block
    $block1 = new block();
    if ($step == 1) {
        $blockPage->itemBreadcrumbs("License");
        $blockPage->closeBreadcrumbs();
        $block1->heading("License");
        $block1->openContent();
        $block1->contentTitle("&nbsp;");
        echo "<tr class='odd'><td valign='top' class='leftvalue'>&nbsp;</td><td>\n    \t<pre>";
        include "../docs/copying.txt";
        echo "</pre>\n    \t</td></tr>";
    } elseif ($step == 2) {
        $myError = null;
        $blockPage->itemBreadcrumbs("<a href='../installation/{$script}?step=1'>License</a>");
        $blockPage->itemBreadcrumbs("Check DB");
        $blockPage->closeBreadcrumbs();
        $block1->heading("Checking Database...");
        $block1->openContent();
        $block1->contentTitle("Database Requirements...");
        echo "<tr class='odd'><td valign='top' class='leftvalue'>&nbsp;</td><td>\n        We are currently checking the database to see if it needs to be updated... <br /><br /><b>Please wait...</b><br />\n    \t</td></tr>";
        flush();
        echo "<tr class='odd'><td valign='top' class='leftvalue'>&nbsp;</td><td>";
        if (checkDatabase($myError)) {
            echo "<br />Database looks <font style='color: green'>good</font>.  We are continuing the conversion...<br /><br />";
            echo "<br />Continue on to <a href='../installation/{$script}?step=3&redirect=true'>Step 3</a>.<br /><br /><b>MAKE SURE SETTINGS.PHP IS WRITEABLE!!!</b><Br /><br />";
        } else {
            echo "<fieldset><legend style='font-weight: bold;font-size: large;padding: 5px;color: #ff3300'>";
            echo "Error...</legend>";
            echo "Sorry we could not upgrade your database at this time.. you will have to reinstall or do a manual upgrade...";
            if (!empty($myError)) {
                echo "<pre>{$myError}</pre>";
            }
            echo "</fieldset>";
        }
        echo "</td></tr>";
    } elseif ($step == 3) {
        $myError = null;
        $blockPage->itemBreadcrumbs("<a href='../installation/{$script}?step=1'>License</a>");
        $blockPage->itemBreadcrumbs("<a href='../installation/{$script}?step=2'>Check DB</a>");
        $blockPage->itemBreadcrumbs("Conversion");
        $blockPage->closeBreadcrumbs();
        $block1->heading("Conversion and update");
        $block1->openContent();
        $block1->contentTitle("Checking Settings.php...");
        echo "<tr class='odd'><td valign='top' class='leftvalue'>&nbsp;</td><td>\n        We are making sure that settings.php is writeable, we can not continue if it's not writeable. <br /><br /><b>Please wait...</b><br />\n    \t</td></tr>";
        flush();
        echo "<tr class='odd'><td valign='top' class='leftvalue'>&nbsp;</td><td>";
        //TODO: Check file
        $settingsFile = dirname(realpath(__FILE__)) . "/../includes/settings.php";
        unset($goon);
        $goon = false;
        clearstatcache();
        if (!is_writable($settingsFile)) {
            echo "<fieldset><legend style='font-weight: bold;font-size: large;padding: 5px;color: #ff3300'>";
            echo "Error...</legend>";
            echo "Your settings file is not writeable.   You need to either <b>chmod 666</b> the file or <b>chmod o+w</b> the file.  Hit refresh to recheck.";
            if (!empty($myError)) {
                echo "<pre>{$myError}</pre>";
            }
            echo "</fieldset>";
        } else {
            echo "<br />Okay your settings.php file looks good, we are going to continue.<br />";
            $goon = true;
        }
        echo "<br /></td></tr>";
        if ($goon) {
            //Next
            $block1->contentTitle("Converting...");
            echo "<tr class='odd'><td valign='top' class='leftvalue'>&nbsp;</td><td>\n            We are now upgrading your database and writting the config file. <br /><br /><b>Please wait...</b><br />\n        \t</td></tr>";
            flush();
            echo "<tr class='odd'><td valign='top' class='leftvalue'>&nbsp;</td><td>";
            if (convertDB()) {
                echo "<br />Writting out new settings file...";
                rewriteConfig($settingsFile, '2.5');
                //Reload the Config so we can use the root
                include $settingsFile;
                echo "<b> done</b><br /><br />";
                echo "<br /><B>Congratulations... if there was no error writting the file, you are done.<br />Click <a href=\"../\">here</a> to login.";
                echo "<br><B>MAKE SURE TO DELETE  UPGRADE.PHP!";
                echo "</td></tr>";
                echo "<h3>If you are upgrading from 2.4 to the latest version, please re-run this upgrade script to perform additi</h3>";
            }
        }
    }
    $block1->closeContent();
    $stepNext = $step + 1;
    if ($step < "2") {
        echo "<form name='license' action='../installation/{$script}?step=2&redirect=true' method='post'><center><a href=\"javascript:document.license.submit();\"><br /><b>Step {$stepNext}</b></a><br /><br /></center></form><br/>";
    }
    $footerDev = "false";
    include '../themes/' . THEME . '/footer.php';
    //FOR DEBUG ****
    exit;
    // -----------------------
}