<?php 

if (!defined("mxMainFileLoaded")) die ("You can't access this file directly...");

$module_name = basename(dirname(__FILE__));

global $prefix;
	include("modules/$module_name/funktions.php");


#########################Zeilenumbruch############################
	function wordwrap2($str="", $width=75, $break=" ", $separator=" ", $outprefix="")
	{
    	$wbr = "<wbr>";
    	$width = $width - strlen(strip_tags($outprefix));
    	$str = trim($str);
    	if ($str=="")
		{
        	return $str;
        	exit;
    	}
    	$strarray = explode($separator,$str);
    	foreach ($strarray as $stritem) {$stritem = trim($stritem);}
    	$outarray = array();
    	$ln = 0; $wd = 0;
    	$outarray[$ln] = $outprefix;
    	while ($wd < sizeof($strarray))
		{
        	if (strlen(strip_tags($outarray[$ln]." ".$strarray[$wd]))>$width)
			{
            	$rlen = $width-1-strlen(strip_tags($outarray[$ln]." "));
            	if (strpos($strarray[$wd],$wbr)>1)
				{
                	$tarray = explode($wbr,$strarray[$wd]);
                	$i = 0;
                	$tstr = "";
                	while (($i<sizeof($tarray)) and (strlen($tstr.$tarray[$i])<$rlen))
					{
						$tstr .= $tarray[$i];
                    	$i++;
                	}
                	if ($i > 0)
					{
                    	$outarray[$ln] .= $tstr."-".$break;
                    	$ln++;
                    	$outarray[$ln] = $outprefix;
                    	$strarray[$wd] = "";
                    	for ($i=$i; $i<sizeof($tarray); $i++)
						{
                        	$strarray[$wd] .= $tarray[$i].$wbr;
                    	}
                	}
					else
					{
                    	$outarray[$ln] .= $break;
                    	$ln++;
                    	$outarray[$ln] = $outprefix;
                	}
            	}
				else
				{
                	$outarray[$ln] .= $break;
                	$ln++;
                	while (strlen($strarray[$wd])>$width)
					{
                    	$outarray[$ln] = $outprefix.substr($strarray[$wd],0,$width).$break;
						$ln++;
                    	$strarray[$wd] = substr($strarray[$wd],$width);
                	}
                	$outarray[$ln] = $outprefix.$strarray[$wd]." ";
                	$wd++;
            	}
        	}
			else
			{
            	$outarray[$ln] .= $strarray[$wd]." ";
            	$wd++;
       	 	}
    	}
    	return implode("",$outarray);
	}


$groupid = $_GET['groupid'];


		$result1 = sql_query("SELECT name FROM ".$prefix."_user_groups WHERE gid=".$groupid."");
		$groupname = sql_fetch_array($result1); 

$result3 = sql_query("SELECT uid FROM `".$prefix."_user_groups_users` WHERE `group` = '".$groupname[0]."' AND `groupadmin` = '1' LIMIT 0 , 1");
$selectgroupadmin = sql_fetch_array($result3);

$groupadmin = mxGetUserDataFromUid($selectgroupadmin[0]);

		$query1 = sql_query("SELECT * FROM ".$prefix."_user_groups WHERE gid=".$groupid."");
		$groupsettings = sql_fetch_array($query1);


include("header.php");
		
if (!empty($_GET['option']))
{
$option = $_GET['option'];

if ($option == "delgroup") {
					$result001 = sql_query("DELETE FROM `".$prefix."_user_groups` WHERE `gid` = '".$groupid."' LIMIT 1");
					if(mysql_affected_rows() == 1 )
                 	 {
					 echo  "<br><br><br><b>Gruppe wurde gelöscht</b>";
					 } else {
					 echo "Gruppe wurde <b>nicht</b> gelöscht.";
					 }
					 
					$result002 = sql_query("DELETE FROM `".$prefix."_user_groups_users` WHERE `group` = '".$groupsettings['name']."'");
					if(mysql_affected_rows() == 1 )
                 	 {
					 echo "";
					 } else {
					 echo "Administrator konnte nicht gelöscht werden.";
					 }
					 
					 include("footer.php");
					 die();
	}
	}
?> 
<!-- Achtung Highslide funktioniert nur wenn die dazugehörigen scripte auch Hochgeladen wurden ! -->
<link rel="stylesheet" href="includes/highslide/highslide-image.css" type="text/css">
<link rel="stylesheet" href="includes/highslide/highslide-content.css" type="text/css">
<script type="text/javascript" src="includes/highslide/highslide-with-html.js"></script>

