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

config.php 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. @$connect=mysql_connect($server, $user, $passwd) or die ('Error : '.mysql_error().' <br><br>Please check if your database settings are correctly set in the config.php file!');
  30. @mysql_select_db($base) or die ('Error : '.mysql_error());
  31. require_once('fonctions.php');
  32. mysql_connect(DB_HOST,DB_LOGIN,DB_PASS);
  33. mysql_select_db(DB_DB);
  34. $sql="SELECT * FROM blog_config";
  35. $req = mysql_query($sql) or die('Erreur SQL !<br />'.$sql.'<br />'.mysql_error());
  36. $blog_info_config_page = mysql_fetch_assoc($req);
  37. $meta_description=$blog_info_config_page['description'];
  38. $site_name=$blog_info_config_page['site_name'];
  39. $website_name=$site_name;
  40. $bandeau = $blog_info_config_page['bandeau'];
  41. $static_homepage_status = $blog_info_config_page['static_homepage_status'];
  42. if($static_homepage_status=="1")
  43. {
  44. $static_homepage_id = $blog_info_config_page['static_homepage_id'];
  45. }
  46. }
  47. $ConfigDir = dirname(__FILE__);
  48. $MainDir = str_replace("user", "",$ConfigDir);
  49. if($lang=="fr_fr"){
  50. include "".$MainDir."files/lang/fr_fr.php";
  51. }elseif($lang=="en_us"){
  52. include''.$MainDir.'files/lang/en_us.php';
  53. }
  54. ?>