<?php /* Smarty version 2.6.3, created on 2011-08-22 14:01:30
         compiled from group/modmonwlogmatch.tpl */ ?>
<?php require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date_format_ymd', 'group/modmonwlogmatch.tpl', 106, false),array('modifier', 'date_format_dh', 'group/modmonwlogmatch.tpl', 111, false),array('modifier', 'escape', 'group/modmonwlogmatch.tpl', 281, false),)), $this); ?>
<?php if (! $this->_tpl_vars['service_installed']): ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "numitem.tpl", 'smarty_include_vars' => array('_number' => '0','_text' => "&nbsp;監視プログラムの監視対象機器への設置")));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<table border="0" cellspacing="2" cellpadding="0" width="95%">
<tr>
<td class="font10b">設置プログラムファイル名:</td>
</tr>
<tr>
<td class="font12">
<span class="f12g_b">C:\</span><input type="text" name="logmatch_pgname" value="<?php echo $this->_tpl_vars['logmatch_pgname']; ?>
" size="80" maxlength="255" class="font12"><span class="f12g_b">.exe</span><br>
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=6 border=0><br>
<a href="javascript:instsvc(<?php echo $this->_tpl_vars['_time']; ?>
)" id="link-put-prog">&gt;&gt;プログラムの対象機器への設定</a><br>
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=4 border=0><br>
<span class="fs" style="line-height:14px">
※監視対象サーバの`C:'ドライブ上に上記の監視プログラムが設置されます。ドライブ名と拡張子「.exe」を抜いたプログラムファイル名を指定して下さい。<br>
※既に存在するファイル名を指定することは出来ません。<br>
※ディレクトリを指定する場合は、先にディレクトリを作成しておいて下さい。（存在するディレクトリしか指定出来ません。）<br>
&nbsp;&nbsp;&nbsp; C:\「clarice\bin\xxx」.exe&nbsp;→&nbsp;"clarice\bin"ディレクトリが`C:'ドライブ上に存在している必要があります。<br>
※プログラムファイル名（ディレクトリパス、拡張子「.exe」を抜いたもの）がサービス名として使用されます。<br>
&nbsp;&nbsp;&nbsp;（既に存在するサービス名と同名のプログラムファイル名を使用することは出来ません。）<br>
</span>
</td>
</tr>
<?php if ($this->_tpl_vars['lmop'] == 2): ?>
<tr>
<td class="f12g_b">
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=6 border=0><br>
<font color="#008000"><u>※プログラムのアンインストールが完了しました。</u></font>
</td>
</tr>
<?php endif; ?>
<tr>
<td class="font10b">
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=6 border=0><br>
監視結果通知先コントロールIP:
</td>
</tr>
<tr>
<td class="font12">
<input type="text" name="logmatch_ctrl_ip" size="60" maxlength="64" value="<?php echo $this->_tpl_vars['logmatch_ctrl_ip']; ?>
" class="font12"><br>
<span class="fs" style="line-height:14px">
※監視対象サーバ上に設置された監視プログラムが、監視結果を通知する先のコントロールIPアドレスを設定します。<br>
※通常は、監視基本設定で設定されたコントロールIPを指定して下さい。
</span>
<?php if ($this->_tpl_vars['logmatch_ctrl_ip'] == '127.0.0.1'): ?>
<br><span class="fs2" style="line-height:14px">
※コントロールIPアドレスが「localhost」になっています。監視対象サーバからアクセス可能なIPアドレスを別に設定して下さい。
</span>
<?php endif; ?>
</td>
</tr>
</table>
<input type="hidden" name="logmatch_op" value="0">
<?php echo '
<script language="javascript">
<!--
function instsvc(dp)
{
	document.form2.logmatch_op.value=1;
	ownp(\'chkenc\',dp);
}
-->
</script>
'; ?>

<?php else: ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "numitem.tpl", 'smarty_include_vars' => array('_number' => '1','_text' => "&nbsp;監視対象ログファイル")));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<table border="0" cellspacing="2" cellpadding="0" width="95%">
<tr>
<td class="font10b">ファイルパス:&nbsp;<span class="fs">※監視を行うログファイル名をフルパスで入力して下さい。</span></td>
</tr>
<tr>
<td class="fs">
<input type="text" name="logmatch_logname" value="<?php echo $this->_tpl_vars['logmatch_logname']; ?>
" size=110 class="font12"><br>
<span style="line-height:14px">
※ログファイル名には、_YYYY_、_YY_、_MM_、_DD_、_HH_、_D1_、_H1_の7種類の日付置換文字を指定することが出来ます。<br>
&nbsp;&nbsp;&nbsp;&nbsp;日付置換文字列は、監視対象機器側の日時に置き換えられます。<br>
※また、ワイルドカード「?」「*」を使用することも出来ます。（最初にマッチしたファイルが監視対象のログとなります。）<br>
※ローテートに対応する場合は、ログファイル名に続き、','（カンマ）で区切ってローテート後ファイル名の設定を行って下さい。<br>
※前回監視時よりログファイルのサイズが小さくなっていた場合にローテートと判断されます。<br>
※ローテートを検知した場合に、ローテート後ファイルの未監視部分もチェックされます。<br>
</span>
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=2 border=0><br>
</td>
</tr>
<tr>
<td class="f10g_b" valign="bottom">
<span onclick="$('#lf_ex').toggle();" style='cursor:pointer' class="f10g_b"><u>記述例 &gt;&gt;</u></span>
<div id="lf_ex" style="display:none">
<table border=0 cellspacing=2 cellpadding=0 width="80%">
<tr>
<td class="fs" colspan="3">
</td>
</tr>
<tr>
<td class="fs" width="1%" nowrap>C:\application\log\error.log<br><img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=2 border=0><br></td>
<td class="fs" width="1%" nowrap>&nbsp;⇒&nbsp;</td>
<td class="fs" width="98%">C:\application\log\error.logをチェックします。</td>
</tr>
<tr>
<td class="fs" width="1%" nowrap>C:\log\messages,C:\log\messages.1<br><img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=2 border=0><br></td>
<td class="fs" width="1%" nowrap>&nbsp;⇒&nbsp;</td>
<td class="fs" width="98%">ローテート検知時にC:\log\messages.1の未監視部分もチェック対象となります。</td>
</tr>
<tr>
<td class="fs" width="1%" nowrap>C:\log._YYYY__MM__DD_,C:\log._YYYY__MM__D1_<br><img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=2 border=0><br></td>
<td class="fs" width="1%" nowrap>&nbsp;⇒&nbsp;</td>
<td class="fs" width="98%">ローテート検知時にログファイルが「C:\log.<?php echo ((is_array($_tmp=$this->_tpl_vars['now'])) ? $this->_run_mod_handler('date_format_ymd', true, $_tmp) : date_format_ymd($_tmp)); ?>
」だった場合、一日前の「C:\log.<?php echo ((is_array($_tmp=$this->_tpl_vars['b1d'])) ? $this->_run_mod_handler('date_format_ymd', true, $_tmp) : date_format_ymd($_tmp)); ?>
」の未監視部分もチェック対象となります。</td>
</tr>
<tr>
<td class="fs" width="1%" nowrap>C:\error_log._DD__HH_,C:\error_log._DD__H1_<br><img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=2 border=0><br></td>
<td class="fs" width="1%" nowrap>&nbsp;⇒&nbsp;</td>
<td class="fs" width="98%">ローテート検知時にログファイルが「C:\error_log.<?php echo ((is_array($_tmp=$this->_tpl_vars['now'])) ? $this->_run_mod_handler('date_format_dh', true, $_tmp) : date_format_dh($_tmp)); ?>
」だった場合、一時間前の「C:\error_log.<?php echo ((is_array($_tmp=$this->_tpl_vars['b1h'])) ? $this->_run_mod_handler('date_format_dh', true, $_tmp) : date_format_dh($_tmp)); ?>
」の未監視部分もチェック対象となります。</td>
</tr>
<tr>
<td class="fs" width="1%" nowrap>D:\log\access_log._YYYY__MM__DD_<br><img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=2 border=0><br></td>
<td class="fs" width="1%" nowrap>&nbsp;⇒&nbsp;</td>
<td class="fs" width="98%">D:\log\access_log.<?php echo ((is_array($_tmp=$this->_tpl_vars['now'])) ? $this->_run_mod_handler('date_format_ymd', true, $_tmp) : date_format_ymd($_tmp)); ?>
（監視時の年月日（YYYYMMDD）に置換されます。）</td>
</tr>
<tr>
<td class="fs" width="1%" nowrap>C:\log\error_log._DD__HH_<br><img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=2 border=0><br></td>
<td class="fs" width="1%" nowrap>&nbsp;⇒&nbsp;</td>
<td class="fs" width="98%">C:\log\error_log.<?php echo ((is_array($_tmp=$this->_tpl_vars['now'])) ? $this->_run_mod_handler('date_format_dh', true, $_tmp) : date_format_dh($_tmp)); ?>
（監視時の日時（DDHH）に置換されます。）</td>
</tr>
<tr>
<td class="fs" width="1%" nowrap>C:\log\maillog._YYYY__MM__D1_<br><img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=2 border=0><br></td>
<td class="fs" width="1%" nowrap>&nbsp;⇒&nbsp;</td>
<td class="fs" width="98%">C:\log/maillog.<?php echo ((is_array($_tmp=$this->_tpl_vars['b1d'])) ? $this->_run_mod_handler('date_format_ymd', true, $_tmp) : date_format_ymd($_tmp)); ?>
（監視時の1日前の年月日（YYYYMMDD）に置換されます。）</td>
</tr>
<tr>
<td class="fs" width="1%" nowrap>C:\log\messages._DD__H1_<br><img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=2 border=0><br></td>
<td class="fs" width="1%" nowrap>&nbsp;⇒&nbsp;</td>
<td class="fs" width="98%">C:\log\messages.<?php echo ((is_array($_tmp=$this->_tpl_vars['b1h'])) ? $this->_run_mod_handler('date_format_dh', true, $_tmp) : date_format_dh($_tmp)); ?>
（監視時の1時間前の日時（DDHH）に置換されます。）</td>
</tr>
<tr>
<td class="fs" width="1%" nowrap>C:\log\access_log.*<br><img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=2 border=0><br></td>
<td class="fs" width="1%" nowrap>&nbsp;⇒&nbsp;</td>
<td class="fs" width="98%">C:\log\access_log.0やC:\log\access_log.1など。</td>
</tr>
<tr>
<td class="fs" width="1%" nowrap>D:\log\access_log.??<br><img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=2 border=0><br></td>
<td class="fs" width="1%" nowrap>&nbsp;⇒&nbsp;</td>
<td class="fs" width="98%">D:\log\access_log.aaやC:\log\access_log.bbなど。</td>
</tr>
</table>
</div>
</td>
</tr>
</table>

