Link to home
Start Free TrialLog in
Avatar of smphil
smphilFlag for Afghanistan

asked on

Link Problem

I am working on a webpage for some one I just met and they have a little control panel to insert text under the models pictures. I went to code a link in as such

<a href="http://www.sitenumber2.com">Site Number 2</a>

The problem is when it displays it the php page is displaying the link destination like this

sitenumberone.com/\http://www.sitenumber2.com


Is there something I can do in the text editor to counteract or strip that out.

Thank You Phil
Avatar of Marco Gasi
Marco Gasi
Flag of Spain image

Mmmh, that seems like the site developer had wanted prevent external links. I think this is made using javascript: can you post the full code?
Avatar of smphil

ASKER

This is the page that displays the data is there something I can do here to not disrupt all the other stuff but be able to add links through the editor and then go to correct destination.
<?php
$gn = $_GET['gn'];
include 'connect.php';
$pn=$gn;
include 'addhit.php';
$bot = "CSInit[CSInit.length] = new Array(CSILoad,/*CMP*/'button',/*URL*/'bottom1_over.jpg',/*URL*/'bottom1.jpg',/*URL*/'";
$bot = $bot . "schedule.php?gn=" . $gn . "','')\n\r";
$bot = $bot . "CSInit[CSInit.length] = new Array(CSILoad,/*CMP*/'button2',/*URL*/'bottom3_over.jpg',/*URL*/'bottom3.jpg',/*URL*/'(Empty Reference!)','');\n\r";
$bot = $bot . "CSInit[CSInit.length] = new Array(CSILoad,/*CMP*/'button3',/*URL*/'bottom4_over.jpg',/*URL*/'bottom4.jpg',/*URL*/'','')\n\r";
$query = "select * from belles where sn = '" . $gn . "'";
$result = mysql_query($query);
$rec = mysql_fetch_row($result);
$lnk = $rec[4];
if(strlen($lnk)<5) $lnk = "#";
$sec = $rec[5];
if(strlen($sec)<2) {
	$secl = "#";
} else {
	$secl = "belle.php?gn=" . $sec;
}
$ja = "";
$jb = "";
$jc = "";
$jd = "";
$jd = "";
$jf = "";
$jg = "";
$jh = "";

$j1 = "";

