logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > PHP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 11-22-2016, 08:19 AM   #1
JoeH
 
Join Date: Feb 2012
Location: Shrewsbury UK
Posts: 30
Default Lost in php

Hi,

Hope you can help please. I inherited some great PHP scripts that work on a website. I've recently given the site and make over and now i have 'issues' - which i need some advice on please.

Here -you will see that with some very clever PHP database work. It lists links to various product data sheets by brands. On this page the brands listed down the left hand side look higher than all the others.

Here - provis the brands on the page look better - all level - but I've lost some. For example no Addlestone, Bosch, FLIR and GJD.

I guess that the php files in the background are working fine as it's showing most of the brand name and the links work. So what have i done to make solve the appearance issue but lose some of the brand names. Hope you experts can help please.

Many thanks.

Joe.
--

Last edited by edbr; 11-22-2016 at 12:46 PM..
JoeH is offline   Reply With Quote
Old 11-22-2016, 12:48 PM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

i deleted the links as they dont help. if the php file are different or the databsses then thats what needs to be addressed. so if you need help,you shpuld look or post the differing files
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 11-22-2016, 02:29 PM   #3
JoeH
 
Join Date: Feb 2012
Location: Shrewsbury UK
Posts: 30
Default

Hi, many thanks for your reply - is this what you mean/need? This is the script that shows all the brand - but the left hand
ones do not sit correctly.


<div class="container">
<div class="page-header">
<h1>Pro-Vision brands</h1>
<div class="headerdivider">
</div>
</div>
<div class="row">
<div class="col-md-12">
<p>To access manufacturers data sheets<br/><br/>click on the logo below or the company name</p>
</div>

<div class="container">
<?php
$man = DB_DataObject::factory('Manufacturers');
$man->enable = 1;
$man->orderBy('name');
$man->find();
while($man->fetch())
{

?>
<table class="table table-bordered"><table width="950">
<tr>
<th width="170" scope="col">&nbsp;</th>
<th width="20" scope="col">&nbsp;</th>
<th width="170" scope="col">&nbsp;</th>
<th width="20" scope="col">&nbsp;</th>
<th width="170" scope="col">&nbsp;</th>
<th width="20" scope="col">&nbsp;</th>
<th width="170" scope="col">&nbsp;</th>
<th width="20" scope="col">&nbsp;</th>
<th width="170" scope="col">&nbsp;</th>
<th width="20" scope="col">&nbsp;</th>
</tr>
<tr>
<td height="159">
<?php echo "<a href='pdfList.php?mid=$man->id'>";
echo "<img src='image.php?tbl=manufacturers&id=$man->id' border='0' width='110'>";
echo "</a>";
?>
<br/>
<?php
echo "<a href='pdfList.php?mid=$man->id'>";
echo stripSlashes($man->name);

echo "</a>";
?></td>
<td>&nbsp;</td>
<td>
<?php
if($man->fetch()){
?>
<br/>
<?php echo "<a href='pdfList.php?mid=$man->id'>";
echo "<img src='image.php?tbl=manufacturers&id=$man->id' border='0' width='110'>";
echo "</a>";
?>
<br/>
<?php
echo "<a href='pdfList.php?mid=$man->id'>";
echo stripSlashes($man->name);


echo "</a>";
?><br/>
<?php
}
?> </td>
<td>&nbsp;</td>
<td><?php
if($man->fetch()){
?>
<br/>
<?php echo "<a href='pdfList.php?mid=$man->id'>";
echo "<img src='image.php?tbl=manufacturers&id=$man->id' border='0' width='110'>";
echo "</a>";
?>
<br/>
<?php
echo "<a href='pdfList.php?mid=$man->id'>";
echo stripSlashes($man->name);


echo "</a>";
?><br/>
<?php
}
?> </td>
<td>&nbsp;</td>
<td><?php
if($man->fetch()){
?>
<br/>
<?php echo "<a href='pdfList.php?mid=$man->id'>";
echo "<img src='image.php?tbl=manufacturers&id=$man->id' border='0' width='110'>";
echo "</a>";
?>
<br/>
<?php
echo "<a href='pdfList.php?mid=$man->id'>";
echo stripSlashes($man->name);


echo "</a>";
?><br/>
<?php
}
?> </td>
<td>&nbsp;</td>
<td><?php
if($man->fetch()){
?>
<br/>
<?php echo "<a href='pdfList.php?mid=$man->id'>";
echo "<img src='image.php?tbl=manufacturers&id=$man->id' border='0' width='110'>";
echo "</a>";
?>
<br/>
<?php
echo "<a href='pdfList.php?mid=$man->id'>";
echo stripSlashes($man->name);


echo "</a>";
?><br/>
<?php
}
?> </td>
<td>&nbsp;</td>
</tr>
<tr>
<td><br/></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
<?php
}
?>
<br/><br/>


</div>
</div>
</div>


This is the script that sits better - but does not 'find' all the brands. There is a difference with the script after the table widths
it includes this extra coding - but i don't know what it means or if this is the element that is causing the problem:-

The extra script reads:

