weixin_model->get_openid ( $openid ); $this->load->view ( 'nwxin/index' ); } function user(){ $this->load->view ( 'nwxin/user' ); } function from(){ $this->load->view ( 'nwxin/from' ); } function download() { $this->load->view ( 'wxin/header' ); $this->load->view ( 'wxin/download' ); $this->load->view ( 'wxin/footer' ); } function tudi() { $openid = 'oJ7rwvxBpSfeKX9dOXT_VgbayvQA'; $uid = $this->weixin_model->get_openid ( $openid ); // 获取三级推广总人数及用户信息 $user = $this->sel_reg_num ( $uid ['id'], true ); if ($user) { $data ['user'] = $user; } else { $data ['kong'] = true; } $this->load->view ( 'wxin/header' ); $this->load->view ( 'wxin/jifeng', $data ); $this->load->view ( 'wxin/footer' ); } function read() { $this->load->view ( 'wxin/header' ); $this->load->view ( 'wxin/read' ); $this->load->view ( 'wxin/footer' ); } function admin() { $this->load->model ( 'weixin_model' ); $openid = 'uids'; $data ['result'] = $this->weixin_model->select_all_user (); $data ['a_main_content'] = "user_list"; $this->load->view ( 'wxin/a_template', $data ); } // 关注成功 function follow() { if ($_POST) { // 注册openid $data = array (); $data ['openid'] = "extendpopularizegeneralize"; $data ['bid'] = "1"; $uid = $this->weixin_model->openid_insert ( $data ); // 注册user $db = array (); $db ['name'] = "测试关注"; $db ['img'] = "123"; $db ['uid'] = $uid; $db ['reg_money'] = 2; $db ['date_time'] = time (); $result = $this->weixin_model->user_insert ( $db ); // 注册签到信息推广信息 $dbs ['uid'] = $uid; $this->weixin_model->sign_insert ( $dbs ); $this->weixin_model->adv_insert ( $dbs ); if ($result) { echo $result; } else { echo "关注失败"; } } else { echo "thinkK,plese to psost"; } } // 统计uid = 1 的三级分销注册人数 private function sel_reg_num($uid = 1, $return = false) { $channels = $this->weixin_model->select_all_openid (); $html = array (); $this->getChild ( $html, $uid, $channels, 0 ); if (! $return) { return count ( $html ); } else { if ($html) { foreach ( $html as $v ) { $htmls [] = $this->weixin_model->get_user ( $v ['id'] ); } return $htmls; } else { return false; } } } function getChild(&$html, $parid, $channels, $dep) { /* * 查詢數據,查詢三級用戶 */ $t = $dep + 1; if ($t < 4) { for($i = 0; $i < count ( $channels ); $i ++) { if ($channels [$i] ['upid'] == $parid) { $html [] = array ( 'id' => $channels [$i] ['id'], 'upid' => $channels [$i] ['upid'] ); $this->getChild ( $html, $channels [$i] ['id'], $channels, $t ); } } } } public function er() { // $uid = 1; // $er = $this->mywechat->getQRCode($uid); // print_r($er); // $image_url = $this->mywechat->getQRUrl($er['ticket']); // echo $image_url; $this->is_image_article = TRUE; $img_name = FCPATH . "208695070736256338.jpg"; $imagepath1 = FCPATH . "showqrcode"; // 水印图片地址 $img_info = $this->getImageInfos ( $imagepath1 ); $this->_img_resize ( $imagepath1 ); $this->_img_water ( $img_name ); } function getImageInfos($image) { $imageInfo = getimagesize ( $image ); switch ($imageInfo ['2']) { case 1 : $imtype = "gif"; break; case 2 : $imtype = "jpeg"; break; case 3 : $imtype = "png"; break; } $img_size = ceil ( filesize ( $image ) / 1000 ); $new_img_info = array ( "width" => $imageInfo ['0'], "height" => $imageInfo ['1'], "type" => $imtype, "size" => $img_size ); return $new_img_info; } private function _img_resize($newpath, $imgtype = 'jpeg', $width = 430, $height = 430, $resize = "235", $creatimg = false) { $this->load->library ( 'image' ); $imageckqq = $this->image->testckqq ( $newpath ); $this->load->library ( 'image/draw/resize' ); $imageckqq->attach ( $this->resize->resizeckqq ( $width, $height, $resize ) ); if (! $creatimg) { switch ($imgtype) { case 'png' : $imageckqq->imagePng ( $newpath ); break; case 'jpeg' : $imageckqq->imageJpegs ( $newpath ); default : false; } } else { switch ($imgtype) { case 'png' : $imageckqq->imagePng ( $newpath ); break; case 'jpeg' : $imageckqq->imageJpegs ( $newpath ); default : false; } } } private function _img_water($newpath_img_name, $imgtype = 'jpeg') { $this->load->library ( 'image' ); $imageckqq = $this->image->testckqq ( $newpath_img_name ); $this->load->library ( 'image/draw/watermark' ); $imagepath1 = FCPATH . "showqrcode"; // 水印图片地址 $head_image = $this->image->testckqq ( $imagepath1 ); $watermarkhead = $this->watermark->watermarkckqq ( $head_image ); // logo图标位置 tl:上左 tm:上中 tr:上右 中左: ml mm lr 下边 bl bm br $watermarkhead->setPosition ( "user" ); $imageckqq->attach ( $watermarkhead ); switch ($imgtype) { case 'png' : $imageckqq->imagePng ( $newpath_img_name ); break; case 'jpeg' : $imageckqq->imageJpegs ( $newpath_img_name ); default : false; } } } ?>
陳述
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章
R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
3 週前By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.最佳圖形設置
3 週前By尊渡假赌尊渡假赌尊渡假赌
刺客信條陰影:貝殼謎語解決方案
1 週前ByDDD
R.E.P.O.如果您聽不到任何人,如何修復音頻
3 週前By尊渡假赌尊渡假赌尊渡假赌
在哪裡可以找到原子中的起重機控制鑰匙卡
1 週前ByDDD

熱工具

記事本++7.3.1
好用且免費的程式碼編輯器

PhpStorm Mac 版本
最新(2018.2.1 )專業的PHP整合開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

EditPlus 中文破解版
體積小,語法高亮,不支援程式碼提示功能

mPDF
mPDF是一個PHP庫,可以從UTF-8編碼的HTML產生PDF檔案。原作者Ian Back編寫mPDF以從他的網站上「即時」輸出PDF文件,並處理不同的語言。與原始腳本如HTML2FPDF相比,它的速度較慢,並且在使用Unicode字體時產生的檔案較大,但支援CSS樣式等,並進行了大量增強。支援幾乎所有語言,包括RTL(阿拉伯語和希伯來語)和CJK(中日韓)。支援嵌套的區塊級元素(如P、DIV),