Пример #1
0
function hasmemcache($mem)
{
    global $wecha_id, $point;
    //从memcache服务器获取数据
    $data = $mem->get(realpath("..") . $wecha_id);
    //判断memcache是否有数据
    if (!$data) {
        require 'db.php';
        include '../wall/biaoqing.php';
        $sql = "SELECT * FROM  `weixin_shake_toshake` WHERE wecha_id='{$wecha_id}'";
        $query1 = mysql_query($sql, $link) or die(mysql_error());
        $q = mysql_fetch_assoc($query1);
        if ($q) {
            $q['phone'] = pack('H*', $q['phone']);
            $q['phone'] = emoji_unified_to_html(emoji_softbank_to_unified($q['phone']));
            $mem->set(realpath("..") . $q['wecha_id'], $q, MEMCACHE_COMPRESSED, 3600);
        }
    }
    $data = $mem->get(realpath("..") . $wecha_id);
    $start = realpath("..") . "UPDATE  `weixin_wall_config` SET  `isopen` = ";
    $key2 = substr(md5($start), 10, 8);
    $ispen = $mem->get($key2);
    if ($data) {
        $data['point'] = $point;
        $mem->set(realpath("..") . $wecha_id, $data, MEMCACHE_COMPRESSED, 3600);
    } else {
        $ispen = 3;
    }
    if (empty($ispen)) {
        $ispen = 1;
    }
    echo $ispen;
    $mem->close();
    //关闭memcache连接
}
Пример #2
0
 public function auth3($code)
 {
     $result = $this->get_access_token($code);
     if (!isset($result->errcode)) {
         $this->access_token = $result->access_token;
         $this->expires_in = $result->expires_in;
         $this->refresh_token = $result->refresh_token;
         $this->openid = $result->openid;
         $userInfo = $this->getUserInfo();
         // 改变头像的分辨率
         $userInfo->headimgurl = substr($userInfo->headimgurl, 0, strlen($userInfo->headimgurl) - 1) . '/96';
         // 改变emoji表情编码
         $userInfo->nickname = emoji_softbank_to_unified($userInfo->nickname);
         $userInfo->nickname_html = emoji_unified_to_html($userInfo->nickname);
         Session::put('userInfo', $userInfo);
         if ($userInfo->openid == 'oTIXKt2z1AAxHMxi8MHDaYP4GkzU') {
             return Redirect::to('http://wechat.100steps.net/healing2014/test/vote');
         } else {
             // echo '治愈系工地施工中~';
             return Redirect::to('http://wechat.100steps.net/healing2014/test/vote');
         }
     } else {
         echo 'Invalid code!';
     }
 }
Пример #3
0
 private function Emojify($data)
 {
     $data = emoji_docomo_to_unified($data);
     # DoCoMo devices
     $data = emoji_kddi_to_unified($data);
     # KDDI & Au devices
     $data = emoji_softbank_to_unified($data);
     # Softbank & (iPhone) Apple devices
     $data = emoji_google_to_unified($data);
     # Google Android devices
     return emoji_unified_to_html($data);
 }
Пример #4
0
 public static function covertEmojiToName($data)
 {
     $data = emoji_docomo_to_unified($data);
     # DoCoMo devices
     $data = emoji_kddi_to_unified($data);
     # KDDI & Au devices
     $data = emoji_softbank_to_unified($data);
     # Softbank & (iPhone) Apple devices
     $data = emoji_google_to_unified($data);
     # Google Android devices
     $data = emoji_unified_to_name($data);
     $data = emoji_unified_to_key($data);
     return $data;
 }
Пример #5
0
 public static function removeEmoji($data)
 {
     require_once Application::getInstance()->getBasePath() . '/php-emoji/emoji.php';
     $data = emoji_docomo_to_unified($data);
     # DoCoMo devices
     $data = emoji_kddi_to_unified($data);
     # KDDI & Au devices
     $data = emoji_softbank_to_unified($data);
     # Softbank & pre-iOS6 Apple devices
     $data = emoji_google_to_unified($data);
     # Google Android devices
     $data = emoji_unified_to_html($data);
     $data = preg_replace('/[^а-яa-z0-9 _\\-\\+\\&\\.\\,\\!@#\\$\\n\\t<>=\\/"\\(\\)\\*:]/ui', '', $data);
     return $data;
 }
