1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
| <?php require_once('Connections/bof.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;
}
}
$colname_auteurs = "-1";
if (isset($_GET['ida'])) {
$colname_auteurs = $_GET['ida'];
}
mysql_select_db($database_bof, $bof);
$query_auteurs = sprintf("SELECT * FROM shop_auteurs WHERE ida = %s", GetSQLValueString($colname_auteurs, "int"));
$auteurs = mysql_query($query_auteurs, $bof) or die(mysql_error());
$row_auteurs = mysql_fetch_assoc($auteurs);
$totalRows_auteurs = mysql_num_rows($auteurs);
$idURL_editeur = "1";
if (isset($_get['ida'])) {
$idURL_editeur = $_get['ida'];
}
mysql_select_db($database_bof, $bof);
$query_editeur = sprintf("SELECT shop_auteurs.ida,shop_auteurs.edit,editeur.edit,editeur.nomedit FROM editeur INNER JOIN shop_auteurs ON editeur.edit=shop_auteurs.edit WHERE shop_auteurs.ida=%s", GetSQLValueString($idURL_editeur, "int"));
$editeur = mysql_query($query_editeur, $bof) or die(mysql_error());
$row_editeur = mysql_fetch_assoc($editeur);
$totalRows_editeur = mysql_num_rows($editeur);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Document sans titre</title>
</head>
<body>
<p><?php echo $row_auteurs['ida']; ?>
<?php echo $row_auteurs['nom']; ?></p>
<p><?php echo $row_editeur['nomedit']; ?></p>
</body>
</html>
<?php
mysql_free_result($auteurs);
mysql_free_result($editeur);
?> |