by Tim45
6 replies
Hi warriors, I have a problem with the amin page of my website. I was trying to edit the footer of my page and I clicked save and something got screwed up. The error code below is what I get when I try to login to the admin page. I did not edit anything, all I did was click edit and when I realized I was on the wrong page I clicked save and that's when the problem begain. Please reply if you can help.

Parse error: syntax error, unexpected T_STRING in /home2/gtebooks/public_html/admin/includes/classes/box.php on line 38
#error #syntax
  • Profile picture of the author Karen Blundell
    what software are you using for your site?
    what's the URL to your site?
    it's difficult to answer you without some more info
    Signature
    ---------------
    {{ DiscussionBoard.errors[421071].message }}
    • Profile picture of the author Tim45
      Originally Posted by Karen Blundell View Post

      what software are you using for your site?
      what's the URL to your site?
      it's difficult to answer you without some more info

      Hi Karen, The url to the site is gtebooks.com
      the url to the admin is gtebooks.com/admin
      When I try to log into the admin page, that is
      when I get the error code.

      I went to the cpanel and tried to find the problem
      that way but I'm not sure what to look for.

      I don't have a back up of the file. the one I was in
      when I clicked save was the box.php file.

      What should I look for?
      {{ DiscussionBoard.errors[421807].message }}
  • Profile picture of the author ofir
    Banned
    Hi ,
    Please open the file:"/home2/gtebooks/public_html/admin/includes/classes/box.php"
    and copy the 30-40 lines so I will be able to see what is the bug.
    {{ DiscussionBoard.errors[422120].message }}
    • Profile picture of the author Tim45
      Originally Posted by ofir View Post

      Hi ,
      Please open the file:"/home2/gtebooks/public_html/admin/includes/classes/box.php"
      and copy the 30-40 lines so I will be able to see what is the bug.
      OK here it is

      <?php
      /*
      Example usage:

      $heading = array();
      $heading[] = array('params' => 'class="menuBoxHeading"',
      'text' => BOX_HEADING_TOOLS,
      'link' => tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('selected_box')) . 'selected_box=tools'));

      $contents = array();
      $contents[] = array('text' => SOME_TEXT);

      $box = new box;
      echo $box->infoBox($heading, $contents);
      */

      class box extends tableBlock {
      function box() {
      $this->heading = array();
      $this->contents = array();
      }

      function infoBox($heading, $contents) {
      $this->table_row_parameters = 'class="infoBoxHeading"';
      $this->table_data_parameters = 'class="infoBoxHeading"';
      $this->heading = $this->tableBlock($heading);

      $this->table_row_parameters = '';
      $this->table_data_parameters = 'class="infoBoxContent"';
      $this->contents = $this->tableBlock($contents);

      return $this->heading . $this->contents;
      }

      function menuBox($heading, $contents) {
      $this->table_data_parameters = 'class="menuBoxHeading"';
      if (isset($heading[0]['link'])) {
      $this->table_data_parameters .= ' onmouseover="this.style.cursor='hand'" onclick="document.location.href='' . $heading[0]['link'] . ''"';
      $heading[0]['text'] = '&nbsp;<a href="' . $heading[0]['link'] . '" class="menuBoxHeadingLink">' . $heading[0]['text'] . '</a>&nbsp;';
      } else {
      $heading[0]['text'] = '&nbsp;' . $heading[0]['text'] . '&nbsp;';
      }
      $this->heading = $this->tableBlock($heading);

      $this->table_data_parameters = 'class="menuBoxContent"';
      $this->contents = $this->tableBlock($contents);

      return $this->heading . $this->contents;
      }
      }
      ?>

      Thanks for your help
      {{ DiscussionBoard.errors[427908].message }}
  • Profile picture of the author KathyK
    you could try replacing line 38 with this:
    $this->table_data_parameters .= ' onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . $heading[0]['link'] . '\'"';

    It looks like your online editor perhaps removed some of the code in there (specifically the \ which tells php that you mean a REAL ' or " rather than a php code ' or ") You may have to ftp it down and fix it in a text editor and ftp it back up.

    On the other hand, if you still have the zip file of the original program, your easiest method would be to extract that one file onto your disk - and ftp it up there.
    Signature

    Cheers,
    Kathy

    {{ DiscussionBoard.errors[435398].message }}
  • Profile picture of the author Tim45
    Thanks Kathy, that worked. If I can return the favor somehow, let me know.

    Thanks again,
    Tim
    {{ DiscussionBoard.errors[440767].message }}

Trending Topics