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 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
| <?
include("include/header_li.inc");
$bnrep="BPNEWS/";
// appel du chemin et code d accès à la DB ($dbchemin = "localhost";$dbuser = "alex";$dbname = "necromancy";$dbpass = "alex";) //
include $bnrep."bn_configs.php";
include $bnrep."bn_options.php";
if(!$bnlang)
$bnlang="FRANCAIS";
include $bnrep."languages/$bnlang.php";
function selec()
{
global $dbname, $dbuser, $dbpass, $dbchemin, $str;
$db = mysql_connect($dbchemin, $dbuser, $dbpass);
mysql_select_db("$dbname", $db) or die ("$str[40]");
}
echo "<font style='font-size:1px'>";
$db = mysql_connect($dbchemin, $dbuser, $dbpass);
mysql_select_db("$dbname", $db);
echo "</font>";
$check_connect=mysql_errno();
$connect_error=mysql_error();
if($check_connect!="0")
echo "<SCRIPT LANGUAGE=JAVASCRIPT>document.location.href='".$bnrep."bn_admin.php';</SCRIPT>";
selec();
/*
if(!isset($page))
$page="1";
$debut=$page-1;
$debut*=$bnparpage;
$fin=$page*$bnparpage;
*/
$q="SELECT * FROM bn_design Where bnd_id='$bndesign';";
$r=mysql_query($q);
$bnd_haut=mysql_result($r,0,"bnd_haut");
$bnd_news=stripslashes(mysql_result($r,0,"bnd_news"));
$bnd_bas=mysql_result($r,0,"bnd_bas");
//$query="SELECT * FROM bn_news ORDER by bnn_date DESC LIMIT $debut,$bnparpage ;";
$query="SELECT * FROM bn_news ORDER by bnn_date DESC ;";
$result=mysql_query($query);
$nb=mysql_numrows($result);
$o="0";
While($o!=$nb)
{
$bn_id=mysql_result($result,$o,"bnn_id");
$qc="SELECT * FROM bn_com WHERE bnn_id='$bn_id';";
$rc=mysql_query($qc);
$nbc=mysql_numrows($rc);
$sc="";
if($nbc>1)
$sc="s";
$bn_titre=mysql_result($result,$o,"bnn_titre");
$bn_intro=mysql_result($result,$o,"bnn_intro");
$bn_user=mysql_result($result,$o,"bnn_user");
$bn_date=mysql_result($result,$o,"bnn_date");
$bd=substr($bn_date,8,2);
$bm=substr($bn_date,5,2);
$by=substr($bn_date,0,4);
$bh=substr($bn_date,11,2);
$bmn=substr($bn_date,14,2);
$bnh=$bh."h".$bmn;
$bnd_news2=$bnd_news;
$bn_intro= ereg_replace("(\r\n|\n|\r)", "<br />", $bn_intro);
$bnd_news2=ereg_replace("=A=","$bn_user",$bnd_news2);
$bnd_news2=ereg_replace("=D=","$bd/$bm/$by",$bnd_news2);
$bnd_news2=ereg_replace("=H=","$bnh",$bnd_news2);
$bnd_news2=ereg_replace("=N=","$bn_intro",$bnd_news2);
if($bnsmil=="1")
{
$smil=$bnd_news2;
include "$bnrep"."bn_smrep1.php";
$bnd_news2=$smil;
}
$bnd_haut2=ereg_replace("=T=","$bn_titre",$bnd_haut);
echo $bnd_haut2;
echo $bnd_news2;
echo $bnd_bas;
$o++;
}
include("include/footer_li.inc");
?> |
Partager