diff --git a/www/index.php b/www/index.php index e85efaa..7f14d80 100644 --- a/www/index.php +++ b/www/index.php @@ -25,7 +25,7 @@ function send_html(): void global $categories, $db, $language, $dir; $numrows = 0; $style = '.row{display:flex;flex-wrap:wrap}.headerrow{font-weight:bold}.col{display:flex;flex:1;padding:3px 3px;flex-direction:column}'; - $style .= '.red{color:red}.green{color:green}.up .col:nth-child(0n+3),.up .col:nth-child(0n+4){background-color:#aaff88}.down .col:nth-child(0n+3),.down .col:nth-child(0n+4){background-color:#ff4444}'; + $style .= '.red{color:red}.green{color:green}.up .col:nth-child(0n+3){background-color:#aaff88}.down .col:nth-child(0n+3){background-color:#ff4444}'; $style .= '.promo{outline:medium solid #FFD700}.list{padding:0;}.list li{display:inline-block;padding:0.35em}.pagination{font-size:1.2em}'; $style .= '.active{font-weight:bold}#maintable .col{word-break:break-all;min-width:5em}#maintable,#maintable .col{border: 1px solid black}#edit-search .col{vertical-align:top}'; $style .= '#maintable .col:nth-child(0n+3){word-break:unset}#maintable .col:last-child{max-width:5em}.software-link{text-align:center;font-size:small}'; @@ -340,7 +340,7 @@ function get_table(PDOStatement $stmt, int &$numrows = 0, bool $promoted = false $admin_approval = PREFIX . 'onions.approved = 1 AND'; } ob_start(); - echo '
'._('Onion link').'
'._('Description').'
'._('Last tested').'
'._('Last seen').'
'._('Added at').'
'._('Actions').'
'; + echo '
'._('Onion link').'
'._('Description').'
'._('Last seen').'
'._('Added at').'
'._('Actions').'
'; if($promoted){//print promoted links at the top $time=time(); $promo=$db->prepare('SELECT address, lasttest, lastup, timeadded, description, locked, special FROM ' . PREFIX . "onions WHERE $admin_approval special>? AND address!='' AND id NOT IN (SELECT onion_id FROM " . PREFIX . 'phishing) AND timediff<604800 ORDER BY address;'); @@ -357,12 +357,10 @@ function get_table(PDOStatement $stmt, int &$numrows = 0, bool $promoted = false $lastup=date('Y-m-d H:i:s', $link['lastup']); } if($link['lasttest']==0){ - $lasttest=_('Never'); - }else{ - $lasttest=date('Y-m-d H:i:s', $link['lasttest']); + $class=''; } $timeadded=date('Y-m-d H:i:s', $link['timeadded']); - echo '
'.$link['description'].'
'.$lasttest.'
'.$lastup.'
'.$timeadded.'
'; + echo '
'.$link['description'].'
'.$lastup.'
'.$timeadded.'
'; } } while($link=$stmt->fetch(PDO::FETCH_ASSOC)){ @@ -377,10 +375,7 @@ function get_table(PDOStatement $stmt, int &$numrows = 0, bool $promoted = false $lastup=date('Y-m-d H:i:s', $link['lastup']); } if($link['lasttest']==0){ - $lasttest=_('Never'); $class=''; - }else{ - $lasttest=date('Y-m-d H:i:s', $link['lasttest']); } $timeadded=date('Y-m-d H:i:s', $link['timeadded']); if($link['special']>$time){ @@ -391,7 +386,7 @@ function get_table(PDOStatement $stmt, int &$numrows = 0, bool $promoted = false }else{ $edit='
'; } - echo '
'.$link['description'].'
'.$lasttest.'
'.$lastup.'
'.$timeadded.'
'.$edit.'
'; + echo '
'.$link['description'].'
'.$lastup.'
'.$timeadded.'
'.$edit.'
'; ++$numrows; } echo '
';