<script type="text/javascript">    
    hs.graphicsDir = 'includes/highslide/graphics/';
    hs.outlineType = 'rounded-white';
    hs.outlineWhileAnimating = true;
    
    
hs.Expander.prototype.printHtml = function ()
{
    var pw = window.open("about:blank", "_new");
    pw.document.open();
    pw.document.write(this.getHtmlPrintPage());
    pw.document.close();
    return false;
};
hs.Expander.prototype.getHtmlPrintPage = function()
{
    var body = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body') 
        || this.innerContent;

    return "<html>\n" +
        "<head>\n" +
        "<title>Temporary Printing Window</title>\n" +
        "<script>\n" +"function step1() {\n" +
        "  setTimeout('step2()', 10);\n" +
        "}\n" +
        "function step2() {\n" +
        "  window.print();\n" +
        "  window.close();\n" +
        "}\n" +
        "</scr" + "ipt>\n" +
        "</head>\n" +
        "<body onLoad='step1()'>\n" +
        body.innerHTML +
        "</body>\n" +
        "</html>\n";
};
</script>

<script language="JavaScript"> 
<!-- 
function CountMax() 
{ 
var wert,max; 
max = 255; 
wert = max-document.eingabe.text.value.length; 
if (wert < 0) { 
alert("Es dürfen nicht mehr als " + max + " Zeichen eingegeben werden!"); 
document.eingabe.text.value = document.eingabe.text.value.substring(0,max); 
wert = max-document.eingabe.text.value.length; 
document.eingabe.rv_counter.value = wert; 

} else { 
document.eingabe.rv_counter.value = max - document.eingabe.text.value.length; 
} 
} 
//--> 
</script> 
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" >
  <!--DWLayoutTable-->
  <tr> 
    <td height="25" align="right" valign="bottom"><!--DWLayoutEmptyCell-->&nbsp;</td>
  </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" >
  <!--DWLayoutTable-->
  <tr> 
    <td width="13"><div align="center"><br>
        <br>
        &nbsp;</div></td>
    <td width="230" style="border: 1px dotted gray;" align="center"> 
      <?php 
	if ($groupsettings['foto'] == "1") {
    if(file_exists("modules/user_groups/gallery/logo-$groupid.jpg")) { 
   echo "<image src=\"modules/user_groups/gallery/logo-$groupid.jpg\" width=\"220\" alt=\"Gruppen Logo\">\n"; 
    } 
    if(file_exists("modules/user_groups/gallery/logo-$groupid.gif")) { 
   echo "<image src=\"modules/user_groups/gallery/logo-$groupid.gif\" width=\"220\" alt=\"Gruppen Logo\">\n"; 
    }
	 if(file_exists("modules/user_groups/gallery/logo-$groupid.")) { 
   echo "Dein Logo wird Zurzeit überprüft\n"; 
    }
	} 
	if ($groupsettings['foto'] == "2") {
	echo "Logo Deaktivert";
	}
	if ($groupsettings['foto'] == "") {
	
	echo "Noch nicht eingerichtet";
	}
	

