本文整理汇总了PHP中Activity::set_activity方法的典型用法代码示例。如果您正苦于以下问题:PHP Activity::set_activity方法的具体用法?PHP Activity::set_activity怎么用?PHP Activity::set_activity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Activity
的用法示例。
在下文中一共展示了Activity::set_activity方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: send_mail
public function send_mail($key)
{
##发送邮件
$activity = new Activity();
$activity->set_activity($this->get_order_data('activity_id'));
$user = User::instance();
$user->set_user_data($activity->get_activity_data('user_id'));
$activity_name = $activity->get_activity_data('name');
$email = new Email($activity_name[$this->get_lang()]);
$mail_data = array();
$mail_data['contact_name'] = $this->get_order_data('contact_name');
$mail_data['order_serial'] = $this->get_order_data('order_serial');
$mail_data['certificate_number'] = $this->get_certificate_number();
$company_name = json_decode($this->get_order_data('company_name'), true);
$mail_data['company_name'] = $company_name[$this->get_order_data('language')];
$order_url = 'http://' . $_SERVER['SERVER_NAME'] . '/?p=charge&activity=' . $activity->get_activity_data('activity_id') . '&order=' . $this->get_order_id() . '&lang=' . $this->get_lang() . '&certificate=' . $this->generate_url_code();
//返回网站网址
$res_url = array('zh' => "http://www.chatchina.com.cn/category/registration/?rel=", 'en' => 'http://en.chatchina.com.cn/category/registration/?rel=');
$mail_data['order_url'] = $res_url[$this->get_order_data('language')] . urlencode($order_url);
switch ($key) {
//发送联系人
case 'order_create_notify':
$email->send_template_mail($activity->get_activity_data($key), $mail_data, $this->get_order_data('contact_email'));
break;
//发送联系人
//发送联系人
case 'order_wait_approve_notify':
$email->send_template_mail($activity->get_activity_data($key), $mail_data, $this->get_order_data('contact_email'));
break;
//发送主办方
//发送主办方
case 'host_approve_notify':
$email->send_template_mail($activity->get_activity_data($key), $mail_data, $user->get_user_data('email'));
break;
//发送联系人
//发送联系人
case 'order_approved_notify':
$email->send_template_mail($activity->get_activity_data($key), $mail_data, $this->get_order_data('contact_email'));
break;
//发送联系人
//发送联系人
case 'order_success_notify_contact':
$email->send_template_mail($activity->get_activity_data($key), $mail_data, $this->get_order_data('contact_email'));
break;
//发送参会者
//发送参会者
case 'order_success_notify_attendee':
foreach ($this->attendees as $atd) {
$name = $atd->get_attendee_data('name');
$name = json_decode($name, true);
$name['en'] = json_decode($name['en'], true);
$mail_data['name_zh'] = $name['zh'];
$mail_data['name_en_firstname'] = $name['en']['firstname'];
$mail_data['name_en_lastname'] = $name['en']['lastname'];
$email->send_template_mail($activity->get_activity_data($key), $mail_data, $atd->get_attendee_data('email'));
}
break;
//发送主办方
//发送主办方
case 'order_success_notify_host':
$email->send_template_mail($activity->get_activity_data($key), $mail_data, $user->get_user_data('email'));
break;
default:
break;
}
}
示例2: Activity
<?php
session_start();
$activity = new Activity();
$activity->set_activity(1);
$_SESSION['activity'] = $activity;
$user = User::instance();
$login_ret = $user->login(array('username' => 'horwathhtl', 'password' => 'horwathhtl'));
if ($login_ret['r'] == 'ok') {
$user = $login_ret['msg'];
$_SESSION['manage_user'] = $user;
}
if (!isset($_SESSION['activity']) || !isset($_SESSION['manage_user'])) {
die("page error.");
}
$activity = $_SESSION['activity'];
$activity_id = $activity->get_activity_data('activity_id');
$user = $_SESSION['user'];
示例3: isset
<?php
session_start();
$lang = isset($_GET['lang']) && $_GET['lang'] == 'en' ? $_GET['lang'] : 'zh';
$channel = isset($_GET['channel']) && $_GET['channel'] != '' ? $_GET['channel'] : 'usual';
$view_data['lang'] = $lang;
$view_data['channel'] = $channel;
if (!isset($_GET['activity'])) {
die('Page error.');
}
if (!isset($booking_activity)) {
$activity_id = $_GET['activity'];
$view_data['activity_id'] = $activity_id;
global $booking_activity;
$booking_activity = new Activity();
$booking_activity->set_activity($activity_id);
}
include_once "order_form_text.php";
示例4: Activity
<?php
/*
* payment_receive.php
*
* 接收支付消息
*
* @author lidongxu @2014-5-29
*/
if (isset($_GET['activity']) && isset($_POST)) {
$activity = new Activity();
$activity->set_activity($_GET['activity']);
$activity->get_payment()->receive_result($_POST);
}