!_TAG_PROGRAM_NAME Exuberant Ctags //
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
!_TAG_PROGRAM_VERSION 5.9~svn20110310 //
-ConfirmedDelition htdocs/cgi-bin/remove.cgi 132;" s
-DisplayDateDiffs htdocs/cgi-bin/remove.cgi 84;" s
-NotConfirmed htdocs/cgi-bin/remove.cgi 152;" s
-authenticate htdocs/cgi-bin/main.cgi 522;" s
-big_money htdocs/cgi-bin/stats.cgi 105;" s
-boldDate htdocs/cgi-bin/remove.cgi 126;" s
+ConfirmedDelition htdocs/cgi-bin/remove.cgi 151;" s
+DisplayDateDiffs htdocs/cgi-bin/remove.cgi 103;" s
+NotConfirmed htdocs/cgi-bin/remove.cgi 171;" s
+authenticate htdocs/cgi-bin/main.cgi 526;" s
+big_money htdocs/cgi-bin/stats.cgi 126;" s
+boldDate htdocs/cgi-bin/remove.cgi 145;" s
build htdocs/cgi-bin/search.cgi 85;" s
-buildNavigationButtons htdocs/cgi-bin/main.cgi 460;" s
-checkCreateTables htdocs/cgi-bin/login_ctr.cgi 109;" s
-dateDiff htdocs/cgi-bin/remove.cgi 118;" s
-getConfiguration htdocs/cgi-bin/config.cgi 225;" s
-getConfiguration htdocs/cgi-bin/main.cgi 504;" s
-processSubmit htdocs/cgi-bin/config.cgi 127;" s
-processSubmit htdocs/cgi-bin/login_ctr.cgi 85;" s
-processSubmit htdocs/cgi-bin/main.cgi 374;" s
-selSQLTbl htdocs/cgi-bin/login_ctr.cgi 210;" s
-selectSQL htdocs/cgi-bin/stats.cgi 94;" s
+buildNavigationButtons htdocs/cgi-bin/main.cgi 482;" s
+changeSystemSettings htdocs/cgi-bin/config.cgi 339;" s
+checkCreateTables htdocs/cgi-bin/login_ctr.cgi 112;" s
+dateDiff htdocs/cgi-bin/remove.cgi 137;" s
+exportCategoriesToCSV htdocs/cgi-bin/config.cgi 405;" s
+exportLogToCSV htdocs/cgi-bin/config.cgi 375;" s
+getConfiguration htdocs/cgi-bin/config.cgi 317;" s
+getConfiguration htdocs/cgi-bin/main.cgi 569;" s
+getConfiguration htdocs/cgi-bin/remove.cgi 223;" s
+importCatCSV htdocs/cgi-bin/config.cgi 437;" s
+importLogCSV htdocs/cgi-bin/config.cgi 478;" s
+insertDefCats htdocs/cgi-bin/login_ctr.cgi 216;" s
+main htdocs/cgi-bin/login_ctr.cgi 6;" p
+main::checkCreateTables htdocs/cgi-bin/login_ctr.cgi 112;" s
+main::insertDefCats htdocs/cgi-bin/login_ctr.cgi 216;" s
+main::populateConfig htdocs/cgi-bin/login_ctr.cgi 231;" s
+main::processSubmit htdocs/cgi-bin/login_ctr.cgi 86;" s
+main::removeOldSessions htdocs/cgi-bin/login_ctr.cgi 242;" s
+main::selSQLTbl htdocs/cgi-bin/login_ctr.cgi 211;" s
+parseDate htdocs/cgi-bin/main.cgi 383;" s
+populateConfig htdocs/cgi-bin/login_ctr.cgi 231;" s
+processSubmit htdocs/cgi-bin/config.cgi 214;" s
+processSubmit htdocs/cgi-bin/login_ctr.cgi 86;" s
+processSubmit htdocs/cgi-bin/main.cgi 397;" s
+removeOldSessions htdocs/cgi-bin/login_ctr.cgi 242;" s
+selSQLTbl htdocs/cgi-bin/login_ctr.cgi 211;" s
+selectSQL htdocs/cgi-bin/stats.cgi 115;" s
+updConfSetting htdocs/cgi-bin/config.cgi 360;" s
+updateCATDB htdocs/cgi-bin/config.cgi 451;" s
+updateLOGDB htdocs/cgi-bin/config.cgi 494;" s
wanted htdocs/cgi-bin/e_vars.pl 211;" s
cd /home/{user}/thttpd_dev/dbLifeLog
sqlite3 -csv data_log.db "select * from LOG;" > current_log.csv
-##Install LifeLog Independantly
+##Install LifeLog Independently
cd /home/{user}/
git clone https://github.com/wbudic/LifeLog
mkdir /home/{user}/thttpd_dev/dbLifeLog
Access the webserver cgi-bin. http://localhost:8080/cgi-bin/main.cgi
(this might redirect to login.cgi or config.cgi in the future)
-##Install LifeLog Dependatly (not automatic, manual developer way)
+##Install LifeLog Dependetly (not automatic, manual developer way)
cd /home/{user}/
git clone https://github.com/wbudic/LifeLog
run thttpd with:
cd LifeLog; ./startDevWebServer.sh
##Import CSV Exported File
-This requires all CGI working. As it will creat a brand new database for you.
+This requires all CGI working. As it will create a brand new database for you.
Once created you must import the from above example current_log.csv
cd /home/{user}/thttpd_dev/dbLifeLog
see: http://www.sqlitetutorial.net/sqlite-import-csv/
--- /dev/null
+$D = {'_SESSION_CTIME' => 1556077243,'_SESSION_ATIME' => 1556077243,'_SESSION_REMOTE_ADDR' => '127.0.0.1','_SESSION_ID' => '46a0fa1e42f2731eddd3025facc36f0b'};;$D
\ No newline at end of file
--- /dev/null
+$D = {'_SESSION_ID' => '4c84e96b89b816bdfdebc4d767d11f2e','_SESSION_ATIME' => 1556063110,'_SESSION_CTIME' => 1556063110,'_SESSION_REMOTE_ADDR' => '127.0.0.1'};;$D
\ No newline at end of file
--- /dev/null
+$D = {'_SESSION_CTIME' => 1556067062,'_SESSION_ATIME' => 1556067062,'_SESSION_REMOTE_ADDR' => '127.0.0.1','_SESSION_ID' => '71912c3884dcafdddf8f32be1db02ff0','_SESSION_ETIME' => 1800};;$D
\ No newline at end of file
--- /dev/null
+$D = {'_SESSION_REMOTE_ADDR' => '127.0.0.1','_SESSION_CTIME' => 1556086450,'_SESSION_ATIME' => 1556086450,'_SESSION_ID' => '75c1ba723680ab5c079b6e0a63fb45e1'};;$D
\ No newline at end of file
--- /dev/null
+$D = {'_SESSION_ATIME' => 1556089997,'_SESSION_ID' => 'ac5c5da7a235175332d773dbd518bbbb','_SESSION_CTIME' => 1556086450,'_SESSION_ETIME' => 1200,'_SESSION_REMOTE_ADDR' => '127.0.0.1','alias' => 'admin','passw' => '42FAP5H0JUSZM','database' => 'data_admin_log.db'};;$D
\ No newline at end of file
--- /dev/null
+$D = {'_SESSION_ID' => 'f894200ea978de16fca329c976941e4c','_SESSION_CTIME' => 1556082147,'_SESSION_ATIME' => 1556082147,'_SESSION_REMOTE_ADDR' => '127.0.0.1'};;$D
\ No newline at end of file
my $stmS = "SELECT rowid, ID_CAT, DATE, LOG from LOG WHERE";
my $stmE = " ORDER BY DATE DESC, rowid DESC;";
my $tbl = '<form name="frm_log_del" action="remove.cgi" onSubmit="return formDelValidation();">
- <table class="tbl" width="'.$PRC_WIDTH.'%">
- <tr class="r0"><th>Date</th><th>Time</th><th>Log</th><th>Category</th></tr>';
+ <table class="tbl_rem" width="'.$PRC_WIDTH.'%">
+ <tr class="r0"><th class="r0">Date</th> <th class="r0">Time</th><th class="r0">Log</th><th>Category</th></tr>';
my $datediff = $cgi->param("datediff");
my $dt = DateTime::Format::SQLite->parse_datetime( $row[0] );
my $dif = dateDiff($dt_prev, $dt);
$tbl .= '<tr class="r1"><td>'. $dt->ymd . '</td>
- </td><td style="text-align:left;">'.$row[1]."</td></tr>".
+ </td><td style="text-align:left;">'.$row[1]."</td></tr>".
'<tr class="r0"><td colspan="2">'.$dif. '</td> </tr>';
$dt_prev = $dt;
}
my $ct = $hshCats{$row[1]};
my $dt = DateTime::Format::SQLite->parse_datetime( $row[2] );
- $tbl = $tbl . '<tr class="r1"><td>'. $dt->ymd . "</td>" .
- "<td>" . $dt->hms . "</td>" . "<td>" . $row[3] . "</td>\n".
- "<td>" . $ct. '<input type="hidden" name="chk" value="'.$row[0].'"></td></tr>';
+ $tbl = $tbl . '<tr class="r1"><td class="r1">'. $dt->ymd . "</td>" .
+ '<td class="r1">' . $dt->hms . "</td>" .
+ '<td class="r1"><b>' . $row[3] . "</b></td>\n".
+ '<td>' . $ct. '<input type="hidden" name="chk" value="'.$row[0].'"></td></tr>';
$r_cnt++;
}
my $plural = "";
$hardware_status =~ s/\n/<br\/>/g;
$hardware_status =~ s/Memory:/<b>Memory:/g;
$hardware_status =~ s/Init:/<\/b>Initial:/g;
+$hardware_status =~ s/up\s/<b>Server is up: /g;
+$hardware_status .= '</b>';
my $prc = 'ps -eo size,pid,user,command --sort -size | awk \'{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }\'';
--- /dev/null
+#!/usr/bin/perl
+#
+# Programed in vim by: Will Budic
+# Open Source License -> https://choosealicense.com/licenses/isc/
+#
+use strict;
+use warnings;
+
+our $LOG_PATH = '/home/will/dev/LifeLog/dbLifeLog/';
+
+&removeOldSessions;
+
+sub removeOldSessions{
+ opendir(DIR, $LOG_PATH);
+ my @files = grep(/cgisess_*/,readdir(DIR));
+ closedir(DIR);
+
+ my $now = time - (24 * 60 * 60);
+
+ foreach my $file (@files) {
+ my $mod = (stat("$LOG_PATH/$file"))[9];
+ if($mod<$now){
+ print "$file\n";
+ }
+ }
+}
\ No newline at end of file
padding-left: 5px;
}
+.tbl_rem {
+ border: 1px solid black;
+ border-right: 1px solid black;
+ border-bottom: 1px solid black;
+ padding-top: 5px;
+ padding-right: 5px;
+ padding-bottom: 5px;
+ padding-left: 5px;
+ text-align: left;
+}
+
.r0 {
background-color: #e6ffff;
border: 1px solid black;
+ border-right: 1px solid black;
}
.r1 {
background-color: #ccffff;
+ border: 1px solid black;
+ border-right: 1px solid black;
}
.edit {
# This section overrides defaults
-dir=/home/will/dev/LifeLog/htdocs
+dir=./htdocs
user=will
logfile=/home/will/dev/LifeLog/log/thttpd.log
-pidfile=/home/will/dev/LifeLog/run/thttpd.pid
+pidfile=thttpd.pid
# This section _documents_ defaults in effect
port=8080
nosymlinkcheck # default = !chroot