admin/model/extension/module/d_blog_module.php
(开头部分) 38KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/*
* location: admin/model
*/
class ModelExtensionModuleDBlogModule extends Model
{
private $id = 'd_blog_module';
private $error = array();
private $setting = '';
private $sub_versions = array('lite', 'light', 'free');
private $config_file = '';
public function __construct($registry)
{
parent::__construct($registry);
$this->config_file = $this->getConfigFile($this->id, $this->sub_versions);
$this->setting = $this->getConfigData($this->id, $this->id . '_setting', $this->config->get('config_store_id'), $this->config_file);
}
public function getConfigFile($id, $sub_versions)
{
if (isset($this->request->post['config'])) {
return $this->request->post['config'];
}
$setting = $this->config->get($id . '_setting');
if (isset($setting['config'])) {
return $setting['config'];
}
$full = DIR_SYSTEM . 'config/' . $id . '.php';
if (file_exists($full)) {
return $id;
}
foreach ($sub_versions as $lite) {
if (file_exists(DIR_SYSTEM . 'config/' . $id . '_' . $lite . '.php')) {
return $id . '_' . $lite;
}
}
return false;
}
public function getConfigData($id, $config_key, $store_id, $config_file = false)
{
if (!$config_file) {
$config_file = $this->config_file;
}
if ($config_file) {
$this->config->load($config_file);
}
$result = ($this->config->get($config_key)) ? $this->config->get($config_key) : array();
后面还有 730 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
