Revision 1716
Added by Luisehahne about 13 years ago
| save.php | ||
|---|---|---|
| 4 | 4 |
* @category admin |
| 5 | 5 |
* @package settings |
| 6 | 6 |
* @author WebsiteBaker Project |
| 7 |
* @copyright 2009-2012, Website Baker Org. e.V.
|
|
| 7 |
* @copyright 2009-2012, WebsiteBaker Org. e.V. |
|
| 8 | 8 |
* @link http://www.websitebaker2.org/ |
| 9 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| 10 | 10 |
* @platform WebsiteBaker 2.8.x |
| ... | ... | |
| 47 | 47 |
if(isset($_POST['server_email'])) |
| 48 | 48 |
{
|
| 49 | 49 |
$_POST['server_email'] = strip_tags($_POST['server_email']); |
| 50 |
// $pattern = '/^[-a-z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9]([-a-z0-9_]?[a-z0-9])*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z]{2})|([1]?\d{1,2}|2[0-4]{1}\d{1}|25[0-5]{1})(\.([1]?\d{1,2}|2[0-4]{1}\d{1}|25[0-5]{1})){3})(:[0-9]{1,5})?\r/im';
|
|
| 51 |
$pattern = '/^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,6}))$/';
|
|
| 52 |
if(false == preg_match($pattern, $_POST['server_email'])) |
|
| 50 |
// // $pattern = '/^[-a-z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9]([-a-z0-9_]?[a-z0-9])*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z]{2})|([1]?\d{1,2}|2[0-4]{1}\d{1}|25[0-5]{1})(\.([1]?\d{1,2}|2[0-4]{1}\d{1}|25[0-5]{1})){3})(:[0-9]{1,5})?\r/im';
|
|
| 51 |
// $pattern = '/^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,6}))$/';
|
|
| 52 |
// if(false == preg_match($pattern, $_POST['server_email'])) |
|
| 53 |
if(!$admin->validate_email($_POST['server_email'])) |
|
| 53 | 54 |
{
|
| 54 | 55 |
$admin->print_error($MESSAGE['USERS_INVALID_EMAIL']. |
| 55 | 56 |
'<br /><strong>Email: '.htmlentities($_POST['server_email']).'</strong>', $js_back); |
| ... | ... | |
| 152 | 153 |
} |
| 153 | 154 |
} |
| 154 | 155 |
|
| 155 |
$allow_tags_in_fields = array('website_header', 'website_footer');
|
|
| 156 |
$allow_empty_values = array('website_header','website_footer','sec_anchor','pages_directory','page_spacer');
|
|
| 156 |
$allow_tags_in_fields = array('website_header', 'website_footer','website_signature');
|
|
| 157 |
$allow_empty_values = array('website_header','website_footer','sec_anchor','pages_directory','page_spacer','website_signature');
|
|
| 157 | 158 |
$disallow_in_fields = array('pages_directory', 'media_directory','wb_version');
|
| 158 | 159 |
|
| 159 | 160 |
// Query current settings in the db, then loop through them and update the db with the new value |
Also available in: Unified diff
! update folder admin/settings admin/skel/htt
! change Template to div container