fixing how group gets returned
[gwvp.git] / gwvplib / gwvpuseradmin.php
1 <?php
2
3 // setup the call me function for useradmin - matches on url of admin/users
4 $CALL_ME_FUNCTIONS["useradmin"] = "gwvp_UserAdminCallMe";
5
6 $MENU_ITEMS["10users"]["text"] = "Users/Groups";
7 $MENU_ITEMS["10users"]["link"] = "$BASE_URL/admin/users";
8
9
10 function gwvp_UserAdminCallMe()
11 {
12         if(isset($_REQUEST["q"])) {
13                 $query = $_REQUEST["q"];
14                 $qspl = explode("/", $query);
15                 if(isset($qspl[0]) && isset($qspl[1])) {
16                         if($qspl[0] == "admin" && $qspl[1] == "users") {
17                                 if(isset($qspl[2])) {
18                                         switch($qspl[2]) {
19                                                 case "adduser":
20                                                         return "gwvp_AddUserPage";
21                                                         break;
22                                                 case "groupmember":
23                                                         return "gwvp_groupMemberChange";
24                                                         break;
25                                                 case "addgroup":
26                                                         return "gwvp_AddGroupPage";
27                                                         break;
28                                                 case "modify":
29                                                         return "gwvp_ModifyUserPage";
30                                                         break;
31                                                 case "modifygroup":
32                                                         return "gwvp_ModifyGroupPage";
33                                                         break;
34                                                 default:
35                                                         return "gwvp_UserAdminPage";
36                                         }                                       
37                                 } else {
38                                         return "gwvp_UserAdminPage";
39                                 }
40                         }
41                 } 
42                 else return false;
43         }
44         
45         return false;
46 }
47
48 function gwvp_AddUserPage()
49 {
50         global $BASE_URL;
51         
52         $email = $_REQUEST["email"];
53         $fullname = $_REQUEST["fullname"];
54         $pass1 = $_REQUEST["pass1"];
55         $pass2 = $_REQUEST["pass2"];
56         $username = $_REQUEST["username"];
57         $desc = $_REQUEST["desc"];
58         
59         // now for some validation
60         $sendback = false;
61         $message = "";
62         if(!gwvp_checkEmail($email)) {
63                 $sendback = true;
64                 $message .= "EMail address invalid. ";
65         }
66         
67         // function gwvp_getUser($username=null, $email=null, $id=null)
68         if(gwvp_getUser(null, $email, null)!=null) {
69                 $staremail = true;
70                 $sendback = true;
71                 $message .= "EMail address already registered. ";
72         }
73         
74         if(gwvp_getUser($username)!= null) {
75                 $starusername = true;
76                 $sendback = true;
77                 $message .= "Username already exists. ";
78         }
79         
80         if($pass1 != $pass2) {
81                 $starpass = true;
82                 $sendback = true;
83                 $message .= "Passwords dont match. ";
84         }
85         
86         // otherwise, its all good, proceed with user creation
87         if($sendback) {
88                 $_SESSION["sendback_owner"] = "users";
89                 $sb["email"] = $email;
90                 if($staremail) $sb["emailstar"] = true;
91                 $sb["fullname"] = $fullname;
92                 $sb["username"] = $username;
93                 if($starusername) $sb["usernamestar"] = true;
94                 $sb["desc"] = $desc;
95                 if($starpass) $sb["passwordstar"] = true;
96                 
97                 $_SESSION["sendback"] = true;
98                 $_SESSION["sendback_data"] = base64_encode(serialize($sb));
99                 gwvp_SendMessage("error", "$message");
100                 header("Location: $BASE_URL/admin/users");
101                 return;
102         }
103         
104         // TODO: we need to do alot of checking here - that can come later
105         if(gwvp_createUser($email, $fullname, $pass1, $username, $desc, 0)) {
106                 gwvp_SendMessage("info", "user $username, $fullname ($email) created");
107                 header("Location: $BASE_URL/admin/users");
108                 return;
109         } else {
110                 gwvp_SendMessage("error", "error creating user for some unknown reason");
111                 header("Location: $BASE_URL/admin/users");
112                 return;
113         }
114
115         
116         /*
117                 echo "<tr><td>EMail</td><td><input type=\"text\" name=\"email\"></td>";
118                 echo "<td>Full Name</td><td><input type=\"text\" name=\"fullname\"></td></tr>";
119                 echo "<tr><td>Password</td><td><input type=\"text\" name=\"pass1\"></td>";
120                 echo "<td>Password Confirm</td><td><input type=\"text\" name=\"pass2\"></td></tr>";
121                 echo "<tr><td>Username</td><td><input type=\"text\" name=\"username\"></td>";
122                 echo "<td>Description</td><td><input type=\"text\" name=\"desc\"></td></tr>";
123                 */
124         
125 }
126
127 function gwvp_AddGroupPage()
128 {
129         /*
130          *              echo "<tr><td>Group Name</td><td><input type=\"text\" name=\"groupname\"><td></tr>";
131                 echo "<tr><td>Admin Group?</td><td><input type=\"checkbox\" name=\"admingroup\" class=\"mycheckbox\"></td></tr>";
132                 echo "<tr><td>Owner</td><td><div><select class=\"myselect\" name=\"groupowner\">";
133
134          */
135         global $BASE_URL;
136         
137         /*
138          *                              $presetname = " value=\"".$data["groupname"]."\"";
139                                 $presetdesc = " value=\"".$data["groupdesc"]."\"";
140                                 $presetgroupadmin = " ".$data["admingroup"]."\"";
141                                 $presetowner = " value=\"".$data["groupowner"]."\"";
142
143          */
144         
145         $gname = $_REQUEST["groupname"];
146         $isadmin = isset($_REQUEST["admingroup"]);
147         $gdesc = $_REQUEST["groupdesc"];
148         $owner = $_REQUEST["groupowner"];
149         
150         if(gwvp_getGroup(null, $gname)) {
151                 $_SESSION["sendback_owner"] = "groups";
152                 $_SESSION["sendback"] = true;
153                 
154                 $data["groupname"] = $gname;
155                 $data["groupdesc"] = $gdesc;
156                 $data["groupowner"] = $owner;
157                 if($isadmin) $data["admingroup"] = "checked";
158                 else $data["admingroup"] = "";
159                 $data["groupnamestar"] = true;
160                 
161                 gwvp_SendMessage("error", "Group name in use");
162                 
163                 $_SESSION["sendback_data"] = base64_encode(serialize($data));
164                 
165                 header("Location: $BASE_URL/admin/users");
166                 return;
167         }
168         
169         // gwvp_createGroup($group_name, $is_admin, $owner_id)
170         gwvp_createGroup("$gname", $gdesc, $isadmin, $owner);
171         // we also need to add the owner to the group
172         gwvp_addGroupMember(gwvp_getUserName($owner), $gname);
173         
174         
175         header("Location: $BASE_URL/admin/users");
176         return;
177         
178 }
179
180 function gwvp_UserAdminPage()
181 {
182         gwvp_goMainPage("gwvp_UserAdminPageBody");
183 }
184
185 function gwvp_ModifyUserPage()
186 {
187         gwvp_goMainPage("gwvp_ModifyUserPageBody");
188 }
189
190 function gwvp_ModifyGroupPage()
191 {
192         gwvp_goMainPage("gwvp_ModifyGroupPageBody");
193 }
194
195 function gwvp_ModifyUserPageBody()
196 {
197         //error_log("modify user body - coming in");
198         if(!gwvp_CheckAuthLevel("admin")) {
199                 gwvp_AuthNoPermsBody();
200                 return;
201         }
202         
203         
204         $uid = -1;
205         if(isset($_REQUEST["q"])) {
206                 $query = $_REQUEST["q"];
207                 $qspl = explode("/", $query);
208                 $uid = $qspl[3];
209         }
210         
211         echo "modify user $uid";
212 }
213
214 function gwvp_groupMemberChange()
215 {
216         global $LOGIN_TYPE, $BASE_URL;
217         
218         $gid = -1;
219         
220         if(isset($_REQUEST["q"])) {
221                 $query = $_REQUEST["q"];
222                 $qspl = explode("/", $query);
223                 $gid = $qspl[3];
224         }
225         error_log("into groupmemberchange with $gid");
226         if($gid!= -1) {
227                 
228         }
229         
230         if(isset($_REQUEST["add"])) {
231                 error_log("$gid add set to ".$_REQUEST["add"]);
232                 // this is an add op
233                 if(isset($_REQUEST["membersout"])) {
234                         foreach($_REQUEST["membersout"] as $uid) {
235                                 error_log("would add $uid from $gid");
236                                 gwvp_addGroupMemberByID($uid, $gid);
237                                 
238                         }
239                 }
240         }
241         if(isset($_REQUEST["remove"])) {
242                 error_log("$gid remove set to ".$_REQUEST["remove"]);
243                 // this is a remove op
244                 if(isset($_REQUEST["membersin"])) {
245                         foreach($_REQUEST["membersin"] as $uid) {
246                                 error_log("would remote $uid from $gid");
247                                 gwvp_deleteGroupMemberByID($uid, $gid);
248                         }
249                 }
250         }
251         
252         error_log("redirect to $BASE_URL/admin/users/modifygroup/$gid");
253         header("Location: $BASE_URL/admin/users/modifygroup/$gid");
254         //gwvp_goMainPage("gwvp_ModifyGroupPageBody");
255         
256         return;
257 }
258
259 function gwvp_ModifyGroupPageBody()
260 {
261         global $LOGIN_TYPE, $BASE_URL;
262         
263         $gid = -1;
264         if(isset($_REQUEST["q"])) {
265                 $query = $_REQUEST["q"];
266                 $qspl = explode("/", $query);
267                 $gid = $qspl[3];
268         }
269         
270         $users = gwvp_getUsers();
271         
272         $ginfo = gwvp_getGroup($gid);
273         $groupname = $ginfo["name"];
274         $groupdesc = $ginfo["description"];
275         if($ginfo["isadmin"]) $admin = "checked";
276         else $admin = "";
277         
278         echo "<h2>Modify Group - $groupname</h2>";
279         echo "<form method=\"post\" action=\"$BASE_URL/admin/users/groupmodify/$gid\">";
280         echo "<table>";
281         echo "<tr><td>Description</td><td><input type=\"text\" name=\"groupdesc\" value=\"$groupdesc\"></td></tr>";
282         echo "<tr><td>Admin</td><td><input type=\"checkbox\" name=\"is_admin\" $admin></td></tr>";
283         echo "<tr><td><input type=\"submit\" name=\"change\" value=\"Change\"></td></tr>";
284         
285         echo "</table>";
286         echo "</form>";
287         
288         echo "<h3>Group Membership</h3>";
289         echo "<form method=\"post\" action=\"$BASE_URL/admin/users/groupmember/$gid\">";
290         echo "<table border=\"1\"><tr><th>Members</th><th></th><th>All Users</th></tr>";
291         
292         echo "<tr><td>";
293         
294         
295         // members
296         echo "<select name=\"membersin[]\" size=\"20\" multiple=\"true\">";
297         foreach($users as $u_users) {
298                 $uid = $u_users["id"];
299                 $email = $u_users["email"];
300                 $username = $u_users["username"];
301                 $fullname = $u_users["fullname"];
302                 if(gwvp_IsGroupMember($email, $groupname)) {
303                         echo "<option value=\"$uid\">$username, $fullname ($email)</option>";
304                 }
305                 
306
307         }
308         
309         echo "</select>";
310         
311         
312         echo "</td><td>";
313         
314         // move buttons
315         echo "<input type=\"submit\" name=\"add\" value=\"<<\"><br>";
316         echo "<input type=\"submit\" name=\"remove\" value=\">>\"><br>";
317
318         
319         
320         echo "</td><td>";
321         
322         
323         // all users
324         echo "<select name=\"membersout[]\" size=\"20\" multiple=\"true\">";
325         foreach($users as $u_users) {
326                 $uid = $u_users["id"];
327                 $email = $u_users["email"];
328                 $username = $u_users["username"];
329                 $fullname = $u_users["fullname"];
330                 if(!gwvp_IsGroupMember($email, $groupname)) {
331                         echo "<option value=\"$uid\">$username, $fullname ($email)</option>";
332                 }
333         }
334         echo "</select>";
335         
336         
337         
338         echo "</td></tr></table>";
339         echo "</form>";
340         
341         
342         
343         
344         
345         return;
346 }
347
348 function gwvp_UserAdminPageBody()
349 {
350         global $LOGIN_TYPE, $BASE_URL;
351         
352         $groups = gwvp_getGroups();
353         $users = gwvp_getUsers();
354         
355         echo "<h2>Users and Groups</h2>";
356         echo "On this page you can manage users, groups, group membership and update your profile<br>";
357         echo "<table>";
358         
359         echo "<tr><td colspan=\"2\"><hr></td></tr>";
360         
361         
362         // Header part of table
363         // user self-management bit
364         if($LOGIN_TYPE != "anon") {
365                 echo "<tr><td valign=\"top\"><h3>My Profile</h3></td><td><h3>My Groups</h3></td></tr>";
366                 
367                 echo "<tr>";
368                 // user profile bit
369                 echo "<td valign=\"top\">";
370                 echo "User profile bits go here";
371                 echo "</td>";
372                 
373                 // now the group bit for the user
374                 echo "<td valign=\"top\">";
375                 echo "User owned groups, and groups their a member of go here";
376                 echo "</td>";
377                 echo "</tr>";
378                 
379                 echo "<tr><td colspan=\"2\"><hr></td></tr>";
380         }
381         
382         // admin only bit
383         if($LOGIN_TYPE == "admin") {
384                 $data = null;
385                 
386                 $staremail = "";
387                 $starpass = "";
388                 $starusername = "";
389                 $presetemail = "";
390                 $presetfullname = "";
391                 $presetdesc = "";
392                 $presetusername = "";
393                 
394                 if(isset($_SESSION["sendback_owner"])) {
395                         if($_SESSION["sendback_owner"] == "users") {
396                                 /*
397                                  *              $sb["email"] = $email;
398                         if($staremail) $sb["emailstar"] = true;
399                         $sb["fullname"] = $fullname;
400                         $sb["username"] = $username;
401                         if($starusername) $sb["usernamestar"] = true;
402                         $sb["desc"] = $desc;
403                         if($starpass) $sb["passwordstar"] = true;
404         
405                                  */
406                                 $data = unserialize(base64_decode($_SESSION["sendback_data"]));
407                                 
408                                 $presetemail = " value=\"".$data["email"]."\"";
409                                 $presetfullname = " value=\"".$data["fullname"]."\"";
410                                 $presetusername = " value=\"".$data["username"]."\"";
411                                 $presetdesc = " value=\"".$data["desc"]."\"";
412                                 
413                                 if(isset($data["emailstar"])) $staremail = "<img src=\"$BASE_URL/images/star.jpg\">";
414                                 if(isset($data["usernamestar"])) $starusername = "<img src=\"$BASE_URL/images/star.jpg\">";
415                                 if(isset($data["passwordstar"])) $starpass = "<img src=\"$BASE_URL/images/star.jpg\">";
416                                 
417                                 unset($_SESSION["sendback"]);
418                                 unset($_SESSION["sendback_data"]);
419                                 unset($_SESSION["sendback_owner"]);
420                         }
421                 }
422                 
423                 echo "<tr><td valign=\"top\"><h3>Create User</h3></td><td><h3>Create Group</h3></td></tr>";
424                 
425                 // create user bit
426                 echo "<tr><td valign=\"top\">";
427                 
428                 echo "<form method=\"post\" action=\"$BASE_URL/admin/users/adduser\">";
429                 echo "<table>";
430                 echo "<tr><td>EMail</td><td><input type=\"text\" name=\"email\"$presetemail>$staremail</td>";
431                 echo "<td>Full Name</td><td><input type=\"text\" name=\"fullname\"$presetfullname></td></tr>";
432                 echo "<tr><td>Password</td><td><input type=\"text\" name=\"pass1\">$starpass</td>";
433                 echo "<td>Password Confirm</td><td><input type=\"text\" name=\"pass2\">$starpass</td></tr>";
434                 echo "<tr><td>Username</td><td><input type=\"text\" name=\"username\"$presetusername>$starusername</td>";
435                 echo "<td>Description</td><td><input type=\"text\" name=\"desc\"$presetdesc></td></tr>";
436                 echo "<tr><td><input type=\"submit\" name=\"Create\" value=\"Create\" class=\"buttons\"></td></tr>";
437                 echo "</table>";
438                 echo "</form>";
439                 
440                 echo "</td><td valign=\"top\">";
441                 
442                 $stargroupname = "";
443                 $presetname = "";
444                 $presetgroupadmin = "";
445                 $presetowner = -1;
446                 
447                 if(isset($_SESSION["sendback_owner"])) {
448                         if($_SESSION["sendback_owner"] == "groups") {
449                                 /*
450                                  *              $sb["email"] = $email;
451                         if($staremail) $sb["emailstar"] = true;
452                         $sb["fullname"] = $fullname;
453                         $sb["username"] = $username;
454                         if($starusername) $sb["usernamestar"] = true;
455                         $sb["desc"] = $desc;
456                         if($starpass) $sb["passwordstar"] = true;
457         
458                                  */
459                                 $data = unserialize(base64_decode($_SESSION["sendback_data"]));
460                                 
461                                 $presetname = " value=\"".$data["groupname"]."\"";
462                                 $presetdesc = " value=\"".$data["groupdesc"]."\"";
463                                 $presetgroupadmin = " ".$data["admingroup"];
464                                 $presetowner = $data["groupowner"];
465                                 
466                                 if(isset($data["groupnamestar"])) $stargroupname = "<img src=\"$BASE_URL/images/star.jpg\">";
467                                 
468                                 unset($_SESSION["sendback"]);
469                                 unset($_SESSION["sendback_data"]);
470                                 unset($_SESSION["sendback_owner"]);
471                         }
472                 }
473                 
474                 // Create group
475                 echo "<form method=\"post\" action=\"$BASE_URL/admin/users/addgroup\">";
476                 echo "<table>";
477                 echo "<tr><td>Group Name</td><td><input type=\"text\" name=\"groupname\"$presetname>$stargroupname<td></tr>";
478                 echo "<tr><td>Group Description</td><td><input type=\"text\" name=\"groupdesc\"$presetdesc><td></tr>";
479                 echo "<tr><td>Admin Group?</td><td><input type=\"checkbox\" name=\"admingroup\" class=\"mycheckbox\"$presetgroupadmin></td></tr>";
480                 echo "<tr><td>Owner</td><td><div><select class=\"myselect\" name=\"groupowner\">";
481                 foreach($users as $u_users) {
482                         $uid = $u_users["id"];
483                         $email = $u_users["email"];
484                         $username = $u_users["username"];
485                         $fullname = $u_users["fullname"];
486                         if($presetowner == $uid) {
487                                 echo "<option value=\"$uid\" selected>$username, $fullname ($email)</option>";
488                         } else {
489                                 echo "<option value=\"$uid\">$username, $fullname ($email)</option>";
490                         }
491                         
492                 }
493                 echo "</select></div></td></tr>";
494                 
495                 
496                 
497                 echo "<tr><td><input type=\"submit\" name=\"Create\" value=\"Create\" class=\"buttons\"></td></tr>";
498                 echo "</table>";
499                 echo "</form>";
500                 
501                 
502                 echo "</td></tr>";
503                 echo "<tr><td colspan=\"2\"><hr></td></tr>";
504         }
505         
506         
507         
508         // TODO: whats seen here will depend GREATLY on setting in config - need to fix this later
509         // user list
510         echo "<tr><td valign=\"top\"><h3>Users</h3></td><td><h3>Groups</h3></td></tr>";
511         
512         echo "<tr><td>";
513         echo "<table border=\"1\">";
514         switch($LOGIN_TYPE) {
515                 case "anon":
516                         echo "<tr><th>Username</th><th>Groups</th><th>Description</th></tr>";
517                         break;
518                 case "admin":
519                         echo "<tr><th>EMail</th><th>Username</th><th>Full Name</th><th>Groups</th><th>Description</th><th>Admin?</th><th>Status</th><th>Modify</th></tr>";
520                         break;
521                 case "user":
522                         echo "<tr><th>Username</th><th>Groups</th><th>Description</th></tr>";
523                         break;
524         }
525                 
526         /*
527          *              $returns[$rn]["id"] = $u_res["users_id"];
528                 $returns[$rn]["fullname"] = $u_res["user_full_name"];
529                 $returns[$rn]["password"] = $u_res["user_password"];
530                 $returns[$rn]["username"] = $u_res["user_username"];
531                 $returns[$rn]["email"] = $u_res["user_email"];
532                 $returns[$rn]["desc"] = $u_res["user_desc"];
533                 $returns[$rn]["status"] = $u_res["user_status"];
534
535          */
536         foreach($users as $u_users) {
537                 $userid = $u_users["id"];
538                 $email = $u_users["email"];
539                 $fullname = $u_users["fullname"];
540                 $username = $u_users["username"];
541                 $desc = $u_users["desc"];
542                 $status = $u_users["status"];
543                 if(gwvp_IsUserAdmin($email) == 1) {
544                         $globaladmin = "Yes";
545                 } else {
546                         $globaladmin = "No";
547                 }
548                 
549                 
550                 // TODO: sort out group prints here
551                 $ingroups = gwvp_getGroupsForUser($email);
552                 
553                 $ownedgroups = gwvp_getGroupsOwnedByUser($email);
554                 //echo "vardump: ";
555                 //var_dump($ownedgroups);
556                 $ugroups = "";
557                 if($ownedgroups == false) $ogroups = "-";
558                 else {
559                         foreach($ownedgroups as $gr_u) {
560                                 $ugroups .= "<font color=\"#3333ff\">$gr_u</font><br>";
561                         }
562                 }
563                 trim($ugroups);
564                 
565                 
566                 if($ingroups !== false) foreach($ingroups as $grname) {
567                         $isownedgroup = false;
568                         if($ownedgroups !== false) foreach($ownedgroups as $gr_u) {
569                                 if($grname == $gr_u) $isownedgroup = true;
570                         }
571                         if(!$isownedgroup) $ugroups .= "$grname<br>";
572                 }
573                 trim($ugroups);
574                 
575                 switch($LOGIN_TYPE) {
576                         case "anon":
577                                 echo "<tr><td>$username</td><td>$ugroups</td><td>$desc</td></tr>";
578                                 break;
579                         case "admin":
580                                 echo "<tr><td>$email</td><td>$username</td><td>$fullname</td><td>$ugroups</td><td>$desc</td>";
581                                 echo "<td>$globaladmin</td><td>$status</td><td><a href=\"$BASE_URL/admin/users/modify/$userid\">Modify</a></td></tr>";
582                                 break;
583                         case "user":
584                                 echo "<tr><td>$username</td><td>$ugroups</td><td>$desc</td></tr>";
585                                 break;
586                 }
587                 
588                 
589         }
590         echo "</table>";
591         
592         echo "</td><td valign=\"top\">";
593         
594         // group part of table
595         
596         echo "<table border=\"1\">";
597         
598         switch($LOGIN_TYPE) {
599                 case "anon":
600                         echo "<tr><th>Group Name</th><th>Owner</th></tr>";
601                         break;
602                 case "admin":
603                         echo "<tr><th>Group Name</th><th>Owner</th><th>Admin Group?</th><th>Modify</th></tr>";
604                         break;
605                 case "user":
606                         echo "<tr><th>Group Name</th><th>Owner</th><th>Admin Group?</th></tr>";
607                         break;
608         }
609         
610         foreach($groups as $u_groups) {
611                 /*
612                  *              $returns[$rn]["id"] = $u_res["groups_id"];
613                 $returns[$rn]["name"] = $u_res["groups_name"];
614                 if($u_res["groups_is_admin"]=="1") $return[$rn]["admin"] = true;
615                 else $return[$rn]["admin"] = false;
616                 $returns[$rn]["admin"] = $u_res["groups_is_admin"];
617                 $returns[$rn]["ownerid"] = $u_res["groups_owner_id"];
618
619                  */
620                 $gname = $u_groups["name"];
621                 $gid = $u_groups["id"];
622                 $owner = gwvp_getUserEmail($u_groups["ownerid"]);
623                 if($u_groups["admin"]) $gadmin = "Yes";
624                 else $gadmin  = "No";
625
626                 switch($LOGIN_TYPE) {
627                         case "anon":
628                                 echo "<tr><td>$gname</td><td>$owner</td></tr>";
629                                 break;
630                         case "admin":
631                                 echo "<tr><td>$gname</td><td>$owner</td><td>$gadmin</td><td><a href=\"$BASE_URL/admin/users/modifygroup/$gid\">Modify</a></td></tr>";
632                                 break;
633                         case "user":
634                                 echo "<tr><td>$gname</td><td>$owner</td><td>$gadmin</td></tr>";
635                                 break;
636                 }
637                 
638                 
639         }
640         echo "</table>";
641         echo "</td></tr></table>";
642 }
643
644
645 ?>