예제 #1
0
 public function get_token()
 {
     if ($_GET['code'] != '') {
         $code = $_GET['code'];
         $oauth = 'https://api.weixin.qq.com/sns/oauth2/access_token';
         $params['appid'] = C('APPID');
         $params['secret'] = C('APPSECRET');
         $params['code'] = $code;
         $params['grant_type'] = 'authorization_code';
         $result = http($oauth, $params);
         if (!empty($result)) {
             $result = json_decode($result);
             $userinfo_url = 'https://api.weixin.qq.com/sns/userinfo';
             unset($params);
             $params['access_token'] = $result->access_token;
             $params['openid'] = $result->openid;
             $params['lang'] = 'zh_CN';
             $userinfo = http($userinfo_url, $params);
             $userinfo = json_decode($userinfo);
             $unionid = empty($userinfo->unionid) ? $userinfo->unionid : '';
             $data = array('openid' => $result->openid, 'unionid' => $userinfo->unionid, 'nickname' => $userinfo->nickname, 'sex' => $userinfo->sex, 'province' => $userinfo->province, 'city' => $userinfo->city, 'headimgurl' => $userinfo->headimgurl);
             $where = "openid='{$result->openid}' OR unionid={$userinfo->unionid}";
             $user = M('User')->where($where)->find();
             if (!empty($user)) {
                 M('User')->save($data);
             }
             header('Location: ' . 'http://' . $_SERVER['HTTP_HOST'] . '?nickname=' . $userinfo->nickname . '&openid=' . $result->openid . '&unionid=' . $unionid);
         }
     }
 }
예제 #2
0
 /**
  * 创建自定义菜单
  */
 public function update_menu($menu_json)
 {
     $access_token = $this->get_access_token();
     $url = "https://api.weixin.qq.com/cgi-bin/menu/create?access_token=" . $access_token;
     $res = http($url, $menu_json, 'post', array(), true);
     return json_decode($res, true);
 }
예제 #3
0
 public function weixin()
 {
     $code = I('get.code');
     //获取code
     $get_access_token_url = 'https://api.weixin.qq.com/sns/oauth2/access_token';
     $get_access_token_json = http($get_access_token_url, array('appid' => 'wx893a9906fda1ed2c', 'secret' => '0c3ff723b18f7767a5e34ecb876dc947', 'code' => $code, 'grant_type' => 'authorization_code'), get);
     $access_token = json_decode($get_access_token_json, true)['access_token'];
     //获取access_token
     $openid = json_decode($get_access_token_json, true)['openid'];
     $get_userinfo_url = 'https://api.weixin.qq.com/sns/userinfo';
     $userinfo = http($get_userinfo_url, array('access_token' => $access_token, 'openid' => $openid), get);
     $userinfo = json_decode($userinfo, true);
     //获取用户信息
     if ($userinfo['openid']) {
         $check = M('Member')->where(array('openid' => $userinfo['openid']))->select();
         if (!$check) {
             $res = M('Member')->add(array('openid' => $userinfo['openid'], 'headimgurl' => $userinfo['headimgurl'], 'nickname' => $userinfo['nickname'], 'user' => $userinfo['openid'], 'registtime' => time(), 'last_login_time' => time()));
         } else {
             $res = M('Member')->where(array('openid' => $userinfo['openid']))->save(array('last_login_time' => time()));
         }
         if ($res) {
             $data = array('user' => $userinfo['openid'], 'nickname' => $userinfo['nickname'], 'status' => 1, 'headimgurl' => $userinfo['headimgurl']);
             cookie('login', json_encode($data), 604800);
         }
     }
     $this->redirect('Admin/index');
 }
예제 #4
0
파일: call.php 프로젝트: myklv/asana-lite
/**
 * call() makes a simple call to Asana's api
 * 
 * @param $method string  HTTP request method
 * @param $path   string  The path requested, after the API endpoint
 * @param $data   array   An array of data to be included in the request
 *
 * @return array  [$code,$headers,$body]
 */
