Ejemplo n.º 1
0
function uddeIMshowUsersettings($option, $task, $act, $config) {
	// $mosConfig_offset = uddeIMgetOffset();
	$database = uddeIMgetDatabase();
	$emnid = intval( uddeIMmosGetParam( $_POST, 'id', '' ) );

	switch($act) {
	//	case "autor":	uddeIMchangeAutor($option, $task, $emnid, $config);		break;
		case "popup":		uddeIMchangePopup($option, $task, $emnid, $config);		break;
		case "public":		uddeIMchangePublic($option, $task, $emnid, $config);	break;
		case "status":		uddeIMchangeStatus($option, $task, $emnid, $config);	break;
		case "locked":		uddeIMchangeLocked($option, $task, $emnid, $config);	break;
		case "moderated":	uddeIMchangeModerated($option, $task, $emnid, $config);	break;
	}

	// get parameter from filter
	$f_param = array();
	$f_where = array();

	$f_param[0] = uddeIMmosGetParam($_POST, 'f_username', '');
	if($f_param[0]!="") $f_where[] = "b.username LIKE '$f_param[0]%'";

	$f_param[1] = uddeIMmosGetParam($_POST, 'f_name', '');
	if($f_param[1]!="") $f_where[] = "b.name LIKE '$f_param[1]%'";

	$f_param[2] = uddeIMmosGetParam($_POST, 'f_status', '');
	if($f_param[2]!="") $f_where[] = "a.status='$f_param[2]'";

	$f_param[3] = uddeIMmosGetParam($_POST, 'f_popup', '');
	if($f_param[3]!="") $f_where[] = "a.popup='$f_param[3]'";

	$f_param[4] = uddeIMmosGetParam($_POST, 'f_public', '');
	if($f_param[4]!="") $f_where[] = "a.public='$f_param[4]'";

	$f_param[5] = uddeIMmosGetParam($_POST, 'f_id', '');
	if($f_param[5]!="") $f_where[] = "a.id IS $f_param[5]";

	$f_param[6] = uddeIMmosGetParam($_POST, 'f_autor', '');
	if($f_param[6]!="") $f_where[] = "a.autoresponder='$f_param[6]'";

	$f_param[7] = uddeIMmosGetParam($_POST, 'f_autof', '');
	if($f_param[7]!="") $f_where[] = "a.autoforward='$f_param[7]'";

	$f_param[8] = uddeIMmosGetParam($_POST, 'f_locked', '');
	if($f_param[8]!="") $f_where[] = "a.locked='$f_param[8]'";

	$f_param[9] = uddeIMmosGetParam($_POST, 'f_moderated', '');
	if($f_param[9]!="") $f_where[] = "a.moderated='$f_param[9]'";

	$limit      = intval( uddeIMmosGetParam( $_POST, 'limit', 10 ) );
	$limitstart = intval( uddeIMmosGetParam( $_POST, 'limitstart', 0 ) );
	$where = count($f_where) ? " WHERE " . implode(' AND ', $f_where) : "";

	$sql="SELECT count(b.id) FROM #__uddeim_emn AS a RIGHT JOIN #__users AS b ON a.userid=b.id".$where;
	$database->setQuery($sql);
	$total = (int)$database->loadResult();
	if ($limit==0) {
		$limit = $total;
		$limitstart = 0;
	}
	if ($limitstart>=$total)
		$limitstart = 0;

// echo($sql." ==> ".$total."<br />");

	$sql  = "SELECT a.*,b.id AS uid,b.name,b.username,b.block ";
	$sql .= "FROM #__uddeim_emn AS a RIGHT JOIN #__users AS b ON a.userid=b.id";
	$sql .= $where;
	$sql .= " ORDER BY name LIMIT $limitstart,$limit";
	$database->setQuery($sql);
	$rows = $database->loadObjectList();

// echo($sql."<br />");

	// include_once(uddeIMgetPath('absolute_path')."/administrator/includes/pageNavigation.php");
	$pageNav = new uddeIMmosPageNav( $total, $limitstart, $limit  );

	$sql="SELECT username,name FROM #__users WHERE block!='1' ORDER BY username";
	$database->setQuery($sql);
	$results = $database->loadObjectList();

	$results = array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z");
	
	$the_username='******';
	if ($f_param[0]=="") $the_username.=' selected';
	$the_username.='>'._UDDEADM_USERSET_SELUSERNAME.'</option>';
	foreach($results as $result) {
		$the_username.='<option value="'.$result.'"';
		if ($result==$f_param[0]) $the_username.=' selected';
		$the_username.='>'.$result.'...</option>';
	}
	$the_username.="</select>";

	$the_name='<select id="f_name" class="text" name="f_name" size="1"><option value=""';
	if ($f_param[1]=="") $the_name.=' selected';
	$the_name.='>'._UDDEADM_USERSET_SELNAME.'</option>';
	foreach($results as $result) {
		$the_name.='<option value="'.$result.'"';
		if ($result==$f_param[1]) $the_name.=' selected';
		$the_name.='>'.$result.'...</option>';
	}
	$the_name.="</select>";

//			<h4><img align="middle" style="display: inline;" src="<?php echo uddeIMgetPath('live_site')."/administrator/images/inbox.png"; " />&nbsp;<?php echo _UDDEADM_USERSET_EDITSETTINGS; </h4>
    ?>
    <form action="<?php echo uddeIMredirectIndex(); ?>" method="post" name="adminForm" id='adminForm'>

	<div align="center">
    <table cellpadding="4" cellspacing="0" border="0" width="98%">
	<tr>
		<td class="sectionname" align="left">
			<h4><?php echo _UDDEADM_USERSET_EDITSETTINGS; ?></h4>
		</td>
		<td class="sectionname" align="right">
			<img align="middle" style="display: inline; border:1px solid lightgray;" src="<?php echo uddeIMgetPath('live_site')."/components/com_uddeim/templates/images/uddeim_logo.png"; ?>" />
		</td>
	</tr>
	</table>
	</div>

	<table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist">
	<tr>
		<td nowrap="nowrap" width="100%" align="left"><?php echo $pageNav->writeLimitBox('?option=$option&task=$task'); ?></td>
		<td>
<?php
	$id_items_arr[] = mosHTML::makeOption('', _UDDEADM_USERSET_SELENTRY);
	$id_items_arr[] = mosHTML::makeOption('NOT NULL', _UDDEADM_USERSET_EXISTING);
	$id_items_arr[] = mosHTML::makeOption('NULL', _UDDEADM_USERSET_NONEXISTING);
	echo mosHTML::selectList($id_items_arr, 'f_id', 'size="1" class="text"', 'value', 'text', $f_param[5]);
?>
		</td>
		<td><?php echo $the_username; ?></td>
		<td><?php echo $the_name; ?></td>
		<td>
<?php
	$status_arr[] = mosHTML::makeOption('', _UDDEADM_USERSET_SELNOTIFICATION);
	$status_arr[] = mosHTML::makeOption('0', _UDDEADM_USERSET_NONOTIFICATION);
	$status_arr[] = mosHTML::makeOption('1', _UDDEADM_USERSET_ALWAYS);
	$status_arr[] = mosHTML::makeOption('2', _UDDEADM_USERSET_WHENOFFLINE);
	$status_arr[] = mosHTML::makeOption('10', _UDDEADM_USERSET_ALWAYSEXCEPT);
	$status_arr[] = mosHTML::makeOption('20', _UDDEADM_USERSET_WHENOFFLINEEXCEPT);
	echo mosHTML::selectList($status_arr, 'f_status', 'size="1" class="text"', 'value', 'text', $f_param[2]);
?>
		</td>
		<td>
<?php
	$popup_items_arr[] = mosHTML::makeOption('', _UDDEADM_USERSET_SELPOPUP);
	$popup_items_arr[] = mosHTML::makeOption('0', _UDDEADM_USERSET_NO);
	$popup_items_arr[] = mosHTML::makeOption('1', _UDDEADM_USERSET_YES);
	echo mosHTML::selectList($popup_items_arr, 'f_popup', 'size="1" class="text"', 'value', 'text', $f_param[3]);
?>
		</td>
		<td>
<?php
	$public_items_arr[] = mosHTML::makeOption('', _UDDEADM_USERSET_SELPUBLIC);
	$public_items_arr[] = mosHTML::makeOption('0', _UDDEADM_USERSET_NO);
	$public_items_arr[] = mosHTML::makeOption('1', _UDDEADM_USERSET_YES);
	echo mosHTML::selectList($public_items_arr, 'f_public', 'size="1" class="text"', 'value', 'text', $f_param[4]);
?>
		</td>
		<td>
<?php
	$autor_items_arr[] = mosHTML::makeOption('', _UDDEADM_USERSET_SELAUTOR);
	$autor_items_arr[] = mosHTML::makeOption('0', _UDDEADM_USERSET_NO);
	$autor_items_arr[] = mosHTML::makeOption('1', _UDDEADM_USERSET_YES);
	echo mosHTML::selectList($autor_items_arr, 'f_autor', 'size="1" class="text"', 'value', 'text', $f_param[6]);
?>
		</td>
		<td>
<?php
	$autof_items_arr[] = mosHTML::makeOption('', _UDDEADM_USERSET_SELAUTOF);
	$autof_items_arr[] = mosHTML::makeOption('0', _UDDEADM_USERSET_NO);
	$autof_items_arr[] = mosHTML::makeOption('1', _UDDEADM_USERSET_YES);
	echo mosHTML::selectList($autof_items_arr, 'f_autof', 'size="1" class="text"', 'value', 'text', $f_param[7]);
?>
		</td>
		<td>
<?php
	$moderated_items_arr[] = mosHTML::makeOption('', _UDDEADM_USERSET_SELMODERATE);
	$moderated_items_arr[] = mosHTML::makeOption('0', _UDDEADM_USERSET_NO);
	$moderated_items_arr[] = mosHTML::makeOption('1', _UDDEADM_USERSET_YES);
	echo mosHTML::selectList($moderated_items_arr, 'f_moderated', 'size="1" class="text"', 'value', 'text', $f_param[9]);
?>
		</td>
		<td>
<?php
	$locked_items_arr[] = mosHTML::makeOption('', _UDDEADM_USERSET_SELLOCKED);
	$locked_items_arr[] = mosHTML::makeOption('0', _UDDEADM_USERSET_NO);
	$locked_items_arr[] = mosHTML::makeOption('1', _UDDEADM_USERSET_YES);
	echo mosHTML::selectList($locked_items_arr, 'f_locked', 'size="1" class="text"', 'value', 'text', $f_param[8]);
?>
		</td>
		<td>
			<input type="submit" class="button" value="<?php echo _UDDEADM_ADMIN_FILTER; ?>" />
		</td>
	</tr>
	</table>

	<br />

	<table class="adminlist">
	<tr>
<?php if (uddeIMcheckJversion()>=7) {		// Joomla 3.2 or higher ?>
	<th class="title" width="4%"><input type="checkbox" name="toggle" value="" onclick="Joomla.checkAll(this);" /></th>
<?php } else { ?>
	<th class="title" width="4%"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count( $rows ); ?>);" /></th>
<?php } ?>
		<th class="title" width="4%"><?php echo "UID"; ?></th>
		<th class="title" width="4%"><?php echo "ID"; ?></th>
		<th class="title" nowrap="nowrap"><?php echo _UDDEADM_USERSET_USERNAME; ?></th>
		<th class="title"><?php echo _UDDEADM_USERSET_NAME; ?></th>
		<th class="title"><?php echo _UDDEADM_USERSET_NOTIFICATION; ?></th>
		<th class="title"><?php echo _UDDEADM_USERSET_POPUP; ?></th>
		<th class="title"><?php echo _UDDEADM_USERSET_PUBLIC; ?></th>
		<th class="title"><?php echo _UDDEADM_USERSET_AUTOR; ?></th>
		<th class="title"><?php echo _UDDEADM_USERSET_AUTOF; ?></th>
		<th class="title"><?php echo _UDDEADM_USERSET_MODERATE; ?></th>
		<th class="title"><?php echo _UDDEADM_USERSET_LOCKED; ?></th>
		<th class="title" nowrap="nowrap"><?php echo _UDDEADM_USERSET_LASTACCESS; ?></th>
		<th class="title" nowrap="nowrap"><?php echo _UDDEADM_USERSET_LASTSENT; ?></th>
	</tr>
