Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-31-2006, 01:04 AM
Dave-ahfb Dave-ahfb is offline
 
Join Date: Mar 2002
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default integration with nonvb script (almost working)

Here is the link to a temp page

http://www.ahfb2000.com/host/host1/s...&Platform=unix

What I am trying to do is have the welcome message at the top (currently at the bottom)

It all works fine at the bottom though I imagine my code is fairly ugly. When trying to get it to work at the top I can either get the directory to work or the welcome mesage but not both.

Let me state I know nothing about PHP or MySQL, I just try to read it and try to figure out what things do. This being the case I think I did pretty well so far on this, but not good enough My guess is the problem lays within the header includes.

Here is my code:

Code:
<?php
require('/big/dom/xahfb2000/www/host/host1/admin/dbfunctions.php');
connect();
if ($spacetype=='GB'){
$space=$space * 1000;
}
echo "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>";
echo "<html>";
echo "<head>";
echo "<title>PHP Scripts</title>";
echo "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />";
echo "<meta name='description' content='PHP Scripts Directory browse our large database of assorted PHP Scripts.' />";
echo "<meta name='keywords' content='PHP Scripts Archive' />";
echo "<link rel='stylesheet' type='text/css' href='http://www.ahfb2000.com/forum.css' />";
echo "</head>";
echo "<body>";
echo "<div align='center'>";
echo "<div class='page' style='width:100%; text-align:left'>";
echo "<br />";
echo "<div class='banner'>";
echo "<div class='leftcontenttop'><a href='http://www.ahfb2000.com/'><img src='http://www.ahfb2000.com/images/webmastertools.gif' height='60' width='349' border='0' alt='<? print $pagetitle; ?>' /></a></div>";
echo "<div class='rightcontenttop'>";
echo "<form method='get' action='http://www.google.com/custom'>";
echo "<table border='0' bgcolor='#f6f6f6' align='center'>";
echo "<tr><td nowrap='nowrap' valign='top' align='left' height='32'>";
echo "<a href='http://www.google.com/'>";
echo "<img src='http://www.google.com/logos/Logo_25wht.gif'";
echo "border='0' alt='Google'></img></a>";
echo "</td>";
echo "<td>";
echo "<input type='hidden' name='domains' value='ahfb2000.com'></input>";
echo "<input type='text' name='q' size='25' maxlength='255' value=''></input>";
echo "<input type='submit' name='sa' value='Search'></input>";
echo "<input type='radio' name='sitesearch' value=''></input> Web";
echo "<input type='radio' name='sitesearch' value='ahfb2000.com' checked='checked'></input>ahfb2000.com";
echo "&nbsp;&nbsp;";
echo "<input type='hidden' name='client' value='pub-1100372967516054'></input>";
echo "<input type='hidden' name='forid' value='1'></input>";
echo "<input type='hidden' name='channel' value='4291555943'></input>";
echo "<input type='hidden' name='ie' value='ISO-8859-1'></input>";
echo "<input type='hidden' name='oe' value='ISO-8859-1'></input>";
echo "<input type='hidden' name='cof' value='GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:50;LW:349;L:http://www.ahfb2000.com/webmastertoolsgoogle.gif;S:http://www.ahfb2000.com;FORID:1;'></input>";
echo "<input type='hidden' name='hl' value='en'></input>";
echo "</td></tr>";
echo "<tr>";
echo "<td colspan='2'>";
echo "
<script type='text/javascript'><!--
google_ad_client = 'pub-1100372967516054';
google_ad_width = 468;
google_ad_height = 15;
google_ad_format = '468x15_0ads_al';
google_ad_channel ='4239625581';
google_color_border = 'f6f6f6';
google_color_bg = 'f6f6f6';
google_color_link = '0000FF';
google_color_url = '000000';
google_color_text = '000000';
//--></script>
<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'>
</script>
";
echo "</td>";
echo "</tr>";
echo "</table></form>";
echo "</div>";
echo "</div>";
echo "<div class='menu'>";
echo "<a href='http://www.ahfb2000.com/html.php' title='HTML'>HTML</a>  |  "; 
echo "<a href='http://css.somepeople.net/' title='Cascading Style Sheets (CSS)'>CSS</a>  |  ";
echo "<a href='http://www.ahfb2000.com/php-scripts/index.php' title='PHP Scripts'>PHP Scripts</a>  |  "; 
echo "<a href='http://www.ahfb2000.com/webmastertools.php' title='Code Generators and Webmaster Tools'>Code Generators and Webmaster Tools</a>  |  ";
echo "<a href='http://www.ahfb2000.com/webmaster_help_desk/index.php' title='Webmaster Forums'>Webmaster Forums</a>  |  ";
echo "<a href='http://www.ahfb2000.com/host/index.php' title='web hosting'>Web Hosting</a>  |  ";
echo "<a href='http://www.onestopdomains.com/' title='Domain Names'>Domain Names</a>  |  ";
echo "<a href='http://www.ahfb2000.com/bookstore/index.php' title='Webmaster Books'>Webmaster Books</a><br />";
echo "<a href='http://www.ahfb2000.com/host/coldfusion.php?platform=coldfusion' title='Coldfusion Hosting'>Coldfusion Web Hosting</a>  |  ";
echo "<a href='http://www.ahfb2000.com/host/reseller.php?reseller=yes' title='Reseller Hosting'>Reseller Web Hosting</a>  |  ";
echo "<a href='http://www.ahfb2000.com/host/windows.php?platform=Windows' title='Windows Hosting'>Windows Web Hosting</a>  |  ";
echo "<a href='http://www.ahfb2000.com/host/frontpage.php?frontpage=yes' title='Frontpage Hosting'>Frontpage Web Hosting</a>  |  ";
echo "<a href='http://www.ahfb2000.com/host/unix.php?platform=unix' title='Unix Hosting'>Unix Web Hosting</a>  |  ";
echo "<a href='http://www.ahfb2000.com/host/displaycategory.php?cat=Dedicated' title='Dedicated Hosting'>Dedicated Web Hosting</a>  |  ";
echo "<a href='http://www.ahfb2000.com/host/displaycategory.php?cat=shared'  title='Shared Hosting'>Shared Web Hosting</a>&nbsp;";
echo "</div>";


