?? uppic.php
字號:
<?php
defined('IN_PHPCMS') or exit('Access Denied');
include admintpl('header');
?>
<body>
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="5">
<tr>
<td ></td>
</tr>
</table>
<table cellpadding="2" cellspacing="1" class="tableborder">
<tr>
<th>圖片上傳</th>
</tr>
<form name="upload" method="post" action="?mod=<?=$mod?>&file=<?=$file?>&channelid=<?=$channelid?>&uploadtext=<?=$uploadtext?>&action=<?=$action?>&type=<?=$type?>" enctype="multipart/form-data">
<tr>
<td class="tablerow" height="30">
<input type="hidden" name="save" value="1">
<input name="uploadfile" type="file" size="15">
<input type="hidden" name="oldname">
<input type="hidden" name="MAX_FILE_SIZE" value="<?=$maxfilesize?>">
<input type="submit" name="submit" value=" 上傳 ">
<input type="button" name="submit" value=" 預(yù)覽 " onclick="if(upload.uploadfile.value!='') upload.previewpic.src=upload.uploadfile.value">
</td>
</tr>
<?php if($action=="thumb"){ ?>
<tr>
<td class="tablerow" height="30">
縮略圖寬度:<input name="width" type="text" size="5" value="<?=$width?>"> px
高度:<input name="height" type="text" size="5" value="<?=$height?>"> px
</td>
</tr>
<tr>
<td class="tablerow">
說明:系統(tǒng)將按照指定的高度和寬度生成縮略圖
</td>
</tr>
<?php }elseif($action=="water"){ ?>
<?php if($_PHPCMS['water_type']==1){
$poss = array(1=>"頂端居左",2=>"頂端居中",3=>"頂端居右",4=>"中部居左",5=>"中部居中",6=>"中部居右",7=>"底端居左",8=>"底端居中",9=>"底端居右");
?>
<tr>
<td class="tablerow">
水印文字:<input name="water_text" type="text" size="34" value="<?=$_PHPCMS['water_text']?>"> <br>
文字顏色:<input name="water_fontcolor" type="text" size="7" value="<?=$_PHPCMS['water_fontcolor']?>">
<?=color_select("fontcolor","顏色",$_PHPCMS['water_fontcolor'],0," onchange='upload.water_fontcolor.value=this.value'") ?>
文字大小:<input name="water_fontsize" type="text" size="5" value="<?=$_PHPCMS['water_fontsize']?>"> <br>
水印位置:<select name="water_pos">
<?php foreach($poss as $id=>$pos){ ?>
<option value="<?=$id?>" <?php if($_PHPCMS['water_pos']==$id){ ?>selected<?php } ?>><?=$pos?></option>
<?php } ?>
</select>
</td>
</tr>
<?php }elseif($_PHPCMS['water_type']==2){ ?>
水印圖片:<input name="water_image" type="text" size="5" value="<?=$_PHPCMS['water_image']?>"> px
<?php } ?>
<tr>
<td class="tablerow">
說明:系統(tǒng)將按照指定的條件給圖片加水印
</td>
</tr>
<?php } ?>
<tr>
<td class="tablerow">
<img id="previewpic" onload="setpicWH(this,300,300)">
<script>
if(window.opener.myform.<?=$uploadtext?>.value!="")
{
upload.oldname.value = window.opener.myform.<?=$uploadtext?>.value;
upload.previewpic.src = window.opener.myform.<?=$uploadtext?>.value;
}
else
{
upload.previewpic.src = "<?=$rootpath?>images/nopic.gif";
}
</script>
</td>
</tr>
</form>
</table>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -