Avatar billede shoofixmafi Nybegynder
14. juli 2010 - 10:09 Der er 5 kommentarer og
1 løsning

Email kopi til admin

Hej,


her er en fil der hedder (showad.php)

-------
<?php

require_once("initvars.inc.php");
require_once("config.inc.php");

if($image_verification)
{
    require_once("captcha.cls.php");
    $captcha = new captcha();
}

$msg = "";
$err = "";

?>

<?php

if (!$_GET['adid'])
{
    header("Location: $script_url/?view=main&cityid=$xcityid&lang=$xlang");
    exit;
}


$adtable = ($_GET['view'] == "showevent") ? $t_events : $t_ads;
$adid_prefix = (($xview == "events") ? "E" : "A");
$full_adid = ($adid_prefix . $xadid);
$reported = explode(";", $_COOKIE["reported"]);
$is_reported = in_array($full_adid, $reported);

// Make up search query
$qsA = $_GET; $qs = "";
unset($qsA['do'], $qsA['reported'], $qsA['mailed'], $qsA['mailerr'], $qsA['msg'], $qsA['err'], $qsA['loginerr'], $qsA['registererr'], $qsA['forgoterr'], $qsA['forgotsucc']);
foreach ($qsA as $k=>$v) $qs .= "$k=$v&";

if ($_GET['do'] == "reportabuse")
{
    if (!$is_reported) {

        /* Begin Version 5.0 */
        $sql = "UPDATE $adtable
                SET abused = abused + 1
                WHERE adid = $_GET[adid]
                    AND abused < " . ($spam_indicator - 1);
        /* End Version 5.0 */
        mysql_query($sql) or die($sql);

        if(mysql_affected_rows())
        {
            echo "<div class=\"msg\">$lang[MESSAGE_ABUSE_REPORT]</div>";

            if($max_abuse_reports)
            {
                /* Begin Version 5.0 */
                $sql = "UPDATE $adtable
                        SET enabled = '0'
                        WHERE adid = $_GET[adid]
                            AND abused >= $max_abuse_reports";
                mysql_query($sql);
                /* End Version 5.0 */
            }

            header("Location: $script_url/?{$qs}reported=y");
            exit;
        }
    }

    unset($_GET['do']);
}


if ($xview == "showevent")
{
    // Get the event
    $sql = "SELECT a.*, UNIX_TIMESTAMP(a.timestamp) AS timestamp, UNIX_TIMESTAMP(a.createdon) AS createdon, UNIX_TIMESTAMP(a.expireson) AS expireson, UNIX_TIMESTAMP(feat.featuredtill) AS featuredtill,
            UNIX_TIMESTAMP(a.starton) AS starton, UNIX_TIMESTAMP(a.endon) AS endon
        FROM $t_events a
            LEFT OUTER JOIN $t_featured feat ON a.adid = feat.adid AND feat.adtype = 'E'
        WHERE a.adid = $xadid
            AND $visibility_condn_admin";
    $ad = mysql_fetch_array(mysql_query($sql));

    $isevent = 1;

    /* Begin Version 5.0 */
    $thisurl = buildURL($xview, array($xcityid, $xdate, $xadid, $ad['adtitle']));
    /* End Version 5.0 */

}
else
{
    // List of extra fields
    $xfieldsql = "";
    if(count($xsubcatfields))
    {
        for($i=1; $i<=$xfields_count; $i++)    $xfieldsql .= ", axf.f$i";
    }

    // Get the ad
    $sql = "SELECT a.*, ct.cityname as cityname, UNIX_TIMESTAMP(a.timestamp) AS timestamp, UNIX_TIMESTAMP(a.createdon) AS createdon, UNIX_TIMESTAMP(a.expireson) AS expireson, UNIX_TIMESTAMP(feat.featuredtill) AS featuredtill $xfieldsql
            FROM $t_ads a
                INNER JOIN $t_subcats scat ON scat.subcatid = a.subcatid
                INNER JOIN $t_cities ct ON a.cityid = ct.cityid
                LEFT OUTER JOIN $t_adxfields axf ON a.adid = axf.adid
                LEFT OUTER JOIN $t_featured feat ON a.adid = feat.adid AND feat.adtype = 'A'
            WHERE a.adid = $xadid
                AND $visibility_condn_admin";
    $ad = mysql_fetch_array(mysql_query($sql));

    $isevent = 0;
    /* Begin Version 5.0 */
    $thisurl = buildURL($xview, array($xcityid, $xcatid, $xcatname, $xsubcatid, $xsubcatname,
        $xadid, $ad['adtitle']));
    /* End Version 5.0 */

}


if (!$ad)
{
    /* Begin Version 5.0 */
    header("Location: $script_url/index.php?view=post404&cityid=$xcityid&lang=$xlang");
    /* End Version 5.0 */
    exit;
}

if(isset($_REQUEST['mode']) && ($_REQUEST['mode'] == 'register')){
    $email = $_REQUEST['email'];
    $password = md5($_REQUEST['password']);
   
    $sql_usr_chk = mysql_fetch_array(mysql_query("SELECT count(*) AS counter FROM members WHERE email = '".$email."'"));
    if($sql_usr_chk['counter'] <= '0'){
        $add_user = mysql_query("INSERT INTO members SET email = '".$email."',password = '".$password."'");
        $insert_id = mysql_insert_id();
        $_SESSION['user'] = $insert_id;
        //email
        $to  = $email;
       
        // subject
        $subject = 'Your account have been created at EC Arabia';
       
        // message
        $message = '
        <html>
        <head>
          <title>New Account</title>
        </head>
        <body>
          <p>Your account have been created at EC Arabia.You can now login to the website.</p>
         
        </body>
        </html>
        ';
       
        // To send HTML mail, the Content-type header must be set
        $headers  = 'MIME-Version: 1.0' . "\r\n";
        $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
       
        // Additional headers
        $headers .= 'From: EC Arabia <info@ecarabia.com>' . "\r\n";
       
        // Mail it
        mail($to, $subject, $message, $headers);
        //email
    } else {
        header("Location: $script_url/?$qs&registererr=1");
        exit;
    }
}

