当前位置: 首页>>代码示例>>PHP>>正文


PHP transformDate函数代码示例

本文整理汇总了PHP中transformDate函数的典型用法代码示例。如果您正苦于以下问题:PHP transformDate函数的具体用法?PHP transformDate怎么用?PHP transformDate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了transformDate函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: mysqli_query

    $num_ligne++;
    if ($tab_nb_contrats[$value['nom'] . '-' . $value['prenom']] >= 2) {
        /*****************************************************************************************/
        $sql = "\n\t\tselect\n\t\t*\n\t\tFROM\n\t\tcpas_contrats\n\t\tjoin \n\t\tcpas_agents\n\t\tON\n\t\tcpas_contrats.id_agent\n\t\t=cpas_agents.id_agent\n\t\twhere nom='" . $value['nom'] . "' and prenom='" . $value['prenom'] . "'\n\t\tand start_date < '" . $value['start_date'] . "';\n\t\t";
        //var_dump($sql);
        $result = mysqli_query($lien, $sql);
        if (mysqli_num_rows($result) > 0) {
            $sheet->setCellValue($array_column[0] . $num_ligne, 'Contrat supplémentaire');
        }
    } else {
        $sheet->setCellValue($array_column[0] . $num_ligne, 'Engagement');
    }
    $sheet->setCellValue($array_column[1] . $num_ligne, $value['nom']);
    $sheet->setCellValue($array_column[2] . $num_ligne, $value['prenom']);
    $sheet->setCellValue($array_column[3] . $num_ligne, $value['registre_id']);
    $sheet->setCellValue($array_column[4] . $num_ligne, transformDate($value['start_date']));
    $sheet->setCellValue($array_column[5] . $num_ligne, '');
    $sheet->setCellValue($array_column[6] . $num_ligne, $array_statut[$value['id_statut']]['F']);
    $sheet->setCellValue($array_column[7] . $num_ligne, $array_regime[$value['id_regime']]['F']);
    $sheet->setCellValue($array_column[8] . $num_ligne, $array_fonction[$value['id_fonc']]['F']);
    if ($value['id_hors_dep'] == 0 || $value['id_hors_dep'] == '' || $value['id_hors_dep'] == null) {
        $sheet->setCellValue($array_column[9] . $num_ligne, $array_departement[$value['id_dep']]['F']);
    } else {
        $sheet->setCellValue($array_column[9] . $num_ligne, $array_hors_departement[$value['id_hors_dep']]['F']);
    }
    $sheet->setCellValue($array_column[10] . $num_ligne, $array_service[$value['id_ser']]['F']);
    $sheet->setCellValue($array_column[11] . $num_ligne, $array_cellule[$value['id_cel']]['F']);
}
mysqli_close($lien);
$sheet->setAutoFilter('A1:L1');
$sheet->getStyle('A1:L' . $nb_records)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:generate_personnel_entrants.php