$fn = $gn . "/a.jpg";
if (file_exists($fn)) {
	$ja = "|csaction name=\"D61562B272\" class=\"Set Image URL\" type=\"onevent\" val0=\"";
	$ja = $ja . $gn . "\" val1=\"" . $gn . "/a.jpg\">";
	$j1 = $j1 . "CSAct[/*CMP*/ 'D61562B272'] = new Array(CSSetImageURL,/*CMP*/ '";
	$j1 = $j1 . $gn . "',/*URL*/ '" . $fn . "')\n\r";

}
$fn = $gn . "/b.jpg";
if (file_exists($fn)) {
	$jb = "|csaction name=\"D62893C273\" class=\"Set Image URL\" type=\"onevent\" val0=\"";
	$jb = $jb . $gn . "\" val1=\"". $gn . "/b.jpg\">";
	$j1 = $j1 . "CSAct[/*CMP*/ 'D62893C273'] = new Array(CSSetImageURL,/*CMP*/ '";
	$j1 = $j1 . $gn . "',/*URL*/ '" . $fn . "')\n\r";
}
$fn = $gn . "/c.jpg";
if (file_exists($fn)) {
	$jc = "|csaction name=\"D630B7C274\" class=\"Set Image URL\" type=\"onevent\" val0=\"";
	$jc = $jc . $gn . "\" val1=\"". $gn . "/c.jpg\">";
	$j1 = $j1 . "CSAct[/*CMP*/ 'D630B7C274'] = new Array(CSSetImageURL,/*CMP*/ '";
	$j1 = $j1 . $gn . "',/*URL*/ '" . $fn . "')\n\r";
}
$fn = $gn . "/d.jpg";
if (file_exists($fn)) {
	$jd = "|csaction name=\"D634BE0275\" class=\"Set Image URL\" type=\"onevent\" val0=\"";
	$jd = $jd . $gn . "\" val1=\"". $gn . "/d.jpg\">";
	$j1 = $j1 . "CSAct[/*CMP*/ 'D634BE0275'] = new Array(CSSetImageURL,/*CMP*/ '";
	$j1 = $j1 . $gn . "',/*URL*/ '" . $fn . "')\n\r";
}
$fn = $gn . "/e.jpg";
if (file_exists($fn)) {
	$je = "|csaction name=\"D63952E276\" class=\"Set Image URL\" type=\"onevent\" val0=\"";
	$je = $je . $gn . "\" val1=\"". $gn . "/e.jpg\">";
	$j1 = $j1 . "CSAct[/*CMP*/ 'D63952E276'] = new Array(CSSetImageURL,/*CMP*/ '";
	$j1 = $j1 . $gn . "',/*URL*/ '" . $fn . "')\n\r";
}
$fn = $gn . "/f.jpg";
if (file_exists($fn)) {
	$jf = "|csaction name=\"D63E66B277\" class=\"Set Image URL\" type=\"onevent\" val0=\"";
	$jf = $jf . $gn . "\" val1=\"". $gn . "/f.jpg\">";
	$j1 = $j1 . "CSAct[/*CMP*/ 'D63E66B277'] = new Array(CSSetImageURL,/*CMP*/ '";
	$j1 = $j1 . $gn . "',/*URL*/ '" . $fn . "')\n\r";
}
$fn = $gn . "/g.jpg";
if (file_exists($fn)) {
	$jg = "|csaction name=\"D6427F8278\" class=\"Set Image URL\" type=\"onevent\" val0=\"";
	$jg = $jg . $gn . "\" val1=\"". $gn . "/g.jpg\">";
	$j1 = $j1 . "CSAct[/*CMP*/ 'D6427F8278'] = new Array(CSSetImageURL,/*CMP*/ '";
	$j1 = $j1 . $gn . "',/*URL*/ '" . $fn . "')\n\r";
}
$fn = $gn . "/h.jpg";
if (file_exists($fn)) {
	$jh = "|csaction name=\"D6469F3279\" class=\"Set Image URL\" type=\"onevent\" val0=\"";
	$jh = $jh . $gn . "\" val1=\"". $gn . "/h.jpg\">";
	$j1 = $j1 . "CSAct[/*CMP*/ 'D6469F3279'] = new Array(CSSetImageURL,/*CMP*/ '";
	$j1 = $j1 . $gn . "',/*URL*/ '" . $fn . "')\n\r";
}


