Bonjour, voilà je débute depuis un moment déjà mais j'ai toujours autant de difficultés!!!!
Mon problème à l'heure actuelle est que je dois créer une page qui génère un planning de la même forme qu'un agenda (je ne sais pas si je me fait comprendre mais bon!!!!), ma page affiche un jour ainsi que le nom des employés (issus d'une requète php), j'utilise du php et du javascript, ce que je dois faire c'est diviser la colonne jour en deux (matin et après et rendre chaque case cliquable( car elles appelleront une autre page).Et je ne sais pas si je dois utiliser le php ou le javascript et comme je débute dans les deux languages, je suis complètement paumée et je parviens pas separer ma journée en 2 et surtout à rendre cliquable chaque cases. (je met le code pour que cela soit plus clair). Merci de votre aide.
<?php
include getenv("DOCUMENT_ROOT")."inc/DB/connexion.inc.php"; // Enter the location of user data in MySQL database
$MySQL_database = 'planning';
$MySQL_table_Agent = 'Agent';
$MySQL_Agent_ID_IDENTIF = 'idag'; //clef primaire
$MySQL_Agent_NOM = 'nomag';
$MySQL_Agent_PRENOM = 'prenomag';
$MySQL_Agent_REMPLACANT = 'remplacement';
$MySQL_Agent_ACTIF = 'actif';
$MySQL_Agent_ENREGISTRER = 'enregistrer';
$MySQL_Agent_STATUT = 'statut';
$MySQL_Agent_EQUIPE = 'equipe';
mysql_select_db($MySQL_database);
mysql_query("SET NAMES 'utf8'");
?>
<!DOCTYPE html public "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<link href="/test/inc/idots.css" type="text/css" rel="StyleSheet" />
<script src="/test/inc/slidereffects.js" type="text/javascript"></script>
<style type="text/css">
.row_on { color: #000000; background-color: #F1F1F1; }
.row_off { color: #000000; background-color: #ffffff; }
.th { color: #000000; background-color: #D3DCE3; }
.narrow_column { width: 1%; white-space: nowrap; }
@media screen { .onlyPrint { display: none; } }
@media print { .noPrint { display: none; } }
#dhtmltooltip
{
position: absolute;
width: 150px;
border: 1px solid #ff7a0a;
padding: 2px;
background-color:#f9f400;
visibility: hidden;
z-index: 100;
}
</style>
<LINK href="/test/inc/app.css" type=text/css rel=StyleSheet>
<!--JS Imports from phpGW javascript class -->
<script type="text/javascript" src="/test/inc/jsapi.js"></script>
</head>
<body>
<?php
echo $Result_Choix;
$sql = "SELECT * FROM $MySQL_database.$MySQL_table_Agent WHERE $MySQL_database.$MySQL_table_Agent.$MySQL_Agent_ACTIF = '1'ORDER BY $MySQL_database.$MySQL_table_Agent.$MySQL_Agent_NOM" ;
$Result_Choix = mysql_query($sql);
?>
<table width="100%" cellpadding="0" cellspacing="0">
<tr><td><div class="calTimeGrid" style="height: 500px;">
<div class="calGridHeader" style="height: 5%;"></div>
<?php
$typeRow = 0;
$PosTop = 5;
while($List_NOM = mysql_fetch_array($Result_Choix)){
if ($typeRow == 0){
$PosTop = $PosTop+5;
echo "<div class=\"calTimeRow row_on\" style=\"height: 5%; top:".$PosTop."%;\">
<div class=\"calTimeRowTime\">".$List_NOM['nomag']." ".$List_NOM['prenomag']."</div></div>";
echo "<div style=\"height:5%; top:".$PosTop."%;\" class=\"calAddEvent\" onclick=\"window.open('/test/testsem','test','height=500, width=700, toolbar=no, menubar=no, status=no, resizable=no, scrollbars=yes');\"></div>";
$typeRow = 1;
}else{
$PosTop = $PosTop+5;
echo "<div class=\"calTimeRow row_off\" style=\"height: 5%; top:".$PosTop."%;\">
<div class=\"calTimeRowTime\">".$List_NOM['nomag']." ".$List_NOM['prenomag']."</div></div>";
echo "<div style=\"height:5%; top:".$PosTop."%;\" class=\"calAddEvent\" onclick=\"window.open('/test/testsem','test','height=500, width=700, toolbar=no, menubar=no, status=no, resizable=no, scrollbars=yes');\"></div>";
$typeRow = 0;
}
}
?>
<div id="calDayCols" class="calDayCols">
<div id="calColumn" class="calDayCol" style="left: 20%; width: 80%;">
<div id="columnM" class="calDayCol" style ="left:50%; width:50%;">Matin</div>
<div style="height: 5%;" class="calDayColHeader calToday"> Jeudi 2008 Novembre 20 </div>
</div>
</div>
</td>
</body>
</html>