Просмотр файла wapt/SMS/wap/functions.php

Размер файла: 3.75Kb
<?php
function k2u($string)  {

$string = ereg_replace("&","&amp;",$string);
$string = iconv("CP1251", "UTF-8", "$string");
/*
$string = ereg_replace("А","&#1040;",$string);
$string = ereg_replace("Б","&#1041;",$string);
$string = ereg_replace("В","&#1042;",$string);
$string = ereg_replace("Г","&#1043;",$string);
$string = ereg_replace("Д","&#1044;",$string);
$string = ereg_replace("Е","&#1045;",$string);
$string = ereg_replace("Ё","&#1025;",$string);
$string = ereg_replace("Ж","&#1046;",$string);
$string = ereg_replace("З","&#1047;",$string);
$string = ereg_replace("И","&#1048;",$string);
$string = ereg_replace("Й","&#1049;",$string);
$string = ereg_replace("К","&#1050;",$string);
$string = ereg_replace("Л","&#1051;",$string);
$string = ereg_replace("М","&#1052;",$string);
$string = ereg_replace("Н","&#1053;",$string);
$string = ereg_replace("О","&#1054;",$string);
$string = ereg_replace("П","&#1055;",$string);
$string = ereg_replace("Р","&#1056;",$string);
$string = ereg_replace("С","&#1057;",$string);
$string = ereg_replace("Т","&#1058;",$string);
$string = ereg_replace("У","&#1059;",$string);
$string = ereg_replace("Ф","&#1060;",$string);
$string = ereg_replace("Х","&#1061;",$string);
$string = ereg_replace("Ц","&#1062;",$string);
$string = ereg_replace("Ч","&#1063;",$string);
$string = ereg_replace("Ш","&#1064;",$string);
$string = ereg_replace("Щ","&#1065;",$string);
$string = ereg_replace("Ъ","&#1066;",$string);
$string = ereg_replace("Ы","&#1067;",$string);
$string = ereg_replace("Ь","&#1068;",$string);
$string = ereg_replace("Э","&#1069;",$string);
$string = ereg_replace("Ю","&#1070;",$string);
$string = ereg_replace("Я","&#1071;",$string);
$string = ereg_replace("а","&#1072;",$string);
$string = ereg_replace("б","&#1073;",$string);
$string = ereg_replace("в","&#1074;",$string);
$string = ereg_replace("г","&#1075;",$string);
$string = ereg_replace("д","&#1076;",$string);
$string = ereg_replace("е","&#1077;",$string);
$string = ereg_replace("ё","&#1105;",$string);
$string = ereg_replace("ж","&#1078;",$string);
$string = ereg_replace("з","&#1079;",$string);
$string = ereg_replace("и","&#1080;",$string);
$string = ereg_replace("й","&#1081;",$string);
$string = ereg_replace("к","&#1082;",$string);
$string = ereg_replace("л","&#1083;",$string);
$string = ereg_replace("м","&#1084;",$string);
$string = ereg_replace("н","&#1085;",$string);
$string = ereg_replace("о","&#1086;",$string);
$string = ereg_replace("п","&#1087;",$string);
$string = ereg_replace("р","&#1088;",$string);
$string = ereg_replace("с","&#1089;",$string);
$string = ereg_replace("т","&#1090;",$string);
$string = ereg_replace("у","&#1091;",$string);
$string = ereg_replace("ф","&#1092;",$string);
$string = ereg_replace("х","&#1093;",$string);
$string = ereg_replace("ц","&#1094;",$string);
$string = ereg_replace("ч","&#1095;",$string);
$string = ereg_replace("ш","&#1096;",$string);
$string = ereg_replace("щ","&#1097;",$string);
$string = ereg_replace("ъ","&#1098;",$string);
$string = ereg_replace("ы","&#1099;",$string);
$string = ereg_replace("ь","&#1100;",$string);
$string = ereg_replace("э","&#1101;",$string);
$string = ereg_replace("ю","&#1102;",$string);
$string = ereg_replace("я","&#1103;",$string);
$string = ereg_replace("№","&#8470;",$string);
*/
return $string;
}

// проверка email
       function check_email_addr($email) {
    if (ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'. '@'.'[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.'[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $email)) {
        return 1;  }else{ return 0;  } }

        // Функции
   function error($error) {
 print " <card id=\"error\" title=\"Error\">
         <p>
         $error
         </p>
       </card></wml>\n";
                   exit;
         }
   ?>