LinshiController.class.php 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  1. <?php
  2. namespace bibidd\Controller;
  3. use Think\Controller;
  4. class LinshiController extends Controller
  5. {
  6. /**
  7. * 测试功能
  8. * @param $templateid []
  9. * @return $type 消息类型
  10. */
  11. public function testone()
  12. {
  13. $jinri_start_time = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
  14. $jinri_end_time = mktime(0, 0, 0, date('m'), date('d') + 1, date('Y')) - 1;
  15. $zuo_start_time = mktime(0, 0, 0, date('m'), date('d') - 1, date('Y'));
  16. $zuo_end_time = mktime(0, 0, 0, date('m'), date('d'), date('Y')) - 1;
  17. echo PHP_EOL.$jinri_start_time;
  18. echo PHP_EOL.$jinri_end_time;
  19. echo PHP_EOL.$zuo_start_time;
  20. echo PHP_EOL.$zuo_end_time;
  21. echo PHP_EOL."q---9951";
  22. // $yn_ip_yiyou = M("ip_jilasdasu")->where("ip='$ip'")->getField("id");
  23. }
  24. /**
  25. * 修改收藏列表中的内容
  26. * @param $templateid []
  27. * @return $type 消息类型
  28. */
  29. public function save_shoucang_list_type()
  30. {
  31. $shoucang_list = M("video_shoucang")->where("video_type is null")->field("vid")->select();
  32. foreach ($shoucang_list as $key1 => $value1) {
  33. $iid = M("video_shoucang")->where("video_type is null")->getField("vid");
  34. $video_iid = $iid;
  35. $site = M("video_list_test")->where("id=$video_iid")->getField("up");
  36. $shoucang_save['video_type'] = $site;
  37. M("video_shoucang")->where("vid=$video_iid")->save($shoucang_save);
  38. echo PHP_EOL . '11';
  39. }
  40. }
  41. /**
  42. * 修改收藏列表中的内容
  43. * @param $templateid []
  44. * @return $type 消息类型
  45. */
  46. public function save_shoucang_list_type_test(){
  47. $shoucang_list = M("video_shoucang")->where("video_type is null")->field("vid")->group('vid')->select();
  48. echo PHP_EOL.count($shoucang_list);
  49. foreach ($shoucang_list as $key1 => $value1) {
  50. $video_iid = $value1['vid'];
  51. $site = M("video_list_test")->where("id=$video_iid")->getField("site");
  52. $shoucang_save['video_type'] = $site;
  53. M("video_shoucang")->where("vid=$video_iid")->save($shoucang_save);
  54. echo PHP_EOL.'11';
  55. }
  56. }
  57. /**
  58. * 测试功能
  59. * @param $templateid []
  60. * @return $type 消息类型
  61. */
  62. public function select_id_video_url(){
  63. $select_id_vdieo_url = M("upload_videos_list")->where("m3u8_url is not null and top_img is null or top_img=''")->field("id,m3u8_url")->select();
  64. if ($select_id_vdieo_url) {
  65. $data['code'] = '200';
  66. $data['status'] = '1' ;
  67. $data['message'] = 'ok';
  68. $data['data'] = $select_id_vdieo_url;
  69. }else{
  70. $data['code'] = '200';
  71. $data['status'] = '1';
  72. $data['message'] = 'ok';
  73. $data['data'] = "null";
  74. }
  75. echo json_encode($data);
  76. }
  77. /**
  78. * 测试功能
  79. * @param $templateid []
  80. * @return $type 消息类型
  81. */
  82. public function save_id_hesdimg(){
  83. $id = $_POST['id'];
  84. $head_img = $_POST['head_img'];
  85. $wula['top_img'] = $head_img;
  86. $save_yn = M("upload_videos_list")->where("id=$id")->save($wula);
  87. if ($save_yn) {
  88. $data['message'] = 'ok';
  89. $data['id'] = $id;
  90. $data['head_img'] =$head_img;
  91. echo json_encode($data);
  92. }else{
  93. $data['message'] = 'no_save';
  94. $data['id'] = $id;
  95. $data['head_img'] =$head_img;
  96. echo json_encode($data);
  97. }
  98. }
  99. /**
  100. * 版本:
  101. * 新增/更新:
  102. * 简述:
  103. * @param $templateid []
  104. * @return $type 消息类型
  105. */
  106. public function savefield(){
  107. header('Content-Type:text/json;charset=utf-8');
  108. header('Access-Control-Allow-Origin:*');
  109. header("Access-Control-Allow-Headers:token,Origin, X-Requested-With, Content-Type, Accept");
  110. header('Access-Control-Allow-Methods:POST');
  111. header('Access-Control-Expose-Headers:*');
  112. $all_fufei = M("huidiao_test")->group('uid')->select();
  113. foreach ($all_fufei as $key => $value) {
  114. $user_id = $value['uid'];
  115. $user_list[$key]=$value['id'];
  116. echo PHP_EOL.$user_id;
  117. M("user_info")->where("id=$user_id")->setField('vip_money','1');
  118. }
  119. }
  120. /**
  121. * 版本:
  122. * 新增/更新:
  123. * 简述:
  124. * @param $templateid []
  125. * @return $type 消息类型
  126. */
  127. public function save_shoucang_video(){
  128. header('Content-Type:text/json;charset=utf-8');
  129. header('Access-Control-Allow-Origin:*');
  130. header("Access-Control-Allow-Headers:token,Origin, X-Requested-With, Content-Type, Accept");
  131. header('Access-Control-Allow-Methods:POST');
  132. header('Access-Control-Expose-Headers:*');
  133. $all_null = M("video_shoucang")->where(" video_type is null")->field("vid,id")->select();
  134. foreach ($all_null as $key => $value) {
  135. $sid = $value['id'];
  136. $vid = $value['vid'];
  137. $vup = M("video_list_test")->where("id=$vid")->getField("uploader");
  138. M("video_shoucang")->where("id=$sid")->setField('video_type',"$vup");
  139. }
  140. }
  141. /**
  142. * 版本:
  143. * 新增/更新:
  144. * 简述:
  145. * @param $templateid []
  146. * @return $type 消息类型
  147. */
  148. public function oumei_img(){
  149. header('Content-Type:text/json;charset=utf-8');
  150. header('Access-Control-Allow-Origin:*');
  151. header("Access-Control-Allow-Headers:token,Origin, X-Requested-With, Content-Type, Accept");
  152. header('Access-Control-Allow-Methods:POST');
  153. header('Access-Control-Expose-Headers:*');
  154. $oumei_img = M("video_list_test")->where("site='EUA' or site='Anime'")->field("top_img")->select();
  155. foreach ($oumei_img as $key => $value) {
  156. $img_url = $value['top_img'];
  157. echo PHP_EOL.$img_url;
  158. }
  159. }
  160. /**
  161. * 版本:
  162. * 新增/更新:
  163. * 简述:
  164. * @param $templateid []
  165. * @return $type 消息类型
  166. */
  167. public function anime_save_url(){
  168. header('Content-Type:text/json;charset=utf-8');
  169. header('Access-Control-Allow-Origin:*');
  170. header("Access-Control-Allow-Headers:token,Origin, X-Requested-With, Content-Type, Accept");
  171. header('Access-Control-Allow-Methods:POST');
  172. header('Access-Control-Expose-Headers:*');
  173. $anime_list = M("heiliao_haijiao_books")->where("(site_name='色猫资源') and type='动画'")->field("id,hj_video_url,head_img")->select();
  174. foreach ($anime_list as $key => $value) {
  175. $video_url = $value['hj_video_url'];
  176. $img_url = $value['head_img'];
  177. $vid = $value['id'];
  178. $video_url = str_replace('https://www.5uafocvs4xlibumya2.xyz/videos/one/SM/','https://www.w29oeq2xltw5evwp5e4.vip/Anime/',$video_url);
  179. $img_url = str_replace('https://www.5uafocvs4xlibumya2.xyz/videos/img/SM/','https://www.w29oeq2xltw5evwp5e4.vip/Head_img/Anime/',$img_url);
  180. $video_list['hj_video_url']= $video_url;
  181. $video_list['head_img'] =$img_url;
  182. M("heiliao_haijiao_books")->where("id=$vid")->save($video_list);
  183. }
  184. }
  185. /**
  186. * 版本:
  187. * 新增/更新:
  188. * 简述:update oumei video top_img
  189. * @param $templateid []
  190. * @return $type 消息类型
  191. */
  192. public function eua_save_img_url(){
  193. header('Content-Type:text/json;charset=utf-8');
  194. header('Access-Control-Allow-Origin:*');
  195. header("Access-Control-Allow-Headers:token,Origin, X-Requested-With, Content-Type, Accept");
  196. header('Access-Control-Allow-Methods:POST');
  197. header('Access-Control-Expose-Headers:*');
  198. $anime_list = M("video_list_test")->where("uploader='欧美'")->field("top_img,id")->select();
  199. foreach ($anime_list as $key => $value) {
  200. $img_url = $value['top_img'];
  201. $vid = $value['id'];
  202. $img_url = str_replace('https://www.5uafocvs4xlibumya2.xyz/imgs/www','https://www.w29oeq2xltw5evwp5e4.vip/Head_img/EUA',$img_url);
  203. $video_list['top_img'] =$img_url;
  204. M("video_list_test")->where("id=$vid")->save($video_list);
  205. }
  206. }
  207. /**
  208. * 版本:
  209. * 新增/更新:
  210. * 简述:分割后在拼接
  211. * @param $templateid []
  212. * @return $type 消息类型
  213. */
  214. public function update_asian_img_url(){
  215. header('Content-Type:text/json;charset=utf-8');
  216. header('Access-Control-Allow-Origin:*');
  217. header("Access-Control-Allow-Headers:token,Origin, X-Requested-With, Content-Type, Accept");
  218. header('Access-Control-Allow-Methods:POST');
  219. header('Access-Control-Expose-Headers:*');
  220. if (!empty($_POST)){
  221. $Asian_url = M("video_list_test")->where("uploader='亚洲' ")->field("top_img,id")->select();
  222. foreach ($Asian_url as $key => $value) {
  223. $img_url = $value['top_img'];
  224. $vid = $value['id'];
  225. $arr_str_url = explode('/',$img_url);
  226. $new_url['top_img'] = "https://www.bxdva5aa9xlbuvm863.top/Asian/img/".end($arr_str_url);
  227. echo PHP_EOL.$new_url['top_img'];
  228. M("video_list_test")->where("id=$vid")->save($new_url);
  229. }
  230. }else{
  231. echo $this->returnData();
  232. }
  233. }
  234. protected function returnData()
  235. {
  236. header('Content-Type:text/json;charset=utf-8');
  237. header('Access-Control-Allow-Origin:*');
  238. header("Access-Control-Allow-Headers:token,Origin, X-Requested-With, Content-Type, Accept");
  239. header('Access-Control-Allow-Methods:POST');
  240. header('Access-Control-Expose-Headers:*');
  241. $data['status'] = '0';
  242. $data['code'] = '202';//未携带参数,请求失败
  243. $data['message'] = 'error';
  244. echo json_encode($data);
  245. }
  246. /**
  247. * 版本:
  248. * 新增/更新:
  249. * 简述:
  250. * @param $templateid []
  251. * @return $type 消息类型
  252. */
  253. public function Asian_video_quchong(){
  254. header('Content-Type:text/json;charset=utf-8');
  255. header('Access-Control-Allow-Origin:*');
  256. header("Access-Control-Allow-Headers:token,Origin, X-Requested-With, Content-Type, Accept");
  257. header('Access-Control-Allow-Methods:POST');
  258. $wula_list = M("video_info_test")->where("site='Asian'")->field("video_url")->select();
  259. $video_path = array();
  260. foreach ($wula_list as $key => $value) {
  261. $url_show = $value['video_url'];
  262. $arr_str_url = explode('/',$url_show);
  263. // $secondToLastElement = end(array_slice($arr_str_url, -2, 1));
  264. // echo PHP_EOL.$secondToLastElement;
  265. // echo PHP_EOL.$secondToLastElement;
  266. // array_push($video_path,$secondToLastElement);
  267. // array_push($video_path,$secondToLastElement);
  268. }
  269. // echo PHP_EOL.count($video_path);
  270. // $video_path = array_unique($video_path);
  271. // echo PHP_EOL.count($video_path);
  272. }
  273. /**
  274. * 版本:
  275. * 新增/更新:
  276. * 简述:
  277. * @param $templateid []
  278. * @return $type 消息类型
  279. */
  280. public function save_video_info_url(){
  281. header('Content-Type:text/json;charset=utf-8');
  282. header('Access-Control-Allow-Origin:*');
  283. header("Access-Control-Allow-Headers:token,Origin, X-Requested-With, Content-Type, Accept");
  284. header('Access-Control-Allow-Methods:POST');
  285. header('Access-Control-Expose-Headers:*');
  286. if (!empty($_POST)){
  287. $Asian_video_list = M("video_info_test")->where("site='Asian'")->field("video_url,video_id")->select();
  288. foreach ($Asian_video_list as $key => $value) {
  289. $v_id = $value['video_id'];
  290. $v_url = $value['video_url'];
  291. // echo PHP_EOL.$v_url;
  292. $arr_str_url = explode('/',$v_url);
  293. // $secondToLastElement = end(array_slice($arr_str_url, -2, 1));
  294. // $new_url ='https://www.w29oeq2xltw5evwp5e4.vip/Asian/'.$secondToLastElement.'/'.$secondToLastElement.'.'."m3u8";
  295. // echo PHP_EOL.$new_url;
  296. // $sav_url_list['video_url'] = $new_url;
  297. // M("video_info_test")->where("video_id=$v_id")->save($sav_url_list);
  298. }
  299. }else{
  300. echo $this->returnData();
  301. }
  302. }
  303. /**
  304. * 版本:
  305. * 新增/更新:
  306. * 简述:
  307. * @param $templateid []
  308. * @return $type 消息类型
  309. */
  310. public function save_asian_tpo_img_seven(){
  311. header('Content-Type:text/json;charset=utf-8');
  312. header('Access-Control-Allow-Origin:*');
  313. header("Access-Control-Allow-Headers:token,Origin, X-Requested-With, Content-Type, Accept");
  314. header('Access-Control-Allow-Methods:POST');
  315. header('Access-Control-Expose-Headers:*');
  316. if (!empty($_POST)){
  317. $now_top_img_list = M("video_list_test")->where("top_img like '%https://www.bxdva5aa9xlbuvm863.top/Asian/img/%'")->field("top_img,id")->select();
  318. foreach ($now_top_img_list as $key => $value) {
  319. # code...
  320. $id= $value['id'];
  321. $tip_img = $value['top_img'];
  322. $tip_img = str_replace('https://www.bxdva5aa9xlbuvm863.top/Asian/img/',"https://www.w29oeq2xltw5evwp5e4.vip/Head_img/Asian/",$tip_img);
  323. $save_img_new['top_img']= $tip_img;
  324. echo PHP_EOL.$tip_img;
  325. M("video_list_test")->where("id=$id")->save($save_img_new);
  326. }
  327. }else{
  328. echo $this->returnData();
  329. }
  330. }
  331. /**
  332. * 版本:
  333. * 新增/更新:
  334. * 简述:意见反馈
  335. * @param $templateid []
  336. * @return $type 消息类型
  337. */
  338. public function save_fankui_user_info(){
  339. header('Content-Type:text/json;charset=utf-8');
  340. header('Access-Control-Allow-Origin:*');
  341. header("Access-Control-Allow-Headers:token,Origin, X-Requested-With, Content-Type, Accept");
  342. header('Access-Control-Allow-Methods:POST');
  343. header('Access-Control-Expose-Headers:*');
  344. $user_info = M("user_fankui")->where("id>0")->field("uid")->select();
  345. foreach ($user_info as $key => $value) {
  346. $uid = $value['uid'];
  347. $add_time_chuo = M("user_info")->where("id=$uid")->getField("add_time");;
  348. $add_list['zhuce_time'] = date("Y-m-d H:i:s",$add_time_chuo);
  349. $add_list['user_name'] =M("user_info")->where("id=$uid")->getField("name");;
  350. M("user_fankui")->where("uid=$uid")->save($add_list);
  351. }
  352. }
  353. //VIP(12个)(11个横图,1个竖图)
  354. //——黑料吃瓜,海角乱伦,麻豆传媒,探花大神,明星换脸,福利姬,SM调教,大尺度综艺,玩偶姐姐,SWAG,户外车震,雪白美乳(竖图)
  355. //
  356. //金币(9个)(4个横图,4个竖图,1个小说)
  357. //——网爆门,AV解说,厕所偷拍,抄底偷拍,粉嫩少女(竖图),顶臀街射(竖图),另类猎奇(竖图),素人反差(竖图),色情小说,
  358. /**
  359. * 版本:1.8
  360. * 新增/更新:
  361. * 简述:修改video_info 表中videoUrl
  362. * @param $templateid []
  363. * @return $type 消息类型
  364. */
  365. public function save_info_test_url(){
  366. header('Content-Type:text/json;charset=utf-8');
  367. header('Access-Control-Allow-Origin:*');
  368. header("Access-Control-Allow-Headers:token,Origin, X-Requested-With, Content-Type, Accept");
  369. header('Access-Control-Allow-Methods:POST');
  370. header('Access-Control-Expose-Headers:*');
  371. if (!empty($_POST)){
  372. $now_top_img_list = M("video_info_test")->where("video_id>0 and video_url_three is null")->field("video_url,video_id")->select();
  373. foreach ($now_top_img_list as $key => $value) {
  374. # code...
  375. $id= $value['video_id'];
  376. $vidoe_url = $value['video_url'];
  377. $tip_img = str_replace('https://www.w29oeq2xltw5evwp5e4.vip',"https://9vdpqph4cqjard6e.xyz",$vidoe_url);
  378. $save_img_new['video_url_three']= $tip_img;
  379. echo PHP_EOL.$tip_img;
  380. M("video_info_test")->where("video_id=$id")->save($save_img_new);
  381. }
  382. }else{
  383. echo $this->returnData();
  384. }
  385. }
  386. /**
  387. * 版本:1.8
  388. * 新增/更新:
  389. * 简述:修改video_info 表中videoUrl
  390. * @param $templateid []
  391. * @return $type 消息类型
  392. */
  393. public function save_books_test_url(){
  394. header('Content-Type:text/json;charset=utf-8');
  395. header('Access-Control-Allow-Origin:*');
  396. header("Access-Control-Allow-Headers:token,Origin, X-Requested-With, Content-Type, Accept");
  397. header('Access-Control-Allow-Methods:POST');
  398. header('Access-Control-Expose-Headers:*');
  399. if (!empty($_POST)){
  400. $now_top_img_list = M("heiliao_haijiao_books")->where("id>0 and hj_video_url_two is null and hj_video_url !=''")->field("hj_video_url,id")->select();
  401. foreach ($now_top_img_list as $key => $value) {
  402. # code...
  403. $id= $value['id'];
  404. $vidoe_url = $value['hj_video_url'];
  405. $tip_img = str_replace('https://www.5uafocvs4xlibumya2.xyz',"https://fwpwxhtrtmp7rmr6.xyz",$vidoe_url);
  406. $save_img_new['hj_video_url_two']= $tip_img;
  407. echo PHP_EOL.$tip_img;
  408. M("heiliao_haijiao_books")->where("id=$id")->save($save_img_new);
  409. }
  410. }else{
  411. echo $this->returnData();
  412. }
  413. }
  414. /**
  415. * 版本:
  416. * 新增/更新:
  417. * 简述:
  418. * @param $templateid []
  419. * @return $type 消息类型
  420. */
  421. public function Anime_video_url_save(){
  422. header('Content-Type:text/json;charset=utf-8');
  423. header('Access-Control-Allow-Origin:*');
  424. header("Access-Control-Allow-Headers:token,Origin, X-Requested-With, Content-Type, Accept");
  425. header('Access-Control-Allow-Methods:POST');
  426. header('Access-Control-Expose-Headers:*');
  427. if (!empty($_POST)){
  428. $anime_list_show = M("video_list_test")->where("uploader='动漫'")->field("id")->select();
  429. $you_id = 0;
  430. $meiyou_id = 0;
  431. foreach ($anime_list_show as $key => $value) {
  432. $id = $value['id'];
  433. $yn_info = M("video_info_test")->where("video_id=$id")->select();
  434. if ($yn_info){
  435. echo PHP_EOL."有:".$id;
  436. $you_id+=1;
  437. }else{
  438. echo PHP_EOL."没有:".$id;
  439. $meiyou_id+=1;
  440. $info_anime_list['video_id']=$id;
  441. $info_anime_list['site']="Anime";
  442. M("video_info_test")->add($info_anime_list);
  443. }
  444. echo PHP_EOL.$you_id;
  445. echo PHP_EOL.$meiyou_id;
  446. }
  447. }else{
  448. echo $this->returnData();
  449. }
  450. }
  451. /**
  452. * 版本:
  453. * 新增/更新:
  454. * 简述:
  455. * @param $templateid []
  456. * @return $type 消息类型
  457. */
  458. public function update_anime_url_new(){
  459. header('Content-Type:text/json;charset=utf-8');
  460. header('Access-Control-Allow-Origin:*');
  461. header("Access-Control-Allow-Headers:token,Origin, X-Requested-With, Content-Type, Accept");
  462. header('Access-Control-Allow-Methods:POST');
  463. header('Access-Control-Expose-Headers:*');
  464. if (!empty($_POST)){
  465. $null_anime = M("heiliao_haijiao_books")->where("site_name='色猫资源' and type='动画' ")->field("id,hj_video_url")->select();
  466. foreach ($null_anime as $key => $value) {
  467. $id = $value['id'];
  468. $anime_url = $value['hj_video_url'];
  469. $yn_info = M("video_info_test")->where("video_id=$id")->select();
  470. $anime_url_list['video_url'] = $anime_url;
  471. M("video_info_test")->where("video_id=$id")->save($anime_url_list);
  472. }
  473. }else{
  474. echo $this->returnData();
  475. }
  476. }
  477. /**
  478. * 版本:
  479. * 新增/更新:
  480. * 简述:
  481. * @param $templateid []
  482. * @return $type 消息类型
  483. */
  484. public function php_show_v(){
  485. header('Content-Type:text/json;charset=utf-8');
  486. header('Access-Control-Allow-Origin:*');
  487. header("Access-Control-Allow-Headers:token,Origin, X-Requested-With, Content-Type, Accept");
  488. header('Access-Control-Allow-Methods:POST');
  489. header('Access-Control-Expose-Headers:*');
  490. phpinfo();
  491. }
  492. /**
  493. * 版本:
  494. * 新增/更新:
  495. * 简述:动漫
  496. * @param $templateid []
  497. * @return $type 消息类型
  498. */
  499. public function save_free_img_head(){
  500. header('Content-Type:text/json;charset=utf-8');
  501. header('Access-Control-Allow-Origin:*');
  502. header("Access-Control-Allow-Headers:token,Origin, X-Requested-With, Content-Type, Accept");
  503. header('Access-Control-Allow-Methods:POST');
  504. header('Access-Control-Expose-Headers:*');
  505. if (!empty($_POST)){
  506. $anime_list = M("video_list_test")->where("top_img like '%ideos/one/FC/i%'")->field("top_img,id")->select();
  507. foreach ($anime_list as $key => $value) {
  508. $img_top = $value['top_img'];
  509. $id = $value['id'];
  510. echo PHP_EOL.$img_top;
  511. $replacementBase = 'https://static.9169kkxstzsjkdd222.app/static/Head_img/FC/';
  512. $modifiedUrl = preg_replace('/https:\/\/www\.5uafocvs4xlibumya2\.xyz\/videos\/one\/FC\/img\/\d{4}-\d{2}-\d{2}\//', $replacementBase, $img_top);
  513. // 打印修改后的URL
  514. // echo $modifiedUrl . "\n";
  515. echo PHP_EOL.$modifiedUrl;
  516. $img_savelist['top_img']=$modifiedUrl;
  517. M("video_list_test")->where("id=$id")->save($img_savelist);
  518. }
  519. }else{
  520. echo $this->returnData();
  521. }
  522. }
  523. /**
  524. * 版本:
  525. * 新增/更新:
  526. * 简述:
  527. * @param $templateid []
  528. * @return $type 消息类型
  529. */
  530. public function save_list_str_log(){
  531. header('Content-Type:text/json;charset=utf-8');
  532. header('Access-Control-Allow-Origin:*');
  533. header("Access-Control-Allow-Headers:token,Origin, X-Requested-With, Content-Type, Accept");
  534. header('Access-Control-Allow-Methods:POST');
  535. header('Access-Control-Expose-Headers:*');
  536. $all_list = M("heiliao_haijiao_books")->where("book_type in ('FC','超模','超爽')")->field("id,book_str,book_str_two,book_str_three")->select();
  537. foreach ($all_list as $key => $value) {
  538. $id = $value['id'];
  539. $url_str = $value['book_str'];
  540. $str_two =str_replace('www.5uafocvs4xlibumya2.xyz','45diuo2303flkja012mfg.xyz',$url_str);
  541. $str_three =str_replace('www.5uafocvs4xlibumya2.xyz','fwpwxhtrtmp7rmr6.xyz',$url_str);
  542. echo PHP_EOL.$str_two;
  543. echo PHP_EOL.$str_three;
  544. $wula_two['book_str_two'] = $str_two;
  545. $wula_two['book_str_three'] = $str_three;
  546. M("heiliao_haijiao_books")->where("id=$id")->save($wula_two);
  547. echo PHP_EOL.$id;
  548. echo PHP_EOL.$url_str;
  549. }
  550. }
  551. /**
  552. * 版本:
  553. * 新增/更新:
  554. * 简述:
  555. * @param $templateid []
  556. * @return $type 消息类型
  557. */
  558. public function test_niubi(){
  559. header('Content-Type:text/json;charset=utf-8');
  560. header('Access-Control-Allow-Origin:*');
  561. header("Access-Control-Allow-Headers:token,Origin, X-Requested-With, Content-Type, Accept");
  562. header('Access-Control-Allow-Methods:POST');
  563. header('Access-Control-Expose-Headers:*');
  564. $video_list = M("upload_videos_list")->field("url_path,top_img",true)->where("uploader='牛逼' && type=2")->order("id desc")->select();
  565. }
  566. }
  567. ?>