if(isset($_REQUEST['mode']) && ($_REQUEST['mode'] == 'login')){
    $email = $_REQUEST['email'];
    $password = md5($_REQUEST['password']);
   
    $sql_usr_chk = mysql_fetch_array(mysql_query("SELECT count(*) AS counter FROM members WHERE email = '".$email."' AND password = '".$password."'"));
   
    if($sql_usr_chk['counter'] == 1){
        $sql_usr_chk1 = mysql_fetch_array(mysql_query("SELECT userid FROM members WHERE email = '".$email."' AND password = '".$password."'"));
        $_SESSION['user'] = $sql_usr_chk1['userid'];
    } else {
        header("Location: $script_url/?$qs&loginerr=1");
        exit;
    }
}
if(isset($_REQUEST['mode']) && ($_REQUEST['mode'] == 'forgot')){
    $email = $_REQUEST['email'];
    $pass = rand(9999,99999);
    $password = md5($pass);
   
    $sql_usr_chk = mysql_fetch_array(mysql_query("SELECT count(*) AS counter FROM members WHERE email = '".$email."'"));
   
    if($sql_usr_chk['counter'] == 1){
        //email
        $to  = $email;
       
        // subject
        $subject = 'New Password From EC Arabia';
       
        // message
        $message = '
        <html>
        <head>
          <title>New Password</title>
        </head>
        <body>
          <p>Here is the new password! : '.$pass.'</p>
         
        </body>
        </html>
        ';
       
        // To send HTML mail, the Content-type header must be set
        $headers  = 'MIME-Version: 1.0' . "\r\n";
        $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
       
        // Additional headers
        $headers .= 'From: EC Arabia <info@ecarabia.com>' . "\r\n";
       
        // Mail it
        mail($to, $subject, $message, $headers);
        //email
       
        $sql_usr_chk1 = mysql_query("UPDATE members SET password = '".$password."' WHERE email = '".$email."'");
        header("Location: $script_url/?$qs&forgotsucc=1");
        exit;
    } else {
        header("Location: $script_url/?$qs&forgoterr=1");
        exit;
    }
}

if ($_POST['email'] && $_POST['mail'] && $ad['showemail'] == EMAIL_USEFORM)
{
    $err = "";

// BEGIN FuNEnD3R contact limit
$res_query = "SELECT sender_ip FROM $t_contact_temp
              WHERE time_sent > '".(time()-$ad_contact_limit)."'
              AND sender_ip = '".$_SERVER['REMOTE_ADDR']."'";

$res_count = "SELECT COUNT(sender_ip) AS max_count FROM $t_contact_temp
              WHERE sender_ip = '".$_SERVER['REMOTE_ADDR']."'";

$res = mysql_query($res_query);
$resa = mysql_query($res_count);
$count = mysql_fetch_array($resa);

//echo $res_query . '<br>' . $res_count . '<br>'; // testing
//$go_back_ad = '<br><br><a href="java script:history.go(-1)">'.$lang['ERROR_CONTACT_GO_BACK'].'</a>';



if ($image_verification && !$captcha->verify($_POST['captcha']))
{
        $err = $lang['ERROR_IMAGE_VERIFICATION_FAILED'];
}


elseif(mysql_num_rows($res) > 0)
{
      $mailerr = '<font color="red">' .$lang['ERROR_CONTACT_FORM_FLOOD']. '</font><br><br>';
      echo $mailerr;
}
elseif($count['max_count'] >= $ad_contact_max_count )
{
      $mailerr = '<font color="red">' .$lang['ERROR_CONTACT_FORM_MAX']. '</font><br><br>';
      echo $mailerr;
}
// END FuNEnD3R contact limit   
  if (!ValidateEmail($_POST['email']))
    {
        $err .= $lang['ERROR_INVALID_EMAIL'] . "<br>";
    }

    if (preg_match("/[\\000-\\037]/", $_POST['email']))
    {
        handle_security_attack("@");
    }
    else if (!$err)
    {
        $thismail_header = file_get_contents("mailtemplates/contact_header.txt");
        $thismail_header = str_replace("{@SITENAME}", $site_name, $thismail_header);
        $thismail_header = str_replace("{@ADTITLE}", $ad['adtitle'], $thismail_header);
        $thismail_header = str_replace("{@ADURL}", "{$script_url}/{$thisurl}", $thismail_header);
        $thismail_header = str_replace("{@FROM}", $_POST['email'], $thismail_header);

        $thismail_footer = file_get_contents("mailtemplates/contact_footer.txt");
        $thismail_footer = str_replace("{@SITENAME}", $site_name, $thismail_footer);
        $thismail_footer = str_replace("{@ADTITLE}", $ad['adtitle'], $thismail_footer);
        $thismail_footer = str_replace("{@ADURL}", "{$script_url}/{$thisurl}", $thismail_footer);
        $thismail_footer = str_replace("{@FROM}", $_POST['email'], $thismail_footer);

        $msg = $thismail_header . "\n" .
                stripslashes($_POST['mail']) . "\n" .
                $thismail_footer;
        /* Begin Version 5.1 - Send mail using SMTP */
        $xtraheaders = array("Reply-To: " . $_POST['email']);

        $mailerr = sendMail($ad['email'], $lang['MAILSUBJECT_CONTACT_FORM'], $msg,
            $site_email, $langx['charset'], "attach", $xtraheaders);
        /* End Version 5.1 - Send mail using SMTP */

        if ($mailerr)
        {
            $mailresult = "n";
            if ($mailerr == "FAILED") $mailerr = "";
        }
        else
        {
            $mailresult = "y";
        }
        // update members
        $sql_chk = mysql_fetch_array(mysql_query("SELECT points FROM members WHERE userid = '".$_SESSION['user']."'"));
        $final_points = ($sql_chk['points'] - 1);
        $update_sql = mysql_query("UPDATE members SET points = '".$final_points."' WHERE userid = '".$_SESSION['user']."'");
        //update members
        header("Location: $script_url/?$qs&mailed=$mailresult&mailerr=$mailerr");
        exit;
    }

}

$sql = "SELECT *
        FROM $t_adpics p
        WHERE p.adid = $xadid
            AND isevent = '$isevent'";
$pres = mysql_query($sql);


?>


<script language="javascript">
function confirmAbuseReport()
{
    if (confirm('<?php echo addslashes($lang['REPORT_ABUSE_CONFIRM']); ?>'))
    {
        /* Begin Version 5.0 */
        eval("location.href = '?' + '<?php echo $qs; ?>' + 'do=reportabuse'");
        /* End Version 5.0 */
    }
}
</script>


<?php

if ($_GET['reported']) {
    $reported[] = $full_adid;
    setcookie("reported", implode(";", $reported), time()+90*24*60*60, "/");
    $is_reported = true;
}

?>


<?php

