Mercurial > hg > index.fcgi > www > www-1
diff index.php @ 0:561c0b0f3234
initial add
author | paulo@twcdns.fastsearch.net |
---|---|
date | Wed, 21 Jul 2010 00:11:54 -0700 |
parents | |
children | 6d959c2ed416 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/index.php Wed Jul 21 00:11:54 2010 -0700 1.3 @@ -0,0 +1,59 @@ 1.4 +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 1.5 +<HTML> 1.6 +<HEAD> 1.7 +<META NAME="generator" CONTENT="http://txt2tags.sf.net"> 1.8 +<LINK REL="stylesheet" TYPE="text/css" HREF="index.css"> 1.9 +<TITLE>-[pauloang.com]-</TITLE> 1.10 +</HEAD> 1.11 +<BODY> 1.12 + 1.13 +<DIV CLASS="header" ID="header"> 1.14 +<H1>-[pauloang.com]-</H1> 1.15 +</DIV> 1.16 + 1.17 +<DIV CLASS="body" ID="body"> 1.18 +<DL> 1.19 + 1.20 +<?php 1.21 + 1.22 + include('../login.php'); 1.23 + $database = 'pauloang_index'; 1.24 + 1.25 + $link = mysql_connect('localhost', $username, $password); 1.26 + if (!$link) 1.27 + die('Could not connect to MySQL server: ' . mysql_error()); 1.28 + 1.29 + $db_selected = mysql_select_db($database, $link); 1.30 + if (!$db_selected) 1.31 + die('Could not select database: ' . mysql_error()); 1.32 + 1.33 + $query = 'SELECT * FROM Links'; 1.34 + $results = mysql_query($query); 1.35 + 1.36 + while ($row = mysql_fetch_assoc($results)) { 1.37 + echo '<DT>'; 1.38 + echo '<A HREF="'.$row['URL'].'">'.$row['Title'].'</A>'; 1.39 + echo '</DT>'."\n"; 1.40 + echo '<DD>'; 1.41 + echo '<DIV CLASS="index_date">'; 1.42 + echo 'First added: '.$row['FirstMod'].' '.'<BR>'; 1.43 + echo 'Last modified: '.$row['LastMod']; 1.44 + echo '</DIV>'; 1.45 + echo '</DD>'."\n"; 1.46 + } 1.47 + 1.48 + mysql_free_result($results); 1.49 + mysql_close($link); 1.50 +?> 1.51 + 1.52 +</DL> 1.53 + 1.54 +<DIV CLASS="email"> 1.55 +<P><A HREF="mailto:pbba13@gmail.com">pbba13@gmail.com</A></P> 1.56 +</DIV> 1.57 + 1.58 +</DIV> 1.59 + 1.60 +<!-- html code generated by txt2tags 2.4 (http://txt2tags.sf.net) --> 1.61 +<!-- cmdline: txt2tags index.t2t --> 1.62 +</BODY></HTML>