';
echo strtr($f['text_'.$_GET['lang']],array(''' => "'"));
echo '';
$_SESSION['popupShow'] = 1;
exit;
}
/**
* Redirecting bouling page to new wordpress inside page.
* Yeah I know... not the best way to do that, but .htaccess method didn't work here, dont know why though ¯\_(ツ)_/¯
*/
// if ($_GET['item_id']=='5') {
// header("HTTP/1.1 301 Moved Permanently");
// header("Location: http://www.bowlero.lv/?page_id=22");
// exit();
// }
if ( isset( $_GET["option"] ) )
$com = $_GET["option"];
else
$com = "";
if ( isset( $_GET["task"] ) )
$func = $_GET["task"];
else
$func = "view";
//modules seting
if ( isset($_GET['item_id']) )
{
if ( get_definite_parent_id ( intval($_GET['item_id']), 1 ) ) $menu1 = get_definite_parent_id ( intval($_GET['item_id']), 1 ); else $menu1 = intval($_GET['item_id']);
$sql = "SELECT COUNT( id ) AS CNT FROM menu WHERE parent_id=".$menu1;
$result = mysql_query( $sql );
$row = mysql_fetch_array( $result );
if ( $row['CNT'] > 1 )
{
$mod_left_sub_menu = true;
}
else
{
$mod_left_sub_menu = false;
$mod_poll = true;
}
}
else
{
$mod_left_sub_menu = false;
$mod_poll = true;
}
//end modules seting
if ( ( isset($_GET['item_id']) ) and ( !isset($_GET['option']) ) )
{
$sql = " SELECT * FROM menu WHERE parent_id=".intval($_GET['item_id'])." and ordering>0 ORDER BY ordering LIMIT 1";
$result = mysql_query( $sql );
$row = mysql_fetch_array( $result );
$com=$row[component];
$_GET['item_id']=$row[id];
}
if ( $com!="" && $func!="" )
{
if ( file_exists( "components/$com/$func.php" ) )
$cur_com_and_func="components/$com/$func.php";
else
$cur_com_and_func="";
}
else
{ // default setting
$cur_com_and_func="components/text/view.php";
$mod_poll = true;
$_GET['item_id']=1;
}
// get older parent id
if ( get_older_parent( intval($_GET['item_id']) ) ) $older_parent_id=get_older_parent( intval($_GET['item_id']) ); else $older_parent_id=intval($_GET['item_id']);
if ( $mod_left_sub_menu && $_GET[option]!='actions' )
{
$sql = "SELECT * FROM menu WHERE parent_id=$older_parent_id AND component='actions' ORDER BY ordering limit 1";
$result = mysql_query( $sql );
$row = mysql_fetch_array( $result );
if ( $row[id] )
{
$sql = "SELECT * FROM actions WHERE item_id=$row[id]";
$result = mysql_query( $sql );
$row = mysql_fetch_array( $result );
if ( $row[TEXT] != "" )
{
$mod_action = true;
$action_text=$row[TEXT];
}
}
}
ob_start();
include_once( "templates/bowlero.php" );
ob_end_flush();
error_reporting(E_ALL);
ini_set('display_errors', "0");
?>