?> <div id="title-bar"> <div id="title-bar-cont"> <h1 class="left">Updating Candy…</h1> </div> </div> <div id="container"> <?php if (Update::checkUpdate() == false) { echo '<p class="leadin">CandyCMS is up to date!</p>'; } else { $client = curl_init(Update::updateUrl()); curl_setopt($client, CURLOPT_RETURNTRANSFER, 1); //fixed this line $filedata = curl_exec($client); file_put_contents(CMS_PATH . 'update.zip', $filedata); if (file_exists(CMS_PATH . 'update.zip')) { echo '<p class="leadin">File downloaded!</p>'; } $zip = new ZipArchive(); if ($zip->open(CMS_PATH . 'update.zip') === TRUE) { $zip->extractTo(CMS_PATH); $zip->close(); include CMS_PATH . 'update/updater.php';
<?php $array = adminNav($_SESSION['role']); if (isset($_GET['page'])) { array_walk_recursive($array, 'genAdminNav', $_GET['page']); } else { array_walk_recursive($array, 'genAdminNav'); } ?> </ul> </div> </header> <?php if (!isset($_GET['page']) || $_GET['page'] != 'update') { echo Update::checkUpdate(); } ?> <?php if (isset($_GET['page'])) { ?> <?php if (file_exists('pages/' . $_GET['page'] . '.php')) { include 'pages/' . $_GET['page'] . '.php'; } else { include PLUGIN_PATH . ucwords($_GET['page']) . '/admin.php'; } ?>