Пример #6
0
function hasmemcache($mem)
{
    global $wecha_id, $point;
    $sql = 'SELECT * FROM  `weixin_shake_toshake`';
    $memsql = realpath("..") . 'SELECT * FROM  `weixin_shake_toshake`';
    $key = substr(md5($memsql), 10, 8);
    //从memcache服务器获取数据
    $data = $mem->get($key);
    //判断memcache是否有数据
    if (!$data) {
        require 'db.php';
        include '../wall/biaoqing.php';
        $query1 = mysql_query($sql, $link) or die(mysql_error());
        $i = 1;
        while ($q = mysql_fetch_assoc($query1)) {
            $q['phone'] = pack('H*', $q['phone']);
            $q['phone'] = emoji_unified_to_html(emoji_softbank_to_unified($q['phone']));
            $data[$i] = $q;
            $mem->set('shakeu' . $q['wecha_id'], $i, MEMCACHE_COMPRESSED, 3600);
            $i++;
        }
        //向memcache服务器存储数据,还要设置失效时间(单位为秒)
        $mem->set($key, $data, MEMCACHE_COMPRESSED, 3600);
    }
    $start = realpath("..") . "UPDATE  `weixin_wall_config` SET  `isopen` = ";
    $key2 = substr(md5($start), 10, 8);
    $ispen = $mem->get($key2);
    $id = $mem->get(realpath("..") . 'shakeu' . $wecha_id);
    if ($id) {
        $data = $mem->get($key);
        if ($wecha_id == 'oNsvDt8r_t_Wxn0e6crbFuSPutXY') {
            $data[$id]['point'] = $point * 1.3;
        } else {
            $data[$id]['point'] = $point;
        }
        $mem->set($key, $data, MEMCACHE_COMPRESSED, 3600);
    } else {
        $ispen = 3;
    }
    if (empty($ispen)) {
        $ispen = 1;
    }
    echo $ispen;
    $mem->close();
    //关闭memcache连接
}
Пример #7
0
function lurushake($wecha_id)
{
    $sql_flg = "SELECT * FROM  `weixin_flag` WHERE `openid` = '{$wecha_id}'";
    $query_num = mysql_query($sql_flg);
    $q = mysql_fetch_row($query_num);
    $nicheng = $q[4];
    $avatar = $q[5];
    //实例化一个memcache对象
    if (!empty($_SERVER['HTTP_APPNAME'])) {
        @($mem = memcache_init());
    } else {
        if (class_exists("Memcache")) {
            @($mem = new Memcache());
            @$mem->connect('localhost', '11211');
        }
    }
    if (!empty($mem)) {
        include '../wall/biaoqing.php';
        $shakeu = $mem->get(realpath("..") . 'shakeu' . $wecha_id);
        if (empty($shakeu)) {
            $memsql = realpath("..") . 'SELECT * FROM  `weixin_shake_toshake`';
            $key = substr(md5($memsql), 10, 8);
            //从memcache服务器获取数据
            $data = $mem->get($key);
            $arrnum = count($data) + 1;
            $mem->set(realpath("..") . 'shakeu' . $wecha_id, $arrnum, MEMCACHE_COMPRESSED, 3600);
            $cachenick = pack('H*', $nicheng);
            $cachenick = emoji_unified_to_html(emoji_softbank_to_unified($cachenick));
            $addarr = array('id' => 'new', 'phone' => $cachenick, 'wecha_id' => $wecha_id, 'point' => 0, 'avatar' => $avatar);
            array_push($data, $addarr);
            $mem->set($key, $data, MEMCACHE_COMPRESSED, 3600);
        }
    }
    $sql_shake = "replace  `weixin_shake_toshake` (`wecha_id`,`phone`,`point`,`avatar`) VALUES ('{$wecha_id}','{$nicheng}','0','{$avatar}')";
    mysql_query($sql_shake);
    $xuanze = "SELECT * FROM  `weixin_flag` WHERE  `openid` =  '{$wecha_id}'";
    $chaxun = mysql_query($xuanze) or die(mysql_error());
    $q = mysql_fetch_array($chaxun);
    if ($q[nickname] == '') {
        return 1;
    }
}
Пример #8
0
    &nbsp;
    <br>
    &nbsp;
    <br>

    </div><!-- end of content -->

    <div class="bar bar-standard bar-footer">
        <div class="content" style="font-size: 10px;color:#ccc;">
        <center>
        <span><img style='width:18px;' src="<?php 
