echo "<ul class='pageitem'>";
     $result = $edp_db->query("SELECT * FROM chammods order by name");
     foreach ($result as $row) {
         $name = "{$row['name']}";
         checkbox("{$name}: {$row['description']}", "{$row['edpname']}", $chamModConfig[$name]);
     }
     echo "</ul><br>";
     echo "</div>";
     echo "<input type='hidden' name='action' value='updateModules'>";
     echo "<ul class='pageitem'>\n";
     echo "<li class='button'><input name='Submit input' type='submit' value='Save changes' /></li>\n";
     echo "</ul></form>\n";
     break;
 case "boot":
     // Write out the top menu
     echoPageItemTOP("icons/big/chame.png", "Chameleon bootloader");
     echo "<div class='pageitem_bottom'>\n";
     echo "<br>Use this to update chameleon booloader.<br><br>";
     // Write out the form header
     echo "<form action='module.configuration.chameleonmods.php' method='post'>\n";
     echo "<ul class='pageitem'>";
     echo "<span class='arrow'></span><li class='select'><select name='chameID' id='chameID'>";
     echo "<option value='' selected>&nbsp;&nbsp;Select version here if you want to update bootloader...</option>\n";
     $i = 0;
     while ($chameBootdb[$i] != "") {
         //resetting vars
         $id = "";
         $version = "";
         $notes = "";
         $type = "";
         $os_support = "";
Example #2
0
        $stmt = $edp_db->query("SELECT * FROM pmfixes where id = '{$id}'");
        break;
    case "sys":
        $stmt = $edp_db->query("SELECT * FROM sysfixes where id = '{$id}'");
        break;
    case "wifi":
        $stmt = $edp_db->query("SELECT * FROM wifi where id = '{$id}'");
        break;
}
$stmt->execute();
$bigrow = $stmt->fetchAll();
$row = $bigrow[0];
if ($action == "") {
    echo "<form action='fixes.php' method='post'>";
    // Write out the top menu
    echoPageItemTOP("icons/big/{$row['icon']}", "{$row['name']}");
    ?>
		
		<div class="pageitem_bottom">
		<p><b>About:</b></p>
		<?php 
    echo "{$row['brief']}";
    ?>
		<br>
		<p><b>Descripton:</b></p>
		<?php 
    echo "{$row['description']}";
    ?>
		<br>
		<p><b>Developer and Version:</b></p>
		<?php 
    }
    if ($cusoper == "cdelonly") {
        deleteUsrIncludeFiles();
    }
    if ($cusoper == "cbuild" || $edpoper == "ebuild" || $cusoper == "cfixcache" || $cusoper == "cfullfix") {
        doCustomBuild();
    } else {
        // Create delete action to load side menu back
        writeToLog("/Extra/EDP/logs/build/deleteAction.txt", "");
        // Launch the script which provides the summary of the delete process
        echo "<script> document.location.href = 'workerapp.php?action=showDeleteStatus'; </script>";
    }
} else {
    echo "<form action='module.configuration.custom.php' method='post'>";
    // Write out the top menu
    echoPageItemTOP("icons/big/config.png", "Custom build configuration");
    echo "<div class='pageitem_bottom'>\n";
    echo "EDP custom configuration allows you to use your existing configuration in /Extra and your custom files included from /Extra/include.<br><br>";
    echo "Copy your custom files like DSDT, SSDT, plists and boot(chameleon bootloader) to /Extra/include and <br> custom Kexts to /Extra/include/Extensions, which can be managed here easily.<br>";
    echo "</div>";
    // Load the tabs
    echo "<script> \$(function() { \$( \"#tabs\" ).tabs(); }); </script>\n";
    // Show the tabs bar
    ?>
				<div id="tabs">
					<div id="menutabs">
						<ul>
							<li><a href="#tabs-0">Custom Files</a></li>
							<li><a href="#tabs-1">EDP Files</a></li>

						</ul>
            break;
        case "Desktop":
        case "Workstation":
        case "AllinOnePC":
            $query = "SELECT * FROM modelsDesk where id = '{$modelID}'";
            $cquery = "SELECT * FROM compatDesk where model_id = '{$modelID}'";
            break;
    }
    $stmt = $edp_db->query($query);
    $stmt->execute();
    $bigrow = $stmt->fetchAll();
    $mdrow = $bigrow[0];
    // Load the tabs
    echo "<script> \$(function() { \$( \"#tabs\" ).tabs(); }); </script>\n";
    echo "<form action='module.configuration.predefined.php' method='post'>";
    echoPageItemTOP("http://www.osxlatitude.com/wp-content/themes/osxlatitude/img/edp-models/{$mdrow['vendor']}/{$mdrow['generation']}/{$mdrow['name']}.png", "{$mdrow['desc']}");
    //Show the tabs bar
    ?>
		<div id="tabs">
			<div id="menutabs">
				<ul>
					<li><a href="#tabs-0">Overview</a></li>
					<li><a href="#tabs-1">Kext / Drivers</a></li>
					<li><a href="#tabs-2">CPU & Power</a></li>
					<li><a href="#tabs-3">Chameleon</a></li>
					<li><a href="#tabs-4">Fixes</a></li>
					<li><a href="#tabs-5">Optional</a></li>
				</ul>
			</div>
			<?php 
    echo "<div class='pageitem_bottom'><br>\n";
