All pastes #731427 Raw Edit

splat

public php v1 · immutable
·published 2007-10-10 01:33 UTC
rendered paste body
preg_match_all('/<!-- (CONTENT BEGINS|All Content Starts Here|CONTENT HERE|CONTENT START)[^>]*>(.*?)<!-- (CONTENT ENDS|All Content Ends Here|CONTENT END|END CONTENT|Begin Dynamic Html rollovers for links)[^>]*>/si', $contents, $output4, PREG_SET_ORDER );    if (empty($output4)){      preg_match_all('/<!-- (Ad Banner END)[^>]*>(.*?)<!-- (CONTENT ENDS|All Content Ends Here|CONTENT END|END CONTENT|Begin Dynamic Html rollovers for links)[^>]*>/si', $contents, $output4, PREG_SET_ORDER );     }    foreach ($output4 as $item) {      $bodycontent = $item[2];      preg_match('/<!--\r\n<p>\r\n<div[^>]*>CONTINUED[^<]*<\/div>/s', $bodycontent, $test);      print_r($test);      echo "\n";      $k = 2;      while (!empty($test)) {        preg_match('/([\w]*?\\\)/i', $category[$i][$j], $matches);        $k = sprintf('%02d', $k);        $filename = "G:\\WEB\\overclockers\\" . $matches[1] . "index" . $k . ".asp";        $file=fopen($filename,"r") or exit("Unable to open " . $filename . "! ");        $contents = fread($file, filesize($filename));        fclose($file);        preg_match_all('/<!-- (CONTENT BEGINS|All Content Starts Here|CONTENT HERE|CONTENT START)[^>]*>(.*?)<!-- (CONTENT ENDS|All Content Ends Here|CONTENT END|END CONTENT|Begin Dynamic Html rollovers for links)[^>]*>/si', $contents, $output, PREG_SET_ORDER );        if (empty($output)){          preg_match_all('/<!-- (Ad Banner END)[^>]*>(.*?)<!-- (CONTENT ENDS|All Content Ends Here|CONTENT END|END CONTENT|Begin Dynamic Html rollovers for links)[^>]*>/si', $contents, $output, PREG_SET_ORDER );         }        preg_match('/<!--\r\n<p>\r\n<div[^>]*>CONTINUED[^<]*<\/div>/s', $output[2], $test);        $bodycontent = $bodycontent . $output[2];        $k++;       }      $bodycontent = preg_replace('/(<div[^>]*>CONTINUED[^>]*>)/', '{mospagebreak}', $bodycontent);      $main[$i][$j][3] = mysql_escape_string($bodycontent); // full text     }