Browse Source

Quick store formatting

pjc 5 years ago
parent
commit
ec1bb94c05

+ 15
- 14
sections/store/upload_1000GB.php View File

@@ -1,5 +1,6 @@
1
-<?
2
-$Purchase = "1000GiB of upload";
1
+<?php
2
+
3
+$Purchase = "1000 GiB of upload";
3 4
 $UserID = $LoggedUser['ID'];
4 5
 $Cost = 1300000;
5 6
 
@@ -8,25 +9,25 @@ $DB->query("
8 9
   FROM users_main
9 10
   WHERE ID = $UserID");
10 11
 if ($DB->has_results()) {
11
-  list($Points) = $DB->next_record();
12
+    list($Points) = $DB->next_record();
12 13
 
13
-  if ($Points >= $Cost) {
14
-    $DB->query("
14
+    if ($Points >= $Cost) {
15
+        $DB->query("
15 16
       UPDATE users_main
16 17
       SET BonusPoints = BonusPoints - $Cost,
17 18
           Uploaded    = Uploaded + 1073741824000
18 19
       WHERE ID = $UserID");
19
-    $DB->query("
20
+        $DB->query("
20 21
       UPDATE users_info
21 22
       SET AdminComment = CONCAT('".sqltime()." - Purchased 1000GiB upload from the store\n\n', AdminComment)
22 23
       WHERE UserID = $UserID");
23
-    $Cache->delete_value('user_info_heavy_'.$UserID);
24
-    $Cache->delete_value('user_stats_'.$UserID);
25
-    $Worked = true;
26
-  } else {
27
-    $Worked = false;
28
-    $ErrMessage = "Not enough points";
29
-  }
24
+        $Cache->delete_value('user_info_heavy_'.$UserID);
25
+        $Cache->delete_value('user_stats_'.$UserID);
26
+        $Worked = true;
27
+    } else {
28
+        $Worked = false;
29
+        $ErrMessage = "Not enough points";
30
+    }
30 31
 }
31 32
 
32 33
 View::show_header('Store'); ?>
@@ -37,4 +38,4 @@ View::show_header('Store'); ?>
37 38
     <p><a href="/store.php">Back to Store</a></p>
38 39
   </div>
39 40
 </div>
40
-<? View::show_footer(); ?>
41
+<?php View::show_footer(); ?>

+ 15
- 14
sections/store/upload_100GB.php View File

@@ -1,5 +1,6 @@
1
-<?
2
-$Purchase = "100GiB of upload";
1
+<?php
2
+
3
+$Purchase = "100 GiB of upload";
3 4
 $UserID = $LoggedUser['ID'];
4 5
 $Cost = 130000;
5 6
 
@@ -8,25 +9,25 @@ $DB->query("
8 9
   FROM users_main
9 10
   WHERE ID = $UserID");
10 11
 if ($DB->has_results()) {
11
-  list($Points) = $DB->next_record();
12
+    list($Points) = $DB->next_record();
12 13
 
13
-  if ($Points >= $Cost) {
14
-    $DB->query("
14
+    if ($Points >= $Cost) {
15
+        $DB->query("
15 16
       UPDATE users_main
16 17
       SET BonusPoints = BonusPoints - $Cost,
17 18
           Uploaded    = Uploaded + 107374182400
18 19
       WHERE ID = $UserID");
19
-    $DB->query("
20
+        $DB->query("
20 21
       UPDATE users_info
21 22
       SET AdminComment = CONCAT('".sqltime()." - Purchased 100GiB upload from the store\n\n', AdminComment)
22 23
       WHERE UserID = $UserID");
23
-    $Cache->delete_value('user_info_heavy_'.$UserID);
24
-    $Cache->delete_value('user_stats_'.$UserID);
25
-    $Worked = true;
26
-  } else {
27
-    $Worked = false;
28
-    $ErrMessage = "Not enough points";
29
-  }
24
+        $Cache->delete_value('user_info_heavy_'.$UserID);
25
+        $Cache->delete_value('user_stats_'.$UserID);
26
+        $Worked = true;
27
+    } else {
28
+        $Worked = false;
29
+        $ErrMessage = "Not enough points";
30
+    }
30 31
 }
31 32
 
32 33
 View::show_header('Store'); ?>
@@ -37,4 +38,4 @@ View::show_header('Store'); ?>
37 38
     <p><a href="/store.php">Back to Store</a></p>
38 39
   </div>
39 40
 </div>
40
-<? View::show_footer(); ?>
41
+<?php View::show_footer(); ?>

+ 15
- 14
sections/store/upload_10GB.php View File

@@ -1,5 +1,6 @@
1
-<?
2
-$Purchase = "10GiB of upload";
1
+<?php
2
+
3
+$Purchase = "10 GiB of upload";
3 4
 $UserID = $LoggedUser['ID'];
4 5
 $Cost = 13000;
5 6
 
@@ -8,25 +9,25 @@ $DB->query("
8 9
   FROM users_main
9 10
   WHERE ID = $UserID");
10 11
 if ($DB->has_results()) {
11
-  list($Points) = $DB->next_record();
12
+    list($Points) = $DB->next_record();
12 13
 
13
-  if ($Points >= $Cost) {
14
-    $DB->query("
14
+    if ($Points >= $Cost) {
15
+        $DB->query("
15 16
       UPDATE users_main
16 17
       SET BonusPoints = BonusPoints - $Cost,
17 18
           Uploaded    = Uploaded + 10737418240
18 19
       WHERE ID = $UserID");
19
-    $DB->query("
20
+        $DB->query("
20 21
       UPDATE users_info
21 22
       SET AdminComment = CONCAT('".sqltime()." - Purchased 10GiB upload from the store\n\n', AdminComment)
22 23
       WHERE UserID = $UserID");
23
-    $Cache->delete_value('user_info_heavy_'.$UserID);
24
-    $Cache->delete_value('user_stats_'.$UserID);
25
-    $Worked = true;
26
-  } else {
27
-    $Worked = false;
28
-    $ErrMessage = "Not enough points";
29
-  }
24
+        $Cache->delete_value('user_info_heavy_'.$UserID);
25
+        $Cache->delete_value('user_stats_'.$UserID);
26
+        $Worked = true;
27
+    } else {
28
+        $Worked = false;
29
+        $ErrMessage = "Not enough points";
30
+    }
30 31
 }
31 32
 
32 33
 View::show_header('Store'); ?>
@@ -37,4 +38,4 @@ View::show_header('Store'); ?>
37 38
     <p><a href="/store.php">Back to Store</a></p>
38 39
   </div>
39 40
 </div>
40
-<? View::show_footer(); ?>
41
+<?php View::show_footer(); ?>

+ 15
- 14
sections/store/upload_1GB.php View File

@@ -1,5 +1,6 @@
1
-<?
2
-$Purchase = "1GiB of upload";
1
+<?php
2
+
3
+$Purchase = "1 GiB of upload";
3 4
 $UserID = $LoggedUser['ID'];
4 5
 $Cost = 1300;
5 6
 
@@ -8,25 +9,25 @@ $DB->query("
8 9
   FROM users_main
9 10
   WHERE ID = $UserID");
10 11
 if ($DB->has_results()) {
11
-  list($Points) = $DB->next_record();
12
+    list($Points) = $DB->next_record();
12 13
 
13
-  if ($Points >= $Cost) {
14
-    $DB->query("
14
+    if ($Points >= $Cost) {
15
+        $DB->query("
15 16
       UPDATE users_main
16 17
       SET BonusPoints = BonusPoints - $Cost,
17 18
           Uploaded    = Uploaded + 1073741824
18 19
       WHERE ID = $UserID");
19
-    $DB->query("
20
+        $DB->query("
20 21
       UPDATE users_info
21 22
       SET AdminComment = CONCAT('".sqltime()." - Purchased 1GiB upload from the store\n\n', AdminComment)
22 23
       WHERE UserID = $UserID");
23
-    $Cache->delete_value('user_info_heavy_'.$UserID);
24
-    $Cache->delete_value('user_stats_'.$UserID);
25
-    $Worked = true;
26
-  } else {
27
-    $Worked = false;
28
-    $ErrMessage = "Not enough points";
29
-  }
24
+        $Cache->delete_value('user_info_heavy_'.$UserID);
25
+        $Cache->delete_value('user_stats_'.$UserID);
26
+        $Worked = true;
27
+    } else {
28
+        $Worked = false;
29
+        $ErrMessage = "Not enough points";
30
+    }
30 31
 }
31 32
 
32 33
 View::show_header('Store'); ?>
@@ -37,4 +38,4 @@ View::show_header('Store'); ?>
37 38
     <p><a href="/store.php">Back to Store</a></p>
38 39
   </div>
39 40
 </div>
40
-<? View::show_footer(); ?>
41
+<?php View::show_footer(); ?>

Loading…
Cancel
Save