Example #5
0
function showUpdateLog()
{
    $workPath = "/Extra/EDP";
    // can't use global path (using makes update to break)
    // For log time
    date_default_timezone_set("UTC");
    $date = date("d-m-y H-i");
    $updLogPath = "{$workPath}/logs/update";
    if (is_file("{$updLogPath}/updateFinish.log")) {
        system_call("mv {$updLogPath}/updateFinish.log {$workPath}/logs/lastupdate.log ");
        system("sudo killall EDP");
        system("open {$workPath}/bin/EDPweb.app");
        exit;
    }
    echoPageItemTOP("icons/big/update.png", "EDP Update");
    echo "<body onload=\"JavaScript:timedRefresh(8000);\">";
    echo "<div class='pageitem_bottom'\">";
    if (is_file("{$updLogPath}/Updsuccess.txt") || is_file("{$updLogPath}/Updfail.txt")) {
        echo "<ul class='pageitem'>";
        if (file_exists("{$updLogPath}/Updsuccess.txt")) {
            echo "<img src=\"icons/big/success.png\" style=\"width:80px;height:80px;position:relative;left:50%;top:50%;margin:15px 0 0 -35px;\">";
            echo "<b><center> Update success.</b><br><br><b> Please wait 10 sec... the App will reload for the new changes to take effect.</center></b>";
            echo "<br></ul>";
            system_call("echo '<br>*** Logging ended on: {$date} UTC Time ***<br>' >> {$updLogPath}/update.log");
            system_call("mv {$updLogPath}/update.log {$updLogPath}/updateFinish.log ");
            echo "<b>Update Log:</b>\n";
            echo "<pre>";
            if (is_file("{$updLogPath}/updateFinish.log")) {
                include "{$updLogPath}/updateFinish.log";
            }
            echo "</pre>";
            // Append current update log to the updates log
            $fileContents = file_get_contents("{$updLogPath}/updateFinish.log");
            file_put_contents("{$workPath}/logs/update.log", $fileContents, FILE_APPEND | LOCK_EX);
            echo "<body onload=\"JavaScript:timedRefresh(8000);\">";
            echo "<script type=\"text/JavaScript\"> function timedRefresh(timeoutPeriod) { logVar = setTimeout(\"location.reload(true);\", timeoutPeriod); } </script>\n";
        } else {
            echo "<img src=\"icons/big/fail.png\" style=\"width:80px;height:80px;position:relative;left:50%;top:50%;margin:15px 0 0 -35px;\">";
            echo "<b><center> Update failed.</b><br><br><b> Check the log for the reason.</center></b>";
            echo "<br></ul>";
            echo "<b>Update Log:</b>\n";
            echo "<pre>";
            if (is_file("{$updLogPath}/update.log")) {
                include "{$updLogPath}/update.log";
            }
            echo "</pre>";
            system_call("echo '<br>*** Logging ended on: {$date} UTC Time ***<br>' >> {$updLogPath}/update.log");
            system_call("mv {$updLogPath}/update.log {$workPath}/logs/lastupdate.log ");
            // Append current update log to the updates log
            $fileContents = file_get_contents("{$workPath}/logs/lastupdate.log");
            file_put_contents("{$workPath}/logs/update.log", $fileContents, FILE_APPEND | LOCK_EX);
        }
        echo "</div>";
    } else {
        echo "<center><b>Please wait for few minutes while we download the updates... which will take approx 1 to 10 minutes depending on your internet speed</b></center>";
        echo "<img src=\"icons/big/loading.gif\" style=\"width:200px;height:30px;position:relative;left:50%;top:50%;margin:15px 0 0 -100px;\">";
        echo "<script type=\"text/JavaScript\"> function timedRefresh(timeoutPeriod) { logVar = setTimeout(\"location.reload(true);\",timeoutPeriod); } function stopRefresh() { clearTimeout(logVar); } </script>\n";
        echo "</div>";
    }
}