provideo.php 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <?php
  2. include("../config/conn.php");
  3. include("../config/function.php");
  4. require("../config/tpclass.php");
  5. AdminSes_audit();
  6. $bh=$_GET[bh];
  7. $mybh=$_GET[mybh];
  8. while0("*","yjcode_provideo where bh='".$_GET[mybh]."' and probh='".$bh."'");if(!$row=mysql_fetch_array($res)){php_toheader("provideolist.php?bh=".$bh);}
  9. //函数开始
  10. if($_GET[control]=="update"){
  11. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0101,")){Audit_alert("权限不够","default.php");}
  12. zwzr();
  13. if(1==intval($_POST[d1])){$u=$_POST[t2];}else{$u=inp_tp_upload(1,"../upload/".$row[userid]."/".$bh."/",$mybh);if(!empty($u)){$u="../upload/".$row[userid]."/".$bh."/".$u;}}
  14. if(!empty($u)){$ses=",url='".$u."'";}
  15. $iftj=intval($_POST[tiftj]);
  16. if(1==$iftj){updatetable("yjcode_provideo","iftj=0 where probh='".$bh."'");}
  17. updatetable("yjcode_provideo","tit='".sqlzhuru($_POST[ttit])."'".$ses.",iftj=".$iftj.",admin=".$_POST[d1].",zt=".$_POST[Rzt].",gs='".sqlzhuru($_POST[d2])."' where id=".$row[id]);
  18. uploadtpnodata(2,"upload/".$row[userid]."/".$bh."/",$mybh.".jpg","allpic",140,84,0,0,"no");
  19. php_toheader("provideo.php?t=suc&mybh=".$mybh."&bh=".$bh);
  20. }
  21. //函数结果
  22. ?>
  23. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  24. <html xmlns="http://www.w3.org/1999/xhtml">
  25. <head>
  26. <meta http-equiv="x-ua-compatible" content="ie=7" />
  27. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  28. <title><?=webname?>管理系统</title>
  29. <link href="css/basic.css" rel="stylesheet" type="text/css" />
  30. <script type="text/javascript" src="js/jquery.min.js"></script>
  31. <script language="javascript" src="js/basic.js"></script>
  32. <script language="javascript" src="js/layer.js"></script>
  33. <style type="text/css">
  34. .uk{float:left;width:100%;margin-top:10px;text-align:left;}
  35. .uk li{float:left;}
  36. .uk .l1{width:125px;height:38px;text-align:right;font-size:14px;padding:10px 5px 0 0;}
  37. .uk .l2{width:-moz-calc(100% - 130px);width:-webkit-calc(100% - 130px);width:calc(100% - 130px);height:48px;}
  38. .uk .l2 .inp{float:left;height:27px;border:#B6B7C9 solid 1px;border-radius:2px;font-size:14px;padding:9px 0 0 5px;font-family:"Microsoft YaHei",微软雅黑,"MicrosoftJhengHei",华文细黑,STHeiti,MingLiu;background:url(../img/inpbg.gif) left top repeat-x;}
  39. .uk .l2 .redony{background-image:none;background-color:#EAEAEA;}
  40. .uk .l2 .inp1{float:left;font-size:14px;margin:10px 0 0 0;font-family:"Microsoft YaHei",微软雅黑,"MicrosoftJhengHei",华文细黑,STHeiti,MingLiu;}
  41. .uk .l2 .fd{float:left;margin:11px 0 0 10px;}
  42. .uk .l2 label{float:left;cursor:pointer;margin:0 10px 0 0;padding:9px 10px 0 10px;height:25px;background-color:#FCFCFD;border:#B6B7C9 solid 1px;border-radius:5px;font-size:14px;}
  43. .uk .l3{width:888px;padding:0 0 0 130px;height:48px;}
  44. .uk .l3 .btn1{float:left;color:#fff;font-size:14px;font-family:"Microsoft YaHei",微软雅黑,"MicrosoftJhengHei",华文细黑,STHeiti,MingLiu;width:92px;height:38px;cursor:pointer;border:0;background-color:#009688;border-radius:2px;}
  45. .uk .l3 .btn1:hover{background-color:#33AB9F;}
  46. .uk .l3 .btn2{float:left;color:#333;font-size:14px;font-family:"Microsoft YaHei",微软雅黑,"MicrosoftJhengHei",华文细黑,STHeiti,MingLiu;width:90px;height:38px;cursor:pointer;border:#C9C9C9 solid 1px;background-color:#fff;border-radius:2px;margin-left:10px;}
  47. .uk .l3 .btn2:hover{background-color:#F7F7F7;}
  48. .uk .l8{width:130px;text-align:right;height:76px;}
  49. .uk .l9{width:-moz-calc(100% - 130px);width:-webkit-calc(100% - 130px);width:calc(100% - 130px);height:76px;}
  50. @media screen and (-webkit-min-device-pixel-ratio:0) {
  51. .uk .l2 .inp{padding:0 0 0 5px;height:36px;}
  52. }
  53. .uk0{margin-top:0;}
  54. </style>
  55. </head>
  56. <body>
  57. <? if($_GET[t]=="suc"){systs("恭喜您,操作成功![<a href='provideolx.php?bh=".$bh."'>继续添加新视频</a>]","provideo.php?bh=".$bh."&mybh=".$mybh);}?>
  58. <!--B-->
  59. <script language="javascript">
  60. function tj(){
  61. if((document.f1.ttit.value).replace(/\s/,"")==""){alert("请输入标题");document.f1.ttit.focus();return false;}
  62. r=document.getElementsByName("Rzt");rr="";for(i=0;i<r.length;i++){if(r[i].checked==true){rr=r[i].value;}}if(rr==""){alert("请选择审核状态!");return false;}
  63. layer.msg('正在提交', {icon: 16 ,time: 0,shade :0.25});
  64. f1.action="provideo.php?bh=<?=$bh?>&control=update&mybh=<?=$row[bh]?>";
  65. }
  66. function infcha(){
  67. d=parseInt(document.f1.d1.value);
  68. document.getElementById("infout").style.display="none";
  69. document.getElementById("infmy").style.display="none";
  70. if(d==1){document.getElementById("infout").style.display="";}
  71. else if(d==2){document.getElementById("infmy").style.display="";}
  72. }
  73. </script>
  74. <form name="f1" method="post" onsubmit="return tj()" enctype="multipart/form-data">
  75. <input type="hidden" value="video" name="jvs" />
  76. <ul class="uk">
  77. <li class="l1"><span class="red">*</span> 标题:</li>
  78. <li class="l2"><input type="text" size="50" value="<?=$row[tit]?>" class="inp" name="ttit" /> </li>
  79. <li class="l1">视频截图:</li>
  80. <li class="l2"><input type="file" name="inp2" class="inp1" id="inp2" size="25"><span class="fd">最佳尺寸:140*84</span></li>
  81. <li class="l8"></li>
  82. <li class="l9"><img src="<?="../upload/".$row[userid]."/".$bh."/".$mybh.".jpg"?>" width="108" height="65" /></li>
  83. <li class="l1">视频来路:</li>
  84. <li class="l2">
  85. <select name="d1" onchange="infcha()" class="inp">
  86. <option value="1">外部视频地址</option>
  87. <option value="2"<? if(2==$row[admin]){?> selected="selected"<? }?>>自己上传</option>
  88. </select>
  89. <select name="d2" class="inp" style="margin-left:10px;">
  90. <? $arr=array("flv","swf","mp4");for($i=0;$i<count($arr);$i++){?>
  91. <option value="<?=$arr[$i]?>"<? if($arr[$i]==$row[gs]){?> selected="selected"<? }?>><?=$arr[$i]?></option>
  92. <? }?>
  93. </select>
  94. <span class="fd red">注:手机端只支持MP4格式</span>
  95. </li>
  96. </ul>
  97. <ul class="uk uk0" id="infout" style="display:none;">
  98. <li class="l1">视频路径:</li>
  99. <li class="l2"><input value="<?=$row[url]?>" name="t2" class="inp" style="width:500px;" type="text"/></li>
  100. </ul>
  101. <ul class="uk uk0" id="infmy" style="display:none;">
  102. <li class="l1">自己上传:</li>
  103. <li class="l2"><input type="file" name="inp1" id="inp1" size="15" accept=".flv,.swf,.mp4"> </li>
  104. <li class="l1">视频路径:</li>
  105. <li class="l2"><input value="<?=$row[url]?>" readonly="readonly" class="inp redony" size="40" type="text"/><span class="fd">[<a href="<?=$row[url]?>" target="_blank">下载</a>]</span></li>
  106. </ul>
  107. <ul class="uk uk0">
  108. <li class="l1">推荐序号:</li>
  109. <li class="l2">
  110. <select name="tiftj" class="inp">
  111. <option value="1">推荐,即在该商品主页能看到</option>
  112. <option value="0"<? if(0==$row[iftj]){?> selected="selected"<? }?>>不推荐</option>
  113. </select>
  114. </li>
  115. <li class="l1">审核状态:</li>
  116. <li class="l2">
  117. <label><input name="Rzt" type="radio" value="0" <? if(0==$row[zt]){?>checked="checked"<? }?> /> <strong>正常展示</strong></label>
  118. <label><input name="Rzt" type="radio" value="1" <? if(1==$row[zt]){?>checked="checked"<? }?> /> <strong>正在审核</strong></label>
  119. <label><input name="Rzt" type="radio" value="2" <? if(2==$row[zt]){?>checked="checked"<? }?> /> <strong>审核不通过</strong></label>
  120. </li>
  121. <li class="l3"><input type="submit" value="保存修改" class="btn1" /><input type="button" onclick="gourl('provideolist.php?bh=<?=$bh?>')" value="返回列表" class="btn2" /></li>
  122. </ul>
  123. </form>
  124. <!--E-->
  125. <script language="javascript">
  126. infcha();
  127. </script>
  128. </body>
  129. </html>