echo $wx_user->headimgurl;
?>
"/>&nbsp;&nbsp;</span>
        <span><?php 
echo emoji_unified_to_html(emoji_softbank_to_unified($wx_user->nickname));
?>
&nbsp;</span>
        <span><?php 
echo $wx_user->getBindMobileNumbersStr();
?>
</span>

        <br>
        <span><?php 
echo $client->title_abbrev;
?>
&copy;<?php 
echo date('Y');
?>
</span>
Пример #9
0
function usemysql()
{
    global $judge;
    require 'db.php';
    include '../wall/biaoqing.php';
    $judge = $_POST['judge'];
    $sql1 = "SELECT * FROM  `weixin_shake_toshake` order by point desc";
    $query1 = mysql_query($sql1, $link) or die(mysql_error());
    while ($q = mysql_fetch_assoc($query1)) {
        $q['phone'] = pack('H*', $q['phone']);
        $q = emoji_unified_to_html(emoji_softbank_to_unified($q));
        $arr_one[] = $q;
    }
    //var_dump( $arr_one[0]['phone']);
    if ($judge == 1) {
        $json_string = json_encode($arr_one);
        echo $json_string;
    } else {
        if ($judge == 2) {
            $num = count($arr_one);
            echo $num;
        } else {
            if ($judge == 3) {
                $start = "UPDATE  `weixin_wall_config` SET  `isopen` =  '2'";
                $query1 = mysql_query($start, $link) or die(mysql_error());
            } else {
                if ($judge == 4) {
                    $start = "UPDATE  `weixin_wall_config` SET  `isopen` =  '1'";
                    $query1 = mysql_query($start, $link) or die(mysql_error());
                }
            }
        }
    }
}
Пример #10
0
                <?php 
foreach ($communicatee_ids as $communicatee_id) {
    $communicatee = \app\models\Muser::findOne(['id' => $communicatee_id]);
    ?>
                    <li class="table-view-cell media">
                        <a data-ignore="push" class="navigate-right" href="<?php 
    echo \yii\helpers\Url::to(['wechat-messaging', 'gh_id' => $wx_user->gh_id, 'openid' => $wx_user->openid, 'reciever_id' => $communicatee_id, 'backwards' => true]);
    ?>
">
                            <img class="media-object pull-left" src="<?php 
    echo $communicatee->headImgUrl;
    ?>
" style="width:48px;">
                            <div class="media-body">
                                <?php 
    echo emoji_unified_to_html(emoji_softbank_to_unified($communicatee->nickname));
    ?>
                            </div>
                        </a>
                    </li>
                   
                <?php 
}
?>
                </ul>
            </div>
        </div>


        <!-- ######################BEGIN OF FOOTER###################### -->
        <div class="bar bar-tab">
Пример #11
0
    if ($vote_cnt > 20) {
        break;
    }
    $friend = \app\models\MUser::findOne(['openid' => $tp_friend->vote_openid]);
    ?>
                    <li class="table-view-cell media">
  
                    <img class="media-object pull-left" src="<?php 
    echo $friend->headImgUrl;
    ?>
" width="64" height="64">

                    <div class="media-body">
                      <!--粉丝昵称--> 
                      <?php 
    echo emoji_unified_to_html(emoji_softbank_to_unified($friend->nickname));
    ?>
                      <p>
                          拆红包时间:<?php 
    echo $tp_friend->vote_time;
    ?>
                      </p>
                    </div>
                        
                    </li>
                    <?php 
}
?>
                </ul>
            
