annotate index.php @ 131:221d6ea7c6c8

cs: add cs_flask_app files
author paulo
date Thu, 20 Jan 2022 00:44:05 -0800
parents 6d959c2ed416
children
rev   line source
paulo@0 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
paulo@0 2 <HTML>
paulo@0 3 <HEAD>
paulo@0 4 <META NAME="generator" CONTENT="http://txt2tags.sf.net">
paulo@0 5 <LINK REL="stylesheet" TYPE="text/css" HREF="index.css">
paulo@0 6 <TITLE>-[pauloang.com]-</TITLE>
paulo@0 7 </HEAD>
paulo@0 8 <BODY>
paulo@0 9
paulo@0 10 <DIV CLASS="header" ID="header">
paulo@0 11 <H1>-[pauloang.com]-</H1>
paulo@0 12 </DIV>
paulo@0 13
paulo@0 14 <DIV CLASS="body" ID="body">
paulo@0 15 <DL>
paulo@0 16
paulo@0 17 <?php
paulo@0 18
paulo@0 19 include('../login.php');
paulo@0 20 $database = 'pauloang_index';
paulo@0 21
paulo@0 22 $link = mysql_connect('localhost', $username, $password);
paulo@0 23 if (!$link)
paulo@0 24 die('Could not connect to MySQL server: ' . mysql_error());
paulo@0 25
paulo@0 26 $db_selected = mysql_select_db($database, $link);
paulo@0 27 if (!$db_selected)
paulo@0 28 die('Could not select database: ' . mysql_error());
paulo@0 29
paulo@50 30 $query = 'SELECT * FROM Links ORDER BY LastMod DESC';
paulo@0 31 $results = mysql_query($query);
paulo@0 32
paulo@0 33 while ($row = mysql_fetch_assoc($results)) {
paulo@0 34 echo '<DT>';
paulo@0 35 echo '<A HREF="'.$row['URL'].'">'.$row['Title'].'</A>';
paulo@0 36 echo '</DT>'."\n";
paulo@0 37 echo '<DD>';
paulo@0 38 echo '<DIV CLASS="index_date">';
paulo@0 39 echo 'First added: '.$row['FirstMod'].' '.'<BR>';
paulo@23 40 if (($row['LastMod'] != '') && ($row['LastMod'] != $row['FirstMod']))
paulo@23 41 echo 'Last modified: '.$row['LastMod'];
paulo@0 42 echo '</DIV>';
paulo@0 43 echo '</DD>'."\n";
paulo@0 44 }
paulo@0 45
paulo@0 46 mysql_free_result($results);
paulo@0 47 mysql_close($link);
paulo@0 48 ?>
paulo@0 49
paulo@0 50 </DL>
paulo@0 51
paulo@0 52 <DIV CLASS="email">
paulo@0 53 <P><A HREF="mailto:pbba13@gmail.com">pbba13@gmail.com</A></P>
paulo@0 54 </DIV>
paulo@0 55
paulo@0 56 </DIV>
paulo@0 57
paulo@0 58 <!-- html code generated by txt2tags 2.4 (http://txt2tags.sf.net) -->
paulo@0 59 <!-- cmdline: txt2tags index.t2t -->
paulo@0 60 </BODY></HTML>