$_lang = trim($_REQUEST['lang']);
include "../module/table_frame.php";
include "../" . $folderConfig . "/url.php";
require "../" . $folderConfig . "/config.php";
require "../" . $folderConfig . "/common_start.php";
include "../" . $folderLib . "/func.lib.php";
//require("../".$folderLanguage."/language.php");
require "../" . $folderLanguage . "/language_config.php";
require "../" . $folderModule . "/config_currency_unit.php";
include "../" . $folderModule . "/configmodule.php";
include "../" . $folderModule . "/hrefFixed.php";
//include("../".$folderModule."/processTitle.php");
$id_product = trim($_REQUEST['id_product']);
$idvideo = trim($_REQUEST['idvideo']);
$rowVideo = getRecord($tableImageId, "id=" . $idvideo . " and typeivm=1");
$rowVideoName = getRecord($tableImage, "id_code=" . $rowVideo['id'] . " and " . $whereLang);
echo '<?xml version="1.0" encoding="ISO-8859-1"?>
<show id="' . $idvideo . '" title="' . removeVietnamese1($rowVideoName['name'], " ", "+") . '">
<slate src="' . $serverName . $rowVideo['image_large'] . '" width="0" height="0"/>
<videoObject id="' . $id_product . '" index="0" title="' . removeVietnamese1($rowVideoName['name'], " ", "+") . '">
<smil><head/><body>
<switch>
<video src="' . $serverName . $rowVideo['image'] . '" dur="' . $rowVideo['code'] . '"/>
</switch>
</body></smil>
</videoObject>
</show>';
?>

<?php 
require "../" . $folderConfig . "/common_end.php";
    if ($table == "") {
        return false;
    }
    if ($where == "") {
        $where = "1=1";
    }
    $result = @mysql_query("select count(*) as cnt from {$table} where {$where} and {$whereStatus}", $connlai);
    $row = @mysql_fetch_assoc($result);
    return $row['cnt'];
}
$sqlUpCon = "select * from tbl_member_id where status=0";
$resultUpCon = mysql_query($sqlUpCon, $conn);
while ($UpCon = mysql_fetch_array($resultUpCon)) {
    $email = $UpCon['email'];
    $name = $UpCon['name'];
    $username = removeVietnamese1($name, " ", "_");
    $joindate = @strtotime(date("d-m-Y-g:i a"));
    $fields_arrsuser = array("usergroupid" => "2", "username" => "'{$username}'", "password" => "'6fcdb24ef1388a926242bfe14eee57e3'", "passworddate" => "now()", "email" => "'{$email}'", "showvbcode" => "1", "showbirthday" => "0", "usertitle" => "'Junior Member'", "joindate" => "{$joindate}", "lastvisit" => "1333474712", "lastactivity" => "1333474712", "reputationlevelid" => "5", "timezoneoffset" => "'7'", "options" => "45108311", "ipaddress" => "'115.74.71.200'", "languageid" => "2", "salt" => "'vv>k@I`DSKN\$@KB%}nsOz3+fepfEUt'");
    if (!countRecordForum('user', "email='" . $email . "'")) {
        $resultinsert = insertForum('user', $fields_arrsuser);
        echo "ok";
        $userid = @mysql_insert_id();
        //lay id vua them vo
        if ($userid) {
            $fields_arrsusertextfield = array("userid" => "'{$userid}'");
            $resultiuserfield = insertForum('userfield', $fields_arrsusertextfield);
            $resultusertextfield = insertForum('usertextfield', $fields_arrsusertextfield);
        }
    }
}
require "../qweasd/common_end.php";
foreach ($GEOIP_REGION_NAME_CITY as $codeCity => $nameCity) {
    $nameCityV = $GEOIP_REGION_NAME_CITY[$codeCity][$codeCity];
    $nameCityE = removeVietnamese1($nameCityV);
    //lay url tu dong
    $fields_arr1 = array("name" => "'{$nameCityV}'", "code" => "'{$codeCity}'", "lang" => "'vn'", "date_added" => "now()", "last_modified" => "now()");
    $result = insert($tableCityId, $fields_arr1);
    $parent = mysql_insert_id();
    //lay id vua them vo
    $fields_arrVn = array("id_code" => "'{$parent}'", "name" => "'{$nameCityV}'", "code" => "'{$codeCity}'", "lang" => "'vn'", "date_added" => "now()", "last_modified" => "now()");
    $fields_arrEn = array("id_code" => "'{$parent}'", "name" => "'{$nameCityE}'", "code" => "'{$codeCity}'", "lang" => "'en'", "date_added" => "now()", "last_modified" => "now()");
    $resultVn = insert($tableCity, $fields_arrVn);
    $resultEn = insert($tableCity, $fields_arrEn);
    $arrayDistrict = $GEOIP_REGION_NAME_CITY[$codeCity];
    $iDis = 0;
    foreach ($arrayDistrict as $codeDis => $nameDis) {
        if ($iDis > 0) {
            $nameDistrictV = $nameDis;
            $nameDistrictE = removeVietnamese1($nameDistrictV);
            //lay url tu dong
            $fields_arr1 = array("name" => "'{$nameDistrictV}'", "code" => "'{$codeDis}'", "parent" => "'{$parent}'", "lang" => "'vn'", "date_added" => "now()", "last_modified" => "now()");
            $result = insert($tableDistrictId, $fields_arr1);
            $oldid = mysql_insert_id();
            //lay id vua them vo
            $fields_arrVn = array("id_code" => "'{$oldid}'", "name" => "'{$nameDistrictV}'", "code" => "'{$codeDis}'", "parent" => "'{$parent}'", "lang" => "'vn'", "date_added" => "now()", "last_modified" => "now()");
            $fields_arrEn = array("id_code" => "'{$oldid}'", "name" => "'{$nameDistrictE}'", "code" => "'{$codeDis}'", "parent" => "'{$parent}'", "lang" => "'en'", "date_added" => "now()", "last_modified" => "now()");
            $resultVn = insert($tableDistrict, $fields_arrVn);
            $resultEn = insert($tableDistrict, $fields_arrEn);
        }
        $iDis++;
    }
}