function call($method, $path, $data)
{
    $endpoint = "https://app.asana.com/api/1.0";
    $token = conf("token");
    $data = count($data) ? "?" . http_build_query($data) : "";
    list($code, $headers, $body) = http($method, "{$endpoint}/{$path}{$data}", null, "Authorization: Bearer {$token}");
    return [$code, $headers, json_decode($body)];
}
 public function cornGetAccessToken()
 {
     $appID = C('WEIXIN_BASE.APP_ID');
     $appSecret = C('WEIXIN_BASE.APP_SECRET');
     $tokenGet = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=' . $appID . '&secret=' . $appSecret;
     $res = json_decode(http($tokenGet, '', 'get', true), true);
     $this->cache->set('ACCESS_TOKEN', $res['access_token'], $res['expires_in']);
 }
예제 #6
0
 function getAccessToken($server, $requestUrl, $consumer_key, $oauth_verifier, $oauth_token) {
   $oauth_token_secret = $_SESSION['oauth_token_secret'];
   $timeStamp = time();
   $url = $server.$requestUrl."?oauth_consumer_key=".$consumer_key;
   $url .= "&oauth_signature_method=PLAINTEXT&oauth_nonce=99806503068046&oauth_version=1.0&oauth_timestamp=";
   $url .= $timeStamp."&oauth_verifier=".$oauth_verifier."&oauth_token=".$oauth_token."&oauth_signature=%26".$oauth_token_secret;
   $r = http($url);
   return oAuthParseResponse($r);
 }
예제 #7
0
파일: Url.php 프로젝트: moxi9/unity
 public function send($route)
 {
     if (http()->is_ajax()) {
         return ['send' => $this->make($route)];
     }
     @ob_clean();
     header('Location: ' . $this->make($route));
     exit;
 }
 public function customMenuListCreate()
 {
     $url = 'https://api.weixin.qq.com/cgi-bin/menu/create?access_token=' . $this->token;
     $btn['button'] = array(array('type' => 'click', 'name' => 'click事件', 'key' => 'clickEvent'), array('type' => 'view', 'name' => 'url跳转事件', 'url' => 'http://www.baidu.com'), array('name' => '子菜单', 'sub_button' => array(array('type' => 'view', 'name' => 'url跳转事件', 'url' => 'http://www.baidu.com'), array('type' => 'click', 'name' => 'click事件', 'key' => 'subClickEvent'))));
     $chStr = chineseStringSave($btn);
     // json保存中文
     $res = http($url, $chStr, 'post', true);
     dump($res);
 }
 private function userInfoGet($openIDArr)
 {
     $url = 'https://api.weixin.qq.com/cgi-bin/user/info/batchget?access_token=' . $this->token;
     foreach ($openIDArr['data']['openid'] as $v) {
         // 遍历openid数组到查询条件数组
         $data['user_list'][] = array('openid' => $v, 'lang' => 'zh-CN');
     }
     $res = json_decode(http($url, json_encode($data), 'post', true), true);
     return $res;
 }
예제 #10
0
파일: rp_callback.php 프로젝트: sgml/rww.io
function verify($continueUrl, $response)
{
    $q = array('userIp' => $_SERVER['REMOTE_ADDR']);
    $q['requestUri'] = $continueUrl;
    $q['postBody'] = $response;
    $q = http('POST', 'https://www.googleapis.com/identitytoolkit/v1/relyingparty/verifyAssertion?key=' . GAPIKEY, json_encode($q));
    if ($q->status == 200) {
        return json_decode($q->body, true);
    }
    return array();
}
예제 #11
0
 /**
  * 获取授权后的微信用户信息
  *
  * @param string $access_token
  * @param string $open_id
  */
 public function get_user_info($access_token = '', $open_id = '')
 {
     if ($access_token && $open_id) {
         $info_url = "https://api.weixin.qq.com/sns/userinfo?access_token={$access_token}&openid={$open_id}&lang=zh_CN";
         $info_data = http($info_url);
         if ($info_data[0] == 200) {
             return json_decode($info_data[1], TRUE);
         }
     }
     return FALSE;
 }
