13zone
Профессор
- Регистрация
 - 22 Ноя 2008
 
- Сообщения
 - 203
 
- Реакции
 - 45
 
- Автор темы
 - #1
 
есть ссылки, 
/index.php?option=com_content&view=article&id=1
/index.php?option=com_content&view=article&id=2
/index.php?option=com_content&view=article&id=3
(сайт на жумле)
нужно определить по ссылке что это ИМЕННО ТА страница что нужна и вставить требуемую картинку..
пробовал так (и много раз по другому)
	
	
	
		
подскажите плиз, как же мне получить эти =1 =2 =3 и т.д.?
---------- Post added at 16:09 ---------- Previous post was at 14:40 ----------
решение нашел таким образом....
	
	
	
		
	
		
			
		
		
	
				
			/index.php?option=com_content&view=article&id=1
/index.php?option=com_content&view=article&id=2
/index.php?option=com_content&view=article&id=3
(сайт на жумле)
нужно определить по ссылке что это ИМЕННО ТА страница что нужна и вставить требуемую картинку..
пробовал так (и много раз по другому)
		PHP:
	
	switch ($option) 
{
  case 1:
   ?>
<body background="<?php echo $this->baseurl ?>/templates/ja_purity/images/list_bum.jpg">
<?
    break;
  case 'article&id=2':
    ?>
	
<body background="<?php echo $this->baseurl ?>/templates/ja_purity/images/list_poly.jpg">
    <?
    break;
  case 3:
    ?>
<body background="<?php echo $this->baseurl ?>/templates/ja_purity/images/list_shir.jpg">
    <?
    break;
  case 4:
    ?>
<body background="<?php echo $this->baseurl ?>/templates/ja_purity/images/list_laser.jpg">
    <?
    break;
  case 5:
    ?>
<body background="<?php echo $this->baseurl ?>/templates/ja_purity/images/list_mob.jpg">
    <?
    break;
  case 6:
    ?>
<body background="<?php echo $this->baseurl ?>/templates/ja_purity/images/list_rek.jpg">
    <?
    break;
  case 7:
    ?>
<body background="<?php echo $this->baseurl ?>/templates/ja_purity/images/list_foto.jpg">
    <?
    break;
  case 8:
    ?>
<body background="<?php echo $this->baseurl ?>/templates/ja_purity/images/list_project.jpg">
    <?
    break;
  case 9:
    ?>
<body background="<?php echo $this->baseurl ?>/templates/ja_purity/images/list_kont.jpg">
    <?
    break;
  case 10:
    ?>
<body background="<?php echo $this->baseurl ?>/templates/ja_purity/images/list_design.jpg">
<?
    break;
  case 0:
   ?>    
<body background="<?php echo $this->baseurl ?>/templates/ja_purity/images/list_start.jpg">
<?
}
	подскажите плиз, как же мне получить эти =1 =2 =3 и т.д.?
---------- Post added at 16:09 ---------- Previous post was at 14:40 ----------
решение нашел таким образом....
		PHP:
	
	<?php
switch ($_SERVER['REQUEST_URI']) 
{
  case '/index.php?option=com_content&view=article&id=11':
   ?>
<body background="<?php echo $this->baseurl ?>/templates/ja_purity/images/list_kont.jpg">
<style rel="stylesheet" id="" type="text/css" charset="utf-8">
#sideLeft_start {
	float: left;
	width: 397px;
	position: absolute;
	top: 0;
	background-image: url(../image/polosa_kont.jpg);
	background-repeat: no-repeat;
	height: 800px;}
</style>
<?
    break;
  case '/index.php?option=com_content&view=article&id=2':
    ?>
	
<body background="<?php echo $this->baseurl ?>/templates/ja_purity/images/list_design.jpg">
<style rel="stylesheet" id="" type="text/css" charset="utf-8">
#sideLeft_start {
	float: left;
	width: 397px;
	position: absolute;
	top: 0;
	background-image: url(../image/polosa_design.jpg);
	background-repeat: no-repeat;
	height: 800px;}
</style>
    <?
    break;
  case '/index.php?option=com_content&view=article&id=3':
    ?>
