Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify g class #100

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions components/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,16 @@
</nav>
</div>
<p id="footer-meta" class="clear">
<span class="left"><a class="icp" href="<?php $this->options->icpUrl(); ?>" rel="noopener noreferrer"><?php echo G::getICP(); ?></a></span>
<span class="right"><?php echo $this->options->buildYear . " - " . date("Y"); ?> &copy <?php $this->options->title(); ?></span>

<span class="left">
<a class="icp" href="<?php $this->options->icpUrl(); ?>" rel="noopener noreferrer"><?php echo G::getICP(); ?></a>
<br>
<p class="recordcode">
<a class="icon-police"><img src="/usr/themes/G-master/static/img/jinghui.png" /></a>
<a class="beian" href="<?php $this->options->beianUrl(); ?>" rel="noopener noreferrer"><?php echo G::getBeiAn(); ?></a>
<span class="right"><?php echo $this->options->buildYear . " - " . date("Y"); ?> &copy <?php $this->options->title(); ?></span>
</p>
</span>
</p>
</footer>
</div>
Expand Down
17 changes: 17 additions & 0 deletions libs/G.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class G
'defaultBanner' => '',
'buildYear' => '',
'icp' => '',
'beian' => '',
'defaultArticlePath' => '',
'enableIndexPage' => '',
'advanceSetting' => '',
Expand Down Expand Up @@ -186,6 +187,22 @@ public static function getICP()
return '还没有备案噢';
}

/**
* 获取公安备案号
*
* @return String
*/
public static function getBeiAn()
{
if (Helper::options()->beian != '')
return Helper::options()->beian;
if (isset(self::$advanceConfig["customBeiAn"]))
return self::$advanceConfig["customBeiAn"];
return '还没有备案噢';
}



/**
* 获取赞助按钮文字
*
Expand Down