<?php $settings = $GLOBALS['Auth']->getSettings(); ?>
<form action="index.php" method="POST">
<table cellpadding="2" cellspacing="0" border="0" width="780">
<tr><td>
    <?php echo $this->a_panel_desc?><br><br></td>
</tr>
</table>
    <table class="listing" width="780" border=0 cellspacing=0 cellpadding=2>
    <?php QUnit_Templates::printFilter(3, $this->a_panel_name); ?>
    <tr>
        <td width="200" align="left" style="padding:0 10px;">
            <input type="checkbox" name="showsection" <?php echo ($settings['Aff_menu_item_'.$this->a_menu_item.'_show'] == 'true')? 'checked' : ''?>>
            <input type="hidden" name="menuitem" value="<?php echo $this->a_menu_item?>">
            <?php echo L_G_SHOWSECTION?><?php showQuickHelp(L_G_HLP_DISPLAYSECTIONTOAFFS); ?>
        </td>
    </tr>

    <tr>
        <td style="padding:0 10px;">
            <br>
            <input type="checkbox" name="showdescription" <?php echo ($settings['Aff_settings_'.$this->a_panel_type.'_show_description'] == 'true')? 'checked' : ''?>>
            <?php echo L_G_SHOWDESCRIPTION?><?php showQuickHelp(L_G_HLPDISPLAY_BUILDINDESC); ?>
            <br>
            <table width="100%" border=0 style="border: #aaaaaa 1px solid;">
            <tr>
                <td align=left valign=top>
                <?php echo $this->a_panel_aff_desc?>
                </td>
            </tr></table>
        </td>
    </tr>
    <tr>
        <td align="left" style="padding:0 10px;">
            <br><br>
            <input type="checkbox" name="showcustomdescription" <?php echo ($settings['Aff_settings_'.$this->a_panel_type.'_show_customdescription'] == 'true')? 'checked' : ''?>>
            &nbsp;<?php echo L_G_SHOWCUSTOMDESCRIPTION?><?php showQuickHelp(L_G_HLPDISPLAY_CUSTOMDESC); ?>
            <br><br>
            <b><?php echo L_G_CUSTOMDESCRIPTION?><b><br><br>
            <textarea id="editor1" name="customdescription"><?php echo $settings['Aff_settings_'.$this->a_panel_type.'_customdescription']; ?></textarea>
            <br>
        </td>
    </tr>
    <tr>
        <td align="center">
            <br>
            <input type="hidden" name="savesettings" value="true">
            <input type="hidden" name="paneltype" value="<?php echo $this->a_panel_type?>">
            <input type="hidden" name="md" value="Affiliate_Merchants_Views_AffPanelSettings">
            <input type="hidden" name="showpanel" value="<?php echo $this->a_panel_type?>">
            <?php if ($this->a_this->checkPermissions('edit')) { ?>
                <input type="submit" class="formbutton" value="<?php echo L_G_SAVECHANGES?>">
             <?php } else { ?>
                <input class=formbutton type=button value="<?php echo L_G_YOU_DONT_HAVE_RIGHTS_TO_EDIT?>">
             <?php } ?>
            <br><br>
        </td>
    </tr>
    </table>
</form>

<script type="text/javascript" src="../scripts/jquery.js"></script>
<script type="text/javascript" src="../include/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="../include/ckfinder/ckfinder.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	var config = {
		toolbar:
		[
			['Source','-','Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink'],
			['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],
            ['Font','FontSize'],
            ['TextColor','BGColor']
		],
        height: '175px'
	};


    if(typeof CKEDITOR == 'undefined') {
        $('#editor1').value('加载CKEditor失败，请如果您不是开发人员，请联系系统管理员，谢谢！');
    } else {
        var __editor1 = CKEDITOR.replace('editor1',config);
        CKFinder.setupCKEditor(__editor1, '../include/ckfinder/');
    }
});
</script>
