Ejemplo n.º 1
0
             } else {
                 echo "Feilet<br>" . $mod->error;
             }
         } else {
             echo "Mangler obligatorisk variabel.";
         }
     } else {
         echo "Mangler obligatorisk variabel.";
     }
 } else {
     if ($index_a[0] == "contact") {
         if (isset($index_a[1]) && isset($index_a[2])) {
             if ($index_a[1] == "add") {
                 require 'contact_info.class.php';
                 $ci = new ContactInfo();
                 $res = $ci->add($index_a[2]);
                 if ($res == true) {
                     header("Location: " . URL_ROOT . "info/users/" . $index_a[2]);
                     echo "Vellykket.";
                 } else {
                     echo "Feilet<br>" . $ci->error;
                 }
             } else {
                 if ($index_a[1] == "delete") {
                     if (isset($index_a[3])) {
                         require 'contact_info.class.php';
                         $ci = new ContactInfo();
                         $res = $ci->delete($index_a[2]);
                         if ($res == true) {
                             header("Location: " . URL_ROOT . "info/users/" . $index_a[3]);
                             echo "Vellykket.";