當前位置: 首頁>>代碼示例>>PHP>>正文


PHP IPSDebug類代碼示例

本文整理匯總了PHP中IPSDebug的典型用法代碼示例。如果您正苦於以下問題:PHP IPSDebug類的具體用法?PHP IPSDebug怎麽用?PHP IPSDebug使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了IPSDebug類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: onMerge

 /**
  * This method is called after a member's account has been merged into another member's account
  *
  * @access	public
  * @param	array	$member		Member account being kept
  * @param	array	$member2	Member account being removed
  * @return	void
  **/
 public function onMerge($member, $member2)
 {
     IPSDebug::addLogMessage("Markers init done:", 'merge', $member);
     if ($this->registry->DB()->checkForTable('cal_events')) {
         $this->registry->DB()->update('cal_events', array('event_member_id' => intval($member['member_id'])), "event_member_id=" . $member2['member_id']);
     }
 }
開發者ID:dalandis,項目名稱:Visualization-of-Cell-Phone-Locations,代碼行數:15,代碼來源:memberSync.php

示例2: _getAvatarImages

 /**
  * Get avatar images in a directory
  *
  * @access	protected
  * @return	void		[Outputs to screen]
  */
 protected function _getAvatarImages()
 {
     $dir = IPSText::alphanumericalClean(urldecode($this->request['cat']), ' ');
     $images = IPSMember::getFunction()->getHostedAvatarsFromCategory($dir);
     IPSDebug::fireBug('info', array('Directory: ' . $dir));
     if ($images === FALSE) {
         $this->returnJsonError($this->lang->words['m_nodir']);
         exit;
     } else {
         $output = $this->html->inline_avatar_images($images);
         $this->returnJsonArray(array('html' => $output));
     }
 }
開發者ID:dalandis,項目名稱:Visualization-of-Cell-Phone-Locations,代碼行數:19,代碼來源:member_editform.php

示例3: runTask

 /**
  * Run this task
  * 
  * @return	@e void
  */
 public function runTask()
 {
     /* INIT */
     if (!$this->registry->isClassLoaded('classItemMarking')) {
         $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/itemmarking/classItemMarking.php', 'classItemMarking');
         $this->registry->setClass('classItemMarking', new $classToLoad($this->registry));
     }
     $time = time() - 86400 * ipsRegistry::$settings['topic_marking_keep_days'];
     $itemsRemoved = 0;
     /* Remove 'deleted' items */
     $this->DB->delete('core_item_markers', 'item_is_deleted=1');
     $c = $this->DB->getAffectedRows();
     /* Now delete old markers - we use a separate query because there are separate indexes */
     $this->DB->delete('core_item_markers', 'item_last_saved < ' . $time);
     $c += $this->DB->getAffectedRows();
     IPSDebug::addLogMessage("{$c} item markers removed", 'markers_cleanout');
     /* Log task */
     $this->registry->getClass('class_localization')->loadLanguageFile(array('public_global'), 'core');
     $this->class->appendTaskLog($this->task, sprintf($this->lang->words['itemmarkers_task_log'], $itemsRemoved, $c));
     /* UNLOCK TASK */
     $this->class->unlockTask($this->task);
 }
開發者ID:Advanture,項目名稱:Online-RolePlay,代碼行數:27,代碼來源:itemmarkers.php

示例4: execute

 /**
  * Executes the ajax request, checks secure key
  *
  * @access	public
  * @param	object	ipsRegistry reference
  * @return	void
  **/
 public function execute(ipsRegistry $registry)
 {
     /* Setup Shortcuts First */
     $this->makeRegistryShortcuts($registry);
     /* Check the secure key */
     $this->request['secure_key'] = $this->request['secure_key'] ? $this->request['secure_key'] : $this->request['md5check'];
     //if( $this->request['secure_key'] && $this->request['secure_key'] != $this->member->form_hash )
     if ($this->request['secure_key'] != $this->member->form_hash) {
         IPSDebug::fireBug('error', array("The security key did not match the member's form hash"));
         $this->returnString('nopermission');
     }
     $this->doExecute($registry);
 }
