<?php /* EL PSY CONGROO */     	   		 
require '../../../zb_system/function/c_system_base.php';       	  	 
require '../../../zb_system/function/c_system_admin.php';     	   		 
$zbp->Load();     			 			
$action='root';     	 	  		
if (!$zbp->CheckRights($action)) {$zbp->ShowError(6);die();}     	 	    
if (!$zbp->CheckPlugin('FY_Shang')) {$zbp->ShowError(48);die();}        	 	 
$blogtitle='插件配置';    		  		 	
require $blogpath . 'zb_system/admin/admin_header.php';    	 	 		  
require $blogpath . 'zb_system/admin/admin_top.php';        		 	
require $blogpath . 'zb_users/plugin/FY_Shang/admin-header.php';    	  		 	 
if(count($_POST)>0){       		   
	$zbp->Config('FY_Shang')->shang_title = $_POST['shang_title'];      		 	  
	$zbp->Config('FY_Shang')->shang_deve = $_POST['shang_deve'];    	   	   
	$zbp->Config('FY_Shang')->shang_text = $_POST['shang_text'];     		  	  
	$zbp->Config('FY_Shang')->footer_css = $_POST['footer_css'];     			  	 
	if(GetVars('dz_kg')){      	  			
		$zbp->Config('FY_Shang')->dz_kg = $_POST['dz_kg'];     							
	}else{    			 		 	
		$zbp->Config('FY_Shang')->dz_kg = '';          	 
	}    		      
	if(GetVars('ds_kg')){     	  	 	 
		$zbp->Config('FY_Shang')->ds_kg = $_POST['ds_kg'];     			 			
	}else{     	     	
		$zbp->Config('FY_Shang')->ds_kg = '';    	       
	}    		   	  
	if(GetVars('fx_kg')){    	 			 		
		$zbp->Config('FY_Shang')->fx_kg = $_POST['fx_kg'];    		   		 
	}else{     		  	 	
		$zbp->Config('FY_Shang')->fx_kg = '';      		  		
	}    	 	 			 
	$zbp->ShowHint('good');    			 		  
	$zbp->SaveConfig('FY_Shang');    		    	 
}     		  	 	
     	  		  
?>

<div class="fy-nav">
    <?php FY_Shang_SubMenu(0);?>
</div>
</div>
<form enctype="multipart/form-data" method="post" action="save.php?type=alipayimg">  
	<div class="fy-main" style="min-height: 100px;margin-bottom: 0px;border-bottom: none;">
				<h3>支付宝二维码</h3>
			<div class="fy-border">    
				<span class="label">支付宝二维码</span>
				<input name="alipayimg.jpg" type="file"/>
				<input name="" type="Submit" class="upload_button" value="保存"/>
			</div>
			
		</div>
    </form>	
	<form enctype="multipart/form-data" method="post" action="save.php?type=weipayimg">  
	<div class="fy-main" style="min-height: 100px;margin-bottom: 0px;border-bottom: none;">
		
			<h3>微信二维码</h3>
			<div class="fy-border">    
				<span class="label">支付宝二维码</span>
				<input name="weipayimg.jpg" type="file"/>
				<input name="" type="Submit" class="upload_button" value="保存"/>
			</div>
		</div>
    </form>	
	
    <form id="form1" name="form1" method="post">
       
        <div class="fy-main">
            
            <h3>标题设置</h3>
	        <div class="fy-border">
	            <span class="label">打赏标题</span>
                <input id="shang_title" name="shang_title" type="text" value="<?php echo $zbp->Config('FY_Shang')->shang_title;?>" />
			</div>
			
			
            <h3>开发模式</h3>
	        <div class="fy-border">
	            <span class="label">调用方式</span>
				<div style="float:left; width: 295px;">
					<label style="display:block; margin-bottom:8px;">
						<input type="radio" id="shang_deve" name="shang_deve" value="aliplay" <?php if($zbp->Config('FY_Shang')->shang_deve == 'aliplay') echo 'checked'?> />默认插入
					</label>
					<label style="display:block; margin-bottom:8px;">
						<input type="radio" id="shang_deve" name="shang_deve" value="wxplay" <?php if($zbp->Config('FY_Shang')->shang_deve == 'wxplay') echo 'checked'?> />自定义调用
					</label>
				</div>
				<div class="help-tip">
		            <p>启用自定义调用的话，请在模版相关的位置上添加：{$FY_Shang_deve} </p>
	            </div>
            </div>
			<h3>标题设置</h3>
	        <div class="fy-border">
	            <span class="label">打赏说明</span>
                <input id="shang_text" name="shang_text" type="text" value="<?php echo $zbp->Config('FY_Shang')->shang_text;?>" />
			</div>
            <h3>功能开关</h3>
			<div class="fy-border">
			    <span class="label">开启点赞功能</span>
                <input type="checkbox" name="dz_kg" id="dz_kg" value="true" <?php if($zbp->Config('FY_Shang')->dz_kg) echo 'checked="checked"'?> />
			</div>
			<div class="fy-border">
			    <span class="label">开启打赏功能</span>
                <input type="checkbox" name="ds_kg" id="ds_kg" value="true" <?php if($zbp->Config('FY_Shang')->ds_kg) echo 'checked="checked"'?> />
			</div>
			<div class="fy-border">
			    <span class="label">开启分享功能</span>
                <input type="checkbox" name="fx_kg" id="fx_kg" value="true" <?php if($zbp->Config('FY_Shang')->fx_kg) echo 'checked="checked"'?> />
			</div>
			<h3>CSS代码</h3>
			<div class="fy-border">
			    <p>你可以添加一些额外的 CSS代码。</p>
               <textarea name="footer_css" type="text" id="footer_css" style="width:100%" rows="7"><?php echo $zbp->Config('FY_Shang')->footer_css;?></textarea>
            </div>

			<div class="mo-footer">
				<div class="mpanel-submit">
					<input name="" type="Submit" class="mpanel-save" value="保存设置"/>
				</div>          
			</div>		
        </div> 
    </form>		
</div>	
<?php
require $blogpath . 'zb_system/admin/admin_footer.php';    	 					 
RunTime();    		  	  	
?>