Location: PHPKode > projects > SnortSMS > snortsms/variables/dsp_home.php
<?

function PrintLimited($len,$text)
	{
//	if(length($text) > $len)
//		{
//		$text = substr($text, 0, $len);
//		$text .= "...";
//		}
	return $text;	
	}
	


/***************************************************************************
 *   Copyright (C) 2005 by J Randolph Smith                                *
 *   hide@address.com                                                *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

include_once("FMK_lib/func_DrawRepHeader.php");

DrawRepHeader("Variables");
?>

<script src="java/checkall.js" type="text/javascript"></script>

<FORM name="CheckForm" action="index.php?fmk=variables.action" method="POST">
<div align="center">
<table border="0" class="bg1" cellspacing="1" cellpadding="0">
<tr><td>



<table border="0" width="100%" class="bg4" cellspacing="0" cellpadding="2">
<tr class="combo1"><th>&nbsp;</th><th>&nbsp;</th><th>Variable Name</th><th>Value</th></tr>
<?
if($rsVaris_total == 0 )
	{
	?>
	<TR><TD align="center" colspan="3"><BR><BR><B>None Defined - Please Add some Variables</B><BR><BR><BR></TD></TR>
	<?
	}
else
	{
	while($row=$rsVaris->fetchRow(DB_FETCHMODE_ASSOC))
		{
		$temp_back = ( $temp_back == "bg2" ? "bg4" : "bg2");
		$vartype = ( $row['vartype'] == 1 ? "portvar" : "var" );
		?>
		<tr class="<?=$temp_back?>">
		<td nowrap><input type=checkbox name="FRM_row[]" value="<?=$row['id']?>">
		<a href="index.php?fmk=variables.edit&FRM_id=<?=$row['id']?>" title="Edit Variable"><img src="images/note-1.gif" border="0" width="15" height="16"></a></td>
		<td align="right"><B><?=$vartype?></B></td>
		<td><?=$row['varname']?></td>
		<td><?=wordwrap($row['varvalue'], 60, "<br>",1)?></td>	
		</tr>
		<?
		}	
	}
?>


</table>




</td>
</tr>
<tr>
<td>





<TABLE border="0" width="100%" class="bg4">
<tr>
<td>
<a href="javascript:void(0)" onClick="CheckAllINBOX();">[Toggle All]</a>
<B>Action:</B>
<SELECT name="FRM_action">
<OPTION>-Choose Action-</OPTION>
<OPTION value="Delete">Delete</OPTION>
</SELECT>
<INPUT type="submit" value="Submit">
</td>
<td align="right">
<a href="index.php?fmk=variables.new">[New Variable]</a> 
</td>
</tr>
</table>





</td>
</tr>
</table>
</div>
</form>
Return current item: SnortSMS