I have been rewriting a pre-existing mod, and when I test my php file, I get the following error:
PHP Code:
Parse error: syntax error, unexpected $end in /home3/charmeddark/public_html/auditionapp.php on line 520
I have done a fair amount of research, and from what I can gather it is a closing bracket or quotation that is missing, however, I have been unable to locate the specific line causing this issue. Also, Line 520 correlates to:
Due to limitations on threads, the source code of the php file in question, will be displayed in the next two posts below.
I appreciate any assistance with this issue that can be offered.
Thank you,
EDIT: The php file is located at
http://charmeddarkness.net/auditionapp.php
--------------- Added [DATE]1490152559[/DATE] at [TIME]1490152559[/TIME] ---------------
PHP Code:
<?php
// #######################################################################
// ####################### SET PHP ENVIRONMENT ###########################
// #######################################################################
error_reporting(E_ALL & ~E_NOTICE);
// #######################################################################
// #################### DEFINE IMPORTANT CONSTANTS #######################
// #######################################################################
define('THIS_SCRIPT', 'auditionapp');
define('CSRF_PROTECTION', true);
// #######################################################################
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// #######################################################################
$phrasegroups = array();
$specialtemplates = array();
$globaltemplates = array(
'rpg_auditionapp',
'humanverify'
);
$actiontemplates = array();
// #######################################################################
// ######################### REQUIRE BACK-END ############################
// #######################################################################
require_once('./global.php');
require_once(DIR . '/includes/functions.php');
require_once(DIR . '/includes/functions_auditionapp.php');
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
$imp_vars = array(
'do' => ''
);
$pages = array(
'main',
'send'
);
$addresses = explode(",", $vbulletin->options['rpg_auditionapp_notifyemail']);
$rpg_auditionapp_days_registered = floor((TIMENOW - $vbulletin->userinfo['joindate']) / 86400);
$imp_vars['do'] = $_REQUEST['do'];
if (!(in_array($imp_vars['do'], $pages)))
{
$imp_vars['do'] = 'main';
}
if (!$vbulletin->options['rpg_auditionapp_onoff']) { standard_error(fetch_error('rpg_auditionapp_disabled')); }
if (!($permissions['rpgaaperms'] & $vbulletin->bf_ugp['rpgaaperms']['cansubmitauditionapp'])) { print_no_permission(); }
if ($vbulletin->userinfo['posts'] < $vbulletin->userinfo['permissions']['auditionappminpostreq'] & $vbulletin->userinfo['reputation'] < $vbulletin->userinfo['permissions']['auditionappminrepreq'] & floor((TIMENOW - $vbulletin->userinfo['joindate']) / 86400) < $vbulletin->userinfo['permissions']['auditionappminregreq'])
{
standard_error(fetch_error('rpg_auditionapp_post_rep_register_permissions', $vbulletin->userinfo['username'], $vbulletin->userinfo['permissions']['auditionappminpostreq'], $vbulletin->userinfo['permissions']['auditionappminrepreq'], $vbulletin->userinfo['permissions']['auditionappminregreq'], $vbulletin->userinfo['posts'], $vbulletin->userinfo['reputation'], $rpgaa_days_registered));
}
else if ($vbulletin->userinfo['posts'] < $vbulletin->userinfo['permissions']['auditionappminpostreq'] & $vbulletin->userinfo['reputation'] < $vbulletin->userinfo['permissions']['auditionappminrepreq'])
{
standard_error(fetch_error('rpg_auditionapp_post_rep_permissions', $vbulletin->userinfo['username'], $vbulletin->userinfo['permissions']['auditionappminpostreq'], $vbulletin->userinfo['permissions']['auditionappminrepreq'], $vbulletin->userinfo['posts'], $vbulletin->userinfo['reputation']));
}
else if ($vbulletin->userinfo['posts'] < $vbulletin->userinfo['permissions']['auditionappminpostreq'] & floor((TIMENOW - $vbulletin->userinfo['joindate']) / 86400) < $vbulletin->userinfo['permissions']['auditionappminregreq'])
{
standard_error(fetch_error('rpg_auditionapp_post_register_permissions', $vbulletin->userinfo['username'], $vbulletin->userinfo['permissions']['auditionappminpostreq'], $vbulletin->userinfo['permissions']['auditionappminregreq'], $vbulletin->userinfo['posts'], $usml_days_registered));
}
else if ($vbulletin->userinfo['reputation'] < $vbulletin->userinfo['permissions']['auditionappminrepreq'] & floor((TIMENOW - $vbulletin->userinfo['joindate']) / 86400) < $vbulletin->userinfo['permissions']['auditionappminregreq'])
{
standard_error(fetch_error('rpg_auditionapp_rep_register_permissions', $vbulletin->userinfo['username'], $vbulletin->userinfo['permissions']['auditionappminrepreq'], $vbulletin->userinfo['permissions']['auditionappminregreq'], $vbulletin->userinfo['reputation'], $rpgaa_days_registered));
}
else if ($vbulletin->userinfo['posts'] < $vbulletin->userinfo['permissions']['auditionappminpostreq'])
{
standard_error(fetch_error('rpg_auditionapp_post_permissions', $vbulletin->userinfo['username'], $vbulletin->userinfo['permissions']['auditionappminpostreq'], $vbulletin->userinfo['posts']));
}
else if ($vbulletin->userinfo['reputation'] < $vbulletin->userinfo['permissions']['auditionappminrepreq'])
{
standard_error(fetch_error('rpg_auditionapp_rep_permissions', $vbulletin->userinfo['username'], $vbulletin->userinfo['permissions']['auditionappminrepreq'], $vbulletin->userinfo['reputation']));
}
else if (floor((TIMENOW - $vbulletin->userinfo['joindate']) / 86400) < $vbulletin->userinfo['permissions']['auditionappminregreq'])
{
standard_error(fetch_error('rpg_auditionapp_register_permissions', $vbulletin->userinfo['username'], $vbulletin->userinfo['permissions']['auditionappminregreq'], $rpgaa_days_registered));
}
$navbits = array();
$navbits[] = 'Audition Application';