Exemplo n.º 1
0
}
// Tracking
if (empty($sid) || $mode == "login" || $mode == "dlogin") {
    $first_sign = "t";
} else {
    $first_sign = "f";
}
$sql = "DELETE FROM tracking WHERE calltime+'" . 24 * $logday . ":00'<now();";
$sql .= "INSERT INTO tracking (serial,id,ip,url,uri,ref,agent,firstsign,calltime) values (";
$sql .= "'" . $sid . "',";
$sql .= "'" . $login_id . "',";
$sql .= "'" . $remote_addr . "',";
$sql .= "'" . db_textsafe(textsafe(mb_convert_encoding($script_name, "EUC-JP"))) . "',";
$sql .= "'" . db_textsafe(textsafe(mb_convert_encoding($request_uri, "EUC-JP"))) . "',";
$sql .= "'" . db_textsafe(textsafe(mb_convert_encoding($referer, "EUC-JP"))) . "',";
$sql .= "'" . db_textsafe(textsafe(mb_convert_encoding($user_agent, "EUC-JP"))) . "',";
$sql .= "'" . $first_sign . "',";
$sql .= "'now()')";
print "<!--";
pg_query($conn, "BEGIN;" . $sql . ";COMMIT;");
print "-->";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML lang="ja-JP">
<HEAD>
<!--・-->
<TITLE>PENGUIN OFFICE</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=EUC-JP">
<META http-equiv="page-exit" content="BlendTrans(Duration=0.2)">
<?php 
#  if ($refresh and sizeof($headerr)==0) {
Exemplo n.º 2
0
     // 60日間以前のログを削除
     $lastseqno = get_last("users_location", "seqno", "user_id='" . $login_id . "'", 0);
     $seqno = $lastseqno + 1;
     $code = $_GET["location"];
     $text = get_first("locations", "name", "id=" . $code, "");
     if ($lastseqno > 0) {
         $lastcode = get_first("users_location", "code", "user_id='" . $login_id . "' AND seqno=" . $lastseqno, 0);
     } else {
         $lastcode = "";
     }
     if ($lastcode != $code) {
         $sql = "INSERT INTO users_location (seqno,user_id,code,text,updatestamp) VALUES (";
         $sql .= $seqno . ",";
         $sql .= "'" . $login_id . "',";
         $sql .= "'" . $code . "',";
         $sql .= "'" . db_textsafe($text) . "',";
         $sql .= "'now'";
         $sql .= ")";
         $res = pg_query($conn, $sql);
     }
 }
 // ユーザー情報の取得
 $sql_user = "******" . $login_id . "'";
 $res_user = pg_query($conn, $sql_user);
 $cnt_user = pg_num_rows($res_user);
 if ($cnt_user > 0) {
     $row_user = pg_fetch_array($res_user, 0);
     // 自身の情報獲得
     $users[$login_id] = $row_user["name_ryaku"];
     $mygroup = $row_user["mygroup"];
     // 秘書(受け)の情報獲得