/home/techb158/immovalet.ca/Client
NameSizeModeActions
CVUploadedFiles/-0777rm
img/-0777rm
Inc/-0777rm
stripe-php/-0777rm
alertes_jumelages.php56570666editdlrm
archives_cv.php57380666editdlrm
authorizedpage.php12160666editdlrm
counter.php35130666editdlrm
CV_Upload.php41800666editdlrm
dashboard.php101410666editdlrm
footer.php24400666editdlrm
head.php33190666editdlrm
header.php11620666editdlrm
mes_applications.php79700666editdlrm
mes_factures.php77100666editdlrm
mes_produits.php65510666editdlrm
mes_rapports.php62390666editdlrm
modifier_profil.php222950666editdlrm
plan_valeurs.php75720666editdlrm
plan_valeurs_checkout.php86120666editdlrm
print_invoice.php45830666editdlrm
removefile.php12010666editdlrm
submit_checkout.php41430666editdlrm
upload.php22690666editdlrm
Edit: /home/techb158/immovalet.ca/Client/counter.php (3513B)
query($querys); while($row = $results->fetch_assoc()) { $totalhits = $row['totalhits']; } // ######################################################## // ######### check if counter exsist and update ########### // ######################################################## if(mysqli_num_rows(mysqli_query($mysqli,"SELECT page FROM $dbtablehits WHERE page = '$page'"))) { $totalhits++; //A counter for this page already exsists. Now we have to update it. $updatecounter = mysqli_query($mysqli,"UPDATE $dbtablehits SET count = '$totalhits' WHERE page = '$page'"); if (!$updatecounter) { die ("Can't update the counter : " . mysqli_error()); // remove ? } } else { // This page did not exsist in the counter database. A new counter must be created for this page. $insert = mysqli_query($mysqli,"INSERT INTO $dbtablehits (page, count)VALUES ('$page', '1')"); if (!$insert) { die ("Can\'t insert into $dbtablehits : " . mysqli_error()); // remove ? } } // #################################################### // ######### add IP and user-agent and time ########### // #################################################### // gather user data $ip= $_SERVER["REMOTE_ADDR"]; $agent =$_SERVER["HTTP_USER_AGENT"]; $datetime =date("Y/m/d") . ' ' . date('H:i:s') ; if(!mysqli_num_rows(mysqli_query($mysqli,"SELECT ip_address FROM info WHERE ip_address = '$ip'"))) // check if the IP is in database { // if not , add it. $adddata = mysqli_query($mysqli,"INSERT INTO $dbtableinfo (ip_address, user_agent, datetime) VALUES('$ip' , '$agent','$datetime' ) ") ; if (!$adddata) { die('Could not add IP : ' . mysqli_error()); // remove ? } } // *************************************************************** // ** delete the first entry in $dbtableinfo if rows > $maxrows ** // *************************************************************** mysqli_close($mysqli); } ?>