Jump to content

XML Parsing Error: junk after document element


xhelle

Recommended Posts

Hi to all,

 

During I click the more button,  I got this error: XML Parsing Error: junk after document element. Can somebody pinpoint why this error showed. Here is my code. Thanks in advance.

 

 

PHP code:

    public function front2()
    {   
        $session = Presto_Filter::load('UserAuth');
        $user_id = $session->check();
        
        $view = new Presto_View();
        $view->title = 'KText Featured Artist';        
        $view->selected = $this->params['artist_id'];        
        $all_artist = Artist::getAllArtist($user_id, 7, 6, $this->params['artist_id']);

        if ($this->params['artist_id'] > 0)
        {
            $selected_artist = Artist::getArtist($this->params['artist_id']);
            $all_artist = array_merge($selected_artist, $all_artist);
        }

        $view->top_pick = $all_artist;
        $view->user_id = $user_id;        
        $all_artist = Artist::getAllArtist($user_id, 8, 7);
        if (count($all_artist) > 7) 
            $view->moreArtist = true;

        // get the list of artist theme
        $view->show_themes = true;
        $view->themes = Theme::getAllTheme($user_id, 3);
        $all_theme = Theme::getAllTheme($user_id);
        if (count($all_theme) <= 0)
            $view->show_themes = false;
        if (count($all_theme) > 3) 
            $view->moreThemes = true;     
                  
        return $view;
    }
    

 

1 PHTML CODE:

<? Presto_Helper::load('common/header.phtml'); ?>

<? if ($user_id != 0) { ?>
<div class="center">
<p>
<a href="inbox">Inbox (<?= $new_count ?> New Messages)</a>
</p>
<p>
Gusto mo pa ng mas maraming ka-Ktext?<br/>
Walang problema yan!
</p>
</div>
<? } else { ?>
<p>
<div class="">
Gusto mo bang maging ka-text si Kris Aquino o si Piolo Pascual? Your favorite ABS-CBN celebrities are now a click away! Already subscribed? Click <a href="login">here</a>
</div>
</p>
<? } ?>

<p>
<div class="header">TOP PICKS</div>
</p>

<div>
Choose 2 artists from the list:
<br />

<form method="post" action="artist/subscribe">
<table>
<?= Helper_KText::artistCheckBox($top_pick) ?>
</table>

<p>
<? if ($more) { ?>
<input type="hidden" name="page" value="/artist/theme" />
<input type="submit" name="more" value="More" /><br/>
<a href="artist/theme">More</a><br />
<? } ?>
<input type="checkbox" name="agree" value="1" />I agree to the End User Agreement
</p>

<p>
<input type="submit" value="Subscribe" />
<br />
($2.99/Month)*
</p>
</form>

</div>

<? Presto_Helper::load('common/footer.phtml'); ?>

 

2 PHTML CODE:

<? Presto_Helper::load('common/header.phtml'); ?>

<? if ($user_id != 'NOMSISDN') { ?>
<? } else { ?>
<? } ?>

<p>
<div class="header">FEATURED ARTISTS</div>
</p>

<div>
Choose 2 artists from the list:
<br />

<form method="post" action="artist/subscribe">
<table>
<?= Helper_KText::artistCheckBox($top_pick, $selected) ?>
</table>

<p>
<? if ($moreArtist) { ?>
<input type="hidden" name="page" value="/artist/1" />
<input type="submit" name="more" value="More" /><br/>
<a href="artist">More</a><br />
<? } ?>
<input type="checkbox" name="agree" value="1" />I agree to the End User Agreement
</p>

<p>
<input type="submit" value="Subscribe" />
<br />
($2.99/Month)*
</p>
</form>

</div>


<? if ($show_themes) { ?>
<p>
Oh, na-hihirapan ka bang pumili? Pumili na lang ng Ka-Ktext Artista Theme
</p>

<p>
<div class="header">KTEXT ARTISTA THEME</div>
</p>

<form method="post" action="theme/subscribe">

<table>
<?= Helper_KText::themeRadio($themes); ?>
</table>


<p>
<? if ($moreThemes) { ?>
<a href="theme">More</a><br />
<? } ?>

<input type="checkbox" name="agree" value="1" />I agree to the End User Agreement
</p>

<p>
<input type="submit" value="Subscribe" />
<br />
($2.99/Month)*
</p>

</form>
<? } ?>

<? Presto_Helper::load('common/footer.phtml'); ?>

 

 

The 1 phtml is where the more button appear, and the artist that user tick will appear on the 2 phtml.

 

Thanks again ^^

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.