Location: PHPKode > projects > Content*Builder > contentbuilder/system/setup/update.php
<?php
	include("prepend.php");
	
	if(empty($selectUpdate)) {
		$file = "./updates/updateInfo.php";
		if(file_exists($file)) {
			include($file);
			$counter = 0;
			foreach($available_updates as $k => $v) {
				$updateData[$counter]['id']   = $k;
				$updateData[$counter]['from'] = $v[fromVer];
				$updateData[$counter]['to']   = $v[toVer];
				$updateData[$counter]['file'] = $v[file];
				if($v[tag] == "combined") {
					$updateData[$counter]['mark'] = 1;
				} else {
					$updateData[$counter]['mark'] = 0;
				}
				++$counter;
			}
			$tpl->assign("updateData", $updateData);
			$tpl->assign("update_select_set", "1");
		}
	} else {
		include("../inc/db.php");
		$file = "./updates/updateInfo.php";
		if(file_exists($file)) {
			include($file);
			if(is_array($available_updates[$updateID][file])) {
				foreach($available_updates[$updateID][file] as $v) {
					if(file_exists("./updates/".$v)) {
						include("./updates/".$v);
						$update = true;
					}
				}
				$messageList[] = "Update ".$available_updates[$updateID][fromVer]." - ".$available_updates[$updateID][toVer]." performed";
			} else {
				if(file_exists("./updates/".$available_updates[$updateID][file])) {
					include("./updates/".$available_updates[$updateID][file]);
					$update = true;
					$messageList[] = "Update ".$available_updates[$updateID][fromVer]." - ".$available_updates[$updateID][toVer]." performed";
				}
			}
		}
		
	}
	
	if($update) {
		$messageList[] = 'Login into updated C*B: <a href="../../index.php">Login</a>';
	}
	
	$output = $tpl->fetch("update.template");
	
	include("append.php");
?>
Return current item: Content*Builder