本文整理汇总了PHP中fn_ResultToArray函数的典型用法代码示例。如果您正苦于以下问题:PHP fn_ResultToArray函数的具体用法?PHP fn_ResultToArray怎么用?PHP fn_ResultToArray使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fn_ResultToArray函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: var_dump
if ($id_key_unic == null) {
$tableau[] = $datas;
} else {
$tableau[$datas[$id_key_unic]] = $datas;
}
}
return $tableau;
}
/*****/
include '../connect_db.php';
$sql = "SELECT * FROM cpas_codes order by libelle;";
var_dump($sql);
$result = mysqli_query($lien, $sql);
//ferme la connection//
mysqli_close($lien);
$tab_codes = fn_ResultToArray($result, "id_code");
/****************************************************************/
$outStr = "";
$headStr = "<?php \n";
$nomTable = "array_code";
$initialisation = "\$" . $nomTable . "=array(); \n";
$outStr .= "\$" . $nomTable . "[0]='---'; \n";
foreach ($tab_codes as $key => $value) {
$outStr .= "\$" . $nomTable . "[" . $value['id_code'] . "]=\"" . $value['libelle'] . "\"; \n";
//$outStr.="$".$nomTable."[".$value['id_code']."]['N']=\"".$value['libelle_N']."\"; \n";
}
$footStr = "?>";
$totalStr = $headStr;
$totalStr .= $initialisation;
$totalStr .= "\n";
$totalStr .= $outStr;
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:generate_codes.php
示例2: mysqli_query
/**********DEPARTEMENTS**********************************/
$sql = "select * from cpas_departements order by label_F;\n\t";
$result = mysqli_query($lien, $sql);
if (!$result) {
echo "erreur dans la requete:<i>" . $sql . "</i>";
exit;
}
$tab_dep = fn_ResultToArray($result, 'id_dep');
/**********HORS DEPARTEMENTS**********************************/
$sql = "select * from cpas_hors_departements order by label_F;\n\t";
$result = mysqli_query($lien, $sql);
if (!$result) {
echo "erreur dans la requete:<i>" . $sql . "</i>";
exit;
}
$tab_hors_dep = fn_ResultToArray($result, 'id_hors_dep');
mysqli_close($lien);
include '../arrays_libelle/array_article_budgetaire.php';
include '../arrays_libelle/array_hors_departement.php';
include '../arrays_libelle/array_departement.php';
include '../arrays_libelle/array_service.php';
include '../arrays_libelle/array_cellule.php';
if ($id_mvt_service == 0) {
$titre = 'Ajout d\'un mouvement de service';
// vérifie s'il s'agit du 1er mvt
include '../connect_db.php';
$sql = "select * from cpas_mouvements_services\n\twhere id_contrat=" . $id_contrat . ";\n\t";
$result = mysqli_query($lien, $sql);
if (mysqli_num_rows($result) == 0) {
// si c'est la 1ère fois => date de début du contrat = date début mvt
$sql = "select start_date from cpas_contrats\n\t\twhere id_contrat=" . $id_contrat . ";\n\t\t";
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:display_form_mvt_service.php
示例3: var_dump
if ($id_key_unic == null) {
$tableau[] = $datas;
} else {
$tableau[$datas[$id_key_unic]] = $datas;
}
}
return $tableau;
}
/*****/
include '../connect_db.php';
$sql = "SELECT * FROM cpas_grades order by libelle_F;";
var_dump($sql);
$result = mysqli_query($lien, $sql);
//ferme la connection//
mysqli_close($lien);
$tab_grades = fn_ResultToArray($result, "id_grade");
/****************************************************************/
$outStr = "";
$headStr = "<?php \n";
$nomTable = "array_grade";
$initialisation = "\$" . $nomTable . "=array(); \n";
$outStr .= "\$" . $nomTable . "[0]['F']='---'; \n";
$outStr .= "\$" . $nomTable . "[0]['N']='---'; \n";
foreach ($tab_grades as $key => $value) {
$outStr .= "\$" . $nomTable . "[" . $value['id_grade'] . "]['F']=\"" . $value['libelle_F'] . "\"; \n";
$outStr .= "\$" . $nomTable . "[" . $value['id_grade'] . "]['N']=\"" . $value['libelle_N'] . "\"; \n";
}
$footStr = "?>";
$totalStr = $headStr;
$totalStr .= $initialisation;
$totalStr .= "\n";
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:generate_grades.php
示例4: mysqli_query
/************************************************************************
**************Construction des effectifs à une date donnée************
************************************************************************/
include 'creation_table_effectifs.php';
/***************Lecture des contrats****************************************/
include '../connect_db.php';
$sql = "\nselect \n*\nfrom \ncpas_contrats \nwhere \nstart_date <= '" . $date_effectif . "'\nAND\n(end_date >= '" . $date_effectif . "' or end_date='0000-00-00' or end_date='' or end_date is null)\nAND\nstatut='N';\n;\n";
$result = mysqli_query($lien, $sql);
$tab_contrats = fn_ResultToArray($result, "id_contrat");
/**************************Lecture agents + signalétiques****************************************************/
$result = array();
$sql = "select \n*\nfrom \ncpas_effectifs_" . $new_date_effectif . "\nwhere registre_id<990000\norder by nom,prenom;";
//var_dump($sql);
$result = mysqli_query($lien, $sql);
mysqli_close($lien);
$Row = fn_ResultToArray($result, "id_agent");
$nb_agents = count($Row) + 1;
/*********************************************/
$tab_dep = array();
$tab_ser = array();
$tab_cel = array();
$tab_OE = array();
$tab_grade = array();
$tab_fct = array();
$tab_cat = array();
$tab_bareme = array();
$tab_code = array();
$tab_date_code = array();
$tab_statut = array();
$tab_date_statut = array();
$tab_regime = array();
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:generate_bd_personnel.php
示例5: transformDate
include '../arrays_libelle/array_bareme.php';
include '../arrays_libelle/array_code.php';
include '../arrays_libelle/array_fonction.php';
//include('../arrays_libelle/array_statut.php');
//include('../arrays_libelle/array_regime.php');
/*************/
$date_effectif = transformDate($date_situation_effectifs);
/*******Connexion database***************/
include '../connect_db.php';
/*******Lire places au cadre*****************************/
$sql = "\nSELECT * from \ncpas_places_cadre\nwhere id_cadre=" . $id_cadre . " and statut='N' order by type_cadre desc,id_dep asc,id_ser asc;\n\n";
//var_dump( $sql);
$result = mysqli_query($lien, $sql);
/********Close connexion***************/
mysqli_close($lien);
$tab_cadres = fn_ResultToArray($result, 'id_place_cadre');
echo "\n<table>\n\t<tr style='height:50px;padding-top:5px;margin-top:5px;background-color:#E4F8D2;'>\n\t\t\n\t\t<td>HORS DEP./DEP.</td>\n\t\t<td>SERVICE</td>\n\t\t<td>BAREME</td>\n\t\t<td>FONCTION</td>\n\t\t<td>GRADE</td>\n\t\t<td>TYPE CADRE</td>\n\t\t<td>ARTICLE BUDGETAIRE</td>\n\t\t<td>EQUIV. TEMPS PLEIN</td>\n\t</tr>\n\n";
//echo '<table>';
$i = 0;
foreach ($tab_cadres as $key => $value) {
$i++;
if ($i % 2 == 0) {
echo '<tr style="background-color:#ddd;">';
} else {
echo '<tr style="background-color:#fff;">';
}
if ($value['id_hors_dep'] == 0 || $value['id_hors_dep'] == '' || $value['id_hors_dep'] == null) {
echo '<td>' . $array_departement[$value['id_dep']]['F'] . '</td>';
} else {
echo '<td>' . $array_hors_departement[$value['id_hors_dep']]['F'] . '</td>';
}
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:lecture_cadre.php
示例6: var_dump
if ($id_key_unic == null) {
$tableau[] = $datas;
} else {
$tableau[$datas[$id_key_unic]] = $datas;
}
}
return $tableau;
}
/*****/
include '../connect_db.php';
$sql = "SELECT * FROM cpas_types_primes order by label_F;";
var_dump($sql);
$result = mysqli_query($lien, $sql);
//ferme la connection//
mysqli_close($lien);
$tab_types_primes = fn_ResultToArray($result, "id_type_prime");
/****************************************************************/
$outStr = "";
$headStr = "<?php \n";
$nomTable = "array_type_prime";
$initialisation = "\$" . $nomTable . "=array(); \n";
$outStr .= "\$" . $nomTable . "[0]['F']='---'; \n";
$outStr .= "\$" . $nomTable . "[0]['N']='---'; \n";
foreach ($tab_types_primes as $key => $value) {
$outStr .= "\$" . $nomTable . "[" . $value['id_type_prime'] . "]['F']=\"" . addslashes($value['label_F']) . "\"; \n";
$outStr .= "\$" . $nomTable . "[" . $value['id_type_prime'] . "]['N']=\"" . addslashes($value['label_N']) . "\"; \n";
}
$footStr = "?>";
$totalStr = $headStr;
$totalStr .= $initialisation;
$totalStr .= "\n";
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:generate_types_primes.php
示例7: var_dump
if ($id_key_unic == null) {
$tableau[] = $datas;
} else {
$tableau[$datas[$id_key_unic]] = $datas;
}
}
return $tableau;
}
/*****/
include '../connect_db.php';
$sql = "SELECT * FROM cpas_grades_cadre order by libelle;";
var_dump($sql);
$result = mysqli_query($lien, $sql);
//ferme la connection//
mysqli_close($lien);
$tab_grades_cadre = fn_ResultToArray($result, "id_grade_cadre");
/****************************************************************/
$outStr = "";
$headStr = "<?php \n";
$nomTable = "array_grade_cadre";
$initialisation = "\$" . $nomTable . "=array(); \n";
$outStr .= "\$" . $nomTable . "[0]='---'; \n";
foreach ($tab_grades_cadre as $key => $value) {
$outStr .= "\$" . $nomTable . "[" . $value['id_grade_cadre'] . "]=\"" . $value['libelle'] . "\"; \n";
//$outStr.="$".$nomTable."[".$value['id_code']."]['N']=\"".$value['libelle_N']."\"; \n";
}
$footStr = "?>";
$totalStr = $headStr;
$totalStr .= $initialisation;
$totalStr .= "\n";
$totalStr .= $outStr;
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:generate_grades_cadre.php
示例8: mysqli_query
$tableau[$datas[$id_key_unic]] = $datas;
}
}
return $tableau;
}
/****************************/
include '../connect_db.php';
/**************DEPARTEMENTS*******************************************/
$sql = "\n\t\tselect * from cpas_departements where actif=1 order by label_F;\n";
//var_dump($sql);
$result = mysqli_query($lien, $sql);
if (mysqli_num_rows($result) == 0) {
echo 'No result';
exit;
}
$tab_dep = fn_ResultToArray($result, 'id_dep');
?>
<style>
#DIV_CLOSE_PANNEL #box_close {
/* position absolute so that z-index can be defined and able to move this item using javascript */
position:absolute;
top:0px;
left:0px;
z-index:200;
/* image of the right rounded corner */
background: url(./tail.gif) no-repeat right top;
height:52px;
/*border:1px solid red;*/
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:30,代码来源:list_documents.php
示例9: mysqli_query
$txt = "Nommé";
} else {
$txt = "Contractuel";
}
$table->addCell(1500)->addText(html_entity_decode(iconv('UTF-8', 'windows-1252', $txt)));
}
/*****************************************************
Lecture des Mouvements régimes
********************************************************/
$sql = "\n\t\tselect\n\t\t*\n\t\tfrom cpas_mouvements_regimes\n\t\twhere statut='N' and id_contrat=" . $value['id_contrat'] . " order by date_debut_regime desc;\n\t\t";
//var_dump($sql);
$result = mysqli_query($lien, $sql);
if (mysqli_num_rows($result) == 0) {
echo "Aucun mvt<br><br>";
}
$tab_mvt_regimes = fn_ResultToArray($result, 'id_mvt_regime');
/********Titre mouvements régimes + titre colonnes**********************************/
$section->addText(html_entity_decode(iconv('UTF-8', 'windows-1252', '')), array('spaceAfter' => 200));
$txt = "Mouvements de régime";
$section->addText(html_entity_decode(iconv('UTF-8', 'windows-1252', $txt)), 'rStyle', 'pStyle_left');
$PHPWord->addTableStyle('myOwnTableStyle', $styleTable, $styleFirstRow);
// Add table
$table = $section->addTable('myOwnTableStyle');
$table->addRow();
$txt = "Début";
$table->addCell(1500)->addText(html_entity_decode(iconv('UTF-8', 'windows-1252', $txt)));
$txt = "Echéance";
$table->addCell(1500)->addText(html_entity_decode(iconv('UTF-8', 'windows-1252', $txt)));
$txt = "Régime";
$table->addCell(2000)->addText(html_entity_decode(iconv('UTF-8', 'windows-1252', $txt)));
$txt = "Equiv. temps plein";
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:fiche_individuelle_word.php
示例10: mysqli_query
$sql = "\n\t\tselect * from cpas_mouvements_services where id_contrat=" . $id_contrat . " and statut='N' order by date_debut_service desc,id_mvt_service desc;\n";
//var_dump($sql);
$result = mysqli_query($lien, $sql);
if (mysqli_num_rows($result) == 0) {
//echo '<div class="td_list_title"> >> Mouvement(s) de service <span style="background-color:#B0F276;color:black;font-weight:bold;height:30px;width:30px;" title="Ajout d\'un mouvement dans le temps" onclick="DisplayFormMvt(\'DIV_FORM_MVT_SER\',\'service\','.$id_agent.','.$id_contrat.');"> + </span></div>';
echo "Il n'y a pas encore de mouvement encodé pour cet agent. ";
echo 'Cliquez sur le bouton "+" pour ajouter un mouvement de service.';
echo "<br><br>";
//echo '<input type="button" value="Ajout d\'un mouvement ultérieur" onclick="DisplayFormMvt(\'service\',\''.$id_agent.'\');" />';
exit;
}
/*else
{*/
mysqli_close($lien);
//$dernier_mvt_services=mysqli_fetch_assoc($result);
$tab_mvt_services = fn_ResultToArray($result, 'id_mvt_service');
/***********************************************************/
include '../arrays_libelle/array_article_budgetaire.php';
include '../arrays_libelle/array_hors_departement.php';
include '../arrays_libelle/array_departement.php';
include '../arrays_libelle/array_service.php';
include '../arrays_libelle/array_cellule.php';
//$tab_cel=array();
if ($tab_mvt_services != null) {
//echo '<div class="td_list_title"> >> Mouvement(s) de service <span style="background-color:#B0F276;color:black;font-weight:bold;height:30px;width:30px;" title="Ajout d\'un mouvement dans le temps" onclick="DisplayFormMvt(\'DIV_FORM_MVT_SER\',\'service\','.$id_agent.','.$id_contrat.');"> + </span></div>';
echo '<div style="position:absolute;">';
echo '<table border="0" cellpadding="0" cellspacing="0">';
echo '<tr>';
echo '<td class="td_list" style="width:95px;padding:5px;text-align:center;">Date de début</td>';
echo '<td class="td_list" style="width:95px;padding:5px;text-align:center;">Date d\'échéance</td>';
//echo '<td class="td_list" style="width:100px;padding:5px;text-align:center;">Id-contrat</td>';
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:display_mvt_services.php
示例11: mysqli_query
}
return $tableau;
}
include '../connect_db.php';
$sql = "\n\t\tselect * from cpas_mouvements_fonctions where id_contrat=" . $id_contrat . " and statut='N' order by date_debut_fonction desc;\n";
//var_dump($sql);
$result = mysqli_query($lien, $sql);
if (mysqli_num_rows($result) == 0) {
//echo '<div class="td_list_title"> >> Mouvement(s) de fonction <span style="background-color:#B0F276;color:black;font-weight:bold;height:30px;width:30px;" title="Ajout d\'un mouvement dans le temps" onclick="DisplayFormMvt(\'DIV_FORM_MVT_FCT\',\'fonction\','.$id_agent.','.$id_contrat.');"> + </span></div>';
echo "Il n'y a pas encore de mouvement encodé pour cet agent. ";
echo 'Cliquez sur le bouton "+" pour ajouter un mouvement de fonction.';
echo "<br><br>";
exit;
}
mysqli_close($lien);
$tab_mvt_fonctions = fn_ResultToArray($result, 'id_mvt_fonction');
include '../arrays_libelle/array_fonction.php';
if ($tab_mvt_fonctions != null) {
echo '<div style="position:absolute;">';
echo '<table border="0" cellpadding="0" cellspacing="0">';
echo '<tr>';
echo '<td class="td_list" style="width:95px;padding:5px;text-align:center;">Date de début</td>';
echo '<td class="td_list" style="width:95px;padding:5px;text-align:center;">Date d\'échéance</td>';
//echo '<td class="td_list" style="width:100px;padding:5px;text-align:center;">Id-contrat</td>';
echo '<td class="td_list" style="width:155px;padding:5px;text-align:center;">Fonction</td>';
echo '<td class="td_list" style="width:55px;padding:5px;text-align:center;">O/E</td>';
echo '<td class="td_list" style="width:95px;padding:5px;text-align:center;">Catégorie</td>';
echo '<td class="td_list" style="width:80px;padding:5px;text-align:center;">Resp.</td>';
echo '<td class="td_list" style="width:45px;padding:5px;text-align:center;"></td>';
//echo '<td class="td_list" style="width:110px;padding:5px;text-align:center;">Créé par</td>';
//echo '<td class="td_list" style="width:110px;padding:5px;text-align:center;"">Modifié par</td>';
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:display_mvt_fonctions.php
示例12: fn_ResultToArray
if (mysqli_num_rows($result) == 0) {
echo "alert('Aucun contrat entre ces 2 dates');";
exit;
}
$array_nb_contrats = fn_ResultToArray($result, 'id_agent');
/***************************************************/
$sql = "\nselect \ncpas_agents.id_agent\n,nom\n,prenom\n,date_naissance \n,registre_id\n,start_date\n,id_statut\n,id_regime\n,id_fonc\n,id_ser\n,id_cel\n,id_dep\n,id_hors_dep\nfrom cpas_agents\njoin cpas_signaletiques_agents\non cpas_agents.id_agent=cpas_signaletiques_agents.id_agent\nJOIN\ncpas_contrats\non cpas_contrats.id_agent=cpas_agents.id_agent\nWHERE\nstart_date>='" . transformDate($date_debut) . "' and start_date<='" . transformDate($date_fin) . "'\nand registre_id<990000\norder by nom;\n";
//var_dump($sql);
$result = mysqli_query($lien, $sql);
if (mysqli_num_rows($result) == 0) {
echo "alert('Aucun contrat entre ces 2 dates');";
exit;
}
$nb_records = mysqli_num_rows($result);
$nb_records = $nb_records + 1;
$array_contrats = fn_ResultToArray($result, 'id_agent');
mysqli_close($lien);
$tab_nb_contrats = array();
foreach ($array_nb_contrats as $key => $value) {
$tab_nb_contrats[$value['nom'] . '-' . $value['prenom']] = $value['nb_contrats'];
}
/**********************************************************/
include '../arrays_libelle/array_departement.php';
include '../arrays_libelle/array_hors_departement.php';
include '../arrays_libelle/array_service.php';
include '../arrays_libelle/array_cellule.php';
include '../arrays_libelle/array_statut.php';
include '../arrays_libelle/array_fonction.php';
include '../arrays_libelle/array_regime.php';
/***********************************************************/
// LETTRE COLONNE ****** TITRE COLONNE CORRESPONDANTE *****/
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:generate_personnel_entrants.php
示例13: var_dump
if ($id_key_unic == null) {
$tableau[] = $datas;
} else {
$tableau[$datas[$id_key_unic]] = $datas;
}
}
return $tableau;
}
/*****/
include '../connect_db.php';
$sql = "SELECT * FROM cpas_regimes order by libelle_F;";
var_dump($sql);
$result = mysqli_query($lien, $sql);
//ferme la connection//
mysqli_close($lien);
$tab_regimes = fn_ResultToArray($result, "id_regime");
/****************************************************************/
$outStr = "";
$headStr = "<?php \n";
$nomTable = "array_regime";
$initialisation = "\$" . $nomTable . "=array(); \n";
$outStr .= "\$" . $nomTable . "[0]['F']='---'; \n";
$outStr .= "\$" . $nomTable . "[0]['N']='---'; \n";
foreach ($tab_regimes as $key => $value) {
$outStr .= "\$" . $nomTable . "[" . $value['id_regime'] . "]['F']=\"" . $value['libelle_F'] . "\"; \n";
$outStr .= "\$" . $nomTable . "[" . $value['id_regime'] . "]['N']=\"" . $value['libelle_N'] . "\"; \n";
}
$footStr = "?>";
$totalStr = $headStr;
$totalStr .= $initialisation;
$totalStr .= "\n";
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:generate_regimes.php
示例14: var_dump
$tableau[] = $datas;
} else {
$tableau[$datas[$id_key_unic]] = $datas;
}
}
return $tableau;
}
/*****/
include '../connect_db.php';
//$sql="SELECT * FROM cpas_equivalents_temps_plein order by libelle;";
$sql = "SELECT * FROM cpas_regimes order by libelle_F;";
var_dump($sql);
$result = mysqli_query($lien, $sql);
//ferme la connection//
mysqli_close($lien);
$tab_equiv_tp = fn_ResultToArray($result, "id_regime");
/****************************************************************/
$outStr = "";
$headStr = "<?php \n";
$nomTable = "array_equivalent_temps_plein";
$initialisation = "\$" . $nomTable . "=array(); \n";
$outStr .= "\$" . $nomTable . "[0]='---'; \n";
foreach ($tab_equiv_tp as $key => $value) {
$outStr .= "\$" . $nomTable . "[" . $value['id_regime'] . "]=\"" . $value['equiv_tp'] . "\"; \n";
//$outStr.="$".$nomTable."[".$value['id_code']."]['N']=\"".$value['libelle_N']."\"; \n";
}
$footStr = "?>";
$totalStr = $headStr;
$totalStr .= $initialisation;
$totalStr .= "\n";
$totalStr .= $outStr;
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:generate_equivalents_temps_plein.php
示例15: mysqli_query
$tableau[] = $datas;
} else {
$tableau[$datas[$id_key_unic]] = $datas;
}
}
return $tableau;
}
/*****/
include '../connect_db.php';
//$sql="SELECT * FROM v_departements_services_cellules where cellule_actif=1 order by service_F,service_N;";
$sql = "SELECT * FROM cpas_cellules; ";
//var_dump($sql);
$result = mysqli_query($lien, $sql);
//ferme la connection//
mysqli_close($lien);
$tab_cel = fn_ResultToArray($result, "id_cel");
/****************************************************************/
$outStr = "";
$headStr = "<?php \n";
$nomTable = "array_cellule";
$initialisation = "\$" . $nomTable . "=array(); \n";
$outStr .= "\$" . $nomTable . "[0]['F']='---'; \n";
$outStr .= "\$" . $nomTable . "[0]['N']='---'; \n";
foreach ($tab_cel as $key => $value) {
//if($value['actif']==1)
//{
/* $outStr.="$".$nomTable."[".$value['id_cel']."]['F']=\"".$value['service_F'].' - '.$value['cellule_F']."\"; \n";
$outStr.="$".$nomTable."[".$value['id_cel']."]['N']=\"".$value['service_N'].' - '.$value['cellule_N']."\"; \n"; */
$outStr .= "\$" . $nomTable . "[" . $value['id_cel'] . "]['F']=\"" . $value['label_F'] . "\"; \n";
$outStr .= "\$" . $nomTable . "[" . $value['id_cel'] . "]['N']=\"" . $value['label_N'] . "\"; \n";
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:generate_cellules.php
示例16: fn_ResultToArray
*******************************************************************************/
$tab_cellules = fn_ResultToArray($result, 'id_cel');
//var_dump($tab_cellules);
foreach ($tab_cellules as $key3 => $value3) {
$styleCell = array('valign' => 'center', 'bgColor' => 'cccccc');
$PHPWord->addTableStyle('myOwnTableStyle', $styleTable, $styleFirstRow);
$table = $section->addTable('myOwnTableStyle');
//$title=html_entity_decode(iconv('UTF-8', 'windows-1252',$array_service[$value['id_ser']]['F']));
$table->addRow(500);
//$table->setMTitle($title);
$table->addCell(5000, $styleCell)->addText(html_entity_decode(iconv('UTF-8', 'windows-1252', $array_cellule[$value3['id_cel']]['F'])), $fontStyle);
$sql = "select \n\t\t\t\t*\n\t\t\t\tfrom \n\t\t\t\tcpas_effectifs_" . $new_date_effectif . "\n\t\t\t\twhere \n\t\t\t\tid_cel=" . $value3['id_cel'] . " \n\t\t\t\tand registre_id<990000\n\t\t\t\torder by nom,prenom;";
//var_dump($sql);
$result = mysqli_query($lien, $sql);
if (mysqli_num_rows($result) > 0) {
$tab_agents_cel = fn_ResultToArray($result, 'id_contrat');
//var_dump($tab_agents_cel);
foreach ($tab_agents_cel as $key_agents_cel => $value_agents_cel) {
$i++;
$table->addRow();
$table->addCell(2000)->addText(html_entity_decode(iconv('UTF-8', 'windows-1252', $i . ' - ' . $value_agents_cel['nom'] . " " . $value_agents_cel['prenom'])));
if ($value_agents_cel['date_echeance_regime'] == '0000-00-00' || $value_agents_cel['date_echeance_regime'] == '00-00-0000') {
$table->addCell(2000)->addText(html_entity_decode(iconv('UTF-8', 'windows-1252', $array_regime[$value_agents_cel['id_regime']]['F'])));
} else {
$table->addCell(2000)->addText(html_entity_decode(iconv('UTF-8', 'windows-1252', $array_regime[$value_agents_cel['id_regime']]['F'] . ' ' . $value_agents_cel['date_echeance_regime'])));
}
$table->addCell(1000)->addText($value_agents_cel['langue']);
$table->addCell(3000)->addText(html_entity_decode(iconv('UTF-8', 'windows-1252', $array_grade[$value_agents_cel['id_grade']]['F'])));
if ($value_agents_cel['id_statut_special'] == 0) {
$table->addCell(2000)->addText(html_entity_decode(iconv('UTF-8', 'windows-1252', $array_statut[$value_agents_cel['id_statut']]['F'])));
} else {
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:tableau_personnel_word2.php
示例17: mysqli_query
include '../arrays_libelle/array_service.php';
include '../arrays_libelle/array_cellule.php';
include '../arrays_libelle/array_grade.php';
include '../arrays_libelle/array_bareme.php';
include '../arrays_libelle/array_code.php';
include '../arrays_libelle/array_fonction.php';
/**********Params***************************************/
include 'params.php';
/********************************/
include '../connect_db.php';
$sql = "SELECT * FROM cpas_contrats \n\t\n\twhere id_agent=" . $id_agent . " and statut='N' order by start_date desc;";
//var_dump($sql);
$result = mysqli_query($lien, $sql);
//ferme la connection//
mysqli_close($lien);
$tab_contrats = fn_ResultToArray($result, 'id_contrat');
/*************************/
$string_dep = '';
if ($tab_contrats == null) {
echo 'Pas encore de contrat<br>';
} else {
foreach ($tab_contrats as $key => $value) {
echo '<div class="modif_contrat" onclick="DisplayFormContratModif(' . $value['id_contrat'] . ',' . $id_agent . ');">';
if ($value['actif'] == 1) {
$actif = "<span style='color:green;'>Contrat actif</span>";
} else {
$actif = "<i>Contrat inactif</i>";
}
$string_dep = '';
/*********DEPARTEMENT*************/
if (array_key_exists($value['id_dep'], $array_departement)) {
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:display_list_contrats.php
示例18: var_dump
if ($id_key_unic == null) {
$tableau[] = $datas;
} else {
$tableau[$datas[$id_key_unic]] = $datas;
}
}
return $tableau;
}
/*****/
include '../connect_db.php';
$sql = "SELECT * FROM cpas_fonctions order by label_F;";
var_dump($sql);
$result = mysqli_query($lien, $sql);
//ferme la connection//
mysqli_close($lien);
$tab_fonc = fn_ResultToArray($result, "id_fonc");
/****************************************************************/
$outStr = "";
$headStr = "<?php \n";
$nomTable = "array_fonction";
$initialisation = "\$" . $nomTable . "=array(); \n";
$outStr .= "\$" . $nomTable . "[0]['F']='---'; \n";
$outStr .= "\$" . $nomTable . "[0]['N']='---'; \n";
$outStr .= "\$" . $nomTable . "[1000]['F']='Autre type de fonction'; \n";
$outStr .= "\$" . $nomTable . "[1000]['N']='Andere functie'; \n";
foreach ($tab_fonc as $key => $value) {
if ($value['actif'] == 1) {
$outStr .= "\$" . $nomTable . "[" . $value['id_fonc'] . "]['F']=\"" . $value['label_F'] . "\"; \n";
$outStr .= "\$" . $nomTable . "[" . $value['id_fonc'] . "]['N']=\"" . $value['label_N'] . "\"; \n";
}
}
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:generate_fonctions.php
示例19: mysqli_query
}
return $tableau;
}
include '../connect_db.php';
$sql = "\n\t\tselect * from cpas_mouvements_baremes where id_contrat=" . $id_contrat . " and statut='N' order by date_debut_bareme desc;\n";
//var_dump($sql);
$result = mysqli_query($lien, $sql);
if (mysqli_num_rows($result) == 0) {
//echo '<div class="td_list_title"> >> Mouvement(s) de bareme <span style="background-color:#B0F276;color:black;font-weight:bold;height:30px;width:30px;" title="Ajout d\'un mouvement dans le temps" onclick="DisplayFormMvt(\'DIV_FORM_MVT_BAREME\',\'bareme\','.$id_agent.','.$id_contrat.');"> + </span></div>';
echo "Il n'y a pas encore de mouvement encodé pour cet agent. ";
echo 'Cliquez sur le bouton "+" pour ajouter un mouvement de barème et grade.';
echo "<br><br>";
exit;
}
mysqli_close($lien);
$tab_mvt_baremes = fn_ResultToArray($result, 'id_mvt_bareme');
include '../arrays_libelle/array_bareme.php';
include '../arrays_libelle/array_code.php';
include '../arrays_libelle/array_grade.php';
include '../arrays_libelle/array_type_cadre.php';
//Mvt effectué
if ($tab_mvt_baremes != null) {
//echo '<div class="td_list_title"> >> Mouvement(s) de barème <span style="background-color:#B0F276;color:black;font-weight:bold;height:30px;width:30px;" title="Ajout d\'un mouvement dans le temps" onclick="DisplayFormMvt(\'DIV_FORM_MVT_BAREME\',\'bareme\','.$id_agent.','.$id_contrat.');"> + </span></div>';
echo '<div style="position:absolute;">';
echo '<table border="0" cellpadding="0" cellspacing="0">';
echo '<tr>';
echo '<td class="td_list" style="width:95px;padding:5px;text-align:center;">Date de début</td>';
echo '<td class="td_list" style="width:95px;padding:5px;text-align:center;">Date d\'échéance</td>';
//echo '<td class="td_list" style="width:100px;padding:5px;text-align:center;">Id-contrat</td>';
echo '<td class="td_list" style="width:95px;padding:5px;text-align:center;">Barème/Code</td>';
echo '<td class="td_list" style="width:100px;padding:5px;text-align:center;">Grade</td>';
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:display_mvt_baremes.php
示例20: fn_ResultToArray
function fn_ResultToArray($result = null, $id_key_unic = null)
{
//verifier validité de $result
if ($result == null) {
echo "pas de paramètre result";
return false;
}
$tableau = array();
while ($datas = mysqli_fetch_assoc($result)) {
if ($id_key_unic == null) {
$tableau[] = $datas;
} else {
$tableau[$datas[$id_key_unic]] = $datas;
}
}
return $tableau;
}
include '../connect_db.php';
$sql = "\n\t\tselect * from cpas_services where id_dep=" . $id_dep . " and actif=1 order by label_F;\n";
//var_dump($sql);
$result = mysqli_query($lien, $sql);
if (mysqli_num_rows($result) == 0) {
echo "<option value='0'>---</option>";
exit;
}
mysqli_close($lien);
$tab_ser = fn_ResultToArray($result, 'id_ser');
echo '<option value="0">---</option>';
foreach ($tab_ser as $key => $value) {
echo '<option value="' . $value['id_ser'] . '" >' . $value['label_F'] . '</option>';
}
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:display_options_ser.php
注:本文中的fn_ResultToArray函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论