SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member
    Join Date
    Apr 2004
    Location
    Hell
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy IE goin to kill me :((

    Hi, can anyone help me this problem

    First, take a look at this picture: http://tanavn.info/tmp/ie.JPG

    end then this's the site viewing in FireFox: http://tanavn.info/tmp/ff.JPG


    WHY IE display like that ( , FireFOx is very ok (
    if I display 20 record it'll create 20 BLANK LINE (

    This is the source code

    salons4sale.php
    Code:
    //header
    	$header = & new Template('header');
    	$header->set('title', $itech->vars['site_name']);
    	
    	//left
    	$left = & new Template('left');
    	$left->set('userbox', $print->show_userbox());
    	$left->set('statistic', $print->statistics());
    	
    	//top
    	$top = & new Template('top');
    	$top->set('title', $itech->vars['site_name']);
    	
    	//main
    	$main = & new Template('salons4sale');
    	$main->set('list_salons', $print->list_salons());
    	
    	//right
    	$bottom = & new Template('right');
    	$bottom->set('title', $itech->vars['site_name']);
    	
    	$DB->close_db();
    	
    	//footer
    	$footer = & new Template('footer');
    	$footer->set('title', $itech->vars['site_name']);
    	
    	//all
    	$tpl = & new Template();
    	$tpl->set('header', $header);
    	$tpl->set('left', $left);
    	$tpl->set('top', $top);
    	$tpl->set('main', $main);
    	$tpl->set('right', $bottom);
    	$tpl->set('footer', $footer);
    	echo $tpl->fetch('home');
    this is the function list_salon

    Code:
    //return last 20 salons for sale
    	function list_salons(){
    		global $DB, $itech, $print;
    		
    		//prepare to paging result
    		$paging = new Pager;
    		//extra link to detail area
    		$paging->extLink = 'act=salons4sale';
    		//how many project to display per page
    		$limit = $itech->vars['num_salon_per_page'];
    		// Find the start depending on $itech->input['page'] (declared if it's null)
    		$start = $paging->findStart($limit); 
    		
    		//how many salons that we have?
    		$q = "SELECT SalonID, SalonName, DatePost, City, StateID, Views FROM ".$itech->vars['table_salons']." WHERE CURDATE() <= DateEnd ORDER BY DatePost DESC, SalonID DESC";
    		$query = $DB->query($q);
    		//get the numbers of results
    		$count = $DB->get_num_rows($query);
    		$DB->free_result($query);
    		if ($count==0){
    			$print->redirect('?act=contact', $lang['salon_fail'] ,'main page');
    		}
    		else{
    			// Find the number of pages based on $count and $limit
    			$pages = $paging->findPages($count, $limit); 
    			// Now we use the LIMIT clause to grab a range of rows
    			$q .= " LIMIT ".$start.", ".$limit; 
    			//execute the query
    			$query = $DB->query($q);
    			
    			$tpl = & new Template('s_salon');
    			$data = '';
    			$ct = 1 + $limit * ($itech->input['page'] - 1);
    			while ($result = $DB->fetch_row($query)){
    				$tpl->set('num', $ct);
    				$tpl->set('sid', $result['SalonID']);
    				$tpl->set('sname', $result['SalonName']);
    				$tpl->set('sdate', $this->mydate($result['DatePost']));
    				$tpl->set('scity', $result['City']. '/' .$this->get_dropdown_states($result['StateID'], 1));
    				$tpl->set('sviews', $result['Views']);
    				$data .= $tpl->fetch('s_salon');
    				
    				$ct += 1;
    			}
    			if ($pages > 1){
    				$data .= ($pages>5) ? '<tr><td colspan="4"><div align="center">('.$pages.')&nbsp;'.$paging->pageList($itech->input['page'], $pages).'</div><br></td></tr>' :
    									'<tr><td colspan="4"><div align="center">'.$paging->pageList($itech->input['page'], $pages).'</div><br></td></tr>';
    			}
    			$DB->free_result($query);
    		}
    		return $data;
    	}
    this is my template class
    Code:
    class Template {
        var $vars, $file;
    
        function Template($file = null) {
            $this->file = $file;
        }
    
        function set($name, $value) {
            $this->vars[$name] = is_object($value) ? $value->fetch() : $value;
        }
    
        function fetch($file = null) {
            global $itech, $lang;
            if(!$file) $file = $this->file;
    		
    		extract($this->vars);
            ob_start();
            include($itech->vars['templateFolder'].$file.$itech->vars['templateType']);
            $contents = ob_get_contents();
            ob_end_clean();
            return $contents;
        }
    }
    this is a part of salons4sale template file
    Code:
    <tr>
                      <td><table width="480" align="center" cellpadding="3" cellspacing="1" bgcolor="#EBEFF5" class="form">
                        <tr bgcolor="#728AB8">
                          <td><div align="center" class="style1"><strong>#</strong></div></td>
                          <td height="22" bgcolor="#728AB8"><div class="style1" style="padding-left:5 "><strong><?=$lang['salon_name']?></strong></div></td>
                          <td><div align="center" class="style1"><strong><?=$lang['salon_date']?></strong></div></td>
                          <td><div align="center" class="style1"><strong><?=$lang['salon_city']?></strong></div></td>
                        </tr>
                        <?=$list_salons?>
                      </table>
                      </td>
                    </tr>
    this is the template file s_salon.htm that used to loop in the list_salon function
    Code:
    <tr bgcolor="#FFFFFF">
      <td align="center"><?=$num?></td>
      <td><a href="?act=viewsalon&id=<?=$sid?>"><?=$sname?></a></td>
      <td align="center"><?=$sdate?></td>
      <td align="center"><?=$scity?></td>
    </tr>

  2. #2
    SitePoint Wizard Young Twig's Avatar
    Join Date
    Dec 2003
    Location
    Albany, New York
    Posts
    1,355
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This isn't a PHP problem as PHP is run server-side. Try checking the HTML that is outputted and posting that in the HTML forum.

  3. #3
    SitePoint Wizard Dylan B's Avatar
    Join Date
    Jul 2004
    Location
    NYC
    Posts
    1,150
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try the HTML/CSS forum. They'l help you better.

  4. #4
    SitePoint Member
    Join Date
    Apr 2004
    Location
    Hell
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry

    Quote Originally Posted by Young Twig
    This isn't a PHP problem as PHP is run server-side. Try checking the HTML that is outputted and posting that in the HTML forum.
    the outputted html is ok so that firefox can display very good, I still dunno why

  5. #5
    &lt;!-- Insert thoughts here --&gt; pitcher17's Avatar
    Join Date
    Apr 2004
    Location
    The great white north
    Posts
    293
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    At a glance it looks like a bug that you would get if you were using css and Divs for the layout and the amount of horizontal space that you had for the middle section exceeded what was available. Therefore the browser was unable to float the two areas side by side and had to bump the middle part below the part on the left.
    The more time I save by not planning and documenting,
    the more time I have left to debug.


  6. #6
    SitePoint Evangelist
    Join Date
    Feb 2005
    Posts
    581
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Please do not cross-post. If you need a thread moved, PM a moderator and they will do it for you.

    Edit:

    Thanks to the mod who took care of this!
    I will not flame the newbies,
    I will not flame the newbies,
    I will flame the newbies...
    Table free is the way to be!

  7. #7
    SitePoint Member
    Join Date
    Apr 2004
    Location
    Hell
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OMG, what will I do now

  8. #8
    SitePoint Member
    Join Date
    Apr 2004
    Location
    Hell
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    then noone can help me


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •