Browse Source

Generalize bonus points to be easily renamed

spaghetti 8 years ago
parent
commit
fe9cb0641d

+ 3
- 0
classes/config.template View File

18
   'https://tracker4.'.SITE_DOMAIN.':34001'
18
   'https://tracker4.'.SITE_DOMAIN.':34001'
19
 ]]);
19
 ]]);
20
 
20
 
21
+// Name for bonus points currency
22
+define('BONUS_POINTS', 'Nips');
23
+
21
 // Don't hard code API keys for services
24
 // Don't hard code API keys for services
22
 define('API_KEYS', ['ANIDB' => 'AAAAAAAAAAAAAAAA']);
25
 define('API_KEYS', ['ANIDB' => 'AAAAAAAAAAAAAAAA']);
23
 
26
 

+ 1
- 1
classes/users.class.php View File

161
           i.DisableWiki,
161
           i.DisableWiki,
162
           i.DisableAvatar,
162
           i.DisableAvatar,
163
           i.DisablePM,
163
           i.DisablePM,
164
-          i.DisableNips,
164
+          i.DisablePoints,
165
           i.DisablePromotion,
165
           i.DisablePromotion,
166
           i.DisableRequests,
166
           i.DisableRequests,
167
           i.DisableForums,
167
           i.DisableForums,

+ 1
- 1
design/privateheader.php View File

337
 <?  }
337
 <?  }
338
 ?>
338
 ?>
339
           <li id="bonus_points">
339
           <li id="bonus_points">
340
-            <a href="wiki.php?action=article&amp;id=8">Nips</a>:
340
+            <a href="wiki.php?action=article&amp;id=8"><?=BONUS_POINTS?></a>:
341
             <span class="stat">
341
             <span class="stat">
342
               <a href="store.php"><?=number_format(G::$LoggedUser['BonusPoints'])?></a>
342
               <a href="store.php"><?=number_format(G::$LoggedUser['BonusPoints'])?></a>
343
             </span>
343
             </span>

+ 1
- 1
gazelle.sql View File

1476
   `DisableUpload` enum('0','1') NOT NULL DEFAULT '0',
1476
   `DisableUpload` enum('0','1') NOT NULL DEFAULT '0',
1477
   `DisableWiki` enum('0','1') NOT NULL DEFAULT '0',
1477
   `DisableWiki` enum('0','1') NOT NULL DEFAULT '0',
1478
   `DisablePM` enum('0','1') NOT NULL DEFAULT '0',
1478
   `DisablePM` enum('0','1') NOT NULL DEFAULT '0',
1479
-  `DisableNips` enum('0','1') NOT NULL DEFAULT '0',
1479
+  `DisablePoints` enum('0','1') NOT NULL DEFAULT '0',
1480
   `RatioWatchEnds` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
1480
   `RatioWatchEnds` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
1481
   `RatioWatchDownload` bigint(20) unsigned NOT NULL DEFAULT '0',
1481
   `RatioWatchDownload` bigint(20) unsigned NOT NULL DEFAULT '0',
1482
   `RatioWatchTimes` tinyint(1) unsigned NOT NULL DEFAULT '0',
1482
   `RatioWatchTimes` tinyint(1) unsigned NOT NULL DEFAULT '0',

+ 1
- 1
sections/schedule/hourly/bonus_points.php View File

14
   LEFT JOIN xbt_snatched AS xs ON x.uid=xs.uid AND x.fid=xs.fid
14
   LEFT JOIN xbt_snatched AS xs ON x.uid=xs.uid AND x.fid=xs.fid
15
   WHERE
15
   WHERE
16
     um.Enabled = '1'
16
     um.Enabled = '1'
17
-    AND i.DisableNips = '0'
17
+    AND i.DisablePoints = '0'
18
     AND x.active = 1
18
     AND x.active = 1
19
     AND x.completed = 0
19
     AND x.completed = 0
20
     AND x.Remaining = 0
20
     AND x.Remaining = 0

+ 1
- 1
sections/store/100k_points.php View File

17
       WHERE ID = $UserID");
17
       WHERE ID = $UserID");
