if (isset($_REQUEST['folder'])) { $fl = $_REQUEST['folder']; echo ' '; } ?>
swirl
LIZ GROSSMAN
WRITER / EDITOR
swirl
Liz Grossman
// lizg print-code.php if (isset($_POST['ajx']) && $_POST['ajx'] == 1) { $locate = '../'; // End with / include ('main-data.php'); //echo 'aj1
'; } //echo 'aj0
'; if (isset($_REQUEST['folder'])) { $fl = $_REQUEST['folder']; if (!isset($_REQUEST['alt'])) { $rc = data('c'); $rd = data('d', $fl); foreach ($rd as $rwd) { /* echo '
home > print > ' . $rwd['title'] . '
'; */ } echo'
'; foreach ($rd as $rwd) { $tl = $rwc['title']; // echo '
' . $rwd['title'] . '
'; if ($rwd['title'] == 'CS magazine') { echo '

'; } echo'

'; $re = data('e', $fl); if (re) { $x = 1; foreach ($re as $rwe) { if ($rwe['height'] >= 151) { $oht = $rwe['height']; $ht = 150; $wd = round(($ht / $oht) * $rwe['width']); if ($wd >= 251) { $owd = $wd; $wd = 250; $ht = round(($wd / $owd) * $ht); } } else { $wd = $rwe['width']; $ht = $rwe['height']; } echo '
' . $rwe['alt'] . '
'; $x++; } // End foreach ($re as $rwe) { } // End if (re) { echo '
'; } // End foreach ($rd as $rwd) } // End if (!isset($_REQUEST['alt'])) if (isset($_REQUEST['alt'])) { echo '
'; $al = $_REQUEST['alt']; $ptrn = '"-[0-9]$"'; if (preg_match($ptrn, $al)) { $al = preg_replace($ptrn, "", $al); } //echo 'al=' . $al . '
'; // Number of records to show per page: $display = 1; // Determine how many pages there are... if (isset($_REQUEST['p']) && is_numeric($_REQUEST['p'])) { //Already been determined. $pages = $_REQUEST['p']; } else { // Need to determine. // SELECT COUNT(img_id) FROM images WHERE folder='" . $fl . "' AND alt LIKE '%$al%' AND a_n='pdf' // Count the number of records: $rf = data('f', $fl, $al); $rcnt = count($rf); //echo 'rc=' . $rcnt . ''; // Calculate the number of pages... if ($rcnt > $display) { // More than page. $pages = ceil ($rcnt/$display); } else { $pages = 1; } } // End of pagination IF. // Determine where in the database to start returning results... if (isset($_REQUEST['s']) && is_numeric($_REQUEST['s'])) { $start = $_REQUEST['s']; } else { $start = 0; } //echo 'fl='.$fl.'
al='.$al.'
s='.$start.'
d='.$display.'
'; $rg = data('g', $fl, $al, $start, $display); if ($rg) { //echo 'rg
'; if ($pages > 1) { //Add some spacing and start a paragraph: echo ' '; // Close the paragraph. } // End if ($pages > 1) { foreach ($rg as $rwg) { //echo 'rwg='.$rwg['pdf'].'
'; $pd = $rwg['pdf']; // Make the links to other pages, if necessary. echo ' '; //echo 'al='.$rwg['alt'].'
'; echo '
' . $rwg['alt'] . '
'; } // End foreach ($rg as $rwg) { } // End if ($rg) { } // End if (isset($_REQUEST['alt'])) { echo '
'; } else { //include ('../hdft/head.html'); echo '
'; $rc = data('c'); foreach ($rc as $rwc) { //echo 'rwc='.$rwc['img_id'].'
'; $rb = data('b', $rwc['img_id']); if ($rb) { foreach ($rb as $rwb) { $exclude_list = array("beauty", "culture", "dining", "profiles", "travel"); if(!in_array($rwc['folder'], $exclude_list)) { echo ' '; } } // End foreach ($rb as $rwb) { } // End if ($rb) { } // End foreach ($rc as $rwc) { echo '
'; //echo '
//