submit.php 963 Bytes
Newer Older
Dries's avatar
   
Dries committed
1
<?php
Dries's avatar
Dries committed
2

Dries's avatar
   
Dries committed
3
4
include_once "includes/common.inc";

Dries's avatar
   
Dries committed
5
6
page_header();

Dries's avatar
   
Dries committed
7
$theme->header();
Dries's avatar
   
Dries committed
8

Dries's avatar
   
Dries committed
9
10
if ($user->id) {
  if ($mod) {
Dries's avatar
   
Dries committed
11
    module_invoke($mod, "user");
Dries's avatar
   
Dries committed
12
  }
Dries's avatar
   
Dries committed
13
  else {
Dries's avatar
   
Dries committed
14
15
    foreach (module_list() as $name) {
      if (module_hook($name, "user")) $options .= "<OPTION VALUE=\"$name\">$name</OPTION>";
Dries's avatar
   
Dries committed
16
    }
Dries's avatar
   
Dries committed
17

Dries's avatar
   
Dries committed
18
    $form .= form_item(t("Type"), "<SELECT NAME=\"mod\">$options</SELECT>");
Dries's avatar
   
Dries committed
19
20
21
22
    $form .= form_submit(t("Next step"));

    $output .= "<P>". t("If you have written something or if you have some news or thoughts that you would like to share, then this is the place where you can submit new content.  Fill out this form and your contribution will automatically get whisked away to our submission queue where our moderators will frown at it, poke at it and hopefully post it.") ."</P>";
    $output .= form("submit.php", $form, "get");
Dries's avatar
   
Dries committed
23

Dries's avatar
   
Dries committed
24
25
    $theme->box("Submit", $output);
  }
Dries's avatar
Dries committed
26
}
Dries's avatar
   
Dries committed
27
else {
Dries's avatar
   
Dries committed
28
  $theme->box("Submit", message_account());
Dries's avatar
Dries committed
29
}
Dries's avatar
   
Dries committed
30

Dries's avatar
   
Dries committed
31
$theme->footer();
Dries's avatar
Dries committed
32

Dries's avatar
   
Dries committed
33
34
page_footer();

Dries's avatar
Dries committed
35
?>