if (isset($_POST['delete']) and $_POST['delete'] == 'Cancel') { include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $fstvl_id = cln($_POST['fstvl_id']); $sql = "SELECT fstvl_url FROM fstvl WHERE fstvl_id='{$fstvl_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring festival URL: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); header('Location: ' . $row['fstvl_url']); exit; } include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $fstvl_url = cln($_GET['fstvl_url']); $sql = "SELECT fstvl_id FROM fstvl WHERE fstvl_url='{$fstvl_url}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error checking that URL has given valid data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $fstvl_id = $row['fstvl_id']; if (mysqli_num_rows($result) == 0) { include $_SERVER['DOCUMENT_ROOT'] . '/includes/404.html.php'; } else { $sql = "SELECT fstvl_nm FROM fstvl WHERE fstvl_id='{$fstvl_id}'"; $result = mysqli_query($link, $sql); if (!$result) {
<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/includes/helpers.inc.php'; include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $awrd_yr = cln($_GET['awrd_yr']); if ($awrd_yr < 1000 || $awrd_yr > 9999) { include $_SERVER['DOCUMENT_ROOT'] . '/includes/404.html.php'; } else { if ($awrd_yr > 1000) { $awrd_yr_lst = '<a href="/awards/year/' . html($awrd_yr - 1) . '">' . html($awrd_yr - 1) . '</a>'; } else { $awrd_yr_lst = NULL; } if ($awrd_yr < 9999) { $awrd_yr_nxt = '<a href="/awards/year/' . html($awrd_yr + 1) . '">' . html($awrd_yr + 1) . '</a>'; } else { $awrd_yr_nxt = NULL; } $pagetitle = html($awrd_yr); $sql = "SELECT awrds_nm, awrds_url, awrd_yr, awrd_yr_end, awrd_yr_url, DATE_FORMAT(awrd_dt, '%d %b %Y') AS awrd_dt_dsply, COALESCE(awrds_alph, awrds_nm)awrds_alph, thtr_fll_nm\n FROM awrd\n INNER JOIN awrds ON awrdsid=awrds_id\n LEFT OUTER JOIN thtr ON thtrid=thtr_id\n WHERE awrd_yr='{$awrd_yr}' OR awrd_yr_end='{$awrd_yr}'\n ORDER BY awrd_dt DESC, awrds_alph ASC"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring award categories (for display) data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } while ($row = mysqli_fetch_array($result)) { if (preg_match('/TBC$/', $row['thtr_fll_nm'])) { $thtr = '<em>' . html($row['thtr_fll_nm']) . '</em>'; } else { $thtr = html($row['thtr_fll_nm']);
if (isset($_POST['delete']) and $_POST['delete'] == 'Cancel') { include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $comp_id = cln($_POST['comp_id']); $sql = "SELECT comp_url\n FROM comp\n WHERE comp_id='{$comp_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring company URL: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); header('Location: ' . $row['comp_url']); exit; } include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $comp_url = cln($_GET['comp_url']); $sql = "SELECT comp_id\n FROM comp\n WHERE comp_url='{$comp_url}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error checking that URL has given valid data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $comp_id = $row['comp_id']; if (mysqli_num_rows($result) == 0) { include $_SERVER['DOCUMENT_ROOT'] . '/includes/404.html.php'; } else { $sql = "SELECT comp_nm, comp_sffx_num, comp_url, comp_reg_nm, comp_reg_adrs,\n CASE WHEN comp_est_dt_frmt=1 THEN DATE_FORMAT(comp_est_dt, '%d %b %Y') WHEN comp_est_dt_frmt=2 THEN DATE_FORMAT(comp_est_dt, '%b %Y')\n WHEN comp_est_dt_frmt=3 THEN DATE_FORMAT(comp_est_dt, '%Y') ELSE NULL END AS comp_est_dt,\n CASE WHEN comp_dslv_dt_frmt=1 THEN DATE_FORMAT(comp_dslv_dt, '%d %b %Y') WHEN comp_dslv_dt_frmt=2 THEN DATE_FORMAT(comp_dslv_dt, '%b %Y')\n WHEN comp_dslv_dt_frmt=3 THEN DATE_FORMAT(comp_dslv_dt, '%Y') ELSE NULL END AS comp_dslv_dt\n FROM comp\n WHERE comp_id='{$comp_id}'"; $result = mysqli_query($link, $sql); if (!$result) {
<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/includes/helpers.inc.php'; include $_SERVER['DOCUMENT_ROOT'] . '/includes/feature/index.inc.php'; include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $ftr_url = cln($_GET['ftr_url']); $sql = "SELECT ftr_id FROM ftr WHERE ftr_url='{$ftr_url}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error checking that URL has given valid data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $ftr_id = $row['ftr_id']; if (mysqli_num_rows($result) == 0) { include $_SERVER['DOCUMENT_ROOT'] . '/includes/404.html.php'; } else { $sql = "SELECT ftr_nm FROM ftr WHERE ftr_id='{$ftr_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring feature data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $pagetitle = html($row['ftr_nm']); $sql = "SELECT 1 FROM ptftr WHERE ftrid='{$ftr_id}' LIMIT 1"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error checking for existence of feature for playtext: ' . mysqli_error($link);
if (isset($_POST['delete']) and $_POST['delete'] == 'Cancel') { include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $thtr_typ_id = cln($_POST['thtr_typ_id']); $sql = "SELECT thtr_typ_url\n FROM thtr_typ\n WHERE thtr_typ_id='{$thtr_typ_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring theatre type URL: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); header('Location: ' . $row['thtr_typ_url']); exit; } include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $thtr_typ_url = cln($_GET['thtr_typ_url']); $sql = "SELECT thtr_typ_id\n FROM thtr_typ\n WHERE thtr_typ_url='{$thtr_typ_url}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error checking that URL has given valid data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $thtr_typ_id = $row['thtr_typ_id']; if (mysqli_num_rows($result) == 0) { include $_SERVER['DOCUMENT_ROOT'] . '/includes/404.html.php'; } else { $sql = "SELECT thtr_typ_nm FROM thtr_typ WHERE thtr_typ_id='{$thtr_typ_id}'"; $result = mysqli_query($link, $sql); if (!$result) {
<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/includes/helpers.inc.php'; include $_SERVER['DOCUMENT_ROOT'] . '/includes/genre/index.inc.php'; include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $gnr_url = cln($_GET['gnr_url']); $sql = "SELECT gnr_id FROM gnr WHERE gnr_url='{$gnr_url}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error checking that URL has given valid data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $gnr_id = $row['gnr_id']; if (mysqli_num_rows($result) == 0) { include $_SERVER['DOCUMENT_ROOT'] . '/includes/404.html.php'; } else { $sql = "SELECT gnr_nm FROM gnr WHERE gnr_id='{$gnr_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring genre data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $pagetitle = html($row['gnr_nm']); $gnr_nm = html($row['gnr_nm']); $sql = "SELECT 1 FROM prdgnr WHERE gnrid='{$gnr_id}'\n UNION\n SELECT 1 FROM rel_gnr INNER JOIN prdgnr ON rel_gnr1=gnrid WHERE rel_gnr2='{$gnr_id}'"; $result = mysqli_query($link, $sql); if (!$result) {
<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/includes/helpers.inc.php'; include $_SERVER['DOCUMENT_ROOT'] . '/includes/category/index.inc.php'; include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $ctgry_url = cln($_GET['ctgry_url']); $sql = "SELECT ctgry_id FROM ctgry WHERE ctgry_url='{$ctgry_url}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error checking that URL has given valid data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $ctgry_id = $row['ctgry_id']; if (mysqli_num_rows($result) == 0) { include $_SERVER['DOCUMENT_ROOT'] . '/includes/404.html.php'; } else { $sql = "SELECT ctgry_nm FROM ctgry WHERE ctgry_id='{$ctgry_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring category data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $pagetitle = html($row['ctgry_nm']); $sql = "SELECT 1 FROM ptctgry WHERE ctgryid='{$ctgry_id}' LIMIT 1"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error checking for existence of category for playtext: ' . mysqli_error($link);
<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/includes/helpers.inc.php'; include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $pt_yr_num = cln($_GET['pt_yr_wrttn']); if (!preg_match('/^[1-9][0-9]{0,3}(-bce)?$/', $pt_yr_num)) { include $_SERVER['DOCUMENT_ROOT'] . '/includes/404.html.php'; } else { if (preg_match('/^[1-9][0-9]{0,3}-bce$/', $pt_yr_num)) { $pt_yr_num = preg_replace('/^([1-9][0-9]{0,3})(-bce)/', '-$1', $pt_yr_num); } if (preg_match('/^-/', $pt_yr_num)) { $pt_yr_dsply = preg_replace('/^-([1-9][0-9]{0,3})/', '$1', $pt_yr_num); $pt_yr_dsply .= ' BCE'; } else { $pt_yr_dsply = $pt_yr_num; } $pt_yr_lst = $pt_yr_num - 1; if (preg_match('/^-/', $pt_yr_lst)) { $pt_yr_lst_dsply = preg_replace('/^-([1-9][0-9]{0,3})/', '$1 BCE', $pt_yr_lst); $pt_yr_lst = preg_replace('/^-([1-9][0-9]{0,3})/', '$1-bce', $pt_yr_lst); } else { $pt_yr_lst_dsply = $pt_yr_lst; } $pt_yr_lst_lnk = '<a href="/playtext/year/' . html($pt_yr_lst) . '">' . html($pt_yr_lst_dsply) . '</a>'; $pt_yr_nxt = $pt_yr_num + 1; if (preg_match('/^-/', $pt_yr_nxt)) { $pt_yr_nxt_dsply = preg_replace('/^-([1-9][0-9]{0,3})/', '$1 BCE', $pt_yr_nxt); $pt_yr_nxt = preg_replace('/^-([1-9][0-9]{0,3})/', '$1-bce', $pt_yr_nxt); } else { $pt_yr_nxt_dsply = $pt_yr_nxt;
} if (strlen($wri_prsn_fll_nm) > 255 || strlen($wri_prsn_url) > 255) { $wri_prsn_errors++; $errors['wri_prsn_excss_lngth'] = '</br>**Writer (person) name and its URL are allowed a maximum of 255 characters each. Please amend entries that exceed this amount.**'; } } else { $wri_prsn_errors++; $wri_prsn_smcln_err_arr[] = $wri_prsn_nm; $errors['wri_prsn_smcln'] = '</br>**You must assign a given name and family name to the following using [;;]: ' . html(implode(' / ', $wri_prsn_smcln_err_arr)) . '.**'; } if ($wri_prsn_errors == 0) { $wri_prsn_frst_nm_cln = cln($wri_prsn_frst_nm); $wri_prsn_lst_nm_cln = cln($wri_prsn_lst_nm); $wri_prsn_fll_nm_cln = cln($wri_prsn_fll_nm); $wri_prsn_sffx_num_cln = cln($wri_prsn_sffx_num); $wri_prsn_url_cln = cln($wri_prsn_url); $sql = "SELECT prsn_frst_nm, prsn_lst_nm, prsn_sffx_num\n FROM prsn\n WHERE NOT EXISTS (SELECT 1 FROM prsn WHERE prsn_frst_nm='{$wri_prsn_frst_nm_cln}' AND prsn_lst_nm='{$wri_prsn_lst_nm_cln}')\n AND prsn_fll_nm='{$wri_prsn_fll_nm_cln}' AND prsn_sffx_num='{$wri_prsn_sffx_num_cln}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error checking for writer person full name with assigned given name and family name: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); if (mysqli_num_rows($result) > 0) { if ($row['prsn_sffx_num']) { $wri_prsn_nm_error_sffx_dsply = '--' . $row['prsn_sffx_num']; } else { $wri_prsn_nm_error_sffx_dsply = ''; } $wri_prsn_nm_err_arr[] = $row['prsn_frst_nm'] . ';;' . $row['prsn_lst_nm'] . $wri_prsn_nm_error_sffx_dsply;
<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/includes/helpers.inc.php'; include $_SERVER['DOCUMENT_ROOT'] . '/includes/profession/index.inc.php'; include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $prof_url = cln($_GET['prof_url']); $sql = "SELECT prof_id FROM prof WHERE prof_url='{$prof_url}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error checking that URL has given valid data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $prof_id = $row['prof_id']; if (mysqli_num_rows($result) == 0) { include $_SERVER['DOCUMENT_ROOT'] . '/includes/404.html.php'; } else { $sql = "SELECT prof_nm, prof_url FROM prof WHERE prof_id='{$prof_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring profession data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $pagetitle = html($row['prof_nm']); $prof_nm = html($row['prof_nm']); $prof_url = html($row['prof_url']); $sql = "SELECT 1 FROM prsnprof WHERE profid='{$prof_id}' UNION SELECT 1 FROM rel_prof INNER JOIN prsnprof ON rel_prof1=profid WHERE rel_prof2='{$prof_id}' LIMIT 1"; $result = mysqli_query($link, $sql);
<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/includes/helpers.inc.php'; include $_SERVER['DOCUMENT_ROOT'] . '/includes/time/index.inc.php'; include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $tm_url = cln($_GET['tm_url']); $sql = "SELECT tm_id FROM tm WHERE tm_url='{$tm_url}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error checking that URL has given valid data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $tm_id = $row['tm_id']; if (mysqli_num_rows($result) == 0) { include $_SERVER['DOCUMENT_ROOT'] . '/includes/404.html.php'; } else { $sql = "SELECT tm_nm, tm_url FROM tm WHERE tm_id='{$tm_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring setting (time) data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $pagetitle = html($row['tm_nm']); $tm_nm = html($row['tm_nm']); $tm_url = html($row['tm_url']); $sql = "SELECT 1 FROM prdsttng_tm WHERE sttng_tmid='{$tm_id}'\n UNION\n SELECT 1 FROM rel_tm INNER JOIN prdsttng_tm ON rel_tm1=sttng_tmid WHERE rel_tm2='{$tm_id}'\n LIMIT 1"; $result = mysqli_query($link, $sql);
<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/includes/helpers.inc.php'; include $_SERVER['DOCUMENT_ROOT'] . '/includes/location/index.inc.php'; include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $lctn_url = cln($_GET['lctn_url']); $sql = "SELECT lctn_id FROM lctn WHERE lctn_url='{$lctn_url}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error checking that URL has given valid data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $lctn_id = $row['lctn_id']; if (mysqli_num_rows($result) == 0) { include $_SERVER['DOCUMENT_ROOT'] . '/includes/404.html.php'; } else { $rel_lctn_cnt = array(); $sql = "SELECT lctn_nm, lctn_sffx_num, lctn_url, lctn_exp, lctn_fctn, lctn_est_dt_c, lctn_est_dt_bce, lctn_exp_dt_c, lctn_exp_dt_bce, CASE WHEN lctn_est_dt_frmt=1 THEN DATE_FORMAT(lctn_est_dt, '%d %b %Y') WHEN lctn_est_dt_frmt=2 THEN DATE_FORMAT(lctn_est_dt, '%b %Y') WHEN lctn_est_dt_frmt=3 THEN DATE_FORMAT(lctn_est_dt, '%Y') ELSE NULL END AS lctn_est_dt_frmt, CASE WHEN lctn_exp_dt_frmt=1 THEN DATE_FORMAT(lctn_exp_dt, '%d %b %Y') WHEN lctn_exp_dt_frmt=2 THEN DATE_FORMAT(lctn_exp_dt, '%b %Y') WHEN lctn_exp_dt_frmt=3 THEN DATE_FORMAT(lctn_exp_dt, '%Y') ELSE NULL END AS lctn_exp_dt_frmt\n FROM lctn\n WHERE lctn_id='{$lctn_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring setting (location) data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); if ($row['lctn_sffx_num']) { $sttng_lctn_sffx_rmn = ' (' . romannumeral($row['lctn_sffx_num']) . ')'; } else { $sttng_lctn_sffx_rmn = '';
if (!mysqli_query($link, $sql)) { $error = 'Error deleting place-related place associations: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $sql = "DELETE FROM plc WHERE plc_id='{$plc_id}'"; if (!mysqli_query($link, $sql)) { $error = 'Error deleting place: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } session_start(); $_SESSION['successclass'] = 'success'; $_SESSION['message'] = 'THIS PLACE HAS BEEN DELETED FROM THE DATABASE:' . ' ' . html($plc_nm_session); header('Location: http://' . $_SERVER['HTTP_HOST'] . '/'); exit; } if (isset($_POST['delete']) and $_POST['delete'] == 'Cancel') { include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $plc_id = cln($_POST['plc_id']); $sql = "SELECT plc_url\n FROM plc\n WHERE plc_id='{$plc_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring place URL: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); header('Location: ' . $row['plc_url']); exit; }
if (isset($_POST['delete']) and $_POST['delete'] == 'Cancel') { include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $frmt_id = cln($_POST['frmt_id']); $sql = "SELECT frmt_url FROM frmt WHERE frmt_id='{$frmt_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring format URL: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); header('Location: ' . $row['frmt_url']); exit; } include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $frmt_url = cln($_GET['frmt_url']); $sql = "SELECT frmt_id FROM frmt WHERE frmt_url='{$frmt_url}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error checking that URL has given valid data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $frmt_id = $row['frmt_id']; if (mysqli_num_rows($result) == 0) { include $_SERVER['DOCUMENT_ROOT'] . '/includes/404.html.php'; } else { $sql = "SELECT frmt_nm FROM frmt WHERE frmt_id='{$frmt_id}'"; $result = mysqli_query($link, $sql); if (!$result) {
$rvw_crtc_url = generateurl($rvw_crtc_fll_nm . $rvw_crtc_sffx_rmn); if (strlen($rvw_crtc_fll_nm) > 255 || strlen($rvw_crtc_url) > 255) { $rvw_crtc_errors++; $errors['rvw_crtc_fll_nm_excss_lngth'] = '</br>**Critic name and its URL are allowed a maximum of 255 characters each. Please amend entries that exceed this amount.**'; } } else { $rvw_crtc_errors++; $rvw_crtc_smcln_err_arr[] = $rvw_crtc; $errors['rvw_crtc_smcln'] = '</br>**You must assign a given name and family name to the following using [;;]: ' . html(implode(' / ', $rvw_crtc_smcln_err_arr)) . '.**'; } if ($rvw_crtc_errors == 0) { $rvw_crtc_frst_nm_cln = cln($rvw_crtc_frst_nm); $rvw_crtc_lst_nm_cln = cln($rvw_crtc_lst_nm); $rvw_crtc_fll_nm_cln = cln($rvw_crtc_fll_nm); $rvw_crtc_sffx_num_cln = cln($rvw_crtc_sffx_num); $rvw_crtc_url_cln = cln($rvw_crtc_url); $sql = "SELECT prsn_frst_nm, prsn_lst_nm, prsn_sffx_num\n FROM prsn\n WHERE NOT EXISTS (SELECT 1 FROM prsn WHERE prsn_frst_nm='{$rvw_crtc_frst_nm_cln}' AND prsn_lst_nm='{$rvw_crtc_lst_nm_cln}')\n AND prsn_fll_nm='{$rvw_crtc_fll_nm_cln}' AND prsn_sffx_num='{$rvw_crtc_sffx_num_cln}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error checking for critic person full name with assigned given name and family name: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); if (mysqli_num_rows($result) > 0) { if ($row['prsn_sffx_num']) { $rvw_crtc_nm_error_sffx_dsply = '--' . $row['prsn_sffx_num']; } else { $rvw_crtc_nm_error_sffx_dsply = ''; } $rvw_crtc_nm_err_arr[] = $row['prsn_frst_nm'] . ';;' . $row['prsn_lst_nm'] . $rvw_crtc_nm_error_sffx_dsply;
<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/includes/helpers.inc.php'; include $_SERVER['DOCUMENT_ROOT'] . '/includes/place/index.inc.php'; include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $plc_url = cln($_GET['plc_url']); $sql = "SELECT plc_id FROM plc WHERE plc_url='{$plc_url}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error checking that URL has given valid data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $plc_id = $row['plc_id']; if (mysqli_num_rows($result) == 0) { include $_SERVER['DOCUMENT_ROOT'] . '/includes/404.html.php'; } else { $sql = "SELECT plc_nm, plc_url FROM plc WHERE plc_id='{$plc_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring setting (place) data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $pagetab = html(ucfirst($row['plc_nm'])); $pagetitle = html(ucfirst($row['plc_nm'])); $plc_nm = html(ucfirst($row['plc_nm'])); $plc_url = html($row['plc_url']); $sql = "SELECT 1 FROM prdsttng_plc WHERE sttng_plcid='{$plc_id}'\n UNION\n SELECT 1 FROM rel_plc INNER JOIN prdsttng_plc ON rel_plc1=sttng_plcid WHERE rel_plc2='{$plc_id}'\n LIMIT 1";
if (isset($_POST['delete']) and $_POST['delete'] == 'Cancel') { include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $prd_vrsn_id = cln($_POST['prd_vrsn_id']); $sql = "SELECT prd_vrsn_url FROM prd_vrsn WHERE prd_vrsn_id='{$prd_vrsn_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring prod version URL: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); header('Location: ' . $row['prd_vrsn_url']); exit; } include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $prd_vrsn_url = cln($_GET['prd_vrsn_url']); $sql = "SELECT prd_vrsn_id FROM prd_vrsn WHERE prd_vrsn_url='{$prd_vrsn_url}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error checking that URL has given valid data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $prd_vrsn_id = $row['prd_vrsn_id']; if (mysqli_num_rows($result) == 0) { include $_SERVER['DOCUMENT_ROOT'] . '/includes/404.html.php'; } else { $sql = "SELECT prd_vrsn_nm FROM prd_vrsn WHERE prd_vrsn_id='{$prd_vrsn_id}'"; $result = mysqli_query($link, $sql); if (!$result) {
<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/includes/helpers.inc.php'; include $_SERVER['DOCUMENT_ROOT'] . '/includes/theme/index.inc.php'; include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $thm_url = cln($_GET['thm_url']); $sql = "SELECT thm_id FROM thm WHERE thm_url='{$thm_url}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error checking that URL has given valid data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $thm_id = $row['thm_id']; if (mysqli_num_rows($result) == 0) { include $_SERVER['DOCUMENT_ROOT'] . '/includes/404.html.php'; } else { $sql = "SELECT thm_nm FROM thm WHERE thm_id='{$thm_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring theme data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $pagetitle = html($row['thm_nm']); $thm_nm = html($row['thm_nm']); $sql = "SELECT 1 FROM prdthm WHERE thmid='{$thm_id}'\n UNION\n SELECT 1 FROM rel_thm INNER JOIN prdthm ON rel_thm1=thmid WHERE rel_thm2='{$thm_id}'\n LIMIT 1"; $result = mysqli_query($link, $sql); if (!$result) {
<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/includes/helpers.inc.php'; include $_SERVER['DOCUMENT_ROOT'] . '/includes/ethnicity/index.inc.php'; include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $ethn_url = cln($_GET['ethn_url']); $sql = "SELECT ethn_id FROM ethn WHERE ethn_url='{$ethn_url}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error checking that URL has given valid data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $ethn_id = $row['ethn_id']; if (mysqli_num_rows($result) == 0) { include $_SERVER['DOCUMENT_ROOT'] . '/includes/404.html.php'; } else { $sql = "SELECT ethn_nm, ethn_url FROM ethn WHERE ethn_id='{$ethn_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring ethnicity data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $pagetitle = html($row['ethn_nm']); $ethn_nm = html($row['ethn_nm']); $ethn_url = html($row['ethn_url']); $sql = "SELECT 1 FROM prsn WHERE ethnid='{$ethn_id}' UNION SELECT 1 FROM rel_ethn INNER JOIN prsn ON rel_ethn1=ethnid WHERE rel_ethn2='{$ethn_id}' LIMIT 1"; $result = mysqli_query($link, $sql);
if (!mysqli_query($link, $sql)) { $error = 'Error deleting company (location)-location (alternate location) associations: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $sql = "DELETE FROM lctn WHERE lctn_id='{$lctn_id}'"; if (!mysqli_query($link, $sql)) { $error = 'Error deleting location: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } session_start(); $_SESSION['successclass'] = 'success'; $_SESSION['message'] = 'THIS LOCATION HAS BEEN DELETED FROM THE DATABASE:' . ' ' . html($lctn_nm_session); header('Location: http://' . $_SERVER['HTTP_HOST'] . '/'); exit; } if (isset($_POST['delete']) and $_POST['delete'] == 'Cancel') { include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $lctn_id = cln($_POST['lctn_id']); $sql = "SELECT lctn_url\n FROM lctn\n WHERE lctn_id='{$lctn_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring location URL: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); header('Location: ' . $row['lctn_url']); exit; }
if (isset($_POST['delete']) and $_POST['delete'] == 'Cancel') { include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $awrds_id = cln($_POST['awrds_id']); $sql = "SELECT awrds_url FROM awrds WHERE awrds_id='{$awrds_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring awards URL: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); header('Location: ' . $row['awrds_url']); exit; } include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $awrds_url = cln($_GET['awrds_url']); $sql = "SELECT awrds_id FROM awrds WHERE awrds_url='{$awrds_url}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error checking that URL has given valid data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $awrds_id = $row['awrds_id']; if (mysqli_num_rows($result) == 0) { include $_SERVER['DOCUMENT_ROOT'] . '/includes/404.html.php'; } else { $sql = "SELECT awrds_nm FROM awrds WHERE awrds_id='{$awrds_id}'"; $result = mysqli_query($link, $sql); if (!$result) {
$crs_id = cln($_POST['crs_id']); $sql = "SELECT crs_yr_url\n FROM crs\n WHERE crs_id='{$crs_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring course URLs (company / type / year): ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); header('Location: ' . $row['crs_yr_url']); exit; } include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $comp_url = cln($_GET['comp_url']); $crs_typ_url = cln($_GET['crs_typ_url']); $crs_yr_url = cln($_GET['crs_yr_url']); $sql = "SELECT crs_id\n FROM crs\n WHERE crs_yr_url='{$crs_yr_url}'\n AND crs_typid=(SELECT crs_typ_id FROM crs_typ WHERE crs_typ_url='{$crs_typ_url}')\n AND crs_schlid=(SELECT comp_id FROM comp WHERE comp_url='{$comp_url}')"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error checking that URL has given valid data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $crs_id = $row['crs_id']; if (mysqli_num_rows($result) == 0) { include $_SERVER['DOCUMENT_ROOT'] . '/includes/404.html.php'; } else { $sql = "SELECT comp_nm, comp_url, comp_sffx_num, crs_typ_nm, crs_typ_url, crs_yr_strt, crs_yr_end, crs_sffx_num,\n CASE WHEN crs_dt_strt_frmt=1 THEN DATE_FORMAT(crs_dt_strt, '%a, %d %b %Y') WHEN crs_dt_strt_frmt=2 THEN DATE_FORMAT(crs_dt_strt, '%b %Y')\n WHEN crs_dt_strt_frmt=3 THEN DATE_FORMAT(crs_dt_strt, '%Y') ELSE NULL END AS crs_dt_strt,\n CASE WHEN crs_dt_end_frmt=1 THEN DATE_FORMAT(crs_dt_end, '%a, %d %b %Y') WHEN crs_dt_end_frmt=2 THEN DATE_FORMAT(crs_dt_end, '%b %Y')\n WHEN crs_dt_end_frmt=3 THEN DATE_FORMAT(crs_dt_end, '%Y') ELSE NULL END AS crs_dt_end\n FROM crs\n INNER JOIN comp ON crs_schlid=comp_id INNER JOIN crs_typ ON crs_typid=crs_typ_id\n WHERE crs_id='{$crs_id}'"; $result = mysqli_query($link, $sql); if (!$result) {
if (!mysqli_query($link, $sql)) { $error = 'Error deleting theme-related theme associations: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $sql = "DELETE FROM thm WHERE thm_id='{$thm_id}'"; if (!mysqli_query($link, $sql)) { $error = 'Error deleting theme: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } session_start(); $_SESSION['successclass'] = 'success'; $_SESSION['message'] = 'THIS THEME HAS BEEN DELETED FROM THE DATABASE:' . ' ' . html($thm_nm_session); header('Location: http://' . $_SERVER['HTTP_HOST'] . '/'); exit; } if (isset($_POST['delete']) and $_POST['delete'] == 'Cancel') { include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $thm_id = cln($_POST['thm_id']); $sql = "SELECT thm_url\n FROM thm\n WHERE thm_id='{$thm_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring theme URL: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); header('Location: ' . $row['thm_url']); exit; }
if (is_numeric($curr->name[0])) { exc('Cannot start a class name with a number', $lnum); } $curr->extends = trim(StringUtils::untilFirst(':', StringUtils::fromFirst('=', $d))); $curr->implements = cln(StringUtils::fromFirst(':', $d)); $curr->ns = $ns; } elseif ($line[0] == 'I') { pointermove(); # Define new interface $scope = 'interface'; $curr = new QJInterface(); $curr->name = trim(StringUtils::untilFirst(':', $d)); if (is_numeric($curr->name[0])) { exc('Cannot start a interface name with a number', $lnum); } $curr->extends += cln(trim(StringUtils::fromFirst(':', $d))); $curr->ns = $ns; } elseif ($line[0] == 'E') { pointermove(); $scope = 'enum'; $curr = new QJEnum(); $curr->name = trim($d); if (is_numeric($curr->name[0])) { exc('Cannot start an enum name with a number', $lnum); } $curr->ns = $ns; } elseif ($line[0] == 'F') { # Must be inside a class, interface or enum if ($scope == 'class' || $scope == 'interface' || $scope == 'enum') { # Define new method $m = new QJMethod();
if (isset($_POST['delete']) and $_POST['delete'] == 'Cancel') { include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $pt_id = cln($_POST['pt_id']); $sql = "SELECT pt_url FROM pt WHERE pt_id='{$pt_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring playtext URL: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); header('Location: ' . $row['pt_url']); exit; } include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $pt_url = cln($_GET['pt_url']); $sql = "SELECT pt_id FROM pt WHERE pt_url='{$pt_url}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error checking that URL has given valid data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $pt_id = $row['pt_id']; if (mysqli_num_rows($result) == 0) { include $_SERVER['DOCUMENT_ROOT'] . '/includes/404.html.php'; } else { $sql = "SELECT pt_nm_yr, pt_sffx_num, pt_nm, pt_sbnm, pt_yr_strtd, pt_yr_strtd_c, pt_yr_wrttn, pt_yr_wrttn_c, CASE WHEN pt_pub_dt_frmt=1 THEN DATE_FORMAT(pt_pub_dt, '%d %b %Y') WHEN pt_pub_dt_frmt=2 THEN DATE_FORMAT(pt_pub_dt, '%b %Y') WHEN pt_pub_dt_frmt=3 THEN DATE_FORMAT(pt_pub_dt, '%Y') ELSE NULL END AS pt_pub_dt, pt_coll, cst_m, cst_f, cst_non_spc, cst_ttl, cst_addt, cst_nt, char_ttl, char_m, char_f, char_non_spc, char_na, char_addt\n FROM pt\n WHERE pt_id='{$pt_id}'"; $result = mysqli_query($link, $sql); if (!$result) {
include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $mat_id = cln($_POST['mat_id']); $sql = "SELECT mat_url FROM mat WHERE mat_id='{$mat_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring material URL: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); header('Location: ' . $row['mat_url']); exit; } include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $frmt_url = cln($_GET['frmt_url']); $mat_url = cln($_GET['mat_url']); $sql = "SELECT mat_id FROM mat WHERE mat_url='{$mat_url}' AND frmtid=(SELECT frmt_id FROM frmt WHERE frmt_url='{$frmt_url}')"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error checking that URL has given valid data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $mat_id = $row['mat_id']; if (mysqli_num_rows($result) == 0) { include $_SERVER['DOCUMENT_ROOT'] . '/includes/404.html.php'; } else { $sql = "SELECT mat_nm, mat_sffx_num, frmt_nm, frmt_url FROM mat INNER JOIN frmt ON frmtid=frmt_id WHERE mat_id='{$mat_id}'"; $result = mysqli_query($link, $sql); if (!$result) {
if (!mysqli_query($link, $sql)) { $error = 'Error deleting time-related time associations: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $sql = "DELETE FROM tm WHERE tm_id='{$tm_id}'"; if (!mysqli_query($link, $sql)) { $error = 'Error deleting setting (time): ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } session_start(); $_SESSION['successclass'] = 'success'; $_SESSION['message'] = 'THIS SETTING (TIME) HAS BEEN DELETED FROM THE DATABASE:' . ' ' . html($tm_nm_session); header('Location: http://' . $_SERVER['HTTP_HOST'] . '/'); exit; } if (isset($_POST['delete']) and $_POST['delete'] == 'Cancel') { include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $tm_id = cln($_POST['tm_id']); $sql = "SELECT tm_url FROM tm WHERE tm_id='{$tm_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring setting (time) URL: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); header('Location: ' . $row['tm_url']); exit; }
if (!mysqli_query($link, $sql)) { $error = 'Error deleting feature-playtext associations: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $sql = "DELETE FROM ftr WHERE ftr_id='{$ftr_id}'"; if (!mysqli_query($link, $sql)) { $error = 'Error deleting feature: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } session_start(); $_SESSION['successclass'] = 'success'; $_SESSION['message'] = 'THIS FEATURE HAS BEEN DELETED FROM THE DATABASE:' . ' ' . html($ftr_nm_session); header('Location: http://' . $_SERVER['HTTP_HOST'] . '/'); exit; } if (isset($_POST['delete']) and $_POST['delete'] == 'Cancel') { include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $ftr_id = cln($_POST['ftr_id']); $sql = "SELECT ftr_url\n FROM ftr\n WHERE ftr_id='{$ftr_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring feature URL: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); header('Location: ' . $row['ftr_url']); exit; }
if (isset($_POST['delete']) and $_POST['delete'] == 'Cancel') { include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $attr_id = cln($_POST['attr_id']); $sql = "SELECT attr_url FROM attr WHERE attr_id='{$attr_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring attribute URL: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); header('Location: ' . $row['attr_url']); exit; } include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $attr_url = cln($_GET['attr_url']); $sql = "SELECT attr_id FROM attr WHERE attr_url='{$attr_url}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error checking that URL has given valid data: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); $attr_id = $row['attr_id']; if (mysqli_num_rows($result) == 0) { include $_SERVER['DOCUMENT_ROOT'] . '/includes/404.html.php'; } else { $sql = "SELECT attr_nm FROM attr WHERE attr_id='{$attr_id}'"; $result = mysqli_query($link, $sql); if (!$result) {
$error = 'Error deleting theatre: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } if ($row['thtr_tr_ov']) { session_start(); $_SESSION['successclass'] = 'success'; $_SESSION['message'] = 'THIS TOUR TYPE HAS BEEN DELETED FROM THE DATABASE:' . ' ' . html($thtr_session); header('Location: http://' . $_SERVER['HTTP_HOST'] . '/'); } else { session_start(); $_SESSION['successclass'] = 'success'; $_SESSION['message'] = 'THIS THEATRE HAS BEEN DELETED FROM THE DATABASE:' . ' ' . html($thtr_session); header('Location: http://' . $_SERVER['HTTP_HOST'] . '/'); } exit; } if (isset($_POST['delete']) and $_POST['delete'] == 'Cancel') { include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; $thtr_id = cln($_POST['thtr_id']); $sql = "SELECT thtr_url FROM thtr WHERE thtr_id='{$thtr_id}'"; $result = mysqli_query($link, $sql); if (!$result) { $error = 'Error acquiring theatre URL: ' . mysqli_error($link); include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php'; exit; } $row = mysqli_fetch_array($result); header('Location: ' . $row['thtr_url']); exit; }