示例#1
0
     case "uzytkownika":
         if ($_POST[id]) {
             $user->edit($_POST['id'], $_POST['name'], $_POST['surname'], $_POST['description'], $_POST['status']);
             $smarty->assign('userzy', $user->read());
             $smarty->assign('srodek', "html/users.tpl");
             $log->add("EDIT: user : {$_POST['name']} {$_POST['surname']}");
             //$smarty->assign('grupa',$grupa->read());
             $grupa->del_grupa_user($_POST['id']);
             $grupa->add_grupa_user($_POST['id'], $_POST['box']);
             $czytnik->del_czytnik_user($_POST['id']);
             $czytnik->add_czytnik_user($_POST['id'], $_POST['box2']);
         } else {
             $smarty->assign('userzy', $user->read($_GET[id]));
             $smarty->assign('srodek', "html/edit/edit_users.tpl");
             $smarty->assign('get_grupa', $grupa->get_grupa_user($_GET['id']));
             $smarty->assign('get_czytnik', $czytnik->get_czytnik_user($_GET['id']));
         }
         $smarty->assign('dodaj', "add_user");
         $smarty->assign('zaznacz', "select_users");
         $smarty->assign('usun', "delete_users");
         $smarty->assign('popup', '0');
         $smarty->assign('nazwa_tabeli', "nazwa_tab_user");
         $smarty->assign('grupa', $grupa->read());
         $smarty->assign('czytniki', $czytnik->read());
         //$smarty->assign("nav_step_all",$user->get_rows());
         //$smarty->assign('userzy',$user->read());
         $smarty->assign('plik_css', "style.css");
         //$smarty->assign('srodek',"html/edit/edit_users.tpl");
         $smarty->display('index.tpl');
         break;
 }