aboutsummaryrefslogtreecommitdiff
path: root/admin/rudi/views/view.awards.add.php
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2011-04-17 20:13:07 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2011-04-17 20:13:07 -0400
commit0077cb99704fe863cf731fc5cab792af2ede96c2 (patch)
treedd68f44971aa2aee821f588d33b250dcd2fe57e3 /admin/rudi/views/view.awards.add.php
parente8b28c5e910d92cbec3d4baa6e98f025e8418d28 (diff)
downloadbayonetcms-0077cb99704fe863cf731fc5cab792af2ede96c2.tar.gz
Backporting retarded amount of changes outside of version control
Diffstat (limited to 'admin/rudi/views/view.awards.add.php')
-rw-r--r--admin/rudi/views/view.awards.add.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/admin/rudi/views/view.awards.add.php b/admin/rudi/views/view.awards.add.php
new file mode 100644
index 0000000..9c97c54
--- /dev/null
+++ b/admin/rudi/views/view.awards.add.php
@@ -0,0 +1,27 @@
+<?php
+ $class_id = $_GET['cid'];
+ $form = new BayonetForm("", "POST");
+ if($form->verifySubmit('processed'))
+ {
+ global $db;
+ $name = $form->request['name'];
+ $text = $form->request['text'];
+ $db->Query("INSERT INTO `rudi_awards` SET `class_id` = '$class_id', `name` = '$name', `image` = '', `description` = '$text'");
+
+ PageRedirect(1, "?op=rudi&show=awards&cid={$class_id}");
+ return;
+ }
+ echo LinkInternal("Cancel","?op=rudi&show=awards&cid={$class_id}");
+ OpenTable();
+?>
+
+<tr><th>Name:</th><td><?php $form->textField('name', "", false, "50"); ?></td><tr>
+<tr><th>Image:</th><td><?php ?></td></tr>
+<tr><th>Text:</th><td><?php $form->textArea('text',10,30); ?></td></tr>
+<tr><td><?php $form->submitButton('processed', 'Add'); ?></td></tr>
+
+<?php
+ CloseTable();
+ $form->__destruct();
+?>
+