ui.js ( File view )

  • By 2010-08-12
  • View(s):3
  • Download(s):0
  • Point(s): 1
			var intBaiduCproDebug = 0;	
var strBaiduCproUiUrl = 'http://cpro.baidu.com/cpro/ui/uijs.php?';

function baiduCproWriteStyle()
{

	strBaiduCproStyle = '<style type="text/css">'
	strBaiduCproStyle += '<!--';
	strBaiduCproStyle += 'table.baidu_cpro_table td,table.baidu_cpro_table a,table.baidu_cpro_table div{
font-size:12px;font-family:"宋体","楷体_gb2312","楷体";table-layout:fixed; word-break:break-all;vertical-align: middle; overflow:hidden;
}';
	strBaiduCproStyle += 'table.baidu_cpro_table a:link.baidu_cpro_title,table.baidu_cpro_table a:visited.baidu_cpro_title{
text-decoration:none;
}';
	strBaiduCproStyle += 'table.baidu_cpro_table a:active.baidu_cpro_title,table.baidu_cpro_table a:hover.baidu_cpro_title{
text-decoration:underline;
}';
	strBaiduCproStyle += '//-->';
	strBaiduCproStyle += '</style>';
	return strBaiduCproStyle;

}

function baiduCproTableBuild(strBaiduCproData, bolDebug){

	intBaiduCproRow=arrBaiduCproConfig['hn'];
	intBaiduCproCol=arrBaiduCproConfig['wn'];

	intBaiduCproTdWidth_t = Math.floor(100/intBaiduCproCol);
	intBaiduCproTdWidth=0;
	intBaiduCproTdHeight = Math.ceil((arrBaiduCproConfig['h']-16)/intBaiduCproRow)-4;

	strBaiduCproTitleText = '百度主题推广服务';
	strBaiduCproTitleUrl = 'http://union.baidu.com/';
	intBaiduCproTdLeave=100-Math.floor(100/intBaiduCproCol)*intBaiduCproCol;

	
	arrBaiduCproData = strBaiduCproData.split('\n');
	for(i=0;i<arrBaiduCproData.length;i++){

		arrBaiduCproData[i] = arrBaiduCproData[i].split('\t');
	
}

	strBaiduCproOut='';
	if(arrBaiduCproData[0].length==2)
	{

		strBaiduCproOut+='<center><a href=\"'+arrBaiduCproData[0][1]+'\" target=\"_blank\">'
		strBaiduCproOut+='<img border=0 src=\"'+arrBaiduCproData[0][0]+'\"></a></center>';		
	
}
	else
	{

		strBaiduCproOut = '<table align=center width='+arrBaiduCproConfig['w']+' height='+arrBaiduCproConfig['h']+' cellpadding=1 cellspacing=0 bgcolor='+arrBaiduCproConfig['bd']+' style="border:1px solid '+arrBaiduCproConfig['bd']+';" class="baidu_cpro_table">';
		strBaiduCproTitle  = '<tr>';
		strBaiduCproTitle += '<td height=12 colspan='+arrBaiduCproConfig['wn']+' align='+arrBaiduCproConfig['ta']+' bgcolor='+arrBaiduCproConfig['bd']+' style="border:0px; border-top:1px solid '+arrBaiduCproConfig['bd']+'; background-color:'+arrBaiduCproConfig['bd']+';color:'+arrBaiduCproConfig['bdl']+';">';
		strBaiduCproTitle += strBaiduCproTitleText;
		strBaiduCproTitle += '</td></tr>';
		if(arrBaiduCproConfig['tl'] != 'bottom'){

			strBaiduCproOut+=strBaiduCproTitle;
		
}		
		index =0;
		for(i=0;i<intBaiduCproRow;i++){

			strBaiduCproOut +='<tr bgcolor=white>';
			for(j=0;j<intBaiduCproCol;j++){

				if(j<intBaiduCproTdLeave)
					intBaiduCproTdWidth=intBaiduCproTdWidth_t+1;
				else
					intBaiduCproTdWidth=intBaiduCproTdWidth_t;
				
				strBaiduCproOut +='<td style="border:0px;'+(i!=0?' border-top:1px solid '+arrBaiduCproConfig['bd']+';':'')+' background-color:'+arrBaiduCproConfig['bg']+';width:'+intBaiduCproTdWidth+'%; height:'+intBaiduCproTdHeight+'px;" bgcolor="'+arrBaiduCproConfig['bg']+'" height="'+intBaiduCproTdHeight+'"width="'+intBaiduCproTdWidth+'%" valign="middle">';
				if (index>=arrBaiduCproData.length)
				{
				
					break;
				
}else{

					if(arrBaiduCproData[index][3].match(/^http:\/\/([\w\-]*\.)*baidu\.com\.?(:\d+)?\/?/ig)){

						arrBaiduCproData[index][3]+='&referer='+location.href.replace(/^.*&word=([^&]+).*$/ig,'$1');//?
					
}
					strBaiduCproOut +='<div><a href="'+arrBaiduCproData[index][3]+'" target="_blank" class="baidu_cpro_title" style="color:'+arrBaiduCproConfig['tt']+';font-weight:bold;"><b>';
					if(arrBaiduCproData[index].length == 6 && arrBaiduCproConfig['nfr'] == 0){

						if(arrBaiduCproConfig['tt'] == '#e10900')
							strTT = '#0000cc';
						else
							strTT = '#e10900';
						strTitle = arrBaiduCproData[index][0].replace(eval('/('+RegexEscape(arrBaiduCproData[index][4])+')/ig'), '<font color="'+strTT+'">$1</font>');
					
}
					else
						strTitle = arrBaiduCproData[index][0];
					strBaiduCproOut +=strTitle+'</b></a></div>';
					strBaiduCproOut +='<a href="'+arrBaiduCproData[index][3]+'" target="_blank" style="text-decoration:none;">';
					if(arrBaiduCproData[index][1]!='...')
					{

						strBaiduCproOut +='<div style=" color:'+arrBaiduCproConfig['ct']+';text-decoration:none;">'+arrBaiduCproData[index][1]+'</div>';
					
}

					if(arrBaiduCproConfig['bu']=='1' || arrBaiduCproConfig['bu']==1){

						strBaiduCproOut +='<div style="color:'+arrBaiduCproConfig['url']+';text-decoration:none;">'+arrBaiduCproData[index][2].
...
...
(Please download the complete source code to view)
			
...
Expand> <Close

Want complete source code? Download it here

Point(s): 1

Download
0 lines left, continue to read
Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
Windows的.BMP0.00 B0|0%
di1.jpg5.60 kB06-03-06|11:45
ui.js6.61 kB06-03-06|09:36
...
Sponsored links

ui.js (5.59 kB)

Need 1 point
Your Point(s)

Your Point isn't enough.

Get point immediately by PayPal

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more point

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D