<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Guestbook parse error on line 14"]]></title>
		<link>https://proxy2.de/forum/posts/list/3.php</link>
		<description><![CDATA[Latest messages posted in the topic "Guestbook parse error on line 14"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Guestbook parse error on line 14</title>
				<description><![CDATA[ Hi, Im getting the error message <br /> <br /> [code]Parse error&#58; parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/ibsite/public_html/guestbook/lib/gb.class.php&#40;132&#41; &#58; eval&#40;&#41;'d code on line 14[/code]<br /> <br /> on my page <br /> <br /> http://www.ibsite.com/guestbook/index.php<br /> <br /> whenever I try to access the view page of my advanced guestbook. It just appeared. One day it worked, the next day it didnt. (Perhpas related to slow refreshreate of IE). I have tried installing a new guestbook, replacing the working gb.class.php entry from the new book, but to no avail. That leads me to suspect the problem lies elsewhere in the guestbook, but I have no idea where. <br /> <br /> I have manually entered about 80 visits from my old guestbook, and wouldnt like to have to customize a new guestbook all over again. <br /> <br /> Ive found two entries in this forum on the problem <br /> <br /> http://proxy2.de/forum/viewtopic.php?t=2128&amp;highlight=expecting+tstring+tvariable+tnumstring<br /> <br /> http://proxy2.de/forum/viewtopic.php?t=2085&amp;highlight=expecting+tstring+tvariable+tnumstring<br /> <br /> but none with adequate answers. My gb.class.php document reads:<br /> <br /> with line 14 in [b]bold[/b]<br /> <br /> <br /> &lt;?php<br /> /**<br />  * ----------------------------------------------<br />  * Advanced Guestbook 2.2 (PHP/MySQL)<br />  * Copyright (c)2001 Chi Kien Uong<br />  * URL: http://www.proxy2.de<br />  * ----------------------------------------------<br />  */<br /> <br /> class guestbook {<br />     <br />     var $total;<br />     var $db;    <br />     [b]var $template;[/b]    <br />  <br />    function guestbook($path='') {<br />         $this-&gt;db = new guestbook_vars($path);<br />         $this-&gt;db-&gt;getVars();<br />         $this-&gt;total = 0;<br />         $this-&gt;template =&amp; $this-&gt;db-&gt;template;<br />     }<br /> <br />     function get_nav($entry=0) {<br />         global $HTTP_SERVER_VARS;<br />         $self = basename($HTTP_SERVER_VARS['PHP_SELF']);<br />         $next_page = $entry+$this-&gt;db-&gt;VARS['entries_per_page'];<br />         $prev_page = $entry-$this-&gt;db-&gt;VARS['entries_per_page'];<br />         $navigation = '';<br />         if ($prev_page &gt;= 0) {<br />             $navigation = "   &lt;img src=\"img/back.gif\" width=\"16\" height=\"14\"&gt;&lt;a href=\"$self?entry=$prev_page\"&gt;".$this-&gt;db-&gt;LANG["NavPrev"]."&lt;/a&gt;\n";<br />         }<br />         if ($next_page &lt; $this-&gt;total) {<br />             $navigation = $navigation."   &amp;nbsp;&amp;nbsp;&lt;a href=\"$self?entry=$next_page\"&gt;".$this-&gt;db-&gt;LANG["NavNext"]."&lt;/a&gt;&lt;img src=\"img/next.gif\" width=\"16\" height=\"14\"&gt;\n";<br />         }<br />         return $navigation;<br />     }<br />     <br />     function show_entries($entry=0) {<br />         $LANG =&amp; $this-&gt;db-&gt;LANG;<br />         $VARS =&amp; $this-&gt;db-&gt;VARS;<br />         $this-&gt;db-&gt;fetch_array($this-&gt;db-&gt;query("select count(*) total from ".$this-&gt;db-&gt;table['data']));<br />         $this-&gt;total = $this-&gt;db-&gt;record["total"];      <br />         $TPL = $this-&gt;get_entries($entry,$this-&gt;db-&gt;VARS["entries_per_page"]);<br />         $TPL['GB_TOTAL'] = $this-&gt;total;<br />         $TPL['GB_JUMPMENU'] = implode("\n",$this-&gt;generate_JumpMenu());<br />         $TPL['GB_TIME'] = $this-&gt;db-&gt;DateFormat(time());<br />         $TPL['GB_NAVIGATION'] = $this-&gt;get_nav($entry);         <br />         $TPL['GB_HTML_CODE'] = ($this-&gt;db-&gt;VARS["allow_html"] == 1) ? $this-&gt;db-&gt;LANG["BookMess2"] : $this-&gt;db-&gt;LANG["BookMess1"];<br />         eval("\$guestbook_html = \"".$this-&gt;template-&gt;get_template($this-&gt;db-&gt;GB_TPL['header'])."\";");<br />         eval("\$guestbook_html .= \"".$this-&gt;template-&gt;get_template($this-&gt;db-&gt;GB_TPL['body'])."\";");<br />         eval("\$guestbook_html .= \"".$this-&gt;template-&gt;get_template($this-&gt;db-&gt;GB_TPL['footer'])."\";");        <br />         return $guestbook_html;<br />     }<br />     <br />     function generate_JumpMenu() {<br />         $menu_array[] = "&lt;select name=\"entry\" class=\"select\"&gt;";<br />         $menu_array[] = "&lt;option value=\"0\" selected&gt;".$this-&gt;db-&gt;LANG["FormSelect"]."&lt;/option&gt;";<br />         if ($this-&gt;db-&gt;VARS["entries_per_page"] &lt; $this-&gt;total) {<br />             $remain = $this-&gt;total % $this-&gt;db-&gt;VARS["entries_per_page"];<br />             $i = $this-&gt;total-$remain;<br />             while ($i &gt; 0) {<br />                 $num_max = $i;<br />                 $num_min = $num_max-$this-&gt;db-&gt;VARS["entries_per_page"];<br />                 $num_min++;<br />                 $menu_array[] = "&lt;option value=\"$remain\"&gt;$num_min-$num_max&lt;/option&gt;";<br />                 $i = $num_min-1;<br />                 $remain += $this-&gt;db-&gt;VARS["entries_per_page"];<br />            }<br />         }<br />         $menu_array[] = "&lt;/select&gt;";<br />         $menu_array[] = "&lt;input type=\"submit\" value=\"".$this-&gt;db-&gt;LANG["FormButton"]."\" class=\"input\"&gt;";<br />         return $menu_array;<br />     }<br />     <br />     function get_entries($entry,$last_entry) {<br />         $LANG =&amp; $this-&gt;db-&gt;LANG;<br />         $id = $this-&gt;total-$entry;<br />         $HOST = '';<br />         $COMMENT = '';<br />         $GB_ENTRIES = '';<br />         $i=0;<br />         $template['entry'] = $this-&gt;template-&gt;get_template($this-&gt;db-&gt;GB_TPL['entry']);<br />         $template['com'] = $this-&gt;template-&gt;get_template($this-&gt;db-&gt;GB_TPL['com']);<br />         $template['url'] = $this-&gt;template-&gt;get_template($this-&gt;db-&gt;GB_TPL['url']);<br />         $template['icq'] = $this-&gt;template-&gt;get_template($this-&gt;db-&gt;GB_TPL['icq']);<br />         $template['aim'] = $this-&gt;template-&gt;get_template($this-&gt;db-&gt;GB_TPL['aim']);<br />         $template['email'] = $this-&gt;template-&gt;get_template($this-&gt;db-&gt;GB_TPL['email']);<br />         $result = $this-&gt;db-&gt;query("select * from ".$this-&gt;db-&gt;table['data']." order by id desc limit $entry, $last_entry");<br />         while ($row = $this-&gt;db-&gt;fetch_array($result)) {<br />             $DATE = $this-&gt;db-&gt;DateFormat($row['date']);<br />             $MESSAGE = nl2br($row['comment']);<br />             if ($this-&gt;db-&gt;VARS["smilies"] == 1) {<br />                 $MESSAGE = $this-&gt;db-&gt;emotion($MESSAGE);<br />             }<br />             if (!$row['location']) {<br />                 $row['location'] = "-";<br />             }<br />             $bgcolor = ($i % 2) ? $this-&gt;db-&gt;VARS["tb_color_2"] : $this-&gt;db-&gt;VARS["tb_color_1"];<br />             $i++;<br />             if ($row['url']) {<br />                 eval("\$URL = \"".$template['url']."\";");<br />             } else {<br />                 $URL = '';<br />             }<br />             if ($row['icq'] &amp;&amp; $this-&gt;db-&gt;VARS["allow_icq"]==1) {<br />                 eval("\$ICQ = \"".$template['icq']."\";");<br />             } else {<br />                 $ICQ = '';<br />             }<br />             if ($row['aim'] &amp;&amp; $this-&gt;db-&gt;VARS["allow_aim"]==1) {<br />                 eval("\$AIM = \"".$template['aim']."\";");<br />             } else {<br />                 $AIM = '';<br />             }<br />             if ($row['email']) {<br />                 eval("\$EMAIL = \"".$template['email']."\";");<br />             } else {<br />                 $EMAIL = '';<br />             }<br />             if ($this-&gt;db-&gt;VARS["allow_gender"]==1) {<br />                 $GENDER = ($row['gender']=="f") ? "&amp;nbsp;&lt;img src=\"img/female.gif\" width=\"12\" height=\"12\"&gt;" : "&amp;nbsp;&lt;img src=\"img/male.gif\" width=\"12\" height=\"12\"&gt;";<br />             }            <br />             if ($this-&gt;db-&gt;VARS["show_ip"] == 1) {<br />                 $hostname = ( eregi("^[-a-z_]+", $row['host']) ) ? "Host" : "IP";<br />                 $HOST = "$hostname: $row[host]\n";<br />             }<br />             $this-&gt;db-&gt;query("select * from ".$this-&gt;db-&gt;table['com']." where id='$row[id]' order by com_id asc");<br />             while ($com = $this-&gt;db-&gt;fetch_array($this-&gt;db-&gt;result)) {<br />                 $com['comments'] = nl2br($com['comments']);<br />                 eval("\$COMMENT .= \"".$template['com']."\";");<br />             }            <br />             eval("\$GB_ENTRIES .= \"".$template['entry']."\";");    <br />             $COMMENT = "";<br />             $id--;<br />         }<br />         $TPL['GB_ENTRIES'] = $GB_ENTRIES;<br />         return $TPL;<br />     }<br /> <br /> }<br /> <br /> ?&gt;<br /> <br /> Upon searching php forums, Ive found that actual errors to often are a couple of lines under or above the referred line, but as my knowledge of php is limited to searching in forums, they dont tell me much when I dont find an entry with exactly the same problem as I have. <br /> <br /> Hope someone here can help me. <br /> <br /> Ibs]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/2379/6288.php</guid>
				<link>https://proxy2.de/forum/posts/preList/2379/6288.php</link>
				<pubDate><![CDATA[Sun, 21 Sep 2003 17:19:48]]> GMT</pubDate>
				<author><![CDATA[ ibs]]></author>
			</item>
	</channel>
</rss>