if(!$_POST['mail'])
{
        if($_GET['mailed'] == "y")
        {
            $msg .= $lang['MESSAGE_MAIL_SENT']."<br>";
            $contact_sql = "INSERT INTO $t_contact_temp (sender_ip, time_sent)
                            VALUES ('".$_SERVER['REMOTE_ADDR']."', '".time()."')";
            mysql_query($contact_sql);
        }

    elseif ($_GET['mailed'] == "n")    { $err .= $lang['ERROR_MAIL_NOT_SENT']."<br>".$_GET['mailerr']."<br>"; }

    if($_GET['reported'] == "y")    { $msg .= $lang['MESSAGE_ABUSE_REPORT']."<br>"; }
}

if($_GET['msg'])                { $msg .= nl2br(htmlentities($_GET['msg']))."<br>"; }
if($_GET['err'])                { $err .= nl2br(htmlentities($_GET['err']))."<br>"; }

?>

<?php

if($err) echo "<div class=\"err\">$err</div>";
if($msg) echo "<div class=\"msg\">$msg</div>";

?>

<?php if($ad['featuredtill'] && $ad['featuredtill'] > time()) { ?>
<div class="msg">
<img src="images/featured.gif" align="absmiddle">
<b><?php echo $lang['THIS_AD_IS_FEATURED']; ?></b>
</div>
<?php } ?>

<table class="postheader" width="100%"> <!-- Version 5.0 -->
<tr>
<td>

<div align="right">
<!-- Begin Version 5.0 -->
<a href="printad_box.inc.php?cityid=<?php echo $xcityid; ?>&amp;adid=<?php echo $xadid; ?>&amp;printview=<?php echo $xview; ?>" onclick="printpopup(this.href);return false"><?php echo $lang['PRINT_THIS_AD']; ?></a> |
<?php if(!$is_reported) { ?><a href="java script:confirmAbuseReport();"><?php echo $lang['REPORT_ABUSE']; ?></a> | <?php } ?>
<a href="?view=mailad&cityid=<?php echo $xcityid; ?>&adid=<?php echo $xadid; ?>&adtype=<?php echo $xadtype; ?><?php if($xdate) echo "&date={$xdate}"; ?>"><?php echo $lang['EMAIL_THIS_AD_LINK']; ?></a>

<?php if(!$debug) { ?>
&nbsp;&nbsp;

<script type="text/javascript">var addthis_pub="4a1806ae49a62752";</script>
<a href="http://www.addthis.com/bookmark.php?v=20" onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()" style="text-decoration:none;"><img src="http://s7.addthis.com/static/btn/sm-plus.gif" width="16" height="16" alt="Bookmark and Share" style="border:0; align:middle;"/> Share</a>

<?php } ?>

<!-- End Version 5.0 -->
</div>
<?php echo $lang['POST_ID']; ?> <?php echo ($xview=="showevent"?"E":"A"); ?><?php echo $ad['adid']; ?><br><br>
<?php
if ($xview == "showevent")
{
?>
    <b><?php echo date("d", $ad['starton'])." ".$langx['months_short'][date("n", $ad['starton'])-1] . ", " . date("y", $ad['starton']); ?>
    <?php if($ad['starton'] != $ad['endon']) echo " - " . date("d", $ad['endon']) . " " . $langx['months_short'][date("n", $ad['endon'])-1] . ", " . date("y", $ad['endon']); ?></b>
    <br>

<?php
}
?>

<div class="posttitle"> <!-- Version 5.0 -->
<?php echo $ad['adtitle']; ?>
<?php
$loc = "";
if($ad['area']) $loc = $ad['area'];
if($xcityid < 0) $loc .= ($loc ? ", " : "") . $ad['cityname'];
if($loc) echo " <span class=\"adarea\">($loc)</span>";
?>
</div><br>

<b><?php echo $lang['AD_DATE']; ?></b>:
<?php echo QuickDate($ad['createdon']); ?>
<br>

<?php if($ad['createdon'] != $ad['timestamp']) { ?>
<b><?php echo $lang['AD_LAST_UPDATE']; ?></b>:
<?php echo QuickDate($ad['timestamp']); ?>
<br>
<?php } ?>

<b><?php echo $lang['AD_EXPIRES_ON']; ?></b>:
<?php echo QuickDate($ad['expireson']); ?>
<br>

<!--<b><?php echo $lang['REPLY_TO']; ?></b>:
<?php if ($ad['showemail'] == EMAIL_SHOW) { ?>
    <a href="mailto:<?php echo $ad['email']; ?>"><?php echo $ad['email']; ?></a>

<?php } elseif ($ad['showemail'] == EMAIL_USEFORM) { ?>
    <i><?php echo $lang['USE_CONTACT_FORM']; ?></i>

<?php } else { ?>
    <i><?php echo $lang['EMAIL_NOT_SHOWN']; ?></i>

<?php } ?>
<br>-->

</td>
</tr>
</table>

<?php
if(($xsubcathasprice && $ad['price']) || count($xsubcatfields))
{
    /* Begin Version 5.0 */
    $actualfields = $xsubcathasprice ? 1 : 0;
?>
<div>
<table>

<?php if($xsubcathasprice) { ?><tr><td><b><?php echo $xsubcatpricelabel; ?></b></td><td>: <?php if(($xsubcathasprice && $ad['price'] != 0.00)) { ?><?php echo $currency . $ad['price']; ?><?php } else { echo $lang['AD_PRICE_NOT_PROVIDED']; } ?></td></tr><?php } ?>

<?php if(count($xsubcatfields)) { ?>

<!--//new-->
<?php if($_SESSION['user']){?>
<?php
$sql_chk = mysql_fetch_array(mysql_query("SELECT points FROM members WHERE userid = '".$_SESSION['user']."'"));
if($sql_chk['points'] > '0'){
?>
<!--//new-->
<?php
foreach ($xsubcatfields as $fldnum=>$fld) { if(($fld['TYPE'] == "N" && $ad["f$fldnum"] > 0) || ($fld['TYPE'] != "N" && $ad["f$fldnum"])) { $actualfields++; ?>
<tr><td><b><?php echo $fld['NAME']; ?></b></td><td>: <?php echo $ad["f$fldnum"]; ?></td></tr>
<?php }}
//new
}
}
//new
} ?>
</table></div>
<?php if ($actualfields) { ?>
<div style="border-bottom:1px solid #E0E0E0;">&nbsp;</div>
<?php } ?>
<?php
    /* End Version 5.0 */
}
?>

