]> lifelog.hopto.org Git - LifeLog.git/commitdiff
Public access provided for specific categories.
authorWill Budicm <redacted>
Thu, 26 Nov 2020 00:56:19 +0000 (11:56 +1100)
committerWill Budicm <redacted>
Thu, 26 Nov 2020 00:56:19 +0000 (11:56 +1100)
Current Development Check List.md
dbLifeLog/main.cnf
htdocs/cgi-bin/config.cgi
htdocs/cgi-bin/login_ctr.cgi
htdocs/cgi-bin/main.cgi
htdocs/cgi-bin/system/modules/Settings.pm

index 019f893bd3e8ddd59d80bcd1b877561d92915313..a95e3cb2248983e756851a32ef9e990f9f568302 100644 (file)
@@ -1,16 +1,16 @@
 # Branch Development Life Log in Perl
 
-*This page lists current development and issues being worked on in the LifeLog app. Being in the **Sun** stage, means there is a production environment. And usable, used. When, the project reaches **Earth** stage. It will be at its final specification. No data structures or major new features can be added or requested anymore. Only bug fixes, enhancements and efficiency fixes, if any at the **Earth** stage.*
+*This page lists current development and issues being worked on in the LifeLog app. Being in the **Sun** stage, means there is a production environment. And usable, and in use. When, the project reaches **Earth** stage. It will be at its final specification. No data structures or major new features can be added or requested anymore. Only bug fixes, enhancements and efficiency fixes, if any at the **Earth** stage.*
 
 ## Life Log Development
 
 ### v.2.1 SUN STABLE New Features in Works
 
-* Provide office share link for main.inf linked categories, No login required but not log creation or search is possible.
-* &#10004; Make the dbname uniform across all source types with Settings, as backups use the file format, not the database name.
+* Implement mapped provision of named timezones via main.inf, for towns not available in global list.
+* &#10004; Provide office share public link for main.inf linked categories, No login required but no log creation or search is possible.
+* &#10004; main.inf - Make the dbname uniform across all source types with Settings, as backups use the file format, not the database name.
 * Static pages setting for the pages directory.
 * Search on multiple words should rank by encounter of words specified and display first. (That one is difficult)
-* Search button should be an and on previous views settings. Otherwise lists entries of other categories containing an word.
 * Provide markdown text functionality to html pages. For quick vanilla plain documentation.
 * Auto collapse/expand on multi line logs by 0-none as default. Setting to 1 or more shows only that number of lines. (That one is difficult)
 * &#10004; Edit button to show if hidden is the log entry section.
index 4b78277c4f05dceb799ef9a6b51e1a3eddbe9caa..8ad9efc7ecf8de2b5d8f64de50796c0bad3d2869 100644 (file)
@@ -12,7 +12,7 @@ Credential format:<<AUTO_LOGIN <{alias}/{password}> , don't enable here using AU
 # ProgresSQL DB driver. Remove -> '!' prefix to tag name, to enable.
 <<!DBI_SOURCE<DBI:Pg:host=localhost;>
 
-# Set folowing to an database name, if multiple aliases connect to a single log database.
+# Set following to an database name, if multiple aliases connect to a single log database.
 # Users have to be set, and alias is then used for their userid to be able to login.
 # By default this setting is disabled with 0, making alias, its own log database.
 <<DBI_MULTI_USER_DB<0>
@@ -20,6 +20,12 @@ Credential format:<<AUTO_LOGIN <{alias}/{password}> , don't enable here using AU
 #Timezoning, if set to 1, country locale setting for timezone in config page is ignored.
 <<AUTO_SET_TIMEZONE<0>
 
+# Public, enabled list of categories. Remove -> '!' prefix to tag name, to enable. Be careful what category you add/enable here.
+# Public records view feature only, it doesn't allow new log entries to be added and have pin point searching of all existing.
+<<!PUBLIC_CATS<03,06,09>#File,System log and Event.
+# Following is similar to AUTO_LOGIN setting above, and must be set.
+<<!PUBLIC_LOGIN<admin/admin>
+
 <<CONFIG<4>
 00|$RELEASE_VER = 2.1`LifeLog Application Version.
 01|$REC_LIMIT   = 25`Records shown per page.
