예제 #1
0
    <?php 
for ($i = 1; $i <= $lastPage; $i++) {
    ?>
        <li<?php 
    if ($i == $currentPage) {
        echo ' class="active"';
    }
    ?>
><a href = "<?php 
    echo getPageUrl($i);
    ?>
"><?php 
    echo $i;
    ?>
</a></li>
    <?php 
}
?>

    <?php 
if ($currentPage != $lastPage) {
    ?>
        <li><a href = "<?php 
    echo getPageUrl($lastPage);
    ?>
">&raquo;</a></li>
    <?php 
}
?>
</ul>
예제 #2
0
	25/04/15 - promotions.php - Ali Bellamine
	Affiche la liste des promotions
*/
/**
	Routage selon la variable action
**/
$allowedAction = array('list', 'dl', 'view', 'edit', 'delete', 'add');
if (isset($_GET['action']) && in_array($_GET['action'], $allowedAction)) {
    $action = $_GET['action'];
} else {
    $action = 'list';
}
/**
		1. Récupération des données
	**/
$pageUtilisateurs = getPageUrl('adminUtilisateurs');
if ($action == 'list' || $action == 'dl') {
    if (isset($_GET['order'])) {
        $order = $_GET['order'];
    } else {
        $order = 'nom';
    }
    if (isset($_GET['desc'])) {
        $desc = true;
    } else {
        $desc = false;
    }
    $listePromotions = getPromotionList($order, $desc);
} else {
    if ($action == 'view' || $action == 'delete' || $action == 'edit') {
        // On récupère les données sur la promotion
예제 #3
0
        <?php 
    if ($currentPage != 1) {
        ?>
            <a href="<?php 
        echo getPageUrl($selfUrl, $currentPage - 1, $queryStr, $perPage);
        ?>
">Prev</a>
        <?php 
    }
    ?>

        <?php 
    if ($currentPage < ceil($totalCount / $perPage)) {
        ?>
            <a href="<?php 
        echo getPageUrl($selfUrl, $currentPage + 1, $queryStr, $perPage);
        ?>
">Next</a>
        <?php 
    }
    ?>
    </span>
<span>
<div class="clear"></div>

<div class="results">
    <?php 
    foreach ($result->products as $product) {
        ?>
        <table class="productImage" style="width:<?php 
        echo $product->image->sizes->XLarge->width;
예제 #4
0
파일: ajouter.php 프로젝트: alibell/PAS
</td>
					</tr>
					<?php 
                }
                ?>
				</table>
				<?php 
            } else {
                ?>
			<p><?php 
                echo LANG_ADMIN_UTILISATEURS_MENU_BATCH_IMPORTFILE;
                ?>
</p>
			
			<a href = "<?php 
                echo getPageUrl('adminUtilisateurs', array('page' => 'promotions', 'action' => 'dl'));
                ?>
"><?php 
                echo LANG_ADMIN_UTILISATEURS_MENU_BATCH_DOWNLOADPROMOTIONLIST;
                ?>
</a><br />
			<a href = "<?php 
                echo ROOT . CURRENT_FILE . '?page=ajouter&action=importCSVFile&downloadCSV';
                ?>
"><?php 
                echo LANG_ADMIN_UTILISATEURS_MENU_BATCH_DOWNLOADRAWCSV;
                ?>
</a><br /><br />
			
			<div class = "uploadBox">
				<form action="" method="post"  enctype="multipart/form-data">
예제 #5
0
파일: footer.php 프로젝트: alibell/PAS
		</form>
	</div>
</div>

<!-- Javascript -->	
	<script type="text/javascript" src="<?php 
echo ROOT . 'JS/menu.js';
?>
"></script> <!-- Gestion du menu -->
	<script type="text/javascript" src="<?php 
echo ROOT . 'JS/bugButton.js';
?>
"></script> <!-- Signalement des bugs -->
	<script>
		var ajaxBugURI = "<?php 
echo getPageUrl('ajaxBug');
?>
";
		
		<!-- Variables indiquant si on est sur un mobile / une tablette ou non -->
		function getDevice() {			
			if (window.matchMedia('screen and (max-width: 1024px) and (min-width: 320px)').matches == true)
			{
				isMobile = true;
				if (window.matchMedia('screen and (min-width: 721px) and (max-width: 1024px)').matches == true)
				{
					mobileSize = 'mid';
				}
				else
				{
					mobileSize = 'small';
예제 #6
0
파일: header.php 프로젝트: alibell/PAS
	<div id = "header">
		
		<?php 
// Pannel utilisateur
if ($_SESSION['rang'] > 0) {
    ?>
			<div id = "userPanel">
				<div>
				<!-- Nom de l'utilisateur -->
				<span id = "userName">
				<?php 
    if (isset($_SESSION['loginAS']['oldUser'])) {
        ?>
						<span style = "color: #E47373;">
						<a href = "<?php 
        echo getPageUrl('index', array('unloginAs' => 1));
        ?>
"><i class="fa fa-undo"></i></a>
						<?php 
        echo substr($_SESSION['loginAS']['oldUser']['prenom'], 0, 1) . '. ' . $_SESSION['loginAS']['oldUser']['nom'] . ' > ';
        ?>
						</span>
						<?php 
    }
    echo substr($_SESSION['prenom'], 0, 1) . '. ' . $_SESSION['nom'];
    ?>
				</span>
				
				<!-- Bouton de deconnexion -->
				<?php 
    // Création de l'URL de logout : on récupère l'URL en cours, on ajoute les $_GET existant et on finit pas rajouter logout en bout
					<a href="<?php 
echo getPageUrl("About");
?>
" class="w-nav-link nav-link<?php 
echo strcmp(wp_title('', false), "  About") == 0 ? ' w--current' : '';
?>
">About</a>
					<a href="<?php 
echo getPageUrl("Accreditation");
?>
" class="w-nav-link nav-link<?php 
echo strcmp(wp_title('', false), "  Accreditation") == 0 ? ' w--current' : '';
?>
">Media Accreditation</a>
					<a href="<?php 
echo getPageUrl("Request");
?>
" class="w-nav-link nav-link<?php 
echo strcmp(wp_title('', false), "  Request") == 0 ? ' w--current' : '';
?>
">Request for VCM Demo</a>
					<a href="<?php 
echo get_site_url();
?>
/faqs/" class="w-nav-link nav-link">FAQs</a>
				</nav>
				<div class="w-nav-button menu-btn">
					<div class="w-icon-nav-menu"></div>
				</div>
			</div>
		</div>
?>
" class="link">Blogs</a>
	            <a href="<?php 
echo getPageUrl('Upcoming Events');
?>
" class="link">Upcoming Events</a>
	            <a href="<?php 
echo getPageUrl("Videos");
?>
" class="link">Videos</a>
	            <a href="<?php 
echo getPageUrl('About');
?>
" class="link">About</a>
	            <a href="<?php 
echo getPageUrl('Accreditation');
?>
" class="link">Accreditation</a>
	            <a href="<?php 
echo get_site_url();
?>
/faqs/" class="link">FAQS</a>
	          </div>
	        </div>
	        <div class="w-col w-col-4">
	          <div>
	            <h4 class="h4">latest blogs</h4>
	            <?php 
$links = getPostsByCategory("Blog post", "publish", 7, 0, 'date', 'DESC');
?>
	            <?php 
예제 #9
0
/**
 * generatePDF - Génère un fichier PDF à partir des données d'évaluation d'un service
 *
 * @category : eval_ccpc_functions
 * @param array $data Données d'évaluation récupérées à partir de la fonction {@link getEvaluationCCPCFullData()}
 * @param boolean $comment TRUE si on incut les commentaire, FALSE si on ne les inclut pas
 * @param boolean $commentMSG TRUE si on incut un message concernant la CSG, FALSE si on ne l'inclut pas
 * @return array Array contenant les informations du fichier généré
 *
 * @Author Ali Bellamine
 *
 * Contenu de l'array retourné :<br>
 * 	['pdfPath'] => (string) Chemin local vers le fichier généré<br>
 * 	['pdfURI'] => (string) URI pointant vers le fichier généré
 *
 */
function generatePDF($data, $comment = FALSE, $commentMSG = FALSE)
{
    // Array contenant les résultats
    $output = array();
    // On vérifie l'existence des données
    if (isset($data) && count($data) > 0) {
        /* 
        	Mise en cache
        */
        // Calcul du md5
        $hashdata = $data;
        $hashdata['optionsPDF'] = array('comment' => $comment, 'commentMSG' => $commentMSG);
        $hash = md5(json_encode($hashdata));
        $pdfPath = PLUGIN_PATH . 'cache/' . $hash . '.pdf';
        $pdfPathURI = ROOT . 'evaluations/ccpc/cache/' . $hash . '.pdf';
        if (is_file($pdfPath)) {
            $output['pdfPath'] = $pdfPath;
            $output['pdfURI'] = $pdfPathURI;
            return $output;
        } else {
            // On charge la librairie
            require_once PLUGIN_PATH . 'core/fpdf17/fpdf.php';
            // On charge le fichier XML
            if (is_file(PLUGIN_PATH . 'formulaire.xml')) {
                $form = simplexml_load_file(PLUGIN_PATH . 'formulaire.xml');
            }
            // Promotion
            if (count($data['service']['promotion']) > 1) {
                $promotion = false;
            } else {
                foreach ($data['service']['promotion'] as $promotionData) {
                    $promotion = $promotionData['id'];
                }
            }
            ob_end_clean();
            // On crée le PDF
            $A4Height = 842;
            $A4Width = 595;
            $titleSize = 15;
            $textSize = 11;
            $pdf = new FPDF('L', 'pt', 'A4');
            $pdf->SetTopMargin(10);
            $pdf->SetLeftMargin(15);
            $pdf->SetAutoPageBreak(TRUE, 10);
            /**
            						Page contenant le résumé des données d'évaluation
            					**/
            $pdf->AddPage();
            $pdf->SetFont('Arial', 'B', $titleSize);
            // On affiche le titre
            $pdf->SetFillColor(70, 70, 242);
            $pdf->SetTextColor(255, 255, 255);
            $pdf->SetX(floor(0.1 * $A4Height));
            $pdf->Cell(floor(0.8 * $A4Height), $titleSize + 5, utf8_decode(LANG_FORM_CCPC_PDF_TITLE), 'LRTB', 0, 'C', TRUE);
            // Première ligne
            $pdf->Ln(2 * $titleSize);
            $pdf->SetFont('Arial', '', $textSize);
            // On affiche les informations concernant le service
            // Récupération des données
            $textToDisplay = LANG_FORM_CCPC_FILTER_SERVICE_TITLE . ' : ' . $data['service']['FullName'] . PHP_EOL . LANG_FORM_CCPC_PDF_STAGEPERIODE . ' : ' . date('d/m/Y', $data['service']['date']['min']) . ' - ' . date('d/m/Y', $data['service']['date']['max']) . PHP_EOL . LANG_FORM_CCPC_PDF_STUDENTPROMOTION . ' : ';
            $firstLoop = true;
            foreach ($data['service']['promotion'] as $promotionData) {
                if (!$firstLoop) {
                    $textToDisplay .= ', ';
                } else {
                    $firstLoop = FALSE;
                }
                $textToDisplay .= $promotionData['nom'] . ' (' . $promotionData['nb'] . ')';
            }
            $textToDisplay .= PHP_EOL . LANG_FORM_CCPC_PDF_STUDENTNB . ' : ' . $data['service']['nbEvaluation'] . PHP_EOL . LANG_FORM_CCPC_PDF_EVALUATIONNB . ' : ' . $data['nb'];
            $textToDisplay = utf8_decode($textToDisplay);
            // Affichage
            $pdf->SetFillColor(231, 231, 231);
            $pdf->SetTextColor(0, 0, 0);
            $pdf->MultiCell(floor(0.35 * $A4Height), $textSize + 5, $textToDisplay, 'LRTB', 'L', TRUE);
            // On affiche les graphiques : mainGraphPDF
            // Récupération des données
            // Liste des graphiques à afficher
            $input = $form->xpath('categorie/input[@mainPDFGraph="1"]');
            $nbGraph = count($input);
            // Nombre de graphiques à intégrer
            // On génère $tempData, contenant les données utilisées pour génération du png
            foreach ($input as $select) {
                if ($select['type'] == 'select') {
                    $categorie = $select->xpath('..')[0];
                    // Catégorie du graphique
                    $tempData = array();
                    $tempData['settings'] = array('width' => 450, 'height' => 230);
                    foreach ($select->option as $option) {
                        if (isset($data[(string) $categorie['nom']][(string) $select['nomBDD']]['nb'][(string) $option['value']])) {
                            $value = $data[(string) $categorie['nom']][(string) $select['nomBDD']]['nb'][(string) $option['value']];
                            if (is_numeric($value)) {
                                $tempData['data'][constant((string) $option['text'])] = $value;
                            } else {
                                $tempData['data'][constant((string) $option['text'])] = 0;
                            }
                        } else {
                            $tempData['data'][constant((string) $option['text'])] = 0;
                        }
                    }
                    // On inclut l'image
                    $pdf->Image(eval_ccpc_genGraphPie($tempData), 0.4 * $A4Height, 3 * $titleSize, floor(0.4 * $A4Height), 0, 'PNG');
                    break;
                }
            }
            // On affiche l'icone des filtres
            $filtres = eval_ccpc_checkFilterExistence($data['service']['id'], $data['service']['date']['min'], $data['service']['date']['max'], $promotion);
            if (is_array($filtres)) {
                foreach ($filtres as $filtre) {
                    if (isset($filtre['icone'])) {
                        $pdf->Image($filtre['icone'], 0.8 * $A4Height, 3 * $titleSize, floor(0.2 * $A4Height), 0, 'PNG');
                        break;
                    }
                }
            }
            // Deuxième ligne
            $pdf->Ln(8 * $titleSize);
            // On affiche le radar sur 1 an de données
            $fullYearData = getEvaluationCCPCFullData($data['service']['id'], $promotion, $data['service']['date']['max'] - 31536000, $data['service']['date']['max'], FALSE);
            // Récupération des données
            // Titre
            $pdf->Cell(floor(0.4 * $A4Height), $titleSize + 5, utf8_decode(LANG_FORM_CCPC_PDF_STAGEPERIODE_FULLYEAR . ' (' . date('d/m/Y', $fullYearData['service']['date']['min']) . ' ' . LANG_FORM_CCPC_PDF_STAGEPERIODE_END . ' ' . date('d/m/Y', $fullYearData['service']['date']['max']) . ')'), 0, 0, 'C', FALSE);
            // On affiche l'image
            // Liste des valeurs à afficher
            $input = $form->xpath('categorie/input[@radarPDFGraph="1"]');
            // Préparation des données
            $tempData = array();
            $tempData['settings'] = array('height' => 380, 'width' => 680, 'max' => 10);
            foreach ($input as $theinput) {
                // Récupération du parent
                $categorie = $theinput->xpath('..')[0];
                // Catégorie du graphique
                if (isset($data[(string) $categorie['nom']][(string) $theinput['nomBDD']]['moyenne'])) {
                    $tempData['data'][constant($theinput['label'] . '_SHORT')] = $fullYearData[(string) $categorie['nom']][(string) $theinput['nomBDD']]['moyenne'] + 5;
                }
            }
            // Affichage de l'image
            $pdf->Image(eval_ccpc_genGraphRadar($tempData), 10, $pdf->getY() + 40, floor(0.4 * $A4Height), 0, 'PNG');
            // On affiche le radar sur la période du stage
            // On décale du 0.05*largeur
            $pdf->Cell(floor(0.05 * $A4Height));
            // On crée un rectangle contenant les données
            $pdf->Rect($pdf->getX(), $pdf->getY() - 10, 0.5 * $A4Height, 0.3 * $A4Height, 'F');
            // Titre
            $pdf->Cell(floor(0.5 * $A4Height), $titleSize + 5, utf8_decode(LANG_FORM_CCPC_PDF_STAGEPERIODE_START . ' ' . date('d/m/Y', $data['service']['date']['min']) . ' ' . LANG_FORM_CCPC_PDF_STAGEPERIODE_END . ' ' . date('d/m/Y', $data['service']['date']['max'])), 0, 0, 'C', FALSE);
            // On ajoute l'image
            // Liste des valeurs à afficher
            $input = $form->xpath('categorie/input[@radarPDFGraph="1"]');
            // Préparation des données
            $tempData = array();
            $tempData['settings'] = array('height' => 380, 'width' => 650, 'max' => 10);
            foreach ($input as $theinput) {
                // Récupération du parent
                $categorie = $theinput->xpath('..')[0];
                // Catégorie du graphique
                if (isset($data[(string) $categorie['nom']][(string) $theinput['nomBDD']]['moyenne'])) {
                    $tempData['data'][constant($theinput['label'] . '_SHORT')] = $data[(string) $categorie['nom']][(string) $theinput['nomBDD']]['moyenne'] + 5;
                }
            }
            // Affichage de l'image
            $pdf->Image(eval_ccpc_genGraphRadar($tempData), $pdf->getX() - 0.45 * $A4Height, $pdf->getY() + 40, floor(0.4 * $A4Height), 0, 'PNG');
            // Affiche du logo
            $pdf->Image(ROOT . 'theme/img/logo.png', 10, $A4Width - 100, 0, 50, 'PNG');
            // Pied de Page
            $pdf->SetX(0.5 * $A4Height);
            $pdf->SetY($A4Width - 40);
            $textSize = 10;
            $pdf->SetFont('Arial', 'I', $textSize);
            // Ligne de demarcation
            $pdf->Line(15, $pdf->getY(), $A4Height - 15, $pdf->getY());
            // Accès aux résultats
            $pdf->SetX(0.5 * $A4Height);
            $pdf->Cell(0.5 * $A4Height - 15, $textSize + 5, utf8_decode(LANG_FORM_CCPC_PDF_FOOTER_FULLRESULT . ' ' . getPageUrl('evalView', array('evaluationType' => 1, 'service' => $data['service']['id']))), 0, 1, 'R', 0);
            // Coordonées CSG
            if ($commentMSG) {
                $pdf->SetFont('Arial', 'B', $textSize);
                $pdf->SetX(15);
                $pdf->Cell($A4Height - 15, $textSize + 5, utf8_decode(LANG_FORM_CCPC_PDF_FOOTER_STRUCTURENAME . ' - ' . CONTACT_STAGE_MAIL), 0, 0, 'C', 0);
            }
            /**
            							Commentaires
            						**/
            // Ajout des commentaires, points positifs et points négatifs : 'pdfComment'
            if ($comment) {
                $pdf->addPage('P', 'A4');
                // Titre
                $pdf->SetFont('Arial', 'B', $titleSize);
                $pdf->SetFillColor(70, 70, 242);
                $pdf->SetTextColor(255, 255, 255);
                $pdf->SetX(floor(0.1 * $A4Width));
                $pdf->Cell(floor(0.8 * $A4Width), $titleSize + 5, utf8_decode(LANG_FORM_CCPC_PDF_COMMENT_TITLE), 'LRTB', 1, 'C', TRUE);
                $pdf->SetTextColor(0, 0, 0);
                $pdf->SetFillColor(245, 245, 245);
                // Les commentaires
                $input = $form->xpath('categorie/input[@pdfComment="1"]');
                foreach ($input as $theinput) {
                    $categorie = $theinput->xpath('..')[0];
                    if ($theinput['type'] == 'text') {
                        $textArea = '';
                        $firstLoop = TRUE;
                        foreach ($theinput->text as $text) {
                            if (isset($data[(string) $categorie['nom']][(string) $text['nomBDD']])) {
                                foreach ($data[(string) $categorie['nom']][(string) $text['nomBDD']] as $comment) {
                                    if ($comment != '') {
                                        if (!$firstLoop) {
                                            $textArea .= PHP_EOL . PHP_EOL;
                                        } else {
                                            $firstLoop = FALSE;
                                        }
                                        // Saut de ligne
                                        $textArea .= $comment;
                                    }
                                }
                            }
                        }
                        if ($textArea != '') {
                            // On affiche les textes dans le PDF
                            $pdf->Ln(20);
                            $pdf->SetX(20);
                            $pdf->setFont('Arial', '', $titleSize);
                            $pdf->Cell(0, $titleSize + 5, utf8_decode(constant($theinput['label'] . '_SHORT')), 0, 1, 'L', FALSE);
                            $pdf->setFont('Arial', '', $textSize);
                            $pdf->SetX(20);
                            $pdf->MultiCell($A4Width - 40, $textSize + 5, utf8_decode($textArea), 'LTRB', 'L', TRUE);
                        }
                    } else {
                        if ($theinput['type'] == 'textarea') {
                            $textArea = '';
                            $firstLoop = TRUE;
                            if (isset($data[(string) $categorie['nom']][(string) $theinput['nomBDD']])) {
                                foreach ($data[(string) $categorie['nom']][(string) $theinput['nomBDD']] as $comment) {
                                    if (!$firstLoop) {
                                        $textArea .= PHP_EOL . PHP_EOL;
                                    } else {
                                        $firstLoop = FALSE;
                                    }
                                    // Saut de ligne
                                    $textArea .= $comment;
                                }
                            }
                            if ($textArea != '') {
                                // On affiche les textes dans le PDF
                                $pdf->Ln(20);
                                $pdf->SetX(20);
                                $pdf->setFont('Arial', '', $titleSize);
                                $pdf->Cell(0 * $A4Width, $titleSize + 5, utf8_decode(constant($theinput['label'] . '_SHORT')), 0, 1, 'L', FALSE);
                                $pdf->setFont('Arial', '', $textSize);
                                $pdf->SetX(20);
                                $pdf->MultiCell($A4Width - 40, $textSize + 5, utf8_decode($textArea), 'LTRB', 'L', TRUE);
                            }
                        }
                    }
                }
            }
            // On retourne le fichier PDF
            $pdf->Output($pdfPath, 'F');
            $output['pdfPath'] = $pdfPath;
            $output['pdfURI'] = $pdfPathURI;
            return $output;
        }
        exit;
    } else {
        return FALSE;
    }
}
예제 #10
0
/**
 * generatePDF - Génère un fichier PDF à partir des données d'évaluation d'un service
 *
 * @category : eval_ccpc_functions
 * @param array $data Données d'évaluation récupérées à partir de la fonction {@link getEvaluationCCPCFullData()}
 * @param boolean $comment TRUE si on incut les commentaire, FALSE si on ne les inclut pas
 * @param boolean $commentMSG TRUE si on incut un message concernant la CSG, FALSE si on ne l'inclut pas
 * @return array Array contenant les informations du fichier généré
 *
 * @Author Ali Bellamine
 *
 * Contenu de l'array retourné :<br>
 * 	['pdfPath'] => (string) Chemin local vers le fichier généré<br>
 * 	['pdfURI'] => (string) URI pointant vers le fichier généré
 *
 */
function generatePDF($data, $comment = FALSE, $commentMSG = FALSE)
{
    // Accès à la BDD
    global $db;
    // Array contenant les résultats
    $output = array();
    // On vérifie l'existence des données
    if (isset($data) && count($data) > 0) {
        /* 
        	Mise en cache
        */
        // Calcul du md5
        $hashdata = $data;
        $hashdata['optionsPDF'] = array('comment' => $comment, 'commentMSG' => $commentMSG);
        $hash = md5(json_encode($hashdata));
        $pdfPath = PLUGIN_PATH . 'cache/' . $hash . '.pdf';
        $pdfPathURI = ROOT . 'evaluations/ccpc/cache/' . $hash . '.pdf';
        if (is_file($pdfPath)) {
            $output['pdfPath'] = $pdfPath;
            $output['pdfURI'] = $pdfPathURI;
            return $output;
        } else {
            // On charge la librairie
            require_once PLUGIN_PATH . 'core/fpdf17/fpdf.php';
            // On charge le fichier XML
            if (is_file(PLUGIN_PATH . 'formulaire.xml')) {
                $form = simplexml_load_file(PLUGIN_PATH . 'formulaire.xml');
            }
            // Promotion
            if (count($data['service']['promotion']) > 1) {
                $promotion = false;
            } else {
                foreach ($data['service']['promotion'] as $promotionData) {
                    $promotion = $promotionData['id'];
                }
            }
            try {
                ob_end_clean();
            } catch (Exception $e) {
            }
            // On crée le PDF
            $A4Height = 842;
            $A4Width = 595;
            $titleSize = 15;
            $textSize = 11;
            $pdf = new FPDF('L', 'pt', 'A4');
            $pdf->SetTopMargin(10);
            $pdf->SetLeftMargin(15);
            $pdf->SetAutoPageBreak(TRUE, 10);
            /**
            						Page contenant le résumé des données d'évaluation
            					**/
            $pdf->AddPage();
            $pdf->SetFont('Arial', 'B', $titleSize);
            // On affiche le titre
            $pdf->SetFillColor(70, 70, 242);
            $pdf->SetTextColor(255, 255, 255);
            $pdf->SetX(floor(0.1 * $A4Height));
            $pdf->Cell(floor(0.8 * $A4Height), $titleSize + 5, utf8_decode(LANG_FORM_CCPC_PDF_TITLE), 'LRTB', 0, 'C', TRUE);
            // Première ligne
            $pdf->Ln(2 * $titleSize);
            $pdf->SetFont('Arial', '', $textSize);
            // On affiche les informations concernant le service
            // Récupération des données
            $textToDisplay = LANG_FORM_CCPC_FILTER_SERVICE_TITLE . ' : ' . $data['service']['FullName'] . PHP_EOL . LANG_FORM_CCPC_PDF_STAGEPERIODE . ' : ' . date('d/m/Y', $data['service']['date']['min']) . ' - ' . date('d/m/Y', $data['service']['date']['max']);
            // Nombre d'étudiants par promotion
            $nbEtudiantsService = array();
            $sql = 'SELECT p.nom promotion, COUNT( ae.userId ) nombre
												FROM `affectationexterne` ae
												INNER JOIN user u ON u.id = ae.userId
												INNER JOIN promotion p ON p.id = u.promotion
												WHERE `dateDebut` >= "' . TimestampToDatetime($data['service']['date']['min']) . '" AND `dateFin` <= "' . TimestampToDatetime($data['service']['date']['max']) . '" AND service = ' . $data['service']['id'] . '
												GROUP BY u.promotion';
            $res = $db->query($sql);
            while ($res_f = $res->fetch()) {
                $nbEtudiantsService[$res_f['promotion']] = $res_f['nombre'];
            }
            $firstLoop = true;
            if (count($nbEtudiantsService) > 0) {
                $textToDisplay .= PHP_EOL . LANG_FORM_CCPC_PDF_STUDENTPROMOTION . ' : ';
                foreach ($nbEtudiantsService as $promotionNom => $promotionNombre) {
                    if (!$firstLoop) {
                        $textToDisplay .= ', ';
                    } else {
                        $firstLoop = FALSE;
                    }
                    $textToDisplay .= $promotionNom . ' (' . $promotionNombre . ')';
                }
            }
            $textToDisplay .= PHP_EOL . LANG_FORM_CCPC_PDF_STUDENTNB . ' : ' . $data['service']['nbEvaluation'] . PHP_EOL . LANG_FORM_CCPC_PDF_EVALUATIONNB . ' : ' . $data['nb'];
            $textToDisplay = utf8_decode($textToDisplay);
            // Affichage
            $pdf->SetFillColor(231, 231, 231);
            $pdf->SetTextColor(0, 0, 0);
            $pdf->MultiCell(floor(0.35 * $A4Height), $textSize + 5, $textToDisplay, 'LRTB', 'L', TRUE);
            // On affiche les graphiques : mainGraphPDF
            // Récupération des données
            // Liste des graphiques à afficher
            $input = $form->xpath('categorie/input[@mainPDFGraph="1"]');
            $nbGraph = count($input);
            // Nombre de graphiques à intégrer
            // On génère $tempData, contenant les données utilisées pour génération du png
            foreach ($input as $select) {
                if ($select['type'] == 'select') {
                    $categorie = $select->xpath('..')[0];
                    // Catégorie du graphique
                    $tempData = array();
                    $tempData['settings'] = array('width' => 450, 'height' => 230);
                    foreach ($select->option as $option) {
                        if (isset($data[(string) $categorie['nom']][(string) $select['nomBDD']]['nb'][(string) $option['value']])) {
                            $value = $data[(string) $categorie['nom']][(string) $select['nomBDD']]['nb'][(string) $option['value']];
                            if (is_numeric($value)) {
                                $tempData['data'][constant((string) $option['text'])] = $value;
                            } else {
                                $tempData['data'][constant((string) $option['text'])] = 0;
                            }
                        } else {
                            $tempData['data'][constant((string) $option['text'])] = 0;
                        }
                    }
                    // On inclut l'image
                    $pdf->Image(eval_ccpc_genGraphPie($tempData), 0.4 * $A4Height, 3 * $titleSize, floor(0.4 * $A4Height), 0, 'PNG');
                    break;
                }
            }
            // On affiche l'icone des filtres : maximum 4
            $filtres = eval_ccpc_checkFilterExistence($data['service']['id'], $data['service']['date']['min'], $data['service']['date']['max'], $promotion);
            $numberOfIcons = 0;
            // Compte le nombre d'icones ajoutées
            $leftCornerX = 0.8 * $A4Height - 5;
            $leftCornerY = 3 * $titleSize - 5;
            if (is_array($filtres)) {
                foreach ($filtres as $filtre) {
                    if (isset($filtre['icone']) && strlen($filtre['icone']) > 1 && $numberOfIcons < 4) {
                        $pdf->Image($filtre['icone'], $leftCornerX, $leftCornerY, floor(0.1 * $A4Height), 0, 'PNG');
                        $numberOfIcons++;
                        if ($numberOfIcons == 1) {
                            $leftCornerX = 0.9 * $A4Height - 3;
                        } else {
                            if ($numberOfIcons == 2) {
                                $leftCornerX = 0.8 * $A4Height - 5;
                                $leftCornerY += 0.1 * $A4Height + 1;
                            } else {
                                if ($numberOfIcons == 3) {
                                    $leftCornerX = 0.9 * $A4Height - 3;
                                }
                            }
                        }
                        break;
                    }
                }
            }
            if ($numberOfIcons == 0) {
                // On ajoute l'icone neutre si aucune icone n'est présente
                $pdf->Image(PLUGIN_PATH . '/css/img/neutral.png', $leftCornerX, $leftCornerY, floor(0.1 * $A4Height), 0, 'PNG');
            }
            // Deuxième ligne
            $pdf->Ln(8 * $titleSize);
            // On affiche le radar sur 1 an de données
            $fullYearData = getEvaluationCCPCFullData($data['service']['id'], $promotion, $data['service']['date']['max'] - 31536000, $data['service']['date']['max'], FALSE);
            // Récupération des données
            // Titre
            $pdf->Cell(floor(0.4 * $A4Height), $titleSize + 5, utf8_decode(LANG_FORM_CCPC_PDF_STAGEPERIODE_FULLYEAR . ' (' . date('d/m/Y', $fullYearData['service']['date']['min']) . ' ' . LANG_FORM_CCPC_PDF_STAGEPERIODE_END . ' ' . date('d/m/Y', $fullYearData['service']['date']['max']) . ')'), 0, 0, 'C', FALSE);
            // On affiche l'image
            // Liste des valeurs à afficher
            $input = $form->xpath('categorie/input[@radarPDFGraph="1"]');
            // Préparation des données
            $tempData = array();
            $tempData['settings'] = array('height' => 380, 'width' => 680, 'max' => 10);
            foreach ($input as $theinput) {
                // Récupération du parent
                $categorie = $theinput->xpath('..')[0];
                // Catégorie du graphique
                if (isset($data[(string) $categorie['nom']][(string) $theinput['nomBDD']]['moyenne'])) {
                    $tempData['data'][constant($theinput['label'] . '_SHORT')] = $fullYearData[(string) $categorie['nom']][(string) $theinput['nomBDD']]['moyenne'] + 5;
                }
            }
            // Affichage de l'image
            $pdf->Image(eval_ccpc_genGraphRadar($tempData), 10, $pdf->getY() + 40, floor(0.4 * $A4Height), 0, 'PNG');
            // On affiche le radar sur la période du stage
            // On décale du 0.05*largeur
            $pdf->Cell(floor(0.05 * $A4Height));
            // On crée un rectangle contenant les données
            $pdf->Rect($pdf->getX(), $pdf->getY() - 10, 0.5 * $A4Height, 0.3 * $A4Height, 'F');
            // Titre
            $pdf->Cell(floor(0.5 * $A4Height), $titleSize + 5, utf8_decode(LANG_FORM_CCPC_PDF_STAGEPERIODE_START . ' ' . date('d/m/Y', $data['service']['date']['min']) . ' ' . LANG_FORM_CCPC_PDF_STAGEPERIODE_END . ' ' . date('d/m/Y', $data['service']['date']['max'])), 0, 0, 'C', FALSE);
            // On ajoute l'image
            // Liste des valeurs à afficher
            $input = $form->xpath('categorie/input[@radarPDFGraph="1"]');
            // Préparation des données
            $tempData = array();
            $tempData['settings'] = array('height' => 380, 'width' => 650, 'max' => 10);
            foreach ($input as $theinput) {
                // Récupération du parent
                $categorie = $theinput->xpath('..')[0];
                // Catégorie du graphique
                if (isset($data[(string) $categorie['nom']][(string) $theinput['nomBDD']]['moyenne'])) {
                    $tempData['data'][constant($theinput['label'] . '_SHORT')] = $data[(string) $categorie['nom']][(string) $theinput['nomBDD']]['moyenne'] + 5;
                }
            }
            // Affichage de l'image
            $pdf->Image(eval_ccpc_genGraphRadar($tempData), $pdf->getX() - 0.45 * $A4Height, $pdf->getY() + 40, floor(0.4 * $A4Height), 0, 'PNG');
            // Affiche du logo
            $pdf->Image(ROOT . 'theme/img/logo.png', 10, $A4Width - 100, 0, 50, 'PNG');
            // Pied de Page
            $pdf->SetX(0.5 * $A4Height);
            $pdf->SetY($A4Width - 40);
            $textSize = 10;
            $pdf->SetFont('Arial', 'I', $textSize);
            // Ligne de demarcation
            $pdf->Line(15, $pdf->getY(), $A4Height - 15, $pdf->getY());
            // Accès aux résultats
            $pdf->SetX(0.5 * $A4Height);
            $pdf->Cell(0.5 * $A4Height - 15, $textSize + 5, utf8_decode(LANG_FORM_CCPC_PDF_FOOTER_FULLRESULT . ' ' . getPageUrl('evalView', array('evaluationType' => 1, 'service' => $data['service']['id']))), 0, 1, 'R', 0);
            // Coordonées CSG
            if ($commentMSG) {
                $pdf->SetFont('Arial', 'B', $textSize);
                $pdf->SetX(15);
                $pdf->Cell($A4Height - 15, $textSize + 5, utf8_decode(LANG_FORM_CCPC_PDF_FOOTER_STRUCTURENAME . ' - ' . CONTACT_STAGE_MAIL), 0, 0, 'C', 0);
            }
            /**
            							Commentaires
            						**/
            // Ajout des commentaires, points positifs et points négatifs : 'pdfComment'
            if ($comment) {
                $pdf->addPage('P', 'A4');
                // Titre
                $pdf->SetFont('Arial', 'B', $titleSize);
                $pdf->SetFillColor(70, 70, 242);
                $pdf->SetTextColor(255, 255, 255);
                $pdf->SetX(floor(0.1 * $A4Width));
                $pdf->Cell(floor(0.8 * $A4Width), $titleSize + 5, utf8_decode(LANG_FORM_CCPC_PDF_COMMENT_TITLE), 'LRTB', 1, 'C', TRUE);
                $pdf->SetTextColor(0, 0, 0);
                $pdf->SetFillColor(245, 245, 245);
                // Les commentaires
                $input = $form->xpath('categorie/input[@pdfComment="1"]');
                foreach ($input as $theinput) {
                    $categorie = $theinput->xpath('..')[0];
                    if ($theinput['type'] == 'text') {
                        // Création de l'array contenant les données à afficher sous forme [timestamp fin][timestamp début][timestamp commantaire][idMessage][] => message
                        $tempData = array();
                        foreach ($theinput->text as $value) {
                            if (isset($data[(string) $categorie['nom']][(string) $value['nomBDD']])) {
                                foreach ($data[(string) $categorie['nom']][(string) $value['nomBDD']] as $idEval => $textValue) {
                                    if (isset($data['donnees'][$idEval]['infos'])) {
                                        $tempData[$data['donnees'][$idEval]['infos']['dateFin']][$data['donnees'][$idEval]['infos']['dateDebut']][$data['donnees'][$idEval]['infos']['date']][$idEval][] = $textValue;
                                    }
                                }
                            }
                        }
                        $textArea = '';
                        $firstLoop = TRUE;
                        // On affiche les commentaires
                        krsort($tempData);
                        foreach ($tempData as $dateFin => $tempvalue) {
                            krsort($tempvalue);
                            foreach ($tempvalue as $dateDebut => $value2) {
                                krsort($value2);
                                foreach ($value2 as $date => $value3) {
                                    foreach ($value3 as $commentId => $comments) {
                                        foreach ($comments as $comment) {
                                            if ($comment != '') {
                                                if (!$firstLoop) {
                                                    $textArea .= PHP_EOL . PHP_EOL;
                                                } else {
                                                    $firstLoop = FALSE;
                                                }
                                                // Saut de ligne
                                                $textArea .= $comment . ' - ' . date('d/m/Y', $date) . ' #' . $commentId;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        if ($textArea != '') {
                            // On affiche les textes dans le PDF
                            $pdf->Ln(20);
                            $pdf->SetX(20);
                            $pdf->setFont('Arial', '', $titleSize);
                            $pdf->Cell(0, $titleSize + 5, utf8_decode(constant($theinput['label'] . '_SHORT')), 0, 1, 'L', FALSE);
                            $pdf->setFont('Arial', '', $textSize);
                            $pdf->SetX(20);
                            $pdf->MultiCell($A4Width - 40, $textSize + 5, utf8_decode($textArea), 'LTRB', 'L', TRUE);
                        }
                    } else {
                        if ($theinput['type'] == 'textarea') {
                            // Création de l'array contenant les données à afficher sous forme [timestamp fin][timestamp début][timestamp commantaire][idCommentaire] => commentaire
                            $tempData = array();
                            foreach ($data[(string) $categorie['nom']][(string) $theinput['nomBDD']] as $commentId => $commentData) {
                                if (isset($data['donnees'][$commentId]['infos'])) {
                                    $tempData[$data['donnees'][$commentId]['infos']['dateFin']][$data['donnees'][$commentId]['infos']['dateDebut']][$data['donnees'][$commentId]['infos']['date']][$commentId] = $commentData;
                                }
                            }
                            $textArea = '';
                            $firstLoop = TRUE;
                            // On affiche les commentaires
                            krsort($tempData);
                            foreach ($tempData as $dateFin => $tempvalue) {
                                krsort($tempvalue);
                                foreach ($tempvalue as $dateDebut => $value2) {
                                    krsort($value2);
                                    foreach ($value2 as $date => $value3) {
                                        foreach ($value3 as $commentId => $comment) {
                                            if ($comment != '') {
                                                if (!$firstLoop) {
                                                    $textArea .= PHP_EOL . PHP_EOL;
                                                } else {
                                                    $firstLoop = FALSE;
                                                }
                                                // Saut de ligne
                                                $textArea .= $comment . ' - ' . date('d/m/Y', $date) . ' #' . $commentId;
                                            }
                                        }
                                    }
                                }
                            }
                            if ($textArea != '') {
                                // On affiche les textes dans le PDF
                                $pdf->Ln(20);
                                $pdf->SetX(20);
                                $pdf->setFont('Arial', '', $titleSize);
                                $pdf->Cell(0 * $A4Width, $titleSize + 5, utf8_decode(constant($theinput['label'] . '_SHORT')), 0, 1, 'L', FALSE);
                                $pdf->setFont('Arial', '', $textSize);
                                $pdf->SetX(20);
                                $pdf->MultiCell($A4Width - 40, $textSize + 5, utf8_decode($textArea), 'LTRB', 'L', TRUE);
                            }
                        }
                    }
                }
            }
            // On retourne le fichier PDF
            $pdf->Output($pdfPath, 'F');
            $output['pdfPath'] = $pdfPath;
            $output['pdfURI'] = $pdfPathURI;
            return $output;
        }
        exit;
    } else {
        return FALSE;
    }
}
예제 #11
0
/**
 * main service function.
 * @param type $idArr
 */
function execute($idArr)
{
    $result['status'] = 0;
    $result['data'] = getPageUrl("entirePathway", $idArr);
    echo json_encode($result);
}
예제 #12
0
파일: liste.php 프로젝트: alibell/PAS
				<td><strong><?php 
    echo $campagne['nom'];
    ?>
</strong></td>
				<td style = "text-align: center;"><?php 
    echo date('d/m/Y', $campagne['date']);
    ?>
</td>
				<td style = "text-align: center;"><?php 
    if ($campagne['statut'] == 1) {
        echo 'Terminé';
    } else {
        echo 'En cours';
    }
    ?>
<br />(<span style = "color: green;"><?php 
    echo $campagne['nb'][1];
    ?>
</span> / <?php 
    echo $campagne['nb'][0] + $campagne['nb'][1];
    ?>
)</td>
				<td style = "text-align: center;"><a href = "<?php 
    echo getPageUrl('mail', array('page' => 'campagne', 'id' => $campagne['codeCampagne']));
    ?>
"><i class="fa fa-envelope"></i></a></td>
			</tr>
		<?php 
}
?>
	</table>
예제 #13
0
파일: index.php 프로젝트: Galinijay/PAS
			</ul>
			
			<?php 
// Bouton de connexion
if ($_SESSION['rang'] == 0) {
    ?>
				<a class = "connexionBouton" href = "<?php 
    echo getPageUrl('login');
    ?>
"><?php 
    echo LANG_ACCUEIL_CONNEXION;
    ?>
</a>
			<?php 
}
?>
		
		</div>
	</div>
	
	<div id = "aboutPAS"><a href = "<?php 
echo getPageUrl('about');
?>
"><?php 
echo LANG_ACCUEIL_ABOUT;
?>
</a></div>
</div>

<?php 
require 'core/footer.php';
예제 #14
0
파일: adminMail.php 프로젝트: alibell/PAS
        echo LANG_FORM_CCPC_SETTINGS_SUBMIT;
        ?>
" />
		</form>
		<?php 
    }
}
?>
	
<script>
<?php 
if ($action == 'viewMail') {
    ?>
var ajaxURI = window.location.href;
var mailURI = '<?php 
    echo getPageUrl('mail', array('page' => 'campagne'));
    ?>
'+'&id=';

$('select[name="year"]').on('change', function(){
	$(this).parent().submit();
});

$('.addCampaign').on('click', function(){
	$('#addCampaign').css('display', 'block');
});

var campaignPossibilities = <?php 
    echo json_encode($campaignPossibilities);
    ?>
;
예제 #15
0
파일: profil.php 프로젝트: Galinijay/PAS
                        echo 'selected';
                    }
                    ?>
 /><?php 
                    echo $serviceInfo['FullName'];
                    ?>
</option>
										<?php 
                }
                ?>
								</select>
								<?php 
                if ($action == "edit") {
                    ?>
								&nbsp	<a href = "<?php 
                    echo getPageUrl('adminServices') . 'page=affectations&action=affectation&action2=view&id=' . $service['idAffectation'];
                    ?>
"><i class="fa fa-cog"></i></a>
									<?php 
                }
            }
        }
        ?>
					</fieldset>
				<?php 
    }
    /**
    				Informations propres aux chefs
    			**/
    if ($action != 'add' && (isset($userInfo['chef']) && count($userInfo['chef']) > 0)) {
        ?>
예제 #16
0
파일: campagne.php 프로젝트: alibell/PAS
            $res = $db->prepare($sql);
            $res->bindValue(":objet", $_POST['objet'], PDO::PARAM_STR);
            $res->bindValue(":message", $_POST['message'], PDO::PARAM_STR);
            $res->bindValue(":id", $_POST['actionId']);
            $res->execute();
            print_r($_POST);
        }
        exit;
    }
}
/**
		1. Récupération des informations relative à une campagne d'envoie de mail
	**/
$campaignData = getMailCampaignData($_GET['id']);
if (!$campaignData) {
    header('Location: ' . getPageUrl('mail'));
}
/**
		2. Affichage de la liste des mails à envoyer
	**/
?>
	
	<!-- Liste des destinataires -->
	
	<div id = "destinataires">
		<h1 id = "destinatairesTitle">Destinataires</h1>
		<ul>
		<?php 
foreach ($campaignData['destinataires'] as $destinataire) {
    $userInfo = getUserData($destinataire['id']);
    ?>
예제 #17
0
파일: liste.php 프로젝트: alibell/PAS
					onClick: (function(el, cell, date, data) {
						el.val(date.toLocaleDateString());
						$('input[name="'+ el.attr('id')+'"]').val(date.toLocaleDateString()); // On met à jour la valeur de l'input caché correspondant
					})
				});
			});
		<?php 
} else {
    if ($action == 'userList') {
        ?>
		var evaluationId = <?php 
        echo $evaluation['id'];
        ?>
;	
		var ajaxURL = '<?php 
        echo getPageUrl('ajaxUserList');
        ?>
';	
		var lastUpdateText = "<?php 
        echo LANG_ADMIN_EVALUATIONS_USERLIST_LASTUPDATE;
        ?>
";

		$(document).ready(function(){
			updateUserList();
			
			setInterval(updateUserList, 10000);
		});
		<?php 
    }
}
예제 #18
0
/**
 * main service function.
 * @param type $idArr
 */