?>
<html>

	<head>
		<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
		<meta name="generator" content="Dev-PHP 2.0.13 test">
		<title>Beautiful BelleDeJour Girls</title>
		<csactionitem name="D1A772A31"></csactionitem>
		<csactionitem name="D0D5EDE3"></csactionitem>
		<csactionitem name="D0F77BC5"></csactionitem>
		<csactionitem name="D10A87B7"></csactionitem>
		<csactionitem name="D12298D13"></csactionitem>
		<csactionitem name="D15D24222"></csactionitem>
		<csactionitem name="D15B90D21"></csactionitem>
		<csactionitem name="D14D37019"></csactionitem>
		<csactionitem name="D17E37F26"></csactionitem>
		<csactionitem name="D1A470130"></csactionitem>
		<csactions>
			<csaction name="D1A772A31" class="Set Image URL" type="unbound" val0="menu" val1="girls.php">
			<csaction name="D0BB7B61" class="Set Image URL" type="onevent" val0="menu" val1="menu_left_girls.jpg">
			<csaction name="D0D5EDE3" class="Set Image URL" type="unbound" val0="menu" val1="menu_left_schedule.jpg">
			<csaction name="D0E80F84" class="Set Image URL" type="onevent" val0="menu" val1="menu_left_schedule.jpg">
			<csaction name="D0F77BC5" class="Set Image URL" type="unbound" val0="menu" val1="menu_left_joinemail.jpg">
			<csaction name="D0FF99E6" class="Set Image URL" type="onevent" val0="menu" val1="menu_left_joinemail.jpg">
			<csaction name="D10A87B7" class="Set Image URL" type="unbound" val0="menu" val1="menu_left_birthday.jpg">
			<csaction name="D11006F8" class="Set Image URL" type="onevent" val0="menu" val1="menu_left_birthday.jpg">
			<csaction name="D12298D13" class="Set Image URL" type="unbound" val0="menu" val1="menu_left_wallpaper.jpg">
			<csaction name="D12878C14" class="Set Image URL" type="onevent" val0="menu" val1="menu_left_wallpaper.jpg">
			<csaction name="D15D24222" class="Set Image URL" type="unbound" val0="menu" val1="menu_left_rendezvous.jpg">
			<csaction name="D13524E16" class="Set Image URL" type="onevent" val0="menu" val1="menu_left_rendezvous.jpg">
			<csaction name="D15B90D21" class="Set Image URL" type="unbound" val0="menu" val1="menu_left_employment.jpg">
			<csaction name="D144FF818" class="Set Image URL" type="onevent" val0="menu" val1="menu_left_employment.jpg">
			<csaction name="D14D37019" class="Set Image URL" type="unbound" val0="menu" val1="menu_left_faq.jpg">
			<csaction name="D15592A20" class="Set Image URL" type="onevent" val0="menu" val1="menu_left_faq.jpg">
			<csaction name="D17E37F26" class="Set Image URL" type="unbound" val0="menu" val1="menu_left_links.jpg">
			<csaction name="D16DA9A24" class="Set Image URL" type="onevent" val0="menu" val1="menu_left_links.jpg">
			<csaction name="D1A470130" class="Set Image URL" type="unbound" val0="menu" val1="menu_left_home.jpg">
			<csaction name="D185C6828" class="Set Image URL" type="onevent" val0="menu" val1="menu_left_home.jpg">
		
		<?php echo str_replace('|', "<", $ja) . "\n\r"; ?>
		<?php echo str_replace('|', "<", $jb) . "\n\r"; ?>
		<?php echo str_replace('|', "<", $jc) . "\n\r"; ?>
		<?php echo str_replace('|', "<", $jd) . "\n\r"; ?>
		<?php echo str_replace('|', "<", $je) . "\n\r"; ?>
		<?php echo str_replace('|', "<", $jf) . "\n\r"; ?>
		<?php echo str_replace('|', "<", $jg) . "\n\r"; ?>
		<?php echo str_replace('|', "<", $jh) . "\n\r"; ?>
		</csactions>
		<csscriptdict>
			<script><!--
CSInit = new Array;
function CSScriptInit() {
if(typeof(skipPage) != "undefined") { if(skipPage) return; }
idxArray = new Array;
for(var i=0;i<CSInit.length;i++)
	idxArray[i] = i;
CSAction2(CSInit, idxArray);}
CSAg = window.navigator.userAgent; CSBVers = parseInt(CSAg.charAt(CSAg.indexOf("/")+1),10);
function IsIE() { return CSAg.indexOf("MSIE") > 0;}
function CSIEStyl(s) { return document.all.tags("div")[s].style; }
function CSNSStyl(s) { return CSFindElement(s,0); }
function CSFindElement(n,ly) { if (CSBVers < 4) return document[n];
	var curDoc = ly ? ly.document : document; var elem = curDoc[n];
	if (!elem) { for (var i=0;i<curDoc.layers.length;i++) {
		elem = CSFindElement(n,curDoc.layers[i]); if (elem) return elem; }}
	return elem;
}

function CSClickReturn () {
	var bAgent = window.navigator.userAgent; 
	var bAppName = window.navigator.appName;
	if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0) && (bAgent.indexOf("Mac") >= 0))
		return true; // dont follow link
	else return false; // dont follow link
}

function CSButtonReturn () {
	var bAgent = window.navigator.userAgent; 
	var bAppName = window.navigator.appName;
	if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0) && (bAgent.indexOf("Mac") >= 0))
		return false; // follow link
	else return true; // follow link
}

