| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
// Run includes |
|---|
| 6 |
define("context","external"); |
|---|
| 7 |
require_once(dirname(dirname(__FILE__))."/includes.php"); |
|---|
| 8 |
|
|---|
| 9 |
run("profile:init"); |
|---|
| 10 |
run("invite:init"); |
|---|
| 11 |
|
|---|
| 12 |
define("context", "network"); |
|---|
| 13 |
templates_page_setup(); |
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
if (logged_on && $CFG->publicinvite == true) { |
|---|
| 17 |
|
|---|
| 18 |
$title = __gettext("Invite a Friend"); |
|---|
| 19 |
|
|---|
| 20 |
$body = run("content:invite:invite"); |
|---|
| 21 |
$body .= run("invite:invite"); |
|---|
| 22 |
|
|---|
| 23 |
$body = templates_draw(array( |
|---|
| 24 |
'context' => 'contentholder', |
|---|
| 25 |
'title' => $title, |
|---|
| 26 |
'body' => $body |
|---|
| 27 |
) |
|---|
| 28 |
); |
|---|
| 29 |
|
|---|
| 30 |
echo templates_page_draw( array( |
|---|
| 31 |
$title, $body |
|---|
| 32 |
) |
|---|
| 33 |
); |
|---|
| 34 |
} else { |
|---|
| 35 |
header("Location: " . $CFG->wwwroot); |
|---|
| 36 |
} |
|---|
| 37 |
|
|---|
| 38 |
?> |
|---|