18
     $DB->query("
18
     $DB->query("
19
       UPDATE users_info
19
       UPDATE users_info
20
-      SET AdminComment = CONCAT('".sqltime()." - Purchased 100,000 Nips from the store\n\n', AdminComment)
20
+      SET AdminComment = CONCAT('".sqltime()." - Purchased 100,000 ".BONUS_POINTS." from the store\n\n', AdminComment)
21
       WHERE UserID = $UserID");
21
       WHERE UserID = $UserID");
22
     $Cache->delete_value('user_info_heavy_'.$UserID);
22
     $Cache->delete_value('user_info_heavy_'.$UserID);
23
     $Cache->delete_value('user_stats_'.$UserID);
23
     $Cache->delete_value('user_stats_'.$UserID);

+ 1
- 1
sections/store/10k_points.php View File

17
       WHERE ID = $UserID");
17
       WHERE ID = $UserID");
18
     $DB->query("
18
     $DB->query("
19
       UPDATE users_info
19
       UPDATE users_info
20
-      SET AdminComment = CONCAT('".sqltime()." - Purchased 10,000 Nips from the store\n\n', AdminComment)
20
+      SET AdminComment = CONCAT('".sqltime()." - Purchased 10,000 ".BONUS_POINTS." from the store\n\n', AdminComment)
21
       WHERE UserID = $UserID");
21
       WHERE UserID = $UserID");
22
     $Cache->delete_value('user_info_heavy_'.$UserID);
22
     $Cache->delete_value('user_info_heavy_'.$UserID);
23
     $Cache->delete_value('user_stats_'.$UserID);
23
     $Cache->delete_value('user_stats_'.$UserID);

+ 1
- 1
sections/store/1k_points.php View File

17
       WHERE ID = $UserID");
17
       WHERE ID = $UserID");
18
     $DB->query("
18
     $DB->query("
19
       UPDATE users_info
19
       UPDATE users_info
20
-      SET AdminComment = CONCAT('".sqltime()." - Purchased 1,000 Nips from the store\n\n', AdminComment)
20
+      SET AdminComment = CONCAT('".sqltime()." - Purchased 1,000 ".BONUS_POINTS." from the store\n\n', AdminComment)
21
       WHERE UserID = $UserID");
21
       WHERE UserID = $UserID");
22
     $Cache->delete_value('user_info_heavy_'.$UserID);
22
     $Cache->delete_value('user_info_heavy_'.$UserID);
23
     $Cache->delete_value('user_stats_'.$UserID);
23
     $Cache->delete_value('user_stats_'.$UserID);

+ 1
- 1
sections/store/1m_points.php View File

19
       WHERE ID = $UserID");
19
       WHERE ID = $UserID");
20
     $DB->query("
20
     $DB->query("
21
       UPDATE users_info
21
       UPDATE users_info
22
-      SET AdminComment = CONCAT('".sqltime()." - Purchased 1,000,000 Nips from the store\n\n', AdminComment)
22
+      SET AdminComment = CONCAT('".sqltime()." - Purchased 1,000,000 ".BONUS_POINTS."s from the store\n\n', AdminComment)
23
       WHERE UserID = $UserID");
23
       WHERE UserID = $UserID");
24
     $Cache->delete_value('user_info_heavy_'.$UserID);
24
     $Cache->delete_value('user_info_heavy_'.$UserID);
25
     $Cache->delete_value('user_stats_'.$UserID);
25
     $Cache->delete_value('user_stats_'.$UserID);

+ 1
- 1
sections/store/badge.php View File

39
         $Cache->delete_value("user_info_heavy_$UserID");
39
         $Cache->delete_value("user_info_heavy_$UserID");
40
       }
40
       }
41
     } else {
41
     } else {
42
-      $Err = 'Not enough Nips.';
42
+      $Err = 'Not enough '.BONUS_POINTS.'.';
43
     }
43
     }
44
   }
44
   }
45
 }
45
 }

+ 2
- 2
sections/store/capture_user.php View File

75
       <form action="store.php" method="POST">
75
       <form action="store.php" method="POST">
76
         <input type="hidden" name="item" value="capture_user">
76
         <input type="hidden" name="item" value="capture_user">
77
         <strong>
77
         <strong>
78
-          Enter the name of the user you want to capture and the nips you want to spend
78
+        Enter the name of the user you want to capture and the <?=BONUS_POINTS?> you want to spend
79
         </strong>
79
         </strong>
80
         <br>
80
         <br>
81
         <input type="text" name="target_name" placeholder="Username">
81
         <input type="text" name="target_name" placeholder="Username">
82
-        <input type="text" name="amount" placeholder="Nips">
82
+        <input type="text" name="amount" placeholder="<?=BONUS_POINTS?>">
83
         <input type="submit">
83
         <input type="submit">
84
       </form>
84
       </form>
85
       <p><a href="/store.php">Back to Store</a></p>
85
       <p><a href="/store.php">Back to Store</a></p>

+ 2
- 2
sections/store/freeleechpool.php View File

84
   <div class="thin">
84
   <div class="thin">
85
     <h2 id="general">Donation Successful</h2>
85
     <h2 id="general">Donation Successful</h2>
86
     <div class="box pad" style="padding: 10px 10px 10px 20px;">
86
     <div class="box pad" style="padding: 10px 10px 10px 20px;">
87
-      <p>You donated <?=number_format($Donation)?> nips to the Freeleech Pool</p>
87
+      <p>You donated <?=number_format($Donation)?> <?=BONUS_POINTS?> to the Freeleech Pool</p>
88
 <? if ($PoolTipped) { ?>
88
 <? if ($PoolTipped) { ?>
89
       <p>Your donation triggered a freeleech!</p>
89
       <p>Your donation triggered a freeleech!</p>
90
 <? } ?>
90
 <? } ?>
111
       <form action="store.php" method="POST">
111
       <form action="store.php" method="POST">
112
         <input type="hidden" name="item" value="freeleechpool">
112
         <input type="hidden" name="item" value="freeleechpool">
113
         <strong>
113
         <strong>
114
-        There are currently <?=number_format($Pool)?> nips in the Freeleech Pool
114
+        There are currently <?=number_format($Pool)?> <?=BONUS_POINTS?> in the Freeleech Pool
115
         </strong>
115
         </strong>
116
         <br><br>
116
         <br><br>
117
         <input type="text" name="donation" value="">
117
         <input type="text" name="donation" value="">

+ 2
- 2
sections/store/index.php View File

1
 <?
1
 <?
2
 enforce_login();
2
 enforce_login();
3
 
3
 
