<link type="text/css" href="<?php echo GLOBAL_ADMIN_JS_PATH; ?>jquery/themes/base/jquery.ui.datepicker.css" rel="stylesheet" />
<script type="text/javascript" src="<?php echo GLOBAL_ADMIN_JS_PATH; ?>jquery/ui/jquery.ui.datepicker.js"></script>
<script type="text/javascript" src="<?php echo GLOBAL_ADMIN_JS_PATH; ?>highslide/highslide-with-gallery.js"></script>
<script type="text/javascript" src="<?php echo GLOBAL_ADMIN_JS_PATH; ?>jquery/ui/minified/jquery.ui.mouse.min.js"></script>
<script type="text/javascript" src="<?php echo GLOBAL_ADMIN_JS_PATH; ?>jquery/ui/minified/jquery.ui.draggable.min.js"></script>
<script type="text/javascript" src="<?php echo GLOBAL_ADMIN_JS_PATH; ?>jquery/ui/minified/jquery.ui.dialog.min.js"></script>
<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" />
<link type="text/css" href="<?php echo GLOBAL_ADMIN_JS_PATH; ?>jquery/themes/base/jquery.ui.dialog.css" rel="stylesheet" />
<script type="text/javascript" src="<?php echo GLOBAL_ADMIN_JS_PATH; ?>jquery/popup.js"></script>
<?php
//echo DEFAULT_DATEFORMAT; exit;
//echo $date_news;
if (DEFAULT_DATEFORMAT == "%d/%m/%Y") {
    $date_news1 = "dd/mm/yy";
}
if (DEFAULT_DATEFORMAT == "%m/%d/%Y") {
    $date_news1 = "mm/dd/yy";
}
if (DEFAULT_DATEFORMAT == "%Y/%m/%d") {
    $date_news1 = "yy/mm/dd";
}
if (DEFAULT_DATEFORMAT == "%Y/%d/%m") {
    $date_news1 = "yy/dd/mm";
}
$startdatehidden = explode("-", $configObj->glLibraryObj->ConvertDateFormatinYMD($row['dt_startdate']));
$enddatehidden = explode("-", $configObj->glLibraryObj->ConvertDateFormatinYMD($row['dt_expiredate']));
?>

<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() {
        focus();	
        $('#dt_startdate').datepicker({
            changeMonth: true,
            changeYear: true,
            dateFormat:'<?php echo $date_news1; ?>',
            onSelect: function(selectedDate){
                var option = "minDate";
                var instance = $('#dt_expirydate').data("datepicker");
                var date = $.datepicker.parseDate(instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings);
                $('#dt_expirydate').datepicker("option", option, date);
            }});


        $('#dt_expirydate').datepicker({
            changeMonth: true,
            changeYear: true,
            minDate:1,
            dateFormat:'<?php echo $date_news1; ?>'
        });
    });

   
    function dateCompare(startDate,endDate,seprator)
    {
        switch("<?= DEFAULT_DATEFORMAT ?>")
        {
            case '%d/%m/%Y':
                year=2;
                month=1;
                date=0;
                break;
            case '%m/%d/%Y':
                year=2;
                month=0;
                date=1;
                break;
            case '%Y/%m/%d':
                year=0;
                month=1;
                date=2;
                break;
            case '%Y/%d/%m':
                year=0;
                month=2;
                date=1;
                break;
            }

            var Date_Start=startDate.split(seprator);        
            var Date1 = new Date(Date_Start[year],Date_Start[month],Date_Start[date]);
       
            var Date_End=endDate.split(seprator);                
            var Date2 = new Date(Date_End[year],Date_End[month],Date_End[date]);

            var compDate = Date2 - Date1;
            var days = Math.round(compDate/(1000*60*60*24));
        
            return days;
        }
        
        function checkdatediscription()
        {
            if(document.getElementById('displaydesc').style.display =='none' || (document.getElementById('var_description').value= ""))
            {
                document.getElementById('displaydesc').style.display='';
            }
            else
            {
                document.getElementById('displaydesc').style.display='none';
            }
        }
        
        function quickadd()
        {
            $.ajax({
                type: "GET",
                url: "index.php?module=news&action=quickadd&ajax=Y",
                async: true,
                success: function(data){

                }
            });
        }
