Note that there are some explanatory texts on larger screens.

plurals
  1. POTrouble With Understanding How PHPBB translates to regular PHP
    primarykey
    data
    text
    <p>I have been fiddling around with a third-party script for some time when I noticed there was some unusual PHPBB framework code put in randomly with the rest of the PHP. What I need to understand is if there is anything particularly special about this code(can it do something regular PHP can't?) and how I can smoothly transition the code to PHP without a framework if there isn't anything special about the code.</p> <pre><code>&lt;? include('bar.php'); include "../includes/config.inc.php"; include "loggedin.inc.php"; include "../includes/countries.inc.php"; $auction_id = isset($_REQUEST['aid']) ? $_REQUEST['aid'] : ""; ?&gt; &lt;? define("DATAGRID_DIR", "../datagrid/"); define("PEAR_DIR", "../datagrid/pear/"); require_once(DATAGRID_DIR . 'datagrid.class.php'); require_once(PEAR_DIR . 'PEAR.php'); require_once(PEAR_DIR . 'DB.php'); $DB_USER = $DbUser; $DB_PASS = $DbPassword; $DB_HOST = $DbHost; $DB_NAME = $DbDatabase; ob_start(); $db_conn = DB::factory('mysql'); $result_conn = $db_conn-&gt;connect(DB::parseDSN('mysql://' . $DB_USER . ':' . $DB_PASS . '@' . $DB_HOST . '/' . $DB_NAME)); if (DB::isError($result_conn)) { die($result_conn-&gt;getDebugInfo()); } $sql = "SELECT u.id, u.nick, COUNT(b.bidder) AS bid_count, 'View offers' AS link FROM BPLA_bids b INNER JOIN BPLA_users u ON b.bidder=u.id WHERE b.auction=$auction_id GROUP BY b.bidder"; $unique_prefix = "au_"; $dgrid = new DataGrid($debug_mode, $messaging, $unique_prefix, DATAGRID_DIR); $default_order_field = "nick"; $default_order_type = "ASC"; $dgrid-&gt;dataSource($db_conn, $sql, $default_order_field, $default_order_type); $dg_language = "en"; $dgrid-&gt;setInterfaceLang($dg_language); $direction = "ltr"; $dgrid-&gt;setDirection($direction); $modes = array( "add" =&gt; array( "view" =&gt; false, "edit" =&gt; false, "type" =&gt; "link" ), "edit" =&gt; array( "view" =&gt; false, "edit" =&gt; false, "type" =&gt; "link", "byFieldValue" =&gt; "" ), "cancel" =&gt; array( "view" =&gt; false, "edit" =&gt; false, "type" =&gt; "link" ), "details" =&gt; array( "view" =&gt; false, "edit" =&gt; false, "type" =&gt; "link" ), "delete" =&gt; array( "view" =&gt; false, "edit" =&gt; false, "type" =&gt; "image" ) ); $dgrid-&gt;setModes($modes); $http_get_vars = array( "aid" ); $dgrid-&gt;setHttpGetVars($http_get_vars); $printing_option = false; $dgrid-&gt;allowPrinting($printing_option); $exporting_option = false; $exporting_directory = ""; $dgrid-&gt;allowExporting($exporting_option, $exporting_directory); $sorting_option = true; $dgrid-&gt;allowSorting($sorting_option); $paging_option = true; $rows_numeration = false; $numeration_sign = "N #"; $dgrid-&gt;allowPaging($paging_option, $rows_numeration, $numeration_sign); $bottom_paging = array(); $top_paging = array(); $pages_array = array( "10" =&gt; "10", "25" =&gt; "25", "50" =&gt; "50", "100" =&gt; "100", "250" =&gt; "250" ); $default_page_size = 10; $paging_arrows = array( "first" =&gt; "|&amp;lt;&amp;lt;", "previous" =&gt; "&amp;lt;&amp;lt;", "next" =&gt; "&amp;gt;&amp;gt;", "last" =&gt; "&amp;gt;&amp;gt;|" ); $dgrid-&gt;setPagingSettings($bottom_paging, $top_paging, $pages_array, $default_page_size, $paging_arrows); $dgrid-&gt;setViewModeTableProperties($vm_table_properties); $vm_colimns = array( "nick" =&gt; array( "header" =&gt; "Nick", "type" =&gt; "label", "summarize" =&gt; "false", "visible" =&gt; "true" ), "bid_count" =&gt; array( "header" =&gt; "Bid count", "type" =&gt; "label", "summarize" =&gt; "false", "visible" =&gt; "true" ), "link" =&gt; array( "header" =&gt; "&amp;nbsp;", "type" =&gt; "link", "field_key" =&gt; "id", "field_data" =&gt; "link", "href" =&gt; "auction_users_bids.php?aid=$auction_id&amp;uid={0}" ) ); $dgrid-&gt;setColumnsInViewMode($vm_colimns); $dgrid-&gt;bind(); ob_end_flush(); ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload