当前位置: 首页>>代码示例>>PHP>>正文


PHP emailer::email_init方法代码示例

本文整理汇总了PHP中emailer::email_init方法的典型用法代码示例。如果您正苦于以下问题:PHP emailer::email_init方法的具体用法?PHP emailer::email_init怎么用?PHP emailer::email_init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在emailer的用法示例。


在下文中一共展示了emailer::email_init方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: myquery

                 if ($check != false and mysql_num_rows($check) > 0) {
                     $chat_mess = '<br><center>Для тебя пришло новое личное сообщение (тема: <font color=#0000FF>' . $theme . '</font>) от игрока <font size=2 color=#FF0000><b><u>' . $name . '</u></b></font> !&nbsp;&nbsp;&nbsp;&nbsp;</center><br>';
                     $say = myquery("insert into game_log (town,fromm,too,message,date,pm_id,ptype) values ('0',0,'{$userid}','" . iconv("Windows-1251", "UTF-8//IGNORE", $chat_mess) . "','" . time() . "'," . $id_pm . ",1)");
                 }
                 echo 'Сообщение игроку <b><font color=red>' . $komu[$i] . '</font></b> отправлено<br>';
                 list($send_pm_email, $email_komu, $send_ICQ, $ICQnumber, $ICQ_pm) = mysql_fetch_array(myquery("SELECT send_pm,email,send_ICQ,ICQnumber,ICQ_pm FROM game_users_data WHERE user_id={$userid}"));
                 if ($send_pm_email == 1) {
                     include "{$dirclass}/class_email.php";
                     $otkogo = $char['name'];
                     $message = "[http://" . domain_name . "] Средиземье :: Эпоха сражений. Письмо от {$otkogo}\n\n";
                     $message .= "Тема: {$theme}\n";
                     $message .= "Дата: " . date("H-i d-m-Y") . "\n";
                     $message .= "Содержание: \n{$post}\n";
                     $subject = 'Средиземье :: Эпоха сражений. Письмо от ' . $otkogo . '.';
                     $e_mail = new emailer();
                     $e_mail->email_init();
                     $e_mail->to = $email_komu;
                     $e_mail->subject = $subject;
                     $e_mail->message = $message;
                     $e_mail->send_mail();
                 }
             } else {
                 echo 'Игрока <b><font color=red>' . $komu[$i] . '</font></b> не существует!<br>';
             }
         }
     }
     echo '<meta http-equiv="refresh" content="3;url=act.php?func=pm&new">';
 } else {
     //Пишем письмо
     if (!isset($_GET['komu'])) {
         echo '<div id="content" onclick="hideSuggestions();">';
开发者ID:themiddleearth,项目名称:RPG.SU,代码行数:31,代码来源:pm.php

示例2: EndRegistration


//.........这里部分代码省略.........
        $exp1 = $row["exp"];
        $invite = 0;
        if (isset($uid) and $uid != '') {
            $uid = (int) $uid;
            $u = myquery("SELECT name FROM game_users WHERE user_id='{$uid}'");
            if (!mysql_num_rows($u)) {
                $u = myquery("SELECT name FROM game_users_archive WHERE user_id='{$uid}'");
            }
            $sel = myquery("SELECT host FROM game_users_active WHERE user_id='{$uid}'");
            if ($sel != false and mysql_num_rows($sel) > 0) {
                $host_p = mysql_result($sel, 0, 0);
            } else {
                $host_p = "";
            }
            list($name_p) = mysql_fetch_array($u);
            $user_host_p = HostIdentify();
            if ($uid > 0 and $user_host_p != $host_p) {
                $gp1 = $row["gp"] + 100;
                $invite = 1;
            } else {
                $gp1 = $row["gp"];
            }
        } else {
            $gp1 = $row["gp"];
        }
        $str1 = $row["str"];
        $ntl1 = $row["ntl"];
        $pie1 = $row["pie"];
        $vit1 = $row["vit"];
        $dex1 = $row["dex"];
        $spd1 = $row["spd"];
        //$lucky1=$row["lucky"];
        //$vospr1=$row["vospr"];
        //$magic_res1=$row["magic_res"];
        $avatar = $row["race"];
        $start_map_name = $row["map_name"];
        $start_map_x = $row["map_x"];
        $start_map_y = $row["map_y"];
        $avatar = $avatar . '_' . $sex . '.gif';
        $user_pass = generate_password(10);
        $result = myquery("\n\t\t\tINSERT game_users SET\n\t\t\tuser_name='{$user_name}',\n\t\t\tuser_pass='" . md5($user_pass) . "',\n\t\t\tname='{$name}',\n\t\t\tHP='{$hp1}',\n\t\t\tHP_MAX='{$hp_max1}',\n\t\t\tHP_MAXX='{$hp_max1}',\n\t\t\tMP='{$mp1}',\n\t\t\tMP_MAX='{$mp_max1}',\n\t\t\tSTM='{$stm1}',\n\t\t\tSTM_MAX='{$stm_max1}',\n\t\t\tEXP='{$exp1}',\n\t\t\tGP='{$gp1}',\n\t\t\tSTR='{$str1}',\n\t\t\tNTL='{$ntl1}',\n\t\t\tPIE='{$pie1}',\n\t\t\tVIT='{$vit1}',\n\t\t\tDEX='{$dex1}',\n\t\t\tSPD='{$spd1}',\n\t\t\tSTR_MAX='{$str1}',\n\t\t\tNTL_MAX='{$ntl1}',\n\t\t\tPIE_MAX='{$pie1}',\n\t\t\tVIT_MAX='{$vit1}',\n\t\t\tDEX_MAX='{$dex1}',\n\t\t\tSPD_MAX='{$spd1}',\n\t\t\tCW='" . $gp1 * money_weight . "',\n\t\t\tCC=40,\n\t\t\trace=" . $row['id'] . ",\n\t\t\tavatar='{$avatar}'\n\t\t\t") or die('Database Error: ' . mysql_error() . '<br>');
        $newuserid = mysql_insert_id();
        setGP($newuserid, $gp1, 4);
        if ($invite == 1) {
            myquery("INSERT INTO game_invite (user_id,invite_id,invite_regtime) VALUES ({$uid},{$newuserid}," . time() . ")");
        }
        //lucky='$lucky1',
        //lucky_max='$lucky1',
        //vospr='$vospr1',
        //vospr_max='$vospr1',
        //magic_res='$magic_res1',
        //magic_res_max='$magic_res1',
        //$result = myquery("DELETE FROM game_users_reg WHERE user_name = '$user_name'");
        $sel_uid = myquery("SELECT user_id FROM game_users WHERE user_name='{$user_name}'");
        list($uid) = mysql_fetch_array($sel_uid);
        $result = myquery("\n\t\t\tINSERT game_users_map SET\n\t\t\tuser_id='{$uid}',\n\t\t\tmap_name='{$start_map_name}',\n\t\t\tmap_xpos='{$start_map_x}',\n\t\t\tmap_ypos='{$start_map_y}'\n\t\t\t") or die('Database Error: ' . mysql_error() . '<br>');
        $result = myquery("\n\t\t\tINSERT game_users_data SET\n\t\t\tuser_id='{$uid}',\n\t\t\temail='{$email}',\n\t\t\tstatus='{$status}',\n\t\t\tgorod='{$gorod}',\n\t\t\thobbi='{$hobbi}',\n\t\t\tinfo='{$info}',\n\t\t\tdr_date='{$dn}',\n\t\t\tdr_month='{$ms}',\n\t\t\tdr_year='{$god}',\n\t\t\tsex='{$sex}',\n\t\t\trego_time='{$user_time}'\n\t\t\t") or die('Database Error: ' . mysql_error() . '<br>');
        myquery("INSERT INTO game_users_active (user_id,host,last_active) VALUES ('{$uid}','" . HostIdentify() . "','')");
        myquery("INSERT INTO game_users_active_host (user_id,host_more) VALUES ('{$uid}','" . HostIdentifyMore() . "')");
        myquery("INSERT INTO game_chat_option (user_id,ref,size,frame) VALUES ('{$uid}','1','13','250')");
        $message = "Привет, {$name}!\n\n";
        $message .= "Вы зарегистрировались в ролевой онлайн игре Средиземье :: Эпоха сражений\n\n";
        $message .= "Ваши данные:\n";
        $message .= "Логин: {$user_name}\n";
        $message .= "Пароль: {$user_pass}\n\n";
        $subject = 'Средиземье :: Эпоха сражений - ' . domain_name . '';
        $e_mail = new emailer();
        $e_mail->email_init();
        $e_mail->to = $email;
        $e_mail->subject = $subject;
        $e_mail->message = $message;
        $e_mail->send_mail();
        echo '<br>Спасибо за регистрацию<br><br>
		Теперь Вы можете войти в наш мир! <br>Пусть не за горами будет тот день, когда все Средиземье будет содрогаться от звука Вашего имени!<br>
			<br><br><a href="' . $_SERVER['PHP_SELF'] . '">На главную страницу</a>';
    } else {
        $error_msg = 'Ошибка: ' . $error_msg . '<br><br><a href="' . $_SERVER['PHP_SELF'] . '?option=register">Назад</a>';
        echo $error_msg;
    }
    echo '</td>
	<td  width="5" height="50" background="http://' . img_domain . '/nav/1_15.jpg"></td>
	</tr>
	<tr>
	<td width="5"><img src="http://' . img_domain . '/nav/1_19.jpg" width="5" height="8"></td>
	<td background="http://' . img_domain . '/nav/1_20.jpg"></td>
	<td><img src="http://' . img_domain . '/nav/1_22.jpg" width="7" height="8">
	</td>
	</tr>
	</table>
	</div>
	</td>
	<td width="10" background="http://' . img_domain . '/nav/333_17.jpg">&nbsp;</td>
	</tr>
	<tr>
	<td width="15"><img src="http://' . img_domain . '/nav/1_23.jpg" width="15" height="14"></td>
	<td colspan="3" background="http://' . img_domain . '/nav/1_25.jpg"></td>
	<td><img src="http://' . img_domain . '/nav/1_26.jpg" width="15" height="14"></td>
	</tr>
	</table>';
}
开发者ID:themiddleearth,项目名称:RPG.SU,代码行数:101,代码来源:index.php


注:本文中的emailer::email_init方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。