The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Index.cshtml 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. @model Teknik.Areas.Transparency.ViewModels.TransparencyViewModel
  2. <div class="container">
  3. <div class="row">
  4. <div class="col-sm-10 col-sm-offset-1">
  5. <h2 class="text-center"><b>Behind the Scenes</b></h2>
  6. <hr>
  7. <p>
  8. Here you can view all of Teknik's financial information, takedown requests and the actions we took, as well as some general statistics for the site's services.
  9. </p>
  10. <p>
  11. If you would like to request additional information about Teknik, please feel free to contact us through our <a href="@Url.SubRouteUrl("contact", "Contact.Index")" target="_blank">Contact Form</a> or by emailing us at <a href="mailto:@Model.Config.SupportEmail">@Model.Config.SupportEmail</a>.
  12. </p>
  13. <p>
  14. Want to make a donation? Visit our <a href="@Url.SubRouteUrl("about", "About.Index")" target="_blank">About Page</a> and choose a donation method at the bottom.
  15. </p>
  16. <br />
  17. <h2 class="text-center"><b>Statistics</b></h2>
  18. <hr>
  19. <div class="row">
  20. <div class="col-sm-6">
  21. <h3>Uploads</h3>
  22. <p>Number of Uploads: <?php echo count($upload_list); ?></p>
  23. <p>Total Size: <?php echo bytesToSize($total_size['TotalSize']); ?></p>
  24. </div>
  25. <div class="col-sm-6">
  26. <h3>Pastes</h3>
  27. <p>Number of Pastes: <?php echo $paste_list[0]['pid']; ?></p>
  28. </div>
  29. </div>
  30. <div class="row">
  31. <div class="col-sm-6">
  32. <h3>Users</h3>
  33. <p>Number of Users: <?php echo count($user_list); ?></p>
  34. </div>
  35. <div class="col-sm-6">
  36. <h3>Usage</h3>
  37. <p>No Usage Reports</p>
  38. </div>
  39. </div>
  40. <br />
  41. <h2 class="text-center"><b>Transactions</b></h2>
  42. <hr>
  43. <h3 class="text-center">Total Amounts</h3>
  44. <div class="row">
  45. <div class="col-sm-3 text-center">
  46. <h4>Donations</h4>
  47. <?php
  48. foreach ($total_donation_list as $total)
  49. {
  50. echo "<p>
  51. ".round($total['TotalAmount'], 2)." ".$total['currency'];
  52. }
  53. ?>
  54. </div>
  55. <div class="col-sm-3 text-center">
  56. <h4>Bills</h4>
  57. <?php
  58. foreach ($total_bill_list as $total)
  59. {
  60. echo "<p>
  61. ".round($total['TotalAmount'], 2)." ".$total['currency'];
  62. }
  63. ?>
  64. </div>
  65. <div class="col-sm-3 text-center">
  66. <h4>One-Time Payments</h4>
  67. <?php
  68. foreach ($total_one_time_list as $total)
  69. {
  70. echo "<p>
  71. ".round($total['TotalAmount'], 2)." ".$total['currency'];
  72. }
  73. ?>
  74. </div>
  75. <div class="col-sm-3 text-center">
  76. <h4>Net Profit</h4>
  77. <?php
  78. foreach ($total_net_list as $total)
  79. {
  80. echo "<p>
  81. ".round($total['TotalAmount'], 2)." ".$total['currency'];
  82. }
  83. ?>
  84. </div>
  85. </div>
  86. <?php
  87. if ($transactions_bills)
  88. {
  89. ?>
  90. <h3>Bills</h3>
  91. <?php
  92. $current_month = null;
  93. $first_event = true;
  94. foreach ($transaction_bill_list as $transaction)
  95. {
  96. $transaction_date = (isset($transaction['date_posted'])) ? $transaction['date_posted'] : "";
  97. $transaction_reason = (isset($transaction['reason'])) ? $transaction['reason'] : "";
  98. $transaction_amount = (isset($transaction['amount'])) ? $transaction['amount'] : "";
  99. $transaction_currency = (isset($transaction['currency'])) ? $transaction['currency'] : "";
  100. $new_month_tag = false;
  101. if ($current_month != date("F",strtotime($transaction_date)) || $current_year != date("Y",strtotime($transaction_date)))
  102. {
  103. $new_month_tag = true;
  104. }
  105. $current_month = date("F",strtotime($transaction_date));
  106. $current_year = date("Y",strtotime($transaction_date));
  107. ?>
  108. <?php if (!$first_event && $new_month_tag) { ?>
  109. </div>
  110. <?php } ?>
  111. <?php if ($new_month_tag) { ?>
  112. <div class="row">
  113. <div class="col-sm-12">
  114. <button type="button" class="btn btn-default" data-toggle="collapse" data-target="#bills-<?php echo $current_month.'-'.$current_year; ?>"><?php echo $current_month.', '.$current_year; ?></button>
  115. </div>
  116. </div>
  117. <br />
  118. <div id="bills-<?php echo $current_month.'-'.$current_year; ?>" class="collapse">
  119. <div class="row">
  120. <div class="col-sm-2">
  121. <h4><strong>Date</strong></h4>
  122. </div>
  123. <div class="col-sm-2">
  124. <h4><strong>Amount</strong></h4>
  125. </div>
  126. <div class="col-sm-8">
  127. <h4><strong>Reason for Transaction</strong></h4>
  128. </div>
  129. </div>
  130. <?php } ?>
  131. <div class="row">
  132. <div class="col-sm-2">
  133. <?php echo $transaction_date; ?>
  134. </div>
  135. <div class="col-sm-2">
  136. <?php echo $transaction_amount." <var>".$transaction_currency."</var>"; ?>
  137. </div>
  138. <div class="col-sm-8">
  139. <?php echo $transaction_reason; ?>
  140. </div>
  141. </div>
  142. <br />
  143. <?php
  144. $first_event = false;
  145. }
  146. ?>
  147. </div>
  148. <?php
  149. }
  150. if ($transactions_one_time)
  151. {
  152. ?>
  153. <h3>One-Time Payments</h3>
  154. <?php
  155. $current_month = null;
  156. $first_event = true;
  157. foreach ($transaction_one_time_list as $transaction)
  158. {
  159. $transaction_date = (isset($transaction['date_posted'])) ? $transaction['date_posted'] : "";
  160. $transaction_reason = (isset($transaction['reason'])) ? $transaction['reason'] : "";
  161. $transaction_amount = (isset($transaction['amount'])) ? $transaction['amount'] : "";
  162. $transaction_currency = (isset($transaction['currency'])) ? $transaction['currency'] : "";
  163. $new_month_tag = false;
  164. if ($current_month != date("F",strtotime($transaction_date)) || $current_year != date("Y",strtotime($transaction_date)))
  165. {
  166. $new_month_tag = true;
  167. }
  168. $current_month = date("F",strtotime($transaction_date));
  169. $current_year = date("Y",strtotime($transaction_date));
  170. ?>
  171. <?php if (!$first_event && $new_month_tag) { ?>
  172. </div>
  173. <?php } ?>
  174. <?php if ($new_month_tag) { ?>
  175. <div class="row">
  176. <div class="col-sm-12">
  177. <button type="button" class="btn btn-default" data-toggle="collapse" data-target="#One-Time-<?php echo $current_month.'-'.$current_year; ?>"><?php echo $current_month.' - '.$current_year; ?></button>
  178. </div>
  179. </div>
  180. <br />
  181. <div id="One-Time-<?php echo $current_month.'-'.$current_year; ?>" class="collapse">
  182. <div class="row">
  183. <div class="col-sm-2">
  184. <h4><strong>Date</strong></h4>
  185. </div>
  186. <div class="col-sm-2">
  187. <h4><strong>Amount</strong></h4>
  188. </div>
  189. <div class="col-sm-8">
  190. <h4><strong>Reason for Transaction</strong></h4>
  191. </div>
  192. </div>
  193. <?php } ?>
  194. <div class="row">
  195. <div class="col-sm-2">
  196. <?php echo $transaction_date; ?>
  197. </div>
  198. <div class="col-sm-2">
  199. <?php echo $transaction_amount." <var>".$transaction_currency."</var>"; ?>
  200. </div>
  201. <div class="col-sm-8">
  202. <?php echo $transaction_reason; ?>
  203. </div>
  204. </div>
  205. <br />
  206. <?php
  207. $first_event = false;
  208. }
  209. ?>
  210. </div>
  211. <?php
  212. }
  213. if ($transactions_donations)
  214. {
  215. ?>
  216. <h3>Donations</h3>
  217. <?php
  218. $current_month = null;
  219. $first_event = true;
  220. foreach ($transaction_donation_list as $transaction)
  221. {
  222. $transaction_date = (isset($transaction['date_posted'])) ? $transaction['date_posted'] : "";
  223. $transaction_reason = (isset($transaction['reason'])) ? $transaction['reason'] : "";
  224. $transaction_amount = (isset($transaction['amount'])) ? $transaction['amount'] : "";
  225. $transaction_currency = (isset($transaction['currency'])) ? $transaction['currency'] : "";
  226. $new_month_tag = false;
  227. if ($current_month != date("F",strtotime($transaction_date)) || $current_year != date("Y",strtotime($transaction_date)))
  228. {
  229. $new_month_tag = true;
  230. }
  231. $current_month = date("F",strtotime($transaction_date));
  232. $current_year = date("Y",strtotime($transaction_date));
  233. ?>
  234. <?php if (!$first_event && $new_month_tag) { ?>
  235. </div>
  236. <?php } ?>
  237. <?php if ($new_month_tag) { ?>
  238. <div class="row">
  239. <div class="col-sm-12">
  240. <button type="button" class="btn btn-default" data-toggle="collapse" data-target="#donations-<?php echo $current_month.'-'.$current_year; ?>"><?php echo $current_month.' - '.$current_year; ?></button>
  241. </div>
  242. </div>
  243. <br />
  244. <div id="donations-<?php echo $current_month.'-'.$current_year; ?>" class="collapse">
  245. <div class="row">
  246. <div class="col-sm-2">
  247. <h4><strong>Date</strong></h4>
  248. </div>
  249. <div class="col-sm-2">
  250. <h4><strong>Amount</strong></h4>
  251. </div>
  252. <div class="col-sm-8">
  253. <h4><strong>Reason for Transaction</strong></h4>
  254. </div>
  255. </div>
  256. <?php } ?>
  257. <div class="row">
  258. <div class="col-sm-2">
  259. <?php echo $transaction_date; ?>
  260. </div>
  261. <div class="col-sm-2">
  262. <?php echo $transaction_amount." <var>".$transaction_currency."</var>"; ?>
  263. </div>
  264. <div class="col-sm-8">
  265. <?php echo $transaction_reason; ?>
  266. </div>
  267. </div>
  268. <br />
  269. <?php
  270. $first_event = false;
  271. }
  272. ?>
  273. </div>
  274. <?php
  275. }
  276. ?>
  277. <br />
  278. <h2 class="text-center"><b>Takedowns</b></h2>
  279. <hr>
  280. <?php
  281. if ($takedown_list)
  282. {
  283. $current_month = date("F",time())+1;
  284. $first_event = true;
  285. foreach ($takedown_list as $takedown)
  286. {
  287. $takedown_date = (isset($takedown['date_requested'])) ? $takedown['date_requested'] : "";
  288. $takedown_requester = (isset($takedown['requester'])) ? $takedown['requester'] : "";
  289. $takedown_reason = (isset($takedown['reason'])) ? $takedown['reason'] : "";
  290. $takedown_action = (isset($takedown['action'])) ? $takedown['action'] : "";
  291. $new_month_tag = false;
  292. if ($current_month != date("F",strtotime($takedown_date)))
  293. {
  294. $new_month_tag = true;
  295. }
  296. $current_month = date("F",strtotime($takedown_date));
  297. $current_year = date("Y",strtotime($takedown_date));
  298. ?>
  299. <?php if (!$first_event && $new_month_tag) { ?>
  300. </div>
  301. <?php } ?>
  302. <?php if ($new_month_tag) { ?>
  303. <div class="row">
  304. <div class="col-sm-12">
  305. <button type="button" class="btn btn-default" data-toggle="collapse" data-target="#donations-<?php echo $current_month.'-'.$current_year; ?>"><?php echo $current_month.' - '.$current_year; ?></button>
  306. </div>
  307. </div>
  308. <br />
  309. <div id="donations-<?php echo $current_month.'-'.$current_year; ?>" class="collapse">
  310. <div class="row">
  311. <div class="col-sm-2">
  312. <h4><strong>Date</strong></h4>
  313. </div>
  314. <div class="col-sm-2">
  315. <h4><strong>Requester</strong></h4>
  316. </div>
  317. <div class="col-sm-2">
  318. <h4><strong>Action Taken</strong></h4>
  319. </div>
  320. <div class="col-sm-6">
  321. <h4><strong>Takedown Reason</strong></h4>
  322. </div>
  323. </div>
  324. <?php } ?>
  325. <div class="row">
  326. <div class="col-sm-2">
  327. <p><?php echo $takedown_date; ?></p>
  328. </div>
  329. <div class="col-sm-2">
  330. <p><?php echo $takedown_requester; ?></p>
  331. </div>
  332. <div class="col-sm-2">
  333. <p><?php echo $takedown_action; ?></p>
  334. </div>
  335. <div class="col-sm-6">
  336. <?php echo $takedown_reason; ?>
  337. </div>
  338. </div>
  339. <br />
  340. <?php
  341. $first_event = false;
  342. }
  343. ?>
  344. </div>
  345. <?php
  346. }
  347. else
  348. {
  349. echo "<h3 class='text-center'>No Takedowns Requested</h3>";
  350. }
  351. ?>
  352. <br />
  353. </div>
  354. </div>
  355. </div>