echo "<br />";
echo "<table cellpadding='3' cellspacing='0' border='0' width='100%'>";
echo "<tr>";
echo "<td width='170' valign='top' align='center'>";
echo "&nbsp;</td>";
echo "<td valign='top' align='center'>";
echo "<h1>Web Hosting Provider Directory</h1><br />";
echo "<br />";
$squery="select * from hosthostpackages where monthlycost <= '$price' AND space >= '$space' AND transfer >= '$transfer' AND platform='$Platform'";
$result = mysql_query($squery);
$numresults = mysql_num_rows($result);
print "<p>There were $numresults packages that suit your needs";
while ($row = mysql_fetch_object($result)) {
$squery2="select * from hostwebhost where host_id = '$row->host_id'";
$result2 = mysql_query($squery2);
while ($myrow = mysql_fetch_object($result2)) {
print "<table cellpadding='1' cellspacing='0' border='0' class='tborder' width='100%' align='center'><tr><td>\n";
print "<table class='tborder2' cellpadding='2' cellspacing='2' border='0' width='100%'>\n";
print "<tr>\n";
print "<td class='thead' colspan='4'>\n";
print "<p align='left'><b><a href='http://www.ahfb2000.com/host/displaypackage.php?package=$row->package_id'>$myrow->companyname&nbsp;$row->packagename</a></b>&nbsp;&nbsp;&nbsp;<font color='#ff0000'>$myrow->suggested</font>\n";
print "</p></td>\n";
print "<td class='thead' colspan='4'>\n";
print "<p align='left'><b>Prices</b></p>\n";
print "</td>\n";
print "</tr>\n";
print "<tr>\n";
print "<td class='alt1'>\n";
print "<p align='left'><b>Space:</b></p>\n";
print "</td>\n";
print "<td class='alt1'>\n";
print "<p align='left'>$row->space MB</p>\n";
print "</td>\n";
print "<td class='thead'>\n";
print "<p align='left'><b>Platform:</b></p>\n";
print "</td>\n";
print "<td class='thead'>\n";
print "<p align='left'>$row->platform</p>\n";
print "</td>\n";
print "<td class='alt1'>\n";
print "<p align='left'><b>Monthly cost:</b></p>\n";
print "</td>\n";
print "<td class='alt1'>\n";
print "<p align='left'>$row->monthlycost</p>\n";
print "</td>\n";
print "<td class='thead'>\n";
print "<p align='left'><b>Setup:</b></p>\n";
print "</td>\n";
print "<td class='thead'>\n";
print "<p align='left'>$row->startupcost</p>\n";
print "</td>\n";
print "</tr>\n";
print "<tr>\n";
print "<td class='alt1'>\n";
print "<p align='left'><b>Transfer:</b></p>\n";
print "</td>\n";
print "<td class='alt1'>\n";
print "<p align='left'>$row->transfer Gbs</p>\n";
print "</td>\n";
print "<td class='thead'>\n";
print "<p align='left'><b>Country:</b></p>\n";
print "</td>\n";
print "<td class='thead'>\n";
print "<p align='left'>$myrow->country</p>\n";
print "</td>\n";
print "<td class='alt1'>\n";
print "<p align='left'><b>Quarterly:</b></p>\n";
print "</td>\n";
print "<td class='alt1'>\n";
print "<p align='left'>$row->qtrlycost</p>\n";
print "</td>\n";
print "<td class='thead'>\n";
print "<p align='left'><b>Setup:</b></p>\n";
print "</td>\n";
print "<td class='thead'>\n";
print "<p align='left'>$row->qtrlysetup</p>\n";
print "</td>\n";
print "</tr>\n";
print "<tr>\n";
print "<td class='alt1' colspan='4' rowspan='2'>\n";
print "<p align='center'><b><a href='http://www.ahfb2000.com/host/displaypackage.php?package=$row->package_id'>Plan Details</a></b> - <b><a href='http://www.ahfb2000.com/host/companies/displaycompany.php?link_id=$myrow->host_id'>Company Info &amp; Reviews</a></b></p>\n";
print "</td>\n";
print "<td class='alt1'>\n";
print "<p align='left'><b>Semi-annually:</b></p>\n";
print "</td>\n";
print "<td class='alt1'>\n";
print "<p align='left'>$row->semicost</p>\n";
print "</td>\n";
print "<td class='thead'>\n";
print "<p align='left'><b>Setup:</b></p>\n";
print "</td>\n";
print "<td class='thead'>\n";
print "<p align='left'>$row->semisetup</p>\n";
print "</td>\n";
print "</tr>\n";
print "<tr>\n";
print "<td class='alt1'>\n";
print "<p align='left'><b>Annually:</b></p>\n";
print "</td>\n";
print "<td class='alt1'>\n";
print "<p align='left'>$row->annualcost</p>\n";
print "</td>\n";
print "<td class='thead'>\n";
print "<p align='left'><b>Setup:</b></p>\n";
print "</td>\n";
print "<td class='thead'>\n";
print "<p align='left'>$row->annualsetup</p>\n";
print "</td>\n";
print "</tr>\n";
print "</table>\n";
print "</td>\n";
print "</tr>\n";
print "</table><br />\n";
}

}