CSIm = new Object();
function CSIShow(n,i) {
	if (document.images) {
		if (CSIm[n]) {
			var img = (!IsIE()) ? CSFindElement(n,0) : document[n];
			if (img && typeof(CSIm[n][i].src) != "undefined") {img.src = CSIm[n][i].src;}
			if(i != 0)
				self.status = CSIm[n][3];
			else
				self.status = " ";
			return true;
		}
	}
	return false;
}
function CSILoad(action) {
	im = action[1];
	if (document.images) {
		CSIm[im] = new Object();
		for (var i=2;i<5;i++) {
			if (action[i] != '') { CSIm[im][i-2] = new Image(); CSIm[im][i-2].src = action[i]; }
			else CSIm[im][i-2] = 0;
		}
		CSIm[im][3] = action[5];
	}
}
CSStopExecution = false;
function CSAction(array) { 
	return CSAction2(CSAct, array);
}
function CSAction2(fct, array) { 
	var result;
	for (var i=0;i<array.length;i++) {
		if(CSStopExecution) return false; 
		var actArray = fct[array[i]];
		if(actArray == null) return false; 
		var tempArray = new Array;
		for(var j=1;j<actArray.length;j++) {
			if((actArray[j] != null) && (typeof(actArray[j]) == "object") && (actArray[j].length == 2)) {
				if(actArray[j][0] == "VAR") {
					tempArray[j] = CSStateArray[actArray[j][1]];
				}
				else {
					if(actArray[j][0] == "ACT") {
						tempArray[j] = CSAction(new Array(new String(actArray[j][1])));
					}
				else
					tempArray[j] = actArray[j];
				}
			}
			else
				tempArray[j] = actArray[j];
		}			
		result = actArray[0](tempArray);
	}
	return result;
}
CSAct = new Object;



function CSSetImageURL(action) {
	var img = null;
	if (document.images) {
		if (!IsIE()) img = CSFindElement(action[1],0);
		else img = document.images[action[1]];
		if (img) img.src = action[2];
	}
}

// --></script>
		</csscriptdict>
		<csactiondict>
			<script><!--
<?php echo $bot; ?>

CSAct[/*CMP*/ 'D1A772A31'] = new Array(CSSetImageURL,/*CMP*/ 'menu',/*URL*/ 'girls.php');
CSAct[/*CMP*/ 'D0BB7B61'] = new Array(CSSetImageURL,/*CMP*/ 'menu',/*URL*/ 'menu_left_girls.jpg');
CSAct[/*CMP*/ 'D0D5EDE3'] = new Array(CSSetImageURL,/*CMP*/ 'menu',/*URL*/ 'menu_left_schedule.jpg');
CSAct[/*CMP*/ 'D0E80F84'] = new Array(CSSetImageURL,/*CMP*/ 'menu',/*URL*/ 'menu_left_schedule.jpg');
CSAct[/*CMP*/ 'D0F77BC5'] = new Array(CSSetImageURL,/*CMP*/ 'menu',/*URL*/ 'menu_left_joinemail.jpg');
CSAct[/*CMP*/ 'D0FF99E6'] = new Array(CSSetImageURL,/*CMP*/ 'menu',/*URL*/ 'menu_left_joinemail.jpg');
CSAct[/*CMP*/ 'D10A87B7'] = new Array(CSSetImageURL,/*CMP*/ 'menu',/*URL*/ 'menu_left_birthday.jpg');
CSAct[/*CMP*/ 'D11006F8'] = new Array(CSSetImageURL,/*CMP*/ 'menu',/*URL*/ 'menu_left_birthday.jpg');
CSAct[/*CMP*/ 'D12298D13'] = new Array(CSSetImageURL,/*CMP*/ 'menu',/*URL*/ 'menu_left_wallpaper.jpg');
CSAct[/*CMP*/ 'D12878C14'] = new Array(CSSetImageURL,/*CMP*/ 'menu',/*URL*/ 'menu_left_wallpaper.jpg');
CSAct[/*CMP*/ 'D15D24222'] = new Array(CSSetImageURL,/*CMP*/ 'menu',/*URL*/ 'menu_left_rendezvous.jpg');
CSAct[/*CMP*/ 'D13524E16'] = new Array(CSSetImageURL,/*CMP*/ 'menu',/*URL*/ 'menu_left_rendezvous.jpg');
CSAct[/*CMP*/ 'D15B90D21'] = new Array(CSSetImageURL,/*CMP*/ 'menu',/*URL*/ 'menu_left_employment.jpg');
CSAct[/*CMP*/ 'D144FF818'] = new Array(CSSetImageURL,/*CMP*/ 'menu',/*URL*/ 'menu_left_employment.jpg');
CSAct[/*CMP*/ 'D14D37019'] = new Array(CSSetImageURL,/*CMP*/ 'menu',/*URL*/ 'menu_left_faq.jpg');
CSAct[/*CMP*/ 'D15592A20'] = new Array(CSSetImageURL,/*CMP*/ 'menu',/*URL*/ 'menu_left_faq.jpg');
CSAct[/*CMP*/ 'D17E37F26'] = new Array(CSSetImageURL,/*CMP*/ 'menu',/*URL*/ 'menu_left_links.jpg');
CSAct[/*CMP*/ 'D16DA9A24'] = new Array(CSSetImageURL,/*CMP*/ 'menu',/*URL*/ 'menu_left_links.jpg');
CSAct[/*CMP*/ 'D1A470130'] = new Array(CSSetImageURL,/*CMP*/ 'menu',/*URL*/ 'menu_left_home.jpg');
CSAct[/*CMP*/ 'D185C6828'] = new Array(CSSetImageURL,/*CMP*/ 'menu',/*URL*/ 'menu_left_home.jpg');

