$xmlRoot->appendChild(addComment($dbconn, $xmlDoc, $_REQUEST['user_id'], $_REQUEST['post_id'], $_REQUEST['comment'])); break; case "getComments": $xmlRoot->appendChild(getComments($dbconn, $xmlDoc, $_REQUEST['post_id'])); break; case "addNewUser": $xmlRoot->appendChild(addNewUser($dbconn, $xmlDoc, $_REQUEST['username'], $_REQUEST['password'], $_REQUEST['email'])); break; case "signIn": $xmlRoot->appendChild(signIn($dbconn, $xmlDoc, $_REQUEST['username'], $_REQUEST['password'])); break; case "getConnections": $xmlRoot->appendChild(getConnections($dbconn, $xmlDoc, $_REQUEST['user_id'], $_REQUEST['module_type'])); break; case "logs": $xmlRoot->appendChild(getLogs($dbconn, $xmlDoc, $_REQUEST['user_id'])); break; case "getPlayerData": $xmlRoot->appendChild(getPlayerData($dbconn, $xmlDoc, $_REQUEST['ign'], $_REQUEST['token'])); break; case "getUser": $xmlRoot->appendChild(getUser($dbconn, $xmlDoc, $_REQUEST['user_id'])); break; case "load_redstone_controls": $xmlRoot->appendChild(loadRedstoneControls($dbconn, $xmlDoc, $_REQUEST['user_id'])); break; case "setRedstoneOutput": $xmlRoot->appendChild(setRedstoneOutput($dbconn, $xmlDoc, $_REQUEST['token'], $_REQUEST['side'], $_REQUEST['value'], $_REQUEST['val_type'])); break; case "load_fluid_modules": $xmlRoot->appendChild(getFluidLevels($dbconn, $xmlDoc, $_REQUEST['user_id']));
private function showTrace() { // $debug_pic = array('close' => 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAA5ElEQVR42tRTQYoEIQwsl/2Bl3gQoY9eBKEf5kvyG8G7h4Z+S38gIu5lp5lZ2R7YPm1BDhZJSFWiGmPgDj5wE7cbfD4/mBkAHprUj9yTTyn9OsGIMSLG+Fxwxc8SiAi9d4QQHskjhIDeO4jorQcq5wwiQmsN3nt479FaAxEh5zxJmyZIKalSClprL1FKQUpJXZr4DBH52xqZeRhjICKw1sJaCxGBMQbMPN41GFpriAicc6i1otYK5xxEBFrraQuThGVZAADbtp2amXms6woAOI7j0gO17/t5MN+HNfEvBf//M30NAKe7aRqUOIlfAAAAAElFTkSuQmCC', 'config' => 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAATtJREFUeNqcU0Gqg0AMjZ/eQbEH0IUewIV4BXEjeD9dCvYGUlB056IU3Rf0Ci6c/hc6g/rr7+cHwkySl8xLZkZL05QORKz22jtAkiR0OkigIAjofD7T4/GgsizFLlcV/JLJAKOi4zjsME1zs8KPOHDrw7RXCwLBv0qWZZyLHMmAuq4jIcRHBW4taga3241c1+U9+r5erwrk+76kzri1gIEAII5jdcorWZMKW8aAA17OgRkYhkHLsvza9zoO/OYWQHmeZwYdFZIxKPDrGWhVVTGdKIrY6Xke1XWtrgo26EPyPN+8BTVEy7LU6bquUxiGPxigCHB939P+IZFt2x+vUOL2t8DSNA2D7vc7FUWxSYQNP/bAvXsH2jiO4nK5qMC3za1M08T2MAys+79wOvpxbdt+/I0ckL39V54CDAChFuDJX64gowAAAABJRU5ErkJggg==', 'database' => 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAKlJREFUeNrsk0EOgyAQRT9KiLog7D0Ql+B4HsULeAHXQFwaiCGBCm1Nmi4a69a/IDNk5g+8ZEhKCcMwYFfCORGlFOgrSVJKNE0DxhgofV6HELBtG5xz8N6XuK7rUjOOYx5I3gbQWoNzDiEEuq5DjLE0LcsCYwystVjXFW3bou/74xkVLuqywfGFaZp+T6uqwmGe52+DPyB+GtwQb4h5q3aI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ZtEE8JwHNRKLMK1rRzng6R3xU8kLkdM/oidAh2M8BRFsi7W/Iu38wBty8bXCcdSy6OyfjfUneCbjj34OoeMkHq92+4SP8A95wSTlrA/ISGnxZAmgeV+ewKbwqwi3MZQLQZQP3nFTLnttS73y9CuFIqo/imAAAAAElFTkSuQmCC', 'log' => 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAABKElEQVR42sSTPa6CQBSFv3lRrCRYACvQxMLCBhsTK5fAGtiAPaGfDbgGNmBCS0PFAqhsoSGSWE1yrTDvxd+E4t1qkrnn3HPPnFEiwpD6YWCNPjUcj0fquhYAz/MUQBRFzwniOH6cMBrJfD4HoKoq6UleKkiS5H7WWstut+N0OmHbNrZt92rURw+01rJerzmfzyyXSy6XC77vf2ei1lpWqxVN02CMwRhDEARUVcXHFfrJbdsyHo8BcByHsiwxxqjfBj4omE6nstlsuF6vWJaFZVl4nkdZlhwOB/U2B1mWSRiGFEWB67pMJhNc16Uoipfgpx6EYUie58xmM/I8fwsGUH2UsywTgMViAUCapnRdp9498x+COI5lu93eL/b7vfomyurfP9NggtsAfaVzbTWryOIAAAAASUVORK5CYII=', 'logo' => 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAALeSURBVDhPTVTbT9NgFN9fZDLGBgteUBON+GhiJCExvipsnYsKOEM0CrzIA/FGvEQNIkoCCq7tBmFWI3L1gkMciOAkmXIJGdvY2q/tz/O1g/Bw0rVff7dzTucwYWJg5haEcBl8kmdXlaNWLoVfKoFfdKGOfu8+D4geBAe8cMTmuyBILqv8UtlO+WS3BagfOoCAWG4TSW4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KDWen8FKSWstadCIYRjg9YaUkrTsDHm2GAFtNamgP18A2BmKKWmAGaeG+ScpwCt9XdA7x299ylgP//dJQIAEYGI7gNijJcNxN+/8T0A1+E5NmcLfJkAAAAASUVORK5CYII=', 'reload' => 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJFSURBVHjaYvz//z8DJQAggJgYKAQAAcSCTTD/YEr2vz9/c//+/af+989fBiC++efP38kLglZNRVcLEECMyF4oPJwq9e/vv42SnFImUtxSDJysXAx///1j+PTjE8P9Nw8YHry8f+bPnz/+qxO2PIPpAQggFC8Abdwox61goiKgysDIyMzw5+8foAF/GZiYmBjUxNUYFEWVTP78+rMRWQ9AAMENyNufnC3BIWkiyyvH8AeoCegShtuvbzPcenGLAWgr2CB5MXkGSSEpE48JjtkwfQABBDcA6M9cCS5Jhu+/vwHxD4a9N/f8u/HsZvONpzead1/Y8+/Tj89gF0mLyjAAXZEL0wcQQPBABAaSOjszB8O//38Z7r25y/Dn99/WZVHr60By/jPcv+49vacDKAZ2DZBWh+kDCCC4AX9/A535/w840P6CFf2B+/P3rz8d2/L2MmKLMYAAgnsBaOrNj98+Mnz99ZVBXEASpKnad5rrMojcHwanDmusKQ4ggJAM+DP5ATCqmIGhzwi0y97AgUlSSDLStcfuv6SIFIOkmBSDVZ0JhiEAAYSSDkLmeZ+WE5U3kROXY/gKDExWJlaGf8DQ/wtUAwqbi1cuMdy7e5/hXM9luHcAAgglHfz+/cf/5sNbZ67cucLw/fsPcKj/Bhrw599vMBsY0CCvorgAIIAYsWUm5y6bbKDCjL+//+qAQl1KUhqYyP4y3AfafmnidZTABAggRmJyo0GRzn9Qnrg86TpGTAAEEAsxOQ4UxZcn38AajQABBgDmDSSSJTnd0QAAAABJRU5ErkJggg==', 'sf.png' => 'data:image/png;base64,iVBORw0KGgoA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GOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAABmklEQVR42mL4//8/AyUYIIDAxK5du1BwXEb3/9D4FjBOzZ/wH10ehkF6AQIIw4B1G7b+D09o/h+X3gXG4YmteA0ACCCsLghPbPkfm9b5PzK5439Sdg9eAwACCEyANMBwaFwTGIMMAOEQIBuGA6Mb/qMbABBAEAOQnIyMo1M74Tgiqf2/b3gVhgEAAQQmQuKa/8ekdYMxyLCgmEYMHJXc9t87FNMAgACCGgBxIkgzyDaQU5FxQGQN2AUBUXX/vULKwdgjsOQ/SC9AAKEEYlB03f+oFJABdSjYP6L6P0guIqkVjt0DisEGAAQQigEgG0AhHxBVi4L9wqvBBiEHtqs/xACAAAIbEBBd/x+Eg2ObwH4FORmGfYCaQRikCUS7B5YBNReBMUgvQABBDADaAtIIwsEx9f/Dk9pQsH9kHTh8XANKMAIRIIDAhF9ELTiQQH4FaQAZCAsskPNhyRpkK7oBAAEEMSC8GsVGkEaYIlBghcU3gbGzL6YBAAEEJnzCgP6EYs/gcjCGKQI5G4Z9QiswDAAIIAZKszNAgAEAHgFgGSNMTwgAAAAASUVORK5CYII='); $_trace = trace(); $trace_config = array('debug' => 'on', 'xdebug' => extension_loaded('xdebug') ? 'on' : 'off', 'HTML_CACHE' => C(HTML_CACHE_ON) ? 'on' : 'off', 'GD' => extension_loaded('gd') && function_exists('gd_info') ? 'on' : 'off', 'tokenizer' => function_exists('token_get_all') ? 'on' : 'off', 'eaccelerator' => extension_loaded('eaccelerator') && ini_get('eaccelerator.enable') ? 'on' : 'off', 'apc' => extension_loaded('apc') && ini_get('apc.enabled') ? 'on' : 'off', 'xcache' => extension_loaded('xcache') && ini_get('xcache.cacher') ? 'on' : 'off', 'memcache' => extension_loaded('memcache') && ini_get('memcache.default_port') ? 'on' : 'off'); $trace_config_output = ''; foreach ($trace_config as $key => $value) { $trace_config_output .= '<li class="is' . $value . ($key == 'xcache' ? ' last' : '') . '">' . $key . '</li>'; } $grounpname = C('GROUP_NAME') ? C('GROUP_NAME') . '/' : ''; #View $view = Think::instance('View'); $view_var = dump($view->getAllVar(), 0); $logs = getLogs($_trace); $files = get_included_files(); $file_count = count($files); $files = dump_php($files); $showtime = showTime(); # $request = dump_php(requestAsArray()); $response = dump_php(responseAsArray()); $user = dump_php(userAsArray()); $settings = dump_php(array_change_key_case(C(), CASE_UPPER)); $prams = prams($view); $glob = dump_php(globalsAsArray()); $php_info = dump_php(phpInfoAsArray()); if (empty($_REQUEST)) { $tmpl_var = '<p>No parameters were passed to this template.</p>'; } else { $tmpl_var = ''; if (!empty($_GET)) { $tmpl_var .= 'GET:' . dump_php($_GET); } if (!empty($_POST)) { $tmpl_var .= '<br/>' . dump_php($_POST); } $tmpl_var = '<p>' . $tmpl_var . '</p>'; } $log_rows = ''; foreach ($logs as $key => $val) { if ($val['level'] == ' WARN') { $log_rows_type = ' Warning'; } else { if ($val['level'] == ' ERR') { $log_rows_type .= ' Error'; } else { $log_rows_type .= ' Info'; } } $log_rows .= '<tr class="sfWebDebugLogLine sfWebDebug '; $log_rows .= $log_rows_type; $log_rows .= $val['level'] . '"><td class="sfWebDebugLogNumber">' . ($key + 1) . '</td><td class="sfWebDebugLogType"><img alt="Info" src="' . $debug_pic[$val['src']] . '"> <span>' . $val['level'] . '</span></td><td>' . $val['log'] . '</td></tr>'; $log_rows .= '<tr class="sfWebDebugLogLine sfWebDebug' . $log_rows_type . ' ' . $val['level'] . '"><td class="sfWebDebugLogNumber">' . ($key + 1) . '</td><td class="sfWebDebugLogType"><img alt="Info" src="' . $debug_pic[$val['src']] . '"> <span>' . $val['level'] . '</span></td><td>' . $val['log'] . '</td></tr>'; } $showtime_output = ''; foreach ($showtime['Process_Adv'] as $key => $value) { $showtime_output .= '<tr><td class="sfWebDebugLogType">' . $key . '</td><td style="text-align:right">' . $value . '</td><td style="text-align: right">' . round($value / floatval($showtime['Process']) * 100, 0) . '</td></tr>'; } $think_version = THINK_VERSION; $think_path = THINK_PATH; $pageContents = <<<EOPAGE <style type="text/css"> root{display:block} dl{margin:0;padding:0} dt{font-weight:bold;text-align:right;width:11em;clear:both} dd{margin:-1.35em 0 0 12em;padding-bottom:.4em;overflow:auto} dd ul li{float:left;display:block;width:16.5%;margin:0;padding:0 0 0 20px;background:url({$debug_pic['plugin']}) 2px 50% no-repeat;line-height:1.6} #sfWebDebug{color:#333;font-family:Arial,sans-serif;font-size:12px;line-height:12px;margin:0;padding:0;text-align:left} #sfWebDebug a,#sfWebDebug a:hover{background-color:transparent;border:medium none;color:#000;text-decoration:none} #sfWebDebug img{border:0 none;display:inline;float:none;margin:0} #sfWebDebugBar{background-color:#DDD;margin:0;opacity:.8;padding:1px 0;position:absolute;right:0;top:0;white-space:nowrap;z-index:10000} #sfWebDebugBar[id]{position:fixed} #sfWebDebugBar img{vertical-align:middle} #sfWebDebugBar .sfWebDebugMenu{display:inline;margin:0;padding:5px 5px 5px 0} #sfWebDebugBar .sfWebDebugMenu li{display:inline;list-style:none outside none;margin:0;padding:0 6px} #sfWebDebugBar .sfWebDebugMenu li.last{border:0 none;margin:0;padding:0} #sfWebDebugDatabaseDetails li{margin:0 0 0 30px;padding:5px 0} #sfWebDebugShortMessages li{background-color:#DDD;margin-bottom:10px;padding:5px} #sfWebDebugShortMessages li{list-style:none outside none} #sfWebDebugDetails{margin-right:7px} #sfWebDebug pre{line-height:1.3;margin-bottom:10px} #sfWebDebug h1{background-color:#EEE;border:0 none;font-size:16px;font-weight:bold;margin:10px 0;padding:0} #sfWebDebug h2{background:none repeat scroll 0 0 transparent;border:0 none;font-size:14px;font-weight:bold;margin:10px 0;padding:0} #sfWebDebug h3{background:none repeat scroll 0 0 transparent;border:0 none;font-size:12px;font-weight:bold;margin:10px 0;padding:0} #sfWebDebug .sfWebDebugTop{background-color:#EFEFEF;border-bottom:1px solid #AAA;left:0;margin:0;padding:0 1%;position:absolute;max-height:70%;opacity:.8;top:0;width:100%;overflow:auto;z-index:9999} #sfWebDebugLog{font-size:11px;margin:0;padding:3px} #sfWebDebugLogMenu{margin-bottom:5px} #sfWebDebugLogMenu li{border-right:1px solid #AAA;display:inline;list-style:none outside none;margin:0;padding:0 5px} #sfWebDebugConfigSummary{background-color:#DDD;border:1px solid #AAA;display:inline;margin:20px 0;padding:5px} #sfWebDebugConfigSummary li{display:inline;list-style:none outside none;margin:0;padding:0 5px} #sfWebDebugConfigSummary li.last{border:0 none} .sfWebDebugInfo,.sfWebDebugInfo td{background-color:#DDD} .sfWebDebugWarning,.sfWebDebugWarning td{background-color:orange!important} .sfWebDebugError,.sfWebDebugError td{background-color:#F99!important} .sfWebDebugLogNumber{width:1%} .sfWebDebugLogType{white-space:nowrap;width:1%} .sfWebDebugLogType,#sfWebDebug .sfWebDebugLogType a{color:darkgreen} #sfWebDebug .sfWebDebugLogType a:hover{text-decoration:underline} .sfWebDebugLogInfo{color:blue} .ison{color:#000;font-weight:bolder;margin-right:5px} .isoff{color:#F33;margin-right:5px;text-decoration:line-through} .sfWebDebugLogs{border:1px solid #999;font-family:Arial;font-size:11px;margin:0;padding:0} .sfWebDebugLogs tr{border:0 none;margin:0;padding:0} .sfWebDebugLogs td{border:0 none;margin:0;padding:1px 3px;vertical-align:top} .sfWebDebugLogs th{background-color:#999;border:0 none;color:#EEE;margin:0;padding:3px 5px;vertical-align:top;white-space:nowrap} .sfWebDebugDebugInfo{border-left:1px solid #AAA;color:#999;font-size:11px;line-height:1.25em;margin:5px 0 5px 10px;padding:2px 0 2px 5px} .sfWebDebugDebugInfo .sfWebDebugLogInfo,.sfWebDebugDebugInfo a.sfWebDebugFileLink{color:#333!important} .sfWebDebugCache{font-family:Arial;font-size:9px;margin:0;opacity:.85;overflow:hidden;padding:2px;position:absolute;z-index:995} #sfWebDebugThinkphpVersion{background-color:#666;color:#FFF;margin-left:0;padding:1px 4px} #sfWebDebugviewDetails ul{list-style:none outside none;margin:.5em 0;padding-left:2em} #sfWebDebugviewDetails li{margin-bottom:.5em} #sfWebDebug .sfWebDebugDataType,#sfWebDebug .sfWebDebugDataType a{color:#666;font-style:italic} #sfWebDebug .sfWebDebugDataType a:hover{text-decoration:underline} #sfWebDebugDatabaseLogs{margin-bottom:10px} #sfWebDebugDatabaseLogs ol{margin:0 0 0 20px;padding:0} #sfWebDebugDatabaseLogs li{padding:6px} #sfWebDebugDatabaseLogs li:nth-child(2n+1){background-color:#CCC} .sfWebDebugDatabaseQuery{margin-bottom:.5em;margin-top:0} .sfWebDebugDatabaseLogInfo{color:#666;font-size:11px} .sfWebDebugDatabaseQuery .sfWebDebugLogInfo{color:#909;font-weight:bold} .sfWebDebugHighlight{background:none repeat scroll 0 0 #FFC} </style> <script type="text/javascript"> /* <![CDATA[ */ function sfWebDebugGetElementsByClassName(strClass, strTag, objContElm){ // http://muffinresearch.co.uk/archives/2006/04/29/getelementsbyclassname-deluxe-edition/ strTag = strTag || "*"; objContElm = objContElm || document; var objColl = (strTag == '*' && document.all) ? document.all : objContElm.getElementsByTagName(strTag); var arr = new Array(); var delim = strClass.indexOf('|') != -1 ? '|' : ' '; var arrClass = strClass.split(delim); var j = objColl.length; for (var i = 0; i < j; i++){ if(objColl[i].className == undefined) continue; var arrObjClass = objColl[i].className.split ? objColl[i].className.split(' ') : []; if (delim == ' ' && arrClass.length > arrObjClass.length) continue; var c = 0; comparisonLoop: { var l = arrObjClass.length; for(var k = 0; k < l; k++){ var n = arrClass.length; for(var m = 0; m < n; m++){ if(arrClass[m] == arrObjClass[k]) c++; if(( delim == '|' && c == 1) || (delim == ' ' && c == arrClass.length)) { arr.push(objColl[i]); break comparisonLoop; } } } } } return arr; } function sfWebDebugToggleMenu(){ var element = document.getElementById('sfWebDebugDetails'); var cacheElements = sfWebDebugGetElementsByClassName('sfWebDebugCache'); var mainCacheElements = sfWebDebugGetElementsByClassName('sfWebDebugActionCache'); var panelElements = sfWebDebugGetElementsByClassName('sfWebDebugTop'); if (element.style.display != 'none'){ for (var i = 0; i < panelElements.length; ++i){ panelElements[i].style.display = 'none'; } // hide all cache information for(var i = 0; i < cacheElements.length; ++i){ cacheElements[i].style.display = 'none'; } for(var i = 0; i < mainCacheElements.length; ++i){ mainCacheElements[i].style.border = 'none'; } } else{ for(var i = 0; i < cacheElements.length; ++i){ cacheElements[i].style.display = ''; } for(var i = 0; i < mainCacheElements.length; ++i){ mainCacheElements[i].style.border = '1px solid #f00'; } } sfWebDebugToggle('sfWebDebugDetails'); sfWebDebugToggle('sfWebDebugShowMenu'); sfWebDebugToggle('sfWebDebugHideMenu'); } function sfWebDebugShowDetailsFor(element){ if (typeof element == 'string') element = document.getElementById(element); var panelElements = sfWebDebugGetElementsByClassName('sfWebDebugTop'); for(var i = 0; i < panelElements.length; ++i){ if(panelElements[i] != element){ panelElements[i].style.display = 'none'; } } sfWebDebugToggle(element); } function sfWebDebugToggle(element){ if (typeof element == 'string') element = document.getElementById(element); if (element) element.style.display = element.style.display == 'none' ? '' : 'none'; } function sfWebDebugToggleMessages(klass){ var elements = sfWebDebugGetElementsByClassName(klass); var x = elements.length; for (var i = 0; i < x; ++i){ sfWebDebugToggle(elements[i]); } } function sfWebDebugToggleAllLogLines(show, klass){ var elements = sfWebDebugGetElementsByClassName(klass); var x = elements.length; for (var i = 0; i < x; ++i){ elements[i].style.display = show ? '' : 'none'; } } function sfWebDebugShowOnlyLogLines(type){ var types = new Array(); types[0] = 'info'; types[1] = 'warning'; types[2] = 'error'; for (klass in types){ var elements = sfWebDebugGetElementsByClassName('sfWebDebug' + types[klass].substring(0, 1).toUpperCase() + types[klass].substring(1, types[klass].length)); var x = elements.length; for (var i = 0; i < x; ++i){ if ('tr' == elements[i].tagName.toLowerCase()){ elements[i].style.display = (type == types[klass]) ? '' : 'none'; } } } } /* ]]> */ </script> <div id="sfWebDebug"> <div id="sfWebDebugBar"> <a onclick="sfWebDebugToggleMenu(); return false;" href="javascript:void(0);"><img alt="Debug toolbar" src="{$debug_pic['logo']}"></a> <ul class="sfWebDebugMenu" id="sfWebDebugDetails"> <li><span id="sfWebDebugThinkphpVersion">{$think_version}</span></li> <li class="sfWebDebugInfo"><a onclick="sfWebDebugShowDetailsFor('sfWebDebugconfigDetails'); return false;" href="javascript:void(0);" title="Configuration"><img alt="Config" src="{$debug_pic['config']}"> config</a></li> <li class="sfWebDebugInfo"><a onclick="sfWebDebugShowDetailsFor('sfWebDebugviewDetails'); return false;" href="javascript:void(0);" title="View Layer"><img alt="View Layer" src="{$debug_pic['view']}"> view</a></li> <li class="sfWebDebugInfo"><a onclick="sfWebDebugShowDetailsFor('sfWebDebuglogsDetails'); return false;" href="javascript:void(0);" title="Logs"><img alt="Log" src="{$debug_pic['log']}"> logs</a></li> <li><img alt="Memory" src="{$debug_pic['memory']}">{$showtime['UseMem']}</li> <li class="sfWebDebugInfo"><a onclick="sfWebDebugShowDetailsFor('sfWebDebugtimeDetails'); return false;" href="javascript:void(0);" title="Timers"><img alt="Time" src="{$debug_pic['time']}">{$showtime['Process']}</a></li> <li class="last"> <a onclick="document.getElementById('sfWebDebug').style.display='none'; return false;" href="javascript:void(0);"><img alt="Close" src="{$debug_pic['close']}"></a> </li> </ul> </div> <div style="display:none" class="sfWebDebugTop" id="sfWebDebugconfigDetails"> <h1>Configuration</h1> <ul id="sfWebDebugConfigSummary"> {$trace_config_output} </ul> <h2>Request <a title="Toggle details" onclick="sfWebDebugToggle('sfWebDebugRequest'); return false;" href="javascript:void(0);"><img alt="Toggle details" src="{$debug_pic['toggle']}"></a></h2> <div style="display: none" id="sfWebDebugRequest"> <p>{$request}</p> </div> <h2>Response <a title="Toggle details" onclick="sfWebDebugToggle('sfWebDebugResponse'); return false;" href="javascript:void(0);"><img alt="Toggle details" src="{$debug_pic['toggle']}"></a></h2> <div style="display: none" id="sfWebDebugResponse"> <p>{$response}</p> </div> <h2>User <a title="Toggle details" onclick="sfWebDebugToggle('sfWebDebugUser'); return false;" href="javascript:void(0);"><img alt="Toggle details" src="{$debug_pic['toggle']}"></a></h2> <div style="display: none" id="sfWebDebugUser"> <p>{$user}</p> </div> <h2>Settings <a title="Toggle details" onclick="sfWebDebugToggle('sfWebDebugSettings'); return false;" href="javascript:void(0);"><img alt="Toggle details" src="{$debug_pic['toggle']}"></a></h2> <div style="display: none" id="sfWebDebugSettings"> <p>{$settings}</p> </div> <h2>Prams<a title="Toggle details" onclick="sfWebDebugToggle('sfWebDebugPrams'); return false;" href="javascript:void(0);"><img alt="Toggle details" src="{$debug_pic['toggle']}"></a></h2> <div style="display: none" id="sfWebDebugPrams"> <p>{$prams}</p> </div> <h2>Globals <a title="Toggle details" onclick="sfWebDebugToggle('sfWebDebugGlobals'); return false;" href="javascript:void(0);"><img alt="Toggle details" src="{$debug_pic['toggle']}"></a></h2> <div style="display: none" id="sfWebDebugGlobals"> <p>{$glob}</p> </div> <h2>PHP <a title="Toggle details" onclick="sfWebDebugToggle('sfWebDebugPhp'); return false;" href="javascript:void(0);"><img alt="Toggle details" src="{$debug_pic['toggle']}"></a></h2> <div style="display: none" id="sfWebDebugPhp"> <p>{$php_info}</p> </div> <h2>Thinkphp <a title="Toggle details" onclick="sfWebDebugToggle('sfWebDebugSymfony'); return false;" href="javascript:void(0);"><img alt="Toggle details" src="{$debug_pic['toggle']}"></a></h2> <div style="display: none" id="sfWebDebugSymfony"> <pre>version: {$think_version} path: {$think_path}</pre> </div> </div> <div style="display:none" class="sfWebDebugTop" id="sfWebDebugviewDetails"> <h1>View Layer</h1> <h2>Template: <span title="{$_trace['template_file']}">{$_trace['template_file']}</span><a title="Toggle details" onclick="sfWebDebugToggle('sfWebDebugViewTemplate1'); return false;" href="javascript:void(0);"><img alt="Toggle details" src="{$debug_pic['toggle']}"></a></h2> <div style="display:block" id="sfWebDebugViewTemplate1">{$tmpl_var}</div> <h1>passed values:<a title="Toggle details" onclick="sfWebDebugToggle('sfWebDebugViewTemplate2'); return false;" href="javascript:void(0);"><img alt="Toggle details" src="{$debug_pic['toggle']}"></a></h1> <pre id="sfWebDebugViewTemplate2">{$view_var}</pre> <h1>loaded Files:<a title="Toggle details" onclick="sfWebDebugToggle('sfWebDebugViewTemplate3'); return false;" href="javascript:void(0);"><img alt="Toggle details" src="{$debug_pic['toggle']}"></a></h1> <pre id="sfWebDebugViewTemplate3">{$file_count}个文�br />{$files}</pre> </div> <div style="display:none" class="sfWebDebugTop" id="sfWebDebuglogsDetails"><h1>Logs</h1> {$showtime['DB']}{$showtime['Cache']} <ul id="sfWebDebugLogMenu"> <li><a onclick="sfWebDebugToggleAllLogLines(true, 'sfWebDebugLogLine'); return false;" href="javascript:void(0);">[all]</a></li> <li><a onclick="sfWebDebugToggleAllLogLines(false, 'sfWebDebugLogLine'); return false;" href="javascript:void(0);">[none]</a></li> <li><a onclick="sfWebDebugShowOnlyLogLines('info'); return false;" href="javascript:void(0);"><img alt="Show only infos" src="{$debug_pic['info']}"></a></li> <li> <a onclick="sfWebDebugShowOnlyLogLines('warning'); return false;" href="javascript:void(0);"><img alt="Show only warnings" src="{$debug_pic['warning']}"></a> </li> <li><a onclick="sfWebDebugShowOnlyLogLines('error'); return false;" href="javascript:void(0);"><img alt="Show only errors" src="{$debug_pic['error']}"></a></li> <li><a onclick="sfWebDebugToggleMessages('ALERT'); return false;" href="javascript:void(0);">ALERT</a></li> <li><a onclick="sfWebDebugToggleMessages('CRIT'); return false;" href="javascript:void(0);">CRIT</a></li> <li><a onclick="sfWebDebugToggleMessages('DEBUG'); return false;" href="javascript:void(0);">DEBUG</a></li> <li><a onclick="sfWebDebugToggleMessages('EMERG'); return false;" href="javascript:void(0);">EMERG</a></li> <li><a onclick="sfWebDebugToggleMessages('ERR'); return false;" href="javascript:void(0);">ERR</a></li> <li><a onclick="sfWebDebugToggleMessages('INFO'); return false;" href="javascript:void(0);">INFO</a></li> <li><a onclick="sfWebDebugToggleMessages('NOTIC'); return false;" href="javascript:void(0);">NOTIC</a></li> <li><a onclick="sfWebDebugToggleMessages('SQL'); return false;" href="javascript:void(0);">SQL</a></li> <li><a onclick="sfWebDebugToggleMessages('WARN'); return false;" href="javascript:void(0);">WARN</a></li> </ul> <div id="sfWebDebugLogLines"> <table class="sfWebDebugLogs"> <tbody> <tr> <th>#</th> <th>type</th> <th>message</th> </tr> {$log_rows} </tbody> </table> </div> </div> <div style="display:none" class="sfWebDebugTop" id="sfWebDebugtimeDetails"> <h1>Timers</h1> <table style="width:300px" class="sfWebDebugLogs"> <tbody> <tr><th>type</th><th>time</th><th>time(%)</th></tr> {$showtime_output} </tbody> </table> </div> </div> EOPAGE; if (C('TMPL_TRACE_FILE')) { include C('TMPL_TRACE_FILE'); } else { echo $pageContents; } // }
if (isset($_GET['interaction_id'])) { $interaction_id = trim($_GET['interaction_id']); $request = getRequest($interaction_id); if ($request !== null) { header('Content-Type: application/json'); echo json_encode($request); exit; } else { header('Content-Type: application/json'); echo json_encode(['error' => 'Error: Specified ticket does not exist!']); exit; } } else { if (isset($_GET['log'])) { $interaction_id = trim($_GET['log']); $request = getLogs($interaction_id); if ($request !== null) { header('Content-Type: application/json'); echo json_encode($request); exit; } else { header('Content-Type: application/json'); echo json_encode(['error' => 'Error: Specified logs do not exist!']); exit; } } else { if (isset($_GET['last'])) { $last = getLast(); if ($last !== null) { echo json_encode($last); exit;
//Форматирование вытащенных записей логов в удобный вид $format_old_log = format_log($logs, 'entry_old_log', 10); $format_new_log = format_new_log($logs, 'entry_new_log', 10); //Создаем массив названий $log_name = createLogName(); //Вытаскивание сообщения дня $motd = get_motd($link); //Получаем список пользователей $users_arr = getUsers($link); //Разбираем полученный массив $users = $users_arr[0]; $numUsers = $users_arr[1]; //Достаем общее количество логов $numLogs = getNumLogs($link); //Вытаскиваем логи действий из БД $logsAction = getLogs($link, logs_action); //Узнаем количество логов действий: $numLogsAction = count($logsAction); //вычисляем количество отображаемых логов действий в админке if ($numLogsAction > 10) { $numLogsActionInAdminPanel = 10; } else { $numLogsActionInAdminPanel = $numLogsAction; } //Устанавливаем значение радиоточки по умолчанию $checkedAccessUser = '******'; //Выводим в шаблоны include_once 'views/v-header.php'; include_once 'views/v-menu.php'; include_once 'views/v-admin.php'; include_once 'views/v-footer.php';
} catch (Exception $ex) { var_dump($ex); } } function getHistograms(Aliyun_Sls_Client $client, $project, $logstore) { $topic = 'TestTopic'; $from = time() - 3600; $to = time(); $request = new Aliyun_Sls_Models_GetHistogramsRequest($project, $logstore, $from, $to, $topic, ''); try { $response = $client->getHistograms($request); var_dump($response); } catch (Aliyun_Sls_Exception $ex) { var_dump($ex); } catch (Exception $ex) { var_dump($ex); } } $endpoint = '<sls_region_endpoint>'; $accessKeyId = '<your_access_key_id>'; $accessKey = '<your_access_key>'; $project = '<your_project_name>'; $logstore = '<your_logstore_name>'; $client = new Aliyun_Sls_Client($endpoint, $accessKeyId, $accessKey); putLogs($client, $project, $logstore); listLogstores($client, $project); listTopics($client, $project, $logstore); getHistograms($client, $project, $logstore); getLogs($client, $project, $logstore);
echo "<div class='row'>"; echo "<div class='col-sm-4'><input class='form-control' type='text' id='search' placeholder='Filtro'></div>"; echo "<div class='col-sm-4'><input type='date' class='datepicker form-control' id='fecha' placeholder='seleccionar fecha'></div>"; //echo "<div class='col-sm-4'><select class='form-control' id='fecha'><option>Todas las fechas</option>"; //foreach ($fechas as $data) { // foreach ($data as $fecha) { // echo "<option value='$fecha'>$fecha</option>"; // } //} //echo "</select></div>"; echo "<div class='col-sm-4'>Otro filtro</div>"; echo "</div><!-- row -->"; echo '<div class="table-responsive" style="max-height: 300px; overflow-y: auto;">'; echo "<table class='table table-fixed'>\n <thead>\n <tr>\n <th>Horario</th>\n <th>Tipo</th>\n <th>User</th>\n <th>IP</th>\n <th>URL</th>\n </tr>\n </thead>"; echo "<tbody>"; $logs = getLogs(); if ($logs) { foreach ($logs as $log) { $url = explode('?', $log['url']); $vars = explode('&', $url[1]); $user = explode('=', $vars[1]); $ip = explode('=', $vars[2]); echo "<tr class='log'>\n <td>{$log['horario']}</td>\n <td>{$log['tipo']}</td>\n <td>{$user['1']}</td>\n <td>{$ip['1']}</td>\n <td>{$url['0']}</td>\n </tr>"; } } echo " </tbody>\n </table></div> "; ?> <script> $('#search').keyup(function() { $('.log').hide(); var txt = $('#search').val();
<?php class MyDB extends SQLite3 { function __construct($stringDB) { //Funktion som öppnar önskad databas. $this->open($stringDB); } } $type = $_REQUEST["type"]; //Läser in variablen type från GET-meddelandet. if ($type == "getLogs") { //Hämta alla loggar graphLog.php?type=getLogs getLogs(); } else { if ($type == "loadLog") { //Ladda ett loggschema graphLog.php?type=loadLog&date="2015/05/20 10:47" loadLog(); } else { if ($type == "deleteLog") { //Ta bort en logg graphLog.php?type=deleteLog&date="2015/04/22" deleteLog(); } else { if ($type == "loadCurrent") { //Load the most recent log graphLog.php?type=loadCurrent loadCurrent(); } } } }
} //Unstall Plugin function CoolCode_unstall() { $ActionMessage = unstall_plugins("CoolCode"); return $ActionMessage; } //================================================================================ // Download the code //================================================================================ if (!empty($_GET['download'])) { $post = $_GET['p']; $download = $_GET['download']; $plugins_path = substr(dirname(__FILE__), 0, -16); include_once $plugins_path . "include/function.php"; $dataInfo = getLogs($post); $content = $dataInfo['logContent']; $content = str_replace("&", "&", $content); $content = str_replace("<", "<", $content); $content = str_replace(">", ">", $content); $content = str_replace("<br />", "\n", $content); $content = str_replace("'", "'", $content); $content = str_replace(" ", " ", $content); $content = str_replace(""", "\"", $content); $content = str_replace("<p><coolcode", "<coolcode", $content); $content = str_replace("</coolcode></p>", "</coolcode>", $content); $content = str_replace("</p> <p>", "\r\n\r\n", $content); $search = strtolower($content); $pos = 0; while (true) { $count = 0;