Sign In
To post and rate articles
Login ID
Password
Remember Me
New User Registration
Forget Password?
To Site Manager



Open/Close Menu Open/Close Menu

 Business Forum
 
folder Topics
 Sign in before Post Articles 
   folder Ajax
     folder code 
(Page 1 of 1)   |1|
Author
Contents up Rating up Less Votes down Date
edit lb.css 

people John Xu

Member since
2005-07-11

Posts 14
Member Level
1: Project Manager

posted 2006-04-24 17:41:54

My WebSite
/article/suggestToAdmin.jspBODY {
PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: #fff; PADDING-BOTTOM: 0px; MARGIN: 0px; COLOR: #333; PADDING-TOP: 0px
}
BODY {
FONT-SIZE: small; FONT-FAMILY: arial, sans-serif; voice-family: inherit
}
TD {
FONT-SIZE: small; FONT-FAMILY: arial, sans-serif; voice-family: inherit
}
TH {
FONT-SIZE: small; FONT-FAMILY: arial, sans-serif; voice-family: inherit
}
H3 {
FONT-SIZE: small; FONT-FAMILY: arial, sans-serif; voice-family: inherit
}
H4 {
FONT-SIZE: small; TEXT-ALIGN: left; FONT-FAMILY: arial, sans-serif; voice-family: inherit
}
H4 {
FONT-WEIGHT: bold; FONT-SIZE: 100%; MARGIN-BOTTOM: 0.2em
}
.titleleft {
CLEAR: left; MARGIN-TOP: 0px; FONT-WEIGHT: normal; FONT-SIZE: 114%; BACKGROUND: url(/img/underline.png) repeat-x 0px 95%; MARGIN-BOTTOM: 0.2em
}
#content1 {
FLOAT: right; PADDING-BOTTOM: 3em; WIDTH: 90%
}
.linkbody {
PADDING-LEFT: 4.6em
}
FORM {
MARGIN: 0px
}
P {
LINE-HEIGHT: 110%
}
.linkbody P {
MARGIN: 0.3em 0px 0.1em
}

TABLE {
CLEAR: both; MARGIN-BOTTOM: 1em; WIDTH: 100%; BORDER-COLLAPSE: collapse
}
TABLE IMG {
BORDER-RIGHT: #ccc 1px solid; BORDER-TOP: #ccc 1px solid; BORDER-LEFT: #ccc 1px solid; BORDER-BOTTOM: #ccc 1px solid
}
TH {
PADDING-RIGHT: 0.4em; PADDING-LEFT: 0.4em; FONT-SIZE: 85%; PADDING-BOTTOM: 0.4em; PADDING-TOP: 0.4em; BORDER-BOTTOM: #ddd 1px solid; TEXT-ALIGN: left
}
TD {
PADDING-RIGHT: 0.4em; PADDING-LEFT: 0.4em; FONT-SIZE: 85%; PADDING-BOTTOM: 0.4em; PADDING-TOP: 0.4em; BORDER-BOTTOM: #ddd 1px solid; TEXT-ALIGN: left
}
TH.short {
TEXT-ALIGN: center
}
TD.short {
TEXT-ALIGN: center
}
TH.short A {
BORDER-RIGHT: #fff 1px solid; PADDING-RIGHT: 0px; BORDER-TOP: #fff 1px solid; DISPLAY: block; PADDING-LEFT: 0px; PADDING-BOTTOM: 0.2em; BORDER-LEFT: #fff 1px solid; PADDING-TOP: 0.2em; BORDER-BOTTOM: #fff 1px solid; TEXT-DECORATION: none
}
TD.short A {
BORDER-RIGHT: #fff 1px solid; PADDING-RIGHT: 0px; BORDER-TOP: #fff 1px solid; DISPLAY: block; PADDING-LEFT: 0px; PADDING-BOTTOM: 0.2em; BORDER-LEFT: #fff 1px solid; PADDING-TOP: 0.2em; BORDER-BOTTOM: #fff 1px solid; TEXT-DECORATION: none
}
TH.short A:hover {
BORDER-RIGHT: #06c 1px solid; BORDER-TOP: #06c 1px solid; BACKGROUND: #fff; BORDER-LEFT: #06c 1px solid; BORDER-BOTTOM: #06c 1px solid; TEXT-DECORATION: underline
}
TD.short A:hover {
BORDER-RIGHT: #06c 1px solid; BORDER-TOP: #06c 1px solid; BACKGROUND: #fff; BORDER-LEFT: #06c 1px solid; BORDER-BOTTOM: #06c 1px solid; TEXT-DECORATION: underline
}
TR:hover TD {
BACKGROUND: #e8ecf4
}
.linkcomment {
PADDING-RIGHT: 7em; PADDING-LEFT: 0px; FLOAT: left; PADDING-BOTTOM: 0px; PADDING-TOP: 5px; POSITION: relative
}
HTML .linkcomment {
PADDING-RIGHT: 8.5em
}
.linkcomment .note {
BORDER-RIGHT: #ccc 1px solid; PADDING-RIGHT: 6px; DISPLAY: block; PADDING-LEFT: 6px; FONT-SIZE: 11px; FLOAT: left; PADDING-BOTTOM: 2px; PADDING-TOP: 2px
}
.linkcomment .note-right {
PADDING-RIGHT: 6px; DISPLAY: block; PADDING-LEFT: 6px; FONT-SIZE: 11px; FLOAT: left; PADDING-BOTTOM: 2px; PADDING-TOP: 2px
}
.linkcomment .comments {
PADDING-LEFT: 18px; BACKGROUND: url(/linkback0/img/comments.gif) no-repeat 0px 2px
}
.linkcomment .comments:hover {
PADDING-LEFT: 18px; BACKGROUND: url(/linkback0/img/comments.gif) no-repeat 0px -98px
}
.linkbody P {
MARGIN: 0.3em 0px 0.1em
}

A {
COLOR: #06c
}
A:hover {
COLOR: #003
}
A:unknown {
COLOR: #003
}
A:active {
COLOR: #000
}

Was this comment helpful to you?yesno
edit code 

people John Xu

Member since
2005-07-11

Posts 14
Member Level
1: Project Manager

posted 2006-04-24 17:40:53

My WebSite
http://www.cppunit.org/download.jsp<STYLE type=text/css media=all>@import url( /linkback0/css/lb.css );
</STYLE>
<%@ page import="java.sql.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.net.URLEncoder" %>
<%@ page import="java.io.*" %>
<%@ page import="java.util.regex.*" %>
<%@ include file="constant.jsp" %>
<script language="Javascript1.2" >
function $$$(str1){
if(typeof str1=="string"){
str1=document.getElementById(str1);
}
return str1;
}

function onoffForm(obj) {
if ($$$(obj).style.display!="none") {
$$$(obj).style.display="none";
$$$('formInd').innerHTML="Show Link Back Form";
}
else {
$$$(obj).style.display="block";
$$$('formInd').innerHTML="Hide Link Back Form";
}
}
</script>
<%
String SH="";
String status=request.getParameter("status");
if (status==null) {
status="";
} else {
status=status.trim();
}
String linkurl=request.getParameter("linkurl");
if (linkurl==null)
linkurl="";

String linktitle=request.getParameter("linktitle");

String articleId="";

String backnum="=\\d+$";
Pattern pattern=Pattern.compile(backnum);
Matcher matcher=pattern.matcher(linkurl.trim());
int istart=-1;
int iend=-1;
boolean found=false;
if (matcher.find()) {
istart=matcher.start();
iend=matcher.end();
found = true;
}

if ((found)&&(istart>0)) {
articleId=linkurl.trim().substring(istart+1);
// out.println("articleId="+articleId);
} else {
articleId="1";
}

Class.forName(mydriver);
Connection con = null;

Vector v1=new Vector();

