require("config.php");
require("funcs1.php");
start();
$photos_count=1;
if (($md=="details") and ($mbac_second=="m"))
{include("mb_check.php"); check_mb_login("details&id=$id");}
if ((($md=="add_form") or ($md=="submitad")) and ($mbac_addad=="m"))
{include("mb_check.php"); check_mb_login("add_form");}
if ((($md=="privacy_mail") or ($md=="send_mail")) and ($mbac_sndml=="m"))
{include("mb_check.php"); check_mb_login("privacy_mail&idnum=$idnum");}
if ($md=="forgmbpassw"){include("mb_check.php"); forgot_mb_passw();}
if ($md=="sendmbps"){include ("mb_conf.php"); include("mb_check.php"); send_mb_passw($ps_email);}
if ($md=="mblogout"){include("mb_check.php"); mb_log_out();}
if ($cook_login!=''){include("mb_lginf.php"); insert_log_welc();}
if (($md=="") and ($ct=="") ){include("top.php"); print_categories();}
if (($md=="browse") or ($md=="")){browse_ads();}
if ($md=="details"){include("details.php"); ad_details();}
if ($md=="add_form") {include("forms.php"); print_add_form();}
if ($md=="editlogin"){ include("forms.php"); edit_login(" ");}
if ($md=="editform"){ include("forms.php"); edit_form();}
if ($md=="forgotpassw"){include("forms.php"); forgotpassw($ps_email);}
if ($md=="sendpassw"){include("funcs2.php");sendpassw($ps_email);}
if ($md=="privacy_mail"){include("forms.php"); privacy_form($idnum);}
if ($md=="send_mail"){include("funcs2.php"); send_mail($idnum);}
if ($md=="submitad") {include("submit.php"); submit_ad();}
if ($md=="edit") {include("submit.php"); edit_ad();}
function browse_ads()
{
global $ads_count, $html_header, $html_footer, $ct, $mds,
$categories, $ad_ind_width, $text_userinfo, $cat_fields, $ratedads, $ind_leftcol;
echo $html_header;
if ($mds=="search")
{$count_info="$ads_count ads match your query";}
else {$count_info="$ads_count entries";}
echo "
$ind_leftcol
|
Top:
".category_name()." $text_userinfo
|
|
|
".pages_next_prev()."
|
$count_info
|
";
if (($ct!="") and ($ratedads==""))
{
echo "
[Post New Ad]
";
}
echo "
|
|
|
".get_ads_captions().get_ads()."
|
|
";
echo $html_footer;
exit;
}
function categor