src/AppBundle/Controller/Admin/CoinController.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace AppBundle\Controller\Admin;
use AppBundle\Common\Exception\FileToolkitException;
use AppBundle\Common\MathToolkit;
use Biz\Account\Service\AccountProxyService;
use Biz\System\SettingException;
use Imagine\Image\Box;
use Imagine\Gd\Imagine;
use AppBundle\Common\Paginator;
use AppBundle\Common\FileToolkit;
use AppBundle\Common\ArrayToolkit;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class CoinController extends BaseController
{
public function settingsAction(Request $request)
{
$postedParams = $request->request->all();
$coinSettingsSaved = $this->getSettingService()->get('coin', array());
$default = array(
'coin_enabled' => 0,
'cash_model' => 'none',
'cash_rate' => 1,
'coin_name' => '虚拟币',
'coin_content' => '',
'coin_picture' => '',
'coin_picture_50_50' => '',
'coin_picture_30_30' => '',
'coin_picture_20_20' => '',
'coin_picture_10_10' => '',
'charge_coin_enabled' => '',
);
$coinSettingsSaved = array_merge($default, $coinSettingsSaved);
if ('POST' == $request->getMethod()) {
$fields = $request->request->all();
$coinSettingsPosted = ArrayToolkit::parts($fields, array(
'coin_enabled',
'cash_model',
'cash_rate',
'coin_name',
'coin_content',
'coin_picture',
'coin_picture_50_50',
'coin_picture_30_30',
'coin_picture_20_20',
'coin_picture_10_10',
'charge_coin_enabled',
));
$coinSettings = array_merge($coinSettingsSaved, $coinSettingsPosted);
$coinSettings['coin_content'] = $this->purifyHtml($coinSettings['coin_content'], true);
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。