vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   phpStatic page error after 4.1.5 update (https://vborg.vbsupport.ru/showthread.php?t=268780)

SweCastel 08-19-2011 04:48 PM

phpStatic page error after 4.1.5 update
 
Hi,

After the 4.1.5 update I do got error in my phpscript who writes out the requested calendar events.

It did work perfect before the update. I have tried fix it myself. But with no luck.
I do attatch the code and the a screen shot of the error.

Code:

ob_start();


//  %d
$calendarid = 14;
$show_count = 50;

$query = sprintf("SELECT * FROM ".TABLE_PREFIX."event WHERE visible = 1 AND calendarid = $calendarid AND (dateline_from > '%d' || (  dateline_from > '%d' AND dateline_to < '%d' )) ORDER BY dateline_from ASC LIMIT %d",TIMENOW,TIMENOW,TIMENOW,$show_count);

$event_get = vB::$db->query_read($query);

$output_bits = '';
while($event = vB::$db->fetch_array($event_get)) {

    if($event['dateline_to'] == 0 )
    {
        $format = sprintf("Den %s",date('jS M Y',$event['dateline_from']));
    } else {
        $format = sprintf("Fr?n %s till %s",date('jS M Y',$event['dateline_from']),date('jS M Y',$event['dateline_to']));
    }
   
    $output_bits .= sprintf('
        <div class = "cms_widget_post_bit"><h4 class="cms_widget_post_header"><a href="calendar.php?do=getinfo&e=%d">%s</a></h4>
            <p class="cms_widget_post_content">%s</p>
        </div>
        ',$event['eventid'],$event['title'],$format);

}
$output = $output_bits;

ob_end_clean();

Thanks
Daniel

EDIT: I did fix it by deleting the old static page, and creating a new one. Then it did work!

EquinoxWorld 08-19-2011 06:21 PM

Just my 2 cents here but shouldn't this:

PHP Code:

$query sprintf("SELECT * FROM ".TABLE_PREFIX."event WHERE visible = 1 AND calendarid = $calendarid AND (dateline_from > '%d' || (  dateline_from > '%d' AND dateline_to < '%d' )) ORDER BY dateline_from ASC LIMIT %d",TIMENOW,TIMENOW,TIMENOW,$show_count); 

Be like this:

PHP Code:

$query sprintf("SELECT * FROM ".TABLE_PREFIX."event WHERE visible = 1 AND calendarid = ".$calendarid." AND (dateline_from > '%d' || (  dateline_from > '%d' AND dateline_to < '%d' )) ORDER BY dateline_from ASC LIMIT %d",TIMENOW,TIMENOW,TIMENOW,$show_count); 


Marco64Th 08-20-2011 09:10 AM

Quote:

Originally Posted by EquinoxWorld (Post 2235483)
Just my 2 cents here but shouldn't this:

PHP Code:

$query sprintf("SELECT * FROM ".TABLE_PREFIX."event WHERE visible = 1 AND calendarid = $calendarid AND (dateline_from > '%d' || (  dateline_from > '%d' AND dateline_to < '%d' )) ORDER BY dateline_from ASC LIMIT %d",TIMENOW,TIMENOW,TIMENOW,$show_count); 

Be like this:

PHP Code:

$query sprintf("SELECT * FROM ".TABLE_PREFIX."event WHERE visible = 1 AND calendarid = ".$calendarid." AND (dateline_from > '%d' || (  dateline_from > '%d' AND dateline_to < '%d' )) ORDER BY dateline_from ASC LIMIT %d",TIMENOW,TIMENOW,TIMENOW,$show_count); 


That doesn't make a difference.


All times are GMT. The time now is 10: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.01029 seconds
  • Memory Usage 1,736KB
  • 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)bbcode_code_printable
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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