<script type="text/javascript" src="<?php echo GLOBAL_ADMIN_JS_PATH; ?>highslide/highslide-with-gallery.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo GLOBAL_ADMIN_JS_PATH; ?>highslide/highslide.css" />
<script type="text/javascript">

    hs.graphicsDir = '<?php echo GLOBAL_ADMIN_JS_PATH; ?>highslide/graphics/';
    hs.align = 'center';
    hs.transitions = ['expand', 'crossfade'];
    hs.wrapperClassName = 'dark borderless floating-caption';
    hs.fadeInOut = true;
    hs.dimmingOpacity = .75;

    // Add the controlbar
    if (hs.addSlideshow) hs.addSlideshow({
        slideshowGroup: 'group1',
        interval: 5000,
        repeat: false,
        useControls: true,
        fixedControls: 'fit',
        overlayOptions: {
            opacity: .6,
            position: 'bottom center',
            hideOnMouseOut: true
        }
    });
</script>
<script type="text/javascript">
    function limitText(limitField, limitNum) {
        if (limitField.value.length > limitNum) {
            limitField.value = limitField.value.substring(0, limitNum);
        }
    }

    
    function copytext()
    {
        var abcd=CKEDITOR.instances.text_fulltext.getData();
        
       var def=abcd.replace(/<a(\s[^>]*)?>.*?<\/a>/ig,"")
       var abc = def.replace(/^(\s*)|(\s*)$/g, '').replace(/\s+/g, ' ');
        var maintext=trim(removeHTMLTags(abc));
//        var maintext=trim(removeHTMLTags(CKEDITOR.instances.text_fulltext.getData()));
      
        if(trim(document.getElementById('var_metatitle').value)=="")
        {
            document.getElementById('var_metatitle').value=trim(document.getElementById('var_pagename').value).substr(0, 64);
        }
        CountLeft2(document.getElementById('var_metatitle'),document.frmpages.metatitle_left,200);
        if(trim(document.getElementById('var_metakeyword').value)=="")
        {
            document.getElementById('var_metakeyword').value=maintext.substr(0, 180);
        }
        CountLeft2(document.getElementById('var_metakeyword'),document.frmpages.metakeyword_left,400);
        if(trim(document.getElementById('var_metadescription').value)=="")
        {
            document.getElementById('var_metadescription').value=maintext.substr(0, 180);
        }
        CountLeft2(document.getElementById('var_metadescription'),document.frmpages.metadescription_left,400);
    }
    function CountLeft2(field, count, max) 
    {
        // if the length of the string in the input field is greater than the max value, trim it
       
        if (field.value.length > max)
        {
            field.value = field.value.substring(0, max);
        }
        else
        {
            count.value=max - field.value.length;
        }
    }
    function validate()
    {
        if(trim(document.getElementById('var_pagename').value) == "")
        {
            alert('Please enter title.');
            document.getElementById('var_pagename').focus();
            return false;
        }
        
       
        if(document.getElementById("var_alias").value!='')
        {
            var iChars = "!@#$%^&*()+=[]\\\';,./{}|\":<>?";
            for (var i = 0; i < document.getElementById("var_alias").value.length; i++)
            {
                if (iChars.indexOf(document.getElementById("var_alias").value.charAt(i)) != -1)
                {
                    alert (PAGE_ALIAS_NOT_VAL);
                    return false;
                }
            }
        }

        if(document.getElementById('int_displayorder').value == "" || document.getElementById('int_displayorder').value==0)
        {
            alert('Please enter display order.');
            document.getElementById('int_displayorder').focus();
            return false;
        }
        
        
        
        if(trim(document.getElementById('var_alias').value) == "")
        {
            makeLowercase1();
        }
        
         var text1=document.getElementById('var_alias').value;
        var len1=text1.length;
      
        if(len1 == 1)
        {
            alert("Alias should be greater then  one character.");
            document.getElementById('var_alias').focus();
            return false;
        }
       
 

        if(!checkingAlias('var_alias','<?= base64_encode("pages") ?>','<?= base64_encode($row['int_glcode']) ?>','<?= base64_encode('int_glcode') ?>','pages'))
        {
            return false;
        }
        <?php 
        if ($configObj->glSessionObj->value('admin_id') == '1')
        { ?>
        if(document.getElementById('displayordrchk').checked) {
            if(trim(document.getElementById('var_display_order').value) == "" || document.getElementById('var_display_order').value == "0") {
                alert('Please enter footer display order');
                document.getElementById('var_display_order').focus();
                return false;
            }
        }
        <?php } ?>
        copytext();

            
        document.getElementById('h_save').value ='T';
        return true;
        //document.frmpages.submit();
    }

    function openhidemodulecombo(id)
    {
        if(id=="Y")
        {
            if(document.getElementById('moduletype')){
                document.getElementById('moduletype').style.display='';}
            
            if(document.getElementById('fixmodule')){
                document.getElementById('fixmodule').style.display='';}	
            
            if(document.getElementById('var_detail')){
                document.getElementById('var_detail').value='detail';}
        }
        else
        {
            if(document.getElementById('moduletype')){
                document.getElementById('moduletype').style.display='none';}
            
            if(document.getElementById('fixmodule')){
                document.getElementById('fixmodule').style.display='none';}	
             
            if(document.getElementById('var_detail')){
                document.getElementById('var_detail').value='';}
        }
    }

    function checktype(flag,action)
    {

        if(document.getElementById('chr_fixmodule').checked==true)
        {
            if(document.getElementById('moduletype')){
                document.getElementById('moduletype').style.display='none';}
            
            if(document.getElementById('checktype1')){
                document.getElementById('checktype1').style.display='none';}
                
            if(document.getElementById('var_detail')){
                document.getElementById('var_detail').value='';}
                
        }

        if(document.getElementById('chr_fixmodule').checked==false)
        {
            if(document.getElementById('moduletype')){
                document.getElementById('moduletype').style.display='';}
            
            if(document.getElementById('checktype1')){
                document.getElementById('checktype1').style.display='';}
            
            if(document.getElementById('var_detail')){
                document.getElementById('var_detail').value='detail';}           
        }

    }

        function auto_alias(){
        if(document.getElementById('var_pagename').value != '' && document.getElementById('var_alias').value == '')
        {
            makeLowercase1();
        }
    }

    function makeLowercase1()
    {
        var str= trim(document.getElementById('var_pagename').value).toLowerCase();

        //alert(str);
        var temp = new String(str);
        temp =  temp.replace(/[^a-z A-Z 0-9 \-]+/g,'');

        var strlength = temp.length;
        for(i=0; i < strlength; i++)
        {
            //var str1 = temp.split(' ').join('-');
            var alias=temp.split(' ').join('-');

            //var alias = str.replace(" ", "-");
        }
        // alert(alias);return false;
        document.getElementById('var_alias').value = alias;
    }
        
        function checkdatediscription1()
    {
        if(document.getElementById('desc2').style.display =='none' || (document.getElementById('var_general_info').value= ""))
        {
            document.getElementById('desc2').style.display='';
        }
        else
        {
            document.getElementById('desc2').style.display='none';
        }
    }
    
    function addquickcategory()
    {
        $("#dialog-modal").attr('title','Add Category');
        var response;
        $.ajax({
            type: "GET",
            url:"index.php" ,
            data: "module=pages&action=addquickcat&ajax=Y&eid=<?= $_REQUEST['eid'] ?>",
            async: false,
            success: function(data){

                response=data;
            }
        });

        ////////////ajax end
        $('#dialog-modal').html(response);
        // $("#dialog-modal").dialog("destroy");


        $('#dialog-modal').dialog({
            autoOpen: false,
            height: 430,
            width: 600,
            modal: true
        });
        $('#dialog-modal').dialog('open');
    }
    function fun_del_image1()
    {
        var conf=confirm("The selected photo will be deleted.Press OK to confirm");
        if(conf==true)
        {
            document.getElementById('divdelbro2').innerHTML='';
            document.getElementById('hidvar_cmntimage').value='';
        }
        alert('Photo is deleted successfully.');
    }
    <?php 
    if ($configObj->glSessionObj->value('admin_id') == '1')
    { ?>
    function displayorder_box(chkbox) {
        if(chkbox.checked){
            $("#var_display_order").css("display", "");
            $("#displayHint").css("display", "");
        } else {
            // $("#var_display_order").val("");
            $("#var_display_order").css("display", "none");
            $("#displayHint").css("display", "none");
        }
    } 
    <?php } ?>
