- :
- :
- :
- :
- :
- :
- :
- :
- :
- :
- :
* @version $Id$ * @access public * @license http://opensource.org/licenses/gpl-3.0.html */ //////////// Check Inclusion de pages //////////// if (!class_exists('auth')) { include_once("../lib/lib_common.php"); ReloadIndex('admin'); } //////////// //////////// Check Droits utilisateur //////////// if (!$l21auth->hasRight('project')) ReloadIndex('admin'); //////////// if (isset($_GET['id'])) $id = $_GET['id']; if (isset($_POST['id'])) $id = $_POST['id']; // including sparkline code footerAddJS('../lib/js/jquery.sparkline.min.js'); footerAddInlineJS("$('.inlinebar').sparkline('html', {type: 'bar', barColor: '#8DA8CB'} );"); // including html2canvas to render and save as image footerAddJS('../lib/js/html2canvas/dist/html2canvas.js'); $matched_id = 'project-'.$id.'-dashboard'; $str = ' var array_images = []; var array_names = []; if(document.getElementById("'.$matched_id.'")) { html2canvas(document.getElementById("'.$matched_id.'"), { onrendered: function(canvas) { var canvasImg = canvas.toDataURL("image/png"); array_images.push(canvasImg); array_names.push("'.$matched_id.'"); $.post("../library/save-image.php", { images: array_images, names:array_names }, function(msg) { // success // console.log("Image has been saved as '.$matched_id.'.png"); } ); } }) };'; footerAddInlineJS($str); $req_det = SQL_getoneCompleteProject($id); $result = $sql_object->DBSelect($req_det); // Do record exists? if(!isset($result[0]['project_name'])) redirect_to('@module_default'); // Option [1] Only Getting Indicators list with links // $query = SQL_getProjectSdi($id); // $data = $sql_object->DBSelect($query); // if($data != 0 || count($data)!=1) { // $sdi_list='