<table class="post" width="100%"><tr><td> <!-- Version 5.0 -->

<!-- Begin Version 5.0 -->
<?php echo generateHtml($ad['addesc'], $ad['createdon']); ?>
<!-- End Version 5.0 -->

</td></tr></table>

<?php

if (@mysql_num_rows($pres))
{
    $i = 0;
?>

    <table class="postpics" width="100%"><tr><td> <!-- Version 5.0 -->

<?php
    while ($row = mysql_fetch_array($pres))
    {
        $i++;

        $imgsize = GetThumbnailSize("{$datadir[adpics]}/{$row[picfile]}", $images_max_width, $images_max_height);

?>

        <img src="<?php echo "{$datadir[adpics]}/{$row[picfile]}"; ?>" id="adimg<?php echo $i; ?>" width="<?php echo $imgsize[0]; ?>" height="<?php echo $imgsize[1]; ?>"><br><br>

<?php
    }
?>

    </td></tr></table>

<?php

    $imgcnt = $i;

}
?>

<?php
if($ad['othercontactok']) echo "<p class=\"disclosure_yes\">$lang[COMMERCIAL_CONTACT_OK]</p>";
else echo "<p class=\"disclosure_no\">$lang[COMMERCIAL_CONTACT_NOT_OK]</p>";
?>


<?php
$hits = $ad['hits'];
$already_hit = explode(";", $_COOKIE["hits"]);
if (!in_array($full_adid, $already_hit)) {
    $sql = "update $adtable set hits = hits + 1, timestamp = timestamp where adid = $xadid";
    mysql_query($sql);
    $already_hit[] = $full_adid;
    setcookie("hits", implode(";", $already_hit), 0, "/");
    $hits++;
}
?>


<!-- Begin Version 5.0 -->
<?php if (!$debug) { ?>
<div style="float:left;">

<script type="text/javascript">var addthis_pub="4a1806ae49a62752";</script>
<a href="http://www.addthis.com/bookmark.php?v=20" onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()" style="text-decoration:none;"><img src="http://s7.addthis.com/static/btn/sm-plus.gif" width="16" height="16" alt="Bookmark and Share" style="border:0; align:middle;"/> Share</a>

<script type="text/javascript" src="http://s7.addthis.com/js/200/addthis_widget.js"></script>
<script language="javascript">
function popupWindow(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=650,height=650,screenX=150,screenY=150,top=150,left=150')
}

</script>
</div>
<?php } ?>
<div class="hits"><?php echo $hits; ?> hits<br><br></div>
<br style="clear:both">
<!-- End Version 5.0 -->

