Exemplo n.º 1
0
 function getContents($params, $session = false, $method = 'get', $no_red = false)
 {
     require_once "mdl.center_send.php";
     $center = new mdl_center_send();
     $tb_api_mess = $center->getTbAppInfo();
     $params = array_merge($tb_api_mess['result_msg'], $params);
     return $this->system->call('tb_mess_send', $params, $session, $method, $no_red);
 }
Exemplo n.º 2
0
 function get_tb_nick()
 {
     require_once 'mdl.center_send.php';
     $obj = new mdl_center_send();
     $status = $this->system->loadModel('system/status');
     $sess = $status->get('TB_SESS');
     if (empty($sess)) {
         return false;
     } else {
         $status = $this->system->loadModel('system/status');
         $sess = $status->get('TB_SESS');
         $nick = $obj->get_tb_nick($sess);
         if ($nick['result'] == 'succ') {
             return $nick['result_msg'];
         } else {
             return false;
         }
     }
 }
Exemplo n.º 3
0
 function save_sess($params)
 {
     require_once "mdl.center_send.php";
     $center = new mdl_center_send();
     $return = $center->getTbAppInfo();
     if ($return) {
         $app_secret = $return['result_msg']['app_secret'];
     }
     $sign = base64_encode($this->md5bin(md5($params['top_appkey'] . $params['top_parameters'] . $params['top_session'] . $app_secret)));
     if ($params['top_sign'] == $sign) {
         $status = $this->system->loadModel("system/status");
         $status->set('tb_sess', $params['top_session']);
         $mess = $center->save_sess($params['top_session']);
     }
 }