[Vtigercrm-commits] [vtiger-commits] r4638 - /vtigercrm/trunk/modules/Users/LoginHistory.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Mar 29 02:56:21 EST 2006
Author: saraj
Date: Wed Mar 29 00:56:14 2006
New Revision: 4638
Log:
junk code removed
Modified:
vtigercrm/trunk/modules/Users/LoginHistory.php
Modified: vtigercrm/trunk/modules/Users/LoginHistory.php
==============================================================================
--- vtigercrm/trunk/modules/Users/LoginHistory.php (original)
+++ vtigercrm/trunk/modules/Users/LoginHistory.php Wed Mar 29 00:56:14 2006
@@ -13,8 +13,6 @@
include_once('config.php');
require_once('include/logging.php');
require_once('data/SugarBean.php');
-#require_once('data/CRMEntity.php');
-#require_once('include/utils/utils.php');
require_once('include/logging.php');
require_once('include/ListView/ListView.php');
require_once('include/database/PearDatabase.php');
@@ -58,46 +56,10 @@
var $default_order_by = "login_id";
- function create_tables () {
- /*$query = 'CREATE TABLE '.$this->table_name.' ( ';
- $query .='login_id int(11) NOT NULL auto_increment';
- $query .=', user_name varchar(25) NOT NULL';
- $query .=', user_ip varchar(25) NOT NULL';
- $query .=', login_time datetime NOT NULL default 0';
- $query .=', logout_time datetime NOT NULL default 0';
- $query .=', status enum(\'Signedin\',\'Signedoff\') default \'Signedin\'';
- $query .=', PRIMARY KEY ( login_id ) )';
-
- $this->log->info($query);
-
- mysql_query($query) or die("Error creating table: ".mysql_error());*/
-
- //TODO Clint 4/27 - add exception handling logic here if the table can't be created.
-
- }
-
- function drop_tables () {
- /*
- $query = 'DROP TABLE IF EXISTS '.$this->table_name;
-
- $this->log->info($query);
-
- mysql_query($query);
-
- //TODO Clint 4/27 - add exception handling logic here if the table can't be dropped.
- */
-
- }
-
- function get_summary_text()
- {
- return "$this->first_name $this->last_name";
- }
/** Records the Login info */
function user_login(&$usname,&$usip,&$intime)
{
- //print("GS --> intime=".$intime);
$query = "Insert into loginhistory values (null,'$usname','$usip',null,".$this->db->formatDate($intime).",'Signedin')";
$result = $this->db->query($query)
or die("MySQL error: ".mysql_error());
@@ -109,7 +71,6 @@
{
$logid_qry = "SELECT max(login_id) login_id from loginhistory where user_name='$usname' and user_ip='$usip'";
$result = $this->db->query($logid_qry);
- //if($this->db->num_rows($result) !=1 ) return;
$loginid = $this->db->query_result($result,0,"login_id");
if ($loginid == '')
{
@@ -124,7 +85,6 @@
function create_list_query(&$order_by, &$where)
{
// Determine if the account name is present in the where clause.
- // $query = "SELECT * from loginhistory order by login_time";
global $current_user;
$query = "SELECT user_name,user_ip,".$this->db->getDBDateString("login_time")." login_time,".$this->db->getDBDateString("logout_time")." logout_time,status FROM $this->table_name ";
if($where != "")
@@ -145,17 +105,6 @@
return $query;
}
-
-
- function list_view_pare_additional_sections(&$list_form){
- if(isset($this->yahoo_id) && $this->yahoo_id != '')
- $list_form->parse("main.row.yahoo_id");
- else
- $list_form->parse("main.row.no_yahoo_id");
- return $list_form;
-
- }
-
}
More information about the vtigercrm-commits
mailing list