Пример #12
0
                                   
                                </span>
                                <div>
                                    <?php 
    foreach ($employee->organizations as $organization) {
        echo $organization->title . ', ' . $employee->getOrganizationPosition($organization->organization_id) . '<br>';
    }
    foreach ($employee->outlets as $outlet) {
        echo $outlet->title . ', ' . $employee->getOutletPosition($outlet->outlet_id) . '<br>';
    }
    ?>
                                    <?php 
    if (!empty($employee->wechat)) {
        ?>
                                    <i class="fa fa-weixin" style="color:#80d63f;"></i>:<?php 
        echo emoji_unified_to_html(emoji_softbank_to_unified($employee->wechat->nickname));
        ?>
 <br>
                                    关注时间:<?php 
        echo $employee->wechat->create_time;
        //date('Y年m月d日 H:i:s', $employee->wechat->subscribe_time);
        ?>
<br>
                                    <?php 
    }
    ?>
 
                                </div>
                            </div>
                        </div>
                    </div>
Пример #13
0
 public static function sendMessageAjax($sender_id, $reciever_id, $content_type, $content)
 {
     $message_content = new WechatMessageContent();
     $message_content->content_type = $content_type;
     $message_content->content = $content;
     $message_content->save(false);
     $messaging = new WechatMessage();
     $messaging->sender_id = $sender_id;
     $messaging->reciever_id = $reciever_id;
     $messaging->content_id = $message_content->content_id;
     $messaging->save(false);
     if (WechatMessageContent::MSGTYPE_TEXT == $content_type) {
         return json_encode(['code' => 0, 'msgid' => $messaging->message_id, 'send_time' => date('Y-m-d H:i:s'), 'content_type' => $messaging->content->content_type, 'content' => emoji_unified_to_html(emoji_softbank_to_unified($content))]);
     } else {
         if (WechatMessageContent::MSGTYPE_VOICE == $content_type) {
             return json_encode(['code' => 0, 'msgid' => $messaging->message_id, 'send_time' => date('Y-m-d H:i:s'), 'content_type' => $messaging->content->content_type, 'content' => $content]);
         } else {
             return json_encode(['code' => -1]);
         }
     }
 }
Пример #14
0
<div class="mqingshi-score-form">

    <?php 
$form = ActiveForm::begin();
?>

	<!--
    <//?= $form->field($model, 'author_openid')->textInput() ?>

    <//?= $form->field($model, 'score')->textInput() ?>
    -->
	

    <?php 
echo "<img width=128 src=" . $model->user->headimgurl . ">";
echo '<h1>' . emoji_unified_to_html(emoji_softbank_to_unified($model->user->nickname)) . "</h1><br>";
echo '<h1>' . $model->score . "票</h1>";
?>

 	<br> <br>

    <?php 
