国内外中英文版一元购网站开发案例源码

这是一款非常不错的国内外中英文版一元购网站开发案例源码,也是目前很多项目都引用这种运营模式来衍生出不一样的网站产品,现在先直接上几种图片出来先。

这个是下面简单的代码介绍:

后台设置

<?php 

defined('G_IN_SYSTEM')or exit('no');

System::load_app_class('admin',G_ADMIN_DIR,'no');

System::load_app_fun('global',G_ADMIN_DIR);





class setting extends admin {	

	public function __construct(){

		parent::__construct();

		$this->db=System::load_sys_class("model");

		$this->ment=array(

						array("webcfg","SEO设置",ROUTE_M.'/'.ROUTE_C."/webcfg"),

						array("config","基本配置",ROUTE_M.'/'.ROUTE_C."/config"),

						array("upload","上传配置",ROUTE_M.'/'.ROUTE_C."/upload"),

						array("watermark","水印配置",ROUTE_M.'/'.ROUTE_C."/watermark"),

						array("email","邮箱配置",ROUTE_M.'/'.ROUTE_C."/email"),

						array("mobile","短信配置",ROUTE_M.'/'.ROUTE_C."/mobile"),

						array("payset","支付方式","pay/pay/pay_list"),						

						array("domain","模块域名绑定",ROUTE_M.'/'.ROUTE_C."/domain"),

						array("send","中奖通知设置",ROUTE_M.'/'.ROUTE_C."/sendconfig")

		);

	

	}

通知设置

public function sendconfig(){

	

	  $type = System::load_sys_config("send","type");

	  if(isset($_POST['s_type'])){	  

		$s_type = abs($_POST['s_type']);

		if(($s_type == $type) || $s_type > 7){

			_message("更新完成!");

		}

		$html = "<?php return array('type'=>'$s_type'); ?>";

		if(!is_writable(G_CONFIG.'send.inc.php')) exit('send.inc.php 没有写入权限!');

			file_put_contents(G_CONFIG.'send.inc.php',$html);

			_message("更新完成!");

		}

	  include $this->tpl(ROUTE_M,'config.send');

	}

域名绑定

public function domain(){	

		$domain_cfg = System::load_sys_config("domain");

		if(empty($domain_cfg))$domain_cfg = array();

		if(isset($_POST['dosubmit']) && $_POST['dosubmit'] != 'del'){

			//插入或者修改

			$domain  = isset($_POST['domain']) ? trim(htmlspecialchars($_POST['domain'])) : null;

			$module  = isset($_POST['module']) ? trim(htmlspecialchars($_POST['module'])) : null;

			$action  = isset($_POST['action']) ? trim(htmlspecialchars($_POST['action'])) : null;

			$func    = isset($_POST['func']) ? trim(htmlspecialchars($_POST['func'])) : null;

			

			if(!$domain || !$module){

				exit("请正确填写绑定参数!");				

			}

			if($_POST['dosubmit'] == 'install'){

				if(array_key_exists($domain,$domain_cfg)){

					exit("绑定的域名已经被使用!");//array_keys

				}			

			}





猜你喜欢

转载自blog.csdn.net/weixin_43144260/article/details/112647918