用了多年的自动升级小工具《KDBOSS升级助手》

作者: 傻猫    分类: 搞软件     发布时间: 06-17 10:52    浏览次数: 288     无留言

这个小工具软件好像是8年前做的,那一年公司开年会,我知道我没有中奖命(年会抽奖也重来没有中过,虽然抽奖程序是我们部门搞的,全是随机选择,绝对没有内幕),边看节目边做的小工具软件,用作客户端软件升级多年,相当的稳定和好用,开源出来给需要的朋友吧。

主要功能:
1、采用idhttp下载
2、ini作配置文件
3、支持下载进度百分比
4、支持下载速率显示
5、支持自动下载和自动更新

KDBOSS升级助手.png

查看更多内容...

Vue学习笔记(一)

作者: 傻猫    分类: 搞软件     发布时间: 06-14 22:36    浏览次数: 234     无留言

Vue变异方法

Vue 将被侦听的数组的变异方法进行了包裹,所以它们也将会触发视图更新。

这些被包裹过的方法包括:

push()
pop()
shift()
unshift()
splice()
sort()
reverse()

查看更多内容...

Vue组件实例

作者: 傻猫    分类: 搞软件     发布时间: 06-14 22:34    浏览次数: 201     无留言

免费微信营销软件-轻武CRM

作者: 傻猫    分类: 搞软件 ,黑科技    发布时间: 06-12 20:50    浏览次数: 276     1 条留言

《微信营销系统-轻武CRM》是基于微信公众号开发的一个营销SASS软件,免费的微信广告,利用微信大数据拓客,分享知识,筛选客户,挖掘潜在客户,通过用户画像实现精准营销。“谁看过我的朋友圈?”、“我发布的文章是否有被转发过?”、“我朋友圈的人脉关系链是啥样的?”、“我的影响力中心是谁?”、“我的产品和活动谁在关注?” ,一网打尽所有潜在客户,轻武CRM微客能帮助你实现以上功能。

查看更多内容...

恭喜【轻武CRM营销系统】上线一个月,用户破万人!!!

作者: 傻猫    分类: 搞软件 ,黑科技    发布时间: 05-15 21:33    浏览次数: 467     2 条留言

《轻武CRM-营销系统》正式上线一个月时间,拓客用户突破1万人,会员数近百人!!

《轻武CRM-营销系统》由萨莫尔科技自主研发完成,采用了MVC开发模式,开发语言为PHP+MYSQL,前端使用weui+bootstarp完成,开发时间历时8个月,新亮点、新功能还在持续研发。

我们深耕CRM系统开发多年,十年磨一剑,力求为客户创造更高的价值,追求卓越是我们永远不变目标!

查看更多内容...

php json转换为数组调用的问题处理

作者: 傻猫    分类: 搞软件     发布时间: 05-05 20:55    浏览次数: 285     无留言

微信公众号JS-SDK界面操作技巧

作者: 傻猫    分类: 搞软件     发布时间: 05-04 15:04    浏览次数: 294     无留言

关闭当前网页窗口接口
wx.closeWindow();

批量隐藏功能按钮接口
wx.hideMenuItems({
menuList: [] // 要隐藏的菜单项,只能隐藏“传播类”和“保护类”按钮,所有menu项见附录3
});

查看更多内容...

[PHP]微信公众号平台开发接口SDK

作者: 傻猫    分类: 搞软件     发布时间: 04-29 20:41    浏览次数: 296     无留言

微信公众号平台开发接口SDK

    define("TOKEN", "weixin");
    $wechatObj = new wechatCallbackapiTest();    
    if (!isset($_GET['echostr'])) {    
        $wechatObj->responseMsg();    
    }else{    
        $wechatObj->valid();    
    }   
     
