index.php 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Index page of the admin tools
  5. * @package chamilo.admin
  6. */
  7. // Resetting the course id.
  8. $cidReset = true;
  9. // Including some necessary chamilo files.
  10. require_once '../inc/global.inc.php';
  11. // Setting the section (for the tabs).
  12. $this_section = SECTION_PLATFORM_ADMIN;
  13. // Access restrictions.
  14. api_protect_admin_script(true);
  15. $nameTools = get_lang('PlatformAdmin');
  16. $accessUrlId = 0;
  17. $adminExtraContentDir = api_get_path(SYS_PATH) . "home/admin/";
  18. if (api_is_multiple_url_enabled()) {
  19. $accessUrlId = api_get_current_access_url_id();
  20. if ($accessUrlId != -1) {
  21. $urlInfo = api_get_access_url($accessUrlId);
  22. $url = api_remove_trailing_slash(preg_replace('/https?:\/\//i', '', $urlInfo['url']));
  23. $cleanUrl = str_replace('/', '-', $url);
  24. $adminExtraContentDir = api_get_path(SYS_PATH) . "home/$cleanUrl/admin/";
  25. }
  26. }
  27. // Displaying the header
  28. $message = '';
  29. if (api_is_platform_admin()) {
  30. if (is_dir(api_get_path(SYS_ARCHIVE_PATH)) && !is_writable(api_get_path(SYS_ARCHIVE_PATH))) {
  31. $message = Display::return_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin'), 'warning');
  32. }
  33. /* ACTION HANDLING */
  34. if (!empty($_POST['Register'])) {
  35. api_register_campus(!$_POST['donotlistcampus']);
  36. $message = Display :: return_message(get_lang('VersionCheckEnabled'), 'confirmation');
  37. }
  38. $keyword_url = Security::remove_XSS((empty($_GET['keyword']) ? '' : $_GET['keyword']));
  39. }
  40. if (isset($_GET['msg']) && isset($_GET['type'])) {
  41. if (in_array($_GET['msg'], array('ArchiveDirCleanupSucceeded', 'ArchiveDirCleanupFailed'))) {
  42. switch ($_GET['type']) {
  43. case 'error':
  44. $message = Display::return_message(get_lang($_GET['msg']), 'error');
  45. break;
  46. case 'confirmation':
  47. $message = Display::return_message(get_lang($_GET['msg']), 'confirm');
  48. }
  49. }
  50. }
  51. $blocks = array();
  52. // Instantiate Hook Event for Admin Block
  53. $hook = HookAdminBlock::create();
  54. if (!empty($hook)) {
  55. // If not empty, then notify Pre process to Hook Observers for Admin Block
  56. $hook->setEventData(array('blocks' => $blocks));
  57. $data = $hook->notifyAdminBlock(HOOK_EVENT_TYPE_PRE);
  58. // Check if blocks data is not null
  59. if (isset($data['blocks'])) {
  60. // Get modified blocks
  61. $blocks = $data['blocks'];
  62. }
  63. }
  64. /* Users */
  65. $blocks['users']['icon'] = Display::return_icon('members.gif', get_lang('Users'), array(), ICON_SIZE_MEDIUM, false);
  66. $blocks['users']['label'] = api_ucfirst(get_lang('Users'));
  67. $blocks['users']['class'] = 'block-admin-users';
  68. $usersBlockExtraFile = "{$adminExtraContentDir}block-admin-users_extra.html";
  69. if (file_exists($usersBlockExtraFile)) {
  70. $blocks['users']['extraContent'] = file_get_contents($usersBlockExtraFile);
  71. }
  72. if (api_is_platform_admin()) {
  73. $blocks['users']['editable'] = true;
  74. $search_form = '
  75. <form method="get" class="form-inline" action="user_list.php">
  76. <div class="form-group">
  77. <input class="form-control" type="text" name="keyword" value="">
  78. <button class="btn btn-default" type="submit">
  79. <i class="fa fa-search"></i> ' . get_lang('Search') . '
  80. </button>
  81. </div>
  82. </form>';
  83. $blocks['users']['search_form'] = $search_form;
  84. $items = array(
  85. array('url' => 'user_list.php', 'label' => get_lang('UserList')),
  86. array('url' => 'user_add.php', 'label' => get_lang('AddUsers')),
  87. array('url' => 'user_export.php', 'label' => get_lang('ExportUserListXMLCSV')),
  88. array('url' => 'user_import.php', 'label' => get_lang('ImportUserListXMLCSV')),
  89. array('url' => 'user_update_import.php', 'label' => get_lang('EditUserListCSV')),
  90. );
  91. if (isset($extAuthSource) && isset($extAuthSource['extldap']) && count($extAuthSource['extldap']) > 0) {
  92. $items[] = array('url' => 'ldap_users_list.php', 'label' => get_lang('ImportLDAPUsersIntoPlatform'));
  93. }
  94. $items[] = array('url' => 'extra_fields.php?type=user', 'label' => get_lang('ManageUserFields'));
  95. } else {
  96. $items = array(
  97. array('url' => 'user_list.php', 'label' => get_lang('UserList')),
  98. array('url' => 'user_add.php', 'label' => get_lang('AddUsers')),
  99. array('url' => 'user_import.php', 'label' => get_lang('ImportUserListXMLCSV')),
  100. );
  101. }
  102. $items[] = array('url' => 'usergroups.php', 'label' => get_lang('Classes'));
  103. $blocks['users']['items'] = $items;
  104. $blocks['users']['extra'] = null;
  105. if (api_is_platform_admin()) {
  106. /* Courses */
  107. $blocks['courses']['icon'] = Display::return_icon(
  108. 'course.gif',
  109. get_lang('Courses'),
  110. array(),
  111. ICON_SIZE_MEDIUM,
  112. false
  113. );
  114. $blocks['courses']['label'] = api_ucfirst(get_lang('Courses'));
  115. $blocks['courses']['class'] = 'block-admin-courses';
  116. $blocks['courses']['editable'] = true;
  117. $coursesBlockExtraFile = "{$adminExtraContentDir}block-admin-courses_extra.html";
  118. if (file_exists($coursesBlockExtraFile)) {
  119. $blocks['courses']['extraContent'] = file_get_contents($coursesBlockExtraFile);
  120. }
  121. $search_form = ' <form method="get" class="form-inline" action="course_list.php">
  122. <div class="form-group">
  123. <input class="form-control" type="text" name="keyword" value="">
  124. <button class="btn btn-default" type="submit">
  125. <i class="fa fa-search"></i> ' . get_lang('Search') . '
  126. </button>
  127. </div>
  128. </form>';
  129. $blocks['courses']['search_form'] = $search_form;
  130. $items = array();
  131. $items[] = array('url' => 'course_list.php', 'label' => get_lang('CourseList'));
  132. $items[] = array('url' => 'course_add.php', 'label' => get_lang('AddCourse'));
  133. if (api_get_setting('course_validation') == 'true') {
  134. $items[] = array('url' => 'course_request_review.php', 'label' => get_lang('ReviewCourseRequests'));
  135. $items[] = array('url' => 'course_request_accepted.php', 'label' => get_lang('AcceptedCourseRequests'));
  136. $items[] = array('url' => 'course_request_rejected.php', 'label' => get_lang('RejectedCourseRequests'));
  137. }
  138. $items[] = array('url' => 'course_export.php', 'label' => get_lang('ExportCourses'));
  139. $items[] = array('url' => 'course_import.php', 'label' => get_lang('ImportCourses'));
  140. $items[] = array('url' => 'course_category.php', 'label' => get_lang('AdminCategories'));
  141. $items[] = array('url' => 'subscribe_user2course.php', 'label' => get_lang('AddUsersToACourse'));
  142. $items[] = array('url' => 'course_user_import.php', 'label' => get_lang('ImportUsersToACourse'));
  143. //$items[] = array('url'=>'course_intro_pdf_import.php', 'label' => get_lang('ImportPDFIntroToCourses'));
  144. if (api_get_setting('gradebook_enable_grade_model') == 'true') {
  145. $items[] = array('url' => 'grade_models.php', 'label' => get_lang('GradeModel'));
  146. }
  147. if (isset($extAuthSource) && isset($extAuthSource['ldap']) && count($extAuthSource['ldap']) > 0) {
  148. $items[] = array('url' => 'ldap_import_students.php', 'label' => get_lang('ImportLDAPUsersIntoCourse'));
  149. }
  150. $items[] = array('url' => 'extra_fields.php?type=course', 'label' => get_lang('ManageCourseFields'));
  151. $blocks['courses']['items'] = $items;
  152. $blocks['courses']['extra'] = null;
  153. /* Platform */
  154. $blocks['platform']['icon'] = Display::return_icon(
  155. 'platform.png',
  156. get_lang('Platform'),
  157. array(),
  158. ICON_SIZE_MEDIUM,
  159. false
  160. );
  161. $blocks['platform']['label'] = api_ucfirst(get_lang('Platform'));
  162. $blocks['platform']['class'] = 'block-admin-platform';
  163. $blocks['platform']['editable'] = true;
  164. $platformBlockExtraFile = "{$adminExtraContentDir}block-admin-platform_extra.html";
  165. if (file_exists($platformBlockExtraFile)) {
  166. $blocks['platform']['extraContent'] = file_get_contents($platformBlockExtraFile);
  167. }
  168. $search_form = ' <form method="get" action="settings.php" class="form-inline">
  169. <div class="form-group">
  170. <input class="form-control" type="text" name="search_field" value="" >
  171. <input type="hidden" value="search_setting" name="category">
  172. <button class="btn btn-default" type="submit">
  173. <i class="fa fa-search"></i> ' . get_lang('Search') . '
  174. </button>
  175. </div>
  176. </form>';
  177. $blocks['platform']['search_form'] = $search_form;
  178. $items = array();
  179. $items[] = array('url' => 'settings.php', 'label' => get_lang('PlatformConfigSettings'));
  180. $items[] = array('url' => 'languages.php', 'label' => get_lang('Languages'));
  181. $items[] = array('url' => 'settings.php?category=Plugins', 'label' => get_lang('Plugins'));
  182. $items[] = array('url' => 'settings.php?category=Regions', 'label' => get_lang('Regions'));
  183. $items[] = array('url' => 'system_announcements.php', 'label' => get_lang('SystemAnnouncements'));
  184. $items[] = array(
  185. 'url' => api_get_path(WEB_CODE_PATH) . 'calendar/agenda_js.php?type=admin',
  186. 'label' => get_lang('GlobalAgenda')
  187. );
  188. $items[] = array('url' => 'configure_homepage.php', 'label' => get_lang('ConfigureHomePage'));
  189. $items[] = array('url' => 'configure_inscription.php', 'label' => get_lang('ConfigureInscription'));
  190. $items[] = array('url' => 'statistics/index.php', 'label' => get_lang('Statistics'));
  191. $items[] = array(
  192. 'url' => api_get_path(WEB_CODE_PATH) . 'mySpace/company_reports.php',
  193. 'label' => get_lang('Reports')
  194. );
  195. $items[] = array(
  196. 'url' => api_get_path(WEB_CODE_PATH) . 'admin/teacher_time_report.php',
  197. 'label' => get_lang('TeacherTimeReport')
  198. );
  199. /* Event settings */
  200. if (api_get_setting('activate_email_template') == 'true') {
  201. $items[] = array('url' => 'event_controller.php?action=listing', 'label' => get_lang('EventMessageManagement'));
  202. }
  203. if (!empty($_configuration['multiple_access_urls'])) {
  204. if (api_is_global_platform_admin()) {
  205. $items[] = array('url' => 'access_urls.php', 'label' => get_lang('ConfigureMultipleAccessURLs'));
  206. }
  207. }
  208. if (api_get_setting('allow_terms_conditions') == 'true') {
  209. $items[] = array('url' => 'legal_add.php', 'label' => get_lang('TermsAndConditions'));
  210. }
  211. $blocks['platform']['items'] = $items;
  212. $blocks['platform']['extra'] = null;
  213. }
  214. /* Sessions */
  215. $blocks['sessions']['icon'] = Display::return_icon(
  216. 'session.png',
  217. get_lang('Sessions'),
  218. array(),
  219. ICON_SIZE_MEDIUM,
  220. false
  221. );
  222. $blocks['sessions']['label'] = api_ucfirst(get_lang('Sessions'));
  223. $blocks['sessions']['class'] = 'block-admin-sessions';
  224. $sessionsBlockExtraFile = "{$adminExtraContentDir}block-admin-sessions_extra.html";
  225. if (file_exists($sessionsBlockExtraFile)) {
  226. $blocks['sessions']['extraContent'] = file_get_contents($sessionsBlockExtraFile);
  227. }
  228. if (api_is_platform_admin()) {
  229. $blocks['sessions']['editable'] = true;
  230. }
  231. $sessionPath = api_get_path(WEB_CODE_PATH).'session/';
  232. $search_form = ' <form method="GET" class="form-inline" action="'.$sessionPath.'session_list.php">
  233. <div class="form-group">
  234. <input class="form-control" type="text" name="keyword" value="">
  235. <button class="btn btn-default" type="submit">
  236. <i class="fa fa-search"></i> ' . get_lang('Search') . '
  237. </button>
  238. </div>
  239. </form>';
  240. $blocks['sessions']['search_form'] = $search_form;
  241. $items = array();
  242. $items[] = array('url' => $sessionPath.'session_list.php', 'label' => get_lang('ListSession'));
  243. $items[] = array('url' => $sessionPath.'session_add.php', 'label' => get_lang('AddSession'));
  244. $items[] = array('url' => $sessionPath.'session_category_list.php', 'label' => get_lang('ListSessionCategory'));
  245. $items[] = array('url' => $sessionPath.'session_import.php', 'label' => get_lang('ImportSessionListXMLCSV'));
  246. $items[] = array('url' => $sessionPath.'session_import_drh.php', 'label' => get_lang('ImportSessionDrhList'));
  247. if (isset($extAuthSource) && isset($extAuthSource['ldap']) && count($extAuthSource['ldap']) > 0) {
  248. $items[] = array(
  249. 'url' => 'ldap_import_students_to_session.php',
  250. 'label' => get_lang('ImportLDAPUsersIntoSession')
  251. );
  252. }
  253. $items[] = array(
  254. 'url' => $sessionPath.'session_export.php',
  255. 'label' => get_lang('ExportSessionListXMLCSV'),
  256. );
  257. $items[] = array(
  258. 'url' => '../coursecopy/copy_course_session.php',
  259. 'label' => get_lang('CopyFromCourseInSessionToAnotherSession')
  260. );
  261. if (api_is_platform_admin()) {
  262. // option only visible in development mode. Enable through code if required
  263. if (is_dir(api_get_path(SYS_TEST_PATH) . 'datafiller/')) {
  264. $items[] = array('url' => 'user_move_stats.php', 'label' => get_lang('MoveUserStats'));
  265. }
  266. $items[] = array('url' => 'career_dashboard.php', 'label' => get_lang('CareersAndPromotions'));
  267. $items[] = array('url' => 'extra_fields.php?type=session', 'label' => get_lang('ManageSessionFields'));
  268. }
  269. $blocks['sessions']['items'] = $items;
  270. $blocks['sessions']['extra'] = null;
  271. /* Settings */
  272. if (api_is_platform_admin()) {
  273. $blocks['settings']['icon'] = Display::return_icon(
  274. 'settings.png',
  275. get_lang('System'),
  276. array(),
  277. ICON_SIZE_MEDIUM,
  278. false
  279. );
  280. $blocks['settings']['label'] = api_ucfirst(get_lang('System'));
  281. $blocks['settings']['class'] = 'block-admin-settings';
  282. $items = array();
  283. $items[] = array('url' => 'special_exports.php', 'label' => get_lang('SpecialExports'));
  284. $items[] = array('url' => 'system_status.php', 'label' => get_lang('SystemStatus'));
  285. if (is_dir(api_get_path(SYS_TEST_PATH) . 'datafiller/')) {
  286. $items[] = array('url' => 'filler.php', 'label' => get_lang('DataFiller'));
  287. }
  288. $items[] = array('url' => 'archive_cleanup.php', 'label' => get_lang('ArchiveDirCleanup'));
  289. $items[] = array('url' => 'resource_sequence.php', 'label' => get_lang('ResourcesSequencing'));
  290. if (isset($_configuration['db_manager_enabled']) &&
  291. $_configuration['db_manager_enabled'] == true &&
  292. api_is_global_platform_admin()
  293. ) {
  294. $host = $_configuration['db_host'];
  295. $username = $_configuration['db_user'];
  296. $databaseName = $_configuration['main_database'];
  297. $items[] = array(
  298. 'url' => "db.php?username=$username&db=$databaseName&server=$host",
  299. 'label' => get_lang('Database Manager')
  300. );
  301. }
  302. $blocks['settings']['items'] = $items;
  303. $blocks['settings']['extra'] = null;
  304. $blocks['settings']['search_form'] = null;
  305. // Skills
  306. if (api_get_setting('allow_skills_tool') == 'true') {
  307. $blocks['skills']['icon'] = Display::return_icon(
  308. 'logo.png',
  309. get_lang('Skills'),
  310. array(),
  311. ICON_SIZE_MEDIUM,
  312. false
  313. );
  314. $blocks['skills']['label'] = get_lang('Skills');
  315. $blocks['skills']['class'] = 'block-admin-skills';
  316. $items = array();
  317. //$items[] = array('url'=>'skills.php', 'label' => get_lang('SkillsTree'));
  318. $items[] = array('url' => 'skills_wheel.php', 'label' => get_lang('SkillsWheel'));
  319. $items[] = array('url' => 'skills_import.php', 'label' => get_lang('SkillsImport'));
  320. $items[] = array('url' => 'skill_list.php', 'label' => get_lang('ManageSkills'));
  321. //$items[] = array('url'=>'skills_profile.php', 'label' => get_lang('SkillsProfile'));
  322. $items[] = array(
  323. 'url' => api_get_path(WEB_CODE_PATH) . 'social/skills_ranking.php',
  324. 'label' => get_lang('SkillsRanking')
  325. );
  326. $items[] = array('url' => 'skills_gradebook.php', 'label' => get_lang('SkillsAndGradebooks'));
  327. $items[] = array(
  328. 'url' => api_get_path(WEB_CODE_PATH) . 'admin/skill_badge.php',
  329. 'label' => get_lang('Badges')
  330. );
  331. $blocks['skills']['items'] = $items;
  332. $blocks['skills']['extra'] = null;
  333. $blocks['skills']['search_form'] = null;
  334. }
  335. /* Chamilo.org */
  336. $blocks['chamilo']['icon'] = Display::return_icon('logo.png', 'Chamilo.org', array(), ICON_SIZE_MEDIUM, false);
  337. $blocks['chamilo']['label'] = 'Chamilo.org';
  338. $blocks['chamilo']['class'] = 'block-admin-chamilo';
  339. $items = array();
  340. $items[] = array('url' => 'http://www.chamilo.org/', 'label' => get_lang('ChamiloHomepage'));
  341. $items[] = array('url' => 'http://www.chamilo.org/forum', 'label' => get_lang('ChamiloForum'));
  342. $items[] = array('url' => '../../documentation/installation_guide.html', 'label' => get_lang('InstallationGuide'));
  343. $items[] = array('url' => '../../documentation/changelog.html', 'label' => get_lang('ChangesInLastVersion'));
  344. $items[] = array('url' => '../../documentation/credits.html', 'label' => get_lang('ContributorsList'));
  345. $items[] = array('url' => '../../documentation/security.html', 'label' => get_lang('SecurityGuide'));
  346. $items[] = array('url' => '../../documentation/optimization.html', 'label' => get_lang('OptimizationGuide'));
  347. $items[] = array('url' => 'http://www.chamilo.org/extensions', 'label' => get_lang('ChamiloExtensions'));
  348. $items[] = array(
  349. 'url' => 'http://www.chamilo.org/en/providers',
  350. 'label' => get_lang('ChamiloOfficialServicesProviders')
  351. );
  352. $blocks['chamilo']['items'] = $items;
  353. $blocks['chamilo']['extra'] = null;
  354. $blocks['chamilo']['search_form'] = null;
  355. // Version check
  356. $blocks['version_check']['icon'] = Display::return_icon('logo.png', 'Chamilo.org', array(), ICON_SIZE_MEDIUM, false);
  357. $blocks['version_check']['label'] = get_lang('VersionCheck');
  358. $blocks['version_check']['extra'] = '<div class="admin-block-version"></div>';
  359. $blocks['version_check']['search_form'] = null;
  360. $blocks['version_check']['items'] = null;
  361. $blocks['version_check']['class'] = 'block-admin-version_check';
  362. // Check Hook Event for Admin Block Object
  363. if (!empty($hook)) {
  364. // If not empty, then notify Post process to Hook Observers for Admin Block
  365. $hook->setEventData(array('blocks' => $blocks));
  366. $data = $hook->notifyAdminBlock(HOOK_EVENT_TYPE_POST);
  367. // Check if blocks data is not null
  368. if (isset($data['blocks'])) {
  369. // Get modified blocks
  370. $blocks = $data['blocks'];
  371. }
  372. }
  373. }
  374. $admin_ajax_url = api_get_path(WEB_AJAX_PATH) . 'admin.ajax.php';
  375. $tpl = new Template();
  376. // Display the Site Use Cookie Warning Validation
  377. $useCookieValidation = api_get_setting('cookie_warning');
  378. if ($useCookieValidation === 'true') {
  379. if (isset($_POST['acceptCookies'])) {
  380. api_set_site_use_cookie_warning_cookie();
  381. } else if (!api_site_use_cookie_warning_cookie_exist()) {
  382. if (Template::isToolBarDisplayedForUser()) {
  383. $tpl->assign('toolBarDisplayed', true);
  384. } else {
  385. $tpl->assign('toolBarDisplayed', false);
  386. }
  387. $tpl->assign('displayCookieUsageWarning', true);
  388. }
  389. }
  390. $tpl->assign('web_admin_ajax_url', $admin_ajax_url);
  391. $tpl->assign('blocks', $blocks);
  392. if (api_is_platform_admin()) {
  393. $extraContentForm = new FormValidator(
  394. 'block_extra_data',
  395. 'post',
  396. '#',
  397. null,
  398. array(
  399. 'id' => 'block-extra-data',
  400. 'class' => ''
  401. ),
  402. FormValidator::LAYOUT_BOX_NO_LABEL
  403. );
  404. $extraContentFormRenderer = $extraContentForm->getDefaultRenderer();
  405. if ($extraContentForm->validate()) {
  406. $extraData = $extraContentForm->getSubmitValues();
  407. $extraData = array_map(['Security', 'remove_XSS'], $extraData);
  408. if (!empty($extraData['block'])) {
  409. if (!is_dir($adminExtraContentDir)) {
  410. mkdir(
  411. $adminExtraContentDir,
  412. api_get_permissions_for_new_directories(),
  413. true
  414. );
  415. }
  416. if (!is_writable($adminExtraContentDir)) {
  417. die;
  418. }
  419. $fullFilePath = $adminExtraContentDir . $extraData['block'];
  420. $fullFilePath .= "_extra.html";
  421. file_put_contents($fullFilePath, $extraData['extra_content']);
  422. Header::location(api_get_self());
  423. }
  424. }
  425. $extraContentForm->addTextarea(
  426. 'extra_content',
  427. null,
  428. ['id' => 'extra_content']
  429. );
  430. $extraContentFormRenderer->setElementTemplate(
  431. '<div class="form-group">{element}</div>',
  432. 'extra_content'
  433. );
  434. $extraContentForm->addElement(
  435. 'hidden',
  436. 'block',
  437. null,
  438. array(
  439. 'id' => 'extra-block'
  440. )
  441. );
  442. $extraContentForm->addButtonExport(
  443. get_lang('Save'),
  444. 'submit_extra_content'
  445. );
  446. $tpl->assign('extraDataForm', $extraContentForm->returnForm());
  447. }
  448. // The template contains the call to the AJAX version checker
  449. $admin_template = $tpl->get_template('admin/settings_index.tpl');
  450. $content = $tpl->fetch($admin_template);
  451. $tpl->assign('content', $content);
  452. $tpl->assign('message', $message);
  453. $tpl->display_one_col_template();
  454. // Note: version checking mechanism has now been moved to main/inc/ajax/admin.ajax.php