smstemplate.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <?php
  2. /**
  3. * @copyright (c) 2011 aircheng.com
  4. * @file smstemplate.php
  5. * @brief 短信发送模板
  6. * @author chendeshan
  7. * @date 2014/8/11 9:51:51
  8. * @version 2.9
  9. */
  10. /**
  11. * @class smsTemplate
  12. * @brief 短信发送模板
  13. */
  14. class smsTemplate
  15. {
  16. //短信模板信息不存在
  17. public static function __callStatic($funcname, $arguments)
  18. {
  19. return "";
  20. }
  21. /**
  22. * @brief 订单发货的信息模板
  23. * @param array $data 替换的数据
  24. */
  25. public static function sendGoods($data = null)
  26. {
  27. $templateString = "您好{user_name},订单号:{order_no},已由{sendor}发货,物流公司:{delivery_company},物流单号:{delivery_no}";
  28. return strtr($templateString,$data);
  29. }
  30. /**
  31. * @brief 手机找回密码模板
  32. * @param array $data 替换的数据
  33. */
  34. public static function findPassword($data = null)
  35. {
  36. $templateString = "您的验证码为:{mobile_code},请注意保管!";
  37. return strtr($templateString,$data);
  38. }
  39. /**
  40. * @brief 手机短信校验码
  41. * @param array $data 替换的数据
  42. */
  43. public static function checkCode($data = null)
  44. {
  45. $templateString = "您的验证码为:{mobile_code},请注意保管!";
  46. return strtr($templateString,$data);
  47. }
  48. /**
  49. * @brief 自提点确认短信
  50. * @param array $data 替换的数据
  51. */
  52. public static function takeself($data = null)
  53. {
  54. $templateString = "您的订单号:{orderNo},{name}自提地址:{address},领取验证码:{mobile_code},请尽快领取";
  55. return strtr($templateString,$data);
  56. }
  57. /**
  58. * @brief 商户注册提示管理员
  59. * @param array $data 替换的数据
  60. */
  61. public static function sellerReg($data = null)
  62. {
  63. $templateString = "{true_name},申请加盟到平台,请尽快登录后台进行处理";
  64. return strtr($templateString,$data);
  65. }
  66. /**
  67. * @brief 商户处理结果
  68. * @param array $data 替换的数据
  69. */
  70. public static function sellerCheck($data = null)
  71. {
  72. $templateString = "您申请的加盟商状态已经被修改为:{result}状态,请登录您的商户后台查看具体的详情";
  73. return strtr($templateString,$data);
  74. }
  75. /**
  76. * @brief 订单付款通知管理员
  77. */
  78. public static function payFinishToAdmin($data = null)
  79. {
  80. $templateString = "商城订单:{orderNo},已经付款,请尽快登录后台进行处理";
  81. return strtr($templateString,$data);
  82. }
  83. /**
  84. * @brief 订单付款通知管理员
  85. */
  86. public static function payFinishToUser($data = null)
  87. {
  88. $templateString = "您的订单号:{orderNo},已付款成功,稍后我们会尽快为您服务";
  89. return strtr($templateString,$data);
  90. }
  91. /**
  92. * @brief 到货通知模板
  93. * @param array $data 替换的数据
  94. */
  95. public static function notify($data = null)
  96. {
  97. $templateString = "尊敬的用户,您需要购买的 <{goodsName}> 现已全面到货,机不可失,从速购买!{url}; 退订回N";
  98. return strtr($templateString,$data);
  99. }
  100. /**
  101. * @brief 订单已被自提信息模板
  102. * @param array $data 替换的数据
  103. */
  104. public static function takeselfGoods($data = null)
  105. {
  106. $templateString = "您好{user_name},订单号:{order_no},在{takeself}已经成功提货";
  107. return strtr($templateString,$data);
  108. }
  109. }