<!--more-->
    class wechatCallbackapiTest    
    {
    
        //验证签名    
        public function valid()    
        {    
            $echoStr = $_GET["echostr"];    
            $signature = $_GET["signature"];    
            $timestamp = $_GET["timestamp"];    
            $nonce = $_GET["nonce"];    
            $token = TOKEN;    
            $tmpArr = array($token, $timestamp, $nonce);    
            sort($tmpArr, SORT_STRING);    
            $tmpStr = implode($tmpArr);    
            $tmpStr = sha1($tmpStr);    
            if($tmpStr == $signature){    
                echo $echoStr;    
                exit;    
            }
    
        }    
     
    
        //响应消息    
        public function responseMsg()    
        {    
            $postStr = $GLOBALS["HTTP_RAW_POST_DATA"];    
            if (!empty($postStr)){    
                $this->logger("R \r\n".$postStr);    
                $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);    
                $RX_TYPE = trim($postObj->MsgType); 
        
                if (($postObj->MsgType == "event") && ($postObj->Event == "subscribe" || $postObj->Event == "unsubscribe")){    
                    //过滤关注和取消关注事件    
                }else{  
                }
    
                 
    
                //消息类型分离    
                switch ($RX_TYPE)    
                {
                        case "event":    
                        $result = $this->receiveEvent($postObj);    
                        break;    
                    case "text":    
                       if (strstr($postObj->Content, "第三方")){    
                            $result = $this->relayPart3("http://www.fangbei.org/test.php".'?'.$_SERVER['QUERY_STRING'], $postStr);    
                        }else{    
                            $result = $this->receiveText($postObj);    
                        }    
                        break;    
                    case "image":    
                        $result = $this->receiveImage($postObj);    
                        break;    
                    case "location":    
                        $result = $this->receiveLocation($postObj);    
                        break;    
                    case "voice":    
                        $result = $this->receiveVoice($postObj);    
                        break;    
                    case "video":    
                        $result = $this->receiveVideo($postObj);    
                        break;    
                    case "link":    
                        $result = $this->receiveLink($postObj);    
                        break;    
                    default:    
                        $result = "unknown msg type: ".$RX_TYPE;    
                        break;    
                }
    
                $this->logger("T \r\n".$result);    
                echo $result;    
            }else {    
                echo "";    
                exit;    
            }
    
        }
    
     
    
        //接收事件消息    
        private function receiveEvent($object)    
        {
    
            $content = "";    
            switch ($object->Event)    
            {    
                case "subscribe":    
                    $content = "欢迎关注方倍工作室 ";    
                    $content .= (!empty($object->EventKey))?("\n来自二维码场景 ".str_replace("qrscene_","",$object->EventKey)):"";    
                    break;    
                case "unsubscribe":    
                    $content = "取消关注";    
                    break;    
                case "CLICK":    
                    switch ($object->EventKey)    
                    {    
                        case "COMPANY":    
                            $content = array();    
                            $content[] = array("Title"=>"方倍工作室", "Description"=>"", "PicUrl"=>"http://discuz.comli.com/weixin/weather/icon/cartoon.jpg", "Url" =>"http://m.cnblogs.com/?u=txw1958");    
                            break;    
                        default:    
                            $content = "点击菜单:".$object->EventKey;    
                            break;    
                    }    
                    break;    
                case "VIEW":    
                    $content = "跳转链接 ".$object->EventKey;    
                    break;    
                case "SCAN":    
                    $content = "扫描场景 ".$object->EventKey;    
                    break;    
                case "LOCATION":    
                    $content = "上传位置:纬度 ".$object->Latitude.";经度 ".$object->Longitude;    
                    break;    
                case "scancode_waitmsg":    
                    if ($object->ScanCodeInfo->ScanType == "qrcode"){    
                        $content = "扫码带提示:类型 二维码 结果:".$object->ScanCodeInfo->ScanResult;    
                    }else if ($object->ScanCodeInfo->ScanType == "barcode"){    
                        $codeinfo = explode(",",strval($object->ScanCodeInfo->ScanResult));    
                        $codeValue = $codeinfo[1];    
                        $content = "扫码带提示:类型 条形码 结果:".$codeValue;    
                    }else{    
                        $content = "扫码带提示:类型 ".$object->ScanCodeInfo->ScanType." 结果:".$object->ScanCodeInfo->ScanResult;    
                    }
    
                    break;    
                case "scancode_push":    
                    $content = "扫码推事件";    
                    break;    
                case "pic_sysphoto":    
                    $content = "系统拍照";    
                    break;    
                case "pic_weixin":    
                    $content = "相册发图:数量 ".$object->SendPicsInfo->Count;    
                    break;    
                case "pic_photo_or_album":    
                    $content = "拍照或者相册:数量 ".$object->SendPicsInfo->Count;    
                    break;
    
                case "location_select":
    
                    $content = "发送位置:标签 ".$object->SendLocationInfo->Label;
    
                    break;
    
                default:
    
                    $content = "receive a new event: ".$object->Event;
    
                    break;
    
            }
    
     
    
            if(is_array($content)){
    
                if (isset($content[0]['PicUrl'])){
    
                    $result = $this->transmitNews($object, $content);
    
                }else if (isset($content['MusicUrl'])){
    
                    $result = $this->transmitMusic($object, $content);
    
                }
    
            }else{
    
                $result = $this->transmitText($object, $content);
    
            }
    
            return $result;
    
        }
    
     
    
        //接收文本消息
    
        private function receiveText($object)
    
        {
    
            $keyword = trim($object->Content);
    
            //多客服人工回复模式
    
            if (strstr($keyword, "请问在吗") || strstr($keyword, "在线客服")){
    
                $result = $this->transmitService($object);
    
                return $result;
    
            }
    
     
    
            //自动回复模式
    
            if (strstr($keyword, "文本")){
    
                $content = "这是个文本消息";
    
            }else if (strstr($keyword, "表情")){
    
                $content = "中国:".$this->bytes_to_emoji(0x1F1E8).$this->bytes_to_emoji(0x1F1F3)."\n仙人掌:".$this->bytes_to_emoji(0x1F335);
    
            }else if (strstr($keyword, "单图文")){
    
                $content = array();
    
                $content[] = array("Title"=>"单图文标题",  "Description"=>"单图文内容", "PicUrl"=>"http://discuz.comli.com/weixin/weather/icon/cartoon.jpg", "Url" =>"http://m.cnblogs.com/?u=txw1958");
    
            }else if (strstr($keyword, "图文") || strstr($keyword, "多图文")){
    
                $content = array();
    
                $content[] = array("Title"=>"多图文1标题", "Description"=>"", "PicUrl"=>"http://discuz.comli.com/weixin/weather/icon/cartoon.jpg", "Url" =>"http://m.cnblogs.com/?u=txw1958");
    
                $content[] = array("Title"=>"多图文2标题", "Description"=>"", "PicUrl"=>"http://d.hiphotos.bdimg.com/wisegame/pic/item/f3529822720e0cf3ac9f1ada0846f21fbe09aaa3.jpg", "Url" =>"http://m.cnblogs.com/?u=txw1958");
    
                $content[] = array("Title"=>"多图文3标题", "Description"=>"", "PicUrl"=>"http://g.hiphotos.bdimg.com/wisegame/pic/item/18cb0a46f21fbe090d338acc6a600c338644adfd.jpg", "Url" =>"http://m.cnblogs.com/?u=txw1958");
    
            }else if (strstr($keyword, "音乐")){
    
                $content = array();
    
                $content = array("Title"=>"最炫民族风", "Description"=>"歌手:凤凰传奇", "MusicUrl"=>"http://121.199.4.61/music/zxmzf.mp3", "HQMusicUrl"=>"http://121.199.4.61/music/zxmzf.mp3"); 
    
            }else{
    
                $content = date("Y-m-d H:i:s",time())."\nOpenID:".$object->FromUserName."\n技术支持 方倍工作室";
    
            }
    
     
    
            if(is_array($content)){
    
                if (isset($content[0])){
    
                    $result = $this->transmitNews($object, $content);
    
                }else if (isset($content['MusicUrl'])){
    
                    $result = $this->transmitMusic($object, $content);
    
                }
    
            }else{
    
                $result = $this->transmitText($object, $content);
    
            }
    
            return $result;
    
        }
    
     
    
        //接收图片消息
    
        private function receiveImage($object)
    
        {
    
            $content = array("MediaId"=>$object->MediaId);
    
            $result = $this->transmitImage($object, $content);
    
            return $result;
    
        }
    
     
    
        //接收位置消息
    
        private function receiveLocation($object)
    
        {
    
            $content = "你发送的是位置,经度为:".$object->Location_Y.";纬度为:".$object->Location_X.";缩放级别为:".$object->Scale.";位置为:".$object->Label;
    
            $result = $this->transmitText($object, $content);
    
            return $result;
    
        }
    
     
    
        //接收语音消息
    
        private function receiveVoice($object)
    
        {
    
            if (isset($object->Recognition) && !empty($object->Recognition)){
    
                $content = "你刚才说的是:".$object->Recognition;
    
                $result = $this->transmitText($object, $content);
    
            }else{
    
                $content = array("MediaId"=>$object->MediaId);
    
                $result = $this->transmitVoice($object, $content);
    
            }
    
            return $result;
    
        }
    
     
    
        //接收视频消息
    
        private function receiveVideo($object)
    
        {
    
            $content = array("MediaId"=>$object->MediaId, "ThumbMediaId"=>$object->ThumbMediaId, "Title"=>"", "Description"=>"");
    
            $result = $this->transmitVideo($object, $content);
    
            return $result;
    
        }
    
     
    
        //接收链接消息
    
        private function receiveLink($object)
    
        {
    
            $content = "你发送的是链接,标题为:".$object->Title.";内容为:".$object->Description.";链接地址为:".$object->Url;
    
            $result = $this->transmitText($object, $content);
    
            return $result;
    
        }
    
     
    
        //回复文本消息
    
        private function transmitText($object, $content)
    
        {
    
            if (!isset($content) || empty($content)){
    
                return "";
    
            }
    
     
    
            $xmlTpl = "<xml>
    
        <ToUserName><![CDATA[%s]]></ToUserName>
    
        <FromUserName><![CDATA[%s]]></FromUserName>
    
        <CreateTime>%s</CreateTime>
    
        <MsgType><![CDATA[text]]></MsgType>
    
        <Content><![CDATA[%s]]></Content>
    
    </xml>";
    
            $result = sprintf($xmlTpl, $object->FromUserName, $object->ToUserName, time(), $content);
    
     
    
            return $result;
    
        }
    
     
    
        //回复图文消息
    
        private function transmitNews($object, $newsArray)
    
        {
    
            if(!is_array($newsArray)){
    
                return "";
    
            }
    
            $itemTpl = "        <item>
    
                <Title><![CDATA[%s]]></Title>
    
                <Description><![CDATA[%s]]></Description>
    
                <PicUrl><![CDATA[%s]]></PicUrl>
    
                <Url><![CDATA[%s]]></Url>
    
            </item>
    
    ";
    
            $item_str = "";
    
            foreach ($newsArray as $item){
    
                $item_str .= sprintf($itemTpl, $item['Title'], $item['Description'], $item['PicUrl'], $item['Url']);
    
            }
    
            $xmlTpl = "<xml>
    
        <ToUserName><![CDATA[%s]]></ToUserName>
    
        <FromUserName><![CDATA[%s]]></FromUserName>
    
        <CreateTime>%s</CreateTime>
    
        <MsgType><![CDATA[news]]></MsgType>
    
        <ArticleCount>%s</ArticleCount>
    
        <Articles>
    
    $item_str    </Articles>
    
    </xml>";
    
     
    
            $result = sprintf($xmlTpl, $object->FromUserName, $object->ToUserName, time(), count($newsArray));
    
            return $result;
    
        }
    
     
    
        //回复音乐消息
    
        private function transmitMusic($object, $musicArray)
    
        {
    
            if(!is_array($musicArray)){
    
                return "";
    
            }
    
            $itemTpl = "<Music>
    
            <Title><![CDATA[%s]]></Title>
    
            <Description><![CDATA[%s]]></Description>
    
            <MusicUrl><![CDATA[%s]]></MusicUrl>
    
            <HQMusicUrl><![CDATA[%s]]></HQMusicUrl>
    
        </Music>";
    
     
    
            $item_str = sprintf($itemTpl, $musicArray['Title'], $musicArray['Description'], $musicArray['MusicUrl'], $musicArray['HQMusicUrl']);
    
     
    
            $xmlTpl = "<xml>
    
        <ToUserName><![CDATA[%s]]></ToUserName>
    
        <FromUserName><![CDATA[%s]]></FromUserName>
    
        <CreateTime>%s</CreateTime>
    
        <MsgType><![CDATA[music]]></MsgType>
    
        $item_str
    
    </xml>";
    
     
    
            $result = sprintf($xmlTpl, $object->FromUserName, $object->ToUserName, time());
    
            return $result;
    
        }
    
     
    
        //回复图片消息
    
        private function transmitImage($object, $imageArray)
    
        {
    
            $itemTpl = "<Image>
    
            <MediaId><![CDATA[%s]]></MediaId>
    
        </Image>";
    
     
    
            $item_str = sprintf($itemTpl, $imageArray['MediaId']);
    
     
    
            $xmlTpl = "<xml>
    
        <ToUserName><![CDATA[%s]]></ToUserName>
    
        <FromUserName><![CDATA[%s]]></FromUserName>
    
        <CreateTime>%s</CreateTime>
    
        <MsgType><![CDATA[image]]></MsgType>
    
        $item_str
    
    </xml>";
    
     
    
            $result = sprintf($xmlTpl, $object->FromUserName, $object->ToUserName, time());
    
            return $result;
    
        }
    
     
    
        //回复语音消息
    
        private function transmitVoice($object, $voiceArray)
    
        {
    
            $itemTpl = "<Voice>
    
            <MediaId><![CDATA[%s]]></MediaId>
    
        </Voice>";
    
     
    
            $item_str = sprintf($itemTpl, $voiceArray['MediaId']);
    
            $xmlTpl = "<xml>
    
        <ToUserName><![CDATA[%s]]></ToUserName>
    
        <FromUserName><![CDATA[%s]]></FromUserName>
    
        <CreateTime>%s</CreateTime>
    
        <MsgType><![CDATA[voice]]></MsgType>
    
        $item_str
    
    </xml>";
    
     
    
            $result = sprintf($xmlTpl, $object->FromUserName, $object->ToUserName, time());
    
            return $result;
    
        }
    
     
    
        //回复视频消息
    
        private function transmitVideo($object, $videoArray)
    
        {
    
            $itemTpl = "<Video>
    
            <MediaId><![CDATA[%s]]></MediaId>
    
            <ThumbMediaId><![CDATA[%s]]></ThumbMediaId>
    
            <Title><![CDATA[%s]]></Title>
    
            <Description><![CDATA[%s]]></Description>
    
        </Video>";
    
     
    
            $item_str = sprintf($itemTpl, $videoArray['MediaId'], $videoArray['ThumbMediaId'], $videoArray['Title'], $videoArray['Description']);
    
     
    
            $xmlTpl = "<xml>
    
        <ToUserName><![CDATA[%s]]></ToUserName>
    
        <FromUserName><![CDATA[%s]]></FromUserName>
    
        <CreateTime>%s</CreateTime>
    
        <MsgType><![CDATA[video]]></MsgType>
    
        $item_str
    
    </xml>";
    
     
    
            $result = sprintf($xmlTpl, $object->FromUserName, $object->ToUserName, time());
    
            return $result;
    
        }
    
     
    
        //回复多客服消息
    
        private function transmitService($object)
    
        {
    
            $xmlTpl = "<xml>
    
        <ToUserName><![CDATA[%s]]></ToUserName>
    
        <FromUserName><![CDATA[%s]]></FromUserName>
    
        <CreateTime>%s</CreateTime>
    
        <MsgType><![CDATA[transfer_customer_service]]></MsgType>
    
    </xml>";
    
            $result = sprintf($xmlTpl, $object->FromUserName, $object->ToUserName, time());
    
            return $result;
    
        }
    
     
    
        //回复第三方接口消息
    
        private function relayPart3($url, $rawData)
    
        {
    
            $headers = array("Content-Type: text/xml; charset=utf-8");
    
            $ch = curl_init();
    
            curl_setopt($ch, CURLOPT_URL, $url);
    
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    
            curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    
            curl_setopt($ch, CURLOPT_POST, 1);
    
            curl_setopt($ch, CURLOPT_POSTFIELDS, $rawData);
    
            $output = curl_exec($ch);
    
            curl_close($ch);
    
            return $output;
    
        }
    
     
    
        //字节转Emoji表情
    
        function bytes_to_emoji($cp)
    
        {
    
            if ($cp > 0x10000){       # 4 bytes
    
                return chr(0xF0 | (($cp & 0x1C0000) >> 18)).chr(0x80 | (($cp & 0x3F000) >> 12)).chr(0x80 | (($cp & 0xFC0) >> 6)).chr(0x80 | ($cp & 0x3F));
    
            }else if ($cp > 0x800){   # 3 bytes
    
                return chr(0xE0 | (($cp & 0xF000) >> 12)).chr(0x80 | (($cp & 0xFC0) >> 6)).chr(0x80 | ($cp & 0x3F));
    
            }else if ($cp > 0x80){    # 2 bytes
    
                return chr(0xC0 | (($cp & 0x7C0) >> 6)).chr(0x80 | ($cp & 0x3F));
    
            }else{                    # 1 byte
    
                return chr($cp);
    
            }
    
        }
    
     
    
        //日志记录
    
        private function logger($log_content)
    
        {
    
            if(isset($_SERVER['HTTP_APPNAME'])){   //SAE
    
                sae_set_display_errors(false);
    
                sae_debug($log_content);
    
                sae_set_display_errors(true);
    
            }else if($_SERVER['REMOTE_ADDR'] != "127.0.0.1"){ //LOCAL
    
                $max_size = 1000000;
    
                $log_filename = "log.xml";
    
                if(file_exists($log_filename) and (abs(filesize($log_filename)) > $max_size)){unlink($log_filename);}
    
                file_put_contents($log_filename, date('Y-m-d H:i:s')." ".$log_content."\r\n", FILE_APPEND);
    
            }
    
        }
    
    }
    
    ?>

