[ Index ] |
|
Code source de vtiger CRM 5.0.2 |
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 $ajaxaction = $_REQUEST['ajxaction']; 12 global $current_user; 13 $crmid = $_REQUEST["recordid"]; 14 $module = $_REQUEST["module"]; 15 $userid = $current_user->id; 16 if($ajaxaction == "SAVETAG") 17 { 18 19 require_once ('include/freetag/freetag.class.php'); 20 $tagfields = $_REQUEST["tagfields"]; 21 $freetag = new freetag(); 22 if (isset($_REQUEST["tagfields"]) && trim($_REQUEST["tagfields"]) != "") 23 { 24 $freetag->tag_object($userid,$crmid,$tagfields,$module); 25 $tagcloud = $freetag->get_tag_cloud_html($module,$userid,$crmid); 26 echo $tagcloud; 27 } 28 29 } 30 elseif($ajaxaction == 'GETTAGCLOUD') 31 { 32 require_once ('include/freetag/freetag.class.php'); 33 $freetag = new freetag(); 34 if(trim($module) != "") 35 { 36 $tagcloud = $freetag->get_tag_cloud_html($module,$userid,$crmid); 37 echo $tagcloud; 38 }else 39 { 40 $tagcloud = $freetag->get_tag_cloud_html("",$userid); 41 echo $tagcloud; 42 } 43 }elseif($ajaxaction == 'DELETETAG') 44 { 45 if(is_numeric($_REQUEST['tagid'])) 46 { 47 $tagid = $_REQUEST['tagid']; 48 global $adb; 49 $query="delete from vtiger_freetagged_objects where tag_id=".$tagid; 50 $result=$adb->query($query); 51 $query="delete from vtiger_freetags where id=".$tagid; 52 $result=$adb->query($query); 53 echo 'SUCESS'; 54 }else 55 { 56 die("An invalid tagid to delete."); 57 } 58 59 } 60 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 10:22:19 2007 | par Balluche grâce à PHPXref 0.7 |