Ir para conteúdo
Fórum Script Brasil
  • 0

Problema com PHP


SrRafael

Pergunta

Oláa galera :D

Sou meio novato em PHP e estou com um problema :blush:

Estou com essa pagina :

Fatal error: Call to a member function getValue() on a non-object in /home/gamehits/public_html/Rafael/PropertyMaxPro_v0-4c/index.php on line 67

<html>
<head>
<title>hme</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="images/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
    background-color: #FFFFFF;
    background-image: url(images/bg.gif);
    background-repeat: repeat-x;
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
}
#Table_01 td {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #1B1B1B;
}
body,td,th {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #1B1B1B;
}
a:link {
    color: #1B1B1B;
}
a:visited {
    color: #1B1B1B;
}
a:active {
    color: #1B1B1B;
}
a:hover {
    color: #029593;
}
a {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
}
-->
</style>
</head>
<body>
<!-- ImageReady Slices (hme.psd) -->
<table width="850" height="920" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
<tr>
        <td colspan="4">
            <img src="images/home_01.gif" width="850" height="135" alt=""></td>
  </tr>
    <tr>
        <td rowspan="4" width="40" height="788">&nbsp;</td>
<td>
            <img src="images/home_03.gif" width="363" height="210" alt=""></td>
        <td>
            <img src="images/home_04.gif" width="407" height="210" alt=""></td>
        <td rowspan="4" width="40" height="788">&nbsp;</td>
  </tr>
    <tr>
        <td colspan="2" width="770" height="27">&nbsp;</td>
  </tr>
    <tr>
        <td width="770" height="501" colspan="2" align="center" valign="top"><?php
  { include "search_.php"; }
  else { ?>
          <table width="770" border="0">
            <tr>
              <td width="298"><p><img src="images/representante.png" alt="Representante RODOBENS" width="298" height="85"><br>
                <br>
                <img src="images/pesquise.png" alt="Pesquise" width="298" ><br>
                <br>
                <img src="images/corretor.png" alt="Converse com um dos nossos corretores" width="298"></p>            </td>
              <td width="251" colspan="2">        
                
                <table id="Table_01" width="457" height="248" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td colspan="3" background="images/bemvindo_01.png" width="457" height="22">&nbsp;</td>
    </tr>
                  <tr>
                    <td rowspan="2" background="images/bemvindo_02.png" width="16" height="205">&nbsp;</td>
    <td>
      <img src="images/bemvindo_03.png" width="419" height="46" alt=""></td>
          <td rowspan="2" background="images/bemvindo_04.png" width="22" height="205">&nbsp;</td>
    </tr>
                  <tr>
                    <td background="images/bemvindo_05.png" bgcolor="#e9e9e9" width="419" height="159">&nbsp;</td>
    </tr>
                  <tr>
                    <td colspan="3" background="images/bemvindo_06.png" style="background-repeat:no-repeat" width="457" height="21">&nbsp;</td>
    </tr>
  </table>                         </td>
            </tr>
            
            
            <tr>
              <td width="766" height="245" colspan="3" align="center" background="images/bgcasas.png" >
              <?php include ("includes/templates/destaque.php"); ?></td>
          </tr>
            
  </table>
      <?php }
?></td>
  </tr>
    <tr>
        <td colspan="2" align="center" height="47"><div align="center">AcerteImoveis.Com - Consultoria   Imobili&aacute;ria -           Corretora - Consorcio<br>
&copy;&nbsp;2008&mdash;2010&nbsp;<a target="_blank" href="http://AcerteMais.Com">AcerteMais.Com</a> / <a href="http://AcerteImoveis.com">AcerteImoveis.com</a></div></td>
  </tr>
</table>
<!-- End ImageReady Slices -->
</body>
</html>

Oque poderia ser?

Obrigado *-*

Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

  • 0

Desculpe, coloquei o codigo errado --'

a index.php certa é essa:

<html>
<head>
<title>hme</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="images/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
    background-color: #FFFFFF;
    background-image: url(images/bg.gif);
    background-repeat: repeat-x;
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
}
#Table_01 td {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #1B1B1B;
}
body,td,th {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #1B1B1B;
}
a:link {
    color: #1B1B1B;
}
a:visited {
    color: #1B1B1B;
}
a:active {
    color: #1B1B1B;
}
a:hover {
    color: #029593;
}
a {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
}
-->
</style>
</head>
<body>
<!-- ImageReady Slices (hme.psd) -->
<table width="850" height="920" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
<tr>
        <td colspan="4">
            <img src="images/home_01.gif" width="850" height="135" alt=""></td>
  </tr>
    <tr>
        <td rowspan="4" width="40" height="788">&nbsp;</td>
