Empty commit

This commit is contained in:
Git 2014-04-15 08:00:45 +00:00
parent f544294c3a
commit 2a68ec435a
8 changed files with 47 additions and 25 deletions

View File

@ -69,6 +69,7 @@
'users_view_keys' => 'Can view passkeys.',
'users_view_ips' => 'Can view IP addresses.',
'users_view_email' => 'Can view email addresses.',
'users_invite_notes' => 'Can add a staff note when inviting someone.',
'users_override_paranoia' => 'Can override paranoia.',
'users_logout' => 'Can log users out (old?).',
'users_make_invisible' => 'Can make users invisible.',
@ -199,6 +200,7 @@ function permissions_form() {
display_perm('users_view_keys', 'Can view passkeys');
display_perm('users_view_ips', 'Can view IP addresses');
display_perm('users_view_email', 'Can view email addresses');
display_perm('users_invite_notes', 'Can add a staff note when inviting someone.');
display_perm('users_override_paranoia', 'Can override paranoia');
display_perm('users_make_invisible', 'Can make users invisible');
display_perm('users_logout', 'Can log users out');

View File

@ -4,7 +4,7 @@ class Text {
* Array of valid tags; tag => max number of attributes
* @var array $ValidTags
*/
private static $ValidTags = array('b'=>0, 'u'=>0, 'i'=>0, 's'=>0, '*'=>0, '#'=>0, 'artist'=>0, 'user'=>0, 'n'=>0, 'inlineurl'=>0, 'inlinesize'=>1, 'headline'=>1, 'align'=>1, 'color'=>1, 'colour'=>1, 'size'=>1, 'url'=>1, 'img'=>1, 'quote'=>1, 'pre'=>1, 'code'=>1, 'tex'=>0, 'hide'=>1, 'plain'=>0, 'important'=>0, 'torrent'=>0, 'rule'=>0, 'mature'=>1,
private static $ValidTags = array('b'=>0, 'u'=>0, 'i'=>0, 's'=>0, '*'=>0, '#'=>0, 'artist'=>0, 'user'=>0, 'n'=>0, 'inlineurl'=>0, 'inlinesize'=>1, 'headline'=>1, 'align'=>1, 'color'=>1, 'colour'=>1, 'size'=>1, 'url'=>1, 'img'=>1, 'quote'=>1, 'pre'=>1, 'code'=>1, 'tex'=>0, 'hide'=>1, 'spoiler' => 1, 'plain'=>0, 'important'=>0, 'torrent'=>0, 'rule'=>0, 'mature'=>1,
);
/**
@ -489,6 +489,7 @@ private static function parse($Str) {
$Array[$ArrayPos] = array('Type'=>$TagName, 'Val'=>$Block);
break;
case 'spoiler':
case 'hide':
$Array[$ArrayPos] = array('Type'=>'hide', 'Attr'=>$Attrib, 'Val'=>self::parse($Block));
break;

File diff suppressed because one or more lines are too long

View File

@ -68,14 +68,14 @@
if ($_REQUEST['invite']) {
$DB->query("
SELECT InviterID, Email
SELECT InviterID, Email, Reason
FROM invites
WHERE InviteKey = '".db_string($_REQUEST['invite'])."'");
if (!$DB->has_results()) {
$Err = 'Invite does not exist.';
$InviterID = 0;
} else {
list($InviterID, $InviteEmail) = $DB->next_record();
list($InviterID, $InviteEmail, $InviteReason) = $DB->next_record(MYSQLI_NUM, false);
}
} else {
$InviterID = 0;
@ -124,11 +124,14 @@
list($StyleID) = $DB->next_record();
$AuthKey = Users::make_secret();
if ($InviteReason !== '') {
$InviteReason = db_string(sqltime()." - $InviteReason");
}
$DB->query("
INSERT INTO users_info
(UserID, StyleID, AuthKey, Inviter, JoinDate)
(UserID, StyleID, AuthKey, Inviter, JoinDate, AdminComment)
VALUES
('$UserID', '$StyleID', '".db_string($AuthKey)."', '$InviterID', '".sqltime()."')");
('$UserID', '$StyleID', '".db_string($AuthKey)."', '$InviterID', '".sqltime()."', '$InviteReason')");
$DB->query("
INSERT INTO users_history_ips
@ -142,7 +145,6 @@
('$UserID')");
$DB->query("
INSERT INTO users_history_emails
(UserID, Email, Time, IP)
@ -154,7 +156,7 @@
INSERT INTO users_history_emails
(UserID, Email, Time, IP)
VALUES
('$UserID', '$InviteEmail', '".sqltime()."', '".db_string($_SERVER['REMOTE_ADDR'])."')");
('$UserID', '".db_string($InviteEmail)."', '".sqltime()."', '".db_string($_SERVER['REMOTE_ADDR'])."')");
}

View File

@ -18,7 +18,6 @@
$UserID = $LoggedUser['ID'];
$Sneaky = false;
}
list($UserID, $Username, $PermissionID) = array_values(Users::user_info($UserID));
@ -142,21 +141,25 @@
<p>Remember that you are responsible for ALL invitees, and your account and/or privileges may be disabled due to your invitees' actions. You should know the person you're inviting. If you aren't familiar enough with the user to trust them, we suggest not inviting them.</p>
<p><em>Do not send an invite if you have not read or do not understand the information above.</em></p>
</div>
<div class="box pad">
<form class="send_form" name="invite" action="user.php" method="post">
<div class="box box2">
<form class="send_form pad" name="invite" action="user.php" method="post">
<input type="hidden" name="action" value="take_invite" />
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
<table cellpadding="6" cellspacing="1" border="0" class="layout border" width="100%">
<tr>
<td class="label">Email address:</td>
<td>
<input type="email" name="email" size="60" />
<input type="submit" value="Invite" />
</td>
</tr>
</table>
<div class="field_div">
<div class="label">Email address:</div>
<div class="input">
<input type="email" name="email" size="60" />
<input type="submit" value="Invite" />
</div>
</div>
<? if (check_perms('users_invite_notes')) { ?>
<div class="field_div">
<div class="label">Staff Note:</div>
<div class="input">
<input type="text" name="reason" size="60" maxlength="255" />
</div>
</div>
<? } ?>
</form>
</div>

View File

@ -39,6 +39,7 @@
$SiteName = SITE_NAME;
$SiteURL = site_url();
$InviteExpires = time_plus(60 * 60 * 24 * 3); // 3 days
$InviteReason = check_perms('users_invite_notes') ? db_string($_POST['reason']) : '';
//MultiInvite
if (strpos($Email, '|') !== false && check_perms('site_send_unlimited_invites')) {
@ -86,9 +87,9 @@
$DB->query("
INSERT INTO invites
(InviterID, InviteKey, Email, Expires)
(InviterID, InviteKey, Email, Expires, Reason)
VALUES
('$LoggedUser[ID]', '$InviteKey', '".db_string($CurEmail)."', '$InviteExpires')");
('$LoggedUser[ID]', '$InviteKey', '".db_string($CurEmail)."', '$InviteExpires', '$InviteReason')");
if (!check_perms('site_send_unlimited_invites')) {
$DB->query("

View File

@ -643,6 +643,18 @@ tr.torrent .bookmark>a:after {
margin-bottom: 0;
}
.field_div .label,
.submit_div .label {
float: left;
padding: 0 5px;
text-align: right;
width: 150px;
}
.field_div .input,
.submit_div .input {
padding: 0 5px;
}
.small_label {
text-align: right;
width: auto;

View File

@ -573,7 +573,7 @@ body:not(#requests):not(#friends) .box h2 {
border-bottom: 0;
}
.label {
td.label {
width: 16%;
border-right: 1px solid #e6e6e6;
}