Esempio n. 1
0
function transliterate($word, $lang)
{
    if ($lang != "mk") {
        if (ctype_alpha($word)) {
            return $word;
        }
        echo cyr2lat($word);
    } else {
        if (ctype_alpha($word)) {
            return $word;
        }
        echo lat2cyr($word);
    }
}
Esempio n. 2
0
</option>
                <option id="Service" value="S"><?php 
echo dic_("Fm.Service");
?>
</option>
                <option id="Cost" value="C"><?php 
echo dic_("Fm.OthCosts");
?>
</option>
                <?php 
$dsCosts = query("select * from fmcosts where clientid= " . session("client_id") . " order by costname asc");
while ($drCosts = pg_fetch_array($dsCosts)) {
    if ($cLang == 'mk') {
        $cost_ = $drCosts["costname"];
    } else {
        $cost_ = cyr2lat($drCosts["costname"]);
    }
    ?>
                <option id="<?php 
    echo $drCosts["id"];
    ?>
" value="<?php 
    echo $cost_;
    ?>
"><?php 
    echo $cost_;
    ?>
</option>
                <?php 
}
?>
Esempio n. 3
0
            $i++;
        } else {
            if ($i != 0) {
                $new .= str_replace($lat, $cyr, strtolower($locname[$i]));
            } else {
                $new .= str_replace($lat, $cyr, strtoupper($locname[$i]));
            }
        }
    }
    $locname = $new;
} else {
    $locname = ucfirst($locname);
}
opendb();
$locStr = "";
$dsLocations = query("select * from fmlocations where clientid= " . session("client_id"));
while ($drLocations = pg_fetch_array($dsLocations)) {
    if ($cLang == 'mk') {
        $loc_ = $drLocations["locationname"];
    } else {
        $loc_ = cyr2lat($drLocations["locationname"]);
    }
    if ($locname == $drLocations["locationname"]) {
        $locStr .= "<option id='" . $drLocations["id"] . "' value='" . $drLocations["id"] . "' selected>" . $loc_ . "</option>";
    } else {
        $locStr .= "<option id='" . $drLocations["id"] . "' value='" . $drLocations["id"] . "' >" . $loc_ . "</option>";
    }
}
closedb();
echo $locStr;
exit;