<body background="<?php echo $this->baseurl ?>/templates/ja_purity/images/list_poly.jpg">
<style rel="stylesheet" id="" type="text/css" charset="utf-8">
#sideLeft_start {
	float: left;
	width: 397px;
	position: absolute;
	top: 0;
	background-image: url(../image/polosa_poly.jpg);
	background-repeat: no-repeat;
	height: 800px;}
</style>
    <?
    break;
  case '/index.php?option=com_content&view=article&id=4':
    ?>
<body background="<?php echo $this->baseurl ?>/templates/ja_purity/images/list_shir.jpg">
<style rel="stylesheet" id="" type="text/css" charset="utf-8">
#sideLeft_start {
	float: left;
	width: 397px;
	position: absolute;
	top: 0;
	background-image: url(../image/polosa_shir.jpg);
	background-repeat: no-repeat;
	height: 800px;}
</style>
    <?
    break;
  case '/index.php?option=com_content&view=article&id=5':
    ?>
<body background="<?php echo $this->baseurl ?>/templates/ja_purity/images/list_laser.jpg">
<style rel="stylesheet" id="" type="text/css" charset="utf-8">
#sideLeft_start {
	float: left;
	width: 397px;
	position: absolute;
	top: 0;
	background-image: url(../image/polosa_laser.jpg);
	background-repeat: no-repeat;
	height: 800px;}
</style>
    <?
    break;
  case '/index.php?option=com_content&view=article&id=6':
    ?>
<body background="<?php echo $this->baseurl ?>/templates/ja_purity/images/list_mob.jpg">
<style rel="stylesheet" id="" type="text/css" charset="utf-8">
#sideLeft_start {
	float: left;
	width: 397px;
	position: absolute;
	top: 0;
	background-image: url(../image/polosa_mob.jpg);
	background-repeat: no-repeat;
	height: 800px;}
</style>
    <?
    break;
  case '/index.php?option=com_content&view=article&id=7':
    ?>
<body background="<?php echo $this->baseurl ?>/templates/ja_purity/images/list_rek.jpg">
<style rel="stylesheet" id="" type="text/css" charset="utf-8">
#sideLeft_start {
	float: left;
	width: 397px;
	position: absolute;
	top: 0;
	background-image: url(../image/polosa_rek.jpg);
	background-repeat: no-repeat;
	height: 800px;}
</style>
    <?
    break;
  case '/index.php?option=com_content&view=article&id=8':
    ?>
<body background="<?php echo $this->baseurl ?>/templates/ja_purity/images/list_bum.jpg">
<style rel="stylesheet" id="" type="text/css" charset="utf-8">
#sideLeft_start {
	float: left;
	width: 397px;
	position: absolute;
	top: 0;
	background-image: url(../image/polosa_bum.jpg);
	background-repeat: no-repeat;
	height: 800px;}
</style>
    <?
    break;
  case '/index.php?option=com_content&view=article&id=9':
    ?>
<body background="<?php echo $this->baseurl ?>/templates/ja_purity/images/list_foto.jpg">
<style rel="stylesheet" id="" type="text/css" charset="utf-8">
#sideLeft_start {
	float: left;
	width: 397px;
	position: absolute;
	top: 0;
	background-image: url(../image/polosa_foto.jpg);
	background-repeat: no-repeat;
	height: 800px;}
</style>
    <?
    break;
  case '/index.php?option=com_content&view=article&id=10':
    ?>
<body background="<?php echo $this->baseurl ?>/templates/ja_purity/images/list_project.jpg">
<style rel="stylesheet" id="" type="text/css" charset="utf-8">
#sideLeft_start {
	float: left;
	width: 397px;
	position: absolute;
	top: 0;
	background-image: url(../image/polosa_project.jpg);
	background-repeat: no-repeat;
	height: 800px;}
</style>
<?
    break;
  case 0:
   ?>    
<body background="<?php echo $this->baseurl ?>/templates/ja_purity/images/list_start.jpg">
<style rel="stylesheet" id="" type="text/css" charset="utf-8">
#sideLeft_start {
	float: left;
	width: 397px;
	position: absolute;
	top: 0;
	background-image: url(../image/polosa_index.jpg);
	background-repeat: no-repeat;
	height: 800px;}
  </style>  
<?
}
?>
многовато конечно, но по другому неполучилось...
	
				