예제 #1
0
 public function index($fid = 'id', $id = 0, $page = 0)
 {
     $id = intval($id);
     //ID
     $page = intval($page);
     //页数
     if ($page == 0) {
         $page = 1;
     }
     //判断ID
     if ($id == 0) {
         msg_url(L('dance_09'), Web_Path);
     }
     //获取数据
     $row = $this->CsdjDB->get_row_arr('dance_list', '*', $id);
     if (!$row || $row['yid'] > 0) {
         msg_url(L('dance_18'), Web_Path);
     }
     //判断运行模式,生成则跳转至静态页面
     $html = config('Html_Uri');
     if (config('Web_Mode') == 3 && $html['lists']['check'] == 1) {
         //获取静态路径
         $Htmllink = LinkUrl('lists', $fid, $id, $page, 'dance');
         header("Location: " . $Htmllink);
         exit;
     }
     //获取当前分类下二级分类ID
     $ids = getChild($id);
     //装载模板并输出
     $skins = empty($row['skins']) ? 'list.html' : $row['skins'];
     $this->CsdjTpl->plub_list($row, $id, $fid, $page, $ids, false, $skins, 'lists', 'dance', $row['name'], $row['name']);
 }
예제 #2
0
 public function verify()
 {
     $cid = intval($this->uri->segment(4));
     //分类ID
     $page = intval($this->uri->segment(5));
     //分页
     //模板
     $tpl = 'verify.html';
     //URL地址
     $url = 'vod/verify/' . $cid;
     $sqlstr = "select {field} from " . CS_SqlPrefix . "vod where yid=1 and uid=" . $_SESSION['cscms__id'];
     if ($cid > 0) {
         $cids = getChild($cid);
         $sqlstr .= " and cid in(" . $cids . ")";
     }
     //当前会员
     $row = $this->CsdjDB->get_row_arr('user', '*', $_SESSION['cscms__id']);
     if (empty($row['nichen'])) {
         $row['nichen'] = $row['name'];
     }
     //装载模板
     $title = '待审视频 - 会员中心';
     $ids['uid'] = $_SESSION['cscms__id'];
     $ids['uida'] = $_SESSION['cscms__id'];
     $Mark_Text = $this->CsdjTpl->user_list($row, $url, $page, $tpl, $title, $cid, $sqlstr, $ids, true, false);
     $Mark_Text = str_replace("[vod:cid]", $cid, $Mark_Text);
     //会员版块导航
     $Mark_Text = $this->skins->cscmsumenu($Mark_Text, $_SESSION['cscms__id']);
     $Mark_Text = $this->skins->labelif($Mark_Text);
     echo $Mark_Text;
 }
예제 #3
0
 public function index($fid = 'id', $id = 0, $page = 0)
 {
     $id = intval($id);
     //ID
     $page = intval($page);
     //页数
     if ($page == 0) {
         $page = 1;
     }
     //判断ID
     if ($id == 0) {
         msg_url('出错了,ID不能为空!', Web_Path);
     }
     //获取数据
     $row = $this->CsdjDB->get_row_arr('vod_list', '*', $id);
     if (!$row || $row['yid'] > 0) {
         msg_url('出错了,该分类不存在!', Web_Path);
     }
     //判断运行模式,生成则跳转至静态页面
     $html = config('Html_Uri');
     if (config('Web_Mode') == 3 && $html['lists']['check'] == 1 && !defined('MOBILE')) {
         //获取静态路径
         $Htmllink = LinkUrl('lists', $fid, $id, $page, 'vod');
         header("Location: " . $Htmllink);
         exit;
     }
     //获取当前分类下二级分类ID
     $arr['cid'] = getChild($id);
     $arr['fid'] = $row['fid'] == 0 ? $row['id'] : $row['fid'];
     $arr['sid'] = $arr['fid'];
     //装载模板并输出
     $skins = empty($row['skins']) ? 'list.html' : $row['skins'];
     $this->CsdjTpl->plub_list($row, $id, $fid, $page, $arr, false, $skins, 'lists', 'vod', $row['name'], $row['name']);
 }
예제 #4
0
파일: function.php 프로젝트: quguo/wxpt
function getColumn($data)
{
    $arr = array();
    foreach ($data as $key => $vo) {
        if ($vo['pid'] == 0) {
            $auth = 0;
            $vo['child'] = getChild($data, $vo['id']);
            foreach ($vo['child'] as $v) {
                $auth = $v['auth'] + $auth;
            }
            if ($auth > 0) {
                $vo['auth'] = 1;
            } else {
                $vo['auth'] = 0;
            }
            if (empty($vo['child'])) {
                $url = $vo['m'] . "/" . $vo['c'] . "/" . $vo['a'];
                $a = checkAuth($url);
                $vo['auth'] = $a;
            }
            $arr['column'][] = $vo;
        }
    }
    $arr['module'] = MODULE_NAME;
    return $arr;
}
예제 #5
0
 /**
  * edit data page
  * @param int id
  * @return view
  */
 public function edit($id)
 {
     $categoryData = Category::get();
     $ids = getChild($categoryData, $id);
     $ids[] = $id;
     $category = getTree($categoryData);
     $info = Category::findOrFail($id);
     return view('admin.category.edit', compact('ids', 'category', 'info'));
 }
예제 #6
0
 public function index($fid = 'id', $id = 0, $page = 1)
 {
     $id = intval($id);
     //ID
     $page = intval($page);
     //ID
     if (preg_match("/^\\d*\$/", $fid)) {
         $id = intval($fid);
         $page = intval($id);
         $fid = 'id';
     }
     $cid = intval($this->input->get_post('cid'));
     if ($page == 0) {
         $page = 1;
     }
     //判断ID
     if ($id == 0) {
         msg_url('出错了,ID不能为空!', Web_Path);
     }
     //获取数据
     $row = $this->CsdjDB->get_row_arr('singer', '*', $id);
     if (!$row || $row['yid'] > 0 || $row['hid'] > 0) {
         msg_url('出错了,该歌手不存在!', Web_Path);
     }
     //判断运行模式,生成则跳转至静态页面
     $html = config('Html_Uri');
     if (config('Web_Mode') == 3 && $html['show']['check'] == 1) {
         //获取静态路径
         $Htmllink = LinkUrl('pic', $cid, $id, 0, 'singer');
         header("Location: " . $Htmllink);
         exit;
     }
     if ($cid > 0) {
         $arr['cid'] = getChild($cid);
     }
     $arr['tags'] = $row['tags'];
     $arr['singerid'] = $id;
     //摧毁部分需要超级链接字段数组
     $rows = $row;
     //先保存数组保留下面使用
     unset($row['tags']);
     //装载模板并输出
     $Mark_Text = $this->CsdjTpl->plub_list($row, $id, $fid, $page, $arr, TRUE, 'pic.html', 'pic', 'singer', $row['name'], $row['name']);
     //评论
     $Mark_Text = str_replace("[singer:pl]", get_pl('singer', $id), $Mark_Text);
     //分类地址、名称
     $Mark_Text = str_replace("[singer:link]", LinkUrl('show', 'id', $row['id'], 1, 'singer'), $Mark_Text);
     $Mark_Text = str_replace("[singer:classlink]", LinkUrl('lists', 'id', $row['cid'], 1, 'singer'), $Mark_Text);
     $Mark_Text = str_replace("[singer:classname]", $this->CsdjDB->getzd('singer_list', 'name', $row['cid']), $Mark_Text);
     //标签加超级连接
     $Mark_Text = str_replace("[singer:tags]", SearchLink($rows['tags']), $Mark_Text);
     echo $Mark_Text;
     $this->cache->end();
     //由于前面不是直接输出,所以这里需要加入写缓存
 }
예제 #7
0
파일: helpers.php 프로젝트: Jokeramc/amc
function getChild($list, $id)
{
    static $ids = [];
    foreach ($list as $key => $value) {
        if ($value['parent_id'] == $id) {
            $ids[] = $value['id'];
            getChild($list, $value['id']);
        }
    }
    return $ids;
}
예제 #8
0
 public function index()
 {
     $cid = (int) $this->uri->segment(4);
     //CID
     $page = (int) $this->uri->segment(5);
     //页数
     //模板
     $tpl = 'dance.html';
     //当前会员
     $uid = get_home_uid();
     $row = $this->CsdjDB->get_row_arr('user', '*', $uid);
     if (empty($row['nichen'])) {
         $row['nichen'] = $row['name'];
     }
     //装载模板
     $title = $row['nichen'] . '的歌曲';
     $ids['uid'] = $row['id'];
     $ids['uida'] = $row['id'];
     $sql = $cid == 0 ? "" : "SELECT {field} FROM " . CS_SqlPrefix . "dance where cid in (" . getChild($cid) . ")";
     $this->CsdjTpl->home_list($row, 'dance', $page, $tpl, $title, $ids, $cid, $sql);
 }