<?php if($_SESSION['user']){?>
<?php
$sql_chk = mysql_fetch_array(mysql_query("SELECT points FROM members WHERE userid = '".$_SESSION['user']."'"));
if($sql_chk['points'] > '0'){
?>
<?php if ($ad['showemail'] == EMAIL_USEFORM) {

/*$qs = ""; $qsA = $_GET; unset($qsA['syndicate']);
foreach ($qsA as $k=>$v) $qs .= "$k=$v&";*/

?>

    <form action="<?php echo "$script_url/?$qs"; ?>" method="post" enctype="multipart/form-data">
    <table class="contactform">
    <tr>
        <th colspan="2"><?php echo $lang['CONTACT_USER']; ?>:<a name="contactform">&nbsp;</a>
</th>
    </tr>
    <tr><td colspan="2">&nbsp;</td></tr>
    <?php
    $sql_email = mysql_fetch_array(mysql_query("SELECT email FROM members WHERE userid = '".$_SESSION['user']."'"));
    ?>
    <tr>
        <td><?php echo $lang['YOUR_EMAIL']; ?>: <span class="marker">*</span></td>
        <td>
        <input type="text" size="65" name="email" value="<?=$sql_email['email']?>" readonly="readonly">
        </td>
    </tr>
    <tr>
        <td valign="top"><?php echo $lang['YOUR_MESSAGE']; ?>: <span class="marker">*</span></td>
        <td>
        <textarea cols="64" rows="10" name="mail"></textarea>
        </td>
    </tr>
    <tr>
        <td valign="top"><?php echo $lang['ATTACHMENT']; ?>:</td>
        <td>
        <input type="file" size="55" name="attach"><br>
        <span class="hint"><?php echo $lang['UNSUPPORTED_ATTACHEMNTS']; ?>: <?php echo implode(", ", $contactmail_attach_wrongfiles); ?><br>
        <?php echo $lang['MAX_ATTACHMENT_SIZE']; ?>: <?php echo $contactmail_attach_maxsize; ?>KB</span>
        </td>
    </tr>

    <?php
    if($image_verification)
    {
    ?>

        <tr>
            <td valign="top"><?php echo $lang['POST_VERIFY_IMAGE']; ?>: <span class="marker">*</span></td>
            <td>
            <img src="captcha.png.php?<?php echo rand(0,999); ?>"><br>
            <span class="hint"><?php echo $lang['POST_VERIFY_IMAGE_HINT']; ?></span><br>
            <input type="text" name="captcha" value="">
            </td>
        </tr>

    <?php
    }
    ?>

    <tr>
        <td>&nbsp;</td>
        <td><button type="submit"><?php echo $lang['BUTTON_SEND_MAIL']; ?></button></td>
    </tr>
    </table>
    </form>

<?php }} else {
?>
<table class="contactform">
        <tr><td colspan="2"><a href="java script:void(0);" onclick="popupWindow('buy_credits.php');"><?php echo $lang['BUY_CREDIT']; ?></a></td></tr>
</table>
<?php
}} else { ?>
<table class="contactform">
    <tr>
        <td width="50%" valign="top">
            <table width="100%">
                  <script language="javascript">
                  function echeck(str) {

                    var at="@"
                    var dot="."
                    var lat=str.indexOf(at)
                    var lstr=str.length
                    var ldot=str.indexOf(dot)
                    if (str.indexOf(at)==-1){
                      alert("Invalid E-mail ID")
                      return false
                    }
           
                    if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
                      alert("Invalid E-mail ID")
                      return false
                    }
           
                    if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
                        alert("Invalid E-mail ID")
                        return false
                    }
           
                    if (str.indexOf(at,(lat+1))!=-1){
                        alert("Invalid E-mail ID")
                        return false
                    }
           
                    if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
                        alert("Invalid E-mail ID")
                        return false
                    }
           
                    if (str.indexOf(dot,(lat+2))==-1){
                        alert("Invalid E-mail ID")
                        return false
                    }
                   
                    if (str.indexOf(" ")!=-1){
                        alert("Invalid E-mail ID")
                        return false
                    }
           
                    return true                   
                }
                 
                  function login(){
                  if(document.loginform.email.value == ''){
                      alert("Please enter your email.");
                    document.loginform.email.focus()
                    return false
                  }
                  if (echeck(document.loginform.email.value)==false){
                    document.loginform.email.value=""
                    document.loginform.email.focus()
                    return false
                  }
                  if(document.loginform.password.value == ''){
                      alert("Please enter your password.");
                    document.loginform.password.focus()
                    return false
                  }
                 
                  return true
                  }
                  function forgot(){
                  if(document.forgotform.email.value == ''){
                      alert("Please enter your email.");
                    document.forgotform.email.focus()
                    return false
                  }
                  if (echeck(document.forgotform.email.value)==false){
                    document.forgotform.email.value=""
                    document.forgotform.email.focus()
                    return false
                  }
                                   
                  return true
                  }
                  function register(){
                  if(document.registerform.email.value == ''){
                      alert("Please enter your email.");
                    document.registerform.email.focus()
                    return false
                  }
                  if (echeck(document.registerform.email.value)==false){
                    document.registerform.email.value=""
                    document.registerform.email.focus()
                    return false
                  }
                  if(document.registerform.password.value == ''){
                      alert("Please enter your password.");
                    document.registerform.password.focus()
                    return false
                  }
                  if(document.registerform.rpassword.value == ''){
                      alert("Please enter your password again.");
                    document.registerform.rpassword.focus()
                    return false
                  }
                  if(document.registerform.rpassword.value != document.registerform.password.value){
                      alert("Please enter same password.");
                    document.registerform.rpassword.focus()
                    return false
                  }
                 
                  return true
                  }
                  </script>
                  <form action="<?php echo "$script_url/?$qs"; ?>" method="post" name="loginform" onsubmit="return login();">
                    <tr>
                        <th colspan="2"><?php echo $lang['LOGIN']; ?>:<a name="contactform">&nbsp;</a>
                        </th>
                    </tr>
                    <tr><td colspan="2">&nbsp;</td></tr>
                    <?php
                    if($_REQUEST['loginerr']){
                    ?>
                    <tr><td colspan="2"><font color="#FF0000"><?php echo $lang['LOGIN_ERROR']; ?></font></td></tr>
                    <?php
                    }
                    ?>
                    <tr>
                        <td><?php echo $lang['YOUR_EMAIL']; ?>: <span class="marker">*</span></td>
                        <td>
                        <input type="text" size="30" name="email">
                        </td>
                    </tr>
                    <tr>
                        <td valign="top"><?php echo $lang['YOUR_PASSWORD']; ?>: <span class="marker">*</span></td>
                        <td>
                        <input type="password" size="30" name="password">
                        </td>
                    </tr>
                    <tr>
                       
                        <td colspan="2">
                        <input type="submit" value="<?php echo $lang['LOGIN_BUTTON']; ?>"><input type="hidden" name="mode" value="login" />
                        </td>
                    </tr>
                  </form>
                  <tr><td colspan="2">&nbsp;</td></tr>
                  <tr><td colspan="2">&nbsp;</td></tr>
                  <tr><td colspan="2">&nbsp;</td></tr>
                  <form action="<?php echo "$script_url/?$qs"; ?>" method="post" name="forgotform" onsubmit="return forgot();">
                    <tr>
                        <th colspan="2"><?php echo $lang['FORGOT']; ?>:<a name="contactform">&nbsp;</a>
                        </th>
                    </tr>
                    <tr><td colspan="2">&nbsp;</td></tr>
                    <?php
                    if($_REQUEST['forgoterr']){
                    ?>
                    <tr><td colspan="2"><font color="#FF0000"><?php echo $lang['FORGOT_ERROR']; ?></font></td></tr>
                    <?php
                    }
                    ?>
                    <?php
                    if($_REQUEST['forgotsucc']){
                    ?>
                    <tr><td colspan="2"><font color="#006600"><?php echo $lang['FORGOT_SUCCESS']; ?></font></td></tr>
                    <?php
                    }
                    ?>
                    <tr>
                        <td><?php echo $lang['YOUR_EMAIL']; ?>: <span class="marker">*</span></td>
                        <td>
                        <input type="text" size="30" name="email">
                        </td>
                    </tr>
                   
                    <tr>
                       
                        <td colspan="2">
                        <input type="submit" value="<?php echo $lang['FORGOT_BUTTON']; ?>"><input type="hidden" name="mode" value="forgot" />
                        </td>
                    </tr>
                  </form>
            </table>
        </td>
       
       
        <td width="50%" valign="top">
            <table width="100%">
                  <form action="<?php echo "$script_url/?$qs"; ?>" method="post" name="registerform" onsubmit="return register();">
                    <tr>
                        <th colspan="2"><?php echo $lang['REGISTER']; ?>:<a name="contactform">&nbsp;</a>
                        </th>
                    </tr>
                    <tr><td colspan="2">&nbsp;</td></tr>
                    <?php
                    if($_REQUEST['registererr']){
                    ?>
                    <tr><td colspan="2"><font color="#FF0000"><?php echo $lang['REGISTER_ERROR']; ?></font></td></tr>
                    <?php
                    }
                    ?>
                    <tr>
                        <td><?php echo $lang['YOUR_EMAIL']; ?>: <span class="marker">*</span></td>
                        <td>
                        <input type="text" size="30" name="email">
                        </td>
                    </tr>
                    <tr>
                        <td valign="top"><?php echo $lang['YOUR_PASSWORD']; ?>: <span class="marker">*</span></td>
                        <td>
                        <input type="password" size="30" name="password">
                        </td>
                    </tr>
                    <tr>
                        <td valign="top"><?php echo $lang['RETYPE_YOUR_PASSWORD']; ?>: <span class="marker">*</span></td>
                        <td>
                        <input type="password" size="30" name="rpassword">
                        </td>
                    </tr>
                    <tr>
                       
                        <td colspan="2">
                        <input type="submit" value="<?php echo $lang['REGISTER_BUTTON']; ?>"><input type="hidden" name="mode" value="register" />
                        </td>
                    </tr>
                  </form>
            </table>
        </td>
    </tr>
   
   
   
   
   
</table>


<?php } ?>
-------


Jeg vil gerne at webside admins email (admin@webside.dk) faa et kopi at alle email kommer from kontak boksen

