<?php $GLOBALS['SEP_DISABLED'] = 1; ?>
<?php header('Content-type: text/html; charset=utf-8'); ?>

<?php
 
    if (!defined('START_SESSION')) { define('START_SESSION', true); }
  // load viewer library
  $libraryPath = 'cmsAdmin/lib/viewer_functions.php';
  $dirsToCheck = array('/hsphere/local/home/a887307/elleschorrphotography.com/','','../','../../','../../../');
  foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
  if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }
  
//Get the current CMS users details
  $CMS_USER = getCurrentUserFromCMS(); 
  
  //redirect the browser if no user is currently logged into the back end
  if (!@$CMS_USER['num']){ 
    redirectBrowserToUrl("http://elleschorrphotography.com/cmsAdmin/admin.php?redirectUrl=" . $_SERVER['REQUEST_URI']);
    exit;
  }
  
?> <?php
  // load records
  list($publcity_listingsRecords, $publcity_listingsMetaData) = getRecords(array(
    'tableName'   => 'publcity_listings',
	
  ));
   // load records
  list($media_typesRecords, $media_typesMetaData) = getRecords(array(
    'tableName'   => 'media_types',
	
  ));
  
     // load records
  list($localesRecords, $localesMetaData) = getRecords(array(
    'tableName'   => 'locales',
	
  ));
  list($common_informationRecords, $common_informationMetaData) = getRecords(array(
    'tableName'   => 'common_information',

    'limit'       => '1',
  ));
  
  $common_informationRecord = @$common_informationRecords[0]; // get first record
  
 // load records
  list($google_font_namesRecords, $google_font_namesMetaData) = getRecords(array(
    'tableName'   => 'google_font_names',
  ));
  
  ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>E L L E &nbsp; S C H O R R &nbsp; P H O T O G R A P H Y</title>
<link rel="shortcut icon" type="image/ico" href="/favicon.ico" />
<meta name="robots" content="noindex,nofollow" />
<link rel="stylesheet" type="text/css" media="screen" href="css/style.css.php" />
<link rel="stylesheet" type="text/css" href="css/fonts.css.php" />
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=<?php 
    $output = ''; 
    foreach ($google_font_namesRecords as $record) { $record['name'] = preg_replace("/[, ]/", "+", $record['name']);
      $output .= $record['name'] . "|"; 
    } 
    $output = rtrim($output,"|"); // remove trailing pipe 
    print $output; 
?>">
<style type="text/css">
table.email {
	border-width: 1px;
	border-spacing: 1px;
	border-style: solid;
	border-color: #<?php echo $common_informationRecord['horizontal_line_color'] ?>;
	border-collapse: collapse;
}
table.email th {
	border-width: 1px;
	padding: 1px;
	border-style: solid;
	border-color: #<?php echo $common_informationRecord['horizontal_line_color'] ?>;
}
table.email td {
	border-width: 1px;
	padding: 1px;
	border-style: solid;
	border-color: #<?php echo $common_informationRecord['horizontal_line_color'] ?>;
}
</style>
</head>

<body style="font-family:Verdana, Geneva, sans-serif" >
<table align="center" width="1150" border="0">
  <tr>
    <td><div align="left"><br />
        <?php foreach ($common_informationRecord['publicity_page_masthead'] as $upload): ?>
        <img src="<?php echo $upload['urlPath'] ?>" alt="<?php $info1 = htmlspecialchars($upload['info1']); ?>
