Browse Source

Quick store formatting

pjc 5 years ago
parent
commit
ec1bb94c05

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

1
-<?
2
-$Purchase = "1000GiB of upload";
1
+<?php
2
+
3
+$Purchase = "1000 GiB of upload";
3
 $UserID = $LoggedUser['ID'];
4
 $UserID = $LoggedUser['ID'];
4
 $Cost = 1300000;
5
 $Cost = 1300000;
5
 
6
 
8
   FROM users_main
9
   FROM users_main
9
   WHERE ID = $UserID");
10
   WHERE ID = $UserID");
10
 if ($DB->has_results()) {
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
       UPDATE users_main
16
       UPDATE users_main
16
       SET BonusPoints = BonusPoints - $Cost,
17
       SET BonusPoints = BonusPoints - $Cost,
17
           Uploaded    = Uploaded + 1073741824000
18
           Uploaded    = Uploaded + 1073741824000
18
       WHERE ID = $UserID");
19
       WHERE ID = $UserID");
19
-    $DB->query("
20
+        $DB->query("
20
       UPDATE users_info
21
       UPDATE users_info
21
       SET AdminComment = CONCAT('".sqltime()." - Purchased 1000GiB upload from the store\n\n', AdminComment)
22
       SET AdminComment = CONCAT('".sqltime()." - Purchased 1000GiB upload from the store\n\n', AdminComment)
22
       WHERE UserID = $UserID");
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
 View::show_header('Store'); ?>
33
 View::show_header('Store'); ?>
37
     <p><a href="/store.php">Back to Store</a></p>
38
     <p><a href="/store.php">Back to Store</a></p>
38
   </div>
39
   </div>
39
 </div>
40
 </div>
40
-<? View::show_footer(); ?>
41
+<?php View::show_footer(); ?>

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

1
-<?
2
-$Purchase = "100GiB of upload";
1
+<?php
2
+
3
+$Purchase = "100 GiB of upload";
3
 $UserID = $LoggedUser['ID'];
4
 $UserID = $LoggedUser['ID'];
4
 $Cost = 130000;
5
 $Cost = 130000;
5
 
6
 
8
   FROM users_main
9
   FROM users_main
9
   WHERE ID = $UserID");
10
   WHERE ID = $UserID");
10
 if ($DB->has_results()) {
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
       UPDATE users_main
16
       UPDATE users_main
16
       SET BonusPoints = BonusPoints - $Cost,
17
       SET BonusPoints = BonusPoints - $Cost,
17
           Uploaded    = Uploaded + 107374182400
18
           Uploaded    = Uploaded + 107374182400
18
       WHERE ID = $UserID");
19
       WHERE ID = $UserID");
19
-    $DB->query("
20
+        $DB->query("
20
       UPDATE users_info
21
       UPDATE users_info
21
       SET AdminComment = CONCAT('".sqltime()." - Purchased 100GiB upload from the store\n\n', AdminComment)
22
       SET AdminComment = CONCAT('".sqltime()." - Purchased 100GiB upload from the store\n\n', AdminComment)
22
       WHERE UserID = $UserID");
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
 View::show_header('Store'); ?>
33
 View::show_header('Store'); ?>
37
     <p><a href="/store.php">Back to Store</a></p>
38
     <p><a href="/store.php">Back to Store</a></p>
38
   </div>
39
   </div>
39
 </div>
40
 </div>
40
-<? View::show_footer(); ?>
41
+<?php View::show_footer(); ?>

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

1
-<?
2
-$Purchase = "10GiB of upload";
1
+<?php
2
+
3
+$Purchase = "10 GiB of upload";
3
 $UserID = $LoggedUser['ID'];
4
 $UserID = $LoggedUser['ID'];
4
 $Cost = 13000;
5
 $Cost = 13000;
5
 
6
 
8
   FROM users_main
9
   FROM users_main
9
   WHERE ID = $UserID");
10
   WHERE ID = $UserID");
10
 if ($DB->has_results()) {
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
       UPDATE users_main
16
       UPDATE users_main
16
       SET BonusPoints = BonusPoints - $Cost,
17
       SET BonusPoints = BonusPoints - $Cost,
17
           Uploaded    = Uploaded + 10737418240
18
           Uploaded    = Uploaded + 10737418240
18
       WHERE ID = $UserID");
19
       WHERE ID = $UserID");
19
-    $DB->query("
20
+        $DB->query("
20
       UPDATE users_info
21
       UPDATE users_info
21
       SET AdminComment = CONCAT('".sqltime()." - Purchased 10GiB upload from the store\n\n', AdminComment)
22
       SET AdminComment = CONCAT('".sqltime()." - Purchased 10GiB upload from the store\n\n', AdminComment)
22
       WHERE UserID = $UserID");
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
 View::show_header('Store'); ?>
33
 View::show_header('Store'); ?>
37
     <p><a href="/store.php">Back to Store</a></p>
38
     <p><a href="/store.php">Back to Store</a></p>
38
   </div>
39
   </div>
39
 </div>
40
 </div>
40
-<? View::show_footer(); ?>
41
+<?php View::show_footer(); ?>

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

1
-<?
2
-$Purchase = "1GiB of upload";
1
+<?php
2
+
3
+$Purchase = "1 GiB of upload";
3
 $UserID = $LoggedUser['ID'];
4
 $UserID = $LoggedUser['ID'];
4
 $Cost = 1300;
5
 $Cost = 1300;
5
 
6
 
8
   FROM users_main
9
   FROM users_main
9
   WHERE ID = $UserID");
10
   WHERE ID = $UserID");
10
 if ($DB->has_results()) {
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
       UPDATE users_main
16
       UPDATE users_main
16
       SET BonusPoints = BonusPoints - $Cost,
17
       SET BonusPoints = BonusPoints - $Cost,
17
           Uploaded    = Uploaded + 1073741824
18
           Uploaded    = Uploaded + 1073741824
18
       WHERE ID = $UserID");
19
       WHERE ID = $UserID");
19
-    $DB->query("
20
+        $DB->query("
20
       UPDATE users_info
21
       UPDATE users_info
21
       SET AdminComment = CONCAT('".sqltime()." - Purchased 1GiB upload from the store\n\n', AdminComment)
22
       SET AdminComment = CONCAT('".sqltime()." - Purchased 1GiB upload from the store\n\n', AdminComment)
22
       WHERE UserID = $UserID");
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
 View::show_header('Store'); ?>
33
 View::show_header('Store'); ?>
37
     <p><a href="/store.php">Back to Store</a></p>
38
     <p><a href="/store.php">Back to Store</a></p>
38
   </div>
39
   </div>
39
 </div>
40
 </div>
40
-<? View::show_footer(); ?>
41
+<?php View::show_footer(); ?>

Loading…
Cancel
Save