fixed some stuff
This commit is contained in:
1 parent
8cc1fb59a8
commit
73a3ee2831
2 files changed
+5
-2
No files matched your search
+2
-2
@@ -1243,13 +1243,13 @@ class User {
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"update-user-expiry\" />\n";
|
||||
print "<select name=\"newExpiryDate_" . $this->id . "\" id=\"newExpiryDate_" . $this->id . "\">\n";
|
||||
print "<option value=\"0000-00-00\">" . "ugyldig utløpsår" . "</option>\n";
|
||||
print "<option value=\"2011-12-31\" >" . "I år, gammelt medlemskap" . "</option>\n";
|
||||
$loop = array('now'=>'inneværende år','+1 year'=>'neste år','+3 year'=>'tre år','+5 year'=>'fem år');
|
||||
|
||||
foreach($loop as $time=>$label)
|
||||
echo '<option ' . (getExpiryDate($time) == $this->expires?' selected="selected" ':'') . ' value="' . getExpiryDate($time) . '">' . $label . ' (' . getExpiryDate($time) . ')</option';
|
||||
echo '<option ' . (getExpiryDate($time) == $this->expires?' selected="selected" ':'') . ' value="' . getExpiryDate($time) . '">' . $label . ' (' . getExpiryDate($time) . ')</option>';
|
||||
|
||||
print "<option " . ($this->expires === null?' selected="selected" ':'') . " value=\"lifetime\">" . "livsvarig" . "</option>\n";
|
||||
print "<option value=\"2011-12-31\" >" . "2011, gammelt medlemskap" . "</option>\n";
|
||||
print "</select>\n";
|
||||
print "<input type=\"submit\" value=\"endre\" />\n";
|
||||
print "</form>";
|
||||
|
||||
@@ -6,6 +6,9 @@ require_once "includes.php";
|
||||
|
||||
$userid = $_GET['userid'];
|
||||
$value = $_GET['value'];
|
||||
|
||||
if($value == 'lifetime') $value = null;
|
||||
|
||||
$user = new User($userid);
|
||||
$user->updateExpiry($value);
|
||||
|
||||
|
||||
Reference in new issue
Block a user