PageRenderTime 37ms CodeModel.GetById 12ms RepoModel.GetById 1ms app.codeStats 0ms

/core/variables.php

https://bitbucket.org/mpercy/deeemm-cms
PHP | 34 lines | 9 code | 9 blank | 16 comment | 0 complexity | 5909915910a0eece9829088d8ab936ae MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause
  1. <?php
  2. defined( '_INDM' ) or die( 'POSSIBLE HACK ATTEMPT!' );
  3. /*===========================================================================
  4. Get configuration variables from database and store in associative array
  5. Database table comprises of name => value pair:
  6. Usage
  7. $value = $conf[name];
  8. ===========================================================================*/
  9. $conf = array();
  10. $sql_query = mysql_query("SELECT * FROM `" . $db_table_prefix . "core_conf`");
  11. while($row = mysql_fetch_assoc( $sql_query )){
  12. $conf[$row[name]] = $row[value];
  13. // ${$row[name]} = $row[value];
  14. }
  15. mysql_free_result($sql_query);
  16. /*
  17. foreach ($conf as $key => $value){
  18. echo $key;
  19. echo $value;
  20. }
  21. */
  22. ?>