GIF89a;
Direktori : /home/serb/public_html/ |
Current File : /home/serb/public_html/getuserid.php |
<? session_start(); include("lib/globals.php"); include("lib/common.php"); include("lib/functions.php"); $id = $_GET[q]; $yourdatetime = date('YmdHis'); $sql_postad="select * from escort_details where id='$id' and status='a'"; $res_postad=execute_query($sql_postad); $num_postad=mysql_num_rows($res_postad); $row_postad=mysql_fetch_array($res_postad); if($row_postad['ft_ad_status']=='Yes') { $todaydate=date('Y-m-d'); $exp=$row_postad['ft_ad_expair']; if($todaydate>$exp) { $new_time = date("YmdHis", strtotime('+2 hours')); echo 'You are now available for the next 2 hours'; } else { $new_time = date("YmdHis", strtotime('+4 hours')); echo 'You are now available for the next 4 hours'; } } else { $new_time = date("YmdHis", strtotime('+2 hours')); echo 'You are now available for the next 2 hours'; } $img = 'images/online.gif'; $sql="UPDATE escort_details SET online_img='$img',start_time='$yourdatetime',end_time='$new_time' WHERE id='$id' "; execute_query($sql); ?>