Simple status box for the sidebar.
[elgg_plugins.git] / forwarder / userdetails_edit.php
blob589776ffd6ca8c9d333a012f95f8633dcea0dff2
1 <?php
3 global $page_owner;
4 global $PAGE;
5 //global $run_result;
6 global $CFG;
8 if (logged_on) {
10 $forwarder = user_flag_get('forwarder', $page_owner);
11 if (!$forwarder) {
12 $forwarder = "profile";
15 $pulldown = '<select name="default_page">';
17 foreach($PAGE->menu as $menu) {
18 if ($menu['name'] == $forwarder) {
19 $selected = 'selected = "selected"';
20 } else {
21 $selected = "";
23 $pulldown .= '<option value="' . $menu['name'] . '" ' . $selected . '>' . $menu['name'] . '</option>';
25 $pulldown .= "</select>";
27 $run_result .= "<h2>" . __gettext("Change your default page") . "</h2>";
28 $run_result .= "<p>" . __gettext("This is the page visitors see when they click on your icon.") . "</p>";
30 $run_result .= templates_draw(array(
31 'context' => 'databox',
32 'name' => __gettext("Your default page: "),
33 'column1' => $pulldown
37 $forwarder = user_flag_get('friendlyname', $page_owner);
38 if ($forwarder) {
39 $forwarder = htmlspecialchars(stripslashes($forwarder), ENT_COMPAT, 'utf-8');
40 } else {
41 $forwarder = '';
44 $run_result .= "<h2>" . __gettext("Change your friendly name") . "</h2>";
45 $run_result .= "<p>" . sprintf(__gettext("Once set, you can access your account from <i>%shome/[your&nbsp;friendly&nbsp;name]/</i>"),$CFG->wwwroot) . "</p>";
47 $run_result .= templates_draw(array(
48 'context' => 'databox',
49 'name' => __gettext("Your friendly name: "),
50 'column1' => "<input name=\"friendly_name\" type=\"text\" value=\"$forwarder\" />"