forked from science-ation/science-ation
- Add a basic, but funcitonal, new user option for any type of user.
This commit is contained in:
parent
b5a9ca07d8
commit
38effb78ee
@ -43,7 +43,6 @@
|
|||||||
}
|
}
|
||||||
user_delete($uid);
|
user_delete($uid);
|
||||||
message_push(happy(i18n('User deleted.')));
|
message_push(happy(i18n('User deleted.')));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
send_header("User Editor",
|
send_header("User Editor",
|
||||||
@ -73,6 +72,28 @@ function toggleoptions()
|
|||||||
document.getElementById('optionstext').innerHTML = '+ <?=i18n('Show Display Options')?>';
|
document.getElementById('optionstext').innerHTML = '+ <?=i18n('Show Display Options')?>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function togglenew()
|
||||||
|
{
|
||||||
|
if(document.getElementById('new').style.display == 'none') {
|
||||||
|
document.getElementById('new').style.display = 'block';
|
||||||
|
document.getElementById('newtext').innerHTML = '<?=i18n('Cancel New User')?>';
|
||||||
|
|
||||||
|
} else {
|
||||||
|
document.getElementById('new').style.display = 'none';
|
||||||
|
document.getElementById('newtext').innerHTML = '<?=i18n('Add New User')?>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function neweditor()
|
||||||
|
{
|
||||||
|
var username = document.forms.newuser.new_email.value;
|
||||||
|
var usertype = document.forms.newuser.new_type.value;
|
||||||
|
window.open("user_editor_window.php?type="+usertype+"&username="+username,"User Editor","location=no,menubar=no,directories=no,toolbar=no,width=770,height=500,scrollbars=yes");
|
||||||
|
document.forms.newuser.new_email.value = "";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?
|
<?
|
||||||
@ -111,12 +132,35 @@ function toggleoptions()
|
|||||||
echo "</select>";
|
echo "</select>";
|
||||||
echo "</td></tr></table>";
|
echo "</td></tr></table>";
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
echo "<input type=submit value=\"".i18n('Filter')."\">";
|
echo "<input type=submit value=\"".i18n('Apply Filter')."\">";
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
|
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
|
|
||||||
|
|
||||||
|
echo "<br/><a id=\"newtext\" href=\"javascript:togglenew()\">".i18n('Add New User')."</a>";
|
||||||
|
echo '<div id="new" style="display: none;" class="notice">';
|
||||||
|
echo "<form name=\"newuser\" method=\"GET\" action=\"$PHP_SELF\">";
|
||||||
|
echo "<table><tr><td>".i18n('Type').":</td><td>";
|
||||||
|
echo "<select name=\"new_type\">";
|
||||||
|
$x = 0;
|
||||||
|
foreach($user_what as $k=>$v ) {
|
||||||
|
$sel = (in_array($k, $show_types)) ? 'selected="selected"' : '';
|
||||||
|
echo "<option value=\"$k\" $sel>".i18n($v)."</option>";
|
||||||
|
}
|
||||||
|
echo "</select>";
|
||||||
|
echo "</tr>";
|
||||||
|
echo "<tr><td>".i18n('Email').":</td><td>";
|
||||||
|
echo '<input type="text" name="new_email" value="" />';
|
||||||
|
echo '</td></tr>';
|
||||||
|
echo '</table>';
|
||||||
|
echo "<input type=submit onclick=\"neweditor();\" value=\"".i18n('Create New User')."\">";
|
||||||
|
|
||||||
|
echo '</form>';
|
||||||
|
|
||||||
|
echo '</div>';
|
||||||
|
echo "<br />";
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
|
|
||||||
/* Grab a list of users */
|
/* Grab a list of users */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user