ƣDiscuz7ͨ
ߣ...
ַhttp://forum.imrobots.cn/

ϵʽpr6@qq.com(935217418)

ܣ

Discuz̳Ų
һŷע


˲⣬ϵQQ: 935217418˲ѷģ

------------------------------------------------------------

װ
װ֮ǰȰļݣ

\include\common.inc.php
\templates\default\register.htm
\templates\default\messages.lang.php
\templates\default\templates.lang.php

Ȼuploadڵļϴ̳Ŀ¼ǣһinstall.phpɣ

װɺ¼Աʺŵ̳ϵͳ-ȫ-עʿƣѡֻעȻύ
ǰ̨עطԿлȡӣԼֻżɻ̳ע롣

עطûлȡ\forumdata\templates\Ŀ¼µļˢעҳ

װɺҪ\include\common.inc.phpļеĶƽ̨ʺźͶƽ̨滻IMͨƽ̨עʺź롣

ɾ
֮ǰݵļļϴ̳Ŀ¼Ӧļɡ
Ȼļɾ

getinvitecode.php
\templates\default\getinvitecode.htm

ļ޸ĵĵط(Լ̳޸ĹĵطȲԭʼ汾ô԰ķԼֶӴ)
\include\common.inc.php ļ

//ֻ
function ismobile($mobile)
{
	return strlen($mobile) == 11 && (preg_match("/^13\d{9}$/", $mobile) || preg_match("/^15\d{9}$/", $mobile) || preg_match("/^18\d{9}$/", $mobile) || preg_match("/^0\d{10}$/", $mobile));
}

//Ͷ
function sendsms($mobile, $content)
{
	if(!ismobile($mobile)) {
		showmessage('mobile_invalid');
	}
	elseif(empty($content)) {
		showmessage('content_invalid');
	}
	elseif(mb_strlen($content,"gbk") > 70) {
		showmessage('content_invalid');
	}
	else
	{
		//Ϣ
		$smsapi = "a1.imrobots.cn"; //
		$charset = "gbk";			//ļ
		$username = "demo";			//ƽ̨ʺ
		$password = "demo";			//ƽ̨

		//͵ַ
		$sendurl = "http://".$smsapi."/".$charset."/interface/send_sms.aspx?username=".$username."&password=".$password."&receiver=".$mobile."&content=".urlencode($content)."";

		$result = file_get_contents($sendurl);

		$xml = simplexml_load_string($result);

		if ($xml->result > 0)
		{
			return true;
		}
		else
		{
			return false;
		}
	}
}

\templates\default\register.htm



<!--{if $regstatus == 2}--> *



<a href="getinvitecode.php?action=sendinvitecode" onclick="floatwin('open_getinvitecode', this.href, 250, 150);return false;">{lang get_invite_code}</a>

\templates\default\messages.lang.php



'msn_binding_succeed' => 'ѳɹ/ MSN ˺ţ',



'mobile_invalid' => 'ֻŲȷ뷵޸ġ',
'ajax_mobile_invalid' => 'ֻŲȷ',

'content_invalid' => 'ݲΪҲܳ70ַ뷵޸ġ',
'ajax_content_invalid' => 'ݲΪҲܳ70ַ',

'mobile_count_invalid' => 'ֻŸ500뷵޸ġ',
'ajax_mobile_count_invalid' => 'ֻŸ500',

'sendsms_succeed' => 'ŷͳɹעա',
'ajax_sendsms_succeed' => 'ŷͳɹ',

'sendsms_invalid' => 'ŷʧܣԺԡ',
'ajax_sendsms_invalid' => 'ŷʧܡ',

'invitecode_invalid' => '벻㣬ϵԱ',
'ajax_invitecode_invalid' => '벻㣬ϵԱ',

'mobile_exists' => 'һֻܷһ룬뷵޸ġ',
'ajax_mobile_exists' => 'һֻܷһ롣',

\templates\default\templates.lang.php



'upload_msg' => '$swfattach[filenametitle] {LF}ϴ: $swfattach[dateline] {LF}ļС: $swfattach[filesize]',



'get_invite_code' => 'ȡ',
'getinvitecode' => '',
'getinvitecode_your_mobile' => 'ֻ',