test.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <?php
  2. $aParams = array('per_page' => 'bx_market_per_page_profile');
  3. var_dump(serialize($aParams)); exit;
  4. define('BX_DOL', 1);
  5. define('BX_DOL_URL_ROOT', 'http://trident.me/'); ///< site url
  6. define('BX_DIRECTORY_PATH_ROOT', 'Z:/home/trident.me/www/'); ///< site path
  7. define('BX_DATABASE_HOST', 'localhost'); ///< db host
  8. define('BX_DATABASE_SOCK', ''); ///< db socket
  9. define('BX_DATABASE_PORT', ''); ///< db port
  10. define('BX_DATABASE_USER', 'root'); ///< db user
  11. define('BX_DATABASE_PASS', ''); ///< db password
  12. define('BX_DATABASE_NAME', 'boonex_trident'); ///< db name
  13. define('BX_DB_FULL_VISUAL_PROCESSING', true); ///< upon db error - show error message
  14. define('BX_DB_FULL_DEBUG_MODE', true); ///< upon db error - show detailed report (turn off in production mode)
  15. define('BX_DB_DO_EMAIL_ERROR_REPORT', true); ///< upon db error - send email with detailed report
  16. require_once (BX_DIRECTORY_PATH_ROOT . 'inc/utils.inc.php');
  17. require_once (BX_DIRECTORY_PATH_ROOT . 'inc/classes/BxDol.php');
  18. require_once (BX_DIRECTORY_PATH_ROOT . 'inc/classes/BxDolDb.php');
  19. $oDb = BxDolDb::getInstance();
  20. /*
  21. $oStmt = $oDb->prepare("SELECT `title` FROM `sys_modules` WHERE `name`=?", "system");
  22. $mixedResult = $oDb->getOne($oStmt);
  23. */
  24. /*
  25. $oStmt = $oDb->prepare("SELECT * FROM `sys_modules` WHERE `name`=?", "system");
  26. $mixedResult = $oDb->getRow($oStmt);
  27. */
  28. /*
  29. $oStmt = $oDb->prepare("SELECT * FROM `sys_modules` WHERE `enabled`=?", 1);
  30. $mixedResult = $oDb->getColumn($oStmt, 3);
  31. */
  32. /*
  33. $oStmt = $oDb->prepare("SELECT * FROM `sys_modules` WHERE `type`=? AND `enabled`=?", "module", 1);
  34. $mixedResult[] = $oDb->getFirstRow($oStmt);
  35. while($aRow = $oDb->getNextRow($oStmt)) {
  36. $mixedResult[] = $aRow;
  37. }
  38. */
  39. /*
  40. $oStmt = "SELECT * FROM `sys_modules` WHERE `type`=:type AND `enabled`=:enabled";
  41. $mixedResult[] = $oDb->getFirstRow($oStmt, array('type' => 'module', 'enabled' => 1));
  42. while($aRow = $oDb->getNextRow($oStmt)) {
  43. $mixedResult[] = $aRow;
  44. }
  45. */
  46. /*
  47. $oStmt = $oDb->prepare("SELECT * FROM `sys_modules` WHERE `type`=? AND `enabled`=?", "module", 1);
  48. $mixedResult = $oDb->getRow($oStmt);
  49. $mixedResult = $oDb->getAffectedRows($oStmt);
  50. */
  51. /*
  52. $oStmt = $oDb->prepare("UPDATE `sys_modules` SET `pending_uninstall`='0' WHERE `pending_uninstall`='0'");
  53. $mixedResult = $oDb->query($oStmt);
  54. */
  55. /*
  56. $oStmt = $oDb->prepare("SELECT * FROM `sys_modules` WHERE `type`=? AND `enabled`=?", "language", 1);
  57. $mixedResult = $oDb->getAll($oStmt);
  58. */
  59. /*
  60. $oStmt = $oDb->pdoQuery("SELECT * FROM `sys_modules` WHERE `type`='template' AND `enabled`=1");
  61. $mixedResult = $oDb->fillArray($oStmt);
  62. */
  63. /*
  64. $oStmt = $oDb->prepare("SELECT * FROM `sys_modules` WHERE `type`=? AND `enabled`=?", "language", 1);
  65. $mixedResult = $oDb->getAllWithKey($oStmt, 'name');
  66. */
  67. /*
  68. $oStmt = $oDb->prepare("SELECT * FROM `sys_modules` WHERE `type`=? AND `enabled`=?", "language", 1);
  69. $mixedResult = $oDb->getPairs($oStmt, 'name', 'title');
  70. */
  71. /*
  72. $oDb->pdoExec("INSERT INTO `sys_modules` SET `name`='ttt', `path`='ttt', `uri`='ttt', `class_prefix`='ttt', `db_prefix`='ttt'");
  73. $mixedResult = $oDb->lastId();
  74. */
  75. /*
  76. $mixedResult = $oDb->listTables();
  77. */
  78. /*
  79. $mixedResult = $oDb->getFields('sys_modules');
  80. $mixedResult = $oDb->isFieldExists('sys_modules', 'dependencies');
  81. */
  82. /*
  83. $mixedResult = $oDb->getEncoding();
  84. */
  85. /*
  86. $mixedResult = $oDb->escape("It's test!!!");
  87. $mixedResult = $oDb->implode_escape(array("It's test!", "Test", "I'm testing!"));
  88. $mixedResult = $oDb->arrayToSQL(array("title" => "Test", "message" => "It's test!", "content" => "I'm testing!"));
  89. */
  90. $mixedResult = $oDb->setTimezone('UTC');
  91. var_dump($mixedResult);