</script>

<?php
if ($_REQUEST['action'] != '') {
    $action = ucwords($paction);
}
if ($_REQUEST['mode'] == 'copy') {
    $action = 'Add';
}
?>

<?php
//for the preview
if ($_REQUEST['eid'] != '') {
    $sqlpre.=' int_glcode=' . $_REQUEST['eid'];

    if ($row1['var_pagetype'] != '' && $row1['var_pagetype'] != '0') {
        $sqlNew = "select var_modulename from " . DB_PREFIX . "modules where int_glcode='" . $row1['var_pagetype'] . "' ";
        $resModule = $configObj->glDbObj->get_sql_row($sqlNew);
        if ($row1['var_pagetype'] == 8) {
            $moduleLink = "module=" . $resModule['var_modulename'] . "&PageID=" . $row1['int_glcode'];
        } else {
            $moduleLink = "module=" . $resModule['var_modulename'];
        }
    } else {
        $moduleLink = "pageId=" . $_REQUEST['eid'];
    }
//echo $moduleLink;

    if ($row1['chr_previewstatus'] == 'Y') {
        ?>
        <input type="hidden" name="forthepreview" id="forthepreview" value="T" />
    <?php } else { ?>
        <input type="hidden" name="forthepreview" id="forthepreview" value="F" />
        <?php
    }
}
?>
<?php if ($_REQUEST['preview'] == 'yes') { ?>

    <script type="text/javascript">    
        window.open('<?= SITE_PATH ?>index.php?<?php echo $moduleLink; ?>','_blank');
    </script>

<?php } ?>

