Permalink
Browse files

run code through formatter

  • Loading branch information...
r04r committed Nov 1, 2015
1 parent 7590f50 commit 1a4a65ca4c6580d6177c924a839e6b08822cc1a1
Showing with 13,323 additions and 12,102 deletions.
  1. +19 −14 Minnie/ip_info.php
  2. +728 −722 action.php
  3. +17 −17 android/link_device.php
  4. +48 −40 android/register_device.php
  5. +10 −9 android/test.php
  6. +14 −12 back_up_id.php
  7. +58 −56 bans.php
  8. +95 −87 bulletins.php
  9. +120 −104 bulletins_mod.php
  10. +205 −191 bulletins_new.php
  11. +4 −4 chrome-extension/changelog.php
  12. +121 −117 chrome-extension/notifications.php
  13. +18 −17 chrome-extension/omnibox.php
  14. +21 −20 chrome-extension/server/authenticate.php
  15. +18 −16 chrome-extension/server/bootstrap.php
  16. +76 −74 chrome-extension/update.php
  17. +18 −18 cms.php
  18. +47 −47 cms_edit.php
  19. +2 −2 copy.php
  20. +133 −99 dashboard.php
  21. +3 −3 date_and_time.php
  22. +67 −25 debug_proxy.php
  23. +30 −25 defcon.php
  24. +47 −48 deleted_topics.php
  25. +18 −18 drop_id.php
  26. +7 −7 edit_ignore_list.php
  27. +107 −72 events.php
  28. +119 −102 events_mod.php
  29. +185 −172 events_new.php
  30. +50 −50 exterminate.php
  31. +40 −40 failed_postings.php
  32. +50 −50 folks.php
  33. +3 −4 gen_pass.php
  34. +21 −20 gh-push.php
  35. +98 −98 history.php
  36. +8 −10 hot_topics.php
  37. +2 −2 hurr.php
  38. +52 −55 includes/ChromePhp.class.php
  39. +39 −22 includes/ChromePhp.php
  40. +55 −41 includes/async_functions.php
  41. +19 −25 includes/config.example.php
  42. +310 −244 includes/database.class.php
  43. +6 −2 includes/database/upgrade-0-to-1.php
  44. +6 −2 includes/database/upgrade-1-to-2.php
  45. +6 −2 includes/database/upgrade-2-to-3.php
  46. +6 −2 includes/database/upgrade-3-to-4.php
  47. +6 −2 includes/database/upgrade-4-to-5.php
  48. +2 −2 includes/footer.php
  49. +57 −41 includes/formatter.php
  50. +133 −122 includes/formatters/0/formatter.php
  51. +36 −33 includes/formatters/1/JBBCode/CodeDefinition.php
  52. +18 −10 includes/formatters/1/JBBCode/CodeDefinitionBuilder.php
  53. +0 −4 includes/formatters/1/JBBCode/CodeDefinitionSet.php
  54. +1 −3 includes/formatters/1/JBBCode/DefaultCodeDefinitionSet.php
  55. +11 −9 includes/formatters/1/JBBCode/DocumentElement.php
  56. +24 −21 includes/formatters/1/JBBCode/ElementNode.php
  57. +2 −3 includes/formatters/1/JBBCode/InputValidator.php
  58. +7 −8 includes/formatters/1/JBBCode/Node.php
  59. +1 −2 includes/formatters/1/JBBCode/NodeVisitor.php
  60. +73 −66 includes/formatters/1/JBBCode/Parser.php
  61. +4 −2 includes/formatters/1/JBBCode/ParserException.php
  62. +9 −6 includes/formatters/1/JBBCode/TextNode.php
  63. +4 −6 includes/formatters/1/JBBCode/Tokenizer.php
  64. +4 −3 includes/formatters/1/JBBCode/examples/1-GettingStarted.php
  65. +3 −2 includes/formatters/1/JBBCode/examples/2-ClosingUnclosedTags.php
  66. +4 −3 includes/formatters/1/JBBCode/examples/3-MarkuplessText.php
  67. +4 −3 includes/formatters/1/JBBCode/examples/4-CreatingNewCodes.php
  68. +4 −4 includes/formatters/1/JBBCode/examples/SmileyVisitorTest.php
  69. +4 −4 includes/formatters/1/JBBCode/examples/TagCountingVisitorTest.php
  70. +5 −6 includes/formatters/1/JBBCode/tests/BBCodeToBBCodeTest.php
  71. +4 −5 includes/formatters/1/JBBCode/tests/BBCodeToTextTest.php
  72. +4 −5 includes/formatters/1/JBBCode/tests/DefaultCodesTest.php
  73. +11 −12 includes/formatters/1/JBBCode/tests/HTMLSafeTest.php
  74. +4 −5 includes/formatters/1/JBBCode/tests/NestLimitTest.php
  75. +1 −7 includes/formatters/1/JBBCode/tests/ParseContentTest.php
  76. +3 −5 includes/formatters/1/JBBCode/tests/ParsingEdgeCaseTest.php
  77. +2 −4 includes/formatters/1/JBBCode/tests/SimpleEvaluationTest.php
  78. +1 −3 includes/formatters/1/JBBCode/tests/TokenizerTest.php
  79. +4 −5 includes/formatters/1/JBBCode/tests/ValidatorTest.php
  80. +2 −3 includes/formatters/1/JBBCode/validators/CssColorValidator.php
  81. +3 −3 includes/formatters/1/JBBCode/validators/UrlValidator.php
  82. +42 −41 includes/formatters/1/JBBCode/visitors/HTMLSafeVisitor.php
  83. +10 −11 includes/formatters/1/JBBCode/visitors/NestLimitVisitor.php
  84. +7 −8 includes/formatters/1/JBBCode/visitors/SmileyVisitor.php
  85. +2 −3 includes/formatters/1/JBBCode/visitors/TagCountingVisitor.php
  86. +324 −264 includes/formatters/1/formatter.php
  87. +1,689 −1,483 includes/functions.php
  88. +319 −292 includes/header.php
  89. +88 −74 includes/pqp/classes/Console.php
  90. +112 −99 includes/pqp/classes/MySqlDatabase.php
  91. +205 −186 includes/pqp/classes/PhpQuickProfiler.php
  92. +132 −128 includes/pqp/display.php
  93. +94 −89 includes/pqp/index.php
  94. +161 −153 includes/recaptchalib.php
  95. +226 −197 includes/template.php
  96. +5 −3 includes/templates/ban_message.php
  97. +1 −1 includes/templates/ip_ban.php
  98. +1 −1 includes/templates/uid_ban.php
  99. +25 −24 includes/unicode.php
  100. +62 −48 includes/upgrade.php
  101. +20 −20 includes/useragents.php
  102. +127 −124 index.php
  103. +224 −211 ip_address.php
  104. +10 −10 macro/index.php
  105. +44 −39 markup_syntax.php
  106. +42 −50 modgraphs/actions_daily.php
  107. +43 −52 modgraphs/actions_hourly.php
  108. +119 −107 modgraphs/most_all.php
  109. +119 −107 modgraphs/most_all_month.php
  110. +119 −107 modgraphs/most_bans.php
  111. +119 −107 modgraphs/most_deletes.php
  112. +119 −107 modgraphs/most_locks.php
  113. +119 −107 modgraphs/most_stalks.php
  114. +117 −113 modlog.php
  115. +11 −11 notepad.php
  116. +78 −77 notifications.php
  117. +5 −4 password.php
  118. +132 −129 paypal/paypal.class.php
  119. +81 −71 paypal/paypal.php
  120. +14 −11 permissions.php
  121. +9 −6 plugins.php
  122. +60 −44 pm.php
  123. +96 −88 pm_compose.php
  124. +12 −12 pm_delete.php
  125. +41 −41 pm_inbox.php
  126. +873 −836 post.php
  127. +88 −74 pqp/classes/Console.php
  128. +112 −99 pqp/classes/MySqlDatabase.php
  129. +205 −186 pqp/classes/PhpQuickProfiler.php
  130. +132 −128 pqp/display.php
  131. +94 −89 pqp/index.php
  132. +270 −260 profile.php
  133. +17 −14 purge_images.php
  134. +20 −20 push.php
  135. +20 −19 rabbitmq/worker.php
  136. +38 −37 recover_id_by_email.php
  137. +26 −26 replies.php
  138. +65 −60 report.php
  139. +107 −98 reports.php
  140. +55 −57 restore_id.php
  141. +140 −138 search.php
  142. +344 −285 search2.php
  143. +10 −7 searches.php
  144. +3 −2 session.php
  145. +46 −35 shorturl/create.php
  146. +25 −22 shorturl/redirect.php
  147. +36 −35 show_report.php
  148. +3 −3 shuffle.php
  149. +86 −75 stalk.php
  150. +3 −3 statistics.php
  151. +59 −59 stuff.php
  152. +31 −30 tag.php
  153. +513 −495 tar.php
  154. +52 −55 test/ChromePhp.php
  155. +2 −1 test/example.php
  156. +3 −2 test_ban.php
  157. +722 −637 topic.php
  158. +19 −19 topic_trivia.php
  159. +2 −2 trash_can.php
  160. +21 −13 triptest.php
  161. +4 −3 unlock.php
  162. +10 −8 url_handler.php
  163. +79 −59 watch.php
  164. +22 −22 watchlist.php
