Skip to main content

Posts

Showing posts from September, 2019

Jquery check date after today

checkBirhdayAndApplicationDate : function () { jQuery ( '#Candidates_editView_fieldName_date_of_birth' ). on ( 'change' , function (e) { jQuery ( '#testBirthday' ). text ( '' ); var birthdayDateString = jQuery ( '#Candidates_editView_fieldName_date_of_birth' ). val (); var birthdayDate = new Date( birthdayDateString . replace ( /(\d{2})-(\d{2})-(\d{4})/ , "$2/$1/$3" ) ); var today = new Date(); var birthday_int = Date. parse ( birthdayDate ); var today_int = Date. parse ( today ); if ( birthday_int > today_int ) { jQuery ( '#testBirthday' ). text ( 'You can not enter Birthday date in the future!.' ); } }); // jQuery('#Candidates_editView_fieldName_application_date').on('change',function (e) { // jQuery('#testApplicationDate').text(''); // var applicationDateString = jQuery('#Candi...

What is an SMTP server

The acronym  SMTP  stands for  Simple Mail Transfer Protocol , the procedure behind the email flow on the internet. What happens when you send out an email? The process of email delivery is actually quite similar to classical mail: an organized system takes care of your envelope and through a series of steps it drops it off to your recipient. In this process, the  SMTP server  is simply a  computer running SMTP , and which acts more or less like the postman. Once the messages have been picked up they are sent to this server, which takes care of concretely delivering emails to their recipients.

Check String in String and push content to end file

Check String in String and push content to end file $menu_data = @ file_get_contents ( 'layouts/v7/modules/Vtiger/partials/SidebarAppMenu.tpl' ); $txt = " \n <script type= \" text/javascript \" > jQuery ( document ). ready (function () { var app_menu = jQuery ( \" #app-menu \" ); var hrm_menu = app_menu . find ( \" #HRM_modules_dropdownMenu \" ); hrm_menu . attr ('data-default-url','index.php?module=Employee&view=Index&app=HRM'); }); </script>" ; if ( strpos ( $menu_data , $txt ) === false ){ $myfile = @ file_put_contents ( 'layouts/v7/modules/Vtiger/partials/SidebarAppMenu.tpl' , $txt . PHP_EOL , FILE_APPEND | LOCK_EX ); echo "Push ok !" ; }