phpBB stats from index.php

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
No_Mercy
Registered User
Posts: 115
Joined: Mon Dec 11, 2006 8:33 pm

phpBB stats from index.php

Post by No_Mercy »

I'd like to put the stats from the index.php onto my website

phpBB root /GCW/
Website root /

I'd like them to be on index.html
But SQL can't be on html

I am a newbie to php.

How would I make a php document with my html code inside it so my layout still works?

index.html

Code: Select all

<!-- FREE TEMPLATE BY WWW.ZYMIC.COM -->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>GCW: Glory Championship Wrestling</title>

<link href="css.css" rel="stylesheet" type="text/css" />

</head>



<body>
<form action="/GCW/login.php" method="post" target="_top">

<table width="100%" border="0" cellspacing="0" cellpadding="0">

  <tr>

    <td valign="top" class="bgmain"><table width="780" border="0" align="center" cellpadding="0" cellspacing="0">

      <tr>

        <td valign="top"><table width="780" border="0" cellpadding="0" cellspacing="0">

          <tr>

            <td colspan="3" rowspan="2" class="loginbg"><img src="images/spacer.gif" alt="spacer" height="15"/><center>

   <input type="text" class="post" name="username" size="13" maxlength="40" value="" />
    <input type="password" class="post" name="password" size="13" maxlength="32" />

  
  <td colspan="2"><input type="hidden" name="redirect" value="" /><input type="submit" name="login" class="mainoption" value="Log in" /></td>

