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

Reply
 
Thread Tools Display Modes
  #1  
Old 06-03-2007, 01:05 PM
hotma1l hotma1l is offline
 
Join Date: Sep 2004
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Php parse error

I am getting this error in cpanel

PHP Parse error: syntax error, unexpected T_STRING in /home/mixq8/public_html/vb/last.php on line 17

here is the last.php code

PHP Code:
<?
require("mxq8last.php");
require("includes/config.php");


echo "<FONT color=$tc ><marquee onmouseover=this.stop() onmouseout=this.start() dir=\"rtl\" direction=\"right\" scrolldelay=\"100\"><FONT SIZE=\"1\" FACE=\"MS Sans Serif\"><font color=\"#000000\">&nbsp; ";;
//...............Last 10 Posts v2.0.1...........\\
//.........by Kevin (kevin@tubescan.com)........\\
//.....Edit by lad_pc (lad_pc@hotmail.com)......\\
//......????? NetMan       .........\\
//......... (c) 2001 taiba.port5.com ...........\\

// vBulletin.com thread: http://www.vbulletin.com/forum/showthread.php?threadid=12324
// vBulletin.com thread: http://www.taiba.port5.com/ let's get connected


$db=mysql_connect(localhost,mixq8_dddd,dddd) or die("Can't open connection to MySQL");
mysql_select_db(mixq8_dddd) or die("Can't select database");

$hfs = $fs+2;
$fs .= "pt";
$hfs .= "pt";



// the base WHERE statement
$wheresql = "WHERE thread.lastposter=user.username AND thread.open!='10'";

// we can't have both the last 24 hours *and* the last 7 days, so error out if needed
if ($last24 == "1" && $last7 == "1") {
    print("Error: \$last24 and \$last7 are both set to 1. Please change one of them to 0.");
    exit;
}
// otherwise we're gonna find out which one it is
// last 24
if ($last24 == "1") {
    $time = time()-86400;
    $wheresql .= " AND thread.lastpost>'$time'";
}
// last 7
if ($last7 == "1") {
    $time = time()-604800;
    $wheresql .= " AND thread.lastpost>'$time'";
}
// are we trying to exclude *and* include forums? if so, error out
if ($excludeforums != "" && $includeforums != "") {
    print("Error: \$includeforums and \$excludeforums are both set with numbers. Please remove the numbers from <b>one</b> of these two to proceed.");
    exit;
}
// otherwise figure out which one we're using
// include forums
if ($includeforums == "" or $includeforums <= "0") {
    $quarter = "no";
} else {
    $incfid = explode(",",$includeforums); $i = 0; $a = count($incfid);
    if ($a > 1) {
        $wheresql .= " AND (thread.forumid='$incfid[0]'";
        ++$i;
        while ($i < $a) {
            $wheresql .= " OR thread.forumid='$incfid[$i]'"; ++$i;
        }
        $wheresql .= ")";
    } else {
        $wheresql .= " AND thread.forumid='$incfid[$i]'";
    }
}
// or exclude forums
if ($excludeforums == "" or $excludeforums <= "0") {
    $quarter = "no";
} else {
    $excfid = explode(",",$excludeforums); $i = 0; $a = count($excfid);
    while ($i < $a) {
        $wheresql .= " AND thread.forumid!='$excfid[$i]'";    ++$i;
    }
}

// ooh a query!
$query = "SELECT thread.lastpost,thread.title,thread.lastposter,thread.replycount,thread.views,user.userid,thread.threadid,thread.forumid,thread.iconid FROM thread,user $wheresql ORDER BY thread.$ob $obdir LIMIT $maxthreads";
// let's get the info
$tr = mysql_query($query) or die("MySQL reported this error while trying to retreive the info: ".mysql_error());
$dtf = mysql_query("SELECT value FROM setting WHERE varname='dateformat' OR varname='timeformat' OR varname='timeoffset' ORDER BY varname");
$df = mysql_result($dtf,0,0);
$tf = mysql_result($dtf,1,0);
$tof = mysql_result($dtf,2,0);


// let's display the info
while ($threads = mysql_fetch_array($tr)) {

 echo " <FONT SIZE=\"1\" FACE=\"MS Sans Serif\"><a href=\"$url/showthread.php?=$session[sessionhash]&threadid=$threads[threadid]&goto=newpost\" title=\"$threads[title]\" target=_blank><font color=\"#226FBB\">$threads[title]  ( ??? ?? : $threads[lastposter] )  ?????? : $threads[replycount] &nbsp</font></a><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ? &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font>";
}
// close it all up
// bye!

?></marquee>
what seems to be the problem

thank you
Reply With Quote
  #2  
Old 06-03-2007, 01:26 PM
vectorfc vectorfc is offline
 
Join Date: Sep 2006
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There aren't any quotes around your database parameters.

Try

Code:
$db=mysql_connect("localhost","mixq8_dddd","dddd") or die("Can't open connection to MySQL");
Reply With Quote
Reply


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 07:56 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.03497 seconds
  • Memory Usage 2,175KB
  • Queries Executed 11 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (2)postbit
  • (2)postbit_onlinestatus
  • (2)postbit_wrapper
  • (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_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • 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