Paa forhaand Tak
Avatar billede repox Seniormester
14. juli 2010 - 10:12 #1
Sæt denne linie:
mail("admin@webside.dk", $subject, $message, $headers);

lige under
mail($to, $subject, $message, $headers);
Avatar billede shoofixmafi Nybegynder
14. juli 2010 - 10:19 #2
tak
men jeg har brugt en anden kopi af filen
give mig lige en loesning til denne fil

-------
<?php


require_once("initvars.inc.php");
require_once("config.inc.php");

if($image_verification)
{
    require_once("captcha.cls.php");
    $captcha = new captcha();
}

$msg = "";
$err = "";

?>

<?php

if (!$_GET['adid'])
{
    header("Location: $script_url/?view=main&cityid=$xcityid&lang=$xlang");
    exit;
}


$adtable = ($_GET['view'] == "showevent") ? $t_events : $t_ads;
$adid_prefix = (($xview == "events") ? "E" : "A");
$full_adid = ($adid_prefix . $xadid);
$reported = explode(";", $_COOKIE["reported"]);
$is_reported = in_array($full_adid, $reported);

// Make up search query
$qsA = $_GET; $qs = "";
unset($qsA['do'], $qsA['reported'], $qsA['mailed'], $qsA['mailerr'], $qsA['msg'], $qsA['err']);
foreach ($qsA as $k=>$v) $qs .= "$k=$v&";

if ($_GET['do'] == "reportabuse")
{
    if (!$is_reported) {

        /* Begin Version 5.0 */
        $sql = "UPDATE $adtable
                SET abused = abused + 1
                WHERE adid = $_GET[adid]
                    AND abused < " . ($spam_indicator - 1);
        /* End Version 5.0 */
        mysql_query($sql) or die($sql);
   
        if(mysql_affected_rows())
        {
            echo "<div class=\"msg\">$lang[MESSAGE_ABUSE_REPORT]</div>";
           
            if($max_abuse_reports)
            {
                /* Begin Version 5.0 */
                $sql = "UPDATE $adtable
                        SET enabled = '0'
                        WHERE adid = $_GET[adid]
                            AND abused >= $max_abuse_reports";
                mysql_query($sql);
                /* End Version 5.0 */
            }
   
            header("Location: $script_url/?{$qs}reported=y");
            exit;
        }
    }

    unset($_GET['do']);
}


if ($xview == "showevent")
{
    // Get the event
    $sql = "SELECT a.*, UNIX_TIMESTAMP(a.timestamp) AS timestamp, UNIX_TIMESTAMP(a.createdon) AS createdon, UNIX_TIMESTAMP(a.expireson) AS expireson, UNIX_TIMESTAMP(feat.featuredtill) AS featuredtill,
            UNIX_TIMESTAMP(a.starton) AS starton, UNIX_TIMESTAMP(a.endon) AS endon
        FROM $t_events a
            LEFT OUTER JOIN $t_featured feat ON a.adid = feat.adid AND feat.adtype = 'E'
        WHERE a.adid = $xadid
            AND $visibility_condn_admin";
    $ad = mysql_fetch_array(mysql_query($sql));

    $isevent = 1;

    /* Begin Version 5.0 */
    $thisurl = buildURL($xview, array($xcityid, $xdate, $xadid, $ad['adtitle']));
    /* End Version 5.0 */

}
else
{
    // List of extra fields
    $xfieldsql = "";
    if(count($xsubcatfields))
    {
        for($i=1; $i<=$xfields_count; $i++)    $xfieldsql .= ", axf.f$i";
    }

    // Get the ad
    $sql = "SELECT a.*, ct.cityname as cityname, UNIX_TIMESTAMP(a.timestamp) AS timestamp, UNIX_TIMESTAMP(a.createdon) AS createdon, UNIX_TIMESTAMP(a.expireson) AS expireson, UNIX_TIMESTAMP(feat.featuredtill) AS featuredtill $xfieldsql
            FROM $t_ads a
                INNER JOIN $t_subcats scat ON scat.subcatid = a.subcatid
                INNER JOIN $t_cities ct ON a.cityid = ct.cityid
                LEFT OUTER JOIN $t_adxfields axf ON a.adid = axf.adid
                LEFT OUTER JOIN $t_featured feat ON a.adid = feat.adid AND feat.adtype = 'A'
            WHERE a.adid = $xadid
                AND $visibility_condn_admin";
    $ad = mysql_fetch_array(mysql_query($sql));

    $isevent = 0;
    /* Begin Version 5.0 */
    $thisurl = buildURL($xview, array($xcityid, $xcatid, $xcatname, $xsubcatid, $xsubcatname,
        $xadid, $ad['adtitle']));
    /* End Version 5.0 */

}


if (!$ad)
{
    /* Begin Version 5.0 */
    header("Location: $script_url/index.php?view=post404&cityid=$xcityid&lang=$xlang");
    /* End Version 5.0 */
    exit;
}


if ($_POST['email'] && $_POST['mail'] && $ad['showemail'] == EMAIL_USEFORM)
{
    $err = "";
   
    if ($image_verification && !$captcha->verify($_POST['captcha']))
    {
        $err .= $lang['ERROR_IMAGE_VERIFICATION_FAILED'] . "<br>";
    }
    if (!ValidateEmail($_POST['email']))
    {
        $err .= $lang['ERROR_INVALID_EMAIL'] . "<br>";
    }

    if (preg_match("/[\\000-\\037]/", $_POST['email']))
    {
        handle_security_attack("@");
    }
    else if (!$err)
    {
        $thismail_header = file_get_contents("mailtemplates/contact_header.txt");
        $thismail_header = str_replace("{@SITENAME}", $site_name, $thismail_header);
        $thismail_header = str_replace("{@ADTITLE}", $ad['adtitle'], $thismail_header);
        $thismail_header = str_replace("{@ADURL}", "{$script_url}/{$thisurl}", $thismail_header);
        $thismail_header = str_replace("{@FROM}", $_POST['email'], $thismail_header);

        $thismail_footer = file_get_contents("mailtemplates/contact_footer.txt");
        $thismail_footer = str_replace("{@SITENAME}", $site_name, $thismail_footer);
        $thismail_footer = str_replace("{@ADTITLE}", $ad['adtitle'], $thismail_footer);
        $thismail_footer = str_replace("{@ADURL}", "{$script_url}/{$thisurl}", $thismail_footer);
        $thismail_footer = str_replace("{@FROM}", $_POST['email'], $thismail_footer);

        $msg = $thismail_header . "\n" .
                stripslashes($_POST['mail']) . "\n" .
                $thismail_footer;       
        /* Begin Version 5.1 - Send mail using SMTP */
        $xtraheaders = array("Reply-To: " . $_POST['email']);

        $mailerr = sendMail($ad['email'], $lang['MAILSUBJECT_CONTACT_FORM'], $msg,
            $site_email, $langx['charset'], "attach", $xtraheaders);
        /* End Version 5.1 - Send mail using SMTP */
       
        if ($mailerr)
        {
            $mailresult = "n";
            if ($mailerr == "FAILED") $mailerr = "";
        }
        else
        {
            $mailresult = "y";
        }

        header("Location: $script_url/?$qs&mailed=$mailresult&mailerr=$mailerr");
        exit;
    }

}

$sql = "SELECT *
        FROM $t_adpics p
        WHERE p.adid = $xadid
            AND isevent = '$isevent'";
$pres = mysql_query($sql);


?>


<script language="javascript">
function confirmAbuseReport()
{
    if (confirm('<?php echo addslashes($lang['REPORT_ABUSE_CONFIRM']); ?>'))
    {
        /* Begin Version 5.0 */
        eval("location.href = '?' + '<?php echo $qs; ?>' + 'do=reportabuse'");
        /* End Version 5.0 */
    }
}
</script>


<?php

if ($_GET['reported']) {
    $reported[] = $full_adid;
    setcookie("reported", implode(";", $reported), time()+90*24*60*60, "/");
    $is_reported = true;
}

?>


<?php

if(!$_POST['mail'])
{
    if($_GET['mailed'] == "y")        { $msg .= $lang['MESSAGE_MAIL_SENT']."<br>"; }
    elseif ($_GET['mailed'] == "n")    { $err .= $lang['ERROR_MAIL_NOT_SENT']."<br>".$_GET['mailerr']."<br>"; }

    if($_GET['reported'] == "y")    { $msg .= $lang['MESSAGE_ABUSE_REPORT']."<br>"; }
}

if($_GET['msg'])                { $msg .= nl2br(htmlentities($_GET['msg']))."<br>"; }
if($_GET['err'])                { $err .= nl2br(htmlentities($_GET['err']))."<br>"; }

?>

<?php

if($err) echo "<div class=\"err\">$err</div>";
if($msg) echo "<div class=\"msg\">$msg</div>";

?>

<?php if($ad['featuredtill'] && $ad['featuredtill'] > time()) { ?>
<div class="msg">
<img src="images/featured.gif" align="absmiddle">
<b><?php echo $lang['THIS_AD_IS_FEATURED']; ?></b>
</div>
<?php } ?>

<table class="postheader" width="100%"> <!-- Version 5.0 -->
<tr>
<td>

<div align="right">
<!-- Begin Version 5.0 -->
<?php if(!$is_reported) { ?><a href="java script:confirmAbuseReport();"><?php echo $lang['REPORT_ABUSE']; ?></a> | <?php } ?>
<a href="?view=mailad&cityid=<?php echo $xcityid; ?>&adid=<?php echo $xadid; ?>&adtype=<?php echo $xadtype; ?><?php if($xdate) echo "&date={$xdate}"; ?>"><?php echo $lang['EMAIL_THIS_AD_LINK']; ?></a>

<?php if(!$debug) { ?>
&nbsp;&nbsp;

<script type="text/javascript">var addthis_pub="4a1806ae49a62752";</script>
<a href="http://www.addthis.com/bookmark.php?v=20" onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()" style="text-decoration:none;"><img src="http://s7.addthis.com/static/btn/sm-plus.gif" width="16" height="16" alt="Bookmark and Share" style="border:0; align:middle;"/> Share</a>

<?php } ?>

<!-- End Version 5.0 -->
</div>
<?php echo $lang['POST_ID']; ?> <?php echo ($xview=="showevent"?"E":"A"); ?><?php echo $ad['adid']; ?><br><br>
<?php
if ($xview == "showevent")
{
?>
    <b><?php echo date("d", $ad['starton'])." ".$langx['months_short'][date("n", $ad['starton'])-1] . ", " . date("y", $ad['starton']); ?>
    <?php if($ad['starton'] != $ad['endon']) echo " - " . date("d", $ad['endon']) . " " . $langx['months_short'][date("n", $ad['endon'])-1] . ", " . date("y", $ad['endon']); ?></b>
    <br>

<?php
}
?>

<div class="posttitle"> <!-- Version 5.0 -->
<?php echo $ad['adtitle']; ?>
<?php
$loc = "";
if($ad['area']) $loc = $ad['area'];
if($xcityid < 0) $loc .= ($loc ? ", " : "") . $ad['cityname'];
if($loc) echo " <span class=\"adarea\">($loc)</span>";
?>
</div><br>

<b><?php echo $lang['AD_DATE']; ?></b>:
<?php echo QuickDate($ad['createdon']); ?>
<br>

<?php if($ad['createdon'] != $ad['timestamp']) { ?>
<b><?php echo $lang['AD_LAST_UPDATE']; ?></b>:
<?php echo QuickDate($ad['timestamp']); ?>
<br>
<?php } ?>

<b><?php echo $lang['AD_EXPIRES_ON']; ?></b>:
<?php echo QuickDate($ad['expireson']); ?>
<br>

<b><?php echo $lang['REPLY_TO']; ?></b>:
<?php if ($ad['showemail'] == EMAIL_SHOW) { ?>
    <a href="mailto:<?php echo $ad['email']; ?>"><?php echo $ad['email']; ?></a>

<?php } elseif ($ad['showemail'] == EMAIL_USEFORM) { ?>
    <i><?php echo $lang['USE_CONTACT_FORM']; ?></i>

<?php } else { ?>
    <i><?php echo $lang['EMAIL_NOT_SHOWN']; ?></i>

<?php } ?>
<br>

</td>
</tr>
</table>

