Jump to content


Photo

Light Box


  • Faça o login para participar
Nenhuma resposta neste tópico

#1 cassol

cassol

    Novato no fórum

  • Usuários
  • 2 posts
  • Sexo:Não informado

Posted 29/09/2007, 19:20

ola pessoal sou novato em php,

estou contruindo uma site em php-nuke e ontem lendo um artigo feito aki no site vi uma galeria com lightbox um efeito muito show que gostaria de colocar em meu site comecei a procurar sobre o light box

http://www.imasters....feito_lightbox/

se você derem uma olhada la la embaixo tem os arquivos para download em php
mais quando vou instalar da pau aparece o seguinte erro

Parse error: parse error, unexpected T_VARIABLE in e:\inetpub\vhosts\litoraladv.com\httpdocs\daynight\galeria\install.php on line 46


sera que alguem pode me ajudar

ta ai os arquivos para download

http://www.lzds.info...a_de_images.rar

sera que esses arquivos nao funcionam com o php-nuke?
sera que alguem pode adaptar para o nuke?
sera que nao rola um tutorial?

o codigo ta ae

<?php require_once('./Connections/definitivo.php'); ?>
<?php

if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL1 = sprintf("CREATE TABLE galeria (
id_foto int(10) NOT NULL auto_increment,
foto varchar(255) NOT NULL default '',
PRIMARY KEY (id_foto),
UNIQUE KEY foto (foto)
) ;"


$insertSQL2 = sprintf('INSERT INTO galeria VALUES (1, 1.jpg);');

$insertSQL3 = sprintf("INSERT INTO galeria VALUES (2, 2.jpg);");

$insertSQL4 = sprintf("INSERT INTO galeria VALUES (3, 3.jpg);");

$insertSQL5 = sprintf("INSERT INTO galeria VALUES (4, 4.jpg);");

$insertSQL6 = sprintf("CREATE TABLE fadegal (
`id` int(10) NOT NULL auto_increment,
`nfotoperpage` int(3) NOT NULL default '0',
`ncolsperpage` int(2) NOT NULL default '0',
PRIMARY KEY (`id`)
) ;");

$insertSQL7 = sprintf("INSERT INTO fadegal VALUES (1, 12, 2);");

$insertSQL8 = sprintf("CREATE TABLE ug (
`id` int(10) NOT NULL default '0',
`login` varchar(32) NOT NULL default '',
`senha` text NOT NULL,
`level` char(1) NOT NULL default '',
PRIMARY KEY (`id`),
UNIQUE KEY `Nome` (`login`)
) ;");

$insertSQL = sprintf(" INSERT INTO ug (login, senha) VALUES (%s, %s)",
GetSQLValueString($_POST['name'], "text"),
GetSQLValueString(base64_encode($_POST['pass']), "text"));

mysql_select_db($database_definitivo, $definitivo);
//$Result1 = mysql_query($insertSQL, $definitivo) or die(mysql_error());
$Result1 = mysql_query($insertSQL, $definitivo) or die(mysql_error());
//$Result1 = mysql_query($insertSQL2, $definitivo) or die(mysql_error());
//$Result1 = mysql_query($insertSQL3, $definitivo) or die(mysql_error());
//$Result1 = mysql_query($insertSQL4, $definitivo) or die(mysql_error());
//$Result1 = mysql_query($insertSQL5, $definitivo) or die(mysql_error());
//$Result1 = mysql_query($insertSQL6, $definitivo) or die(mysql_error());
//$Result1 = mysql_query($insertSQL7, $definitivo) or die(mysql_error());
//$Result1 = mysql_query($insertSQL8, $definitivo) or die(mysql_error());

$insertGoTo = "./";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR...D/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Install</title>
</head>

<body>
<form method="post" name="form1" action="<?php echo $editFormAction; ?>">
<p align="center">Instalar o Sistema! </p>
<p>
<input type="hidden" name="MM_insert" value="form1">
Nome de Usuário:
<input name="name" type="text" id="name" size="32" maxlength="32" />
<br />
Senha de Unuário:
<input name="pass" type="password" id="pass" size="32" maxlength="16" />
</p>
<p>
<input type="submit" name="Submit" value="salvar" />
</p>
</form>
<p> </p>
</body>
</html>

agradeco desde ja




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq