linea21-modules
[ class tree: linea21-modules ] [ index: linea21-modules ] [ all elements ]

Source for file timeline-xml.php

Documentation is available at timeline-xml.php

  1. <?php
  2. /**
  3.  * @package linea21.modules
  4.  * @subpackage project
  5.  * @author linea21 <info@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  */
  10. include_once('../config/define.php');
  11. include_once('../lib/functions_auth.php');
  12. include_once("./".SQL.".inc.php");
  13. include_once("../class/system/class." SQL ".php");
  14. $sql_entity SQL;
  15. $sql_object new $sql_entity;
  16. $sql_object->DBInitialise();
  17. $sql_object->DBConnexion();
  18.  
  19. header('Content-type: application/xml; charset='.CHARSET);
  20. $req_list_projects=SQL_getProjectsList(0999'');
  21. $items=$sql_object->DBSelect($req_list_projects);
  22.  
  23.  
  24.  
  25. $sxe simplexml_load_string("<?xml version=\"1.0\" encoding=\"".CHARSET."\" ?><data></data>");
  26.  
  27. foreach($items as $item){
  28.  
  29.   $s_date date_rfc2822($item['project_begin_date_display']);
  30.   $es_date date_rfc2822($item['project_estimated_date_display']);
  31.   $e_date date_rfc2822($item['project_end_date_display']);
  32.  
  33.  
  34.   if($s_date != false{
  35.  
  36.     $child $sxe->addChild('event'formatText($item['project_description']'2FILE'));
  37.     $child->addAttribute('start'$s_date);
  38.  
  39.  
  40.     if($e_date != false)  {
  41.       $child->addAttribute('end'$e_date);
  42.       $child->addAttribute('color''#0a0');
  43.       $child->addAttribute('durationEvent''true');
  44.     else {
  45.       if($es_date != false{
  46.         $child->addAttribute('end'$es_date);
  47.         $child->addAttribute('color''orange');
  48.         $child->addAttribute('durationEvent''true');
  49.       else {
  50.         $child->addAttribute('color''#FC2916');
  51.         $child->addAttribute('icon''../templates/admin/default/images/timeline-red.png');
  52.       }
  53.     }
  54.     $child->addAttribute('title'$item['complete_project_name']);
  55.     $child->addAttribute('caption'$item['complete_project_name']);
  56.     //$child->addAttribute('classname', 'hot_event');
  57.  
  58.     $child->addAttribute('link''../admin/?rub=project&todo=det&id='.$item['project_id']);
  59.   }
  60. }
  61.  
  62. echo $sxe->asXML();
  63.  
  64. ?>

Documentation generated on Thu, 03 May 2012 15:07:52 +0200 by phpDocumentor 1.4.1