<td>
            <img src="images/home_03.gif" width="363" height="210" alt=""></td>
        <td>
            <img src="images/home_04.gif" width="407" height="210" alt=""></td>
        <td rowspan="4" width="40" height="788">&nbsp;</td>
  </tr>
    <tr>
        <td colspan="2" width="770" height="27">&nbsp;</td>
  </tr>
    <tr>
        <td width="770" height="501" colspan="2" align="center" valign="top"><?php
  if ( 
  $cgi->getValue ( "op" ) == "search" || 
  $cgi->getValue ( "op" ) == "mi"  || 
  $cgi->getValue ( "sp" ) == "y"|| 
  $cgi->getValue ( "op" ) == "SendInformationRequest" )
  { include "search_.php"; }
  else { ?>
          <table width="770" border="0">
            <tr>
              <td width="298"><p><img src="images/representante.png" alt="Representante RODOBENS" width="298" height="85"><br>
                <br>
                <img src="images/pesquise.png" alt="Pesquise" width="298" ><br>
                <br>
                <img src="images/corretor.png" alt="Converse com um dos nossos corretores" width="298"></p>            </td>
              <td width="251" colspan="2">        
                
                <table id="Table_01" width="457" height="248" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td colspan="3" background="images/bemvindo_01.png" width="457" height="22">&nbsp;</td>
    </tr>
                  <tr>
                    <td rowspan="2" background="images/bemvindo_02.png" width="16" height="205">&nbsp;</td>
    <td>
      <img src="images/bemvindo_03.png" width="419" height="46" alt=""></td>
          <td rowspan="2" background="images/bemvindo_04.png" width="22" height="205">&nbsp;</td>
    </tr>
                  <tr>
                    <td background="images/bemvindo_05.png" bgcolor="#e9e9e9" width="419" height="159">&nbsp;</td>
    </tr>
                  <tr>
                    <td colspan="3" background="images/bemvindo_06.png" style="background-repeat:no-repeat" width="457" height="21">&nbsp;</td>
    </tr>
  </table>                         </td>
            </tr>
            
            
            <tr>
              <td width="766" height="245" colspan="3" align="center" background="images/bgcasas.png" >
              <?php include ("includes/templates/destaque.php"); ?></td>
          </tr>
            
  </table>
      <?php }
?></td>
  </tr>
    <tr>
        <td colspan="2" align="center" height="47"><div align="center">AcerteImoveis.Com - Consultoria   Imobili&aacute;ria -           Corretora - Consorcio<br>
&copy;&nbsp;2008&mdash;2010&nbsp;<a target="_blank" href="http://AcerteMais.Com">AcerteMais.Com</a> / <a href="http://AcerteImoveis.com">AcerteImoveis.com</a></div></td>
  </tr>
</table>
<!-- End ImageReady Slices -->
</body>
</html>

Link para o comentário
Compartilhar em outros sites

  • 0

este é o arquivo search_.php

<?php
/*       PropertyMax Pro  24-02-2008 propertymaxpro.com               */
########################################################################
## PropertyMax Pro Real Estate Property Solution                      ##
## ----------------------------------------------------------------   ##
## Copyright © Dawson Group, Inc. All Rights Reserved.                ##
## This software must be used in accordance with its licensing        ##
## terms and conditions at: http://www.propertymaxpro.com             ##
##                                                                    ##
## This file may not be redistributed in whole or significant part.   ##
##   ----------- PROPERTYMAX PRO IS NOT FREE SOFTWARE ------------    ##
########################################################################

require ( "includes/config.php" );
require ( "includes/CGI.php" );
require ( "includes/SQL.php" );

$cgi = new CGI ();
$sql = new SQL ( $DBusername, $DBpassword, $server, $database );

if ( ! $sql->isConnected () )
{
  die ( $DatabaseError );
}

require ( "includes/CSQL.php" ); 
require ( "includes/lang/" . $language_pack . "/index.php" );

?>
<!--
//  comment this out, allows you to use your own stylesheet with propertymax pro 
<link rel="stylesheet" href="includes/lang/<?php print "$language_pack"; ?>/style.css" />
-->
<script language="JavaScript" type="text/javascript">
<!-- Begin
var submitcount=0;
function reset() {
document.emailform.name.value="";
document.emailform.email.value="";
document.emailform.address.value="";
}