<?php echo $j1; ?>

// --></script>
		</csactiondict>
	</head>

	<body  rightmargin="0" leftmargin="0" topmargin="0" bottommargin="0" marginwidth="0" marginheight="0"  bgcolor="white" text="#476684" link="#476684" alink="#476684" vlink="#476684"  bgcolor="#ffffff" onload="CSScriptInit();">
		<table border="0" cellpadding="0" cellspacing="0" width="998">
			<tr>
				<td width="253" valign="top"><img src="menu_left_girls.jpg" width="253" height="555" border="0" name="menu" usemap="#menu"><br>
					<img src="cc_logo.jpg" width="253" height="76" border="0"><br>
					<a href="mailto:belledejourgirls@gmail.com?subject=Email From Website"><img src="inner_page_mail_icon.jpg" width="253" height="132" border="0"></a><br>
				</td>
				<td valign="top">
					<table border="0" cellpadding="0" cellspacing="0" width="100%">
						<tr>
							<td><img src="top_innerpage_name.gif" width="422" height="94" border="0"><img src="top_innerpage_phone.gif" width="323" height="94" border="0"></td>
						</tr>
						<tr>
							<td>
								<div align="center">
									<table cellpadding="5" cellspacing="2" width="100%">
										<tr>
											<td valign="middle">
												<div align="center">
													<img src="<?php echo $gn; ?>/a.jpg" width="357" height="377" border="0" name="<?php echo $gn; ?>" usemap="#mapper"></div>
											</td>
											<td valign="top">
												<div align="center">
													<table border="0" cellpadding="5" cellspacing="5" width="122">
														
<?php
$fn = $gn . "/a_tn.jpg";
if (file_exists($fn)) {
		echo "<tr><td><a href=\"#\" onmouseover=\"CSAction(new Array(/*CMP*/'D61562B272'));";
		echo "return true;\" csover=\"D61562B272\"><img src=\"";
		echo $fn . "\" width=\"95\" height=\"100\" border=\"0\"></a></td>";
		$fn = $gn . "/b_tn.jpg";
		if (file_exists($fn)) {
			echo "<td><a href=\"#\" onmouseover=\"CSAction(new Array(/*CMP*/'D62893C273'));";
			echo "return true;\" csover=\"D62893C273\"><img src=\"";
			echo $fn . "\" width=\"95\" height=\"100\" border=\"0\"></a></td>";
		} else {
			echo "<td><br></td>";
		}
		echo "</tr>";
}
$fn = $gn . "/c_tn.jpg";
if (file_exists($fn)) {
		echo "<tr><td><a href=\"#\" onmouseover=\"CSAction(new Array(/*CMP*/'D630B7C274'));";
		echo "return true;\" csover=\"D630B7C274\"><img src=\"";
		echo $fn . "\" width=\"95\" height=\"100\" border=\"0\"></a></td>";
		$fn = $gn . "/d_tn.jpg";
		if (file_exists($fn)) {
			echo "<td><a href=\"#\" onmouseover=\"CSAction(new Array(/*CMP*/'D634BE0275'));";
			echo "return true;\" csover=\"D634BE0275\"><img src=\"";
			echo $fn . "\" width=\"95\" height=\"100\" border=\"0\"></a></td>";
		} else {
			echo "<td><br></td>";
		}
		echo "</tr>";
}
$fn = $gn . "/e_tn.jpg";
if (file_exists($fn)) {
		echo "<tr><td><a href=\"#\" onmouseover=\"CSAction(new Array(/*CMP*/'D63952E276'));";
		echo "return true;\" csover=\"D63952E276\"><img src=\"";
		echo $fn . "\" width=\"95\" height=\"100\" border=\"0\"></a></td>";
		$fn = $gn . "/f_tn.jpg";
		if (file_exists($fn)) {
			echo "<td><a href=\"#\" onmouseover=\"CSAction(new Array(/*CMP*/'D63E66B277'));";

			echo "return true;\" csover=\"D63E66B277\"><img src=\"";
			echo $fn . "\" width=\"95\" height=\"100\" border=\"0\"></a></td>";
		} else {
			echo "<td><br></td>";
		}
		echo "</tr>";
}
$fn = $gn . "/g_tn.jpg";
if (file_exists($fn)) {
		echo "<tr><td><a href=\"#\" onmouseover=\"CSAction(new Array(/*CMP*/'D6427F8278'));";
		echo "return true;\" csover=\"D6427F8278\"><img src=\"";
		echo $fn . "\" width=\"95\" height=\"100\" border=\"0\"></a></td>";
		$fn = $gn . "/h_tn.jpg";
		if (file_exists($fn)) {
			echo "<td><a href=\"#\" onmouseover=\"CSAction(new Array(/*CMP*/'D6469F3279'));";
			echo "return true;\" csover=\"D6469F3279\"><img src=\"";
			echo $fn . "\" width=\"95\" height=\"100\" border=\"0\"></a></td>";
		} else {
			echo "<td><br></td>";
		}
		echo "</tr>";
}