示例2: foreach

 if ($bnt == "" || $bnt == null) {
     //echo 'Le tableau bnt est vide<br>';
     echo "alert('Le tableau bnt est vide');";
 } else {
     include '../connect_db.php';
     foreach ($bnt as $key => $value) {
         /*********Modification du contrat de l'agent****************/
         $sql = "\n\t\t\t\t\tinsert into cpas_mouvements_services \n\t\t\t\t\t(id_mvt_service\n\t\t\t\t\t,id_agent\n\t\t\t\t\t,id_contrat\n\t\t\t\t\t,id_article_budgetaire\n\t\t\t\t\t,id_hors_dep\n\t\t\t\t\t,id_dep\n\t\t\t\t\t,id_ser\n\t\t\t\t\t,id_cel\n\t\t\t\t\t,date_debut_service\n\t\t\t\t\t,date_echeance_service\n\t\t\t\t\t,creation_date\n\t\t\t\t\t,creation_user)\n\t\t\t\t\tvalues\n\t\t\t\t\t(''\n\t\t\t\t\t,'" . $key . "'\n\t\t\t\t\t,'" . $value . "'\n\t\t\t\t\t,'" . $id_article_budgetaire . "'\n\t\t\t\t\t,'" . $id_hors_dep . "'\n\t\t\t\t\t,'" . $id_dep . "'\n\t\t\t\t\t,'" . $id_ser . "'\n\t\t\t\t\t,'" . $id_cel . "'\n\t\t\t\t\t,'" . transformDate($date_debut_service) . "'\n\t\t\t\t\t,'" . transformDate($date_echeance_service) . "'\n\t\t\t\t\t,NOW()\n\t\t\t\t\t,'" . $session_username . "'\n\t\t\t\t\t);\n\t\t\t";
         $result = mysqli_query($lien, $sql);
         $last_id = mysqli_insert_id($lien);
         //echo "alert('$last_id');";
         if (!$result) {
             echo "alert('Problème de mutation de service pour l'id_contrat '" . $value . ");";
             exit;
         }
         if (transformDate($date_debut_service) == date('Y-m-d')) {
             /*******Mettre tous les mvt du contrat à inactifs*********************************/
             $sql = "\n\t\t\t\t\tupdate cpas_mouvements_services set actif=0 where id_contrat='" . $value . "';\n\t\t\t\t\t\n\t\t\t\t";
             //var_dump( $sql);
             $result = mysqli_query($lien, $sql);
             /**********Mettre à 1 le mvt du contrat le plus récent*************************************************/
             $sql = "\n\t\t\t\t\tupdate cpas_mouvements_services set actif=1 where id_mvt_service='" . $last_id . "';\n\t\t\t\t\t\n\t\t\t\t";
             //var_dump( $sql);
             $result = mysqli_query($lien, $sql);
             /*********************Mise à jour du contrat*********************************************************/
             $sql = "update cpas_contrats,cpas_mouvements_services \n\t\t\t\t\tset\n\t\t\t\t\tcpas_contrats.id_article_budgetaire=cpas_mouvements_services.id_article_budgetaire\n\t\t\t\t\t,cpas_contrats.id_hors_dep=cpas_mouvements_services.id_hors_dep\n\t\t\t\t\t,cpas_contrats.id_dep=cpas_mouvements_services.id_dep\n\t\t\t\t\t,cpas_contrats.id_ser=cpas_mouvements_services.id_ser\n\t\t\t\t\t,cpas_contrats.id_cel=cpas_mouvements_services.id_cel\n\t\t\t\t\t,cpas_contrats.date_echeance_service=cpas_mouvements_services.date_echeance_service\n\t\t\t\t\twhere cpas_contrats.id_contrat=cpas_mouvements_services.id_contrat\n\t\t\t\t\tand cpas_mouvements_services.id_contrat = '" . $value . "'\n\t\t\t\t\tand cpas_mouvements_services.actif = 1;";
             //var_dump( $sql);
             $result = mysqli_query($lien, $sql);
             if (!$result) {
                 echo "alert('Problème de mise à jour du contrat pour l\\'id_contrat '" . $value . "');";
                 exit;
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:remove_agents.php

示例3: mysqli_query

    $disabled_cel = 'disabled';
    $actif = 0;
    $lien = "./php/ajout_mvt_service.php";
} else {
    include '../connect_db.php';
    $sql = "select * from cpas_mouvements_services\n\twhere id_mvt_service=" . $id_mvt_service . ";\n\t";
    $result = mysqli_query($lien, $sql);
    if (!$result) {
        echo "erreur dans la requete:<i>" . $sql . "</i>";
        exit;
    }
    mysqli_close($lien);
    $tab_mvt_ser = mysqli_fetch_assoc($result);
    $titre = 'Modification d\'un mouvement de service';
    $date_debut_service = transformDate($tab_mvt_ser['date_debut_service']);
    $date_echeance_service = transformDate($tab_mvt_ser['date_echeance_service']);
    //$art_budgetaire=$tab_mvt_ser['article_budgetaire'];
    $id_article_budgetaire = $tab_mvt_ser['id_article_budgetaire'];
    $id_dep = $tab_mvt_ser['id_dep'];
    $id_hors_dep = $tab_mvt_ser['id_hors_dep'];
    $id_ser = $tab_mvt_ser['id_ser'];
    $id_cel = $tab_mvt_ser['id_cel'];
    $option_ser = '<option value="' . $id_ser . '" >' . $array_service[$id_ser]['F'] . '</option>';
    $option_cel = '<option value="' . $id_cel . '" >' . $array_cellule[$id_cel]['F'] . '</option>';
    //$onchange_ser="FiltreSerCel('id_dep','$id_dep','FORM_MVT_SERVICE');";
    $disabled_ser = 'disabled';
    $disabled_cel = 'disabled';
    $actif = $tab_mvt_ser['actif'];
    $lien = "./php/modif_mvt_service.php";
}
$disabled = '';
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:display_form_mvt_service.php

示例4: foreach

    echo '<td class="td_list" style="width:18px;padding:5px;text-align:center;"></td>';
    //echo '<td class="td_list" style="width:60px;padding:5px;text-align:center;">Créé par</td>';
    //echo '<td class="td_list" style="width:60px;padding:5px;text-align:center;">Modifié par</td>';
    echo '</tr>';
    echo '</table>';
    echo '</div>';
    echo '<div style="height:90px;overflow:auto;width:100%;">';
    echo '<table border="0" cellpadding="0" cellspacing="0" style="margin-top:25px;">';
    foreach ($tab_mvt_statuts as $key => $value) {
        if ($value['actif'] == 1) {
            echo '<tr class="td_list_content" style="background-color:#DFF7CB;">';
        } else {
            echo '<tr class="td_list_content">';
        }
        echo '<td style="width:95px;padding:5px;text-align:center;border-bottom:1px solid #ddd;">' . transformDate($value['date_debut_statut']) . '</td>';
        echo '<td style="width:95px;padding:5px;text-align:center;border-bottom:1px solid #ddd;">' . transformDate($value['date_echeance_statut']) . '</td>';
        //echo '<td style="width:104px;padding:5px;text-align:center;"> C-'.$value['id_contrat'].'</td>';
        echo '<td style="width:124px;padding:5px;text-align:center;border-bottom:1px solid #ddd;">' . $array_statut[$value['id_statut']]['F'] . '</td>';
        echo '<td style="width:124px;padding:5px;text-align:center;border-bottom:1px solid #ddd;">' . $array_statut_special[$value['id_statut_special']]['F'] . '</td>';
        echo '<td style="width:104px;padding:5px;text-align:center;">' . $array_contractuel_nomme[$value['contractuel_nomme']] . '</td>';
        echo '<td style="width:62px;padding:5px;text-align:center;border-bottom:1px solid #ddd;"></td>';
        echo '<td style="width:45px;padding:5px;text-align:center;border-bottom:1px solid #ddd;">
			<span class="bnt_modif" title="Cliquer pour corriger ce mouvement" onclick="DisplayFormMvt(\'DIV_FORM_MVT_STATUT\',\'statut\',' . $value['id_mvt_statut'] . ',' . $id_agent . ',' . $id_contrat . ');"></span>
			<span class="bnt_suppr" title="Cliquer pour supprimer ce mouvement" onclick="SupprMvt(\'statut\',' . $value['id_mvt_statut'] . ',' . $id_agent . ',' . $id_contrat . ');"></span>
			
			</td>';
        //echo '<td style="width:120px;padding:5px;text-align:center;">'.$array_equivalent_temps_plein[$value['equiv_tp']].'</td>';
        //echo '<td style="width:64px;padding:5px;text-align:center;">'.$value['creation_user'].'</td>';
        //echo '<td style="width:70px;padding:5px;text-align:center;">'.$value['modif_user'].'</td>';
        echo '</tr>';
    }
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:display_mvt_statuts.php

示例5: transformDate

    exit;
}
if ($choix_groupe == "DEP") {
    $id_hors_dep = 0;
} else {
    $id_dep = 0;
    $id_ser = 0;
    $id_cel = 0;
}
if ($id_dep == 0 && $id_hors_dep == 0) {
    echo "alert('Vous n\\'avez sélectionné aucun département! Veuillez sélectionner le département auquel l\\'agent appartient.');";
    //echo "return false;";
    exit;
}
include '../connect_db.php';
$sql = "\n\t\tinsert into cpas_mouvements_services \n\t\t(id_mvt_service\n\t\t,id_agent\n\t\t,id_contrat\n\t\t,id_article_budgetaire\n\t\t,id_hors_dep\n\t\t,id_dep\n\t\t,id_ser\n\t\t,id_cel\n\t\t,actif\n\t\t,date_debut_service\n\t\t,date_echeance_service\n\t\t,creation_date\n\t\t,creation_user)\n\t\tvalues\n\t\t(''\n\t\t,'" . $id_agent . "'\n\t\t,'" . $id_contrat . "'\n\t\t,'" . $id_article_budgetaire . "'\n\t\t,'" . $id_hors_dep . "'\n\t\t,'" . $id_dep . "'\n\t\t,'" . $id_ser . "'\n\t\t,'" . $id_cel . "'\n\t\t,'" . $actif . "'\n\t\t,'" . transformDate($date_debut_service) . "'\n\t\t,'" . transformDate($date_echeance_service) . "'\n\t\t,NOW()\n\t\t,'" . $session_username . "'\n\t\t);\n\t";
//var_dump( $sql);
$result = mysqli_query($lien, $sql);
if (!$result) {
    echo "alert('Problème d\\'ajout du mouvement de service');";
    exit;
} else {
    echo "alert('Mouvement de service ajouté avec succès');";
}
/*******Mettre tous les mvt du contrat à inactifs*********************************/
$sql = "\n\t\tupdate cpas_mouvements_services set actif=0 where id_contrat='" . $id_contrat . "';\n\t\t\n\t";
//var_dump( $sql);
$result = mysqli_query($lien, $sql);
/**********Mettre à 1 le mvt du contrat le plus récent*************************************************/
$sql = "\n\t\tupdate cpas_mouvements_services set actif=1 where id_contrat='" . $id_contrat . "' and statut='N'\n\t\tand date_debut_service<=CURDATE() order by date_debut_service desc limit 1;\n\t\t\n\t";
//var_dump( $sql);
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:ajout_mvt_service.php

示例6: transformDate

                $string_dep .= ' / ' . $cel;
            }
        }
        /*else
        		{
        			$cel=$array_cellule[0]['F'];
        		} */
        /**********************/
        if (array_key_exists($value['id_hors_dep'], $array_hors_departement)) {
            $hors_dep = $array_hors_departement[$value['id_hors_dep']]['F'];
            //$string_dep=$hors_dep;
        } else {
            $hors_dep = $array_hors_departement[0]['F'];
        }
        if ($value['id_hors_dep'] != 0) {
            echo 'N° ' . $value['id_contrat'] . ' ' . $actif . ' - DU ' . transformDate($value['start_date']) . ' AU ' . transformDate($value['end_date']) . ' (' . $hors_dep . ')';
        } else {
            echo 'N° ' . $value['id_contrat'] . ' ' . $actif . ' - DU ' . transformDate($value['start_date']) . ' AU ' . transformDate($value['end_date']) . ' (' . $string_dep . ')';
        }
        /************Affichage lien contrat*********************************************/
        /*if($value['id_hors_dep']!=0)
        		{
        			echo $actif.' - '.$hors_dep.' - <b>Grade: </b>'.$array_grade[$value['id_grade']]['F'].' - '.$array_bareme[$value['id_bareme']].$array_code[$value['id_code']].' - <b>Occupation: </b>'.$value['id_equiv_tp'];
        		}
        		else
        		{
        			echo $actif.' - '.$string_dep.' - <b>Grade: </b>'.$array_grade[$value['id_grade']]['F'].' - '.$array_bareme[$value['id_bareme']].$array_code[$value['id_code']].' - <b>Occupation: </b>'.$value['id_equiv_tp'];
        		}*/
        echo '</div>';
    }
}
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:display_list_contrats.php

