
";
//
// if ($o->IDORIGINAL>0)
// {
// $DB0->query("select * from NEWS where ID=".$o->IDORIGINAL);
// if ($DB0->num_rows() == 1)
// {
// $temp = $DB0->fetch_object();
// $BOX .= '
Auteur: '.$temp->Auteur.' ';
// $BOX .= getRes("TRADUITPAR")." ".$o->Auteur.' ';
// } else {
// $BOX .= ' Auteur: '.$o->Auteur.' ';
// }
// $DB0->free();
// }
// else $BOX .= " ".getRes("AUTEUR")." ".$o->Auteur." ";
//
// $BOX .= getRes("DATE")." ".date_humanize($o->Date,$o->Lang).' ';
// $BOX .= " | ";
// $BOX .= " ";
// ///
// $BOX .= " | ";
// $BOX .= "";
// if ($o->Titre != "") $BOX .= " ".bbnews($o->Titre)." ";
// if ($o->Icone != "") $BOX .= " Icone." align=left width=66 height=66 style='margin-right:5px;'>";
// $BOX .= bbnews($o->Corps)."
";
// // $BOX .= ' '.substr($o->Date,8,2)."/".substr($o->Date,5,2)."/".substr($o->Date,0,4).'';
// // $BOX .= ' .') ';
// $BOX.= ' ';
// }
// else // parchemin
// {
// $parpath = WWWFX1."/g/autres/";
// $BOX .= "";
// $BOX .= "| | ";
// $BOX .= "| ";
// $BOX .= " ".bbnews($o->Titre)." ";// (".date_humanize($o->Date,$o->Lang).")";
// $BOX .= "".bbnews($o->Corps)." ".date_humanize($o->Date,$o->Lang)." ";
// $BOX .= " | | ";
// $BOX .= " | ";
// }
// }
// // $BOX.= " | ";
// return $BOX;
// }
/**
* format a news (understands BBCode and smileys)
* @param $id ID of the new to show
* @return html
*/
function news_display($id)
{
$BOX = "";
$mkdev = Db::create_Db_mkdev();
$news = $mkdev->q1("SELECT * FROM NEWS WHERE ID='$id'");
if (!$news) return;
switch ($news->Category) {
case 'NEWSCAT_BUGS':
return news_format_bug($news);
break;
case 'NEWSCAT_RECR':
return news_format_recruit($news);
break;
default:
return news_format_regular($news);
break;
}
}
/**
* Format a bug line
* @param $o (DB struct) a std object containing a database line of table NEWS
* @return html
*/
function news_format_bug($o) {
return " ".icons_show('puce').substr($o->Date, 0, 10)."".getRes(':')." ".bbnews($o->Titre)."";
}
/**
* Format a recruitment news
* @param $o (DB struct) a std object containing a database line of table NEWS
* @return html
*/
function news_format_recruit($o) {
$r = '';
$r .= " ";
$r .= " {$o->Titre}";
$r .= bbnews($o->Corps);
// $r .= " Si vous êtes intéressé par cette offre, transmettre CV (pdf), lettre de motivation et exemple de travaux déjà réalisés à  ";
// $r .= " Mise à jour : ".$o->Date." ";
$r .= icons_show('tampon');
$r .= " ";
return $r;
}
/**
* Format a regular news
* @param $o (DB struct) a std object containing a database line of table NEWS
* @return html
*/
function news_format_regular($o) {
$r = '';
if ($o->EstParchemin == 'Y') {
// show as scroll
$parpath = WWWFX1."/g/autres/";
$r .= " ";
$r .= "| | ";
$r .= "| ";
$r .= " ".bbnews($o->Titre)." ";// (".date_humanize($o->Date,$o->Lang).")";
$r .= "".bbnews($o->Corps)." ".date_humanize($o->Date, $o->Lang)." ";
$r .= " | | ";
$r .= " | ";
}
else {
// no scroll
$humanizedDate = ucfirst(date_humanize($o->Date));
$title = bbnews($o->Titre);
$text = bbnews($o->Corps);
if (!$o->Icone) $icon = '';
else $icon = "  Icone} class=icon />";
$r .= " ";
$r .= " ";
if ($o->Titre != "") $r .= " ".bbnews($o->Titre)." ";
if ($o->Icone != "") $r .= " Icone." align=left width=66 height=66 style='margin-right:5px;'>";
$r .= bbnews($o->Corps)."
";
// $r .= ' '.substr($o->Date,8,2)."/".substr($o->Date,5,2)."/".substr($o->Date,0,4).'';
// $r .= ' .') ';
$r.= ' ';
}
return $r;
// -----------end
// new designs, work but abandonned
// HERE WE HAVE 2 GOOD LAYOUTS...
if (0) {
$r .= <<
Icone} />#{$o->ID}
|
|
HTML;
return $r;
}
else {
if ($o->Icone) $icon = " Icone} class=icon />";
$r .= <<
$text
HTML;
}
return $r;
} Journal des dernières modifications d'importance anodines à modérées. Celles-ci sont généralement des réparations de problèmes ou des changements subtils de règles. Les gros changements sont généralement annoncés dans les nouvelles. Revenir aux dernières nouvelles ?
".getRes('BXBEPRONOM')." ".getRes('BXBECOUDA')." | ";
$c = 0;
foreach ($logins as $id => $arr) {
$login = $arr->Login;
$dateinscription = $arr->DateInscription;
$content = " ".$login."";
// Joueur::getProfileLink($id, $login);
// $BOX .= "- $content ";
if ($c % 2 == 0) $BOX .= " ";
$BOX .= "| $content | ";
if ($c % 2 == 1) $BOX .= " ";
$c++;
}
if ($c % 2 == 1) $BOX .= " - | ";
$BOX .= "";
$BOX .= "
";
$max = ceil(sizeof($arr) / 2);
for ($i = 0; $i < $max; $i++)
$BOX .= $arr[$i];
// |
$BOX .= "";
$BOX .= " ";
for ($i = $max; $i < sizeof($arr); $i++)
$BOX .= $arr[$i];
// |
//
$BOX .= " ";
$BOX .= " ";
$BOX .= " ";
$BOX .= "[ ".getRes("INSCRNEWPART")." ]";
|