更新到 5.2 正式版后第一次 SVN 提交。
yuchenghu@hawebs.net git-svn-id: https://svn.code.sf.net/p/hawebs/svn@607 a2543c7e-f6e9-4f8a-8bff-1ffc34733512
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
require_once('include/Ajax/CommonAjax.php');
|
||||
?>
|
||||
@@ -1,70 +0,0 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $theme;
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
|
||||
require_once('include/home.php');
|
||||
require_once('Smarty_setup.php');
|
||||
require_once('include/freetag/freetag.class.php');
|
||||
|
||||
$homeObj=new Homestuff;
|
||||
$smarty=new vtigerCRM_Smarty;
|
||||
$smarty->assign("MOD",$mod_strings);
|
||||
$smarty->assign("APP",$app_strings);
|
||||
$smarty->assign("THEME", $theme);
|
||||
$smarty->assign("IMAGE_PATH",$image_path);
|
||||
|
||||
if(!empty($_REQUEST['homestuffid'])){
|
||||
$stuffid = $_REQUEST['homestuffid'];
|
||||
}
|
||||
if(!empty($_REQUEST['blockstufftype'])){
|
||||
$stufftype = $_REQUEST['blockstufftype'];
|
||||
}
|
||||
|
||||
if($stufftype=='Tag Cloud'){
|
||||
$freetag = new freetag();
|
||||
$smarty->assign("ALL_TAG",$freetag->get_tag_cloud_html("",$current_user->id));
|
||||
$smarty->display("Home/TagCloud.tpl");
|
||||
}elseif($stufftype == 'Notebook'){
|
||||
$contents = $homeObj->getNoteBookContents($stuffid);
|
||||
$smarty->assign("NOTEBOOK_CONTENTS",$contents);
|
||||
$smarty->assign("NOTEBOOKID", $stuffid);
|
||||
$smarty->display("Home/notebook.tpl");
|
||||
}elseif($stufftype == 'URL'){
|
||||
$url = $homeObj->getWidgetURL($stuffid);
|
||||
if(strpos($url, "://") === false){
|
||||
$url = "http://".trim($url);
|
||||
}
|
||||
$smarty->assign("URL",$url);
|
||||
$smarty->assign("WIDGETID", $stuffid);
|
||||
$smarty->display("Home/HomeWidgetURL.tpl");
|
||||
}else{
|
||||
$homestuff_values=$homeObj->getHomePageStuff($stuffid,$stufftype);
|
||||
if($stufftype=="DashBoard"){
|
||||
$homeObj->getDashDetails($stuffid,'type');
|
||||
$dashdet=$homeObj->dashdetails;
|
||||
}
|
||||
}
|
||||
|
||||
$smarty->assign("DASHDETAILS",$dashdet);
|
||||
$smarty->assign("HOME_STUFFTYPE",$stufftype);
|
||||
$smarty->assign("HOME_STUFFID",$stuffid);
|
||||
$smarty->assign("HOME_STUFF",$homestuff_values);
|
||||
$smarty->assign("THEME", $theme);
|
||||
$smarty->assign("IMAGE_PATH", $image_path);
|
||||
|
||||
$smarty->display("Home/HomeBlock.tpl");
|
||||
?>
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
/*+**********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
************************************************************************************/
|
||||
include_once('vtlib/Vtiger/Feed/Parser.php');
|
||||
|
||||
global $app_strings, $mod_strings, $theme, $currentModule;
|
||||
|
||||
$ftimeout = 60;
|
||||
$fparser = new Vtiger_Feed_Parser();
|
||||
$fparser->vt_dofetch('http://www.vtiger.com/products/crm/newsfeed.php', $ftimeout);
|
||||
$items = $fparser->get_items();
|
||||
$NEWSLIST = Array();
|
||||
foreach($items as $item) {
|
||||
$NEWSLIST[] = $item;
|
||||
}
|
||||
|
||||
require_once('Smarty_setup.php');
|
||||
$smarty = new vtigerCRM_Smarty;
|
||||
$smarty->assign("MOD", $mod_strings);
|
||||
$smarty->assign("APP", $app_strings);
|
||||
$smarty->assign("THEME", $theme);
|
||||
$smarty->assign("IMAGE_PATH", "themes/$theme/images/");
|
||||
$smarty->assign('NEWSLIST', $NEWSLIST);
|
||||
$smarty->display("HomeNews.tpl");
|
||||
?>
|
||||
|
||||
@@ -1,208 +0,0 @@
|
||||
<?php
|
||||
/*+********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
*******************************************************************************/
|
||||
|
||||
/**
|
||||
* this file will contain the utility functions for Home module
|
||||
*/
|
||||
|
||||
/**
|
||||
* function to get upcoming activities for today
|
||||
* @param integer $maxval - the maximum number of records to display
|
||||
* @param integer $calCnt - returns the count query if this is set
|
||||
* return array $values - activities record in array format
|
||||
*/
|
||||
function homepage_getUpcomingActivities($maxval,$calCnt){
|
||||
require_once("data/Tracker.php");
|
||||
require_once('include/utils/utils.php');
|
||||
|
||||
global $adb;
|
||||
global $current_user;
|
||||
|
||||
$today = date("Y-m-d", time());
|
||||
$upcoming_condition = " AND (date_start = '$today' OR vtiger_recurringevents.recurringdate = '$today')";
|
||||
|
||||
$list_query = " select vtiger_crmentity.crmid,vtiger_crmentity.smownerid,".
|
||||
"vtiger_crmentity.setype, vtiger_recurringevents.recurringdate, vtiger_activity.* ".
|
||||
"from vtiger_activity inner join vtiger_crmentity on vtiger_crmentity.crmid=".
|
||||
"vtiger_activity.activityid LEFT JOIN vtiger_groups ON vtiger_groups.groupid = ".
|
||||
"vtiger_crmentity.smownerid left outer join vtiger_recurringevents on ".
|
||||
"vtiger_recurringevents.activityid=vtiger_activity.activityid";
|
||||
$list_query .= getNonAdminAccessControlQuery('Calendar',$current_user);
|
||||
$list_query .= "WHERE vtiger_crmentity.deleted=0 and vtiger_activity.activitytype not in ".
|
||||
"('Emails') AND ( vtiger_activity.status is NULL OR vtiger_activity.status not in ".
|
||||
"('Completed','Deferred')) and ( vtiger_activity.eventstatus is NULL OR ".
|
||||
"vtiger_activity.eventstatus not in ('Held','Not Held') )".$upcoming_condition;
|
||||
|
||||
$list_query.= " GROUP BY vtiger_activity.activityid";
|
||||
$list_query.= " ORDER BY date_start,time_start ASC";
|
||||
$list_query.= " limit $maxval";
|
||||
|
||||
$res = $adb->query($list_query);
|
||||
$noofrecords = $adb->num_rows($res);
|
||||
if($calCnt == 'calculateCnt'){
|
||||
return $noofrecords;
|
||||
}
|
||||
|
||||
$open_activity_list = array();
|
||||
if ($noofrecords>0){
|
||||
for($i=0;$i<$noofrecords;$i++){
|
||||
$open_activity_list[] = array('name' => $adb->query_result($res,$i,'subject'),
|
||||
'id' => $adb->query_result($res,$i,'activityid'),
|
||||
'type' => $adb->query_result($res,$i,'activitytype'),
|
||||
'module' => $adb->query_result($res,$i,'setype'),
|
||||
'date_start' => getDisplayDate($adb->query_result($res,$i,'date_start')),
|
||||
'due_date' => getDisplayDate($adb->query_result($res,$i,'due_date')),
|
||||
'recurringdate' => getDisplayDate($adb->query_result($res,$i,'recurringdate')),
|
||||
'priority' => $adb->query_result($res,$i,'priority'),
|
||||
);
|
||||
}
|
||||
}
|
||||
$values = getActivityEntries($open_activity_list);
|
||||
$values['ModuleName'] = 'Calendar';
|
||||
$values['search_qry'] = "&action=ListView&from_homepage=upcoming_activities";
|
||||
|
||||
return $values;
|
||||
}
|
||||
|
||||
/**
|
||||
* this function returns the activity entries in array format
|
||||
* it takes in an array containing activity details as a parameter
|
||||
* @param array $open_activity_list - the array containing activity details
|
||||
* return array $values - activities record in array format
|
||||
*/
|
||||
function getActivityEntries($open_activity_list){
|
||||
global $current_language, $app_strings;
|
||||
$current_module_strings = return_module_language($current_language, 'Calendar');
|
||||
if(!empty($open_activity_list)){
|
||||
$header=array();
|
||||
$header[] =$current_module_strings['LBL_LIST_SUBJECT'];
|
||||
$header[] =$current_module_strings['Type'];
|
||||
|
||||
$entries = array();
|
||||
foreach($open_activity_list as $event){
|
||||
$recur_date=preg_replace('/--/','',$event['recurringdate']);
|
||||
if($recur_date!=""){
|
||||
$event['date_start']=$event['recurringdate'];
|
||||
}
|
||||
$font_color_high = "color:#00DD00;";
|
||||
$font_color_medium = "color:#DD00DD;";
|
||||
|
||||
switch ($event['priority']){
|
||||
case 'High':
|
||||
$font_color=$font_color_high;
|
||||
break;
|
||||
case 'Medium':
|
||||
$font_color=$font_color_medium;
|
||||
break;
|
||||
default:
|
||||
$font_color='';
|
||||
}
|
||||
|
||||
if($event['type'] != 'Task' && $event['type'] != 'Emails' && $event['type'] != ''){
|
||||
$activity_type = 'Events';
|
||||
}else{
|
||||
$activity_type = 'Task';
|
||||
}
|
||||
|
||||
$entries[$event['id']] = array(
|
||||
'0' => '<a href="index.php?action=DetailView&module='.$event["module"].'&activity_mode='.$activity_type.'&record='.$event["id"].'" style="'.$font_color.';">'.$event["name"].'</a>',
|
||||
'1' => $event["type"],
|
||||
);
|
||||
}
|
||||
$values = array('noofactivities'=>count($open_activity_list),'Header'=>$header,'Entries'=>$entries);
|
||||
}else{
|
||||
$values = array('noofactivities'=>count($open_activity_list), 'Entries'=>
|
||||
'<div class="componentName">'.$app_strings['LBL_NO_DATA'].'</div>');
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* function to get pending activities for today
|
||||
* @param integer $maxval - the maximum number of records to display
|
||||
* @param integer $calCnt - returns the count query if this is set
|
||||
* return array $values - activities record in array format
|
||||
*/
|
||||
function homepage_getPendingActivities($maxval,$calCnt){
|
||||
require_once("data/Tracker.php");
|
||||
require_once("include/utils/utils.php");
|
||||
require_once('include/utils/CommonUtils.php');
|
||||
|
||||
global $adb;
|
||||
global $current_user;
|
||||
|
||||
$today = date("Y-m-d", time());
|
||||
$pending_condition = " AND (due_date = '$today' OR vtiger_recurringevents.recurringdate = '$today')";
|
||||
|
||||
$list_query = "select vtiger_crmentity.crmid,vtiger_crmentity.smownerid,vtiger_crmentity.".
|
||||
"setype, vtiger_recurringevents.recurringdate, vtiger_activity.* from vtiger_activity ".
|
||||
"inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_activity.activityid LEFT ".
|
||||
"JOIN vtiger_groups ON vtiger_groups.groupid = vtiger_crmentity.smownerid left outer join ".
|
||||
"vtiger_recurringevents on vtiger_recurringevents.activityid=vtiger_activity.activityid".
|
||||
$list_query .= getNonAdminAccessControlQuery('Calendar',$current_user);
|
||||
$list_query .= "WHERE vtiger_crmentity.deleted=0 and (vtiger_activity.activitytype not in ".
|
||||
"('Emails')) AND (vtiger_activity.status is NULL OR vtiger_activity.status not in ".
|
||||
"('Completed','Deferred')) and (vtiger_activity.eventstatus is NULL OR vtiger_activity.".
|
||||
"eventstatus not in ('Held','Not Held')) ".$pending_condition;
|
||||
|
||||
$list_query.= " GROUP BY vtiger_activity.activityid";
|
||||
$list_query.= " ORDER BY date_start,time_start ASC";
|
||||
$list_query.= " limit $maxval";
|
||||
|
||||
$res = $adb->query($list_query);
|
||||
$noofrecords = $adb->num_rows($res);
|
||||
if($calCnt == 'calculateCnt'){
|
||||
return $noofrecords;
|
||||
}
|
||||
|
||||
$open_activity_list = array();
|
||||
$noofrows = $adb->num_rows($res);
|
||||
if (count($res)>0){
|
||||
for($i=0;$i<$noofrows;$i++){
|
||||
$open_activity_list[] = array('name' => $adb->query_result($res,$i,'subject'),
|
||||
'id' => $adb->query_result($res,$i,'activityid'),
|
||||
'type' => $adb->query_result($res,$i,'activitytype'),
|
||||
'module' => $adb->query_result($res,$i,'setype'),
|
||||
'date_start' => getDisplayDate($adb->query_result($res,$i,'date_start')),
|
||||
'due_date' => getDisplayDate($adb->query_result($res,$i,'due_date')),
|
||||
'recurringdate' => getDisplayDate($adb->query_result($res,$i,'recurringdate')),
|
||||
'priority' => $adb->query_result($res,$i,'priority'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$values = getActivityEntries($open_activity_list);
|
||||
$values['ModuleName'] = 'Calendar';
|
||||
$values['search_qry'] = "&action=ListView&from_homepage=pending_activities";
|
||||
|
||||
return $values;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* this function returns the number of columns in the home page for the current user.
|
||||
* if nothing is found in the database it returns 4 by default
|
||||
* return integer $data - the number of columns
|
||||
*/
|
||||
function getNumberOfColumns(){
|
||||
global $current_user, $adb;
|
||||
|
||||
$sql = "select * from vtiger_home_layout where userid=?";
|
||||
$result = $adb->pquery($sql, array($current_user->id));
|
||||
|
||||
if($adb->num_rows($result)>0){
|
||||
$data = $adb->query_result($result,0,"layout");
|
||||
}else{
|
||||
$data = 4; //default is 4 column layout for now
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
?>
|
||||
@@ -1,77 +0,0 @@
|
||||
<?php
|
||||
/*+*******************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*********************************************************************************/
|
||||
|
||||
/**
|
||||
* @author MAK
|
||||
*/
|
||||
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $theme;
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
|
||||
require_once('include/home.php');
|
||||
require_once('Smarty_setup.php');
|
||||
require_once('include/freetag/freetag.class.php');
|
||||
|
||||
$homeObj=new Homestuff;
|
||||
|
||||
Zend_Json::$useBuiltinEncoderDecoder = true;
|
||||
$widgetInfoList = Zend_Json::decode($_REQUEST['widgetInfoList']);
|
||||
$widgetInfoList = Zend_Json::decode($_REQUEST['widgetInfoList']);
|
||||
$widgetHTML = array();
|
||||
$smarty=new vtigerCRM_Smarty;
|
||||
$smarty->assign("MOD",$mod_strings);
|
||||
$smarty->assign("APP",$app_strings);
|
||||
$smarty->assign("THEME", $theme);
|
||||
$smarty->assign("IMAGE_PATH",$image_path);
|
||||
|
||||
foreach ($widgetInfoList as $widgetInfo) {
|
||||
$widgetType = $widgetInfo['widgetType'];
|
||||
$widgetId = $widgetInfo['widgetId'];
|
||||
if($widgetType=='Tag Cloud'){
|
||||
$freetag = new freetag();
|
||||
$smarty->assign("ALL_TAG",$freetag->get_tag_cloud_html("",$current_user->id));
|
||||
$html = $smarty->fetch("Home/TagCloud.tpl");
|
||||
}elseif($widgetType == 'Notebook'){
|
||||
$contents = $homeObj->getNoteBookContents($widgetId);
|
||||
$smarty->assign("NOTEBOOK_CONTENTS",$contents);
|
||||
$smarty->assign("NOTEBOOKID", $widgetId);
|
||||
$html = $smarty->fetch("Home/notebook.tpl");
|
||||
}elseif($widgetType == 'URL'){
|
||||
$url = $homeObj->getWidgetURL($widgetId);
|
||||
if(strpos($url, "://") === false){
|
||||
$url = "http://".trim($url);
|
||||
}
|
||||
$smarty->assign("URL",$url);
|
||||
$smarty->assign("WIDGETID", $widgetId);
|
||||
$html = $smarty->fetch("Home/HomeWidgetURL.tpl");
|
||||
}else{
|
||||
$homestuff_values=$homeObj->getHomePageStuff($widgetId,$widgetType);
|
||||
$html = '';
|
||||
if($widgetType == "DashBoard"){
|
||||
$homeObj->getDashDetails($widgetId,'type');
|
||||
$dashdet=$homeObj->dashdetails;
|
||||
$smarty->assign("DASHDETAILS",$dashdet);
|
||||
}
|
||||
}
|
||||
$smarty->assign("HOME_STUFFTYPE",$widgetType);
|
||||
$smarty->assign("HOME_STUFFID",$widgetId);
|
||||
$smarty->assign("HOME_STUFF",$homestuff_values);
|
||||
$smarty->assign("THEME", $theme);
|
||||
$smarty->assign("IMAGE_PATH", $image_path);
|
||||
|
||||
$html .= $smarty->fetch("Home/HomeBlock.tpl");
|
||||
$widgetHTML[$widgetId] = $html;
|
||||
}
|
||||
echo Zend_JSON::encode($widgetHTML);
|
||||
?>
|
||||
@@ -1,706 +0,0 @@
|
||||
/*+********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*******************************************************************************/
|
||||
|
||||
/**
|
||||
* this function is used to show hide the columns in the add widget div based on the option selected
|
||||
* @param string typeName - the selected option
|
||||
*/
|
||||
function chooseType(typeName){
|
||||
$('vtbusy_info').style.display="inline";
|
||||
$('stufftype_id').value=typeName;
|
||||
|
||||
var typeLabel = typeName;
|
||||
if(alert_arr[typeName] != null && alert_arr[typeName] != "" && alert_arr[typeName] != 'undefined'){
|
||||
typeLabel = alert_arr[typeName];
|
||||
}
|
||||
$('divHeader').innerHTML="<b>"+alert_arr.LBL_ADD+typeLabel+"</b>";
|
||||
if(typeName=='Module'){
|
||||
$('moduleNameRow').style.display="block";
|
||||
$('moduleFilterRow').style.display="block";
|
||||
$('modulePrimeRow').style.display="block";
|
||||
$('showrow').style.display="block";
|
||||
$('rssRow').style.display="none";
|
||||
$('dashNameRow').style.display="none";
|
||||
$('dashTypeRow').style.display="none";
|
||||
$('StuffTitleId').style.display="block";
|
||||
//$('homeURLField').style.display = "none";
|
||||
}else if(typeName=='DashBoard'){
|
||||
$('moduleNameRow').style.display="none";
|
||||
$('moduleFilterRow').style.display="none";
|
||||
$('modulePrimeRow').style.display="none";
|
||||
$('rssRow').style.display="none";
|
||||
$('showrow').style.display="none";
|
||||
$('dashNameRow').style.display="block";
|
||||
$('dashTypeRow').style.display="block";
|
||||
$('StuffTitleId').style.display="block";
|
||||
//$('homeURLField').style.display = "none";
|
||||
new Ajax.Request(
|
||||
'index.php',
|
||||
{queue: {position: 'end', scope: 'command'},
|
||||
method: 'post',
|
||||
postBody:'module=Home&action=HomeAjax&file=HomestuffAjax&dash=dashboard',
|
||||
onComplete: function(response){
|
||||
var responseVal=response.responseText;
|
||||
$('selDashName').innerHTML=response.responseText;
|
||||
show('addWidgetsDiv');
|
||||
placeAtCenter($('addWidgetsDiv'));
|
||||
$('vtbusy_info').style.display="none";
|
||||
}
|
||||
}
|
||||
);
|
||||
}else if(typeName=='RSS'){
|
||||
$('moduleNameRow').style.display="none";
|
||||
$('moduleFilterRow').style.display="none";
|
||||
$('modulePrimeRow').style.display="none";
|
||||
$('showrow').style.display="block";
|
||||
$('rssRow').style.display="block";
|
||||
$('dashNameRow').style.display="none";
|
||||
$('dashTypeRow').style.display="none";
|
||||
$('StuffTitleId').style.display="block";
|
||||
$('vtbusy_info').style.display="none";
|
||||
//$('homeURLField').style.display = "none";
|
||||
}else if(typeName=='Default'){
|
||||
$('moduleNameRow').style.display="none";
|
||||
$('moduleFilterRow').style.display="none";
|
||||
$('modulePrimeRow').style.display="none";
|
||||
$('showrow').style.display="none";
|
||||
$('rssRow').style.display="none";
|
||||
$('dashNameRow').style.display="none";
|
||||
$('dashTypeRow').style.display="none";
|
||||
$('StuffTitleId').style.display="none";
|
||||
$('url_id').style.display = "none";
|
||||
}else if(typeName == 'Notebook'){
|
||||
$('moduleNameRow').style.display="none";
|
||||
$('moduleFilterRow').style.display="none";
|
||||
$('modulePrimeRow').style.display="none";
|
||||
$('showrow').style.display="none";
|
||||
$('rssRow').style.display="none";
|
||||
$('dashNameRow').style.display="none";
|
||||
$('dashTypeRow').style.display="none";
|
||||
$('StuffTitleId').style.display="block";
|
||||
$('vtbusy_info').style.display="none";
|
||||
//$('homeURLField').style.display = "none";
|
||||
}
|
||||
/*else if(typeName == 'URL'){
|
||||
$('moduleNameRow').style.display="none";
|
||||
$('moduleFilterRow').style.display="none";
|
||||
$('modulePrimeRow').style.display="none";
|
||||
$('showrow').style.display="none";
|
||||
$('rssRow').style.display="none";
|
||||
$('dashNameRow').style.display="none";
|
||||
$('dashTypeRow').style.display="none";
|
||||
$('StuffTitleId').style.display="block";
|
||||
$('vtbusy_info').style.display="none";
|
||||
//$('homeURLField').style.display = "block";
|
||||
}*/
|
||||
}
|
||||
|
||||
/**
|
||||
* this function is used to set the filter list when the module name is changed
|
||||
* @param string modName - the modula name for which you want the filter list
|
||||
*/
|
||||
function setFilter(modName){
|
||||
var modval=modName.value;
|
||||
document.getElementById('savebtn').disabled = true;
|
||||
if(modval!=""){
|
||||
new Ajax.Request(
|
||||
'index.php',
|
||||
{queue: {position: 'end', scope: 'command'},
|
||||
method: 'post',
|
||||
postBody:'module=Home&action=HomeAjax&file=HomestuffAjax&modname='+modval,
|
||||
onComplete: function(response){
|
||||
var responseVal=response.responseText;
|
||||
$('selModFilter_id').innerHTML=response.responseText;
|
||||
setPrimaryFld(document.getElementById('selFilterid'));
|
||||
show('addWidgetsDiv');
|
||||
placeAtCenter($('addWidgetsDiv'));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* this function is used to set the field list when the module name is changed
|
||||
* @param string modName - the modula name for which you want the field list
|
||||
*/
|
||||
function setPrimaryFld(Primeval){
|
||||
primecvid=Primeval.value;
|
||||
var fldmodule = $('selmodule_id').options[$('selmodule_id').selectedIndex].value;
|
||||
new Ajax.Request(
|
||||
'index.php',
|
||||
{queue: {position: 'end', scope: 'command'},
|
||||
method: 'post',
|
||||
postBody:'module=Home&action=HomeAjax&file=HomestuffAjax&primecvid='+primecvid+'&fieldmodname='+fldmodule,
|
||||
onComplete: function(response){
|
||||
var responseVal=response.responseText;
|
||||
$('selModPrime_id').innerHTML=response.responseText;
|
||||
$('selPrimeFldid').selectedIndex = 0;
|
||||
$('vtbusy_info').style.display="none";
|
||||
document.getElementById('savebtn').disabled = false;
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* this function displays the div for selecting the number of rows in a widget
|
||||
* @param string sid - the id of the widget for which the div is being displayed
|
||||
*/
|
||||
function showEditrow(sid){
|
||||
$('editRowmodrss_'+sid).className="show_tab";
|
||||
}
|
||||
|
||||
/**
|
||||
* this function is used to hide the div for selecting the number of rows in a widget
|
||||
* @param string editRow - the id of the div
|
||||
*/
|
||||
function cancelEntries(editRow){
|
||||
$(editRow).className="hide_tab";
|
||||
}
|
||||
|
||||
/**
|
||||
* this function is used to save the maximum entries that a widget can display
|
||||
* @param string selMaxName - the widget name
|
||||
*/
|
||||
function saveEntries(selMaxName){
|
||||
sidarr=selMaxName.split("_");
|
||||
sid=sidarr[1];
|
||||
$('refresh_'+sid).innerHTML=$('vtbusy_homeinfo').innerHTML;
|
||||
cancelEntries('editRowmodrss_'+sid)
|
||||
showmax=$(selMaxName).value;
|
||||
new Ajax.Request(
|
||||
'index.php',
|
||||
{queue: {position: 'end', scope: 'command'},
|
||||
method: 'post',
|
||||
postBody:'module=Home&action=HomeAjax&file=HomestuffAjax&showmaxval='+showmax+'&sid='+sid,
|
||||
onComplete: function(response){
|
||||
var responseVal=response.responseText;
|
||||
eval(response.responseText);
|
||||
$('refresh_'+sid).innerHTML='';
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* this function is used to save the dashboard values
|
||||
*/
|
||||
function saveEditDash(dashRowId){
|
||||
$('refresh_'+dashRowId).innerHTML=$('vtbusy_homeinfo').innerHTML;
|
||||
cancelEntries('editRowmodrss_'+dashRowId);
|
||||
var dashVal='';
|
||||
var iter=0;
|
||||
for(iter=0;iter<3;iter++){
|
||||
if($('dashradio_'+[iter]).checked)
|
||||
dashVal=$('dashradio_'+[iter]).value;
|
||||
}
|
||||
did=dashRowId;
|
||||
new Ajax.Request(
|
||||
'index.php',
|
||||
{queue: {position: 'end', scope: 'command'},
|
||||
method: 'post',
|
||||
postBody:'module=Home&action=HomeAjax&file=HomestuffAjax&dashVal='+dashVal+'&did='+did,
|
||||
onComplete: function(response){
|
||||
var responseVal=response.responseText;
|
||||
eval(response.responseText);
|
||||
$('refresh_'+did).innerHTML='';
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* this function is used to delete widgets form the home page
|
||||
* @param string sid - the stuffid of the widget
|
||||
*/
|
||||
function DelStuff(sid){
|
||||
if(confirm(alert_arr.SURE_TO_DELETE)){
|
||||
new Ajax.Request(
|
||||
'index.php',
|
||||
{queue: {position: 'end', scope: 'command'},
|
||||
method: 'post',
|
||||
postBody:'module=Home&action=HomeAjax&file=HomestuffAjax&homestuffid='+sid,
|
||||
onComplete: function(response){
|
||||
var responseVal=response.responseText;
|
||||
if(response.responseText.indexOf('SUCCESS') > -1){
|
||||
var delchild = $('stuff_'+sid);
|
||||
odeletedChild = $('MainMatrix').removeChild(delchild);
|
||||
$('seqSettings').innerHTML= '<table cellpadding="10" cellspacing="0" border="0" width="100%" class="vtResultPop small"><tr><td align="center">Widget deleted sucessfully.</td></tr></table>';
|
||||
$('seqSettings').style.display = 'block';
|
||||
$('seqSettings').style.display = 'none';
|
||||
placeAtCenter($('seqSettings'));
|
||||
Effect.Appear('seqSettings');
|
||||
setTimeout(hideSeqSettings,3000);
|
||||
}else{
|
||||
alert(alert_arr.ERROR_DELETING_TRY_AGAIN)
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* this function loads the newly added div to the home page
|
||||
* @param string stuffid - the id of the newly created div
|
||||
* @param string stufftype - the stuff type for the new div (for e.g. rss)
|
||||
*/
|
||||
function loadAddedDiv(stuffid,stufftype){
|
||||
gstuffId = stuffid;
|
||||
new Ajax.Request(
|
||||
'index.php',
|
||||
{queue: {position: 'end', scope: 'command'},
|
||||
method: 'post',
|
||||
postBody:'module=Home&action=HomeAjax&file=NewBlock&stuffid='+stuffid+'&stufftype='+stufftype,
|
||||
onComplete: function(response){
|
||||
var responseVal=response.responseText;
|
||||
$('MainMatrix').style.display= 'none';
|
||||
$('MainMatrix').innerHTML = response.responseText + $('MainMatrix').innerHTML;
|
||||
positionDivInAccord('stuff_'+gstuffId,'',stufftype);
|
||||
initHomePage();
|
||||
loadStuff(stuffid,stufftype);
|
||||
$('MainMatrix').style.display='block';
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* this function is used to reload a widgets' content based on its id and type
|
||||
* @param string stuffid - the widget id
|
||||
* @param string stufftype - the type of the widget
|
||||
*/
|
||||
function loadStuff(stuffid,stufftype){
|
||||
$('refresh_'+stuffid).innerHTML=$('vtbusy_homeinfo').innerHTML;
|
||||
new Ajax.Request(
|
||||
'index.php',
|
||||
{queue: {position: 'end', scope: 'command'},
|
||||
method: 'post',
|
||||
postBody:'module=Home&action=HomeAjax&file=HomeBlock&homestuffid='+stuffid+'&blockstufftype='+stufftype,
|
||||
onComplete: function(response){
|
||||
var responseVal=response.responseText;
|
||||
$('stuffcont_'+stuffid).innerHTML=response.responseText;
|
||||
if(stufftype=="Module"){
|
||||
if($('more_'+stuffid).value != null && $('more_'+stuffid).value != '')
|
||||
$('a_'+stuffid).href = "index.php?module="+$('more_'+stuffid).value+"&action=ListView&viewname="+$('cvid_'+stuffid).value;
|
||||
}
|
||||
if(stufftype=="Default" && typeof($('a_'+stuffid)) != 'undefined'){
|
||||
if($('more_'+stuffid).value != ''){
|
||||
$('a_'+stuffid).style.display = 'block';
|
||||
var url = "index.php?module="+$('more_'+stuffid).value+"&action=index";
|
||||
if($('search_qry_'+stuffid)!=''){
|
||||
url += $('search_qry_'+stuffid).value;
|
||||
}
|
||||
$('a_'+stuffid).href = url;
|
||||
}else{
|
||||
$('a_'+stuffid).style.display = 'none';
|
||||
}
|
||||
}
|
||||
if(stufftype=="RSS"){
|
||||
$('a_'+stuffid).href = $('more_'+stuffid).value;
|
||||
}
|
||||
if(stufftype=="DashBoard"){
|
||||
$('a_'+stuffid).href = "index.php?module=Dashboard&action=index&type="+$('more_'+stuffid).value;
|
||||
}
|
||||
$('refresh_'+stuffid).innerHTML='';
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function loadAllWidgets(widgetInfoList, batchSize){
|
||||
var batchWidgetInfoList = [];
|
||||
var widgetInfo = {};
|
||||
for(var index =0 ; index < widgetInfoList.length;++index) {
|
||||
var widgetId = widgetInfoList[index].widgetId;
|
||||
var widgetType = widgetInfoList[index].widgetType;
|
||||
widgetInfo[widgetId] = widgetType;
|
||||
$('refresh_'+widgetId).innerHTML=$('vtbusy_homeinfo').innerHTML;
|
||||
batchWidgetInfoList.push(widgetInfoList[index]);
|
||||
if((index > 0 && (index+1) % batchSize == 0) || index+1 == widgetInfoList.length) {
|
||||
new Ajax.Request(
|
||||
'index.php',{
|
||||
queue: {position: 'end', scope: 'command'},
|
||||
method: 'post',
|
||||
postBody:'module=Home&action=HomeAjax&file=HomeWidgetBlockList&widgetInfoList='
|
||||
+ JSON.stringify(batchWidgetInfoList),
|
||||
onComplete: function(response){
|
||||
var responseVal=JSON.parse(response.responseText);
|
||||
for(var widgetId in responseVal) {
|
||||
if(responseVal.hasOwnProperty(widgetId)) {
|
||||
$('stuffcont_'+widgetId).innerHTML = responseVal[widgetId];
|
||||
$('refresh_'+widgetId).innerHTML='';
|
||||
var widgetType = widgetInfo[widgetId];
|
||||
if(widgetType=="Module" && $('more_'+widgetId).value != null &&
|
||||
$('more_'+widgetId).value != '') {
|
||||
$('a_'+widgetId).href = "index.php?module="+
|
||||
$('more_'+widgetId).value+"&action=ListView&viewname="+
|
||||
$('cvid_'+widgetId).value;
|
||||
} else if(widgetType == "Default" && typeof($('a_'+widgetId)) !=
|
||||
'undefined'){
|
||||
if(typeof $('more_'+widgetId) != 'undefined' &&
|
||||
$('more_'+widgetId).value != ''){
|
||||
$('a_'+widgetId).style.display = 'block';
|
||||
var url = "index.php?module="+$('more_'+widgetId).value+
|
||||
"&action=index";
|
||||
if($('search_qry_'+widgetId)!=''){
|
||||
url += $('search_qry_'+widgetId).value;
|
||||
}
|
||||
$('a_'+widgetId).href = url;
|
||||
}else{
|
||||
$('a_'+widgetId).style.display = 'none';
|
||||
}
|
||||
} else if(widgetType=="RSS"){
|
||||
$('a_'+widgetId).href = $('more_'+widgetId).value;
|
||||
} else if(widgetType=="DashBoard"){
|
||||
$('a_'+widgetId).href = "index.php?module=Dashboard&action="+
|
||||
"index&type="+$('more_'+stuffid).value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
batchWidgetInfoList = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* this function validates the form for creating a new widget
|
||||
*/
|
||||
function frmValidate(){
|
||||
if(trim($('stufftitle_id').value)==""){
|
||||
alert(alert_arr.LBL_ENTER_WINDOW_TITLE);
|
||||
$('stufftitle_id').focus();
|
||||
return false;
|
||||
}
|
||||
if($('stufftype_id').value=="RSS"){
|
||||
if($('txtRss_id').value==""){
|
||||
alert(alert_arr.LBL_ENTER_RSS_URL);
|
||||
$('txtRss_id').focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/*if($('stufftype_id').value=="URL"){
|
||||
if($('url_id').value==""){
|
||||
alert("Please enter URL");
|
||||
$('url_id').focus();
|
||||
return false;
|
||||
}
|
||||
}*/
|
||||
if($('stufftype_id').value=="Module"){
|
||||
var selLen;
|
||||
var fieldval=new Array();
|
||||
var cnt=0;
|
||||
selVal=document.Homestuff.PrimeFld;
|
||||
for(k=0;k<selVal.options.length;k++){
|
||||
if(selVal.options[k].selected){
|
||||
fieldval[cnt]=selVal.options[k].value;
|
||||
cnt= cnt+1;
|
||||
}
|
||||
}
|
||||
if(cnt>2){
|
||||
alert(alert_arr.LBL_SELECT_ONLY_FIELDS);
|
||||
selVal.focus();
|
||||
return false;
|
||||
}else{
|
||||
document.Homestuff.fldname.value=fieldval;
|
||||
}
|
||||
}
|
||||
var stufftype=$('stufftype_id').value;
|
||||
var stufftitle=$('stufftitle_id').value;
|
||||
$('stufftitle_id').value = '';
|
||||
var selFiltername='';
|
||||
var fldname='';
|
||||
var selmodule='';
|
||||
var maxentries='';
|
||||
var txtRss='';
|
||||
var seldashbd='';
|
||||
var seldashtype='';
|
||||
var seldeftype='';
|
||||
//var txtURL = '';
|
||||
|
||||
if(stufftype=="Module"){
|
||||
selFiltername =document.Homestuff.selFiltername[document.Homestuff.selFiltername.selectedIndex].value;
|
||||
fldname = fieldval;
|
||||
selmodule =$('selmodule_id').value;
|
||||
maxentries =$('maxentryid').value;
|
||||
}else if(stufftype=="RSS"){
|
||||
txtRss=$('txtRss_id').value;
|
||||
maxentries =$('maxentryid').value;
|
||||
}/*else if(stufftype=="URL"){
|
||||
txtURL=$('url_id').value;
|
||||
}*/else if(stufftype=="DashBoard"){
|
||||
seldashbd=$('seldashbd_id').value;
|
||||
seldashtype=$('seldashtype_id').value;
|
||||
}else if(stufftype=="Default"){
|
||||
seldeftype=document.Homestuff.seldeftype[document.Homestuff.seldeftype.selectedIndex].value;
|
||||
}
|
||||
|
||||
var url="stufftype="+stufftype+"&stufftitle="+stufftitle+"&selmodule="+selmodule+"&maxentries="+maxentries+"&selFiltername="+selFiltername+"&fldname="+encodeURIComponent(fldname)+"&txtRss="+txtRss+"&seldashbd="+seldashbd+"&seldashtype="+seldashtype+"&seldeftype="+seldeftype;//+'&txtURL='+txtURL;
|
||||
var stuffarr=new Array();
|
||||
$('vtbusy_info').style.display="inline";
|
||||
|
||||
new Ajax.Request(
|
||||
'index.php',
|
||||
{queue: {position: 'end', scope: 'command'},
|
||||
method: 'post',
|
||||
postBody:'module=Home&action=HomeAjax&file=Homestuff&'+url,
|
||||
onComplete: function(response){
|
||||
var responseVal=response.responseText;
|
||||
if(!response.responseText){
|
||||
alert(alert_arr.LBL_ADD_HOME_WIDGET);
|
||||
$('vtbusy_info').style.display="none";
|
||||
$('stufftitle_id').value='';
|
||||
$('txtRss_id').value='';
|
||||
return false;
|
||||
}else{
|
||||
hide('addWidgetsDiv');
|
||||
$('vtbusy_info').style.display="none";
|
||||
$('stufftitle_id').value='';
|
||||
$('txtRss_id').value='';
|
||||
eval(response.responseText);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* this function is used to hide the default widgets
|
||||
* @param string sid - the id of the widget
|
||||
*/
|
||||
function HideDefault(sid){
|
||||
new Ajax.Request(
|
||||
'index.php',
|
||||
{queue: {position: 'end', scope: 'command'},
|
||||
method: 'post',
|
||||
postBody:'module=Home&action=HomeAjax&file=HomestuffAjax&stuffid='+sid+"&act=hide",
|
||||
onComplete: function(response){
|
||||
var responseVal=response.responseText;
|
||||
if(response.responseText.indexOf('SUCCESS') > -1){
|
||||
var delchild = $('stuff_'+sid);
|
||||
odeletedChild = $('MainMatrix').removeChild(delchild);
|
||||
$('seqSettings').innerHTML= '<table cellpadding="10" cellspacing="0" border="0" width="100%" class="vtResultPop small"><tr><td align="center">'+alert_arr.LBL_WIDGET_HIDDEN+'.'+alert_arr.LBL_RESTORE_FROM_PREFERENCES+'.</td></tr></table>';
|
||||
$('seqSettings').style.display = 'block';
|
||||
$('seqSettings').style.display = 'none';
|
||||
placeAtCenter($('seqSettings'));
|
||||
Effect.Appear('seqSettings');
|
||||
setTimeout(hideSeqSettings,3000);
|
||||
}else{
|
||||
alert(alert_arr.ERR_HIDING + '.'+ alert_arr.MSG_TRY_AGAIN + '.');
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* this function removes the widget dropdown window
|
||||
*/
|
||||
function fnRemoveWindow(){
|
||||
var tagName = document.getElementById('addWidgetDropDown').style.display= 'none';
|
||||
}
|
||||
|
||||
/**
|
||||
* this function displays the widget dropdown window
|
||||
*/
|
||||
function fnShowWindow(){
|
||||
var tagName = document.getElementById('addWidgetDropDown').style.display= 'block';
|
||||
}
|
||||
|
||||
/**
|
||||
* this function is used to postion the widgets on home on page resize
|
||||
* @param string targetDiv - the id of the target widget
|
||||
* @param string stufftitle - the title of the target widget
|
||||
* @param string stufftype - the type of the target widget
|
||||
*/
|
||||
function positionDivInAccord(targetDiv,stufftitle,stufftype){
|
||||
var layout=$('homeLayout').value;
|
||||
var widgetWidth;
|
||||
var dashWidth;
|
||||
|
||||
switch(layout){
|
||||
case '2':
|
||||
widgetWidth = 49;
|
||||
dashWidth = 98.6;
|
||||
break;
|
||||
case '3':
|
||||
widgetWidth = 31;
|
||||
dashWidth = 64;
|
||||
break;
|
||||
case '4':
|
||||
widgetWidth = 24;
|
||||
dashWidth = 48.6;
|
||||
break;
|
||||
default:
|
||||
widgetWidth = 24;
|
||||
dashWidth = 48.6;
|
||||
break;
|
||||
}
|
||||
var mainX = parseInt(document.getElementById("MainMatrix").style.width);
|
||||
if(stufftitle != vtdashboard_defaultDashbaordWidgetTitle && stufftype != "DashBoard"){
|
||||
var dx = mainX * widgetWidth/ 100;
|
||||
}else{
|
||||
var dx = mainX * dashWidth / 100;
|
||||
}
|
||||
document.getElementById(targetDiv).style.width=dx + "%";
|
||||
}
|
||||
|
||||
/**
|
||||
* this function hides the seqSettings div
|
||||
*/
|
||||
function hideSeqSettings(){
|
||||
Effect.Fade('seqSettings');
|
||||
}
|
||||
|
||||
/**
|
||||
* this function fetches the homepage dashboard
|
||||
* @param string stuffid - the id of the dashboard widget
|
||||
*/
|
||||
function fetch_homeDB(stuffid){
|
||||
$('refresh_'+stuffid).innerHTML=$('vtbusy_homeinfo').innerHTML;
|
||||
new Ajax.Request(
|
||||
'index.php',
|
||||
{queue: {position: 'end', scope: 'command'},
|
||||
method: 'post',
|
||||
postBody: 'module=Dashboard&action=DashboardAjax&file=HomepageDB',
|
||||
onComplete: function(response){
|
||||
$('stuffcont_'+stuffid).style.display = 'none';
|
||||
$('stuffcont_'+stuffid).innerHTML=response.responseText;
|
||||
$('refresh_'+stuffid).innerHTML='';
|
||||
Effect.Appear('stuffcont_'+stuffid);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* this function initializes the homepage
|
||||
*/
|
||||
initHomePage = function(){
|
||||
Sortable.create(
|
||||
"MainMatrix",
|
||||
{
|
||||
constraint:false,tag:'div',overlap:'Horizontal',handle:'headerrow',
|
||||
onUpdate:function(){
|
||||
matrixarr = Sortable.serialize('MainMatrix').split("&");
|
||||
matrixseqarr=new Array();
|
||||
seqarr=new Array();
|
||||
for(x=0;x<matrixarr.length;x++){
|
||||
matrixseqarr[x]=matrixarr[x].split("=")[1];
|
||||
}
|
||||
BlockSorting(matrixseqarr);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* this function is used to save the sorting order of elements when they are moved around on the home page
|
||||
* @param array matrixseqarr - the array containing the sequence of the widgets
|
||||
*/
|
||||
function BlockSorting(matrixseqarr){
|
||||
var sequence = matrixseqarr.join("_");
|
||||
new Ajax.Request('index.php',
|
||||
{queue: {position: 'end', scope: 'command'},
|
||||
method: 'post',
|
||||
postBody:'module=Home&action=HomeAjax&file=HomestuffAjax&matrixsequence='+sequence,
|
||||
onComplete: function(response){
|
||||
$('seqSettings').innerHTML=response.responseText;
|
||||
$('seqSettings').style.display = 'block';
|
||||
$('seqSettings').style.display = 'none';
|
||||
placeAtCenter($('seqSettings'));
|
||||
Effect.Appear('seqSettings');
|
||||
setTimeout(hideSeqSettings,3000);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* this function checks if the current browser is IE or not
|
||||
*/
|
||||
function isIE(){
|
||||
return navigator.userAgent.indexOf("MSIE") !=-1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* this function adds a notebook widget to the homepage
|
||||
*/
|
||||
function addNotebookWidget(){
|
||||
new Ajax.Request('index.php',
|
||||
{queue: {position: 'end', scope: 'command'},
|
||||
method: 'post',
|
||||
postBody:'module=Home&action=HomeAjax&file=HomestuffAjax&matrixsequence='+sequence,
|
||||
onComplete: function(response){
|
||||
$('seqSettings').innerHTML=response.responseText;
|
||||
$('seqSettings').style.display = 'block';
|
||||
$('seqSettings').style.display = 'none';
|
||||
placeAtCenter($('seqSettings'));
|
||||
Effect.Appear('seqSettings');
|
||||
setTimeout(hideSeqSettings,3000);
|
||||
}
|
||||
}
|
||||
);
|
||||
loadAddedDiv(stuffid,stufftype);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* this function takes a widget id and adds scrolling property to it
|
||||
*/
|
||||
function addScrollBar(id){
|
||||
$('stuff_'+id).style['overflowX'] = "scroll";
|
||||
$('stuff_'+id).style['overflowY'] = "scroll";
|
||||
}
|
||||
|
||||
/**
|
||||
* this function will display the node passed to it in the center of the screen
|
||||
*/
|
||||
function showOptions(id){
|
||||
var node = $(id);
|
||||
node.style.display='block';
|
||||
placeAtCenter(node);
|
||||
}
|
||||
|
||||
/**
|
||||
* this function will hide the node passed to it
|
||||
*/
|
||||
function hideOptions(id){
|
||||
Effect.Fade(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* this function will be used to save the layout option
|
||||
*/
|
||||
function saveLayout(){
|
||||
$('status').show();
|
||||
hideOptions('changeLayoutDiv');
|
||||
var sel = $('layoutSelect');
|
||||
var layout = sel.options[sel.selectedIndex].value;
|
||||
new Ajax.Request(
|
||||
'index.php',
|
||||
{queue: {position: 'end', scope: 'command'},
|
||||
method: 'post',
|
||||
postBody:'module=Home&action=HomeAjax&file=HomestuffAjax&layout='+layout,
|
||||
onComplete: function(response){
|
||||
var responseVal=response.responseText;
|
||||
window.location.href = window.location.href;
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
<?php
|
||||
/*+********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/home.php');
|
||||
require_once('modules/Rss/Rss.php');
|
||||
$oHomestuff=new Homestuff();
|
||||
if(!empty($_REQUEST['stufftype'])){
|
||||
$oHomestuff->stufftype=$_REQUEST['stufftype'];
|
||||
}
|
||||
|
||||
if(!empty($_REQUEST['stufftitle'])){
|
||||
if(strlen($_REQUEST['stufftitle'])>100){
|
||||
$temp_str = substr($_REQUEST['stufftitle'],0,97)."...";
|
||||
$oHomestuff->stufftitle= $temp_str;
|
||||
}else{
|
||||
$oHomestuff->stufftitle=$_REQUEST['stufftitle'];
|
||||
}
|
||||
// Remove HTML/PHP tags from the input
|
||||
if(isset($oHomestuff->stufftitle)) {
|
||||
$oHomestuff->stufftitle = strip_tags($oHomestuff->stufftitle);
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_REQUEST['selmodule'])){
|
||||
$oHomestuff->selmodule=$_REQUEST['selmodule'];
|
||||
}
|
||||
|
||||
if(!empty($_REQUEST['maxentries'])){
|
||||
$oHomestuff->maxentries=$_REQUEST['maxentries'];
|
||||
}
|
||||
|
||||
if(!empty($_REQUEST['selFiltername'])){
|
||||
$oHomestuff->selFiltername=$_REQUEST['selFiltername'];
|
||||
}
|
||||
|
||||
if(!empty($_REQUEST['fldname'])){
|
||||
$oHomestuff->fieldvalue=$_REQUEST['fldname'];
|
||||
}
|
||||
|
||||
if(!empty($_REQUEST['txtRss'])){
|
||||
$ooRss=new vtigerRSS();
|
||||
if($ooRss->setRSSUrl($_REQUEST['txtRss'])){
|
||||
$oHomestuff->txtRss=$_REQUEST['txtRss'];
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_REQUEST['txtURL'])){
|
||||
$oHomestuff->txtURL = $_REQUEST['txtURL'];
|
||||
}
|
||||
if(isset($_REQUEST['seldashbd']) && $_REQUEST['seldashbd']!=""){
|
||||
$oHomestuff->seldashbd=$_REQUEST['seldashbd'];
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['seldashtype']) && $_REQUEST['seldashtype']!=""){
|
||||
$oHomestuff->seldashtype=$_REQUEST['seldashtype'];
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['seldeftype']) && $_REQUEST['seldeftype']!=""){
|
||||
$seldeftype=$_REQUEST['seldeftype'];
|
||||
$defarr=explode(",",$seldeftype);
|
||||
$oHomestuff->defaultvalue=$defarr[0];
|
||||
$deftitlehash=$defarr[1];
|
||||
$oHomestuff->defaulttitle=str_replace("#"," ",$deftitlehash);
|
||||
}
|
||||
|
||||
$loaddetail=$oHomestuff->addStuff();
|
||||
echo $loaddetail;
|
||||
?>
|
||||
@@ -1,192 +0,0 @@
|
||||
<?php
|
||||
/*+********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
global $adb,$current_user, $mod_strings;
|
||||
require('user_privileges/user_privileges_'.$current_user->id.'.php');
|
||||
|
||||
$modval=trim($_REQUEST['modname']);
|
||||
$dash=trim($_REQUEST['dash']);
|
||||
if(!empty($modval)){
|
||||
$tabid = getTabId($modval);
|
||||
$ssql = "select vtiger_customview.*, vtiger_users.user_name from vtiger_customview inner join vtiger_tab on vtiger_tab.name = vtiger_customview.entitytype
|
||||
left join vtiger_users on vtiger_customview.userid = vtiger_users.id ";
|
||||
$ssql .= " where vtiger_tab.tabid=?";
|
||||
$sparams = array($tabid);
|
||||
|
||||
if($is_admin == false){
|
||||
$ssql .= " and (vtiger_customview.status=0 or vtiger_customview.userid = ? or vtiger_customview.status = 3 or vtiger_customview.userid in(select vtiger_user2role.userid from vtiger_user2role inner join vtiger_users on vtiger_users.id=vtiger_user2role.userid inner join vtiger_role on vtiger_role.roleid=vtiger_user2role.roleid where vtiger_role.parentrole like '".$current_user_parent_role_seq."::%'))";
|
||||
array_push($sparams, $current_user->id);
|
||||
}
|
||||
$result = $adb->pquery($ssql, $sparams);
|
||||
|
||||
if($adb->num_rows($result)==0){
|
||||
echo $mod_strings['MSG_NO_FILTERS'];
|
||||
die;
|
||||
}else{
|
||||
$html = '<select id=selFilterid name=selFiltername onchange=setPrimaryFld(this) class="detailedViewTextBox" onfocus="this.className=\'detailedViewTextBoxOn\'" onblur="this.className=\'detailedViewTextBox\'" style="width:60%">';
|
||||
for($i=0;$i<$adb->num_rows($result);$i++){
|
||||
if($adb->query_result($result,$i,'userid')==$current_user->id || $adb->query_result($result,$i,"viewname")=='All'){
|
||||
$html .= "<option value='".$adb->query_result($result,$i,'cvid')."'>".$adb->query_result($result,$i,"viewname")."</option>";
|
||||
}else{
|
||||
$html .= "<option value='".$adb->query_result($result,$i,'cvid')."'>".$adb->query_result($result,$i,"viewname")."[".$adb->query_result($result,$i,'user_name')."]</option>";
|
||||
}
|
||||
}
|
||||
$html .= '</select>';
|
||||
}
|
||||
echo $html;
|
||||
}
|
||||
|
||||
if(!empty($dash)){
|
||||
global $current_language;
|
||||
$dashbd_strings = return_module_language($current_language, "Dashboard");
|
||||
$graph_array = array("leadsource" => $dashbd_strings['leadsource'],
|
||||
"leadstatus" => $dashbd_strings['leadstatus'],
|
||||
"leadindustry" => $dashbd_strings['leadindustry'],
|
||||
"salesbyleadsource" => $dashbd_strings['salesbyleadsource'],
|
||||
"salesbyaccount" => $dashbd_strings['salesbyaccount'],
|
||||
"salesbyuser" => $dashbd_strings['salesbyuser'],
|
||||
"salesbyteam" => $dashbd_strings['salesbyteam'],
|
||||
"accountindustry" => $dashbd_strings['accountindustry'],
|
||||
"productcategory" => $dashbd_strings['productcategory'],
|
||||
"productbyqtyinstock" => $dashbd_strings['productbyqtyinstock'],
|
||||
"productbypo" => $dashbd_strings['productbypo'],
|
||||
"productbyquotes" => $dashbd_strings['productbyquotes'],
|
||||
"productbyinvoice" => $dashbd_strings['productbyinvoice'],
|
||||
"sobyaccounts" => $dashbd_strings['sobyaccounts'],
|
||||
"sobystatus" => $dashbd_strings['sobystatus'],
|
||||
"pobystatus" => $dashbd_strings['pobystatus'],
|
||||
"quotesbyaccounts" => $dashbd_strings['quotesbyaccounts'],
|
||||
"quotesbystage" => $dashbd_strings['quotesbystage'],
|
||||
"invoicebyacnts" => $dashbd_strings['invoicebyacnts'],
|
||||
"invoicebystatus" => $dashbd_strings['invoicebystatus'],
|
||||
"ticketsbystatus" => $dashbd_strings['ticketsbystatus'],
|
||||
"ticketsbypriority" => $dashbd_strings['ticketsbypriority'],
|
||||
"ticketsbycategory" => $dashbd_strings['ticketsbycategory'],
|
||||
"ticketsbyuser" => $dashbd_strings['ticketsbyuser'],
|
||||
"ticketsbyteam" => $dashbd_strings['ticketsbyteam'],
|
||||
"ticketsbyproduct"=> $dashbd_strings['ticketsbyproduct'],
|
||||
"contactbycampaign"=> $dashbd_strings['contactbycampaign'],
|
||||
"ticketsbyaccount"=> $dashbd_strings['ticketsbyaccount'],
|
||||
"ticketsbycontact"=> $dashbd_strings['ticketsbycontact'],);
|
||||
|
||||
$html='<select name=seldashbd id=seldashbd_id class="detailedViewTextBox" onfocus="this.className=\'detailedViewTextBoxOn\'" onblur="this.className=\'detailedViewTextBox\'" style="width:60%">';
|
||||
foreach($graph_array as $key=>$value){
|
||||
$html .='<option value="'.$key.'">'.$value.'</option>';
|
||||
}
|
||||
$html .= '</select>';
|
||||
echo $html;
|
||||
}
|
||||
|
||||
if(!empty($_REQUEST['primecvid'])){
|
||||
$cvid=$_REQUEST['primecvid'];
|
||||
$fieldmodule = vtlib_purify($_REQUEST['fieldmodname']);
|
||||
$queryprime="select cvid,columnname from vtiger_cvcolumnlist where columnname not like '%::%' and cvid=?";
|
||||
$result=$adb->pquery($queryprime,array($cvid));
|
||||
global $current_language,$app_strings;
|
||||
$fieldmod_strings = return_module_language($current_language, $fieldmodule);
|
||||
if($adb->num_rows($result)==0){
|
||||
echo $mod_strings['MSG_NO_FIELDS'];
|
||||
die;
|
||||
}else{
|
||||
$html = '<select id=selPrimeFldid name=PrimeFld multiple class="detailedViewTextBox" onfocus="this.className=\'detailedViewTextBoxOn\'" onblur="this.className=\'detailedViewTextBox\'" style="width:60%">';
|
||||
for($i=0;$i<$adb->num_rows($result);$i++){
|
||||
$columnname=$adb->query_result($result,$i,"columnname");
|
||||
if($columnname != ''){
|
||||
$prifldarr=explode(":",$columnname);
|
||||
$fieldname = $prifldarr[2];
|
||||
$priarr=explode("_",$prifldarr[3],2); //getting field label
|
||||
$prifld = str_replace("_"," ",$priarr[1]);
|
||||
if($is_admin == false){
|
||||
$fld_permission = getFieldVisibilityPermission($fieldmodule,$current_user->id,$fieldname);
|
||||
}
|
||||
if($fld_permission == 0){
|
||||
$field_query = $adb->pquery("SELECT fieldlabel FROM vtiger_field WHERE fieldname = ? AND tablename = ? and vtiger_field.presence in (0,2)", array($fieldname,$prifldarr[0]));
|
||||
$field_label = $adb->query_result($field_query,0,'fieldlabel');
|
||||
if(trim($field_label) != '')
|
||||
$html .= "<option value='".$columnname."'>".getTranslatedString($field_label, $fieldmodule)."</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
$html .= '</select>';
|
||||
}
|
||||
echo $html;
|
||||
}
|
||||
|
||||
if(!empty($_REQUEST['showmaxval']) && !empty($_REQUEST['sid'])){
|
||||
$sid=$_REQUEST['sid'];
|
||||
$maxval=$_REQUEST['showmaxval'];
|
||||
global $adb;
|
||||
$query="select stufftype from vtiger_homestuff where stuffid=?";
|
||||
$res=$adb->pquery($query, array($sid));
|
||||
$stufftypename=$adb->query_result($res,0,"stufftype");
|
||||
if($stufftypename=="Module"){
|
||||
$qry="update vtiger_homemodule set maxentries=? where stuffid=?";
|
||||
$result=$adb->pquery($qry, array($maxval, $sid));
|
||||
}else if($stufftypename=="RSS"){
|
||||
$qry="update vtiger_homerss set maxentries=? where stuffid=?";
|
||||
$result=$adb->pquery($qry, array($maxval, $sid));
|
||||
}else if($stufftypename=="Default"){
|
||||
$qry="update vtiger_homedefault set maxentries=? where stuffid=?";
|
||||
$result=$adb->pquery($qry, array($maxval, $sid));
|
||||
}
|
||||
echo "loadStuff(".$sid.",'".$stufftypename."')";
|
||||
}
|
||||
|
||||
if(!empty($_REQUEST['dashVal'])){
|
||||
$did=$_REQUEST['did'];
|
||||
global $adb;
|
||||
$qry="update vtiger_homedashbd set dashbdtype=? where stuffid=?";
|
||||
$res=$adb->pquery($qry, array($_REQUEST['dashVal'], $did));
|
||||
echo "loadStuff(".$did.",'DashBoard')";
|
||||
}
|
||||
|
||||
if(!empty($_REQUEST['homestuffid'])){
|
||||
$sid=$_REQUEST['homestuffid'];
|
||||
global $adb;
|
||||
$query="delete from vtiger_homestuff where stuffid=?";
|
||||
$result=$adb->pquery($query, array($sid));
|
||||
echo "SUCCESS";
|
||||
}
|
||||
|
||||
//Sequencing of blocks starts
|
||||
if(!empty($_REQUEST['matrixsequence'])){
|
||||
global $adb;
|
||||
$sequence = explode('_',$_REQUEST['matrixsequence']);
|
||||
for($i=count($sequence)-1, $seq=0;$i>=0;$i--, $seq++){
|
||||
$query = 'update vtiger_homestuff set stuffsequence=? where stuffid=?';
|
||||
$result = $adb->pquery($query, array($seq, $sequence[$i]));
|
||||
}
|
||||
echo "<table cellpadding='10' cellspacing='0' border='0' width='100%' class='vtResultPop small'><tr><td align='center'>Layout Saved</td></tr></table>";
|
||||
}
|
||||
//Sequencing of blocks ends
|
||||
|
||||
if(isset($_REQUEST['act']) && $_REQUEST['act'] =="hide"){
|
||||
$stuffid=$_REQUEST['stuffid'];
|
||||
global $adb,$current_user;
|
||||
$qry="update vtiger_homestuff set visible=1 where stuffid=?";
|
||||
$res=$adb->pquery($qry, array($stuffid));
|
||||
echo "SUCCESS";
|
||||
}
|
||||
|
||||
//saving layout here
|
||||
if(!empty($_REQUEST['layout'])){
|
||||
global $adb, $current_user;
|
||||
|
||||
$sql = "delete from vtiger_home_layout where userid=?";
|
||||
$result = $adb->pquery($sql, array($current_user->id));
|
||||
|
||||
$sql = "insert into vtiger_home_layout values (?, ?)";
|
||||
$result = $adb->pquery($sql, array($current_user->id, $_REQUEST['layout']));
|
||||
if(!$result){
|
||||
echo "SUCCESS";
|
||||
}
|
||||
}
|
||||
//layout save ends here
|
||||
?>
|
||||
@@ -1,46 +0,0 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
|
||||
* ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
* $Header: /advent/projects/wesat/vtiger_crm/sugarcrm/modules/Home/LastViewed.php,v 1.1 2004/08/17 15:05:06 gjayakrishnan Exp $
|
||||
* Description: TODO: To be written.
|
||||
********************************************************************************/
|
||||
|
||||
require_once("data/Tracker.php");
|
||||
|
||||
global $theme;
|
||||
global $current_user;
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
|
||||
// Create the head of the vtiger_table.
|
||||
?>
|
||||
<table cellpadding="2" cellspacing="0" border="0">
|
||||
<tbody>
|
||||
<?php
|
||||
$current_row=1;
|
||||
$tracker = new Tracker();
|
||||
$history = $tracker->get_recently_viewed($current_user->id);
|
||||
|
||||
foreach($history as $row)
|
||||
{
|
||||
echo <<< EOQ
|
||||
<tr>
|
||||
<td vAlign="top"><IMG width="20" alt="{$row['module_name']}" src="$image_path{$row['module_name']}.gif" border="0"></td>
|
||||
<td noWrap><A title="[Alt+$current_row]" accessKey="$current_row" href="index.php?module=$row[module_name]&action=DetailView&record=$row[item_id]">$row[item_summary]</A></td>
|
||||
</tr>
|
||||
EOQ;
|
||||
}
|
||||
?>
|
||||
</tbody></table>
|
||||
@@ -1,30 +0,0 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
********************************************************************************/
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $theme;
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
require_once('include/home.php');
|
||||
require_once('Smarty_setup.php');
|
||||
|
||||
$homeObj=new Homestuff();
|
||||
$smarty=new vtigerCRM_Smarty;
|
||||
$smarty->assign("MOD",$mod_strings);
|
||||
$smarty->assign("APP",$app_strings);
|
||||
$smarty->assign("THEME", $theme);
|
||||
$smarty->assign("IMAGE_PATH",$image_path);
|
||||
|
||||
//$smarty->assign("HOME_STUFF",$homestuff_values);
|
||||
$smarty->assign("IMAGE_PATH", $image_path);
|
||||
$smarty->display("Home/MainHomeBlock.tpl");
|
||||
|
||||
?>
|
||||
@@ -1,44 +0,0 @@
|
||||
<?php
|
||||
/*+********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
* $Header: /var/cvs/vtigercrm_aegon/modules/Home/NewBlock.php,v 1.2 2007/03/01 17:47:16 jerrydgeorge Exp $
|
||||
* Description: Main file for the Home module.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $theme;
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
|
||||
require_once('include/home.php');
|
||||
require_once('Smarty_setup.php');
|
||||
|
||||
$stuffid = $_REQUEST[stuffid];
|
||||
$stufftype = $_REQUEST[stufftype];
|
||||
|
||||
$homeObj=new Homestuff();
|
||||
$smarty=new vtigerCRM_Smarty;
|
||||
|
||||
$smarty->assign("MOD",$mod_strings);
|
||||
$smarty->assign("APP",$app_strings);
|
||||
$smarty->assign("THEME", $theme);
|
||||
$smarty->assign("IMAGE_PATH",$image_path);
|
||||
$homeselectedframe = $homeObj->getSelectedStuff($stuffid,$stufftype);
|
||||
|
||||
$smarty->assign("tablestuff",$homeselectedframe);
|
||||
$smarty->assign("IMAGE_PATH", $image_path);
|
||||
$smarty->display("Home/MainHomeBlock.tpl");
|
||||
|
||||
?>
|
||||
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
/*+********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
/**
|
||||
* Created on 10-Oct-08
|
||||
* this file saves the notebook contents to database
|
||||
*/
|
||||
echo SaveNotebookContents();
|
||||
|
||||
function SaveNotebookContents(){
|
||||
if(empty($_REQUEST['notebookid'])){
|
||||
return false;
|
||||
}else{
|
||||
$notebookid = $_REQUEST['notebookid'];
|
||||
}
|
||||
|
||||
global $adb,$current_user;
|
||||
|
||||
$contents = $_REQUEST['contents'];
|
||||
|
||||
$sql = "update vtiger_notebook_contents set contents=? where userid=? and notebookid=?";
|
||||
$adb->pquery($sql, array($contents, $current_user->id, $notebookid));
|
||||
return true;
|
||||
}
|
||||
?>
|
||||
@@ -1,316 +0,0 @@
|
||||
<?php
|
||||
/*+********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
*********************************************************************************/
|
||||
|
||||
require_once('include/logging.php');
|
||||
require_once('modules/CustomView/CustomView.php');
|
||||
require_once('include/utils/utils.php');
|
||||
require_once('Smarty_setup.php');
|
||||
global $mod_strings, $current_language;
|
||||
|
||||
require_once('modules/Home/language/'.$current_language.'.lang.php');
|
||||
|
||||
$total_record_count = 0;
|
||||
|
||||
$query_string = trim($_REQUEST['query_string']);
|
||||
$curModule = vtlib_purify($_REQUEST['module']);
|
||||
|
||||
if(isset($query_string) && $query_string != ''){
|
||||
// Was the search limited by user for specific modules?
|
||||
$search_onlyin = $_REQUEST['search_onlyin'];
|
||||
if(!empty($search_onlyin) && $search_onlyin != '--USESELECTED--') {
|
||||
$search_onlyin = explode(',', $search_onlyin);
|
||||
} else if($search_onlyin == '--USESELECTED--') {
|
||||
$search_onlyin = $_SESSION['__UnifiedSearch_SelectedModules__'];
|
||||
} else {
|
||||
$search_onlyin = array();
|
||||
}
|
||||
// Save the selection for futur use (UnifiedSearchModules.php)
|
||||
$_SESSION['__UnifiedSearch_SelectedModules__'] = $search_onlyin;
|
||||
// END
|
||||
|
||||
$object_array = getSearchModules($search_onlyin);
|
||||
|
||||
global $adb;
|
||||
global $current_user;
|
||||
global $theme;
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
|
||||
$search_val = $query_string;
|
||||
$search_module = $_REQUEST['search_module'];
|
||||
|
||||
if($curModule=='Home') {
|
||||
getSearchModulesComboList($search_module);
|
||||
}
|
||||
$i = 0;
|
||||
$moduleRecordCount = array();
|
||||
foreach($object_array as $module => $object_name){
|
||||
if ($curModule == 'Home' || ($curModule == $module && !empty($_REQUEST['ajax']))) {
|
||||
$focus = CRMEntity::getInstance($module);
|
||||
if(isPermitted($module,"index") == "yes"){
|
||||
$smarty = new vtigerCRM_Smarty;
|
||||
|
||||
require_once("modules/$module/language/".$current_language.".lang.php");
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
|
||||
$smarty->assign("MOD", $mod_strings);
|
||||
$smarty->assign("APP", $app_strings);
|
||||
$smarty->assign("THEME", $theme);
|
||||
$smarty->assign("IMAGE_PATH",$image_path);
|
||||
$smarty->assign("MODULE",$module);
|
||||
$smarty->assign("SEARCH_MODULE",vtlib_purify($_REQUEST['search_module']));
|
||||
$smarty->assign("SINGLE_MOD",$module);
|
||||
$smarty->assign("SEARCH_STRING",vtlib_purify($search_val));
|
||||
|
||||
$listquery = getListQuery($module);
|
||||
$oCustomView = '';
|
||||
|
||||
$oCustomView = new CustomView($module);
|
||||
//Instead of getting current customview id, use cvid of All so that all entities will be found
|
||||
//$viewid = $oCustomView->getViewId($module);
|
||||
$cv_res = $adb->pquery("select cvid from vtiger_customview where viewname='All' and entitytype=?", array($module));
|
||||
$viewid = $adb->query_result($cv_res,0,'cvid');
|
||||
$customviewcombo_html = $oCustomView->getCustomViewCombo($viewid);
|
||||
|
||||
$listquery = $oCustomView->getModifiedCvListQuery($viewid,$listquery,$module);
|
||||
if ($module == "Calendar"){
|
||||
if (!isset($oCustomView->list_fields['Close'])){
|
||||
$oCustomView->list_fields['Close']=array ( 'activity' => 'status' );
|
||||
}
|
||||
if (!isset($oCustomView->list_fields_name['Close'])){
|
||||
$oCustomView->list_fields_name['Close']='status';
|
||||
}
|
||||
}
|
||||
|
||||
if($search_module != ''){//This is for Tag search
|
||||
$where = getTagWhere($search_val,$current_user->id);
|
||||
$search_msg = $app_strings['LBL_TAG_SEARCH'];
|
||||
$search_msg .= "<b>".to_html($search_val)."</b>";
|
||||
}else{ //This is for Global search
|
||||
$where = getUnifiedWhere($listquery,$module,$search_val);
|
||||
$search_msg = $app_strings['LBL_SEARCH_RESULTS_FOR'];
|
||||
$search_msg .= "<b>".to_html($search_val)."</b>";
|
||||
}
|
||||
|
||||
if($where != ''){
|
||||
$listquery .= ' and ('.$where.')';
|
||||
}
|
||||
|
||||
if(!(isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '')) {
|
||||
$count_result = $adb->query($listquery);
|
||||
$noofrows = $adb->num_rows($count_result);
|
||||
} else {
|
||||
$noofrows = vtlib_purify($_REQUEST['recordCount']);
|
||||
}
|
||||
$moduleRecordCount[$module]['count'] = $noofrows;
|
||||
|
||||
global $list_max_entries_per_page;
|
||||
if(!empty($_REQUEST['start'])){
|
||||
$start = $_REQUEST['start'];
|
||||
if($start == 'last'){
|
||||
$count_result = $adb->query( mkCountQuery($listquery));
|
||||
$noofrows = $adb->query_result($count_result,0,"count");
|
||||
if($noofrows > 0){
|
||||
$start = ceil($noofrows/$list_max_entries_per_page);
|
||||
}
|
||||
}
|
||||
if(!is_numeric($start)){
|
||||
$start = 1;
|
||||
} elseif($start < 0){
|
||||
$start = 1;
|
||||
}
|
||||
$start = ceil($start);
|
||||
}else{
|
||||
$start = 1;
|
||||
}
|
||||
|
||||
$navigation_array = VT_getSimpleNavigationValues($start, $list_max_entries_per_page, $noofrows);
|
||||
$limitStartRecord = ($navigation_array['start'] - 1) * $list_max_entries_per_page;
|
||||
|
||||
if( $adb->dbType == "pgsql"){
|
||||
$listquery = $listquery. " OFFSET $limitStartRecord LIMIT $list_max_entries_per_page";
|
||||
}else{
|
||||
$listquery = $listquery. " LIMIT $limitStartRecord, $list_max_entries_per_page";
|
||||
}
|
||||
$list_result = $adb->query($listquery);
|
||||
|
||||
$moduleRecordCount[$module]['recordListRangeMessage'] = getRecordRangeMessage($list_result, $limitStartRecord);
|
||||
|
||||
$info_message='&recordcount='.$_REQUEST['recordcount'].'&noofrows='.$_REQUEST['noofrows'].'&message='.$_REQUEST['message'].'&skipped_record_count='.$_REQUEST['skipped_record_count'];
|
||||
$url_string = '&modulename='.$_REQUEST['modulename'].'&nav_module='.$module_name.$info_message;
|
||||
$viewid = '';
|
||||
|
||||
$navigationOutput = getTableHeaderSimpleNavigation($navigation_array, $url_string,$module,"UnifiedSearch",$viewid);
|
||||
$listview_header = getListViewHeader($focus,$module,"","","","global",$oCustomView);
|
||||
$listview_entries = getListViewEntries($focus,$module,$list_result,$navigation_array,"","","","",$oCustomView);
|
||||
|
||||
//Do not display the Header if there are no entires in listview_entries
|
||||
if(count($listview_entries) > 0){
|
||||
$display_header = 1;
|
||||
}else{
|
||||
$display_header = 0;
|
||||
}
|
||||
$smarty->assign("NAVIGATION", $navigationOutput);
|
||||
$smarty->assign("LISTHEADER", $listview_header);
|
||||
$smarty->assign("LISTENTITY", $listview_entries);
|
||||
$smarty->assign("DISPLAYHEADER", $display_header);
|
||||
$smarty->assign("HEADERCOUNT", count($listview_header));
|
||||
$smarty->assign("ModuleRecordCount", $moduleRecordCount);
|
||||
|
||||
$total_record_count = $total_record_count + $noofrows;
|
||||
|
||||
$smarty->assign("SEARCH_CRITERIA","( $noofrows )".$search_msg);
|
||||
$smarty->assign("MODULES_LIST", $object_array);
|
||||
$smarty->assign("CUSTOMVIEW_OPTION",$customviewcombo_html);
|
||||
|
||||
if(($i != 0 && empty($_REQUEST['ajax'])) || !(empty($_REQUEST['ajax'])))
|
||||
$smarty->display("UnifiedSearchAjax.tpl");
|
||||
else
|
||||
$smarty->display('UnifiedSearchDisplay.tpl');
|
||||
unset($_SESSION['lvs'][$module]);
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
//Added to display the Total record count
|
||||
if(empty($_REQUEST['ajax'])) {
|
||||
?>
|
||||
<script>
|
||||
document.getElementById("global_search_total_count").innerHTML = " <?php echo $app_strings['LBL_TOTAL_RECORDS_FOUND'] ?><b><?php echo $total_record_count; ?></b>";
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else {
|
||||
echo "<br><br> <em>".$mod_strings['ERR_ONE_CHAR']."</em>";
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to get the Tags where condition
|
||||
* @param string $search_val -- entered search string value
|
||||
* @param string $current_user_id -- current user id
|
||||
* @return string $where -- where condition with the list of crmids, will like vtiger_crmentity.crmid in (1,3,4,etc.,)
|
||||
*/
|
||||
function getTagWhere($search_val,$current_user_id){
|
||||
require_once('include/freetag/freetag.class.php');
|
||||
|
||||
$freetag_obj = new freetag();
|
||||
$crmid_array = $freetag_obj->get_objects_with_tag_all($search_val,$current_user_id);
|
||||
|
||||
$where = " vtiger_crmentity.crmid IN (";
|
||||
if(count($crmid_array) > 0){
|
||||
foreach($crmid_array as $index => $crmid){
|
||||
$where .= $crmid.',';
|
||||
}
|
||||
$where = trim($where,',').')';
|
||||
}
|
||||
//If there are no records has the search tag we need to add the condition like crmid is none. If dont add condition at all search will return all the values.
|
||||
// Fix for #5571
|
||||
else {
|
||||
$where .= '0)';
|
||||
}
|
||||
return $where;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function to get the the List of Searchable Modules as a combo list which will be displayed in right corner under the Header
|
||||
* @param string $search_module -- search module, this module result will be shown defaultly
|
||||
*/
|
||||
function getSearchModulesComboList($search_module){
|
||||
global $object_array;
|
||||
global $app_strings;
|
||||
global $mod_strings;
|
||||
|
||||
?>
|
||||
<script>
|
||||
function displayModuleList(selectmodule_view){
|
||||
<?php
|
||||
foreach($object_array as $module => $object_name){
|
||||
if(isPermitted($module,"index") == "yes"){
|
||||
?>
|
||||
mod = "global_list_"+"<?php echo $module; ?>";
|
||||
if(selectmodule_view.options[selectmodule_view.options.selectedIndex].value == "All")
|
||||
show(mod);
|
||||
else
|
||||
hide(mod);
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
if(selectmodule_view.options[selectmodule_view.options.selectedIndex].value != "All"){
|
||||
selectedmodule="global_list_"+selectmodule_view.options[selectmodule_view.options.selectedIndex].value;
|
||||
show(selectedmodule);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<table border=0 cellspacing=0 cellpadding=0 width=98% align=center>
|
||||
<tr>
|
||||
<td colspan="3" id="global_search_total_count" style="padding-left:30px"> </td>
|
||||
<td nowrap align="right"><?php echo $app_strings['LBL_SHOW_RESULTS'] ?>
|
||||
<select id="global_search_module" name="global_search_module" onChange="displayModuleList(this);" class="small">
|
||||
<option value="All"><?php echo $app_strings['COMBO_ALL'] ?></option>
|
||||
<?php
|
||||
foreach($object_array as $module => $object_name){
|
||||
$selected = '';
|
||||
if($search_module != '' && $module == $search_module){
|
||||
$selected = 'selected';
|
||||
}
|
||||
if($search_module == '' && $module == 'All'){
|
||||
$selected = 'selected';
|
||||
}
|
||||
?>
|
||||
<?php if(isPermitted($module,"index") == "yes"){
|
||||
?>
|
||||
<!-- vtlib customization: Use translation if available -->
|
||||
<?php $modulelabel = $module; if($app_strings[$module]) { $modulelabel = $app_strings[$module]; } ?>
|
||||
<option value="<?php echo $module; ?>" <?php echo $selected; ?> ><?php echo $modulelabel; ?></option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* To get the modules allowed for global search this function returns all the
|
||||
* modules which supports global search as an array in the following structure
|
||||
* array($module_name1=>$object_name1,$module_name2=>$object_name2,$module_name3=>$object_name3,$module_name4=>$object_name4,-----);
|
||||
*/
|
||||
function getSearchModules($filter = array()){
|
||||
global $adb;
|
||||
// vtlib customization: Ignore disabled modules.
|
||||
//$sql = 'select distinct vtiger_field.tabid,name from vtiger_field inner join vtiger_tab on vtiger_tab.tabid=vtiger_field.tabid where vtiger_tab.tabid not in (16,29)';
|
||||
$sql = 'select distinct vtiger_field.tabid,name from vtiger_field inner join vtiger_tab on vtiger_tab.tabid=vtiger_field.tabid where vtiger_tab.tabid not in (16,29) and vtiger_tab.presence != 1 and vtiger_field.presence in (0,2)';
|
||||
// END
|
||||
$result = $adb->pquery($sql, array());
|
||||
while($module_result = $adb->fetch_array($result)){
|
||||
$modulename = $module_result['name'];
|
||||
// Do we need to filter the module selection?
|
||||
if(!empty($filter) && is_array($filter) && !in_array($modulename, $filter)) {
|
||||
continue;
|
||||
}
|
||||
// END
|
||||
if($modulename != 'Calendar'){
|
||||
$return_arr[$modulename] = $modulename;
|
||||
}else{
|
||||
$return_arr[$modulename] = 'Activity';
|
||||
}
|
||||
}
|
||||
return $return_arr;
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,43 +0,0 @@
|
||||
<?php
|
||||
/*+**********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
************************************************************************************/
|
||||
|
||||
global $app_strings, $mod_strings, $current_language, $currentModule, $current_user, $theme, $adb;
|
||||
|
||||
$selected_modules = array();
|
||||
if(!empty($_SESSION['__UnifiedSearch_SelectedModules__']) && is_array($_SESSION['__UnifiedSearch_SelectedModules__'])) {
|
||||
$selected_modules = $_SESSION['__UnifiedSearch_SelectedModules__'];
|
||||
}
|
||||
|
||||
$allowed_modules = array();
|
||||
$sql = 'select distinct vtiger_field.tabid,name from vtiger_field inner join vtiger_tab on vtiger_tab.tabid=vtiger_field.tabid where vtiger_tab.tabid not in (16,29) and vtiger_tab.presence != 1 and vtiger_field.presence in (0,2)';
|
||||
$moduleres = $adb->query($sql);
|
||||
while($modulerow = $adb->fetch_array($moduleres)) {
|
||||
if(is_admin($current_user) || isPermitted($modulerow['name'], 'DetailView') == 'yes') {
|
||||
$modulename = $modulerow['name'];
|
||||
$allowed_modules[$modulename] = array(
|
||||
'label' => getTranslatedString($modulename, $modulename),
|
||||
'selected' => in_array($modulename, $selected_modules)
|
||||
);
|
||||
}
|
||||
}
|
||||
ksort($allowed_modules);
|
||||
|
||||
require_once('Smarty_setup.php');
|
||||
|
||||
$smarty = new vtigerCRM_Smarty();
|
||||
$smarty->assign('MOD', $mod_strings);
|
||||
$smarty->assign('APP', $app_strings);
|
||||
$smarty->assign('THEME', $theme);
|
||||
$smarty->assign('IMAGE_PATH', "themes/$theme/images/");
|
||||
$smarty->assign('ALLOWED_MODULES', $allowed_modules);
|
||||
|
||||
$smarty->display('UnifiedSearchModules.tpl');
|
||||
|
||||
?>
|
||||
@@ -1,232 +0,0 @@
|
||||
/*
|
||||
Copyright 2005 Rolando Gonzalez (rolosworld@gmail.com)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
table.chat // don't set width or height
|
||||
thead.chat
|
||||
tfoot.chat
|
||||
tbody.chat
|
||||
tr.chathea
|
||||
tr.chatfoot
|
||||
tr.chatbody
|
||||
td.chathead
|
||||
td.chathead1
|
||||
td.chathead2
|
||||
td.chatfoot
|
||||
td.chatfoot1
|
||||
td.chatfoot2
|
||||
td.chatbody
|
||||
td.chatbody1 // don't set width or height
|
||||
td.chatbody2
|
||||
|
||||
td.chatbox // don't set width or height or overflow
|
||||
td.chaticon
|
||||
td.chattopic
|
||||
td.chathide
|
||||
td.chatclose
|
||||
|
||||
div.cumsg
|
||||
div.csmsg
|
||||
span.cunick
|
||||
*/
|
||||
*{
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
table.chat,table.pchat{
|
||||
empty-cells:show;
|
||||
}
|
||||
table.chat{
|
||||
position:absolute;
|
||||
}
|
||||
thead.chat{
|
||||
cursor:move;
|
||||
}
|
||||
td.chathead,td.chathead2,td.pchathead,td.pchathead2{
|
||||
width:5px;
|
||||
height:38px;
|
||||
padding:0px 5px 0px 0px;
|
||||
}
|
||||
td.chathead1,td.pchathead1{
|
||||
background-image:url(imgs/box_T.gif);
|
||||
width:100%;
|
||||
}
|
||||
td.chathead,td.pchathead{
|
||||
background-image:url(imgs/box_TL.gif);
|
||||
}
|
||||
td.chathead2,td.pchathead2{
|
||||
background-image:url(imgs/box_TR.gif);
|
||||
}
|
||||
|
||||
td.chaticon{
|
||||
background-image:url(imgs/2tbarPrivateChat.gif);
|
||||
}
|
||||
td.chattopic{
|
||||
background-image:url(imgs/2tbarPublicChat.gif);
|
||||
background-repeat:no-repeat;
|
||||
background-position:center left;
|
||||
padding:0px 10px 0px 30px;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
td.chattopic1{
|
||||
padding:0px 10px 0px 5px;
|
||||
width:100%;
|
||||
text-align:left;
|
||||
}
|
||||
span.chatTopicNick{ font-weight:900; }
|
||||
td.chathide,td.chatclose{
|
||||
cursor:pointer;
|
||||
}
|
||||
td.chathide{
|
||||
background-image:url(imgs/btn_hide.gif);
|
||||
}
|
||||
td.chatclose{
|
||||
background-image:url(imgs/btn_close.gif);
|
||||
}
|
||||
td.chaticon,td.chathide,td.chatclose{
|
||||
height:36px;
|
||||
width:36px;
|
||||
padding:31px 31px 5px 0px;
|
||||
background-repeat:no-repeat;
|
||||
background-position:center center;
|
||||
}
|
||||
|
||||
td.chatbody,td.chatbody2,td.pchatbody,td.pchatbody2{
|
||||
width:5px;
|
||||
padding:0px 5px 0px 0px;
|
||||
}
|
||||
td.chatbody,td.pchatbody{
|
||||
background-image:url(imgs/box_ML.gif);
|
||||
}
|
||||
td.chatbody1,td.pchatbody1{
|
||||
background-image:url(imgs/box_M.gif);
|
||||
padding:5px 5px 5px 5px;
|
||||
vertical-align:top;
|
||||
}
|
||||
td.chatbody2,td.pchatbody2{
|
||||
background-image:url(imgs/box_MR.gif);
|
||||
}
|
||||
|
||||
td.chatfoot,td.chatfoot2,td.pchatfoot,td.pchatfoot2{
|
||||
width:5px;
|
||||
height:60px;
|
||||
padding:60px 5px 0px 0px;
|
||||
}
|
||||
td.chatfoot1,td.pchatfoot1{
|
||||
background-image:url(imgs/bx_B.gif);
|
||||
}
|
||||
td.chatfoot,td.pchatfoot{
|
||||
background-image:url(imgs/box_BL.gif);
|
||||
}
|
||||
td.chatfoot2,td.pchatfoot2{
|
||||
background-image:url(imgs/box_BR.gif);
|
||||
}
|
||||
|
||||
|
||||
|
||||
div.chatbox{
|
||||
background-color: #FFFFFF;
|
||||
border: 1px solid #938F86;
|
||||
color:#000000;
|
||||
vertical-align:top;
|
||||
}
|
||||
|
||||
/* UList */
|
||||
span.cunick{
|
||||
color:green;
|
||||
}
|
||||
div.cumsg,div.csmsg{
|
||||
color:#0000ff;
|
||||
margin:2px 2px 4px 2px;
|
||||
}
|
||||
div.csmsg{
|
||||
color:#FF0000;
|
||||
}
|
||||
|
||||
a.chat{
|
||||
background-image:url(themes/images/user_icon.gif);
|
||||
background-position:center left;
|
||||
background-repeat:no-repeat;
|
||||
color:#000000;
|
||||
text-decoration:none;
|
||||
display:block;
|
||||
width:100px;
|
||||
height:20px;
|
||||
background-color:#FFFFFF;
|
||||
padding:10px 5px 5px 30px;
|
||||
vertical-align:middle;
|
||||
}
|
||||
a.chat:hover{
|
||||
background-color:#DFD9CD;
|
||||
}
|
||||
|
||||
span{
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
}
|
||||
|
||||
/* input */
|
||||
form.cinput{
|
||||
display:inline;
|
||||
}
|
||||
input.cinput{
|
||||
background-color: #FFFFFF;
|
||||
border: 1px solid #938F86;
|
||||
width: 100%;
|
||||
height:20px;
|
||||
font-size:12px;
|
||||
padding:2px 2px 2px 2px;
|
||||
font-weight:bold;
|
||||
color:#333333;
|
||||
}
|
||||
table.cinput{
|
||||
width:100%;
|
||||
}
|
||||
tr.cinput{
|
||||
|
||||
}
|
||||
td.cinput{
|
||||
width:100%;
|
||||
}
|
||||
td.ckeyb{
|
||||
width:32px;
|
||||
height:29px;
|
||||
padding:29px 32px 5px 5px;
|
||||
background-repeat:no-repeat;
|
||||
background-position:center center;
|
||||
}
|
||||
td.csubmit{
|
||||
cursor:pointer;
|
||||
background-image:url(imgs/btn_send.gif);
|
||||
width:63px;
|
||||
height:32px;
|
||||
padding:32px 63px 5px 5px;
|
||||
background-repeat:no-repeat;
|
||||
background-position:center center;
|
||||
}
|
||||
|
||||
|
||||
span.sysb{font-weight:900;}
|
||||
.chatuserlist{
|
||||
font-size:14px;
|
||||
text-align:left;
|
||||
color:white;
|
||||
background-color:#898475;
|
||||
}
|
||||
@@ -1,380 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
Copyright 2005 Rolando Gonzalez (rolosworld@gmail.com)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/**** config *****/
|
||||
|
||||
/**
|
||||
* MySQL server configuration
|
||||
*/
|
||||
include_once('config.php');
|
||||
require_once('include/utils/utils.php');
|
||||
|
||||
$db = array();
|
||||
|
||||
$db['host'] = $dbconfig['db_server']."".$dbconfig['db_port'];
|
||||
$db['user'] = $dbconfig['db_username'];
|
||||
$db['pass'] = $dbconfig['db_password'];
|
||||
$db['database'] = $dbconfig['db_name'];
|
||||
|
||||
/**
|
||||
* Constants for the chat
|
||||
*/
|
||||
$chat_conf = array();
|
||||
$chat_conf['alive_time'] = "30"; // time users should report to be online, in seconds.
|
||||
$chat_conf['msg_limit'] = "10"; // maximum msg's to send in one request.
|
||||
|
||||
/*************************************************************/
|
||||
/*** YOU SHOULD NOT NEED TO EDIT ANYTHING ELSE BELOW THIS. ***/
|
||||
/*************************************************************/
|
||||
|
||||
session_name("AjaxPopupChat");
|
||||
//session_save_path("sessions");
|
||||
session_start();
|
||||
|
||||
$dbh = mysql_connect($db['host'], $db['user'],$db['pass']) or die ('I cannot connect to the database');
|
||||
|
||||
mysql_select_db($db['database']);
|
||||
|
||||
function mysqlQuery($query)
|
||||
{
|
||||
$result = mysql_query($query);
|
||||
if(!$result)
|
||||
{
|
||||
die("DB Error.<br />\n".mysql_error()."<br />\n".$query);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**** handler *****/
|
||||
/**
|
||||
* Chat object
|
||||
*/
|
||||
class Chat
|
||||
{
|
||||
// stores the string to be returned
|
||||
var $json;
|
||||
|
||||
function Chat()
|
||||
{
|
||||
global $adb;
|
||||
$this->json = '';
|
||||
|
||||
// las message id received by user
|
||||
if(!isset($_SESSION["mlid"]))
|
||||
{
|
||||
$res = $adb->pquery("show table status like 'vtiger_chat_msg'", array());
|
||||
$line = $adb->fetch_array($res);
|
||||
if(intval($line['Auto_increment']) == 0)
|
||||
$_SESSION["mlid"] = 0;
|
||||
else
|
||||
$_SESSION["mlid"] = intval($line['Auto_increment']) - 1;
|
||||
}
|
||||
|
||||
// when the las user list was sended.
|
||||
if(!isset($_SESSION["lul"]))
|
||||
{
|
||||
$_SESSION["lul"] = 0;
|
||||
}
|
||||
|
||||
// check if user is active.
|
||||
if(!isset($_SESSION['chat_user']))
|
||||
{
|
||||
$this->setUserNick();
|
||||
}
|
||||
else
|
||||
{
|
||||
$res = $adb->pquery("update vtiger_chat_users set ping=now() where session=?", array(session_id()));
|
||||
if($adb->getAffectedRowCount($res) == 0)
|
||||
{
|
||||
$this->setUserNick();
|
||||
}
|
||||
}
|
||||
|
||||
switch($_POST['submode'])
|
||||
{
|
||||
// request all the json data at once.
|
||||
case 'get_all':
|
||||
global $chat_conf;
|
||||
$this->lastMsgId();
|
||||
|
||||
$this->json = '[%s]';
|
||||
$this->getAllPVChat();
|
||||
$pvchat = $this->json;
|
||||
|
||||
$this->json = '[%s]';
|
||||
$this->getPubChat();
|
||||
$pchat = $this->json;
|
||||
|
||||
$this->json = '';
|
||||
if(time() - $_SESSION["lul"] > $chat_conf['alive_time'])
|
||||
{
|
||||
$_SESSION["lul"] = time();
|
||||
$this->json = '[%s]';
|
||||
$this->getUserList();
|
||||
}
|
||||
$ulist = $this->json;
|
||||
|
||||
$tmp = array();
|
||||
$this->json = '{%s}';
|
||||
if(strlen($ulist) > 0)
|
||||
$tmp[] = '"ulist":'.$ulist;
|
||||
|
||||
if(strlen($pvchat) > 0)
|
||||
$tmp[] = '"pvchat":'.$pvchat;
|
||||
|
||||
if(strlen($pchat) > 0)
|
||||
$tmp[] = '"pchat":'.$pchat;
|
||||
|
||||
$this->json = sprintf($this->json, implode(',',$tmp));
|
||||
break;
|
||||
|
||||
// user is submiting a msg
|
||||
case 'submit':
|
||||
$this->submit($_POST['msg'],intval($_POST['to']));
|
||||
break;
|
||||
|
||||
// user closed a private chat
|
||||
case 'pvclose':
|
||||
$this->pvClose(intval($_POST['to']));
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the JSON created
|
||||
*/
|
||||
function getAJAX()
|
||||
{
|
||||
return $this->json;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the user initial nickname.
|
||||
*/
|
||||
function setUserNick()
|
||||
{
|
||||
global $current_user, $adb;
|
||||
$res = $adb->pquery("select id from vtiger_chat_users where session=?", array(session_id()));
|
||||
if($adb->num_rows($res) > 0)
|
||||
{
|
||||
$line = $adb->fetch_array($res);
|
||||
$_SESSION['chat_user'] = $line['id'];
|
||||
return;
|
||||
}
|
||||
|
||||
$res = $adb->pquery("show table status like 'vtiger_chat_users'", array());
|
||||
$line = $adb->fetch_array($res);
|
||||
if(intval($line['Auto_increment']) == 0)
|
||||
$line['Auto_increment'] = 1;
|
||||
|
||||
$_SESSION['chat_user'] = $line['Auto_increment'];
|
||||
|
||||
|
||||
$sql = "insert into vtiger_chat_users(nick,session,ping,ip) values (?,?, now(), ?)";
|
||||
$params = array($current_user->user_name, session_id(), $_SERVER['REMOTE_ADDR']);
|
||||
$res = $adb->pquery($sql, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* generate the available users list
|
||||
*/
|
||||
function getUserList()
|
||||
{
|
||||
global $chat_conf, $adb;
|
||||
$tmp = '';
|
||||
$sql = "delete from vtiger_chat_users where ((unix_timestamp(now())-unix_timestamp(ping))>?)";
|
||||
$params = array($chat_conf['alive_time']);
|
||||
$res = $adb->pquery($sql, $params);
|
||||
|
||||
$res = $adb->pquery("select id,nick from vtiger_chat_users", array());
|
||||
if($adb->num_rows($res)==0)
|
||||
{
|
||||
$this->json = '';
|
||||
return;
|
||||
}
|
||||
|
||||
while($line = $adb->fetch_array($res))
|
||||
{
|
||||
if($line['id'] != $_SESSION['chat_user'])
|
||||
$tmp .= '{"uid":'.$line['id'].',"nick":"'.$line['nick'].'"},';
|
||||
}
|
||||
$tmp = trim($tmp,',');
|
||||
$this->json = sprintf($this->json,$tmp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets user last post received.
|
||||
*/
|
||||
function lastMsgId()
|
||||
{
|
||||
if(isset($_POST['mlid']) && intval($_POST['mlid']) > $_SESSION["mlid"])
|
||||
$_SESSION["mlid"] = intval($_POST['mlid']);
|
||||
}
|
||||
|
||||
/**
|
||||
* generates the private chat data
|
||||
*/
|
||||
function getAllPVChat()
|
||||
{
|
||||
global $chat_conf, $adb;
|
||||
$format = '{"mlid":%s,"chat":%s,"from":"%s","msg":"%s"},';
|
||||
$sql ="select ms.id mid,ms.chat_from mfrom,ms.chat_to mto,pv.id id,us.nick `chat_from`,ms.msg msg from vtiger_chat_users us,vtiger_chat_pvchat pv,vtiger_chat_msg ms where pv.msg=ms.id and us.id=ms.chat_from and ms.id>? and ((ms.chat_from=? and ms.chat_to>0) or (ms.chat_to=? and ms.chat_from>0)) order by ms.born limit 0, " . $chat_conf['msg_limit'];
|
||||
$params = array($_SESSION['mlid'], $_SESSION['chat_user'], $_SESSION['chat_user']);
|
||||
$res = $adb->pquery($sql, $params);
|
||||
|
||||
if($adb->num_rows($res)==0)
|
||||
{
|
||||
$this->json = '';
|
||||
return;
|
||||
}
|
||||
|
||||
$tmp = '';
|
||||
while($line = $adb->fetch_array($res))
|
||||
{
|
||||
if($line['mfrom'] == $_SESSION['chat_user'])
|
||||
$cid = $line['mto'];
|
||||
else
|
||||
$cid = $line['mfrom'];
|
||||
|
||||
$tmp .= sprintf($format,$line['mid'],$cid,$line['chat_from'],addslashes($line['msg']));
|
||||
}
|
||||
$tmp = trim($tmp,',');
|
||||
$this->json = sprintf($this->json,$tmp);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* generates the public chat data
|
||||
* NOTE: this is alpha
|
||||
*/
|
||||
function getPubChat()
|
||||
{
|
||||
global $chat_conf, $adb;
|
||||
$format = '{"mlid":%s,"from":"%s","msg":"%s"},';
|
||||
$sql = "select ms.id mid,ms.chat_from mfrom,ms.chat_to mto,p.id id,us.nick `chat_from`,ms.msg msg from vtiger_chat_users us,vtiger_chat_pchat p,vtiger_chat_msg ms where p.msg=ms.id and us.id=ms.chat_from and ms.id>? and ms.chat_to=0 order by ms.born limit 0," . $chat_conf['msg_limit'];
|
||||
$params = array($_SESSION['mlid']);
|
||||
$res = $adb->pquery($sql, $params);
|
||||
|
||||
if($adb->num_rows($res)==0)
|
||||
{
|
||||
$this->json = '';
|
||||
return;
|
||||
}
|
||||
|
||||
$tmp = '';
|
||||
while($line = $adb->fetch_array($res))
|
||||
{
|
||||
$tmp .= sprintf($format,$line['mid'],$line['chat_from'],addslashes($line['msg']));
|
||||
}
|
||||
$tmp = trim($tmp,',');
|
||||
$this->json = sprintf($this->json,$tmp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for special commands on message.
|
||||
*/
|
||||
function msgParse($msg)
|
||||
{
|
||||
global $adb;
|
||||
if(strlen($msg) == 0) return '';
|
||||
$msg = stripslashes($msg);
|
||||
|
||||
if($msg[0] == '\\')
|
||||
{
|
||||
$today_date = getdate();
|
||||
|
||||
$words = explode(" ",$msg);
|
||||
switch($words[0])
|
||||
{
|
||||
case '\nick':
|
||||
if(isset($words[1]) && strlen($words[1]) > 3)
|
||||
{
|
||||
$res = $adb->pquery("select nick from vtiger_chat_users where id=?", array($_SESSION['chat_user']));
|
||||
$line = $adb->fetch_array($res);
|
||||
$res = $adb->pquery("update vtiger_chat_users set nick=? where id=?", array($words[1], $_SESSION['chat_user']));
|
||||
$msg = '\sys <span class="sysb">'.$line['nick'].'</span> changed nick to <span class="sysb">'.$words[1].'</span>';
|
||||
}
|
||||
break;
|
||||
|
||||
case '\help':
|
||||
$msg = '\sys <br><span class="sysb">\\\\nick "nickname" </span> - change nick<br><span class="sysb">\\\\date </span> - date<br><span class="sysb">\\\\time </span> - time<br><span class="sysb">\\\\month </span> - month<br><span class="sysb">\\\\day </span> - weekday';
|
||||
break;
|
||||
case '\date':
|
||||
$msg = '\sys Today is <span class="sysb">'.date('d-m-Y').'</span>';
|
||||
break;
|
||||
case '\time':
|
||||
$msg = '\sys The Current time is <span class="sysb">'.$today_date["hours"].':'.$today_date["minutes"].':'.$today_date["hours"].'</span>'; break;
|
||||
case '\month':
|
||||
$msg = '\sys <span class="sysb">'.$today_date["month"].'</span>';
|
||||
break;
|
||||
case '\day':
|
||||
$msg = '\sys <span class="sysb">'.$today_date["weekday"].'</span>';
|
||||
break;
|
||||
default:
|
||||
|
||||
$msg = '\sys Bad command: '.$words[0];
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $msg;
|
||||
}
|
||||
|
||||
/**
|
||||
* process a submited msg
|
||||
*/
|
||||
function submit($msg, $to=0)
|
||||
{
|
||||
global $adb;
|
||||
//UTF-8 support added - ding
|
||||
$msg = utf8RawUrlDecode($msg);
|
||||
$msg = $this->msgParse($msg);
|
||||
$msg = htmlentities($msg);
|
||||
if(strlen($msg) == 0) return;
|
||||
|
||||
//$sql = "insert into vtiger_chat_msg set chat_from=?, chat_to=?, born=now(), msg=?";
|
||||
$sql = "insert into vtiger_chat_msg(chat_from, chat_to, born, msg) values (?,?, now(), ?)";
|
||||
$params = array($_SESSION['chat_user'], $to, $msg);
|
||||
$res = $adb->pquery($sql, $params);
|
||||
|
||||
$chat = "p";
|
||||
if($to != 0)
|
||||
$chat .= "v";
|
||||
|
||||
$res = $adb->pquery("insert into vtiger_chat_".$chat."chat set msg=LAST_INSERT_ID()", array());
|
||||
}
|
||||
|
||||
/**
|
||||
* removes the private conversation msg's because someone closed it
|
||||
*/
|
||||
function pvClose($to)
|
||||
{
|
||||
global $adb;
|
||||
$sql = "delete from vtiger_chat_msg where (`chat_from`=? and `chat_to`=?) or (`chat_from`=? and `chat_to`=?)";
|
||||
$params = array($to, $_SESSION['chat_user'], $_SESSION['chat_user'], $to);
|
||||
$res = $adb->pquery($sql, $params);
|
||||
}
|
||||
}
|
||||
|
||||
/**** caller ****/
|
||||
$chat = new Chat();
|
||||
echo $chat->getAJAX();
|
||||
?>
|
||||
@@ -1,128 +0,0 @@
|
||||
<?php
|
||||
/*+********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*******************************************************************************/
|
||||
|
||||
require_once('config.php');
|
||||
require_once('include/utils/utils.php');
|
||||
global $current_user;
|
||||
global $adb;
|
||||
$db = PearDatabase::getInstance();
|
||||
if (!empty($HTTP_SERVER_VARS['SERVER_SOFTWARE']) && strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Apache/2')){
|
||||
header ('Cache-Control: no-cache, pre-check=0, post-check=0, max-age=0');
|
||||
}else{
|
||||
header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
|
||||
}
|
||||
|
||||
header ('Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');
|
||||
header ('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
header('Content-Type: text/xml');
|
||||
|
||||
echo ("<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n");
|
||||
echo (" <rss version=\"2.0\">\n");
|
||||
echo (" <channel>\n");
|
||||
echo (" <title>vtigerCRM Tickets</title>\n");
|
||||
echo (" <link>".$site_URL."/index.php?module=Home&action=home_rss</link>\n");
|
||||
echo (" <description>test</description>\n");
|
||||
echo (" <managingEditor></managingEditor>\n");
|
||||
echo (" <webMaster>".$current_user->user_name."</webMaster>\n");
|
||||
echo (" <lastBuildDate>" . gmdate('D, d M Y H:i:s', time()) . " GMT</lastBuildDate>\n");
|
||||
echo (" <generator>vtigerCRM</generator>\n");
|
||||
|
||||
//retrieving notifications******************************
|
||||
//<<<<<<<<<<<<<<<< start of owner notify>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
$query = "select vtiger_crmentity.setype,vtiger_crmentity.crmid,vtiger_crmentity.smcreatorid,vtiger_crmentity.modifiedtime from vtiger_crmentity inner join vtiger_ownernotify on vtiger_crmentity.crmid=vtiger_ownernotify.crmid";
|
||||
|
||||
$result = $adb->pquery($query, array());
|
||||
for($i=0;$i<$adb->num_rows($result);$i++){
|
||||
$mod_notify[$i] = $adb->fetch_array($result);
|
||||
if($mod_notify[$i]['setype']=='Accounts'){
|
||||
$tempquery='select vtiger_accountname from vtiger_account where vtiger_accountid=?';
|
||||
$tempresult=$adb->pquery($tempquery, array($mod_notify[$i]['crmid']));
|
||||
$account_name=$adb->fetch_array($tempresult);
|
||||
$notify_values[$i]=$account_name['accountname'];
|
||||
}else if($mod_notify[$i]['setype']=='Potentials'){
|
||||
$tempquery='select vtiger_potentialname from vtiger_potential where vtiger_potentialid=?';
|
||||
$tempresult=$adb->pquery($tempquery, array($mod_notify[$i]['crmid']));
|
||||
$potential_name=$adb->fetch_array($tempresult);
|
||||
$notify_values[$i]=$potential_name['potentialname'];
|
||||
}else if($mod_notify[$i]['setype']=='Contacts'){
|
||||
$tempquery='select lastname from vtiger_contactdetails where contactid=?';
|
||||
$tempresult=$adb->pquery($tempquery, array($mod_notify[$i]['crmid']));
|
||||
$contact_name=$adb->fetch_array($tempresult);
|
||||
$notify_values[$i]=$contact_name['lastname'];
|
||||
}else if($mod_notify[$i]['setype']=='Leads'){
|
||||
$tempquery='select lastname from vtiger_leaddetails where leadid=?';
|
||||
$tempresult=$adb->pquery($tempquery, array($mod_notify[$i]['crmid']));
|
||||
$lead_name=$adb->fetch_array($tempresult);
|
||||
$notify_values[$i]=$lead_name['lastname'];
|
||||
}else if($mod_notify[$i]['setype']=='SalesOrder'){
|
||||
$tempquery='select subject from vtiger_salesorder where vtiger_salesorderid=?';
|
||||
$tempresult=$adb->pquery($tempquery, array($mod_notify[$i]['crmid']));
|
||||
$sales_subject=$adb->fetch_array($tempresult);
|
||||
$notify_values[$i]=$sales_subject['subject'];
|
||||
}else if($mod_notify[$i]['setype']=='Orders'){
|
||||
$tempquery='select subject from vtiger_purchaseorder where vtiger_purchaseorderid=?';
|
||||
$tempresult=$adb->pquery($tempquery, array($mod_notify[$i]['crmid']));
|
||||
$purchase_subject=$adb->fetch_array($tempresult);
|
||||
$notify_values[$i]=$purchase_subject['subject'];
|
||||
}else if($mod_notify[$i]['setype']=='Products'){
|
||||
$tempquery='select productname from vtiger_products where productid=?';
|
||||
$tempresult=$adb->pquery($tempquery, array($mod_notify[$i]['crmid']));
|
||||
$product_name=$adb->fetch_array($tempresult);
|
||||
$notify_values[$i]=$product_name['productname'];
|
||||
}else if($mod_notify[$i]['setype']=='Emails'){
|
||||
$tempquery='select subject from vtiger_activity where vtiger_activityid=?';
|
||||
$tempresult=$adb->pquery($tempquery, array($mod_notify[$i]['crmid']));
|
||||
$email_subject=$adb->fetch_array($tempresult);
|
||||
$notify_values[$i]=$email_subject['subject'];
|
||||
}else if($mod_notify[$i]['setype']=='HelpDesk'){
|
||||
$tempquery='select title from vtiger_troubletickets where ticketid=?';
|
||||
$tempresult=$adb->pquery($tempquery, array($mod_notify[$i]['crmid']));
|
||||
$HelpDesk_title=$adb->fetch_array($tempresult);
|
||||
$notify_values[$i]=$HelpDesk_title['title'];
|
||||
}else if($mod_notify[$i]['setype']=='Calendar'){
|
||||
$tempquery='select subject from vtiger_activity where vtiger_activityid=?';
|
||||
$tempresult=$adb->pquery($tempquery, array($mod_notify[$i]['crmid']));
|
||||
$Activity_subject=$adb->fetch_array($tempresult);
|
||||
$notify_values[$i]=$Activity_subject['subject'];
|
||||
}else if($mod_notify[$i]['setype']=='Quotes'){
|
||||
$tempquery='select subject from vtiger_quotes where quoteid=?';
|
||||
$tempresult=$adb->pquery($tempquery, array($mod_notify[$i]['crmid']));
|
||||
$quote_subject=$adb->fetch_array($tempresult);
|
||||
$notify_values[$i]=$quote_subject['subject'];
|
||||
}else if($mod_notify[$i]['setype']=='Invoice'){
|
||||
$tempquery='select subject from vtiger_invoice where vtiger_invoiceid=?';
|
||||
$tempresult=$adb->pquery($tempquery, array($mod_notify[$i]['crmid']));
|
||||
$invoice_subject=$adb->fetch_array($tempresult);
|
||||
$notify_values[$i]=$invoice_subject['subject'];
|
||||
}
|
||||
//<<<<<<<<<<<<<<<< end of owner notify>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
|
||||
|
||||
// Variable reassignment and reformatting for author
|
||||
$author_id = $db->query_result($result,$i,'smcreatorid');
|
||||
$entry_author = getUserName($author_id);
|
||||
$entry_author = htmlspecialchars ($entry_author);
|
||||
|
||||
$entry_link = $site_URL."/index.php?modules=".$mod_notify[$i]['setype']."&action=DetailView&record=".$mod_notify[$i]['crmid'];
|
||||
$entry_link = htmlspecialchars($entry_link);
|
||||
$entry_time = $db->query_result($result,$i,'modifiedtime');
|
||||
|
||||
echo (" <item>\n");
|
||||
echo (" <title>".$mod_notify[$i]['setype']."</title>\n");
|
||||
echo (" <link>".$entry_link."</link>\n");
|
||||
echo (" <description>".$notify_values[$i]."</description>\n");
|
||||
echo (" <author>".$entry_author."</author>\n");
|
||||
echo (" <pubDate>".$entry_time."</pubDate>\n");
|
||||
echo (" </item>\n");
|
||||
}
|
||||
echo (" </channel>\n");
|
||||
echo (" </rss>\n");
|
||||
?>
|
||||
@@ -1,106 +0,0 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
|
||||
* ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
* $Header: /advent/projects/wesat/vtiger_crm/sugarcrm/modules/Home/index.php,v 1.28 2005/04/20 06:57:47 samk Exp $
|
||||
* Description: Main file for the Home module.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
require_once('include/home.php');
|
||||
require_once('Smarty_setup.php');
|
||||
require_once('modules/Home/HomeBlock.php');
|
||||
require_once('include/database/PearDatabase.php');
|
||||
require_once('include/utils/UserInfoUtil.php');
|
||||
require_once('include/utils/CommonUtils.php');
|
||||
require_once('include/freetag/freetag.class.php');
|
||||
require_once 'modules/Home/HomeUtils.php';
|
||||
|
||||
global $app_strings, $app_list_strings, $mod_strings;
|
||||
global $adb, $current_user;
|
||||
global $theme;
|
||||
global $current_language;
|
||||
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
|
||||
$smarty = new vtigerCRM_Smarty;
|
||||
$homeObj=new Homestuff;
|
||||
|
||||
// Performance Optimization
|
||||
$tabrows = vtlib_prefetchModuleActiveInfo();
|
||||
// END
|
||||
|
||||
//$query="select name,tabid from vtiger_tab where tabid in (select distinct(tabid) from vtiger_field where tabid <> 29 and tabid <> 16 and tabid <>10) order by name";
|
||||
|
||||
// Performance Optimization: Re-written to ignore extension and inactive modules
|
||||
$modulenamearr = Array();
|
||||
foreach($tabrows as $resultrow) {
|
||||
if($resultrow['isentitytype'] != '0') {
|
||||
// Eliminate: Events, Emails
|
||||
if($resultrow['tabid'] == '16' || $resultrow['tabid'] == '10' || $resultrow['name'] == 'Webmails') {
|
||||
continue;
|
||||
}
|
||||
$modName=$resultrow['name'];
|
||||
if(isPermitted($modName,'DetailView') == 'yes' && vtlib_isModuleActive($modName)){
|
||||
$modulenamearr[$modName]=array($resultrow['tabid'],$modName);
|
||||
}
|
||||
}
|
||||
}
|
||||
ksort($modulenamearr); // We avoided ORDER BY in Query (vtlib_prefetchModuleActiveInfo)!
|
||||
// END
|
||||
|
||||
|
||||
//Security Check done for RSS and Dashboards
|
||||
$allow_rss='no';
|
||||
$allow_dashbd='no';
|
||||
if(isPermitted('Rss','DetailView') == 'yes' && vtlib_isModuleActive('Rss')){
|
||||
$allow_rss='yes';
|
||||
}
|
||||
if(isPermitted('Dashboard','DetailView') == 'yes' && vtlib_isModuleActive('Dashboard')){
|
||||
$allow_dashbd='yes';
|
||||
}
|
||||
|
||||
$homedetails = $homeObj->getHomePageFrame();
|
||||
$maxdiv = sizeof($homedetails)-1;
|
||||
$user_name = $current_user->column_fields['user_name'];
|
||||
$buttoncheck['Calendar'] = isPermitted('Calendar','index');
|
||||
$freetag = new freetag();
|
||||
$numberofcols = getNumberOfColumns();
|
||||
|
||||
$smarty->assign("CHECK",$buttoncheck);
|
||||
if(vtlib_isModuleActive('Calendar')){
|
||||
$smarty->assign("CALENDAR_ACTIVE","yes");
|
||||
}
|
||||
$smarty->assign("IMAGE_PATH",$image_path);
|
||||
$smarty->assign("MODULE",'Home');
|
||||
$smarty->assign("CATEGORY",getParenttab('Home'));
|
||||
$smarty->assign("CURRENTUSER",$user_name);
|
||||
$smarty->assign("ALL_TAG",$freetag->get_tag_cloud_html("",$current_user->id));
|
||||
$smarty->assign("MAXLEN",$maxdiv);
|
||||
$smarty->assign("ALLOW_RSS",$allow_rss);
|
||||
$smarty->assign("ALLOW_DASH",$allow_dashbd);
|
||||
$smarty->assign("HOMEFRAME",$homedetails);
|
||||
$smarty->assign("MODULE_NAME",$modulenamearr);
|
||||
$smarty->assign("MOD",$mod_strings);
|
||||
$smarty->assign("APP",$app_strings);
|
||||
$smarty->assign("THEME", $theme);
|
||||
$smarty->assign("LAYOUT", $numberofcols);
|
||||
$widgetBlockSize = PerformancePrefs::getBoolean('HOME_PAGE_WIDGET_GROUP_SIZE', 12);
|
||||
$smarty->assign('widgetBlockSize', $widgetBlockSize);
|
||||
|
||||
$smarty->display("Home/Homestuff.tpl");
|
||||
|
||||
?>
|
||||
@@ -1,92 +0,0 @@
|
||||
/*
|
||||
Copyright 2005 Rolando Gonzalez (rolosworld@gmail.com)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
function getRequester()
|
||||
{
|
||||
try
|
||||
{
|
||||
if(window.XMLHttpRequest)
|
||||
{
|
||||
return new XMLHttpRequest();
|
||||
}
|
||||
else if(window.ActiveXObject)
|
||||
{
|
||||
return new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
alert("You need a browser which supports an XMLHttpRequest Object.\nMozilla build 0.9.5 has this Object and IE5 and above.");
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
onreadystatechange Event handler for an event that fires at every state change
|
||||
readyState Object status integer:
|
||||
0 = uninitialized
|
||||
1 = loading
|
||||
2 = loaded
|
||||
3 = interactive
|
||||
4 = complete
|
||||
responseText String version of data returned from server process
|
||||
responseXML DOM-compatible document object of data returned from server process
|
||||
status Numeric code returned by server, such as 404 for "Not Found" or 200 for "OK"
|
||||
statusText String message accompanying the status code
|
||||
*/
|
||||
function Ajax(cb)
|
||||
{
|
||||
var me = this;
|
||||
this.requester = getRequester();
|
||||
|
||||
if(cb)
|
||||
this.callback = cb;
|
||||
else
|
||||
this.callback = function(req)
|
||||
{
|
||||
return eval(req.responseText);
|
||||
};
|
||||
|
||||
this.requester.onreadystatechange = function(){
|
||||
switch(me.requester.readyState)
|
||||
{
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
break;
|
||||
case 4:
|
||||
var response = me.callback(me.requester);
|
||||
break;
|
||||
default:
|
||||
alert("Error");
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
this.state = function()
|
||||
{
|
||||
return me.requester.readyState;
|
||||
};
|
||||
|
||||
this.process = function(url, parameters){
|
||||
me.requester.open("POST", url, true);
|
||||
me.requester.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
||||
me.requester.setRequestHeader("Content-length", parameters.length);
|
||||
//me.requester.setRequestHeader("Connection", "close");
|
||||
me.requester.send(parameters);
|
||||
};
|
||||
};
|
||||
@@ -1,476 +0,0 @@
|
||||
/*
|
||||
Copyright 2005 Rolando Gonzalez (rolosworld@gmail.com)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
var chats = new Array(); // private chats opened
|
||||
var users = new Array(); // users list
|
||||
var chat_data = null;
|
||||
var mlid = 0; //msg last id
|
||||
var DEBUG = false;
|
||||
var PRIVATES = true;
|
||||
var PUBLIC = true;
|
||||
|
||||
function getNick(uid)
|
||||
{
|
||||
for(var i in users)
|
||||
{
|
||||
if(users[i].uid == uid)
|
||||
return users[i].nick;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
function resetChatsZ()
|
||||
{
|
||||
for(var i = 0; i < chats.length; i++)
|
||||
if(chats[i])
|
||||
chats[i].win.table.style.zIndex = chats[i].win.z;
|
||||
};
|
||||
|
||||
function debug(dib,msg)
|
||||
{
|
||||
if(!DEBUG) return;
|
||||
if(document.getElementById(dib))
|
||||
document.getElementById(dib).innerHTML = msg;
|
||||
else
|
||||
alert(msg);
|
||||
};
|
||||
|
||||
// initialize chat connection.
|
||||
function Chat(conf)
|
||||
{
|
||||
var me = this;
|
||||
this.pcid = conf["pchatid"]?conf["pchatid"]:null;
|
||||
this.dt = conf["dt"]?conf["dt"]:1000;
|
||||
this.ulid = conf["ulid"]?conf["ulid"]:null;
|
||||
this.w = conf["width"]?conf["width"]:"400px";
|
||||
this.h = conf["height"]?conf["height"]:"300px";
|
||||
this.ulist = null;
|
||||
|
||||
if(this.pcid)
|
||||
{
|
||||
chats[0] = new PubChat(this.dt,this.w,this.h);
|
||||
document.getElementById(this.pcid).appendChild(chats[0].get());
|
||||
}
|
||||
|
||||
// evaluate the returned json
|
||||
this.callback = function(response)
|
||||
{
|
||||
me.ajax = null;
|
||||
try{
|
||||
me.doRefresh(response.responseText);
|
||||
}catch(e){
|
||||
debug("debug","Chat Error: "+response.responseText);
|
||||
clearInterval(me.interv);
|
||||
debug("debug",e.toString());
|
||||
debug("debug",e.filename+":"+e.lineNumber);
|
||||
return;
|
||||
}
|
||||
me.ajax = new Ajax(me.callback);
|
||||
debug("debug",response.responseText);
|
||||
window.status=Date();
|
||||
};
|
||||
|
||||
this.doRefresh = function(response)
|
||||
{
|
||||
if(!me.ulist)
|
||||
me.ulist = new UList(me.dt,me.ulid,me.w,me.h);
|
||||
chat_data = eval("("+response+")");
|
||||
me.ulist.refresh();
|
||||
me.refreshChats();
|
||||
};
|
||||
|
||||
this.ajax = new Ajax(me.callback);
|
||||
|
||||
// start the ajax request for the chat data
|
||||
this.refresh = function()
|
||||
{
|
||||
if(me.ajax.state() == 0)
|
||||
me.ajax.process("index.php?mode=chat&module=Home&action=chat","submode=get_all&mlid="+mlid);
|
||||
};
|
||||
this.interv = setInterval(me.refresh,me.dt);
|
||||
|
||||
this.refreshChats = function()
|
||||
{
|
||||
if(chat_data.pvchat)
|
||||
{
|
||||
cnum = 0;
|
||||
for(var i in chat_data.pvchat)
|
||||
{
|
||||
cnum = chat_data.pvchat[i].chat;
|
||||
if(!chats[cnum])
|
||||
chats[cnum] = new PrivChat(me.dt,cnum,me.w,me.h);
|
||||
|
||||
if(mlid < chat_data.pvchat[i].mlid)
|
||||
mlid = chat_data.pvchat[i].mlid;
|
||||
|
||||
if(chat_data.pvchat[i].msg.substr(0,5) == "\\sys ")
|
||||
{
|
||||
chats[cnum].appendSysMsg(chat_data.pvchat[i].msg.substr(5));
|
||||
}
|
||||
else
|
||||
chats[cnum].appendMsg(chat_data.pvchat[i].from,chat_data.pvchat[i].msg);
|
||||
}
|
||||
chat_data.pvchat = null;
|
||||
}
|
||||
|
||||
if(PUBLIC && chat_data.pchat)
|
||||
{
|
||||
for(var i in chat_data.pchat)
|
||||
{
|
||||
if(mlid < chat_data.pchat[i].mlid)
|
||||
mlid = chat_data.pchat[i].mlid;
|
||||
|
||||
if(!chats[0])
|
||||
continue;
|
||||
|
||||
if(chat_data.pchat[i].msg.substr(0,5) == "\\sys ")
|
||||
{
|
||||
chats[0].appendSysMsg(chat_data.pchat[i].msg.substr(5));
|
||||
}
|
||||
else
|
||||
chats[0].appendMsg(chat_data.pchat[i].from,chat_data.pchat[i].msg);
|
||||
}
|
||||
chat_data.pchat = null;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
// User list handler
|
||||
function UList(dt,ulid,w,h)
|
||||
{
|
||||
var me = this;
|
||||
this.w = w;
|
||||
this.h = h;
|
||||
this.dt = dt; // delta time to sleep the requests.
|
||||
this.ulid = ulid; // user list ul tag id.
|
||||
this.interv = null;
|
||||
|
||||
// updates the users list on the html
|
||||
this.refreshList = function()
|
||||
{
|
||||
if(!document.getElementById(me.ulid))
|
||||
{
|
||||
clearInterval(me.interv);
|
||||
return;
|
||||
}
|
||||
|
||||
while(document.getElementById(me.ulid).firstChild)
|
||||
document.getElementById(me.ulid).removeChild(document.getElementById(me.ulid).firstChild);
|
||||
|
||||
if(users)
|
||||
{
|
||||
var li;
|
||||
var a;
|
||||
var user;
|
||||
for(var i in users)
|
||||
{
|
||||
user = users[i];
|
||||
li = document.createElement("span");
|
||||
a = document.createElement("a");
|
||||
a.appendChild(document.createTextNode(user.nick));
|
||||
a.setAttribute("href","#");
|
||||
a.className = "chat";
|
||||
if(PRIVATES)
|
||||
a.onclick = me.newPriv(me.dt,user.uid);
|
||||
|
||||
li.appendChild(a);
|
||||
document.getElementById(me.ulid).appendChild(li);
|
||||
}
|
||||
//var date = new Date();
|
||||
//window.status=date.toString();
|
||||
}
|
||||
};
|
||||
|
||||
// higher order stuff
|
||||
this.newPriv = function(dt,uid)
|
||||
{
|
||||
return function()
|
||||
{
|
||||
if(!chats[uid])
|
||||
{
|
||||
resetChatsZ();
|
||||
chats[uid] = new PrivChat(dt,uid,me.w,me.h);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
};
|
||||
|
||||
// check if theres a new user list
|
||||
this.refresh = function()
|
||||
{
|
||||
//users = null;
|
||||
if(chat_data.ulist)
|
||||
{
|
||||
users = chat_data.ulist;
|
||||
me.refreshList();
|
||||
}
|
||||
chat_data.ulist = null;
|
||||
};
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
// Input handler
|
||||
function chatInput(to)
|
||||
{
|
||||
var me = this;
|
||||
this.to = to?to:null;
|
||||
this.input = document.createElement("input");
|
||||
this.input.className = "cinput";
|
||||
this.input.setAttribute("type","text");
|
||||
this.input.setAttribute("name","input");
|
||||
|
||||
var table = document.createElement("table");
|
||||
//table.border = "1";
|
||||
var tbody = table.appendChild(document.createElement("tbody"));
|
||||
var tr = tbody.appendChild(document.createElement("tr"));
|
||||
var td = tr.appendChild(document.createElement("td"));
|
||||
var td1 = tr.appendChild(document.createElement("td"));
|
||||
var td2 = tr.appendChild(document.createElement("td"));
|
||||
|
||||
table.className = "cinput";
|
||||
tbody.className = "cinput";
|
||||
tr.className = "cinput";
|
||||
td.className = "ckeyb";
|
||||
td1.className = "cinput";
|
||||
td2.className = "csubmit";
|
||||
|
||||
this.input = td1.appendChild(this.input);
|
||||
td2.onclick = function()
|
||||
{
|
||||
var ajax = new Ajax(me.callback);
|
||||
ajax.process("index.php?mode=chat&module=Home&action=chat","submode=submit&msg="+escapeAll(me.input.value)+(me.to?"&to="+me.to:""));
|
||||
|
||||
me.input.value = "";
|
||||
me.input.focus();
|
||||
return false;
|
||||
};
|
||||
|
||||
this.form = document.createElement("form");
|
||||
this.form.className = "cinput";
|
||||
|
||||
this.form.appendChild(table);
|
||||
this.form.onsubmit = function()
|
||||
{
|
||||
var ajax = new Ajax(me.callback);
|
||||
ajax.process("index.php?mode=chat&module=Home&action=chat","submode=submit&msg="+escapeAll(me.input.value)+(me.to?"&to="+me.to:""));
|
||||
me.input.value = "";
|
||||
me.input.focus();
|
||||
return false;
|
||||
};
|
||||
|
||||
this.setFocus = function()
|
||||
{
|
||||
me.input.focus();
|
||||
};
|
||||
|
||||
// evaluate the returned json
|
||||
this.callback = function(response)
|
||||
{
|
||||
response = response.responseText;
|
||||
try{
|
||||
if(response)
|
||||
debug("debug",response);
|
||||
}catch(e){
|
||||
debug("debug","chatInput Error: "+response);
|
||||
}
|
||||
};
|
||||
|
||||
this.get = function()
|
||||
{
|
||||
return me.form;
|
||||
};
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
// Private chat handler / abre ventana de usurio + usuario
|
||||
function PrivChat(dt,to,w,h)
|
||||
{
|
||||
var me = this;
|
||||
this.dt = dt; // delta time to sleep the requests.
|
||||
this.to = to; // private chat the other user id
|
||||
this.input = new chatInput(to);
|
||||
this.toNick = getNick(to);
|
||||
|
||||
var conf = new Array();
|
||||
conf["topic"] = "Private chat with <span class=\"chatTopicNick\">"+me.toNick+"</span>";
|
||||
conf["class"] = "chat";
|
||||
conf["width"] = w;
|
||||
conf["height"] = h;
|
||||
conf["drag"] = true;
|
||||
|
||||
this.win = new cssWindow(conf);
|
||||
|
||||
// move z+1..crappy way to send above others
|
||||
this.win.table.onDragStart = function()
|
||||
{
|
||||
resetChatsZ();
|
||||
chats[me.to].win.table.style.zIndex++;
|
||||
};
|
||||
|
||||
this.win.cb = function()
|
||||
{
|
||||
me.ajax = new Ajax(me.callback);
|
||||
me.ajax.process("index.php?mode=chat&module=Home&action=chat","submode=pvclose&to="+me.to);
|
||||
chats[me.to]=null;
|
||||
};
|
||||
|
||||
this.cbox = this.win.setBody(document.createElement("div"));
|
||||
this.cbox.style.width = "100%";
|
||||
this.cbox.style.height = "100%";
|
||||
this.cbox.style.overflow = "auto";
|
||||
this.cbox.className = "chatbox";
|
||||
|
||||
// Draws the top of the window
|
||||
this.getHead = function()
|
||||
{
|
||||
var t = document.createElement("table");
|
||||
t.style.width="100%";t.cellSpacing="0";t.cellPadding="0";
|
||||
var tb = t.appendChild(document.createElement("tbody"));
|
||||
var tr = tb.appendChild(document.createElement("tr"));
|
||||
var td = tr.appendChild(document.createElement("td"));
|
||||
td.className = "chaticon";
|
||||
td = tr.appendChild(document.createElement("td"));
|
||||
td.className = "chattopic1";
|
||||
td.innerHTML = me.win.topic;
|
||||
var hide = tr.appendChild(document.createElement("td"));
|
||||
hide.className = "chathide";
|
||||
hide.onclick = me.win.doHide;
|
||||
var close = tr.appendChild(document.createElement("td"));
|
||||
close.className = "chatclose";
|
||||
close.onclick = me.win.doClose;
|
||||
return t;
|
||||
};
|
||||
|
||||
this.win.setHead(this.getHead());
|
||||
this.win.setFoot(this.input.get());
|
||||
|
||||
|
||||
// updates the chat on the html
|
||||
this.appendMsg = function(from,msg)
|
||||
{
|
||||
var div;
|
||||
var span;
|
||||
|
||||
span = document.createElement("span");
|
||||
span.appendChild(document.createTextNode(from+": "));
|
||||
span.className = "cunick";
|
||||
|
||||
div = document.createElement("div");
|
||||
div.className = "cumsg";
|
||||
|
||||
div.appendChild(span);
|
||||
div.innerHTML+=msg;
|
||||
me.cbox.appendChild(div);
|
||||
me.cbox.scrollTop=me.cbox.scrollHeight;
|
||||
};
|
||||
|
||||
// updates the chat on the html
|
||||
this.appendSysMsg = function(msg)
|
||||
{
|
||||
var div;
|
||||
div = document.createElement("div");
|
||||
div.className = "csmsg";
|
||||
div.innerHTML+=msg;
|
||||
me.cbox.appendChild(div);
|
||||
me.cbox.scrollTop=me.cbox.scrollHeight;
|
||||
};
|
||||
|
||||
this.win.show();
|
||||
this.input.setFocus();
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
// Public chat handler / abre ventana de usurio + usuario
|
||||
function PubChat(dt,w,h)
|
||||
{
|
||||
var me = this;
|
||||
this.dt = dt; // delta time to sleep the requests.
|
||||
this.to = 0; // public chat the other user id
|
||||
this.input = new chatInput(this.to);
|
||||
|
||||
var conf = new Array();
|
||||
conf["topic"] = "Public Chat";
|
||||
conf["class"] = "pchat";
|
||||
conf["width"] = w;
|
||||
conf["height"] = h;
|
||||
conf["drag"] = false;
|
||||
|
||||
this.win = new cssWindow(conf);
|
||||
|
||||
this.cbox = this.win.setBody(document.createElement("div"));
|
||||
this.cbox.style.width = "100%";
|
||||
this.cbox.style.height = "100%";
|
||||
this.cbox.style.overflow = "auto";
|
||||
this.cbox.className = "chatbox";
|
||||
|
||||
// Draws the top of the window
|
||||
this.getHead = function()
|
||||
{
|
||||
var t = document.createElement("table");
|
||||
t.style.width="100%";t.cellSpacing="0";t.cellPadding="0";
|
||||
var tb = t.appendChild(document.createElement("tbody"));
|
||||
var tr = tb.appendChild(document.createElement("tr"));
|
||||
var td = tr.appendChild(document.createElement("td"));
|
||||
td.className = "chattopic";
|
||||
td.appendChild(document.createTextNode(me.win.topic));
|
||||
var hide = tr.appendChild(document.createElement("td"));
|
||||
hide.className = "chathide";
|
||||
hide.onclick = me.win.doHide;
|
||||
|
||||
return t;
|
||||
};
|
||||
|
||||
this.win.setHead(this.getHead());
|
||||
this.win.setFoot(this.input.get());
|
||||
|
||||
// updates the chat on the html
|
||||
this.appendMsg = function(from,msg)
|
||||
{
|
||||
var div;
|
||||
var span;
|
||||
|
||||
span = document.createElement("span");
|
||||
span.appendChild(document.createTextNode(from+": "));
|
||||
span.className = "cunick";
|
||||
|
||||
div = document.createElement("div");
|
||||
div.className = "cumsg";
|
||||
|
||||
div.appendChild(span);
|
||||
div.innerHTML+=msg;
|
||||
me.cbox.appendChild(div);
|
||||
me.cbox.scrollTop=me.cbox.scrollHeight;
|
||||
};
|
||||
|
||||
// updates the chat on the html
|
||||
this.appendSysMsg = function(msg)
|
||||
{
|
||||
var div;
|
||||
div = document.createElement("div");
|
||||
div.className = "csmsg";
|
||||
div.innerHTML+=msg;
|
||||
me.cbox.appendChild(div);
|
||||
me.cbox.scrollTop=me.cbox.scrollHeight;
|
||||
};
|
||||
|
||||
this.get = function()
|
||||
{
|
||||
me.input.setFocus();
|
||||
return me.win.get();
|
||||
};
|
||||
};
|
||||
@@ -1 +0,0 @@
|
||||
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(c/a))+String.fromCharCode(c%a+161)};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[(function(e){return d[e]})];e=(function(){return'[\xa1-\xff]+'});c=1};while(c--){if(k[c]){p=p.replace(new RegExp(e(c),'g'),k[c])}}return p}('ª ÷(c){å ¢=¡;¡.Ë=c["Ë"]?c["Ë"]:"";¡.w=c["¶"]?c["¶"]:"";¡.h=c["µ"]?c["µ"]:"";¡.x=c["x"]?c["x"]:0;¡.y=c["y"]?c["y"]:0;¡.z=c["z"]?c["z"]:0;¡.c=c["Ó"]?c["Ó"]:Ä;¡.Ê=Ä;¡.£=¤.©("£");¡.£.¨.¶=¡.w;¡.£.¨.µ=¡.h;¡.£.æ="0";¡.£.ñ="0";¡.£.¨.ð=¡.x;¡.£.¨.è=¡.y;¡.£.¨.é=¡.z;¡.±=¤.©("±");¡.¯=¤.©("¯");¡.¬=¤.©("¬");¡.°=¤.©("Ç");¡.²=¤.©("Ç");¡.³=¤.©("Ç");¡.¹=¤.©("");¡.·=¤.©("");¡.º=¤.©("");¡.½=¤.©("");¡.¸=¤.©("");¡.¾=¤.©("");¡.¿=¤.©("");¡.®=¤.©("");¡.À=¤.©("");¡.±=¡.£.¥(¡.±);¡.¯=¡.£.¥(¡.¯);¡.¬=¡.£.¥(¡.¬);¡.°=¡.±.¥(¡.°);¡.²=¡.¯.¥(¡.²);¡.³=¡.¬.¥(¡.³);¡.¹=¡.°.¥(¡.¹);¡.·=¡.°.¥(¡.·);¡.º=¡.°.¥(¡.º);¡.½=¡.².¥(¡.½);¡.¸=¡.².¥(¡.¸);¡.¾=¡.².¥(¡.¾);¡.¿=¡.³.¥(¡.¿);¡.®=¡.³.¥(¡.®);¡.®.¨.¶=¡.w;¡.®.¨.µ=¡.h;¡.À=¡.³.¥(¡.À);¡.¹.¥(¤.É(" "));¡.º.¥(¤.É(" "));¡.ë=ª(){Á(¢.¬.¨.»=="Æ"){¢.£.¨.µ=¢.h;¢.£.¨.¶=¢.w;¢.¯.¨.»="";¢.¬.¨.»=""}í{¢.£.¨.µ="";¢.£.¨.¶=¢.w;¢.¬.¨.»="Æ";¢.¯.¨.»="Æ"}};¡.ò=ª(){Á(¢.Ê)¢.Ê();¢.£.ó.Î(¢.£)};Á(c["Í"]){¡.Í=ô ö();¡.Í.Ý(¡.±,¡.£)}¡.Ô=ª(¦){¢.£.§=¦;¢.±.§=¦;¢.¯.§=¦;¢.¬.§=¦;¢.°.§=¦+"Ï";¢.².§=¦+"Ñ";¢.³.§=¦+"È";¢.¹.§=¦+"Ï";¢.·.§=¦+"Ú";¢.º.§=¦+"Ü";¢.½.§=¦+"Ñ";¢.¸.§=¦+"Þ";¢.¾.§=¦+"á";¢.¿.§=¦+"È";¢.®.§=¦+"â";¢.À.§=¦+"ç"};Á(¡.c)¡.Ô(¡.c);¡.Â=ª(Ì,«){ì(Ð «){Å"î":Å"ï":´ Ì.¥(¤.É(«));Å"õ":´ Ì.¥(«);Õ:Ö("Ø Ù Û: "+(Ð «));´ Ä}};¡.ß=ª(«){¢.Ã(¢.®);´ ¢.Â(¢.®,«)};¡.ã=ª(«){¢.Ã(¢.¸);´ ¢.Â(¢.¸,«)};¡.ê=ª(«){¢.Ã(¢.·);´ ¢.Â(¢.·,«)};¡.Ã=ª(¼){×(¼.Ò)¼.Î(¼.Ò)};¡.ä=ª(){¤.È.¥(¢.£)};¡.à=ª(){´ ¢.£}};',87,87,'this|me|table|document|appendChild|cl|className|style|createElement|function|ct|tbody|td|td1body|tfoot|trhead|thead|trfoot|trbody|return|height|width|td1head|td1foot|tdhead|td2head|display|dom|tdfoot|td2foot|tdbody|td2body|if|setDOM|clear|null|case|none|tr|body|createTextNode|cb|topic|obj|drag|removeChild|head|typeof|foot|firstChild|class|setClass|default|alert|while|type|not|head1|supported|head2|init|foot1|setBody|get|foot2|body1|setFoot|show|var|cellSpacing|body2|top|zIndex|setHead|doHide|switch|else|number|string|left|cellPadding|doClose|parentNode|new|object|Drag|cssWindow'.split('|'),0,{}));
|
||||
@@ -1 +0,0 @@
|
||||
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(c/a))+String.fromCharCode(c%a+161)};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[(function(e){return d[e]})];e=(function(){return'[\xa1-\xff]+'});c=1};while(c--){if(k[c]){p=p.replace(new RegExp(e(c),'g'),k[c])}}return p}('¶ è(){ª ¥=²;².¦=£;².å=¶(o,Â,©,,«,°,Ý,Þ,Ò,Ñ){o.æ=¥.Õ;o.¨=Ý?È:ß;o.§=Þ?È:ß;o.¡=(Â&&Â!=£)?Â:o;¢(o.¨&&Ç(¬(o.¡.¤.µ)))o.¡.¤.µ="Æ";¢(o.§&&Ç(¬(o.¡.¤.¸)))o.¡.¤.¸="Æ";¢(!o.¨&&Ç(¬(o.¡.¤.·)))o.¡.¤.·="Æ";¢(!o.§&&Ç(¬(o.¡.¤.¹)))o.¡.¤.¹="Æ";o.©=³ ©!=\'´\'?©:£;o.«=³ «!=\'´\'?«:£;o.=³ !=\'´\'?:£;o.°=³ °!=\'´\'?°:£;o.Ê=Ò?Ò:£;o.Ì=Ñ?Ñ:£;o.¡.×=Ó Î();o.¡.Ú=Ó Î();o.¡.á=Ó Î()};².Õ=¶(e){ª o=¥.¦=²;e=¥.É(e);ª y=¬(o.§?o.¡.¤.¸:o.¡.¤.¹);ª x=¬(o.¨?o.¡.¤.µ:o.¡.¤.·);o.¡.×(x,y);o.Ï=e.»;o.Ð=e.º;¢(o.¨){¢(o.©!=£)o.¼=e.»-x+o.©;¢(o.!=£)o.Á=o.¼+o.-o.©}Ë{¢(o.©!=£)o.Á=-o.©+e.»+x;¢(o.!=£)o.¼=-o.+e.»+x}¢(o.§){¢(o.«!=£)o.½=e.º-y+o.«;¢(o.°!=£)o.Ä=o.½+o.°-o.«}Ë{¢(o.«!=£)o.Ä=-o.«+e.º+y;¢(o.°!=£)o.½=-o.°+e.º+y}À.Ö=¥.Ø;À.Ù=¥.Ô;Í È};².Ø=¶(e){e=¥.É(e);ª o=¥.¦;ª ¯=e.º;ª ®=e.»;ª y=¬(o.§?o.¡.¤.¸:o.¡.¤.¹);ª x=¬(o.¨?o.¡.¤.µ:o.¡.¤.·);ª ¿,¾;¢(o.©!=£)®=o.¨?±.Å(®,o.¼):±.Ã(®,o.Á);¢(o.!=£)®=o.¨?±.Ã(®,o.Á):±.Å(®,o.¼);¢(o.«!=£)¯=o.§?±.Å(¯,o.½):±.Ã(¯,o.Ä);¢(o.°!=£)¯=o.§?±.Ã(¯,o.Ä):±.Å(¯,o.½);¿=x+((®-o.Ï)*(o.¨?1:-1));¾=y+((¯-o.Ð)*(o.§?1:-1));¢(o.Ê)¿=o.Ê(y);Ë ¢(o.Ì)¾=o.Ì(x);¥.¦.¡.¤[o.¨?"µ":"·"]=¿+"Û";¥.¦.¡.¤[o.§?"¸":"¹"]=¾+"Û";¥.¦.Ï=®;¥.¦.Ð=¯;¥.¦.¡.á(¿,¾);Í È};².Ô=¶(){À.Ö=£;À.Ù=£;¥.¦.¡.Ú(¬(¥.¦.¡.¤[¥.¦.¨?"µ":"·"]),¬(¥.¦.¡.¤[¥.¦.§?"¸":"¹"]));¥.¦=£};².É=¶(e){¢(³ e==\'´\')e=ã.ä;¢(³ e.Ü==\'´\')e.Ü=e.ç;¢(³ e.à==\'´\')e.à=e.â;Í e}};',72,72,'root|if|null|style|me|obj|vmode|hmode|minX|var|minY|parseInt|maxX|ex|ey|maxY|Math|this|typeof|undefined|left|function|right|top|bottom|clientY|clientX|minMouseX|minMouseY|ny|nx|document|maxMouseX|oRoot|min|maxMouseY|max|0px|isNaN|false|fixE|xMapper|else|yMapper|return|Function|lastMouseX|lastMouseY|fYMapper|fXMapper|new|end|start|onmousemove|onDragStart|drag|onmouseup|onDragEnd|px|layerX|bSwapHorzRef|bSwapVertRef|true|layerY|onDrag|offsetY|window|event|init|onmousedown|offsetX|Drag'.split('|'),0,{}));
|
||||
@@ -1,124 +0,0 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
|
||||
* ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
* $Header: /advent/projects/wesat/vtiger_crm/sugarcrm/modules/Home/language/en_us.lang.php,v 1.5 2005/03/04 15:18:47 jack Exp $
|
||||
* Description: Defines the English language pack
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = Array(
|
||||
'LBL_NEW_FORM_TITLE'=>'New Contact',
|
||||
'LBL_FIRST_NAME'=>'First Name:',
|
||||
'LBL_LAST_NAME'=>'Last Name:',
|
||||
'LBL_LIST_LAST_NAME'=>'Last Name',
|
||||
'LBL_ACCOUNT_NAME'=>'Account Name:',
|
||||
'LBL_LIST_ACCOUNT_NAME'=>'Account Name',
|
||||
'LBL_PHONE'=>'Phone:',
|
||||
'LBL_EMAIL_ADDRESS'=>'Email:',
|
||||
'LBL_TOTAL'=>'Total : ',
|
||||
|
||||
'LBL_MY_HOME'=>'My Home',
|
||||
'LBL_MODIFIED_TIME'=>'Modified Time',
|
||||
'LBL_LOGIN_ID'=>'ID',
|
||||
'LBL_MODIFIED_BY'=>'Modified By',
|
||||
'LBL_TYPE'=>'Type',
|
||||
|
||||
'LBL_PIPELINE_FORM_TITLE'=>'My Pipeline',
|
||||
|
||||
'ERR_ONE_CHAR'=>'Please enter at least one letter or number for your search ...',
|
||||
|
||||
'LBL_OPEN_TASKS'=>'My Open Tasks',
|
||||
|
||||
'LBL_LEADS_BY_SOURCE'=>'Leads By Source',
|
||||
'LBL_LEADS_BY_STATUS'=>'Leads By Status',
|
||||
|
||||
'LBL_UPCOMING_EVENTS'=>'Upcoming Activities',
|
||||
'LBL_PENDING_EVENTS'=>'Pending Activities',
|
||||
'LBL_SINGLE_PENDING_EVENT'=>'Event for Last Ten Days',
|
||||
'LBL_MULTIPLE_PENDING_EVENTS'=>'Events for Last Ten Days',
|
||||
|
||||
'recordsforuser'=>'Records for',
|
||||
|
||||
'Today'=>'Today',
|
||||
'This Week'=>'This Week',
|
||||
'This Month'=>'This Month',
|
||||
'This Year'=>'This Year',
|
||||
'Last Week'=>'Last Week',
|
||||
'Last 2 Days'=>'Last 2 Days',
|
||||
'Last Ten Days'=>'Last Ten Days',
|
||||
|
||||
// Added/Updated for vtiger CRM 5.0.4
|
||||
'TITLE_AJAX_CSS_POPUP_CHAT'=>'Ajax Css-Popup chat',
|
||||
'User List'=>'User List',
|
||||
|
||||
// Added after 5.0.4 GA
|
||||
|
||||
//ADDED for Home Page Customization
|
||||
'LBL_HOME_MODULE' => 'Module',
|
||||
'LBL_HOME_RSS' => 'RSS',
|
||||
'LBL_HOME_DASHBOARD' => 'Dashboard',
|
||||
'LBL_HOME_STUFFTITLE'=>'Window Title',
|
||||
'LBL_HOME_SHOW'=>'Show',
|
||||
'LBL_HOME_FILTERBY'=>'Filter By',
|
||||
'LBL_HOME_Fields'=>'Fields To Show <br>(select any two)',
|
||||
'LBL_HOME_PRESSCTRL'=>'(Press "Ctrl" <br> for multiple selection)',
|
||||
'LBL_HOME_RSSURL'=>'RSS URL',
|
||||
'LBL_HOME_DASHBOARD_NAME'=>'DashBoard Name',
|
||||
'LBL_HOME_DASHBOARD_TYPE'=>'DashBoard Type',
|
||||
'LBL_HOME_HORIZONTAL_BARCHART'=>'Horizontal Bar Chart',
|
||||
'LBL_HOME_VERTICAL_BARCHART'=>'Vertical Bar Chart',
|
||||
'LBL_HOME_PIE_CHART'=>'Pie Chart',
|
||||
'LBL_HOME_ITEMS'=>'item(s)',
|
||||
'LBL_MORE'=>'More',
|
||||
'LBL_SCROLL'=>'Scroll',
|
||||
|
||||
// vtiger CRM News
|
||||
'LBL_NEWS_NO'=>'No news',
|
||||
|
||||
//added for home page changes
|
||||
'LBL_NOTEBOOK'=>'Notebook',
|
||||
'LBL_NOTEBOOK_TITLE'=>'Double-click to edit.',
|
||||
'LBL_NOTEBOOK_SAVE_TITLE'=>'Click anywhere else on the page to save.',
|
||||
|
||||
'LBL_URL'=>'Website',
|
||||
'LBL_HOME_LAYOUT'=>'Change layout',
|
||||
'LBL_NUMBER_OF_COLUMNS'=>'Number of columns',
|
||||
'LBL_TWO_COLUMN'=>'Two Columns',
|
||||
'LBL_THREE_COLUMN'=>'Three Columns',
|
||||
'LBL_FOUR_COLUMN'=>'Four Columns',
|
||||
// END
|
||||
|
||||
// Default home page widget's title
|
||||
'Top Accounts'=>'Top Accounts',
|
||||
'Top Potentials'=>'Top Potentials',
|
||||
'Top Quotes'=>'Top Quotes',
|
||||
'Top Trouble Tickets'=>'Top Trouble Tickets',
|
||||
'Top Invoices'=>'Top Invoices',
|
||||
'Top Sales Orders'=>'Top Sales Orders',
|
||||
'Top Purchase Orders'=>'Top Purchase Orders',
|
||||
'My New Leads'=>'My New Leads',
|
||||
'Key Metrics'=>'Key Metrics',
|
||||
'My Group Allocation'=>'My Group Allocation',
|
||||
'My Recent FAQs'=>'My Recent FAQs',
|
||||
'Upcoming Activities'=>'Upcoming Activities',
|
||||
'Pending Activities'=>'Pending Activities',
|
||||
'Home Page Dashboard'=>'Home Page Dashboard',
|
||||
'Tag Cloud'=>'Tag Cloud',
|
||||
|
||||
'MSG_NO_FILTERS' => 'No Filters Available',
|
||||
'MSG_NO_FIELDS' => 'No Fields Available',
|
||||
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -1,124 +0,0 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
|
||||
* ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
* $Header: /advent/projects/wesat/vtiger_crm/sugarcrm/modules/Home/language/en_us.lang.php,v 1.5 2005/03/04 15:18:47 jack Exp $
|
||||
* Description: Defines the English language pack
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = Array(
|
||||
'LBL_NEW_FORM_TITLE'=>'新增联系人',
|
||||
'LBL_FIRST_NAME'=>'姓名:',
|
||||
'LBL_LAST_NAME'=>'姓氏:',
|
||||
'LBL_LIST_LAST_NAME'=>'姓氏:',
|
||||
'LBL_ACCOUNT_NAME'=>'客户名称:',
|
||||
'LBL_LIST_ACCOUNT_NAME'=>'客户名称',
|
||||
'LBL_PHONE'=>'电话:',
|
||||
'LBL_EMAIL_ADDRESS'=>'电子邮件:',
|
||||
'LBL_TOTAL'=>'总计:',
|
||||
|
||||
'LBL_MY_HOME'=>'我的首页',
|
||||
'LBL_MODIFIED_TIME'=>'异动时间',
|
||||
'LBL_LOGIN_ID'=>'代号',
|
||||
'LBL_MODIFIED_BY'=>'修改者',
|
||||
'LBL_TYPE'=>'类型',
|
||||
|
||||
'LBL_PIPELINE_FORM_TITLE'=>'我的统计图表',
|
||||
|
||||
'ERR_ONE_CHAR'=>'请至少输入1个字符以上的号码,以供搜寻 ...',
|
||||
|
||||
'LBL_OPEN_TASKS'=>'我的进行中任务',
|
||||
|
||||
'LBL_LEADS_BY_SOURCE'=>'准客户来源',
|
||||
'LBL_LEADS_BY_STATUS'=>'准客户状态',
|
||||
|
||||
'LBL_UPCOMING_EVENTS'=>'未来事件',
|
||||
'LBL_PENDING_EVENTS'=>'暂停事件',
|
||||
'LBL_SINGLE_PENDING_EVENT'=>'最近十天事件',
|
||||
'LBL_MULTIPLE_PENDING_EVENTS'=>'最近十天事件',
|
||||
|
||||
'recordsforuser'=>'资料于',
|
||||
|
||||
'Today'=>'今天',
|
||||
'This Week'=>'这个星期',
|
||||
'This Month'=>'这个月',
|
||||
'This Year'=>'今年',
|
||||
'Last Week'=>'上星期',
|
||||
'Last 2 Days'=>'过去两天',
|
||||
'Last Ten Days'=>'过去十天',
|
||||
|
||||
// Added/Updated for vtiger CRM 5.0.4
|
||||
'TITLE_AJAX_CSS_POPUP_CHAT'=>'员工聊天室',
|
||||
'User List'=>'使用者列表',
|
||||
|
||||
// Added after 5.0.4 GA
|
||||
|
||||
//ADDED for Home Page Customization
|
||||
'LBL_HOME_MODULE'=>'模块',
|
||||
'LBL_HOME_RSS'=>'RSS',
|
||||
'LBL_HOME_DASHBOARD'=>'图表',
|
||||
'LBL_HOME_STUFFTITLE'=>'窗口标题',
|
||||
'LBL_HOME_SHOW'=>'显示',
|
||||
'LBL_HOME_FILTERBY'=>'过滤',
|
||||
'LBL_HOME_Fields'=>'要显示的字段<br> (选择任何两个)',
|
||||
'LBL_HOME_PRESSCTRL'=>'(如需多个选择请按“ Ctrl ” 键)',
|
||||
'LBL_HOME_RSSURL'=>'RSS URL',
|
||||
'LBL_HOME_DASHBOARD_NAME'=>'图表名称',
|
||||
'LBL_HOME_DASHBOARD_TYPE'=>'图表类型',
|
||||
'LBL_HOME_HORIZONTAL_BARCHART'=>'横向柱状图',
|
||||
'LBL_HOME_VERTICAL_BARCHART'=>'垂直柱状图',
|
||||
'LBL_HOME_PIE_CHART'=>'饼图',
|
||||
'LBL_HOME_ITEMS'=>'项目',
|
||||
'LBL_MORE'=>'更多',
|
||||
'LBL_SCROLL'=>'滚动',
|
||||
|
||||
// vtiger CRM News
|
||||
'LBL_NEWS_NO'=>'没有新闻',
|
||||
|
||||
//added for home page changes
|
||||
'LBL_NOTEBOOK'=>'笔记本',
|
||||
'LBL_NOTEBOOK_TITLE'=>'双击进入编加状态.',
|
||||
'LBL_NOTEBOOK_SAVE_TITLE'=>'点击页面其他部分进行保存.',
|
||||
|
||||
'LBL_URL'=>'网站',
|
||||
'LBL_HOME_LAYOUT'=>'变更版面',
|
||||
'LBL_NUMBER_OF_COLUMNS'=>'列数',
|
||||
'LBL_TWO_COLUMN'=>'两列',
|
||||
'LBL_THREE_COLUMN'=>'三列',
|
||||
'LBL_FOUR_COLUMN'=>'四列',
|
||||
// END
|
||||
|
||||
// Default home page widget's title
|
||||
'Top Accounts'=>'最新客户',
|
||||
'Top Potentials'=>'最新潜在机会',
|
||||
'Top Quotes'=>'Top Quotes',
|
||||
'Top Trouble Tickets'=>'最新报修记录',
|
||||
'Top Invoices'=>'最新发票',
|
||||
'Top Sales Orders'=>'最新订单',
|
||||
'Top Purchase Orders'=>'最新采购订单',
|
||||
'My New Leads'=>'最新潜在客户',
|
||||
'Key Metrics'=>'关键指标',
|
||||
'My Group Allocation'=>'我的群组分配',
|
||||
'My Recent FAQs'=>'最新常见问题',
|
||||
'Upcoming Activities'=>'近期活动',
|
||||
'Pending Activities'=>'即将进行的活动',
|
||||
'Home Page Dashboard'=>'首页图表',
|
||||
'Tag Cloud'=>'常用标签',
|
||||
|
||||
'MSG_NO_FILTERS'=>'无过滤器可用',
|
||||
'MSG_NO_FIELDS'=>'无可用字段',
|
||||
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -1,124 +0,0 @@
|
||||
<?php
|
||||
/*+**********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
************************************************************************************/
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $theme;
|
||||
$charset = $app_strings['LBL_CHARSET'];
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<meta content="text/html; charset=<?php echo $charset;?>" http-equiv="content-type"/>
|
||||
<meta name="author" content="rolosworld@gmail.com"/>
|
||||
<meta http-equiv="expires" content="-1"/>
|
||||
<meta http-equiv="pragma" content="no-cache"/>
|
||||
|
||||
<title><?php echo $mod_strings['TITLE_AJAX_CSS_POPUP_CHAT'];?></title>
|
||||
|
||||
<!-- NEEDED SCRIPTS -->
|
||||
<script type="text/javascript" charset="<?php echo $charset?>" src="include/js/general.js"></script>
|
||||
<script type="text/javascript" charset="<?php echo $charset?>" src="modules/Home/js/ajax.js"></script>
|
||||
<script type="text/javascript" charset="ISO-8859-1" src="modules/Home/js/dom-drag_p.js"></script>
|
||||
<script type="text/javascript" charset="ISO-8859-1" src="modules/Home/js/css-window_p.js"></script>
|
||||
<script type="text/javascript" charset="<?php echo $charset?>" src="modules/Home/js/chat.js"></script>
|
||||
<!-- /NEEDED SCRIPTS -->
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function showPopup()
|
||||
{
|
||||
var conf = new Array();
|
||||
conf["dt"] = 1000;
|
||||
conf["width"] = "400px";
|
||||
conf["height"] = "300px";
|
||||
conf["ulid"] = "uli";
|
||||
conf["pchatid"] = "chat";
|
||||
|
||||
|
||||
// USED TO INITIALIZE THE SESSION, I SUGGEST CALLING THIS ON BODY onload
|
||||
// Chat(<conf array>);
|
||||
// NOTICE THE ChatStuff IS THE NAME OF THE ABOVE FUNCTION!!!
|
||||
var mychat = new Chat(conf);
|
||||
|
||||
}
|
||||
|
||||
-->
|
||||
</script>
|
||||
|
||||
<!-- CSS classes for the popups -->
|
||||
<link rel="stylesheet" type="text/css" href="themes/<?php echo $theme;?>/chat.css"/>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<!-- THIS IS NEEDED FOR THE USERS LIST TO APPEAR, -->
|
||||
<!-- THE id CAN BE CHANGED, BUT HAS TO BE PASSED TO UList() -->
|
||||
<!-- <table>
|
||||
<tr>
|
||||
<td rowspan="2">
|
||||
|
||||
<div id="chat"></div>
|
||||
</td>
|
||||
<td class="chatuserlist">User List</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<ul id="uli"></ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table> -->
|
||||
<!-- THIS IS NEEDED FOR DEBUG MSG'S TO APPEAR -->
|
||||
ºÃÆæ¹Ö
|
||||
<table width="550" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<table width="150" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="pchathead"></td>
|
||||
<td class="pchathead1"><b><?php echo $mod_strings['User List']; ?></b></td>
|
||||
<td class="pchathead2"></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="pchatbody"></td>
|
||||
<td class="pchatbody1" style="height: 300px;text-align:left;vertical-align:top;">
|
||||
<div class="chatbox" style="overflow-y:auto;overflow-x:hidden; width: 100%; height: 100%;">
|
||||
<span id="uli"></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="pchatbody2"></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="pchatfoot"></td>
|
||||
<td class="pchatfoot1"></td>
|
||||
<td class="pchatfoot2"></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="400" valign="top">
|
||||
<div id="chat"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<div id="debug"></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,124 +0,0 @@
|
||||
<?php
|
||||
/*+**********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
************************************************************************************/
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $theme;
|
||||
$charset = $app_strings['LBL_CHARSET'];
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
|
||||
<head>
|
||||
<meta content="text/html; charset=<?php echo $charset;?>" http-equiv="content-type"/>
|
||||
<meta name="author" content="rolosworld@gmail.com"/>
|
||||
<meta http-equiv="expires" content="-1"/>
|
||||
<meta http-equiv="pragma" content="no-cache"/>
|
||||
|
||||
<title><?php echo $mod_strings['TITLE_AJAX_CSS_POPUP_CHAT'];?></title>
|
||||
|
||||
<!-- NEEDED SCRIPTS -->
|
||||
<script type="text/javascript" charset="<?php echo $charset?>" src="include/js/general.js"></script>
|
||||
<script type="text/javascript" charset="<?php echo $charset?>" src="modules/Home/js/ajax.js"></script>
|
||||
<script type="text/javascript" charset="ISO-8859-1" src="modules/Home/js/dom-drag_p.js"></script>
|
||||
<script type="text/javascript" charset="ISO-8859-1" src="modules/Home/js/css-window_p.js"></script>
|
||||
<script type="text/javascript" charset="<?php echo $charset?>" src="modules/Home/js/chat.js"></script>
|
||||
<!-- /NEEDED SCRIPTS -->
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function showPopup()
|
||||
{
|
||||
var conf = new Array();
|
||||
conf["dt"] = 1000;
|
||||
conf["width"] = "400px";
|
||||
conf["height"] = "300px";
|
||||
conf["ulid"] = "uli";
|
||||
conf["pchatid"] = "chat";
|
||||
|
||||
|
||||
// USED TO INITIALIZE THE SESSION, I SUGGEST CALLING THIS ON BODY onload
|
||||
// Chat(<conf array>);
|
||||
// NOTICE THE ChatStuff IS THE NAME OF THE ABOVE FUNCTION!!!
|
||||
var mychat = new Chat(conf);
|
||||
|
||||
}
|
||||
|
||||
-->
|
||||
</script>
|
||||
|
||||
<!-- CSS classes for the popups -->
|
||||
<link rel="stylesheet" type="text/css" href="themes/<?php echo $theme;?>/chat.css"/>
|
||||
|
||||
</head>
|
||||
|
||||
<body onload="showPopup();" style="background-image:url(themes/<?php echo $theme;?>/images/site_bg.gif);color:#ffffff;">
|
||||
|
||||
|
||||
<!-- THIS IS NEEDED FOR THE USERS LIST TO APPEAR, -->
|
||||
<!-- THE id CAN BE CHANGED, BUT HAS TO BE PASSED TO UList() -->
|
||||
<!-- <table>
|
||||
<tr>
|
||||
<td rowspan="2">
|
||||
|
||||
<div id="chat"></div>
|
||||
</td>
|
||||
<td class="chatuserlist">User List</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<ul id="uli"></ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table> -->
|
||||
<!-- THIS IS NEEDED FOR DEBUG MSG'S TO APPEAR -->
|
||||
|
||||
<table width="550" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<table width="150" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="pchathead"></td>
|
||||
<td class="pchathead1"><b><?php echo $mod_strings['User List']; ?></b></td>
|
||||
<td class="pchathead2"></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="pchatbody"></td>
|
||||
<td class="pchatbody1" style="height: 300px;text-align:left;vertical-align:top;">
|
||||
<div class="chatbox" style="overflow-y:auto;overflow-x:hidden; width: 100%; height: 100%;">
|
||||
<span id="uli"></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="pchatbody2"></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="pchatfoot"></td>
|
||||
<td class="pchatfoot1"></td>
|
||||
<td class="pchatfoot2"></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="400" valign="top">
|
||||
<div id="chat"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<div id="debug"></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user