<?php

if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}

class plugin_jsjpay {
        function global_cpnav_extra2() {
	global $_G;
	$config = $_G['cache']['plugin']['jsjpay'];
	$open = unserialize($config['open']);
		if (in_array(1,$open)){
                       return "<a href='javascript:;' onclick=\"showWindow('pay', 'plugin.php?id=jsjpay','get',0);\"><font color='#ff1200'>".$config['pname']."</font></a>";
                } else {
                        return array();
	        }
	}

        function global_footerlink() {
	global $_G;
	$config = $_G['cache']['plugin']['jsjpay'];
	$open = unserialize($config['open']);
		if (in_array(2,$open)){
                       return "<a href='javascript:;' onclick=\"showWindow('pay', 'plugin.php?id=jsjpay','get',0);\"><font color='#ff1200'>".$config['pname']."</font></a>";
                } else {
                        return array();
	        }
	}

        function global_usernav_extra3() {
	global $_G;
	$config = $_G['cache']['plugin']['jsjpay'];
	$open = unserialize($config['open']);
		if (in_array(3,$open)){
                       return "<a href='javascript:;' onclick=\"showWindow('pay', 'plugin.php?id=jsjpay','get',0);\"><font color='#ff1200'>".$config['pname']."</font></a>";
                } else {
                        return array();
	        }
	}
}

class plugin_jsjpay_home extends plugin_jsjpay {
	function spacecp_credit_extra() {
	global $_G;
	$config = $_G['cache']['plugin']['jsjpay'];
		return "<li><a href='javascript:;' onclick=\"showWindow('pay', 'plugin.php?id=jsjpay','get',0);\"><font color='#ff1200'>".$config['pname']."</font></a></li>";
	}
}

?>