查看更多内容...

《轻武CRM微客》又双叒叕升级了

作者: 傻猫    分类: 搞软件     发布时间: 04-29 11:15    浏览次数: 291     无留言

天灵灵,地灵灵,太上老君显神灵
要想业务做得好,轻武CRM少不了
免费广告能拓客,大数据支持老铁
网络宣传不得了,影响力中心立找。

《轻武CRM微客》系统是基于微信开发的一个营销SASS软件,利用微信大数据拓客,分享知识,筛选客户,挖掘潜在客户,通过用户画像实现精准营销。“谁看过我的朋友圈?”、“我发布的文章是否有被转发过?”、“我朋友圈的人脉关系链是啥样的?”、“我的影响力中心是谁?”、“我的产品和活动谁在关注?” ,一网打尽所有潜在客户,轻武CRM微客能帮助你实现以上功能。

推荐给:微商、小微创业者、保险销售、房产销售、各种卖货大咖等(全行业销售人员均适用)

查看更多内容...

handsome 主题添加相关文章

作者: 傻猫    分类: 搞软件     发布时间: 04-26 00:17    浏览次数: 325     无留言

修改post.php

<?php if ($this->options->adContentPost != ""): ?>
                 <!--文章页脚的广告位-->
                 <?php $this->options->adContentPost(); ?>
<?php endif; ?>

查看更多内容...