コード例 #1
0
 public function get_remark()
 {
     if (empty($_POST['remark'])) {
         return get_replace_html(trim($_POST['content']), 0, 100, 'utf-8', false);
     } else {
         return trim($_POST['remark']);
     }
 }
コード例 #2
0
views/images/nophoto.jpg'" src="<?php 
            echo $video["picurl"];
            ?>
" alt="<?php 
            echo $video["title"];
            ?>
"/></a>
                        <a href="<?php 
            echo $video["readurl"];
            ?>
" class="title" target="_blank"><?php 
            echo $video["title"];
            ?>
</a>
                        <p class="title1"><?php 
            echo get_actor_url(get_replace_html($video["actor"], 0, 10));
            ?>
</p>
                    </li><?php 
        }
    }
} else {
    echo "";
}
unset($__LIST__);
unset($tag);
?>
   
                    
                    
                </ul>
コード例 #3
0
<a href="<?php 
            echo $gxcms["videourl"];
            ?>
" target="_blank"><?php 
            echo get_color_title(get_replace_html($gxcms['title'], 0, 30), $gxcms['color']);
            ?>
</a> <?php 
            echo get_replace_html($gxcms["intro"], 0, 30);
            if (!empty($gxcms['picurl'])) {
                if (get_replace_html($gxcms['picurl'], 0, 7) == 'fail://') {
                    ?>
<img src="./views/images/admin/break.jpg"  title="图片下载失败"/><?php 
                } else {
                    ?>
<a href="javascript:void(0)" onclick="Imgshow('<?php 
                    echo get_replace_html($gxcms["title"], 0, 12);
                    ?>
','<?php 
                    echo get_img_url($gxcms["picurl"]);
                    ?>
');"><img src="./views/images/admin/pic.jpg" /></a><?php 
                }
            }
            ?>
<sup id="serial_<?php 
            echo $gxcms["id"];
            ?>
" title="连载集数"><?php 
            if (!empty($gxcms['serial'])) {
                echo $gxcms["serial"];
            }
