1 Replies - 772 Views - Last Post: 27 January 2009 - 06:30 AM

#1 rrn   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 43
  • Joined: 18-January 09

retrieving url and linking to otherpage

Posted 27 January 2009 - 03:45 AM

am working on a website in php and html..

<!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" dir="{S_CONTENT_DIRECTION}">
<head>
<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="content-language" content="{S_USER_LANG}" />
<meta name="keywords" content="{PAGE_KEYWORDS}" />
<meta name="description" content="{PAGE_DESCRIPTION}" />
<title>{PAGE_TITLE} - {SITENAME}</title>
<!--  // T_THEME_PATH , T_STYLESHEET_NAME, T_IMAGESET_PATH // -->
<link rel="stylesheet" href="{T_STYLESHEET_NAME}" type="text/css" />

<script type="text/javascript" language="javascript" src="{T_THEME_PATH}/js/functions.js"></script>
<link rel="stylesheet" href="{T_THEME_PATH}/css/css.css">
<!--[if IE]>
	<link rel="stylesheet" href="{T_THEME_PATH}/css/hack.css">
<![endif]-->
<script type="text/javascript" src="{T_THEME_PATH}/js/js.js"></script>

<script src="{T_THEME_PATH}/js/jquery.js" type="text/javascript"></script>
<link href="{T_THEME_PATH}/css/facebox.css" media="screen" rel="stylesheet" type="text/css"/>
<script src="{T_THEME_PATH}/js/facebox.js" type="text/javascript"></script> 
<script src="{T_THEME_PATH}/js/jquery.cycle.lite.js" type="text/javascript"></script>
<script src="{T_THEME_PATH}/js/jquery.metadata.js" type="text/javascript" language="javascript"></script>
<script src="{T_THEME_PATH}/js/jquery.media.js" type="text/javascript" language="javascript"></script>

<script language="javascript">
jQuery(document).ready(function($) {
  $('a[rel*=facebox]').facebox()
}) 

function slideSwitch() {
	var $active = $('#slideshow img.active');

	if ( $active.length == 0 ) $active = $('#slideshow img:last');

	var $next =  $active.next().length ? $active.next()
		: $('#slideshow img:first');

	$active.addClass('last-active');

	$next.css({opacity: 0.0})
		.addClass('active')
		.animate({opacity: 1.0}, 1000, function() {
			$active.removeClass('active last-active');
		});
}

$(function() {
	setInterval( "slideSwitch()", 5000 );
});

$(function() {
	$('a.media').media({ width: 250, height: 250, autoplay: false });
});

</script>
</head>
<body class="{S_CONTENT_DIRECTION}">
<a name="top"></a>
<div id="content">
	<div id="header">
		<div class="fr p-5 ta-r">
			<div class="mb-20">
			<a href="index.{EXT}">Home</a> <img src="{T_IMAGESET_PATH}/separat.gif" border="0" alt="" /> 
			<a href="contactus.{EXT}">Contact Us</a> <img src="{T_IMAGESET_PATH}/separat.gif" border="0" alt="" /> 
			<a href="sitemap.{EXT}">Sitemap</a>
			</div>
 			<div class="pt-25">
			<a href="/ar/"index.{EXT}"><img src="{T_IMAGESET_PATH}/arabic.gif" border="0" alt="" /></a>
			</div>
		</div>
		<div class="logo"><a href="index.{EXT}"><img src="{T_IMAGESET_PATH}/company_logo.gif" border="0" alt="" /></a></div>
	</div>
	<div class="lh-26 bg-00A fc-FFF pl-5">&nbsp;
		<!-- IF FILE_NAME != "login" -->
			<!-- BEGIN logged_in -->
			Welcome {logged_in.USERNAME} / <a href="process.{EXT}">Logout</a>
			<!-- END logged_in -->
			<!-- BEGIN admin -->
			<img src="{T_IMAGESET_PATH}/separat.gif" border="0" alt="" /> <a href="admin/">Admin CP</a>
			<!-- END admin -->
		<!-- ENDIF -->
	</div>
	<div class="mb-5" style="height:190px;">
		<div id="slideshow">
			<!-- BEGIN banner -->
			<img src="{ROOT_PATH}{banner.BANNER}" width="900" height="190" class="<!-- IF banner.S_FIRST_ROW -->active<!-- ENDIF -->" />
			<!-- END banner -->
		</div>
	</div>





above shown is my html code...
wat i want to do is...
the website has two versions ..english and arabic...
suppose my website is www.test.com
and i am currently on my english page www.test.com/site.php ..i want to link to the corresponding arabic page..ie to www.test.com/ar/site.php . . the arabic files are in the folder 'ar'..

i tried one thing
ie
from the above shown code
i replaced the line of code
<a href="/ar/"index.{EXT}"><img src="{T_IMAGESET_PATH}/arabic.gif" border="0" alt="" /></a>




with

<a href="<?php print '/ar' . $_SERVER['PHP_SELF']; ?>">




but after applying that . wen am clicking the link to arabic site.. it is linking to the same page where i am standing..
ie if i am at present in www.test.com/site.php and wen i click the link it should direct to www.test.com/ar/site.php.....
pls giv a solution ......

Is This A Good Question/Topic? 0
  • +

Replies To: retrieving url and linking to otherpage

#2 b.ihde   User is offline

  • D.I.C for life
  • member icon

Reputation: 45
  • View blog
  • Posts: 1,070
  • Joined: 29-September 08

Re: retrieving url and linking to otherpage

Posted 27 January 2009 - 06:30 AM

I guess this should be moved to the PHP Forum..
There you´ll probably get more answers..

And don´t create a new thread when you already have one with the same question!!

regards

B.Ihde

This post has been edited by b.ihde: 27 January 2009 - 06:33 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1