$var_desc="Y";
if ($current_desc=="Y") $var_desc="N";
$var_start=$_GET["start"];
if ($var_start=="") $var_start=0;
//Calculate how many records we need to retrieve with LIMIT
//Add the start number and the display number
$timeS1=microtime_float();
$sql="SELECT count(ff_stories.fld_id) FROM ff_stories ".(($var_search_char!='')?',ff_story':'').(($var_favorite!='')?',favorites':'')." ".(($strwhere!='WHERE ')?$strwhere:'');
//echo '';
$result=@mysql_query($sql);
$var_total_rows=@mysql_result($result,0,0);
//echo "Count query:".(microtime_float()-$timeS1)." ";
$num_top_to_get=intval($var_start)+intval($var_result_per_page);
$timeS1=microtime_float();
// $sql="SELECT ff_stories.fld_id,ff_stories.fld_date,ff_stories.fld_title,ff_stories.fld_author,ff_stories.fld_rating,ff_stories.fld_summary,ff_stories.fld_rating_average,ff_stories.fld_award AS fld_story_award,users.fld_award AS fld_author_award,users.fld_user FROM ff_stories, users".(($var_search_char!='')?',ff_story':'')." ".$strwhere.(($strwhere!='WHERE ')?'AND ':'')." ff_stories.fld_author=users.fld_user ORDER BY ff_stories.".$var_sort. " LIMIT ".intval($var_start).",".$num_top_to_get;
$sql="SELECT ff_stories.fld_id,ff_stories.fld_date,ff_stories.fld_title,ff_stories.fld_author,ff_stories.fld_views,ff_stories.fld_rating,ff_stories.fld_summary,ff_stories.fld_rating_average,ff_stories.fld_author_profile_visible,ff_stories.fld_award AS fld_story_award,ff_stories.fld_author_award AS fld_author_award,ff_stories.fld_awardfile AS fld_awardfile FROM ff_stories ".(($var_search_char!='')?',ff_story':'').(($var_favorite!='')?',favorites':'')." ".(($strwhere!='WHERE ')?$strwhere:'')." ORDER BY ff_stories.".$var_sort. " LIMIT ".intval($var_start).",".$num_top_to_get;
//echo '';
$result=@mysql_query($sql);
$result_author_list=@mysql_query($sql);
//echo "Main query:".(microtime_float()-$timeS1);
if (@mysql_num_rows($result)==0){?>
Sorry - No matches were found.
} else {
$author_list = array();
while($author_list_row = @mysql_fetch_assoc($result_author_list))
{
if(!in_array($author_list_row['fld_author'],$author_list))
{
$author_list[] = $author_list_row['fld_author'];
}
}
$these_authors_detail = unserialize(base64_decode(file_get_contents('http://www.l-word.com/internal/lword_ws/forum_ws.php?u=lword&p=5up3rm@g1c.p@55w0$d&call=user_data&data='.base64_encode(serialize($author_list)))));
$var_color1="#ECF5FF";
$var_color2="#F2F2F2";
?>
Search Results:
=$var_total_rows;?>
matches!
Registered Authors:
=$arr_count?>
|
//--------------------------
// Start of Page Links
//--------------------------
if (intval($var_total_rows)>intval($var_result_per_page))
{
$var_oldstart=intval($var_start)-intval($var_result_per_page);
$var_newstart=intval($var_start)+intval($var_result_per_page);
$var_total_link_pages=intval((float)($var_total_rows)/(float)($var_result_per_page));
if ((float)($var_total_link_pages)<(float)($var_total_rows)/(float)($var_result_per_page))
$var_total_link_pages=$var_total_link_pages+1;
$var_start_link_page=($var_start/$var_result_per_page)+1;
if ($var_start_link_page>13)
$var_start_link_page=$var_start_link_page-8;
else
$var_start_link_page=0;
?>
| Total Pages: (
echo $var_total_link_pages; ?>
) |
if ($var_start!=0) { ?>
<< Previous
} ?>
<
if (intval($var_total_rows)/intval($var_result_per_page)>1)
{
$cnt=0;
$cnt2=0;
$cnt3=0;
while(intval($cnt2)!=intval($var_total_link_pages) && $cnt3!=15)
{
if ($var_start_link_page<=$cnt2)
{
if (intval($var_start)!=intval($cnt)) {?>
=$cnt2+1; ?>
} else {?>
[
=$cnt2+1; ?>
]
}
$cnt3=$cnt3+1; //Pages Displayed
}
$cnt=$cnt+$var_result_per_page; // Current Results
$cnt2=$cnt2+1; //Current Pages Looped Through
}
}
?>
>
if (intval($var_newstart)
Next >>
} ?> |
} ?>
//------------------------
// End of Page Links
//------------------------
}
?> |
|