View
@@ -1,23 +1,28 @@
<?php
chdir("..");
require('includes/config.php');
if($_GET['secret'] != IP_INFO_SECRET) die("Unauthorized.");
require('includes/database.class.php');
chdir('..');
require 'includes/config.php';
if ($_GET['secret'] != IP_INFO_SECRET) {
die('Unauthorized.');
}
require 'includes/database.class.php';
$link = new db($db_info['server'], $db_info['username'], $db_info['password'], $db_info['database']);
$queries[] = "SELECT COUNT(*) as Occurances, concat(trim(namefag), tripfag) as Name FROM replies WHERE author_ip = %1 GROUP BY Name";
$queries[] = "SELECT COUNT(*) as Occurances, concat(trim(r.namefag), r.tripfag) as Name FROM replies AS r, users AS u WHERE r.author = u.uid AND (u.last_ip = %1 OR u.ip_address = %1) GROUP BY Name";
$queries[] = "SELECT COUNT(*) as Occurances, concat(trim(namefag), tripfag) as Name FROM topics WHERE author_ip = %1 GROUP BY Name";
$queries[] = "SELECT COUNT(*) as Occurances, concat(trim(t.namefag), t.tripfag) as Name FROM topics AS t, users AS u WHERE t.author = u.uid AND (u.last_ip = %1 OR u.ip_address = %1) GROUP BY Name";
$queries[] = 'SELECT COUNT(*) as Occurances, concat(trim(namefag), tripfag) as Name FROM replies WHERE author_ip = %1 GROUP BY Name';
$queries[] = 'SELECT COUNT(*) as Occurances, concat(trim(r.namefag), r.tripfag) as Name FROM replies AS r, users AS u WHERE r.author = u.uid AND (u.last_ip = %1 OR u.ip_address = %1) GROUP BY Name';
$queries[] = 'SELECT COUNT(*) as Occurances, concat(trim(namefag), tripfag) as Name FROM topics WHERE author_ip = %1 GROUP BY Name';
$queries[] = 'SELECT COUNT(*) as Occurances, concat(trim(t.namefag), t.tripfag) as Name FROM topics AS t, users AS u WHERE t.author = u.uid AND (u.last_ip = %1 OR u.ip_address = %1) GROUP BY Name';
$names = array();
$result = array();
foreach($queries as $query) {
$link->db_exec($query, $_GET['ip']);
while(list($count, $name) = $link->fetch_row()) {
if(!trim($name)) $name = "Anonymous";
$names[$name] += $count;
}
foreach ($queries as $query) {
$link->db_exec($query, $_GET['ip']);
while (list($count, $name) = $link->fetch_row()) {
if (!trim($name)) {
$name = 'Anonymous';
}
$names[$name] += $count;
}
}
asort($names);
Oops, something went wrong.

0 comments on commit 1a4a65c

Please sign in to comment.