try {

String sQuery="select *, now()-linkTime t from linkback where active='Y' and articleId="+articleId+" order by linkTime desc";

con = DriverManager.getConnection(dbUrl, user, password);

PreparedStatement pStmt=con.prepareStatement(sQuery);
ResultSet rs=pStmt.executeQuery();
while(rs.next()) {
String[] s=new String[6];
s[0]=rs.getString("title");
s[1]=rs.getString("url");
s[2]=rs.getString("shortDescription");
s[3]=rs.getString("longDescription");
s[4]=rs.getString("linkbackId");
s[5]=rs.getString("t");
v1.add(s);
}
rs.close();
pStmt.close();

con.close();
con = null;

} catch (SQLException se) {
} finally {
if (con != null) {
try {
con.close();
con = null;
} catch (SQLException se1) {
}
}
}
%>
<br/><p><b>
<%
if (status.equals("1")) {
out.println("Your link has been added to the list below.");
} else if (status.equals("2")) {
out.println("Your site has no link to server web page. Please make sure you link our server page correctly and resubmit your link.");
} else if (status.equals("3")) {
out.println("Your link has been rejected. Please contact our webmaster and report your error message.");
} else if (status.equals("4")) {
out.println("Your link had been added before. It can be added only once for this server page.");
} else if (status.length()==0) {
} else {
out.println("Your link has been rejected because of a server error happend. Please contact our webmaster and report your error message.");
}
%>
</b>
</p>
<p>
<b>Linkback URL:</b> http://localhost:8080/linkback/processLinkBack.jsp?l=<%=articleId%>
<%
if (v1.size()>0) {
%>
<br>There are <%=v1.size() %> linkbacks available.<br/>
<p>
<DIV id=content1>
<%
for (int i=0; i<v1.size(); i++) {
%>
<DIV class=linkbody>
<H4 class=titleleft><a href="<%=((String[])v1.get(i))[1]%>"><%=((String[])v1.get(i))[0]%></a>
</H4> (<%=((String[])v1.get(i))[5]%>)
<P>
<%=((String[])v1.get(i))[2]%>
</P>
<DIV class=linkcomment><A class="note comments"
href="http://localhost:8080/linkback/commentsShow.jsp?linkbackId=<%=((String[])v1.get(i))[4]%>">
Comments & Linkback</A>
</DIV>
</DIV>
<%
}
%>
</DIV>
<%
}
%>
<P style="clear:both">
<hr/>
</P>
<a href="#" onclick="Javascript:onoffForm('inputform')"><div id=formInd name=formInd>Hide Link Back Form</div></a>
<p>
<div id=inputform name=inputform>
<H3>Please Fill the Form and Submit Your Link</H3>
<form name=linkback id=linkback method=post action="processLinkBackNow.jsp" >
<input type=hidden name=linkurl value="<%=linkurl %>" >
<input type=hidden name=linktitle value="<%=linktitle %>" >
<input type=hidden name=articleId value="<%=articleId %>" >
<table width="600" border="0">
<tr>
<td colspan=2 width=600 >
Instruction:<br/>
Please make sure that your web link has mentioned the target url and
title, otherwise you will not be able to post your page. Your url also
will be checked later to make sure your site remains connecting to the
target page.<br/>
(*=required)
</td>
</tr>
<tr>
<td width="32%">*URL(permanent link)</td>
<td width="68%">
<input type="text" name="url">
</td>
</tr>
<tr>
<td width="32%">*Title</td>
<td width="68%">
<input type="text" name="title">
</td>
</tr>
<tr>
<td width="32%">*Type</td>
<td width="68%">
<input type="text" name="type">
</td>
</tr>
<tr>
<td width="32%" height="82">*Short Description</td>
<td width="68%" height="82">
<textarea name="shortDescription" rows="3" cols="30"></textarea>
</td>
</tr>
<tr>
<td width="32%" height="78">Long Description</td>
<td width="68%" height="78">
<textarea name="longDescription" cols="30" rows="4"></textarea>
</td>
</tr>
<tr>
<td width="32%">Site Name</td>
<td width="68%">
<input type="text" name="site">
</td>
</tr>
<tr>
<td width="32%">Web site administrator email</td>
<td width="68%">
<input type="text" name="email">
</td>
</tr>
<tr>
<td width="32%">Web site administrator phone</td>
<td width="68%">
<input type="text" name="phone">
</td>
</tr>
<tr>
<td width="32%"> </td>
<td width="68%"> </td>
</tr>
<tr>
<td width="32%"> </td>
<td width="68%">
<input type="submit" name="linkback" value="Link Back Now">
</td>
</tr>
</table>
</form>
</div>

Was this comment helpful to you?yesno

|1|
 
 
 TLINKS SEARCH
Advanced Search
Help
 Recommended Links
Red Cross
Responding to hurricane katrina relieve. Donate today. It's a Great Feeling to Help.
http://www.redcross.org
Getusjobs.com
Getusjobs.com is the job site focused on American jobs. See the results that put us on top.
http://www.getusjobs.com
Database Tool
TLinkSoft® tools empowers developers, integrators and DBAs to be more productive.
http://www.cppunit.org/download.jsp
USAnalyst.com
USAnalyst.com provide a community for database analysts, business analysts, developer analysts and managers.
http://www.cppunit.org/article

Powered by Tlinks Systems