?>

													</table>
												</div>
											</td>
										</tr>
									</table>
								</div>
							</td>
						</tr>
						<tr>
							<td>
								<table border="0" cellpadding="10" cellspacing="2" width="100%">
									<tr>
										<td>
											<div align="center">
												<font size="2" face="Georgia"><b>
												
												<?php echo $rec[3]; ?><br>
												<?php
												if ($secl!="#") {
													echo "<br>Can't get enough of me? Check out<a href=\"";
													echo $secl;
													echo "\"> additional pictures here.</a><br><br>";
												}
												?>
												
												
												
												My Rates are on my <a href="<?php echo "schedule.php?sel=g&gn=" . $gn; ?>">Schedule Page</a><br><br><a href="javascript:history.go(-1)">Return to Previous Page</a><br>
												
													</b></font><font face="Georgia" size="3"><b><br><br>
														<table border="0" cellpadding="0" cellspacing="0" width="100%">
															<tr height="58">
																<td height="58" width="213">
																	<div align="right">
																		<img src="telephone_logo.jpg" width="194" height="58" border="0"></div>
																</td>
																<td width="600" height="58">
																	<div align="center">
																		<img src="telephone_part2.jpg" width="431" height="58" border="0"></div>
																</td>
															</tr>
														</table>
													</b></font></div>
										</td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<td>
								<div align="center">
									<csobj w="209" h="48" t="Button" ht="bottom1.jpg"><a href="<?php echo "schedule.php?sel=g&gn=" . $gn; ?>" onmouseover="return CSIShow(/*CMP*/'button',1)" onmouseout="return CSIShow(/*CMP*/'button',0)" onclick="return CSButtonReturn()"><img src="bottom1_over.jpg" width="209" height="48" name="button" border="0"></a></csobj>
									
									<?php if($lnk != "#" ) echo "<csobj w=\"181\" h=\"48\" t=\"Button\" ht=\"bottom3.jpg\"><a href=\"" . $lnk . "\" target=\"_blank\" onmouseover=\"return CSIShow(/*CMP*/'button',1)\" onmouseout=\"return CSIShow(/*CMP*/'button',0)\" onclick=\"return CSButtonReturn()\"><img src=\"bottom3_over.jpg\" width=\"181\" height=\"48\" name=\"button\" border=\"0\"></a></csobj>";
?>