function trigger_scraper($user, $persona_id)
{
    global $scoop_ui_url;
    // should be defined in local_config.php
    if (!isset($scoop_ui_url)) {
        $scoop_ui_url = "http://localhost:7070";
    }
    $params = array('userName' => $user->login_name, 'password' => $user->password, 'pwtype' => 'md5');
    $params['todo'] = $persona_id . ',';
    // http://localhost:7070/sessionStart?userName=userName&password=xxxxx
    // we would like to do POST
    $retun = http('POST', $scoop_ui_url . '/sessionStart', $params);
    // echo "<hr>$return<hr>"; // debug!!
}
예제 #13
0
function mainfunc($posts, $debug = false)
{
    $ip = $_SERVER["REMOTE_ADDR"];
    @($token = $_COOKIE['token']);
    $url = "http://127.0.0.1/api/jiekouapi.php?ip={$ip}&token={$token}";
    if ($debug) {
        $url = $url . "&debug=yes";
    }
    $rawstr = http($url, "POST", $posts);
    if ($debug) {
        return $rawstr;
    }
    @($xml = simplexml_load_string($rawstr, null, LIBXML_NOCDATA));
    return json_decode(json_encode($xml->xpath("info")), true);
}
예제 #14
0
파일: ifr.php 프로젝트: philum/cms
function ifrget($a, $b, $f)
{
    $f = ajxg($f);
    $f = http($f);
    if ($f) {
        $ret = curl_get_contents($f);
        if (is_image($f) && $ret) {
            $ret = ifrim($f, $ret);
        }
    }
    $encoding = embed_detect(strtolower($ret), "charset=", '"', "");
    if (strtolower($encoding) == "utf-8" or strpos($ret, 'é')) {
        $ret = utf8_decode_b($ret);
    }
    return $ret;
}
예제 #15
0
파일: Site.php 프로젝트: moxi9/unity
 public function render($callback = null)
 {
     try {
         $render = new Route\Render($this->_app);
         $response = $render->execute();
     } catch (Exception\Fatal $e) {
         d($e->getTraceAsString());
         exit('fatal: ' . $e->getMessage());
     } catch (Exception $e) {
         $response = $e->getMessage();
         if (app()->http->is_ajax()) {
             http_response_code(400);
             $response = ['error' => $e->getMessageArray()];
         } else {
             if ($handler = config('error_handler')) {
                 $response = call_user_func($handler, $e);
             }
         }
     }
     $uri = request()->uri();
     if (is_object($response) || is_array($response)) {
         http()->type('json');
     } else {
         if (substr($uri, -3) == '.js') {
             http()->type('js');
             $url = url($uri);
             echo 'Unity.blocklet(\'' . $url . '\', ' . json_encode(['view' => $response]) . ');';
             exit;
         } else {
             if ($response === false) {
                 http()->type('404');
                 $response = 'Page not found.';
             } else {
                 http()->type('html');
             }
             /*
             if ($response === null || app()->http->is_ajax()) {
             	exit;
             }
             */
         }
     }
     if (is_callable($callback)) {
         return call_user_func($callback, $response);
     }
     return $response;
 }
 public function templateMessageSend()
 {
     $token = $this->token;
     $url = 'https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=' . $token;
     $temp['touser'] = '******';
     $temp['template_id'] = '2fEe_qquorTi5z1Vau2-QU8kaL8XUka_BZuXg45JMVQ';
     // 模板ID
     $temp['url'] = 'http://www.baidu.com';
     // 当用户点击模板消息后跳转过去的链接
     $temp['data'] = array('name' => array('value' => 'Mr.Z', 'color' => '#173177'), 'time' => array('value' => date('Y-m-d H:i:s', time()), 'color' => '#173177'));
     array_walk_recursive($temp, function (&$v) {
         $v = urlencode($v);
     });
     $tempData = urldecode(json_encode($temp));
     $res = json_decode(http($url, $tempData, 'post', true), true);
     dump($res);
 }
예제 #17
0
 function get_weather()
 {
     if (getenv("HTTP_CLIENT_IP")) {
         $ip = getenv("HTTP_CLIENT_IP");
     } else {
         if (getenv("HTTP_X_FORWARDED_FOR")) {
             $ip = getenv("HTTP_X_FORWARDED_FOR");
         } else {
             if (getenv("REMOTE_ADDR")) {
                 $ip = getenv("REMOTE_ADDR");
             }
         }
     }
     $ip = '175.10.239.240';
     $httpstr = http('http://api.36wu.com/Weather/GetWeatherByIp', array('ip' => $ip), 'get');
     return json_decode($httpstr);
 }
 public function tempResourceCreate()
 {
     //        $url = 'https://api.weixin.qq.com/cgi-bin/media/upload?access_token=' . $this->token . '&type=image';
     //        $file = array(
     //            'filename' => '/ace/app/webroot/Public/Weixin/img/doge.jpg',
     //            'content-type' => 'image/jpeg',
     //            'filelength' => '8488',
     //        );
     dump($_SERVER);
     exit;
     //        $data = array(
     //            'media' => '/ace/app/webroot/Public/Weixin/img/doge.jpg',
     //            'form-data' => $file,
     //        );
     $res = json_decode(http($url, json_encode($data), 'post', true), true);
     dump($res);
 }
