Jump to content
OrIaX

[HELP]Editare Templatemonster

Recommended Posts

Posted

am cumparat un template de pe TM pt ca vroiam full source dar se pare ca pe facut varza in afara de de am comandat mai am in plus in sursa zeci de poze aiurea si vreo 2 animatii

oricum pe alea le-am scos dar acum am nevoie de putin ajutor:

Vreau sa modific meniul sa scot din el un buton si e mai complicat decat pare + daca poate cineva sa imi spuna cum adaug mai usor pozele in el direct din flash sau il compilez si le adaug cu sothnik oricum cine ma poate ajuta redede repede cu asta raman dator iar el se alege cu sursa full de la site sau daca nu o vrea dupa ce termin proiectul o pun aici pt toata lumea

Multumesc,

Oriax

Posted

editarea template-ului am reusit-o in proportie de 90% era simplu .. doar trebuia putin timp pt a ma familiariza cu flash-ul (swish stiam deci nu a fost foarte greu ) intuitie si rabdare. Pana la urma nimic nu este greu daca iti doresti cu adevarat.

acum problema mea este una care nu tine de flash deci incerc sa va cer ajutorul

pe acest site este o rubrica de contact care are un form pt a trimite mesaje owner-ului am scriptul dar nu stiu ce trebuie sa configurez din el si care date le ia singur

exista in surse o pagina contact.php cu urmatorul cod:


<?php
//-----------------Getting data sent by flash---------------------
foreach ($_POST as $key => $value){

if ($key != 'mail_to' && $key != 'smtp_server' && $key != 'smtp_port' && $key != 'mail_from' && $key != 'mail_subject' && $key != 'plain_text'){

$mail_body .= '<b>'.str_replace('_',' ',$key).'</b>:<br/>';

$mail_body .= ''.stripslashes($value).'<br/>';
}
}
//-----------------------------------------------------------------



$message = '<html><body>'.$mail_body.'</body></html>'; // mail body

//------------if plain text is set to true removing html tags------
if ($_POST['plain_text']=='true') {

$message = str_replace('<br/>',"\r\n", $message);

$message = strip_tags($message);

//------------------------------------------------------------------
} else {
//----otherwise composing message headers---------------------------
$headers = 'MIME-Version: 1.0' . "\r\n";

$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
//------------------------------------------------------------------
}

//------------setting conf data-------------------------------------
$to = $_POST['mail_to'];

$from = $_POST['mail_from'];

$subject = $_POST['mail_subject'];

$smtp_server = $_POST['smtp_server'];

$smtp_port = $_POST['smtp_port'];
//------------------------------------------------------------------

//---------setting header info--------------------------------------
$headers .= 'To: '.$to. "\r\n";

$headers .= 'From: Site visitor ' .$from. "\r\n";
//------------------------------------------------------------------


if (mail($to, $subject, $message, $headers)){ // sending mail

print('&mail=1'); //succes

} else {

print('&mail=0');//failure

}

?>

si o pagina

contact.asp


<%
'----function that removes html tags-----------
Function RemoveHTML( strText )
Dim RegEx
Set RegEx = New RegExp
RegEx.Pattern = "<[^>]*>"
RegEx.Global = True
RemoveHTML = RegEx.Replace(strText, "")
End Function
'---------------------------------------------

'------defining script vars-------------------
Dim mailObj, mailCfg, myBody, fld

Dim RegEx
set RegEx = New RegExp
'--------------------------------------------

'------getting data sent by flash (filtering configuration data)------------
For Each fld in Request.Form
If Request.Form(fld) <> "" and _
fld <> "mail_to" and _
fld <> "smtp_server" and _
fld <> "smtp_port" and _
fld <> "plain_text" and _
fld <> "mail_from" and _
fld <> "mail_subject" Then
myBody = myBody & vbCRLF & " <b>" & fld & "</b> :<br/> " & Trim(Request.Form(fld)) & "<br/>"
End If
Next
'---------------------------------------------------------------------------

'----------setting conf data------------------------------------------------
On Error Resume Next
Set myMail = CreateObject("CDO.Message")
myMail.Subject = Request.Form("mail_subject")
myMail.From =Request.Form("mail_from")
myMail.To = Request.Form("mail_to")

'--------if plain text is set to true removing html---------------------------------------
if Request.Form("plain_text") = "true" then

myMail.TextBody = RemoveHTML(myBody)

'-------otherwise composing message body--------------------------------------------------
else myMail.HTMLBody = "<html><body>" & myBody & "</body></html>"

end if
'----------setting configuration params for smtp----------------------------------------------------------------------------------
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = Request.Form("smtp_server")
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = Request.Form("smtp_port")
myMail.Configuration.Fields.Update
'---------------------------------------------------------------------------------------------------------------------------------
myMail.Send '---------------sending message

If Err = 0 Then
Response.Write("&mail=1") 'if there the message is sent return 1 to flash
Else
Response.Write("&mail=0") 'otherwise return 0
End If

%>

ma poate ajuta cineva cu cateva sfaturi in directia buna?

Multumesc,

Oriax

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...