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


PHP Activity::set_activity方法代码示例

本文整理汇总了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;
     }
 }
开发者ID:WSKINGS,项目名称:chat_tickets,代码行数:66,代码来源:order.class.php

示例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'];
开发者ID:WSKINGS,项目名称:chat_tickets,代码行数:18,代码来源:manage_include.php

示例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";
开发者ID:WSKINGS,项目名称:chat_tickets,代码行数:18,代码来源:booking_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);
}
开发者ID:WSKINGS,项目名称:chat_tickets,代码行数:14,代码来源:payment_receive.php


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