isPluginEnabled('wv')) { header('Location: access_denied.php'); exit(); } if ($request->isPost()) { $cl_week_note = $request->getParameter('week_note'); $cl_week_list = $request->getParameter('week_list'); } else { $plugins = explode(',', $user->plugins); $cl_week_note = in_array('wn', $plugins); $cl_week_list = in_array('wl', $plugins); } $form = new Form('weekViewForm'); $form->addInput(array('type'=>'checkbox','name'=>'week_note','value'=>$cl_week_note)); $form->addInput(array('type'=>'checkbox','name'=>'week_list','value'=>$cl_week_list)); $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->getKey('button.save'))); if ($request->isPost()){ if (!ttTeamHelper::enablePlugin('wn', $cl_week_note) || !ttTeamHelper::enablePlugin('wl', $cl_week_list)) { $err->add($i18n->getKey('error.db')); } } $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->getKey('title.week_view')); $smarty->assign('content_page_name', 'week_view.tpl'); $smarty->display('index.tpl');