Пример #1
0
 function viewController()
 {
     $smarty = new vtigerCRM_Smarty();
     foreach ($this->parameters as $k => $v) {
         $smarty->assign($k, $v);
     }
     $smarty->assign("IS_SAFARI", Mobile::isSafari());
     $smarty->assign("SKIN", Mobile::config('Default.Skin'));
     return $smarty;
 }
 function getViewer()
 {
     global $theme, $app_strings, $current_language;
     $smarty = new vtigerCRM_Smarty();
     $smarty->assign('APP', $app_strings);
     $smarty->assign('MOD', return_module_language($current_language, 'ModComments'));
     $smarty->assign('THEME', $theme);
     $smarty->assign('IMAGE_PATH', "themes/{$theme}/images/");
     $smarty->assign('UIKEY', $this->uikey());
     $smarty->assign('WIDGET_TITLE', $this->title());
     $smarty->assign('WIDGET_NAME', $this->name());
     return $smarty;
 }
Пример #3
0
 function ConfigEditor_Viewer()
 {
     parent::vtigerCRM_Smarty();
     global $app_strings, $mod_strings, $currentModule, $theme;
     $this->assign('CUSTOM_MODULE', true);
     $this->assign('APP', $app_strings);
     $this->assign('MOD', $mod_strings);
     $this->assign('MODULE', $currentModule);
     // TODO: Update Single Module Instance name here.
     $this->assign('SINGLE_MOD', 'SINGLE_' . $currentModule);
     $this->assign('CATEGORY', 'Settings');
     $this->assign('IMAGE_PATH', "themes/{$theme}/images/");
     $this->assign('THEME', $theme);
 }
Пример #4
0
 function __construct()
 {
     parent::__construct();
     global $app_strings, $mod_strings, $currentModule, $theme;
     $this->assign('CUSTOM_MODULE', true);
     $this->assign('APP', $app_strings);
     $this->assign('MOD', $mod_strings);
     $this->assign('MODULE', $currentModule);
     // TODO: Update Single Module Instance name here.
     $this->assign('SINGLE_MOD', 'SINGLE_' . $currentModule);
     $this->assign('CATEGORY', getParentTab($currentModule));
     $this->assign('IMAGE_PATH', "themes/{$theme}/images/");
     $this->assign('THEME', $theme);
 }
/**
 * this function returns the detailview for tooltip
 * @param integer $fieldid - the fieldid of the field for which you want the detailview
 * @param array $checkedFields - the fields which are selected to be displayed in quickview
 * @return string $data - the formatted quickview data
 */
function getDetailViewForTooltip($fieldid, $checkedFields)
{
    global $app_strings;
    $labels = array();
    if (!empty($checkedFields)) {
        $labels = getFieldLabels($checkedFields);
    }
    $smarty = new vtigerCRM_Smarty();
    $smarty->assign("FIELDID", $fieldid);
    $smarty->assign("APP", $app_strings);
    $smarty->assign("IMAGES", "themes/images/");
    $smarty->assign("LABELS", $labels);
    $smarty->assign("COUNT", count($labels));
    $data = $smarty->fetch("modules/Tooltip/DetailQuickView.tpl");
    return $data;
}
Пример #6
0
 function viewController()
 {
     global $theme;
     $themePath = "themes/" . $theme . "/";
     $imagePath = $themePath . "images/";
     $smarty = new vtigerCRM_Smarty();
     foreach ($this->parameters as $k => $v) {
         $smarty->assign($k, $v);
     }
     $smarty->assign('MODULE', 'Import');
     $smarty->assign('THEME', $theme);
     $smarty->assign('IMAGE_PATH', $imagePath);
     return $smarty;
 }
Пример #7
0
 * and share improvements. However, for proper details please read the full License, available at
 * http://vizsage.com/license/Vizsage-License-BY-NC-SA.html and the handy reference for understanding
 * the full license at http://vizsage.com/license/Vizsage-Deed-BY-NC-SA.html. Unless required by
 * applicable law or agreed to in writing, any software distributed under the License is distributed
 * on an  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and limitations under the
 * License terms of Creative Commons Attribution-NonCommercial-ShareAlike 3.0 (the License).
 *************************************************************************************************
 *  Module       : cbMap
 *  Version      : 5.5.0
 *  Author       : OpenCubed.
 *************************************************************************************************/
