image_source ."' "; $result = mysql_query($sql); if (!$result) { echo mysql_error(); exit; } if (mysql_num_rows($result) == 0) { echo ''; exit; } while ($row = mysql_fetch_assoc($result)) { preg_match_all( '/'.$re -> image_source.'/' , $row["post_content"] , $matches); //print_r($matches); //$matches[i][0] - no img tag //$matches[i][1] - with img tag foreach ($matches[1] as $key => $value) { /*array_push($ary, array ( $i => array ( "id" => $row["id"] , "post_title" => $row["post_title"] , "post_date" => $row["post_date"], "checked" => 0, "result" => 0, "key" => $key , "value" => $value) ) );*/ if (substr($value, 0, 7) != 'http://') {continue;} if (!$allimage && LC_startsWith($value, $_SESSION["blogurl"])) {continue;} $i++; array_push($ary, array ( "id" => $i , "post_id" => $row["id"], "post_title" => $row["post_title"], "post_date" => $row["post_date"], "checked" => 0, "result" => '', "key" => $key , "value" => $value) ); } } mysql_free_result($result); mysql_close(); $_SESSION["datatable"] = $ary; return $_SESSION["datatable"]; } function LC_get_record_count() { $cnt = 0; try { $cnt = count($_SESSION["datatable"]); } catch (Exception $e) { } return $cnt; } function LC_send_no_cache_header () { header ( "Expires: Mon, 28 Jul 1981 06:00:00 GMT" ); header ( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" ); header ( "Cache-Control: no-store, no-cache, must-revalidate" ); header ( "Cache-Control: post-check=0, pre-check=0", false ); header ( "Pragma: no-cache" ); } ?>