<?php if ($_REQUEST['action'] != '') $action = ucwords($_REQUEST['action']); ?>
<div class="breadcrumbs"><a href="index.php">Home </a>&nbsp;>&nbsp; <a href="index.php?module=pages">Manage Pages </a> &nbsp;>&nbsp;<span class="current">
        <?php
        if ($action == 'Add') {
            echo("Add Page");
        } else {
            echo("Edit Page");
        }
        ?>
    </span> </div>
<div class="add-new-user-title">
    <h2><img alt="add-new-listing" src="<?= GLOBAL_ADMIN_IMAGES_PATH ?>/add-new-user-icon.png">
        <?php
        if ($action == 'Add') {
            echo("Add Page");
        } else {
            echo("Edit Page - " . $row['var_pagename']);
        }
        ?>
    </h2>
</div>
<div id="dialog-modal" title="Manage Attributes"></div>
<?= $messagebox ?>
<form  name="frmpages"  id="frmpages" action="<?= $frmaction ?>" method="post" onSubmit="return validate();" enctype="multipart/form-data" >
    <?php
    if (!empty($_REQUEST['fk_pages']))
        $fk_page = $_REQUEST['fk_pages'];
    else
        $fk_page = $row['fk_pages'];
    ?>

    <?php // echo "<pre>"; print_r($row);?>

    <!--<input name="int_displayorder" type="hidden" class="date-textarea" id="int_displayorder" value="0" maxlength="5" onkeypress="return KeycheckOnlyNumeric(event);" />-->

    <input type="hidden" name="frommodule" id="frommodule" value="<?= $_REQUEST['frommodule']; ?>"/>
    <input type="hidden" name="fromview" id="fromview" value="<?= $_REQUEST['fromview']; ?>"/>
    <input type="hidden" name="fromaction" id="fromaction" value="<?= $_REQUEST['fromaction']; ?>"/>
    <input type="hidden" name="old_displayorder" id="old_displayorder" value="<?= $row['int_displayorder'] ?>"/>
    <input name="hidvar_bannerimage" type="hidden" id="hidvar_bannerimage" value="<?php echo $row['var_bannerimage']; ?>"/>
    <input name="hidchr_validimage" type="hidden" id="hidchr_validimage" value="<?php echo $row['chr_validimage']; ?>"/>
    <input name="hidchr_crop" type="hidden" id="hidchr_crop" value="<?php echo $row['chr_crop']; ?>" />
    <input name="hidvar_cmntimage" type="hidden" id="hidvar_cmntimage" value="<?php echo $row['var_cmntimage']; ?>" >
    <!--For the Preview display order-->
    <input name="h_save" type="hidden" id="h_save" value="F" />
    <input type="hidden" name="hdnmodify" id="hdnmodify" value="<?= $row['dt_modifydate'] ?>" />



    <input type="hidden" name="hdnread" id="hdnread" value="<?= $row['chr_read']; ?>" />
    <input type="hidden" name="hdnpreview" id="hdnpreview" value="<?= $row['chr_previewstatus'] ?>" />
    <input type="hidden" name="hdnaction" id="hdnaction" value="<?= $action ?>" />
    <input type="hidden" name="fk_preview" id="fk_preview" value="<?= $row['fk_preview'] ?>"/>
    <input type="hidden" name="paction" id="paction" value="<?= $paction; ?>">
    <input type="hidden" name="fk_pages" id="fk_pages" value="<?= $fk_page ?>">

    <?php
    if ($row['int_displayorder'] != '') {
        $int_displayorder = $row['int_displayorder'];
    } else {
        $int_displayorder = '1';
    }
    if ($row['chr_publish'] != '') {
        $hidden_chr_publish = $row['chr_publish'];
    } else {
        $hidden_chr_publish = 'Y';
    }

    $fixPageArray = array('1');
    if (($configObj->glSessionObj->value('chr_user') == 'A' && in_array($_REQUEST['eid'], $fixPageArray)) || $row['var_pagetype'] != 0) {
        $pageCheckFlag = 'falsepage';
    } else {
        $pageCheckFlag = 'truepage';
    }

    if ($pageCheckFlag == 'truepage') {
        $recordExistArray = array();
        $recordExistArray['id'] = $_REQUEST['eid'];
        // $recordExistArray['tables'][] = array('name'=>DB_PREFIX.'article_related_module','field'=>'fk_article');
        $recordExistArray['tables'][] = array('name' => DB_PREFIX . 'pages', 'field' => 'fk_pages', 'extraparam' => array('chr_delete' => 'N'));

        $chkrecordexists = $configObj->glLibraryObj->glCheckRecordExist($recordExistArray);
    }
    ?>
    <div class="web-booking-main">
        <div class="grid-list-subtitle-bg" style="margin-top:10px; cursor:pointer" onClick="javascript:expandcollapsepanel('asignbanner');" >
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  
                <tr>
                    <td align="left" valign="top" class="grid-td-left">General Details</td>
                </tr>
            </table>
        </div>
        <div class="information-white-bg" id="asignbanner" >
            <div class="clear"></div>
            <div class="grid-list-inner-table-text">
                <table width="100%" border="0" cellspacing="3" cellpadding="3">
                    <input type="hidden" name="isnetcluesadmin" value="<?php if ($configObj->glSessionObj->value('admin_id') == '1'){ echo 'Y'; } ?>">
                    <input type="hidden" name="eid" id="eid" value="<?= $row['int_glcode']; ?>" />
                    <?php
                    if ($row['chr_mainparent'] == 'Y') {
                        $pagetreeStyle = "style='display:none;'";
                    } else {
                        $pagetreeStyle = "";
                    }