function checkFields() {                    
if (                                    
 (document.emailform.name.value=="") ||
 (document.emailform.email.value=="")  ||
 (document.emailform.address.value==""))  
   {
   alert("<?php echo GENERAL_FORM_POPUP_ERROR_MESSAGE; ?>");
   return false;
   }
}
//  End --></script>
<?php
  
  if ( $cgi->getValue ( "op" ) == "SendInformationRequest" )
  {
// Contact Form Spam Check for Website URl's which should not be there
$SpamErrorMessage = "<p align=\"center\"><font color=\"red\">Website URLs are not permitted in the request form.</font></b></p>";
if (preg_match("/http/", "" . $cgi->getValue ( "name" ) . "")) {echo "$SpamErrorMessage"; exit();} 
if (preg_match("/http/", "" . $cgi->getValue ( "email" ) . "")) {echo "$SpamErrorMessage"; exit();} 
if (preg_match("/http/", "" . $cgi->getValue ( "telephone" ) . "")) {echo "$SpamErrorMessage"; exit();} 
if (preg_match("/http/", "" . $cgi->getValue ( "address" ) . "")) {echo "$SpamErrorMessage"; exit();} 
  
    $yoursubject = "".EMAIL_SUBJECT." Ref: " . $cgi->getValue ( "propertyref" );
    $emailtext = "
-----------------------------------------------------------------------------
   ".EMAIL_TEXT_TITLE."
-----------------------------------------------------------------------------
".EMAIL_TEXT_BODY."

".EMAIL_PD."
".EMAIL_PROEPRTY_REF."      " . $cgi->getValue ( "propertyref" ) . "
".EMAIL_PROPERTY_ADDRESS."  " . $cgi->getValue ( "propertyaddress" ) . "
".EMAIL_PROPERTY_PRICE."    ".CURRENCY.""  . $cgi->getValue ( "propertyprice" ) . "

".EMAIL_RD."
".EMAIL_NAME."    " . $cgi->getValue ( "name" ) . "
".EMAIL_EMAIL_ADDRESS."   " . $cgi->getValue ( "email" ) . "
".EMAIL_TELEPHONE."   " . $cgi->getValue ( "telephone" ) . "

" . $cgi->getValue ( "address" ) . "

________________________________
".EMAIL_FOOTER."
";

    $yoursubject = stripslashes ( $yoursubject ); 
    $emailtext = stripslashes ( $emailtext );
    @mail ( $cgi->getValue ( "adminemailaddress" ), $yoursubject, $emailtext,
        "From: " . $cgi->getValue ( "email" ) ); 
?>
<br />
<br />
<br />
<p align="center"><?php echo EMAIL_SUCCESS_MESSAGE; ?></p>
<br />
<p align="center">[<a href="?op=search&po=S"><?php echo FORM_VIEW_ALL_SALE_PROPERTIES; ?></a>]</p>
<br />
<br />
<?php

  } 

  // view more information about the property if requested
  if ( $cgi->getValue ( "op" ) == "mi" )
  {
  // Start of Display Output
    require ( "includes/templates/layout_view.php" );
  // End of Display output


    $arows = $sql->execute ( "SELECT * FROM " . $admin_table . " LIMIT 1",
        SQL_RETURN_ASSOC );
    $arow = $arows [ 0 ];

  
?>
<table width="100%"  align="center" class="lvp_top_nav_menu_bg">
<tr valign="top">
<td><p><?php echo LV_MORE_INFORMATION_TITLE; ?></p></td>
</tr>
</table>
<a name="CONTACT" id="CONTACT"></a>
<p align="center"><?php echo LV_MORE_INFORMATION_TEXT; ?></p>
<br />
<table width="85%" align="center" cellpadding="10">
<tr>
<td valign="top"><p><strong><?php echo $cgi->htmlEncode ( $arow [ "adminbusinessname" ] ); ?></strong><br />
<?php echo $cgi->htmlEncode ( $arow [ "adminaddress" ] ); ?><br />
<?php echo $cgi->htmlEncode ( $arow [ "admintown" ] ); ?><br />
<?php echo $cgi->htmlEncode ( $arow [ "admincounty" ] ); ?><br />
<?php echo $cgi->htmlEncode ( $arow [ "adminpostcode" ] ); ?></p>
<p>Tel: <?php echo $cgi->htmlEncode ( $arow [ "admintelephone" ] ); ?><br />
Fax: <?php echo $cgi->htmlEncode ( $arow [ "adminfax" ] ); ?></p></td>
<td><form method="post" name="emailform" id="emailform" onsubmit="return checkFields()">
<input name="op" type="hidden" value="SendInformationRequest" />
<input name="propertyref" type="hidden" value="<?php echo $cgi->htmlEncode ( $row [ "propertyref" ] ); ?>" />
<input name="propertyaddress" type="hidden" value="<?php echo $cgi->htmlEncode ( $row [ "propertyaddress" ] ); ?>" />
<input name="propertylocation" type="hidden" value="<?php echo $cgi->htmlEncode ( $row [ "propertylocation" ] ); ?>" />
<input name="propertyprice" type="hidden" value="<?php echo $cgi->htmlEncode ( $row [ "propertyprice" ] ); ?>" />
<input name="adminemailaddress" type="hidden" value="<?php
                    echo $cgi->htmlEncode ( $arow [ "adminemailaddress" ] ); ?>" />
<table cellpadding="1" cellspacing="1">
<tr>
<td align="right"><p><?php echo LV_NAME; ?>&nbsp;</p></td>
<td><input type="text" name="name" size="35"
                      maxlength="100" /></td>
</tr>
<tr>
<td align="right"><p><?php echo LV_EMAIL; ?>&nbsp;</p></td>
<td><input type="text" name="email" size="35"
                      maxlength="100" /></td>
</tr>
<tr>
<td align="right"><p><?php echo LV_TELEPHONE; ?>&nbsp;</p></td>
<td><input type="text" name="telephone" size="35"
                      maxlength="100" /></td>
</tr>
<tr>
<td align="right" valign="top"><p><?php echo LV_ADDRESS; ?>&nbsp;</p></td>
<td><textarea name="address" rows="5" cols="35"></textarea></td>
</tr>
<tr>
<td align="right" valign="top">&nbsp;</td>
<td><input name="" type="image" src="<?php print "$LanguageFolder/$language_pack"; ?>/buttons/button-send-request.gif" /></td>
</tr>
</table>
<p>&nbsp;</p>
</form></td>
</tr>
</table>
<?php
  }
  else if ( $cgi->getValue ( "op" ) == "search" )
  {
    $pt = $cgi->getValue ( "pt" );
    $pp = $cgi->getValue ( "pp" );
    $pb = $cgi->getValue ( "pb" );
    $pl = $cgi->getValue ( "pl" );
    $po = $cgi->getValue ( "po" );
    $pp_min = $cgi->getValue ( "pp_min" );
    $pp_max = $cgi->getValue ( "pp_max" );
    $query = "
      SELECT
        p.id                AS id,
        p.propertyoption    AS propertyoption,
        p.propertyprice     AS propertyprice,
        p.propertyaddress   AS propertyaddress,
        pl.propertylocation AS propertylocation,
        ps.propertystatus   AS propertystatus,
        pt.propertytype     AS propertytype,
        p.propertyref       AS propertyref,
        p.propertybedrooms  AS propertybedrooms,
        p.propertyphoto1    AS propertyphoto1,
        p.propertyphoto2    AS propertyphoto2,
        p.propertyphoto3    AS propertyphoto3,
        p.propertyphoto4    AS propertyphoto4,
        p.shortdescription  AS shortdescription,
        p.longdescription   AS longdescription,
        p.virtualtour   AS virtualtour
      FROM
        " . $property_table . " p
        INNER JOIN
        " . $propertytypes_table . " pt ON (p.propertytype=pt.id)
        INNER JOIN
        " . $propertylocations_table . " pl ON (p.propertylocation=pl.id)
        INNER JOIN
        " . $propertystatus_table . " ps ON (p.propertystatus=ps.id)
      WHERE
        p.propertyshow=1
      ";

    if ( $pt != "" )
      $query .= " AND p.propertytype=" . $sql->quote ( $pt );

    if ( $pp_min != "" )
      $query .= " AND p.propertyprice>=" . $sql->quote ( $pp_min );

    if ( $pp_max != "" )
      $query .= " AND p.propertyprice<=" . $sql->quote ( $pp_max );
     
    if ( $pb != "" )
      $query .= " AND p.propertybedrooms>=" . $sql->quote ( $pb );

    if ( $pl != "" )
      $query .= " AND p.propertylocation=" . $sql->quote ( $pl );

     if ( $po != "" )
      $query .= " AND p.propertyoption=" . $sql->quote ( $po );
    // set the query ordering
    if ( isset ( $property_search_order ) && $property_search_order != "" )
      $query .= "ORDER BY p." . $property_search_order . " " .
           ( "a" == strtolower ( substr ( $property_search_ordering, 0, 1 ) ) ?
             "ASC" : "DESC" );
    
    $results = $sql->execute ( $query, SQL_RETURN_ASSOC );
    
    $total_results = sizeof ( $results );

    if ( $total_results == 0 )
    {
      ?>
<br />
<br />
<p align="center"><?php echo GENERAL_NO_PROPERTIES_FOUND; ?></p>
<br />
<br />
<br />
<?php

    }
if ( $total_results  >0 ) {    
    $total_pages = ceil ( $total_results / $property_search_limit ); //total number of pages

    $page = $cgi->getValue ( "page" );

    if ( ! $page )
      $page = 1;
      
    $offset = ( $page - 1 ) * $property_search_limit; //starting number for displaying results out of DB 
    $max = $offset + $property_search_limit;
    $max = ( $max > $total_results ? $total_results : $max );
    
?>
<p align="center"><?php echo GENERAL_PROPERTIES_FOUND; ?></p>
<br />
<?php

    for ( $l = $offset; $l < $max; ++$l )
    { 
      $row = $results [ $l ];
      
      // Start of Display Output
      require ( "includes/templates/layout_results.php" );
      // End of Display output
    }  

    ?>
<div align="center">
<p><?php echo GENERAL_PAGE; ?> -
<?php
    
    if ( $page != 1 )
    { 
    ?>
<a href="<?php echo $_SERVER [ 'PHP_SELF' ]; ?>?op=search&page=1&po=<?php echo $po; ?>&pt=<?php echo $pt; ?>&pp=<?php echo $pp; ?>&pb=<?php echo $pb; ?>&pl=<?php echo $pl; ?>&pp_min=<?php echo $pp_min; ?>&pp_max=<?php echo $pp_max; ?>">&lt;&lt; First</a>&nbsp;&nbsp;-&nbsp;
<?php
      
      $prevpage = $page - 1; 
    }

    $to = ( $page < $total_pages - 2 ? $page + 3 : $total_pages );
    $from = ( $page >= 1 && $page <= 3 ? 1 : $page - 3 );

    for ( $i = $from; $i <= $to; ++$i ) 
    { 
      if ( $i == $total_results )
        $to = $total_results; 
        
      if ( $i != $page )
      { 
        ?>
<a href="?op=search&showold=yes&page=<?php echo $i; ?>&po=<?php echo $po; ?>&pt=<?php echo $pt; ?>&pp=<?php echo $pp; ?>&pb=<?php echo $pb; ?>&pl=<?php echo $pl; ?>&pp_min=<?php echo $pp_min; ?>&pp_max=<?php echo $pp_max; ?>"><?php echo $i; ?></a>
<?php
      } 
      else 
      { 
        ?>
<b>[<?php echo $i; ?>]</b>
<?php
      } 
      
      if ( $i != $total_pages ) 
        ?>
&nbsp;&nbsp;
<?php
    } 

    if ( $page != $total_pages )
    { 
      $nextpage = $page + 1; 

      ?>
&nbsp;-&nbsp;&nbsp;<a href="?op=search&page=<?php echo $total_pages; ?>&po=<?php echo $po; ?>&pt=<?php echo $pt; ?>&pp=<?php echo $pp; ?>&pb=<?php echo $pb; ?>&pl=<?php echo $pl; ?>&pp_min=<?php echo $pp_min; ?>&pp_max=<?php echo $pp_max; ?>">Last &gt;&gt;</a>
<?php
    }

    ?>
</p></div>
<br />
<br />
<?php
  }
}
  else if ( $cgi->getValue ( "sp" ) == "y" )
 {
      // Start of Display Output
      require ( "includes/templates/layout_view_photos.php" );
      // End of Display output
}

  else
  {
    if ( !$cgi->getValue ( "op" ) == "SendInformationRequest" )
  {
    ?>
<br />
<br />
<h2 align="center"><?php echo FORM_TITLE; ?></h2>
<p align="center"><?php echo FORM_SEARCH_TEXT; ?></p>
<?php
     // Start of Search Box Output
    require ( "includes/templates/inc-searchbox.php" );
     // End of Search Box Output
}
  }

?>
<br />
<p align="center"><?php echo FOOTER_TEXT; ?></p>

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,1k
    • Posts
      651,8k
×
×
  • Criar Novo...