Beispiel #1
0
function prepare_text($row, $reply = 0)
{
    global $pt_l, $ptaction, $lang, $AllowToSend, $module_filepath;
    $text = ereg_replace(""", "\"", $row[text]);
    $text = ereg_replace("\\<\\/modifiedtime\\>", "", $text);
    $r = preg_match_all("/\\<modifiedtime\\>([^]+)/U", $text, $res, PREG_PATTERN_ORDER);
    $text = ereg_replace("\\<modifiedtime\\>[^]+", "", $text);
    $text = split("", $text);
    for ($o = 0; $o < count($res[1]); $o++) {
        //	$res[1][$o]=ereg_replace("","\?\>",$res[1][$o]);
        //	eval(ereg_replace("echo ","\$row[\$i][$o].=",$res[1][$o]));
        $filename = trim(ereg_replace(".*lichba\\.by", "", $res[1][$o]));
        $filename = $module_filepath . $filename;
        if (file_exists($filename)) {
            $last_modified = filemtime($filename);
            $text[$o] .= date("d.m.Y", $last_modified);
        }
    }
    $text = join("", $text);
    $text = prepare_text_form($text);
    //echo "00";
    $res = $text;
    if ($ptaction) {
        $email = $row[f10];
        if (count($email) > 1) {
            $email = join("", $email);
        }
        $email = split("\n", $email);
        $f10 = $email;
        $res = $email[1];
        $email = trim($email[0]);
        $table = prepare_text_table($text);
        if ($AllowToSend) {
            prepare_text_send($email, $table, $reply);
        } else {
            $etext = trim($f10[2]);
            if (!$etext) {
                switch ($lang) {
                    case "ru":
                        $etext = "Пожалуйста, заполните обязательные поля, отмеченные звездочкой.";
                        break;
                    default:
                        $etext = "Please fill all required fields.";
                }
            }
            $etext = "<font color=red>" . $etext . "</font>";
            $res = $etext . $text;
        }
    }
    //echo $table;
    return $res;
}
Beispiel #2
0
function prepare_text($row, $reply = 0)
{
    global $pt_l, $ptaction, $lang, $AllowToSend, $send_error;
    $text = ereg_replace("&quot;", "\"", $row[text]);
    $text = prepare_text_form($text);
    //echo $text;
    $res = $text;
    if ($ptaction) {
        $email = $row[f10];
        if (count($email) > 1) {
            $email = join("", $email);
        }
        $email = split("\n", $email);
        $f10 = $email;
        $res = $email[1];
        $email = trim($email[0]);
        $table = prepare_text_table($text);
        if ($AllowToSend) {
            if (ereg("Итого:", $pt_l[1])) {
                $table = $pt_l[1] . "<p>" . $table;
            }
            prepare_text_send($email, $table, $reply);
        } else {
            $etext = trim($f10[2]);
            if (!$etext) {
                switch ($lang) {
                    case "ru":
                        $etext = "Пожалуйста, заполните обязательные поля, отмеченные звездочкой.";
                        break;
                    default:
                        $etext = "Please fill all required fields.";
                }
            }
            $etext = "<font color=red>" . $etext . "</font>";
            $res = $etext . $text;
        }
    }
    //echo $table;
    return $res;
}
Beispiel #3
0
        if (ereg("\\:0", $s[$i])) {
            $s[$i] = "";
        }
        if ($s[$i] == ":") {
            $s[$i] = "";
        }
    }
    $res = join(";", $s);
    $res = ereg_replace(";+", ";", $res);
    return $res;
}
$SQL = "SELECT * FROM " . $module_name . " WHERE id=84";
$result = $Q->query($DB, $SQL);
$row = mysql_fetch_assoc($result);
$text = ereg_replace("&quot;", "\"", $row[text]);
$text = prepare_text_form($text);
$email = $row[f10];
if (count($email) > 1) {
    $email = join("", $email);
}
$email = split("\n", $email);
$f10 = $email;
$res = $email[1];
$email = trim($email[0]);
$table = prepare_text_table($text);
//echo $AllowToSend;
if ($action == "delete" && isset($id)) {
    include $DOCUMENT_ROOT . "/_modules/cart/_delete.php";
}
if (isset($enumber) && isset($id)) {
    include $DOCUMENT_ROOT . "/_modules/cart/_addtocart.php";