|
Server IP : 10.128.40.6 / Your IP : 216.73.216.233 Web Server : Apache System : Linux webd006.cluster128.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : logmcpe ( 111175) PHP Version : 7.3.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0705) : /home/logmcpe/www/MCPRO/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?
include_once 'code/init.php';
$edition = false;
if(isset($_POST['type']) && ($_POST['type']=='edition')) $edition = true;
if ($edition) {
ob_start();
?>
<form id="taches" action="code/taches/traitements.php" method="post">
<div id="listArea" style="text-align:left;">
<ol id="todo_edition" style="text-align:left;">
<?
$taches = dbi_query("SELECT taches_id, taches_intitule, projet_id, projet_intitule FROM " . TABLE_TACHES . " LEFT JOIN " . TABLE_PROJETS . " USING (projet_id) WHERE taches_accomplie='0' AND agence_id = '$agence' AND projet_id!='0' ORDER BY projet_priorite, projet_id, taches_ordre");
while ($a = dbi_fetch_row($taches))
{
if ($projet_precedent != $a['projet_id']) echo '<li style="background-color: transparent; padding:8px;"><h4 style="margin:0;">'.$a['projet_intitule'].'</h4></li>';
$projet_precedent = $a['projet_id'];
echo '<li style="background-color: transparent; padding:8px; font-size:12px;" id="'.$a['taches_id'].'" class="gtd"><div class="drag-handle" id="handle-'.$cpt.'"><img src="images/spacer.gif" width="6" /><input type="text" name="tache_'.$a['taches_id'].'" value="'.$a['taches_intitule'].'" style="width:65%;" maxlength="255" /><img src="images/spacer.gif" width="6" />';
echo '<select name="projet_id['.$a['taches_id'].']">';
$projets = dbi_query("SELECT projet_id, projet_intitule FROM " . TABLE_PROJETS . " ORDER BY projet_id");
while ($p = dbi_fetch_row($projets))
{
echo '<option value="'.$p['projet_id'].'"'.($a['projet_id']==$p['projet_id']?' selected="selected"':'').'>'.$p['projet_intitule'].'</option>';
}
echo '</select>';
echo '<img src="images/spacer.gif" width="6" /><input type="image" name="'.$a['taches_id'].'" src="images/supr.gif" class="gtd_sup" /></div></li>';
}
?>
</ol>
<div align="center" style="margin-bottom:10px;">
<input type="hidden" value="modifier_taches" name="action" />
<input type="submit" value="Appliquer les modifications" class="bigbutton" />
ou
<input type="button" value="Annuler les modifications" id="load_todolist" />
</div>
</div>
</form>
<div id="data"></div>
<div id="test"></div>
<?
$out = ob_get_clean();
$out = htmlentities2unicodeentities($out);
$out = str_replace('€','€',$out);
$out = str_replace(' ',' ',$out);
echo $out;
} else {
ob_start();
?>
<form id="taches" action="code/taches/traitements.php" method="post">
<input type="text" id="taches_intitule" name="taches_intitule" style="width:75%;" maxlength="255" /><img src="images/spacer.gif" width="6" /><select name="projet_id">
<?
$taches = dbi_query("SELECT projet_id, projet_intitule FROM " . TABLE_PROJETS . " ORDER BY projet_priorite, projet_id");
while ($a = dbi_fetch_row($taches))
{
echo '<option value="'.$a['projet_id'].'">'.$a['projet_intitule'].'</option>';
}
?>
</select><input type="hidden" name="action" value="nouvelle_tache" /><img src="images/spacer.gif" width="6" /><input type="submit" value="Ajouter" class="bigbutton" />
</form>
<div id="listArea" style="text-align:left;">
<ol id="todo" style="text-align:left;">
<li style="background-color: transparent; padding:8px; font-size:12px;"><a href="#" onclick="return false;" id="edition_todolist_projets">Editer</a><span id="edition_todolist"></span></li>
<?
$projet_precedent = 0;
$cpt = 1;
$taches = dbi_query("SELECT taches_id, taches_intitule, projet_id, projet_intitule FROM " . TABLE_TACHES . " LEFT JOIN " . TABLE_PROJETS . " USING (projet_id) WHERE taches_accomplie='0' AND agence_id = '$agence' AND projet_id!='0' ORDER BY projet_priorite, projet_id, taches_ordre");
while ($a = dbi_fetch_row($taches))
{
$cpt++;
if ($projet_precedent != $a['projet_id']) echo '<li style="background-color: transparent; padding:8px;"><h4 style="margin:0;">'.$a['projet_intitule'].'</h4></li>';
echo '<li style="background-color: transparent; padding:8px; font-size:12px;" id="'.$a['taches_id'].'" class="gtd"><input type="checkbox" name="'.$a['taches_id'].'" id="check_'.$a['taches_id'].'" class="gtd_tache" /><img src="images/spacer.gif" width="6" /><span class="drag-handle" id="handle-'.$cpt.'">'.$a['taches_intitule'].'</span></li>';
$projet_precedent = $a['projet_id'];
}
?>
</ol>
</div>
<div id="data"></div>
<div id="log" style="display:none;"></div>
<div id="test"></div>
<h3 style="margin-bottom:0;">Tâches accomplies</h3>
<ol id="done" style="text-align:left;margin-top:0;">
<?
$taches = dbi_query("SELECT taches_id, taches_intitule, UNIX_TIMESTAMP(taches_date_accomplie) as date, prenom, projet_intitule FROM " . TABLE_TACHES . " t LEFT JOIN " . TABLE_PROJETS . " USING (projet_id) LEFT JOIN users ON user_id = taches_user_accomplie WHERE taches_accomplie='1' AND t.agence_id = '$agence' AND projet_id!='0' ORDER BY taches_date_accomplie DESC LIMIT 10");
while ($a = dbi_fetch_row($taches))
{
//setlocale(LC_TIME, "fra_fra");
//setlocale(LC_TIME, array('fr_fr', 'fr_FR', 'fr', 'FR'));
if (ereg("WIN", PHP_OS)) setlocale (LC_TIME, "french");
else if (ereg("BSD", PHP_OS)) setlocale (LC_TIME, "fr_FR.ISO8859-1");
else setlocale (LC_TIME, "fr_FR");
$date = strftime("%A %d/%m/%y à %HH%M",$a['date']);
echo '<li style="background-color: transparent; padding:8px; font-size:12px;" id="'.$a['taches_id'].'" class="gtdone"><input type="checkbox" name="'.$a['taches_id'].'" id="check_'.$a['taches_id'].'" class="gtd_done" checked="checked" /><img src="images/spacer.gif" width="6" /><span class="drag-handle" id="handle-'.$a['taches_id'].'">'.$a['projet_intitule'].'<img src="images/spacer.gif" width="6" />'.$a['taches_intitule'].' (accompli par '.$a['prenom'].' le '.$date.')</span></li>';
}
?>
</ol><br />
<?
$out = ob_get_clean();
$out = htmlentities2unicodeentities($out);
$out = str_replace('€','€',$out);
$out = str_replace(' ',' ',$out);
echo $out;
} ?>