0)) $select = 'list'; // Go the corresponding page if button was pressed else if ($_POST['list2']) $select = 'list2'; else if ($_POST['back']) $select = 'main'; else if ($_POST['cancel']) $select = 'cancel'; else if ($_POST['create']) $select = 'create'; else if ($_POST['pdf']) { // Create PDF-File createUserPDF($_SESSION['accounts']); // Stop script die; } } switch ($select) { /* Select which part of page should be loaded * cacnel = Go back to listusers.php * list = Load csv-file. Refresh to list2 */ case 'cancel' : // go back to user list page metaRefresh($_SESSION['lamurl']."templates/lists/listusers.php"); // Stop script die; break; case 'list' : if (loadfile()) { // Do Refresh to masscreate.php itself if csv-file was loaded successfully $_SESSION['group_suffix'] = $_POST['f_group_suffix']; $_SESSION['group_selectprofile'] = $_POST['f_selectgroupprofile']; metaRefresh($_SESSION['lamurl']."templates/masscreate.php?list2"); // Stop script die; } else { /* Loadfile has returned an error because masscreate.php can only * handle max 400 new users. * lam will show an error-page with a notice everything after line * 400 in csv-file will be ignored */ echo $_SESSION['header']; echo '