Exemple #1
0
     $_template->_user04 = "sites_admin/admin04_feiertage_edit.php";
     break;
 case "user_add":
     if ($_POST['absenden'] == "OK") {
         $_a = $_POST['_a'];
         $_b = $_POST['_b'];
         $_c = sha1($_POST['_c']);
         $_d = $_POST['_d'];
         if ($_a != "" && $_b != "" && $_POST['_c'] != "") {
             if ($_users->user_exist($_a)) {
                 $_infotext = "<table><tr><td><img src='images/icons/error.png' border=0></td><td><font color=red>Mitarbeiter <b>" . $_a . "</b> existiert bereits!</font></td></tr></table>";
                 $_infotext = getinfotext($_infotext, "td_background_heute");
             } else {
                 $_users->insert_user($_a . ";" . $_b . ";" . $_c . ";" . $_d);
                 $_users->add_user($_a);
                 header("Location: admin.php?action=user_edit&admin_id=" . $_users->get_anzahl());
                 $_infotext = "<table><tr><td><img src='images/icons/error.png' border=0></td><td>Mitarbeiter <b>" . $_a . "</b> wurde erfolgreich erstellt.</td></tr></table>";
                 $_infotext = getinfotext($_infotext, "td_background_heute");
                 break;
             }
         } else {
             //echo "Daten falsch";
             $_infotext = "<table><tr><td><img src='images/icons/error.png' border=0></td><td>Mitarbeiter konnte NICHT erstellt werden.</td></tr></table>";
             $_infotext = getinfotext($_infotext, "td_background_heute");
         }
     } else {
         $_infotext = "Neuer Mitarbeiter erfassen.";
         $_infotext = getinfotext($_infotext, "td_background_top");
     }
     $_template->_user02 = "sites_admin/admin02.php";
     $_template->_user04 = "sites_admin/admin04_user_add.php";