intervencija na PHP fajlu

gorki2

Zainteresovan član
Poruka
305
Treba da u prvi red tabele, koja ima 2 kolone, dodam tekst (1 expire) i (2 description).
Ne znam kako da to izvedem. Može li neko da pomogne?

Kod:
 // output on screen

                ?>
     <table width="100%" border="0" cellspacing="0" cellpadding="0">
		<?php
		
            $rum = count($rows);
			$i = 1;	
	foreach  ($rows as $row) {
				$iparams = new mosParameters( $row->params );	
				// builds the linked event title ;
              	$link = $row->url;
               	// differentiate between external or internal link;
				if ($link){
							$txt = '<a href="'. $link .'" target="_blank" class="'. $menuclass .'">'. $row->description .'</a>';                          
							}
                else {
					$txt = '<a href="index.php?option=com_eventing&task=view&id='.$row->id.'" target="_self" class="'. $menuclass .'">'. $row->description .'</a>';
                     }


			?>


			<tr>


			<td align="left" valign="top">
                    
			<?php 
			// shows the starting and ending date;
	


			

           echo $startdate; 
		   // is there an ending date?
		   if ($row->enddate > $row->startdate) {$enddate =date($dateformat,strtotime($row->enddate));




             echo " ".$enddate;
              }?>

             <br><br>

			</td>

			<td valign="top">
            <?php
			// checks if the event image is activated
			
			if ( $evimageset == 1 ) {
				
				echo '<img src="';
				echo $iparams->get( 'evimage' );
				if ( $evimgwidth <> 0 ) {
				echo '" width="';
				echo $evimgwidth;
				}
				if ( $evimgheigth <> 0 ) {
				echo '" heigth="';
				echo $evimgheigth;
				}
				echo '" align="';
				echo $evimgalign;
				echo '">';
			}
			
			 
			// shows the linked event title and the location;
			echo $txt; ?><br>
            <?php echo $row->location; ?>


				</td>

			</tr>
 
Fiksni tekst?
Kod:
// output on screen

				?>
	 <table width="100%" border="0" cellspacing="0" cellpadding="0">
   [color=Red] <tr>
		<td align="left" valign="top">Expire</td>
		<td valign="top">Description[/color][color=Red]</td>[/color]
[color=Red] 	</tr>[/color]
		<?php
		
			$rum = count($rows);
			$i = 1;	
	foreach  ($rows as $row) {
				$iparams = new mosParameters( $row->params );	
				// builds the linked event title ;
				  $link = $row->url;
				   // differentiate between external or internal link;
				if ($link){
							$txt = '<a href="'. $link .'" target="_blank" class="'. $menuclass .'">'. $row->description .'';						  
							}
				else {
					$txt = '<a href="index.php?option=com_eventing&task=view&id='.$row->id.'" target="_self" class="'. $menuclass .'">'. $row->description .'';
					 }


			?>


			<tr>


			<td align="left" valign="top">
					
			<?php 
			// shows the starting and ending date;
	


			

		   echo $startdate; 
		   // is there an ending date?
		   if ($row->enddate > $row->startdate) {$enddate =date($dateformat,strtotime($row->enddate));




			 echo " ".$enddate;
			  }?>

			 <br>


			</td>

			<td valign="top">
			<?php
			// checks if the event image is activated
			
			if ( $evimageset == 1 ) {
				
				echo '<img src="';
				echo $iparams->get( 'evimage' );
				if ( $evimgwidth <> 0 ) {
				echo '" width="';
				echo $evimgwidth;
				}
				if ( $evimgheigth <> 0 ) {
				echo '" heigth="';
				echo $evimgheigth;
				}
				echo '" align="';
				echo $evimgalign;
				echo '">';
			}
			
			 
			// shows the linked event title and the location;
			echo $txt; ?><br>
			<?php echo $row->location; ?>


				</td>

			</tr>
 
Hvala bojane i sam sam u medjuvremenu tako resio problem. Strahovao sam da ce se ovaj brojac redova ispod da poblesavi ako dodam red iznad njega pa zato nisam ranije probao tu jednostavnu varijantu. :roll: PHP mi izgleda tako strasno da se jezim kad nesto moram prckati po njemu ali eto. Hvala u svakom slucaju.
 

Back
Top