PHP發佈面,裏面的圖片上傳框,怎麼修改樣式那,那位熱心的朋友幫個忙

<!--
EOT;
if($AllowPicNum<1)unset($listdb);
$detail=explode(",",$webdb[group_UpPhoto].',3,4');
if($webdb[group_UpPhoto]&&!in_array($groupdb['gid'],$detail))$none='none;';
$i=0;
foreach($listdb AS $key=>$rs){
$i++;
print <<<EOT
-->
名稱:
                    <input type="text" name="titledb[$i]" size="10" value="$rs[name]">
                    地址:
                    <input type="text" name="photodb[$i]" size="30" id="out_url$i" value="$rs[imgurl]">
                    <input type="file" name="local_file$i" id="in_url$i" style="display:none;">
                    <input type="radio" name="ftype[$i]" value="out" checked onclick="choosef($i,'out')">
     
     
     
                    網絡文件 <span style="display:$none;">
                    <input type="radio" name="ftype[$i]" value="in" onclick="choosef($i,'in')">
                    本地文件 </span>
     
                    <input type="hidden" name="piddb[$i]" value="$key">
                    <br>
                    <!--
EOT;
}print <<<EOT
-->
                    <div id='input$i'></div>
                    <script>
totalnum=$i;
limitnum=$AllowPicNum;
function showinput(){
 if(totalnum>(limitnum-1)){
  alert("你最多隻能上"+limitnum+"傳張圖片!");
  return ;
 }
 var str='';
 var divid='input'+totalnum;
 var num=2;
 num=document.FORM.nums.value;
 for(var i=1;i<=num;i++){
  totalnum=totalnum+i;
  str+='名稱: <input type="text" name="titledb['+totalnum+']" size="10"> 地址: <input type="text" name=photodb['+totalnum+'] size="30" id="out_url'+totalnum+'"> <input type="file" name="local_file'+totalnum+'" id="in_url'+totalnum+'" style="display:none;"> <input type="radio" name="ftype['+totalnum+']" value="out" checked onclick="choosef('+totalnum+',\'out\')"> 網絡文件 <span style="display:$none;"><input type="radio" name="ftype['+totalnum+']" value="in" onclick="choosef('+totalnum+',\'in\')"> 本地文件</span><br>';
 }
 document.getElementById(divid).innerHTML=str+"<div id='input"+totalnum+"'></div>";
}
</script>
<input type="hidden" size="3" name="nums" value="1">javascript

上面爲原樣式php

我想修改爲下面的樣子,如何下手那java

<td align='right'>圖片測試:<br></td> <td > <script type="text/javascript" src="$webdb[www_url]/images/default/jquery-1.2.6.min.js"></script>
        <script type="text/javascript" src="$webdb[www_url]/images/default/swfobject.js"></script>
        <div id="sapload"></div>
        <script type="text/javascript">
 var so = new SWFObject("$webdb[www_url]/images/default/uploadmore.swf", "sapload", "450", "30", "9", "#ffffff");
 so.addParam('wmode','transparent');
 so.addVariable('config','$webdb[www_url]/do/swfuploadxml.php?filetype=jpg,png,gif');
 so.write("sapload");
 var titledb = new Array();
 var urldb = new Array();
 
 function showFiles(t){
  totalnum=totalnum_my_303;
  showinput_my_303();
  arr=t.split('|');
  urldb[totalnum]=arr[0];
  arr2=arr[1].split('.');
  titledb[totalnum]=arr2[0];
  for(var i=0;i<=totalnum;i++){
   if(document.getElementById("atc_my_303_url"+i)!=null){
    if(urldb[i]!=undefined){
     document.getElementById("atc_my_303_url"+i).value=urldb[i];
     document.getElementById("atc_my_303_name"+i).value=titledb[i];
    }
   }
  }
 }
 </script>
<!--
EOT;
$num=count($rsdb[my_303][url]);
$job=='postnew' && $num=0;
for( $i=0; $i<$num ;$i++ ){print <<<EOT
-->jquery


 <span id=span$i>名稱: <input type="text" name="postdb[my_303][name][]" id="atc_my_303_name$i" size="15" value="{$rsdb[my_303][name][$i]}">  
 地址:  
                    <input type="text" name="postdb[my_303][url][]" id="atc_my_303_url$i" size="30" value="{$rsdb[my_303][url][$i]}"> 
                    [<a href='javascript:' onClick='window.open("$webdb[www_url]/do/upfile.php?fn=upfile_my_303&dir=$_pre$fid&label=$i","","width=350,height=50,top=200,left=400")'><font color="#FF0000">點擊更換圖片</font></a>]  [<A HREF="javascript:delpic('$i')">移除</A>]
                    <br></span><!--
EOT;
}print <<<EOT
-->
<div id="input_my_303"></div> 
<script LANGUAGE="JavaScript">
function kill_Err(){
 return true;
}
window.onerror=kill_Err;
totalnum_my_303=$num;
function delpic(t){
 document.getElementById('atc_my_303_url'+t).value='';
 document.getElementById('span'+t).style.display='none';
}
function showinput_my_303(){ 
 var str=document.getElementById("input_my_303").innerHTML; web

 if(parent.document.getElementById('member_mainiframe')!=null){
 parent.document.getElementById('member_mainiframe').height=parseInt(parent.document.getElementById('member_mainiframe').height)+18;
 }
     str+='<span id=span'+totalnum_my_303+'>名稱: &nbsp;<input type="text" name="postdb[my_303][name][]" id="atc_my_303_name'+totalnum_my_303+'" size="15">  地址: &nbsp;<input type="text" name="postdb[my_303][url][]" id="atc_my_303_url'+totalnum_my_303+'" size="30" > [<a href=\'javascript:\' onClick=\'window.open("$webdb[www_url]/do/upfile.php?fn=upfile_my_303&dir=$_pre$fid&label='+totalnum_my_303+'","","width=350,height=50,top=200,left=400")\'><font color="#FF0000">上傳更換圖片</font></a>] [<a href="javascript:delpic(\''+totalnum_my_303+'\')">移除</a>]<br></span>'; 
 totalnum_my_303++;
 document.getElementById("input_my_303").innerHTML=str; 

 
function upfile_my_303(url,name,size,label){ 
 document.getElementById("atc_my_303_url"+label).value=url; 
 arr=name.split('.'); 
 document.getElementById("atc_my_303_name"+label).value=arr[0]; 

</SCRIPT><input type='button' onclick='showinput_my_303()' name='button' value='增長一項'> </td></tr></td></tr><!---->
                <tr>
                  <td width="18%" align='right'>&nbsp;</td>
                  <td width="82%">
                    <input type="submit" name="Submit" value="提 交">
                    <input type="hidden" name="fid" value="$fid">
                    <input type="hidden" name="id" value="$id">
                    <input type="hidden" name="fid_bak1" value="$rsdb[fid_bak1]">
                    <input type="hidden" name="fid_bak2" value="$rsdb[fid_bak2]">
                    <input type="hidden" name="fid_bak3" value="$rsdb[fid_bak3]">
                    <input type="hidden" name="$webdb[rand_num_inputname]" value="$webdb[rand_num]">
                  </td>
                </tr>
              </table>
            </form>
          </td>網絡

在這個的基礎上面加上一個判斷上傳的的圖片可任意設爲封面post

 

如何搞那,朋友們幫個忙,小弟是新人,正在學習PHP,有不少不會,謝謝學習

相關文章
相關標籤/搜索