####CHECK FOR SESSION INCLUDE "../../secure/session.php"; INCLUDE "../../secure/hitcounter.php"; ####LOG CODE $log_msg = $_SESSION[‘session_playwright_name’].' accessed page - license.'; include "../../secure/backuplog.php"; #### #####ADD TO STATS COUNTER ####RAW HITS INCLUDE "../../secure/connectiondetails.php"; ###Check Action $licenseaction = $HTTP_POST_VARS['action']; if ($licenseaction == ''){$licensecontent='1';} if ($licenseaction == 'Report'){$licensecontent='3'; $srpnumber = $HTTP_POST_VARS['srpnumber']; $reportdetail = $HTTP_POST_VARS['reportinfo']; $reportIP = $_SERVER['REMOTE_ADDR']; $SQL = "INSERT INTO reports (Unq, SRP, Report, IP) VALUES (NULL, '$srpnumber' , '$reportdetail', '$reportIP')"; mysql_query($SQL); } if ($licenseaction == 'Check'){ $srpnumber = $HTTP_POST_VARS['srpnumber']; $srpnumber = str_replace ("-", "", $srpnumber); $SQL = "SELECT * FROM licenses WHERE SRP = '$srpnumber' AND Valid='Yes'"; $result = mysql_query($SQL); $mynumrows = mysql_num_rows($result); if ($mynumrows == '0'){$licensecontent='2';}else{$licensecontent='4';} $db_field = mysql_fetch_assoc($result); $licenseunq = $db_field['Unq']; $licensesrp = $db_field['SRP']; $licensepsrp = $db_field['PrintSRP']; $licensetitle = $db_field['Title']; $licensewriter = $db_field['Playwright']; $licensevenue = $db_field['Venue']; $licensecompany = $db_field['Company']; $licensecontact = $db_field['ContactName']; $licenseterms = $db_field['Public Terms']; } ?>
if ($licensecontent=='1'){ echo '
The license checker is a tool which can be used to check whether permission has been granted for one of our playwrights plays to take place.
Every company who has permission to perform one of the plays will also have been sent a StageRights Certificate stating the details of their agreement with the playwright. On that certificate is printed an SRP#.
Entering the SRP# into the License Checker will confirm whether a performance is licensed or not.
';} if ($licensecontent=='3'){ echo 'Thank you very much for your report. We will look into the matter promptly.
';} if ($licensecontent=='2'){ echo 'The SRP#: '.$licensepsrp.' is INVALID.
If you are certain you have entered the details as printed on the StageRights Certificate, then please enter as much information as you know about the performance such as venue, the performing company and dates in the box below.
';} if ($licensecontent=='4'){ echo 'The SRP#: '.$licensepsrp.' is VALID.
Its details are listed below:
Show: '.$licensetitle.'
Written by: '.$licensewriter.'
Venue: '.$licensevenue.'
Performed by: '.$licensecompany.'
Rights granted to: '.$licensecontact.'
With the following agreed terms:
'.$licenseterms.'
Scheduled Performances:'; $SQL = "SELECT * FROM licensedates WHERE SRP = '$licensesrp' ORDER by Unq"; $result = mysql_query($SQL); while ($db_field = mysql_fetch_assoc($result)){ $licensedate = $db_field['Date']; $licensetime = $db_field['Time']; echo '
'.$licensedate.' At '.$licensetime.'
';}
echo '
';} ?>