4
-if ($LoggedUser['DisableNips']) {
4
+if ($LoggedUser['DisablePoints']) {
5
   View::show_header('Store'); ?>
5
   View::show_header('Store'); ?>
6
   <div class='thin'>
6
   <div class='thin'>
7
     <h2 id='general'>Denied</h2>
7
     <h2 id='general'>Denied</h2>
8
     <div class='box pad' style='padding: 10px 10px 10px 20px;'>
8
     <div class='box pad' style='padding: 10px 10px 10px 20px;'>
9
-      <p>You are not allowed to spend nips.</p>
9
+    <p>You are not allowed to spend <?=BONUS_POINTS?>.</p>
10
     </div>
10
     </div>
11
   </div>
11
   </div>
12
   <? View::show_footer();
12
   <? View::show_footer();

+ 24
- 24
sections/store/promotion.php View File

5
 $Classes = array(
5
 $Classes = array(
6
   MEMBER => array(
6
   MEMBER => array(
7
     'Name'        => 'Modest Mounds', // name
7
     'Name'        => 'Modest Mounds', // name
8
-    'Price'        => 1000, // cost in nips
9
-    'MinUpload'    => 10, // minimum upload in GiB
10
-    'MinDownload'  => 1, // minimum download in GiB
8
+    'Price'       => 1000, // cost in points
9
+    'MinUpload'   => 10, // minimum upload in GiB
10
+    'MinDownload' => 1, // minimum download in GiB
11
     'MinUploads'  => 0, // minimum upload count
11
     'MinUploads'  => 0, // minimum upload count
12
-    'NonSmall'     => 0, // must have at least this many non-doujin torrents or doujins with more than 50 pages
12
+    'NonSmall'    => 0, // must have at least this many non-doujin torrents or doujins with more than 50 pages
13
     'MinRatio'    => 0.7, // minimum ratio
13
     'MinRatio'    => 0.7, // minimum ratio
14
     'TorUnique'   => false // do the uploads have to be unique groups?
14
     'TorUnique'   => false // do the uploads have to be unique groups?
15
   ),
15
   ),
16
   POWER => array(
16
   POWER => array(
17
     'Name'        => 'Well Endowed',
17
     'Name'        => 'Well Endowed',
18
-    'Price'        => 10000,
19
-    'MinUpload'    => 100,
20
-    'MinDownload'  => 25,
18
+    'Price'       => 10000,
19
+    'MinUpload'   => 100,
20
+    'MinDownload' => 25,
21
     'MinUploads'  => 10,
21
     'MinUploads'  => 10,
22
-    'NonSmall'     => 2,
22
+    'NonSmall'    => 2,
23
     'MinRatio'    => 1.1,
23
     'MinRatio'    => 1.1,
24
-    'TorUnique'    => false
24
+    'TorUnique'   => false
25
   ),
25
   ),
26
   ELITE => array(
26
   ELITE => array(
27
     'Name'        => 'Bombshell',
27
     'Name'        => 'Bombshell',
28
-    'Price'        => 30000,
29
-    'MinUpload'    => 500,
30
-    'MinDownload'  => 100,
28
+    'Price'       => 30000,
29
+    'MinUpload'   => 500,
30
+    'MinDownload' => 100,
31
     'MinUploads'  => 50,
31
     'MinUploads'  => 50,
32
-    'NonSmall'     => 12,
32
+    'NonSmall'    => 12,
33
     'MinRatio'    => 1.2,
33
     'MinRatio'    => 1.2,
34
-    'TorUnique'    => false
34
+    'TorUnique'   => false
35
   ),
35
   ),
36
   TORRENT_MASTER => array(
36
   TORRENT_MASTER => array(
37
     'Name'        => 'Top Heavy',
37
     'Name'        => 'Top Heavy',
38
-    'Price'        => 60000,
39
-    'MinUpload'    => 1024,
40
-    'MinDownload'  => 250,
38
+    'Price'       => 60000,
39
+    'MinUpload'   => 1024,
40
+    'MinDownload' => 250,
41
     'MinUploads'  => 250,
41
     'MinUploads'  => 250,
42
-    'NonSmall'     => 60,
42
+    'NonSmall'    => 60,
43
     'MinRatio'    => 1.3,
43
     'MinRatio'    => 1.3,
44
-    'TorUnique'    => false
44
+    'TorUnique'   => false
45
   ),
45
   ),
46
   POWER_TM => array(
46
   POWER_TM => array(
47
     'Name'        => 'Titty Monster',
47
     'Name'        => 'Titty Monster',
48
-    'Price'        => 100000,
49
-    'MinUpload'    => 1.5*1024,
50
-    'MinDownload'  => 500,
48
+    'Price'       => 100000,
49
+    'MinUpload'   => 1.5*1024,
50
+    'MinDownload' => 500,
51
     'MinUploads'  => 500,
51
     'MinUploads'  => 500,
52
-    'NonSmall'     => 160,
52
+    'NonSmall'    => 160,
53
     'MinRatio'    => 1.5,
53
     'MinRatio'    => 1.5,
54
-    'TorUnique'    => true
54
+    'TorUnique'   => true
55
   )
55
   )
56
 );
56
 );
57
 
57
 

+ 23
- 23
sections/store/store.php View File

2
 $UserID = $LoggedUser['ID'];
2
 $UserID = $LoggedUser['ID'];
3
 $PermID = $LoggedUser['PermissionID'];
3
 $PermID = $LoggedUser['PermissionID'];
4
 
4
 
5
-if (!$LoggedUser['DisableNips']) {
5
+if (!$LoggedUser['DisablePoints']) {
6
   $PointsRate = 0.5;
6
   $PointsRate = 0.5;
7
   $getTorrents = $DB->query("
7
   $getTorrents = $DB->query("
8
     SELECT COUNT(DISTINCT x.fid) AS Torrents,
8
     SELECT COUNT(DISTINCT x.fid) AS Torrents,
26
     $PointsRate += (0.55*($NumTorr * (sqrt(($TSize/$NumTorr)/1073741824) * pow(1.5,($TTime/$NumTorr)/(24*365))))) / (max(1, sqrt(($TSeeds/$NumTorr)+4)/3));
26
     $PointsRate += (0.55*($NumTorr * (sqrt(($TSize/$NumTorr)/1073741824) * pow(1.5,($TTime/$NumTorr)/(24*365))))) / (max(1, sqrt(($TSeeds/$NumTorr)+4)/3));
27
   }
27
   }
28
   $PointsRate = intval($PointsRate**0.95);
28
   $PointsRate = intval($PointsRate**0.95);
29
-  $PointsPerHour = number_format($PointsRate) . " nips/hour";
30
-  $PointsPerDay = number_format($PointsRate*24) . " nips/day";
29
+  $PointsPerHour = number_format($PointsRate) . " ".BONUS_POINTS."/hour";
30
+  $PointsPerDay = number_format($PointsRate*24) . " ".BONUS_POINTS."/day";
31
 } else {
31
 } else {
32
-  $PointsPerHour = "0 nips/hour";
33
-  $PointsPerDay = "Nips disabled";
32
+  $PointsPerHour = "0 ".BONUS_POINTS."/hour";
33
+  $PointsPerDay = BONUS_POINTS." disabled";
34
 }
34
 }
35
 
35
 
36
 //Include the header
36
 //Include the header
39
 <div class="thin">
39
 <div class="thin">
40
   <h2 id="general">Store</h2>
40
   <h2 id="general">Store</h2>
41
   <div class="box pad">
41
   <div class="box pad">
42
-    <h3 id="lists" style="float: left;">You have <?=number_format($LoggedUser['BonusPoints'])?> nips to spend</h3>
42
+    <h3 id="lists" style="float: left;">You have <?=number_format($LoggedUser['BonusPoints'])?> <?=BONUS_POINTS?> to spend</h3>
43
     <h3 id="lists" style="float: right;">You're making <?=$PointsPerHour?> (<?=$PointsPerDay?>)</h3>
43
     <h3 id="lists" style="float: right;">You're making <?=$PointsPerHour?> (<?=$PointsPerDay?>)</h3>
44
     <table width="100%" class="store_table">
44
     <table width="100%" class="store_table">
45
       <tr class="colhead">
45
       <tr class="colhead">
52
           <a href="store.php?item=upload_1GB">1GiB Upload</a>
52
           <a href="store.php?item=upload_1GB">1GiB Upload</a>
53
         </td>
53
         </td>
54
         <td class="nobr">
54
         <td class="nobr">
55
-          1,000 nips
55
+          1,000 <?=BONUS_POINTS?>
56
         </td>
56
         </td>
57
         <td class="nobr">
57
         <td class="nobr">
58
           Purchase 1GiB of upload
58
           Purchase 1GiB of upload
63
           <a href="store.php?item=upload_10GB">10GiB Upload</a>
63
           <a href="store.php?item=upload_10GB">10GiB Upload</a>
64
         </td>
64
         </td>
65
         <td class="nobr">
65
         <td class="nobr">
66
-          10,000 nips
66
+          10,000 <?=BONUS_POINTS?>
67
         </td>
67
         </td>
68
         <td class="nobr">
68
         <td class="nobr">
69
           Purchase 10GiB of upload
69
           Purchase 10GiB of upload
74
           <a href="store.php?item=upload_100GB">100GiB Upload</a>
74
           <a href="store.php?item=upload_100GB">100GiB Upload</a>
75
         </td>
75
         </td>
76
         <td class="nobr">
76
         <td class="nobr">
77
-          100,000 nips
77
+          100,000 <?=BONUS_POINTS?>
78
         </td>
78
         </td>
79
         <td class="nobr">
79
         <td class="nobr">
80
           Purchase 100GiB of upload
80
           Purchase 100GiB of upload
85
           <a href="store.php?item=upload_1000GB">1,000GiB Upload</a>
85
           <a href="store.php?item=upload_1000GB">1,000GiB Upload</a>
86
         </td>
86
         </td>
87
         <td class="nobr">
87
         <td class="nobr">
88
-          1,000,000 nips
88
+          1,000,000 <?=BONUS_POINTS?>
89
         </td>
89
         </td>
90
         <td class="nobr">
90
         <td class="nobr">
91
           Purchase 1,000GiB of upload
91
           Purchase 1,000GiB of upload
93
       </tr>
93
       </tr>
94
       <tr class="row">
94
       <tr class="row">
95
         <td class="nobr">
95
         <td class="nobr">
96
-          <a href="store.php?item=1k_points">1,000 nips</a>
96
+          <a href="store.php?item=1k_points">1,000 <?=BONUS_POINTS?></a>
97
         </td>
97
         </td>
98
         <td class="nobr">
98
         <td class="nobr">
99
           1GiB Upload
99
           1GiB Upload
100
         </td>
100
         </td>
101
         <td class="nobr">
101
         <td class="nobr">
102
-          Purchase 1,000 nips
102
+          Purchase 1,000 <?=BONUS_POINTS?>
103
         </td>
103
         </td>
104
       </tr>
104
       </tr>
105
       <tr class="row">
105
       <tr class="row">
106
         <td class="nobr">
106
         <td class="nobr">
107
-          <a href="store.php?item=10k_points">10,000 nips</a>
107
+          <a href="store.php?item=10k_points">10,000 <?=BONUS_POINTS?></a>
108
         </td>
108
         </td>
109
         <td class="nobr">
109
         <td class="nobr">
110
           10GiB Upload
110
           10GiB Upload
111
         </td>
111
         </td>
112
         <td class="nobr">
112
         <td class="nobr">
113
-          Purchase 10,000 nips
113
+          Purchase 10,000 <?=BONUS_POINTS?>
114
         </td>
114
         </td>
115
       </tr>
115
       </tr>
116
       <tr class="row">
116
       <tr class="row">
117
         <td class="nobr">
117
         <td class="nobr">
118
-          <a href="store.php?item=100k_points">100,000 nips</a>
118
+          <a href="store.php?item=100k_points">100,000 <?=BONUS_POINTS?></a>
119
         </td>
119
         </td>
120
         <td class="nobr">
120
         <td class="nobr">
121
           100GiB Upload
121
           100GiB Upload
122
         </td>
122
         </td>
123
         <td class="nobr">
123
         <td class="nobr">
124
-          Purchase 100,000 nips
124
+          Purchase 100,000 <?=BONUS_POINTS?>
125
         </td>
125
         </td>
126
       </tr>
126
       </tr>
127
       <tr class="row">
127
       <tr class="row">
128
         <td class="nobr">
128
         <td class="nobr">
129
-          <a href="store.php?item=1m_points">1,000,000 nips</a>
129
+          <a href="store.php?item=1m_points">1,000,000 <?=BONUS_POINTS?></a>
130
         </td>
130
         </td>
131
         <td class="nobr">
131
         <td class="nobr">
132
           1,000GiB Upload
132
           1,000GiB Upload
133
         </td>
133
         </td>
134
         <td class="nobr">
134
         <td class="nobr">
135
-          Purchase 1,000,000 nips
135
+          Purchase 1,000,000 <?=BONUS_POINTS?>
136
         </td>
136
         </td>
137
       </tr>
137
       </tr>
138
       <tr class="row">
138
       <tr class="row">
140
           <a href="store.php?item=freeleechize">Freeleechize</a>
140
           <a href="store.php?item=freeleechize">Freeleechize</a>
141
         </td>
141
         </td>
142
         <td class="nobr">
142
         <td class="nobr">
143
-          20,000 nips
143
+          20,000 <?=BONUS_POINTS?>
144
         </td>
144
         </td>
145
         <td class="nobr">
145
         <td class="nobr">
146
           Make a torrent freeleech (to everyone) for 24 hours
146
           Make a torrent freeleech (to everyone) for 24 hours
151
           <a href="store.php?item=title">Custom Title</a>
151
           <a href="store.php?item=title">Custom Title</a>
152
         </td>
152
         </td>
153
         <td class="nobr">
153
         <td class="nobr">
154
-          50,000 nips
154
+          50,000 <?=BONUS_POINTS?>
155
         </td>
155
         </td>
156
         <td class="nobr">
156
         <td class="nobr">
157
           Purchase a custom title
157
           Purchase a custom title
162
           <a href="store.php?item=invite">Invite</a>
162
           <a href="store.php?item=invite">Invite</a>
163
         </td>
163
         </td>
164
         <td class="nobr">
164
         <td class="nobr">
165
-          100,000 nips
165
+          100,000 <?=BONUS_POINTS?>
166
         </td>
166
         </td>
167
         <td class="nobr">
167
         <td class="nobr">
168
           Purchase an invite for your friend
168
           Purchase an invite for your friend
191
           <a href="store.php?item=promotion">Promotion</a>
191
           <a href="store.php?item=promotion">Promotion</a>
192
         </td>
192
         </td>
193
         <td class="nobr">
193
         <td class="nobr">
194
-        <?=$To[1]?> nips
194
+        <?=$To[1]." ".BONUS_POINTS?>
195
         </td>
195
         </td>
196
         <td class="nobr">
196
         <td class="nobr">
197
           Get promoted to <?=$To[0]?>
197
           Get promoted to <?=$To[0]?>
203
           <a href="store.php?item=become_admin">Become Admin</a>
203
           <a href="store.php?item=become_admin">Become Admin</a>
204
         </td>
204
         </td>
205
         <td class="nobr">
205
         <td class="nobr">
206
-          4,294,967,296 nips
206
+          4,294,967,296 <?=BONUS_POINTS?>
207
         </td>
207
         </td>
208
         <td class="nobr">
208
         <td class="nobr">
209
           Have your class changed to Sysop
209
           Have your class changed to Sysop

+ 1
- 1
sections/store/token.php View File

23
     $Worked = true;
23
     $Worked = true;
24
   } else {
24
   } else {
25
     $Worked = false;
25
     $Worked = false;
26
-    $ErrMessage = "Not enough Nips.";
26
+    $ErrMessage = "Not enough ".BONUS_POINTS.".";
27
   }
27
   }
28
 }
28
 }
29
 
29
 

+ 2
- 2
sections/user/index.php View File

95
     break;
95
     break;
96
   case 'take_update_rank':
96
   case 'take_update_rank':
97
     break;
97
     break;
98
-  case 'nips':
99
-    include(SERVER_ROOT.'/sections/user/nips.php');
98
+  case 'points':
99
+    include(SERVER_ROOT.'/sections/user/points.php');
100
     break;
100
     break;
101
   default:
101
   default:
102
     if (isset($_REQUEST['id'])) {
102
     if (isset($_REQUEST['id'])) {

sections/user/nips.php → sections/user/points.php View File

8
 // 10% tax
8
 // 10% tax
9
 $Tax = 0.1;
9
 $Tax = 0.1;
10
 
10
 
11
-if ($LoggedUser['DisableNips']) {
12
-  $Err = 'You are not allowed to send nips.';
11
+if ($LoggedUser['DisablePoints']) {
12
+  $Err = 'You are not allowed to send '.BONUS_POINTS.'.';
13
 } else {
13
 } else {
14
   if ($Adjust)
14
   if ($Adjust)
15
     $Amount = $Amount/(1-$Tax);
15
     $Amount = $Amount/(1-$Tax);
19
   $Amount = (int) $Amount;
19
   $Amount = (int) $Amount;
20
 
20
 
21
   if ($UserID == $To) {
21
   if ($UserID == $To) {
22
-    $Err = 'If you sent nips to yourself it wouldn\'t even do anything. Stop that.';
22
+    $Err = 'If you sent '.BONUS_POINTS.' to yourself it wouldn\'t even do anything. Stop that.';
23
   } elseif ($Amount < 0) {
23
   } elseif ($Amount < 0) {
24
-    $Err = 'You can\'t a negative amount you shitter.';
24
+    $Err = 'You can\'t send a negative amount of '.BONUS_POINTS.'.';
25
   } elseif ($Amount < 100) {
25
   } elseif ($Amount < 100) {
26
-    $Err = 'You must send at least 100 Nips.';
26
+    $Err = 'You must send at least 100 '.BONUS_POINTS.'.';
27
   } else {
27
   } else {
28
     $DB->query("
28
     $DB->query("
29
-      SELECT ui.DisableNips
29
+      SELECT ui.DisablePoints
30
       FROM users_main AS um
30
       FROM users_main AS um
31
         JOIN users_info AS ui ON um.ID = ui.UserID
31
         JOIN users_info AS ui ON um.ID = ui.UserID
32
       WHERE ID = $To");
32
       WHERE ID = $To");
35
     } else {
35
     } else {
36
       list($Disabled) = $DB->next_record();
36
       list($Disabled) = $DB->next_record();
37
       if ($Disabled) {
37
       if ($Disabled) {
38
-        $Err = "This user is not allowed to receive nips.";
38
+        $Err = "This user is not allowed to receive ".BONUS_POINTS.".";
39
       } else {
39
       } else {
40
         $DB->query("
40
         $DB->query("
41
           SELECT BonusPoints
41
           SELECT BonusPoints
45
           list($BP) = $DB->next_record();
45
           list($BP) = $DB->next_record();
46
 
46
 
47
           if ($BP < $Amount) {
47
           if ($BP < $Amount) {
48
-            $Err = 'You don\'t have enough Nips.';
48
+            $Err = 'You don\'t have enough '.BONUS_POINTS.'.';
49
           } else {
49
           } else {
50
             $DB->query("
50
             $DB->query("
51
               UPDATE users_main
51
               UPDATE users_main
61
 
61
 
62
             $DB->query("
62
             $DB->query("
63
               UPDATE users_info
63
               UPDATE users_info
64
-              SET AdminComment = CONCAT('".sqltime()." - Sent $Amount Nips (".$SentAmount." after tax) to [user]".$ToInfo['Username']."[/user]\n\n', AdminComment)
64
+              SET AdminComment = CONCAT('".sqltime()." - Sent $Amount ".BONUS_POINTS." (".$SentAmount." after tax) to [user]".$ToInfo['Username']."[/user]\n\n', AdminComment)
65
               WHERE UserID = $UserID");
65
               WHERE UserID = $UserID");
66
             $DB->query("
66
             $DB->query("
67
               UPDATE users_info
67
               UPDATE users_info
68
-              SET AdminComment = CONCAT('".sqltime()." - Received ".$SentAmount." Nips from [user]".$UserInfo['Username']."[/user]\n\n', AdminComment)
68
+              SET AdminComment = CONCAT('".sqltime()." - Received ".$SentAmount." ".BONUS_POINTS." from [user]".$UserInfo['Username']."[/user]\n\n', AdminComment)
69
               WHERE UserID = $To");
69
               WHERE UserID = $To");
70
 
70
 
71
-            $PM = '[user]'.$UserInfo['Username'].'[/user] has sent you a gift of '.$SentAmount.' Nips!';
71
+            $PM = '[user]'.$UserInfo['Username'].'[/user] has sent you a gift of '.$SentAmount.' '.BONUS_POINTS.'!';
72
 
72
 
73
             if (!empty($Message)) {
73
             if (!empty($Message)) {
74
               $PM .= "\n\n".'[quote='.$UserInfo['Username'].']'.$Message.'[/quote]';
74
               $PM .= "\n\n".'[quote='.$UserInfo['Username'].']'.$Message.'[/quote]';
89
   }
89
   }
90
 }
90
 }
91
 
91
 
92
-View::show_header('Send Nips'); ?>
92
+View::show_header('Send '.BONUS_POINTS); ?>
93
 <div class='thin'>
93
 <div class='thin'>
94
-  <h2 id='general'>Send Nips</h2>
94
+  <h2 id='general'>Send <?=BONUS_POINTS?></h2>
95
   <div class='box pad' style='padding: 10px 10px 10px 20p;'>
95
   <div class='box pad' style='padding: 10px 10px 10px 20p;'>
96
-    <p><?=$Err?'Error: '.$Err:'Sent '.$Amount.' Nips ('.$SentAmount.' after tax) to '.$ToInfo['Username'].'.'?></p>
96
+    <p><?=$Err?'Error: '.$Err:'Sent '.$Amount.' '.BONUS_POINTS.' ('.$SentAmount.' after tax) to '.$ToInfo['Username'].'.'?></p>
97
     <p><a href='/user.php?id=<?=$To?>'>Return</a></p>
97
     <p><a href='/user.php?id=<?=$To?>'>Return</a></p>
98
   </div>
98
   </div>
99
 </div>
99
 </div>

+ 7
- 7
sections/user/takemoderate.php View File

77
 $DisableUpload = isset($_POST['DisableUpload']) ? 1 : 0;
77
 $DisableUpload = isset($_POST['DisableUpload']) ? 1 : 0;
78
 $DisableWiki = isset($_POST['DisableWiki']) ? 1 : 0;
78
 $DisableWiki = isset($_POST['DisableWiki']) ? 1 : 0;
79
 $DisablePM = isset($_POST['DisablePM']) ? 1 : 0;
79
 $DisablePM = isset($_POST['DisablePM']) ? 1 : 0;
80
-$DisableNips = isset($_POST['DisableNips']) ? 1 : 0;
80
+$DisablePoints = isset($_POST['DisablePoints']) ? 1 : 0;
81
 $DisablePromotion = isset($_POST['DisablePromotion']) ? 1 : 0;
81
 $DisablePromotion = isset($_POST['DisablePromotion']) ? 1 : 0;
82
 $DisableIRC = isset($_POST['DisableIRC']) ? 1 : 0;
82
 $DisableIRC = isset($_POST['DisableIRC']) ? 1 : 0;
83
 $DisableRequests = isset($_POST['DisableRequests']) ? 1 : 0;
83
 $DisableRequests = isset($_POST['DisableRequests']) ? 1 : 0;
134
     DisableUpload,
134
     DisableUpload,
135
     DisableWiki,
135
     DisableWiki,
136
     DisablePM,
136
     DisablePM,
137
-    DisableNips,
137
+    DisablePoints,
138
     DisablePromotion,
138
     DisablePromotion,
139
     DisableIRC,
139
     DisableIRC,
140
     DisableRequests,
140
     DisableRequests,
652
   }
652
   }
653
 }
653
 }
654
 
654
 
655
-if ($DisableNips != $Cur['DisableNips'] && check_perms('users_disable_any')) {
656
-  $UpdateSet[] = "DisableNips = '$DisableNips'";
657
-  $EditSummary[] = 'Nip earning ' . ($DisableNips ? 'disabled' : 'enabled');
658
-  $HeavyUpdates['DisableNips'] = $DisableNips;
655
+if ($DisablePoints != $Cur['DisablePoints'] && check_perms('users_disable_any')) {
656
+  $UpdateSet[] = "DisablePoints = '$DisablePoints'";
657
+  $EditSummary[] = BONUS_POINTS.' earning ' . ($DisablePoints ? 'disabled' : 'enabled');
658
+  $HeavyUpdates['DisablePoints'] = $DisablePoints;
659
   if (!empty($UserReason)) {
659
   if (!empty($UserReason)) {
660
-    Misc::send_pm($UserID, 0, 'Your Nip-earning ability has been disabled', "Your Nip-earning ability has been disabled. The reason given was: [quote]{$UserReason}[/quote] If you would like to discuss this, please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url='.site_url().'wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url].');
660
+    Misc::send_pm($UserID, 0, 'Your '.BONUS_POINTS.'-earning ability has been disabled', "Your ".BONUS_POINTS."-earning ability has been disabled. The reason given was: [quote]{$UserReason}[/quote] If you would like to discuss this, please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url='.site_url().'wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url].');
661
   }
661
   }
662
 }
662
 }
663
 
663
 

+ 15
- 15
sections/user/user.php View File

63
       i.DisableUpload,
63
       i.DisableUpload,
64
       i.DisableWiki,
64
       i.DisableWiki,
65
       i.DisablePM,
65
       i.DisablePM,
66
-      i.DisableNips,
66
+      i.DisablePoints,
67
       i.DisablePromotion,
67
       i.DisablePromotion,
68
       i.DisableIRC,
68
       i.DisableIRC,
69
       i.DisableRequests," . "
69
       i.DisableRequests," . "
84
     header("Location: log.php?search=User+$UserID");
84
     header("Location: log.php?search=User+$UserID");
85
   }
85
   }
86
 
86
 
87
-  list($Username, $Email, $LastAccess, $IP, $Class, $Uploaded, $Downloaded, $RequiredRatio, $CustomTitle, $torrent_pass, $Enabled, $Paranoia, $Invites, $DisableLeech, $Visible, $BonusPoints, $JoinDate, $Info, $Avatar, $AdminComment, $Donor, $Artist, $Warned, $SupportFor, $RestrictedForums, $PermittedForums, $InviterID, $InviterName, $ForumPosts, $RatioWatchEnds, $RatioWatchDownload, $DisableAvatar, $DisableInvites, $DisablePosting, $DisableForums, $DisableTagging, $DisableUpload, $DisableWiki, $DisablePM, $DisableNips, $DisablePromotion, $DisableIRC, $DisableRequests, $FLTokens, $CommentHash, $InfoTitle, $LockedAccount) = $DB->next_record(MYSQLI_NUM, array(8, 11));
87
+  list($Username, $Email, $LastAccess, $IP, $Class, $Uploaded, $Downloaded, $RequiredRatio, $CustomTitle, $torrent_pass, $Enabled, $Paranoia, $Invites, $DisableLeech, $Visible, $BonusPoints, $JoinDate, $Info, $Avatar, $AdminComment, $Donor, $Artist, $Warned, $SupportFor, $RestrictedForums, $PermittedForums, $InviterID, $InviterName, $ForumPosts, $RatioWatchEnds, $RatioWatchDownload, $DisableAvatar, $DisableInvites, $DisablePosting, $DisableForums, $DisableTagging, $DisableUpload, $DisableWiki, $DisablePM, $DisablePoints, $DisablePromotion, $DisableIRC, $DisableRequests, $FLTokens, $CommentHash, $InfoTitle, $LockedAccount) = $DB->next_record(MYSQLI_NUM, array(8, 11));
88
 } else { // Person viewing is a normal user
88
 } else { // Person viewing is a normal user
89
   $DB->query("
89
   $DB->query("
90
     SELECT
90
     SELECT
270
     </div>
270
     </div>
271
 <?
271
 <?
272
 }
272
 }
273
-if (!$OwnProfile && !$LoggedUser['DisableNips']) { ?>
274
-    <div class='box nip_gift_box'>
275
-      <div class='head colhead_dark'>Send Nips</div>
273
+if (!$OwnProfile && !$LoggedUser['DisablePoints']) { ?>
274
+    <div class='box point_gift_box'>
275
+    <div class='head colhead_dark'>Send <?=BONUS_POINTS?></div>
276
       <div class="pad">
276
       <div class="pad">
277
         <form action='user.php' method='post'>
277
         <form action='user.php' method='post'>
278
-          <input type='hidden' name='action' value='nips' />
278
+          <input type='hidden' name='action' value='points' />
279
           <input type='hidden' name='to' value='<?=$UserID?>' />
279
           <input type='hidden' name='to' value='<?=$UserID?>' />
280
           <input type='text' name='amount' placeholder='Amount' /><input type='submit' value='Send' /><br>
280
           <input type='text' name='amount' placeholder='Amount' /><input type='submit' value='Send' /><br>
281
           <textarea name='message' rows='2' placeholder='Message'></textarea><br>
281
           <textarea name='message' rows='2' placeholder='Message'></textarea><br>
308
 ?>
308
 ?>
309
       <p>This user is wild and level <?=$Level?></p>
309
       <p>This user is wild and level <?=$Level?></p>
310
 <?  if (!$OwnProfile) { ?>
310
 <?  if (!$OwnProfile) { ?>
311
-      <p>Try to capture them with nips? The more you spend, the higher the chance of capture</p>
311
+      <p>Try to capture them with <?=BONUS_POINTS?>? The more you spend, the higher the chance of capture</p>
312
       <form action='store.php' method='post'>
312
       <form action='store.php' method='post'>
313
         <input type='hidden' name='item' value='capture_user' />
313
         <input type='hidden' name='item' value='capture_user' />
314
         <input type='hidden' name='target' value='<?=$UserID?>' />
314
         <input type='hidden' name='target' value='<?=$UserID?>' />
315
-        <input type='text' name='amount' placeholder='Nips' /><input type='submit' value='Capture' />
315
+        <input type='text' name='amount' placeholder='<?=BONUS_POINTS?>' /><input type='submit' value='Capture' />
316
       </form>
316
       </form>
317
 <?  }
317
 <?  }
318
   } ?>
318
   } ?>
1150
         </td>
1150
         </td>
1151
       </tr>
1151
       </tr>
1152
       <tr>
1152
       <tr>
1153
-        <td class="label">Nips:</td>
1153
+      <td class="label"><?=BONUS_POINTS?>:</td>
1154
         <td>
1154
         <td>
1155
           <input type="text" size="20" name="BonusPoints" value="<?=$BonusPoints?>" />
1155
           <input type="text" size="20" name="BonusPoints" value="<?=$BonusPoints?>" />
1156
 <?
1156
 <?
1157
-if (!$DisableNips) {
1157
+if (!$DisablePoints) {
1158
   $PointsRate = 0.5;
1158
   $PointsRate = 0.5;
1159
   $getTorrents = $DB->query("
1159
   $getTorrents = $DB->query("
1160
     SELECT COUNT(DISTINCT x.fid) AS Torrents,
1160
     SELECT COUNT(DISTINCT x.fid) AS Torrents,
1178
     $PointsRate += (0.67*($NumTorr * (sqrt(($TSize/$NumTorr)/1073741824) * pow(1.5,($TTime/$NumTorr)/(24*365))))) / (max(1, sqrt(($TSeeds/$NumTorr)+4)/3));
1178
     $PointsRate += (0.67*($NumTorr * (sqrt(($TSize/$NumTorr)/1073741824) * pow(1.5,($TTime/$NumTorr)/(24*365))))) / (max(1, sqrt(($TSeeds/$NumTorr)+4)/3));
1179
   }
1179
   }
1180
   $PointsRate = intval($PointsRate**0.95);
1180
   $PointsRate = intval($PointsRate**0.95);
1181
-  $PointsPerHour = number_format($PointsRate) . " nips/hour";
1182
-  $PointsPerDay = number_format($PointsRate*24) . " nips/day";
1181
+  $PointsPerHour = number_format($PointsRate)." ".BONUS_POINTS."/hour";
1182
+  $PointsPerDay = number_format($PointsRate*24)." ".BONUS_POINTS."/day";
1183
 } else {
1183
 } else {
1184
-  $PointsPerHour = "0 nips/hour";
1185
-  $PointsPerDay = "Nips disabled";
1184
+  $PointsPerHour = "0 ".BONUS_POINTS."/hour";
1185
+  $PointsPerDay = BONUS_POINTS." disabled";
1186
 }
1186
 }
1187
 ?>
1187
 ?>
1188
           <?=$PointsPerHour?> (<?=$PointsPerDay?>)
1188
           <?=$PointsPerHour?> (<?=$PointsPerDay?>)
1391
           <input type="checkbox" name="DisableLeech" id="DisableLeech"<? if ($DisableLeech == 0) { ?> checked="checked"<? } ?> /> <label for="DisableLeech">Leech</label> |
1391
           <input type="checkbox" name="DisableLeech" id="DisableLeech"<? if ($DisableLeech == 0) { ?> checked="checked"<? } ?> /> <label for="DisableLeech">Leech</label> |
1392
           <input type="checkbox" name="DisableRequests" id="DisableRequests"<? if ($DisableRequests == 1) { ?> checked="checked"<? } ?> /> <label for="DisableRequests">Requests</label> |
1392
           <input type="checkbox" name="DisableRequests" id="DisableRequests"<? if ($DisableRequests == 1) { ?> checked="checked"<? } ?> /> <label for="DisableRequests">Requests</label> |
1393
           <input type="checkbox" name="DisableUpload" id="DisableUpload"<? if ($DisableUpload == 1) { ?> checked="checked"<? } ?> /> <label for="DisableUpload">Torrent upload</label> |
1393
           <input type="checkbox" name="DisableUpload" id="DisableUpload"<? if ($DisableUpload == 1) { ?> checked="checked"<? } ?> /> <label for="DisableUpload">Torrent upload</label> |
1394
-          <input type="checkbox" name="DisableNips" id="DisableNips"<? if ($DisableNips == 1) { ?> checked="checked"<? } ?> /> <label for="DisableNips">Nips</label>
1394
+          <input type="checkbox" name="DisablePoints" id="DisablePoints"<? if ($DisablePoints == 1) { ?> checked="checked"<? } ?> /> <label for="DisablePoints"><?=BONUS_POINTS?></label>
1395
           <br /><br />
1395
           <br /><br />
1396
 
1396
 
1397
           <input type="checkbox" name="DisableTagging" id="DisableTagging"<? if ($DisableTagging == 1) { ?> checked="checked"<? } ?> /> <label for="DisableTagging" class="tooltip" title="This only disables a user's ability to delete tags.">Tagging</label> |
1397
           <input type="checkbox" name="DisableTagging" id="DisableTagging"<? if ($DisableTagging == 1) { ?> checked="checked"<? } ?> /> <label for="DisableTagging" class="tooltip" title="This only disables a user's ability to delete tags.">Tagging</label> |

+ 2
- 2
static/styles/oppai/style.css View File

1062
   max-width: 100%;
1062
   max-width: 100%;
1063
 }
1063
 }
1064
 
1064
 
1065
-.nip_gift_box p {
1065
+.point_gift_box p {
1066
   margin: 7px 2px 0px;
1066
   margin: 7px 2px 0px;
1067
 }
1067
 }
1068
-.nip_gift_box input[type="text"], .nip_gift_box textarea {
1068
+.point_gift_box input[type="text"], .point_gift_box textarea {
1069
   width: 100%;
1069
   width: 100%;
1070
   box-sizing: border-box;
1070
   box-sizing: border-box;
1071
   margin-bottom: 3px;
1071
   margin-bottom: 3px;

Loading…
Cancel
Save