miren tengo...
class/sso.php
Código PHP:
doquery( $QryUpdateUser, 'urs' );
doquery("UPDATE {{table}} SET $resource[$Selected] = '".time()."' WHERE id_ow='". $CurrentUser['id'] ."'","od_t");
Código PHP:
include($root . 'sf/sts.' . $phpEx);
$del = time();
$del +=(-7 * 24 * 60 * 60);
$odi = array("dn1","dn2");
foreach($odi as $od){
$busqueda=doquery("SELECT id_ow FROM {{table}} WHERE ".$od." < '".$del."' AND ".$od." !='0'","od_t");
while($res=mysql_fetch_array($busqueda)){
doquery("UPDATE {{table}} SET ".$od." = ".$od."-1 WHERE id='".$res['id_ow']."' AND ".$od." > '0'","urs");
doquery ("UPDATE {{table}} SET $od ='".time()."' WHERE id_ow = '".$res['id_ow']."'","od_t");
}
}
alguna idea :S?