vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   PHP Script (https://vborg.vbsupport.ru/showthread.php?t=121542)

tommyxv 07-19-2006 04:19 AM

PHP Script
 
How can I get a PHP Script to run either on a vBavanced or WebTemplate page?

This is the script

PHP Code:

 <?php

    
include(dirname(__FILE__)."/language.php");
    include(
dirname(__FILE__)."/lib.php");
    include(
dirname(__FILE__)."/engine_dml.php");
    
    
$x = new DataList;
    if(
$HTTP_POST_VARS["Filter_x"] != ""  || $HTTP_POST_VARS['CSV_x'] != "")
    {
        
// Query used in filters page and CSV output
        
$x->Query "select engine.id as 'Part Number', engine.name as 'Part Name', engine.description as 'Description' from engine";
    }
    else
    {
        
// Query used in table view
        
$x->Query "select engine.id as 'Part Number', engine.name as 'Part Name', engine.description as 'Description' from engine";
    }
    
    
// handle date sorting correctly
    // end of date sorting handler
    
    
$x->DataHeight 150;
    
$x->AllowSelection 0;
    
$x->AllowDelete 1;
    
$x->AllowInsert 1;
    
$x->AllowUpdate 1;
    
$x->AllowFilters 0;
    
$x->AllowSavingFilters 0;
    
$x->AllowSorting 1;
    
$x->AllowNavigation 1;
    
$x->AllowPrinting 1;
    
$x->AllowCSV 0;
    
$x->HideTableView 0;
    
$x->RecordsPerPage 10;
    
$x->QuickSearch 3;
    
$x->QuickSearchText $Translation["quick search"];
    
$x->ScriptFileName "engine_view.php";
    
$x->TableTitle "Partnumber";
    
$x->PrimaryKey "engine.id";
    
$x->ColWidth[] = 150;
    
$x->ColWidth[] = 150;
    
$x->ColWidth[] = 150;
    
$x->Template 'engine_templateTV.html';
    
$x->SelectedTemplate 'engine_templateTVS.html';
    
$x->ShowTableHeader 1;
    
$x->ShowRecordSlots 1;
    
$x->HighlightColor '#FFE4E1';
    
$x->Render();
    
    include(
dirname(__FILE__)."/header.php");
    echo 
$x->HTML;
    include(
dirname(__FILE__)."/footer.php");
?>


tommyxv 07-25-2006 08:20 AM

Any suggestions? :confused:


All times are GMT. The time now is 03:07 AM.

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.00961 seconds
  • Memory Usage 1,732KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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