function show_profile_form($profile, $warning = null) { if ($profile) { page_head(tra("Edit your profile"), null, null, null, recaptcha_get_head_extra()); } else { page_head(tra("Create a profile"), null, null, null, recaptcha_get_head_extra()); } if ($warning) { echo "<p class=\"text-danger\">{$warning}</p>\n "; } echo "\n <form action=", $_SERVER['PHP_SELF'], " method=\"POST\", ENCTYPE=\"multipart/form-data\">\n "; start_table_noborder(); show_description(); show_questions($profile); show_picture_option($profile); show_submit(); end_table(); echo "</form>"; page_tail(); }
/** * @brief display unit resources * @global type $tool_content * @global type $langUnknownResType * @global type $is_editor * @param type $info * @return type */ function show_resource($info) { global $tool_content, $langUnknownResType, $is_editor; if ($info->visible == 0 and !$is_editor) { return; } switch ($info->type) { case 'doc': $tool_content .= show_doc($info->title, $info->comments, $info->id, $info->res_id); break; case 'text': $tool_content .= show_text($info->comments, $info->id, $info->visible); break; case 'description': $tool_content .= show_description($info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; case 'lp': $tool_content .= show_lp($info->title, $info->comments, $info->id, $info->res_id); break; case 'video': case 'videolink': $tool_content .= show_video($info->type, $info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; case 'videolinkcategory': $tool_content .= show_videocat($info->type, $info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; case 'exercise': $tool_content .= show_exercise($info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; case 'work': $tool_content .= show_work($info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; case 'topic': case 'forum': $tool_content .= show_forum($info->type, $info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; case 'wiki': $tool_content .= show_wiki($info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; case 'poll': $tool_content .= show_poll($info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; case 'link': $tool_content .= show_link($info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; case 'linkcategory': $tool_content .= show_linkcat($info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; case 'ebook': $tool_content .= show_ebook($info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; case 'section': $tool_content .= show_ebook_section($info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; case 'subsection': $tool_content .= show_ebook_subsection($info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; default: $tool_content .= $langUnknownResType; } }
function show_profile_form($profile, $warning = null) { if ($profile) { page_head(tra("Edit your profile"), null, null, null, IE_COMPAT_MODE); } else { page_head(tra("Create a profile"), null, null, null, IE_COMPAT_MODE); } if ($warning) { echo "<span class=error>{$warning}</span><p>\n "; } echo "\n <form action=", $_SERVER['PHP_SELF'], " method=\"POST\", ENCTYPE=\"multipart/form-data\">\n "; start_table_noborder(); show_description(); show_questions($profile); show_picture_option($profile); show_submit(); end_table(); echo "</form>"; page_tail(); }