<br>
<?php if (( $this->_tpl_vars['lmop'] == 4 ) && ! $this->_tpl_vars['errors']): ?><a name="chkenc"><?php endif; ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "numitem.tpl", 'smarty_include_vars' => array('_number' => '2','_text' => "&nbsp;正規表現キーワード")));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<table border="0" cellspacing="2" cellpadding="0" width="95%">
<tr>
<td class="font10b" height="12" valign="center">正規表現設定:&nbsp;&nbsp;<span class="fs">※ログファイルから特定のキーワードをマッチングする為の正規表現を一行ずつ設定して下さい。</span></td>
</tr>
<tr>
<td class="fs">
<textarea name="logmatch_regex_dsp" id="logmatch_regex_dsp" cols="80" rows="10" class="font12"><?php echo $this->_tpl_vars['logmatch_regex_dsp']; ?>
</textarea><br>
<span class="font12"><font color="black">ログファイル文字コード:&nbsp;</font></span><select name="logmatch_regex_enc" id="logmatch_regex_enc" class="font12">
<option value="0"<?php if ($this->_tpl_vars['logmatch_regex_enc'] == 0): ?> selected<?php endif; ?>>
<?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['ec']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
<option value="<?php echo $this->_tpl_vars['el'][$this->_sections['i']['index']]['id']; ?>
"<?php if ($this->_tpl_vars['logmatch_regex_enc'] == $this->_tpl_vars['el'][$this->_sections['i']['index']]['id']): ?> selected<?php endif; ?>><?php echo $this->_tpl_vars['el'][$this->_sections['i']['index']]['name']; ?>

<?php endfor; endif; ?>
</select><br>
<div id="jisexp" style="display:none">
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=4 border=0><br>
<span class="f10red_b">※キーワードにJISの2byte文字を使用する場合は、制御シーケンス「漢字IN(0x1b, 0x24, 0x42)」と「漢字OUT(0x1b, 0x28, 0x42)」の位置にご注意下さい。</span><br>
<span class="f10red_b">※クラリスに自動でキーワードのHEX化を行わせる場合、ASCII文字と2byte文字の境界位置にのみ制御シーケンスが挿入されます。</span><br>
<span class="f10red_b">※ログファイルの内容にJISの2byte文字が含まれる場合は、実データ上の制御シーケンスの位置を確認してから設定を行って下さい。</span><br>
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=4 border=0><br>
</div>
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=6 border=0><br>
<span onclick="$('#help_ex').toggle();" style='cursor:pointer' class="f10g_b"><u>正規表現設定について &gt;&gt;</u></span><br>
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=4 border=0><br>
<div id="help_ex" style="display:none">
<?php $this->assign('d1', '$1'); ?> <?php $this->assign('d9', '$9'); ?>
<span style="line-height:14px">
※正規表現設定は、『「通知レベル」':'（コロン）「タグ」':'（コロン）「正規表現」』の形式で指定して下さい。<br>
※「通知レベル」には、'W'（ワーニング）、'A'（アラート）、'N'（正常）の何れかを指定して下さい。<br>
&nbsp;&nbsp;&nbsp;（通知レベルに'N'を指定した場合、マッチ数のカウントとグラフへのプロットは行われますが、エラーの通知は行われません。）<br>
※「タグ」は自由に設定出来ます。正規表現がログにマッチした場合、このタグがアラートメールで通知されるようになります。<br>
※「正規表現」は、『logline=~"/正規表現/"』の形式で記述して下さい。<br>
&nbsp;&nbsp;&nbsp;（マッチしなかったらエラーとしたい場合は、『logline!~"/正規表現/"』と記述して下さい。）<br>
※「通知レベル」に'N'、「タグ」に'!'一文字が指定されている場合、「正規表現」にマッチした行はスキップされます。<br>
※マッチ条件は、'&&'で繋いで複数の条件を指定することが出来ます。<br>
※正規表現パターンが括弧で囲まれている場合、そのパターンにマッチした文字列は、順番に'<?php echo $this->_tpl_vars['d1']; ?>
'～'<?php echo $this->_tpl_vars['d9']; ?>
'の特殊変数に保存されます。<br>
&nbsp;&nbsp;&nbsp;（'&&'で繋いだ後ろの条件式内で、'<?php echo $this->_tpl_vars['d1']; ?>
'～'<?php echo $this->_tpl_vars['d9']; ?>
'の特殊変数を用いて、マッチした文字列の後方参照を行うことが出来ます。）<br>
※漢字等のマルチバイト文字を正規表現で使用する場合は、文字コードを指定するか、"\xHH" 形式で1バイト毎に16進表記で指定して下さい。<br>
</span>
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=6 border=0><br>
<span onclick="$('#regex_ex').toggle();" style='cursor:pointer' class="f10g_b"><u>記述例 &gt;&gt;</u></span><br>
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=4 border=0><br>
<div id="regex_ex" style="display:none">
<table border=0 cellspacing=2 cellpadding=2 width="98%">
<tr>
<td class="fs" width="1%" nowrap>A:TAG1:logline=~"/word/"</td>
<td class="fs" width="1%" nowrap>&nbsp;⇒&nbsp;</td>
<td class="fs" width="98%">「word」という文字列を含む行にマッチし、アラートとする。</td>
</tr>
<tr>
<td class="fs" width="1%" nowrap>W:TAG2:logline!~"/word/i"</td>
<td class="fs" width="1%" nowrap>&nbsp;⇒&nbsp;</td>
<td class="fs" width="98%">「word」（大文字小文字の区別無し）が含まれない行にマッチし、ワーニングとする。</td>
</tr>
<tr>
<td class="fs" width="1%" nowrap>N:TAG3:logline=~"/aaa|bbb|ccc/"</td>
<td class="fs" width="1%" nowrap>&nbsp;⇒&nbsp;</td>
<td class="fs" width="98%">「aaa」か「bbb」か「ccc」を含む行にマッチするが、エラーとは扱わない。</td>
</tr>
<tr>
<td class="fs" width="1%" nowrap>N:!:logline=~"/zzz/"</td>
<td class="fs" width="1%" nowrap>&nbsp;⇒&nbsp;</td>
<td class="fs" width="98%">「zzz」が含まれている行はスキップする。</td>
</tr>
<tr>
<td class="fs" width="1%" nowrap>A:TAG4:logline=~"/\(([0-9]+)\)/ && ($1>100)"</td>
<td class="fs" width="1%" nowrap>&nbsp;⇒&nbsp;</td>
<td class="fs" width="98%">「(123)」等の括弧に囲まれた数字を含む行にマッチし、その数値が100より大きい場合にアラートとする。</td>
</tr>
<tr>
<td class="fs" width="1%" nowrap>A:TAG5:logline=~"/^error:\s*\/foo\/hoge\.log$/"</td>
<td class="fs" width="1%" nowrap>&nbsp;⇒&nbsp;</td>
<td class="fs" width="98%">「error:(任意個のスペース)/foo/hoge.log」という行にマッチし、アラートとする。</td>
</tr>
<tr>
<td class="fs" width="1%" nowrap>W:TAG6:logline=~"/^(error|warn):([0-9]+)$/ && ((100<=$2)&&($2<=200))"</td>
<td class="fs" width="1%" nowrap>&nbsp;⇒&nbsp;</td>
<td class="fs" width="98%">「error:」又は「warn:」で始まり「数字列」で終わる行にマッチし、数値が100以上200以下だった場合にワーニングとする。</td>
</tr>
<tr>
<td class="fs" width="1%" nowrap>A:TAG7:logline=~"/ERR/" && logline=~"/aaa/"</td>
<td class="fs" width="1%" nowrap>&nbsp;⇒&nbsp;</td>
<td class="fs" width="98%">「ERR」と「aaa」という文字列を両方含む行にマッチし、アラートとする。</td>
</tr>
<tr>
<td class="fs" width="1%" nowrap>W:TAG8:logline=~"/^ERR/" && logline!~"/aaa/"</td>
<td class="fs" width="1%" nowrap>&nbsp;⇒&nbsp;</td>
<td class="fs" width="98%">「ERR」という文字列で始まる行で、かつ「aaa」という文字列を含まない行にマッチし、ワーニングとする。</td>
</tr>
<tr>
<td class="fs" width="1%" nowrap>A:TAG9:logline=~"/^エラー/"</td>
<td class="fs" width="1%" nowrap>&nbsp;⇒&nbsp;</td>
<td class="fs" width="98%">文字コードXXXで「エラー」という文字列で始まる行にマッチし、アラートとする。</td>
</tr>
<tr>
<td class="fs" width="1%" nowrap>A:TAG10:logline=~"/\x83\x47\x83\x89\x81\x5B/"</td>
<td class="fs" width="1%" nowrap>&nbsp;⇒&nbsp;</td>
<td class="fs" width="98%">Shift_JISで「エラー」という文字列を含む行にマッチし、アラートとする。</td>
</tr>
<tr>
<td class="fs" colspan="2">&nbsp;</td>
<td class="f10g_b" valign="bottom">
<a href="javascript:chkmb(<?php echo $this->_tpl_vars['_time']; ?>
);" class="f10g_b">マルチバイト文字列の16進表記を調べる &gt;&gt;</a>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td class="font12" valign="bottom">
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=4 border=0><br>
<span onclick="$('#rtest_ex').toggle();" style='cursor:pointer' class="f10g_b"><u>正規表現設定のチェック &gt;&gt;</u></span><br>
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=6 border=0><br>
<div id="rtest_ex" style="display:<?php if ($this->_tpl_vars['lmop'] == 4): ?>block<?php else: ?>none<?php endif; ?>">
<span class="font10b">正規表現チェック用ログテキスト:</span><br>
<input type="text" name="logmatch_text" size="100" value="<?php echo $this->_tpl_vars['logmatch_text']; ?>
" class="font12">&nbsp;<a href="javascript:regtest(<?php echo $this->_tpl_vars['_time']; ?>
)" class="svrinfo"><u>&gt;&gt; チェック</u></a><br>
<?php if ($this->_tpl_vars['lmop'] == 4): ?>
<?php if ($this->_tpl_vars['errors']): ?>
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=6 border=0><br>
<span class="f12red_b">※正規表現設定にエラーがあります。
<?php else: ?>
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=6 border=0><br>
<table class="admin" border=0 cellspacing=2 cellpadding=2 width="50%">
<tr>
<td class="admin" width="10%" nowrap>タグ</td>
<td class="admin" width="90%" nowrap>結果</td>
</tr>
<?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['rtestc']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
<tr>
<td class="admin2" width="10%" nowrap><?php echo ((is_array($_tmp=$this->_tpl_vars['rtestr'][$this->_sections['i']['index']]['tag'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
</td>
<td class="admin2" width="90%" nowrap>
<?php if ($this->_tpl_vars['rtestr'][$this->_sections['i']['index']]['r'] === 0): ?>
  マッチしませんでした
<?php elseif ($this->_tpl_vars['rtestr'][$this->_sections['i']['index']]['r'] === 1): ?>
  マッチしました
  <?php if ($this->_tpl_vars['rtestr'][$this->_sections['i']['index']]['type'] == 'A'): ?>
    （⇒アラート）
  <?php elseif ($this->_tpl_vars['rtestr'][$this->_sections['i']['index']]['type'] == 'W'): ?>
    （⇒ワーニング）
  <?php elseif (( $this->_tpl_vars['rtestr'][$this->_sections['i']['index']]['type'] == 'N' ) && ( $this->_tpl_vars['rtestr'][$this->_sections['i']['index']]['tag'] == '!' )): ?>
    （⇒スキップ）
  <?php endif; ?>
  <?php if ($this->_tpl_vars['rtestr'][$this->_sections['i']['index']]['P1'] !== null): ?>
    （P1⇒<?php echo ((is_array($_tmp=$this->_tpl_vars['rtestr'][$this->_sections['i']['index']]['P1'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
）
  <?php elseif ($this->_tpl_vars['rtestr'][$this->_sections['i']['index']]['P2'] !== null): ?>
    （P2⇒<?php echo ((is_array($_tmp=$this->_tpl_vars['rtestr'][$this->_sections['i']['index']]['P2'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
）
  <?php elseif ($this->_tpl_vars['rtestr'][$this->_sections['i']['index']]['P3'] !== null): ?>
    （P3⇒<?php echo ((is_array($_tmp=$this->_tpl_vars['rtestr'][$this->_sections['i']['index']]['P3'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
）
  <?php elseif ($this->_tpl_vars['rtestr'][$this->_sections['i']['index']]['P4'] !== null): ?>
    （P4⇒<?php echo ((is_array($_tmp=$this->_tpl_vars['rtestr'][$this->_sections['i']['index']]['P4'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
）
  <?php endif; ?>
<?php else: ?>
  <?php echo ((is_array($_tmp=$this->_tpl_vars['rtestr'][$this->_sections['i']['index']]['r'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>

<?php endif; ?>
</td>
</tr>
<?php endfor; endif; ?>
</table>
<?php endif; ?>
<?php endif; ?>
</div>
</td>
</tr>
</table>
<br>

<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "numitem.tpl", 'smarty_include_vars' => array('_number' => '3','_text' => "&nbsp;<span onclick='exo()' style='cursor:pointer'><u>その他の判定</u></span>&nbsp;<span class=fs>※正規表現によるマッチング以外に、ログファイルサイズなどの判定を行うことが出来ます。</span>")));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $this->assign('_other_err', '0'); ?>
<?php if ($this->_tpl_vars['errors']): ?>
<?php if (count($_from = (array)$this->_tpl_vars['errors'])):
    foreach ($_from as $this->_tpl_vars['err']):
?>
	<?php if (preg_match ( '/^error\.logmatch_[wa](size|line)/' , $this->_tpl_vars['err'] )): ?>
		<?php $this->assign('_other_err', '1'); ?>
		<?php break; ?>
	<?php endif; ?>
<?php endforeach; unset($_from); endif; ?>
<?php endif; ?>
<div id="other_s" style="display:<?php if ($this->_tpl_vars['_other_err']): ?>block<?php else: ?>none<?php endif; ?>">

<table border="0" cellspacing="2" cellpadding="0" width="95%">
<tr>
<td class="font12b" nowrap>
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=4 border=0><br>
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/arrow_gray.gif" width="13" height="13" align="absmiddle">
ログサイズによる判定&nbsp;<span class=fs>※監視対象ログファイルのサイズによる判定を行うことが出来ます。</span>
</td>
</tr>
</table>
<table border="0" cellspacing="2" cellpadding="0" width="95%">
<tr>
<td class="font10b">ワーニング閾値:&nbsp;<span class="fs">※監視対象ログファイルがこのサイズを超えている場合にワーニングを発生させます。</span></td>
</tr>
<tr>
<td class="font10b"><input type="text" name="logmatch_wsize" value="<?php if ($this->_tpl_vars['logmatch_wsize']):  echo $this->_tpl_vars['logmatch_wsize'];  endif; ?>" size=20 maxlength=20 class="font12"> byte</td>
</tr>
<tr>
<td class="font10b">アラート閾値:&nbsp;<span class="fs">※監視対象ログファイルがこのサイズを超えている場合にアラートを発生させます。</span></td>
</tr>
<tr>
<td class="font10b"><input type="text" name="logmatch_asize" value="<?php if ($this->_tpl_vars['logmatch_asize']):  echo $this->_tpl_vars['logmatch_asize'];  endif; ?>" size=20 maxlength=20 class="font12"> byte</td>
</tr>
</table>

<table border="0" cellspacing="2" cellpadding="0" width="95%">
<tr>
<td class="font12b" nowrap>
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=6 border=0><br>
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/arrow_gray.gif" width="13" height="13" align="absmiddle">
ログ行数による判定&nbsp;<span class=fs>※通知レベル「N」の正規表現にマッチした行数による判定を行うことが出来ます。</span>
</td>
</tr>
</table>
<table border="0" cellspacing="2" cellpadding="0" width="95%">
<tr>
<td class="font10b">ワーニング閾値:&nbsp;<span class="fs">※正規表現マッチした行数がこの行数を超えている場合にワーニングを発生させます。</span></td>
</tr>
<tr>
<td class="font10b"><input type="text" name="logmatch_wline" value="<?php if ($this->_tpl_vars['logmatch_wline']):  echo $this->_tpl_vars['logmatch_wline'];  endif; ?>" size=20 maxlength=9 class="font12"> 行</td>
</tr>
<tr>
<td class="font10b">アラート閾値:&nbsp;<span class="fs">※正規表現マッチした行数がこの行数をを超えている場合にアラートを発生させます。</span></td>
</tr>
<tr>
<td class="font10b"><input type="text" name="logmatch_aline" value="<?php if ($this->_tpl_vars['logmatch_aline']):  echo $this->_tpl_vars['logmatch_aline'];  endif; ?>" size=20 maxlength=9 class="font12"> 行</td>
</tr>
</table>

<table border="0" cellspacing="2" cellpadding="0" width="95%">
<tr>
<td class="font12b" nowrap>
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=6 border=0><br>
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/arrow_gray.gif" width="13" height="13" align="absmiddle">
ログ増加判定&nbsp;<span class=fs>※前回監視時からログファイルのサイズが増加しているかどうかの判定を行うことが出来ます。</span>
</td>
</tr>
</table>
<table border="0" cellspacing="2" cellpadding="0" width="95%">
<tr>
<td class="font12">
<input type="radio" name="logmatch_incflg" class="font12" value="0" <?php if ($this->_tpl_vars['logmatch_incflg'] == 0): ?>checked<?php endif; ?>>ログ増加判定は行わない。<br>
<input type="radio" name="logmatch_incflg" class="font12" value="1" <?php if ($this->_tpl_vars['logmatch_incflg'] != 0): ?>checked<?php endif; ?>>ログが増加していない場合はエラーとし、アラートを発生させる。
</td>
</tr>
</table>
</div>

<br>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "numitem.tpl", 'smarty_include_vars' => array('_number' => '4','_text' => "&nbsp;復旧アクション設定&nbsp;<span class=fs>※エラー状態からの復旧方法を選択することが出来ます。</span>")));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<table border="0" cellspacing="2" cellpadding="0" width="95%">
<tr>
<td class="font12">
<input type="radio" name="logmatch_rcvflg" class="font12" value="1" <?php if ($this->_tpl_vars['logmatch_rcvflg'] != 0): ?>checked<?php endif; ?>>手動で復旧を行う。<span class="f12g_b">（アラート発生後、現在アラート情報画面等から手動で復旧ボタンが押下されるまで、エラー状態のままとなります。）</span><br>
<input type="radio" name="logmatch_rcvflg" class="font12" value="0" <?php if ($this->_tpl_vars['logmatch_rcvflg'] == 0): ?>checked<?php endif; ?>>自動で復旧させる。<span class="f12g_b">（アラート発生後、次回以降の監視時にエラー条件にマッチするログが存在しなければ、その時点で自動的に復旧となります。）</span><br>
</td>
</tr>
</table>

<br>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "numitem.tpl", 'smarty_include_vars' => array('_number' => '5','_text' => "&nbsp;グラフ設定")));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<table border="0" cellspacing="2" cellpadding="0" width="95%">
<tr>
<td class="font10b">グラフデータ名:&nbsp;<span class="fs">※凡例等の表示に使用されるグラフデータ名を設定します。</span></td>
</tr>
<tr>
<td class="font12">
P1:<input type="text" name="logmatch_g_p1" size="80" maxlength="250" value="<?php echo $this->_tpl_vars['logmatch_g_p1']; ?>
" class="font12">
</td>
</tr>
<tr>
<td class="font12">
P2:<input type="text" name="logmatch_g_p2" size="80" maxlength="250" value="<?php echo $this->_tpl_vars['logmatch_g_p2']; ?>
" class="font12">
</td>
</tr>
<tr>
<td class="font12">
P3:<input type="text" name="logmatch_g_p3" size="80" maxlength="250" value="<?php echo $this->_tpl_vars['logmatch_g_p3']; ?>
" class="font12">
</td>
</tr>
<tr>
<td class="font12">
P4:<input type="text" name="logmatch_g_p4" size="80" maxlength="250" value="<?php echo $this->_tpl_vars['logmatch_g_p4']; ?>
" class="font12">
</td>
</tr>
<tr>
<td class="fs">
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=4 border=0><br>
<span onclick="$('#grp_ex').toggle();" style='cursor:pointer' class="f10g_b"><u>監視結果のグラフプロットについて &gt;&gt;</u></span><br>
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=4 border=0><br>
<div id="grp_ex" style="display:none">
<span style="line-height:14px">
※ログ詳細監視では、デフォルトで以下4つの監視結果がグラフにプロットされます。<br>
&nbsp;&nbsp;&nbsp;&nbsp;P1:&nbsp;正規表現設定にマッチした全ログ行数<br>
&nbsp;&nbsp;&nbsp;&nbsp;P2:&nbsp;通知レベル'N'の正規表現設定にマッチしたログ行数<br>
&nbsp;&nbsp;&nbsp;&nbsp;P3:&nbsp;通知レベル'W'の正規表現設定にマッチしたログ行数<br>
&nbsp;&nbsp;&nbsp;&nbsp;P4:&nbsp;通知レベル'A'の正規表現設定にマッチしたログ行数<br>
※正規表現設定のマッチ条件内で特殊関数'P1'、'P2'、'P3'、'P4'を使うことで、それぞれP1～P4のグラフにプロットする値を指定することが出来ます。<br>
<table border=0 cellspacing=2 cellpadding=2 width="98%">
<tr>
<td class="fs" width="1%" nowrap>&nbsp;&nbsp;A:TAG1:logline=~"/^var=([0-9]+)$/" && P1($1)</td>
<td class="fs" width="1%" nowrap>&nbsp;⇒&nbsp;</td>
<td class="fs" width="98%">「var=数字列」という行にマッチし、切り出された数値をグラフP1にプロットする。</td>
</tr>
<tr>
<td class="fs" width="1%" nowrap>&nbsp;&nbsp;W:TAG2:logline=~"/^error=([0-9]+),warn=([0-9]+)$/" && P4($1) && P3($2)</td>
<td class="fs" width="1%" nowrap>&nbsp;⇒&nbsp;</td>
<td class="fs" width="98%">「error=数字列,warn=数字列」という行にマッチし、切り出された最初の数値をグラフP4に、次の数値をグラフP3にプロットする。</td>
</tr>
</table>
</div>
</td>
</tr>
</table>

<br>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "numitem.tpl", 'smarty_include_vars' => array('_number' => '6','_text' => "&nbsp;タイムアウト設定</span>")));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<table border="0" cellspacing="2" cellpadding="0" width="95%">
<tr>
<td class="font10b">タイムアウト:&nbsp;<span class="fs">※監視結果のリターンを待つ時間を秒単位で指定します。</span></td>
</tr>
<tr>
<td class="font12">
<input type="text" name="logmatch_timeout" size="4" maxlength="10" value="<?php echo $this->_tpl_vars['logmatch_timeout']; ?>
" class="font12"> <b>秒</b>
</td>
</tr>
</table>

<br>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "numitem.tpl", 'smarty_include_vars' => array('_number' => '7','_text' => "&nbsp;監視結果通知先コントロールIP</span>")));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<table border="0" cellspacing="2" cellpadding="0" width="95%">
<tr>
<td class="font10b">監視結果通知先コントロールIP:</td>
</tr>
<tr>
<td class="font12">
<input type="text" name="logmatch_ctrl_ip" size="60" maxlength="64" value="<?php echo $this->_tpl_vars['logmatch_ctrl_ip']; ?>
" class="font12"><br>
<span class="fs" style="line-height:14px">
※監視対象サーバ上に設置された監視プログラムが、監視結果を通知する先のコントロールIPアドレスを設定します。<br>
※通常は、監視基本設定で設定されたコントロールIPを指定して下さい。
</span>
<?php if ($this->_tpl_vars['logmatch_ctrl_ip'] == '127.0.0.1'): ?>
<br><span class="fs2" style="line-height:14px">
※コントロールIPアドレスが「localhost」になっています。監視対象サーバからアクセス可能なIPアドレスを別に設定して下さい。
</span>
<?php endif; ?>
</td>
</tr>
</table>

<br>
<?php if (( $this->_tpl_vars['lmop'] == 3 ) && ! $this->_tpl_vars['errors']): ?><a name="chkenc"><?php endif; ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "numitem.tpl", 'smarty_include_vars' => array('_number' => '8','_text' => "&nbsp;監視テスト実行&nbsp;&nbsp;<span class='f10g_b'>※設定の変更を行った場合は、監視のテスト実行を一度行うようにして下さい。</span>")));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<table border="0" cellspacing="2" cellpadding="0" width="95%">
<tr>
<td class="font10b">設置プログラムファイル名:</td>
</tr>
<tr>
<td class="font12">
<?php if ($this->_tpl_vars['lmop'] == 2): ?>
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=6 border=0><br>
<span class="f12red_b">※プログラムの対象機器からのアンインストールに失敗しました。</span>
<?php elseif ($this->_tpl_vars['lmop'] == 1): ?>
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=6 border=0><br>
<span class="f12g_b" id="logmatch-put-prog-done"><font color="#008000"><u>※プログラムの対象機器への設置が完了しました。</u></font></span><br>
<?php endif; ?>
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=6 border=0><br>
<span class="f12g_b">C:\<?php echo $this->_tpl_vars['logmatch_pgname']; ?>
.exe</span>
<?php if (strlen ( $this->_tpl_vars['logmatch_ver'] ) > 0): ?>
<span class="f12g_b">[version: <?php echo $this->_tpl_vars['logmatch_ver']; ?>
]</span>&nbsp;&nbsp;<span onclick="exus()" style='cursor:pointer' class="f10g_b">[<u><div style="display:none" id="us1">&lt;&lt; </div>アンインストール<div style="display:inline" id="us2"> &gt;&gt;</div></u>]</span><br>
<div id="uninstsvc" style="display:none">
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=6 border=0><br>
<a href="javascript:uninstsvc(<?php echo $this->_tpl_vars['_time']; ?>
)">&gt;&gt;プログラムの対象機器からのアンインストール</a><br>
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=4 border=0><br>
<span class="fs" style="line-height:14px">
※監視対象サーバ上に設置された上記の監視プログラムをアンインストールします。<br>
※プログラムファイル名、設置場所の変更等を行いたい場合は、一度アンインストール行った後、再度監視プログラムの設置を行って下さい。<br>
<?php if (! $this->_tpl_vars['isnew']): ?>
※監視プログラムのアンインストールを行うと、一時的に監視エラーが発生する場合があります。アンインストールを行う場合は、一度監視を停止状態にしてから行って下さい。<br>
<?php endif; ?>
</span>
</div>
<?php else: ?>
<span class="f12g_b">[updating...]</span>
<?php endif; ?>
</td>
</tr>
<tr>
<td class="font10b">
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=6 border=0><br>
監視開始位置:
</td>
</tr>
<tr>
<td class="font12">
<input type="text" name="logmatch_lastsize" value="<?php echo $this->_tpl_vars['logmatch_lastsize']; ?>
" size=20 maxlength=20 class="font12"> byte目以降からチェックを行う<br>
<span class="fs" style="line-height:14px">
※チェック開始位置を監視対象ログファイルの先頭からのbyte数で指定します。<br>
※ログファイルの先頭から監視を行う場合は、空欄にするか0を指定して下さい。<br>
※監視時にチェックしたbyte位置へ自動更新されます。<br>
</span>
</td>
</tr>

<?php if ($this->_tpl_vars['lmop'] == 3): ?>
<tr>
  <td class="font10">
  <?php if ($this->_tpl_vars['cerr']): ?>
    <img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=6 border=0><br>
    <span class="f12red_b">
    <?php if ($this->_tpl_vars['cerr'] == 3): ?><span id="mtest-detect-error">※監視テストモジュールがエラーを検知しました。</span><br>
    <?php elseif ($this->_tpl_vars['cerr'] == 2): ?><span id="mtest-failed">※監視テストプログラムの起動に失敗しました。</span><br>
    <?php else: ?><span id="mtest-setting-error">※監視設定にエラーがあります。</span><br>
    <?php endif; ?>
  <?php else: ?>
    <img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=6 border=0><br>
    <span class="f12g_b" id="mtest-done"><font color="#008000">
    <u>※監視のテスト実行が終了しました。</u>
    </font></span><br>
  <?php endif; ?>
  <?php if (( $this->_tpl_vars['cerr'] == 0 ) || ( $this->_tpl_vars['cerr'] == 3 )): ?>
    <img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=6 border=0><br>
    <?php if (( $this->_tpl_vars['testr']['retcd'] == 0 ) || ( $this->_tpl_vars['testr']['retcd'] == 7 ) || ( $this->_tpl_vars['testr']['retcd'] == 8 ) || ( $this->_tpl_vars['testr']['retcd'] == 9 ) || ( $this->_tpl_vars['testr']['retcd'] == 10 )): ?>
      <table border="0" cellspacing="2" cellpadding="0" width="95%">
      <?php if ($this->_tpl_vars['testr']['mcnt'] <= 0): ?>
        <tr>
          <td class="f12g_b" valign="bottom">
            <span id="logmatch-matched-log-0">※正規表現設定にマッチしたログはありませんでした。</span>
          </td>
        </tr>
      <?php else: ?>
        <tr>
          <td class="f12g_b" valign="bottom">
            <span id="logmatch-matched-log-<?php echo $this->_tpl_vars['testr']['mcnt']; ?>
">※<?php echo $this->_tpl_vars['testr']['mcnt']; ?>
件のログが正規表現設定にマッチしました。</span><br>
            <table class="admin" border=0 cellspacing=2 cellpadding=2 width="80%">
              <tr>
                <td class="admin" width="10%" nowrap>タグ</td>
                <td class="admin" width="90%" nowrap>マッチしたログ</td>
              </tr>
              <?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['testr']['rc']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
              <tr>
              <?php if ($this->_tpl_vars['testr']['rs'][$this->_sections['i']['index']]['snip']): ?>
                <td class="admin2" colspan="2" nowrap><?php echo $this->_tpl_vars['testr']['rs'][$this->_sections['i']['index']]['mlog']; ?>
</td>
              <?php else: ?>
                <td class="admin2" width="10%" nowrap><?php echo $this->_tpl_vars['testr']['rs'][$this->_sections['i']['index']]['tag']; ?>
</td>
                <td class="admin2" width="90%"><?php echo $this->_tpl_vars['testr']['rs'][$this->_sections['i']['index']]['mlog']; ?>
</td>
              <?php endif; ?>
              </tr>
              <?php endfor; endif; ?>
            </table>
          </td>
        </tr>
      <?php endif; ?>
      </table>
    <?php endif; ?>
    <img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=6 border=0><br>
    <table class="admin" border=0 cellspacing=2 cellpadding=2 width="40%">
      <tr>
        <td class="admin" colspan="2" nowrap>グラフプロットデータ</td>
      </tr>
      <tr>
        <td class="admin" width="10%" nowrap>P1</td>
        <td class="admin2" width="90%" nowrap><span id="logmatch-gp1"><?php echo $this->_tpl_vars['testr']['p1']; ?>
</span></td>
      </tr>
      <tr>
        <td class="admin" width="10%" nowrap>P2</td>
        <td class="admin2" width="90%" nowrap><span id="logmatch-gp2"><?php echo $this->_tpl_vars['testr']['p2']; ?>
</span></td>
      </tr>
      <tr>
        <td class="admin" width="10%" nowrap>P3</td>
        <td class="admin2" width="90%" nowrap><span id="logmatch-gp3"><?php echo $this->_tpl_vars['testr']['p3']; ?>
</span></td>
      </tr>
      <tr>
        <td class="admin" width="10%" nowrap>P4</td>
        <td class="admin2" width="90%" nowrap><span id="logmatch-gp4"><?php echo $this->_tpl_vars['testr']['p4']; ?>
</span></td>
      </tr>
    </table>
  <?php endif; ?>
  </td>
</tr>
<?php endif; ?>

<tr>
<td class="font12" valign="bottom">
<img src="<?php echo $this->_tpl_vars['_path']['resource']; ?>
img/spacer.gif" width=1 height=4 border=0><br>
<a href="javascript:lmtest(<?php echo $this->_tpl_vars['_time']; ?>
)" id="link-winlog-test">&gt;&gt;監視のテスト実行</a>
</td>
</tr>
<tr>
<td class="fs" valign="bottom">
&nbsp;&nbsp;※サーバに接続し、ログファイル監視のテスト実行を行います。
<br><br>
</td>
</tr>
</table>
<input type="hidden" name="_chkmb_mode" value="i">
<input type="hidden" name="_chkmb_enc" value="">
<input type="hidden" name="_chkmb_txt" value="">
<input type="hidden" name="logmatch_op" value="0">

<?php echo '
<script language="javascript">
<!--
$(function($) {
	$(\'#logmatch_regex_enc\').change(function() {
		var enc = $(this).val();
		if((enc==21)||(enc==22))
			$(\'#jisexp\').show();
		else
			$(\'#jisexp\').hide();
	}).change();
});
function chkmb(dp){
	var w = window.open( "../dumy.html", "_chkmb", "width=640,height=380,resizable=1,toolbar=0,status=0,menubar=0,scrollbars=1,titlebar=0" ) ;
	document.form2._chkmb_enc.value=$(\'#logmatch_regex_enc\').val();
	var rs = $(\'#logmatch_regex_dsp\').val().split(/\\r\\n|\\n/), t = \'\' ;
	if(rs.length > 0){
		for(var i = rs.length-1; i >= 0; i--) {
			var l = $.trim(rs[i]);
			if(l.length > 0) {
				var e = l.split(\':\');
				if(e.length>=3) {
					var r = e[2] ;
					if(e.length>3) {
						for(var j = 3 ; j < e.length ; j++)
							r += (\':\' + e[j]) ;
					}
					r = $.trim(r) ;
					if(r.length > 0 && r.match(/[^\\x20-\\x7e]/)) {
						t = r;
						break;
					}
				}
			}
		}
	}
	document.form2._chkmb_txt.value=t;
	document.form2.action="group.chkmb2" ;
	document.form2.target="_chkmb" ;
	document.form2.submit();
	document.form2.action="" ;
	document.form2.target="" ;
}
function uninstsvc(dp)
{
	if(confirm("'; ?>
監視プログラムの対象機器からのアンインストールを行います。\nよろしいですか？<?php echo '")) {
		document.form2.logmatch_op.value=2;
		ownp(\'chkenc\',dp);
	}
}
function lmtest(dp)
{
	document.form2.logmatch_op.value=3;
	ownp(\'chkenc\',dp);
}
function regtest(dp)
{
	document.form2.logmatch_op.value=4;
	ownp(\'chkenc\',dp);
}
function exo(){$(\'#other_s\').toggle();}
function exus() {
	if($(\'#uninstsvc\').css(\'display\')==\'none\') {
		$(\'#uninstsvc\').show();
		$(\'#us2\').css(\'display\', \'none\');
		$(\'#us1\').css(\'display\', \'inline\');
	}
	else {
		$(\'#uninstsvc\').hide();
		$(\'#us1\').css(\'display\', \'none\');
		$(\'#us2\').css(\'display\', \'inline\');
	}
}
-->
</script>
'; ?>

<?php endif; ?>