</script>
<script type="text/javascript">
    function fun_del_pdf(id,file)
    {
        file = document.getElementById('hidvar_pdffile').value;
        $.ajax({
            type: "GET",
            url: "index.php?module=news&action=deletedocument&ajax=Y&sid="+id+"&file="+file,
            async: true,
            success: function(data){
                if(parseInt(data)!=1)
                {
                    document.getElementById('divdelbro').innerHTML='';
                    document.getElementById('hidvar_pdffile').value='';
                    alert('Document is deleted successfully');
                }
                else
                {
                }
            }
        });
    }   
    function copytext()
    {
        var abcd=CKEDITOR.instances.var_description.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_title').value).substr(0, 64);
        }
        CountLeft2(document.getElementById('var_metatitle'),document.frmnews.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.frmnews.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.frmnews.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()
        {           
            var alias=document.getElementById('var_alias').value;
            if(trim(document.getElementById('var_title').value)== "")
            {
                alert("Please enter news title.");
                document.getElementById('var_title').focus();
                return false;
            }
            
            else  if(trim(document.getElementById('var_short_description').value)== "")
            {
                alert("Please enter short description.");
                document.getElementById('var_short_description').focus();
                return false;
            }
            else if(document.getElementById('var_pdffile').value != '')
            {   
                var name = document.getElementById('var_pdffile').value;
                found = name.lastIndexOf('.') + 1;
                var ext = name.substr(found)
                if(!(ext == 'doc' || ext == 'docx' || ext == 'pdf'))  {
                    alert('Only .doc, .docx, .pdf file formats are supported.');
                    document.getElementById('var_pdffile').focus();
                    return false;
                }
            }
            else if(document.getElementById('dt_startdate').value == "")
            {
                alert("Please enter news start date.");
                document.getElementById('dt_startdate').focus();
                return false;
            }
            if(document.getElementById('dt_startdate').value != "" && (!document.getElementById('dt_expiredate_no').checked  && $("#dt_expirydate").val()=='' ))
            {
                alert("Please select expiry date or check no expiry.");
                document.getElementById('dt_expirydate').focus();
                return false;
            }
              else if(chkObject('int_displayorder') && document.getElementById('int_displayorder').value == "")
        {
            alert("Please enter display order.");
            document.getElementById('int_displayorder').focus();
            return false;
        }   
        if(document.getElementById('int_displayorder').value == "" || document.getElementById('int_displayorder').value==0)
        {
            alert("Please enter proper display order.");
            document.getElementById('asignbannerdisplay').style.display='';
            document.getElementById('int_displayorder').focus();
            return false;
        }

 if(trim(document.getElementById('var_alias').value) != "")
        {

            var str=document.getElementById('var_alias').value;

            var RE=/ /i;

            if (str.match(RE)==' ')
            {
                alert("Alias is not valid. Please remove space.");
                return false;
            }
        }
        
        if(document.getElementById('var_alias').value=="")
        {
            makeLowercase('var_title','var_alias');
        }
        
        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("news") ?>','<?= base64_encode($row['int_glcode']) ?>','<?= base64_encode('int_glcode') ?>',"pages"))
        {
            return false;
        }
        copytext();
        document.getElementById('h_save').value ='T';
        return true;
        }
        function auto_alias(){
            if(document.getElementById('var_title').value != '' && document.getElementById('var_alias').value == '')
            {
                makeLowercase();
            }
        }
        function makeLowercase (var_title,var_alias)
        {
            if(typeof var_title=="undefined")
            {
                var_title="var_title";
            }
            if(typeof var_alias=="undefined")
            {
                var_alias="var_alias";
            }
            var str="";
            if($("#"+var_alias).val().length == 0)
                str= document.getElementById(var_title).value.toLowerCase();
            else
                sstr=$("#"+var_alias).val()
            str= str.toLowerCase();
            var temp = new String(str);
            temp =  temp.replace(/[^a-z A-Z 0-9 \-]+/g,'');
            temp=trim(temp);
            var strlength = temp.length;
            for(i=0;i<strlength;i++)
            {
                var alias = temp.split(' ').join('-');
            }

            document.getElementById(var_alias).value = alias;
        }

        function limitText(limitField, limitNum) {
            if (limitField.value.length > limitNum) {
                limitField.value = limitField.value.substring(0, limitNum);
            }
        }
        function valButton(btn) {
            var cnt = -1;
            for (var i=btn.length-1; i > -1; i--) {
                if (btn[i].checked) {cnt = i; i = -1;}
            }
            if (cnt > -1) return btn[cnt].value;
            else return null;
        }
        function checkdatediv()
        {
            if(document.getElementById('dt_expirydate').style.display =='none')
            {
                document.getElementById('dt_expirydate').style.display='';
                document.getElementById('dt_expirydate').value='';
                document.getElementById('dt_expirydate').focus();
            }
            else
            {
                document.getElementById('dt_expirydate').style.display='none';
                document.getElementById('dt_expirydate').value='';
            }
        }
        function chkObject (theVal)
        {
            if (document.getElementById(theVal) != null)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
</script>
<div id="popupContact" class="dragme"  style="z-index:9999"></div>
<div id="backgroundPopup" style="z-index: 101;"></div>
<?php
if ($_REQUEST['action'] != '') {
    $action = ucwords($_REQUEST['action']);
}
if ($_REQUEST['mode'] == 'copy') {
    $action = 'Add';
}
?>
<div class="breadcrumbs">
    <a href="index.php">Home </a>&nbsp;>&nbsp; <a href="index.php?module=news<?php echo ($_REQUEST['newscategory'] != '') ? '&newscategory=' . $_REQUEST['newscategory'] : ''; ?>">Manage News</a>&nbsp; >&nbsp; <span class="current"><?= $action ?> News</span>  
    <?php if ($_REQUEST['newscategory'] != '') { ?>
        <span style="float:right; margin-right:15px; margin-top:-15px; "><a href="index.php?module=newscategory"><img src="<?= GLOBAL_ADMIN_IMAGES_PATH ?>back-button-blue.gif"></a></span>
    <?php } ?>
</div>
<div class="add-new-user-title">
    <?php if ($_REQUEST['newscategory'] != '') { ?>
        <h2><img src="<?= GLOBAL_ADMIN_IMAGES_PATH ?>/add-new-user-icon.png"><?= $action ?> News - <?= $newsObj->catnews($row['int_glcode']) ?></h2>
    <?php } else { ?>
        <?php
        if ($_REQUEST['action'] == 'edit') {
            $title = $newsObj->catnews($row['int_glcode']);
        }
        ?>
        <h2><img src="<?= GLOBAL_ADMIN_IMAGES_PATH ?>/add-new-user-icon.png"><?= $action ?> News 
            <?php
            if ($_REQUEST['action'] == 'edit') {
                echo "- " . $title;
            }
            ?></h2>
    <?php } ?>

</div>
<?= $messagebox ?>
<?php
if ($row['int_displayorder'] != '') {
    $int_disporder = $row['int_displayorder'];
} else {
    $int_disporder = '1';
}
if ($row['chr_publish'] != '') {
    $hidden_chr_publish = $row['chr_publish'];
} else {
    $hidden_chr_publish = 'Y';
}
if ($_REQUEST['action'] == 'edit') {
    $sql = "UPDATE " . DB_PREFIX . "news SET chr_read='N' where int_glcode=" . $_REQUEST['eid'];
    $newsObj->configObj->glDbObj->query($sql);
}
?>
<form  name="frmnews"  id="frmnews" action="<?php echo $newsaction; ?>" method="post" onSubmit="return validate();" enctype="multipart/form-data" >
    <input name="hidvar_pdffile" type="hidden" id="hidvar_pdffile" value="<?= $row['var_pdffile']; ?>" />
    <input type="hidden" name="startdateY" id="startdateY" value="<?= $startdatehidden[0] ?>">
    <input type="hidden" name="startdateM" id="startdateM" value="<?= $startdatehidden[1] ?>">
    <input type="hidden" name="startdateD" id="startdateD" value="<?= $startdatehidden[2] ?>">
    <input type="hidden" name="enddateY" id="enddateY" value="<?= $enddatehidden[0] ?>">
    <input type="hidden" name="enddateM" id="enddateM" value="<?= $enddatehidden[1] ?>">
    <input type="hidden" name="enddateD" id="enddateD" value="<?= $enddatehidden[2] ?>">
    <input type="hidden" name="dateformat" id="dateformat" value="<?= $date_news1 ?>">
    <div class="web-booking-main">
        <input type="hidden" name="old_displayorder" id="old_displayorder" value="<?= $row['int_displayorder'] ?>">
        <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">News Information</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">
                    <tr>
                        <td align="left" valign="top" class="add-new-user-text"> News Title: <span>(required)</span></td>
                        <td width="75%" align="left" valign="top">
                            <?php
                            if ($_REQUEST['mode'] == 'copy') {
                                $title = 'Copy of ' . $row['var_title'];
                            } else {
                                $title = $row['var_title'];
                            }
                            ?>
                            <input name="var_title" type="text" class="add-new-user-textarea" id="var_title" style="width: 345px; float: left;" value="<?= htmlspecialchars($title); ?>" maxlength="100" />
                        </td>
                    </tr>
                    <?php
                    if (DISPLAY_ALIAS == 'Y') {
                        ?>
                        <tr>
                            <td  align="left" valign="top" class="add-new-user-text">Alias: <span>(auto)</span>  </td>
                            <td  width="75%" align="left" valign="top">
                                            <input name="var_alias" type="text" style="width:345px;float: left;" class="add-new-user-textarea fl" id="var_alias" value="<?= $row['var_alias']; ?>" maxlength="100" onblur="auto_alias();" />
                                            <div class="fl contact-comment-new position-relative mgl5 mgt5" style="padding-top: 5px;float: left;">
                                                <span class="help-icon1"></span>
                                                <div class="contact-hint fl" style="width: 390px; height: 100px;float: left;"><?php echo GLOBAL_ALIAS_NOTE; ?></div>
                                            </div>
                                            <a herf="javascript:;" onclick="checkingAlias('var_alias','<?= base64_encode("news") ?>','<?= base64_encode($row['int_glcode']) ?>','<?= base64_encode('int_glcode') ?>','pages');" style="height: 5px;float: left;">Check Alias</a></div>                                            
                                         <div id="aliasmsg"  style="float: left;" ></div><td>                                           
                                        </td>
                        </tr>
                    <?php } else { ?>
                        <input name="var_alias" type="hidden" class="add-new-user-textarea" id="var_alias" value="<?= $row['var_alias']; ?>" maxlength="255"  />
                    <?php } ?>
                    <tr>
                        <td width="257" align="left" valign="top" class="add-new-user-text"> Short Description:  <span>(required)</span> </td>
                        <td width="824" align="left" valign="top">
                            <textarea id="var_short_description" name="var_short_description" class="textarea2" maxlength="500" style="width:350px;" 
                                      onKeyDown="CountLeft(this.form.var_short_description,this.form.description_left,500);"
                                      onKeyUp="CountLeft(this.form.var_short_description,this.form.description_left,500);"><?= $row['var_short_description'] ?></textarea>
                            <input disabled="disabled" type="text" name="description_left" value="<?= (500 - strlen($row['var_short_description'])) ?>" class="add-new-user-textarea" style="width:35px;"/><span valign="bottom" style="color:#000000;"> characters left</span>
                        </td>
                    </tr>
                    <tr>
                        <td  align="left" valign="top" width="230px" class="add-new-user-text" >Description: </td>
                        <td width="824" align="left" valign="top">
                            <input
                            <?php
                            if ($row['var_description'] != '') {
                                echo 'checked';
                                ?>

                                    <?php
                                } else {
                                    echo "";
                                }
                                ?>
                                type="checkbox"
                                name="var_desc"
                                onclick="javascript : checkdatediscription()"
                                id="var_desc"
                                value="Y"

                                />

                        </td>
                    </tr>
                    <tr>
                        <td  align="left" valign="top" width="212" class="add-new-user-text">Upload File:</td>
                        <td width="856" align="left">
                            <table>
                                <tr>
                                    <td>
                                        <input name="var_pdffile" id="var_pdffile" type="file"  />
                                    </td>
                                    <td>
                                        <?php
                                        if ($row['var_pdffile'] != '') {
                                            $fileexntension = substr(strrchr($row['var_pdffile'], '.'), 1);

                                            if ($fileexntension == 'doc' || $fileexntension == 'docx') {
                                                $t = 'WORD.png';
                                            } else if ($fileexntension == 'ppt' || $fileexntension == 'pptx') {
                                                $t = "ppt-icon.png";
                                            } else {
                                                $t = 'pdf.png';
                                            }
                                            ?>

                                            <div style="" id="divdelbro">
                                                <a href="javascript:;" onclick="fun_del_pdf(<?= $row['int_glcode'] ?>,'<?= $row['var_pdffile']; ?>');">Delete</a>&nbsp;&nbsp;&nbsp;&nbsp;
                                                <a style="cursor:pointer;" href="download.php?f=upimages/news/pdf/<?= $row['var_pdffile'] ?>&module=news">
                                                <img id="pdficon" height="16" width="16" alt="<?= $title ?>" title="<?= $var_pdffile ?>" src="<?= GLOBAL_ADMIN_IMAGES_PATH ?>/<?= $t ?>" style="vertical-align:middle;cursor:pointer;" /></a>
                                            </div>
                                        <?php } else { ?>
                                        <?php } ?>
                                            <div style="width: 500px;"><span>(Only .doc, .docx, .pdf file formats are supported.)</span></div>

                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <?php
                    if ($row['var_description'] != '') {
                        $style = 'style="display:;"';
                    } else {
                        $style = 'style="display:none;"';
                    }
                    ?>
                    <tr <?= $style ?> id="displaydesc">
                        <td  align="left" valign="top"colspan="3" width="25%" class="add-new-user-text" >
                            <?php echo $configObj->glLibraryObj->load_ckeditor('var_description', $row['var_description']); ?> 
                        </td>
                    </tr>
                    <?php
                    if ($row['dt_startdate'] != '') {
                        $date = $row['dt_startdate'];
                    } else {
                        $str = str_replace('%', '', DEFAULT_DATEFORMAT);
                        $date = DATE($str);
                    }
                    ?>
                    <tr>
                        <td width="" align="left" valign="top" width="25%" class="add-new-user-text">Start Date: <span>(required)</span></td>
                        <td  align="left" colspan="1" valign="top">
                            <input name="dt_startdate" type="text" class="date-textarea fl" id="dt_startdate" value="<?= $date; ?>" maxlength="20"  readonly />
                            <div class="fl contact-comment-new position-relative mgl5 mgt5">
                                <span class="help-icon1"></span>
                                <div class="contact-hint fl" style="width: 400px; height: 15px;"><?php echo "This is the date when the news will be displayed on the site." ?></div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td width="21%" align="left" valign="top" class="add-new-user-text">Expiry Date: <span>(required)</span></td>
                        <td  align="left" valign="middle" nowrap="nowrap">

                            <input name="dt_expirydate" type="text" class="date-textarea" id="dt_expirydate"
                                   value="<?php
                    $edate = $row['dt_expiredate'];
                    if ($edate != '0000-00-00') {
                        echo $edate;
                    }
                    ?>"
                                   maxlength="20"  <?php
                                   if ($edate == '0000-00-00' || $edate == '0000/00/00' || $edate == '00/00/0000') {
                                       echo "style=display:none";
                                   } else {
                                       echo "style=display:''";
                                   }
                    ?> />
                            <input
                            <?php
                            if ($edate == '0000-00-00' || $edate == '0000/00/00' || $edate == '00/00/0000') {
                                echo 'checked';
                            } else {
                                echo "";
                            }
                            ?>
                                type="checkbox"
                                name="dt_expiredate_no"
                                value="Y"
                                onclick="javascript : checkdatediv()"
                                id="dt_expiredate_no"

                                <?php
                                if ($edate == '0000/00/00' || $edate == '00/00/0000') {
                                    ?>  <?php } else { ?>  <? } ?>
                                />
                            No Expiry
                        </td>
                    </tr>
                    <input name="h_save" type="hidden" id="h_save" value="T" />
                </table>
            </div>
        </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 } ?>
        <div class="clear"></div>
        <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>
        <?php
        if ($row['int_displayorder'] != '')
            $int_disporder = $row['int_displayorder'];
        else
            $int_disporder = '1';
        ?>
        
        <input name="int_displayorder" type="hidden" class="date-textarea fl" id="int_displayorder" value="<?= $int_disporder; ?>" maxlength="3" onkeypress="return KeycheckOnlyNumeric(event);" />
        <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="156" align="left" valign="top" class="add-new-user-text">Display Order: <span>(required)</span></td>
                        <td width="724" align="left" valign="top">
                            <input name="int_displayorder" type="text" class="date-textarea fl" id="int_displayorder" value="<?= $int_disporder; ?>" 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: 590px; height: 30px; top: 10px; left:10px;position: absolute ;" ><?php echo "Promotions are usually ordered alphabetically, but you may choose to put a number in the display order fields to change the services listing priority."; ?></div>
                            </div> 
                        </td>
                    </tr>-->
                    <tr>
                        <td width="156" height="30" align="left" valign="middle" class="add-new-user-text">Publish: <span>(required)</span></td>
                        <td width="724" height="30" align="left" valign="middle" class="add-new-user-text2">
                            <table width="27%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td width="23%">
                                        <?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="24%"> <?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>
                                    <td align="left" valign="middle" class="add-new-user-text2"><img width="16" height="16" src="<?= GLOBAL_ADMIN_IMAGES_PATH ?>help.png" onmouseover="showDiv(event,'dvhlpvarwebsite')" onmouseout="hidediv('dvhlpvarwebsite');" alt="">
                                        <div id="dvhlpvarwebsite" style=" z-index:99999; position: absolute;background-color: #d5ecfa;width: 400px;height:35px;padding: 10px;color:#0b336a;border: #95d0f2 2px solid;display: none;font-family:Tahoma, Arial, Verdana;font-size:13px;font-weight:bold;">Note : Please select 'Yes' if you want to display / activate this record. Otherwise please select 'NO'. </div></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <br />
        <?= $BottomSubmitButtons ?>
        <div class="clear"></div><br><br>
        <div class="add-new-user-button"></div>
    </div>
</form>