{assign var="title" value="Checks"}
{include file="header.html"}
{include file="error.inc.html"}
<div id="content">		
        <div class="indent-main">
            <div class="container">
                <div class="col-1 maxheight">
                	<div class="box maxheight">
                        <div class="border-top maxheight">
                            <div class="border-bottom maxheight">
                                <div class="border-right maxheight">
                                    <div class="border-left maxheight">
                                        <div class="corner-top-right maxheight">
                                            <div class="corner-top-left maxheight">
                                                <div class="corner-bottom-left maxheight">
                                                    <div class="corner-bottom-right maxheight"> 
                                                        <div class="indent-box">
                                                            <img alt="" src="{$config.root_surl}/templates/images//1page_title1.gif" class="title" /><br />
                    <div class="container tail">
                    <table><tr><td><!-- right top links -->
<a href="{$config.root_url}/logout.php">#_TPL_MEMBER_LOGOUT#</a></td>
<td><a href="{$config.root_url}/profile.php">#_TPL_MEMBER_CH_PSWD#</a></td>
<td><a href="{$config.root_url}/checks.php?id={$smarty.session._amember_id}">Checks</a></td>
<td><a href="{$config.root_url}/contacts.php?id={$smarty.session._amember_id}">Contacts</a></td>
<td><a href="{$config.root_url}/report.php?id={$smarty.session._amember_id}">Report</a></td>
{foreach from=$member_links item=t key=u}
<a href="{$u|escape}">{$t}</a><br />
{/foreach}
</td></tr></table>
       {foreach item=user from=$user}
<form name="signup" method="post" action="{$smarty.server.PHP_SELF|escape}?{$smarty.server.QUERY_STRING}">
    <table class="vedit" width="80%">
        <tr>
            <td>
                <h2>1. Check</h2>
<label for="check_name">Name of check:</label>
<input name="check_name" id="check_name" type="text" value="{$user.service_name}" maxlength="1000" />
<input name="id" id="check_id" type="hidden" value="{$user.service_id}" maxlength="1000" />
            </td>
        </tr>
        <tr>
            <td>
<label for="check_resolution">Check resolution:</label>
<select id="check_resolution_pk" name="check_resolution_pk" onChange="on_change_resolution();on_change_notification();">
{if $user.period eq 1}
<option label="1 minute" value="1"selected>1 minute</option>
{else}
<option label="1 minute" value="1">1 minute</option>
{/if}
{if $user.period eq 5}
<option label="5 minute" value="5"selected>5 minute</option>
{else}
<option label="5 minute" value="5">5 minute</option>
{/if}
{if $user.period eq 15}
<option label="15 minute" value="15"selected>15 minute</option>
{else}
<option label="15 minute" value="15">15 minute</option>
{/if}
{if $user.period eq 30}
<option label="30 minute" value="30"selected>30 minute</option>
{else}
<option label="30 minute" value="30">30 minute</option>
{/if}

{if $user.period eq 60}
<option label="60 minute" value="60"selected>60 minute</option>
{else}
<option label="60 minute" value="60">60 minute</option>
{/if}

</select>
			</p>
            </td>
        </tr>
        <tr>
            <td>
               <div id="check_type_pk_p" class="setrow">
				<label for="check_type_pk">Check type:</label><br class="clear" />

																		<fieldset>
<legend>Web checks</legend>
{if $user.service_port eq 1}
<input onclick="javascript: on_change_check_type(1)" name="check_type_pk_radio" id="check_type_pk_1" type="radio" value="1" class="reset noborder" checked="checked" /> HTTP
{else}
<input onclick="javascript: on_change_check_type(1)" name="check_type_pk_radio" id="check_type_pk_1" type="radio" value="1" class="reset noborder"/> HTTP
<!-- <input onclick="javascript: on_change_check_type(7)" name="check_type_pk_radio" id="check_type_pk_7" type="radio" value="7" class="reset noborder"  /> HTTP Custom -->
{/if}
{if $user.service_port eq 7}
<input onclick="javascript: on_change_check_type(7)" name="check_type_pk_radio" id="check_type_pk_7" type="radio" value="7" class="reset noborder" checked="checked" /> HTTP Custom
{else}
<input onclick="javascript: on_change_check_type(7)" name="check_type_pk_radio" id="check_type_pk_7" type="radio" value="7" class="reset noborder"/> HTTP Custom 
<!-- <input onclick="javascript: on_change_check_type(7)" name="check_type_pk_radio" id="check_type_pk_7" type="radio" value="7" class="reset noborder"  /> HTTP Custom -->
{/if}
 </fieldset>

  <fieldset>
<legend>Network checks</legend>
{if $user.service_port eq 5}
<input onclick="javascript: on_change_check_type(5)" name="check_type_pk_radio" id="check_type_pk_5" type="radio" value="5" class="reset noborder" checked="checked" /> Ping
{else}
<input onclick="javascript: on_change_check_type(5)" name="check_type_pk_radio" id="check_type_pk_5" type="radio" value="5" class="reset noborder"/>Ping
<!-- <input onclick="javascript: on_change_check_type(7)" name="check_type_pk_radio" id="check_type_pk_7" type="radio" value="7" class="reset noborder"  /> HTTP Custom -->
{/if}
{if $user.service_port eq 8}
<input onclick="javascript: on_change_check_type(8)" name="check_type_pk_radio" id="check_type_pk_8" type="radio" value="8" class="reset noborder" checked="checked" /> DNS
{else}
<input onclick="javascript: on_change_check_type(8)" name="check_type_pk_radio" id="check_type_pk_8" type="radio" value="8" class="reset noborder"/>DNS
<!-- <input onclick="javascript: on_change_check_type(7)" name="check_type_pk_radio" id="check_type_pk_7" type="radio" value="7" class="reset noborder"  /> HTTP Custom -->
{/if}
</fieldset>																		<fieldset>

<legend>Email checks</legend>
{if $user.service_port eq 2}
<input onclick="javascript: on_change_check_type(2)" name="check_type_pk_radio" id="check_type_pk_2" type="radio" value="2" class="reset noborder" checked="checked" /> SMTP
{else}
<input onclick="javascript: on_change_check_type(2)" name="check_type_pk_radio" id="check_type_pk_2" type="radio" value="2" class="reset noborder"/>SMTP
<!-- <input onclick="javascript: on_change_check_type(7)" name="check_type_pk_radio" id="check_type_pk_7" type="radio" value="7" class="reset noborder"  /> HTTP Custom -->
{/if}
{if $user.service_port eq 4}
<input onclick="javascript: on_change_check_type(4)" name="check_type_pk_radio" id="check_type_pk_4" type="radio" value="4" class="reset noborder" checked="checked" /> POP3
{else}
<input onclick="javascript: on_change_check_type(4)" name="check_type_pk_radio" id="check_type_pk_4" type="radio" value="4" class="reset noborder"/>POP3
<!-- <input onclick="javascript: on_change_check_type(7)" name="check_type_pk_radio" id="check_type_pk_7" type="radio" value="7" class="reset noborder"  /> HTTP Custom -->
{/if}
{if $user.service_port eq 9}
<input onclick="javascript: on_change_check_type(9)" name="check_type_pk_radio" id="check_type_pk_9" type="radio" value="9" class="reset noborder" checked="checked" /> IMAP
{else}
<input onclick="javascript: on_change_check_type(9)" name="check_type_pk_radio" id="check_type_pk_9" type="radio" value="9" class="reset noborder"/>IMAP
<!-- <input onclick="javascript: on_change_check_type(7)" name="check_type_pk_radio" id="check_type_pk_7" type="radio" value="7" class="reset noborder"  /> HTTP Custom -->
{/if}

</fieldset>										<input type="hidden" name="check_type_pk" id="check_type_pk" value="1" />
</div>		
</td>
</tr>
<tr>
    <td>
<h2>2. Check settings </h2>

<!-- if tcp or ping request is chosen -->
<label for="domain_ip">Domain/IP:</label>
<input name="domain_ip" id="domain_ip" type="text" value="{$user.host_name}" maxlength="255" />
</p>
    </td>
</tr>
<tr>
    <td>
 <h2>3. Notification</h2>
			<p>
<label for="contact">Send notification to:</label><br>
<span >
 {foreach item=contacts from=$contacts}
 {if $contacts.id eq $user.contacts_id}
 <input name="contact_pk" type="checkbox" value="{$contacts.id}" class="reset noborder" checked="checked" /> {$contacts.name}<br>
 {else}
 <input name="contact_pk" type="checkbox" value="{$contacts.id}" class="reset noborder"  /> {$contacts.name}<br>
{/if}
 {/foreach}
</span>												</span>
</p>
    </td>
</tr>
<tr>
    <td>
<label for="notify_when_down_times">Send notification when down:</label>

<input id="notify_when_down_times" name="notify_when_down_times" onChange="on_change_notification();" type="text" value="{$user.smsalert_down}" maxlength="4" />
times
</td>
</tr>
<tr>
    <td align="center" colspan="2">
        <p align="center">
<input type="submit" name="Submit" value="Update Check" class="submitbutton" />

			</p>

    </td>
</tr>
</table>
</form>
{/foreach}
<script type="text/javascript" src="{$config.root_surl}/includes/jquery/jquery.js?smarty"></script>
<script type="text/javascript" src="{$config.root_surl}/includes/jquery/jquery.select.js?smarty"></script>

{include file="js.country_state.js"}


<script type="text/javascript" src="{$config.root_surl}/includes/jquery/jquery.js?smarty"></script>
<script type="text/javascript" src="{$config.root_surl}/includes/jquery/jquery.select.js?smarty"></script>

{include file="js.country_state.js"}

                                                                <br class="clear" />
                                                            </div>
                                                            
                                                           
                                                           <!-- -->
                                                        </div>                                     
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

{include file="footer.html"}
