* This file is part of pluck, the easy content management system * Copyright (c) pluck team * http://www.pluck-cms.org * Pluck is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * See docs/COPYING for the complete license. */ //Make sure the file isn't accessed directly. defined('IN_PLUCK') or exit('Access denied!'); //Check if chosen language is valid, and then save data. if (isset($_POST['save'], $cont1) && $cont1 != '0' && file_exists('data/inc/lang/' . $cont1) && $cont1 != $langpref) { save_language($cont1); //Redirect user. show_error($lang['language']['saved'], 3); redirect('?action=options', 2); include_once 'data/inc/footer.php'; exit; } //Introduction text. ?> <p> <strong><?php echo $lang['language']['choose']; ?> </strong> </p> <form action="" method="post">
if (empty($trim_title)) { $error['title'] = show_error($lang['settings']['fill_name'], 1, true); } //Check the email. if (!preg_match('/^.+@.+\\..{2,4}$/', $cont2)) { $error['email'] = show_error($lang['settings']['email_invalid'], 1, true); } //Check the passwords. if (empty($cont4)) { $error['pass'] = show_error($lang['changepass']['empty'], 1, true); } elseif ($cont4 != $cont5) { $error['pass'] = show_error($lang['changepass']['different'], 1, true); } if (!isset($error)) { //Save prefered language. save_language($cont3); //Save options. save_options($cont1, $cont2, 'yes'); //Save password. save_password($cont4); //Save theme. save_theme('default'); //Make some dirs for the trashcan, modules and pages. foreach (array('data/trash/pages', 'data/trash/images', 'data/trash/files', 'data/settings/modules', PAGE_DIR) as $dir) { if (!is_dir($dir)) { mkdir($dir); } chmod($dir, 0777); } unset($dir); redirect('?action=step3', 0);