<td colspan="4" style="font-size:9px; color:#afafaf; padding-top:3px;">Glory Championship Wrestling: Live For The Glory, Fight To Be A Champion.</td>

            <td><img src="images/spacer.gif" width="1" height="25" alt="1" /></td>

          </tr>

          <tr>

            <td colspan="4" rowspan="2">&nbsp;</td>

            <td><img src="images/spacer.gif" width="1" height="15" alt="1" /></td>

          </tr>

          <tr>

            <td colspan="3"><img src=images/top_logo_blank.gif alt="logo" width="368" height="83" border="0" usemap="#Map" /></td>

            <td><img src="images/spacer.gif" width="1" height="83" alt="1" /></td>

          </tr>

          <tr>

            <td class="navt1"><a href="/index.html">Home</a></td>

            <td class="navt2"><a href="GCW/index.php">GCW Forums</a></td>

            <td colspan="2" class="navt3"><a href="/GCW/roster.php">GCW Roster</a></td>

            <td class="navt4"><a href="/GCW/updexp.php">Update EXP</a></td>

            <td class="navt5"><a href="/GCW/viewtopic.php?t=208">Rules</a></td>

            <td class="navt6"><a href="http://vow.plit.dk">VOW</a></td>

            <td><img src="images/spacer.gif" width="1" height="41" alt="1" /></td>

          </tr>

          	<tr>

		<td colspan="7" valign="top" class="mcbg">

			<img src="images/header_11.gif" width="779" height="24" alt="header" />

			<table width="100%" border="0" cellspacing="8" cellpadding="0">

              <tr>

                <td width="152" valign="top"><img src="images/navigation.gif" alt="navigation" width="152" height="26" />

                  <table width="100%" border="0" cellspacing="0" cellpadding="0">

                    <tr>

                      <td class="navoff" onmouseover="this.className='navon'" onmouseout="this.className='navoff'"><a href="/GCW/index.php">GCW Forums</a></td>                    

                    </tr>

                    <tr>

                      <td class="navoff" onmouseover="this.className='navon'" onmouseout="this.className='navoff'"><a href="/GCW/roster.php">Roster</a></td>                    

                    </tr>

                    <tr>

                      <td class="navoff" onmouseover="this.className='navon'" onmouseout="this.className='navoff'"><a href="http://gcw.fastspace.biz/GCW/viewforum.php?f=2">Sign A Contract</a></td>                    

                    </tr>

                    <tr>

                      <td class="navoff" onmouseover="this.className='navon'" onmouseout="this.className='navoff'"><a href="http://gcw.fastspace.biz/GCW/viewtopic.php?t=208">Rules</a></td>                    

                    </tr>

                    <tr>

                      <td class="navoff" onmouseover="this.className='navon'" onmouseout="this.className='navoff'"><a href="http://gcw.fastspace.biz/GCW/updexp.php">Update EXP</a></td>                    

                    </tr>

                    <tr>

                      <td class="navoff" onmouseover="this.className='navon'" onmouseout="this.className='navoff'"><a href="http://VOW.plit.dk">VOW</a>                      </td>                    

                    </tr>



                  </table>

                  <table width="100%" border="0" cellspacing="0" cellpadding="0">

                    <tr>

                      <td class="leftcolheader">Link To Us On VOW</td>

                    </tr>

                    <tr>

                      <td class="lcolbg">

					  

					  <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">

  <tr>

    <td><img src="http://img.photobucket.com/albums/v129/BaseballFreak/GCW/gCw.gif" width="147" height="85"><br><textarea rows="5" cols="17">[url src=http://gcw.fastspace.biz/GCW text=[img src=http://img.photobucket.com/albums/v129/BaseballFreak/GCW/gCw.gif]]</textarea>
    </td>

  </tr>

</table>

</td>

                    </tr>

                    <tr>

                      <td><img src="images/bottom_col_foot.gif" alt="footer" width="152" height="7" /></td>

                    </tr>

                  </table></td>

                <td width="368" valign="top"><div align="center">

                  <table border="0" align="center" cellpadding="0" cellspacing="0">

                      <tr>

                        <td class="mcheader">Glory Championship Wrestling</td>

                      </tr>

                      <tr>

                        <td class="maincbbg"><table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">

<tr>

                              <td><p>Welcome to Glory Championship Wrestling. We are an efed based of of VOW that prides ourself in innovative ideas, a helpful staff, hi-tech design, and a strong, solid memberbase.</p>

                                <p>Glory Championship Wrestling: Live For The Glory, Fight To Be A Champion.</p></td>

                            </tr>

                        </table></td>

                      </tr>

                      <tr>

                        <td><img src="images/mcb_footer.gif" alt="footer" width="368" height="10" /></td>

                      </tr>

                          </table>

                  <table border="0" align="center" cellpadding="0" cellspacing="0">

                        <tr>

                          <td class="mcheader">Staff</td>

                        </tr>

                        <tr>

                          <td class="maincbbg"><table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">

                              <tr>

                                <td><p><b>Owners</b>: No Mercy, Ultimate Wrestler, Rey 619
</p>

                                  <p><b>GM's</b>: No Mercy, Ultimate Wrestler
</p>
                                   <p><b>Tech Staff</b>: No Mercy, Ben Wallace</p>
                                   <p><b>Staff</b>:</p></td>

                              </tr>

                          </table></td>

                        </tr>

                        <tr>

                          <td><img src="images/mcb_footer.gif" alt="footer" width="368" height="10" /></td>

                        </tr>

                          </table>

                </div></td>

                <td width="212" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">

                  <tr>

                    <td class="rightboxheader">Stats</td>

                  </tr>

                  <tr>

                    <td class="rightcolboxbg"><table width="93%" border="0" align="center" cellpadding="0" cellspacing="0">

                      <tr>

                        <td><center>

                          <p>SELECT COUNT(post_id) FROM phpbb_posts</p>

                          <p>SELECT COUNT(user_id) FROM phpbb_users</p>
                          <p>SELECT username FROM phpbb_users ORDER BY user_id DESC LIMIT 0,1</p>
                          <p>SELECT COUNT(session_id) FROM phpbb_sessions WHERE sessions_logged_in = 1</p>
                          <p>SELECT config_value FROM phpbb_config WHERE config_name = 'record_online_users' OR config_name = 'record_online_date'</p>

                        </center></td>

                      </tr>

                    </table></td>

                  </tr>

                  <tr>

                    <td><img src="images/footer_right_box.gif" alt="footer" width="215" height="9" /></td>

                  </tr>

                </table>

                  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">

                    <tr>

                      <td class="rightboxheader">title</td>

                    </tr>

                    <tr>

                      <td class="rightcolboxbg"><table width="93%" border="0" align="center" cellpadding="0" cellspacing="0">

                        <tr>

                          <td><p>&nbsp;</p>

                            <p>&nbsp;</p></td>

                        </tr>

                      </table></td>

                    </tr>

                    <tr>

                      <td><img src="images/footer_right_box.gif" alt="footer" width="215" height="9" /></td>

                    </tr>

                  </table>

                  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">

                    <tr>

                      <td class="rightboxheader">title</td>

                    </tr>

                    <tr>

                      <td class="rightcolboxbg"><table width="93%" border="0" align="center" cellpadding="0" cellspacing="0">

                        <tr>

                          <td>

                            </td>

                        </tr>

                      </table></td>

                    </tr>

                    <tr>

                      <td><img src="images/footer_right_box.gif" alt="footer" width="215" height="9" /></td>

                    </tr>

                  </table></td>

              </tr>

            </table>			  

			<!-- FREE TEMPLATE BY ZYMIC.COM DO NOT REMOVE COPYRIGHT UNLESS YOU HAVE ORDERED A LICENCE - $5 -->

			<table width="775" border="0" align="center" cellpadding="0" cellspacing="0">

              <tr>

                <td class="crbg"><div align="center">Copyright 2005 - <a href="http://www.zymic.com" target="_blank">Free Templates</a> by <a href="http://www.zymic.com">Zymic.com </a>- All Rights Reserved. </div></td>

              </tr>

            </table>

			<!-- FREE TEMPLATE BY ZYMIC.COM DO NOT REMOVE COPYRIGHT UNLESS YOU HAVE ORDERED A LICENCE - $5 -->

			</td>

		<td>

			<img src="images/spacer.gif" width="1" height="24" alt="" /></td>

	</tr>

	<tr>

		<td>

			<img src="images/spacer.gif" width="131" height="1" alt="" /></td>

		<td>

			<img src="images/spacer.gif" width="131" height="1" alt="" /></td>

		<td>

			<img src="images/spacer.gif" width="106" height="1" alt="" /></td>

		<td>

			<img src="images/spacer.gif" width="23" height="1" alt="" /></td>

		<td>

			<img src="images/spacer.gif" width="131" height="1" alt="" /></td>

		<td>

			<img src="images/spacer.gif" width="130" height="1" alt="" /></td>

		<td>

			<img src="images/spacer.gif" width="127" height="1" alt="" /></td>

		<td></td>

	</tr>

</table>          </td>

      </tr>

      

    </table></td>

  </tr>

</table>



<map name="Map" id="Map"><area shape="rect" coords="1,1,113,27" href="/GCW/profile.php?mode=register" alt="Register" />

<area shape="rect" coords="3,26,112,50" href="/GCW/profile.php?mode=sendpassword" alt="Forgot Pass?" />

</map></body>

</html>
The stats I want to include are:

Code: Select all


SELECT COUNT(post_id) FROM phpbb_posts

SELECT COUNT(user_id) FROM phpbb_users

SELECT username FROM phpbb_users ORDER BY user_id DESC LIMIT 0,1

SELECT COUNT(session_id) FROM phpbb_sessions WHERE sessions_logged_in = 1

SELECT config_value FROM phpbb_config WHERE config_name = 'record_online_users' OR config_name = 'record_online_date'
No_Mercy
Registered User
Posts: 115
Joined: Mon Dec 11, 2006 8:33 pm

Post by No_Mercy »

Bump. Fell below first page.
User avatar
Jim_UK
Former Team Member
Posts: 18478
Joined: Tue Oct 12, 2004 5:36 pm
Location: Darwen N.West UK

Post by Jim_UK »

6 hour bump rule :!:

How do you consider this to be a "Support for phpBB2" problem?

Jim
The truth is out there.
Unfortunately they will not let you anywhere near it!
No_Mercy
Registered User
Posts: 115
Joined: Mon Dec 11, 2006 8:33 pm

Post by No_Mercy »

Sorry. D:

My brain has frozen I must have put this in the wrong forum.
User avatar
danopia
Registered User
Posts: 436
Joined: Thu Aug 31, 2006 6:12 pm
Location: Landisville, NJ
Name: Daniel Lamando
Contact:

Post by danopia »

This forum is so hot that you can't bump until it falls below page 12. So I want to register another 'bump' user one of these days. ;)

Anyway, you would need so rename index.html to index.php, then copy-paste some stuff from index.php (from the board) into it. I believe hat this has been done somewhere but can't find it. :(

I might try MOD Requests, but this isn't a MOD... maybe phpBB Discussion.
Hackers are not criminals. Hackers are the only people out there to keep crackers and virus coders on the run. Hackers are misconstrued by the media, but in reality, they do not cause damage or steal. Hackers tell system administrators of the faults of their software, and keep the Internet safe from those who don't.

phpBB3 MODs: Simple Topic Calendar
No_Mercy
Registered User
Posts: 115
Joined: Mon Dec 11, 2006 8:33 pm

Post by No_Mercy »

Umm, okay.

I tried copying stuff.

What I did was took the blank template MOD

Made a index.php
and template.tpl (didn't bother renaming it.)

The template.tpl contains the original .html

I just can't figure out for the life of me what to do with index.php

Oh well, thanks for helping and I'll try and find where to post this.
Locked

Return to “2.0.x Support Forum”