<?php 
/***
 * Auth: Vastvikta Nishad
 * Date: 14  Feb 2024
 * Description: Edit SMTP Settings
 * 
*/
$msg = '';
$id = base64_decode($_GET['id']);
$res = SMTPData($link, $id);
?>
<div id="success"><?php echo $msg; ?></div>
<form id="mastersrcat" method="post" action="">
<input name="id" id="id" type="hidden" value="<?php echo  $id ?>">
    <span class="breadcrumb_head" style="height:37px;padding:9px 16px">Edit SMTP Settings </span>
    <div class="style2-table">
        <div class="table">
            <table class="tableview tableview-2 main-form">
                <tbody>
                    <?php if ($msg != '') { ?>
                        <tr>
                            <td colspan="2" style="color:#ffffff; width:100%; background:#00CC66; padding:5px; border:1px solid #02944b; text-align:center;">
                                <?php echo $msg ?>
                            </td>
                        </tr>
                    <?php } ?>
                    <tr>
                        <td class="left">
                            <label>Port No<em>*</em></label>
                            <div class="log-case">
                                <input name="i_port" id="i_port" type="text" class="input-style1" value="<?php echo $res['i_port'] ?>">
                            </div>
                        </td>
                        <td class="left">
                            <label>Username<em>*</em></label>
                            <div class="log-case">
                                <input name="v_username" id="v_username" type="text" class="input-style1" value="<?php echo $res['v_username'] ?>">
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="left">
                            <label>Password<em>*</em></label>
                            <div class="log-case">
                                <input name="v_password" id="v_password" type="text" class="input-style1" value="<?php echo $res['v_password'] ?>">
                            </div>
                        </td>
                        <td class="left">
                            <label>Server<em>*</em></label>
                            <div class="log-case">
                                <input name="v_server" id="v_server" type="text" class="input-style1" value="<?php echo $res['v_server'] ?>">
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="left">
                            <label>TLS<em>*</em></label>
                            <div class="log-case">
                                <input name="i_tls" id="i_tls" type="text" class="input-style1" value="<?php echo $res['i_tls'] ?>">
                            </div>
                        </td>
                        <td class="left">
                            <label>Debug<em>*</em></label>
                            <div class="log-case">
                                <input name="i_debug" id="i_debug" type="text" class="input-style1" value="<?php echo $res['i_debug'] ?>">
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <center>
                                <input name="Update" type="submit" value="Update" class="button-orange1" id="submitclksmtp" style="float:inherit">
                            </center>
                        </td>
                    </tr>   
                </tbody>
            </table>
        </div>
    </div>
</form>