?>
    </td>
    <td> 
      <table width="95%" align="right" cellpadding="0" cellspacing="0">
        <tr> 
          <td><img src="images/designbox/box2_tl.gif" width="18" height="9" /></td>
          <td background="images/designbox/box_t.gif"><img src="images/designbox/box_t.gif" width="28" height="9"></td>
          <td><img src="images/designbox/box2_tr.gif" width="9" height="9" /></td>
        </tr>
        <tr> 
          <td valign="top" background="images/designbox/box2_ml.gif" ><img src="images/designbox/box2_mm.gif" width="18" height="10" /></td>
          <td width="100%" bgcolor="#EFEFEF">
            <?php
		  

		   $cookie = mxGetUserData();
		   #####Settings#####
		   if ($groupsettings['public'] == "1") {
		   $group_public = "Privat<br>";
		   }
		   if ($groupsettings['public'] == "2") {
		   $group_public = "Öffentlich<br>";
		   }
		   if ($groupsettings['public'] == "") 
		   {
		   $group_public = "Noch nicht eingerichtet<br>";
		   }
		   
		   if ($groupsettings['approve'] == "1") {
		   $group_approve = "Jeder kann beitreten.<br><br>";
		   }
		   if ($groupsettings['approve'] == "2") {
		   $group_approve = "Nur mit genehmigung vom Gruppenadmin<br><br>";
		   }
		   if ($groupsettings['approve'] == "") {
		   $group_approve = "Noch nicht eingerichtet<br>";
		   }	  
	
		   echo "<b>Beschreibung / Name</b><hr>";	
		   echo "Name:</b> ".$groupsettings['name']."<br>";
		   echo "Beschreibung:</b> ".$groupsettings['description']."<br>"; 		   
		   echo "Gruppenadmin:</b> ".$groupadmin['uname']."<br><br><br>";
		   echo "<b>Einstellungen</b><hr>";
		   echo "Gruppentype:</b> ".$group_public."<br>";
		   echo "Gruppenbeitritt:</b> ".$group_approve."<br><br>";
		   echo "<b>Options</b><hr>";
	   
		   if ($groupadmin['uname'] == $cookie['uname']) {

		   echo "- <a href=\"modules.php?name=user_groups&file=group_news&gid=".$groupid."&fromuser=".$cookie['uname']."\">News Schreiben</a><br>";
		   echo "- <a href=\"modules.php?name=user_groups&file=group_settings&gid=".$groupid."\">Gruppen einstellungen</a><br>";
		   echo "- <a href=\"modules.php?name=user_groups&file=group_image&groupid=".$groupid."&groupname=".$groupname[0]."\">Gruppen Logo</a><br>";
		   echo "- <a href=\"modules.php?name=user_groups&file=view&option=delgroup&groupid=".$groupid."\" onClick=\"JavaScript: return confirm('Gruppe wirklich löschen ?');\">Gruppe löschen</a><br>";
		   } else {
		   echo "- <a href=\"modules.php?name=user_groups&op=memberjoin&groupid=".$groupid."\">Gruppe beitreten</a><br>";
		   }
		   echo "- <a href=\"modules.php?name=user_groups&file=view&groupid=".$groupid."&option=deluser&uname=".$cookie['uname']."\">Aus Gruppe löschen</a>";

		   
		    ?>
          </td>
          <td background="images/designbox/box_mr.gif" ><img src="images/designbox/box_mr.gif" width="9" height="19" /></td>
        </tr>
        <tr> 
          <td><img src="images/designbox/box2_bl.gif" width="18" height="9" /></td>
          <td background="images/designbox/box_b.gif" ><img src="images/designbox/box_b.gif" width="28" height="9" /></td>
          <td><img src="images/designbox/box_br.gif" width="9" height="9" /></td>
        </tr>
      </table></td>
  </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" >
  <!--DWLayoutTable-->
  <tr> 
    <td height="40" align="right" valign="bottom">Gruppen News&nbsp;&nbsp;</td>
  </tr>
</table>
<table width="98%" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="1%"><img src="images/designbox/box2_tl.gif" width="18" height="9" /></td>
    <td background="images/designbox/box_t.gif"><img src="images/designbox/box_t.gif" width="28" height="9"></td>
    <td width="1%"><img src="images/designbox/box2_tr.gif" width="9" height="9" /></td>
  </tr>
  <tr> 
    <td valign="top" background="images/designbox/box2_ml.gif" ><img src="images/designbox/box2_ml.gif" width="18" height="10" /></td>
    <td width="98%" bgcolor="#EFEFEF">
      <?php
		$resultD = sql_query("SELECT * FROM `".$prefix."_user_groups_news` WHERE `togroup` = '".$groupid."' ORDER BY time DESC LIMIT 10 ");
		if (!$resultD)
		{
		echo "<center>Die News konnten nicht ausgelesen werden.</center>";
		}
		while($newsout = sql_fetch_assoc($resultD))
		{
		$newstime = date ("d.m.Y H:i", $newsout['time']);
		
		echo "<table width=\"100%\" style=\"border-bottom: 1px dotted black;\"><tr>";
		echo "<td width=\"100%\"><b>".$newstime."</b> ".$newsout['title']."</td></tr><tr><td>".$newsout['text']."</td>";
		echo "</tr></table>";
		
		}
				  				    
				  
				  ?>
    </td>
    <td background="images/designbox/box_mr.gif" ><img src="images/designbox/box_mr.gif" width="9" height="19" /></td>
  </tr>
  <tr> 
    <td><img src="images/designbox/box2_bl.gif" width="18" height="9" /></td>
    <td background="images/designbox/box_b.gif"><img src="images/designbox/box_b.gif" width="28" height="9" /></td>
    <td><img src="images/designbox/box_br.gif" width="9" height="9" /></td>
  </tr>
