本文整理汇总了PHP中DBG::deactivate方法的典型用法代码示例。如果您正苦于以下问题:PHP DBG::deactivate方法的具体用法?PHP DBG::deactivate怎么用?PHP DBG::deactivate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBG
的用法示例。
在下文中一共展示了DBG::deactivate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: define
define('DBG_DOCTRINE_TRACE', 1 << 6);
define('DBG_DOCTRINE_CHANGE', 1 << 7);
define('DBG_DOCTRINE_ERROR', 1 << 8);
define('DBG_DB', DBG_ADODB | DBG_DOCTRINE);
define('DBG_DB_TRACE', DBG_ADODB_TRACE | DBG_DOCTRINE_TRACE);
define('DBG_DB_CHANGE', DBG_ADODB_CHANGE | DBG_DOCTRINE_CHANGE);
define('DBG_DB_ERROR', DBG_ADODB_ERROR | DBG_DOCTRINE_ERROR);
define('DBG_LOG_FILE', 1 << 9);
define('DBG_LOG_FIREPHP', 1 << 10);
define('DBG_LOG', 1 << 11);
// Full debugging (quite pointless really)
define('DBG_ALL', DBG_PHP | DBG_DB | DBG_DB_TRACE | DBG_DB_ERROR | DBG_DB_CHANGE | DBG_LOG_FILE | DBG_LOG_FIREPHP | DBG_LOG);
// Common debugging modes (add more as required)
define('DBG_ERROR_FIREPHP', DBG_PHP | DBG_DB_ERROR | DBG_LOG_FIREPHP);
define('DBG_DB_FIREPHP', DBG_PHP | DBG_DB | DBG_LOG_FIREPHP);
DBG::deactivate();
/**
* Debugging
*
* @copyright CLOUDREXX CMS - CLOUDREXX AG
* @author David Vogt <david.vogt@comvation.com>
* @version 3.0.0
* @since 2.1.3
* @package cloudrexx
* @subpackage lib_dbg
*/
class DBG
{
private static $dbg_fh = null;
private static $fileskiplength = 0;
private static $enable_msg = null;
示例2: insertCategory
/**
* Adds a new category to the database. Collected
* data in POST is checked for valid values.
*
* @global ADONewConnection
* @global array
*/
function insertCategory()
{
global $objDatabase, $_ARRAYLANG;
//DBG::activate(DBG_ADODB);
if (isset($_POST['frmAddCategory_Languages']) && is_array($_POST['frmAddCategory_Languages'])) {
//Get next category-id
$objResult = $objDatabase->Execute('SELECT MAX(category_id) AS currentId
FROM ' . DBPREFIX . 'module_data_categories
ORDER BY category_id DESC
');
$intNextCategoryId = $objResult->RecordCount() == 1 ? $objResult->fields['currentId'] + 1 : 1;
//Collect data
$arrValues = array();
foreach ($_POST as $strKey => $strValue) {
/*
echo "------------------------------------ BEGIN ------------------------------------\n";
echo "$strKey :" .($strValue, true);
echo "\n------------------------------------ END ------------------------------------\n\n\n\n";
*/
// what the fuck is this for?
if (substr($strKey, 0, strlen('frmAddCategory_Name_')) == 'frmAddCategory_Name_') {
$intLanguageId = intval(substr($strKey, strlen('frmAddCategory_Name_')));
$arrValues[$intLanguageId] = array('name' => contrexx_addslashes(strip_tags($strValue)), 'is_active' => intval(in_array($intLanguageId, $_POST['frmAddCategory_Languages'])), 'parent_id' => intval($_POST['frmParentcategory']), 'cmd' => intval($_POST['frmFrontendPage']), 'action' => $_POST['frmSettings_action'], 'box_width' => $_POST['frmBoxwidth'], 'box_height' => $_POST['frmBoxheight'], 'template' => contrexx_addslashes($_POST['frmTemplate']));
}
}
foreach ($arrValues as $intLanguageId => $arrCategoryValues) {
$objDatabase->Execute(' INSERT INTO `' . DBPREFIX . 'module_data_categories`
SET `category_id` = ' . $intNextCategoryId . ',
`lang_id` = ' . $intLanguageId . ',
`is_active` = "' . $arrCategoryValues['is_active'] . '",
`parent_id` = "' . $arrCategoryValues['parent_id'] . '",
`name` = "' . $arrCategoryValues['name'] . '",
`cmd` = "' . $arrCategoryValues['cmd'] . '",
`action` = "' . $arrCategoryValues['action'] . '",
`box_width` = "' . $arrCategoryValues['box_width'] . '",
`box_height` = "' . $arrCategoryValues['box_height'] . '",
`template` = "' . $arrCategoryValues['template'] . '"
');
}
// insert placeholder
if (isset($_POST['frmPlaceholder'])) {
$placeholder = $this->_formatPlaceholder($_POST['frmPlaceholder']);
$query = "INSERT INTO " . DBPREFIX . "module_data_placeholders\n (type, ref_id, placeholder)\n VALUES\n ('cat', " . $intNextCategoryId . ", '" . $placeholder . "')";
$objDatabase->Execute($query);
}
$this->_strOkMessage = $_ARRAYLANG['TXT_DATA_CATEGORY_ADD_SUCCESSFULL'];
} else {
$this->_strErrMessage = $_ARRAYLANG['TXT_DATA_CATEGORY_ADD_ERROR_ACTIVE'];
}
\DBG::deactivate(DBG_ADODB);
}