예제 #9
0
$result = test_conf();
if ($result !== true) {
    echo "4###" . $result;
    exit;
}
$file_to_text = file_get_contents($path, false);
$_level_key_name = set_key_name($_level_key_name, $file_to_text);
$new_rule['rule'] = $child['tree'];
//Tree local_rules.xml
$xml_obj = new xml($_level_key_name);
$xml_obj->load_file($path);
$tree_lr = $xml_obj->xml2array();
foreach ($tree_lr as $k => $v) {
    if (isset($tree_lr[$k]['group'])) {
        $__level_key = $tree_lr[$k]['group']['@attributes']['__level_key'];
        $child = getChild($tree_lr, $__level_key);
        $keys = array_keys($child['tree']);
        if (is_numeric($keys[count($keys) - 1])) {
            $aux_key = $keys[count($keys) - 1] + 1;
            $new_key = !in_array($aux_key, $keys) ? $aux_key : uniqid(mt_rand("1", mt_getrandmax()));
        } else {
            $new_key = uniqid(mt_rand("1", mt_getrandmax()));
        }
        break;
    }
}
if (empty($new_key)) {
    echo "3###" . _("Failure: Format not allowed in file") . " " . $editable_files[0] . " (2)";
    $error = true;
} else {
    $branch = '[' . implode("][", $child['parents']) . '][\'' . $new_key . '\']';
예제 #10
0
 public function index($fid = 'id', $id = 0)
 {
     $id = intval($fid) > 0 ? intval($fid) : intval($id);
     //ID
     //判断ID
     if ($id == 0) {
         msg_url(L('dance_09'), Web_Path);
     }
     //获取数据
     $row = $this->CsdjDB->get_row_arr('dance', '*', $id);
     if (!$row || $row['yid'] > 0 || $row['hid'] > 0) {
         msg_url(L('dance_10'), Web_Path);
     }
     //判断运行模式,生成则跳转至静态页面
     $html = config('Html_Uri');
     if (config('Web_Mode') == 3 && $html['play']['check'] == 1) {
         //获取静态路径
         $Htmllink = LinkUrl('play', 'id', $id, 0, 'dance');
         header("Location: " . $Htmllink);
         exit;
     }
     //摧毁部分需要超级链接字段数组
     $rows = $row;
     //先保存数组保留下面使用
     unset($row['tags']);
     //获取当前分类下二级分类ID
     $arr['cid'] = getChild($row['cid']);
     $arr['uid'] = $row['uid'];
     $arr['did'] = $row['id'];
     $arr['singerid'] = $row['singerid'];
     $arr['tags'] = $rows['tags'];
     //装载模板并输出
     $skins = empty($row['skins']) ? 'play.html' : $row['skins'];
     $Mark_Text = $this->CsdjTpl->plub_show('dance', $row, $arr, TRUE, $skins, $row['name'], $row['name']);
     //评论
     $Mark_Text = str_replace("[dance:pl]", get_pl('dance', $id), $Mark_Text);
     //分类地址、名称
     $Mark_Text = str_replace("[dance:link]", LinkUrl('play', 'id', $row['id'], 1, 'news'), $Mark_Text);
     $Mark_Text = str_replace("[dance:classlink]", LinkUrl('lists', 'id', $row['cid'], 1, 'dance'), $Mark_Text);
     $Mark_Text = str_replace("[dance:classname]", $this->CsdjDB->getzd('dance_list', 'name', $row['cid']), $Mark_Text);
     //专辑
     if ($row['tid'] == 0) {
         $Mark_Text = str_replace("[dance:topiclink]", "###", $Mark_Text);
         $Mark_Text = str_replace("[dance:topicname]", L('dance_11'), $Mark_Text);
     } else {
         $Mark_Text = str_replace("[dance:topiclink]", LinkUrl('topic', 'show', $row['tid'], 1, 'dance'), $Mark_Text);
         $Mark_Text = str_replace("[dance:topicname]", $this->CsdjDB->getzd('dance_topic', 'name', $row['tid']), $Mark_Text);
     }
     //获取上下曲
     preg_match_all('/[dance:slink]/', $Mark_Text, $arr);
     if (!empty($arr[0]) && !empty($arr[0][0])) {
         $rowd = $this->db->query("Select id,cid,name from " . CS_SqlPrefix . "dance where yid=0 and hid=0 and id<" . $id . " order by id desc limit 1")->row();
         if ($rowd) {
             $Mark_Text = str_replace("[dance:slink]", LinkUrl('play', 'id', $rowd->id, 1, 'dance'), $Mark_Text);
             $Mark_Text = str_replace("[dance:sname]", $rowd->name, $Mark_Text);
             $Mark_Text = str_replace("[dance:sid]", $rowd->id, $Mark_Text);
         } else {
             $Mark_Text = str_replace("[dance:slink]", "#", $Mark_Text);
             $Mark_Text = str_replace("[dance:sname]", L('dance_20'), $Mark_Text);
             $Mark_Text = str_replace("[dance:sid]", 0, $Mark_Text);
         }
     }
     unset($arr);
     preg_match_all('/[dance:xlink]/', $Mark_Text, $arr);
     if (!empty($arr[0]) && !empty($arr[0][0])) {
         $rowd = $this->db->query("Select id,cid,name from " . CS_SqlPrefix . "dance where yid=0 and hid=0 and id>" . $id . " order by id asc limit 1")->row();
         if ($rowd) {
             $Mark_Text = str_replace("[dance:xlink]", LinkUrl('play', 'id', $rowd->id, 1, 'dance'), $Mark_Text);
             $Mark_Text = str_replace("[dance:xname]", $rowd->name, $Mark_Text);
             $Mark_Text = str_replace("[dance:xid]", $rowd->id, $Mark_Text);
         } else {
             $Mark_Text = str_replace("[dance:xlink]", "#", $Mark_Text);
             $Mark_Text = str_replace("[dance:xname]", L('dance_20'), $Mark_Text);
             $Mark_Text = str_replace("[dance:xid]", 0, $Mark_Text);
         }
     }
     unset($arr);
     //标签加超级连接
     $Mark_Text = str_replace("[dance:tags]", SearchLink($rows['tags']), $Mark_Text);
     //歌曲完整试听地址
     preg_match_all('/[dance:qurl]/', $Mark_Text, $arr);
     if (!empty($arr[0]) && !empty($arr[0][0])) {
         $purl = $row['purl'];
         if ($row['fid'] > 0) {
             $rowf = $this->db->query("Select purl from " . CS_SqlPrefix . "dance_server where id=" . $row['fid'] . "")->row_array();
             if ($rowf) {
                 $purl = $rowf['purl'] . $row['purl'];
             }
         }
         $purl = annexlink($purl);
         $Mark_Text = str_replace("[dance:qurl]", $purl, $Mark_Text);
     }
     unset($arr);
     //cmp音频播放器
     $player = "<script type='text/javascript'>\r\n\t\t\tvar mp3_w='" . CS_Play_w . "';\r\n\t\t\tvar mp3_h='" . CS_Play_h . "';\r\n\t\t\tvar mp3_i='" . $id . "';\r\n\t\t\tvar mp3_p='" . hitslink('play', 'dance') . "';\r\n\t\t\tvar mp3_t='" . Web_Path . "';\r\n\t\t\tmp3_play();\r\n\t\t\t</script>";
     $Mark_Text = str_replace("[dance:player]", $player, $Mark_Text);
     //jp音频播放器
     $jplayer = "<script type='text/javascript'>\r\n\t\t\tvar mp3_i='" . $id . "';\r\n\t\t\tvar mp3_p='" . hitslink('play', 'dance') . "';\r\n\t\t\tvar mp3_n='" . str_replace("'", "", $row['name']) . "';\r\n\t\t\tvar mp3_x='" . LinkUrl('down', 'id', $row['id'], 1, 'dance') . "';\r\n\t\t\tvar mp3_l='" . LinkUrl('down', 'lrc', $row['id'], 1, 'dance') . "';\r\n\t\t\tmp3_jplayer();\r\n\t\t\t</script>";
     $Mark_Text = str_replace("[dance:jplayer]", $jplayer, $Mark_Text);
     //增加人气
     $Mark_Text = hits_js($Mark_Text, hitslink('hits/ids/' . $id, 'dance'));
     echo $Mark_Text;
     $this->cache->end();
     //由于前面不是直接输出,所以这里需要加入写缓存
 }
예제 #11
0
 public function index($fid = 'id', $id = 0)
 {
     $id = intval($fid) > 0 ? intval($fid) : intval($id);
     //ID
     //判断ID
     if ($id == 0) {
         msg_url('出错了,ID不能为空!', Web_Path);
     }
     //获取数据
     $row = $this->CsdjDB->get_row_arr('news', '*', $id);
     if (!$row || $row['yid'] > 0 || $row['hid'] > 0) {
         msg_url('出错了,该数据不存在或者没有审核!', Web_Path);
     }
     //判断运行模式,生成则跳转至静态页面
     $html = config('Html_Uri');
     if (config('Web_Mode') == 3 && $html['show']['check'] == 1) {
         //获取静态路径
         $Htmllink = LinkUrl('show', $fid, $id, 0, 'news');
         header("Location: " . $Htmllink);
         exit;
     }
     //摧毁部分需要超级链接字段数组
     $rows = $row;
     //先保存数组保留下面使用
     unset($row['tags']);
     unset($row['content']);
     //获取当前分类下二级分类ID
     $arr['cid'] = getChild($row['cid']);
     $arr['uid'] = $row['uid'];
     $arr['tags'] = $rows['tags'];
     //默认模板
     $skins = empty($row['skins']) ? 'show.html' : $row['skins'];
     //装载模板并输出
     $Mark_Text = $this->CsdjTpl->plub_show('news', $row, $arr, TRUE, $skins, $row['name'], $row['name']);
     //评论
     $Mark_Text = str_replace("[news:pl]", get_pl('news', $id), $Mark_Text);
     //分类地址、名称
     $Mark_Text = str_replace("[news:link]", LinkUrl('show', 'id', $row['id'], 1, 'news'), $Mark_Text);
     $Mark_Text = str_replace("[news:classlink]", LinkUrl('lists', 'id', $row['cid'], 1, 'news'), $Mark_Text);
     $Mark_Text = str_replace("[news:classname]", $this->CsdjDB->getzd('news_list', 'name', $row['cid']), $Mark_Text);
     //获取上下篇
     preg_match_all('/[news:slink]/', $Mark_Text, $arr);
     if (!empty($arr[0]) && !empty($arr[0][0])) {
         $rowd = $this->db->query("Select id,cid,name from " . CS_SqlPrefix . "news where yid=0 and hid=0 and id<" . $id . " order by id desc limit 1")->row();
         if ($rowd) {
             $Mark_Text = str_replace("[news:slink]", LinkUrl('show', 'id', $rowd->id, 1, 'news'), $Mark_Text);
             $Mark_Text = str_replace("[news:sname]", $rowd->name, $Mark_Text);
             $Mark_Text = str_replace("[news:sid]", $rowd->id, $Mark_Text);
         } else {
             $Mark_Text = str_replace("[news:slink]", "#", $Mark_Text);
             $Mark_Text = str_replace("[news:sname]", "没有了", $Mark_Text);
             $Mark_Text = str_replace("[news:sid]", 0, $Mark_Text);
         }
     }
     unset($arr);
     preg_match_all('/[news:xlink]/', $Mark_Text, $arr);
     if (!empty($arr[0]) && !empty($arr[0][0])) {
         $rowd = $this->db->query("Select id,cid,name from " . CS_SqlPrefix . "news where yid=0 and hid=0 and id>" . $id . " order by id asc limit 1")->row();
         if ($rowd) {
             $Mark_Text = str_replace("[news:xlink]", LinkUrl('show', 'id', $rowd->id, 1, 'news'), $Mark_Text);
             $Mark_Text = str_replace("[news:xname]", $rowd->name, $Mark_Text);
             $Mark_Text = str_replace("[news:xid]", $rowd->id, $Mark_Text);
         } else {
             $Mark_Text = str_replace("[news:xlink]", "#", $Mark_Text);
             $Mark_Text = str_replace("[news:xname]", "没有了", $Mark_Text);
             $Mark_Text = str_replace("[news:xid]", 0, $Mark_Text);
         }
     }
     unset($arr);
     //标签加超级连接
     $Mark_Text = str_replace("[news:tags]", SearchLink($rows['tags']), $Mark_Text);
     //文章内容,判断是否是收费文章
     if ($row['vip'] > 0 || $row['level'] > 0 || $row['cion'] > 0) {
         $content = "<div id='cscms_content'></div>";
         if (config('Ym_Mode', 'news') == 1) {
             $content .= "<script type='text/javascript' src='http://" . config('Ym_Url', 'news') . Web_Path . "index.php/show/pay/" . $id . "'></script>";
         } else {
             $content .= "<script type='text/javascript' src='http://" . Web_Url . Web_Path . "index.php/news/show/pay/" . $id . "'></script>";
         }
     } else {
         $content = $rows['content'];
     }
     $Mark_Text = str_replace("[news:content]", $content, $Mark_Text);
     //增加人气
     $Mark_Text = hits_js($Mark_Text, hitslink('hits/ids/' . $id, 'news'));
     echo $Mark_Text;
     $this->cache->end();
     //由于前面不是直接输出,所以这里需要加入写缓存
 }
예제 #12
0
 public function index($a1, $a2 = 0, $a3 = 0, $a4 = 0)
 {
     if (intval($a1) > 0) {
         $id = intval($a1);
         //ID
         $zu = intval($a2);
         //组
         $ji = intval($a3);
         //集数
     } else {
         $id = intval($a2);
         //ID
         $zu = intval($a3);
         //组
         $ji = intval($a4);
         //集数
     }
     $login = '******';
     //判断ID
     if ($id == 0) {
         msg_url('出错了,ID不能为空!', Web_Path);
     }
     //获取数据
     $row = $this->CsdjDB->get_row_arr('vod', '*', $id);
     if (!$row || $row['yid'] > 0 || $row['hid'] > 0) {
         msg_url('出错了,该数据不存在或者没有审核!', Web_Path);
     }
     if (empty($row['durl'])) {
         msg_url('该视频下载地址不正确!', Web_Path);
     }
     //判断收费
     if ($row['vip'] > 0 || $row['level'] > 0 || $row['cion'] > 0 || User_YkDown == 0) {
         $this->CsdjUser->User_Login();
         $rowu = $this->CsdjDB->get_row_arr('user', 'vip,level,cion', $_SESSION['cscms__id']);
     }
     //判断会员组下载权限
     if ($row['vip'] > 0 && $row['uid'] != $_SESSION['cscms__id']) {
         if ($row['vip'] > $rowu['vip']) {
             msg_url('抱歉,您所在的会员组不能下载该视频,请先升级!', 'javascript:window.close();');
         }
     }
     //判断会员等级下载权限
     if ($row['level'] > 0 && $row['uid'] != $_SESSION['cscms__id']) {
         if ($row['level'] > $rowu['level']) {
             msg_url('抱歉,您等级不够,不能下载该视频!', 'javascript:window.close();');
         }
     }
     //判断金币下载
     $down = 0;
     if ($row['dcion'] > 0 && $row['uid'] != $_SESSION['cscms__id']) {
         //判断是否下载过
         $did = $id . '-' . $zu . '-' . $ji;
         $rowd = $this->db->query("SELECT id,addtime FROM " . CS_SqlPrefix . "vod_look where did='" . $did . "' and uid='" . $_SESSION['cscms__id'] . "' and sid=1")->row_array();
         if ($rowd) {
             $down = 1;
             //数据已经存在
             $downtime = User_Downtime * 3600 + $rowd['addtime'];
             if ($downtime > time()) {
                 $down = 2;
                 //在多少时间内不重复扣币
             }
         }
         //判断会员组下载权限
         $rowz = $this->db->query("SELECT id,did FROM " . CS_SqlPrefix . "userzu where id='" . $rowu['vip'] . "'")->row_array();
         if ($rowz && $rowz['did'] == 1) {
             //有免费下载权限
             $down = 2;
             //该会员下载不收费
         }
         if ($down < 2) {
             //判断扣币
             if ($row['dcion'] > $rowu['cion']) {
                 msg_url('这部视频下载每集需要' . $row['cion'] . '个金币,您的当前金币不够,请先充值!', 'javascript:window.close();');
             } else {
                 //扣币
                 $edit['cion'] = $rowu['cion'] - $row['dcion'];
                 $this->CsdjDB->get_update('user', $_SESSION['cscms__id'], $edit);
                 //写入消费记录
                 $add2['title'] = '下载视频《' . $row['name'] . '》- 第' . ($ji + 1) . '集';
                 $add2['uid'] = $_SESSION['cscms__id'];
                 $add2['dir'] = 'vod';
                 $add2['nums'] = $row['cion'];
                 $add2['ip'] = getip();
                 $add2['addtime'] = time();
                 $this->CsdjDB->get_insert('spend', $add2);
                 //判断分成
                 if (User_DownFun == 1 && $row['uid'] > 0) {
                     //分成比例
                     $bi = User_Downcion < 10 ? '0.0' . User_Downcion : '0.' . User_Downcion;
                     $scion = intval($row['dcion'] * $bi);
                     if ($scion > 0) {
                         $this->db->query("update " . CS_SqlPrefix . "user set cion=cion+" . $scion . " where id=" . $row['uid'] . "");
                         //写入分成记录
                         $add3['title'] = '视频《' . $row['name'] . '》- 第' . ($ji + 1) . '集 - 下载分成';
                         $add3['uid'] = $row['uid'];
                         $add3['dir'] = 'vod';
                         $add3['nums'] = $scion;
                         $add3['ip'] = getip();
                         $add3['addtime'] = time();
                         $this->CsdjDB->get_insert('income', $add3);
                     }
                 }
             }
         }
         //增加下载记录
         if ($down == 0) {
             $add['name'] = $row['name'];
             $add['cid'] = $row['cid'];
             $add['sid'] = 1;
             $add['did'] = $did;
             $add['uid'] = $_SESSION['cscms__id'];
             $add['cion'] = $row['dcion'];
             $add['addtime'] = time();
             $this->CsdjDB->get_insert('vod_look', $add);
         }
     }
     //增加下载人气
     $this->db->query("update " . CS_SqlPrefix . "vod set xhits=xhits+1 where id=" . $row['id'] . "");
     //相关搜索数组
     $arr['cid'] = getChild($row['cid']);
     $arr['uid'] = $row['uid'];
     $arr['tags'] = $row['tags'];
     //装载模板并输出
     $Mark_Text = $this->CsdjTpl->plub_show('vod', $row, $arr, TRUE, 'down.html');
     //评论
     $dance_pl = "<div id='cscms_pl'><img src='" . Web_Path . "packs/images/load.gif'>&nbsp;&nbsp;加载评论内容,请稍等......</div>\r\n<script type='text/javascript'>var dir='vod';var did=" . $id . ";var cid=0;cscms_pl(1,0,0);</script>";
     $Mark_Text = str_replace("[vod:pl]", $dance_pl, $Mark_Text);
     //分类地址、名称
     $Mark_Text = str_replace("[vod:link]", LinkUrl('show', 'id', $row['id'], 1, 'vod'), $Mark_Text);
     $Mark_Text = str_replace("[vod:classlink]", LinkUrl('lists', 'id', $row['cid'], 1, 'vod'), $Mark_Text);
     $Mark_Text = str_replace("[vod:classname]", $this->CsdjDB->getzd('vod_list', 'name', $row['cid']), $Mark_Text);
     //输出下载地址
     $Data_Arr = explode("#cscms#", $row['durl']);
     if ($zu >= count($Data_Arr)) {
         $zu = 0;
     }
     $DataList_Arr = explode("\n", $Data_Arr[$zu]);
     $Dataurl_Arr = explode('$', $DataList_Arr[$ji]);
     $laiyuan = $Dataurl_Arr[2];
     //来源
     $url = $Dataurl_Arr[1];
     //地址
     $pname = $Dataurl_Arr[0];
     //当前集数
     $Mark_Text = str_replace("[down:url]", $url, $Mark_Text);
     //当前集下载地址
     $Mark_Text = str_replace("[down:laiy]", $laiyuan, $Mark_Text);
     //当前集来源
     $Mark_Text = str_replace("[down:ji]", $pname, $Mark_Text);
     //当前集数
     echo $Mark_Text;
 }
예제 #13
0
 public function index($fid = 'id', $id = 0)
 {
     $id = intval($fid) > 0 ? intval($fid) : intval($id);
     //ID
     //判断ID
     if ($id == 0) {
         msg_url('出错了,ID不能为空!', Web_Path);
     }
     //获取数据
     $row = $this->CsdjDB->get_row_arr('pic_type', '*', $id);
     if (!$row || $row['yid'] > 0 || $row['hid'] > 0) {
         msg_url('出错了,该数据不存在或者没有审核!', Web_Path);
     }
     //判断运行模式,生成则跳转至静态页面
     $html = config('Html_Uri');
     if (config('Web_Mode') == 3 && $html['show']['check'] == 1) {
         //获取静态路径
         $Htmllink = LinkUrl('show', $fid, $id, 0, 'pic');
         header("Location: " . $Htmllink);
         exit;
     }
     //摧毁部分需要超级链接字段数组
     $rows = $row;
     //先保存数组保留下面使用
     unset($row['tags']);
     //获取当前分类下二级分类ID
     $arr['cid'] = getChild($row['cid']);
     $arr['uid'] = $row['uid'];
     $arr['tags'] = $rows['tags'];
     $arr['sid'] = $row['id'];
     //默认模板
     $skins = empty($row['skins']) ? 'show.html' : $row['skins'];
     //装载模板并输出
     $Mark_Text = $this->CsdjTpl->plub_show('pic', $row, $arr, TRUE, $skins, $row['name'], $row['name']);
     //评论
     $Mark_Text = str_replace("[pic:pl]", get_pl('pic', $id), $Mark_Text);
     //分类地址、名称
     $Mark_Text = str_replace("[pic:link]", LinkUrl('show', 'id', $row['id'], 1, 'pic'), $Mark_Text);
     $Mark_Text = str_replace("[pic:classlink]", LinkUrl('lists', 'id', $row['cid'], 1, 'pic'), $Mark_Text);
     $Mark_Text = str_replace("[pic:classname]", $this->CsdjDB->getzd('pic_list', 'name', $row['cid']), $Mark_Text);
     //获取上下张
     preg_match_all('/[pic:slink]/', $Mark_Text, $arr);
     if (!empty($arr[0]) && !empty($arr[0][0])) {
         $rowd = $this->db->query("Select id,cid,pic,name from " . CS_SqlPrefix . "pic_type where yid=0 and hid=0 and id<" . $id . " order by id desc limit 1")->row();
         if ($rowd) {
             $Mark_Text = str_replace("[pic:slink]", LinkUrl('show', 'id', $rowd->id, 1, 'pic'), $Mark_Text);
             $Mark_Text = str_replace("[pic:sname]", $rowd->name, $Mark_Text);
             $Mark_Text = str_replace("[pic:sid]", $rowd->id, $Mark_Text);
             $Mark_Text = str_replace("[pic:spic]", piclink('pic', $rowd->pic), $Mark_Text);
         } else {
             $Mark_Text = str_replace("[pic:slink]", "#", $Mark_Text);
             $Mark_Text = str_replace("[pic:sname]", "没有了", $Mark_Text);
             $Mark_Text = str_replace("[pic:sid]", 0, $Mark_Text);
             $Mark_Text = str_replace("[pic:spic]", piclink('pic', ''), $Mark_Text);
         }
     }
     unset($arr);
     preg_match_all('/[pic:xlink]/', $Mark_Text, $arr);
     if (!empty($arr[0]) && !empty($arr[0][0])) {
         $rowd = $this->db->query("Select id,cid,pic,name from " . CS_SqlPrefix . "pic_type where yid=0 and hid=0 and id>" . $id . " order by id asc limit 1")->row();
         if ($rowd) {
             $Mark_Text = str_replace("[pic:xlink]", LinkUrl('show', 'id', $rowd->id, 1, 'pic'), $Mark_Text);
             $Mark_Text = str_replace("[pic:xname]", $rowd->name, $Mark_Text);
             $Mark_Text = str_replace("[pic:xid]", $rowd->id, $Mark_Text);
             $Mark_Text = str_replace("[pic:xpic]", piclink('pic', $rowd->pic), $Mark_Text);
         } else {
             $Mark_Text = str_replace("[pic:xlink]", "#", $Mark_Text);
             $Mark_Text = str_replace("[pic:xname]", "没有了", $Mark_Text);
             $Mark_Text = str_replace("[pic:xid]", 0, $Mark_Text);
             $Mark_Text = str_replace("[pic:xpic]", piclink('pic', ''), $Mark_Text);
         }
     }
     unset($arr);
     //标签加超级连接
     $Mark_Text = str_replace("[pic:tags]", SearchLink($rows['tags']), $Mark_Text);
     //获取当前相册总数
     $pcount = $this->db->query("Select id from " . CS_SqlPrefix . "pic where sid=" . $id . " and hid=0 and yid=0")->num_rows();
     $Mark_Text = str_replace("[pic:count]", $pcount, $Mark_Text);
     //第一张图片
     $rowp = $this->db->query("Select pic,content from " . CS_SqlPrefix . "pic where sid=" . $id . " and hid=0 and yid=0 order by id desc limit 1")->row();
     $pics = $rowp ? $rowp->pic : '';
     $content = $rowp ? $rowp->content : '';
     $Mark_Text = str_replace("[pic:url]", piclink('pic', $pics), $Mark_Text);
     $Mark_Text = str_replace("[pic:content]", $content, $Mark_Text);
     //增加人气
     $Mark_Text = hits_js($Mark_Text, hitslink('hits/ids/' . $id, 'pic'));
     echo $Mark_Text;
     $this->cache->end();
     //由于前面不是直接输出,所以这里需要加入写缓存
 }
예제 #14
0
 public function down_save()
 {
     if ($this->huri['down']['check'] == 0) {
         admin_msg(L('plub_47'), 'javascript:history.back();', 'no');
     }
     $day = intval($this->input->get_post('day', true));
     //最近几天
     $ids = $this->input->get_post('ids', true);
     //需要生成的数据ID
     $cid = $this->input->get_post('cid', true);
     //需要生成的分类ID
     $newid = intval($this->input->get_post('newid'));
     //最新个数
     $ksid = intval($this->input->get_post('ksid'));
     //开始ID
     $jsid = intval($this->input->get_post('jsid'));
     //结束ID
     $kstime = $this->input->get_post('kstime', true);
     //开始日期
     $jstime = $this->input->get_post('jstime', true);
     //结束日期
     $pagesize = intval($this->input->get('pagesize'));
     //每页多少条
     $pagejs = intval($this->input->get('pagejs'));
     //总页数
     $datacount = intval($this->input->get('datacount'));
     //数据总数
     $page = intval($this->input->get('page'));
     //当前页
     if ($page == 0) {
         $page = 1;
     }
     $str = '';
     //将数组转换成字符
     if (is_array($cid)) {
         $cid = implode(',', $cid);
     }
     if (is_array($ids)) {
         $ids = implode(',', $ids);
     }
     if ($day > 0) {
         $times = time() - 86400 * $day;
         $str .= ' and addtime>' . $times . '';
     }
     if (!empty($cid)) {
         $str .= ' and cid in (' . $cid . ')';
     }
     if (!empty($ids)) {
         $str .= ' and id in (' . $ids . ')';
     }
     if ($ksid > 0 && $jsid > 0) {
         $str .= ' and id>' . ($ksid - 1) . ' and id<' . ($jsid + 1) . '';
     }
     if (!empty($kstime) && !empty($jstime)) {
         $ktime = strtotime($kstime) - 86400;
         $jtime = strtotime($jstime) + 86400;
         $str .= ' and addtime>' . $ktime . ' and addtime<' . $jtime . '';
     }
     $limit = '';
     if ($newid > 0) {
         $limit = ' order by id desc limit ' . $newid;
     }
     if ($datacount == 0) {
         $sqlstr = "select id from " . CS_SqlPrefix . "dance where yid=0 and hid=0 " . $str . $limit;
         $datacount = $this->db->query($sqlstr)->num_rows();
         //总数量
         $pagejs = ceil($datacount / Html_PageNum);
     }
     if ($datacount == 0) {
         $pagejs = 1;
     }
     $pagesize = Html_PageNum;
     if ($datacount < $pagesize) {
         $pagesize = $datacount;
     }
     //全部生成完毕
     if ($page > $pagejs) {
         admin_msg(L('plub_48'), site_url('dance/admin/html/down'));
     }
     //公众URI
     $uri = '?day=' . $day . '&cid=' . $cid . '&ids=' . $ids . '&newid=' . $newid . '&ksid=' . $ksid . '&jsid=' . $jsid . '&kstime=' . $kstime . '&jstime=' . $jstime . '&pagesize=' . $pagesize . '&pagejs=' . $pagejs . '&datacount=' . $datacount;
     //重新定义模板路径
     $this->load->get_templates('dance', 2);
     echo '<LINK href="' . base_url() . 'packs/admin/css/style.css" type="text/css" rel="stylesheet"><br>';
     echo vsprintf(L('plub_49'), array($pagejs, $page));
     $sql_string = "select * from " . CS_SqlPrefix . "dance where yid=0 and hid=0 " . $str . " order by id desc";
     $sql_string .= ' limit ' . $pagesize * ($page - 1) . ',' . $pagesize;
     $query = $this->db->query($sql_string);
     //获取下载页是否需要生成
     $html = config('Html_Uri', 'dance');
     foreach ($query->result_array() as $row) {
         ob_end_flush();
         //关闭缓存
         $id = $row['id'];
         //获取静态路径
         $Htmllinks = LinkUrl('down', 'id', $row['id'], 0, 'dance', $row['name']);
         //转换成生成路径
         $Htmllink = adminhtml($Htmllinks, 'dance');
         //摧毁部分需要超级链接字段数组
         $rows = $row;
         //先保存数组保留下面使用
         unset($row['tags']);
         unset($row['hits']);
         unset($row['yhits']);
         unset($row['zhits']);
         unset($row['rhits']);
         unset($row['dhits']);
         unset($row['chits']);
         unset($row['shits']);
         unset($row['xhits']);
         //获取当前分类下二级分类ID
         $arr['cid'] = getChild($row['cid']);
         $arr['uid'] = $row['uid'];
         $arr['did'] = $row['id'];
         $arr['singerid'] = $row['singerid'];
         $arr['tags'] = $rows['tags'];
         //装载模板并输出
         $Mark_Text = $this->CsdjTpl->plub_show('dance', $row, $arr, TRUE, 'down.html', $row['name'], $row['name']);
         //评论
         $Mark_Text = str_replace("[dance:pl]", get_pl('dance', $id), $Mark_Text);
         //分类地址、名称
         $Mark_Text = str_replace("[dance:link]", LinkUrl('play', 'id', $row['id'], 1, 'dance'), $Mark_Text);
         $Mark_Text = str_replace("[dance:classlink]", LinkUrl('lists', 'id', $row['cid'], 1, 'dance'), $Mark_Text);
         $Mark_Text = str_replace("[dance:classname]", $this->CsdjDB->getzd('dance_list', 'name', $row['cid']), $Mark_Text);
         //专辑
         if ($row['tid'] == 0) {
             $Mark_Text = str_replace("[dance:topiclink]", "###", $Mark_Text);
             $Mark_Text = str_replace("[dance:topicname]", "未加入", $Mark_Text);
         } else {
             $Mark_Text = str_replace("[dance:topiclink]", LinkUrl('topic', 'show', $row['tid'], 1, 'dance'), $Mark_Text);
             $Mark_Text = str_replace("[dance:topicname]", $this->CsdjDB->getzd('dance_topic', 'name', $row['tid']), $Mark_Text);
         }
         //获取上下曲
         preg_match_all('/[dance:slink]/', $Mark_Text, $arr);
         if (!empty($arr[0]) && !empty($arr[0][0])) {
             $rowd = $this->db->query("Select id,cid,name from " . CS_SqlPrefix . "dance where yid=0 and hid=0 and id<" . $id . " order by id desc limit 1")->row();
             if ($rowd) {
                 $Mark_Text = str_replace("[dance:slink]", LinkUrl('play', 'id', $rowd->id, 1, 'dance'), $Mark_Text);
                 $Mark_Text = str_replace("[dance:sname]", $rowd->name, $Mark_Text);
                 $Mark_Text = str_replace("[dance:sid]", $rowd->id, $Mark_Text);
             } else {
                 $Mark_Text = str_replace("[dance:slink]", "#", $Mark_Text);
                 $Mark_Text = str_replace("[dance:sname]", L('plub_45'), $Mark_Text);
                 $Mark_Text = str_replace("[dance:sid]", 0, $Mark_Text);
             }
         }
         unset($arr);
         preg_match_all('/[dance:xlink]/', $Mark_Text, $arr);
         if (!empty($arr[0]) && !empty($arr[0][0])) {
             $rowd = $this->db->query("Select id,cid,name from " . CS_SqlPrefix . "dance where yid=0 and hid=0 and id>" . $id . " order by id asc limit 1")->row();
             if ($rowd) {
                 $Mark_Text = str_replace("[dance:xlink]", LinkUrl('play', 'id', $rowd->id, 1, 'dance'), $Mark_Text);
                 $Mark_Text = str_replace("[dance:xname]", $rowd->name, $Mark_Text);
                 $Mark_Text = str_replace("[dance:xid]", $rowd->id, $Mark_Text);
             } else {
                 $Mark_Text = str_replace("[dance:xlink]", "#", $Mark_Text);
                 $Mark_Text = str_replace("[dance:xname]", L('plub_45'), $Mark_Text);
                 $Mark_Text = str_replace("[dance:xid]", 0, $Mark_Text);
             }
         }
         unset($arr);
         //标签加超级连接
         $Mark_Text = str_replace("[dance:tags]", SearchLink($rows['tags']), $Mark_Text);
         //动态人气
         $Mark_Text = str_replace("[dance:hits]", "<script src='" . hitslink('hits/dt/hits/' . $id, 'dance') . "'></script>", $Mark_Text);
         $Mark_Text = str_replace("[dance:yhits]", "<script src='" . hitslink('hits/dt/yhits/' . $id, 'dance') . "'></script>", $Mark_Text);
         $Mark_Text = str_replace("[dance:zhits]", "<script src='" . hitslink('hits/dt/zhits/' . $id, 'dance') . "'></script>", $Mark_Text);
         $Mark_Text = str_replace("[dance:rhits]", "<script src='" . hitslink('hits/dt/rhits/' . $id, 'dance') . "'></script>", $Mark_Text);
         $Mark_Text = str_replace("[dance:dhits]", "<script src='" . hitslink('hits/dt/dhits/' . $id, 'dance') . "'></script>", $Mark_Text);
         $Mark_Text = str_replace("[dance:chits]", "<script src='" . hitslink('hits/dt/chits/' . $id, 'dance') . "'></script>", $Mark_Text);
         $Mark_Text = str_replace("[dance:shits]", "<script src='" . hitslink('hits/dt/shits/' . $id, 'dance') . "'></script>", $Mark_Text);
         $Mark_Text = str_replace("[dance:xhits]", "<script src='" . hitslink('hits/dt/xhits/' . $id, 'dance') . "'></script>", $Mark_Text);
         //歌曲完整试听、下载地址
         preg_match_all('/[dance:qurl]/', $Mark_Text, $arr);
         if (!empty($arr[0]) && !empty($arr[0][0])) {
             $purl = $row['purl'];
             $durl = $row['durl'];
             if ($row['fid'] > 0) {
                 $rowf = $this->db->query("Select purl,durl from " . CS_SqlPrefix . "dance_server where id=" . $row['fid'] . "")->row_array();
                 if ($rowf) {
                     $purl = $rowf['purl'] . $row['purl'];
                     $durl = $rowf['durl'] . $row['durl'];
                 }
             }
             $purl = annexlink($purl);
             $durl = annexlink($durl);
             $Mark_Text = str_replace("[dance:qurl]", $purl, $Mark_Text);
             $Mark_Text = str_replace("[dance:qxurl]", $durl, $Mark_Text);
         }
         unset($arr);
         //生成
         write_file(FCPATH . $Htmllink, $Mark_Text);
         echo "&nbsp;<font style=font-size:10pt;>" . L('plub_50') . "<font color=red>" . $row['name'] . "</font>" . L('plub_36') . "<a href=" . $Htmllinks . " target=_blank>" . $Htmllinks . "</a></font><br/>";
         ob_flush();
         flush();
     }
     if (!empty($ids)) {
         $url = 'javascript:history.back();';
         $str = "&nbsp;&nbsp;<b>" . L('plub_66') . "&nbsp;>>>>&nbsp;&nbsp;<a href='" . $url . "'>" . L('plub_28') . "</a></b>";
     } else {
         $url = site_url('dance/admin/html/down_save') . $uri . '&page=' . ($page + 1);
         $str = "&nbsp;&nbsp;<b>" . vsprintf(L('plub_27'), array(Html_StopTime)) . "&nbsp;>>>>&nbsp;&nbsp;<a href='" . $url . "'>" . L('plub_28') . "</a></b>";
     }
     echo "</br>" . $str . "<script>setTimeout('updatenext();'," . Html_StopTime . "000);function updatenext(){location.href='" . $url . "';}</script>";
 }
예제 #15
0
function getChild($first)
{
    if (isset($first['child'])) {
        echo '<ul class="treeview-menu">';
        foreach ($first['child'] as $second) {
            $url = getUrl($second);
            echo '<li><a style="cursor: pointer;" ' . $url . '><i class="fa fa-circle-o"></i> ' . $second['name'];
            if (isset($second['child'])) {
                echo '<i class="fa fa-angle-left pull-right"></i>';
                getChild($second);
            }
            echo '</a></li>';
        }
        echo '</ul>';
    }
}
예제 #16
0
 public function index($fid = 'id', $id = 0)
 {
     $id = intval($fid) > 0 ? intval($fid) : intval($id);
     //ID
     //判断ID
     if ($id == 0) {
         msg_url(L('dance_09'), Web_Path);
     }
     //获取数据
     $row = $this->CsdjDB->get_row_arr('dance', '*', $id);
     if (!$row || $row['yid'] > 0 || $row['hid'] > 0) {
         msg_url(L('dance_10'), Web_Path);
     }
     //判断运行模式,生成则跳转至静态页面
     $html = config('Html_Uri');
     if (config('Web_Mode') == 3 && $html['down']['check'] == 1) {
         //获取静态路径
         $Htmllink = LinkUrl('play', 'id', $id, 0, 'dance');
         header("Location: " . $Htmllink);
         exit;
     }
     //摧毁部分需要超级链接字段数组
     $rows = $row;
     //先保存数组保留下面使用
     unset($row['tags']);
     //获取当前分类下二级分类ID
     $arr['cid'] = getChild($row['cid']);
     $arr['uid'] = $row['uid'];
     $arr['singerid'] = $row['singerid'];
     $arr['tags'] = $rows['tags'];
     //装载模板并输出
     $Mark_Text = $this->CsdjTpl->plub_show('dance', $row, $arr, TRUE, 'down.html', $row['name'], $row['name']);
     //评论
     $Mark_Text = str_replace("[dance:pl]", get_pl('dance', $id), $Mark_Text);
     //分类地址、名称
     $Mark_Text = str_replace("[dance:link]", LinkUrl('play', 'id', $row['id'], 1, 'news'), $Mark_Text);
     $Mark_Text = str_replace("[dance:classlink]", LinkUrl('lists', 'id', $row['cid'], 1, 'dance'), $Mark_Text);
     $Mark_Text = str_replace("[dance:classname]", $this->CsdjDB->getzd('dance_list', 'name', $row['cid']), $Mark_Text);
     //专辑
     if ($row['tid'] == 0) {
         $Mark_Text = str_replace("[dance:topiclink]", "###", $Mark_Text);
         $Mark_Text = str_replace("[dance:topicname]", L('dance_11'), $Mark_Text);
     } else {
         $Mark_Text = str_replace("[dance:topiclink]", LinkUrl('topic', 'show', $row['tid'], 1, 'dance'), $Mark_Text);
         $Mark_Text = str_replace("[dance:topicname]", $this->CsdjDB->getzd('dance_topic', 'name', $row['tid']), $Mark_Text);
     }
     //标签加超级连接
     $Mark_Text = str_replace("[dance:tags]", SearchLink($rows['tags']), $Mark_Text);
     //歌曲完整试听、下载地址
     preg_match_all('/[dance:qurl]/', $Mark_Text, $arr);
     if (!empty($arr[0]) && !empty($arr[0][0])) {
         $purl = $row['purl'];
         $durl = $row['durl'];
         if ($row['fid'] > 0) {
             $rowf = $this->db->query("Select purl,durl from " . CS_SqlPrefix . "dance_server where id=" . $row['fid'] . "")->row_array();
             if ($rowf) {
                 $purl = $rowf['purl'] . $row['purl'];
                 $durl = $rowf['durl'] . $row['durl'];
             }
         }
         $purl = annexlink($purl);
         $durl = annexlink($durl);
         $Mark_Text = str_replace("[dance:qurl]", $purl, $Mark_Text);
         $Mark_Text = str_replace("[dance:qxurl]", $durl, $Mark_Text);
     }
     unset($arr);
     echo $Mark_Text;
     $this->cache->end();
     //由于前面不是直接输出,所以这里需要加入写缓存
 }
예제 #17
0
 public function type_save()
 {
     if ($this->huri['lists']['check'] == 0) {
         admin_msg('新闻分类未开启生成~!', 'javascript:history.back();', 'no');
     }
     $ac = $this->input->get_post('ac', true);
     //方式
     $cid = $this->input->get_post('cid', true);
     //需要生成的分类ID
     $fid = $this->input->get_post('fid', true);
     //需要生成的排序方式
     $nums = intval($this->input->get('nums'));
     //分类已完成数量
     $numx = intval($this->input->get('numx'));
     //排序方式已完成数量
     $start = intval($this->input->get('start'));
     //当前页生成编号
     $pagesize = intval($this->input->get('pagesize'));
     //每页多少条
     $pagejs = intval($this->input->get('pagejs'));
     //总页数
     $datacount = intval($this->input->get('datacount'));
     //数据总数
     $page = intval($this->input->get('page'));
     //当前页
     if ($start == 0) {
         $start = 1;
     }
     if (empty($fid)) {
         $fid = $ac == 'all' ? 'id,news,reco,hits,yhits,zhits,rhits,xhits,shits,dhits,chits,phits' : 'id';
     }
     //生成全部分类获取全部分类ID
     if ($ac == 'all' && $nums == 0) {
         $cid = array();
         $query = $this->db->query("SELECT id FROM " . CS_SqlPrefix . "news_list where yid=0 order by xid asc");
         foreach ($query->result() as $rowc) {
             $cid[] = $rowc->id;
         }
     }
     //将数组转换成字符
     if (is_array($cid)) {
         $cid = implode(',', $cid);
     }
     if (is_array($fid)) {
         $fid = implode(',', $fid);
     }
     //没有选择分类
     if (empty($cid)) {
         admin_msg('请选择要生成的分类~!', site_url('news/admin/html/type'));
     }
     //公众URI
     $uri = '?ac=' . $ac . '&cid=' . $cid . '&fid=' . $fid . '&pagesize=' . $pagesize . '&pagejs=' . $pagejs . '&datacount=' . $datacount;
     //分割分类ID
     $arr = explode(',', $cid);
     $len = count($arr);
     //分割排序方式
     $arr2 = explode(',', $fid);
     $len2 = count($arr2);
     //全部生成完毕
     if ($nums >= $len) {
         admin_msg('所有分类全部生成完毕~!', site_url('news/admin/html/type'));
     }
     $id = $arr[$nums];
     //当前分类ID
     $type = $arr2[$numx];
     //当前排序
     //重新定义模板路径
     $this->load->get_templates('news', 2);
     //获取分类信息
     $row = $this->CsdjDB->get_row_arr('news_list', '*', $id);
     $template = !empty($row['skins']) ? $row['skins'] : 'list.html';
     $ids = getChild($id);
     //获取子分类
     if ($datacount == 0) {
         $template = $this->load->view($template, '', true);
         $pagesize = 10;
         preg_match_all('/{cscms:([\\S]+)\\s+(.*?pagesize=\\"([\\S]+)\\".*?)}([\\s\\S]+?){\\/cscms:\\1}/', $template, $page_arr);
         if (!empty($page_arr) && !empty($page_arr[3][0])) {
             $pagesize = $page_arr[3][0];
         }
         $sqlstr = "select id from " . CS_SqlPrefix . "news where yid=0 and hid=0 and cid IN (" . getChild($id) . ")";
         $datacount = $this->db->query($sqlstr)->num_rows();
         //总数量
         $pagejs = ceil($datacount / $pagesize);
     }
     if ($datacount == 0) {
         $pagejs = 1;
     }
     echo '<LINK href="' . base_url() . 'packs/admin/css/style.css" type="text/css" rel="stylesheet"><br>';
     echo '&nbsp;&nbsp;<b>正在开始生成分类<font color=red> ' . $row["name"] . ' </font>按<font color=red> ' . $this->gettype($type) . ' </font>排序的列表,分<font color=red>' . ceil($pagejs / Html_PageNum) . '</font>次生成,当前第<font color=red>' . ceil($start / Html_PageNum) . '</font>次</b><br/>';
     $n = 1;
     $pagego = 1;
     if ($page > 0 && $page < $pagejs) {
         $pagejs = $page;
     }
     for ($i = $start; $i <= $pagejs; $i++) {
         ob_end_flush();
         //关闭缓存
         //获取静态路径
         $Htmllinks = LinkUrl('lists', $type, $id, $i, 'news', $row['name']);
         //转换成生成路径
         $Htmllink = adminhtml($Htmllinks, 'news');
         $skins = empty($row['skins']) ? 'list.html' : $row['skins'];
         $Mark_Text = $this->CsdjTpl->plub_list($row, $id, $type, $i, $ids, true, $skins, 'lists', 'news', $row['name'], $row['name']);
         write_file(FCPATH . $Htmllink, $Mark_Text);
         echo "<a target='_blank' href='" . $Htmllinks . "'>&nbsp;&nbsp;第" . $i . "页&nbsp;&nbsp;" . $Htmllinks . "<font color=green>生成完毕~!</font></a><br/>";
         $n++;
         ob_flush();
         flush();
         if (Html_PageNum == $n) {
             $pagego = 2;
             break;
         }
     }
     if ($pagego == 2) {
         //操作系统设置每页数量,分多页生成
         $url = site_url('news/admin/html/type_save') . $uri . '&nums=' . $nums . '&numx=' . $numx . '&start=' . ($i + 1);
         exit("</br>&nbsp;&nbsp;<b>暂停" . Html_StopTime . "秒后继续下一页&nbsp;>>>>&nbsp;&nbsp;<a target='_blank' href='" . $url . "'>如果您的 浏览器没有跳转,请点击继续...</a></b><script>setTimeout('updatenext();'," . Html_StopTime . "000);function updatenext(){location.href='" . $url . "';}</script>");
     } else {
         $url = site_url('news/admin/html/type_save') . $uri . '&nums=' . ($nums + 1);
         $str = "&nbsp;&nbsp;<b>暂停" . Html_StopTime . "秒后继续&nbsp;>>>>&nbsp;&nbsp;<a target='_blank' href='" . $url . "'>如果您的 浏览器没有跳转,请点击继续...</a></b>";
     }
     //判断生成完毕
     if ($numx + 1 >= $len2) {
         //全部完成
         $url = site_url('news/admin/html/type_save') . $uri . '&nums=' . ($nums + 1);
         $str = "&nbsp;&nbsp;<b><font color=#0000ff>所有排序页面全部生成完毕!</font>&nbsp;>>>>&nbsp;&nbsp;<a href='" . site_url('news/admin/html/type_save') . $uri . '&nums=' . ($nums + 1) . "'>如果您的 浏览器没有跳转,请点击继续...</a></b>";
     } else {
         //当前排序方式完成
         $url = site_url('news/admin/html/type_save') . $uri . '&nums=' . $nums . '&numx=' . ($numx + 1);
         $str = '&nbsp;&nbsp;<b>按<font color=#0000ff>' . $this->gettype($type) . '排序</font>分类生成完毕!&nbsp;>>>>&nbsp;&nbsp;<a href="' . site_url('news/admin/html/type_save') . $uri . '&nums=' . $nums . '&numx=' . ($numx + 1) . '">如果您的 浏览器没有跳转,请点击继续...</a></b>';
     }
     echo "</br>" . $str . "<script>setTimeout('updatenext();'," . Html_StopTime . "000);function updatenext(){location.href='" . $url . "';}</script>";
 }
예제 #18
0
 public function index($fid = 'id', $id = 0, $return = FALSE)
 {
     $id = intval($fid) > 0 ? intval($fid) : intval($id);
     //ID
     //判断ID
     if ($id == 0) {
         msg_url('出错了,ID不能为空!', Web_Path);
     }
     //获取数据
     $row = $this->CsdjDB->get_row_arr('vod', '*', $id);
     if (!$row || $row['yid'] > 0 || $row['hid'] > 0) {
         msg_url('出错了,该数据不存在或者没有审核!', Web_Path);
     }
     //判断运行模式,生成则跳转至静态页面
     $html = config('Html_Uri');
     if (config('Web_Mode') == 3 && $html['show']['check'] == 1 && !defined('MOBILE')) {
         //获取静态路径
         $Htmllink = LinkUrl('show', $fid, $id, 0, 'vod');
         header("Location: " . $Htmllink);
         exit;
     }
     //摧毁部分需要超级链接字段数组
     $rows = $row;
     //先保存数组保留下面使用
     unset($row['zhuyan']);
     unset($row['daoyan']);
     unset($row['yuyan']);
     unset($row['diqu']);
     unset($row['tags']);
     unset($row['year']);
     unset($row['pfen']);
     unset($row['phits']);
     //获取当前分类下二级分类ID
     $arr['cid'] = getChild($row['cid']);
     $arr['uid'] = $row['uid'];
     $arr['singerid'] = $row['singerid'];
     $arr['tags'] = $rows['tags'];
     $skins = getzd('vod_list', 'skins2', $row['cid']);
     if (empty($skins)) {
         $skins = 'show.html';
     }
     //装载模板并输出
     $Mark_Text = $this->CsdjTpl->plub_show('vod', $row, $arr, TRUE, $skins, $row['name'], $row['name']);
     //评论
     $Mark_Text = str_replace("[vod:pl]", get_pl('vod', $id), $Mark_Text);
     //分类地址、名称
     $Mark_Text = str_replace("[vod:link]", LinkUrl('show', 'id', $row['id'], 1, 'vod'), $Mark_Text);
     $Mark_Text = str_replace("[vod:classlink]", LinkUrl('lists', 'id', $row['cid'], 1, 'vod'), $Mark_Text);
     $Mark_Text = str_replace("[vod:classname]", $this->CsdjDB->getzd('vod_list', 'name', $row['cid']), $Mark_Text);
     //主演、导演、标签、年份、地区、语言加超级连接
     $Mark_Text = str_replace("[vod:zhuyan]", SearchLink($rows['zhuyan'], 'zhuyan'), $Mark_Text);
     $Mark_Text = str_replace("[vod:daoyan]", SearchLink($rows['daoyan'], 'daoyan'), $Mark_Text);
     $Mark_Text = str_replace("[vod:yuyan]", SearchLink($rows['yuyan'], 'yuyan'), $Mark_Text);
     $Mark_Text = str_replace("[vod:diqu]", SearchLink($rows['diqu'], 'diqu'), $Mark_Text);
     $Mark_Text = str_replace("[vod:tags]", SearchLink($rows['tags']), $Mark_Text);
     $Mark_Text = str_replace("[vod:year]", SearchLink($rows['year'], 'year'), $Mark_Text);
     //评分
     $Mark_Text = str_replace("[vod:pfen]", getpf($rows['pfen'], $rows['phits']), $Mark_Text);
     $Mark_Text = str_replace("[vod:pfenbi]", getpf($rows['pfen'], $rows['phits'], 2), $Mark_Text);
     //解析播放下载地址
     $Mark_Text = Vod_Playlist($Mark_Text, 'play', $id, $row['purl']);
     $Mark_Text = Vod_Playlist($Mark_Text, 'down', $id, $row['durl']);
     echo $Mark_Text;
     $this->cache->end();
     //由于前面不是直接输出,所以这里需要加入写缓存
 }
예제 #19
0
파일: utils.php 프로젝트: jhbsz/ossimTest
function getChild($tree, $key, $name_node = '', $parents = '')
{
    $_level_key_name = $_SESSION['_level_key_name'];
    $at_key = preg_match("/^attr_/", $key, $match) != false ? true : false;
    if ($name_node !== '') {
        $parents[] = "'" . $name_node . "'";
    }
    if (is_array($tree)) {
        if (isset($tree['@attributes'])) {
            //echo "Analizando: ". $tree['@attributes'][$_level_key_name]." contra ". $key." AT: $at_key<br/>";
            $key2 = $at_key == true ? preg_replace("/^attr_/", '', $key) : $key;
            if ($tree['@attributes'][$_level_key_name] === $key2) {
                $tree = $at_key == true ? $tree['@attributes'] : $tree;
                $name_node = $at_key == true ? "@at_" . $name_node : $name_node;
                return array('node' => $name_node, 'tree' => $tree, 'parents' => $parents);
            }
        }
        foreach ($tree as $k => $children) {
            if ($k !== '@attributes') {
                $found = getChild($children, $key, $k, $parents);
                if (!empty($found)) {
                    return $found;
                }
            }
        }
    }
}
예제 #20
0
 public function index($a1, $a2 = 0, $a3 = 0, $a4 = 0)
 {
     if (intval($a1) > 0) {
         $id = intval($a1);
         //ID
         $zu = intval($a2);
         //组
         $ji = intval($a3);
         //集数
     } else {
         $id = intval($a2);
         //ID
         $zu = intval($a3);
         //组
         $ji = intval($a4);
         //集数
     }
     $login = '******';
     //判断ID
     if ($id == 0) {
         msg_url('出错了,ID不能为空!', Web_Path);
     }
     //获取数据
     $row = $this->CsdjDB->get_row_arr('vod', '*', $id);
     if (!$row || $row['yid'] > 0 || $row['hid'] > 0) {
         msg_url('出错了,该数据不存在或者没有审核!', Web_Path);
     }
     if (empty($row['purl'])) {
         msg_url('该视频播放地址不正确!', Web_Path);
     }
     //判断运行模式,生成则跳转至静态页面
     $html = config('Html_Uri');
     if (config('Web_Mode') == 3 && $html['play']['check'] == 1 && !defined('MOBILE')) {
         //获取静态路径
         $Htmllink = VodPlayUrl('play', $id, $zu, $ji);
         header("Location: " . $Htmllink);
         exit;
     }
     //判断收费
     if ($row['vip'] > 0 || $row['level'] > 0 || $row['cion'] > 0) {
         if (!$this->CsdjUser->User_Login(1)) {
             msg_url('观看这部视频需要登录,请先登录!', spacelink('login'));
         }
         $rowu = $this->CsdjDB->get_row_arr('user', 'vip,level,cion', $_SESSION['cscms__id']);
     }
     //判断会员组下载权限
     if ($row['vip'] > 0 && $row['uid'] != $_SESSION['cscms__id']) {
         if ($row['vip'] > $rowu['vip']) {
             msg_url('抱歉,您所在的会员组不能观看该视频,请先升级!', 'javascript:window.close();');
         }
     }
     //判断会员等级下载权限
     if ($row['level'] > 0 && $row['uid'] != $_SESSION['cscms__id']) {
         if ($row['level'] > $rowu['level']) {
             msg_url('抱歉,您等级不够,不能观看该视频!', 'javascript:window.close();');
         }
     }
     //判断金币下载
     $down = 0;
     if ($row['cion'] > 0 && $row['uid'] != $_SESSION['cscms__id']) {
         //判断是否下载过
         $did = $id . '-' . $zu . '-' . $ji;
         $rowd = $this->db->query("SELECT id,addtime FROM " . CS_SqlPrefix . "vod_look where did='" . $did . "' and uid='" . $_SESSION['cscms__id'] . "' and sid=0")->row_array();
         if ($rowd) {
             $down = 1;
             //数据已经存在
             $downtime = User_Downtime * 3600 + $rowd['addtime'];
             if ($downtime > time()) {
                 $down = 2;
                 //在多少时间内不重复扣币
             }
         }
         //判断会员组下载权限
         $rowz = $this->db->query("SELECT id,did FROM " . CS_SqlPrefix . "userzu where id='" . $rowu['vip'] . "'")->row_array();
         if ($rowz && $rowz['did'] == 1) {
             //有免费下载权限
             $down = 2;
             //该会员下载不收费
         }
         if ($down < 2) {
             //判断扣币
             if ($row['cion'] > $rowu['cion']) {
                 msg_url('这部视频观看每集需要' . $row['cion'] . '个金币,您的当前金币不够,请先充值!', 'javascript:window.close();');
             } else {
                 //扣币
                 $edit['cion'] = $rowu['cion'] - $row['cion'];
                 $this->CsdjDB->get_update('user', $_SESSION['cscms__id'], $edit);
                 //写入消费记录
                 $add2['title'] = '观看视频《' . $row['name'] . '》- 第' . ($ji + 1) . '集';
                 $add2['uid'] = $_SESSION['cscms__id'];
                 $add2['nums'] = $row['cion'];
                 $add2['ip'] = getip();
                 $add2['dir'] = 'vod';
                 $add2['addtime'] = time();
                 $this->CsdjDB->get_insert('spend', $add2);
                 //判断分成
                 if (User_DownFun == 1 && $row['uid'] > 0) {
                     //分成比例
                     $bi = User_Downcion < 10 ? '0.0' . User_Downcion : '0.' . User_Downcion;
                     $scion = intval($row['cion'] * $bi);
                     if ($scion > 0) {
                         $this->db->query("update " . CS_SqlPrefix . "user set cion=cion+" . $scion . " where id=" . $row['uid'] . "");
                         //写入分成记录
                         $add3['title'] = '视频《' . $row['name'] . '》- 第' . ($ji + 1) . '集 - 观看分成';
                         $add3['uid'] = $row['uid'];
                         $add3['dir'] = 'vod';
                         $add3['nums'] = $scion;
                         $add3['ip'] = getip();
                         $add3['addtime'] = time();
                         $this->CsdjDB->get_insert('income', $add3);
                     }
                 }
             }
         }
         //增加观看记录
         if ($down == 0) {
             $add['name'] = $row['name'];
             $add['cid'] = $row['cid'];
             $add['sid'] = 0;
             $add['did'] = $did;
             $add['uid'] = $_SESSION['cscms__id'];
             $add['cion'] = $row['cion'];
             $add['addtime'] = time();
             $this->CsdjDB->get_insert('vod_look', $add);
         }
     }
     //摧毁部分需要超级链接字段数组
     $rows = $row;
     //先保存数组保留下面使用
     unset($row['zhuyan']);
     unset($row['daoyan']);
     unset($row['yuyan']);
     unset($row['diqu']);
     unset($row['tags']);
     unset($row['year']);
     unset($row['pfen']);
     unset($row['phits']);
     //获取当前分类下二级分类ID
     $arr['cid'] = getChild($row['cid']);
     $arr['uid'] = $row['uid'];
     $arr['singerid'] = $row['singerid'];
     $arr['tags'] = $rows['tags'];
     $skins = $row['skins'];
     if (empty($skins) || $skins == 'play.html') {
         $skins = getzd('vod_list', 'skins3', $row['cid']);
     }
     if (empty($skins)) {
         $skins = 'play.html';
     }
     //装载模板并输出
     $Mark_Text = $this->CsdjTpl->plub_show('vod', $row, $arr, TRUE, $skins, $row['name'], $row['name']);
     //评论
     $Mark_Text = str_replace("[vod:pl]", get_pl('vod', $id), $Mark_Text);
     //分类地址、名称
     $Mark_Text = str_replace("[vod:zu]", $zu + 1, $Mark_Text);
     $Mark_Text = str_replace("[vod:ji]", $ji + 1, $Mark_Text);
     $Mark_Text = str_replace("[vod:link]", LinkUrl('show', 'id', $row['id'], 1, 'vod'), $Mark_Text);
     $Mark_Text = str_replace("[vod:playlink]", VodPlayUrl('play', $id, $zu, $ji), $Mark_Text);
     $Mark_Text = str_replace("[vod:classlink]", LinkUrl('lists', 'id', $row['cid'], 1, 'vod'), $Mark_Text);
     $Mark_Text = str_replace("[vod:classname]", $this->CsdjDB->getzd('vod_list', 'name', $row['cid']), $Mark_Text);
     //主演、导演、标签、年份、地区、语言加超级连接
     $Mark_Text = str_replace("[vod:zhuyan]", SearchLink($rows['zhuyan'], 'zhuyan'), $Mark_Text);
     $Mark_Text = str_replace("[vod:daoyan]", SearchLink($rows['daoyan'], 'daoyan'), $Mark_Text);
     $Mark_Text = str_replace("[vod:yuyan]", SearchLink($rows['yuyan'], 'yuyan'), $Mark_Text);
     $Mark_Text = str_replace("[vod:diqu]", SearchLink($rows['diqu'], 'diqu'), $Mark_Text);
     $Mark_Text = str_replace("[vod:tags]", SearchLink($rows['tags']), $Mark_Text);
     $Mark_Text = str_replace("[vod:year]", SearchLink($rows['year'], 'year'), $Mark_Text);
     //评分
     $Mark_Text = str_replace("[vod:pfen]", getpf($rows['pfen'], $rows['phits']), $Mark_Text);
     $Mark_Text = str_replace("[vod:pfenbi]", getpf($rows['pfen'], $rows['phits'], 2), $Mark_Text);
     //解析播放地址
     $Mark_Text = Vod_Playlist($Mark_Text, 'play', $id, $row['purl']);
     //播放器
     $Data_Arr = explode("#cscms#", $row['purl']);
     if ($zu >= count($Data_Arr)) {
         $zu = 0;
     }
     $DataList_Arr = explode("\n", $Data_Arr[$zu]);
     $Dataurl_Arr = explode('$', $DataList_Arr[$ji]);
     $xpurl = "";
     //下集播放地址
     $laiyuan = str_replace("\r", "", @$Dataurl_Arr[2]);
     //来源
     $url = $Dataurl_Arr[1];
     //地址
     $pname = $Dataurl_Arr[0];
     //当前集数
     $Mark_Text = str_replace("[vod:qurl]", $url, $Mark_Text);
     $Mark_Text = str_replace("[vod:laiy]", $laiyuan, $Mark_Text);
     $Mark_Text = str_replace("[vod:ji]", $pname, $Mark_Text);
     //手机播放地址
     if (substr($url, 0, 7) == 'http://') {
         $wapurl = $url;
     } else {
         $wapurl = 'http://download.chshcms.com/mp4/' . $laiyuan . '/' . cs_base64_encode($url) . '/cscms.mp4';
     }
     $Mark_Text = str_replace("[vod:wapurl]", $wapurl, $Mark_Text);
     if (count($DataList_Arr) > $ji + 1) {
         $DataNext = $DataList_Arr[$ji + 1];
         $DataNextArr = explode('$', $DataNext);
         if (count($DataNextArr) == 2) {
             $DataNext = $DataNextArr[1];
         }
         $xurl = VodPlayUrl('play', $id, $zu, $ji + 1);
         $Dataurl_Arr2 = explode('$', $DataList_Arr[$ji + 1]);
         $xpurl = @$Dataurl_Arr2[1];
         //下集播放地址
     } else {
         $DataNext = $DataList_Arr[$ji];
         $DataNextArr = explode('$', $DataNext);
         if (count($DataNextArr) == 2) {
             $DataNext = $DataNextArr[1];
         }
         $xurl = '#';
         $xpurl = '';
         //下集播放地址
     }
     if ($ji == 0) {
         $surl = '#';
     } else {
         $surl = VodPlayUrl('play', $id, $zu, $ji - 1);
     }
     $psname = '';
     for ($j = 0; $j < count($Data_Arr); $j++) {
         $jis = '';
         $Ji_Arr = explode("\n", $Data_Arr[$j]);
         for ($k = 0; $k < count($Ji_Arr); $k++) {
             $Ly_Arr = explode('$', $Ji_Arr[$k]);
             $jis .= $Ly_Arr[0] . '$$' . @$Ly_Arr[2] . '====';
         }
         $psname .= substr($jis, 0, -4) . '#cscms#';
     }
     $player_arr = str_replace("\r", "", substr($psname, 0, -7));
     if ($laiyuan == 'xgvod' || $laiyuan == 'jjvod' || $laiyuan == 'yyxf' || $laiyuan == 'bdhd' || $laiyuan == 'qvod') {
         $xpurl = str_replace("+", "__", base64_encode($xpurl));
         $url = str_replace("+", "__", base64_encode($url));
     } else {
         $xpurl = escape($xpurl);
         $url = escape($url);
     }
     $player = "<script type='text/javascript' src='" . hitslink('play/form', 'vod') . "'></script><script type='text/javascript'>var cs_playlink='" . VodPlayUrl('play', $id, $zu, $ji, 1) . "';var cs_did='" . $id . "';var player_name='" . $player_arr . "';var cs_pid='" . $ji . "';var cs_zid='" . $zu . "';var cs_vodname='" . $row['name'] . " - " . $pname . "';var cs_root='" . Web_Path . "';var cs_width=" . CS_Play_sw . ";var cs_height=" . CS_Play_sh . ";var cs_surl='" . $surl . "';var cs_xurl='" . $xurl . "';var cs_url='" . $url . "';var cs_xpurl='" . $xpurl . "';var cs_laiy='" . $laiyuan . "';var cs_adloadtime='" . CS_Play_AdloadTime . "';</script><iframe border=\"0\" name=\"cscms_vodplay\" id=\"cscms_vodplay\" src=\"" . Web_Path . "packs/vod_player/play.html\" marginwidth=\"0\" framespacing=\"0\" marginheight=\"0\" noresize=\"\" vspale=\"0\" style=\"z-index: 9998;\" frameborder=\"0\" height=\"" . (CS_Play_sh + 30) . "\" scrolling=\"no\" width=\"100%\"></iframe>";
     $Mark_Text = str_replace("[vod:player]", $player, $Mark_Text);
     $Mark_Text = str_replace("[vod:surl]", $surl, $Mark_Text);
     $Mark_Text = str_replace("[vod:xurl]", $xurl, $Mark_Text);
     //增加人气
     $Mark_Text = hits_js($Mark_Text, hitslink('hits/ids/' . $id, 'vod'));
     echo $Mark_Text;
     $this->cache->end();
     //由于前面不是直接输出,所以这里需要加入写缓存
 }
예제 #21
0
파일: modify.php 프로젝트: jhbsz/ossimTest
        $num_at = count($at_keys);
        for ($i = 0; $i < $num_at; $i = $i + 2) {
            if ($clean_post[$at_keys[$i]] != '') {
                $j = $i + 1;
                $nodes['@attributes'][$clean_post[$at_keys[$i]]] = $clean_post[$at_keys[$j]];
                unset($clean_post[$at_keys[$i]]);
            }
        }
        $cont = 1;
        foreach ($nodes_keys as $k => $v) {
            if (preg_match("/^clone/", $v) == false) {
                $child_node = getChild($child, $v);
                $nodes[$cont - 1][$child_node['node']] = set_new_lk($child_node['tree'], $child_node['tree']['@attributes'][$_level_key_name], $__level_key . "_" . $cont);
            } else {
                $key = preg_replace("/clone###/", "", $v);
                $child_node = getChild($child, $key);
                $nodes[$cont - 1][$child_node['node']] = set_new_lk($child_node['tree'], $child_node['tree']['@attributes'][$_level_key_name], $__level_key . "_" . $cont);
            }
            $cont++;
        }
        $ok = eval("\$tree{$branch}=\$nodes;");
        break;
}
if ($ok === false) {
    echo "2###" . _("Failure to update XML File") . " (2)";
    $error = true;
} else {
    $xml = new xml($_level_key_name);
    $output = $xml->array2xml($tree);
    $output = formatOutput($output, $_level_key_name);
    $output = utf8_decode($output);
예제 #22
0
 public function getplay($row)
 {
     //评论
     $dance_pl = get_pl('vod', $row['id']);
     $rows = $row;
     //先保存数组保留下面使用
     $id = $rows['id'];
     //播放页
     if (!empty($row['purl'])) {
         $Data_Arr = explode("#cscms#", $row['purl']);
         for ($i = 0; $i < count($Data_Arr); $i++) {
             $DataList_Arr = explode("\n", $Data_Arr[$i]);
             for ($j = 0; $j < count($DataList_Arr); $j++) {
                 //摧毁部分需要超级链接字段数组
                 unset($row['zhuyan']);
                 unset($row['daoyan']);
                 unset($row['yuyan']);
                 unset($row['diqu']);
                 unset($row['tags']);
                 unset($row['year']);
                 //动态人气
                 unset($row['hits']);
                 unset($row['yhits']);
                 unset($row['zhits']);
                 unset($row['rhits']);
                 unset($row['dhits']);
                 unset($row['chits']);
                 unset($row['xhits']);
                 unset($row['shits']);
                 $arr['cid'] = getChild($row['cid']);
                 $arr['uid'] = $row['uid'];
                 $arr['singerid'] = $row['singerid'];
                 $arr['tags'] = $rows['tags'];
                 $skins = $row['skins'];
                 if (empty($skins) || $skins == 'play.html') {
                     $skins = getzd('vod_list', 'skins3', $row['cid']);
                 }
                 if (empty($skins)) {
                     $skins = 'play.html';
                 }
                 //装载模板并输出
                 $Mark_Text = $this->CsdjTpl->plub_show('vod', $row, $arr, TRUE, $skins, $row['name'], $row['name']);
                 $Mark_Text = str_replace("[vod:pl]", $dance_pl, $Mark_Text);
                 //分类地址、名称
                 $Mark_Text = str_replace("[vod:link]", LinkUrl('show', 'id', $row['id'], 1, 'vod'), $Mark_Text);
                 $Mark_Text = str_replace("[vod:classlink]", LinkUrl('lists', 'id', $row['cid'], 1, 'vod'), $Mark_Text);
                 $Mark_Text = str_replace("[vod:classname]", $this->CsdjDB->getzd('vod_list', 'name', $row['cid']), $Mark_Text);
                 //主演、导演、标签、年份、地区、语言加超级连接
                 $Mark_Text = str_replace("[vod:zhuyan]", SearchLink($rows['zhuyan'], 'zhuyan'), $Mark_Text);
                 $Mark_Text = str_replace("[vod:daoyan]", SearchLink($rows['daoyan'], 'daoyan'), $Mark_Text);
                 $Mark_Text = str_replace("[vod:yuyan]", SearchLink($rows['yuyan'], 'yuyan'), $Mark_Text);
                 $Mark_Text = str_replace("[vod:diqu]", SearchLink($rows['diqu'], 'diqu'), $Mark_Text);
                 $Mark_Text = str_replace("[vod:tags]", SearchLink($rows['tags']), $Mark_Text);
                 $Mark_Text = str_replace("[vod:year]", SearchLink($rows['year'], 'year'), $Mark_Text);
                 $Mark_Text = Vod_Playlist($Mark_Text, 'play', $id, $row['purl']);
                 //播放器
                 if ($i >= count($Data_Arr)) {
                     $i = 0;
                 }
                 $DataList_Arr = explode("\n", $Data_Arr[$i]);
                 $Dataurl_Arr = explode('$', $DataList_Arr[$j]);
                 $laiyuan = str_replace("\r", "", @$Dataurl_Arr[2]);
                 //来源
                 $url = $Dataurl_Arr[1];
                 //地址
                 $pname = $Dataurl_Arr[0];
                 //当前集数
                 $Mark_Text = str_replace("[vod:qurl]", $url, $Mark_Text);
                 $Mark_Text = str_replace("[vod:laiy]", $laiyuan, $Mark_Text);
                 $Mark_Text = str_replace("[vod:ji]", $pname, $Mark_Text);
                 if (count($DataList_Arr) > $j + 1) {
                     $DataNext = $DataList_Arr[$j + 1];
                     $DataNextArr = explode('$', $DataNext);
                     if (count($DataNextArr) == 2) {
                         $DataNext = $DataNextArr[1];
                     }
                     $xurl = VodPlayUrl('play', $id, $i, $j + 1);
                     $Dataurl_Arr2 = explode('$', $DataList_Arr[$j + 1]);
                 } else {
                     $DataNext = $DataList_Arr[$j];
                     $DataNextArr = explode('$', $DataNext);
                     if (count($DataNextArr) == 2) {
                         $DataNext = $DataNextArr[1];
                     }
                     $xurl = VodPlayUrl('play', $id, $i, $j);
                 }
                 if ($j == 0) {
                     $surl = VodPlayUrl('play', $id, $i, $j);
                 } else {
                     $surl = VodPlayUrl('play', $id, $i, $j - 1);
                 }
                 $psname = '';
                 for ($a = 0; $a < count($Data_Arr); $a++) {
                     $jis = '';
                     $Ji_Arr = explode("\n", $Data_Arr[$a]);
                     for ($k = 0; $k < count($Ji_Arr); $k++) {
                         $Ly_Arr = explode('$', $Ji_Arr[$k]);
                         $jis .= $Ly_Arr[0] . '$$' . @$Ly_Arr[2] . '====';
                     }
                     $psname .= substr($jis, 0, -4) . '#cscms#';
                 }
                 $player_arr = str_replace("\r", "", substr($psname, 0, -7));
                 if ($laiyuan == 'xgvod' || $laiyuan == 'jjvod' || $laiyuan == 'yyxf' || $laiyuan == 'bdhd' || $laiyuan == 'qvod') {
                     $url = str_replace("+", "__", base64_encode($url));
                 } else {
                     $url = escape($url);
                 }
                 $player = "<script type='text/javascript' src='" . site_url('vod/play/pay/' . $id . '/' . $i . '/' . $j) . "'></script><script type='text/javascript' src='" . hitslink('play/form', 'vod') . "'></script><script type='text/javascript'>var cs_playlink='" . VodPlayUrl('play', $id, $i, $j, 1) . "';var cs_did='" . $id . "';var player_name='" . $player_arr . "';var cs_pid='" . $j . "';var cs_zid='" . $i . "';var cs_vodname='" . $row['name'] . " - " . $pname . "';var cs_root='http://" . Web_Url . Web_Path . "';var cs_width=" . CS_Play_sw . ";var cs_height=" . CS_Play_sh . ";var cs_surl='" . $surl . "';var cs_xurl='" . $xurl . "';var cs_laiy='" . $laiyuan . "';var cs_adloadtime='" . CS_Play_AdloadTime . "';</script>\r\n\t\t\t\t\t\t\t\t   <iframe border=\"0\" name=\"cscms_vodplay\" id=\"cscms_vodplay\" src=\"" . Web_Path . "packs/vod_player/play.html\" marginwidth=\"0\" framespacing=\"0\" marginheight=\"0\" noresize=\"\" vspale=\"0\" style=\"z-index: 9998;\" frameborder=\"0\" height=\"" . (CS_Play_sh + 30) . "\" scrolling=\"no\" width=\"100%\"></iframe>";
                 $Mark_Text = str_replace("[vod:player]", $player, $Mark_Text);
                 $Mark_Text = str_replace("[vod:surl]", $surl, $Mark_Text);
                 $Mark_Text = str_replace("[vod:xurl]", $xurl, $Mark_Text);
                 //解析动态人气标签
                 $Mark_Text = str_replace("[vod:hits]", "<script src='" . hitslink('hits/dt/hits/' . $id, 'vod') . "'></script>", $Mark_Text);
                 $Mark_Text = str_replace("[vod:yhits]", "<script src='" . hitslink('hits/dt/yhits/' . $id, 'vod') . "'></script>", $Mark_Text);
                 $Mark_Text = str_replace("[vod:zhits]", "<script src='" . hitslink('hits/dt/zhits/' . $id, 'vod') . "'></script>", $Mark_Text);
                 $Mark_Text = str_replace("[vod:rhits]", "<script src='" . hitslink('hits/dt/rhits/' . $id, 'vod') . "'></script>", $Mark_Text);
                 $Mark_Text = str_replace("[vod:shits]", "<script src='" . hitslink('hits/dt/shits/' . $id, 'vod') . "'></script>", $Mark_Text);
                 $Mark_Text = str_replace("[vod:xhits]", "<script src='" . hitslink('hits/dt/xhits/' . $id, 'vod') . "'></script>", $Mark_Text);
                 $Mark_Text = str_replace("[vod:dhits]", "<script src='" . hitslink('hits/dt/dhits/' . $id, 'vod') . "'></script>", $Mark_Text);
                 $Mark_Text = str_replace("[vod:chits]", "<script src='" . hitslink('hits/dt/chits/' . $id, 'vod') . "'></script>", $Mark_Text);
                 $Mark_Text = str_replace("[vod:pfen]", "<script src='" . hitslink('hits/dt/pfen/' . $id, 'vod') . "'></script>", $Mark_Text);
                 $Mark_Text = str_replace("[vod:pfenbi]", "<script src='" . hitslink('hits/dt/pfenbi/' . $id, 'vod') . "'></script>", $Mark_Text);
                 //增加人气
                 $Mark_Text = hits_js($Mark_Text, hitslink('hits/ids/' . $id, 'vod'));
                 //替换后台控制器
                 $Mark_Text = str_replace(SELF, 'index.php', $Mark_Text);
                 //获取静态路径
                 $Htmllinks = VodPlayUrl('play', $id, $i, $j);
                 //生成地址转换
                 $Htmllink = adminhtml($Htmllinks, 'vod');
                 //生成
                 write_file(FCPATH . $Htmllink, $Mark_Text);
             }
             echo "&nbsp;&nbsp;&nbsp;<font style=font-size:9pt;color:red;>--生成第" . ($i + 1) . "组播放器:<a href=" . $Htmllinks . " target=_blank>" . $Htmllinks . "</a></font><br/>";
         }
     }
 }
예제 #23
0
 public function show_save()
 {
     if ($this->huri['show']['check'] == 0) {
         admin_msg('相册内容页未开启生成~!', 'javascript:history.back();', 'no');
     }
     $day = intval($this->input->get_post('day', true));
     //最近几天
     $ids = $this->input->get_post('ids', true);
     //需要生成的数据ID
     $cid = $this->input->get_post('cid', true);
     //需要生成的分类ID
     $newid = intval($this->input->get_post('newid'));
     //最新个数
     $ksid = intval($this->input->get_post('ksid'));
     //开始ID
     $jsid = intval($this->input->get_post('jsid'));
     //结束ID
     $kstime = $this->input->get_post('kstime', true);
     //开始日期
     $jstime = $this->input->get_post('jstime', true);
     //结束日期
     $pagesize = intval($this->input->get('pagesize'));
     //每页多少条
     $pagejs = intval($this->input->get('pagejs'));
     //总页数
     $datacount = intval($this->input->get('datacount'));
     //数据总数
     $page = intval($this->input->get('page'));
     //当前页
     if ($page == 0) {
         $page = 1;
     }
     $str = '';
     //将数组转换成字符
     if (is_array($cid)) {
         $cid = implode(',', $cid);
     }
     if (is_array($ids)) {
         $ids = implode(',', $ids);
     }
     if ($day > 0) {
         $times = time() - 86400 * $day;
         $str .= ' and addtime>' . $times . '';
     }
     if (!empty($cid)) {
         $str .= ' and cid in (' . $cid . ')';
     }
     if (!empty($ids)) {
         $str .= ' and id in (' . $ids . ')';
     }
     if ($ksid > 0 && $jsid > 0) {
         $str .= ' and id>' . ($ksid - 1) . ' and id<' . ($jsid + 1) . '';
     }
     if (!empty($kstime) && !empty($jstime)) {
         $ktime = strtotime($kstime) - 86400;
         $jtime = strtotime($jstime) + 86400;
         $str .= ' and addtime>' . $ktime . ' and addtime<' . $jtime . '';
     }
     $limit = '';
     if ($newid > 0) {
         $limit = ' order by id desc limit ' . $newid;
     }
     if ($datacount == 0) {
         $sqlstr = "select id from " . CS_SqlPrefix . "pic_type where yid=0 and hid=0 " . $str . $limit;
         $datacount = $this->db->query($sqlstr)->num_rows();
         //总数量
         $pagejs = ceil($datacount / Html_PageNum);
     }
     if ($datacount == 0) {
         $pagejs = 1;
     }
     $pagesize = Html_PageNum;
     if ($datacount < $pagesize) {
         $pagesize = $datacount;
     }
     //全部生成完毕
     if ($page > $pagejs) {
         admin_msg('所有内容页全部生成完毕~!', site_url('pic/admin/html/show'));
     }
     //公众URI
     $uri = '?day=' . $day . '&cid=' . $cid . '&ids=' . $ids . '&newid=' . $newid . '&ksid=' . $ksid . '&jsid=' . $jsid . '&kstime=' . $kstime . '&jstime=' . $jstime . '&pagesize=' . $pagesize . '&pagejs=' . $pagejs . '&datacount=' . $datacount;
     //重新定义模板路径
     $this->load->get_templates('pic', 2);
     echo '<LINK href="' . base_url() . 'packs/admin/css/style.css" type="text/css" rel="stylesheet"><br>';
     echo '&nbsp;&nbsp;<b>正在开始生成相册内容,分<font color=red>' . $pagejs . '</font>次生成,当前第<font color=red>' . $page . '</font>次</b><br/>';
     $sql_string = "select * from " . CS_SqlPrefix . "pic_type where yid=0 and hid=0 " . $str . " order by id desc";
     $sql_string .= ' limit ' . $pagesize * ($page - 1) . ',' . $pagesize;
     $query = $this->db->query($sql_string);
     //获取内容页是否需要生成
     $html = config('Html_Uri', 'pic');
     foreach ($query->result_array() as $row) {
         ob_end_flush();
         //关闭缓存
         $id = $row['id'];
         //获取静态路径
         $Htmllinks = LinkUrl('show', 'id', $row['id'], 0, 'pic');
         //转换成生成路径
         $Htmllink = adminhtml($Htmllinks, 'pic');
         //摧毁部分需要超级链接字段数组
         $rows = $row;
         //先保存数组保留下面使用
         unset($row['tags']);
         unset($row['hits']);
         unset($row['yhits']);
         unset($row['zhits']);
         unset($row['rhits']);
         unset($row['dhits']);
         unset($row['chits']);
         unset($row['content']);
         //默认模板
         $skins = empty($row['skins']) ? 'show.html' : $row['skins'];
         $arr['cid'] = getChild($row['cid']);
         $arr['uid'] = $row['uid'];
         $arr['tags'] = $rows['tags'];
         $arr['sid'] = $row['id'];
         //装载模板并输出
         $Mark_Text = $this->CsdjTpl->plub_show('pic', $row, $arr, TRUE, $skins, $row['name'], $row['name']);
         //评论
         $Mark_Text = str_replace("[pic:pl]", get_pl('pic', $id), $Mark_Text);
         //分类地址、名称
         $Mark_Text = str_replace("[pic:link]", LinkUrl('show', 'id', $row['id'], 1, 'pic'), $Mark_Text);
         $Mark_Text = str_replace("[pic:classlink]", LinkUrl('lists', 'id', $row['cid'], 1, 'pic'), $Mark_Text);
         $Mark_Text = str_replace("[pic:classname]", $this->CsdjDB->getzd('pic_list', 'name', $row['cid']), $Mark_Text);
         //获取上下篇
         preg_match_all('/[pic:slink]/', $Mark_Text, $arr);
         if (!empty($arr[0]) && !empty($arr[0][0])) {
             $rowd = $this->db->query("Select id,cid,pic,name from " . CS_SqlPrefix . "pic_type where yid=0 and hid=0 and id<" . $id . " order by id desc limit 1")->row();
             if ($rowd) {
                 $Mark_Text = str_replace("[pic:slink]", LinkUrl('show', 'id', $rowd->id, 1, 'pic'), $Mark_Text);
                 $Mark_Text = str_replace("[pic:sname]", $rowd->name, $Mark_Text);
                 $Mark_Text = str_replace("[pic:sid]", $rowd->id, $Mark_Text);
                 $Mark_Text = str_replace("[pic:spic]", piclink('pic', $rowd->pic), $Mark_Text);
             } else {
                 $Mark_Text = str_replace("[pic:slink]", "#", $Mark_Text);
                 $Mark_Text = str_replace("[pic:sname]", "没有了", $Mark_Text);
                 $Mark_Text = str_replace("[pic:sid]", 0, $Mark_Text);
                 $Mark_Text = str_replace("[pic:spic]", piclink('pic', ''), $Mark_Text);
             }
         }
         unset($arr);
         preg_match_all('/[pic:xlink]/', $Mark_Text, $arr);
         if (!empty($arr[0]) && !empty($arr[0][0])) {
             $rowd = $this->db->query("Select id,cid,pic,name from " . CS_SqlPrefix . "pic_type where yid=0 and hid=0 and id>" . $id . " order by id asc limit 1")->row();
             if ($rowd) {
                 $Mark_Text = str_replace("[pic:xlink]", LinkUrl('show', 'id', $rowd->id, 1, 'pic'), $Mark_Text);
                 $Mark_Text = str_replace("[pic:xname]", $rowd->name, $Mark_Text);
                 $Mark_Text = str_replace("[pic:xid]", $rowd->id, $Mark_Text);
                 $Mark_Text = str_replace("[pic:xpic]", piclink('pic', $rowd->pic), $Mark_Text);
             } else {
                 $Mark_Text = str_replace("[pic:xlink]", "#", $Mark_Text);
                 $Mark_Text = str_replace("[pic:xname]", "没有了", $Mark_Text);
                 $Mark_Text = str_replace("[pic:xid]", 0, $Mark_Text);
                 $Mark_Text = str_replace("[pic:xpic]", piclink('pic', ''), $Mark_Text);
             }
         }
         unset($arr);
         //标签加超级连接
         $Mark_Text = str_replace("[pic:tags]", SearchLink($rows['tags']), $Mark_Text);
         //动态人气
         $Mark_Text = str_replace("[pic:hits]", "<script src='" . hitslink('hits/dt/hits/' . $id, 'pic') . "'></script>", $Mark_Text);
         $Mark_Text = str_replace("[pic:yhits]", "<script src='" . hitslink('hits/dt/yhits/' . $id, 'pic') . "'></script>", $Mark_Text);
         $Mark_Text = str_replace("[pic:zhits]", "<script src='" . hitslink('hits/dt/zhits/' . $id, 'pic') . "'></script>", $Mark_Text);
         $Mark_Text = str_replace("[pic:rhits]", "<script src='" . hitslink('hits/dt/rhits/' . $id, 'pic') . "'></script>", $Mark_Text);
         $Mark_Text = str_replace("[pic:dhits]", "<script src='" . hitslink('hits/dt/dhits/' . $id, 'pic') . "'></script>", $Mark_Text);
         $Mark_Text = str_replace("[pic:chits]", "<script src='" . hitslink('hits/dt/chits/' . $id, 'pic') . "'></script>", $Mark_Text);
         //获取当前相册总数
         $pcount = $this->db->query("Select id from " . CS_SqlPrefix . "pic where sid=" . $id . " and hid=0 and yid=0")->num_rows();
         $Mark_Text = str_replace("[pic:count]", $pcount, $Mark_Text);
         //第一张图片
         $rowp = $this->db->query("Select pic,content from " . CS_SqlPrefix . "pic where sid=" . $id . " and hid=0 and yid=0 order by id desc limit 1")->row();
         $pics = $rowp ? $rowp->pic : '';
         $content = $rowp ? $rowp->content : '';
         $Mark_Text = str_replace("[pic:url]", piclink('pic', $pics), $Mark_Text);
         $Mark_Text = str_replace("[pic:content]", $content, $Mark_Text);
         //增加人气
         $Mark_Text = hits_js($Mark_Text, hitslink('hits/ids/' . $id, 'pic'));
         //生成
         write_file(FCPATH . $Htmllink, $Mark_Text);
         echo "&nbsp;<font style=font-size:10pt;>生成相册:<font color=red>" . $row['name'] . "</font>成功:<a href=" . $Htmllinks . " target=_blank>" . $Htmllinks . "</a></font><br/>";
         ob_flush();
         flush();
     }
     if (!empty($ids)) {
         $url = 'javascript:history.back();';
         $str = "&nbsp;&nbsp;<b>全部生成完毕&nbsp;>>>>&nbsp;&nbsp;<a href='" . $url . "'>如果您的 浏览器没有跳转,请点击继续...</a></b>";
     } else {
         $url = site_url('pic/admin/html/show_save') . $uri . '&page=' . ($page + 1);
         $str = "&nbsp;&nbsp;<b>暂停" . Html_StopTime . "秒后继续&nbsp;>>>>&nbsp;&nbsp;<a href='" . $url . "'>如果您的 浏览器没有跳转,请点击继续...</a></b>";
     }
     echo "</br>" . $str . "<script>setTimeout('updatenext();'," . Html_StopTime . "000);function updatenext(){location.href='" . $url . "';}</script>";
 }
예제 #24
0
 public function album($row)
 {
     if ($row) {
         $id = $row['id'];
         $template = $this->load->view('album.html', '', true);
         $pagesize = 50;
         preg_match_all('/{cscms:([\\S]+)\\s+(.*?pagesize=\\"([\\S]+)\\".*?)}([\\s\\S]+?){\\/cscms:\\1}/', $template, $page_arr);
         if (!empty($page_arr) && !empty($page_arr[3][0])) {
             $pagesize = $page_arr[3][0];
         }
         $datacount = $this->db->query("select id from " . CS_SqlPrefix . "dance_topic where yid=0 and singerid=" . $id . "")->num_rows();
         //总数量
         $pagejs = ceil($datacount / $pagesize);
         if ($pagejs == 0) {
             $pagejs = 1;
         }
         for ($i = 1; $i <= $pagejs; $i++) {
             $fids = array('id', 'hits');
             $arr['cid'] = getChild($row['cid']);
             $arr['tags'] = $row['tags'];
             $arr['singerid'] = $id;
             //摧毁部分需要超级链接字段数组
             $rows = $row;
             //先保存数组保留下面使用
             unset($row['tags']);
             foreach ($fids as $fid) {
                 ob_end_flush();
                 //关闭缓存
                 //获取静态路径
                 $Htmllinks = LinkUrl('album', $fid, $row['id'], $i, 'singer');
                 //转换成生成路径
                 $Htmllink = adminhtml($Htmllinks, 'singer');
                 //装载模板并输出
                 $Mark_Text = $this->CsdjTpl->plub_list($row, $id, $fid, $i, $arr, TRUE, 'album.html', 'album', 'singer', $row['name'], $row['name']);
                 //评论
                 $Mark_Text = str_replace("[singer:pl]", get_pl('singer', $id), $Mark_Text);
                 //分类地址、名称
                 $Mark_Text = str_replace("[singer:link]", LinkUrl('show', 'id', $row['id'], 1, 'singer'), $Mark_Text);
                 $Mark_Text = str_replace("[singer:classlink]", LinkUrl('lists', 'id', $row['cid'], 1, 'singer'), $Mark_Text);
                 $Mark_Text = str_replace("[singer:classname]", $this->CsdjDB->getzd('singer_list', 'name', $row['cid']), $Mark_Text);
                 //标签加超级连接
                 $Mark_Text = str_replace("[singer:tags]", SearchLink($rows['tags']), $Mark_Text);
                 //动态人气
                 $Mark_Text = str_replace("[singer:hits]", "<script  src='" . hitslink('hits/dt/hits/' . $id, 'singer') . "'></script>", $Mark_Text);
                 $Mark_Text = str_replace("[singer:yhits]", "<script src='" . hitslink('hits/dt/yhits/' . $id, 'singer') . "'></script>", $Mark_Text);
                 $Mark_Text = str_replace("[singer:zhits]", "<script src='" . hitslink('hits/dt/zhits/' . $id, 'singer') . "'></script>", $Mark_Text);
                 $Mark_Text = str_replace("[singer:rhits]", "<script src='" . hitslink('hits/dt/rhits/' . $id, 'singer') . "'></script>", $Mark_Text);
                 //生成
                 write_file(FCPATH . $Htmllink, $Mark_Text);
                 echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style=font-size:10pt;color:#006600>生成专辑页按《<font color=#0000ff>" . $fid . "</font>》排序,完成:<a href=" . $Htmllinks . " target=_blank>" . $Htmllinks . "</a></font><br/>";
                 ob_flush();
                 flush();
             }
         }
     }
 }