示例7: dashboardInit

require_once 'functions.php';
dashboardInit();
###################################################################### limit the number of rows
$rowLimit = isset($_GET['rowLimit']) ? $_GET['rowLimit'] : 15;
define('ROW_RETURN_LIMIT', $rowLimit);
###################################################################### Earliest defaults to 2 days ago
if (isset($_GET['earliest'])) {
    $earliest = $_GET['earliest'];
    $earliestTime = transformDate($_GET['earliest']);
} else {
    $earliestTime = date("Y-m-d H:i:s", mktime(date("H"), date("i"), date("s"), date("m"), date("d") - 4, date("Y")));
}
####################################################################### Latest defaults to now
if (isset($_GET['latest']) && $_GET['latest'] != null) {
    $latest = $_GET['latest'];
    $latestTime = transformDate($_GET['latest']);
}
######################################################################## User ID
$userID = isset($_GET['userID']) ? $_GET['userID'] : 0;
####################################################################### Other vars
$machineID = isset($_GET['machineID']) ? $_GET['machineID'] : 0;
$runStatusID = isset($_GET['runStatusID']) ? $_GET['runStatusID'] : 0;
$runPurposeID = isset($_GET['runPurposeID']) ? $_GET['runPurposeID'] : 0;
$build = isset($_GET['build']) ? $_GET['build'] : null;
$version = isset($_GET['version']) ? $_GET['version'] : null;
$runIDform = isset($_GET['runID']) ? $_GET['runID'] : null;
###################################################################### Add conditions
$condition[] = "runs.startedRun >= '{$earliestTime}'";
# filter for latest time
if (isset($latestTime)) {
    $condition[] = "runs.finishedRun <= '{$latestTime}'";
开发者ID:window98lsq,项目名称:autoweb,代码行数:31,代码来源:smokeruns.php

示例8: var_dump

$sql = "\nselect id_agent from cpas_signaletiques_agents where id_agent='" . $id_agent . "';\n";
var_dump($sql);
$result = mysqli_query($lien, $sql);
if (mysqli_num_rows($result) == 0) {
    $action = "INSERT";
} else {
    $action = "UPDATE";
}
//mysqli_close($lien);
/***********signalétique*********************************/
//include('../connect_db.php');
if ($action == "INSERT") {
    $sql = "\n\t\t\tinsert into cpas_signaletiques_agents (id_sign_agent,id_agent,niss,nationalite,date_naissance,id_civilite) \n\t\t\tvalues ('','" . $id_agent . "','" . addslashes($niss) . "','" . addslashes($nationalite) . "','" . transformDate($date_naissance) . "','" . $id_civilite . "');\n\t";
} else {
    if ($action == "UPDATE") {
        $sql = "\n\t\tupdate cpas_signaletiques_agents\n\t\tset\n\t\tniss='" . $niss . "',nationalite='" . addslashes($nationalite) . "',date_naissance='" . transformDate($date_naissance) . "',id_civilite='" . $id_civilite . "' \n\t\twhere id_agent='" . $id_agent . "';\n\t\t";
    }
}
//var_dump($sql);
$result = mysqli_query($lien, $sql);
mysqli_close($lien);
/*}
else
{
	if($action=="UPDATE")
	{
		include('../connect_db.php');


		$sql="
		update cpas_signaletiques_agents
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:modif_info_generales.php

示例9: mysqli_query

    $date_echeance_fonction = '00-00-0000';
    $actif = 0;
    $lien = "./php/ajout_mvt_fonction.php";
} else {
    include '../connect_db.php';
    $sql = "select * from cpas_mouvements_fonctions\n\twhere id_mvt_fonction=" . $id_mvt_fonction . ";\n\t";
    $result = mysqli_query($lien, $sql);
    if (!$result) {
        echo "erreur dans la requete:<i>" . $sql . "</i>";
        exit;
    }
    mysqli_close($lien);
    $tab_mvt_fonction = mysqli_fetch_assoc($result);
    $titre = 'Modification d\'un mouvement de fonction';
    $date_debut_fonction = transformDate($tab_mvt_fonction['date_debut_fonction']);
    $date_echeance_fonction = transformDate($tab_mvt_fonction['date_echeance_fonction']);
    $id_fonc = $tab_mvt_fonction['id_fonc'];
    $flag_resp_dep = $tab_mvt_fonction['flag_resp_dep'];
    $flag_resp_ser = $tab_mvt_fonction['flag_resp_ser'];
    $autre_type_fonc = "";
    $ouvrier_employe = $tab_mvt_fonction['ouvrier_employe'];
    $categorie = $tab_mvt_fonction['categorie'];
    $actif = $tab_mvt_fonction['actif'];
    $lien = "./php/modif_mvt_fonction.php";
}
$disabled = '';
?>
<br>
<form id="FORM_MVT_FONCTION" name="FORM_MVT_FONCTION" style="border:4px dotted #fff;padding:5px;" action="<?php 
echo $lien;
?>
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:display_form_mvt_fonction.php

示例10: foreach

    $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";
    $table->addCell(2000)->addText(html_entity_decode(iconv('UTF-8', 'windows-1252', $txt)));
    /*****************Lecture*******************************/
    foreach ($tab_mvt_regimes as $key_regimes => $value_regimes) {
        $PHPWord->addTableStyle('myOwnTableStyle', $styleTable, $styleFirstRow);
        // Add table
        $table = $section->addTable('myOwnTableStyle');
        $table->addRow();
        $txt = transformDate($value_regimes['date_debut_regime']);
        $table->addCell(2000)->addText(html_entity_decode(iconv('UTF-8', 'windows-1252', $txt)));
        $txt = transformDate($value_regimes['date_echeance_regime']);
        $table->addCell(2000)->addText(html_entity_decode(iconv('UTF-8', 'windows-1252', $txt)));
        $txt = $array_regime[$value_regimes['id_regime']]['F'];
        $table->addCell(2000)->addText(html_entity_decode(iconv('UTF-8', 'windows-1252', $txt)));
        $txt = $value_regimes['id_equiv_tp'];
        $table->addCell(2000)->addText(html_entity_decode(iconv('UTF-8', 'windows-1252', $txt)));
    }
}
// FIN Foreach contrats
// Save File
/*$objWriter = PHPWord_IOFactory::createWriter($PHPWord, 'Word2007');
$nom=wd_remove_accents($tab_agents['nom'], 'utf-8');
$prenom=wd_remove_accents($tab_agents['prenom'], 'utf-8');
if(($prenom=='')||($prenom==null)||($prenom=='/'))
{
	$nom_fichier=$nom.'_'.date('Ymd').'_'.date('His').'.docx';
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:fiche_individuelle_word.php

示例11: transformDate

}*/
if ($end_date != '00-00-0000' && $end_date != '0000-00-00' && $end_date != '') {
    if (compareDate($start_date, $end_date) == 0) {
        echo "alert('Attention la date de début de contrat est plus grande. Veuillez recommencer svp.');";
        exit;
    }
}
/**********Vérifier si le contrat est actif ou non*****************************************************/
if (transformDate($start_date) > date('Y-m-d') || transformDate($end_date) < date('Y-m-d') && $end_date != "00-00-0000" && $end_date != '' && $end_date != null) {
    $actif = 0;
} else {
    $actif = 1;
}
/*Ajout d'un enregistrement dans la table cpas_contrats*/
include '../connect_db.php';
$sql = "\n\t\tinsert into cpas_contrats \n\t\t(id_contrat,id_agent,start_date\n\t\t,end_date,motif_sortie\n\t\t,actif,creation_date,creation_user)\n\t\tvalues \n\t\t(''," . $id_agent . ",'" . transformDate($start_date) . "'\n\t\t,'" . transformDate($end_date) . "','" . addslashes($motif_sortie) . "'\n\t\t," . $actif . ",NOW(),'" . addslashes($session_username) . "')\n\t\t;\n";
//var_dump($sql);
$result = mysqli_query($lien, $sql);
if (!$result) {
    echo "alert('Problème d\\'ajout du contrat');";
    exit;
} else {
    echo "alert('Ajout du contrat');";
}
$last_id_contrat = mysqli_insert_id($lien);
//var_dump($LastId);
mysqli_close($lien);
/*******************/
echo "DisplayListContrats(" . $id_agent . ");";
//echo "DisplayContratHisto(".$id_agent.");";
echo "DisplayFormContratModif(" . $last_id_contrat . "," . $id_agent . ");";
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:ajout_contrat_supplementaire.php

