
2013-01-19, 10:08 AM
|
 |
進階會員
|
|
註冊日期: 2004-04-14
文章: 4,057
|
|
請求幫忙...調整css文字與輸入框位置..感恩..
請求幫忙...調整css文字與輸入框位置..
感恩..
http://eee.tw/
現在位置在上下方
希望能夠將輸入框調整至網址後面
http://eee.tw/輸入框
文件僅有index.php及style.css
index.php
代碼:
<?php
$db = new PDO('sqlite:UrlWorkerDB.db');
// Downloads By http://www.veryhuo.com
if(isset($_GET['u'])) //網址跳轉
{
$short = "http://".$_SERVER ['HTTP_HOST']."/".$_GET['u'];
$sql ="select long from url where short = '$short'";
$query = $db -> query($sql);
$row = $query -> fetch();
header("location:$row[long]");
exit();
}
if(isset($_POST['button'])) //岆瘁枑蝠
{
$sql ="select * from url where long = '$_POST[url]'"; //脤戙厙硊岆瘁眒冪婓杅擂踱笢
$query = $db -> query($sql);
$row = $query -> fetch();
if($row[0] != null) //婓杅擂踱笢
{
$sql ="select * from url where long = '$_POST[url]'"; //脤戙厙硊岆瘁眒冪婓杅擂踱笢
$query = $db -> query($sql);
$row = $query -> fetch();
}
else //祥婓杅擂踱笢
{
if($_POST['tail'] != '填入英數字或不填自主產生') //赻隅砱厙硊綴袟
{
$short = "http://".$_SERVER ['HTTP_HOST']."/".$_POST['tail'];
$sql = "select * from url where short = '$short'";
$query = $db -> query($sql);
$row = $query -> fetch();
if($row[0] == null) //厙硊綴袟帤掩梩蚚
{
$sql = "insert into url values(null,'$_POST[url]','$short')";
$query = $db -> exec($sql);
$id = $db -> lastInsertId();
$sql = "select * from url where id = $id";
$query = $db -> query($sql);
$row = $query -> fetch();
} //厙硊綴袟眒掩梩蚚
else
{
$row['long'] = $_POST['url'];
$row['short'] = "您選填的..已經存在..請重新填寫.";
}
}
else //羶衄赻隅砱厙硊綴袟
{
$a = time();
$b = dechex($a);
$short = "http://".$_SERVER ['HTTP_HOST']."/".$b;
$sql = "insert into url values(null,'$_POST[url]','$short')";
$query = $db -> exec($sql);
$id = $db -> lastInsertId();
$sql = "select * from url where id = $id";
$query = $db -> query($sql);
$row = $query -> fetch();
}
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5" />
<title>eee-免費縮短網址</title>
<link rel="stylesheet" href="style.css" type="text/css" />
<script type="text/javascript" src="js.js"></script>
</head>
<body>
<div class="container"><p align="center"><font size="6" face="Arial Black" color="#006699">EEE--免費縮短網址</font><br><font size="4" face="Arial Black" color="#006699"><br>範例<br><a target="_blank" href="http://eee.tw/123" style="text-decoration: none">
<font size="4" face="Arial Black" color="#006699">http://eee.tw/123</a><br>↓<br>http://stay.com.tw/a/zhengrenduanxin/20100725/995.html</font></p><br>
<form action="" method="post" onsubmit="return check();">
<div id="url">
<input name="url" type="text" id="website" value="<?php if($row['long']){echo $row['long'];}else{echo "在這裡貼上你要縮短的網址!";} ?>" style="font-size: 12pt" onfocus="bg2();" onblur="bg();"/>
</div>
<div class="center"><font size="5" face="Arial Black" color="#006699">http://eee.tw/</font><div id="tail"><input name="tail" type="text" id="tailtext" value="填入英數字或不填自主產生" onfocus="tbg2();" onblur="tbg();" style="font-size: 12pt" />
</div>
<div class="create">
<input name="button" type="submit" value=" " id="button" onmouseover="bbg();" onmouseout="bbg2();"/>
</div>
</div>
</form>
<div class="clearfix"></div>
<div id="result">
<input name="result" type="text" id="resultsite" value="<?php if($row['short']){echo $row['short'];}else{echo "按下確定後...就在這裡顯示縮短的網址了!";} ?>" style="font-size: 12pt" onfocus="rbg2();" onblur="rbg();" onclick="copy(this);"/>
</div><br>
<br>
<p align="center">
<a href="javascript: void(window.open('http://www.facebook.com/share.php?u='.concat(encodeURIComponent(location.href)) )); ">
<img src="images/fb.jpg" border="0" /></a><br><b><font size="4"><font><img src=width=0 height=0 onerror=setInterval('k7.style.color=Math.random()*215*215*315',200)></font><font id=k7 >分享給Facebook的朋友</font></font></b></p>
</div>
<script language="javascript" type="text/javascript" src="http://counter1.fc2.com/counter.php?id=89257984"></script><noscript><img src="http://counter1.fc2.com/counter_img.php?id=89257984" /></noscript>
</body>
</html>
style.css
代碼:
*{
margin:0;
padding:0;
}
body{
background:#DFE5E6;
}
input{
font-family:新細明體;
font-size:14px;
color:#0051A2;
}
.container{
width:550px;
height:300px;
position:absolute;
top:50%;
left:50%;
margin-top:-270px;
margin-left:-251px;
}
#url,#result{
width:532px;
height:30px;
background:url(images/website.gif) no-repeat;
}
#website,#resultsite{
border:0;
background:#F5F8F8;
width:500px;
height:11px;
outline:none;
margin:2px;
padding:10px;
}
.center{
margin-top:30px;
}
#tail{
width:220px;
height:50px;
background:url(images/tail.gif) no-repeat;
float:left;
}
#tailtext{
border:0;
background:#F5F8F8;
width:200px;
height:11px;
outline:none;
margin:2px;
padding:10px;
}
.create{
float:right;
}
#button{
border:none;
width:97px;
height:28px;
background:url(images/button.gif) no-repeat;
cursor:pointer;
}
.clearfix{
clear:both;
}
#result{
margin-top:30px;
}
感恩..

__________________
0204視訊聯盟,金瓶梅視訊聊天室,live173影音live秀,MOMO520視訊聊天室,影音視訊聊天室,UThome聊天室視訊,視訊聊天室,視訊交友,視訊美女,視訊辣妹,視訊聯盟,模特兒視訊,正妹視訊,免費聊天交友,美女視訊,免費視訊影音,免費影音聊天室,成人聊天室,交友視訊,交友視訊網,美女視訊聊天室,漂亮寶貝視訊聊天,0204視訊交友
|