diff --git a/inside/ActionParser.php b/inside/ActionParser.php index 56c2aea..bf20c89 100644 --- a/inside/ActionParser.php +++ b/inside/ActionParser.php @@ -393,6 +393,15 @@ class ActionParser { case 'delete-bugreport' : $this->_deleteBugReport(); break; + + case 'membership-sale': + $this->_membershipSale(); + break; + + case 'membercard-production': + $this->_membercardProduction(); + break; + } } else @@ -939,9 +948,9 @@ class ActionParser { $order->performOperations(); $GLOBALS['extraScriptParams']['page'] = "transaction-confirmation"; $GLOBALS['extraScriptParams']['transactionid'] = $transaction_id; - } + } } - + public function _payexTransaction() { $payment = new Payment(NULL, $_POST); if ($payment->status == "FAILURE") { @@ -984,7 +993,7 @@ class ActionParser { } else { $item = new OrderItem($item_id); $item->setQuantity($qty); - + $comment = scriptParam("ordercomment$item_id"); $item->setComment($comment); } @@ -1201,5 +1210,29 @@ class ActionParser { BugReport :: delete(scriptParam("bugreportid")); } + public function _membershipSale() { + $userid = scriptParam("userid"); + + if (!empty($userid)) { + $user = new User(scriptParam("userid")); + $subaction = scriptParam("subaction"); + if ($subaction == "sticker-sale") { + $user->_registerUpdate("Oblat solgt i billettbod"); + $user->updateExpiry(scriptParam("new-sticker-date")); + $user->updateLastSticker(scriptParam("new-sticker-date")); + } elseif ($subaction == "give-sticker") { + $user->_registerUpdate("Gyldig medlemskap, oblat gitt i billettbod"); + $user->updateLastSticker(scriptParam("new-sticker-date")); + } + } else { + error("Ukjent bruker-id : " . $userid); + } + + } + + public function _membercardProduction() { + + } + } ?> \ No newline at end of file diff --git a/inside/Categories.php b/inside/Categories.php index 255889e..cc64d82 100644 --- a/inside/Categories.php +++ b/inside/Categories.php @@ -1,35 +1,35 @@ -toString()); - exit(); - }else { - $this->conn = $conn; - } - - $sql = "SELECT id, title FROM tf_article_category"; - $result = $this->conn->query($sql); - if (DB::isError($result) != true){ - $this->categories = $result; - } - } - - public function getCategories(){ - return $this->categories; - } - -} +toString()); + exit(); + }else { + $this->conn = $conn; + } + + $sql = "SELECT id, title FROM tf_article_category"; + $result = $this->conn->query($sql); + if (DB::isError($result) != true){ + $this->categories = $result; + } + } + + public function getCategories(){ + return $this->categories; + } + +} ?> \ No newline at end of file diff --git a/inside/Navigation.php b/inside/Navigation.php index d13f1d5..36f499d 100644 --- a/inside/Navigation.php +++ b/inside/Navigation.php @@ -5,11 +5,11 @@ class Navigation { public function display(){ ?> -
| Mandag-onsdag | 13-01 |
| Torsdag-fredag | 13-03 |
| Lørdag | 16-03 |
| Kjøkkenet | Til 19 |
| Mandag-onsdag | 13-01 |
| Torsdag-fredag | 13-03 |
| Lørdag | 16-03 |
| Kjøkkenet | Til 19 |
Oppdatér din brukerinformasjon
+ - Script execution: $time seconds ||Om du har kjøpt medlemskap må du registrere kortnummer og kode.
-Du kan også kjøpe medlemskap med VISA-kort.
+Du kan også kjøpe medlemskap med VISA-kort.
Om du har kjøpt medlemskap i en av barene på huset må du aktivere medlemskapet ditt med aktiveringsnummer og aktiveringskode!
Du kan også kjøpe medlemskap med VISA-kort.
Du har ikke tilgang til å se denne siden. Om du tror du skulle hatt tilgang, vennligst kontakt support.
Det kan også hende at siden du forsøkte å besøke ikke er publisert ennå.
Merk: stillinger som ikke er basert på stillingsbeskrivelser vil ikke vises på /jobb-sidene.
"); @@ -797,36 +802,36 @@ print("Studentersamfundet.no vil snarlig legge om alle sine visningsmaler. I de nye malene vil det være viktig å ha fylt ut alle disse 3 feltene.
"); $form = new Form($title, $enctype, $method, $action, $fields); @@ -1350,7 +1355,7 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $concertId = scriptParam("concertid"); $concert = new Concert($concertId); - + $title = "oppdatér arrangement"; $enctype = "multipart/form-data"; $method = "post"; @@ -1359,53 +1364,53 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $fields[] = Array("label" => "concertid", "type" => "hidden", "attributes" => Array("name" => "concertid", "value" => "$concertId")); - $fields[] = Array("label" => "tittel", "type" => "text", + $fields[] = Array("label" => "tittel", "type" => "text", "attributes" => Array("name" => "name" ,"size" => 55, "maxlength" => 50, "class" => "title", "value" => $concert->name)); - $fields[] = Array("label" => "engelsk tittel", "type" => "text", + $fields[] = Array("label" => "engelsk tittel", "type" => "text", "attributes" => Array("name" => "name_en" ,"size" => 55, "maxlength" => 50, "class" => "title", "value" => $concert->name_en)); - $fields[] = Array("label" => "beskrivelse", "type" => "textarea", - "attributes" => Array("comment" => + $fields[] = Array("label" => "beskrivelse", "type" => "textarea", + "attributes" => Array("comment" => "Bruk link-knappen for å legge inn linker eller epostadresser.Ingresser utgår fra visningsmalene. I stedet kan dere nå lagre sammendrag av artiklene, som vil vises på sider med flere artikler eller arrangementer.
"); - + $form = new Form($title, $enctype, $method, $action, $fields); $form->display(); } @@ -1447,36 +1452,36 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st public function _editConcertReport() { $report = new ConcertReport(scriptParam("concertreportid")); - + $title = "registrér arrangementsrapport"; $enctype = NULL; $method = "post"; $action = "index.php?action=update-concertreport&page=display-concert&concertid=$report->concert_id"; $fields = Array(); - + $fields[] = Array("label" => "concertreportid", "type" => "hidden", "attributes" => Array("name" => "concertreportid", "value" => $report->id)); - $fields[] = Array("label" => "besøkende", "type" => "text", + $fields[] = Array("label" => "besøkende", "type" => "text", "attributes" => Array("name" => "visitors","size" => 4, - "maxlength" => 4, + "maxlength" => 4, "value" => $report->visitors)); - $fields[] = Array("label" => "resultat", "type" => "text", + $fields[] = Array("label" => "resultat", "type" => "text", "attributes" => Array("name" => "result","size" => 7, - "maxlength" => 8, + "maxlength" => 8, "value" => $report->result)); - $fields[] = Array("label" => "markedsføring", "type" => "textarea", + $fields[] = Array("label" => "markedsføring", "type" => "textarea", "attributes" => Array("name" => "marketing_comment", "cols" => 70, "rows" => 15, "class" => "mceEditor", "value" => $report->marketing_comment)); - $fields[] = Array("label" => "produksjon", "type" => "textarea", + $fields[] = Array("label" => "produksjon", "type" => "textarea", "attributes" => Array("name" => "production_comment", "cols" => 70, "rows" => 15, "class" => "mceEditor", "value" => $report->production_comment)); - + $form = new Form($title, $enctype, $method, $action, $fields); - $form->display(); + $form->display(); } public function _displayAllCalendar(){ @@ -1489,7 +1494,7 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $year = date("Y"); $month = date("m"); } - $calendar->display($year, $month); + $calendar->display($year, $month); } public function _displayWeekProgram(){ @@ -1498,16 +1503,16 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $method = "post"; $action = "index.php?section=concerts&page=week-program&action=register-weekprogram"; $fields = Array(); - - $fields[] = Array("label" => "år", "type" => "text", + + $fields[] = Array("label" => "år", "type" => "text", "attributes" => Array("name" => "year", "size" => 4, "maxlength" => 4, "value" => date("Y") )); - $fields[] = Array("label" => "uke", "type" => "text", + $fields[] = Array("label" => "uke", "type" => "text", "attributes" => Array("name" => "week", "size" => 2, "maxlength" => 2, "value" => date("W") )); $form = new Form($title, $enctype, $method, $action, $fields); $form->display(); - + $list = new WeekPrograms(); $list->displayList(); @@ -1519,15 +1524,15 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $method = "post"; $action = "index.php?section=concerts&page=program-selection&action=register-programselection"; $fields = Array(); - - $fields[] = Array("label" => "fortekst", "type" => "textarea", + + $fields[] = Array("label" => "fortekst", "type" => "textarea", "attributes" => Array("name" => "pretext", "cols" => 70, "rows" => 10, "class" => "mceEditor")); - $fields[] = Array("label" => "start", "type" => "date", + $fields[] = Array("label" => "start", "type" => "date", "attributes" => Array("name" => "start", "value" => date("Y-m-d") )); - $fields[] = Array("label" => "slutt", "type" => "date", + $fields[] = Array("label" => "slutt", "type" => "date", "attributes" => Array("name" => "end", "value" => date("Y-m-d") )); - $fields[] = Array("label" => "type", "type" => "text", + $fields[] = Array("label" => "type", "type" => "text", "attributes" => Array("name" => "type" ,"size" => 12, "maxlength" => 24, "value" => "Konsert", "tag" => "Skriv 'Billett' for å vise alle med billett")); @@ -1548,19 +1553,19 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $method = "post"; $action = "index.php?section=concerts&page=program-selection&action=update-programselection"; $fields = Array(); - + $fields[] = Array("label" => "programselectionid", "type" => "hidden", "attributes" => Array("name" => "programselectionid", "value" => $progid)); - $fields[] = Array("label" => "fortekst", "type" => "textarea", + $fields[] = Array("label" => "fortekst", "type" => "textarea", "attributes" => Array("name" => "pretext", "cols" => 70, "rows" => 10, "class" => "mceEditor", "value" => $prog->pretext)); - $fields[] = Array("label" => "start", "type" => "date", + $fields[] = Array("label" => "start", "type" => "date", "attributes" => Array("name" => "start", "value" => date("Y-m-d"), "value" => $prog->start)); - $fields[] = Array("label" => "slutt", "type" => "date", + $fields[] = Array("label" => "slutt", "type" => "date", "attributes" => Array("name" => "end", "value" => date("Y-m-d"), "value" => $prog->end)); - $fields[] = Array("label" => "type", "type" => "text", + $fields[] = Array("label" => "type", "type" => "text", "attributes" => Array("name" => "type" ,"size" => 12, "maxlength" => 24, "value" => $prog->type)); @@ -1580,43 +1585,43 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $method = "post"; $action = "index.php?section=documents&page=display-documents"; $fields = Array(); - - $fields[] = Array("label" => "Vis dokumenter av typen ", "type" => "select", + + $fields[] = Array("label" => "Vis dokumenter av typen ", "type" => "select", "attributes" => Array("name" => "documentcategoryid", "values" => $doccats, "currentValue" => $current)); $form = new Form($title, $enctype, $method, $action, $fields); $form->display("horizontal"); - + $title = "søk på tagger"; $enctype = NULL; $method = "post"; $action = "index.php?section=documents&page=display-documents"; $fields = Array(); - - $fields[] = Array("label" => "Vis dokumenter merket ", "type" => "text", - "attributes" => Array("name" => "documenttag", + + $fields[] = Array("label" => "Vis dokumenter merket ", "type" => "text", + "attributes" => Array("name" => "documenttag", "value" => $currentTag)); $form = new Form($title, $enctype, $method, $action, $fields); $form->display("horizontal"); - + if ($current >= 0){ $documents = new Documents(); - $documents->displayList($current); + $documents->displayList($current); } if (!empty($currentTag)){ $documents = new Documents(); - $documents->displayListTag($currentTag); + $documents->displayListTag($currentTag); } - + } public function _displayDocument(){ $documentId = scriptParam("documentid"); $document = new Document($documentId); - $document->display(); + $document->display(); } public function _uploadDocument(){ @@ -1630,11 +1635,11 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $fields = Array(); $fields[] = Array("label" => "dokument", "type" => "file", "attributes" => Array("name" => "file", "size" => 55)); - $fields[] = Array("label" => "kategori", "type" => "select", - "attributes" => Array("name" => "documentcategoryid", - "values" => $categories)); - $fields[] = Array("label" => "tags", "type" => "text", - "attributes" => Array("name" => "tags" ,"size" => 50, "maxlength" => 255)); + $fields[] = Array("label" => "kategori", "type" => "select", + "attributes" => Array("name" => "documentcategoryid", + "values" => $categories)); + $fields[] = Array("label" => "tags", "type" => "text", + "attributes" => Array("name" => "tags" ,"size" => 50, "maxlength" => 255)); $form = new Form($title, $enctype, $method, $action, $fields); $form->display(); } @@ -1653,32 +1658,32 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $fields[] = Array("label" => "documentid", "type" => "hidden", "attributes" => Array("name" => "documentid", "value" => "$documentId")); - $fields[] = Array("label" => "tittel", "type" => "text", + $fields[] = Array("label" => "tittel", "type" => "text", "attributes" => Array("name" => "name" ,"size" => 50, "maxlength" => 50, - "value" => get_file_basename($document->name), + "value" => get_file_basename($document->name), "tag" => get_file_suffix($document->name))); - $fields[] = Array("label" => "kategori", "type" => "select", - "attributes" => Array("name" => "documentcategory_id", + $fields[] = Array("label" => "kategori", "type" => "select", + "attributes" => Array("name" => "documentcategory_id", "values" => $categories, "currentValue" => $document->documentcategory_id)); - $fields[] = Array("label" => "tags", "type" => "text", + $fields[] = Array("label" => "tags", "type" => "text", "attributes" => Array("name" => "tags" ,"size" => 50, "maxlength" => 255, - "value" => $document->tags)); - - + "value" => $document->tags)); + + $form = new Form($title, $enctype, $method, $action, $fields); $form->display(); } public function _displayGroups(){ $groups = new Groups(); - $groups->displayList(); + $groups->displayList(); } public function _displayGroup(){ $groupid = scriptParam("groupid"); $group = new Group($groupid); - $group->display(); + $group->display(); } public function _registerGroup(){ @@ -1690,19 +1695,19 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $method = "post"; $action = "index.php?action=register-group&page=display-groups"; $fields = Array(); - - $fields[] = Array("label" => "gruppenavn", "type" => "text", + + $fields[] = Array("label" => "gruppenavn", "type" => "text", "attributes" => Array("name" => "name" ,"size" => 50, "maxlength" => 50)); - $fields[] = Array("label" => "beskrivelse", "type" => "textarea", + $fields[] = Array("label" => "beskrivelse", "type" => "textarea", "attributes" => Array("name" => "text", "cols" => 70, "rows" => 3)); - $fields[] = Array("label" => "epostliste", "type" => "text", + $fields[] = Array("label" => "epostliste", "type" => "text", "attributes" => Array("name" => "mailinglist" ,"size" => 50, "maxlength" => 50)); - $fields[] = Array("label" => "forening", "type" => "select", - "attributes" => Array("name" => "division_id", + $fields[] = Array("label" => "forening", "type" => "select", + "attributes" => Array("name" => "division_id", "values" => $divList, "nullPossible" => true)); $fields[] = Array("label" => "foreningsmoderator", "type" => "radio", "attributes" => Array("name" => "admin", "values" => Array(1, 0), - "labels" => Array("ja", "nei"), + "labels" => Array("ja", "nei"), "value" => "nei", "comment" => "Foreningsmoderator kan endre og slette alle elementer som er tilknyttet foreningen.")); $form = new Form($title, $enctype, $method, $action, $fields); @@ -1729,31 +1734,31 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $method = "post"; $action = "index.php?action=update-group&page=display-group"; $fields = Array(); - + $fields[] = Array("label" => "groupid", "type" => "hidden", "attributes" => Array("name" => "groupid", "value" => "$groupid")); - $fields[] = Array("label" => "gruppenavn", "type" => "text", + $fields[] = Array("label" => "gruppenavn", "type" => "text", "attributes" => Array("name" => "name" ,"size" => 50, "maxlength" => 50, "value" => $group->name)); - $fields[] = Array("label" => "beskrivelse", "type" => "textarea", + $fields[] = Array("label" => "beskrivelse", "type" => "textarea", "attributes" => Array("name" => "text", "cols" => 70, "rows" => 7, "value" => $group->text)); - $fields[] = Array("label" => "epostliste", "type" => "text", + $fields[] = Array("label" => "epostliste", "type" => "text", "attributes" => Array("name" => "mailinglist" ,"size" => 50, "maxlength" => 50, "value" => $group->mailinglist)); - $fields[] = Array("label" => "forening", "type" => "select", + $fields[] = Array("label" => "forening", "type" => "select", "attributes" => Array("name" => "division_id", "currentValue" => $group->division_id, "values" => $divList, "nullPossible" => true)); $fields[] = Array("label" => "foreningsmoderator", "type" => "radio", "attributes" => Array("name" => "admin", "values" => Array(1, 0), - "labels" => Array("ja", "nei"), + "labels" => Array("ja", "nei"), "value" => $group->admin, "comment" => "Foreningsmoderator kan endre og slette alle elementer som er tilknyttet foreningen.")); $fields[] = Array("label" => "tilgang", "type" => "checkbox-list", - "attributes" => Array("name" => "actions", + "attributes" => Array("name" => "actions", "options" => $list, "comment" => "Viser kun handlinger som ikke gruppen får gjennom andre grupper den automatisk er medlem av.")); - + $form = new Form($title, $enctype, $method, $action, $fields); $form->display(); @@ -1761,13 +1766,13 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st public function _displayActions(){ $actions = new Actions(); - $actions->displayList(); + $actions->displayList(); } public function _displayAction(){ $actionid = scriptParam("actionid"); $action = new Action($actionid); - $action->display(); + $action->display(); } public function _registerAction(){ @@ -1776,9 +1781,9 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $enctype = NULL; $method = "post"; $action = "index.php?action=register-action&page=display-actions"; - $fields = Array(Array("label" => "handling", "type" => "text", + $fields = Array(Array("label" => "handling", "type" => "text", "attributes" => Array("name" => "name" ,"size" => 50, "maxlength" => 50)), - Array("label" => "beskrivelse", "type" => "textarea", + Array("label" => "beskrivelse", "type" => "textarea", "attributes" => Array("name" => "text", "cols" => 70, "rows" => 3)) ); $form = new Form($title, $enctype, $method, $action, $fields); @@ -1795,10 +1800,10 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $action = "index.php?action=update-action&page=display-action"; $fields = Array(Array("label" => "actionid", "type" => "hidden", "attributes" => Array("name" => "actionid", "value" => "$actionid")), - Array("label" => "handling", "type" => "text", + Array("label" => "handling", "type" => "text", "attributes" => Array("name" => "name" ,"size" => 50, "maxlength" => 50, "value" => $action1->name)), - Array("label" => "beskrivelse", "type" => "textarea", + Array("label" => "beskrivelse", "type" => "textarea", "attributes" => Array("name" => "text", "cols" => 70, "rows" => 7, "value" => $action1->text)) ); @@ -1808,7 +1813,7 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st public function _displayActionGroupRelationships(){ $relations = new ActionGroupRelationships(); - $relations->displayList(); + $relations->displayList(); } public function _registerActionGroupRelationship(){ @@ -1822,9 +1827,9 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $enctype = NULL; $method = "post"; $action = "index.php?action=register-actiongrouprelationship&page=register-actiongrouprelationship"; - $fields = Array(Array("label" => "handling", "type" => "select", + $fields = Array(Array("label" => "handling", "type" => "select", "attributes" => Array("name" => "actionid", "values" => $actions)), - Array("label" => "gruppe", "type" => "select", + Array("label" => "gruppe", "type" => "select", "attributes" => Array("name" => "groupid", "values" => $groups)) ); $form = new Form($title, $enctype, $method, $action, $fields); @@ -1833,13 +1838,13 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st public function _displayArticles(){ $articles = new Articles(); - $articles->displayList(); + $articles->displayList(); } public function _displayArticle(){ $articleid = scriptParam("articleid"); $article = new Article($articleid); - $article->display(); + $article->display(); } public function _registerArticle(){ @@ -1848,31 +1853,31 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $method = "post"; $action = "index.php?action=register-article&page=display-article"; $fields = Array(); - - $fields[] = Array("label" => "title", "type" => "text", + + $fields[] = Array("label" => "title", "type" => "text", "attributes" => Array("name" => "title", "class" => "title", "size" => 50, "maxlength" => 50)); - $fields[] = Array("label" => "tekst", "type" => "textarea", + $fields[] = Array("label" => "tekst", "type" => "textarea", "attributes" => Array("name" => "text", "cols" => 70, "rows" => 10, "class" => "mceEditor")); - $fields[] = Array("label" => "sammendrag", "type" => "textarea", + $fields[] = Array("label" => "sammendrag", "type" => "textarea", "attributes" => Array("name" => "intro", "cols" => 70, "rows" => 3, "maxlength" => 250)); /** * Hvis value ikke er gitt, blir dagens dato satt. * Hvor? Aner ikke! * --Thomas Misund Hansen, 2009-06-09 */ - $fields[] = Array("label" => "utgår", "type" => "date", + $fields[] = Array("label" => "utgår", "type" => "date", "attributes" => Array("name" => "expires", "value" => "2029-01-01")); $fields[] =Array("label" => "hovedbilde", "type" => "file", "attributes" => Array("comment" => "Vi blir glade hvis du bruker litt store bilder. 1024 piksler på den lengste kanten er kjempefint.", "name" => "attachment1", "size" => 55)); - $fields[] = Array("label" => "billedtekst", "type" => "textarea", + $fields[] = Array("label" => "billedtekst", "type" => "textarea", "attributes" => Array("name" => "caption1", "cols" => 70, "rows" => 2, "maxlength" => 120)); $fields[] =Array("label" => "ekstra bilde", "type" => "file", "attributes" => Array("name" => "attachment2", "size" => 55)); - $fields[] = Array("label" => "billedtekst", "type" => "textarea", + $fields[] = Array("label" => "billedtekst", "type" => "textarea", "attributes" => Array("name" => "caption2", "cols" => 70, "rows" => 2, "maxlength" => 120)); - + $form = new Form($title, $enctype, $method, $action, $fields); $form->display(); } @@ -1886,42 +1891,42 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $method = "post"; $action = "index.php?action=update-article&page=display-article"; $fields = Array(); - + $fields[] = Array("label" => "articleid", "type" => "hidden", "attributes" => Array("name" => "articleid", "value" => $articleid)); - $fields[] = Array("label" => "title", "type" => "text", + $fields[] = Array("label" => "title", "type" => "text", "attributes" => Array("name" => "title", "class" => "title", "size" => 50, "maxlength" => 50, "value" => $article->title)); - $fields[] = Array("label" => "tekst", "type" => "textarea", + $fields[] = Array("label" => "tekst", "type" => "textarea", "attributes" => Array("name" => "text", "cols" => 70, "rows" => 10, "class" => "mceEditor", "value" => $article->text)); - $fields[] = Array("label" => "sammendrag", "type" => "textarea", + $fields[] = Array("label" => "sammendrag", "type" => "textarea", "attributes" => Array("name" => "intro", "cols" => 70, "rows" => 3, "maxlength" => 250, "value" => $article->intro)); - $fields[] = Array("label" => "utgår", "type" => "date", + $fields[] = Array("label" => "utgår", "type" => "date", "attributes" => Array("name" => "expires", "value" => $article->expires)); $fields[] =Array("label" => "hovedbilde", "type" => "file", "attributes" => Array("comment" => "Vi blir glade hvis du bruker litt store bilder. 1024 piksler på den lengste kanten er kjempefint.", "name" => "attachment1", "size" => 55)); - $fields[] = Array("label" => "billedtekst", "type" => "textarea", + $fields[] = Array("label" => "billedtekst", "type" => "textarea", "attributes" => Array("name" => "caption1", "cols" => 70, "rows" => 2, "maxlength" => 120, "value" => $article->caption1)); $fields[] =Array("label" => "ekstra bilde", "type" => "file", "attributes" => Array("name" => "attachment2", "size" => 55)); - $fields[] = Array("label" => "billedtekst", "type" => "textarea", + $fields[] = Array("label" => "billedtekst", "type" => "textarea", "attributes" => Array("name" => "caption2", "cols" => 70, "rows" => 2, "maxlength" => 120, "value" => $article->caption2)); - + $form = new Form($title, $enctype, $method, $action, $fields); $form->display(); } - + public function _displayDivisionRequests(){ $users = new Users(); $users->displayDivisionRequests(); } - + public function _displayUsergroupRelationships(){ $groupList = new Groups("admin-only"); $groups = $groupList->getList(); @@ -1935,27 +1940,27 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $current = scriptParam("groupid"); if (empty($current)){ $current = 2; - } + } $limit = scriptParam("limit"); if (empty($limit)){ $limit = 25; - } + } $title = "vis gruppemedlemmer"; $enctype = NULL; $method = "post"; $action = "index.php?page=display-usergrouprelationships"; - $fields = Array(Array("label" => "vis", "type" => "select", + $fields = Array(Array("label" => "vis", "type" => "select", "attributes" => Array("name" => "limit", "values" => $limits, "currentValue" => $limit)), - Array("label" => "fra", "type" => "select", + Array("label" => "fra", "type" => "select", "attributes" => Array("name" => "groupid", "values" => $groups, "currentValue" => $current)) ); $form = new Form($title, $enctype, $method, $action, $fields); $form->display("horizontal"); $relations = new UserGroupRelationships(); - $relations->displayList($current, $limit); + $relations->displayList($current, $limit); } public function _registerUserGroupRelationship(){ @@ -1968,9 +1973,9 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $enctype = NULL; $method = "post"; $action = "index.php?action=register-usergrouprelationship&page=register-usergrouprelationship"; - $fields = Array(Array("label" => "medlem", "type" => "select", + $fields = Array(Array("label" => "medlem", "type" => "select", "attributes" => Array("name" => "userid", "values" => $users)), - Array("label" => "gruppe", "type" => "select", + Array("label" => "gruppe", "type" => "select", "attributes" => Array("name" => "groupid", "values" => $groups)) ); $form = new Form($title, $enctype, $method, $action, $fields); @@ -1987,31 +1992,31 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $method = "post"; $action = "index.php?action=register-usergrouprelationship&page=register-usergrouprelationship"; $fields = Array(); - - $fields[] = Array("label" => "medlem", "type" => "select", + + $fields[] = Array("label" => "medlem", "type" => "select", "attributes" => Array("name" => "userid", "values" => $users, "currentValue" => $currentUser)); - $fields[] = Array("label" => "gruppe", "type" => "select", + $fields[] = Array("label" => "gruppe", "type" => "select", "attributes" => Array("name" => "groupid", "values" => $groups)); - + $form = new Form($title, $enctype, $method, $action, $fields); $form->display(); $groupList = new Groups("admin-only"); $groups = $groupList->getList(); - + $title = "masseregistrér medlemmer i ny gruppe"; $enctype = NULL; $method = "post"; $action = "index.php?action=register-usergrouprelationship&page=register-usergrouprelationship"; $fields = Array(); - - $fields[] = Array("label" => "kortnummer/epost", "type" => "textarea", + + $fields[] = Array("label" => "kortnummer/epost", "type" => "textarea", "attributes" => Array("name" => "users", "cols" => 70, "rows" => 15, "comment" => "Tast inn kortnummer eller epost for å legge til flere brukere i samme gruppe på én gang. Én per linje.")); - $fields[] = Array("label" => "gruppe", "type" => "select", + $fields[] = Array("label" => "gruppe", "type" => "select", "attributes" => Array("name" => "groupid", "values" => $groups)); - + $form = new Form($title, $enctype, $method, $action, $fields); $form->display(); @@ -2048,15 +2053,15 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $method = "post"; $action = "index.php?page=display-users"; $fields = Array(); - - $fields[] = Array("label" => "vis", "type" => "select", + + $fields[] = Array("label" => "vis", "type" => "select", "attributes" => Array("name" => "limit", "values" => $limits, "currentValue" => $limit)); - $fields[] = Array("label" => "fra", "type" => "select", - "attributes" => Array("name" => "groupid", "values" => $groups, + $fields[] = Array("label" => "fra", "type" => "select", + "attributes" => Array("name" => "groupid", "values" => $groups, "currentValue" => $current)); - $fields[] = Array("label" => "postadressestatus", "type" => "select", - "attributes" => Array("name" => "validaddress", "values" => $addressStatus, + $fields[] = Array("label" => "postadressestatus", "type" => "select", + "attributes" => Array("name" => "validaddress", "values" => $addressStatus, "currentValue" => $addressStatusCurrent)); $form = new Form($title, $enctype, $method, $action, $fields); $form->display("horizontal"); @@ -2073,8 +2078,8 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $method = "post"; $action = "index.php?page=display-users"; $fields = Array(); - - $fields[] = Array("label" => "søk på navn, kortnr eller e-post", "type" => "text", + + $fields[] = Array("label" => "søk på navn, kortnr eller e-post", "type" => "text", "attributes" => Array("name" => "search", "value" => $search)); $form = new Form($title, $enctype, $method, $action, $fields, $id); $form->display("horizontal"); @@ -2089,7 +2094,7 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $users = new Users(); $users->displayList($group, $limit, false, $addressStatusCurrent); } - + } public function _displayUserExpiries(){ @@ -2138,18 +2143,18 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $method = "post"; $action = "index.php?page=display-user-expiries"; $fields = Array(); - - $fields[] = Array("label" => "", "type" => "select", + + $fields[] = Array("label" => "", "type" => "select", "attributes" => Array("name" => "format", "values" => $formats, "currentValue" => $format)); - $fields[] = Array("label" => "", "type" => "select", + $fields[] = Array("label" => "", "type" => "select", "attributes" => Array("name" => "limit", "values" => $limits, "currentValue" => $limit)); - $fields[] = Array("label" => "fra", "type" => "select", - "attributes" => Array("name" => "groupid", "values" => $groups, + $fields[] = Array("label" => "fra", "type" => "select", + "attributes" => Array("name" => "groupid", "values" => $groups, "currentValue" => $current)); - $fields[] = Array("label" => "med", "type" => "select", - "attributes" => Array("name" => "expiry", "values" => $expiries, + $fields[] = Array("label" => "med", "type" => "select", + "attributes" => Array("name" => "expiry", "values" => $expiries, "currentValue" => $curExp)); $form = new Form($title, $enctype, $method, $action, $fields); $form->display("horizontal"); @@ -2166,8 +2171,8 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $method = "post"; $action = "index.php?page=display-user-expiries"; $fields = Array(); - - $fields[] = Array("label" => "søk etter medlem", "type" => "text", + + $fields[] = Array("label" => "søk etter medlem", "type" => "text", "attributes" => Array("name" => "search", "value" => $search)); $form = new Form($title, $enctype, $method, $action, $fields, $id); $form->display("horizontal"); @@ -2184,13 +2189,13 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $action = "index.php?page=display-user-expiries"; $fields = Array(); - $fields[] = Array("label" => "slå opp kode", "type" => "text", + $fields[] = Array("label" => "slå opp kode", "type" => "text", "attributes" => Array("name" => "code_search", "value" => $code_search)); $form = new Form($title, $enctype, $method, $action, $fields, $id); $form->display("horizontal"); if ($code_search != ""){ - displayCode($code_search); + displayCode($code_search); } } @@ -2201,7 +2206,7 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $users = new Users(); $users->displayExpiryList($group, $limit, $expiry, $format); } - + } @@ -2221,11 +2226,11 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $action = "index.php?page=register-membership-bankpayment"; $fields = Array(); - $fields[] = @Array("label" => "sett inn fil mottatt fra bank", - "type" => "textarea", - "attributes" => Array("name" => "banktext", - "cols" => 100, - "rows" => 20, + $fields[] = @Array("label" => "sett inn fil mottatt fra bank", + "type" => "textarea", + "attributes" => Array("name" => "banktext", + "cols" => 100, + "rows" => 20, "value" => $_POST["banktext"])); $fields[] = @Array("label" => "", "type" => "checkbox", @@ -2249,26 +2254,26 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st return true; } } - + $title = "Registrere adresseoppdatering mottatt gjennom EA"; $id = "eaupdate"; $enctype = NULL; $method = "post"; $action = "index.php?page=register-user-ea-update"; $fields = Array(); - - $fields[] = @Array("label" => "sett inn CVS fil", - "type" => "textarea", - "attributes" => Array("name" => "eatext", - "cols" => 100, - "rows" => 20, + + $fields[] = @Array("label" => "sett inn CVS fil", + "type" => "textarea", + "attributes" => Array("name" => "eatext", + "cols" => 100, + "rows" => 20, "value" => $_POST["eatext"])); $form = new Form($title, $enctype, $method, $action, $fields, $id); $form->display(); return true; } - + return false; } @@ -2306,75 +2311,75 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st } $fields = Array(); - $fields[] = Array("label" => "fornavn", "type" => "text", - "attributes" => Array("name" => "firstname" ,"size" => 50, "maxlength" => 50, + $fields[] = Array("label" => "fornavn", "type" => "text", + "attributes" => Array("name" => "firstname" ,"size" => 50, "maxlength" => 50, "value" => (isset($data['firstname'])) ? $data['firstname'] : "")); - $fields[] = Array("label" => "etternavn", "type" => "text", - "attributes" => Array("name" => "lastname" ,"size" => 50, "maxlength" => 50, + $fields[] = Array("label" => "etternavn", "type" => "text", + "attributes" => Array("name" => "lastname" ,"size" => 50, "maxlength" => 50, "value" => (isset($data['lastname'])) ? $data['lastname'] : "")); - $fields[] = Array("label" => "ønsket brukernavn", "type" => "text", - "attributes" => Array("name" => "username" ,"size" => 12, "maxlength" => 12, - "onchange" => "checkUsername(this.value)", + $fields[] = Array("label" => "ønsket brukernavn", "type" => "text", + "attributes" => Array("name" => "username" ,"size" => 12, "maxlength" => 12, + "onchange" => "checkUsername(this.value)", "value" => (isset($data['username'])) ? $data['username'] : "")); $fields[] = Array("label" => "ønsket passord", "type" => "password", "attributes" => Array("name" => "password1")); $fields[] = Array("label" => "gjenta passord", "type" => "password", "attributes" => Array("name" => "password2")); $fields[] = Array("label" => "utenlandsk adresse?", "type" => "checkbox", - "attributes" => Array("name" => "addresstype", "label" => " hak av for å registrere utenlandsk adresse", - "checked" => (isset($data['addresstype'])) ? "checked" : "")); - $fields[] = Array("label" => "gateadresse", "type" => "textarea", - "attributes" => Array("name" => "street", "cols" => 70, "rows" => 3, - "value" => (isset($data['street'])) ? $data['street'] : "", + "attributes" => Array("name" => "addresstype", "label" => " hak av for å registrere utenlandsk adresse", + "checked" => (isset($data['addresstype'])) ? "checked" : "")); + $fields[] = Array("label" => "gateadresse", "type" => "textarea", + "attributes" => Array("name" => "street", "cols" => 70, "rows" => 3, + "value" => (isset($data['street'])) ? $data['street'] : "", "maxlength" => 255, "nocounter" => true)); - $fields[] = Array("label" => "postnummer", "type" => "text", + $fields[] = Array("label" => "postnummer", "type" => "text", "attributes" => Array("name" => "zipcode" ,"size" => 4, - "maxlength" => 4, - "onchange" => "checkZip(this);", - "onblur" => "checkZip(this);", + "maxlength" => 4, + "onchange" => "checkZip(this);", + "onblur" => "checkZip(this);", "value" => (isset($data['zipcode'])) ? $data['zipcode'] : "")); - $fields[] = Array("label" => "poststed", "type" => "text", - "attributes" => Array("name" => "postarea", "readonly" => "readonly", + $fields[] = Array("label" => "poststed", "type" => "text", + "attributes" => Array("name" => "postarea", "readonly" => "readonly", "readonly" => true)); - $fields[] = Array("label" => "by", "type" => "text", + $fields[] = Array("label" => "by", "type" => "text", "attributes" => Array("name" => "city" ,"size" => 50, "maxlength" => 50, "value" => (isset($data['city'])) ? $data['city'] : "")); - $fields[] = Array("label" => "stat", "type" => "text", + $fields[] = Array("label" => "stat", "type" => "text", "attributes" => Array("name" => "state" ,"size" => 50, "maxlength" => 50, "value" => (isset($data['state'])) ? $data['state'] : "")); - $fields[] = Array("label" => "land", "type" => "text", + $fields[] = Array("label" => "land", "type" => "text", "attributes" => Array("name" => "country" ,"size" => 50, "maxlength" => 50, "id" => "country", "value" => (isset($data['country'])) ? $data['country'] : "")); - $fields[] = Array("label" => "telefon", "type" => "text", + $fields[] = Array("label" => "telefon", "type" => "text", "attributes" => Array("name" => "phonenumber" ,"size" => 16, "maxlength" => 16, "value" => (isset($data['phonenumber'])) ? $data['phonenumber'] : "")); - $fields[] = Array("label" => "epost", "type" => "text", - "attributes" => Array("name" => "email" ,"size" => 50, "maxlength" => 120, + $fields[] = Array("label" => "epost", "type" => "text", + "attributes" => Array("name" => "email" ,"size" => 50, "maxlength" => 120, "value" => (isset($data['email'])) ? $data['email'] : "")); - $fields[] = Array("label" => "fødselsdato", "type" => "date", - "attributes" => Array("name" => "birthdate", + $fields[] = Array("label" => "fødselsdato", "type" => "date", + "attributes" => Array("name" => "birthdate", "value" => (isset($data['birthdate'])) ? $data['birthdate'] : "yyyy-mm-dd")); - $fields[] = Array("label" => "studiested", "type" => "select", - "attributes" => Array("name" => "placeOfStudy", "values" => $pos, + $fields[] = Array("label" => "studiested", "type" => "select", + "attributes" => Array("name" => "placeOfStudy", "values" => $pos, "currentValue" => (isset($data['placeOfStudy'])) ? $data['placeOfStudy'] : "")); if (!isset($_SESSION['valid-user'])) { $fields[] = Array("label" => "aktiv i en forening?", "type" => "checkbox", "attributes" => Array("name" => "active", "label" => " hak av om du er eller vil bli aktiv i en forening på Studentersamfundet", - "checked" => (isset($data['active'])) ? "checked" : "")); - $fields[] = Array("label" => "forening", "type" => "select", - "attributes" => Array("name" => "division", "values" => $divs, + "checked" => (isset($data['active'])) ? "checked" : "")); + $fields[] = Array("label" => "forening", "type" => "select", + "attributes" => Array("name" => "division", "values" => $divs, "currentValue" => (isset($data['division'])) ? $data['division'] : "")); - + } else { $fields[] = Array("label" => "legg til i gruppe?", "type" => "checkbox", - "attributes" => Array("name" => "group", - "label" => " hak av for å registrere bruker i en gruppe", - "checked" => (isset($data['group'])) ? "checked" : "")); - $fields[] = Array("label" => "gruppe", "type" => "select", - "attributes" => Array("name" => "group_id", "values" => $groups, - "currentValue" => (isset($data['group_id'])) ? $data['group_id'] : "")); + "attributes" => Array("name" => "group", + "label" => " hak av for å registrere bruker i en gruppe", + "checked" => (isset($data['group'])) ? "checked" : "")); + $fields[] = Array("label" => "gruppe", "type" => "select", + "attributes" => Array("name" => "group_id", "values" => $groups, + "currentValue" => (isset($data['group_id'])) ? $data['group_id'] : "")); } $form = new Form($title, $enctype, $method, $action, $fields, $id); $form->display(); @@ -2388,7 +2393,7 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $addressValues = Array(Array("id" => 0, "title" => "Ugyldig"), Array("id" => 1, "title" => "Gyldig"), Array("id" => 2, "title" => "Ukjent")); - + if ($id == NULL){ $userId = scriptParam("userid"); $tag = ""; @@ -2404,71 +2409,71 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $readonly = true; } - + $title = "$user->firstname $user->lastname - brukerinformasjon"; $enctype = NULL; $method = "post"; $action = "index.php?action=update-".$tag."user&page=display-".$tag."user"; $fields = Array(); - + $fields[] = Array("label" => "id", "type" => "hidden", - "attributes" => Array("name" => "userid", "readonly" => true, + "attributes" => Array("name" => "userid", "readonly" => true, "size" => strlen($user->id), "value" => "$userId")); $fields[] = Array("label" => "kortnummer", "type" => "text", - "attributes" => Array("name" => "cardno", "readonly" => true, + "attributes" => Array("name" => "cardno", "readonly" => true, "size" => strlen($user->cardno), "value" => $user->cardno)); - $fields[] = Array("label" => "brukernavn", "type" => "text", - "attributes" => Array("name" => "username", "readonly" => true, + $fields[] = Array("label" => "brukernavn", "type" => "text", + "attributes" => Array("name" => "username", "readonly" => true, "size" => strlen($user->username), "value" => $user->username)); - $fields[] = Array("label" => "fornavn", "type" => "text", + $fields[] = Array("label" => "fornavn", "type" => "text", "attributes" => Array("name" => "firstname" ,"size" => 50, "maxlength" => 50, "readonly" => $readonly, "value" => $user->firstname)); - $fields[] = Array("label" => "etternavn", "type" => "text", + $fields[] = Array("label" => "etternavn", "type" => "text", "attributes" => Array("name" => "lastname" ,"size" => 50, "maxlength" => 50, "readonly" => $readonly, "value" => $user->lastname)); $fields[] = Array("label" => "utenlandsk adresse?", "type" => "checkbox", - "attributes" => Array("name" => "addresstype", "label" => " hak av for å registrere utenlandsk adresse", - "readonly" => $readonly, "checked" => $user->addresstype == "int" ? "checked" : "")); - $fields[] = Array("label" => "gateadresse", "type" => "textarea", + "attributes" => Array("name" => "addresstype", "label" => " hak av for å registrere utenlandsk adresse", + "readonly" => $readonly, "checked" => $user->addresstype == "int" ? "checked" : "")); + $fields[] = Array("label" => "gateadresse", "type" => "textarea", "attributes" => Array("name" => "street", "cols" => 70, "rows" => 3, - "maxlength" => 255, "nocounter" => true, + "maxlength" => 255, "nocounter" => true, "readonly" => $readonly, "value" => $user->street)); $fields[] = Array("label" => "postnummer", "type" => "text", "attributes" => Array("name" => "zipcode", "size" => 4, "maxlength" => 4, - "onchange" => "checkZip(this);", - "onblur" => "checkZip(this);", + "onchange" => "checkZip(this);", + "onblur" => "checkZip(this);", "readonly" => $readonly, "value" => $user->zipcode)); - $fields[] = Array("label" => "poststed", "type" => "text", - "attributes" => Array("name" => "postarea", "readonly" => "readonly", + $fields[] = Array("label" => "poststed", "type" => "text", + "attributes" => Array("name" => "postarea", "readonly" => "readonly", "size" => strlen($user->postarea) + 1, "readonly" => "readonly", "value" => $user->postarea)); - $fields[] = Array("label" => "by", "type" => "text", + $fields[] = Array("label" => "by", "type" => "text", "attributes" => Array("name" => "city" ,"size" => 50, "maxlength" => 50, "readonly" => $readonly, "value" => $user->city)); - $fields[] = Array("label" => "stat", "type" => "text", + $fields[] = Array("label" => "stat", "type" => "text", "attributes" => Array("name" => "state" ,"size" => 50, "maxlength" => 50, "readonly" => $readonly, "value" => $user->state)); - $fields[] = Array("label" => "land", "type" => "text", + $fields[] = Array("label" => "land", "type" => "text", "attributes" => Array("name" => "country" ,"size" => 50, "maxlength" => 50, "readonly" => $readonly, "value" => $user->country)); if (isAdmin() || checkAuth("perform-update-user-hascard")) { - $fields[] = Array("label" => "adressestatus", + $fields[] = Array("label" => "adressestatus", "type" => "select", - "attributes" => Array("name" => "valid_address", - "disabled" => $readonly, + "attributes" => Array("name" => "valid_address", + "disabled" => $readonly, "values" => $addressValues, "currentValue" => $user->validAddress)); } - + if ($user->validAddress == 0) { $validAddressMessage = "Postadressen er merket som ugyldig, vennligst undersøk om det er riktig adresse"; - $fields[] = Array("label" => "adressestatus", + $fields[] = Array("label" => "adressestatus", "type" => "text", - "attributes" => Array("name" => "addressestatus", "readonly" => true, + "attributes" => Array("name" => "addressestatus", "readonly" => true, "size" => strlen($validAddressMessage), "value" => $validAddressMessage)); } @@ -2476,35 +2481,35 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $fields[] = Array("label" => "telefon", "type" => "text", "attributes" => Array("name" => "phonenumber" ,"size" => 16, "maxlength" => 16, "readonly" => $readonly, "value" => $user->phonenumber)); - $fields[] = Array("label" => "epost", "type" => "text", + $fields[] = Array("label" => "epost", "type" => "text", "attributes" => Array("name" => "email" ,"size" => 50, "maxlength" => 120, "readonly" => $readonly, "value" => $user->email)); - $fields[] = Array("label" => "fødselsdato", "type" => "date", + $fields[] = Array("label" => "fødselsdato", "type" => "date", "attributes" => Array("name" => "birthdate", "readonly" => $readonly, "value" => $user->birthdate)); - $fields[] = Array("label" => "studiested", "type" => "select", + $fields[] = Array("label" => "studiested", "type" => "select", "attributes" => Array("name" => "placeOfStudy", "values" => $pos, "disabled" => $readonly, "currentValue" => $user->placeOfStudy)); if(isAdmin() || checkAuth("perform-update-user-hascard")){ - $fields[] = Array("label" => "har medlemskort", "type" => "select", + $fields[] = Array("label" => "har medlemskort", "type" => "select", "attributes" => Array("name" => "hasCard", "values" => $cardValues, "disabled" => $readonly, "currentValue" => $user->hasCard)); }else { - $fields[] = Array("label" => "har medlemskort", "type" => "hidden", - "attributes" => Array("name" => "hasCard", + $fields[] = Array("label" => "har medlemskort", "type" => "hidden", + "attributes" => Array("name" => "hasCard", "disabled" => $readonly, "value" => $user->hasCard)); - + } $form = new Form($title, $enctype, $method, $action, $fields, NULL, $readonly); $form->display(); - + ?> vis grupper@@ -2935,34 +2940,14 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st displayList(); + $bugs->displayList(); } - public + public function _displayBugReport(){ $bugId = scriptParam("bugreportid"); $bug = new BugReport($bugId); - $bug->display(); - } - - public - function _buyTicketGalla(){ - ?> -
Nu er det atter tid for at feire os selv. Den 2re Oktober i det Herrens aar 1813 blev Det Norske Studentersamfund stiftet av 13 studenter ved det Kongelige Frederiks Universitet, og denne vor Fødselsdag ønsker vi at skal blive høstens vakreste Eventyr...
-Av denne Grund haver vi den Glede at invitere Dig, kiære Medlem, til Gallamiddag den 30te September paa vaart vakre Hus. Aftenen vil begynne kl. 18:13 med en Mottakelse i Biblioteket, hvoretter en femretters Midag, med baade taler og sang, vil blive servert i Betong. Derefter gaar turen atter til BokCaféen og Biblioteket, hvor dansen vil gaa ut i de sene Nattestimer.
-Vi haaper De vil beære Os med Deres tilstedevaerelse paa denne Gledens Dag.
-Påmelding er bindene, og billetten vil ikke bli refundert.
-Du kan kjøpe fler billetter på en gang. I så fall må du bruke kommentarfeltet til å skrive hvem du kjøper billett til.
-Om du har spesielle behov i forbindelse med maten kan du også skrive det her.
- display(); - ?> -Ingen aktive handlekurverer registert.
"); $user = new User(getCurrentUser()); $user->displayOrders(); - } + } } - public + public function _displayCarts(){ $order_status = scriptParam("orderstatus"); $order_status_list = new OrderStatuses(); @@ -3013,9 +2998,9 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $method = "post"; $action = "index.php?page=display-carts"; $fields = Array(); - - $fields[] = Array("label" => "vis handlekurver med status", "type" => "select", - "attributes" => Array("name" => "orderstatus", "values" => $list, + + $fields[] = Array("label" => "vis handlekurver med status", "type" => "select", + "attributes" => Array("name" => "orderstatus", "values" => $list, "currentValue" => $status)); $form = new Form($title, $enctype, $method, $action, $fields); $form->display("horizontal"); @@ -3024,7 +3009,7 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st $user->displayOrders($status); } - public + public function _cartCheckout(){ $order_id = scriptParam("order_id"); $order = new Order($order_id); @@ -3032,39 +3017,39 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st notify("Ugyldig ordrenummer. Gå tilbake og prøv igjen."); return; } - + $order->displayShortList(); - + $title = "Utfør betaling"; $enctype = NULL; $method = "post"; $action = "index.php?action=cart-checkout"; - - + + $trans_id = createTransactionId(); $value = $order->calculateTotalAmount(); - + $fields = Array(); - - $fields[] = Array("label" => "id", "type" => "hidden", + + $fields[] = Array("label" => "id", "type" => "hidden", "attributes" => Array("name" => "userid", "size" => 12, "maxlength" => 10, "value" => getCurrentUser())); - $fields[] = Array("label" => "order id", "type" => "hidden", + $fields[] = Array("label" => "order id", "type" => "hidden", "attributes" => Array("name" => "order_id", "size" => 12, "maxlength" => 10, "value" => $order_id)); - $fields[] = Array("label" => "trans id", "type" => "hidden", + $fields[] = Array("label" => "trans id", "type" => "hidden", "attributes" => Array("name" => "transactionid", "size" => 12, "maxlength" => 20, "value" => $trans_id)); - $fields[] = Array("label" => "beløp", "type" => "text", - "attributes" => Array("name" => "amount", "size" => 5, "maxlength" => 5, - "value" => $value, "readonly" => "readonly")); - $fields[] = Array("label" => "VISA-kortnummer", "type" => "text", + $fields[] = Array("label" => "beløp", "type" => "text", + "attributes" => Array("name" => "amount", "size" => 5, "maxlength" => 5, + "value" => $value, "readonly" => "readonly")); + $fields[] = Array("label" => "VISA-kortnummer", "type" => "text", "attributes" => Array("name" => "cardNumber", "size" => 16, "maxlength" => 16)); - $fields[] = Array("label" => "utløpsmåned", "type" => "text", + $fields[] = Array("label" => "utløpsmåned", "type" => "text", "attributes" => Array("name" => "cardNumberExpireMonth", "size" => 2, "maxlength" => 2)); - $fields[] = Array("label" => "utløpsår", "type" => "text", + $fields[] = Array("label" => "utløpsår", "type" => "text", "attributes" => Array("name" => "cardNumberExpireYear", "size" => 2, "maxlength" => 2)); - $fields[] = Array("label" => "cvc", "type" => "text", + $fields[] = Array("label" => "cvc", "type" => "text", "attributes" => Array("name" => "cardNumberCVC", "size" => 3, "maxlength" => 3, "help" => "CVC-koden finner du på baksiden av VISA-kortet ditt, som oftest i signaturfeltet. Det er de tre siste sifrene som skal brukes.")); $form = new Form($title, $enctype, $method, $action, $fields); @@ -3072,19 +3057,19 @@ Teksten under er hentet fra kunnskapsdatabasen. Du st ?>
Betalingen håndteres av Payex.
Ingen SMS registrert.
"; } - - + + $sql = "SELECT * FROM din_sms_sent ORDER BY date"; $result = $conn->query($sql); if (DB::isError($result) == true){ @@ -3151,7 +3136,7 @@ Teksten under er hentet fra kunnskapsdatabasen. Du stIngen SMS registrert.
"; } } + + public function _membershipSale() { + $cardno = scriptParam("cardno"); + $fornavn = ucfirst(scriptParam("fornavn")); + $etternavn = ucfirst(scriptParam("etternavn")); + $epost = scriptParam("epost"); + + if (!empty($cardno)) { + $search = $cardno; + } elseif (empty($fornavn) && empty($etternavn)) { + $search = ""; + } else { + $search = trim($fornavn . " " . $etternavn); + } + + $title = "Søk på kortnummer, fornavn og/eller etternavn"; + $id = "usersearch"; + $enctype = NULL; + $method = "post"; + $action = "index.php?page=".$this->page; + $fields = Array(); + + $fields[] = Array("label" => "Kortnummer", "type" => "text", + "attributes" => Array("name" => "cardno", "value" => $cardno)); + $fields[] = Array("label" => "Fornavn", "type" => "text", + "attributes" => Array("name" => "fornavn", "value" => $fornavn)); + $fields[] = Array("label" => "Etternavn", "type" => "text", + "attributes" => Array("name" => "etternavn", "value" => $etternavn)); + $form = new Form($title, $enctype, $method, $action, $fields, $id); + $form->display("table"); + + if (!empty($search)) { + $limit = -1; + $users = new Users(); + $users->getList($search, $limit, true); + + if ($users->users->numRows() > 0){ + print "Fant " . $users->users->numRows() . " forslag til medlemmer i medlemsdatabasen.
\n"; + + print "| kortnr | "; + print "navn | "; + print "medlem | "; + print "kort | "; + print "oblat | "; + print "||
|---|---|---|---|---|---|---|
| getId() . "_cardno\">". $user->cardno . " | \n"; + print "id . "\">" . $user->getName() . " | "; + print "";
+ if ($user->hasExpired()) print ' ';
+ else print ' ';
+ print " | ";
+
+ print "";
+ if ($user->hasCard()) print ' ';
+ else print ' ';
+ print " | ";
+
+ print "" . $user->getLastSticker() . " | "; + + print ""; + print ""; + print " | "; + + print ""; + if ($user->hasCard()) { + print "produser nytt medlemskort"; + } + print " | "; + + print "
Ingen tidligere medlemmer funnet innenfor valgte søk.
"; + } + + /* + $title = "Selg medlemskap til ny bruker"; + $id = "usersearch"; + $enctype = NULL; + $method = "post"; + $action = "index.php?page=".$this->page; + $fields = Array(); + $fields[] = Array("label" => "Fornavn", "type" => "text", + "attributes" => Array("name" => "", "value" => $fornavn)); + $fields[] = Array("label" => "Etternavn", "type" => "text", + "attributes" => Array("name" => "", "value" => $etternavn)); + $fields[] = Array("label" => "E-post", "type" => "text", + "attributes" => Array("name" => "epost", "value" => $epost)); + $form = new Form($title, $enctype, $method, $action, $fields, $id); + $form->display("table"); + */ + } + } + + public function _membercardProduction() { + + } + } -?> +?> \ No newline at end of file diff --git a/inside/User.php b/inside/User.php index 799281b..1b57a2b 100644 --- a/inside/User.php +++ b/inside/User.php @@ -98,10 +98,10 @@ class User { } } } else { //ID set, existing user - if ($data != NULL) { + if ($data != NULL) { //Update existing user $this->addresstype = isset ($data['addresstype']) ? "int" : "no"; - } else { + } else { //Retrieve data from backend for display or other actions if ($data = $this->_retrieveData()) { $this->username = stripcslashes($data['username']); @@ -227,7 +227,7 @@ class User { } } - //Logging + //Logging $sql = sprintf("INSERT INTO din_userupdate " . "VALUES (NULL, NOW(), %s, %s, %s)", $this->conn->quoteSmart($this->id), $this->conn->quoteSmart("User registered."), $this->conn->quoteSmart((getCurrentUser() == 0) ? $this->id : getCurrentUser())); $result = $this->conn->query($sql); if (DB :: isError($result) == true) { @@ -261,7 +261,7 @@ class User { return false; } - // Slett adressen hvis den kun består av en x. + // Slett adressen hvis den kun består av en x. // Brukeren får da en mail med informasjon om å oppdatere adressen sin. if (substr($this->street, 0, 1) == 'x') { $link = substr($this->street, 2); @@ -286,7 +286,7 @@ class User { } return false; } - + // ugly fix ... set address manual if the user is admin if (isAdmin()) { $this->setAddressStatus($this->validAddress); @@ -364,6 +364,17 @@ class User { return false; } + public function getId () { + return $this->id; + } + + public function getLastSticker () { + if ($this->lastSticker > 0) { + return $this->lastSticker; + } + return null; + } + public function changeUsername($username, $password) { switch (checkForumUsername($username, $password)) { case "wrong-password" : @@ -422,7 +433,7 @@ class User { return $row->date; } } - + public function getOrderId() { $sql = "SELECT id FROM din_order " . "WHERE user_id = $this->id " . @@ -618,7 +629,7 @@ class User { } /** - * Bankbetaling med KID + * Bankbetaling med KID */ public function renewMembershipBankpayment() { if (false and $this->isHonorMember()) { @@ -713,8 +724,8 @@ class User { if (DB :: isError($result) != true) { $this->_registerUpdate("Oppdatert oblat til " . $newDate); $this->lastSticker = $newDate; - notify("Oblat oppdatert."); - + notify("Oblat oppdatert til " . $this->getLastSticker() . " for " . $this->getName() . "."); + // Assume that a letter is sent to the registered address. // We mark the address as valid, and will update it as invalid if the letter is not delivered $this->setAddressStatus(1); @@ -734,8 +745,8 @@ class User { } print "\n"; - print "Ingen forespørseler registrert.
"); } } - + /** * Get number of users with study place affiliations - * + * * @param none * @return mixed array **/ @@ -299,19 +299,19 @@ AND udr.division_id_request = d.id"; } else { $sql = "SELECT s.navn AS studyPlace, COUNT(*) AS count FROM din_user u INNER JOIN studiesteder s ON u.placeOfStudy=s.id GROUP BY placeOfStudy ORDER BY studyPlace"; } - + $result = $this->conn->query($sql); if (DB::isError($result) != true) { $this->usersStudyPlaceList = $result; } else { error($result->toString()); } - return $this->usersStudyPlaceList; + return $this->usersStudyPlaceList; } - + /** * Get max number of users for one study place affiliations - * + * * @param none * @return mixed array **/ @@ -322,7 +322,7 @@ AND udr.division_id_request = d.id"; } else { $sql = "SELECT COUNT(*) AS count FROM din_user GROUP BY placeOfStudy ORDER BY count DESC LIMIT 1"; } - + $result = $this->conn->query($sql); if (DB::isError($result) != true) { $this->usersStudyPlaceMax = $result->fetchRow(DB_FETCHMODE_OBJECT); @@ -332,10 +332,10 @@ AND udr.division_id_request = d.id"; } return $this->usersStudyPlaceMax; } - + /** * List number of users with study place affiliations - * + * * @param none * @return none **/ @@ -345,18 +345,18 @@ AND udr.division_id_request = d.id"; if (!isset($this->usersStudyPlaceList)) $this->getUsersStudyPlaceList($year); print ""; print "Vis alle | "; print "inneværende år"; print "
"; - + if ($year) { print "Viser oversikt over studiestuder for alle som har betalt medlemskap i nåværende år.
"; } else { print "Viser alle medlemmer som noensinne har registrert seg.
"; } - + $n = 0; if ($this->usersStudyPlaceList->numRows() > 0) { $scalefactor = 600/($this->getMaxUsersStudyPlace($year)); @@ -365,7 +365,7 @@ AND udr.division_id_request = d.id"; print "