Changeset 152
- Timestamp:
- 20/07/05 20:47:57 (3 years ago)
- Files:
-
- admin.lib.php (modified) (5 diffs)
- admin.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
admin.lib.php
r149 r152 802 802 if(!posix_getpwnam($username)) { 803 803 $this->inputError = _("You need to be a SUCS member to sign up for a blog here!"); 804 } 805 //check the user is a member of the users, staff or socieys groups 806 else { 807 $posixInfo = posix_getpwnam($username); 808 if ($posixInfo[gid] != 100 && $posixInfo[gid] != 106 && $posixInfo[gid] != 113) { 809 $this->inputError = _("Err, No, Your not realy a system user now are you?"); 810 } 804 811 } 805 812 //if we dont have any errors … … 822 829 ); 823 830 echo _("Account Added!<br />Your password has been sent to your SUCS email account"); 831 //bodge it so the username is filled in 832 $_POST['username'] = $username; 833 //print a login box 834 $this->printLoginForm(); 835 824 836 } 825 837 } … … 833 845 function addUserForm() 834 846 { 835 echo "<div class=\" adduser\">\n";847 echo "<div class=\"entry\">\n"; 836 848 if ($this->inputError != "") { 837 849 echo "<div class=\"errorinfo\">"._("Error")." : " . $this->inputError . "</div>\n"; 838 850 } 839 851 echo "<h2>"._("Register for a Blog")."</h2>\n"; 852 echo "<div class=\"td\">\n"; 840 853 echo "<form action=\"".$this->adminPath."adduser\" method=\"post\" id=\"adduserform\">\n"; 841 854 echo "<p>\n"; … … 843 856 echo "<label for=\"username\">"._("Username")."</label>\n"; 844 857 echo "</p>\n"; 858 echo "<p>\n"; 845 859 echo "<input type=\"text\" name=\"name\" id=\"name\" value=\"" . (($this->inputError != "") ? strip_tags(trim($_POST['name'])) : "") . "\" size=\"30\" maxlength=\"60\" tabindex=\"2\" />\n"; 846 860 echo "<label for=\"name\">"._("Real name")."</label>\n"; … … 860 874 echo "<p>"._("You need to be a member of ")."<a href=\"http://sucs.org/\">SUCS</a>"._(" to register")."<br />"._("The normal ")."<a href=\"http://sucs.org/info/conditions.php\">"._("Terms and Conditions")."</a>"._(" apply")."</p>\n"; 861 875 echo "</div>\n"; 876 echo "</div>\n"; 862 877 } 863 878 } admin.php
r149 r152 112 112 switch (array_shift($request)) { 113 113 case "signup": 114 echo "<div class=\"login\"><h3><a href=\"{$admin->adminPath}\">"._("Not logged in")."</a></h3> \n";114 echo "<div class=\"login\"><h3><a href=\"{$admin->adminPath}\">"._("Not logged in")."</a></h3></div>\n"; 115 115 $admin->addUserForm(); 116 116 break; 117 117 case "adduser": 118 echo "<div class=\"login\"><h3><a href=\"{$admin->adminPath}\">"._("Not logged in")."</a></h3> \n";118 echo "<div class=\"login\"><h3><a href=\"{$admin->adminPath}\">"._("Not logged in")."</a></h3></div>\n"; 119 119 $admin->addUser(); 120 120 break;
