} $_SESSION['page'] = $pos; $a = new CategoryController($conn); $a->lang = $lang; $a->UserLevel = $UserLevel; $a->UserID = $UserID; $a->lang_str = $lang_str; switch ($action) { case "list": $a->browse($p, 20, $pos); break; case "add": $a->add(); break; case "edit": $a->edit($id); break; case "show": $a->show($id); break; case "save": $vars = $_POST; $vars['photo'] = $_FILES['photo']; //print_r($vars);return; $a->save($p, $vars); break; case "delete": $a->delete($id); break; case "batchDelete": $ids = $_POST['del'];