開發者ID:dalandis,項目名稱:Visualization-of-Cell-Phone-Locations,代碼行數:20,代碼來源:ipsController.php

示例5: getSearchResultsCount

 /**
  * Get search results count
  *
  * @param	string	[$extraQuery]	Extra query where clause
  * @return	int 	Number of search results
  */
 public function getSearchResultsCount($extraQuery = '')
 {
     $extra = $extraQuery ? " AND " . $extraQuery : '';
     IPSDebug::fireBug('info', array('WHERE: ' . $this->getWhereClause() . $extra));
     $count = $this->DB->buildAndFetch(array('select' => 'COUNT(*) as count', 'from' => array('members' => 'm'), 'where' => $this->getWhereClause() . $extra, 'add_join' => array(array('from' => array('profile_portal' => 'pp'), 'where' => 'pp.pp_member_id=m.member_id', 'type' => 'left'), array('from' => array('pfields_content' => 'p'), 'where' => 'p.member_id=m.member_id', 'type' => 'left'), array('from' => array('members_partial' => 'par'), 'where' => 'par.partial_member_id=m.member_id', 'type' => 'left'), array('from' => array('validating' => 'val'), 'where' => 'val.member_id=m.member_id', 'type' => 'left'))));
     return intval($count['count']);
 }
開發者ID:Advanture,項目名稱:Online-RolePlay,代碼行數:13,代碼來源:adminSearch.php