コード例 #4
0
                        echo "";
                    } else {
                        foreach ($__LIST__ as $key => $video) {
                            ++$i;
                            $mod = $i % 2;
                            ?>
<tr>
                <td align="center"><?php 
                            echo $i;
                            ?>
</td>
                <td class="name"><a href="<?php 
                            echo $video["readurl"];
                            ?>
" target="_blank"><?php 
                            echo get_replace_html($video["title"], 0, 9);
                            ?>
</a></td>
                <td align="center"><?php 
                            echo number_format($video["hits"]);
                            ?>
</td>
                <td align="center" class="score"><?php 
                            echo $video["score"];
                            ?>
</td>
                <td><?php 
                            echo get_color_date('Y-m-d', $video["addtime"]);
                            ?>
</td>
              </tr>
コード例 #5
0
 /**
  * 检测
  * @param $url
  * @param $html
  * @return false 不更新; add 新增;id 更新;status 相似
  */
 function UpCheck($url, &$html, $nid)
 {
     if (empty($html['title']) || empty($html['playurl'])) {
         $this->error = '影片名称或播放地址为空!';
         return false;
     }
     //过滤常规重复字符
     $html['title'] = str_replace(array('HD', 'BD', 'DVD', 'VCD', 'TS', '【完结】', '【】', '[]', '()'), '', $html['title']);
     $html['actor'] = str_replace(array(',', '/', ',', '|', '、'), ' ', $html['actor']);
     $html['director'] = str_replace(array(',', '/', ',', '|', '、'), ' ', $html['director']);
     //检测video库中是否已含有该源链接的影片
     $ArrUrl = $this->VdoDB->field('id,title,playurl,inputer,reurl')->where("reurl='" . $url . "'")->find();
     if (!$ArrUrl) {
         //若没有相同源链接影片,则检测影片名称
         $ArrTitle = $this->VdoDB->field('id,title,actor,playurl,inputer,reurl')->where("title='" . $html['title'] . "'")->find();
         if ($ArrTitle) {
             if ($this->InfoCheck($html, $ArrTitle)) {
                 if ($this->BaseCheck($ArrTitle, $html)) {
                     return $ArrTitle['id'];
                 }
                 return false;
             }
         }
         //无来源,无同名,不是同一个采集项目时,检测相似
         if (C('web_collect_num')) {
             $len = ceil(strlen($html['title']) / 3) - intval(C('web_collect_num'));
             if ($len >= 2) {
                 $like = get_replace_html($html['title'], 0, $len);
                 $where['title'] = array('like', '%' . $like . '%');
                 $ArrLike = $this->VdoDB->field('id,title,inputer,playurl,actor')->where($where)->find();
                 //主演完全相同则更新
                 if (!empty($html['actor']) && !empty($ArrLike['actor'])) {
                     //对比
                     $arr_actor_1 = explode(' ', $html['actor']);
                     $arr_actor_2 = explode(' ', str_replace(array(',', '/', ',', '|', '、'), ' ', $ArrLike['actor']));
                     if (!array_diff($arr_actor_1, $arr_actor_2) && !array_diff($arr_actor_2, $arr_actor_1)) {
                         //若差集为空
                         if ($this->BaseCheck($ArrLike, $html)) {
                             return $ArrLike['id'];
                         }
                     }
                     //主演不完全相同则添加
                 }
                 if ($ArrLike && $ArrLike['inputer'] != 'custom_' . $nid) {
                     return 'status';
                 }
                 return 'add';
             }
         }
         return 'add';
     } else {
         if ($this->BaseCheck($ArrUrl, $html)) {
             return $ArrUrl['id'];
         }
         return false;
     }
 }
コード例 #6
0
 /**
  * 采集影片入库
  * @param array   $vod  新采集数据
  * @param boolean $must 是否强制更新
  */
 public function xml_insert($vod, $must)
 {
     if (empty($vod['title']) || empty($vod['playurl'])) {
         return '影片名称或播放地址为空,不做处理!';
     }
     //未入库标识
     if (!$vod['cid']) {
         //$vod['cid'] = 999;
         return '未匹配到对应栏目分类,不做处理!';
     }
     //过滤常规重复字符
     $vod['title'] = str_replace(array('HD', 'BD', 'DVD', 'VCD', 'TS', '【完结】', '【】', '[]', '()'), '', $vod['title']);
     $vod['actor'] = str_replace(array(',', '/', ',', '|', '、'), ' ', $vod['actor']);
     $vod['director'] = str_replace(array(',', '/', ',', '|', '、'), ' ', $vod['director']);
     //入库开始
     unset($vod['id']);
     $array = $this->VdoDB->field('id,cid,title,inputer,playurl')->where('reurl="' . $vod['reurl'] . '"')->find();
     if ($array) {
         //有来源.检测影片地址是否发生变化
         return $this->xml_update($vod, $array, $must);
     } else {
         //无来源.检测是否有相同影片(需防止同名的电影与电视冲突)
         $array = $this->VdoDB->field('id,cid,title,intro,actor,inputer,playurl')->where('title="' . $vod['title'] . '"')->find();
         if ($array) {
             //无主演时直接更新该影片
             if (empty($vod['actor'])) {
                 return $this->xml_update($vod, $array, $must);
             }
             //演员完全相等时更新该影片
             if ($array['actor'] == $vod['actor']) {
                 return $this->xml_update($vod, $array, $must);
             }
             //有相同演员时更新该影片
             $arr_actor_1 = explode(' ', $vod['actor']);
             $arr_actor_2 = explode(' ', str_replace(array(',', '/', ',', '|', '、'), ' ', $array['actor']));
             if (array_intersect($arr_actor_1, $arr_actor_2)) {
                 return $this->xml_update($vod, $array, $must);
             }
         }
         //其它条件将新加影片,添加前做相似条件判断
         if (C('web_collect_num')) {
             $length = ceil(strlen($vod['title']) / 3) - intval(C('web_collect_num'));
             if ($length >= 2) {
                 $where['title'] = array('like', '%' . get_replace_html($vod['title'], 0, $length) . '%');
                 $array = $this->VdoDB->field('id,title,inputer,actor,playurl')->where($where)->find();
                 //主演完全相同则更新
                 if (!empty($array['actor']) && !empty($vod['actor'])) {
                     //对比
                     $arr_actor_1 = explode(' ', $vod['actor']);
                     $arr_actor_2 = explode(' ', str_replace(array(',', '/', ',', '|', '、'), ' ', $array['actor']));
                     if (!array_diff($arr_actor_1, $arr_actor_2) && !array_diff($arr_actor_2, $arr_actor_1)) {
                         //若差集为空
                         return $this->xml_update($vod, $array, $must);
                     }
                     //主演不完全相同则添加
                 }
                 if (!in_array($vod['inputer'], $array) && $array) {
                     //inputer不同则隐藏
                     $vod['status'] = -1;
                 }
             }
         }
         //添加影片开始
         if (C('upload_http')) {
             $down = D('Down');
             $vod['picurl'] = $down->down_img($vod['picurl']);
         }
         $this->VdoDB->data($vod)->add();
         return '视频添加成功!';
     }
 }
コード例 #7
0
      <ul id="items"><?php 
    if (is_array(C("web_admin_nav"))) {
        $i = 0;
        $__LIST__ = C("web_admin_nav");
        if (count($__LIST__) == 0) {
            echo "";
        } else {
            foreach ($__LIST__ as $key => $gxcms) {
                ++$i;
                $mod = $i % 2;
                ?>
<li><a href="<?php 
                echo $gxcms;
                ?>
" ><?php 
                echo get_replace_html($key, 0, 10);
                ?>
</a></li><?php 
            }
        }
    } else {
        echo "";
    }
    ?>
</ul>
    </dd>
  </dl><?php 
}
?>
</div>
<script language="javascript">
コード例 #8
0
ファイル: XmlzyModel.class.php プロジェクト: skygunner/ekucms
 /**
  * 采集影片入库
  * @param array   $vod  新采集数据
  * @param boolean $must 是否强制更新
  */
 public function xml_insert($vod, $must)
 {
     if (empty($vod['title']) || empty($vod['playurl'])) {
         return '影片名称或播放地址为空,不做处理!';
     }
     //未入库标识
     if (!$vod['cid']) {
         //$vod['cid'] = 999;
         return '未匹配到对应栏目分类,不做处理!';
     }
     //过滤常规重复字符
     $vod['title'] = str_replace(array('HD', 'BD', 'DVD', 'VCD', 'TS', '【完结】', '【】', '[]', '()'), '', $vod['title']);
     $vod['actor'] = str_replace(array(',', '/', ',', '|', '、'), ' ', $vod['actor']);
     $vod['director'] = str_replace(array(',', '/', ',', '|', '、'), ' ', $vod['director']);
     //入库开始
     unset($vod['id']);
     $array = $this->VdoDB->field('id,cid,title,inputer,playurl,vodplay,serial')->where('reurl="' . $vod['reurl'] . '"')->find();
     if ($array) {
         //有来源.检测影片地址是否发生变化
         return $this->xml_update($vod, $array, $must);
     } else {
         //无来源.检测是否有相同影片(需防止同名的电影与电视冲突)
         $array = $this->VdoDB->field('id,cid,title,intro,actor,inputer,playurl,vodplay,serial')->where('title="' . $vod['title'] . '"')->find();
         if ($array) {
             //无主演时直接更新该影片
             if (empty($vod['actor'])) {
                 return $this->xml_update($vod, $array, $must);
             }
             //演员完全相等时更新该影片
             if ($array['actor'] == $vod['actor']) {
                 return $this->xml_update($vod, $array, $must);
             }
             //有相同演员时更新该影片
             $arr_actor_1 = explode(' ', $vod['actor']);
             $arr_actor_2 = explode(' ', str_replace(array(',', '/', ',', '|', '、'), ' ', $array['actor']));
             if (array_intersect($arr_actor_1, $arr_actor_2)) {
                 return $this->xml_update($vod, $array, $must);
             }
         }
         //其它条件将新加影片,添加前做相似条件判断
         if (C('web_collect_num')) {
             $length = ceil(strlen($vod['title']) / 3) - intval(C('web_collect_num'));
             if ($length >= 2) {
                 $where['title'] = array('like', '%' . get_replace_html($vod['title'], 0, $length) . '%');
                 $array = $this->VdoDB->field('id,title,inputer,actor,playurl,vodplay')->where($where)->find();
                 //主演完全相同则更新
                 if (!empty($array['actor']) && !empty($vod['actor'])) {
                     //对比
                     $arr_actor_1 = explode(' ', $vod['actor']);
                     $arr_actor_2 = explode(' ', str_replace(array(',', '/', ',', '|', '、'), ' ', $array['actor']));
                     if (!array_diff($arr_actor_1, $arr_actor_2) && !array_diff($arr_actor_2, $arr_actor_1)) {
                         //若差集为空
                         return $this->xml_update($vod, $array, $must);
                     }
                     //主演不完全相同则添加
                 }
                 if (!in_array($vod['inputer'], $array) && $array) {
                     //inputer不同则隐藏
                     $vod['status'] = -1;
                 }
             }
         }
         //添加影片开始
         if (C('upload_http')) {
             $down = D('Down');
             $vod['picurl'] = $down->down_img($vod['picurl']);
         }
         $vod['vodplay'] = 'baidu';
         //伪原创
         $m = D('Admin.Wei');
         $lists = $m->replacelists();
         if ($lists) {
             foreach ($lists as $v) {
                 $vod['content'] = str_replace($v['firstkey'], $v['endkey'], $vod['content']);
             }
         }
         //内链关键词替换
         $lists = $m->lists();
         if ($lists) {
             foreach ($lists as $v) {
                 $vod['content'] = preg_replace('/(<a.*?>\\s*)(' . $v['name'] . ')(\\s*<\\/a>)/sui', '${2}', $vod['content']);
                 $vod['content'] = str_replace($v['name'], '<a href="' . $v['link'] . '" target="' . $v['target'] . '">' . $v['name'] . '</a>', $vod['content']);
             }
         }
         $this->VdoDB->data($vod)->add();
         return '视频添加成功!';
     }
 }
コード例 #9
0
$tag['order'] = 'type asc,oid desc';
$__LIST__ = get_tag_gxcms($tag);
if (is_array($__LIST__)) {
    $i = 0;
    if (count($__LIST__) == 0) {
        echo "";
    } else {
        foreach ($__LIST__ as $key => $link) {
            ++$i;
            $mod = $i % 2;
            ?>
<a href="<?php 
            echo $link["url"];
            ?>
" target="_blank"><?php 
            echo get_replace_html($link["title"], 0, 8);
            ?>
</a><?php 
        }
    }
} else {
    echo "";
}
unset($__LIST__);
unset($tag);
?>
            <div class="clear"></div>
        </div>
    </div>
    </div>
    <!--友情链接 结束-->