<?php
if(($xsubcathasprice && $ad['price']) || count($xsubcatfields))
{
    /* Begin Version 5.0 */
    $actualfields = $xsubcathasprice ? 1 : 0;
?>
<div>
<table>

<?php if($xsubcathasprice) { ?><tr><td><b><?php echo $xsubcatpricelabel; ?></b></td><td>: <?php if(($xsubcathasprice && $ad['price'] != 0.00)) { ?><?php echo $currency . $ad['price']; ?><?php } else { echo $lang['AD_PRICE_NOT_PROVIDED']; } ?></td></tr><?php } ?>

<?php if(count($xsubcatfields)) { foreach ($xsubcatfields as $fldnum=>$fld) { if(($fld['TYPE'] == "N" && $ad["f$fldnum"] > 0) || ($fld['TYPE'] != "N" && $ad["f$fldnum"])) { $actualfields++; ?>
<tr><td><b><?php echo $fld['NAME']; ?></b></td><td>: <?php echo $ad["f$fldnum"]; ?></td></tr>
<?php }}} ?>
</table></div>
<?php if ($actualfields) { ?>
<div style="border-bottom:1px solid #E0E0E0;">&nbsp;</div>
<?php } ?>
<?php
    /* End Version 5.0 */
}
?>

<table class="post" width="100%"><tr><td> <!-- Version 5.0 -->

<!-- Begin Version 5.0 -->
<?php echo generateHtml($ad['addesc'], $ad['createdon']); ?>
<!-- End Version 5.0 -->

</td></tr></table>

<?php

if (@mysql_num_rows($pres))
{
    $i = 0;
?>

    <table class="postpics" width="100%"><tr><td> <!-- Version 5.0 -->

<?php
    while ($row = mysql_fetch_array($pres))
    {
        $i++;

        $imgsize = GetThumbnailSize("{$datadir[adpics]}/{$row[picfile]}", $images_max_width, $images_max_height);

?>

        <img src="<?php echo "{$datadir[adpics]}/{$row[picfile]}"; ?>" id="adimg<?php echo $i; ?>" width="<?php echo $imgsize[0]; ?>" height="<?php echo $imgsize[1]; ?>"><br><br>

<?php
    }
?>

    </td></tr></table>

<?php

    $imgcnt = $i;

}
?>

<?php
if($ad['othercontactok']) echo "<p class=\"disclosure_yes\">$lang[COMMERCIAL_CONTACT_OK]</p>";
else echo "<p class=\"disclosure_no\">$lang[COMMERCIAL_CONTACT_NOT_OK]</p>";
?>


<?php
$hits = $ad['hits'];
$already_hit = explode(";", $_COOKIE["hits"]);
if (!in_array($full_adid, $already_hit)) {
    $sql = "update $adtable set hits = hits + 1, timestamp = timestamp where adid = $xadid";
    mysql_query($sql);
    $already_hit[] = $full_adid;
    setcookie("hits", implode(";", $already_hit), 0, "/");
    $hits++;
}
?>


<!-- Begin Version 5.0 -->
<?php if (!$debug) { ?>
<div style="float:left;">

<script type="text/javascript">var addthis_pub="4a1806ae49a62752";</script>
<a href="http://www.addthis.com/bookmark.php?v=20" onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()" style="text-decoration:none;"><img src="http://s7.addthis.com/static/btn/sm-plus.gif" width="16" height="16" alt="Bookmark and Share" style="border:0; align:middle;"/> Share</a>

<script type="text/javascript" src="http://s7.addthis.com/js/200/addthis_widget.js"></script>

</div>
<?php } ?>
<div class="hits"><?php echo $hits; ?> hits<br><br></div>
<br style="clear:both">
<!-- End Version 5.0 -->


<?php if ($ad['showemail'] == EMAIL_USEFORM) {

/*$qs = ""; $qsA = $_GET; unset($qsA['syndicate']);
foreach ($qsA as $k=>$v) $qs .= "$k=$v&";*/

?>

    <form action="<?php echo "$script_url/?$qs"; ?>" method="post" enctype="multipart/form-data">
    <table class="contactform">
    <tr>
        <th colspan="2"><?php echo $lang['CONTACT_USER']; ?>:<a name="contactform">&nbsp;</a>
</th>
    </tr>
    <tr><td colspan="2">&nbsp;</td></tr>
    <tr>
        <td><?php echo $lang['YOUR_EMAIL']; ?>: <span class="marker">*</span></td>
        <td>
        <input type="text" size="65" name="email">
        </td>
    </tr>
    <tr>
        <td valign="top"><?php echo $lang['YOUR_MESSAGE']; ?>: <span class="marker">*</span></td>
        <td>
        <textarea cols="64" rows="10" name="mail"></textarea>
        </td>
    </tr>
    <tr>
        <td valign="top"><?php echo $lang['ATTACHMENT']; ?>:</td>
        <td>
        <input type="file" size="55" name="attach"><br>
        <span class="hint"><?php echo $lang['UNSUPPORTED_ATTACHEMNTS']; ?>: <?php echo implode(", ", $contactmail_attach_wrongfiles); ?><br>
        <?php echo $lang['MAX_ATTACHMENT_SIZE']; ?>: <?php echo $contactmail_attach_maxsize; ?>KB</span>
        </td>
    </tr>

    <?php
    if($image_verification)
    {
    ?>

        <tr>
            <td valign="top"><?php echo $lang['POST_VERIFY_IMAGE']; ?>: <span class="marker">*</span></td>
            <td>
            <img src="captcha.png.php?<?php echo rand(0,999); ?>"><br>
            <span class="hint"><?php echo $lang['POST_VERIFY_IMAGE_HINT']; ?></span><br>
            <input type="text" name="captcha" value="">
            </td>
        </tr>

    <?php
    }
    ?>

    <tr>
        <td>&nbsp;</td>
        <td><button type="submit"><?php echo $lang['BUTTON_SEND_MAIL']; ?></button></td>
    </tr>
    </table>
    </form>

<?php } ?>

-------
Avatar billede shoofixmafi Nybegynder
14. juli 2010 - 10:31 #3
send ig lige et svar
du fortjener points

og hvis du gider loeser den anden kopi af filen
er jeg meget taknemlig
Avatar billede repox Seniormester
14. juli 2010 - 11:15 #4
Du skulle kunne gøre noget ala:
sendMail("admin@website.dk", $lang['MAILSUBJECT_CONTACT_FORM'], $msg, $site_email, $langx['charset'], "attach", $xtraheaders);


lige under
$mailerr = sendMail($ad['email'], $lang['MAILSUBJECT_CONTACT_FORM'], $msg,
            $site_email, $langx['charset'], "attach", $xtraheaders);
Avatar billede shoofixmafi Nybegynder
27. juli 2010 - 08:39 #5
tak
smid lige et svar
Avatar billede repox Seniormester
27. juli 2010 - 12:16 #6
Det fik du her
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester