mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-02-07 13:59:07 +00:00
Empty commit
This commit is contained in:
parent
2ce7e0cae9
commit
7d93547324
@ -20,31 +20,37 @@
|
|||||||
if (!empty($Username) && !empty($Email) && !empty($Password)) {
|
if (!empty($Username) && !empty($Email) && !empty($Password)) {
|
||||||
|
|
||||||
//Create hashes...
|
//Create hashes...
|
||||||
$Secret=Users::make_secret();
|
$Secret = Users::make_secret();
|
||||||
$torrent_pass=Users::make_secret();
|
$torrent_pass = Users::make_secret();
|
||||||
|
|
||||||
//Create the account
|
//Create the account
|
||||||
$DB->query("INSERT INTO users_main (Username,Email,PassHash,torrent_pass,Enabled,PermissionID, Language) VALUES ('".db_string($Username)."','".db_string($Email)."','".db_string(Users::make_crypt_hash($Password))."','".db_string($torrent_pass)."','1','".USER."', 'en')");
|
$DB->query("
|
||||||
|
INSERT INTO users_main
|
||||||
|
(Username, Email, PassHash, torrent_pass, Enabled, PermissionID, Language)
|
||||||
|
VALUES
|
||||||
|
('".db_string($Username)."','".db_string($Email)."','".db_string(Users::make_crypt_hash($Password))."','".db_string($torrent_pass)."','1','".USER."', 'en')");
|
||||||
|
|
||||||
//Increment site user count
|
//Increment site user count
|
||||||
$Cache->increment('stats_user_count');
|
$Cache->increment('stats_user_count');
|
||||||
|
|
||||||
//Grab the userid
|
//Grab the userID
|
||||||
$UserID=$DB->inserted_id();
|
$UserID = $DB->inserted_id();
|
||||||
|
|
||||||
Tracker::update_tracker('add_user', array('id' => $UserID, 'passkey' => $torrent_pass));
|
Tracker::update_tracker('add_user', array('id' => $UserID, 'passkey' => $torrent_pass));
|
||||||
|
|
||||||
//Default stylesheet
|
//Default stylesheet
|
||||||
$DB->query("SELECT ID FROM stylesheets");
|
$DB->query("SELECT ID FROM stylesheets");
|
||||||
list($StyleID)=$DB->next_record();
|
list($StyleID) = $DB->next_record();
|
||||||
|
|
||||||
//Auth key
|
//Auth key
|
||||||
$AuthKey = Users::make_secret();
|
$AuthKey = Users::make_secret();
|
||||||
|
|
||||||
//Give them a row in users_info
|
//Give them a row in users_info
|
||||||
$DB->query("INSERT INTO users_info
|
$DB->query("
|
||||||
(UserID,StyleID,AuthKey,JoinDate) VALUES
|
INSERT INTO users_info
|
||||||
('".db_string($UserID)."','".db_string($StyleID)."','".db_string($AuthKey)."', '".sqltime()."')");
|
(UserID, StyleID, AuthKey, JoinDate)
|
||||||
|
VALUES
|
||||||
|
('".db_string($UserID)."','".db_string($StyleID)."','".db_string($AuthKey)."', '".sqltime()."')");
|
||||||
|
|
||||||
//Redirect to users profile
|
//Redirect to users profile
|
||||||
header ("Location: user.php?id=".$UserID);
|
header ("Location: user.php?id=".$UserID);
|
||||||
@ -80,6 +86,7 @@
|
|||||||
<h2>Create a User</h2>
|
<h2>Create a User</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="thin box pad">
|
||||||
<form class="create_form" name="user" method="post" action="">
|
<form class="create_form" name="user" method="post" action="">
|
||||||
<input type="hidden" name="action" value="create_user" />
|
<input type="hidden" name="action" value="create_user" />
|
||||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||||
@ -101,7 +108,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
<?
|
</div>
|
||||||
|
<?
|
||||||
}
|
}
|
||||||
|
|
||||||
View::show_footer(); ?>
|
View::show_footer(); ?>
|
||||||
|
@ -358,8 +358,8 @@ function checked($Checked) {
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="label">Preset</td>
|
<td class="label">Preset</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="button" onclick="ParanoiaResetOff()">Show everything</input>
|
<input type="button" onclick="ParanoiaResetOff()" value="Show everything" />
|
||||||
<input type="button" onclick="ParanoiaResetStats()">Show stats only</input>
|
<input type="button" onclick="ParanoiaResetStats()" value="Show stats only" />
|
||||||
<!--<input type="button" onclick="ParanoiaResetOn()">Show nothing</input>-->
|
<!--<input type="button" onclick="ParanoiaResetOn()">Show nothing</input>-->
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -561,7 +561,7 @@
|
|||||||
Tools::disable_users($UserID, '', 1);
|
Tools::disable_users($UserID, '', 1);
|
||||||
} elseif ($EnableUser == '1') {
|
} elseif ($EnableUser == '1') {
|
||||||
$Cache->increment('stats_user_count');
|
$Cache->increment('stats_user_count');
|
||||||
Tracker::update_tracker('add_user', array('id' => $UserID, 'passkey' => $Cur['torrent_pass']), true);
|
Tracker::update_tracker('add_user', array('id' => $UserID, 'passkey' => $Cur['torrent_pass']));
|
||||||
if (($Cur['Downloaded'] == 0) || ($Cur['Uploaded']/$Cur['Downloaded'] >= $Cur['RequiredRatio'])) {
|
if (($Cur['Downloaded'] == 0) || ($Cur['Uploaded']/$Cur['Downloaded'] >= $Cur['RequiredRatio'])) {
|
||||||
$UpdateSet[] = "i.RatioWatchEnds='0000-00-00 00:00:00'";
|
$UpdateSet[] = "i.RatioWatchEnds='0000-00-00 00:00:00'";
|
||||||
$CanLeech = 1;
|
$CanLeech = 1;
|
||||||
@ -574,7 +574,7 @@
|
|||||||
$UpdateSet[] = "i.RatioWatchDownload=m.Downloaded";
|
$UpdateSet[] = "i.RatioWatchDownload=m.Downloaded";
|
||||||
$CanLeech = 0;
|
$CanLeech = 0;
|
||||||
}
|
}
|
||||||
Tracker::update_tracker('update_user', array('passkey' => $Cur['torrent_pass'], 'can_leech' => '0'), true);
|
Tracker::update_tracker('update_user', array('passkey' => $Cur['torrent_pass'], 'can_leech' => '0'));
|
||||||
}
|
}
|
||||||
$UpdateSet[] = "Enabled='1'";
|
$UpdateSet[] = "Enabled='1'";
|
||||||
$LightUpdates['Enabled'] = 1;
|
$LightUpdates['Enabled'] = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user