<?php

/*
  PHP version 5
  Copyright (c) 2002-2019ECISP.CN、EarcLink.COM
  警告：这不是一个免费的软件，请在许可范围内使用，请尊重知识产权，侵权必究，举报有奖
  作者：黄祥云 E-mail:6326420@qq.com  QQ:6326420 TEL:18665655030 / 13797552220
*/


namespace admin_application\link;

class AdvertisementLink {

    public static function Advertisement_link_array($linkcode = false, $array = array()) {
        $link_array = array();
        $action_key['act'] = 'Advertisement/listAdvertisement';
        $action_key['atid'] = $array['atid'];
        $link_array['index'] = linkOut($action_key);

        $action_key_list['act'] = 'Advertisement/listAdvertisement';
        $action_key_list['atid'] = $array['atid'];
        $action_key_list['out_type'] = 'list';
        $link_array['list'] = linkOut($action_key_list);

        $action_key['act'] = 'Advertisement/addAdvertisement';
        $link_array['add'] = linkOut($action_key);

        $action_key_edit['act'] = 'Advertisement/editAdvertisement';
        $action_key_edit['adid'] = $array['adid'];
        $link_array['edit'] = linkOut($action_key_edit);

        $action_key_edit['act'] = 'Advertisement/editAdvertisement';
        $action_key_edit['type'] = 'copy';
        $link_array['copy'] = linkOut($action_key_edit);

        $action_key['act'] = 'Advertisement/saveAdvertisement';
        $link_array['save'] = linkOut($action_key);

        $action_key['act'] = 'Advertisement/delAdvertisement';
        $link_array['del'] = linkOut($action_key);

        $action_key['act'] = 'Advertisement/celeritySaveAdvertisement';
        $link_array['celeritysave'] = linkOut($action_key);

        $action_key['act'] = 'Advertisement/setAdvertisement';
        $link_array['set'] = linkOut($action_key);
        return $linkcode ? $link_array[$linkcode] : $link_array;
    }

    public static function AdvertisementType_link_array($linkcode = false, $array = array()) {
        $link_array = array();
        $action_key['act'] = 'AdvertisementType/listAdvertisementType';
        $link_array['index'] = linkOut($action_key);

        $action_key_list['act'] = 'AdvertisementType/listAdvertisementType';
        $action_key_list['out_type'] = 'list';
        $link_array['list'] = linkOut($action_key_list);

        $action_key['act'] = 'AdvertisementType/addAdvertisementType';
        $link_array['add'] = linkOut($action_key);

        $action_key_edit['act'] = 'AdvertisementType/editAdvertisementType';
        $action_key_edit['atid'] = $array['atid'];
        $link_array['edit'] = linkOut($action_key_edit);

        $action_key_edit['act'] = 'AdvertisementType/editAdvertisementType';
        $action_key_edit['type'] = 'copy';
        $action_key_edit['atid'] = $array['atid'];
        $link_array['copy'] = linkOut($action_key_edit);

        $action_key['act'] = 'AdvertisementType/saveAdvertisementType';
        $link_array['save'] = linkOut($action_key);

        $action_key['act'] = 'AdvertisementType/delAdvertisementType';
        $link_array['del'] = linkOut($action_key);

        $action_key['act'] = 'AdvertisementType/setAdvertisementType';
        $link_array['set'] = linkOut($action_key);
        return $linkcode ? $link_array[$linkcode] : $link_array;
    }

}