<csobj w="123" h="48" t=\"Button" ht="bottom4.jpg"><a href="rendezvous.php" onmouseover="return CSIShow(/*CMP*/'button3',1)" onmouseout="return CSIShow(/*CMP*/'button3',0)" onclick="return CSButtonReturn()"><img src="bottom4_over.jpg" width="123" height="48" name="button3" border="0"></a></csobj></div>
							</td>
						</tr>
						<tr>
							<td>
								<div align="center">
									<br>
								</div>
							</td>
						</tr>
						<tr>
							<td>
								<div align="center"> <font size="2" face="Verdana">&copy;BelleDeJour-- 
              all rights reserved </font></div>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
		<map name="mapper"></map><map name="menu"><area shape="rect" coords="172,435,244,468" href="home.php" onmouseover="CSAction(new Array(/*CMP*/'D185C6828'));return true;" csover="D185C6828"><area shape="rect" coords="170,397,244,428" target="_self" href="links.php" onmouseover="CSAction(new Array(/*CMP*/'D16DA9A24'));return true;" csover="D16DA9A24"><area shape="rect" coords="159,363,240,393" target="_self" href="faq.php" onmouseover="CSAction(new Array(/*CMP*/'D15592A20'));return true;" csover="D15592A20"><area shape="rect" coords="96,326,240,355" href="employment.php" target="_self" onmouseover="CSAction(new Array(/*CMP*/'D144FF818'));return true;" csover="D144FF818"><area shape="rect" coords="117,291,243,320" target="_self" href="rendezvous.php" onmouseover="CSAction(new Array(/*CMP*/'D13524E16'));return true;" csover="D13524E16"><area shape="rect" coords="81,256,240,285" target="_self" href="wallpapers.php" onmouseover="CSAction(new Array(/*CMP*/'D12878C14'));return true;" csover="D12878C14"><area shape="rect" coords="51,218,237,248" href="birthday.php" target="_self" onmouseover="CSAction(new Array(/*CMP*/'D11006F8'));return true;" csover="D11006F8"><area shape="rect" coords="84,179,240,216" target="_self" href="joinemail.php" onmouseover="CSAction(new Array(/*CMP*/'D0FF99E6'));return true;" csover="D0FF99E6"><area shape="rect" coords="144,149,241,179" href="schedule.php" target="_self" onmouseover="CSAction(new Array(/*CMP*/'D0E80F84'));return true;" csover="D0E80F84"><area shape="rect" coords="143,106,239,142" target="_self" href="girls.php" onmouseover="CSAction(new Array(/*CMP*/'D0BB7B61'));return true;" csover="D0BB7B61"></map>
		<p></p>
		
	</body>

</html>

Open in new window

Avatar of smphil

ASKER

Regardng the developer may have made the program to stop external links from being added can not be because the only one who has access to add text and stuff is the owner of the website so it is not like a public forum for people to add stuff. I just think the code is screwed up and old.
At line 13 is defined variable $lnk and then is used at lin 424. This variablke is defined depending on a query result: it corresponds to the fourth element of the result, so uyou can try to see if the 4th column of tha table belles is an url.

I'm sorry but this is the only thing I can think about...

Hope this helps

Cheers
Avatar of smphil

ASKER

It looks like line 387 displays the data Im am concerned about <?php echo $rec[3]; ?>
Is there something I can add to that echo statement to strip out this info below.

I need to strip out the "mysite.com/%5C%22"  and the "/l%5C%22" at the end"

http://mysite.com/%5C%22www.the-link-to-display.com/l%5C%22

Open in new window


So in other words strip out everything before the www in the second link leaving the( http://)
then at the end of the link to display everything after the ( .com)

Maybe we can fix this.
Your links are always like this

http://mysite.com/%5C%22www.the-link-to-display.com/l%5C%22

with only one slash before the unwanted string, or can they be also like this?

http://mysite.com/%5C%22www.the-link-to-display.com/someother/index/l%5C%22
Try this: it works in both cases:
<?php

function stringrpos($haystack,$needle,$offset=NULL)
{
    return strlen($haystack)
           - strpos( strrev($haystack) , strrev($needle) , $offset)
           - strlen($needle);
}
$lnk = "http://mysite.com/%5C%22www.the-link-to-display.com/someother/index/l%5C%22";

$lnk = substr(substr($lnk, strpos($lnk, "www")), 0, stringrpos(substr($lnk, strpos($lnk, "www")), '/'));
echo $lnk;
                                            

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Marco Gasi
Marco Gasi
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial