Ejemplo n.º 1
0
    $subject = str_replace("%member%", "-", $subject);
    $subject = str_replace("%name%", $_POST["name"] . " " . $_POST["surname"], $subject);
    $text = str_replace("%created%", strftime("%Y-%m-%d %H:%M", $created), $text);
    $text = str_replace("%changed_at%", "-", $text);
    $text = str_replace("%request_id%", $request_id, $text);
    $text = str_replace("%type%", "add", $text);
    $text = str_replace("%state%", "awaiting", $text);
    $text = str_replace("%member_id%", "-", $text);
    $text = str_replace("%member%", "-", $text);
    $text = str_replace("%admin_id%", "-", $text);
    $text = str_replace("%admin%", "-", $text);
    $text = str_replace("%reason%", "-", $text);
    $text = str_replace("%admin_response%", "-", $text);
    $text = str_replace("%ip%", $_SERVER["REMOTE_ADDR"], $text);
    $text = str_replace("%ptr%", gethostbyaddr($_SERVER["REMOTE_ADDR"]), $text);
    $distro = $db->findByColumnOnce("cfg_templates", "templ_id", $_POST["distribution"]);
    $location = $db->findByColumnOnce("locations", "location_id", $_POST["location"]);
    $application = '
     Nickname: ' . $_POST["nick"] . '
         Name: ' . $_POST["name"] . ' ' . $_POST["surname"] . '
        Email: ' . $_POST["email"] . '
       Adresa: ' . $_POST["address"] . ", " . $_POST["zip"] . " " . $_POST["city"] . ", " . $_POST["country"] . '
Year of birth: ' . $_POST["birth"] . '
       Jabber: 
          How: ' . $_POST["how"] . '
         Note: ' . $_POST["note"] . '
     Currency: ' . $_POST["currency"] . '
 Distribution: ' . $distro["templ_id"] . ' ' . $distro["templ_label"] . '
     Location: ' . $location["location_id"] . ' ' . $location["location_label"] . '
	';
    $text = str_replace("%changed_info%", $application, $text);