<?php echo ucwords(strtolower($info1)); ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" border="0" />
        <?php endforeach ?>
      </div>
      <br />
      <table align="center" width="80%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><div align="center"><a class="special"   href="index.php"><span class="navigation_font">Home</span></a></div></td>
          <td><div align="center"><a class="special"  href="galleries.php"><span class="navigation_font">Galleries</span></a></div></td>
          <td><div align="center"><a class="special"   href="exhibitions.php"><span class="navigation_font">Exhibitions</span></a></div></td>
          <td><div align="center"><a class="special"  href="presentations.php"><span class="navigation_font">Presentations</span></a></div></td>
          <!-- <td><div align="center"><a href="../projects.php"><span class="navigation_font">Projects</span></a></div></td> -->
          <td><div align="center"><a class="special"  href="aboutme.php"><span class="navigation_font">About</span></a></div></td>
          <td><div align="center"><a class="special"  href="contact.php"><span class="navigation_font">Contact</span></a></div></td>
        </tr>
      </table>
      <br />
      <br /> 
	  <?php if( $CMS_USER['isAdmin']): ?>
      <table align="center" width="100%" border="0">
       <tr><td><a class="special" href="http://www.elleschorrphotography.com/cmsAdmin/admin.php?action=logoff">Click Here to Log Out</a><br /><br /></td></tr> <tr>
          <td align="right" valign="top"><form method="POST" action="<?php echo $_SERVER['PHP_SELF'] ?>">
              <select name="media_type_keyword">
                <option value="">Choose The Media Type To Display</option>
                <?php foreach ($media_typesRecords as $record): ?>
                <option value="<?php echo $record['num'] ?>"><span class="body-text"><?php echo $record['title'] ?></span></option>
                <?php endforeach ?>
              </select>
              <select name="locale_keyword">
                <option value="">And/Or Choose The Locale To Display</option>
                <?php foreach ($localesRecords as $record): ?>
                <option value="<?php echo $record['num'] ?>"><span class="body-text"><?php echo $record['title'] ?></span></option>
                <?php endforeach ?>
              </select>
              <input type="submit" name="submit" value="Search">
            </form></td>
          <td align="left" valign="top"><FORM ACTION="">
              <INPUT TYPE="submit" VALUE="Cancel Search Filters">
            </FORM></td>
        </tr>
      </table>
      <hr  color="#<?php echo $common_informationRecord['horizontal_line_color'] ?>" />
      <p></p>
      <div align="center" class="copyright"><b>EMAIL ADDRESS LIST(Not Including Contacts Who Have Requested Removal)</b><br />
      </div>
      <div align="left" class="copyright">
        <?php $count = 0; ?>
        <?php $count2 = 0; ?>
        <?php foreach ($publcity_listingsRecords as $record): ?>
        <?php if ($record['email_address'] && ($record['remove_me']== 0 || $record['remove_me']== "" )):  ?>
        <?php $count2++; ?>
        <?php echo $record['email_address'] ?>;&nbsp;
        <?php endif ?>
        <?PHP $maxemails= $common_informationRecord['max_emails']; if (@++$count % $maxemails == 0): ?>
      </div>
      <div class="copyright" align="left"><br />
        <hr color="#<?php echo $common_informationRecord['horizontal_line_color'] ?>" />
        <br />
        <?PHP endif; ?>
        <?php endforeach ?>
        <br />
        <br />
        <hr color="#<?php echo $common_informationRecord['horizontal_line_color'] ?>" />
        <br />
      </div>
      <div align="center" class="copyright">There are <?php echo $count2 ?> email addresses in your list, in groups of no more than <?php echo $common_informationRecord['max_emails'] ?> e-mail addresses each.<br />
        Copy each group to the BCC: field of your e-mail.</div>
      <div align="center" >
        <div align="left" class="copyright">
          <hr  color="#<?php echo $common_informationRecord['horizontal_line_color'] ?>" />
          <br />
        </div>
        <div> </div>
        <p></p>
      </div>
      </div>
      <div class="copyright" align="center"> <b><br />
        PUBLICITY CONTACTS</b><br />
      </div><div align="center" class="text_font">Includes all entries even where email addresses don't exist and where the contact has requested to be removed from the list.</div>
      <div align="center" >
      <div align="left" >
      <hr  color="#<?php echo $common_informationRecord['horizontal_line_color'] ?>" />
      <br />
      <table class="email" width="100%" >
        <tr>
          <td width="12%" class="copyright" style="text-align:center" align="center" valign="top"><b>Organization</b></td>
          <td width="11%" class="copyright" style="text-align:center" align="center" valign="top"><b>Department</b></td>
          <td width="11%" class="copyright" style="text-align:center" align="center" valign="top"><b>Last Name</b></td>
          <td width="11%" class="copyright" style="text-align:center" align="center" valign="top"><b>First Name</b></td>
          <td width="11%" class="copyright" style="text-align:center" align="center" valign="top"><b>Title</b></td>
          <td width="11%" class="copyright" style="text-align:center" align="center" valign="top"><b>Media Type</b></td>
          <td width="11%" class="copyright" style="text-align:center" align="center" valign="top"><b>Locale</b></td>
          <td width="11%" class="copyright" style="text-align:center" align="center" valign="top"><b>Street Address</b></td>
          <td width="11%" class="copyright" style="text-align:center" align="center" valign="top"><b>City</b></td>
        </tr>
        <tr>
          <td width="12%" class="copyright" style="text-align:center" align="center" valign="top"><b>State</b></td>
          <td width="12%" class="copyright" style="text-align:center" align="center" valign="top"><b>Zip</b></td>
          <td width="12%" class="copyright" style="text-align:center" align="center" valign="top"><b>Day Phone</b></td>
          <td width="12%" class="copyright" style="text-align:center" align="center" valign="top"><b>Cell Phone</b></td>
          <td width="12%" class="copyright" style="text-align:center" align="center" valign="top"><b>E-mail</b></td>
          <td width="12%" class="copyright" style="text-align:center" align="center" valign="top"><b>Source</b></td>
          <td width="12%" class="copyright" style="text-align:center" align="center" valign="top"><b>Removal Request</b></td>
          <td width="12%" class="copyright" style="text-align:center" align="center" valign="top"><b>&nbsp;</b></td>
          <td width="12%" class="copyright" style="text-align:center" align="center" valign="top"><b>&nbsp;</b></td>
        </tr>
        <tr>
          <td colspan="9" ><hr  color="#fef692" /></td>
        </tr>
        <?php foreach ($publcity_listingsRecords as $record): ?>
        <tr>
          <td class="copyright" style="text-align:center" align="center" valign="top"><?php if ($record['organization']): ?>
            <?php echo $record['organization'] ?>
            <?php else: ?>
            &nbsp;<b>- -</b>&nbsp;
            <?PHP endif ?></td>
          <td class="copyright" style="text-align:center" align="center" valign="top"><?php if ($record['department']): ?>
            <?php echo $record['department'] ?>
            <?php else: ?>
            &nbsp;<b>- -</b>&nbsp;
            <?PHP endif ?></td>
          <td class="copyright" style="text-align:center"  align="center" valign="top"><?php if ($record['last_name']): ?>
            <?php echo $record['last_name'] ?>
            <?php else: ?>
            &nbsp;<b>- -</b>&nbsp;
            <?PHP endif ?></td>
          <td class="copyright" style="text-align:center" align="center" valign="top"><?php if ($record['first_name']): ?>
            <?php echo $record['first_name'] ?>
            <?php else: ?>
            &nbsp;<b>- -</b>&nbsp;
            <?PHP endif ?></td>
          <td class="copyright" style="text-align:center" align="center" valign="top"><?php if ($record['title']): ?>
            <?php echo $record['title'] ?>
            <?php else: ?>
            &nbsp;<b>- -</b>&nbsp;
            <?PHP endif ?></td>
          <td class="copyright" style="text-align:center" align="center"><?php if ($record['media_type']): ?>
            <?php echo $record['media_type:label'] ?>
            <?php else: ?>
            &nbsp;<b>- -</b>&nbsp;
            <?PHP endif ?></td>
          <td class="copyright" style="text-align:center" align="center" valign="top"><?php if ($record['locale']): ?>
            <?php echo $record['locale:label'] ?>
            <?php else: ?>
            &nbsp;<b>- -</b>&nbsp;
            <?PHP endif ?></td>
          <td class="copyright" style="text-align:center" align="center" valign="top"><?php if ($record['street_address']): ?>
            <?php echo $record['street_address'] ?>
            <?php else: ?>
            &nbsp;<b>- -</b>&nbsp;
            <?PHP endif ?></td>
          <td class="copyright" style="text-align:center" align="center" valign="top"><?php if ($record['city']): ?>
            <?php echo $record['city'] ?>
            <?php else: ?>
            &nbsp;<b>- -</b>&nbsp;
            <?PHP endif ?></td>
        </tr>
        <tr>
          <td class="copyright" style="text-align:center" align="center" valign="top"><?php if ($record['state']): ?>
            <?php echo $record['state'] ?>
            <?php else: ?>
            &nbsp;<b>- -</b>&nbsp;
            <?PHP endif ?></td>
          <td class="copyright" style="text-align:center" align="center" valign="top"><?php if ($record['zip']): ?>
            <?php echo $record['zip'] ?>
            <?php else: ?>
            &nbsp;<b>- -</b>&nbsp;
            <?PHP endif ?></td>
          <td class="copyright" style="text-align:center" align="center" valign="top"><?php if ($record['phone']): ?>
            <?php echo $record['phone'] ?>
            <?php else: ?>
            &nbsp;<b>- -</b>&nbsp;
            <?PHP endif ?></td>
          <td class="copyright" style="text-align:center" align="center" valign="top"><?php if ($record['cell']): ?>
            <?php echo $record['cell'] ?>
            <?php else: ?>
            &nbsp;<b>- -</b>&nbsp;
            <?PHP endif ?></td>
          <td class="copyright" style="text-align:center" align="center" valign="top"><?php if ($record['email_address']): ?>
            <?php echo $record['email_address'] ?>
            <?php else: ?>
            &nbsp;<b>- -</b>&nbsp;
            <?PHP endif ?></td>
          <td class="copyright" style="text-align:center" align="center" valign="top"><?php if ($record['source']): ?>
            <?php echo $record['source'] ?>
            <?php else: ?>
            &nbsp;<b>- -</b>&nbsp;
            <?PHP endif ?></td>
          <td class="copyright" style="text-align:center" align="center" valign="top"><?php if ($record['remove_me'] == 1): ?>Removal Requested<?php else: ?>&nbsp;<b>- -</b>&nbsp;<?PHP endif ?></td>
         <td class="copyright"  style="text-align:center" align="center" valign="top">&nbsp;<b>- -</b>&nbsp;</td>
          <td class="copyright"  style="text-align:center" align="center" valign="top">&nbsp;<b>- -</b>&nbsp;</td>
        </tr>
        <tr>
          <td colspan="9" ><hr  color="#fef692" /></td>
        </tr>
        <?php endforeach ?>
      </table>
       <?php else :?>
       <?php unset($_SESSION['otherSessonVariable']); ?>
      <br />
      <br />
      <span class=" copyright"> Sorry, based on the login credentials you used, you don't have the authority to access this page. <br />
      <br />
      To log in with the appropriate credentials, <a class="special" href="http://www.elleschorrphotography.com/cmsAdmin/admin.php?action=logoff">Click Here to Log Out</a>, then return to this page and log in again.<br />
     
      </span>
      <?php endif ?>
      </td>
  </tr>
</table>
<p>&nbsp;</p>
</body>
</html>