
Translation from PHP to Visual Basic
Would someone know how to translate this code written for PHP in Visual
Basic? The purpose of this code is to set a variable that defines the
link of a button in a Web page. The button is in an include file and has
to change its value from page to page. (It is a button to access the
page being browsed in a different language: all English files are named
"FILENAME_e.shtml" and French pages "FILENAME_f.shtml" The code takes
the _e.shtml at the end of the file name and changes it for _f.shtml.
<!--
/// get the file name
<% arrayOne = explode("/",REQUEST_URI);
$arraylen = count($arrayOne);
$filename = $arrayOne[$arraylen - 1];
/// divide up the file name
$arrayOfFileName = explode("_",$filename);
/// find the new suffix
if ($arrayOfFileName[(sizeof($arrayOfFileName) - 1)] == "e.shtml"){
$suffix = "f.shtml";
Quote:
}else{
$suffix = "e.shtml";
Quote:
}
/// loop through filename array and rebuild new filename
$newfile = "";
for($i=0; $i < (sizeof($arrayOfFileName)-1); $i++) {
$newfile .= $arrayOfFileName[$i] . "_";
Quote:
}
$newfile = $newfile . $suffix;
?>
-->
|
|
jppicard.vcf
< 1K
Download
|