<?php require_once("includes/requirecompere.inc.php"); require_once("includes/requirepost.inc.php"); $mb_id=current_mb_id(); $cg_id=TPOST('cg_id'); $limitname=TPOST('limitname'); $cgl_limit=TPOST('cgl_limit'); $errorareas=array(); $cgl_view=false; switch ($limitname) { case 'weekly0minutes': $cgl_view='weekly0_minutes'; break; case 'weekly1minutes': $cgl_view='weekly1_minutes'; break; default: $errorareas['ERROR-VIEWNAME-INVALID']=array(0); } if (!$cgl_limit) $errorareas['ERROR-LIMIT-INVALID']=array(0); if ($errorareas) { $_SESSION['reserv.inputcache.domain']='coursegrouprule.manage'; $_SESSION['reserv.inputcache.errorareas']=$errorareas; redirect("qx-cmd-coursegrouprule.manage-cg_id-".$cg_id."-op-revise.html"); return; } purge_array_by_key_prefix($_SESSION,'reserv.inputcache.'); $DBConn->connect(false); $DBConn->begin(true); db_set_course_group_limit($DBConn,$mb_id,$cg_id,$cgl_view,$cgl_limit); $DBConn->commit(); redirect("qx-cmd-coursegrouprule.manage-cg_id-".$cg_id."-op-set.ok.html"); ?>