示例12: transformDate

        //echo "return false;";
        exit;
    }
    if (compareDate($date_debut_statut, $date_echeance_statut) == 0) {
        echo "alert('La date d\\'échéance est plus petite que la date de début! Veuillez recommencer.');";
        //echo "return false;";
        exit;
    }
}
if ($id_statut == 0 && $id_statut_special == 0) {
    echo "alert('Vous n\\'avez sélectionné aucun statut! Veuillez sélectionner au moins un statut pour l\\'agent en cours.');";
    //echo "return false;";
    exit;
}
include '../connect_db.php';
$sql = "\n\t\t\tinsert into cpas_mouvements_statuts \n\t\t\t(id_mvt_statut\n\t\t\t,id_agent\n\t\t\t,id_contrat\n\t\t\t,id_statut\n\t\t\t,id_statut_special\n\t\t\t,contractuel_nomme\n\t\t\t,date_debut_statut\n\t\t\t,date_echeance_statut\n\t\t\t,actif\n\t\t\t,creation_date\n\t\t\t,creation_user)\n\t\t\tvalues\n\t\t\t(''\n\t\t\t,'" . $id_agent . "'\n\t\t\t,'" . $id_contrat . "'\n\t\t\t,'" . $id_statut . "'\n\t\t\t,'" . $id_statut_special . "'\n\t\t\t,'" . $contractuel_nomme . "'\n\t\t\t,'" . transformDate($date_debut_statut) . "'\n\t\t\t,'" . transformDate($date_echeance_statut) . "'\n\t\t\t,'" . $actif . "'\n\t\t\t,NOW()\n\t\t\t,'" . $session_username . "'\n\t\t\t);\n\t";
//var_dump($sql);
$result = mysqli_query($lien, $sql);
if (!$result) {
    echo "alert('Problème d\\'ajout du mouvement de statut');";
    exit;
} else {
    echo "alert('Mouvement de statut ajouté avec succès');";
}
/*******Mettre tous les mvt du contrat à inactifs*********************************/
$sql = "\n\t\tupdate cpas_mouvements_statuts set actif=0 where id_contrat='" . $id_contrat . "';\n\t\t\n\t";
//var_dump( $sql);
$result = mysqli_query($lien, $sql);
/**********Mettre à 1 le mvt du contrat le plus récent*************************************************/
$sql = "\n\t\tupdate cpas_mouvements_statuts set actif=1 where id_contrat='" . $id_contrat . "' and statut='N'\n\t\tand date_debut_statut<=CURDATE() order by date_debut_statut desc limit 1;\n\t\t\n\t";
//var_dump( $sql);
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:ajout_mvt_statut.php

