/admin/includes/save_settings.php

https://bitbucket.org/mpercy/deeemm-cms · PHP · 32 lines · 16 code · 7 blank · 9 comment · 2 complexity · 54bdf48e200e7b48c890f31f3de82d0b MD5 · raw file

  1. <?php
  2. defined( '_INDM' ) or die( 'POSSIBLE HACK ATTEMPT!' );
  3. /*===========================================================================
  4. Check user priviledges
  5. ===========================================================================*/
  6. require VALIDATE;
  7. if ($user != 'ADMIN') header("Location: " . $default_url . "index.php");
  8. /*===========================================================================
  9. Get user input
  10. ===========================================================================*/
  11. $conf[site_name] = $_REQUEST['site_name'];
  12. $conf[site_description] = $_REQUEST['site_description'];
  13. $conf[site_is_active] = $_REQUEST['site_is_active'];
  14. $conf[admin_email] = $_REQUEST['admin_email'];
  15. $conf[db_editor_path] = $_REQUEST['db_editor_path'];
  16. $conf[login_link_enabled] = $_REQUEST['login_link_enabled'];
  17. $conf[search_enabled] = $_REQUEST['search_enabled'];
  18. $conf[current_template] = $_REQUEST['current_template'];
  19. /*===========================================================================
  20. Update values
  21. ===========================================================================*/
  22. foreach ($conf as $key => $value){
  23. mysql_query("UPDATE `" . $db_table_prefix . "core_conf` SET `value` = '$value' WHERE `name` = '$key'") ;
  24. }
  25. ?>