.
*/
include("./include/include.php");
require_once(FILESYSTEMROOTPATH."jc/include/classes/DefaultLayout.php");
$layout = new DefaultLayout("JC_MANAGE", "./jc/");
$layout->init();
$layout->echoln("Back
");
$layout->echoln('Update CIA to next version
');
$aid = $_SESSION['JC_MODULE']['AgoraId'];
$ciaService = $GLOBALS['ClassFactory']->getCIAService();
$is_updated = $ciaService->check_updated($aid);
if ($is_updated==1){
$layout->echoln("CIA is already updated!");
$layout->page_footer();
exit();
}
//check if all solved
$cService = $GLOBALS['ClassFactory']->getConflictsService();
$number = $cService->countUnresolved($aid);
if ($number>0){
$layout->echoln("Please resolve all conflicts first! Press here");
$layout->page_footer();
exit();
}
$x=$ciaService->update($aid);
if($x==0){
$layout->echoln("CIA is updated successfully!
");
$layout->echoln("You can now continue to Step 4. and create a new agora.");
}else{
$layout->echoln("Error on updating CIA... Contact Admin, reporting Error Code: ".$x);
}
$layout->page_footer();
?>