Guest User

Untitled

a guest
Jan 21st, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. <center class="contenttitle">Home</center>
  2. <center>
  3. <p> <center>
  4. <?php
  5.  
  6. $where .= " and `keyword` in (select keyword FROM AdCraft_url WHERE userid='".$_SESSION["id"]."') ";
  7. list( $total_urls, $total_clicks ) = array_values( yourls_get_db_stats($where) );
  8. if ( $where ) {
  9. list( $total_items, $total_items_clicks ) = array_values( yourls_get_db_stats( $where ) );
  10. } else {
  11. $total_items = $total_urls;
  12. $total_items_clicks = false;
  13. }
  14.  
  15. ?>
  16.  
  17. You have, <strong class='increment'><?php echo number_format($total_urls); ?>
  18. </strong> links, which have recieved a total of <strong><?php echo number_format($total_clicks); ?> </strong>
  19. visitors, and counting! <br />
  20. <?php
  21.  
  22. $value = (int) $total_clicks;
  23.  
  24. switch (true) {
  25. case ($value >= 100001 && $value <= 999999) :
  26. echo "You must be famous!";
  27. break;
  28. case ($value == 1000000) :
  29. echo "ONE MILLION.";
  30. break;
  31. case ($value >= 100001 && $value <= 999999) :
  32. echo "Over 100'000, your good at this.";
  33. break;
  34. case ($value >= 10001 && $value <= 100000) :
  35. echo "Over 10'000, your Mr. Popular ;). Good Work ".$_SESSION['usr'];
  36. break;
  37. case ($value >= 1001 && $value <= 10000) :
  38. echo "Over 1000, Nice work.";
  39. break;
  40. case ($value >= 101 && $value <= 1000) :
  41. echo "Now you've got it.";
  42. break;
  43. case ($value >= 11 && $value <= 100) :
  44. echo "Good Start, keep sharing.";
  45. break;
  46. case ($value >= 0 && $value <= 10) :
  47. echo "You're new aren't you.";
  48. break;
  49.  
  50.  
  51. }
  52.  
  53. ?><br />
  54. You have earned roughly $<?php
  55. $value2 = ((int) $total_clicks)/1000;
  56. $value2 = $value2*6.444;
  57. $value2 = round($value2, 2);
  58. echo ($value2)
  59. ?>. This is only an estimate and is caluclated based on your total views and this month's rate so far.
Add Comment
Please, Sign In to add comment