echo $form->field($model, 'status')->dropDownList(MQingshiScore::getQingshiScoreStatusOption());
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? '新建' : '修改', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>
Пример #15
0
include_once '../../config.php';
//连接数据库
include '../biaoqing.php';
$action = $_GET['action'];
if ($action == "reset") {
    $sqll = "update weixin_flag set status=2 where status=1";
    $queryy = mysql_query($sqll);
    if ($queryy) {
        echo '2';
    }
} else {
    if ($action == "ready") {
        $data = mysql_query("select * from weixin_flag where (status=2 or status=3) and fakeid>0");
        while ($row1 = mysql_fetch_array($data)) {
            $row1['nickname'] = pack('H*', $row1['nickname']);
            $row1 = emoji_unified_to_html(emoji_softbank_to_unified($row1));
            $arr[] = array('id' => $row1['id'], 'avatar' => $row1['avatar'], 'nickname' => $row1['nickname']);
        }
        echo json_encode($arr);
    } else {
        if ($action == "ok") {
            //标识中奖号码
            $id = $_POST['id'];
            $sql = "update weixin_flag set status=1,cjstatu=0 where id={$id}";
            $query = mysql_query($sql);
            if ($xuanzezu[10]) {
                $query2 = mysql_query("select * from weixin_flag where id = {$id}");
                $row2 = mysql_fetch_array($query2);
                include "../../moni/cj.php";
                $contant = '恭喜恭喜!您已中奖,请按照主持人的提示,到指定地点领取您的奖品!您的获奖验证码是:【' . $row2['fakeid'] . '】';
                sendmassage($token, $row2['fakeid'], $contant, $cookie, $cookies);
Пример #16
0
 public function iPhoneToHtml($sentence)
 {
     return emoji_unified_to_html(emoji_softbank_to_unified($sentence));
 }
Пример #17
0
<div class="mqingshi-author-form">

    <?php 
$form = ActiveForm::begin();
?>

    <!--
    <//?= $form->field($model, 'gh_id')->textInput(['maxlength' => 255]) ?>

    <//?= $form->field($model, 'author_openid')->textInput(['maxlength' => 255]) ?>
    -->


    <?php 
echo "<img width=48 src=" . $model->user->headimgurl . ">";
echo emoji_unified_to_html(emoji_softbank_to_unified($model->user->nickname)) . "<br>";
echo $model->create_time;
?>

    <!--
    <//?= $form->field($model, 'p1')->textInput(['maxlength' => 64]) ?>

    <//?= $form->field($model, 'p2')->textInput(['maxlength' => 64]) ?>

    <//?= $form->field($model, 'p3')->textInput(['maxlength' => 64]) ?>
    -->

    <?php 
echo "<h2>情诗内容</h2><hr>";
echo "<h3>" . $model->p1 . "</h3>";
echo "<h3>" . $model->p2 . "</h3>";
Пример #18
0
foreach ($claimed_giftboxes as $claimed_giftbox) {
    ?>
        <li class="table-view-cell media">
            <a data-ignore='push' class="navigate-right" href="<?php 
    echo Url::to(['yaoyiyao', 'giftbox_id' => $claimed_giftbox->id, 'gh_id' => $observer->gh_id, 'openid' => $observer->openid]);
    ?>
">
            <img class="media-object pull-left" src="<?php 
    echo $claimed_giftbox->claimer->headImgUrl;
    ?>
" width="64" height="64">

        <div class="media-body">
          <!--粉丝昵称--> 
          <?php 
    echo emoji_unified_to_html(emoji_softbank_to_unified($claimed_giftbox->claimer->nickname));
    ?>
          <p>
              抢礼盒时间:<?php 
    echo date('Y-m-d H:i:s', $claimed_giftbox->claiming_time);
    ?>
          </p>
        </div>
            </a>
        </li>
        <?php 
}
?>
    </ul>

        </div>
Пример #19
0
</h1>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

    <!--
    <p>
        <//?= Html::a('Create Mhd201509t4', ['create'], ['class' => 'btn btn-success']) ?>
    </p>
    -->

    <p>
    <?php 
echo Html::a('下载 <i class="glyphicon glyphicon-arrow-down"></i>', U::current(['download' => 1]), ['class' => 'btn btn-success', 'data-pjax' => '0']);
?>
    </p>

    
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['label' => '微信昵称', 'format' => 'html', 'value' => function ($model, $key, $index, $column) {
    $user = $model->user;
    return empty($user) ? '' : "<img width=48 src=" . $model->user->headimgurl . "><br>" . emoji_unified_to_html(emoji_softbank_to_unified($user->nickname));
}, 'filter' => false, 'headerOptions' => array('style' => 'width:90px;')], 'mobile', 'score', 'create_time', ['attribute' => 'status', 'label' => '状态', 'value' => function ($model, $key, $index, $column) {
    return MHd201509t4::gethd201509t4StatusOption($model->status);
}, 'filter' => MHd201509t4::gethd201509t4StatusOption(), 'headerOptions' => array('style' => 'width:120px;')], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update}', 'buttons' => ['update' => function ($url, $model) {
    return Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, ['title' => Yii::t('yii', 'Update'), 'data-pjax' => '0']);
}]]]]);
?>