chdir('/big/dom/xahfb2000/www/webmaster_help_desk/'); 
include('/big/dom/xahfb2000/www/webmaster_help_desk/global.php');
chdir('/big/dom/xahfb2000/www/host/host1/');
echo "<div style='padding:0px 0px 0px 0px'>";
echo "<table class='tborder' cellpadding='6' cellspacing='1' border='0' width='100%' align='center'>";
echo "<tr>";
echo "<td class='alt1' width='100%'>";
echo "<div class='navbar' style='font-size:10pt'>";
echo "<a href='http://www.ahfb2000.com/' accesskey='1'>";
echo "<img class='inlineimg' src='http://www.ahfb2000.com/webmaster_help_desk/images/misc/navbits_start.gif' alt='' border='0' />";
echo "</a><h1>";
echo "</h1>";
echo "<br /><br />";
echo "<span class='smallfont'>Get help with PHP and MySQL in our <b>PHP &amp; Mysql Forum</b>";
echo "<br /><br />";
echo "<font color='red'><b>PHP and MySQL pros needed</b><br />We have lots of members needing your PHP and MySQL help now, please take a minute to register and begin helping others.</font></span>";
echo "<br />";
echo "</div>";
echo "</td>";	
echo "<td class='alt2' valign='top' nowrap='nowrap'>";
echo "<div class='smallfont'>";
echo "<div class='smallfont'>";
// Check if user is logged in
if ($vbulletin->userinfo['userid']!=0) {
// Display welcome back message
echo "<b>Welcome, ";
echo $vbulletin->userinfo['username'];
echo "</b>";
if($vbulletin->userinfo['pmunread']) {
echo "&nbsp;<a href='http://www.ahfb2000.com/webmaster_help_desk/private.php?'><img border='0' src='http://www.ahfb2000.com/webmaster_help_desk/images/newpm1.gif' width='22' height='10'></a>";
}
echo "<br />";
if($show['pmstats']) {
echo "<phrase 1='$pmbox[lastvisitdate]' 2='$pmbox[lastvisittime]'>You last visited: $pmbox[lastvisitdate] at $pmbox[lastvisittime]</phrase>";
echo "<br /><phrase 1='$vbphrase[unread_x_nav_compiled]' 2='$vbphrase[total_x_nav_compiled]' 3='$session[sessionurl]'><a href='http://www.ahfb2000.com/webmaster_help_desk/private.php?'>Private Messages</a>: $vbphrase[unread_x_nav_compiled], $vbphrase[total_x_nav_compiled].</phrase>";
}
} else {
// If user is not logged in, display the login box
echo"
<form action=\"http://www.ahfb2000.com/webmaster_help_desk/login.php\" method=post onsubmit=md5hash(vb_login_password,vb_login_md5password,vb_login_md5password_utf)>
<script type=text/javascript src=\"http://www.ahfb2000.com/webmaster_help_desk/clientscript/vbulletin_md5.js\"></script>
<table cellpadding='0' cellspacing='2' border='0'>
<tr>
<td class='smallfont'>User Name:</td>
<td><input name='vb_login_username' type='text' id='navbar_username' size='10'  /></td>
<td class='smallfont' colspan='2' nowrap='nowrap'><label for=cb_cookieuser_navbar><input name=cookieuser type=checkbox id=cb_cookieuser_navbar value=1 checked=checked />Remember Me?</label></td>
</tr>
<tr>
<td class='smallfont'>Password:</td>
<td><input name=vb_login_password type=password size=10 /></td>
<td><input type=submit title=$vbphrase[enter_username_to_login_or_register] value=\"Log In\" /></td>
</tr>
</table>	
<input type=hidden name=s value=$session[sessionhash] />
<input type=hidden name=do value=login />
<input type=hidden name=vb_login_md5password />
<input type=hidden name=vb_login_md5password_utf />
</form>
";
}
echo "</div>";
echo "</div>";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "<br />";
if($show['guest']) {
echo "<table class='tborder' cellpadding='$stylevar[cellpadding]' cellspacing='$stylevar[cellspacing]' border='0' width='100%' align='center'>";
echo "<tr>";
echo "<td class='alt1'>";
echo "Welcome to <strong>Advanced HTML For Beginners</strong>. <br /><br />You are currently viewing our website as a guest which gives you limited access to view most tutorials, discussions and articles. By joining our free webmaster community you will have access to post topics, communicate privately with other members (PM), respond to polls and access many other special features. Registration is fast, simple and absolutely free so please, <a href='http://www.ahfb2000.com/webmaster_help_desk/register.php$session[sessionurl_q]' rel='nofollow'><strong>join our webmaster community today</strong></a>!";
echo "</td>";
echo "</tr>";
echo "</table>";
} else {
if ($vbulletin->userinfo['usergroupid'] == 3) {
echo "<table class='tborder' cellpadding='$stylevar[cellpadding]' cellspacing='$stylevar[cellspacing]' border='0' width='100%' align='center'>";
echo "<tr>";
echo "<td class='alt1'>";
echo "Your account has not been confirmed and is not yet active. To complete your registration you will need to verify your email address by clicking a special link sent in your welcome email. If you have lost this email, or it never arrived, please go <a href='http://www.ahfb2000.com/webmaster_help_desk/register.php?do=requestemail'>here</a> to request another activation email be sent to you. If you suspect your email address is set wrong, go <a href='http://www.ahfb2000.com/webmaster_help_desk/sendmessage.php'>here</a> and fill the form out so an administrator can fix your account.";
echo "</td>";
echo "</tr>"; 
echo "</table>";
} else {
if ($vbulletin->userinfo['posts'] < 1) {
echo "<table class='tborder' cellpadding='$stylevar[cellpadding]' cellspacing='$stylevar[cellspacing]' border='0' width='100%' align='center'>";
echo "<tr>";
echo "<td class='alt1'>";
echo "Hello ";
echo $vbulletin->userinfo['username'];
echo ",<br />Our records indicate that you have never posted to AHFB2000.com before. <br /> Why not start with your first post today and become an active part of our webmaster forums now!";
echo "</td>";
echo "</tr>";
echo "</table>";
} else {
if ($headerstime - 1209600 > $vbulletin->userinfo['lastpost']) {
echo "<table class='tborder' cellpadding='$stylevar[cellpadding]' cellspacing='$stylevar[cellspacing]' border='0' width='100%' align='center'>";
echo "<tr>";
echo "<td class='alt1'>";
echo "Hello ";
echo $vbulletin->userinfo['username'];
echo ", it appears that you have not posted on our forums in several weeks, why not take a few moments to ask a question, help provide a solution or just engage in a conversation with another member in any one of our forums.";
echo "</td>";
echo "</tr>";
echo "</table>";
}
}
}
}
include "$searchfooter1";

exec_shut_down();
?>
Dave
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:31 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.15546 seconds
  • Memory Usage 2,403KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)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_onlinestatus
  • (1)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadedmode.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete