本文整理汇总了PHP中getCodelangue函数的典型用法代码示例。如果您正苦于以下问题:PHP getCodelangue函数的具体用法?PHP getCodelangue怎么用?PHP getCodelangue使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getCodelangue函数的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: ligneConLocalite
function ligneConLocalite($wh = '', $ord = '', $sens = 'ASC', $page = 1, $nelt)
{
$userName = getField('LOGIN', $_SESSION['GL_USER']['LOGIN'], 'LOGIN', 'compte');
$ilang = getCodelangue($userName);
$returnHTML = '';
$returnTble = array();
//HTML, nbreTotal,
//Where clause
$where = '';
isset($wh) and $wh != '' ? $where = " WHERE {$wh} " : ($where = "");
//Oerder condition
$order = '';
isset($ord) and $ord != '' ? $order = " ORDER BY {$ord} {$sens}" : ($order = " ORDER BY localite.ID_GRPLOC, ID_LOCALITE ASC");
//Nombre d'éléments
$returnTble['NE'] = nombreLocalite($where);
if ($returnTble['NE'] > 0) {
//Calcule des limites
$i = ($page - 1) * $nelt;
$sql = "SELECT * FROM localite INNER JOIN groupelocalite ON (localite.ID_GRPLOC LIKE groupelocalite.ID_GRPLOC) {$where} {$order} LIMIT {$i}, {$nelt};";
//Exécution
try {
$cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
//Connexion to database
} catch (PDOException $error) {
//Treat error
//("Erreur de connexion : " . $error->getMessage() );
header('location:errorPage.php');
}
$query = $cnx->prepare($sql);
//Prepare the SQL
$query->execute();
//Execute prepared SQL => $query
$i = 0;
$j = 6;
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
$i % 2 == 0 ? $col = "tableOddRow" : ($col = "tableEvenRow");
//Is use
$magasin = isUseNow('ID_LOCALITE', 'magasin', "WHERE ID_LOCALITE =" . $row['ID_LOCALITE']);
$magasin > 0 ? $Use = 1 : ($Use = 0);
$returnHTML .= '
<tr align="left" valign="middle" class="' . $col . '">
<td><input type="checkbox" name="rowSelection[]" value="' . $row['ID_LOCALITE'] . ' ' . $Use . '"></td>
<td class="text" align="center">' . $row['ID_LOCALITE'] . '</td>
<td class="text" >' . stripslashes($row['LOC_NOM']) . '</td>
<td class="text" >' . stripslashes($row['GRPLOC_LIBELLE']) . '</td>
<td class="text" >' . stripslashes(getDependance($row['LOC_LIEN'])) . '</td>
</tr>';
$i++;
$j++;
}
} else {
if ($ilang == '1' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">Aucune donnée...</td></tr>';
}
if ($ilang == '2' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">No data...</td></tr>';
}
if ($ilang == '3' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">Nenhum dado...</td></tr>';
}
}
$returnTble['L'] = $returnHTML;
return $returnTble;
}
开发者ID:benleibert,项目名称:channel-software,代码行数:64,代码来源:funclocalite.php
示例2: isset
isset($_POST['region']) && $_POST['region'] ? $region = $_POST['region'] : ($region = '0');
isset($_POST['province']) && $_POST['province'] ? $province = $_POST['province'] : ($province = '');
isset($_POST['service']) && $_POST['service'] ? $service = $_POST['service'] : ($service = '');
$choix1 = getSiteCent($region);
$choix2 = getSiteFour($province);
$choix3 = getSiteBénéf($service);
if ($region == '0') {
$choix = 'Tous les sites (National)';
} else {
isset($_POST['region']) && $_POST['region'] ? $choix = $choix1 : ($region = '');
isset($_POST['province']) && $_POST['province'] ? $choix = $choix2 : ($province = '');
isset($_POST['service']) && $_POST['service'] ? $choix = $choix3 : ($service = '');
}
$_SESSION['DATA_ETAT']['choix'] = $choix;
$userName = getField('LOGIN', $_SESSION['GL_USER']['LOGIN'], 'LOGIN', 'compte');
$ilang = getCodelangue($userName);
if ($choix = '0') {
if ($ilang == '1' && $ilang != '') {
$_SESSION['DATA_ETAT']['choix'] = 'Tous les sites (National)';
}
if ($ilang == '2' && $ilang != '') {
$_SESSION['DATA_ETAT']['choix'] = 'All the sites (National)';
}
if ($ilang == '3' && $ilang != '') {
$_SESSION['DATA_ETAT']['choix'] = 'Todos os sítios (Nacional)';
}
}
isset($_POST['datedebut']) && $_POST['datedebut'] ? $datedebut = $_POST['datedebut'] : ($datedebut = '');
isset($_POST['datefin']) && $_POST['datefin'] ? $datefin = $_POST['datefin'] : ($datefin = '');
$_SESSION['DATA_ETAT']['datedebut'] = $datedebut;
$_SESSION['DATA_ETAT']['datefin'] = $datefin;
开发者ID:benleibert,项目名称:channel-software,代码行数:31,代码来源:dbetat.php
示例3: ligneConMenu
/**
* @author KG
*
* @version $Id$
* @copyright 2012
* @date 08/06/2012
*
* What is it about?
* Here you will find all functions used in profil
*/
function ligneConMenu($wh = '', $ord = '', $sens = 'ASC', $page = 1, $nelt)
{
$userName = getField('LOGIN', $_SESSION['GL_USER']['LOGIN'], 'LOGIN', 'compte');
$ilang = getCodelangue($userName);
$returnHTML = '';
$returnTble = array();
//HTML, nbreTotal,
//Where clause
$where = '';
isset($wh) and $wh != '' ? $where = " WHERE {$wh} " : ($where = "");
//Oerder condition
$order = '';
isset($ord) and $ord != '' ? $order = " ORDER BY {$ord} {$sens}" : ($order = " ORDER BY menu.IDMENU ASC");
//Nombre d'éléments
$returnTble['NE'] = nombreElement($where, 'menu');
if ($returnTble['NE'] > 0) {
//Calcule des limites
$i = ($page - 1) * $nelt;
//SQL
$sql = "SELECT * FROM menu {$where} {$order} LIMIT {$i}, {$nelt};";
//Exécution
try {
$cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
//Connexion to database
} catch (PDOException $error) {
//Treat error
//("Erreur de connexion : " . $error->getMessage() );
header('location:errorPage.php');
}
$query = $cnx->prepare($sql);
//Prepare the SQL
$query->execute();
//Execute prepared SQL => $query
$i = 0;
$j = 6;
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
$i % 2 == 0 ? $col = "tableOddRow" : ($col = "tableEvenRow");
//Is use
$compte = isUseNow('IDMENU', 'profil_menu', "WHERE IDMENU LIKE '" . $row['IDMENU'] . "'");
$compte > 0 ? $Use = 1 : ($Use = 0);
$returnHTML .= '
<tr align="left" valign="middle" class="' . $col . '">
<td><input type="checkbox" name="rowSelection[]" value="' . $row['IDMENU'] . '@' . $Use . '"></td>
<td class="text" >' . stripslashes($row['IDMENU']) . '</td>
<td class="text" >' . stripslashes($row['LIBMENU']) . '</td>
</tr>';
$i++;
$j++;
}
// <td class="text" ><a href="detailfonctionnalite.php?do=detail&xid='.$row['IDMENU'].'"><img src="../images/b_browse1.png" title="Afficher" align="absmiddle"></a></td>
} else {
if ($ilang == '1' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">Aucune donnée...</td></tr>';
}
if ($ilang == '2' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">No data...</td></tr>';
}
if ($ilang == '3' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">Nenhum dado...</td></tr>';
}
}
$returnTble['L'] = $returnHTML;
return $returnTble;
}
开发者ID:benleibert,项目名称:channel-software,代码行数:74,代码来源:funcmenu.php
示例4: ligneEtatListePersonne
function ligneEtatListePersonne($wh = '')
{
$userName = getField('LOGIN', $_SESSION['GL_USER']['LOGIN'], 'LOGIN', 'compte');
$ilang = getCodelangue($userName);
$returnHTML = '';
//Where clause
$where = '';
isset($wh) and $wh != '' ? $where = " WHERE {$wh} " : ($where = "");
//Oerder condition
$order = '';
isset($ord) and $ord != '' ? $order = " ORDER BY {$ord} {$sens}" : ($order = " ORDER BY NUM_MLLE ASC");
//Nombre d'éléments
$nbre = nombrePersonnel($where);
if ($nbre > 0) {
//Calcule des limites
$sql = "SELECT * FROM personnel INNER JOIN magasin ON (personnel.CODE_MAGASIN=magasin.CODE_MAGASIN) {$where} {$order};";
//Exécution
try {
$cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
//Connexion to database
} catch (PDOException $error) {
//Treat error
//("Erreur de connexion : " . $error->getMessage() );
header('location:errorPage.php');
}
$query = $cnx->prepare($sql);
//Prepare the SQL
$query->execute();
//Execute prepared SQL => $query
$i = 1;
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
//($i%2 == 0 ? $col = "tableOddRow" : $col = "tableEvenRow");
$returnHTML .= '
<tr align="left" valign="middle">
<td class="botBorderTdall" align="center">' . $i . '</td>
<td class="botBorderTdall">' . stripslashes($row['NUM_MLLE']) . ' </td>
<td class="botBorderTdall">' . stripslashes($row['PERS_PRENOMS'] . ' ' . $row['PERS_NOM']) . ' </td>
<td class="botBorderTdall">' . stripslashes($row['SER_NOM']) . ' </td>
<td class="botBorderTdall">' . stripslashes($row['PERS_FONCTION']) . ' </td>
<td class="botBorderTdall" nowrap="nowrap">' . stripslashes($row['PERS_TEL']) . ' </td>
<td class="botBorderTdall">' . stripslashes($row['PERS_EMAIL']) . ' </td>
</tr>';
$i++;
}
} else {
if ($ilang == '1' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">Aucune donnée...</td></tr>';
}
if ($ilang == '2' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">No data...</td></tr>';
}
if ($ilang == '3' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">Nenhum dado...</td></tr>';
}
}
return $returnHTML;
}
开发者ID:benleibert,项目名称:channel-software,代码行数:57,代码来源:funcpersonnel.php
示例5: ligneEtatBeneficiaire
function ligneEtatBeneficiaire($wh = '', $ord = '', $sens = 'ASC')
{
$userName = getField('LOGIN', $_SESSION['GL_USER']['LOGIN'], 'LOGIN', 'compte');
$ilang = getCodelangue($userName);
$returnHTML = '';
$returnTble = array();
//HTML, nbreTotal,
//Where clause
$where = '';
isset($wh) and $wh != '' ? $where = " WHERE {$wh} " : ($where = "");
//Oerder condition
$order = '';
isset($ord) and $ord != '' ? $order = " ORDER BY {$ord} {$sens}" : ($order = " ORDER BY province.IDREGION, beneficiaire.IDPROVINCE, BENEF_NOM ASC");
$sql = "SELECT * FROM beneficiaire INNER JOIN typebeneficiaire ON (beneficiaire.CODE_TYPEBENEF LIKE typebeneficiaire.CODE_TYPEBENEF)\r\n\tINNER JOIN province ON (beneficiaire.IDPROVINCE LIKE province.IDPROVINCE) {$where} {$order};";
//Exécution
try {
$cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
//Connexion to database
} catch (PDOException $error) {
//Treat error
//("Erreur de connexion : " . $error->getMessage() );
header('location:errorPage.php');
}
$query = $cnx->prepare($sql);
//Prepare the SQL
$query->execute();
//Execute prepared SQL => $query
$Teff = 0;
$i = 1;
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
//($key, $code, $field, $table){
$returnHTML .= '
<tr align="left" valign="middle">
<td class="botBorderTdall" align="center">' . $i . '-</td>
<td class="botBorderTdall" align="center">' . $row['CODE_BENEF'] . ' </td>
<td class="botBorderTdall">' . stripslashes($row['BENEF_NOM']) . ' </td>
<td class="botBorderTdall" >' . stripslashes($row['NOM_TYPEBENEF']) . ' </td>
<td class="botBorderTdall" >' . stripslashes(getField('IDREGION', $row['IDREGION'], 'REGION', 'region')) . ' </td>
<td class="botBorderTdall" >' . stripslashes($row['PROVINCE']) . ' </td>
</tr>';
$i++;
}
if ($returnHTML == '') {
if ($ilang == '1' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">Aucune donnée...</td></tr>';
}
if ($ilang == '2' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">No data...</td></tr>';
}
if ($ilang == '3' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">Nenhum dado...</td></tr>';
}
}
// $returnTble['L']=$returnHTML;
return $returnHTML;
}
开发者ID:benleibert,项目名称:channel-software,代码行数:56,代码来源:funcbeneficiaire.php
示例6: ligneEtatListeLog
function ligneEtatListeLog($wh = '')
{
$userName = getField('LOGIN', $_SESSION['GL_USER']['LOGIN'], 'LOGIN', 'compte');
$ilang = getCodelangue($userName);
$returnHTML = '';
//Where clause
$where = '';
isset($wh) and $wh != '' ? $where = " WHERE {$wh} " : ($where = "");
//Oerder condition
$order = '';
isset($ord) and $ord != '' ? $order = " ORDER BY {$ord} {$sens}" : ($order = " ORDER BY LOG_DATE DESC");
//Nombre d'éléments
$nbre = nombreLog($where);
if ($nbre > 0) {
//Calcule des limites
$sql = "SELECT * FROM logs {$where} {$order} ";
//Exécution
try {
$cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
//Connexion to database
} catch (PDOException $error) {
//Treat error
//("Erreur de connexion : " . $error->getMessage() );
header('location:errorPage.php');
}
$query = $cnx->prepare($sql);
//Prepare the SQL
$query->execute();
//Execute prepared SQL => $query
$i = 1;
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
$d1 = frFormat($row['LOG_DATE']);
//Return $ret = array(); // DFR, TFR
$returnHTML .= '
<tr align="left" valign="middle">
<td class="botBorderTdall" align="center">' . $i . '</td>
<td class="botBorderTdall">' . stripslashes($row['LOGIN']) . ' </td>
<td class="botBorderTdall">' . stripslashes(getPersonnelName($row['MLLE'])) . ' </td>
<td class="botBorderTdall">' . stripslashes($d1['DFR']) . ' </td>
<td class="botBorderTdall">' . stripslashes($d1['TFR']) . ' </td>
<td class="botBorderTdall">' . stripslashes($row['LOG_DESCRIP']) . ' </td>
</tr>';
$i++;
}
} else {
if ($ilang == '1' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">Aucune donnée...</td></tr>';
}
if ($ilang == '2' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">No data...</td></tr>';
}
if ($ilang == '3' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">Nenhum dado...</td></tr>';
}
}
return $returnHTML;
}
开发者ID:benleibert,项目名称:channel-software,代码行数:57,代码来源:funclog.php
示例7: lignEtatGroupArticles1
function lignEtatGroupArticles1($idarticle = array(), $date = '')
{
$userName = getField('LOGIN', $_SESSION['GL_USER']['LOGIN'], 'LOGIN', 'compte');
$ilang = getCodelangue($userName);
$table1 = "stocks_article";
$exercice = $_SESSION['GL_USER']['EXERCICE'];
//Connection to Database server
$idCon = mysql_connect(DBSERVER, DBUSER, DBPWD) or header('location:errorPage.php&code=');
//Select Database
mysql_select_db(DB, $idCon) or header('location:errorPage.php&code=');
$list = '';
$i = 1;
foreach ($idarticle as $key => $val) {
//($i%2 == 0 ? $col = "tableOddRow" : $col = "tableEvenRow");
$col = '';
$sE = etatArticleEntree($val, $exercice, $date);
$sB = etatArticleBonus($val, $exercice, $date);
$sS = etatArticleSortie($val, $exercice, $date);
$sM = etatArticleMalus($val, $exercice, $date);
$stock = $sE + $sB - $sM - $sS;
isset($val) && $val != '' ? $where = " WHERE ID_ARTICLE LIKE '{$val}'" : ($where = "");
$SQL = "SELECT * FROM {$table1} {$where} ORDER BY LIBELLE_ARTICLE ASC;";
$result = mysql_query($SQL, $idCon);
$row = mysql_fetch_array($result);
$list .= '<tr class="' . $col . '">
<td width="3%" height="22" align="center" valign="middle" class="botBorderTdallEtat">' . $i . '</td>
<td width="10%" height="22" align="center" valign="middle" class="botBorderTdallEtat">' . $row['ID_ARTICLE'] . ' </td>
<td width="10%" height="22" align="left" valign="middle" class="botBorderTdallEtat">' . stripslashes($row['LIBELLE_ARTICLE']) . '</td>
<td width="10%" height="22" align="center" valign="middle" class="botBorderTdallEtat">' . $sE . ' </a></td>
<td width="10%" height="22" align="center" valign="middle" class="botBorderTdallEtat">' . $sB . ' </a></td>
<td width="10%" height="22" align="center" valign="middle" class="botBorderTdallEtat">' . $sM . ' </a></td>
<td width="10%" height="22" align="center" valign="middle" class="botBorderTdallEtat">' . $sS . ' </a></td>
<td width="10%" height="22" align="center" valign="middle" class="botBorderTdallEtat">' . $stock . ' </a></td>
</tr>';
$i++;
}
if ($ilang == '1' && $ilang != '') {
if ($list == '') {
$list = '
<tr class="tableOddRow">
<td height="22" align="left" valign="middle" class="text" colspan="4">Aucun produit disponible ...</td>
</tr>';
}
}
if ($ilang == '2' && $ilang != '') {
if ($list == '') {
$list = '
<tr class="tableOddRow">
<td height="22" align="left" valign="middle" class="text" colspan="4">No data ...</td>
</tr>';
}
}
if ($ilang == '3' && $ilang != '') {
if ($list == '') {
$list = '
<tr class="tableOddRow">
<td height="22" align="left" valign="middle" class="text" colspan="4">Nenhum dado ...</td>
</tr>';
}
}
mysql_close($idCon);
return $list;
}
开发者ID:benleibert,项目名称:channel-software,代码行数:63,代码来源:phpfuncLibBBB.php
示例8: ligneEtatListeUtilisateur
function ligneEtatListeUtilisateur($wh = '')
{
$userName = getField('LOGIN', $_SESSION['GL_USER']['LOGIN'], 'LOGIN', 'compte');
$ilang = getCodelangue($userName);
$returnHTML = '';
//Where clause
$where = '';
isset($wh) and $wh != '' ? $where = " WHERE {$wh} " : ($where = "");
//Oerder condition
$order = '';
isset($ord) and $ord != '' ? $order = " ORDER BY {$ord} {$sens}" : ($order = " ORDER BY LOGIN ASC");
//Nombre d'éléments
$nbre = nombreUser($where);
if ($nbre > 0) {
//Calcule des limites
$sql = "SELECT * FROM compte INNER JOIN profil ON (compte.IDPROFIL=profil.IDPROFIL) {$where} {$order};";
//Exécution
try {
$cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
//Connexion to database
} catch (PDOException $error) {
//Treat error
//("Erreur de connexion : " . $error->getMessage() );
header('location:errorPage.php');
}
$query = $cnx->prepare($sql);
//Prepare the SQL
$query->execute();
//Execute prepared SQL => $query
$i = 1;
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
$i % 2 == 0 ? $col = "tableOddRow" : ($col = "tableEvenRow");
$row['ACTIVATED'] == 1 ? $etat = 'Activé' : ($etat = 'Déactivé');
$returnHTML .= '
<tr align="left" valign="middle" class="' . $col . '">
<td class="botBorderTdall" align="center">' . $i . '</td>
<td class="botBorderTdall">' . stripslashes($row['LOGIN']) . ' </td>
<td class="botBorderTdall">' . stripslashes($row['LIBPROFIL']) . ' </td>
<td class="botBorderTdall">' . stripslashes($row['NUM_MLLE']) . ' </td>
<td class="botBorderTdall">' . stripslashes(getPersonnelName($row['NUM_MLLE'])) . ' </td>
<td class="botBorderTdall">' . stripslashes($etat) . '</td>
<td class="botBorderTdall">' . stripslashes(getUsermagasin($row['LOGIN'])) . ' </td>
</tr>';
$i++;
}
} else {
if ($ilang == '1' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">Aucune donnée...</td></tr>';
}
if ($ilang == '2' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">No data...</td></tr>';
}
if ($ilang == '3' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">Nenhum dado...</td></tr>';
}
}
return $returnHTML;
}
开发者ID:benleibert,项目名称:channel-software,代码行数:58,代码来源:funcaffectation.php
示例9: ligneEtatExercice
function ligneEtatExercice($wh = '', $ord = '', $sens = 'ASC')
{
$userName = getField('LOGIN', $_SESSION['GL_USER']['LOGIN'], 'LOGIN', 'compte');
$ilang = getCodelangue($userName);
$returnHTML = '';
//Where clause
$where = '';
isset($wh) and $wh != '' ? $where = " WHERE {$wh} " : ($where = "");
//Oerder condition
$order = '';
isset($ord) and $ord != '' ? $order = " ORDER BY {$ord} {$sens}" : ($order = " ORDER BY ID_EXERCICE DESC");
//Nombre d'éléments
$nbre = nombreExercice($where);
if ($nbre > 0) {
//Calcule des limites
$sql = "SELECT * FROM exercice {$where} {$order};";
//Exécution
try {
$cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
//Connexion to database
} catch (PDOException $error) {
//Treat error
//("Erreur de connexion : " . $error->getMessage() );
header('location:errorPage.php');
}
$query = $cnx->prepare($sql);
//Prepare the SQL
$query->execute();
//Execute prepared SQL => $query
$i = 0;
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
$d1 = frFormat($row['EX_DATEDEBUT']);
//Return $ret = array(); // DFR, TFR
$d2 = frFormat($row['EX_DATEFIN']);
$d3 = frFormat($row['EX_DATECLOTURE']);
$nbre = NbJours(date('Y-m-d'), $row['EX_DATEFIN']);
if ($nbre == 1) {
$nbre = $nbre . ' jour';
} elseif ($nbre > 1) {
$nbre = $nbre . ' jours';
} else {
$nbre = '-';
}
$row['EX_CLOTURE'] == '0' ? $imgCl = '<img src="../images/encours.gif" width="16" height="16">' : ($imgCl = '<img src="../images/fermer.png" width="16" height="16">');
$returnHTML .= '
<tr align="left" valign="middle">
<td class="botBorderTdall" align="center">' . $row['ID_EXERCICE'] . ' </td>
<td class="botBorderTdall" >' . stripslashes($row['EX_LIBELLE']) . ' </td>
<td class="botBorderTdall" align="center">' . stripslashes($d1['DFR']) . ' </td>
<td class="botBorderTdall" align="center">' . stripslashes($d2['DFR']) . ' </td>
<td class="botBorderTdall" align="center">' . $imgCl . '</td>
<td class="botBorderTdall" align="center">' . stripslashes($d3['DFR']) . ' </td>
<td class="botBorderTdall" align="center">' . stripslashes($nbre) . ' </td>
</tr>';
$i++;
}
} else {
if ($ilang == '1' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">Aucune donnée...</td></tr>';
}
if ($ilang == '2' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">No data...</td></tr>';
}
if ($ilang == '3' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">Nenhum dado...</td></tr>';
}
}
return $returnHTML;
}
开发者ID:benleibert,项目名称:channel-software,代码行数:69,代码来源:funcexercice.php
示例10: ligneEtatListeTransfert
function ligneEtatListeTransfert($wh = '', $ord = '')
{
$userName = getField('LOGIN', $_SESSION['GL_USER']['LOGIN'], 'LOGIN', 'compte');
$ilang = getCodelangue($userName);
$returnHTML = '';
$returnTble = array();
//HTML, nbreTotal,
//Where clause
$where = '';
isset($wh) and $wh != '' ? $where = " WHERE {$wh} " : ($where = "");
//Oerder condition
$order = '';
isset($ord) and $ord != '' ? $order = " ORDER BY {$ord} {$sens}" : ($order = " ORDER BY TRS_DATE DESC");
//Nombre d'éléments
$nbre = nombreTransfert($where);
if ($nbre > 0) {
//Calcule des limites
$sql = "SELECT * FROM transfert {$where} {$order};";
//Exécution
try {
$cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
//Connexion to database
} catch (PDOException $error) {
//Treat error
//("Erreur de connexion : " . $error->getMessage() );
header('location:errorPage.php');
}
$query = $cnx->prepare($sql);
//Prepare the SQL
$query->execute();
//Execute prepared SQL => $query
$i = 1;
$tranfert = array(1 => 'Transfert sortant', 2 => 'Transfert entrant');
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
//($i%2 == 0 ? $col = "tableOddRow" : $col = "tableEvenRow");
$d1 = frFormat($row['TRS_DATE']);
//Return $ret = array(); // DFR, TFR
if ($row['TRS_VALIDE'] == '0') {
$imgCl = '<img src="../images/encours.gif" title="En cours" width="16" height="16">';
} elseif ($row['TRS_VALIDE'] == '2') {
$imgCl = '<img src="../images/cancel.png" title="Annulé" width="16" height="16">';
} else {
$imgCl = '<img src="../images/valider.gif" title="Validé" width="16" height="16">';
}
$t = $row['TRS_NATURE'];
$returnHTML .= '
<tr align="left" valign="middle">
<td class="botBorderTdall" align="center">' . $i . '</td>
<td class="botBorderTdall">' . stripslashes($row['CODE_TRANSFERT']) . ' </td>
<td class="botBorderTdall">' . stripslashes($d1['DFR']) . ' </td>
<td class="botBorderTdall">' . stripslashes($tranfert[$t]) . ' </td>
<td class="botBorderTdall">' . stripslashes(getmagasinName($row['MAG_CODE_MAGASIN_SRCE'])) . ' </td>
<td class="botBorderTdall">' . stripslashes(getmagasinName($row['MAG_CODE_MAGASIN_DEST'])) . ' </td>
</tr>';
$i++;
}
} else {
if ($ilang == '1' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">Aucune donnée...</td></tr>';
}
if ($ilang == '2' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">No data...</td></tr>';
}
if ($ilang == '3' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">Nenhum dado...</td></tr>';
}
}
return $returnHTML;
}
开发者ID:benleibert,项目名称:channel-software,代码行数:69,代码来源:functransfert.php
示例11: ligneEtatListeProduit
function ligneEtatListeProduit($wh = '')
{
$userName = getField('LOGIN', $_SESSION['GL_USER']['LOGIN'], 'LOGIN', 'compte');
$ilang = getCodelangue($userName);
$returnHTML = '';
//Where clause
$where = '';
isset($wh) and $wh != '' ? $where = " WHERE {$wh} " : ($where = "");
//Oerder condition
$order = '';
isset($ord) and $ord != '' ? $order = " ORDER BY {$ord} {$sens}" : ($order = " ORDER BY produit.CODE_SOUSCATEGORIE, CODE_PRODUIT ASC");
//Nombre d'éléments
$nbre = nombreProduit($where);
if ($nbre > 0) {
//Calcule des limites
$sql = "SELECT * FROM produit INNER JOIN souscategorie ON (produit.CODE_SOUSCATEGORIE LIKE souscategorie.CODE_SOUSCATEGORIE)\r\n\t\tINNER JOIN categorie ON (categorie.CODE_CATEGORIE LIKE souscategorie.CODE_CATEGORIE) {$where} {$order} ";
//Exécution
try {
$cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
//Connexion to database
} catch (PDOException $error) {
//Treat error
//("Erreur de connexion : " . $error->getMessage() );
header('location:errorPage.php');
}
$query = $cnx->prepare($sql);
//Prepare the SQL
$query->execute();
//Execute prepared SQL => $query
$i = 0;
$j = 5;
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
$row['PRD_TRACEUR'] != '' ? $cdt = "Produit traceur" : ($cdt = "Produit non traceur");
//Is use
$bareme = isUseNow('CODE_PRODUIT', 'bareme', "WHERE CODE_PRODUIT LIKE '" . $row['CODE_PRODUIT'] . "'");
$conditionnement = isUseNow('CODE_PRODUIT', 'conditionmt', "WHERE CODE_PRODUIT LIKE '" . $row['CODE_PRODUIT'] . "'");
$returnHTML .= '
<tr align="left" valign="middle" >
<td class="botBorderTdall" align="center">' . $row['CODE_PRODUIT'] . '</td>
<td class="botBorderTdall" >' . stripslashes($row['PRD_LIBELLE']) . '</td>
<td class="botBorderTdall" >' . stripslashes($row['CAT_LIBELLE']) . '</td>
<td class="botBorderTdall" align="center">' . stripslashes($row['ID_UNITE']) . '</td>
<td class="botBorderTdall" >' . stripslashes($cdt) . '</td>
<!-- <td class="botBorderTdall" align="center" ><a href="conditionnement.php?selectedTab=par&codeproduit=' . $row['CODE_PRODUIT'] . '">' . stripslashes('Conditionnement') . '</a></td> -->
</tr>';
$i++;
$j++;
}
} else {
if ($ilang == '1' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">Aucune donnée...</td></tr>';
}
if ($ilang == '2' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">No data...</td></tr>';
}
if ($ilang == '3' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">Nenhum dado...</td></tr>';
}
}
return $returnHTML;
}
开发者ID:benleibert,项目名称:channel-software,代码行数:61,代码来源:funcproduit.php
示例12: basededonneesMenus
function basededonneesMenus($tab = '', $droit = '')
{
isset($droit['data_vid']['VISIBLE']) ? $data_vid = $droit['data_vid']['VISIBLE'] : ($data_vid = 0);
isset($droit['data_exp']['VISIBLE']) ? $data_exp = $droit['data_exp']['VISIBLE'] : ($data_exp = 0);
isset($droit['data_imp']['VISIBLE']) ? $data_imp = $droit['data_imp']['VISIBLE'] : ($data_imp = 0);
$userName = getField('LOGIN', $_SESSION['GL_USER']['LOGIN'], 'LOGIN', 'compte');
$ilang = getCodelangue($userName);
if ($ilang == '1' && $ilang != '') {
$TOPMENUS = array('0' => array('0' => 'Base de données', '1' => array('Vider la base de données', 'vider.php?selectedTab=data&rst=1', $data_vid, 'data'), '2' => array('Sauvegarde de la base', 'sauvegarde.php?selectedTab=data&rst=1', $data_exp, 'data'), '3' => array('Importer de la base', 'import.php?selectedTab=data&rst=1', $data_imp, 'data')));
}
if ($ilang == '2' && $ilang != '') {
$TOPMENUS = array('0' => array('0' => 'Database', '1' => array('Empty database', 'vider.php?selectedTab=data&rst=1', $data_vid, 'data'), '2' => array('Database backup', 'sauvegarde.php?selectedTab=data&rst=1', $data_exp, 'data'), '3' => array('Import the base', 'import.php?selectedTab=data&rst=1', $data_imp, 'data')));
}
if ($ilang == '3' && $ilang != '') {
$TOPMENUS = array('0' => array('0' => 'Base de dados', '1' => array('Esvaziar a base de dados', 'vider.php?selectedTab=data&rst=1', $data_vid, 'data'), '2' => array('Guardar a base de dados', 'sauvegarde.php?selectedTab=data&rst=1', $data_exp, 'data'), '3' => array('Importar da basse', 'import.php?selectedTab=data&rst=1', $data_imp, 'data')));
}
$menuHTML1 = '';
foreach ($TOPMENUS as $key => $val) {
$menuHTML1 .= '<tr><td><table width="185" border="0" align="left" cellpadding="1" cellspacing="1">';
foreach ($val as $key1 => $val1) {
//B 1
if (!is_array($val1)) {
$menuHTML1 .= '
<tr>
<td width="175" height="20" colspan="2" class="leftHeader"><nobr>' . stripslashes($val[0]) . '</nobr></td>
</tr>
';
}
if (is_array($val1) && $val1[2] == 1) {
//B 2
$menuHTML1 .= '
<tr>
<td class="leftLink" width="2"> </td>
<td class="leftLink" height="20" width="175" ><a href="' . stripslashes($val1[1]) . '" />' . stripslashes($val1[0]) . '</a></td>
</tr>
';
}
//B 2
}
$menuHTML1 .= '
<tr>
<td class="leftLink" width="2"></td>
<td class="leftLink" height="10" width="175" ></td>
</tr>
</table> </td></tr>';
}
return $menuHTML1;
}
开发者ID:benleibert,项目名称:channel-software,代码行数:48,代码来源:menusNV.php
示例13: ligneConRapDetailleSortie
function ligneConRapDetailleSortie($wh = '', $ord = '', $sens = 'ASC', $page = 1, $nelt)
{
$userName = getField('LOGIN', $_SESSION['GL_USER']['LOGIN'], 'LOGIN', 'compte');
$ilang = getCodelangue($userName);
$returnHTML = '';
$returnTble = array();
//HTML, nbreTotal,
//Where clause
$where = '';
isset($wh) and $wh != '' ? $where = " {$wh} " : ($where = "");
//Oerder condition
$order = '';
isset($ord) and $ord != '' ? $order = " ORDER BY {$ord} {$sens}" : ($order = " ORDER BY MVT_DATEVALID DESC");
//Nombre d'éléments
$returnTble['NE'] = nombreJournal($where);
if ($returnTble['NE'] > 0) {
//Calcule des limites
$i = ($page - 1) * $nelt;
$sql = "SELECT mouvement.`CODE_PRODUIT`,`MVT_NATURE`,`MVT_TIME`, `MVT_VALID`, `MVT_UNITE`, MVT_DATE, `MVT_QUANTITE`,MVT_REFLOT,\r\n\t \t`CODE_MAGASIN`, ID_SOURCE, produit.PRD_LIBELLE,MVT_DATEPEREMP, MVT_PV, MVT_PA\r\n\t \tFROM mouvement INNER JOIN produit ON (mouvement.CODE_PRODUIT LIKE produit.CODE_PRODUIT) {$where} {$order} LIMIT {$i}, {$nelt};";
//Exécution
try {
$cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
//Connexion to database
} catch (PDOException $error) {
//Treat error
//("Erreur de connexion : " . $error->getMessage() );
header('location:errorPage.php');
}
$query = $cnx->prepare($sql);
//Prepare the SQL
$query->execute();
//Execute prepared SQL => $query
$i = 0;
$_SESSION['DATA_ETAT']['ligne'] = array();
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
$i % 2 == 0 ? $col = "tableOddRow" : ($col = "tableEvenRow");
if ($row['MVT_VALID'] == '0') {
$imgCl = '<img src="../images/encours.gif" title="En cours" width="16" height="16">';
} elseif ($row['MVT_VALID'] == '2') {
$imgCl = '<img src="../images/cancel.png" title="Annulée" width="16" height="16">';
} else {
$imgCl = '<img src="../images/valider.gif" title="Validée" width="16" height="16">';
}
$datemvt = frFormat2($row['MVT_DATE']);
array_push($_SESSION['DATA_ETAT']['ligne'], array('codeproduit' => $row['CODE_PRODUIT'], 'produit' => $row['PRD_LIBELLE'], 'reflot' => $row['MVT_REFLOT'], 'nature' => $row['MVT_NATURE'], 'qte' => $row['MVT_QUANTITE'], 'prix' => $row['MVT_PV'], 'datemvt' => $datemvt, 'timemvt' => $row['MVT_TIME'], 'valide' => $row['MVT_VALID'], 'unite' => $row['MVT_UNITE']));
if ($row['MVT_DATEPEREMP'] < date('Y-m-d')) {
$col = "tableFINIRow";
}
$d = preg_replace('/-/', '/', $row['MVT_DATEPEREMP']);
$d = substr($d, 0, 7);
isset($row['MVT_PV']) && $row['MVT_PV'] > 0 ? $prix = $row['MVT_PV'] : ($prix = 0);
isset($row['MVT_QUANTITE']) && $row['MVT_QUANTITE'] > 0 ? $qte = $row['MVT_QUANTITE'] : ($qte = 0);
$prix > 0 ? $Aprix = number_format($prix, 0, ',', ' ') : ($Aprix = '');
$total = $prix * $qte;
$total > 0 ? $Atotal = number_format($total, 0, ',', ' ') : ($Atotal = '');
$row['MVT_QUANTITE'] > 0 ? $row['MVT_QUANTITE'] = number_format($row['MVT_QUANTITE'], 0, ',', ' ') : ($row['MVT_QUANTITE'] = '');
$i++;
$returnHTML .= '
<tr align="left" valign="middle" class="' . $col . '">
<td class="text" align="center" nowrap>' . $i . '</td>
<td height="22" class="text" align="left">' . stripslashes($row['CODE_PRODUIT']) . '</td>
<td class="text" >' . stripslashes($row['PRD_LIBELLE']) . '</td>
<td class="text" align="left">' . stripslashes($row['MVT_REFLOT']) . '</td>
<td class="text" align="left" nowrap="nowrap">' . stripslashes($row['MVT_NATURE']) . '</td>
<td class="text" align="center">' . stripslashes(frFormat2($row['MVT_DATE'])) . '</td>
<td class="text" align="right">' . stripslashes($row['MVT_QUANTITE']) . '</td>
<td class="text" align="left">' . stripslashes($row['MVT_UNITE']) . '</td>
<td class="text" align="right">' . stripslashes($Aprix) . '</td>
<td class="text" align="right">' . stripslashes($Atotal) . '</td>
</tr>';
}
$_SESSION['DATA_ETAT']['nbreLigne'] = $i;
} else {
if ($ilang == '1' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">Aucune donnée...</td></tr>';
}
if ($ilang == '2' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">No data...</td></tr>';
}
if ($ilang == '3' && $ilang != '') {
$returnHTML .= '<tr><td colspan="4" class="text">Nenhum dado...</td></tr>';
}
}
$returnTble['L'] = $returnHTML;
return $returnTble;
}
开发者ID:benleibert,项目名称:channel-software,代码行数:86,代码来源:funcetat.php
示例14: ligneEtatTypeFournisseur
function ligneEtatTypeFournisseur($wh = '', $ord = '', $sens = 'ASC')
{
$userName = getField('LOGIN', $_SESSION['GL_USER']['LOGIN'], 'LOGIN', 'compte');
$ilang = getCodelangue($userName);
$returnHTML = '';
//Where clause
$where = '';
isset($wh) and $wh != ''
|
请发表评论