Exemplo n.º 1
0
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

IF($_POST['submit']) {
	//Add / edit trigger

	IF($VA_setup['file_trigger_edit_class'] > USR_CLASS) {
		Die(VA_Message($err_msg_no_access));
		}
	
	$_POST['command'] = $DB_hub->Real_Escape_String($_POST['command']);
	$_POST['def'] = $DB_hub->Real_Escape_String($_POST['def']);
	$_POST['send_as'] = $DB_hub->Real_Escape_String($_POST['send_as']);
	$_POST['descr'] = $DB_hub->Real_Escape_String($_POST['descr']);

	$flags = Array_Sum($_POST['flags']);
	
	$query  = "REPLACE INTO file_trigger \n";
	$query .= "(command, send_as, def, descr, min_class, max_class, flags) \n";
	$query .= "VALUES ('".$_POST['command']."', '".$_POST['send_as']."', '".$_POST['def']."', '".$_POST['descr']."', '".$_POST['min_class']."', '".$_POST['max_class']."', '".$flags."')";
	$DB_hub->Query($query);

	StoreQueries();
	
	//Return to file_triggers
	Header("Location: index.php?".Change_URL_Query("q", "file_trigger"));
	Die();
	}
?>
	
<FONT class="h2"><?Print $text_edit_trigger;?></FONT>
Exemplo n.º 2
0
	</TR><TR>
		<TD class="bg_light b">&nbsp;&nbsp;<?Print $text_received;?>&nbsp;&nbsp;</TD>
		<TD class="bg_light right">&nbsp;&nbsp;<?Print RoundShare($mysql_stat['Bytes_received']);?>&nbsp;&nbsp;</TD>
		<TD class="bg_light right">&nbsp;&nbsp;<?Print RoundShare($mysql_stat['Bytes_received'] / $mysql_stat['Uptime']);?>/s&nbsp;&nbsp;</TD>
		<TD class="bg_light right" colspan=2>&nbsp;&nbsp;<?Print RoundShare($mysql_stat['Bytes_received'] / Array_Sum($queries))."/".$text_query;?>&nbsp;&nbsp;</TD>
		<TD class="bg_light" colspan=2>&nbsp;</TD>
	</TR><TR>
		<TD class="bg_light b">&nbsp;&nbsp;<?Print $text_sent;?>&nbsp;&nbsp;</TD>
		<TD class="bg_light right">&nbsp;&nbsp;<?Print RoundShare($mysql_stat['Bytes_sent']);?>&nbsp;&nbsp;</TD>
		<TD class="bg_light right">&nbsp;&nbsp;<?Print RoundShare($mysql_stat['Bytes_sent'] / $mysql_stat['Uptime']);?>/s&nbsp;&nbsp;</TD>
		<TD class="bg_light right" colspan=2>&nbsp;&nbsp;<?Print RoundShare($mysql_stat['Bytes_sent'] / Array_Sum($queries))."/".$text_query;?>&nbsp;&nbsp;</TD>
		<TD class="bg_light" colspan=2>&nbsp;</TD>
	</TR><TR>
		<TD class="bg_light b">&nbsp;&nbsp;<?Print $text_queries;?>&nbsp;&nbsp;</TD>
		<TD class="bg_light right">&nbsp;&nbsp;<?Print Number_Format(Array_Sum($queries));?>&nbsp;&nbsp;</TD>
		<TD class="bg_light right">&nbsp;&nbsp;<?Print Number_Format(Array_Sum($queries) / $mysql_stat['Uptime'], 2);?>/s&nbsp;&nbsp;</TD>
		<TD class="bg_light" colspan=4>&nbsp;</TD>
	</TR><TR>
		<TD class="bg_light b">&nbsp;&nbsp;<?Print $text_uptime;?>&nbsp;&nbsp;</TD>
		<TD class="bg_light" colspan=6>
			&nbsp;&nbsp;
			<?
			Print Date("z", $mysql_stat['Uptime'])." ".$text_days.", ";
			Print (Date("G", $mysql_stat['Uptime']) - 1)." ".$text_hours.", ";
			Print Date("i", $mysql_stat['Uptime'])." ".$text_minutes.", ";
			Print Date("s", $mysql_stat['Uptime'])." ".$text_seconds;
			?>
			&nbsp;&nbsp;
		</TD>
	</TR>
</TABLE>