add leave group
							parent
							
								
									21be4b89ea
								
							
						
					
					
						commit
						67b68cebec
					
				|  | @ -2,6 +2,12 @@ | |||
|     $HTML->setHTMLTitle("Gruppen"); | ||||
|     $HTML->importSeitenInhalt("pages/HTML/deine-regionen.html"); | ||||
| 
 | ||||
|     if(@$_REQUEST['action'] == 'leave' && @$_REQUEST['group'] != '') | ||||
|     { | ||||
|         $statementMembership = $RUNTIME['PDO']->prepare("DELETE FROM os_groups_membership WHERE GroupID = ? AND PrincipalID = ?"); | ||||
|         $statementMembership->execute(array($_REQUEST['group'], $_SESSION['UUID']));  | ||||
|     } | ||||
| 
 | ||||
|     $table = '<table class="table"><thead><tr><th scope="col">Name</th><th scope="col">Gründer</th><th scope="col">Aktionen</th></thead><tbody>%%ENTRY%%</tbody></table>'; | ||||
|      | ||||
|     $statementMembership = $RUNTIME['PDO']->prepare("SELECT * FROM os_groups_membership WHERE PrincipalID = ? ORDER BY GroupID ASC"); | ||||
|  | @ -14,7 +20,7 @@ | |||
| 
 | ||||
|         while($rowGroups = $statementGroups->fetch())  | ||||
|         { | ||||
|             $entry = '<tr><td>'.$rowGroups['Name'].'</td><td>'.$RUNTIME['OPENSIM']->getUserName($rowGroups['FounderID']).'</td><td>VERLASSEN</td></tr>'; | ||||
|             $entry = '<tr><td>'.$rowGroups['Name'].'</td><td>'.$RUNTIME['OPENSIM']->getUserName($rowGroups['FounderID']).'</td><td><a href="index.php?page=groups&action=leave&group='.$rowGroups['GroupID'].'">VERLASSEN</a></td></tr>'; | ||||
|             $table = str_replace("%%ENTRY%%", $entry."%%ENTRY%%", $table); | ||||
|         } | ||||
|     } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Chris
						Chris