vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   help with php code (https://vborg.vbsupport.ru/showthread.php?t=135425)

The Major 01-03-2007 05:18 PM

help with php code
 
I am trying to get this php code to work in a header. It spits it out after the title condition. Works fine outside of the vbull enviro. www.majorwager.com/testhead.php if someone could correct it for me it would be greatly appreciated.


<?

$conf['dbName'] = '****r';
$conf['dbHost'] = '*****l';
$conf['dbUser'] = '****';
$conf['dbPass'] = '*****';


$dbcon = mysql_connect($conf['dbHost'], $conf['dbUser'], $conf['dbPass']);
mysql_select_db($conf['dbName'], $dbcon);


if (!$dbcon) {
die('Connection error: ' . mysql_error());
}


$sql = '
SELECT
rowid,
title,
descript,
show_descr,
url,
casinotype,
advertiser,
link_url,
weight,
rating,
short_form,
insured
FROM
sponsors
WHERE
rating = \'0\'
AND
hide = \'0\'
AND
title <> \'\'
AND
advertiser = \'1\'
AND
url <> \'\'
AND
link_url = \'1\'
ORDER BY
weight desc, lower(short_form)
';


?>

<!--- Sportsbook links query --->
<table width="100%" cellpadding="3" cellspacing="0" border="0" style="border:solid black;border-width:1px 1px 0px 1px;background:#000000" align="center">

<tr>

<td valign="middle" align="center"><img src="/images/company_logos/mw_arrow_left.gif" border="0" width="32" height="71"></td>

<td valign="middle" align="center" class="sportsbooks_links">
<span class="sportsbooks_links">
<?
$res = mysql_query($sql, $dbcon);
while ($row = mysql_fetch_array($res))
{
?>
<img src="/images/company_logos/mw_bullet.gif" border="0" width="4" height="7">
&nbsp;<a class="sportsbooks_links"
href="<?=stripslashes($row['url'])?>"
target="_blank"
title="<?=stripslashes($row['short_form'])?>">
<span class="sportsbooks_links"><?=stripslashes($row['short_form'])?></span></a>

<?
}
?>
</span></td>

<td valign="middle" align="center"><img src="/images/company_logos/mw_arrow_right.gif" border="0" width="32" height="71"></td>

</tr>

</table>


All times are GMT. The time now is 05:02 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.00963 seconds
  • Memory Usage 1,717KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete