<script type="text/javascript">
    function validate()
    {
        document.getElementById('h_save').value ='T';
        return true;
    }
</script>
<div id="links-modal" title="Details"></div>
<div class="web-booking-main" id="gridbody">
    <div class="breadcrumbs"><a href="index.php">Home </a>&nbsp;>&nbsp; <span class="current">Manage System Emails</span></div>
    <div class="clear"></div>
    <?= $messagebox; ?>		
    <?php echo $headerpanel; ?>        

    <div class="web-booking-main">
        <div class="clear"></div>
        <div class="booking-title-bg">
        </div>
        <div class="add-new-user-title">
            <h2><img alt="add-new-listing" src="<?= GLOBAL_ADMIN_IMAGES_PATH ?>/add-new-user-icon.png">System Emails</h2>
        </div>
        <br class="clear"/>
        <div class="clear"></div>
        <input type="hidden" name="int_glcode" id="int_glcode" value="<?= $users->int_glcode ?>" />
        <input type="hidden" name="eid" id="eid" value="<?= $_SESSION['cl_admin_id'] ?>" />

        <?php
        if($_REQUEST["file_path"]==''){
        ?>
        <div class="grid-list-subtitle-bg" onclick="javascript:expandcollapsepanel('dvpersonalinformation');" style="cursor:pointer;" >
            <table cellspacing="0" cellpadding="0" border="0" width="100%">
                <tr>
                    <td align="left" width="55%" valign="top" class="grid-td-left">Email Template  </td> 
                    <td width="20%" align="left" valign="top" class="grid-td-top">
                        Edit
                    </td>
                    <td width="25%" align="left" valign="top" class="grid-td-top">Date & Time
                    </td>
                </tr>
            </table>
        </div>
        <?}else{?>
        <div class="grid-list-subtitle-bg" onclick="javascript:expandcollapsepanel('dvpersonalinformation');" style="cursor:pointer;" >
            <table cellspacing="0" cellpadding="0" border="0" width="70%">
                <tr>
                    <td align="left" width="55%" valign="top" class="grid-td-left">Edit System Emails  </td> 
                    
                </tr>
            </table>
        </div>
        <?}?>
        <div class="clear"></div>
        <div class="information-white-bg" id="dvpersonalinformation" >
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <?= $email_files_list ?>

                <tr>    
                    <td colspan="3" align="left" valign="top">   
                        <? if ($file_path) { ?> 

                            <form action="" method="post" onSubmit="return validate();" name="form_edit_lang">
                                <table width="100%" border="0" cellpadding="3" cellspacing="3" class="border">   
                                    <input type="hidden" name="language" value="<?= $selected_lang; ?>">  
                                    <input type="hidden" name="file_path" value="<?= $file_path; ?>"> 
                                    <input name="h_save" type="hidden" id="h_save" value="T" />
                                    <?php
                                    $$vartxteditor = $configObj->glLibraryObj->rem_special_chars($file_content);
                                    ?>
                                    <tr id="desc1" name="desc1">
                                        <td align="left" valign="top"colspan="4" class="add-new-user-text">
                                            <?php echo $configObj->glLibraryObj->load_ckeditor('vartxteditor', $$vartxteditor); ?>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="c4"> 
                                            <div class="add-new-user-button" style="padding-bottom: 30px;">

                                                <input width="162" type="image" hspace="5" height="25" border="0" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('btnsaveandc','','html/images//save-keep-editing-button-hover.jpg',1)" src="http://nserver/eclipze.ky/powerpanel/html/images//save-keep-editing-button.jpg" alt="save-keep-editing" id="btnsaveandc" name="btnsaveandc" value="1" >
                                                <input width="108" type="image" hspace="5" height="25" border="0" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('btnsaveande','','html/images//save-exit-button-hover.jpg',1)" src="http://nserver/eclipze.ky/powerpanel/html/images//save-exit-button.jpg" alt="save-exit" id="btnsaveande" name="btnsaveande" value="1">

                                                <input width="81" type="image" hspace="5" height="25" border="0" src="http://nserver/eclipze.ky/powerpanel/html/images//cancel-button.jpg" alt="cancel" name="Image35" id="Image35" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image35','','html/images//cancel-button-hover.jpg',1)" onclick="window.location.href='index.php?module=settings&view=edit_emails';return false;">
                                            </div>
                                        </td>
                                    </tr>
                                </table> 
                            </form>
                        <? } ?> 
                    </td>
                </tr>
            </table>
        </div>
        <div class="clear"></div>   
    </div>