<?php
if($man->fetch()){
?>
<br/>
________

<div class="container">
<div class="page-header">
<h1>Pro-Vision brands</h1>
<div class="headerdivider">
</div>
</div>
<div class="row">
<div class="col-md-12">
<p>To access manufacturers data sheets<br/><br/>click on the logo below or the company name</p>
</div>

<div class="container">
<?php
$man = DB_DataObject::factory('Manufacturers');
$man->enable = 1;
$man->orderBy('name');
$man->find();
while($man->fetch())
{

?>
<table class="table table-bordered"><table width="950">
<tr>
<th width="170" scope="col">&nbsp;</th>
<th width="20" scope="col">&nbsp;</th>
<th width="170" scope="col">&nbsp;</th>
<th width="20" scope="col">&nbsp;</th>
<th width="170" scope="col">&nbsp;</th>
<th width="20" scope="col">&nbsp;</th>
<th width="170" scope="col">&nbsp;</th>
<th width="20" scope="col">&nbsp;</th>
<th width="170" scope="col">&nbsp;</th>
<th width="20" scope="col">&nbsp;</th>
</tr>
<tr>
<td height="159"><?php
if($man->fetch()){
?>
<br/>
<?php echo "<a href='pdfList.php?mid=$man->id'>";
echo "<img src='image.php?tbl=manufacturers&id=$man->id' border='0' width='110'>";
echo "</a>";
?>
<br/>
<?php
echo "<a href='pdfList.php?mid=$man->id'>";
echo stripSlashes($man->name);

echo "</a>";
?></td>
<td>&nbsp;</td>
<td>
<?php
if($man->fetch()){
?>
<br/>
<?php echo "<a href='pdfList.php?mid=$man->id'>";
echo "<img src='image.php?tbl=manufacturers&id=$man->id' border='0' width='110'>";
echo "</a>";
?>
<br/>
<?php
echo "<a href='pdfList.php?mid=$man->id'>";
echo stripSlashes($man->name);


echo "</a>";
?><br/>
<?php
}
?> </td>
<td>&nbsp;</td>
<td><?php
if($man->fetch()){
?>
<br/>
<?php echo "<a href='pdfList.php?mid=$man->id'>";
echo "<img src='image.php?tbl=manufacturers&id=$man->id' border='0' width='110'>";
echo "</a>";
?>
<br/>
<?php
echo "<a href='pdfList.php?mid=$man->id'>";
echo stripSlashes($man->name);


echo "</a>";
?><br/>
<?php
}
?> </td>
<td>&nbsp;</td>
<td><?php
if($man->fetch()){
?>
<br/>
<?php echo "<a href='pdfList.php?mid=$man->id'>";
echo "<img src='image.php?tbl=manufacturers&id=$man->id' border='0' width='110'>";
echo "</a>";
?>
<br/>
<?php
echo "<a href='pdfList.php?mid=$man->id'>";
echo stripSlashes($man->name);


echo "</a>";
?><br/>
<?php
}
?> </td>
<td>&nbsp;</td>
<td><?php
if($man->fetch()){
?>
<br/>
<?php echo "<a href='pdfList.php?mid=$man->id'>";
echo "<img src='image.php?tbl=manufacturers&id=$man->id' border='0' width='110'>";
echo "</a>";
?>
<br/>
<?php
echo "<a href='pdfList.php?mid=$man->id'>";
echo stripSlashes($man->name);


echo "</a>";
?><br/>
<?php
}
?> </td>
<td>&nbsp;</td>
</tr>
<tr>
<td><br/></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
<?php
}
?>
<?php
}
?>
<br/><br/>


</div>
</div>
</div>

Thanks.


Joe.
--
JoeH is offline   Reply With Quote
Old 11-22-2016, 02:43 PM   #4
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

im not very familiar with PEAR framework but ill have a loom when im at a desktop tomorrow
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 11-23-2016, 01:32 AM   #5
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

It looks you are selecting from table manufacturers with conditions by id matching $man so all i can suggest is checking your database as per ID are correct or try selecting without a condition.
PEAR is definitely not for me sorry best i can do.

This is odd to me, not sure why $man is specified as 1, might be some kind of PEAR magic though
Code:
$man->enable = 1;
also you have to check the object which i assume is the select statement
Code:
$man = DB_DataObject::factory('Manufacturers');
https://pear.php.net/manual/en/packa...ro-purpose.php
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas

Last edited by edbr; 11-23-2016 at 01:53 AM..
edbr is offline   Reply With Quote
Old 11-23-2016, 01:49 AM   #6
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

another thing i would try, re table dimensions is just to eco the reults in a table without any sizes , you can then if all is good style the tables ( <tr><td> ) in a css class




[/CODE]
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 11-23-2016, 01:43 PM   #7
JoeH
 
Join Date: Feb 2012
Location: Shrewsbury UK
Posts: 30
Default

Excellent - many thanks for your time.

I'll take your advice and look into the elements you've identified.

Again, many thanks.

Joe.
JoeH is offline   Reply With Quote
Old 11-24-2016, 12:56 AM   #8
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

welcome , i would be interested to know how this develops. Even though i have avoided PEAR (except for trying the mail function ) it is interesting.
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:49 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com