</div>
Пример #20
0
<?php 
$columns = [['label' => '微信信息', 'format' => 'html', 'value' => function ($model, $key, $index, $column) {
    $nicknameStr = $model->nickname;
    $nickname = emoji_unified_to_html($nicknameStr);
    $headimgurl = empty($model->headimgurl) ? "<img style='float:left;' width=48 src='/wx/web/images/wxmpres/headimg-blank.png'>" : Html::img(app\models\U::getUserHeadimgurl($model->headimgurl, 48), ['style' => 'width:46px;']);
    return "{$headimgurl}";
}, 'headerOptions' => array('style' => 'width:5%;')], ['attribute' => 'nickname', 'label' => '', 'format' => 'html', 'value' => function ($model, $key, $index, $column) {
    $nicknameStr = $model->nickname;
    /*
        //function emoji_docomo_to_unified(   $text){ return emoji_convert($text, 'docomo_to_unified'); }
        //function emoji_kddi_to_unified(     $text){ return emoji_convert($text, 'kddi_to_unified'); }
        function emoji_softbank_to_unified( $text){ return emoji_convert($text, 'softbank_to_unified'); }
        //function emoji_google_to_unified(   $text){ return emoji_convert($text, 'google_to_unified'); }
    */
    $nickname = emoji_unified_to_html(emoji_softbank_to_unified($nicknameStr));
    $mobiles = $model->getBindMobileNumbers();
    $mobile = empty($mobiles) ? '无' : implode(',', $mobiles);
    //$headimgurl = empty($model->headimgurl) ? '' : Html::img(app\models\U::getUserHeadimgurl($model->headimgurl, 46), ['style'=>'width:46px;']);
    return "<span style='color:#aaa'>昵称 " . $nickname . "<br>地区 " . $model->country . "&nbsp;" . $model->province . "&nbsp;" . $model->city . "<br>绑定手机 " . $mobile . "</span>";
}, 'headerOptions' => array('style' => 'width:18%;')], ['label' => '绑定手机号', 'attribute' => 'mobile', 'format' => 'html', 'value' => function ($model, $key, $index, $column) {
    $mobiles = $model->getBindMobileNumbers();
    return empty($mobiles) ? '' : implode(',', $mobiles);
}, 'headerOptions' => array('style' => 'width:10%;')], ['label' => '关注时间', 'attribute' => 'create_time', 'filterType' => \kartik\grid\GridView::FILTER_DATE, 'format' => 'raw', 'filterWidgetOptions' => ['type' => \kartik\widgets\DatePicker::TYPE_RANGE, 'attribute2' => 'create_time_2', 'pluginOptions' => ['format' => 'yyyy-mm-dd', 'language' => 'zh-CN']], 'headerOptions' => array('style' => 'width:35%;')], ['attribute' => 'staff_name', 'label' => '推广者', 'format' => 'html', 'value' => function ($model, $key, $index, $column) {
    if (empty($model->sceneStaff)) {
        return '';
    }
    $nickname = $model->nickname;
    $staff = $model->sceneStaff;
    if ($staff->cat == 0) {
        $row['scene_pid_name'] = empty($staff->name) ? '' : $staff->name;
Пример #21
0
is(emoji_html_to_unified($test_html), $test_unified, "HTML -> Unified");
echo "#------------------\n";
#
# some emoji (e-82C thru e-837 and others) use 2 codepoints in the
# unified mode, but just one in phone modes. test that it works as
# expected
#
$test_unified = "Hello " . utf8_bytes(0x36) . utf8_bytes(0x20e3);
$test_iphone = "Hello " . utf8_bytes(0xe221);
$test_docomo = "Hello " . utf8_bytes(0xe6e7);
$test_kddi = "Hello " . utf8_bytes(0xe527);
$test_google = "Hello " . utf8_bytes(0xfe833);
$test_html = "Hello <span class=\"emoji emoji3620e3\"></span>";
is(emoji_docomo_to_unified($test_docomo), $test_unified, "DoCoMo -> Unified");
is(emoji_kddi_to_unified($test_kddi), $test_unified, "KDDI -> Unified");
is(emoji_softbank_to_unified($test_iphone), $test_unified, "Softbank -> Unified");
is(emoji_google_to_unified($test_google), $test_unified, "Google -> Unified");
echo "#------------------\n";
is(emoji_unified_to_docomo($test_unified), $test_docomo, "Unified -> DoCoMo");
is(emoji_unified_to_kddi($test_unified), $test_kddi, "Unified -> KDDI");
is(emoji_unified_to_softbank($test_unified), $test_iphone, "Unified -> Softbank");
is(emoji_unified_to_google($test_unified), $test_google, "Unified -> Google");
echo "#------------------\n";
is(emoji_unified_to_html($test_unified), $test_html, "Unified -> HTML");
is(emoji_html_to_unified($test_html), $test_unified, "HTML -> Unified");
echo "#------------------\n";
#
# names are accessed by the unified codepoint (which makes it tricky for 2-codepoint unicode symbols)
#
is(emoji_get_name(utf8_bytes(0x2600)), 'BLACK SUN WITH RAYS', "name U+2600");
is(emoji_get_name(utf8_bytes(0x26ea)), 'CHURCH', "name U+26EA");
Пример #22
0
            ?>
                                    <li>
                                            <div class="col1">
                                                    <div class="cont">
                                                            <div class="cont-col1">
                                                                    <div>
                                                                        <img style='width:32px;height:32px;' src="<?php 
            echo $promotee->getHeadImgUrl();
            ?>
" />    
                                                                    </div>
                                                            </div>
                                                            <div class="cont-col2">
                                                                    <div class="desc">
                                                                            <?php 
            echo emoji_unified_to_html(emoji_softbank_to_unified($promotee->nickname));
            ?>
                                                                        <?php 
            if (!empty($promotee->openidBindMobiles)) {
                echo '<span class="badge btn-success">会员</span>';
            }
            ?>
                                                                    </div>
                                                            </div>
                                                    </div>
                                            </div>
                                            <div class="col2">
                                                    <div class="date" style='padding:0px;'>
                                                             <?php 
            echo $promotee->create_time;
            ?>
function BK_emoji_decode($text)
{
    return emoji_unified_to_html(emoji_softbank_to_unified($text));
}
Пример #24
0
<?php 
include '../models/utils/emoji.php';
?>


<div class="mhd201509t4-form">

    <?php 
$form = ActiveForm::begin();
?>


    <?php 
echo "<img width=81 src=" . $model->user->headimgurl . ">";
echo "<h3>" . emoji_unified_to_html(emoji_softbank_to_unified($model->user->nickname)) . "</h3><br>";
?>


    <?php 
echo "<h3>捐献积分: " . $model->score . "</h3>";
echo "<h3>手机号码: " . $model->mobile . "</h3>";
echo "<h3>捐献时间: " . $model->create_time . "</h3>";
?>


    <!--
    <//?= $form->field($model, 'gh_id')->textInput(['maxlength' => 255]) ?>

    <//?= $form->field($model, 'openid')->textInput(['maxlength' => 255]) ?>
Пример #25
0
        if ($maxid <= $num) {
            if ($xuanzezu[22]) {
                for (; $q[0] == '';) {
                    $conut = rand(1, $num - 1);
                    $sql1 = "SELECT * FROM  `weixin_wall` where `num` = '{$conut}' limit 1 ";
                    $query1 = mysql_query($sql1, $link);
                    $q = mysql_fetch_row($query1);
                    $q[3] = $lastid;
                }
            }
            break;
        }
    }
}
$q[5] = pack('H*', $q[5]);
$q = emoji_unified_to_html(emoji_softbank_to_unified($q));
$id = $q[0];
$fakeid = $q[2];
$num = $q[3];
$content = $q[4];
$content = biaoqing($content);
$nickname = $q[5];
$avatar = $q[6];
$ret = $q[7];
$image = $q[9];
if ($q[3]) {
    @($msg = array(data => array(array("id" => $id, "fakeid" => $fakeid, "num" => $num, "content" => $content, "nickname" => $nickname, "avatar" => $avatar, "image" => $image)), ret => 1));
    echo $msg = json_encode($msg);
}
if (!$q[3]) {
    @($msg = array(data => array(), ret => 0));
Пример #26
0
    </li>
        <?php 
foreach ($total_rewards as $reward) {
    ?>
        <li class="table-view-cell media">


            <img class="media-object pull-left" src="<?php 
    echo $reward->winner->headImgUrl;
    ?>
" width="64" height="64">

        <div class="media-body">
          <!--粉丝昵称--> 
          <?php 
    echo emoji_unified_to_html(emoji_softbank_to_unified($reward->winner->nickname));
    ?>
          <p>
              抽奖时间:<?php 
    echo date('Y-m-d H:i:s', $reward->win_time);
    ?>
          </p>
        </div>
           
        </li>
        <?php 
}
?>
    </ul>
        </div>
    </div>