Advertisement
sagnik

sgp_features

Jan 20th, 2015
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2. $(document).ready(function() {
  3. $('html head').find('title').text("Features :: S.G. Paste");
  4. });
  5. </script>
  6.  
  7. <?php
  8. $today = date("Y-m-d h:i:s");
  9. $todayDate = date("Y-m-d");
  10. $todayTime = date("h:i:s");
  11.  
  12.  
  13. $sgpfree = mysql_query(SELECT * FROM features WHERE plan=free);
  14. if ($sgpfree) {
  15. $sgpf = mysql_fetch_row($sgpfree);
  16.  
  17. $date1a = $sgpf['signup_block_date_start'];
  18. $date2a = $sgpf['signup_block_date_end'];
  19.  
  20. $time1a = $sgpf['signup_block_time_start'];
  21. $time2a = $sgpf['signup_block_time_end'];
  22.  
  23. $start1 = strtotime('$date1a .$time1a.');
  24. $end1 = strtotime('$date2a .$time2a.');
  25. $fsbr = ceil(abs($start1 - $end1) / 3600);
  26.  
  27.  
  28. $start1a = strtotime('$date1a');
  29. $end1a = strtotime('$date2a');
  30. $fsbdr = ceil(abs($start - $end) / 86400);
  31. $start1b = strtotime('$time1a');
  32. $end1b = strtotime('$time2a');
  33. $fsbtr = ceil(abs($start1a - $end1b) / 3600);
  34.  
  35. if ($fsbr <= 0) {
  36. $freeSignup = "<a href='/sgpaste/register/plan/".$sgpf['plan']."'><img src='/sgpaste/global/images/free_signup.png' alt='Free Signup'/>";
  37. }
  38.  
  39. }
  40.  
  41. $sgpremium = mysql_query(SELECT * FROM `features` WHERE plan='premium');
  42. if ($sgpremium) {
  43. $sgpp = mysql_fetch_row($sgpremium);
  44.  
  45.  
  46. $date1b = $sgpf['signup_block_date_start'];
  47. $date2b = $sgpf['signup_block_date_end'];
  48.  
  49. $time1b = $sgpf['signup_block_time_start'];
  50. $time2b = $sgpf['signup_block_time_end'];
  51.  
  52. $start2 = strtotime('$date1b .$time1b.');
  53. $end2 = strtotime('$date2b .$time2b.');
  54. $fsbr = ceil(abs($start2 - $end2) / 3600);
  55.  
  56.  
  57. $start2a = strtotime('$date1b');
  58. $end2a = strtotime('$date2b');
  59. $psbdr = ceil(abs($start2a - $end2a) / 86400);
  60. # echo "Remaining: ".$psbdr."days";
  61.  
  62. $start2b = strtotime('$time1b');
  63. $end2b = strtotime('$time2b');
  64. $psbtr = ceil(abs($start2a - $end2b) / 3600);
  65. echo "Remaining: ".$psbtr."hours";
  66.  
  67.  
  68. if ($psbr <= 0) {
  69. $premiumSignup = "<a href='/sgpaste/register/plan/".$sgpp['plan']."'><img src='/sgpaste/global/images/premium_signup.png' alt='Premium Signup'/>";
  70. }
  71.  
  72. }
  73.  
  74. $sgpsuper = mysql_query(SELECT * FROM `features` WHERE plan='super');
  75. if ($sgpsuper) {
  76. $sgps = mysql_fetch_row($sgpsuper);
  77.  
  78. $date1c = $sgpf['signup_block_date_start'];
  79. $date2c = $sgpf['signup_block_date_end'];
  80.  
  81. $time1c = $sgpf['signup_block_time_start'];
  82. $time2c = $sgpf['signup_block_time_end'];
  83.  
  84. $start3 = strtotime('$date1c .$time1c.');
  85. $end3 = strtotime('$date2c .$time2c.');
  86. $ssbr = ceil(abs($start3 - $end3) / 3600);
  87. # echo "Total Remaining: ".$ssbr."hours";
  88.  
  89. $start3a = strtotime('$date1c');
  90. $end3a = strtotime('$date2c');
  91. $ssbdr = ceil(abs($start3a - $end3a) / 86400);
  92. # echo "Remaining: ".$ssbdr."days";
  93.  
  94. $start3b = strtotime('$time1c');
  95. $end3b = strtotime('$time2c');
  96. $ssbtr = ceil(abs($start3a - $end3b) / 3600);
  97. # echo "Remaining: ".$ssbtr."hours";
  98.  
  99.  
  100. if ($ssbr <= 0) {
  101. $superSignup = "<a href='/sgpaste/register/plan/".$sgps['plan']."'><img src='/sgpaste/global/images/super_signup.png' alt='Super Signup'/>";
  102. }
  103.  
  104. }
  105. ?>
  106.  
  107. <h1>SGPaste</h1>
  108. <div class="welcome">
  109. Welcome to SGPaste. Notepad is in your hand. Paste anything you want or directly upload your file with Syntax Highlighting. Get a short link to your paste.
  110. </div>
  111. <table cellspacing="3" width="100%">
  112. <tr>
  113. <th>Features</th>
  114. </tr>
  115. <tr class="bold">
  116. <td>&nbsp;</td>
  117. <td colspan="2"><?php echo $sgpf['name'];?></td>
  118. <td colspan="2"><?php echo $sgpp['name'];?></td>
  119. <td colspan="2"><?php echo $sgps['name'];?></td>
  120. </tr>
  121. <tr>
  122. <td>Paste Limit</td>
  123. <td><?php echo $sgpf['paste_limit'];?></td>
  124. <td><?php echo $sgpp['paste_limit'];?></td>
  125. <td><?php echo $sgps['paste_limit'];?></td>
  126. </tr>
  127. <tr>
  128. <td>Available Syntax</td>
  129. <td><?php echo $sgpf['syntax'];?></td>
  130. <td><?php echo $sgpp['syntax'];?></td>
  131. <td><?php echo $sgps['syntax'];?></td>
  132. </tr>
  133.  
  134. <tr>
  135. <td>Direct File Upload</td>
  136. <td><?php echo $sgpf['upload'];?></td>
  137. <td><?php echo $sgpp['upload'];?></td>
  138. <td><?php echo $sgps['upload'];?></td>
  139. </tr>
  140.  
  141. <tr>
  142. <td>Paste Edit/Modification Access</td>
  143. <td><?php echo $sgpf['edit'];?></td>
  144. <td><?php echo $sgpp['edit'];?></td>
  145. <td><?php echo $sgps['edit'];?></td>
  146. </tr>
  147.  
  148. <tr>
  149. <td>Paste Rename Access</td>
  150. <td><?php echo $sgpf['rename'];?></td>
  151. <td><?php echo $sgpp['rename'];?></td>
  152. <td><?php echo $sgps['rename'];?></td>
  153. </tr>
  154.  
  155. <tr>
  156. <td>Paste Delete Access</td>
  157. <td><?php echo $sgpf['delete'];?></td>
  158. <td><?php echo $sgpp['delete'];?></td>
  159. <td><?php echo $sgps['delete'];?></td>
  160. </tr>
  161.  
  162. <tr>
  163. <td>Modification Limit</td>
  164. <td><?php echo $sgpf['mlimit'];?></td>
  165. <td><?php echo $sgpp['mlimit'];?></td>
  166. <td><?php echo $sgps['mlimit'];?></td>
  167. </tr>
  168.  
  169. <tr>
  170. <td>Account Badge</td>
  171. <td><?php echo $sgpf['badge'];?></td>
  172. <td><?php echo $sgpp['badge'];?></td>
  173. <td><?php echo $sgps['badge'];?></td>
  174. </tr>
  175.  
  176. <tr>
  177. <td>Account Fees</td>
  178. <td><?php echo $sgpf['acfees'];?></td>
  179. <td><?php echo $sgpp['acfees'];?></td>
  180. <td><?php echo $sgps['acfees'];?></td>
  181. </tr>
  182.  
  183. <tr>
  184. <td>Monthly Fees</td>
  185. <td><?php echo $sgpf['mfees'];?></td>
  186. <td><?php echo $sgpp['mfees'];?></td>
  187. <td><?php echo $sgps['mfees'];?></td>
  188. </tr>
  189.  
  190. <tr>
  191. <td>Yearly Fees</td>
  192. <td><?php echo $sgpf['yfees'];?></td>
  193. <td><?php echo $sgpp['yfees'];?></td>
  194. <td><?php echo $sgps['yfees'];?></td>
  195. </tr>
  196.  
  197. <tr>
  198. <td>Upgrade Price</td>
  199. <td><?php echo $sgpf['uprice'];?></td>
  200. <td><?php echo $sgpp['uprice'];?></td>
  201. <td><?php echo $sgps['uprice'];?></td>
  202. </tr>
  203.  
  204. <tr>
  205. <td>Signup</td>
  206. <td><?php echo $freeSignup;?></td>
  207. <td><?php echo $premiumSignup;?></td>
  208. <td><?php echo $superSignup;?></td>
  209. </tr>
  210. </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement