Example #1
0
 public function __construct()
 {
     if (!defined('SESS_COMPONENTS_CALL_KEYS')) {
         AppException::throwException(AppErrorException, 'Не определена константа "SESS_COMPONENTS_CALL_KEYS"');
     }
     if ($this->_templateSkin != App::get()->getTemplateSkin()) {
         $this->_templateSkin = App::get()->getTemplateSkin();
     }
 }
Example #2
0
<?php

/**
 * 短信群发 sendsms_do.php
 */
require_once "usercheck2.php";
require_once "inc/function.php";
require_once "../include/function_common.php";
$o = new AppException();
//require_once('user_sendsms_page.php');
if (!(empty($site_wiiyunsalt) || empty($site_wiiyunaccount) || $site_sms != '1')) {
    //	检测微云码与账号是否正确
    $result = $o->checkWiiyunSalt($site_wiiyunsalt, $site_wiiyunaccount);
    $r_status = $result[0]->status;
    if ($r_status != 'no') {
        $userID2 = $result[0]->id2;
        //用户ID2
        $sms = $o->getSMS($userID2);
        $s_status = $sms[0]->status;
        $smsCount = $sms[0]->count_m;
    }
}
if (empty($userID2)) {
    alertInfo('短信未配置,请配置', "site_sms.php", 0);
}
$tags = sqlReplace(trim($_POST['receiver']));
//收件人
$tags = str_replace(';', ';', $tags);
$tags = str_replace('#', '', $tags);
$tags = str_replace('$', '', $tags);
//$total=sqlReplace(trim($_GET['total']));//此次发送的数量
Example #3
0
 /**
  * 用户异常类, 适用于所有用户异常,当异常信息不同时,可以直接传入异常信息
  * 
  * @param 异常信息 $message
  *        	不传入异常信息时,采用默认的异常信息 【缺少必要参数】
  * @param 异常编码 $code
  *        	不传入异常编码时,采用默认的编码 1005
  * @author liminggang
  * @date 2015年2月11日 下午2:25:31
  * @version V1.0
  */
 public function __construct($message = null, $code = 0)
 {
     parent::__construct($message, $code);
 }
Example #4
0
function throwException($AppExceptionClass, $message, $code = 0, $line = 0)
{
    AppException::throwException($AppExceptionClass, $message, $code, $line);
}
Example #5
0
function sendCode_wiiyun($phone, $site_wiiyunsalt, $site_wiiyunaccount, $content)
{
    $o = new AppException();
    if (!(empty($site_wiiyunsalt) || empty($site_wiiyunaccount) || empty($phone))) {
        $result = $o->checkWiiyunSalt($site_wiiyunsalt, $site_wiiyunaccount);
        $r_status = $result[0]->status;
        if ($r_status !== 'no') {
            $userID2 = $result[0]->id2;
            //用户ID2
            $sms = $o->getSMS($userID2);
            $s_status = $sms[0]->status;
            if ($s_status == 'noBuy') {
                //echo "<a href='http://www.wiiyun.com' target='_blank'>还没有使用群发短信应用,请您先购买</a>";
            } else {
                //发送短信
                $data = array('reciver' => $phone, 'content' => $content, 'userID2' => $userID2);
                $result = $o->sendSMS($userID2, $data);
            }
        } else {
            //
        }
    }
}
Example #6
0
 /**
  * @param ServerRequestInterface $requset
  * @param ResponseInterface $response
  */
 public function __construct(ServerRequestInterface $requset, ResponseInterface $response)
 {
     $this->request = $requset;
     $this->response = $response;
     parent::__construct('Not Found', 0, null);
 }
 public function __construct($message)
 {
     parent::__construct($message);
     trigger_error($message, E_USER_ERROR);
 }
Example #8
0
<?php

/**
 * sendsms.ajax.php  
 */
require_once "usercheck2.php";
require_once "inc/function.php";
$o = new AppException();
if (!(empty($site_wiiyunsalt) || empty($site_wiiyunaccount) || $site_sms != '1')) {
    //	检测微云码与账号是否正确
    $result = $o->checkWiiyunSalt($site_wiiyunsalt, $site_wiiyunaccount);
    $r_status = $result[0]->status;
    if ($r_status != 'no') {
        $userID2 = $result[0]->id2;
        //用户ID2
    }
}
if (empty($userID2)) {
    alertInfo('短信未配置,请配置', "site_sms.php", 0);
}
$content = sqlReplace(trim($_POST['content']));
$tel = sqlReplace(trim($_POST['tel']));
$tag = sqlReplace(trim($_POST['tag']));
//$salt=sqlReplace(trim($_POST['salt']));
//发送短信
$err_str = '';
//错误信息
//发短信 sendCode($phone,$content)
//sendCode($tel,$content);
$data = array('reciver' => $tel, 'content' => $content, 'userID2' => $userID2);
if ($site_sms == '1') {
Example #9
0
<?php

/**
 *  shop_do.php  
 */
require_once "usercheck2.php";
$o = new AppException();
$salt = sqlReplace(trim($_POST['salt']));
$sms = sqlReplace(trim($_POST['sms']));
$account = sqlReplace(trim($_POST['account']));
$phone = sqlReplace(trim($_POST['phone']));
checkData($account, "微云账号", 1);
checkData($salt, "微云码", 1);
checkData($phone, "手机", 1);
//检查这个码是否存在
$result = $o->checkWiiyunSalt($salt, $account);
$s_status = $result[0]->status;
if ($s_status == 'no') {
    alertInfo('账号与微云码不匹配', '', 1);
    exit;
} else {
    $sql = "update qiyu_shop set shop_phone='" . $phone . "'  where shop_id=" . $QIYU_ID_SHOP . "";
    mysql_query($sql);
    $sql = "update " . WIIDBPRE . "_site set site_wiiyunsalt='" . $salt . "',site_wiiyunaccount='" . $account . "',site_sms='" . $sms . "'";
    if (mysql_query($sql)) {
        alertInfo('操作成功', '', 1);
    } else {
        alertInfo('出错', '', 1);
    }
}
Example #10
0
 public function setComponentClass($ComponentClass)
 {
     if (class_exists($ComponentClass, true) && defined($ComponentClass . '::MAIN_COMPONENT_CLASS') && get_parent_class($ComponentClass) == __NAMESPACE__ . "\\Component") {
         $this->_COMPONENT_CLASS = $ComponentClass;
         return true;
     }
     AppException::throwException(AppErrorException, 'wrong component class');
     die;
 }
 public function __construct($message, $code, $arComponentCall = array())
 {
     $this->setComponentCallArray($arComponentCall);
     parent::__construct($message, $code, $previous);
 }