</table>

<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" >
  <!--DWLayoutTable-->
  <tr> 
    <td height="40" align="right" valign="bottom">Gruppen Mitglieder&nbsp;&nbsp;</td>
  </tr>
</table>
<table width="98%" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="1%"><img src="images/designbox/box2_tl.gif" width="18" height="9" /></td>
    <td background="images/designbox/box_t.gif"><img src="images/designbox/box_t.gif" width="28" height="9"></td>
    <td width="1%"><img src="images/designbox/box2_tr.gif" width="9" height="9" /></td>
  </tr>
  <tr> 
    <td valign="top" background="images/designbox/box2_ml.gif" ><img src="images/designbox/box2_ml.gif" width="18" height="10" /></td>
    <td width="98%" bgcolor="#EFEFEF">
      <?php
	
	
	echo "<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\"><tr> ";
		$result7 = sql_query("SELECT `username` FROM `".$prefix."_user_groups_users` WHERE `group` = '".$groupname[0]."' ORDER BY username ASC LIMIT 100 ");
		$colcounter=1;
		while (list($username) = sql_fetch_row($result7)) {
		
		$member = mxGetUserDataFromUsername($username);
		
$memberfotoquery = sql_fetch_array(sql_query("SELECT * FROM `mx_user_pics` WHERE `user` = '".$member['uname']."' AND `hauptfoto` = '1' AND `aktiv` != '0'"));

if (!empty($memberfotoquery['foto'])) {
if(file_exists("modules/user_pics/media/user_pics_thumb200/thumb_".$memberfotoquery['foto'].".jpg")) {
$foto = "<a href=\"modules/user_pics/media/user_pics/".$memberfotoquery['foto'].".jpg\" class=\"highslide\" onclick=\"return hs.expand(this)\"><img src=\"modules/user_pics/media/user_pics_thumb200/thumb_".$memberfotoquery['foto'].".jpg\" width=\"75\"></a>";
}
else
{
$foto = "<a href=\"modules/user_pics/media/user_pics/".$memberfotoquery['foto'].".jpg\" class=\"highslide\" onclick=\"return hs.expand(this)\"><img src=\"modules/user_pics/media/user_pics/".$memberfotoquery['foto'].".jpg\" width=\"75\"></a>";
}
} else {
$foto ="<a href=\"modules/user_pics/media/images/nopic.gif\" class=\"highslide\" onclick=\"return hs.expand(this)\"><img src=\"modules/user_pics/media/images/nopic.gif\" width=\"75\"></a>";
}
	
echo "<td align=\"center\"><center>".$foto."<br><a href=\"modules.php?name=Userinfo&uname=".$member['uname']."\">".$member['uname']."</a>";
if ($groupadmin['uname'] == $cookie['uname']) {
   if ($groupadmin['uname'] != $member['uname'])
   {
      echo "&nbsp;<a href=\"modules.php?name=user_groups&file=view&groupid=".$groupid."&option=deluser&uname=".$member['uname']."\">[X]</a>";
   }
}
echo "</center></td>";
if (floor($colcounter/10)==1)
{
echo "</tr><tr>\n";
        $colcounter=0;
}
$colcounter++;
}
	
echo "</tr></table>";
	
	?>
    </td>
    <td background="images/designbox/box_mr.gif"><img src="images/designbox/box_mr.gif" width="9" height="19" /></td>
  </tr>
  <tr> 
    <td><img src="images/designbox/box2_bl.gif" width="18" height="9" /></td>
    <td background="images/designbox/box_b.gif"><img src="images/designbox/box_b.gif" width="28" height="9" /></td>
    <td><img src="images/designbox/box_br.gif" width="9" height="9" /></td>
  </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" >
  <!--DWLayoutTable-->
  <tr> 
    <td height="40" align="right" valign="bottom"><em>(Es werden nur die letzten 
      15 Angezeigt)</em> Gruppen G&auml;stebuch&nbsp;&nbsp;</td>
  </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" >
  <!--DWLayoutTable-->
  <tr> 
    <td height="40" align="right" valign="center">
	<?php
	