예제 #19
0
 public function access_token($appid, $code, &$i = 0)
 {
     $appsecret = $this->model_config->val("appsecret");
     $appsecret = trim($appsecret);
     $appid = trim($appid);
     $url = "https://api.weixin.qq.com/sns/oauth2/access_token";
     $param = array("appid" => $appid, "secret" => $appsecret, "code" => $code, "grant_type" => "authorization_code");
     $httpstr = http($url, $param);
     $harr = json_decode($httpstr, true);
     if (empty($harr['access_token'])) {
         if ($i > 5) {
             E("获取access_token失败");
         }
         $i++;
         $this->access_token($appid, $code, $i);
     }
     $this->openid = $harr['openid'];
 }
예제 #20
0
 public static function getRaw($action, $ref, $data, $method = "POST")
 {
     /*self::action =$action;//"http://202.115.71.131/iv/queryPastPro.do?url=In";
       $method ="POST";
       $ref = "http://202.115.71.131/iv/queryPastPro.do?url=In";
       $data = ['name'=>'张逊桥',
       'btn'=>'执行查询',
           'qishuId'=>'',//5,
           'srtpProject.projCollege'=>'信息科学与技术学院'
       ];*/
     //import('LIB.LIB_http.php');
     //require_once('../../LIB/LIB_http.php');
     $response = http($target = $action, $ref, $method, $data, EXCL_HEAD);
     return $response;
     //输入项目名 或者 参与人员 的学号 或您的 姓名 或指 导教师姓名
     //"/iv/queryPastPro.do?url=In"
     //name  srtpProject.projCollege  qishuId
     //name=&srtpProject.projCollege=%E4%BF%A1%E6%81%AF%E7%A7%91%E5%AD%A6%E4%B8%8E%E6%8A%80%E6%9C%AF%E5%AD%A6%E9%99%A2&qishuId=5&btn=%E6%89%A7%E8%A1%8C%E6%9F%A5%E8%AF%A2
 }
예제 #21
0
파일: ifram.php 프로젝트: philum/cms
function ifrget($a, $b, $f)
{
    $f = ajxg($f);
    $f = http($f);
    if ($a) {
        ifradd();
    }
    if ($f) {
        $ret = read_file($f);
        $ret = ifrcorr($ret, $f);
        if (is_image($f) && $ret) {
            $ret = ifrim($f, $ret);
        }
    }
    $encoding = embed_detect(strtolower($ret), "charset=", '"', "");
    if (strtolower($encoding) == "utf-8" or strpos($ret, 'é')) {
        $ret = utf8_decode_b($ret);
    }
    return $ret;
}
예제 #22
0
파일: Site.php 프로젝트: noikiy/unity
 public function __construct($callback = null)
 {
     $app = new App();
     $response = false;
     try {
         foreach (scandir(config()->vendor()) as $vendor) {
             $path = config()->vendor() . $vendor . '/unity.php';
             if (file_exists($path)) {
                 $module = (require $path);
                 if ($module instanceof \Closure) {
                     call_user_func($module);
                 }
             }
         }
         call_user_func($callback, $app);
         $render = new Route\Render($app);
         $response = $render->execute();
     } catch (Exception\Fatal $e) {
         d($e->getTraceAsString());
         exit('fatal: ' . $e->getMessage());
     } catch (Exception $e) {
         $response = $e->getMessage();
     }
     if (is_object($response) || is_array($response)) {
         http()->type('json');
         echo json_encode($response, JSON_PRETTY_PRINT);
     } else {
         if ($response === false) {
             http()->type('404');
             echo 'Page not found.';
         } else {
             http()->type('html');
             echo $response;
         }
     }
 }
