>DansTonCode();

Tous les codes sourcespage 58

JavaScript
 16 Juin, 2014 à 12:21
#145
var number = (( (data.firstname != undefined && data.firstname != "") || (data.lastname != undefined && data.lastname != "") ) ? '<span class="name">' + data.firstname + ' ' + data.lastname + (((data.country != undefined) == (data.country != "")) ? ' (' + data.country + ')' : '' ) + ' </span> <br/>' : '' ) + '(' + data.number + ')' + ((data.vid != undefined && data.vid != "") ? '<br/>VID: ' + data.vid : '' );
                    
ActionScript
 16 Juin, 2014 à 10:50
#142
Function calcDatediff(&fromdate As date, &todate As date) Returns number
   Local number &days;
   Local number &fromyear, &frommonth, &fromday;
   Local number &toyear, &tomonth, &today;
   Local date &fromdateTemp, &todateTemp;
   
   If None(&fromdate) Or
         None(&todate) Then
      Return - 1; /* missing inputs */
   End-If;
   
   &fromyear = Year(&fromdate);
   &frommonth = Month(&fromdate);
   &fromday = Day(&fromdate);
   
   &toyear = Year(&todate);
   &tomonth = Month(&todate);
   &today = Day(&todate);
   
   &fromdateTemp = Date3(&fromyear, &frommonth, &fromday);
   &todateTemp = Date3(&toyear, &tomonth, &today);
   
   SQLExec("select %DateDiff(%DateIn(" | Quote(String(&fromdate)) | "), %DateIn(" | Quote(String(&todate)) | ")) from psoptions", &days);
   
   Return &days;
   
End-Function;