function execute($idArr)
{
    $result['status'] = 0;
    $result['data'] = getPageUrl("metaModule", $idArr);
    echo json_encode($result);
}
예제 #19
0
/**
		3. Vérification et chargement du module
	**/
if (isset($_GET['evaluationType'])) {
    if (isset($evaluationTypeList[$_GET['evaluationType']]) && $evaluationTypeList[$_GET['evaluationType']]['actif'] == 1 && isset($evaluationTypeList[$_GET['evaluationType']]['resultRight'][$_SESSION['rang']]) && $evaluationTypeList[$_GET['evaluationType']]['resultRight'][$_SESSION['rang']] == 1) {
        // On enregistre les informations sur le type d'évaluation sélectionné dans $evaluationTypeData
        $evaluationTypeData = getEvalTypeData($evaluationTypeList[$_GET['evaluationType']]['id']);
        // On déclare la constante PLUGIN_PATH contenant le chemin du plugin
        define('PLUGIN_PATH', $_SERVER['DOCUMENT_ROOT'] . LOCAL_PATH . '/evaluations/' . $evaluationTypeData['dossier'] . '/');
        // On charge le fichier de config si il est présent
        if (is_file(PLUGIN_PATH . 'settings.php')) {
            include PLUGIN_PATH . 'settings.php';
        }
        // On refuse de charger le plugin si on est connecté en tant qu'un autre utilisateur et que cela n'a pas été autorisé
        if (isset($_SESSION['loginAS']) && (!defined('ALLOW_LOGIN_AS') || constant('ALLOW_LOGIN_AS') == FALSE)) {
            header('Location: ' . getPageUrl('evalView', array('erreur' => serialize(array(33 => TRUE)))));
            // On arrête l'execution du script
            exit;
        }
        // On charge le module
        include PLUGIN_PATH . 'displayEvaluationResult.php';
    }
}
require '../../core/footer.php';
// On inclut le JavaScript du formulaire
if (isset($evaluationTypeData['optionnel']['js'])) {
    foreach ($evaluationTypeData['optionnel']['js'] as $js) {
        if ($js == 'main' || $js == 'displayEvaluationResult') {
            ?>
				<script type="text/javascript" src="<?php 
            echo ROOT . 'evaluations/' . $evaluationTypeData['dossier'] . '/js/' . $js . '.js';
</div>
            <?php 
    }
    ?>
            <div class="date"><?php 
    echo date("M d Y", strtotime($event->post_date));
    ?>
</div>
          </div>
        </div>
        <?php 
}
?>
      </div>
      <a href="<?php 
echo getPageUrl("Upcoming events");
?>
" class="more-news">More Events</a>
    </div>
  </div>
</div>
<div id="VCM" class="w-section sec-2">
	<div class="w-container">
		<div class="news-container">
			<?php 
$obj = getPostByTitle('Video Home Text');
echo $obj->post_content;
?>
      <?php 
$video = current(getPostsByCategory("HomeVCMVideo", "publish", 1, 0, "date", "DESC"));
?>
예제 #21
0
파일: liste.php 프로젝트: Galinijay/PAS
    ?>
</td>
							<td>
								<a href = "<?php 
    echo ROOT . CURRENT_FILE . '?page=profil&action=view&id=' . $utilisateur['id'];
    ?>
"><i class="fa fa-user"></i></a>
								<a href = "<?php 
    echo ROOT . CURRENT_FILE . '?page=profil&action=edit&id=' . $utilisateur['id'];
    ?>
"><i class="fa fa-pencil"></i></a>
								<?php 
    if ($_SESSION['rang'] >= $utilisateur['rang']) {
        ?>
<a href = "<?php 
        echo getPageUrl('index', array('loginAS' => 1, 'loginASId' => $utilisateur['id']));
        ?>
"><i class="fa fa-user-secret"></i></a>	 <?php 
    }
    ?>
 <!-- Se connecter en tant que l'utilisateur -->
								<?php 
    if ($_SESSION['rang'] >= $utilisateur['rang']) {
        ?>
<a href = "<?php 
        echo ROOT . CURRENT_FILE . '?page=profil&action=delete&id=' . $utilisateur['id'];
        ?>
"><i class="fa fa-trash-o"></i></a>	 <?php 
    }
    ?>
							</td>
예제 #22
0
	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License along
	with this program; if not, write to the Free Software Foundation, Inc.,
	51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
**/
/*
	17/05/15 - affectations.php - Ali Bellamine
	Gère l'affectation des étudiants aux services
*/
$pageUtilisateurs = getPageUrl('adminUtilisateurs');
$pageServices = getPageUrl('adminServices');
$erreur = array();
/**
	Routage selon la variable action
**/
$allowedAction = array('home', 'batch', 'affectation');
$allowedAction2 = array('batch' => array('import', 'dlcsv'), 'affectation' => array('liste', 'view', 'add', 'edit', 'delete'));
if (isset($_GET['action']) && in_array($_GET['action'], $allowedAction)) {
    $action = $_GET['action'];
} else {
    $action = 'home';
}
if (isset($allowedAction2[$action]) && count($allowedAction2[$action]) > 0) {
    if (isset($_GET['action2']) && in_array($_GET['action2'], $allowedAction2[$action])) {
        $action2 = $_GET['action2'];
    } else {
예제 #23
0
	
			<form method = "POST" />
				<!-- Lien du formulaire -->
				<label for = "surveyLink"><?php 
echo LANG_EVALUATIONS_SURVEY_ADMIN_FORMLINK_TITLE;
?>
</label>
				<input type = "text" name = "surveyLink" id = "surveyLink" style = "width: 50%;" value = "<?php 
if (isset($_POST['surveyLink'])) {
    echo $_POST['surveyLink'];
} else {
    if (isset($surveyData['link'])) {
        echo $surveyData['link'];
    }
}
?>
" required />
				
				<input type = "submit" value = "<?php 
echo LANG_EVALUATIONS_SURVEY_ADMIN_SUBMIT;
?>
" />
			</form>
			
			<?php 
echo LANG_EVALUATIONS_SURVEY_ADMIN_URLSET;
?>
			<input type = "text" style = "width: 100%;"  value = "<?php 
echo getPageUrl('evalDo') . 'id=' . $evaluationData['id'] . '&eval=' . $surveyCode;
?>
" readonly />
예제 #24
0
/**
 * validateEvaluationSettings - Valide le bon enregistrement des paramètres relatifs à la campagne d'évaluation et autorise la suite de l'execution du code
 *
 * @category : evaluationFunction
 *
 * @Author Ali Bellamine
 *
 * /!\ Cette fonction ne fonctionne que depuis une page de module d'évaluation /!\
 */
function validateEvaluationSettings()
{
    global $evaluationData;
    // Si il s'agit d'un nouvelle évaluation, on redirige vers la page d'ajout des utilisateurs
    if (isset($_SESSION['evaluationAdd'])) {
        header('Location: ' . getPageUrl('adminEvaluation') . 'page=liste&action=userList&id=' . $evaluationData['id']);
    } else {
        header('Location: ' . getPageUrl('adminEvaluation') . 'page=liste&action=liste&msg=LANG_SUCCESS_EVALUATION_SETTING');
    }
}
예제 #25
0
파일: login.php 프로젝트: Galinijay/PAS
<?php

/**
	Copyright (C) 2015 Ali BELLAMINE

	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License along
	with this program; if not, write to the Free Software Foundation, Inc.,
	51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
**/
/*
	16/02/15 - login.php - Ali Bellamine
	Force la connexion via le CAS
*/
require 'core/main.php';
require 'core/header.php';
// Redirige l'utilisateur vers la page d'accueil une fois connecté
header('Location: ' . getPageUrl('index'));
예제 #26
0
 $gagkeys = stripslashes($parray[0]['tags']);
 if ($gagkeys != "") {
     $gagkeys = str_replace("   ", " ", $gagkeys);
     $gagkeys = str_replace("  ", " ", $gagkeys);
     $gagkeys = str_replace(" ", ", ", $gagkeys);
     $gagkeys = str_replace(",,", ",", $gagkeys);
     STemplate::assign('gagkeys', $gagkeys);
 }
 $PID = $parray[0]['PID'];
 STemplate::assign('PID', $PID);
 update_last_viewed($PID);
 update_your_viewed($USERID);
 if (session_verification()) {
     update_you_viewed($SID);
 }
 $url = getPageUrl();
 $pos = strrpos($url, "new");
 if ($pos > 0) {
     STemplate::assign('new', 1);
 }
 $queryr = "SELECT A.*, B.username FROM posts A, members B WHERE A.USERID=B.USERID AND A.PID!='" . mysql_real_escape_string($pid) . "' AND A.active='1' ORDER BY rand() desc limit 6";
 $executequeryr = $conn->execute($queryr);
 $r = $executequeryr->getarray();
 STemplate::assign('r', $r);
 $encodedurl = urlencode($thebaseurl . "/" . $config['scriptolution_dotcom'] . "/");
 STemplate::assign('encodedurl', $encodedurl);
 $eurl = base64_encode("/" . $config['scriptolution_dotcom'] . "/" . $pid);
 STemplate::assign('eurl', $eurl);
 $query = "SELECT PID FROM posts WHERE PID!='" . mysql_real_escape_string($pid) . "' AND PID>'" . mysql_real_escape_string($pid) . "' AND active='1' order by PID asc limit 1";
 $executequery = $conn->execute($query);
 $next = $executequery->fields['PID'];
예제 #27
0
파일: admin.php 프로젝트: alibell/PAS
</a></td>
													<td><a href = "<?php 
                    echo ROOT . CURRENT_FILE . '?' . http_build_query($_GET) . '&serviceId=' . $serviceData['id'] . '&download=CSVmoderateComment';
                    ?>
"><?php 
                    echo LANG_FORM_CCPC_ADMIN_FILTER_TABLE_DOWNLOAD_MODERATECOMMENT;
                    ?>
</a> - <a href = "<?php 
                    echo ROOT . CURRENT_FILE . '?' . http_build_query($_GET) . '&serviceId=' . $serviceData['id'] . '&download=CSVunmoderateComment';
                    ?>
"><?php 
                    echo LANG_FORM_CCPC_ADMIN_FILTER_TABLE_DOWNLOAD_UNMODERATECOMMENT;
                    ?>
</a></td>
													<td><a href = "<?php 
                    echo getPageUrl('evalView', $linkGetData);
                    ?>
"><i class="fa fa-bar-chart"></i></a></td>
												</tr>
											<?php 
                }
                ?>
										</table>
										<?php 
            }
            ?>
							</div>
						<?php 
        }
    } else {
        if ($action == 'mail') {