»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 06-21-2003, 12:23 PM   #1 (permalink)
Registered User
 
Join Date: Jan 2003
Location: L.A.
Posts: 15
gmarik is on a distinguished road
Send a message via ICQ to gmarik
Media Advanced Designer Portfolio

I realised, that every designer needs a good portfolio.
Than I started to make it. Here is what I have now.
There must be fore modes, with columns changing like this:

PHP Code:
1
2
3
4
5
6

AND

2
4
6

AND

3
6

AND

4
8
9
1011/12 
In these examples slash is eval to class=\"Boxright\" (the dotted line in the screenshot). What do I need to change in my code?


PHP Code:
<table align="center" cellpadding="0" cellspacing="4" width="540">
<?
$cols 
"2"// 2 row mode

$query "SELECT * FROM imglib WHERE cat='$c' ORDER BY $so $o LIMIT $initialPhoto$it";
if(!
$result mysql_query($query)) echo "Query failed"
while (
$row mysql_fetch_array($resultMYSQL_ASSOC)) { 

    
$data $row["url"]; 
    if (
$i == 0) { 
        echo 
"<tr>"
    } 

    if ((
$i $cols) == ) { // if ($i == $cols)
        
echo "</tr><tr>"
        echo 
"<tr>";
        echo 
"<td width=\"540\" height=\"30\" colspan=\"2\" class=\"BoxBellow\">";
        echo 
"<p>&nbsp;</p>";
        echo 
"</td>";
        echo 
"</tr>";
        
$i 0;    
    } 

    if ((
1&$i)) { // odd shows no dotted line
    
echo "<td width=\"270\">";
    } 
    if (!(
1&$i)) { // even shows a dotted line
    
echo "<td width=\"270\" class=\"Boxright\">";
    }
    
itemplaceholder();
    echo 
"</td>";
    
$i++; 
    } 

    if (
$i != $cols)
    echo 
"</tr>";

    
?>
    </table>
The MySQL database. Works ok.

PHP Code:
CREATE TABLE imglib (
  
id int(10unsigned NOT NULL auto_increment,
  
cat varchar(21) default 'gif',
  
type varchar(21NOT NULL default 'Website template',
  
desc text NOT NULL,
  
url varchar(20) default NULL,
  
price tinytext NOT NULL,
  
author varchar(255) default 'Tagore',
  
timestamp timestamp(14NOT NULL,
  
PRIMARY KEY  (id)
TYPE=MyISAM;


INSERT INTO imglib VALUES (1'gif''Vector logo''''s001''$25''MGJ'20030511040034);
INSERT INTO imglib VALUES (2'gif''Vector logo''''s002''FREE''MGJ'20030511194715);
INSERT INTO imglib VALUES (3'gif''Vector logo''''s003''$30''MGJ'20030510181227); 
Nothing works, just the page numeration (separate) works, but no table displayed (<table> tags are THERE). The other variant code:

PHP Code:
$columns 2
$counter 
0;
echo 
"<tr>";
while (
$row mysql_fetch_array($resultMYSQL_ASSOC)) { 
   if (
$counter % ($columns++)) { // Row change
      
echo "</tr><tr>";
   } elseif ((
$counter % ($columns++)) == $columns) { // Last td on a row
      
echo "<td>"
      
itemplaceholder();
      echo 
"</td>"
   
} else { // Normal td
      
echo "<td>".$row['ID']."</td>";
      echo 
"<td><img src=\"img/divider.gif\" /></td>";
   }
   
$counter++;
}
echo 
"</tr>"

__________________
[FONT=arial][b][COLOR=darkred]Want a dynamic site with nice graphics? Solutions for the new age. [i]Marco Tech[/i][/COLOR] [/b][/FONT]
[COLOR=darkblue][URL=http://www.dizain.info]vBulletin skins[/URL] | [URL=http://www.dizain.info]Button sets[/URL] | [URL=http://share.studio.adobe.com/axBrowseSubmit.asp?r=0&d=39335&sortby1=w&sortorder1=d]Free Photoshop addons[/URL] | [URL=http://forum.yaxay.com/showthread.php?s=&threadid=16807]Web templates [/URL] | [URL=http://gmarik.yaxay.com/]PHP[/URL][/COLOR]
gmarik is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 09:22 PM.