<?php namespace Place\Api;
use Dever;
use Place;
use Dever\Helper\Secure;
class Url
{
    public function place()
    {
        $id = Dever::input('id');
        $info = Dever::db('info', 'place')->find($id);
        if ($info) {
            $extend = Dever::load('common', 'manage')->extend();
            $param['p'] = Place::entry($extend['info_id'], $extend['module_id'], $extend['data_id'], $id);
            $link = str_replace('https://center.yuandaibao.com/src/place/set/', 'https://place.work.yuandaibao.com/', Dever::url('place_interface/main.home', $param));
            header('HTTP/1.1 301 Moved Permanently');
            header('Location: ' . $link);
        }
    }
}