示例6: html_showDebugInfo

 /**
  * Returns debug data
  *
  * @access	protected
  * @return	string		Debug HTML
  */
 public function html_showDebugInfo()
 {
     $input = "";
     $queries = "";
     $sload = "";
     $stats = "";
     //-----------------------------------------
     // Form & Get & Skin
     //-----------------------------------------
     if ($this->settings['debug_level'] >= 2) {
         $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>IPSDebug сообщения</div><div class='row1' style='padding:6px'>\n";
         foreach (IPSDebug::getMessages() as $dx => $entry) {
             $stats .= "<strong>{$entry}</strong><br />\n";
         }
         $stats .= "</div>\n</div>";
         $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>IPSMember кеши</div><div class='row1' style='padding:6px'>\n";
         if (is_array(IPSMember::$debugData)) {
             foreach (IPSMember::$debugData as $entry) {
                 $stats .= "<strong>{$entry}</strong><br />\n";
             }
         }
         $stats .= "</div>\n</div>";
         /* Included Files */
         if (function_exists('get_included_files')) {
             $__files = get_included_files();
             $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>(" . count($__files) . ") подключенных файлов</div><div class='row1' style='padding:6px'>\n";
             foreach ($__files as $__f) {
                 $stats .= "<strong>{$__f}</strong><br />";
             }
             $stats .= '</div></div>';
         }
         /* Caches */
         $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>Загруженных кешей</div><div class='row1' style='padding:6px'>\n";
         $_total = 0;
         if (is_array($this->cache->debugInfo)) {
             foreach ($this->cache->debugInfo as $key => $data) {
                 $_size = $data['size'];
                 $_total += $_size;
                 $stats .= "<strong>{$key}</strong> - " . IPSLib::sizeFormat($_size) . "<br />\n";
             }
         }
         $stats .= "<strong>ИТОГО: " . IPSLib::sizeFormat($_total) . "</strong></div>\n</div>";
         /* Loaded classes */
         $loadedClasses = $this->registry->getLoadedClassesAsArray();
         $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>Загруженные классы через ipsRegistry::getClass()</div><div class='row1' style='padding:6px'>\n";
         if (is_array($loadedClasses)) {
             foreach ($loadedClasses as $entry) {
                 $stats .= "<strong>{$entry}</strong><br />\n";
             }
         }
         $stats .= "</div>\n</div>";
         $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>FORM и GET данные</div><div class='row1' style='padding:6px'>\n";
         foreach ($this->request as $k => $v) {
             if (in_array(strtolower($k), array('pass', 'password'))) {
                 $v = '*******';
             }
             $stats .= "<strong>{$k}</strong> = {$v}<br />\n";
         }
         $stats .= "</div>\n</div>";
         $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>SKIN, MEMBER & TASK Info</div><div class='row1' style='padding:6px'>\n";
         while (list($k, $v) = each($this->skin)) {
             if (is_array($v)) {
                 continue;
             }
             if (strlen($v) > 120) {
                 $v = substr($v, 0, 120) . '...';
             }
             $stats .= "<strong>{$k}</strong> = " . IPSText::htmlspecialchars($v) . "<br />\n";
         }
         //-----------------------------------------
         // Stop E_ALL moaning...
         //-----------------------------------------
         $cache = $this->caches['systemvars'];
         $cache['task_next_run'] = $cache['task_next_run'] ? $cache['task_next_run'] : 0;
         $stats .= "<b>Следующая задача</b> = " . $this->registry->getClass('class_localization')->getDate($cache['task_next_run'], 'LONG') . "\n<br /><b>Время</b> = " . $this->registry->getClass('class_localization')->getDate(time(), 'LONG');
         $stats .= "<br /><b>Сейчас</b> = " . time();
         $stats .= "<p>Пользователь: last_visit: " . $this->memberData['last_visit'] . " / " . $this->registry->getClass('class_localization')->getDate($this->memberData['last_visit'], 'LONG') . "</p>";
         $stats .= "<p>Пользователь: uagent_key: " . $this->memberData['userAgentKey'] . "</p>";
         $stats .= "<p>Пользователь: uagent_type: " . $this->memberData['userAgentType'] . "</p>";
         $stats .= "<p>Пользователь: uagent_version: " . $this->memberData['userAgentVersion'] . "</p>";
         $stats .= "</div>\n</div>";
         $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>Загруженные PHP шаблоны</div><div class='row1' style='padding:6px'>\n";
         $stats .= "<strong>" . implode(", ", array_keys($this->output->compiled_templates)) . "</strong><br />\n";
         $stats .= "<strong>" . implode(", ", array_keys($this->output->loaded_templates)) . "</strong><br />\n";
         $stats .= "<strong>" . implode(", ", array_values($this->registry->getClass('class_localization')->loaded_lang_files)) . "</strong><br />\n";
         $stats .= "</div>\n</div>";
     }
     //-----------------------------------------
     // SQL
     //-----------------------------------------
     if ($this->settings['debug_level'] >= 3) {
         $stats .= "<br />\n<div class='tableborder' style='overflow:auto'>\n<div class='subtitle'>Запросы</div><div class='row1' style='padding:6px'>";
         foreach ($this->DB->obj['cached_queries'] as $q) {
             $q = htmlspecialchars($q);
//.........這裏部分代碼省略.........
開發者ID:Advanture,項目名稱:Online-RolePlay,代碼行數:101,代碼來源:htmlOutput.php

示例7: __myDestruct

 /**
  * Manual destructor called by ips_MemberRegistry::__myDestruct()
  * Gives us a chance to do anything we need to do before other
  * classes are culled
  *
  * @access	public
  * @return	void
  */
 public function __myDestruct()
 {
     $_updated = 0;
     $_deleted = 0;
     /* Update sessions... */
     if (is_array($this->_sessionsToSave) and count($this->_sessionsToSave)) {
         foreach ($this->_sessionsToSave as $sessionID => $data) {
             if ($sessionID) {
                 if (isset($this->_queryOverride[$sessionID]) and is_array($this->_queryOverride[$sessionID]) and count($this->_queryOverride[$sessionID])) {
                     foreach ($data as $field => $value) {
                         if (isset($this->_queryOverride[$sessionID][$field])) {
                             $data[$field] = $this->_queryOverride[$sessionID][$field];
                         }
                     }
                 }
                 $this->DB->force_data_type = array('member_name' => 'string');
                 $this->DB->update('sessions', $data, "id='" . $sessionID . "'", true);
             }
         }
     }
     /* Remove sessions */
     if (is_array($this->_sessionsToKill) and count($this->_sessionsToKill)) {
         $_c = count($this->_sessionsToKill);
         $this->DB->delete('sessions', "id IN('" . implode("','", array_keys($this->_sessionsToKill)) . "')");
     }
     IPSDebug::addLogMessage(get_class($this) . ": " . count($this->_sessionsToSave) . " sessions updated, " . count($this->_sessionsToKill) . " sessions deleted", 'sessions-' . $this->_memberData['member_id']);
 }
開發者ID:dalandis,項目名稱:Visualization-of-Cell-Phone-Locations,代碼行數:35,代碼來源:publicSessions.php

示例8: replace

 /**
  * Insert record into table if not present, otherwise update existing record
  *
  * @param	string 		Table name
  * @param	array 		Array of field => values
  * @param	array 		Array of fields to check
  * @param	boolean		[Optional] Run on shutdown
  * @return	@e resource
  */
 public function replace($table, $set, $where, $shutdown = false)
 {
     //-----------------------------------------
     // Form query
     //-----------------------------------------
     $dba = $this->compileInsertString($set);
     if (REPLACE_TYPE == 1 or $this->getSqlVersion() < 41000) {
         $query = "REPLACE INTO " . $this->obj['sql_tbl_prefix'] . $table . " ({$dba['FIELD_NAMES']}) VALUES({$dba['FIELD_VALUES']})";
     } else {
         //$dbb	= $this->compileUpdateString( $set );
         $dbb = array();
         foreach ($set as $k => $v) {
             $dbb[] = "{$k}=VALUES({$k})";
         }
         $dbb = implode(',', $dbb);
         $query = "INSERT INTO " . $this->obj['sql_tbl_prefix'] . $table . " ({$dba['FIELD_NAMES']}) VALUES({$dba['FIELD_VALUES']}) ON DUPLICATE KEY UPDATE " . $dbb;
     }
     if (class_exists('IPSDebug')) {
         IPSDebug::addLogMessage($query, 'replaceintolog');
     }
     return $this->_determineShutdownAndRun($query, $shutdown);
 }
開發者ID:mover5,項目名稱:imobackup,代碼行數:31,代碼來源:classDbMysql.php

示例9: _findMainRowByKey

 /**
  * Find a particular row
  *
  * @access	protected
  * @param	array 		Array of data
  * @param	string		App
  * @return	array 		Array of data: core_item_marking row, effectively
  */
 protected function _findMainRowByKey($data, $app)
 {
     /* Not interested in this for the main row */
     unset($data['itemID'], $data['itemLastUpdate']);
     $_key = $this->_makeKey($data);
     if (!isset($this->_itemMarkers[$app]) or !is_array($this->_itemMarkers[$app])) {
         /* Mark markers as having changed */
         $this->_changesMade = TRUE;
         /* Add in extra items */
         $data['item_app'] = $app;
         $data['item_key'] = $_key;
         $data['item_member_id'] = $this->memberData['member_id'];
         $data['item_read_array'] = array();
         $this->_itemMarkers[$app] = array();
         $this->_itemMarkers[$app][$_key] = $data;
         IPSDebug::addMessage("Item Marking Key Created! {$_key}");
         return $_key;
     }
     if (!empty($this->_itemMarkers[$app][$_key]) and is_array($this->_itemMarkers[$app][$_key])) {
         /* Make sure it contains the app & key */
         $this->_itemMarkers[$app][$_key]['item_app'] = $app;
         $this->_itemMarkers[$app][$_key]['item_key'] = $_key;
         $this->_itemMarkers[$app][$_key]['item_member_id'] = $this->memberData['member_id'];
         /* Make sure read IDs are unserialized */
         if (isset($this->_itemMarkers[$app][$_key]['item_read_array']) and !is_array($this->_itemMarkers[$app][$_key]['item_read_array'])) {
             $this->_itemMarkers[$app][$_key]['item_read_array'] = unserialize($this->_itemMarkers[$app][$_key]['item_read_array']);
         }
         return $_key;
     } else {
         /* Mark markers as having changed */
         $this->_changesMade = TRUE;
         /* Make sure it contains the app & key */
         $this->_itemMarkers[$app][$_key]['item_app'] = $app;
         $this->_itemMarkers[$app][$_key]['item_key'] = $_key;
         $this->_itemMarkers[$app][$_key]['item_member_id'] = $this->memberData['member_id'];
         $this->_itemMarkers[$app][$_key]['item_read_array'] = array();
         $this->_itemMarkers[$app][$_key] = $data;
         IPSDebug::addMessage("Item Marking Key returned! {$_key}");
         return $_key;
     }
     /* Mark markers as having changed */
     /**
      * @todo	Matt: this code is not used anymore? We already return in the if/else above..
      */
     $this->_changesMade = TRUE;
     // Create a new key ...
     $data['item_app'] = $app;
     $data['item_key'] = $_key;
     $data['item_member_id'] = $this->memberData['member_id'];
     $data['item_read_array'] = array();
     $this->_itemMarkers[$app] = array();
     $this->_itemMarkers[$app][$_key] = $data;
     return $_key;
 }
開發者ID:ConnorChristie,項目名稱:GrabViews-Live,代碼行數:62,代碼來源:classItemMarking.php

示例10: buildDisplayData

 /**
  * Parse a member for display
  *
  * @access	public
  * @param	mixed	Either array of member data, or member ID to self load
  * @param	array 	Array of flags to parse: 'signature', 'customFields', 'avatar', 'warn'
  * @return	array 	Parsed member data
  */
 public static function buildDisplayData($member, $_parseFlags = array())
 {
     $_NOW = IPSDebug::getMemoryDebugFlag();
     //-----------------------------------------
     // Figure out parse flags
     //-----------------------------------------
     $parseFlags = array('signature' => isset($_parseFlags['signature']) ? $_parseFlags['signature'] : 0, 'customFields' => isset($_parseFlags['customFields']) ? $_parseFlags['customFields'] : 0, 'avatar' => isset($_parseFlags['avatar']) ? $_parseFlags['avatar'] : 1, 'warn' => isset($_parseFlags['warn']) ? $_parseFlags['warn'] : 1, 'cfSkinGroup' => isset($_parseFlags['cfSkinGroup']) ? $_parseFlags['cfSkinGroup'] : '', 'cfGetGroupData' => isset($_parseFlags['cfGetGroupData']) ? $_parseFlags['cfGetGroupData'] : '', 'cfLocation' => isset($_parseFlags['cfLocation']) ? $_parseFlags['cfLocation'] : '', 'checkFormat' => isset($_parseFlags['checkFormat']) ? $_parseFlags['checkFormat'] : 0);
     if (isset($_parseFlags['__all__'])) {
         foreach ($parseFlags as $k => $v) {
             $parseFlags[$k] = 1;
         }
         $parseFlags['cfSkinGroup'] = '';
     }
     //-----------------------------------------
     // Load the member?
     //-----------------------------------------
     if (!is_array($member) and ($member == intval($member) and $member > 0)) {
         $member = self::load($member, 'all');
     }
     if (!$member['member_group_id']) {
         $member['member_group_id'] = ipsRegistry::$settings['guest_group'];
     }
     /* Unpack bitwise if required */
     if (!isset($member['bw_is_spammer'])) {
         $member = self::buildBitWiseOptions($member);
     }
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $rank_cache = ipsRegistry::cache()->getCache('ranks');
     $group_cache = ipsRegistry::cache()->getCache('group_cache');
     $group_name = IPSLib::makeNameFormatted($group_cache[$member['member_group_id']]['g_title'], $member['member_group_id']);
     $pips = 0;
     $topic_id = intval(isset(ipsRegistry::$request['t']) ? ipsRegistry::$request['t'] : 0);
     $forum_id = intval(isset(ipsRegistry::$request['f']) ? ipsRegistry::$request['f'] : 0);
     //-----------------------------------------
     // SEO Name
     //-----------------------------------------
     $member['members_seo_name'] = self::fetchSeoName($member);
     //-----------------------------------------
     // Avatar
     //-----------------------------------------
     if ($parseFlags['avatar']) {
         $member['avatar'] = self::buildAvatar($member);
     }
     $member['_group_formatted'] = $group_name;
     //-----------------------------------------
     // Ranks
     //-----------------------------------------
     if (is_array($rank_cache) and count($rank_cache)) {
         foreach ($rank_cache as $k => $v) {
             if ($member['posts'] >= $v['POSTS']) {
                 if (!isset($member['title']) || $member['title'] === '' || is_null($member['title'])) {
                     $member['title'] = $v['TITLE'];
                 }
                 $pips = $v['PIPS'];
                 break;
             }
         }
     }
     //-----------------------------------------
     // Group image
     //-----------------------------------------
     $member['member_rank_img'] = '';
     $member['member_rank_img_i'] = '';
     if ($group_cache[$member['member_group_id']]['g_icon']) {
         $_img = $group_cache[$member['member_group_id']]['g_icon'];
         if (substr($_img, 0, 4) != 'http') {
             $_img = ipsRegistry::$settings['_original_base_url'] . '/' . ltrim($_img, '/');
         }
         $member['member_rank_img_i'] = 'img';
         $member['member_rank_img'] = $_img;
     } else {
         if ($pips) {
             if (is_numeric($pips)) {
                 for ($i = 1; $i <= $pips; ++$i) {
                     $member['member_rank_img_i'] = 'pips';
                     $member['member_rank_img'] .= ipsRegistry::getClass('output')->getReplacement('pip_pip');
                 }
             } else {
                 $member['member_rank_img_i'] = 'img';
                 $member['member_rank_img'] = ipsRegistry::$settings['public_dir'] . 'style_extra/team_icons/' . $pips;
             }
         }
     }
     //-----------------------------------------
     // Spammer status
     //-----------------------------------------
     $member['spamStatus'] = NULL;
     $member['spamImage'] = NULL;
     $moderator = ipsRegistry::member()->getProperty('forumsModeratorData');
     if (isset($moderator[$forum_id]['bw_flag_spammers']) and $moderator[$forum_id]['bw_flag_spammers'] or ipsRegistry::member()->getProperty('g_is_supmod') == 1) {
//.........這裏部分代碼省略.........
開發者ID:dalandis,項目名稱:Visualization-of-Cell-Phone-Locations,代碼行數:101,代碼來源:core.php

示例11: clearModQueueTable

 /**
  * Clear out the mod-queue table appropriately
  *
  * @param	string		[topic|post] Type of item moved
  * @param	mixed		ID of topic or post, or array of ids
  * @param	boolean		Was content approved?
  * @return	@e void
  */
 public function clearModQueueTable($type, $typeId, $approved = false)
 {
     //-----------------------------------------
     // Are we operating on one id, or an array
     //-----------------------------------------
     if (is_array($typeId)) {
         $where = "type_id IN(" . implode(',', IPSLib::cleanIntArray($typeId)) . ")";
     } else {
         $where = "type_id=" . intval($typeId);
     }
     //-----------------------------------------
     // Was content deleted
     //-----------------------------------------
     if (!$approved) {
         $this->DB->delete('mod_queued_items', "type='{$type}' AND {$where}");
     } else {
         //-----------------------------------------
         // Get post class..
         //-----------------------------------------
         require_once IPSLib::getAppDir('forums') . '/sources/classes/post/classPost.php';
         /*noLibHook*/
         $classToLoad = IPSLib::loadLibrary(IPSLib::getAppDir('forums') . '/sources/classes/post/classPostForms.php', 'classPostForms', 'forums');
         $_postClass = new $classToLoad($this->registry);
         //-----------------------------------------
         // Working with posts?
         //-----------------------------------------
         if ($type == 'post') {
             IPSDebug::fireBug('info', array('type is post'));
             $this->DB->build(array('select' => 'm.id', 'from' => array('mod_queued_items' => 'm'), 'where' => "m.type='{$type}' AND m.{$where}", 'add_join' => array(array('select' => 'p.pid, p.post, p.author_id, p.post_date, p.topic_id', 'from' => array('posts' => 'p'), 'where' => 'p.pid=m.type_id', 'type' => 'left'), array('select' => 't.*', 'from' => array('topics' => 't'), 'where' => 't.tid=p.topic_id', 'type' => 'left'))));
             $outer = $this->DB->execute();
             while ($r = $this->DB->fetch($outer)) {
                 $member = IPSMember::load($r['author_id'], 'extendedProfile,groups');
                 $_postClass->setPublished(true);
                 $_postClass->setAuthor($member);
                 $_postClass->setForumData($this->registry->class_forums->allForums[$r['forum_id']]);
                 $_postClass->incrementUsersPostCount();
                 $_postClass->sendOutTrackedTopicEmails($r, $r['post']);
                 $this->DB->delete('mod_queued_items', 'id=' . $r['id']);
             }
         } else {
             IPSDebug::fireBug('info', array('type is topic'));
             $this->DB->build(array('select' => 'm.id', 'from' => array('mod_queued_items' => 'm'), 'where' => "m.type='{$type}' AND m.{$where}", 'add_join' => array(array('select' => 't.*', 'from' => array('topics' => 't'), 'where' => 't.tid=m.type_id', 'type' => 'left'), array('select' => 'p.pid, p.post, p.post_date', 'from' => array('posts' => 'p'), 'where' => 'p.pid=t.topic_firstpost', 'type' => 'left'))));
             $outer = $this->DB->execute();
             while ($r = $this->DB->fetch($outer)) {
                 $member = IPSMember::load($r['starter_id'], 'extendedProfile,groups');
                 $_postClass->setPublished(true);
                 $_postClass->setAuthor($member);
                 $_postClass->setForumData($this->registry->class_forums->allForums[$r['forum_id']]);
                 $_postClass->incrementUsersPostCount();
                 $_postClass->sendOutTrackedForumEmails($this->registry->class_forums->getForumById($r['forum_id']), $r, $r['post']);
                 $this->DB->delete('mod_queued_items', 'id=' . $r['id']);
             }
         }
     }
 }
開發者ID:mover5,項目名稱:imobackup,代碼行數:63,代碼來源:moderate.php

示例12: preDisplayParse

 /**
  * This function processes the DB post before printing as output
  *
  * @access	public
  * @param	string			Raw text
  * @return	string			Converted text
  */
 public function preDisplayParse($txt = "")
 {
     if ($this->parse_html) {
         $txt = $this->_parseHtml($txt);
     }
     //-----------------------------------------
     // Fix "{style_images_url}"
     //-----------------------------------------
     $txt = str_replace("{style_images_url}", "&#123;style_images_url&#125;", $txt);
     //-----------------------------------------
     // Custom BB code
     //-----------------------------------------
     $_NOW = IPSDebug::getMemoryDebugFlag();
     if ($this->parse_bbcode) {
         $txt = $this->parseBbcode($txt, 'display');
     }
     IPSDebug::setMemoryDebugFlag("PreDisplayParse - parsed BBCode", $_NOW);
     $_NOW = IPSDebug::getMemoryDebugFlag();
     if ($this->parse_wordwrap > 0) {
         $txt = $this->applyWordwrap($txt, $this->parse_wordwrap);
     }
     IPSDebug::setMemoryDebugFlag("PreDisplayParse - applied wordwrap", $_NOW);
     //-----------------------------------------
     // Protect against XSS
     //-----------------------------------------
     $txt = $this->checkXss($txt);
     //-----------------------------------------
     // And fix old youtube embedded videos..
     //-----------------------------------------
     /*if( stripos( $txt, "<object" ) AND stripos( $txt, "<embed" ) )
     		{
     			//$txt = preg_replace( "#<object(.+?)<embed(.+?)></embed></object>#i", "<embed\\2</embed>", $txt );
     			$txt = preg_replace( "#<object(.+?)<embed.+?></embed></object>#i", "<object\\1</object>", $txt );
     		}*/
     return $txt;
 }
開發者ID:dalandis,項目名稱:Visualization-of-Cell-Phone-Locations,代碼行數:43,代碼來源:core.php

示例13: loadTemplate

 /**
  * Load a template file
  *
  * @param	string		Template name
  * @param	string		Application [defaults to current application]
  * @return	object
  */
 public function loadTemplate($template, $app = '')
 {
     $app = $app ? $app : IPS_APP_COMPONENT;
     /* Skin file exists? */
     if (is_file(IPSLib::getAppDir($app) . "/skin_cp/" . $template . ".php")) {
         $_pre_load = IPSDebug::getMemoryDebugFlag();
         $classToLoad = IPSLib::loadLibrary(IPSLib::getAppDir($app) . '/skin_cp/' . $template . '.php', $template, $app);
         IPSDebug::setMemoryDebugFlag("CORE: Template Loaded ({$classToLoad})", $_pre_load);
         $class = new $classToLoad($this->registry);
         $this->compiled_templates[$app . '.' . $template] = $class;
         return $class;
     } else {
         $this->showError(sprintf($this->lang->words['notemplatefiletoload'], $template), 4100, true);
     }
 }
開發者ID:mover5,項目名稱:imobackup,代碼行數:22,代碼來源:adminOutput.php

示例14: loadMasterSkinTemplate

 /**
  * Load a 'master_skin' template file. Used when developing
  *
  * @access	public
  * @param	string		Name of skin file
  * @return	@e void		Evals the skin to add the class in memory
  */
 public function loadMasterSkinTemplate($name, $id)
 {
     if (!count($this->remapData)) {
         $this->remapData = $this->registry->output->buildRemapData();
     }
     $_id = $id == 0 ? $this->remapData['inDevDefault'] : $id;
     $_dir = $this->remapData['templates'][$_id];
     if (!is_file(IPS_CACHE_PATH . "cache/skin_cache/" . $_dir . "/" . $name . ".php")) {
         return;
     }
     //-----------------------------------------
     // Get data...
     //-----------------------------------------
     $data = implode('', file(IPS_CACHE_PATH . "cache/skin_cache/" . $_dir . "/" . $name . ".php"));
     //-----------------------------------------
     // Get template class
     //-----------------------------------------
     $toeval = $this->registry->templateEngine->convertCacheToEval($data, $name . '_' . $id);
     $showme = strstr($data, '{{{SHOWME}}}') ? $name : '';
     if (!class_exists($name . '_' . $id)) {
         ob_start();
         eval($toeval);
         $result = ob_get_contents();
         ob_end_clean();
         if (strstr($result, "Parse error") or strstr($result, 'Catchable fatal error:') or $showme == $name) {
             IPSDebug::showTemplateError($result, $toeval);
         }
     }
 }
開發者ID:ConnorChristie,項目名稱:GrabViews,代碼行數:36,代碼來源:skinFunctions.php

示例15: preDisplayParse

 /**
  * Parses the bbcode to be shown in the browser.  Expects preDbParse has already been done before the save.
  * If all bbcodes are parse on save, this method does nothing really
  *
  * @access	public
  * @param 	string			Raw input text to parse
  * @return	string			Parsed text ready to be displayed
  */
 public function preDisplayParse($text)
 {
     $_NOW = IPSDebug::getMemoryDebugFlag();
     $this->_passSettings();
     //-----------------------------------------
     // Parse
     //-----------------------------------------
     $text = $this->bbclass->preDisplayParse($text);
     IPSDebug::setMemoryDebugFlag("PreDisplayParse completed", $_NOW);
     return $text;
 }
開發者ID:dalandis,項目名稱:Visualization-of-Cell-Phone-Locations,代碼行數:19,代碼來源:han_parse_bbcode.php


注:本文中的IPSDebug類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。