Encontrei dois sistemas de controle de ponto com código-aberto na internet: sisponto e wponto. Mas estão apresentando vários erros. Alguns eu corrigi, do tipo que não deu espaço ou faltou ponto e vírgula, mas outros não entendo, como este.
O erro completo é:
( ! ) Notice: Undefined variable: _PALAVRAS in C:\wamp\www\sisponto\inc\header.php on line 26 Call Stack #TimeMemoryFunctionLocation 10.0009244840{main}( )..\index.php:0 20.0020251112include( 'C:\wamp\www\sisponto\inc\header.php' )..\index.php:3 " /> ( ! ) Notice: Undefined variable: _DESCRICAO in C:\wamp\www\sisponto\inc\header.php on line 27 Call Stack #TimeMemoryFunctionLocation 10.0009244840{main}( )..\index.php:0 20.0020251112include( 'C:\wamp\www\sisponto\inc\header.php' )..\index.php:3 " /> ( ! ) Notice: Undefined variable: _AUTOR in C:\wamp\www\sisponto\inc\header.php on line 28 Call Stack #TimeMemoryFunctionLocation 10.0009244840{main}( )..\index.php:0 20.0020251112include( 'C:\wamp\www\sisponto\inc\header.php' )..\index.php:3 " /> ( ! ) Notice: Undefined variable: _LICENCA in C:\wamp\www\sisponto\inc\header.php on line 29 Call Stack #TimeMemoryFunctionLocation 10.0009244840{main}( )..\index.php:0 20.0020251112include( 'C:\wamp\www\sisponto\inc\header.php' )..\index.php:3 " /> ( ! ) Notice: Undefined variable: _DATA in C:\wamp\www\sisponto\inc\header.php on line 30 Call Stack #TimeMemoryFunctionLocation 10.0009244840{main}( )..\index.php:0 20.0020251112include( 'C:\wamp\www\sisponto\inc\header.php' )..\index.php:3 " /> ( ! ) Notice: Undefined variable: tempo in C:\wamp\www\sisponto\inc\header.php on line 31 Call Stack #TimeMemoryFunctionLocation 10.0009244840{main}( )..\index.php:0 20.0020251112include( 'C:\wamp\www\sisponto\inc\header.php'
Código-fonte do header.php
:
<?
// Caso _ERROS esteja setado para False, desabilita a
// exibição de erros, caso contrario, habilita!
if ($_ERROS == "True")
error_reporting(0);
else
error_reporting(E_ALL);
if (isset($_GET['origem'])) {
$tempo=3;
}else{
$tempo=9999999;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt-br" lang="pt-br">
<head>
<?php include ("conf\common.php"); ?>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="Keywords" content="<?=$_PALAVRAS?>" />
<meta name="Description" content="<?=$_DESCRICAO?>" />
<meta name="Autor" content="<?=$_AUTOR?>" />
<meta name="License" content="<?=$_LICENCA?>" />
<meta name="Date" content="<?=$_DATA?>" />
<meta HTTP-EQUIV="Refresh" CONTENT="<?=$tempo?>; URL=<?=$_URL?>">
<title><?=$_TITULO?></title>
<link rel="Stylesheet" href="<?=$_DIRINC?>/styles.css" />
<script type="text/javascript" language="JavaScript" src="<?=$_DIRINC?>/functions.js"></script>
</head>
<body>
<?
// Estabelece a conexão com o banco de dados
$CON = pg_connect("host=$_HOST dbname=$_DB user=$_USER password=$_PASS") or msgerro("Impossível acessar a base de dados!");
?>
O site pode ser acessado no seguinte endereço: http://200.171.59.245/wponto/
include
está com o caminho correto?open_short_tag
troque as ocorrências de<?
por:<?php
.