// if($row['var_pagetype']==0 && !empty($pagetree) ){ // {
                    if (($_REQUEST['eid'] != '1' && $row['fk_pages'] != '0' && $row['var_pagetype'] == 0) || $configObj->glSessionObj->value('admin_id') == '1' || $configObj->glSessionObj->value('chr_user') == 'A') {
                        ?>
                        <tr <?php echo $pagetreeStyle; ?>>
                            <td height="35" align="left" valign="top" class="add-new-user-text">Parent Page:</td>
                            <td height="35" align="left" valign="top" class="add-new-user-text2">
                                <table>
                                    <tr>
                                        <td>
                                            <div id="catDisplay" >
                                                <?= $pagetree ?>
                                            </div>
                                        </td>
                                        <td valign="top">

                                            <div class="fl contact-comment-new position-relative mgl5">
                                                <span class="help-icon1"></span>
                                                <div class="contact-hint fl" style="width: 400px; height: 60px;"><?php echo GLOBAL_PAGESCATEGORY_NOTE; ?></div>
                                            </div>                                       
                                        </td>
                                    </tr>
                                </table>
                            </td>


                        </tr>
                    <?php } ?>
                        
                    <tr>

                        <td width="200" align="left" valign="top" class="add-new-user-text"> Title: <span>(required)</span></td>
                        <td width="724" align="left" valign="top">

                            <input name="var_pagename" type="text"  class="add-new-user-textarea fl" id="var_pagename"  style="width: 356px;" value="<?= htmlspecialchars($row['var_pagename']); ?>"  maxlength="200"  />

                            <?php if ($_REQUEST['action'] == 'edit') { ?>
                                <input type="hidden" name="var_detail" id="var_detail" value="<?php echo $row['var_viewalias'] ?>" >
                            <?php } else { ?>
                                <input type="hidden" name="var_detail" id="var_detail" value="" >
                            <?php } ?>

                            <div class="fl contact-comment-new position-relative mgl5 mgt5">
                                <span class="help-icon1"></span>
                                <div class="contact-hint fl" style="width: 400px; height: 50px;"><?php echo GLOBAL_TITLE_NOTE; ?></div>
                            </div>    
                        </td>
                    </tr>
                    
                    <?php if ($configObj->glSessionObj->value('admin_id') == '1' || $configObj->glSessionObj->value('chr_user') == 'A' || (DISPLAY_ALIAS == 'Y')) { ?>

                        <tr>
                            <td width="200" align="left" valign="top" class="add-new-user-text"> Alias: <span>(auto)</span> </td>
                            <td width="724" align="left" colspan="2" valign="top"><input style="float:left; width:356px;" name="var_alias" type="text"   onblur="auto_alias();" class="add-new-user-textarea" id="var_alias"   value="<?= $row['var_alias']; ?>" maxlength="250"  onkeypress="return KeycheckOnlyalias(event)"    />
                                <div class="fl contact-comment-new position-relative mgl5 mgt5">
                                    <span class="help-icon1"></span>

                                    <div class="contact-hint fl" style="width: 400px; height: 95px;"><?php echo GLOBAL_ALIAS_NOTE; ?></div>
                                </div>  

                                <a herf="javascript:;" style="float: left; margin: 10px 0px 0px 12px;cursor: pointer;" onclick="checkingAlias('var_alias','<?= base64_encode("pages") ?>','<?= base64_encode($row['int_glcode']) ?>','<?= base64_encode('int_glcode') ?>','pages');">Check Alias</a>
                                <br>
                                <div align="center" style="margin-top:-5px; *margin-bottom:5px;"  id="aliasmsg" class=""></div>
                            </td>
                        </tr>
                    <? } else {
                        ?>
                        <input  name="var_alias" type="hidden" class="add-new-user-textarea" id="var_alias" value="<?= $row['var_alias']; ?>" maxlength="500"  />
                    <?php } ?>
                        <?php 
                        if ($configObj->glSessionObj->value('admin_id') == '1')
                        {
                        $selected_chk = '';
                        if($row['chr_display_footer']=='Y') {
                            $selected_chk = "checked=''";
                        }
                        ?>
                        <tr>
                            <td width="200" align="left" valign="top" class="add-new-user-text"> Display In Footer: </td>
                            <td width="724" align="left" valign="top">
                                <input type="checkbox"  name="displayordrchk" value="Y" id="displayordrchk" onclick="return displayorder_box(this)" <?php echo $selected_chk; ?> style="float: left">
                                <input type="text" name="var_display_order" id="var_display_order" value="<?php echo $row['footer_display_order']; ?>" style="float: left;width:50px;<?php if($row['chr_display_footer']!='Y') { ?> display: none <?php } ?>"> 
                                <input type="hidden" value="<?php echo $row['footer_display_order']; ?>" name="old_footer_displayorder" >
                                <div class="contact-comment-new position-relative mgl5 fl" id="displayHint">
                                    <span class="help-icon1" style="margin-top: 3px;"></span>
                                    <div class="contact-hint fl" style="width: 800px; height: 30px;">
                                        Pages are usually ordered alphabetically, but you may choose to put a number in the display order fields to change the footer menu page listing priority.
                                    </div>
                                </div> 
                            </td>
                        </tr>
                    <?php
                    }
                    if ($row['chr_displaycontent'] == 'N' && $row['int_glcode'] > 1) {
                        ?>
                        <input name="text_fulltext" type="hidden" class="add-new-user-textarea" id="text_fulltext" value="<?= $row['text_fulltext']; ?>"/>
                        <?php
                    } else {
                        ?>

                        <tr>
                            <td  align="left" valign="top" class="add-new-user-text" colspan="2"><div class="fl">Description:</div>

                                <div class=" contact-comment-new position-relative mgl5 fl">
                                    <span class="help-icon1"></span>
                                    <div class="contact-hint fl" style="width: 800px; height: 30px;"><?php echo GLOBAL_DESCRIPTION_NOTE; ?></div>
                                </div>                              
                            </td>
                        </tr>
                       

                        <tr>
                            <td  align="left" valign="top" class="add-new-user-text" colspan="4">
                                <?php echo $configObj->glLibraryObj->load_ckeditor('text_fulltext', $row['text_fulltext']); ?>
                            </td>
                        </tr>
                    <?php } ?>
                        
                        <tr>
                        <td  align="left" valign="top" class="add-new-user-text"><div class="fl">General Information</div>
                            <div class=" contact-comment-new position-relative mgl5 fl">
                                <span class="help-icon1"></span>
                                <div class="contact-hint fl" style="width: 800px; height: 30px;">
                                    <?php echo GLOBAL_DESCRIPTION_NOTE; ?>
                                </div>
                            </div>                              
                        </td>
                        <?php
                        if ($row['var_general_info'] != '') {
                            $id_h = 'checked = "checked"';                                
                            ?>
                            <?php
                        } else {                                
                            $id_h='';
                        }
                        
                        if ($row['var_general_info'] != '') {
                            $style1 = 'style="display:;"';
                        } else {
                            $style1 = 'style="display:none;"';
                        }
                        
                        if(!empty($row['var_general_info'])) {
                            $general_info = $row['var_general_info'];
                        } else {
                            $general_info = "Prices are subject to change without notice.";
                        }
                        ?>
                        <td>
                            <input style="float: left" type="checkbox" id="var_h_info" name="var_h_info" <?php echo $id_h; ?> value="Y" onclick="checkdatediscription1()">
                        </td>
                    </tr>
                    <tr id="desc2" <?= $style1 ?>>
                        <td  align="left" valign="top"colspan="4" width="" class="add-new-user-text" >
                            <?php echo $configObj->glLibraryObj->load_ckeditor('var_general_info', $general_info); ?>
                        </td>
                    </tr>
                    
                    <tr>
                        <td height="30" align="left" valign="top" class="add-new-user-text">
                            <input name="fk_modules" type="hidden" id="fk_modules" value="<?php echo $fk_modules; ?>" /></td>
                        <td height="30" align="left" valign="top" class="add-new-user-text2">&nbsp;</td>
                    </tr>
                     
                </table>
            </div>
        </div>
        <div class="clear"></div>
        <div class="clear"></div>
        <?php if ($configObj->glSessionObj->value('admin_id') == '1' || (DISPLAY_SEO == 'Y')) { ?>
            <div class="grid-list-subtitle-bg" style="margin-top:10px; cursor:pointer" onClick="javascript:expandcollapsepanel('asignbannerseo');" >
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td align="left" valign="top" class="grid-td-left">SEO Information</td>
                    </tr>
                </table>
            </div>
            <div class="information-white-bg" id="asignbannerseo" style="display:none;">
                <div class="clear"></div>
                <div class="grid-list-inner-table-text">
                    <?php echo $configObj->glLibraryObj->seo_textdetails($row['var_metatitle'], $row['var_metakeyword'], $row['var_metadescription']); ?>
                </div>
            </div>
            <div class="clear"></div>
        <?php } else { ?>
            <input name="var_metatitle" type="hidden"  id="var_metatitle" value="<?= $row['var_metatitle']; ?>"  />
            <input name="var_metakeyword" type="hidden"  id="var_metakeyword" value="<?= $row['var_metakeyword']; ?>" />
            <input type="hidden"  id="var_metadescription" name="var_metadescription" value="<?= $row['var_metadescription']; ?>" />
            
        <?php } ?>
        <?php if ($_REQUEST['eid'] != '1') { ?>
            <div class="grid-list-subtitle-bg" style="margin-top:10px; cursor:pointer" onClick="javascript:expandcollapsepanel('asignbannerdisplay');" >
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td align="left" valign="top" class="grid-td-left">Display Information</td>
                    </tr>
                </table>
            </div>
            <div class="information-white-bg" id="asignbannerdisplay" style="display:none;" >
                <div class="clear"></div>
                <div class="grid-list-inner-table-text">
                    <table width="100%" border="0" cellspacing="3" cellpadding="3">
                        <tr>
                            <td width="268" align="left" valign="top" class="add-new-user-text">Display Order:<span>(required)</span></td>
                            <td colspan="3" align="left" valign="top">
                                <input name="int_displayorder" type="text" class="date-textarea fl" id="int_displayorder" value="<?= $int_displayorder ?>" maxlength="3" onkeypress="return KeycheckOnlyNumeric(event);" />
                                <div class=" contact-comment-new position-relative mgt5 mgl10 fl" >
                                    <span class="help-icon1"></span>
                                    <div class="contact-hint fl" style="width: 660px; height: 30px;"><?php echo "Pages are usually ordered alphabetically, but you may choose to put a number in the display order fields to change the page listing priority."; ?></div>
                                </div>
                            </td>
                        </tr>
                        <?php
                        if ($paramMain['Publish'] != 'Y') {
                            $displayStyle = 'style="display:none"';
                        }
                        //print $row['var_pagetype'];
                        if ((($row['var_pagetype'] == 0 ) && !$chkrecordexists && $row['chr_fixmodule'] == 'N' && $row['int_glcode'] > 1 && $_REQUEST['action'] == 'edit') || $_REQUEST['action'] == 'add') {
                            ?>
                            <tr <?php echo $displayStyle; ?>>
                                <td height="30" align="left" valign="top" class="add-new-user-text">Display:<span>(required)</span></td>
                                <td width="100" height="30" align="left" valign="top" class="add-new-user-text2"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td width="53%"><?php if ($row['chr_publish'] == 'Y') { ?>
                                                    <input type="radio" name="chr_publish" id="chr_publishY" value="Y" checked="checked" class="form-rediobutton "/>
                                                <?php } else { ?>
                                                    <input type="radio" name="chr_publish" id="chr_publishY" value="Y"  checked="checked" class="form-rediobutton "/>
                                                <?php } ?>
                                                <a href="javascript:" onclick="if(document.getElementById('chr_publishY').checked!=true) document.getElementById('chr_publishY').checked=true;" style="text-decoration:none;"> Yes</a></td>
                                            <td width="53%"><?php if ($row['chr_publish'] == 'N') { ?>
                                                    <input name="chr_publish" type="radio" class="form-rediobutton " checked="checked" id="chr_publishN" value="N"    />
                                                <?php } else { ?>
                                                    <input name="chr_publish" type="radio" class="form-rediobutton " id="chr_publishN" value="N"  />
                                                <?php } ?>
                                                <a href="javascript:" onclick="if(document.getElementById('chr_publishN').checked!=true) document.getElementById('chr_publishN').checked=true;" style="text-decoration:none;"> No</a></td>
                                        </tr>
                                    </table>
                                </td>
                                <td width="877" align="left" valign="top" class="add-new-user-text2">
                                    <div class=" contact-comment-new position-relative mgt5 mgl10 fl">
                                        <span class="help-icon1"></span>
                                        <div class="contact-hint fl" style="width: 660px; height: 30px;"><?php echo "Note : Please select 'Yes' if you want to display activate this record. Otherwise please select 'NO'."; ?></div>
                                    </div>   

                                </td>
                            </tr>
                        <?php } else { ?>
                            <input type="hidden" name="chr_publish" id="chr_publish" value="<?php echo $row['chr_publish'] ?>" />
                        <?php } ?>
                    </table>
                    <p>&nbsp;</p>
                </div>
            </div>
            <?php
        } else {
            ?>
               <input type="hidden" name="int_displayorder" id="int_displayorder" value="<?php echo $int_displayorder ?>" />
            <input type="hidden" name="chr_publish" id="chr_publish" value="<?php echo $row['chr_publish'] ?>" />
          
        <?php }
        ?>

        <br />
        <?= $BottomSubmitButtons ?>
        <div class="clear"></div>
        <div class="add-new-user-button"></div>
        <br>
        <br>
    </div>
</form>
