Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,028

HOME > PHP > PHP Forum > อยากทราบเรื่อง สคิปบล็อคเป็นคำพูด กับ เรื่อง กฏของการ send mail



 

อยากทราบเรื่อง สคิปบล็อคเป็นคำพูด กับ เรื่อง กฏของการ send mail

 



Topic : 027951



โพสกระทู้ ( 17 )
บทความ ( 0 )



สถานะออฟไลน์




เรื่องที่ 1. การบล็อคเป็นคำพูด เช่น GM เด็กเส้น ประมาณนี้ล่ะครับ
อยากได้แบบให้มันลิ้งค์ไปที่ text.txt

Code (PHP) เรื่องที่ 1.
<?php
<?php
iseedeadpeople();
switch (1) {
	default: 
	if ($webshop['credits']['namechg']<1) {
		print phrase_blocked_module;
		break;
	}
	if ($_POST['newname']) {
		require 'inc/function.checkstatus.php';
		$query	= mssql_query("select [AccountID] from [Character] where [Name]='".secure($_POST['character'])."'");
		$result	= mssql_fetch_row($query);
		if ($webshop['credits']['namechg']>$mycreds)
		{
			print phrase_lack_credits;
			break;
		}
		if ($result[0]!=$GLOBALS['mu_user'])
		{
			print 'That character does not belong to you!';
			break;
		}
		if (checkstatus($_POST['character']))
		{
			print phrase_offline_rq;
			break;
		}
		if (strlen($_POST['newname'])<2 || strlen($_POST['newname'])>10) 
		{
			print 'The new character name does not match the length specifications';
			break;
		}
		$query	= mssql_query("select [Name] from [Character] where [Name]='".secure($_POST['newname'])."'");
		$result	= mssql_fetch_row($query);
		if ($result[0])
		{
			print 'A character with that name already exists, please select another one';
			break;
		}
		mssql_query("exec XCredits '".$GLOBALS['mu_user']."', '".($webshop['credits']['namechg']*-1)."'");
		shoplog("The character <b>".htmlspecialchars($_POST['character'])."</b> changed his name to <b>".htmlspecialchars($_POST['newname'])."</b>");
		mssql_query("
		update [Character] set [Name]='".$_POST['newname']."' where [Name]='".$_POST['character']."';
		update [AccountCharacter] set [GameID1]='".$_POST['newname']."' where [GameID1]='".$_POST['character']."';
		update [AccountCharacter] set [GameID2]='".$_POST['newname']."' where [GameID2]='".$_POST['character']."';
		update [AccountCharacter] set [GameID3]='".$_POST['newname']."' where [GameID3]='".$_POST['character']."';
		update [AccountCharacter] set [GameID4]='".$_POST['newname']."' where [GameID4]='".$_POST['character']."';
		update [AccountCharacter] set [GameID5]='".$_POST['newname']."' where [GameID5]='".$_POST['character']."';
		update [AccountCharacter] set [GameIDC]='".$_POST['newname']."' where [GameIDC]='".$_POST['character']."';
		update [Guild] set [G_Master]='".$_POST['newname']."' where [G_Master]='".$_POST['character']."';
		update [GuildMember] set [Name]='".$_POST['newname']."' where [Name]='".$_POST['character']."';
		update [T_WaitFriend] set [FriendName]='".$_POST['newname']."' where [FriendName]='".$_POST['character']."';
		update [T_FriendMail] set [FriendName]='".$_POST['newname']."' where [FriendName]='".$_POST['character']."';
		update [T_FRIENDSHIP_STONE] set [CharName]='".$_POST['newname']."' where [CharName]='".$_POST['character']."';
		update [T_FriendMain] set [Name]='".$_POST['newname']."' where [Name]='".$_POST['character']."';
		update [T_CGuid] set [Name]='".$_POST['newname']."' where [Name]='".$_POST['character']."';
		update [OptionData] set [Name]='".$_POST['newname']."' where [Name]='".$_POST['character']."';  
		");
		print mssql_get_last_message();
		print "Your character name has been successfully changed";
	}
	print '<fieldset style="width: 300px"><legend class="mu_style2" style="padding: 0px;font-weight:bold;">Change a character name</legend><div>';
	print "<script type=\"text/javascript\">
function amisure() {
	if (document.getElementById('newname').value=='') {
		alert('Please enter the newname you desire');
		return false;
	}
	if (".$mycreds."<".$webshop['credits']['namechg'].") {
		alert('".phrase_lack_credits."');
		return false;
	}
	return webshop_confirm_action('Are you sure you want to change '+document.getElementById('character').value+'\'s name to '+document.getElementById('newname').value+'?');
}
</script>";
	$query	= mssql_query("select [Name] from [Character] where [AccountID]='".$GLOBALS['mu_user']."'");
	$mychars= '';
	while($char=mssql_fetch_array($query)) {
		$mychars.="<option class=\"clchg\" value=\"".htmlspecialchars($char['Name'])."\">".$char['Name']."</option>";
	}
	print '<form method="post" action="">
	<table width=100% border=0 cellpadding=2 cellspacing=3><tr><td>Character</td><td><select style="color: #000000;" id="character" name="character"><optgroup label="Select a character">'.$mychars.'</select></td></tr><tr><td>New name</td><td>
	<input type="text" name="newname" id="newname" maxlength="10" size="10"> (len: <b>2</b>-10)</td></tr>
<tr><td><b>'.$webshop['credits']['namechg'].'</b> credits</td><td><input onClick="return amisure();" type="Submit" value="Change"></td></tr></table>
';
	print '</fieldset></div><br><br>';

}
?>
?>



เรื่องที่ 2. เรากฏของการ send mail
ผมตั้งค่าให้ ผมส่งต้องพิมพ์จำนวน ตัวอักษรตามที่กำหนด
ถ้าไม่ผ่านให้กลับไปพิมพ์ใหม่แต่ปัญหาคือ มันไม่ผ่าน แต่ระบบยังทำการ send mail ต่อเหมือนปรกติ
มีวิธีแก้มั้ยครับ

Code (PHP) เรื่องที่ 2.
<?php
<?php
<?php
if(strlen($B)<9)
echo "<script>alert('กรุณากรอก .:เบอร์โทรศัพท์:. ของท่านด้วยนะค่ะ');history.back();</script>";
?>

<?
$emailto='อีเมล์ผู้รับ ';
$subject='หัวข้อ';
$header.= "Content-type: text/html; charset=windows-874\n"; 
$header.='ชื่อและอีเมลผู้ส่ง ';
$messages.= "ID : $sender
".$_SERVER["REMOTE_ADDR"]
;//ข้อความ 
$messages.= "Phone : $B
"; //ข้อความ 

mail($emailto,$subject,$messages);
if(!$send_mail)
{
echo"ส่งข้อความสำเร็จ กรุณารอจีเอ็มมาตรวจนะคะ";
}
else
{
echo "ส่งเมลล์สำเร็จ";
}
?>
?>

?>


ขอบคุณครับ



Tag : - - - -







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2009-06-03 21:12:23 By : maxmanaman View : 1012 Reply : 4
 

 

No. 1



โพสกระทู้ ( 33 )
บทความ ( 0 )



สถานะออฟไลน์


มาแก้ตรง send mail ให้ละกัน
Code (PHP)
<?php
if(strlen($B)<9){
echo "<script>alert('กรุณากรอก .:เบอร์โทรศัพท์:. ของท่านด้วยนะค่ะ');history.back();</script>";
exit();// เพิ่มตรงนี้ไปครับ
}
?>

<?
$emailto='อีเมล์ผู้รับ ';
$subject='หัวข้อ';
$header.= "Content-type: text/html; charset=windows-874\n"; 
$header.='ชื่อและอีเมลผู้ส่ง ';
$messages.= "ID : $sender
".$_SERVER["REMOTE_ADDR"]
;//ข้อความ 
$messages.= "Phone : $B
"; //ข้อความ 

mail($emailto,$subject,$messages);
if(!$send_mail)
{
echo"ส่งข้อความสำเร็จ กรุณารอจีเอ็มมาตรวจนะคะ";
}
else
{
echo "ส่งเมลล์สำเร็จ";
}
?>







Date : 2009-06-12 09:31:23 By : petro152
 


 

No. 2



โพสกระทู้ ( 519 )
บทความ ( 1 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์


ตรง บรรทัดที่ 20 นะ
ตัวแปร $send_mail เอาค่ามาจากไหนหว่า
แล้วทำไม if else เป็นส่งสำเร็จทั้งคู่หว่า

ควรเขียนอย่างนี้นะครับ
Code (PHP)
<?php
if(mail($emailto,$subject,$messages)){
    echo"ส่งข้อความสำเร็จ แล้วโว้ย";
}
else {
    echo"ส่งข้อความไม่สำเร็จ ส่งใหม่ อีกทีเด๊ะ";
}
?>

Date : 2009-06-12 11:05:27 By : nut_t02
 

 

No. 3



โพสกระทู้ ( 17 )
บทความ ( 0 )



สถานะออฟไลน์


ขอบคุณมากๆเลยครับ
Date : 2009-06-18 03:33:45 By : maxmanaman
 


 

No. 4



โพสกระทู้ ( 16 )
บทความ ( 0 )



สถานะออฟไลน์


ขอบคุณมากครับ
Date : 2009-06-20 00:51:26 By : yuttn
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : อยากทราบเรื่อง สคิปบล็อคเป็นคำพูด กับ เรื่อง กฏของการ send mail
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 04
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่