Exemplo n.º 1
0
<?php

include "../include/functions.php";
include "../include/db.php";
include "../include/params.php";
include "../include/dictionary2.php";
opendb();
$userid = Session('user_id');
$recordExists = dlookup("select count(1) from userfirstlogin where userid=" . $userid);
if ($recordExists == 0) {
    $userfirstlogin = query("insert into userfirstlogin (userid, firstlogin) values (" . $userid . ", now())");
}
// return the sotored first login date
$recordDate = dlookup("select firstlogin from userfirstlogin where userid=" . $userid);
$days = DateDiffDays($recordDate, now());
echo json_encode($days);
closedb();
exit;
Exemplo n.º 2
0
        echo dic_("Reports.User");
        ?>
:</strong></span>
    			</td>
    		</tr>
    	</table>
    		
		<?php 
    }
}
$meseci = array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
?>
		
	<?php 
$_datumCnt = $sdG;
while (DateDiffDays($edG, $_datumCnt) < 0) {
    $cnt = 1;
    ?>
		<table width=97% style="padding-left:36px">
            
	        <tr>
	            <td valign="bottom" height="10px" style=" " class="text2" colspan="6">&nbsp;</td>
	        </tr> 

            <?php 
    $sqln_ = "select * from messages where (fromid in (" . $sqlU . ") or toid in (" . $sqlU . ")) and datetime between '" . DateTimeFormat($_datumCnt, "Y-m-d 00:00:00") . "' and '" . DateTimeFormat($_datumCnt, "Y-m-d 23:59:59") . "' order by fromid,checked";
    $dsData = query($sqln_);
    if (pg_num_rows($dsData) > 0) {
        ?>
			<tr >
            	<td valign="bottom" height="29px" style="color:#fff; font-size:14px; border:1px solid #ff6633; background-color:#f7962b; padding-bottom: 5px; padding-left: 10px " class="text2" colspan="6"><strong><?php 
Exemplo n.º 3
0
				</div></td>

					<td id="td-4-<?php 
            echo $cnt;
            ?>
" align="center" class="td-row text2">
			        	<table width=100%>
			        		<tr class="text2">
			        			<td align="center"><?php 
            echo DateTimeFormat($rV["lastregistration"], $dateformat);
            ?>
</td>
			        			<?php 
            $nextReg = DateTimeFormat(date('Y-m-d', strtotime($lastReg . ' + 1 year')), $dateformat);
            $diffDays = DateDiffDays(DateTimeFormat(now(), 'Y-m-d'), date('Y-m-d', strtotime($lastReg . ' + 1 year')));
            $colorReg = "";
            $titleReg = "";
            if ($diffDays < 0) {
                $colorReg = "#FF0000";
                $titleReg = dic_("Fm.RegLess") . " " . number_format(abs($diffDays)) . " " . dic_("Fm.Days_") . ".";
            } else {
                if ($diffDays < 14 and $diffDays > 0) {
                    $colorReg = "#F7962B";
                    $titleReg = dic_("Fm.VehMore") . (number_format($diffDays) - 1) . " " . dic_("Fm.DaysReg");
                } else {
                    if ($diffDays == 0) {
                        $colorReg = "#F7962B";
                        $titleReg = dic_("Fm.RegToday");
                    } else {
                        $colorReg = "#008000";