require_once 'Smarty_setup.php';
include_once 'modules/cbMap/cbMap.php';
global $mod_strings, $app_strings, $adb, $log;
$mapTemplate = new vtigerCRM_Smarty();
$allModules = array();
$mapid = $_REQUEST["mapid"];
$mapInstance = CRMEntity::getInstance("cbMap");
$allModules = $mapInstance->initListOfModules();
$delimiters = array("", ",", ";", "_", "-");
$getMapQuery = $adb->pquery("Select * from vtiger_cbmap where cbmapid=?", array($mapid));
$nr_row = $adb->num_rows($getMapQuery);
if ($nr_row != 0) {
    $viewmode = "edit";
    $origin = $adb->query_result($getMapQuery, 0, 'origin');
    $originname = $adb->query_result($getMapQuery, 0, 'originname');
    $target = $adb->query_result($getMapQuery, 0, 'target');
    $targetname = $adb->query_result($getMapQuery, 0, 'targetname');
    $field1 = $adb->query_result($getMapQuery, 0, 'field1');
    $field2 = $adb->query_result($getMapQuery, 0, 'field2');
Пример #8
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 'Smarty_setup.php';
require_once 'include/database/PearDatabase.php';
require_once 'include/CustomFieldUtil.php';
global $mod_strings, $app_strings, $theme;
$smarty = new vtigerCRM_Smarty();
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme);
$theme_path = "themes/" . $theme . "/";
$image_path = "themes/images/";
$smarty->assign("IMAGE_PATH", $image_path);
$module_array = getCustomFieldSupportedModules();
$cfimagecombo = array($image_path . "text.gif", $image_path . "number.gif", $image_path . "percent.gif", $image_path . "currency.gif", $image_path . "date.gif", $image_path . "email.gif", $image_path . "phone.gif", $image_path . "picklist.gif", $image_path . "url.gif", $image_path . "checkbox.gif", $image_path . "text.gif", $image_path . "picklist.gif");
$cftextcombo = array($mod_strings['Text'], $mod_strings['Number'], $mod_strings['Percent'], $mod_strings['Currency'], $mod_strings['Date'], $mod_strings['Email'], $mod_strings['Phone'], $mod_strings['PickList'], $mod_strings['LBL_URL'], $mod_strings['LBL_CHECK_BOX'], $mod_strings['LBL_TEXT_AREA'], $mod_strings['LBL_MULTISELECT_COMBO']);
$smarty->assign("MODULES", $module_array);
$smarty->assign("CFTEXTCOMBO", $cftextcombo);
$smarty->assign("CFIMAGECOMBO", $cfimagecombo);
if ($_REQUEST['fld_module'] != '') {
    $fld_module = vtlib_purify($_REQUEST['fld_module']);
} elseif ($_REQUEST['formodule'] != '') {
    $fld_module = vtlib_purify($_REQUEST['formodule']);
Пример #9
0
global $currentModule, $current_user;
if ($current_user->is_admin != 'on') {
    die("<br><br><center>" . $app_strings['LBL_PERMISSION'] . " <a href='javascript:window.history.back()'>" . $app_strings['LBL_GO_BACK'] . ".</a></center>");
}
$log = LoggerManager::getLogger('user_list');
global $mod_strings, $adb;
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
global $current_language;
$mod_strings = return_module_language($current_language, 'Users');
$category = getParentTab();
$focus = new Users();
$no_of_users = UserCount();
//Display the mail send status
$smarty = new vtigerCRM_Smarty();
if ($_REQUEST['mail_error'] != '') {
    require_once "modules/Emails/mail.php";
    $error_msg = strip_tags(parseEmailErrorString($_REQUEST['mail_error']));
    $error_msg = $app_strings['LBL_MAIL_NOT_SENT_TO_USER'] . ' ' . vtlib_purify($_REQUEST['user']) . '. ' . $app_strings['LBL_PLS_CHECK_EMAIL_N_SERVER'];
    $smarty->assign("ERROR_MSG", $mod_strings['LBL_MAIL_SEND_STATUS'] . ' <b><font class="warning">' . $error_msg . '</font></b>');
}
//Retreiving the start value from request
if (isset($_REQUEST['start']) && $_REQUEST['start'] != '') {
    $start = vtlib_purify($_REQUEST['start']);
} elseif ($_SESSION['user_pagestart'] != '') {
    $start = $_SESSION['user_pagestart'];
} else {
    $start = 1;
}
$list_query = getListQuery("Users");
Пример #10
0
 * 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/database/PearDatabase.php';
require_once 'Smarty_setup.php';
require_once 'modules/SalesOrder/SalesOrder.php';
require_once 'include/ListView/ListView.php';
require_once 'include/utils/utils.php';
require_once 'modules/CustomView/CustomView.php';
require_once 'include/database/Postgres8.php';
global $app_strings, $mod_strings, $list_max_entries_per_page, $currentModule, $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$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("MODULE", $currentModule);
$smarty->assign("SINGLE_MOD", 'SalesOrder');
$category = getParentTab();
$smarty->assign("CATEGORY", $category);
$focus = new SalesOrder();
// Initialize sort by fields
$focus->initSortbyField('SalesOrder');
// END
$other_text = array();
$url_string = '';
// assigning http url string
Пример #11
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.
 ************************************************************************************/
global $app_strings, $mod_strings, $current_language, $currentModule, $theme, $adb, $log, $current_user;
require_once 'Smarty_setup.php';
require_once 'data/Tracker.php';
require_once 'include/CustomFieldUtil.php';
require_once 'include/utils/utils.php';
$focus = CRMEntity::getInstance($currentModule);
$smarty = new vtigerCRM_Smarty();
$category = getParentTab($currentModule);
$record = vtlib_purify($_REQUEST['record']);
$isduplicate = vtlib_purify($_REQUEST['isDuplicate']);
//added to fix the issue4600
$searchurl = getBasic_Advance_SearchURL();
$smarty->assign("SEARCH", $searchurl);
//4600 ends
$currencyid = fetchCurrency($current_user->id);
$rate_symbol = getCurrencySymbolandCRate($currencyid);
$rate = $rate_symbol['rate'];
if (isset($_REQUEST['record']) && $_REQUEST['record'] != '') {
    $focus->id = $record;
    $focus->mode = 'edit';
    $focus->retrieve_entity_info($record, 'PurchaseOrder');
    $focus->name = $focus->column_fields['subject'];
Пример #12
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 'Smarty_setup.php';
require_once 'include/utils/utils.php';
global $app_strings, $mod_strings, $theme, $currentModule;
$focus = CRMEntity::getInstance($currentModule);
$smarty = new vtigerCRM_Smarty();
//added to fix the issue4600
$searchurl = getBasic_Advance_SearchURL();
$smarty->assign("SEARCH", $searchurl);
//4600 ends
if (isset($_REQUEST['record']) && $_REQUEST['record'] != '') {
    $focus->id = $_REQUEST['record'];
    $focus->mode = 'edit';
    $focus->retrieve_entity_info($_REQUEST['record'], "Vendors");
    $focus->name = $focus->column_fields['vendorname'];
}
if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
    $focus->id = "";
    $focus->mode = '';
}
if (empty($_REQUEST['record']) && $focus->mode != 'edit') {
    setObjectValuesFromRequest($focus);
Пример #13
0
 * 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): ______________________________________.
 ********************************************************************************/
require_once 'Smarty_setup.php';
require_once "data/Tracker.php";
require_once 'include/logging.php';
require_once 'include/ListView/ListView.php';
require_once 'include/utils/utils.php';
global $app_strings, $default_charset;
global $currentModule, $current_user;
global $theme, $adb;
$url_string = '';
$smarty = new vtigerCRM_Smarty();
if (!isset($where)) {
    $where = "";
}
$parent_tab = getParentTab();
$smarty->assign("CATEGORY", $parent_tab);
$url = '';
$popuptype = '';
$popuptype = vtlib_purify($_REQUEST["popuptype"]);
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme);
$smarty->assign("THEME_PATH", $theme_path);
$smarty->assign("MODULE", $currentModule);
Пример #14
0
function vtEditExpressions($adb, $appStrings, $current_language, $theme, $formodule = '')
{
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    $smarty = new vtigerCRM_Smarty();
    $smarty->assign('APP', $appStrings);
    $mod = array_merge(return_module_language($current_language, 'FieldFormulas'), return_module_language($current_language, 'Settings'));
    $jsStrings = array('NEED_TO_ADD_A' => $mod['NEED_TO_ADD_A'], 'CUSTOM_FIELD' => $mod['LBL_CUSTOM_FIELD'], 'LBL_USE_FUNCTION_DASHDASH' => $mod['LBL_USE_FUNCTION_DASHDASH'], 'LBL_USE_FIELD_VALUE_DASHDASH' => $mod['LBL_USE_FIELD_VALUE_DASHDASH'], 'LBL_DELETE_EXPRESSION_CONFIRM' => $mod['LBL_DELETE_EXPRESSION_CONFIRM']);
    $smarty->assign("JS_STRINGS", Zend_Json::encode($jsStrings));
    $smarty->assign("MOD", $mod);
    $smarty->assign("THEME", $theme);
    $smarty->assign("IMAGE_PATH", $image_path);
    $smarty->assign("MODULE_NAME", 'FieldFormulas');
    $smarty->assign("PAGE_NAME", 'LBL_FIELDFORMULAS');
    $smarty->assign("PAGE_TITLE", 'LBL_FIELDFORMULAS');
    $smarty->assign("PAGE_DESC", 'LBL_FIELDFORMULAS_DESCRIPTION');
    $smarty->assign("FORMODULE", $formodule);
    if (file_exists("modules/{$formodule}/{$formodule}.php")) {
        $focus = CRMEntity::getInstance($formodule);
        $validationArray = split_validationdataArray(getDBValidationData($focus->tab_name, getTabid($formodule)));
        $smarty->assign('VALIDATION_DATA_FIELDNAME', $validationArray['fieldname']);
        $smarty->assign('VALIDATION_DATA_FIELDDATATYPE', $validationArray['datatype']);
        $smarty->assign('VALIDATION_DATA_FIELDLABEL', $validationArray['fieldlabel']);
    }
    $smarty->display(vtlib_getModuleTemplate('FieldFormulas', 'EditExpressions.tpl'));
}
Пример #15
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.
 ************************************************************************************/
require_once 'Smarty_setup.php';
require_once 'data/Tracker.php';
require_once 'include/utils/utils.php';
global $app_strings, $app_list_strings, $mod_strings, $theme, $currentModule;
$module = vtlib_purify($_REQUEST['module']);
$focus = CRMEntity::getInstance($currentModule);
$smarty = new vtigerCRM_Smarty();
//added to fix the issue4600
$searchurl = getBasic_Advance_SearchURL();
$smarty->assign("SEARCH", $searchurl);
//4600 ends
$smarty->assign("UPLOADSIZE", $upload_maxsize / 1000000);
//Convert to MB
$smarty->assign("UPLOAD_MAXSIZE", $upload_maxsize);
if ($_REQUEST['upload_error'] == true) {
    echo '<br><b><font color="red"> ' . $mod_strings['FILE_HAS_NO_DATA'] . '.</font></b><br>';
}
if (isset($_REQUEST['record']) && $_REQUEST['record'] != '') {
    $focus->id = $_REQUEST['record'];
    $focus->mode = 'edit';
    $focus->retrieve_entity_info($_REQUEST['record'], "Documents");
    $focus->name = $focus->column_fields['notes_title'];
Пример #16
0
 if (isset($_REQUEST['record']) && $_REQUEST['record'] != '') {
     $focus->retrieve_entity_info($RECORD, $currentmodule);
     $focus->id = $RECORD;
     $focus->firstname = $focus->column_fields['firstname'];
     $focus->lastname = $focus->column_fields['lastname'];
     $log->debug("id is " . $focus->id);
     $log->debug("name is " . $focus->name);
 }
 global $mod_strings;
 global $app_strings;
 global $theme;
 global $currentModule;
 global $current_user;
 $theme_path = "themes/" . $theme . "/";
 $image_path = $theme_path . "images/";
 $smarty = new vtigerCRM_Smarty();
 if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
     $focus->id = "";
 }
 if (isset($_REQUEST['mode']) && $_REQUEST['mode'] != ' ') {
     $smarty->assign("OP_MODE", vtlib_purify($_REQUEST['mode']));
 }
 if (!$_SESSION['rlvs'][$module]) {
     unset($_SESSION['rlvs']);
 }
 if (isset($_REQUEST['record']) && $_REQUEST['record'] != '') {
     $userid = $current_user->id;
     $sql = "select fieldname from vtiger_field where uitype = '13' and tabid = 7 and vtiger_field.presence in (0,2)";
     $result = $adb->pquery($sql, array());
     $num_fieldnames = $adb->num_rows($result);
     for ($i = 0; $i < $num_fieldnames; $i++) {
Пример #17
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, $theme;
require_once 'Smarty_setup.php';
$focus = CRMEntity::getInstance($currentModule);
$smarty = new vtigerCRM_Smarty();
$category = getParentTab($currentModule);
$record = vtlib_purify($_REQUEST['record']);
$isduplicate = vtlib_purify($_REQUEST['isDuplicate']);
//added to fix the issue4600
$searchurl = getBasic_Advance_SearchURL();
$smarty->assign("SEARCH", $searchurl);
//4600 ends
if ($record) {
    $focus->id = $record;
    $focus->mode = 'edit';
    $focus->retrieve_entity_info($record, $currentModule);
}
if ($isduplicate == 'true') {
    $focus->id = '';
    $focus->mode = '';
}
if (empty($_REQUEST['record']) && $focus->mode != 'edit') {
Пример #18
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, $theme;
require_once 'Smarty_setup.php';
require_once 'include/FormValidationUtil.php';
$focus = CRMEntity::getInstance($currentModule);
$encode_val = vtlib_purify($_REQUEST['encode_val']);
$decode_val = base64_decode($encode_val);
$saveimage = isset($_REQUEST['saveimage']) ? vtlib_purify($_REQUEST['saveimage']) : "false";
$errormessage = isset($_REQUEST['error_msg']) ? vtlib_purify($_REQUEST['error_msg']) : "false";
$image_error = isset($_REQUEST['image_error']) ? vtlib_purify($_REQUEST['image_error']) : "false";
$smarty = new vtigerCRM_Smarty();
$category = getParentTab($currentModule);
$record = $_REQUEST['record'];
$isduplicate = vtlib_purify($_REQUEST['isDuplicate']);
//added to fix the issue4600
$searchurl = getBasic_Advance_SearchURL();
$smarty->assign("SEARCH", $searchurl);
//4600 ends
if ($record) {
    $focus->id = $record;
    $focus->mode = 'edit';
    $focus->retrieve_entity_info($record, $currentModule);
    $product_base_currency = getProductBaseCurrency($focus->id, $currentModule);
} else {
    $product_base_currency = fetchCurrency($current_user->id);
}
Пример #19
0
 * Portions created by vtiger are Copyright (C) vtiger.
 * All Rights Reserved.
 * 
 ********************************************************************************/
require_once 'Smarty_setup.php';
require_once 'include/utils/utils.php';
global $app_strings;
global $mod_strings;
global $app_list_strings;
global $adb;
global $upload_maxsize;
global $theme, $default_charset;
global $current_language, $default_language, $current_user;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$smarty = new vtigerCRM_Smarty();
if (isset($_REQUEST['templateid']) && $_REQUEST['templateid'] != '') {
    $templateid = $_REQUEST['templateid'];
    $sql = "SELECT vtiger_pdfmaker.*, vtiger_pdfmaker_settings.*\n              FROM vtiger_pdfmaker \n              LEFT JOIN vtiger_pdfmaker_settings\n                ON vtiger_pdfmaker_settings.templateid = vtiger_pdfmaker.templateid\n             WHERE vtiger_pdfmaker.templateid=?";
    $result = $adb->pquery($sql, array($templateid));
    $pdftemplateResult = $adb->fetch_array($result);
    $select_module = $pdftemplateResult["module"];
    // $pdf_language = $pdftemplateResult["pdf_language"];
    $select_format = $pdftemplateResult["format"];
    $select_orientation = $pdftemplateResult["orientation"];
    //$select_encoding = $pdftemplateResult["encoding"];
} else {
    $templateid = "";
    if (isset($_REQUEST["return_module"]) && $_REQUEST["return_module"] != "") {
        $select_module = $_REQUEST["return_module"];
    } else {
Пример #20
0
 * Portions created by vtiger are Copyright (C) vtiger.
 * All Rights Reserved.
 ********************************************************************************/
global $theme, $mod_strings, $current_language, $currentModule, $current_user, $app_strings;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
require_once "modules/Calendar/calendarLayout.php";
require_once 'include/utils/utils.php';
require_once "modules/Calendar/Calendar.php";
require_once 'include/logging.php';
$cal_log =& LoggerManager::getLogger('calendar');
$cal_log->debug("In CalendarAjax file");
$mysel = vtlib_purify($_REQUEST['view']);
if ($_REQUEST['file'] == 'OpenListView') {
    require_once 'Smarty_setup.php';
    $smarty = new vtigerCRM_Smarty();
    require_once "modules/Calendar/OpenListView.php";
    $smarty->assign("APP", $app_strings);
    $smarty->assign("IMAGE_PATH", $image_path);
    if ($_REQUEST['mode'] == '0') {
        $activities[0] = getPendingActivities(0);
        $smarty->assign("ACTIVITIES", $activities);
        $smarty->display("upcomingActivities.tpl");
    } else {
        if ($_REQUEST['mode'] == '1') {
            $activities[1] = getPendingActivities(1);
            $smarty->assign("ACTIVITIES", $activities);
            $smarty->display("pendingActivities.tpl");
        }
    }
    die;
Пример #21
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 'modules/Settings/MailScanner/core/MailScannerInfo.php';
require_once 'Smarty_setup.php';
require_once 'vtlib/Vtiger/Cron.php';
global $app_strings, $mod_strings, $currentModule, $theme, $current_language;
global $application_unique_key;
// defined in config.inc.php
$smarty = new vtigerCRM_Smarty();
$smarty->assign("MOD", return_module_language($current_language, 'Settings'));
$smarty->assign("CMOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", "themes/{$theme}/images/");
$scanners = Vtiger_MailScannerInfo::listAll();
$smarty->assign("SCANNERS", $scanners);
$smarty->assign("APP_KEY", $application_unique_key);
$smarty->assign("CRON_TASK", Vtiger_Cron::getInstance('MailScanner'));
$smarty->display('MailScanner/MailScannerInfo.tpl');
Пример #22
0
require_once 'include/utils/utils.php';
require_once 'user_privileges/default_module_view.php';
global $mod_strings, $app_strings, $theme, $currentModule, $singlepane_view;
$focus = CRMEntity::getInstance($currentModule);
if (isset($_REQUEST['record']) && isset($_REQUEST['record'])) {
    $focus->retrieve_entity_info($_REQUEST['record'], "SalesOrder");
    $focus->id = $_REQUEST['record'];
    $focus->name = $focus->column_fields['subject'];
}
if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
    $focus->id = "";
}
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$log->info("SalesOrder detail view");
$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("PRINT_URL", "phprint.php?jt=" . session_id() . $GLOBALS['request_string']);
if (isset($focus->name)) {
    $smarty->assign("NAME", $focus->name);
} else {
    $smarty->assign("NAME", "");
}
$smarty->assign("BLOCKS", getBlocks($currentModule, "detail_view", '', $focus->column_fields));
$smarty->assign("UPDATEINFO", updateInfo($focus->id));
$smarty->assign("CUSTOMFIELD", $cust_fld);
$smarty->assign("ID", vtlib_purify($_REQUEST['record']));
$salesorder_no = getModuleSequenceNumber($currentModule, vtlib_purify($_REQUEST['record']));
Пример #23
0
    $login_password = trim(vtlib_purify($_REQUEST['login_password']), '"\'');
} else {
    $login_password = $default_password;
    $_session['login_password'] = $login_password;
}
if (isset($_SESSION["login_error"])) {
    $login_error = $_SESSION['login_error'];
}
require_once 'Smarty_setup.php';
require_once "data/Tracker.php";
require_once "include/utils/utils.php";
require_once 'vtigerversion.php';
global $currentModule, $moduleList, $adb, $vtiger_current_version;
$image_path = "include/images/";
$app_strings = return_application_language('en_us');
$smarty = new vtigerCRM_Smarty();
$smarty->assign("APP", $app_strings);
if (isset($app_strings['LBL_CHARSET'])) {
    $smarty->assign("LBL_CHARSET", $app_strings['LBL_CHARSET']);
} else {
    $smarty->assign("LBL_CHARSET", $default_charset);
}
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("PRINT_URL", "phprint.php?jt=" . session_id() . (isset($GLOBALS['request_string']) ? $GLOBALS['request_string'] : ''));
$smarty->assign("VTIGER_VERSION", $vtiger_current_version);
// We check if we have the two new logo fields > if not we create them
$cnorg = $adb->getColumnNames('vtiger_organizationdetails');
if (!in_array('faviconlogo', $cnorg)) {
    $adb->query('ALTER TABLE `vtiger_organizationdetails` ADD `frontlogo` VARCHAR(150) NOT NULL, ADD `faviconlogo` VARCHAR(150) NOT NULL');
}
$sql = "select * from vtiger_organizationdetails";
Пример #24
0
$profilename = vtlib_purify($_REQUEST['profile_name']);
if (isset($_REQUEST['dup_check']) && $_REQUEST['dup_check'] != '') {
    $query = 'select profilename from vtiger_profile where profilename=?';
    $result = $adb->pquery($query, array($profilename));
    if ($adb->num_rows($result) > 0) {
        echo $mod_strings['LBL_PROFILENAME_EXIST'];
        die;
    } else {
        echo 'SUCCESS';
        die;
    }
}
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$smarty = new vtigerCRM_Smarty();
if (isset($_REQUEST['parent_profile']) && $_REQUEST['parent_profile'] != '') {
    $smarty->assign("PARENT_PROFILE", vtlib_purify($_REQUEST['parent_profile']));
}
if (isset($_REQUEST['radio_button']) && $_REQUEST['radio_button'] != '') {
    $smarty->assign("RADIO_BUTTON", vtlib_purify($_REQUEST['radio_button']));
}
if (isset($_REQUEST['profile_name']) && $_REQUEST['profile_name'] != '') {
    $smarty->assign("PROFILE_NAME", vtlib_purify($_REQUEST['profile_name']));
}
if (isset($_REQUEST['profile_description']) && $_REQUEST['profile_description'] != '') {
    $smarty->assign("PROFILE_DESCRIPTION", vtlib_purify($_REQUEST['profile_description']));
}
if (isset($_REQUEST['mode']) && $_REQUEST['mode'] != '') {
    $smarty->assign("MODE", vtlib_purify($_REQUEST['mode']));
}
Пример #25
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 'Smarty_setup.php';
require_once 'include/CustomFieldUtil.php';
require_once 'include/utils/UserInfoUtil.php';
require_once 'include/utils/utils.php';
require_once 'modules/PickList/PickListUtils.php';
global $mod_strings, $app_strings, $log, $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
require_once 'modules/Vtiger/layout_utils.php';
$smarty = new vtigerCRM_Smarty();
$subMode = vtlib_purify($_REQUEST['sub_mode']);
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme);
$smarty->assign("JS_DATEFORMAT", parse_calendardate($app_strings['NTC_DATE_FORMAT']));
if ($subMode == 'updateFieldProperties') {
    updateFieldProperties();
} elseif ($subMode == 'deleteCustomField') {
    deleteCustomField();
} elseif ($subMode == 'changeOrder') {
    changeFieldOrder();
} elseif ($subMode == 'addBlock') {
    $duplicate = addblock();
} elseif ($subMode == 'deleteCustomBlock') {
    deleteBlock();
Пример #26
0
 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
 * All Rights Reserved.
 * Contributor(s): ______________________________________..
 ********************************************************************************/
require_once 'Smarty_setup.php';
require_once 'data/Tracker.php';
require_once 'modules/Users/Users.php';
require_once 'include/utils/UserInfoUtil.php';
require_once 'modules/Users/Forms.php';
require_once 'include/database/PearDatabase.php';
require_once 'modules/Leads/ListViewTop.php';
global $app_strings;
global $app_list_strings;
global $mod_strings;
global $currentModule, $default_charset;
$smarty = new vtigerCRM_Smarty();
$focus = new Users();
if (isset($_REQUEST['record']) && isset($_REQUEST['record'])) {
    $smarty->assign("ID", vtlib_purify($_REQUEST['record']));
    $mode = 'edit';
    if (!is_admin($current_user) && $_REQUEST['record'] != $current_user->id) {
        die("Unauthorized access to user administration.");
    }
    $focus->retrieve_entity_info(vtlib_purify($_REQUEST['record']), 'Users');
    $smarty->assign("USERNAME", getFullNameFromArray('Users', $focus->column_fields));
} else {
    $mode = 'create';
}
if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
    $focus->id = "";
    $focus->user_name = "";
Пример #27
0
<?php

/*********************************************************************************
 * The content of this file is subject to the Calendar4You Free license.
 * ("License"); You may not use this file except in compliance with the License
 * The Initial Developer of the Original Code is IT-Solutions4You s.r.o.
 * Portions created by IT-Solutions4You s.r.o. are Copyright(C) IT-Solutions4You s.r.o.
 * All Rights Reserved.
 ********************************************************************************/
require_once 'Smarty_setup.php';
require_once "include/utils/utils.php";
require_once 'modules/Calendar4You/Calendar4You.php';
global $mod_strings, $app_strings, $theme, $currentModule, $adb;
$smarty = new vtigerCRM_Smarty();
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme);
$Calendar4You = new Calendar4You();
$permissions = $Calendar4You->GetProfilesPermissions();
$profilesActions = $Calendar4You->GetProfilesActions();
$actionEDIT = getActionid($profilesActions["EDIT"]);
$actionDETAIL = getActionid($profilesActions["DETAIL"]);
$actionDELETE = getActionid($profilesActions["DELETE"]);
if (isset($_REQUEST["mode"]) && $_REQUEST["mode"] == "save") {
    foreach ($permissions as $profileid => $subArr) {
        foreach ($subArr as $actionid => $perm) {
            $sql = "DELETE FROM its4you_calendar4you_profilespermissions WHERE profileid = ? AND operation = ?";
            $adb->pquery($sql, array($profileid, $actionid));
            if (isset($_REQUEST["priv_chk_" . $profileid . "_" . $actionid]) && $_REQUEST["priv_chk_" . $profileid . "_" . $actionid] == "on") {
                $params = array($profileid, $actionid, "0");
            } else {
Пример #28
0
    header("Location:index.php?action=DetailView&module={$currentmodule}&record={$RECORD}&parenttab={$category}");
} else {
    $focus = CRMEntity::getInstance($currentmodule);
    if (isset($_REQUEST['record']) && $_REQUEST['record'] != '') {
        $focus->retrieve_entity_info($RECORD, $currentmodule);
        $focus->id = $RECORD;
        $focus->name = $focus->column_fields['accountname'];
        $log->debug("id is " . $focus->id);
        $log->debug("name is " . $focus->name);
    }
    global $mod_strings;
    global $app_strings;
    global $theme, $currentModule;
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    $smarty = new vtigerCRM_Smarty();
    if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
        $focus->id = "";
    }
    if (isset($_REQUEST['mode']) && $_REQUEST['mode'] != ' ') {
        $smarty->assign("OP_MODE", vtlib_purify($_REQUEST['mode']));
    }
    if (!$_SESSION['rlvs'][$module]) {
        unset($_SESSION['rlvs']);
    }
    // Module Sequence Numbering
    $mod_seq_field = getModuleSequenceField($currentModule);
    if ($mod_seq_field != null) {
        $mod_seq_id = $focus->column_fields[$mod_seq_field['name']];
    } else {
        $mod_seq_id = $focus->id;
Пример #29
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 'Smarty_setup.php';
global $mod_strings, $app_strings, $theme, $adb;
$smarty = new vtigerCRM_Smarty();
$module = vtlib_purify($_REQUEST['formodule']);
$menu_array = array();
$menu_array['CustomFields']['location'] = 'index.php?module=Settings&action=CustomFieldList&parenttab=Settings&formodule=' . $module;
$menu_array['CustomFields']['image_src'] = vtiger_imageurl('orgshar.gif', $theme);
$menu_array['CustomFields']['desc'] = getTranslatedString('LBL_USER_CUSTOMFIELDS_DESCRIPTION', 'Users');
$menu_array['CustomFields']['label'] = getTranslatedString('LBL_USER_CUSTOMFIELDS', 'Users');
//add blanks for 3-column layout
$count = count($menu_array) % 3;
if ($count > 0) {
    for ($i = 0; $i < 3 - $count; $i++) {
        $menu_array[] = array();
    }
}
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("IMAGE_PATH", "themes/{$theme}/images/");
$smarty->assign('MODULE', $module);
$smarty->assign('MODULE_LBL', getTranslatedString($module));
global $mod_strings, $app_strings, $currentModule, $current_user, $theme, $singlepane_view;
$category = getParentTab();
$action = vtlib_purify($_REQUEST['action']);
$record = vtlib_purify($_REQUEST['record']);
$isduplicate = vtlib_purify($_REQUEST['isDuplicate']);
$parenttab = getParentTab();
if ($singlepane_view == 'true' && $action == 'CallRelatedList') {
    header("Location:index.php?action=DetailView&module={$currentModule}&record={$record}&parenttab={$parenttab}");
} else {
    $tool_buttons = Button_Check($currentModule);
    $focus = CRMEntity::getInstance($currentModule);
    if ($record != '') {
        $focus->retrieve_entity_info($record, $currentModule);
        $focus->id = $record;
    }
    $smarty = new vtigerCRM_Smarty();
    if ($isduplicate == 'true') {
        $focus->id = '';
    }
    if (isset($_REQUEST['mode']) && $_REQUEST['mode'] != ' ') {
        $smarty->assign("OP_MODE", vtlib_purify($_REQUEST['mode']));
    }
    if (!$_SESSION['rlvs'][$currentModule]) {
        unset($_SESSION['rlvs']);
    }
    // Identify this module as custom module.
    $smarty->assign('CUSTOM_MODULE', true);
    $smarty->assign('APP', $app_strings);
    $smarty->assign('MOD', $mod_strings);
    $smarty->assign('MODULE', $currentModule);
    // TODO: Update Single Module Instance name here.