|
|
|
|
|
|
| |
| <?php
// ----------
// IBF Latest Topics 2.0 - © Sarah King
// Revision of 1.5 by Chris Mellor
// ----------
function IBFLatestTopic($num)
{
global $INFO;
// ----------
// Get the config file
// Change this include statement to reflect the absolute path
// ----------
if (!isset( $INFO)) include '/www/virtual/mysite/htdocs/conf_global.php';
$bullets = '<ol>'; // numbered list
//$bullets = '<ul>'; // bullets
// ----------
// Connect to database
// ----------
$connect = mysql_connect($INFO['sql_host'], $INFO['sql_user'], $INFO['sql_pass']) or die("Could Not Connect To <b>\"$host\"</b>");
$select = mysql_select_db($INFO['sql_database'], $connect) or die("Could Not Select Database: <b>\"$db_name\"</b>");
$query = mysql_query("SELECT * FROM `{$INFO['sql_tbl_prefix']}topics` ORDER BY `tid` DESC LIMIT 0, $num")
or die("Could Not Execute The Query");
// ----------
// Running A Loop
// ----------
$output = $bullets;
while( $ibf = mysql_fetch_array($query))
{
$date_posted = date("F j Y, H:i A", $ibf[start_date]); // Date of topic posted
$last_posted = date("F j Y, H:i A", $ibf[last_post]); // Date of last post
$output .= "
<li>
<a href=\"{$INFO['board_url']}/index.php?showtopic={$ibf[tid]}&view=getnewpost\" title=\"Posted: {$date_posted}\">{$ibf[title]}</a>
(
$ibf[posts] Replies |
$ibf[views] Views |
By: <a href=\"{$INFO['board_url']}/index.php?showuser={$ibf[starter_id]}\" title=\"Last Post: {$last_posted}\">{$ibf[starter_name]}</a>
</li>
";
}
$output .= '</' . substr($bullets,1);
return $output;
// ----------
// End Of Script
// ----------
}
?> | | |
|
| This program allows you to upload an ODBC ressource - i.e. an MS-Access database to a MySQL server. Categories : Databases, MySQL, Complete Programs, PHP, Databases | | | bookmarker - PHP, PHPLIB, MySQL WWW based bookmark manager Categories : MySQL, PHP, MySQL, Complete Programs, Databases | | | Accepts a database & hostname from a user and then HTTP username and password. Uses this to connect to a MySQL database. Produces a form based on the tables it finds there to allow the user to do SELECTs, INSERTs, and DELETEs. Categories : Databases, PHP, MySQL, Complete Programs | | | Cut your MySQL Connections to 1 line of code Categories : PHP, Beginner Guides, Databases, MySQL | | | phpAds, a complete banner and ad management system with detailled tracking and stats. Categories : MySQL, Complete Programs, Ecommerce, PHP, Databases | | | Point and Click Interface ala MS Access for creating SQL statements. Categories : MySQL, Complete Programs, General SQL, PHP, Databases | | | Message of the Day - Random Message (Needs MySQL!) Categories : Databases, HTML and PHP, PHP, MySQL | | | Alternating background color for HTML table rows Categories : PHP, Databases, MySQL, HTML and PHP | | | color codes for positive and negative numbers Categories : PHP, MySQL, Databases, HTML | | | A very simple way to build and do a hierarchical html categories browser without javascript , just using html php and mySql
Categories : HTML and PHP, Databases, Algorithms, PHP, MySQL | | | Tropicalm Genetree Family (MySQL based family tree) Categories : PHP, Interfaces, Databases, MySQL, Complete Programs | | | mysql_escape_string Categories : PHP, MySQL, Databases, Strings | | | Automatically printing the contents of an sql table in MySQL. Categories : MySQL, PHP, HTML and PHP, Databases | | | Email a user with out exposing email address Categories : PHP, Databases, MySQL, Email | | | Authorize Me! An authentication script. Categories : MySQL, Databases, Authentication, PHP | |
| | | | Jacob Smith wrote :1345
good idea but not workin
| |
|
|
|