<?php
	$k = 0;
	for($i=0, $n=count( $rows ); $i < $n; $i++)
	{
		$row = &$rows[$i];
		echo "<tr class='row$k'>";
		if (uddeIMcheckJversion()>=7) {		// Joomla 3.2 or higher
			echo "<td width='5%'><input type='checkbox' id='cb$i' name='uddeid[]' value='$row->uid' onclick='Joomla.isChecked(this.checked);' /></td>";
		} else {
			echo "<td width='5%'><input type='checkbox' id='cb$i' name='uddeid[]' value='$row->uid' onclick='isChecked(this.checked);' /></td>";
		}
		echo "<td align='left'>$row->uid</td>";
		echo "<td align='left'>". (is_null($row->id) ? "-" : "$row->id") ."</td>";
		echo "<td align='left'>$row->username</td>";
		echo "<td align='left'>$row->name</td>";
		echo "<td align='left'>";
		if (is_null($row->status)) { 
			echo "(";
			switch($config->notifydefault) {
				case 0: echo _UDDEADM_USERSET_NONOTIFICATION; break;
				case 1: echo _UDDEADM_USERSET_ALWAYS; break;
				case 2: echo _UDDEADM_USERSET_WHENOFFLINE; break;
				case 10: echo _UDDEADM_USERSET_ALWAYSEXCEPT; break;
				case 20: echo _UDDEADM_USERSET_WHENOFFLINEEXCEPT; break;
				default: echo _UDDEADM_USERSET_UNKNOWN; break;
			}
			echo ")";
		} else {
			echo "<a href='javascript:document.adminForm.act.value=\"status\"; document.adminForm.id.value=\"".$row->id."\"; document.adminForm.submit();'>";
//			echo "<a href='indexX.php?option=$option&task=$task&act=status&id=$row->id'>";
			switch($row->status) {
				case 0: echo _UDDEADM_USERSET_NONOTIFICATION; break;
				case 1: echo _UDDEADM_USERSET_ALWAYS; break;
				case 2: echo _UDDEADM_USERSET_WHENOFFLINE; break;
				case 10: echo _UDDEADM_USERSET_ALWAYSEXCEPT; break;
				case 20: echo _UDDEADM_USERSET_WHENOFFLINEEXCEPT; break;
				default: echo _UDDEADM_USERSET_UNKNOWN; break;
			}
			echo "</a>";
		}
		echo "</td>";
		echo "<td align='left'>";
		if (is_null($row->popup)) { 
			uddeIMshowTick($config->popupdefault,true);
		} else {
			// echo "<a href='javascript:document.adminForm.act.value=\"popup\"; document.adminForm.id.value=\"".$row->id."\"; document.adminForm.submit();'>".($row->popup ? _UDDEADM_USERSET_YES : _UDDEADM_USERSET_NO)."</a>";
			echo "<a href='javascript:document.adminForm.act.value=\"popup\"; document.adminForm.id.value=\"".$row->id."\"; document.adminForm.submit();'>";
			uddeIMshowTick($row->popup);
			echo "</a>";
//			echo "<a href='indexX.php?option=$option&task=$task&act=popup&id=$row->id'>".($row->popup ? _UDDEADM_USERSET_YES : _UDDEADM_USERSET_NO)."</a>";
		}
		echo "</td>";
		echo "<td align='left'>";
		if (is_null($row->public)) { 
			uddeIMshowTick($config->pubfrontenddefault,true);
		} else {
			echo "<a href='javascript:document.adminForm.act.value=\"public\"; document.adminForm.id.value=\"".$row->id."\"; document.adminForm.submit();'>";
			uddeIMshowTick($row->public);
			echo "</a>";
//			echo "<a href='indexX.php?option=$option&task=$task&act=public&id=$row->id'>".($row->public ? _UDDEADM_USERSET_YES : _UDDEADM_USERSET_NO)."</a>";
		}
		echo "</td>";
		echo "<td align='left'>";
		if (is_null($row->autoresponder)) { 
			uddeIMshowTick(0,true);	// default is 0"
		} else {
//			echo "<a href='javascript:document.adminForm.act.value=\"autor\"; document.adminForm.id.value=\"".$row->id."\"; document.adminForm.submit();'>".($row->autoresponder ? _UDDEADM_USERSET_YES : _UDDEADM_USERSET_NO)."</a>";
			echo "<a href='javascript:document.adminForm.task.value=\"editautoresponder\"; document.adminForm.id.value=\"".$row->id."\"; document.adminForm.submit();'>";
			uddeIMshowTick($row->autoresponder);
			echo "</a>";
		}
		echo "</td>";
		echo "<td align='left'>";
		if (is_null($row->autoforward)) { 
			uddeIMshowTick(0,true);	// default is "0"
		} else {
			echo "<a href='javascript:document.adminForm.task.value=\"editautoforward\"; document.adminForm.id.value=\"".$row->id."\"; document.adminForm.submit();'>";
			uddeIMshowTick($row->autoforward);
			echo "</a>";
		}
		echo "</td>";
		echo "<td align='left'>";
		if (is_null($row->moderated)) { 
			uddeIMshowTick(0,true);	// default is "0"
		} else {
			echo "<a href='javascript:document.adminForm.act.value=\"moderated\"; document.adminForm.id.value=\"".$row->id."\"; document.adminForm.submit();'>";
			uddeIMshowTick($row->moderated);
			echo "</a>";
		}
		echo "</td>";
		echo "<td align='left'>";
		if (is_null($row->locked)) { 
			uddeIMshowTick(0,true);	// default is "0"
		} else {
			echo "<a href='javascript:document.adminForm.act.value=\"locked\"; document.adminForm.id.value=\"".$row->id."\"; document.adminForm.submit();'>";
			uddeIMshowTick($row->locked);
			echo "</a>";
		}
		echo "</td>";
		echo "<td align='left'>";
		if (is_null($row->remindersent)) { 
			echo "---";
		} else {
			echo $row->remindersent ? date("Y-m-d H:i:s", $row->remindersent + (3600*uddeIMgetUserTZ())) : "-";
		}
		echo "</td>";
		echo "<td align='left'>";
		if (is_null($row->lastsent)) { 
			echo "---";
		} else {
			echo $row->lastsent ? date("Y-m-d H:i:s", $row->lastsent + (3600*uddeIMgetUserTZ())) : "-";
		}
		echo "</td>";
		echo "</tr>\n";
		$k = 1 - $k;
	}
