CMS ultra léger au style oldschool, projet de la communauté Kalaïn Hundin.

config.php 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?php
  2. // IMPORTANT :
  3. //
  4. // YOU MUST UNCOMMENT THE FOLLOWING (//$root_path="/";) LINE AND SET YOUR CMS LOCATION.
  5. //
  6. // For example : http://mywebsite.com/myfolder/ And don't forget the / at the end of the adress,
  7. // it won't work without it.
  8. //
  9. // As soon as the $root_path is set, the Database will be tested,
  10. // don't forget to put your db settings bellow or it will print an SQL error.
  11. //$root_path="/";
  12. //SET OTHER PREFERENCES
  13. $lang="fr_fr";
  14. $blog_email='contact@mywebsite.com';
  15. $localite='local';
  16. $meta_key_words='member, space';
  17. //
  18. if(isset($root_path))
  19. {
  20. //YOUR MySQL DATABASE SETTINGS
  21. $server='Your_MySQL_Server_Address';
  22. $user='Your_db_user';
  23. $passwd='Your_db_password';
  24. $base='Your_db_name';
  25. define("DB_HOST",$server);
  26. define("DB_LOGIN",$user);
  27. define("DB_PASS",$passwd);
  28. define("DB_DB",$base);
  29. require_once('fonctions.php');
  30. $dbh = new PDO("mysql:host=$server;dbname=$base", $user, $passwd);
  31. $sql = "SELECT * FROM blog_config";
  32. $stmt = $dbh->query($sql);
  33. $blog_info_config_page = $stmt->fetch(PDO::FETCH_ASSOC);
  34. $meta_description=$blog_info_config_page['description'];
  35. $site_name=$blog_info_config_page['site_name'];
  36. $website_name=$site_name;
  37. $bandeau = $blog_info_config_page['bandeau'];
  38. $static_homepage_status = $blog_info_config_page['static_homepage_status'];
  39. if($static_homepage_status=="1")
  40. {
  41. $static_homepage_id = $blog_info_config_page['static_homepage_id'];
  42. }
  43. }
  44. $ConfigDir = dirname(__FILE__);
  45. $MainDir = str_replace("user", "",$ConfigDir);
  46. if($lang=="fr_fr"){
  47. include "".$MainDir."files/lang/fr_fr.php";
  48. }elseif($lang=="en_us"){
  49. include''.$MainDir.'files/lang/en_us.php';
  50. }
  51. ?>