View Single Post
  #3  
Old 10-23-2000, 06:43 AM
Guest
 
Posts: n/a
Default

Code:
<?
require("./admin/config.php");
require("global.php");
	$num_active = 20;
	$num_chars  = 90;

	$db=mysql_connect($servername,$dbusername,$dbpassword);
	mysql_select_db($dbname);

	$querylatest="select * from thread where forumid='1' or forumid='2' or forumid='3' or forumid='4' or forumid='5' or forumid='6' or forumid='7' or forumid='8' or forumid='9' or forumid='10' or forumid='11' or forumid='12' or forumid='13' or forumid='14' or forumid='15' or forumid='16' or forumid='17' or forumid='18' or forumid='19' or forumid='20' or forumid='22' or forumid='23' or forumid='25' or forumid='26' or forumid='27' or forumid='28' or forumid='29' or forumid='30' or forumid='31' or forumid='32' or forumid='34' or forumid='35' or forumid='36' or forumid='37' or forumid='38' order by lastpost desc limit $num_active";

	$resultlatest = mysql_query($querylatest,$db);

	print("<table width=\"98%%\" cellspacing=\"0\" cellpadding=\"0\" align=\"right\" bgcolor=\"#232323\"><tr><td><table width=\"100%%\" cellspacing=\"1\" cellpadding=\"4\">");

	while ($latest_array = mysql_fetch_array($resultlatest)) {
	
	// Get Forum Infomation
	$query_forum = "select * from forum where forumid='$latest_array[forumid]'";
	$result_forum = mysql_query($query_forum,$db);
	$forum_info_array = mysql_fetch_array($result_forum);
	
	printf("<tr><td colspan=\"2\" bgcolor=\"#333333\"><b><font color=\"#CCCCCC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">%s: %s</font></b></td></tr>",$forum_info_array["title"],$latest_array["title"]);

	// split the date up a bit
	//corrected (-;
	$datestr1 = date("d-m-Y",$latest_array["lastpost"]);
	$datetime = date("H:i",$latest_array["lastpost"]);
	printf ("<tr valign=\"top\"><td nowrap bgcolor=\"#333333\"><font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"1\"><b>%s</b><br>$datestr1 ? %s<br>???????: %s</font></td>", $latest_array["postusername"], $datetime, $latest_array["replycount"]);

	$querythread="select * from post where threadid='$latest_array[threadid]' order by dateline asc limit 1";

	$result_thread_text= mysql_query($querythread,$db);

	$result_thread_array = mysql_fetch_array($result_thread_text);
	// remove bbcode
	$messtext = bbcodeparse($result_thread_array["pagetext"]);
	// remove [~img]xxx[~/img]
	$messtext=eregi_replace("\\[img\\]([^\\[]*)\\[/img\\]","",$messtext);
	
	printf ("<td width=\"100%%\" bgcolor=\"#3E3E3E\"><font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"1\"><img src=\"images/icons/icon%s.gif\"> ????????? ????????? ??: %s<hr size=\"1\" noshade color=\"#232323\">%s...<br><a href=\"showthread.php?threadid=%s\">????????? ></font></td></tr>",$result_thread_array["iconid"],$latest_array["lastposter"],substr(strip_tags($messtext),0,$num_chars),$latest_array["threadid"]);
	printf ("</td></tr>");
	}

	printf ("</table></td></tr></table>");
?>
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01178 seconds
  • Memory Usage 1,766KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete