\n" . "\n" . "\t\n

"); fclose($file_pointer); for ($i=0; $i<$num_links; $i++) { $row = mysql_fetch_array($sql_result); $ad_id = $row["ad_id"]; $sitetitle = $row["ad_title"]; $ad_description = $row["ad_description"]; $datestamp = $row["datestamp"]; $ad_date=formatDateShort($row["ad_date"]); $fp=fopen("wap/index.wml", 'a'); fwrite($fp,"\n"); fclose($fp); } $fi=fopen("wap/index.wml", 'a'); fwrite($fi,"
$sitetitle $ad_date1

"); fclose($fi); $num_links = mysql_num_rows($sql_result); $sql_links = "select ad_id,ad_title,ad_description,user_name,user_email from $ads_tbl, $usr_tbl where ad_owner = user_id $val_string order by ad_id desc limit 10"; $sql_result = q ($sql_links); $num_links = mysql_num_rows($sql_result); for ($i=0; $i<$num_links; $i++) { $row = mysql_fetch_array($sql_result); $ad_id = $row["ad_id"]; $sitetitle = $row["ad_title"]; $ad_description = strip_tags($row["ad_description"]); $name = $row["user_name"]; $phone = $row["phone"]; $email = $row["user_email"]; $array[] = "

$sitetitle
$ad_description

$name / $email

"; } $arrelm0=""; $arrelm1=""; $arrelm2=""; $arrelm3=""; $arrelm4=""; $arrelm5=""; $arrelm6=""; $arrelm7=""; $arrelm8=""; $arrelm9=""; $arrelm10=""; $special = ""; // DETAILED PAGES $start = "\n\n\t"; if (isset($array[0])) $arrelm0 = $array[0]; if (isset($array[1])) $arrelm1 = $array[1]; if (isset($array[2])) $arrelm2 = $array[2]; if (isset($array[3])) $arrelm3 = $array[3]; if (isset($array[4])) $arrelm4 = $array[4]; if (isset($array[5])) $arrelm5 = $array[5]; if (isset($array[6])) $arrelm6 = $array[6]; if (isset($array[7])) $arrelm7 = $array[7]; if (isset($array[8])) $arrelm8 = $array[8]; if (isset($array[9])) $arrelm9 = $array[9]; if (isset($array[10])) $arrelm10 = $array[10]; $slutt= ""; $file_pointer = fopen("wap/detail.wml", "w"); fwrite($file_pointer,"$start $arrelm0 $arrelm1 $arrelm2 $arrelm3 $arrelm4 $arrelm5 $arrelm6 $arrelm7 $arrelm8 $arrelm9 $arrelm10 $slutt"); fclose($file_pointer); $tplList->assign("wap_url","http://$set_url/wap/index.wml"); if (file_exists("images/rss.xml")) $tplList->assign("LA_RSS_FEED", LA_RSS_FEED); $tplList->display("latestwap.tpl"); include_once("footer_inc.php"); ?>