[ Index ]
 

Code source de vtiger CRM 5.0.2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/modules/Dashboard/ -> HomepageDB.php (source)

   1  <?php
   2  /*********************************************************************************
   3  ** The contents of this file are subject to the vtiger CRM Public License Version 1.0
   4   * ("License"); You may not use this file except in compliance with the License
   5   * The Original Code is:  vtiger CRM Open Source
   6   * The Initial Developer of the Original Code is vtiger.
   7   * Portions created by vtiger are Copyright (C) vtiger.
   8   * All Rights Reserved.
   9  *
  10   ********************************************************************************/
  11  require_once ("modules/Dashboard/Entity_charts.php");
  12  
  13      global $current_user,$user_id,$date_start,$end_date,$tmp_dir,$mod_strings;
  14      $type='recordsforuser';
  15      $homepagedb_query = "select * from vtiger_crmentity se left join vtiger_leaddetails le on le.leadid=se.crmid left join vtiger_troubletickets tt on tt.ticketid=se.crmid left join vtiger_activity act on act.activityid=se.crmid where se.deleted=0 and (le.converted=0 or le.converted is null) and (tt.status!='Closed' or tt.status is null) and ((act.status!='Completed' and act.status!='Deferred') or act.status is null) and ((act.eventstatus!='Held' and act.eventstatus!='Not Held') or act.eventstatus is null) and setype in ('Accounts','Contacts','Leads','Potentials','Quotes','Invoice','PurchaseOrder', 'SalesOrder','Calendar','HelpDesk','Campaigns') and se.deleted=0 and se.smownerid=".$current_user->id;
  16      $graph_by="setype";
  17      $graph_title=$mod_strings['recordsforuser'].' '.$current_user->user_name;
  18      $module="Home";
  19      $where="";
  20      $query=$homepagedb_query;
  21  
  22      //Giving the Cached image name    
  23      $cache_file_name=abs(crc32($current_user->id))."_".$type."_".crc32($date_start.$end_date).".png";
  24          $html_imagename=$graph_by; //Html image name for the graph
  25      $graph_details=module_Chart($current_user->id,$date_start,$end_date,$query,$graph_by,$graph_title,$where,$module,$type);
  26      if($graph_details!=0)
  27          {
  28                  $name_val=$graph_details[0];
  29                  $cnt_val=$graph_details[1];
  30                  $graph_title=$graph_details[2];
  31                  $target_val=$graph_details[3];
  32                  $graph_date=$graph_details[4];
  33                  $urlstring=$graph_details[5];
  34                  $cnt_table=$graph_details[6];
  35                 $test_target_val=$graph_details[7];
  36  
  37                  $width=425;
  38                  $height=225;
  39                  $top=30;
  40                  $left=140;
  41                  $bottom=120;
  42                  $title=$graph_title;
  43          $sHTML = render_graph($tmp_dir."vert_".$cache_file_name,$html_imagename."_vert",$cnt_val,$name_val,$width,$height,$left,$right,$top,$bottom,$title,$target_val,"vertical");
  44          echo $sHTML;
  45          
  46          }
  47      else
  48      {
  49          echo $mod_strings[LBL_NO_DATA];    
  50      }
  51  
  52  
  53  ?>


Généré le : Sun Feb 25 10:22:19 2007 par Balluche grâce à PHPXref 0.7