?>
<tr>
	<th align="center" colspan="14" ><div id='uddeim-pagenav'><?php echo $pageNav->writePagesLinks(); ?></div></th>
</tr>
<tr>
	<td align="center" colspan="14"><?php echo $pageNav->writePagesCounter(); ?></td>
</tr>
</table>
	<input type="hidden" name="option" value="<?php echo $option;?>" />
	<input type="hidden" name="task" value="<?php echo $task;?>" />
	<input type="hidden" name="act" value="" />
	<input type="hidden" name="id" value="" />
	<input type="hidden" name="boxchecked" value="0" />
	<input type="hidden" name="hidemainmenu" value="0" />
<?php
	if (uddeIMcheckJversion()>=1) {
		echo "<input type=\"hidden\" name=\"limitstart\" value=\"".(int)$limitstart."\" />";
	}
	// $version = uddeIMgetVersion();
	// if ($version->PRODUCT == "Joomla!" || $version->PRODUCT == "Accessible Joomla!")
	// 	if (strncasecmp($version->RELEASE, "1.0", 3)) {
	// 		echo "<input type=\"hidden\" name=\"limitstart\" value=\"".(int)$limitstart."\" />";
	// 	}
?>
</form>
<?php
}
Ejemplo n.º 2
0
function uddeIMshowMCP($option, $task, $act, $config) {
	$mosConfig_offset = uddeIMgetOffset();
	$database = uddeIMgetDatabase();
	$version = uddeIMgetVersion();
	$emnid = intval( uddeIMmosGetParam( $_POST, 'id', '' ) );
	
	uddeIMaddScript(uddeIMgetPath('live_site')."/components/com_uddeim/js/uddeimtools.js");

	switch($act) {
		case "delete":	uddeIMdeleteOneMessage($option, $task, $act, $emnid, $config);		break;
		case "deliver":	uddeIMdeleteOneMessage($option, $task, $act, $emnid, $config);		break;
	}

	// get parameter from filter
	$f_param = array();
	$f_where = array();

	$f_param[0] = uddeIMmosGetParam($_POST, 'f_username', '');
	if($f_param[0]!="") $f_where[] = "ufrom.username LIKE '$f_param[0]%'";

	$f_param[1] = uddeIMmosGetParam($_POST, 'f_name', '');
	if($f_param[1]!="") $f_where[] = "ufrom.name LIKE '$f_param[1]%'";

	$limit      = intval( uddeIMmosGetParam( $_POST, 'limit', 10 ) );
	$limitstart = intval( uddeIMmosGetParam( $_POST, 'limitstart', 0 ) );
	$where = count($f_where) ? " WHERE `delayed`<>0 " . implode(' AND ', $f_where) : " WHERE `delayed`<>0";

	$sql  = "SELECT count(id) FROM #__uddeim".$where;
	$database->setQuery($sql);
	$total = (int)$database->loadResult();
	if ($limit==0) {
		$limit = $total;
		$limitstart = 0;
	}
	if ($limitstart>=$total)
		$limitstart = 0;

// echo($sql." ==> ".$total."<br />");

	$sql  = "SELECT a.totrash AS trashinbox, a.totrashoutbox AS trashoutbox, a.*, ufrom.name AS fromname, 
						   uto.name AS toname,
						 ufrom.username AS fromusername, 
						   uto.username AS tousername,
						       ufrom.id AS fromid,
						         uto.id AS toid
				FROM ((#__uddeim AS a LEFT JOIN #__users AS ufrom ON a.fromid = ufrom.id) 
							         LEFT JOIN #__users AS uto   ON a.toid   = uto.id)";
	$sql .= $where;
	$sql .= " ORDER BY a.id DESC LIMIT $limitstart,$limit";
	$database->setQuery($sql);
	$rows = $database->loadObjectList();
	
	// echo($sql."<br />");

	// include_once(uddeIMgetPath('absolute_path')."/administrator/includes/pageNavigation.php");
	$pageNav = new uddeIMmosPageNav( $total, $limitstart, $limit  );

	$query="SELECT username,name FROM #__users WHERE block!='1' ORDER BY username";
	$database->setQuery($query);
	$results = $database->loadObjectList();

	$results = array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z");
	
	$the_username='******';
	if ($f_param[0]=="") $the_username.=' selected';
	$the_username.='>'._UDDEADM_USERSET_SELUSERNAME.'</option>';
	foreach($results as $result) {
		$the_username.='<option value="'.$result.'"';
		if ($result==$f_param[0]) $the_username.=' selected';
		$the_username.='>'.$result.'...</option>';
	}
	$the_username.="</select>";

	$the_name='<select id="f_name" class="text" name="f_name" size="1"><option value=""';
	if ($f_param[1]=="") $the_name.=' selected';
	$the_name.='>'._UDDEADM_USERSET_SELNAME.'</option>';
	foreach($results as $result) {
		$the_name.='<option value="'.$result.'"';
		if ($result==$f_param[1]) $the_name.=' selected';
		$the_name.='>'.$result.'...</option>';
	}
	$the_name.="</select>";

//			<h4><img align="middle" style="display: inline;" src="<?php echo uddeIMgetPath('live_site')."/administrator/images/inbox.png";          " />&nbsp;<?php echo _UDDEADM_MCP_EDIT;               </h4>
    ?>
    <form action="<?php echo uddeIMredirectIndex(); ?>" method="post" name="adminForm" id='adminForm'>

	<div align="center">
    <table cellpadding="4" cellspacing="0" border="0" width="98%">
	<tr>
		<td class="sectionname" align="left">
			<h4><?php echo _UDDEADM_MCP_EDIT; ?></h4>
		</td>
		<td class="sectionname" align="right">
			<img align="middle" style="display: inline; border:1px solid lightgray;" src="<?php echo uddeIMgetPath('live_site')."/components/com_uddeim/templates/images/uddeim_logo.png"; ?>" />
		</td>
	</tr>
	</table>
	</div>

	<table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist">
	<tr>
		<td width="100%" align="left"><?php echo $pageNav->writeLimitBox('?option=$option&task=$task'); ?></td>
		<td><?php echo $the_username; ?></td>
		<td><?php echo $the_name; ?></td>
		<td>
			<input type="submit" value="<?php echo _UDDEADM_ADMIN_FILTER; ?>" />
		</td>
	</tr>
	</table>

	<br />

	<table class="adminlist">
	<tr>
		<th class="title" width="4%"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count( $rows ); ?>);" /></th>
		<th class="title" width="4%"><?php echo "ID"; ?></th>
		<th class="title" width="4%"><?php echo _UDDEADM_MCP_TRASHED; ?></th>
		<th class="title" nowrap="nowrap"><?php echo _UDDEADM_MCP_FROM; ?></th>
		<th class="title" width="4%"><?php echo _UDDEADM_MCP_TRASHED; ?></th>
		<th class="title" nowrap="nowrap"><?php echo _UDDEADM_MCP_TO; ?></th>
		<th class="title"><?php echo _UDDEADM_MCP_DELIVER; ?></th>
		<th class="title"><?php echo _UDDEADM_MCP_DELETE; ?></th>
		<th class="title" nowrap="nowrap"><?php echo _UDDEADM_MCP_DATE; ?></th>
	</tr>
<?php
	$k = 0;
	for($i=0, $n=count( $rows ); $i < $n; $i++)
	{
		$row = &$rows[$i];
		echo "<tr class='row$k'>";
		echo "<td width='5%'><input type='checkbox' id='cb$i' name='uddeid[]' value='$row->id' onclick='isChecked(this.checked);' /></td>";
		echo "<td align='left'>$row->id</td>";
		echo "<td align='left'>";
			echo uddeIMshowValueNULL($row->trashoutbox);
		echo "</td>";
		echo "<td align='left'>";
			if ($row->fromid)
				echo "Public: $row->fromname ($row->fromusername)";
			else
				echo "$row->publicname ($row->publicemail)";
		echo "</td>";
		echo "<td align='left'>";
			echo uddeIMshowValueNULL($row->trashinbox);
		echo "</td>";
		echo "<td align='left'>";
			echo "$row->toname ($row->tousername)";
		echo "</td>";
		echo "<td align='left'>";
			if ($row->delayed) {
				echo "<a href='#' onclick='document.adminForm.act.value=\"deliver\"; document.adminForm.id.value=\"".$row->id."\"; if (confirm(\""._UDDEADM_MCP_NOTEDELIVER."\")) document.adminForm.submit(); return false;'>";
				uddeIMshowTick(true,false);		// show tick, opaque (false)
				echo "</a>";
			} else {
				uddeIMshowTick(false,true);		// show cross, opaque (false)
			}
		echo "</td>";
		echo "<td align='left'>";
			if (is_null($row->trashoutbox) && is_null($row->trashinbox)) {
				// message already deleted
			} else {
				echo "<a href='#' onclick='document.adminForm.act.value=\"delete\"; document.adminForm.id.value=\"".$row->id."\"; if (confirm(\""._UDDEADM_MCP_NOTEDEL."\")) document.adminForm.submit(); return false;'>";
				uddeIMshowTick(false,($row->trashoutbox && $row->trashinbox));	// show cross, not opaque (opaque, wenn beide true)
				echo "</a>";
			}
		echo "</td>";
		echo "<td align='left'>";
			echo date("Y-m-d H:i:s", $row->datum + (3600*uddeIMgetUserTZ()));
		echo "</td>";
		echo "</tr>\n";
		
		echo "<tr class='row$k'>";
		echo "<td align='left'></td>";
		echo "<td align='left'></td>";
		echo "<td align='left' colspan='7'>";
			echo "<div style='text-align:right;'><a href='javascript:uddeIMtoggleLayer(\"".$i."\");'>"._UDDEADM_MCP_SHOWHIDE."</a></div>";
			echo "<div id='uddeimdivlayer_".$i."' style='display:none;'>";
			// $dm = uddeIMdecrypt($row->message, "", $row->cryptmode);
			$dm = uddeIMgetMessage($row->message, "", $row->cryptmode, $row->crypthash, $config->cryptkey);
			echo $dm;
			echo "</div>";
		echo "</td>";
		echo "</tr>\n";

		$k = 1 - $k;
	}
?>
<tr>
	<th align="center" colspan="9"><?php echo $pageNav->writePagesLinks(); ?></th>
</tr>
<tr>
	<td align="center" colspan="9"><?php echo $pageNav->writePagesCounter(); ?></td>
</tr>
</table>
	<input type="hidden" name="option" value="<?php echo $option;?>" />
	<input type="hidden" name="task" value="<?php echo $task;?>" />
	<input type="hidden" name="act" value="" />
	<input type="hidden" name="id" value="" />
	<input type="hidden" name="boxchecked" value="0" />
	<input type="hidden" name="hidemainmenu" value="0" />
<?php
	if ($version->PRODUCT == "Joomla!" || $version->PRODUCT == "Accessible Joomla!")
		if (strncasecmp($version->RELEASE, "1.0", 3)) {
			echo "<input type=\"hidden\" name=\"limitstart\" value=\"".(int)$limitstart."\" />";
		}
?>
</form>
<?php
}