index 9e8f14186dd274c416560b72f2f61c3fd2942419..3f2661fdf0c3cf6ca6a8de2545509d0793501fe2 100755 (executable)
@@ -347,14 +347,14 @@ my  $frmPASS = qq(
 
 
 my @backups = ();
-my ($bck_list) ="";
+my ($file, $bck_list) ="";
 opendir my $dir, &Settings::logPath;
-while(my $file = readdir $dir){
+while($file = readdir $dir){
 next if $file eq '.' or $file eq '..' or index ($file , 'bck_') == -1;
   push @backups, $file;
 }
 close $dir;
-foreach my $file (sort @backups){
+foreach $file (sort @backups){
     #my $n = substr $file, length(&Settings::logPath);
     $bck_list .=  "<input name='bck_file' type='radio' value='$file'>$file</input><br>";
 }
index 112868aaea22b9b24ccabdd09c4819a000f484ca..ddf03e536d5e70c9fee51347eeaf6f6a48b28039 100755 (executable)
@@ -131,15 +131,15 @@ sub checkAutologinSet {
     open(my $fh, '<', Settings::logPath().'main.cnf' ) or LifeLogException->throw("Can't open main.cnf: $!");
     while (my $line = <$fh>) {
                 chomp $line;
-                $v = parseAutonom('AUTO_LOGIN',$line);
-                if($v){ @cre = split '/', $v; next}
-                $v = parseAutonom('BACKUP_ENABLED',$line);
-                if($v){ $BACKUP_ENABLED = $v; next}
-                $v = parseAutonom('DBI_SOURCE',$line);
+                $v = Settings::parseAutonom('AUTO_LOGIN',$line);
+                if($v){@cre = split '/', $v; next}
+                $v = Settings::parseAutonom('BACKUP_ENABLED',$line);
+                if($v){$BACKUP_ENABLED = $v; next}
+                $v = Settings::parseAutonom('DBI_SOURCE',$line);
                 if($v){Settings::dbSrc($v); next}
-                $v = parseAutonom('AUTO_SET_TIMEZONE',$line);
+                $v = Settings::parseAutonom('AUTO_SET_TIMEZONE',$line);
                 if($v){$AUTO_SET_TIMEZONE = $v; next}
-                last if parseAutonom('CONFIG',$line); #By specs the config tag, is not an autonom, if found we stop reading. So better be last one spec. in file.
+                last if Settings::parseAutonom('CONFIG',$line); #By specs the config tag, is not an autonom, if found we stop reading. So better be last one spec. in file.
     }
     close $fh;
     if(@cre &&scalar(@cre)>1){
@@ -150,27 +150,18 @@ sub checkAutologinSet {
             $passw = $cre[1] if (!$passw);
             $db = Settings::connectDB($alias, $passw);            
             #check if autologin enabled.
-            my $st = Settings::selectRecords($db,"SELECT VALUE FROM CONFIG WHERE NAME='AUTO_LOGIN';");            
-            my @set = $st->fetchrow_array() if $st;
-            if($set[0]=="1"){
-                    $alias = $cre[0];
-                    $passw = $passw; 
-                    Settings::removeOldSessions();
-            }            
+            my $st = Settings::selectRecords($db,"SELECT VALUE FROM CONFIG WHERE NAME='AUTO_LOGIN';");                        
+            if($st){my @set = $st->fetchrow_array();
+                if($set[0]=="1"){
+                        $alias = $cre[0];
+                        $passw = $passw; 
+                        Settings::removeOldSessions();
+                }
+            }
     }
 
 }
 
-sub parseAutonom { #Parses autonom tag for its crest value, returns undef if tag not found or wrong for passed line.
-    my $t = '<<'.shift.'<';
-    my $line = shift;
-    if(rindex ($line, $t, 0)==0){#@TODO change the following to regex parsing:
-        my $l = length $t;
-        my $e = index $line, ">", $l + 1;
-        return substr $line, $l, $e - $l;
-    }
-    return undef;
-}
 
 sub checkPreparePGDB {
     my $create =1;
index 94b87c34f3c7667f744fac08eb25fa384e80789d..eb616990f997e2cf2dfb3c5e89cad6af4f85e4e4 100755 (executable)
@@ -34,13 +34,14 @@ my $sssCDB  = $sss->param('cdb');
 my ($vmode, $imgw, $imgh );
 
 if ( !$alias ||  !$passw) {
-    print $cgi->redirect("login_ctr.cgi?CGISESSID=$sid");
+    print $cgi->redirect("alogin_ctr.cgi?CGISESSID=$sid");
     exit;
 }
-
 ### Authenticate session to alias passw
     &authenticate;
 #
+
+
 my $log_rc      = 0;
 my $log_rc_prev = 0;
 my $log_cur_id  = 0;
@@ -62,12 +63,12 @@ my $stmS        = $sqlView." WHERE";
 my $stmE        = ' LIMIT '.&Settings::viewAllLimit.';';
 my $stmD        = "";
 my $sm_reset_all;
-my $rec_limit   = &Settings::recordLimit;
+my $rec_limit   = Settings::recordLimit();
 ### Page specific settings Here
-my $TH_CSS      = &Settings::css;
-my $BGCOL       = &Settings::bgcol;
+my $TH_CSS      = Settings::css();
+my $BGCOL       = Settings::bgcol();
 #Set to 1 to get debug help. Switch off with 0.
-my $DEBUG       = &Settings::debug;
+my $DEBUG       = Settings::debug();
 #END OF SETTINGS
 
 my $BUFFER;
@@ -204,6 +205,7 @@ else {    #defaults
 my $st;
 my $sqlCAT = "SELECT ID, NAME, DESCRIPTION FROM CAT ORDER BY ID;";
 my $sqlVWL = "$stmS STICKY = true $stmE";
+my $isPUBViewMode = Settings::pub() && Settings::sqlPubors();
 
 toBuf ("## Using db ->". Settings::dsn(). "\n") if $DEBUG;
 
@@ -244,6 +246,8 @@ for my $key ( keys %hshDesc ) {
         $data_cats .= qq(<meta id="cats[$key]" name="$n" content="$kv">\n);
     }
 }
+my $eh;
+if($isPUBViewMode){$eh = ""}else{$eh='<th>Edit</th>'}
 my $log_output =
 qq(<FORM id="frm_log" action="data.cgi" onSubmit="return formDelValidation();">
 <TABLE class="tbl" border="0" width=").&Settings::pagePrcWidth.qq(%">
@@ -252,14 +256,16 @@ qq(<FORM id="frm_log" action="data.cgi" onSubmit="return formDelValidation();">
        <th>Time</th>
        <th>Log</th><th>#</th>
        <th>Category</th>
-    <th>Edit</th>
+    $eh
 </tr>);
     #We use js+perl, trickery to filter by amount type, as well.
-    if ($prm_aa >0){my $s = $prm_aa - 1;$prm_aa = " AFLAG=$s AND";}else{$prm_aa=""}
+    if($prm_aa >0){my $s = $prm_aa - 1;$prm_aa = " AFLAG=$s AND";}else{$prm_aa=""}
+    if($prm_rtf){$stmS .= " ID_RTF>0 AND";}
 
-    $stmS .= " ID_RTF>0 AND" if($prm_rtf);
-
-    if ( $rs_keys && $rs_keys ne '*' ) {
+    if($isPUBViewMode){
+        $sqlVWL = $stmS." ".Settings::sqlPubors().$stmE;
+    }
+    elsif ( $rs_keys && $rs_keys ne '*' ) {
 
         my @keywords = split / /, $rs_keys;
         if ($prm_vc && $prm_vc != $prm_xc) {
@@ -393,7 +399,7 @@ qq(<FORM id="frm_log" action="data.cgi" onSubmit="return formDelValidation();">
         $sqlVWL = "$stmS STICKY = false $stmE";
         toBuf $cgi->pre("###2 -> ".$sqlVWL)  if $DEBUG;
         ;
-        &buildLog(traceDBExe($sqlVWL));
+        buildLog(traceDBExe($sqlVWL));
     }
 
 
@@ -651,13 +657,15 @@ sub buildLog {
                <td id="v$id" class="log" width="40%">$log</td>
                <td id="a$id" width="10%" class="tbl">$am</td>
                <td id="c$id" width="10%" class="tbl">$ct</td>
+        );
+        if(!$isPUBViewMode){$log_output .= qq(
                <td width="20%">
         <input id="r$id" type="hidden" value="$rtf"/>
         <input id="s$id" type="hidden" value="$sticky"/>
         <input id="f$id" type="hidden" value="$af"/>
                <button class="edit" value="Edit" onclick="return edit($id);">$ssymb</button>
                        <input name="chk" type="checkbox" value="$pid"/>
-               </td></tr>);
+               </td></tr>)};
 
         if ( $rtf > 0 ) {
              $log_output .= qq(<tr id="q-rtf$id" class="r$tfId" style="display:none;">
@@ -727,7 +735,10 @@ if ( $log_rc == 0 ) {
         }else{ $log_output .= '<tr id="brw_row"><td colspan="5"><b>Database is New or Empty!</b></td></tr>'}
     }
 }
+if($isPUBViewMode){
 
+}
+else{
 $log_output .= <<_TXT;
 <tr class="r0" id="brw_row"><td colspan="2">Show All hidden with &#10132;
 <a id="menu_close" href="#" onclick="return showAll();"><span  class="ui-icon ui-icon-heart" style="float:none;"></span></a>
@@ -751,7 +762,7 @@ $log_output .= qq(<form id="frm_srch" action="main.cgi"><TABLE class="tbl" borde
     <input type="submit" value="Search"/></td></tr>
     </TABLE>
 </form>);
-
+};
     my ( $sp1, $sp2, $sp3 );
     $sp1 = '<span  class="ui-icon ui-icon-heart"></span>';
     $sp2 = '<span  class="ui-icon ui-icon-circle-triangle-s"></span>';
@@ -954,45 +965,56 @@ $log_output .= qq(<form id="frm_srch" action="main.cgi"><TABLE class="tbl" borde
     else {$srh .= '</tr>'};
 
     $srh .= '</table></form>';
+
+my $sideMenu;
+my $tail = q(<div><a class="a_" href="stats.cgi">View Statistics</a></div><br>
+<div><a class="a_" href="config.cgi">Configure Log</a></div><hr>
+<div><a class="a_" href="login_ctr.cgi?logout=bye">LOGOUT</a><hr><a name="bottom"></a></div>);
+if($isPUBViewMode){$sideMenu=$frm=$srh=$tail=""}else{
+    $sideMenu = qq(
+        <div id="menu" title="To close this menu click on its heart, and wait.">
+        <div class="hdr" style="marging=0;padding:0px;">
+        <a id="to_top" href="#top" title="Go to top of page."><span class="ui-icon ui-icon-arrowthick-1-n" style="float:none;"></span></a>&nbsp;
+        <a id="to_bottom" href="#bottom" title="Go to bottom of page."><span class="ui-icon ui-icon-arrowthick-1-s" style="float:none;"></span></a>
+        <a id="menu_close" href="#" onclick="return hideLog();"><span class="ui-icon ui-icon-heart" style="float:none;"></span></a>
+        </div>
+        <hr>
+        <a class="a_" onclick="return toggle('#div_log',true);">Log</a><br>
+        <a href="#" title="TOP" onclick="return submitTop();" ><span class="ui-icon ui-icon-triangle-1-w" style="float:none;"></span></a>
+        <a href="#" title="PREVIOUS" onclick="return submitPrev($log_rc_prev, $rec_limit);"><span class="ui-icon ui-icon-arrowthick-1-w" style="float:none;"></span></a>
+        <a href="#" title="NEXT" onclick="return submitNext($log_cur_id, $rec_limit);"><span class="ui-icon ui-icon-arrowthick-1-e" style="float:none;"></span></a>
+        <a href="#" title="END" onclick="return submitEnd($rec_limit);"><span class="ui-icon ui-icon-triangle-1-e" style="float:none;"></span></a>
+        <hr>
+        <a class="a_" onclick="return toggle('#div_srh',true);">Search</a><hr>
+        <a class="a_" onclick="return deleteSelected();">Delete</a><hr>
+        <a class="a_" onclick="return toggle('#tbl_hlp',true);">Help</a><hr>
+        <a class="a_" href="stats.cgi">Stats</a><hr>
+        <a class="a_" href="config.cgi">Config</a><hr>
+        <a class="a_" id="lnk_show_all" onclick="return showAll();">Show All <span  class="ui-icon ui-icon-heart"></span></a><hr>
+        $sm_reset_all
+        <a class="a_" href="login_ctr.cgi?logout=bye">LOGOUT</a><br><hr>
+        <span style="font-size: x-small; font-weight: bold;">$vmode</span><br>
+        </div>
+        );
+}
+
+
     my $quill = &quill( $cgi->param('submit_is_edit') );
     my $help = &help;
 
-        ##################################
-        #  Final Page Output from here!  #
-        ##################################
+##################################
+#  Final Page Output from here!  #
+##################################
+
 
 toBuf (qq(
-<div id="menu" title="To close this menu click on its heart, and wait.">
-<div class="hdr" style="marging=0;padding:0px;">
-<a id="to_top" href="#top" title="Go to top of page."><span class="ui-icon ui-icon-arrowthick-1-n" style="float:none;"></span></a>&nbsp;
-<a id="to_bottom" href="#bottom" title="Go to bottom of page."><span class="ui-icon ui-icon-arrowthick-1-s" style="float:none;"></span></a>
-<a id="menu_close" href="#" onclick="return hideLog();"><span class="ui-icon ui-icon-heart" style="float:none;"></span></a>
-</div>
-<hr>
-<a class="a_" onclick="return toggle('#div_log',true);">Log</a><br>
-<a href="#" title="TOP" onclick="return submitTop();" ><span class="ui-icon ui-icon-triangle-1-w" style="float:none;"></span></a>
-<a href="#" title="PREVIOUS" onclick="return submitPrev($log_rc_prev, $rec_limit);"><span class="ui-icon ui-icon-arrowthick-1-w" style="float:none;"></span></a>
-<a href="#" title="NEXT" onclick="return submitNext($log_cur_id, $rec_limit);"><span class="ui-icon ui-icon-arrowthick-1-e" style="float:none;"></span></a>
-<a href="#" title="END" onclick="return submitEnd($rec_limit);"><span class="ui-icon ui-icon-triangle-1-e" style="float:none;"></span></a>
-<hr>
-<a class="a_" onclick="return toggle('#div_srh',true);">Search</a><hr>
-<a class="a_" onclick="return deleteSelected();">Delete</a><hr>
-<a class="a_" onclick="return toggle('#tbl_hlp',true);">Help</a><hr>
-<a class="a_" href="stats.cgi">Stats</a><hr>
-<a class="a_" href="config.cgi">Config</a><hr>
-<a class="a_" id="lnk_show_all" onclick="return showAll();">Show All <span  class="ui-icon ui-icon-heart"></span></a><hr>
-$sm_reset_all
-<a class="a_" href="login_ctr.cgi?logout=bye">LOGOUT</a><br><hr>
-<span style="font-size: x-small; font-weight: bold;">$vmode</span><br>
-</div>
-         <div id="div_log">$frm</div>
-         <div id="div_srh">$srh</div>
-      $quill
-      <div id="div_hlp">$help</div>
-         <div>\n$log_output\n</div><br>
-         <div><a class="a_" href="stats.cgi">View Statistics</a></div><br>
-         <div><a class="a_" href="config.cgi">Configure Log</a></div><hr>
-         <div><a class="a_" href="login_ctr.cgi?logout=bye">LOGOUT</a><hr><a name="bottom"></a></div>
+$sideMenu
+<div id="div_log">$frm</div>
+<div id="div_srh">$srh</div>
+$quill
+<div id="div_hlp">$help</div>
+<div>\n$log_output\n</div><br>
+$tail
 <!-- Cat Data Start -->
 <span id="meta_cats">
        $data_cats
@@ -1182,8 +1204,10 @@ my $dbg = qq(--DEBUG OUTPUT--\n
 
         $vmode = "[In Page Mode]&nbsp;";
         $vmode = "<font color='red'>[In View Mode]</font>&nbsp;" if$isInViewMode;
-
-        if($rec_limit == 0){
+        if($isPUBViewMode){
+           $log_output .=qq!<tr class="r$tfId" id="brw_row"><td>$vmode</td><td colspan="3"></td>!;
+        }
+        elsif($rec_limit == 0){
             $log_output .= qq!<tr class="r$tfId" id="brw_row"><td>$vmode</td><td colspan="3">
                                <input class="ui-button" type="button" onclick="submitTop($log_top);return false;" value="Back To Page View"/>!;
 
index 5bb3e4139925a1fe53169f0555510828cd80bc62..2e1173b8edb1a280da4d28157c5c937cc0db5c1f 100644 (file)
@@ -48,7 +48,7 @@ our $DSN;
 our $DBFILE;
 our $IS_PG_DB     = 0;
 
-my ($cgi, $sss, $sid, $alias, $pass, $dbname);
+my ($cgi, $sss, $sid, $alias, $pass, $dbname, $pub);
 
 
 #Annons here, variables that could be overiden in  code or database, per need.
@@ -65,7 +65,9 @@ our $DEBUG         = 1;
 #200 -> '^REL_RENUM' : this.$RELEASE_VER (Used in login_ctr.cgi)
 #201 -> '^EXCLUDES'  : 0 (Used in main.cgi)
 
-sub anons {return sort keys %anons}
+our $SQL_PUB = "";
+
+sub anons {my @ret=sort(keys %anons); return @ret;}
 #Check call with defined(Settings::anon('my_anon'))
 sub anon {my $n=shift; return $anons{$n}}
 
@@ -97,6 +99,9 @@ sub dbFile         {my $r = shift; if($r) {$DBFILE=$r} return $DBFILE}
 sub dbName         {return $dbname;}
 sub dsn            {return $DSN}
 sub isProgressDB   {return $IS_PG_DB}
+sub sqlPubors      {return $SQL_PUB}
+
+sub trim {my $r=shift; $r=~s/^\s+|\s+$//g; return $r}
 
 sub fetchDBSettings {
 try {
@@ -107,13 +112,37 @@ try {
     $dbname  = $sss->param('database');
     $alias   = $sss->param('alias');
     $pass    = $sss->param('passw');
-    if(!$alias||!$dbname){
+    $pub     = $cgi->param('pub');
+    if($pub){#we override session to obtain pub(alias)/pass from config.
+        open(my $fh, '<', logPath().'main.cnf' ) or LifeLogException->throw("Can't open main.cnf: $!");
+        while (my $line = <$fh>) {
+                    chomp $line;
+                    my $v = Settings::parseAutonom('PUBLIC_LOGIN',$line);
+                    if($v){my @cre = split '/', $v; 
+                           $alias = $cre[0];                           
+                           $pass = uc crypt $cre[1], hex Settings->CIPHER_KEY;
+                    }                    
+                       $v = Settings::parseAutonom('PUBLIC_CATS',$line);
+                    if($v){my @cats= split(',',$v);
+                        foreach(@cats){
+                            $SQL_PUB .= "ID_CAT=".trim($_)." OR ";
+                        }
+                        $SQL_PUB =~ s/\s+OR\s+$//;
+                    }
+                    last if Settings::parseAutonom('CONFIG',$line);
+        }
+        close $fh;
+    }
+    elsif(!$alias||!$dbname){
         print $cgi->redirect("login_ctr.cgi?CGISESSID=$sid");
         exit;
     }
-    my $ret  = connectDB($alias, $pass);
+
+    print "a:$alias/p:$pass";
+    my $ret  = connectDB($alias, $pass);    
     dbSrc($sss->param('db_source'));    
     getConfiguration($ret);
+    
     getTheme();
     $sss->expire($SESSN_EXPR);
     return $ret;
@@ -128,6 +157,7 @@ sub sid     {return $sid}
 sub dbname  {return $dbname}
 sub alias   {return $alias}
 sub pass    {return $pass}
+sub pub     {return $pub}
 
 sub today {
     my $ret = DateTime->now();
@@ -136,7 +166,7 @@ return $ret;
 }
 
 sub createCONFIGStmt {
-if($IS_PG_DB){qq(
+if($IS_PG_DB){return qq(
     CREATE TABLE CONFIG(
         ID INT NOT NULL UNIQUE GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ),
         NAME VARCHAR(16)  UNIQUE,
@@ -283,26 +313,26 @@ sub getConfiguration {
            $st->execute();
         while ( my @r = $st->fetchrow_array() ){
                 switch ( $r[1] ) {
-                case "RELEASE_VER"  { $RELEASE_VER  = $r[2]}
-                case "TIME_ZONE"    { $TIME_ZONE    = $r[2]}
-                case "PRC_WIDTH"    { $PRC_WIDTH    = $r[2]}
-                case "SESSN_EXPR"   { $SESSN_EXPR   = $r[2]}
-                case "DATE_UNI"     { $DATE_UNI     = $r[2]}
-                case "LANGUAGE"     { $LANGUAGE     = $r[2]}
+                case "RELEASE_VER"  {$RELEASE_VER  = $r[2]}
+                case "TIME_ZONE"    {$TIME_ZONE    = $r[2]}
+                case "PRC_WIDTH"    {$PRC_WIDTH    = $r[2]}
+                case "SESSN_EXPR"   {$SESSN_EXPR   = $r[2]}
+                case "DATE_UNI"     {$DATE_UNI     = $r[2]}
+                case "LANGUAGE"     {$LANGUAGE     = $r[2]}
                 case "LOG_PATH"     {} #ommited and code static can't change for now.
-                case "IMG_W_H"      { $IMG_W_H      = $r[2]}
-                case "REC_LIMIT"    { $REC_LIMIT    = $r[2]}
-                case "AUTO_WRD_LMT" { $AUTO_WRD_LMT = $r[2]}
-                case "VIEW_ALL_LMT" { $VIEW_ALL_LMT = $r[2]}
-                case "DISP_ALL"     { $DISP_ALL     = $r[2]}
-                case "FRAME_SIZE"   { $FRAME_SIZE   = $r[2]}
-                case "RTF_SIZE"     { $RTF_SIZE     = $r[2]}
-                case "THEME"        { $THEME        = $r[2]}
-                case "DEBUG"        { $DEBUG        = $r[2]}
-                case "KEEP_EXCS"    { $KEEP_EXCS    = $r[2]}
-                case "TRACK_LOGINS" { $TRACK_LOGINS = $r[2]}
-                case "COMPRESS_ENC" { $COMPRESS_ENC = $r[2]}                
-                else                { $anons{$r[1]} = $r[2]}
+                case "IMG_W_H"      {$IMG_W_H      = $r[2]}
+                case "REC_LIMIT"    {$REC_LIMIT    = $r[2]}
+                case "AUTO_WRD_LMT" {$AUTO_WRD_LMT = $r[2]}
+                case "VIEW_ALL_LMT" {$VIEW_ALL_LMT = $r[2]}
+                case "DISP_ALL"     {$DISP_ALL     = $r[2]}
+                case "FRAME_SIZE"   {$FRAME_SIZE   = $r[2]}
+                case "RTF_SIZE"     {$RTF_SIZE     = $r[2]}
+                case "THEME"        {$THEME        = $r[2]}
+                case "DEBUG"        {$DEBUG        = $r[2]}
+                case "KEEP_EXCS"    {$KEEP_EXCS    = $r[2]}
+                case "TRACK_LOGINS" {$TRACK_LOGINS = $r[2]}
+                case "COMPRESS_ENC" {$COMPRESS_ENC = $r[2]}                
+                else                {$anons{$r[1]} = $r[2]}
                 }
         }
         #Anons are murky grounds. -- @bud
@@ -555,4 +585,16 @@ sub connectDB {
            LifeLogException->throw(error=>"<p>Error->$@</p>",  show_trace=>1);
     }
 }
+
+sub parseAutonom { #Parses autonom tag for its crest value, returns undef if tag not found or wrong for passed line.
+    my $t = '<<'.shift.'<';
+    my $line = shift;
+    if(rindex ($line, $t, 0)==0){#@TODO change the following to regex parsing:
+        my $l = length $t;
+        my $e = index $line, ">", $l + 1;
+        return substr $line, $l, $e - $l;
+    }
+    return undef;
+}
+
 1;
\ No newline at end of file