// identify visitor if(!empty($visitor_id) && (false === $db->selectValue("select Visitor_ID from {$tblPref}Visitor where Visitor_ID = ".$visitor_id))) unset($visitor_id); if(empty($visitor_id)) { $ip = getIP(); $visitor_id = $db->selectValue( "select Visitor_ID ". "from {$tblPref}Visitor ". "where IP = '$ip'" ); if(false === $visitor_id) { $visitor_id = $db->insert( "{$tblPref}Visitor", array("IP" => $ip) ); //debug("New visitor detected: '$ip' => $visitor_id"); } //else debug("Identified visitor by IP: $ip"); } //else debug("Identified visitor by cookie: $visitor_id"); // save visitor_id in cookies setcookie("visitor_id", $visitor_id, time()+12*30*86400); // identify referer if exists if(!empty($HTTP_REFERER) && !preg_match("`".__CFG_MAIN_HTTP_ROOT."`", $HTTP_REFERER)) { $referer_id = $db->selectValue( "select Referer_ID ". "from {$tblPref}Referer ". "where Referer = lower('$HTTP_REFERER')" ); if(false === $referer_id) $referer_id = $db->execute( "insert into {$tblPref}Referer (Referer) ". "values (lower('$HTTP_REFERER'))" ); } else $referer_id = 0; // save visit data if(!$sid->assigned("visit_id")) $sid->assign( "visit_id", $db->insert( "{$tblPref}Visit", array( "Visitor_ID" => $visitor_id, "Referer_ID" => $referer_id, "VisitDateTime" => date("Y-m-d H:i:s") ) ) ); // retrieve subjects list $tpl->assign( "subjects", $db->selectValues( "select t.Translation, sb.Subject_ID ". "from {$tblPref}Subject sb, ". "{$tblPref}StrConst s, {$tblPref}StrConstTranslation t ". "where s.Index_ID = sb.Subject_ID ". "and s.VarName = 'Subject' ". "and s.Constant_ID = t.Constant_ID ". "and t.Encoding_ID = ".$encoding_id." ". "order by t.Translation", "Subject_ID" ) ); $tpl->assign("search_for", empty($search_for) ? "" : $search_for); $tpl->assign("search_subject", empty($search_subject) ? 0 : $search_subject); // get member points balance if($sid->assigned("user")) $tpl->assign( "points_left", $db->selectValue( "select Points ". "from {$tblPref}Member ". "where Member_ID = ".$sid->fetch_property("user", "Member_ID") ) ); // process login notifications $tpl->assign( "username", $sid->assigned("username") ? $sid->fetch("username") : (empty($_COOKIE[$area."_username"]) ? "" : $_COOKIE[$area."_username"]) ); if($sid->assigned("username")) $sid->unassign("username"); $tpl->assign( "password", empty($_COOKIE[$area."_password"]) ? "" : $_COOKIE[$area."_password"] ); $tpl->assign("login_notice", $sid->assigned("login_notice") ? $sid->fetch("login_notice") : ""); if($sid->assigned("login_notice")) $sid->unassign("login_notice"); $scroller_ads = empty($scroller_ads) ? 0 : $scroller_ads; if($scroller_ads<3) { $tpl->assign('show_scroller_ads', 1); setcookie('scroller_ads', ++$scroller_ads, time()+1296000, "/"); // 15 days } include_once(__CFG_PATH_SRC.$pg.".".$act.".php"); ?> Slinkoju.lv - Sazinieties ar mums!
Slinkoju.lv
Meklēt 

Temats   





Sazinieties ar mums!
Cienījamais viesi,
Slinkoju.lv komandas ikdienas darba pamatā ir atvieglot un padarīt Jums ērtāku visu mūsu mājaslapā piedāvāto pakalpojumu izmantošanu. Mēs darām visu iespējamo, lai attīstītu un uzlabotu šo lapu, tāpēc mums ir svarīgi uzklausīt Jūsu viedokli. Mēs būtu pateicīgi, ja Jūs mums nosūtītu e-pasta vēstuli, darot mums zināmu, kas Jums patika vai nepatika mūsu mājaslapā, un norādot, kādi uzlabojumi būtu veicami. Mēs novērtējam katru viedokli vai vērtējumu, lai kāds arī tas būtu.
Ar cieņu,
Slinkoju.lv komanda.
Jūsu e-pasta adrese
Jūsu komentāri


Pirmdiena Novembris 19, 2018