function fb_exit() { global $wp_version, $wp_roles, $wp_constants, $wp_globals_a_l, $wp_globals_m_r, $wp_globals_s_v, $wp_globals_w, $data, $update_options; if (!class_exists('FB')) { require_once 'FirePHPCore/fb.php'; } $firephp = FirePHP::getInstance(TRUE); $wp_constants = array('ABSPATH' => ABSPATH, 'ADMIN_COOKIE_PATH' => ADMIN_COOKIE_PATH, 'APP_REQUEST' => APP_REQUEST, 'ARRAY_A' => ARRAY_A, 'ARRAY_N' => ARRAY_N, 'ATOM' => ATOM, 'AUTH_COOKIE' => AUTH_COOKIE, 'AUTH_KEY' => AUTH_KEY, 'AUTOSAVE_INTERVAL' => AUTOSAVE_INTERVAL, 'COMMENTS_TEMPLATE' => COMMENTS_TEMPLATE, 'COOKIEHASH' => COOKIEHASH, 'COOKIEPATH' => COOKIEPATH, 'COOKIE_DOMAIN' => COOKIE_DOMAIN, 'CRLF' => CRLF, 'CUSTOM_TAGS' => CUSTOM_TAGS, 'DB_CHARSET' => DB_CHARSET, 'DB_COLLATE' => DB_COLLATE, 'DB_HOST' => DB_HOST, 'DB_NAME' => DB_NAME, 'DB_PASSW' => DB_PASSW, 'DB_PASSWORD' => DB_PASSWORD, 'DB_USER' => DB_USER, 'DOING_AJAX' => DOING_AJAX, 'DOING_AUTOSAVE' => DOING_AUTOSAVE, 'DOING_CRON' => DOING_CRON, 'EP_ALL' => EP_ALL, 'EP_ATTACHMENT' => EP_ATTACHMENT, 'EP_AUTHORS' => EP_AUTHORS, 'EP_CATEGORIES' => EP_CATEGORIES, 'EP_COMMENTS' => EP_COMMENTS, 'EP_DATE' => EP_DATE, 'EP_DAY' => EP_DAY, 'EP_MONTH' => EP_MONTH, 'EP_NONE' => EP_NONE, 'EP_PAGES' => EP_PAGES, 'EP_PERMALINK' => EP_PERMALINK, 'EP_ROOT' => EP_ROOT, 'EP_SEARCH' => EP_SEARCH, 'EP_TAGS' => EP_TAGS, 'EP_YEAR' => EP_YEAR, 'EZSQL_VERSION' => EZSQL_VERSION, 'FORCE_SSL_ADMIN' => FORCE_SSL_ADMIN, 'FORCE_SSL_LOGIN' => FORCE_SSL_LOGIN, 'FTP_ASCII' => FTP_ASCII, 'FTP_AUTOASCII' => FTP_AUTOASCII, 'FTP_BINARY' => FTP_BINARY, 'FTP_FORCE' => FTP_FORCE, 'IS_PROFILE_PAGE' => IS_PROFILE_PAGE, 'JSON_BOOL' => JSON_BOOL, 'JSON_END_ARRAY' => JSON_END_ARRAY, 'JSON_END_OBJ' => JSON_END_OBJ, 'JSON_FLOAT' => JSON_FLOAT, 'JSON_INT' => JSON_INT, 'JSON_IN_ARRAY' => JSON_IN_ARRAY, 'JSON_IN_BETWEEN' => JSON_IN_BETWEEN, 'JSON_IN_OBJECT' => JSON_IN_OBJECT, 'JSON_KEY' => JSON_KEY, 'JSON_NULL' => JSON_NULL, 'JSON_SKIP' => JSON_SKIP, 'JSON_START_ARRAY' => JSON_START_ARRAY, 'JSON_START_OBJ' => JSON_START_OBJ, 'JSON_STR' => JSON_STR, 'LANGDIR' => LANGDIR, 'LOGGED_IN_COOKIE' => LOGGED_IN_COOKIE, 'LOGGED_IN_KEY' => LOGGED_IN_KEY, 'MAGPIE_CACHE_AGE' => MAGPIE_CACHE_AGE, 'MAGPIE_CACHE_DIR' => MAGPIE_CACHE_DIR, 'MAGPIE_CACHE_FRESH_ONLY' => MAGPIE_CACHE_FRESH_ONLY, 'MAGPIE_CACHE_ON' => MAGPIE_CACHE_ON, 'MAGPIE_DEBUG' => MAGPIE_DEBUG, 'MAGPIE_FETCH_TIME_OUT' => MAGPIE_FETCH_TIME_OUT, 'MAGPIE_INITALIZED' => MAGPIE_INITALIZED, 'MAGPIE_USER_AGENT' => MAGPIE_USER_AGENT, 'MAGPIE_USE_GZIP' => MAGPIE_USE_GZIP, 'MAX_EXECUTION_TIME' => MAX_EXECUTION_TIME, 'MAX_RESULTS' => MAX_RESULTS, 'MC_LOGGER_DEBUG' => MC_LOGGER_DEBUG, 'MC_LOGGER_ERROR' => MC_LOGGER_ERROR, 'MC_LOGGER_FATAL' => MC_LOGGER_FATAL, 'MC_LOGGER_INFO' => MC_LOGGER_INFO, 'MC_LOGGER_WARN' => MC_LOGGER_WARN, 'OBJECT' => OBJECT, 'OBJECT_K' => OBJECT_K, 'PASS_COOKIE' => PASS_COOKIE, 'PCLZIP_ATT_FILE_NAME' => PCLZIP_ATT_FILE_NAME, 'PCLZIP_ATT_FILE_NEW_FULL_NAME' => PCLZIP_ATT_FILE_NEW_FULL_NAME, 'PCLZIP_ATT_FILE_NEW_SHORT_NAME' => PCLZIP_ATT_FILE_NEW_SHORT_NAME, 'PCLZIP_CB_POST_ADD' => PCLZIP_CB_POST_ADD, 'PCLZIP_CB_POST_DELETE' => PCLZIP_CB_POST_DELETE, 'PCLZIP_CB_POST_EXTRACT' => PCLZIP_CB_POST_EXTRACT, 'PCLZIP_CB_POST_LIST' => PCLZIP_CB_POST_LIST, 'PCLZIP_CB_PRE_ADD' => PCLZIP_CB_PRE_ADD, 'PCLZIP_CB_PRE_DELETE' => PCLZIP_CB_PRE_DELETE, 'PCLZIP_CB_PRE_EXTRACT' => PCLZIP_CB_PRE_EXTRACT, 'PCLZIP_CB_PRE_LIST' => PCLZIP_CB_PRE_LIST, 'PCLZIP_ERROR_EXTERNAL' => PCLZIP_ERROR_EXTERNAL, 'PCLZIP_ERR_ALREADY_A_DIRECTORY' => PCLZIP_ERR_ALREADY_A_DIRECTORY, 'PCLZIP_ERR_BAD_CHECKSUM' => PCLZIP_ERR_BAD_CHECKSUM, 'PCLZIP_ERR_BAD_EXTENSION' => PCLZIP_ERR_BAD_EXTENSION, 'PCLZIP_ERR_BAD_EXTRACTED_FILE' => PCLZIP_ERR_BAD_EXTRACTED_FILE, 'PCLZIP_ERR_BAD_FORMAT' => PCLZIP_ERR_BAD_FORMAT, 'PCLZIP_ERR_DELETE_FILE_FAIL' => PCLZIP_ERR_DELETE_FILE_FAIL, 'PCLZIP_ERR_DIRECTORY_RESTRICTION' => PCLZIP_ERR_DIRECTORY_RESTRICTION, 'PCLZIP_ERR_DIR_CREATE_FAIL' => PCLZIP_ERR_DIR_CREATE_FAIL, 'PCLZIP_ERR_FILENAME_TOO_LONG' => PCLZIP_ERR_FILENAME_TOO_LONG, 'PCLZIP_ERR_INVALID_ARCHIVE_ZIP' => PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE' => PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, 'PCLZIP_ERR_INVALID_OPTION_VALUE' => PCLZIP_ERR_INVALID_OPTION_VALUE, 'PCLZIP_ERR_INVALID_PARAMETER' => PCLZIP_ERR_INVALID_PARAMETER, 'PCLZIP_ERR_INVALID_ZIP' => PCLZIP_ERR_INVALID_ZIP, 'PCLZIP_ERR_MISSING_FILE' => PCLZIP_ERR_MISSING_FILE, 'PCLZIP_ERR_MISSING_OPTION_VALUE' => PCLZIP_ERR_MISSING_OPTION_VALUE, 'PCLZIP_ERR_NO_ERROR' => PCLZIP_ERR_NO_ERROR, 'PCLZIP_ERR_READ_OPEN_FAIL' => PCLZIP_ERR_READ_OPEN_FAIL, 'PCLZIP_ERR_RENAME_FILE_FAIL' => PCLZIP_ERR_RENAME_FILE_FAIL, 'PCLZIP_ERR_UNSUPPORTED_COMPRESSION' => PCLZIP_ERR_UNSUPPORTED_COMPRESSION, 'PCLZIP_ERR_UNSUPPORTED_ENCRYPTION' => PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, 'PCLZIP_ERR_USER_ABORTED' => PCLZIP_ERR_USER_ABORTED, 'PCLZIP_ERR_WRITE_OPEN_FAIL' => PCLZIP_ERR_WRITE_OPEN_FAIL, 'PCLZIP_OPT_ADD_COMMENT' => PCLZIP_OPT_ADD_COMMENT, 'PCLZIP_OPT_ADD_PATH' => PCLZIP_OPT_ADD_PATH, 'PCLZIP_OPT_BY_EREG' => PCLZIP_OPT_BY_EREG, 'PCLZIP_OPT_BY_INDEX' => PCLZIP_OPT_BY_INDEX, 'PCLZIP_OPT_BY_NAME' => PCLZIP_OPT_BY_NAME, 'PCLZIP_OPT_BY_PREG' => PCLZIP_OPT_BY_PREG, 'PCLZIP_OPT_COMMENT' => PCLZIP_OPT_COMMENT, 'PCLZIP_OPT_EXTRACT_AS_STRING' => PCLZIP_OPT_EXTRACT_AS_STRING, 'PCLZIP_OPT_EXTRACT_DIR_RESTRICTION' => PCLZIP_OPT_EXTRACT_DIR_RESTRICTION, 'PCLZIP_OPT_EXTRACT_IN_OUTPUT' => PCLZIP_OPT_EXTRACT_IN_OUTPUT, 'PCLZIP_OPT_NO_COMPRESSION' => PCLZIP_OPT_NO_COMPRESSION, 'PCLZIP_OPT_PATH' => PCLZIP_OPT_PATH, 'PCLZIP_OPT_PREPEND_COMMENT' => PCLZIP_OPT_PREPEND_COMMENT, 'PCLZIP_OPT_REMOVE_ALL_PATH' => PCLZIP_OPT_REMOVE_ALL_PATH, 'PCLZIP_OPT_REMOVE_PATH' => PCLZIP_OPT_REMOVE_PATH, 'PCLZIP_OPT_REPLACE_NEWER' => PCLZIP_OPT_REPLACE_NEWER, 'PCLZIP_OPT_SET_CHMOD' => PCLZIP_OPT_SET_CHMOD, 'PCLZIP_OPT_STOP_ON_ERROR' => PCLZIP_OPT_STOP_ON_ERROR, 'PCLZIP_READ_BLOCK_SIZE' => PCLZIP_READ_BLOCK_SIZE, 'PCLZIP_SEPARATOR' => PCLZIP_SEPARATOR, 'PCLZIP_TEMPORARY_DIR' => PCLZIP_TEMPORARY_DIR, 'PLUGINDIR' => PLUGINDIR, 'PLUGINS_COOKIE_PATH' => PLUGINS_COOKIE_PATH, 'RSS' => RSS, 'SECURE_AUTH_COOKIE' => SECURE_AUTH_COOKIE, 'SECURE_AUTH_KEY' => SECURE_AUTH_KEY, 'SITECOOKIEPATH' => SITECOOKIEPATH, 'STATUS_INTERVAL' => STATUS_INTERVAL, 'STYLESHEETPATH' => STYLESHEETPATH, 'TEMPLATEPATH' => TEMPLATEPATH, 'TEST_COOKIE' => TEST_COOKIE, 'USER_COOKIE' => USER_COOKIE, 'WPINC' => WPINC, 'WPLANG' => WPLANG, 'WP_ADMIN' => WP_ADMIN, 'WP_CONTENT_DIR' => WP_CONTENT_DIR, 'WP_CONTENT_URL' => WP_CONTENT_URL, 'WP_IMPORTING' => WP_IMPORTING, 'WP_INSTALLING' => WP_INSTALLING, 'WP_LANG_DIR' => WP_LANG_DIR, 'WP_MEMORY_LIMIT' => WP_MEMORY_LIMIT, 'WP_PLUGIN_DIR' => WP_PLUGIN_DIR, 'WP_PLUGIN_URL' => WP_PLUGIN_URL, 'WP_USE_THEMES' => WP_USE_THEMES, 'WXR_VERSION' => WXR_VERSION, 'XMLRPC_REQUEST' => XMLRPC_REQUEST); $wp_globals_a_l = array('$admin_page_hooks' => $admin_page_hooks, '$ajax_results' => $ajax_results, '$all_links' => $all_links, '$allowedposttags' => $allowedposttags, '$allowedtags' => $allowedtags, '$authordata' => $authordata, '$bgcolor' => $bgcolor, '$cache_categories' => $cache_categories, '$cache_lastcommentmodified' => $cache_lastcommentmodified, '$cache_lastpostdate' => $cache_lastpostdate, '$cache_lastpostmodified' => $cache_lastpostmodified, '$cache_userdata' => $cache_userdata, '$category_cache' => $category_cache, '$class' => $class, '$comment' => $comment, '$comment_cache' => $comment_cache, '$comment_count_cache' => $comment_count_cache, '$commentdata' => $commentdata, '$current_user' => $current_user, '$day' => $day, '$debug' => $debug, '$descriptions' => $descriptions, '$error' => $error, '$feeds' => $feeds, '$id' => $id, '$is_apache' => $is_apache, '$is_IIS' => $is_IIS, '$is_macIE' => $is_macIE, '$is_winIE' => $is_winIE, '$l10n' => $l10n, '$locale' => $locale, '$link' => $link); $wp_globals_m_r = array('$m' => $m, '$map' => $map, '$max_num_pages' => $max_num_pages, '$menu' => $menu, '$mode' => $mode, '$month' => $month, '$month_abbrev' => $month_abbrev, '$monthnum' => $monthnum, '$more' => $more, '$multipage' => $multipage, '$names' => $names, '$newday' => $newday, '$numpages' => $numpages, '$page' => $page, '$page_cache' => $page_cache, '$paged' => $paged, '$pagenow' => $pagenow, '$pages' => $pages, '$parent_file' => $parent_file, '$preview' => $preview, '$previousday' => $previousday, '$previousweekday' => $previousweekday, '$plugin_page' => $plugin_page, '$post' => $post, '$post_cache' => $post_cache, '$post_default_category' => $post_default_category, '$post_default_title' => $post_default_title, '$post_meta_cache' => $post_meta_cache, '$postc' => $postc, '$postdata' => $postdata, '$posts' => $posts, '$posts_per_page' => $posts_per_page, '$previousday' => $previousday, '$request' => $request, '$result' => $result, '$richedit' => $richedit); $wp_globals_s_v = array('$single' => $single, '$submenu' => $submenu, '$table_prefix' => $table_prefix, '$targets' => $targets, '$timedifference' => $timedifference, '$timestart' => $timestart, '$timeend' => $timeend, '$updated_timestamp' => $updated_timestamp, '$urls' => $urls, '$user_ID' => $user_ID, '$user_email' => $user_email, '$user_identity' => $user_identity, '$user_level' => $user_level, '$user_login' => $user_login, '$user_pass_md5' => $user_pass_md5, '$user_url' => $user_url); $wp_globals_w = array('$weekday' => $weekday, '$weekday_abbrev' => $weekday_abbrev, '$weekday_initial' => $weekday_initial, '$withcomments' => $withcomments, '$wp' => $wp, '$wp_broken_themes' => $wp_broken_themes, '$wp_db_version' => $wp_db_version, '$wp_did_header' => $wp_did_header, '$wp_did_template_redirect' => $wp_did_template_redirect, '$wp_file_description' => $wp_file_description, '$wp_filter' => $wp_filter, '$wp_importers' => $wp_importers, '$wp_plugins' => $wp_plugins, '$wp_themes' => $wp_themes, '$wp_object_cache' => $wp_object_cache, '$wp_query' => $wp_query, '$wp_queries' => $wp_queries, '$wp_rewrite' => $wp_rewrite, '$wp_roles' => $wp_roles, '$wp_similiesreplace' => $wp_similiesreplace, '$wp_smiliessearch' => $wp_smiliessearch, '$wp_version' => $wp_version, '$wpcommentspopupfile' => $wpcommentspopupfile, '$wpcommentsjavascript' => $wpcommentsjavascript); FB::info($wp_version, 'WP Version'); // FB::info($wp_roles, 'WP Roles'); // FB::info($wp_constants, 'WP Constant'); // FB::info($wp_globals_a_l, 'WP Globals A-L'); // FB::info($wp_globals_m_r, 'WP Globals M-R'); // FB::info($wp_globals_s_v, 'WP Globals S-V'); // FB::info($wp_globals_w, 'WP Globals W'); // FB::info($data, 'WP DATA'); // FB::info($update_options, 'Update Array'); //PHP Predefined Variables FB::info($_COOKIE, '_COOKIE'); FB::info($_ENV, '_ENV'); FB::info($_FILES, '_FILES'); FB::info($_GET, '_GET'); FB::info($PHP_SELF, '_PHP_SELF'); FB::info($_POST, '_POST'); FB::info($_REQUEST, '_REQUEST'); FB::info($_SERVER, '_SERVER'); FB::info($_SESSION, '_SESSION'); }
function NewDocRequest($order_id) { global $customer_id, $abo_id; FB::info('NewDocRequest Nummer' . $abo_id); if (SOAP_SERVER != '') { $client = new SoapClient(null, array('location' => SOAP_SERVER, 'uri' => SOAP_NAMESPACE, 'trace' => true, 'connection_timeout' => 5)); $response = $client->__doRequest('<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <NewDocRequest xmlns="test"> <Nummer>' . $abo_id . '</Nummer> <Soort>B</Soort> <Weborder>' . $order_id . '</Weborder> </NewDocRequest> </SOAP-ENV:Body> </SOAP-ENV:Envelope>', SOAP_SERVER, SOAP_NAMESPACE, SOAP_1_2); if ($response) { $dom = new DOMDocument(); $dom->loadXML($response); $xPath = new DOMXPath($dom); $result = array(); if ($xPath->evaluate("//Status")->item(0)->nodeValue == 0) { $result = $xPath->evaluate("//StatusTekst")->item(0)->nodeValue; } else { $result = $xPath->evaluate("//Document")->item(0)->nodeValue; } } } return $result; }
function passwordExists($dbConn, $username, $password) { $isValid = false; $dbQuery = "SELECT Password FROM USERS WHERE Username = '******' LIMIT 1"; FB::info('passwordExists() query: ' . $dbQuery); $dbRows = mysqli_query($dbConn, $dbQuery); $dbValues = mysqli_fetch_assoc($dbRows); $dbPassword = $dbValues['Password']; if (password_verify($password, $dbPassword)) { $isValid = true; FB::log('Password is valid!'); // Check if the password needs a rehash. if (password_needs_rehash($dbPassword, PASSWORD_DEFAULT)) { FB::log('Rehashing password!'); $dbPassword = password_hash($password, PASSWORD_DEFAULT); $dbQuery = "UPDATE USERS SET Password = '******' WHERE Username = '******'"; FB::info('Password rehash query: ' . $dbQuery); $dbRows = mysqli_query($dbConn, $dbQuery); if ($dbRows) { FB::log('Password rehash successful!'); } else { FB::error('Password rehash failed: ' . mysqli_error($dbConn)); } } } return $isValid; }
function addUser($dbConn, $username, $password, $email) { // Add user to USERS table. $dbQuery = "INSERT INTO USERS(Username, First_name, Last_name, Email, Status, About, Date_joined, Password) " . "VALUES('" . $username . "', '', '', '" . $email . "', 'active', '', CURDATE(), '" . $password . "')"; FB::info('addUser() query:' . $dbQuery); if ($dbResults = mysqli_query($dbConn, $dbQuery)) { FB::log('USERS insert success! (I think)'); } else { FB::error('USERS insert failed!'); } $userId = mysqli_insert_id($dbConn); // ID of the latest created user. FB::info('New User ID: ' . $userId); // Add user role for newly created user into USER_ROLES table. $dbQuery = "INSERT INTO USER_ROLES(User_Id, Role_Id)" . "VALUES(" . $userId . ", 1)"; if ($dbResults = mysqli_query($dbConn, $dbQuery)) { FB::log('USER_ROLES insert success! (I think)'); } else { FB::error('USER_ROLES insert failed!'); } // Add default avatar for newly created user into IMAGES table. $avatar = file('images/default_avatar.png'); // Default avatar for new users. $dbQuery = "INSERT INTO IMAGES(Description, Image, User_Id) " . "VALUES('test', '" . $avatar . "', " . $userId . ")"; if ($dbResults = mysqli_query($dbConn, $dbQuery)) { FB::log('IMAGES insert success! (I think)'); } else { FB::error('IMAGES insert failed!'); } }
function WFB() { if (!class_exists('FB')) { return; } $numargs = func_num_args(); $arg_list = func_get_args(); if ($numargs == 1) { FB::info($arg_list[0]); } elseif ($numargs == 2) { FB::info($arg_list[0], $arg_list[1]); } }
public function getLists() { //#FB::info(Site::$user, 'User'); if (Site::$user) { $this->lists = array(); $sql = "SELECT `lists`.`id`, `lists`.`name`\n\t\t\t\t\tFROM `list_user` \n\t\t\t\t\tINNER JOIN `lists`\n\t\t\t\t\tON `lists`.`id` = `list_user`.`list`\n\t\t\t\t\tWHERE `list_user`.`user` = " . Site::$user . ";"; $result = Site::$db->query($sql); while ($list = $result->fetch_assoc()) { $this->lists[$list['id']]['list'] = $list; $this->lists[$list['id']]['tasks'] = self::getTasks($list['id']); } FB::info($this->lists, 'SELF List'); } }
public function getUserKeywords() { //#FB::info(Site::$user, 'User'); if (Site::$user) { $sql = "SELECT `keywords`.`keyword`, `keywords`.`id`, `keytypes`.`type`,`keytypes`.`code`,`key_relations`.`task`\n\t\t\t\t\tFROM `keywords` \n\t\t\t\t\tINNER JOIN `key_relations`\n \t\t\t\t\tON `key_relations`.`keyword` = `keywords`.`id`\n\t\t\t\t\tINNER JOIN `keytypes`\n\t\t\t\t\tON `keywords`.`type` = `keytypes`.`id`\n\t\t\t\t\tWHERE `key_relations`.`user` = " . Site::$user . "\n\t\t\t\t\tORDER BY `keywords`.`id`;"; $result = Site::$db->query($sql); $name = array(); while ($obj = $result->fetch_assoc()) { if (!in_array($obj['keyword'] . '-' . $obj['type'], $name)) { $name[] = $obj['keyword'] . '-' . $obj['type']; self::$keys[$obj['type']][] = $obj; } } FB::info(self::$keys, 'User Keywords'); FB::log(debug_backtrace(), 'User Keywords'); } }
protected function getOptions() { // Initialise variables. $options = array(); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('id AS value,formato AS text'); $query->from('#__gg_formati'); // Get the options. $db->setQuery($query); FB::info((string) $query, "query listaformati "); $options = $db->loadObjectList(); // Check for a database error. if ($db->getErrorNum()) { JError::raiseWarning(500, $db->getErrorMsg()); } // Merge any additional options in the XML definition. $options = array_merge(parent::getOptions(), $options); return $options; }
/** * Charge et retourne la partie demandé. * @param string $who * @param string $path * @return array */ function GetLngBlock($who, $path = LNG_PATH) { if (is_array($this->lngs[$path . $who])) { if (IN_DEV) { FB::info($path . $who . '(' . count($this->lngs[$path . $who]) . ')', 'i18n, cache'); } return $this->lngs[$path . $who]; } $lng_file = $path . $who . '.lng.php'; if (!file_exists($lng_file)) { trigger_error(sprintf('Language block "%s" not found in pack "%s"', $who, $lng_file), E_USER_ERROR); } include $lng_file; // array_walk_recursive($lng, 'testlng'); $this->lngs[$path . $who] = $lng; if (IN_DEV) { FB::info($path . $who . '(' . count($path . $lng) . ')', 'i18n, ' . LNG_CODE); } return $lng; }
function NewDocDetail($document, $art_nummer, $hoev, $verkoop, $maat, $recyclage, $bebat, $bestelbon) { FB::info('NewDocDetail Nummer' . $document); if (SOAP_SERVER != '') { $client = new SoapClient(null, array('location' => SOAP_SERVER, 'uri' => SOAP_NAMESPACE, 'trace' => true, 'connection_timeout' => 5)); $xml_envelope = '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <NewDocDetail xmlns="test"> <Document>' . $document . '</Document> <Soort>B</Soort> <Artikelen> <Artikel> <Art_nummer>' . $art_nummer . '</Art_nummer> <Hoev>' . $hoev . '</Hoev> <Verkoop>' . $verkoop . '</Verkoop> <Maat>' . $maat . '</Maat> <Recyclage>' . $recyclage . '</Recyclage> <Bebat>' . $bebat . '</Bebat> <Bestelbon>' . $bestelbon . '</Bestelbon> </Artikel> </Artikelen> </NewDocDetail> </SOAP-ENV:Body> </SOAP-ENV:Envelope>'; $response = $client->__doRequest($xml_envelope, SOAP_SERVER, SOAP_NAMESPACE, SOAP_1_2); if ($response) { $dom = new DOMDocument(); $dom->loadXML($response); $xPath = new DOMXPath($dom); $result = array(); if ($xPath->evaluate("//Status")->item(0)->nodeValue == 0) { $result = $xPath->evaluate("//StatusTekst")->item(0)->nodeValue; } else { $result = $xPath->evaluate("//Document")->item(0)->nodeValue; } } } }
/** * (non-PHPdoc) * @see debugObject::msg() */ public function msg($msg, $level = DEBUG_LOG) { if (!empty($msg) && $this->_level & $level) { if (DEBUG_INFO & $level) { if (is_array($msg)) { FB::group(current($msg), array('Collapsed' => true)); FB::info($msg); FB::groupEnd(); } else { FB::info($msg); } } elseif (DEBUG_ERROR & $level || DEBUG_STRICT & $level) { if (is_array($msg)) { FB::group(current($msg), array('Collapsed' => true, 'Color' => '#FF0000')); FB::error($msg); FB::groupEnd(); } else { FB::error($msg); } } elseif (DEBUG_WARNING & $level) { if (is_array($msg)) { FB::group(current($msg), array('Collapsed' => true, 'Color' => '#FF0000')); FB::warn($msg); FB::groupEnd(); } else { FB::warn($msg); } } else { if (is_array($msg)) { FB::group(current($msg), array('Collapsed' => true)); FB::log($msg); FB::groupEnd(); } else { FB::log($msg); } } } }
public function Do_Parcours($IN, $OUT) { // initialisation... if (!$this->initialised) { $this->_init($IN, $OUT); } $this->IN = $IN; $this->OUT = $OUT; $this->allfoundparcours = array(); $this->distance = $this->mindist = $this->Calcul_Distance($IN, $OUT); if (DataEngine::config_key('config', 'Parcours_Max_Time') == 0) { $this->maxtry = ini_get('max_execution_time') - 1; } else { $this->maxtry = DataEngine::config_key('config', 'Parcours_Max_Time'); } $this->nbvortex = min($this->map->method - 1, 2); if (!is_array($this->allvortex)) { return array($this->distance, array($IN, $OUT)); } $this->_Parcours($IN, '', 0, array(), array(), 0); $parcours = false; foreach ($this->allfoundparcours as $k => $v) { if (!$parcours) { $parcours = $v; $kv = $k; continue; } if (count($parcours[1]) > count($v[1])) { $parcours = $v; } } if (IN_DEV) { FB::info($this->maxtry, 'Timing max'); FB::info(microtime(true) - START, 'Timing sec'); } return $parcours; }
public static function setTipologieContenuti() { $user = JFactory::getUser(); $userid = $user->get('id'); $res = outputHelper::getContenutiTipology(); $resUser = outputHelper::getIdTipologiaContenuto(); FB::log($query, " query getTipologieContenuti "); FB::log($queryUser, " queryRes getTipologieContenuti "); FB::log($res, " res getTipologieContenuti "); FB::log($resUser, " resUser getTipologieContenuti "); $xml = "\n\t\t\t<fieldset>\n <h3>Seleziona per quali contenuti vuoi essere aggiornato</h3>"; foreach ($res as $item) { if (in_array($item['id'], $resUser)) { $xml .= "\n <input type='checkbox' id='" . $item['tipologia'] . "' name='" . $item['tipologia'] . "' value='" . $item['id'] . "' checked='checked' /> " . $item['descrizione'] . " <br />\n\t\t\t"; FB::info(" getTipologieContenuti dentro if"); } else { $xml .= "\n <input type='checkbox' id='" . $item['tipologia'] . "' name='" . $item['tipologia'] . "' value='" . $item['id'] . "' /> " . $item['descrizione'] . " <br />\n "; FB::info(" getTipologieContenuti fuori if "); } } $xml .= "\n </fieldset>\n\t\t\t"; FB::log($xml, " xml getTipologieContenuti "); return $xml; }
<?php // Define a path for loading the CMS. Default is ../ennui-cms/ define('CMS_PATH', '../ennui-cms/'); // Initializes the core functionality of the CMS require_once CMS_PATH . 'core/init.inc.php'; FB::info("Developers: FirePHP is included in the core for easy debugging!"); // Initialize classes used in the sidebar or in widgets $sidebar = new Single($dbo, array('sidebar')); ?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <title><?php echo $title; ?> </title> <meta name="description" content="<?php echo SITE_DESCRIPTION; ?> " /> <!-- CSS File Includes --> <link rel="stylesheet" type="text/css" media="screen,projection" href="/assets/css/default.css" /> <?php if (file_exists(dirname($_SERVER['SCRIPT_FILENAME']) . "/assets/css/{$obj->url0}.css")) { ?>
function display($tpl = null) { $document = & JFactory::getDocument(); $config = JFactory::getConfig(); $notifiche = $config->get('notifiche'); FB::info($notifiche, "notifiche view"); // $document->addStyleSheet(JURI::root(true) . '/components/com_gglms/css/tv_home.css'); $document->addStyleSheet(JURI::root(true) . '/components/com_gglms/css/general.css'); $document->addStyleSheet(JURI::root(true) . '/components/com_gglms/css/search.css'); // $this->_japp = & JFactory::getApplication(); // $user = & JFactory::getUser(); // if ($user->guest) { // $msg = "Per accedere al corso è necessario loggarsi"; // $uri = JFactory::getURI(); // $return = $uri->toString(); // $url = JURI::base().'home.html'; // $url .= '?return='.base64_encode($return); // $this->_japp->redirect(JRoute::_($url), $msg); // } //$document->addScript('http://code.jquery.com/ui/1.10.3/jquery-ui.js'); // $document->addStyleSheet(JURI::root(true) . '/components/com_gglms/css/jquery.jscrollpane.css'); // $document->addScript(JURI::root(true) . '/components/com_gglms/js/jquery.mousewheel.js'); // $document->addScript(JURI::root(true) . '/components/com_gglms/js/jquery.jscrollpane.min.js'); // $model = & $this->getModel(); //$Categories = $model->getCategories(); //$ContentsOfTheDay = $model->getContentsOfTheDay('pubblicato = 1 AND datapubblicazione<"2013-04-27"', 10, 'id desc'); // $banner1 = $model->getBanner('pubblicato = 1 AND posizione = 1', 1, 'ordinamento'); // $banner1 = $banner1[0]; // $banner2 = $model->getBanner('pubblicato = 1 AND posizione = 2', 10, 'ordinamento'); // $unita= $model->getUnit(); // $CURRENT_DATE = empty($_REQUEST['data']) ? "CURRENT_DATE" : "'" . $_REQUEST['data'] . "'"; // $vetrina = $model->getVetrina("c.pubblicato = 1", $limit = 1, $orderby = "ordinamento ASC,c.id ASC"); // $contents_of_the_day = $model->getContentsOfTheDay('c.pubblicato=1', $limit = 12); // DA DISATTIVARE A REGIME // // // $model->generateContentAlias(); // $model->generateCategoryAlias(); // $model->generateCongressAlias(); // // //DA DISATTIVARE A REGIME // $this->assignRef('vetrina', $vetrina); // $this->assignRef('unita', $unita); // $this->assignRef('Categories', $categories); // $this->assignRef('ContentsOfTheDay', $contents_of_the_day); // $this->assignRef('banner1', $banner1); // $this->assignRef('banner2', $banner2); $this->assignRef('notifiche', $notifiche); parent::display($tpl); }
define('FIREPHP_INFO', false); define('FIREPHP_WARN', false); define('FIREPHP_ERROR', false); define('FIREPHP_TRACE', true); require_once '../../Grace/FirePHPCore/fb.php'; FB::log('Hello World !'); // 常规记录 \FB::group('Test Group A', ['Collapsed' => true]); // 记录分组 // 以下为按照不同类别或者类型进行信息记录 FB::log('Plain Message'); FB::info('Info Message'); FB::warn('Warn Message'); FB::error('Error Message'); FB::log('Message', 'Optional Label'); FB::info([1, 2, 3, 5, 56], "All Turtles"); FB::groupEnd(); FB::group('Test Group B'); FB::log('Hello World B'); FB::log('Plain Message'); FB::info('Info Message'); FB::warn('Warn Message'); FB::error('Error Message'); FB::log('Message', 'Optional Label'); FB::groupEnd(); $table[] = array('Col 1 Heading', 'Col 2 Heading', 'Col 2 Heading'); $table[] = array('Row 1 Col 1', 'Row 1 Col 2', 'Row 1 Col 2'); $table[] = array('Row 2 Col 1', 'Row 2 Col 2'); $table[] = array('Row 3 Col 1', 'Row 3 Col 2'); FB::table('Table Label', $table); FB::trace('123', [1, 23, 4]);
/** * Overloaded bind function * * @param array $hash named array * @return null|string null is operation was satisfactory, otherwise returns an error * @see JTable:bind * @since 1.5 */ public function bind($array, $ignore = '') { if (is_array($array['categoria'])) { $array['categoria'] = implode(',', $array['categoria']); gglmsHelper::SetMappaContenutoUnita($array); } if (is_array($array['files'])) { $array['files'] = implode(',', $array['files']); gglmsHelper::SetMappaContenutoFiles($array); } if (is_array($array['acl'])) { $array['acl'] = implode(',', $array['acl']); gglmsHelper::SetMappaContenutoAcl($array); } if (is_array($array['parametri'])) { $array['parametri'] = implode(',', $array['parametri']); gglmsHelper::SetMappaContenutoParams($array); } if (is_array($array['prerequisiti'])) { $array['prerequisiti'] = implode(',', $array['prerequisiti']); } //RS if (is_array($array['prodotto'])) { FB::info($array, "dentro bind prodotto "); $array['prodotto'] = implode(',', $array['prodotto']); } if ($array['prodotto'] != null) { gglmsHelper::SetMappaContenutoProdotti($array); } //RS if (is_array($array['formato'])) { FB::info($array, "dentro bind formato "); $array['formato'] = implode(',', $array['formato']); } if ($array['formato'] != null) { gglmsHelper::SetMappaContenutoFormati($array); } //RS if (is_array($array['area'])) { FB::info($array, "dentro bind area "); $array['area'] = implode(',', $array['area']); } if ($array['area'] != null) { gglmsHelper::SetMappaContenutoAree($array); } //RS if (is_array($array['livello'])) { FB::info($array, "dentro bind livello "); $array['livello'] = implode(',', $array['livello']); } if ($array['livello'] != null) { gglmsHelper::SetMappaContenutoLivelli($array); } //FB::log($array, "Array prodotto"); // $this->SetMappaContenutoUnita($array); // if (is_array($array['esercizi'])) { // $array['esercizi'] = implode(',', $array['esercizi']); // } // if ($array['durata'] == 0) { // $array['durata'] = $this->checkContentDuration($array['id']); // } //RS if (is_string($array['abstract'])) { //$array['abstract'] = htmlentities($array['abstract']); } FB::info($array, "dentro bind contenuti all "); return parent::bind($array, $ignore); }
<?php header("Content-type: text/html; charset=utf-8"); require_once 'fb.php'; FB::log('Log message'); FB::info('info message'); FB::warn('warn message'); FB::error('error message'); $var = array('abc'); fb($var, FirePHP::TRACE); //End_php
public function display($tpl = null) { $form = $this->get('Form'); $item = $this->get('Item'); $this->form = $form; $this->item = $item; $this->addToolBar(); jimport('joomla.environment.uri'); $host = JURI::root(); FB::log($_SERVER, "{$_SERVER}"); $document =& JFactory::getDocument(); JHtml::_('bootstrap.framework'); //RS JHtml::_('jquery.framework'); //RS JHtml::_('jquery.ui', array('core', 'sortable')); //RS $document->addStyleSheet('http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css'); $document->addStyleSheet($host . 'administrator/components/com_gglms/jupload/css/jquery.fileupload.css'); $document->addStyleSheet($host . 'administrator/components/com_gglms/jupload/css/jquery.fileupload-ui.css'); $document->addScript($host . 'administrator/components/com_gglms/jupload/js/jquery.fileupload.js'); $document->addScript($host . 'administrator/components/com_gglms/jupload/js/procedure.js'); /* RS $document->addScript('http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js'); $document->addScript('http://code.jquery.com/ui/1.10.2/jquery-ui.js'); $document->addStyleSheet('http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css'); $document->addScriptDeclaration('jQuery.noConflict();'); $document->addScript($host . 'administrator/components/com_gglms/jupload/js/vendor/jquery.ui.widget.js'); $document->addScript($host . 'administrator/components/com_gglms/jupload/js/jquery.iframe-transport.js'); $document->addScript($host . 'administrator/components/com_gglms/jupload/js/jquery.fileupload.js'); $document->addScript($host . 'administrator/components/com_gglms/jupload/js/procedure.js'); $document->addScript('http://blueimp.github.io/JavaScript-Load-Image/js/load-image.min.js'); $document->addScript('http://blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js'); $document->addScript('http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js'); $document->addStyleSheet('http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css'); $document->addStyleSheet('http://blueimp.github.io/Gallery/css/blueimp-gallery.min.css'); $document->addStyleSheet($host . 'administrator/components/com_gglms/jupload/css/jquery.fileupload.css'); $document->addStyleSheet($host . 'administrator/components/com_gglms/jupload/css/jquery.fileupload-ui.css'); //<noscript><link rel="stylesheet" href="css/jquery.fileupload-noscript.css"></noscript> //<noscript><link rel="stylesheet" href="css/jquery.fileupload-ui-noscript.css"></noscript> */ // $document->addStyleSheet($host . 'administrator/components/com_gglms/swfupload/default.css'); // $document->addScript('http://code.jquery.com/jquery-1.9.1.js'); // Display the template parent::display($tpl); FB::info($this, " vista content"); // Set the document $this->setDocument(); }
/** * Intefacet to FirePHP info, just to make things easier * * @param $data * @param $label */ public static function info($data, $label) { FB::info($data, $label); }
protected function renaming($name) { //Tony FB::info($name, "name originale"); FB::info($_POST, "{$_POST}"); switch ($_POST['tipologia']) { case 'slide': $estensione = explode('.', $name); $estensione = strtolower(array_pop($estensione)); $name = str_ireplace("Diapositiva", "Slide", $_POST['idelemento']); $name = $name . "." . $estensione; break; case 'allegati': $estensione = explode('.', $name); $estensione = array_pop($estensione); $name = $_POST['jform']['filename']; //RS $name = $_POST['jform']['name']; FB::info($name, " jform filename"); //R $temp_name = explode('.', $name); $name = strtolower($temp_name[0] . "." . $estensione); break; default: $estensione = explode('.', $name); $estensione = array_pop($estensione); $name = strtolower($_POST['idelemento'] . "." . $estensione); break; } FB::info($name, "name ricostruito"); return $name; }
/** * Ritorna le informazioni per l'unita richiesto. * L'id dell'unita viene letto da URL e deve essere un intero valido. * * @return array */ public function getUnita($where = null, $limit = null) { try { if (!empty($this->_content)) { return $this->_content; } $query = 'SELECT * FROM #__gg_unit as u '; if(!$where) $query .= 'WHERE id = '. $this->_id ; else $query .= $where; FB::log($query, "getUnita -- Principale"); $this->_db->setQuery($query); if (false === ($unita = $this->_db->loadAssoc())) throw new RuntimeException($this->_db->getErrorMsg(), E_USER_ERROR); if (empty($unita)) throw new DomainException('Nessun contenuto trovato', E_USER_NOTICE); // $unita['unitaFiglio'] = array(); // > $query = 'SELECT * FROM #__gg_unit WHERE categoriapadre = '.$this->_id .' order by ordinamento '; // FB::log($query, "getUnita - unitaFiglio"); // $this->_db->setQuery($query); // if (false === ($results = $this->_db->loadAssocList())) // throw new RuntimeException($this->_db->getErrorMsg(), E_USER_ERROR); // $unita['unitaFiglio'] = $results; // $unita['unitaPadre'] = array(); // $query = 'SELECT * FROM #__gg_unit WHERE id = '.$unita['categoriapadre'] .' order by ordinamento '; // echo $query; // FB::log($query, "getUnita - unitaPadre"); // $this->_db->setQuery($query); // if (false === ($results = $this->_db->loadAssocList())) // throw new RuntimeException($this->_db->getErrorMsg(), E_USER_ERROR); // $unita['unitaPadre'] = $results; // if($unita['tipologia']==2){ // $unita['contenutiUnita'] = array(); // $unita['contenutiUnita'] = $this->getContenuti($this->_id); // } // foreach ($unita['unitaFiglio'] as &$item) { // // FB::log($item, "item - unita figlio"); // $item['contenutiUnita'] = array(); // $item['contenutiUnita'] = $this->getContenuti($item['id']); // } FB::info($unita, "Unita"); } catch (Exception $e) { FB::error($e); } return $unita; }
public function OnNewUser($user) { FB::info($user, 'addons::OnNewUser'); return true; }
<?php $firephp = FirePHP::getInstance(true); if ($firephp->getEnabled()) { $firephp->info('Enabled'); } $firephp->fb('This should show'); $firephp->setEnabled(false); if (!$firephp->getEnabled()) { $firephp->info('Disabled'); } $firephp->fb('This should NOT show'); $firephp->setEnabled(true); if ($firephp->getEnabled()) { $firephp->info('Enabled'); } $firephp->fb('This should show'); if (FB::getEnabled()) { FB::info('Enabled'); } FB::log('This should show'); FB::setEnabled(false); if (!FB::getEnabled()) { FB::info('Disabled'); } FB::send('This should NOT show'); FB::setEnabled(true); if (FB::getEnabled()) { FB::info('Enabled'); } FB::log('This should show');
// KBI $requestData = []; $numRequests = 0; $encoder = new URLEncoder(); // run export sendRequest: $config = array('source' => intval($id), 'query' => '', 'xslt' => NULL, 'parameters' => NULL); $model = new KbiModelTransformator($config); $document = $model->getDataDescription(); $ok = strpos($document, 'kbierror') === false && !preg_match('/status=\\"failure\\"/', $document); if (++$numRequests < MAX_INITIALIZATION_REQUESTS && !$ok) { sleep(REQUEST_DELAY); goto sendRequest; } if (FB_ENABLED && $debug) { // log into console FB::info(['num requests' => $numRequests, 'document' => $document]); } if ($ok) { $DDPath = APP_PATH . '/web/temp/DD_' . $id . '.pmml'; file_put_contents($DDPath, $document); $DP = new DataParser($DDPath, unserialize(FLPath), FGCPath, null, null, $lang); $DP->loadData(); $responseContent = $DP->parseData(); $responseContent['status'] = 'ok'; } else { $responseContent = ['status' => 'error']; } } $response = new Response(json_encode($responseContent), 200, array('content-type' => 'application/json; charset=UTF-8')); $response->send();
public function tryMatch($string) { $matches = array(); $matched = false; foreach (self::$reg as $key => $exp) { $match = $this->getMatches($string, $exp); if (!empty($match[0][0])) { $matched = true; if ($key == 'time') { $matches[$key] = $match[0][0]; } else { $matches[$key] = substr($match[0][0], 1); } if ($key == 'task') { FB::info($matches, 'TASK'); $matches['title'] = $this->removeKeys($match[0][0]); } } } if (!$matched) { $matches['break'] = true; } FB::log($matches, $string); return $matches; }
// OPENING DATABASE CONNECTION. $dbConn = dbConnect(); // Check that the username exists in the database. $userFound = usernameExists($dbConn, strtolower($loginUsername)); FB::log('User found status: ' . ($userFound ? 'True' : 'False')); if ($userFound) { // Check that the password is correct for the user. $isValid = passwordExists($dbConn, $loginUsername, $loginPassword); FB::log('Login valid? ' . ($isValid ? 'True' : 'False')); if ($isValid) { //TODO Creating PHP sessions for managing user login. FB::log('Login success! Setting session variables...'); $_SESSION['LoggedIn'] = true; $_SESSION['Username'] = $loginUsername; $_SESSION['UserId'] = getUserId($dbConn, $loginUsername); FB::info('LoggedIn: ' . $_SESSION['LoggedIn'] . ', Username: '******'Username'] . ', UserId: ' . $_SESSION['UserId']); } else { $errorMsg = "<b>Your password is incorrect. Please try again.</b>"; } } else { $errorMsg = "<b>That username was not found. Please select an existing username.</b>"; } // CLOSING DATABASE CONNECTION. mysqli_close($dbConn); } ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Login - Open Data Visualizer</title>
function ViewDocRequest($volgnr, $soort = 'B') { global $customer_id, $abo_id; if (SOAP_SERVER != '') { $client = new SoapClient(null, array('location' => SOAP_SERVER, 'uri' => SOAP_NAMESPACE, 'trace' => true, 'connection_timeout' => 5)); $fields = 'art_nummer|omschr_new|maattabel|hoev|verkoop|korting'; $response = $client->__doRequest('<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <ViewDocRequest xmlns="test"> <Nummer>' . $abo_id . '</Nummer> <Soort>' . $soort . '</Soort> <Volgnr>' . $volgnr . '</Volgnr> <Fields>' . $fields . '</Fields> <Header>datum|ref|lev_date|verkoop</Header> </ViewDocRequest> </SOAP-ENV:Body> </SOAP-ENV:Envelope>', SOAP_SERVER, SOAP_NAMESPACE, SOAP_1_2); FB::info('ViewDocRequest ' . $response); if ($response) { $dom = new DOMDocument(); $dom->loadXML($response); $xPath = new DOMXPath($dom); if ($xPath->evaluate("//Status")->item(0)->nodeValue == 0) { $result = $xPath->evaluate("//StatusTekst")->item(0)->nodeValue; } else { $HEADER = new DOMDocument(); $HEADER->loadXML('<xml>' . $xPath->evaluate("//Header")->item(0)->nodeValue . '</xml>'); $headerPath = new DOMXPath($HEADER); $header = $headerPath->evaluate("//xml/Header/*"); $result .= '<table width="100%" class="header-table">'; $result .= '<tr>'; $result .= '<td><strong>' . Translate('Bestelling') . '</strong>: ' . $_GET['order_id'] . '</td>'; foreach ($header as $headeritem) { if ($headeritem->nodeName == 'lev_date' && $headeritem->nodeValue == ' / / ') { $headeritem->nodeValue = Translate('Onbekend'); } $result .= '<td class="element-' . $headeritem->nodeName . '"><strong>' . Translate($headeritem->nodeName) . '</strong>: ' . $headeritem->nodeValue . '</td>'; } $result .= '</tr>'; $result .= '</table>'; $dom->loadXML('<xml>' . $xPath->evaluate("//List")->item(0)->nodeValue . '</xml>'); $xPath = new DOMXPath($dom); $elements = $xPath->evaluate("//xml/Document/Artikel/*"); $result .= '<div class="box ViewDocRequest">'; ?> <script type="text/javascript"> $(document).ready(function(){ $('.title-korting').hide(); $('.element-korting').hide(); $('#ViewDocRequest').tablesorter(); }); </script> <?php $result .= '<table class="data-table tablesorter" id="ViewDocRequest" width="100%">'; $result .= '<thead>'; $result .= '<tr class="title">'; $result .= '<th class="title-art_nummer">' . Translate('Artikel Nummer') . '</th>'; $result .= '<th class="title-omschr_new">' . Translate('Omschrijving') . '</th>'; $result .= '<th class="title-maat">' . Translate('Maat') . '</th>'; $result .= '<th class="title-hoev">' . Translate('Hoeveelheid') . '</th>'; $result .= '<th class="title-verkoop">' . Translate('Prijs') . '</th>'; $result .= '<th class="title-korting">' . Translate('Korting') . '</th>'; $result .= '<th class="title-totaal">' . Translate('Totaal') . '</th>'; if ($soort == 'B') { $result .= '<th class="title-afroep">' . Translate('Afroep') . '</th>'; } $result .= '</tr>'; $result .= '</thead>'; $result .= '<tbody>'; $oe_count = 0; foreach ($elements as $element) { if ($element->nodeName == 'art_nummer') { $oe_count++; if ($oe_count % 2) { $extra_class = ' odd'; } else { $extra_class = ' even'; } $result .= '<tr class="data' . $extra_class . '">'; } if ($element->nodeName == 'hoev') { $hoev = $element->nodeValue; } elseif ($element->nodeName == 'verkoop') { $prijs = $element->nodeValue; } elseif ($element->nodeName == 'korting') { $korting = $element->nodeValue; if ($korting > 0) { ?> <script type="text/javascript"> $(document).ready(function(){ $('.title-korting').show(); $('.element-korting').show(); }); </script> <?php } } elseif ($element->nodeName == 'art_nummer') { $model = $element->nodeValue; $product_query = tep_db_query('SELECT products_id FROM ' . TABLE_PRODUCTS . ' WHERE products_model = "' . $model . '"'); $product = tep_db_fetch_array($product_query); if (tep_db_num_rows($product_query) > 0) { $element->nodeValue = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product['products_id']) . '">' . $element->nodeValue . '</a>'; } } elseif ($element->nodeName == 'omschr_new') { if (tep_db_num_rows($product_query) > 0) { $element->nodeValue = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product['products_id']) . '">' . $element->nodeValue . '</a>'; } } elseif ($element->nodeName == 'maattabel') { $maat = $element->nodeValue; } $result .= '<td class="element-' . $element->nodeName . '">' . $element->nodeValue . '</td>'; if ($element->nodeName == 'korting') { $totaal = $prijs * $hoev - $korting; $result .= '<td class="element-totaal">' . $totaal . '</td>'; if ($soort == 'B') { $result .= '<td class="element-afroep">'; for ($s = 0; $s < $hoev; $s++) { $z = $s + 1; $options[$product['products_id']][] = array('id' => $z, 'text' => $z); } if (isset($options[$product['products_id']])) { $result .= tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=add_product')); $result .= tep_draw_pull_down_menu('quantity', $options[$product['products_id']], $products[$i]['quantity']); $result .= tep_draw_hidden_field('products_id', $product['products_id']); $result .= tep_draw_hidden_field('backorder', $volgnr); $attr_query = tep_db_query("SELECT products_options_values_id FROM " . TABLE_PRODUCTS_OPTIONS_VALUES . " WHERE products_options_values_name = '" . $maat . "'"); $attr = tep_db_fetch_array($attr_query); $optie_query = tep_db_query("SELECT options_id FROM " . TABLE_PRODUCTS_ATTRIBUTES . " WHERE options_values_id = '" . $attr['products_options_values_id'] . "' AND products_id = '" . $product['products_id'] . "'"); $optie = tep_db_fetch_array($optie_query); $result .= tep_draw_hidden_field('id[' . $optie['options_id'] . ']', $attr['products_options_values_id']); $result .= '<input type="submit" value="' . Translate('Ok') . '" class="formbutton button-a" />'; $result .= '</form>'; } unset($options[$product['products_id']]); $result .= '</td>'; } $result .= '</tr>'; } } $result .= '</tbody>'; $result .= '</table>'; $result .= '</div>'; } } else { $result .= 'Server offline'; } } else { $result = 'No SOAP server defined. Please check configuration'; } return $result; }
/** * Main function of Messaging System. It outputs a message based on the mode defined. * * @param String $originalMessage * @param String $type * @return String * @return Boolean */ public static function output($originalMessage, $type = self::NOTICE, $priority = self::NORMAL) { if (self::$mode == null) { self::setMode(self::CONSOLE); } if ($type == null) { $type = self::NOTICE; } //Searching if Views is loaded if (array_search('PhpBURN_Views', get_declared_classes()) == true) { $messageClass = 'PhpBURN_Views'; } else { $messageClass = __CLASS__; } //Now time $time = mktime(date('H'), date('i'), date('s'), date('m'), date('d'), date('Y')); $time = strftime(SYS_USE_DATEFORMAT, $time); //Usage $usage = number_format(memory_get_usage() / 1048576, 2, ',', ' '); // $timing = getrusage(); //Setup the message $message = sprintf("%s: [%s (%s MB)] ", $type, $time, $usage); $message .= var_export($originalMessage, true); $message .= "\r\n\r\n"; //The breaklines //Sending the message switch (self::$mode) { case self::BROWSER: case self::CONSOLE: print $message = call_user_func(array($messageClass, 'lazyTranslate'), $message); break; case self::FIREBUG: $message = call_user_func(array($messageClass, 'lazyTranslate'), $message); switch ($type) { case self::LOG: FB::log($message); break; case self::WARNING: FB::warn($message); break; case self::NOTICE: FB::info($message); break; case self::ERROR: FB::error($message); break; default: FB::info($message); break; } break; case self::FILE: $fileName = self::$fileName == null || !isset(self::$fileName) ? 'phpburn.log' : $this->fileName; $fileName = SYS_BASE_PATH . $fileName; $fp = fopen($fileName, 'a+'); fwrite($fp, call_user_func(array($messageClass, 'lazyTranslate'), $message)); fclose($fp); //@chmod($fileName, 0755); break; default: break; } if ($type == self::EXCEPTION) { throw new Exception($message); } unset($time, $usage, $message, $translatedType); }
/** * Zrzucenie SQL-a i jego parametrów do okna firebuga * * @param String $dumpName - nazwa wyświetlanej operacji * @param String $sql - zapytanie SQL * @param Array $params - parametry zapytania (dane) * @param int $execTime */ public function fireBugSqlDump($dumpName, $sql = "", array $params = array(), $execTime = 0) { // Odczytanie klasy i metody, w której wyświetlony zostanie komunikat $className = get_class($this); $methodName = ''; $filePath = ''; $lineNumber = ''; $traceList = debug_backtrace(); $traceArr = array(); foreach ($traceList as $trace) { if (!isset($trace['class']) || in_array($trace['class'], $this->sqlIgnoreClass)) { continue; } if (count($traceArr) == 0) { $className = $trace['class']; $methodName = isset($trace['function']) ? $trace['function'] : ''; $filePath = isset($trace['file']) ? str_replace(APP_PATH, '', $trace['file']) : ''; $lineNumber = isset($trace['line']) ? $trace['line'] : -1; } if (isset($trace['object'])) { unset($trace['object']); } $traceArr[] = $trace; } // Czas generowania SQL-a $sqlTime = microtime(true); $sqlTimeDiff = round($sqlTime - (isset($_SESSION['sql_last_time']) ? $_SESSION['sql_last_time'] : 0), 4); $execTime = round($execTime, 4); // Wyświetlenie komunikatu debug-a if (empty($sql)) { // Debugowanie dodatkowych informacji (utworzenie połączenia, otwarcie/zamknięcie transakcji) if (DB_DEBUG) { FB::info((object) array('OPERATION' => $dumpName, 'BACKTRACE' => $traceArr), "INFO ({$sqlTime} [+{$sqlTimeDiff}]) :: {$filePath}:{$lineNumber} :: {$className}->{$methodName}"); } } else { FB::warn((object) array('OPERATION' => $dumpName, 'SQL+PARAMS' => $this->_sqlFormat($this->_prepareFullQuery($sql, $params)), 'SQL' => "\n" . $sql . "\n", 'PARAMS' => $params, 'BACKTRACE' => $traceArr), "SQL ({$sqlTime} [+{$sqlTimeDiff}ms] {{$execTime}ms}) :: {$filePath}:{$lineNumber} :: {$className}->{$methodName}"); } }