예제 #23
0
function get_domain()
{
    $protocol = http();
    if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
        $host = $_SERVER['HTTP_X_FORWARDED_HOST'];
    } elseif (isset($_SERVER['HTTP_HOST'])) {
        $host = $_SERVER['HTTP_HOST'];
    } else {
        if (isset($_SERVER['SERVER_PORT'])) {
            $port = ':' . $_SERVER['SERVER_PORT'];
            if (':80' == $port && 'http://' == $protocol || ':443' == $port && 'https://' == $protocol) {
                $port = '';
            }
        } else {
            $port = '';
        }
        if (isset($_SERVER['SERVER_NAME'])) {
            $host = $_SERVER['SERVER_NAME'] . $port;
        } elseif (isset($_SERVER['SERVER_ADDR'])) {
            $host = $_SERVER['SERVER_ADDR'] . $port;
        }
    }
    return $protocol . $host;
}
예제 #24
0
 public function get_app_list()
 {
     $this->url = $this->get_url(__FUNCTION__);
     $dataStr = $this->format_params(array(), 'get');
     $this->data = http($this->url, $dataStr);
     $result = $this->verify_data($this->data, __FUNCTION__);
     return $result;
 }
예제 #25
0
 /**
  * 发送邮件
  * @Author   EricJi
  * @DateTime 2015-12-08T18:05:03+0800
  * @param    [type]                   $email    [description]
  * @param    [type]                   $subject  [description]
  * @param    [type]                   $htmlBody [description]
  * @param    [type]                   $textBody [description]
  * @return   [type]                             [description]
  */
 public function sendSingleMail($email, $subject, $htmlBody, $textBody)
 {
     //定义一个要发送的目标URL;
     $url = "http://service.hz.insta360.com/api/dms/sendsinglemail";
     //定义传递的参数数组;
     $data['toAddress'] = $email;
     $data['subject'] = $subject;
     //function.php 自定义,将中文unicode转码
     $data['htmlBody'] = $htmlBody;
     $data['textBody'] = $textBody;
     //定义返回值接收变量;
     $httpReturn = http($url, $data, 'POST', array("Authentication-Token:" . C('SERVER_TOKEN')));
     $returnValue = object_to_array(json_decode($httpReturn));
     //function.php 中的对象转数组方法
     return $returnValue;
 }
예제 #26
0
파일: main.php 프로젝트: hiproz/yincart2
<?php

use yii\helpers\Html;
use yii\widgets\Menu;
yii\web\JqueryAsset::register($this);
js_file(http() . 'js/holder.js');
js_file(http() . 'misc/bootstrap/js/bootstrap.js');
css_file(http() . 'misc/bootstrap/css/bootstrap.css');
css_file(http() . 'misc/bootstrap-glyphicons/css/bootstrap-glyphicons.css');
css_file(http() . 'misc/bootstrap/css/docs.css');
js_file(theme_url() . '/app.js');
css_file(theme_url() . '/app.css');
$this->beginPage();
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8"/>
	<title>Welcome to MinCMS</title>
	<?php 
$this->head();
?>
 
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top bs-docs-nav">
  <div class="container">
    <a href="<?php 
echo url('site/index');
?>
" class="navbar-brand">MinCMS 2.0.1</a>
예제 #27
0
function trigger_scraper($user, $persona = NULL)
{
    global $scoop_ui_url;
    // should be defined in local_config.php
    if (!isset($scoop_ui_url)) {
        $scoop_ui_url = "http://localhost:7070";
    }
    $params = array('userName' => $user->login_name, 'password' => $user->password, 'pwtype' => 'md5');
    /*
    	The "todo" parameter allows you to tell the scraper which personas and which
    properties of each persona to scrape. If you pass a zero length string as
    "todo", or omit it, then be default it will scrape all the user's personas,
    and all the properties of each persona. There are two ways to tell it which
    personas to scrape: a comma separated list of persona ids (numbers), and/or
    persona service symbols (strings like "AOL", "Facebook", etc). The persona
    service symbols are intended for debugging convenience, because the user may
    have more than one persona of the same service, so in that case it scrapes
    each persona that uses the specified service. Programs calling this api should
    use numeric persona ids, to exactly control which persona(s) get scraped.
    There is also a way to specify which properties of each persona are scraped:
    include a space separated list of property names after the persona id or
    symbol. If there is no space separated list of properties after a persona id
    or symbol, then it scrapes all properties.
    */
    if ($persona) {
        $params['todo'] = $persona->persona_id . ',';
    }
    // http://localhost:7070/sessionStart?userName=userName&password=xxxxx
    // we would like to do POST
    $retun = http('POST', $scoop_ui_url . '/sessionStart', $params);
    // echo "<hr>$return<hr>"; // debug!!
}
 public function permanentResourceGet()
 {
     $url = 'https://api.weixin.qq.com/cgi-bin/material/get_material?access_token=' . $this->token;
     $data = array('media_id' => 'zpLJQP5eHVey6Vlcltuu6uF5ti908rJoRwMp1I3Vofc');
     $res = http($url, json_encode($data), 'post');
     echo stripslashes($res);
 }