if (!empty($_GET['option']))
{
if ($option == "deluser") {
$uname = $_GET['uname'];


    
$result16 = sql_query("DELETE FROM `".$prefix."_user_groups_users` WHERE `group` = '".$groupsettings['name']."' AND `username` = '".$uname."';");
if(mysql_affected_rows() == 1 )
           {
echo "<br><br><table width=\"98%\"><tr><td width=\"100%\" height=\"35\" bgcolor=\"#FB8587\" style=\"border-top: 1px dotted black; border-bottom: 1px dotted black;\"><center>Das hat geklappt !</center></td></tr></table><br><br>";
           } else {
echo "<br><br><table width=\"98%\"><tr><td width=\"100%\" height=\"35\" bgcolor=\"#FB8587\" style=\"border-top: 1px dotted black; border-bottom: 1px dotted black;\"><center>Das hat nicht geklappt (Nur Gruppenmitglieder können sich aus dieser Gruppe löschen).</center></td></tr></table><br><br>";

}
}
	

if ($option == "del") {

$gid = $_GET['gid'];
            
$result11 = sql_query("DELETE FROM `".$prefix."_user_groups_gb` WHERE `gid` = ".$gid.";");
if(mysql_affected_rows() == 1 )
           {
echo "<br><br><table width=\"98%\"><tr><td width=\"100%\" height=\"35\" bgcolor=\"#FB8587\" style=\"border-top: 1px dotted black; border-bottom: 1px dotted black;\"><center>Gästebucheintrag Gelöscht</center></td></tr></table><br><br>";
           } else {
echo "<br><br><table width=\"98%\"><tr><td width=\"100%\" height=\"35\" bgcolor=\"#FB8587\" style=\"border-top: 1px dotted black; border-bottom: 1px dotted black;\"><center>Gästebucheintrag Gelöscht</center></td></tr></table><br><br>";
}
}
}

	if ($groupsettings['gb'] == "1") {
		$result4 = sql_query("SELECT * FROM `".$prefix."_user_groups_gb` WHERE `togroup` = '".$groupid."' ORDER BY time DESC LIMIT 0 , 15");
		if (!$result4)
		{
		echo "<center>Das Gästebuch konnte nicht ausgelesen werden.</center>";
		}
		while($eintrag = sql_fetch_assoc($result4))
		{

		$fromuserdaten = mxGetUserDataFromUid($eintrag['fromuser']);
		$eintrag['text'] = wordwrap2($eintrag['text'],120,"<br> ", " ");
		$eintragzeitausgabe = date ("d.m.Y H:i", $eintrag['time']);
		
		######Layout#####
echo "<a name=\"".$eintrag['gid']."\"><table width=\"98%\"><tr><td width=\"100\" align=\"center\">";

$fotoquery = sql_fetch_array(sql_query("SELECT * FROM `mx_user_pics` WHERE `user` = '".$fromuserdaten['uname']."' AND `hauptfoto` = '1' AND `aktiv` != '0'"));

if (!empty($fotoquery['foto'])) {
if(file_exists("modules/user_pics/media/user_pics_thumb200/thumb_".$fotoquery['foto'].".jpg")) {
echo "<a href=\"modules/user_pics/media/user_pics/".$fotoquery['foto'].".jpg\" class=\"highslide\" onclick=\"return hs.expand(this)\"><img src=\"modules/user_pics/media/user_pics_thumb200/thumb_".$fotoquery['foto'].".jpg\" width=\"75\"><br>".$fromuserdaten['uname']."</a>";
}
else
{
echo "<a href=\"modules/user_pics/media/user_pics/".$fotoquery['foto'].".jpg\" class=\"highslide\" onclick=\"return hs.expand(this)\"><img src=\"modules/user_pics/media/user_pics/".$fotoquery['foto'].".jpg\" width=\"75\"><br>".$fromuserdaten['uname']."</a>";
}
} else {
echo "<a href=\"modules/user_pics/media/images/nopic.gif\" class=\"highslide\" onclick=\"return hs.expand(this)\"><img src=\"modules/user_pics/media/images/nopic.gif\" width=\"75\"><br>".$fromuserdaten['uname']."</a>";
}



	  echo "<br></td><td width=\"100%\"><a name=\"GB\"></a>";
		
echo "<table width=\"100%\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">
  <tr> 
    <td width=\"18\"><img src=\"images/designbox/box2_tl.gif\" width=\"18\" height=\"9\" /></td>
    <td width=\"100%\" background=\"images/designbox/box_t.gif\"><img src=\"images/designbox/box_t.gif\" width=\"28\" height=\"9\"></td>
    <td width=\"9\"><img src=\"images/designbox/box2_tr.gif\" width=\"9\" height=\"9\" /></td>
  </tr>
    <tr> 
    <td valign=\"top\" background=\"images/designbox/box2_ml.gif\"><img src=\"images/designbox/box2_ml.gif\" width=\"18\" height=\"10\" /></td>
    <td width=\"100%\" bgcolor=\"#EFEFEF\" style=\"border-bottom: 1px dotted black;\"><a href=\"modules.php?name=Userinfo&uname=".$fromuserdaten['uname']."\">".$fromuserdaten['uname']." - ".$eintragzeitausgabe."</a>";
	if ($groupadmin['uname'] == $cookie['uname']) {
	echo "&nbsp;&nbsp;<a href=\"modules.php?name=user_groups&file=view&option=del&gid=".$eintrag['gid']."&groupid=".$groupid."#GB\">[Löschen]</a>";
	}
	if (MX_IS_ADMIN) {
	echo "&nbsp;&nbsp;<a href=\"modules.php?name=user_groups&file=view&option=del&gid=".$eintrag['gid']."&groupid=".$groupid."#GB\">[ADMIN - Löschen]</a>";
	}	
	echo "</td>
    <td background=\"images/designbox/box_mr.gif\"><img src=\"images/designbox/box_mr.gif\" width=\"9\" height=\"19\" /></td>
  </tr>
  <tr> 
    <td valign=\"top\" background=\"images/designbox/box2_ml.gif\"><img src=\"images/designbox/box2_mm.gif\" width=\"18\" height=\"10\" /></td>
    <td width=\"100%\" bgcolor=\"#EFEFEF\">".$eintrag['text']."</td>
    <td background=\"images/designbox/box_mr.gif\"><img src=\"images/designbox/box_mr.gif\" width=\"9\" height=\"19\" /></td>
  </tr>
  <tr> 
    <td><img src=\"images/designbox/box2_bl.gif\" width=\"18\" height=\"9\" /></td>
    <td background=\"images/designbox/box_b.gif\" ><img src=\"images/designbox/box_b.gif\" width=\"28\" height=\"9\" /></td>
    <td><img src=\"images/designbox/box_br.gif\" width=\"9\" height=\"9\" /></td>
  </tr>
</table>";

echo "</td></tr></table>";
}
echo "<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" >
	  <tr><td align=\"center\" valign=\"center\">";

$fromuserausgabe = $cookie['uname'];
echo "<form action=\"modules.php?name=user_groups\" method=\"post\" name=\"eingabe\" id=\"coolsus\">\n";
echo "<textarea name=\"text\" wrap=\"virtual\" cols=\"60\" rows=\"10\"
OnFocus=\"CountMax();\" OnClick=\"CountMax();\" ONCHANGE=\"CountMax();\" onKeydown=\"CountMax();\" onKeyup=\"CountMax();\"></textarea><br>\n";
		 
			echo "<br>Noch <input name=\"rv_counter\" type=\"TEXT\" size=\"4\" maxlength=\"3\" value=\"255\" readonly> Zeichen <br>";
	
			echo "<input type=\"hidden\" name=\"name\" value=\"user_groups\">";
			echo "<input type=\"hidden\" name=\"op\" value=\"gbinput\">";
			echo "<input type=\"hidden\" name=\"togroup\" value=\"".mxPrepareToDisplay($groupid)."\">";
			echo "<input type=\"hidden\" name=\"fromuser\" value=\"".mxPrepareToDisplay($fromuserausgabe)."\">";
			echo "<INPUT TYPE=\"SUBMIT\" VALUE=\"Eintragen\">\n";
			echo "</form>";
			
echo "</table></tr></td>";
}
if ($groupsettings['gb'] == "2") {

echo "<br><br><br><center> Das Gruppengästebuch wurde vom Gruppen-Admin deaktiviert.</center><br><br>";

}
		
		?>
	
	
	
	</td>
  </tr>
</table>

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" >
  <!--DWLayoutTable-->
  <tr> 
    <td align="center"><?php 
	if(MX_IS_ADMIN) {
	 echo "<br><br><a href=\"modules.php?name=user_groups&file=view&option=delgroup&groupid=".$groupid."\" onClick=\"JavaScript: return confirm('Gruppe wirklich löschen ?');\">Admin - Gruppe löschen</a><br>";
	}
	 ?>	
	</td>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr> 
    <td height="35" valign="bottom"> <div align="center"><?php echo "".$copyright.""; ?></div></td>
  </tr>
</table>
<?php

include("footer.php");
	
?>
