Jump to content

page link


scarezekiel

Recommended Posts

ok so now all my logo link goes to the same page..i dont know how to fix it.i want all of them connect to a link(each of the company has their own company_link id) which i named company_link which is already in the database..so i need to call it.there are about 20 total logos..

 

except for the $company id=33..just remain that one..

 





<?
if(isset($_GET[ttid])) {
$ttid = $_GET[ttid];
}

$connection=mysql_connect("$server", "$username", "$password")
or die("Could not establish connection");
mysql_select_db($database_name, $connection)
or die ("Could not select database");


$query = "select master_event.* , 
(DATE_FORMAT(event_datefrom, '%d %M %Y')) as datefrom,
(DATE_FORMAT(event_dateto, '%d %M %Y')) as dateto,
ucase(event_name) as eventname
from master_event
where master_event.event_id = '$ttid '";
$result=mysql_query($query);
while($row = mysql_fetch_array($result)){
$eventname = $row['eventname'];
$eventdesc = $row['event_desc'];
$companydescription = $row['company_description'];
$eventvenue = $row['event_venue'];
$eventfee = $row['event_fee'];
$datefrom = $row['datefrom'];
$dateto = $row['dateto'];

echo "<font color='#000000'  face='arial' ><b> $eventname </b> </font> <br>";
echo "<font color='#000000'  face='arial' ><i>Date</i> : $datefrom - $dateto <br>";
echo "<i>Venue</i> : $eventvenue <br>";

$querypstype = "SELECT DISTINCT master_pstype.pstype_id,  pstype_desc FROM master_pstype
		INNER JOIN master_psevent ON master_psevent.pstype_id= master_pstype.pstype_id
		where master_psevent.event_id = '$ttid'
		ORDER BY pstype_id";

$resultpstype=mysql_query($querypstype);
while($rowpstype = mysql_fetch_array($resultpstype)){
$pstypeid = $rowpstype['pstype_id'];
$pstypedesc = $rowpstype['pstype_desc'];
echo "<br><font color='#8B3A3A' size='1' face='georgia' ><b><i>$pstypedesc</i></b></font> <br>";

$queryps = "SELECT master_psevent.*, pstype_desc, company_name, company_link, company_description, logo_filename FROM master_psevent
		LEFT JOIN master_pstype ON master_psevent.pstype_id = master_pstype.pstype_id
		LEFT JOIN master_ps ON master_ps.ps_id = master_psevent.ps_id
		WHERE master_psevent.event_id = '$ttid' and master_pstype.pstype_id= '$pstypeid' 
		ORDER BY pstype_desc,company_name ";

$resultps=mysql_query($queryps);
while($rowps = mysql_fetch_array($resultps)){
$companyname = $rowps['company_name'];
$companyid = $rowps['ps_id'];
$companylinkori = $rowps['company_link'];
$companydescription = $rowps['company_description'];

if ($companyid==33){

	$companylink = "http://(confidential)/index.php?view=describe";

} else {
		if ($companylinkori <> "") {
			//$companylink = "http://".$rowps['company_link'];
			$companylink = "http://(confidential)/index.php?view=".$companyid;
		}
		else
		{
			$companylink = "";
		}		
}


$logopath = $rowps['logo_filename']; 

if ($companylink <> ""){
echo "<font color='#4A708B'  face='arial' ><a href=$companylink style=\"color:white;text-decoration: none; \" target='new'><img src=".$logo_dir."/".$logopath." width=\"15%\"></img></a>&nbsp&nbsp</font>";

}
else
{
echo "<font color='#4A708B'  face='arial' ><img src=".$logo_dir."/".$logopath." width=\"15%\"></img>&nbsp&nbsp</font>";
}
?>

<br>
<?

}
echo "<br>";

}

}



?>

post-131669-1348240331839_thumb.jpg

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.