예제 #29
0
파일: client.php 프로젝트: hun-tun/CAPUBBS
function request($posts)
{
    $token = @$_POST['token'];
    $ip = $_SERVER['REMOTE_ADDR'];
    $url = "http://127.0.0.1/api/jiekouapi.php?ip={$ip}&token={$token}";
    $rawstr = http($url, "POST", $posts);
    $xml = simplexml_load_string($rawstr, null, LIBXML_NOCDATA);
    return json_decode(json_encode($xml->xpath("info")), true);
}
예제 #30
0
파일: tri.php 프로젝트: philum/cms
function vacuum($f, $sj = '')
{
    $f = https($f);
    $f = http($f);
    $f = utmsrc($f);
    $reb = vaccum_ses($f);
    if (!$reb) {
        $_SESSION['vacuum'][nohttp($f)] = '';
        return array('nothing');
    }
    if ($_POST['see']) {
        eco($reb, 1);
    }
    $enc = embed_detect(strtolower($reb), 'charset=', '"');
    if (!$enc) {
        $enc = mb_detect_encoding($reb);
    }
    list($defid, $defs) = verif_defcon($f);
    //defcons
    if (!$defs) {
        $defs = known_defcon($reb);
    }
    if (!$defs) {
        $defs = recognize_defcon($reb);
    }
    $auv = auto_video($f, 'pop');
    if (!$defs && !$auv) {
        add_defcon($f);
        return array('Title', $f, $f, '', '', '');
    }
    if (strtolower($enc) == 'utf-8' or $_POST['utf'] or $defs[5]) {
        $reb = utf8_decode_b($reb);
    }
    if ($defs[2]) {
        if (!$defs[3]) {
            $suj = embed_detect_c($reb, $defs[2]);
        } elseif ($defs[3]) {
            $suj = embed_detect($reb, $defs[2], $defs[3]);
        }
        $suj = trim(del_n($suj));
        $suj = interpret_html($suj, "ok");
    }
    if ($defs[0]) {
        if (!$defs[1]) {
            $rec = embed_detect_c($reb, $defs[0]);
        } elseif ($defs[1]) {
            $rec = embed_detect($reb, $defs[0], $defs[1]);
        }
    } else {
        $rec = embed_detect_c($reb, '<body');
    }
    if ($defs[8]) {
        if (!$defs[9]) {
            $opt = embed_detect_c($reb, $defs[8]);
        } elseif ($defs[9]) {
            $opt = embed_detect($reb, $defs[8], $defs[9]);
        }
        if ($opt) {
            $opt .= br() . br();
        }
    }
    if ($defs[4] && $defs[4] != 1) {
        if (strpos($reb, $defs[4]) !== false) {
            $end = embed_detect_c($reb, $defs[4]);
        }
        if ($end) {
            $end = br() . br() . $end;
        }
    }
    if ($auv) {
        $ret = $auv;
    } elseif (strpos($f, 'twitter.com')) {
        //twit
        list($suj, $ret, $day) = plugin_func('twit', 'twit_vacuum', $f);
    } else {
        $ret = converthtml($opt . $rec . $end);
    }
    //foot
    if ($suj) {
        $title = clean_title($suj);
    } else {
        $title = clean_internaltag(pre_clean($sj ? $sj : 'Title'));
    }
    if ($defs[6]) {
        $ret = post_treat_batch($ret, $title, $defs[6]);
    }
    //post_treat
    if ($_SESSION['sugm']) {
        $sug = sugnote();
    }
    if (!$auv) {
        $ret .= "\n\n" . $sug . '[' . $f . ']';
    }
    //eco($rec,1);
    return array($title, $ret, $rec, $defid, $defs);
}