示例13: foreach

    foreach ($tab_mvt_services as $key => $value) {
        if ($value['id_dep'] == '' || $value['id_dep'] == null || $value['id_dep'] == 0) {
            $load_groupe_dep = "DisplayChoixDep('FORM_MVT_SERVICE','HORS_DEP');";
        } else {
            $load_groupe_dep = "DisplayChoixDep('FORM_MVT_SERVICE','DEP');";
        }
        if ($value['actif'] == 1) {
            //echo '<tr style="background-color:#FFD14B;">';
            echo '<tr class="td_list_content" style="background-color:#DFF7CB;"  
				onclick="' . $load_groupe_dep . '">';
        } else {
            echo '<tr class="td_list_content" 
				onclick="' . $load_groupe_dep . '">';
        }
        echo '<td style="width:95px;padding:5px;vertical-align:middle;text-align:center;border-bottom:1px solid #ddd;">' . transformDate($value['date_debut_service']) . '</td>';
        echo '<td style="width:99px;padding:5px;vertical-align:middle;text-align:center;border-bottom:1px solid #ddd;">' . transformDate($value['date_echeance_service']) . '</td>';
        //echo '<td style="width:104px;padding:5px;vertical-align:middle;text-align:center;border-bottom:1px solid #ddd;"> C-'.$value['id_contrat'].'</td>';
        $array_art = explode('-', $array_article_budgetaire[$value['id_article_budgetaire']]['F']);
        echo '<td style="width:104px;padding:5px;vertical-align:middle;text-align:center;border-bottom:1px solid #ddd;">' . $array_art[0] . '</td>';
        echo '<td style="width:104px;padding:5px;vertical-align:middle;text-align:center;border-bottom:1px solid #ddd;">';
        if ($value['id_dep'] == '' || $value['id_dep'] == null || $value['id_dep'] == 0) {
            echo $array_hors_departement[$value['id_hors_dep']]['F'];
        } else {
            echo $array_departement[$value['id_dep']]['F'];
        }
        echo '</td>';
        echo '<td style="width:104px;padding:5px;vertical-align:middle;text-align:center;border-bottom:1px solid #ddd;">' . $array_service[$value['id_ser']]['F'] . '</td>';
        echo '<td style="width:114px;padding:5px;vertical-align:middle;text-align:center;border-bottom:1px solid #ddd;">' . $array_cellule[$value['id_cel']]['F'] . '</td>';
        echo '<td style="width:45px;padding:5px;vertical-align:middle;text-align:center;border-bottom:1px solid #ddd;">
			<span class="bnt_modif" title="Cliquer pour corriger ce mouvement" onclick="DisplayFormMvt(\'DIV_FORM_MVT_SER\',\'service\',' . $value['id_mvt_service'] . ',' . $id_agent . ',' . $id_contrat . ');"></span>
			<span class="bnt_suppr" title="Cliquer pour supprimer ce mouvement" onclick="SupprMvt(\'service\',' . $value['id_mvt_service'] . ',' . $id_agent . ',' . $id_contrat . ');"></span>
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:display_mvt_services.php

示例14: array

        $tab_date = array();
        $tab_date = explode("-", $date);
        $date_result = $tab_date[2] . '-' . $tab_date[1] . '-' . $tab_date[0];
        //return $date_result;
    }
    return $date_result;
}
include 'params.php';
echo '<javascript>';
if ($date_situation == '' || $date_situation == '00-00-0000' || $date_situation == '0000-00-00') {
    echo "alert('Veuillez sélectionner une date svp.');";
    //echo "return false;";
    exit;
}
include '../connect_db.php';
$sql = "\n\t\t\tinsert into cpas_cadres \n\t\t\t(id_cadre\n\t\t\t,date_situation\n\t\t\t)\n\t\t\tvalues\n\t\t\t(''\n\t\t\t,'" . transformDate($date_situation) . "'\n\t\t\t\n\t\t\t);\n\t";
//var_dump( $sql);
$result = mysqli_query($lien, $sql);
$last_id = mysqli_insert_id($lien);
if (!$result) {
    echo "alert('Problème d\\'ajout de la date');";
    exit;
} else {
    echo "alert('Ajout de la date réussi');";
}
mysqli_close($lien);
if ($id_cadre_a_dupliquer != 0) {
    include '../connect_db.php';
    $sql = "\n\t\t\t\tinsert into \n\t\t\t\tcpas_places_cadre\n\t\t\t\t(article_budgetaire,id_hors_dep,id_dep,id_ser,id_grade,id_fonc,id_bareme,id_code,id_equiv_tp,type_cadre,id_cadre,creation_date,creation_user,modif_date,modif_user,statut)\n\t\t\t\t\n\t\t\t\tselect \n\t\t\t\tarticle_budgetaire,id_hors_dep,id_dep,id_ser,id_grade,id_fonc,id_bareme,id_code,id_equiv_tp,type_cadre," . $last_id . ",CURRENT_DATE(),'" . $session_username . "','0000-00-00','','N' from cpas_places_cadre where id_cadre = " . $id_cadre_a_dupliquer . "\n\n\t\t";
    //var_dump( $sql);
    $result = mysqli_query($lien, $sql);
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:ajout_date_cadre.php

示例15: ob_clean

ob_clean();
// header utf-8//
header('Content-type: text/html; charset=utf-8');
if (!isset($rootpath)) {
    $rootpath = addslashes($_SERVER["DOCUMENT_ROOT"]);
}
include 'verification.php';
include 'params.php';
echo '<javascript>';
if (dateValid($date_mvt) == 0) {
    echo "alert('Date invalide! Veuillez recommencer.');";
    //echo "return false;";
    exit;
}
include '../connect_db.php';
$sql = "\n\t\t\tinsert into cpas_mouvements_domiciles\n\t\t\t(id_mvt_domicile\n\t\t\t,id_agent\n\t\t\t,adresse_domicile\n\t\t\t,num_domicile\n\t\t\t,bte_domicile\n\t\t\t,code_postal\n\t\t\t,localite\n\t\t\t,region\n\t\t\t,bxl_hbxl\n\t\t\t,date_mvt\n\t\t\t,creation_date\n\t\t\t,creation_user)\t\n\t\t\tvalues\n\t\t\t(''\n\t\t\t,'" . $id_agent . "'\n\t\t\t,'" . addslashes($adresse_domicile) . "'\n\t\t\t,'" . addslashes($num_domicile) . "'\n\t\t\t,'" . addslashes($bte_domicile) . "'\n\t\t\t,'" . $code_postal . "'\n\t\t\t,'" . addslashes($localite) . "'\n\t\t\t,'" . addslashes($region) . "'\n\t\t\t,'" . $bxl_hbxl . "'\n\t\t\t,'" . transformDate($date_mvt) . "'\n\t\t\t,NOW()\n\t\t\t,'" . $session_username . "'\n\t\t\t);\n\t";
//var_dump($sql);
$result = mysqli_query($lien, $sql);
if (!$result) {
    echo "alert('Problème d\\'ajout du mouvement de domicile');";
    exit;
} else {
    echo "alert('Mouvement de domicile ajouté avec succès');";
}
/*******Mettre tous les mvt de domicile à inactifs*********************************/
$sql = "\n\t\tupdate cpas_mouvements_domiciles set actif=0 where id_agent='" . $id_agent . "';\n\t\t\n\t";
$result = mysqli_query($lien, $sql);
/**********Mettre à 1 le mvt de domicile le plus récent*************************************************/
$sql = "\n\t\tupdate cpas_mouvements_domiciles set actif=1 where id_agent='" . $id_agent . "' and statut='N' \n\t\tand date_mvt<=CURDATE() order by date_mvt desc limit 1;\n\t\t\n\t";
//var_dump( $sql);
$result = mysqli_query($lien, $sql);
开发者ID:sylvrebos5123,项目名称:organigramme,代码行数:31,代码来源:ajout_mvt_domicile.php


注:本文中的transformDate函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。