From f447deadf472293fb4b0f7c9a8a8176c1833f39e Mon Sep 17 00:00:00 2001 From: star7th Date: Sun, 15 Jan 2017 12:37:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A1=B9=E7=9B=AE=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=BC=80=E6=94=BEAPI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/ItemController.class.php | 10 +- .../Controller/UpdateController.class.php | 12 + Application/Home/Model/ItemModel.class.php | 2 +- .../Home/Model/UserTokenModel.class.php | 6 +- Application/Home/View/Common/footer.html | 1 + Application/Home/View/Common/header.html | 1 + Application/Home/View/Item/setting.html | 490 ++++++++++++++++++ Application/Home/View/Item/show_regular.html | 30 +- Public/css/item/show.css | 7 +- Public/css/tab-tpl.css | 46 ++ Public/layer/layer.js | 2 + Public/layer/mobile/layer.js | 2 + Public/layer/mobile/need/layer.css | 1 + Public/layer/skin/default/icon-ext.png | Bin 0 -> 5911 bytes Public/layer/skin/default/icon.png | Bin 0 -> 11493 bytes Public/layer/skin/default/layer.css | 1 + Public/layer/skin/default/loading-0.gif | Bin 0 -> 5793 bytes Public/layer/skin/default/loading-1.gif | Bin 0 -> 701 bytes Public/layer/skin/default/loading-2.gif | Bin 0 -> 1787 bytes Sqlite/showdoc.db.php | Bin 258048 -> 258048 bytes composer.json | 2 +- index.php | 2 +- install/ajax.php | 4 + install/database.php | 6 + install/lang.en.php | 15 +- install/lang.zh.php | 19 +- server/Application/Api/Common/index.html | 1 + server/Application/Api/Conf/config.php | 38 ++ server/Application/Api/Conf/index.html | 1 + server/Application/Api/Conf/tags.php | 5 + .../Api/Controller/BaseController.class.php | 143 +++++ .../Api/Controller/ItemController.class.php | 276 ++++++++++ .../Api/Controller/MemberController.class.php | 91 ++++ server/Application/Api/Controller/index.html | 1 + .../Application/Api/Model/BaseModel.class.php | 17 + .../Application/Api/Model/ItemModel.class.php | 182 +++++++ .../Api/Model/ItemTokenModel.class.php | 41 ++ .../Application/Api/Model/UserModel.class.php | 48 ++ .../Api/Model/UserTokenModel.class.php | 34 ++ server/Application/Api/Model/index.html | 1 + server/Application/Api/View/index.html | 1 + server/Application/Api/index.html | 1 + server/Application/Common/Common/function.php | 196 +++++++ server/Application/Common/Common/index.html | 1 + server/Application/Common/Conf/config.php | 35 ++ server/Application/Common/Conf/index.html | 1 + server/Application/Common/index.html | 1 + server/Application/Home/Common/index.html | 1 + server/Application/Home/Conf/config.php | 4 + server/Application/Home/Conf/index.html | 1 + .../Home/Controller/IndexController.class.php | 8 + server/Application/Home/Controller/index.html | 1 + server/Application/Home/Model/index.html | 1 + server/Application/Home/View/index.html | 1 + server/Application/Home/index.html | 1 + server/Application/README.md | 1 + server/Application/Runtime/index.html | 1 + server/Application/index.html | 1 + server/README.md | 1 + server/index.php | 26 + 60 files changed, 1789 insertions(+), 33 deletions(-) create mode 100644 Application/Home/View/Item/setting.html create mode 100644 Public/css/tab-tpl.css create mode 100644 Public/layer/layer.js create mode 100644 Public/layer/mobile/layer.js create mode 100644 Public/layer/mobile/need/layer.css create mode 100644 Public/layer/skin/default/icon-ext.png create mode 100644 Public/layer/skin/default/icon.png create mode 100644 Public/layer/skin/default/layer.css create mode 100644 Public/layer/skin/default/loading-0.gif create mode 100644 Public/layer/skin/default/loading-1.gif create mode 100644 Public/layer/skin/default/loading-2.gif create mode 100644 server/Application/Api/Common/index.html create mode 100644 server/Application/Api/Conf/config.php create mode 100644 server/Application/Api/Conf/index.html create mode 100644 server/Application/Api/Conf/tags.php create mode 100644 server/Application/Api/Controller/BaseController.class.php create mode 100644 server/Application/Api/Controller/ItemController.class.php create mode 100644 server/Application/Api/Controller/MemberController.class.php create mode 100644 server/Application/Api/Controller/index.html create mode 100644 server/Application/Api/Model/BaseModel.class.php create mode 100644 server/Application/Api/Model/ItemModel.class.php create mode 100644 server/Application/Api/Model/ItemTokenModel.class.php create mode 100644 server/Application/Api/Model/UserModel.class.php create mode 100644 server/Application/Api/Model/UserTokenModel.class.php create mode 100644 server/Application/Api/Model/index.html create mode 100644 server/Application/Api/View/index.html create mode 100644 server/Application/Api/index.html create mode 100644 server/Application/Common/Common/function.php create mode 100644 server/Application/Common/Common/index.html create mode 100644 server/Application/Common/Conf/config.php create mode 100644 server/Application/Common/Conf/index.html create mode 100644 server/Application/Common/index.html create mode 100644 server/Application/Home/Common/index.html create mode 100644 server/Application/Home/Conf/config.php create mode 100644 server/Application/Home/Conf/index.html create mode 100644 server/Application/Home/Controller/IndexController.class.php create mode 100644 server/Application/Home/Controller/index.html create mode 100644 server/Application/Home/Model/index.html create mode 100644 server/Application/Home/View/index.html create mode 100644 server/Application/Home/index.html create mode 100644 server/Application/README.md create mode 100644 server/Application/Runtime/index.html create mode 100644 server/Application/index.html create mode 100644 server/README.md create mode 100644 server/index.php diff --git a/Application/Home/Controller/ItemController.class.php b/Application/Home/Controller/ItemController.class.php index 7afbd277e..8f7f41a2c 100644 --- a/Application/Home/Controller/ItemController.class.php +++ b/Application/Home/Controller/ItemController.class.php @@ -83,7 +83,7 @@ public function add(){ } return ; } - if ($item_id > 0 ) { + if ($item_id > 0 ) { $data = array( "item_name" => $item_name , "item_domain" => $item_domain , @@ -433,5 +433,13 @@ public function itemList(){ $this->sendResult($items); } + public function setting(){ + $login_user = $this->checkLogin(); + $item_id = I("item_id/d"); + $uid = $login_user['uid'] ; + $this->checkItemPermn($uid , $item_id) ; + $this->assign("item_id",$item_id); + $this->display(); + } } \ No newline at end of file diff --git a/Application/Home/Controller/UpdateController.class.php b/Application/Home/Controller/UpdateController.class.php index 0d910f408..b87805f8d 100644 --- a/Application/Home/Controller/UpdateController.class.php +++ b/Application/Home/Controller/UpdateController.class.php @@ -150,6 +150,18 @@ public function sqlite(){ )"; D("UserToken")->execute($sql); + //创建item_token表 + $sql = "CREATE TABLE IF NOT EXISTS `item_token` ( + `id` INTEGER PRIMARY KEY , + `item_id` int(11) NOT NULL DEFAULT '0' , + `api_key` CHAR(200) NOT NULL UNIQUE , + `api_token` CHAR(200) NOT NULL , + `addtime` int(11) NOT NULL DEFAULT '0' , + `last_check_time` int(11) NOT NULL DEFAULT '0' + )"; + D("UserToken")->execute($sql); + + echo 'OK!'; } diff --git a/Application/Home/Model/ItemModel.class.php b/Application/Home/Model/ItemModel.class.php index 2cc082853..857dbec35 100644 --- a/Application/Home/Model/ItemModel.class.php +++ b/Application/Home/Model/ItemModel.class.php @@ -46,7 +46,7 @@ public function import($json,$uid,$item_name= '',$item_description= '',$item_pas unset($json); if ($item) { if ($item['item_domain']) { - $item2 = D("Item")->where("item_domain = '$item[item_domain]' ")->find(); + $item2 = D("Item")->where("item_domain = '%s' ".array($item['item_domain']))->find(); if ($item2) { //个性域名已经存在 return false; diff --git a/Application/Home/Model/UserTokenModel.class.php b/Application/Home/Model/UserTokenModel.class.php index e028c445b..e754fe361 100644 --- a/Application/Home/Model/UserTokenModel.class.php +++ b/Application/Home/Model/UserTokenModel.class.php @@ -25,6 +25,10 @@ public function createToken($uid,$token_expire = 0 ){ } public function getToken($token){ - return $this->where("token='$token'")->find(); + return $this->where("token='%s'",array($token))->find(); + } + + public function setLastTime($token){ + return $this->where("token='%s'",array($token))->save(array("last_check_time"=>time())); } } \ No newline at end of file diff --git a/Application/Home/View/Common/footer.html b/Application/Home/View/Common/footer.html index 1a689fd03..2a75c5846 100644 --- a/Application/Home/View/Common/footer.html +++ b/Application/Home/View/Common/footer.html @@ -2,6 +2,7 @@ +
{:C("STATS_CODE")}
diff --git a/Application/Home/View/Common/header.html b/Application/Home/View/Common/header.html index 9753327ff..794c9de46 100644 --- a/Application/Home/View/Common/header.html +++ b/Application/Home/View/Common/header.html @@ -12,6 +12,7 @@ var DocConfig = { host: window.location.origin, app: "{:U('/')}", + server: "server/index.php?s=", pubile:"__PUBLIC__", } diff --git a/Application/Home/View/Item/setting.html b/Application/Home/View/Item/setting.html new file mode 100644 index 000000000..51fa91d13 --- /dev/null +++ b/Application/Home/View/Item/setting.html @@ -0,0 +1,490 @@ + + + + +
+
+
+ +

项目设置   返回

+
+
+ +
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+
+
+ +
+
+
+
+ +
+

+ + + + + + + + + + + + + +
用户名添加时间权限操作
+ +
+
+
+

+

你可以将项目转让给他人

+
+

+

删除后将不可恢复

+
+
+ +
+
+
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+
+ +
+
+
+
+

showdoc开放文档编辑的API,供使用者更加方便地操作文档数据。利用开放API,你可以自动化地完成很多事

+

关于API详细用法,请参考我们的API文档

+
+
+
+
+ +
+ +
+ + + + + + + + + + + + + + + + + diff --git a/Application/Home/View/Item/show_regular.html b/Application/Home/View/Item/show_regular.html index e50507c52..340c94b5d 100644 --- a/Application/Home/View/Item/show_regular.html +++ b/Application/Home/View/Item/show_regular.html @@ -1,6 +1,5 @@ - - +

{$item.item_name}

@@ -20,10 +19,7 @@
  • {$Think.Lang.export}
  • -
  • {$Think.Lang.update_info}
  • -
  • {$Think.Lang.manage_members}
  • -
  • {$Think.Lang.attorn}
  • -
  • {$Think.Lang.delete}
  • +
  • 项目设置
  • {$Think.Lang.goback}
  • @@ -116,10 +112,22 @@ ",success:function(e,i){l.bigimg=e.find(".layui-layer-phimg"),l.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),l.event(e),t.tab&&t.tab(d[u],e)},end:function(){l.end=!0,i(document).off("keyup",l.keyup)}},t))},function(){r.close(l.loadi),r.msg("当前图片地址异常
    是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){d.length>1&&l.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),s.html=i("html"),r.open=function(e){var t=new l(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.jquery),e.layer=r,t("layer",r)})):"function"==typeof define?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window); \ No newline at end of file diff --git a/Public/layer/mobile/layer.js b/Public/layer/mobile/layer.js new file mode 100644 index 000000000..f9cf69313 --- /dev/null +++ b/Public/layer/mobile/layer.js @@ -0,0 +1,2 @@ +/*! layer mobile-v2.0.0 Web弹层组件 MIT License http://layer.layui.com/mobile By 贤心 */ + ;!function(e){"use strict";var t=document,n="querySelectorAll",i="getElementsByClassName",a=function(e){return t[n](e)},s={type:0,shade:!0,shadeClose:!0,fixed:!0,anim:"scale"},l={extend:function(e){var t=JSON.parse(JSON.stringify(s));for(var n in e)t[n]=e[n];return t},timer:{},end:{}};l.touch=function(e,t){e.addEventListener("click",function(e){t.call(this,e)},!1)};var r=0,o=["layui-m-layer"],c=function(e){var t=this;t.config=l.extend(e),t.view()};c.prototype.view=function(){var e=this,n=e.config,s=t.createElement("div");e.id=s.id=o[0]+r,s.setAttribute("class",o[0]+" "+o[0]+(n.type||0)),s.setAttribute("index",r);var l=function(){var e="object"==typeof n.title;return n.title?'

    '+(e?n.title[0]:n.title)+"

    ":""}(),c=function(){"string"==typeof n.btn&&(n.btn=[n.btn]);var e,t=(n.btn||[]).length;return 0!==t&&n.btn?(e=''+n.btn[0]+"",2===t&&(e=''+n.btn[1]+""+e),'
    '+e+"
    "):""}();if(n.fixed||(n.top=n.hasOwnProperty("top")?n.top:100,n.style=n.style||"",n.style+=" top:"+(t.body.scrollTop+n.top)+"px"),2===n.type&&(n.content='

    '+(n.content||"")+"

    "),n.skin&&(n.anim="up"),"msg"===n.skin&&(n.shade=!1),s.innerHTML=(n.shade?"
    ':"")+'
    "+l+'
    '+n.content+"
    "+c+"
    ",!n.type||2===n.type){var d=t[i](o[0]+n.type),y=d.length;y>=1&&layer.close(d[0].getAttribute("index"))}document.body.appendChild(s);var u=e.elem=a("#"+e.id)[0];n.success&&n.success(u),e.index=r++,e.action(n,u)},c.prototype.action=function(e,t){var n=this;e.time&&(l.timer[n.index]=setTimeout(function(){layer.close(n.index)},1e3*e.time));var a=function(){var t=this.getAttribute("type");0==t?(e.no&&e.no(),layer.close(n.index)):e.yes?e.yes(n.index):layer.close(n.index)};if(e.btn)for(var s=t[i]("layui-m-layerbtn")[0].children,r=s.length,o=0;odiv{line-height:22px;padding-top:7px;margin-bottom:20px;font-size:14px}.layui-m-layerbtn{display:box;display:-moz-box;display:-webkit-box;width:100%;height:50px;line-height:50px;font-size:0;border-top:1px solid #D0D0D0;background-color:#F2F2F2}.layui-m-layerbtn span{display:block;-moz-box-flex:1;box-flex:1;-webkit-box-flex:1;font-size:14px;cursor:pointer}.layui-m-layerbtn span[yes]{color:#40AFFE}.layui-m-layerbtn span[no]{border-right:1px solid #D0D0D0;border-radius:0 0 0 5px}.layui-m-layerbtn span:active{background-color:#F6F6F6}.layui-m-layerend{position:absolute;right:7px;top:10px;width:30px;height:30px;border:0;font-weight:400;background:0 0;cursor:pointer;-webkit-appearance:none;font-size:30px}.layui-m-layerend::after,.layui-m-layerend::before{position:absolute;left:5px;top:15px;content:'';width:18px;height:1px;background-color:#999;transform:rotate(45deg);-webkit-transform:rotate(45deg);border-radius:3px}.layui-m-layerend::after{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}body .layui-m-layer .layui-m-layer-footer{position:fixed;width:95%;max-width:100%;margin:0 auto;left:0;right:0;bottom:10px;background:0 0}.layui-m-layer-footer .layui-m-layercont{padding:20px;border-radius:5px 5px 0 0;background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn{display:block;height:auto;background:0 0;border-top:none}.layui-m-layer-footer .layui-m-layerbtn span{background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn span[no]{color:#FD482C;border-top:1px solid #c2c2c2;border-radius:0 0 5px 5px}.layui-m-layer-footer .layui-m-layerbtn span[yes]{margin-top:10px;border-radius:5px}body .layui-m-layer .layui-m-layer-msg{width:auto;max-width:90%;margin:0 auto;bottom:-150px;background-color:rgba(0,0,0,.7);color:#fff}.layui-m-layer-msg .layui-m-layercont{padding:10px 20px} \ No newline at end of file diff --git a/Public/layer/skin/default/icon-ext.png b/Public/layer/skin/default/icon-ext.png new file mode 100644 index 0000000000000000000000000000000000000000..bbbb669bb311514baa5db3a6a00b4644d0e280f1 GIT binary patch literal 5911 zcmY+I2Q(bf_s2JgAUe^aMOKL(VwGqSy<0@0i{8cRqDzD%ST(B#i!4FHDp8XlI?-*k z=$*)lUVhK-{LcTJ|C}>3XXea%^WJ^;-tXtWSbbeJ3NjWl2n0f*p{@)EcPu#VNQl8z z1kb_-ZbS$r4I>h8JSVYx1)fR0)Sn&qHr}8y{y+4^AUz zcYBDagvi~yB6shN>mfA37p#|G7`9y&Ggi_)mcoDUevwZ%`QQ+u`Spkp9gx zTYuuo_8p5IL4SGDE=2#lxUGErKvu^NZ*;4Tj}QBeHs#sycwNE47h{3wpZ|9emH((u z9sRflNhSr++WU1KOOW>%Hbg-aK-&p%Q&ht?^+2LRNG+S62f~|#IHbK7^Ddkcx)J1Q z0S7-})`HegD(zyqd3ie^Xb3L+7UdQyoXc9w+U)bw_5iL6R1v||XHI%*wrz$^Hxo(q z4GqONss`jwc1leu&Ie}C_iF{Y#ELuWnzl6x0$Yn+EWq{3{85roZ0UUaYXG0b)L=y?`*9JA#80I z3P(##E(C&bEKxAud)k68*!7p?g7>p#8~i=*Q(G^3Q}7`S4GptXIHeC{8;MWMNzpPwJM({dpXnId*kn{Y5EiD@N@df+QF z=ydO?XqznoUo&{Dudh#pk{Zx!=;*Y&!4i%`+VW%iA)5@ZRhS}sZ!`B~ge$$|!57kC z871jaeGcN{4!xWL0L6rzKKTQ{CGhEnft!6{hpBOL@H)dt#qvkFpkh)jIe7!-rRUdp>qgmJfFq zu+`PvIwEDAvWR8v{he98pdc9`A)$|^)nqNRdM+;OA7%#BqsQ#odE$E4*4F56+(4$K zsq)ctF_F`f6JI+gX1PU8^4qTgCGJRhvcGj(PEM?EXEz`bdS^_aKk8|n(uNonokkJ~ zag?3Cy}{$huW)WWt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lksY%1dRPLe1Ns}S<7zZl4X4`IjduFGjlhl;}mcWunipGfOA#dbiKO88MYuL;| z78Y@6BWIJPudaUm&9&=VYl2++0HPq3$8ZbKiowDCTIV;j=?OTkU7U7fZn+FoMa~ZHJE)d>7*qHu zC>Y&Jgvnr=j)aUh;NzQzHp1KLJV=NN1RX$(v`@v&M)}h<(5k|V+7Q%36z?_(4G*I} zUOo-~8UAQR`Revs^Bt4RI&qgylU+xZi{6bqmwDql9u-#z}NQsG@MJ^i638u*#| bWW^%>x7XlHV^#Q1uOX^B?ki3(VEg|7!QHuF literal 0 HcmV?d00001 diff --git a/Public/layer/skin/default/loading-1.gif b/Public/layer/skin/default/loading-1.gif new file mode 100644 index 0000000000000000000000000000000000000000..db3a483e4b74971fbfb1cc0fb6499852cedfe650 GIT binary patch literal 701 zcmZ?wbhEHbRAo?Qn8?Ji_w)@mZNLBj|1&T!DE{a6a}5c0b_{Se(lcOY1PT3QVdY|A zV$cDyff`g97?`@J^shYqmS1s(LX_+4yGox$4el*+Jm?ved2^25GBru=T^dGm#<906 za&AQCZ08H8P;Bd&{NT;vl&}c_^L4%p?g_hjBu{YB29{c>Ob}p@z~Ks3xCw+@!HClp xtZ<(QPf3`00FNu+VbOvoEE+h73k#4LIKl$IE8t;)<_eUs!0QU6uz&iJhvXcHF*h)T1OnEW1i^?zgDfop1p?usL*#PMGT;HQkSO{q6FlJyb$PWkPf|h*eTST}7h8z$}MF(XD(aQ)ZLZ zM?v0rT<1C4XHn<6PbNA{XL@>1^)apdD_@tcYDrW#m`k#MmslI7p^P;Az74wGs`!SI zLs$GEZHsafXsu1i-WleMzAL(yw$-LK{0hv;6hrx8kx!!4$``dAyBnY9Jz&DqJo2$A z!(L$H=KqBeY~CF_viHPz^tTglc?D97CqEBjzUwH}7GI zapg8YZM~>2Wk%E$d&r@9ly9b4Q zJpM7T@}r63I(OExUlG%Xcjz3MU+9U^r!SkpjNThDtaP)7>j6L5z%o5|^hlVOyI*uY zt^UU6NTuY?(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k$Ie6;j=3IH=! zbF=z*Ey~m9+129pe!L-iTC|y_o0?=w^8T4YVnlg5JhgqFS2WuH?Wod+&e{=Wll1x0eCTTPsd-;_|T&F$tPXS>lE6g(QHXjYAwo=uUes! zO4MY@<0_2b)oINhJBI93U9ZnjXNpiZ7c~ZNm$4aOuHNiwktKcOa*qQB$hkL2Z?re} zuU-9ZWKIgcaT{N6;&zHJG#NNu5DFlnreSLPJ9Y=^dU+ z;MUOQ4Q((gXfL5Zz=ps<$d*1xq5Ev2O{+364M; zvcHfNNt?V=tMJM8AdmIN8NM 5.3.0 !'); // 开启调试模式 建议开发阶段开启 部署阶段注释或者设为false -//define('APP_DEBUG',True); +define('APP_DEBUG',True); // 定义应用目录 define('APP_PATH','./Application/'); diff --git a/install/ajax.php b/install/ajax.php index d7dd61932..388f01ac3 100644 --- a/install/ajax.php +++ b/install/ajax.php @@ -22,6 +22,10 @@ ajax_out(L("not_writable_runtime"),10095); } +if(!new_is_writeable("../server/Application/Runtime")){ + ajax_out(L("not_writable_server_runtime"),10095); +} + if(!new_is_writeable("../Application/Common/Conf/config.php")){ ajax_out(L("not_writable_config"),10094); } diff --git a/install/database.php b/install/database.php index ae9e398cd..7ebf667c7 100644 --- a/install/database.php +++ b/install/database.php @@ -32,6 +32,12 @@ echo L("not_writable_runtime").'
    '; $go = 0; } + +if(!new_is_writeable("../server/Application/Runtime")){ + echo L("not_writable_server_runtime").'
    '; + $go = 0; +} + if(!new_is_writeable("../Application/Common/Conf/config.php")){ echo L("not_writable_config").'
    '; $go = 0; diff --git a/install/lang.en.php b/install/lang.en.php index 3cdcb6007..8696c1284 100644 --- a/install/lang.en.php +++ b/install/lang.en.php @@ -17,13 +17,14 @@ "lock"=>'ShowDoc has been installed!If you want to reinstall,please delete file /install/install.lock ', - "not_writable_install"=>' Directory /install is not writable !', - "not_writable_upload"=>'Directory /Public/Uploads/ is not writable !', - "not_writable_runtime"=>'Directory /Application/Runtime is not writable !', - "not_writable_config"=>'File /Application/Common/Conf/config.php is not writable !', - "not_writable_home_config"=>'File /Application/Home/Conf/config.php is not writable !', - "not_writable_sqlite"=>'Directory /Sqlite is not writable !', - "not_writable_sqlite_db"=>'File /Sqlite/showdoc.db.php is not writable !', + "not_writable_install"=>' Directory install is not writable !', + "not_writable_upload"=>'Directory Public/Uploads/ is not writable !', + "not_writable_runtime"=>'Directory Application/Runtime is not writable !', + "not_writable_server_runtime"=>'Directory server/Application/Runtime is not writable !', + "not_writable_config"=>'File Application/Common/Conf/config.php is not writable !', + "not_writable_home_config"=>'File Application/Home/Conf/config.php is not writable !', + "not_writable_sqlite"=>'Directory Sqlite is not writable !', + "not_writable_sqlite_db"=>'File Sqlite/showdoc.db.php is not writable !', "install_success"=>'Installation success!Please delete the /install directory, avoid the script to be executed again', "install_config_not_writable"=>'Fail to write config file ', "db_wrong"=>'Database connection error', diff --git a/install/lang.zh.php b/install/lang.zh.php index 705e3b641..122f2a699 100644 --- a/install/lang.zh.php +++ b/install/lang.zh.php @@ -16,15 +16,16 @@ "FAQ"=>'常见问题', - "lock"=>'本程序已经安装过!如果要解除安装锁定,则可删除/install目录下的install.lock文件后再重新访问本页面', - "not_writable_install"=>'请赋予 /install 目录以可写权限!', - "not_writable_upload"=>'请赋予 /Public/Uploads/ 目录以可写权限!', - "not_writable_runtime"=>'请赋予 /Application/Runtime 目录以可写权限!', - "not_writable_config"=>'请赋予 /Application/Common/Conf/config.php 文件以可写权限!', - "not_writable_home_config"=>'请赋予 /Application/Home/Conf/config.php 文件以可写权限!
    (如果你确定赋予了文件权限但却一直看到此信息,则可考虑关闭selinux试试)', - "not_writable_sqlite"=>'请赋予 /Sqlite 目录以可写权限!', - "not_writable_sqlite_db"=>'请赋予 /Sqlite/showdoc.db.php 以可写权限!', - "install_success"=>'安装成功!建议删除/install目录,以免安装脚本被再次执行。', + "lock"=>'本程序已经安装过!如果要解除安装锁定,则可删除install目录下的install.lock文件后再重新访问本页面', + "not_writable_install"=>'请赋予 install 目录以可写权限!', + "not_writable_upload"=>'请赋予 Public/Uploads/ 目录以可写权限!', + "not_writable_runtime"=>'请赋予 Application/Runtime 目录以可写权限!', + "not_writable_server_runtime"=>'请赋予 server/Application/Runtime 目录以可写权限!', + "not_writable_config"=>'请赋予 Application/Common/Conf/config.php 文件以可写权限!', + "not_writable_home_config"=>'请赋予 Application/Home/Conf/config.php 文件以可写权限!
    (如果你确定赋予了文件权限但却一直看到此信息,则可考虑关闭selinux试试)', + "not_writable_sqlite"=>'请赋予 Sqlite 目录以可写权限!', + "not_writable_sqlite_db"=>'请赋予 Sqlite/showdoc.db.php 以可写权限!', + "install_success"=>'安装成功!建议删除install目录,以免安装脚本被再次执行。', "install_config_not_writable"=>'安装失败,配置文件写入错误!', "db_wrong"=>'数据库链接错误,请检查配置信息是否填写正确', "db_has_data"=>'检测到该数据库已经存在数据。请清理后再重试', diff --git a/server/Application/Api/Common/index.html b/server/Application/Api/Common/index.html new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/server/Application/Api/Common/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/server/Application/Api/Conf/config.php b/server/Application/Api/Conf/config.php new file mode 100644 index 000000000..61b4503d1 --- /dev/null +++ b/server/Application/Api/Conf/config.php @@ -0,0 +1,38 @@ +'配置值' + 'LANG_SWITCH_ON' => true, // 开启语言包功能 + 'LANG_AUTO_DETECT' => true, // 自动侦测语言 开启多语言功能后有效 + 'DEFAULT_LANG' => 'zh-cn', // 默认语言 + 'LANG_LIST' => 'zh-cn,en-us', // 允许切换的语言列表 用逗号分隔 + 'VAR_LANGUAGE' => 'l', // 默认语言切换变量 + //错误信息配置 + 'error_codes' => array( + + //通用性错误 :'错误代码'=>'英文描述' + 10101 => '未知错误', //未知错误导致请求接口失败(可能是参数缺失等问题) + 10102 => '你尚未登录', //你尚未登录 + 10103 => '没有权限', //权限不够 + + //用户类错误 + 10201 => 'Username has exist', //用户名已经存在 + 10202 => 'The email has exist', //注册邮箱已经存在 + 10204 => 'Username or password is wrong', //用户名或者密码错误 + 10205 => 'Wrong mobile format', //错误的手机号码格式 + 10206 => 'captcha wrong or expired', //验证码错误或者过期 + 10207 => ' There is no such name', //该昵称不存在 + 10208 => ' 密码错误', + 10209 => ' 该用户不存在或者尚未注册', + + //项目类错误 + 10301 => '没有项目访问权限', + 10302 => '没有项目管理权限', + 10303 => '不是项目创建者', + 10304 => '个性域名已经存在', + 10305 => '个性域名只能是字母或数字的组合', + 10306 => 'api_key 或 api_token 不匹配', + + + ), + 'API_LOG' => false , //是否开启API请求日志记录。如果开启,则记录每一个API请求的参数和返回结果,会生成很多日志 +); \ No newline at end of file diff --git a/server/Application/Api/Conf/index.html b/server/Application/Api/Conf/index.html new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/server/Application/Api/Conf/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/server/Application/Api/Conf/tags.php b/server/Application/Api/Conf/tags.php new file mode 100644 index 000000000..cced3c116 --- /dev/null +++ b/server/Application/Api/Conf/tags.php @@ -0,0 +1,5 @@ + array('Behavior\CheckLangBehavior'), +); \ No newline at end of file diff --git a/server/Application/Api/Controller/BaseController.class.php b/server/Application/Api/Controller/BaseController.class.php new file mode 100644 index 000000000..edfafc09a --- /dev/null +++ b/server/Application/Api/Controller/BaseController.class.php @@ -0,0 +1,143 @@ +getToken($cookie_token); + if ($ret && $ret['token_expire'] > time() ) { + D("UserToken")->setLastTime($cookie_token); + $login_user = D("User")->where("uid = $ret[uid]")->find(); + unset($ret['password']); + session("login_user" , $login_user); + return $login_user ; + } + } + if ($redirect) { + $this->sendError(10102); + exit(); + } + }else{ + return session("login_user") ; + } + } + + /** + * 返回json结果 + */ + protected function sendResult($array){ + if (isset($array['error_code'])) { + $result['error_code'] = $array['error_code'] ; + $result['error_message'] = $array['error_message'] ; + } + else{ + $result['error_code'] = 0 ; + $result['data'] = $array ; + } + //header('Access-Control-Allow-Origin: *');//允许跨域请求 + echo json_encode($result); + + //如果开启API调试模式,则记录请求参数和返回结果 + if (C('API_LOG')) { + $info = ''; + $info .= "\n\n【★★★★★★★★★★★】"; + $info .= "\n请求接口:".MODULE_NAME ."/".CONTROLLER_NAME."/".ACTION_NAME.""; + $info .= "\n请求".'$_REQUEST'.":\n"; + $info .= json_encode($_REQUEST); + $info .= "\n返回结果:\n"; + $info .= json_encode($result)."\n"; + $info .= "【★★★★★★★★★★★】\n"; + \Think\log::record($info , 'INFO'); + } + + } + + //返回错误提示 + protected function sendError($error_code , $error_message = ''){ + $error_code = $error_code ? $error_code : 10103 ; + if (!$error_message) { + $error_codes = C("error_codes"); + foreach ($error_codes as $key => $value) { + if ($key == $error_code ) { + $error_message = $value ; + } + } + } + $array['error_code'] = $error_code; + $array['error_message'] = $error_message ; + $this->sendResult($array); + } + + //判断某用户是否有项目管理权限(项目成员member_group_id为1,以及 项目创建者) + protected function checkItemPermn($uid , $item_id){ + + if (!$uid) { + return false; + } + + if (session("mamage_item_".$item_id)) { + return true; + } + + $item = D("Item")->where("item_id = '%d' ",array($item_id))->find(); + if ($item['uid'] && $item['uid'] == $uid) { + session("mamage_item_".$item_id , 1 ); + return true; + } + $ItemMember = D("ItemMember")->where("item_id = '%d' and uid = '%d' and member_group_id = 1 ",array($item_id,$uid))->find(); + if ($ItemMember) { + session("mamage_item_".$item_id , 1 ); + return true; + } + return false; + } + + //判断某用户是否为项目创建者 + protected function checkItemCreator($uid , $item_id){ + if (!$uid) { + return false; + } + if (session("creat_item_".$item_id)) { + return true; + } + + $item = D("Item")->where("item_id = '%d' ",array($item_id))->find(); + if ($item['uid'] && $item['uid'] == $uid) { + session("creat_item_".$item_id , 1 ); + return true; + } + return false; + } + + //判断某用户是否有项目访问权限(公开项目的话所有人可访问,私有项目则项目成员、项目创建者和访问密码输入者可访问) + protected function checkItemVisit($uid , $item_id, $refer_url= ''){ + if (session("visit_item_".$item_id)) { + return true; + } + + if ($this->checkItemCreator($uid , $item_id)) { + session("visit_item_".$item_id , 1 ); + return true; + } + + $ItemMember = D("ItemMember")->where("item_id = '%d' and uid = '%d' ",array($item_id,$uid))->find(); + if ($ItemMember) { + session("visit_item_".$item_id , 1 ); + return true; + } + + $item = D("Item")->where("item_id = '%d' ",array($item_id))->find(); + if ($item['password']) { + return false; + }else{ + session("visit_item_".$item_id , 1 ); + return true; + } + + } + + +} \ No newline at end of file diff --git a/server/Application/Api/Controller/ItemController.class.php b/server/Application/Api/Controller/ItemController.class.php new file mode 100644 index 000000000..1a076f1f6 --- /dev/null +++ b/server/Application/Api/Controller/ItemController.class.php @@ -0,0 +1,276 @@ +checkLogin(); + $item_id = I("item_id/d"); + $uid = $login_user['uid'] ; + if(!$this->checkItemCreator($uid , $item_id)){ + $this->sendError(10303); + return ; + } + $items = D("Item")->where("item_id = '$item_id' ")->find(); + $items = $items ? $items : array(); + $this->sendResult($items); + } + + //更新项目信息 + public function update(){ + $login_user = $this->checkLogin(); + $item_id = I("item_id/d"); + $item_name = I("item_name"); + $item_description = I("item_description"); + $item_domain = I("item_domain"); + $password = I("password"); + $uid = $login_user['uid'] ; + if(!$this->checkItemCreator($uid , $item_id)){ + $this->sendError(10303); + return ; + } + + if ($item_domain) { + + if(!ctype_alnum($item_domain) || is_numeric($item_domain) ){ + //echo '个性域名只能是字母或数字的组合';exit; + $this->sendError(10305); + return false; + } + + $item = D("Item")->where("item_domain = '%s' and item_id !='%s' ",array($item_domain,$item_id))->find(); + if ($item) { + //个性域名已经存在 + $this->sendError(10304); + return false; + } + } + $save_data = array( + "item_name" => $item_name , + "item_description" => $item_description , + "item_domain" => $item_domain , + "password" => $password , + ); + $items = D("Item")->where("item_id = '$item_id' ")->save($save_data); + $items = $items ? $items : array(); + $this->sendResult($items); + } + + //转让项目 + public function attorn(){ + $login_user = $this->checkLogin(); + + $username = I("username"); + $item_id = I("item_id/d"); + $password = I("password"); + + $item = D("Item")->where("item_id = '$item_id' ")->find(); + + if(!$this->checkItemCreator($login_user['uid'] , $item['item_id'])){ + $this->sendError(10303); + return ; + } + + if(! D("User")-> checkLogin($item['username'],$password)){ + $this->sendError(10208); + return ; + } + + $member = D("User")->where(" username = '%s' ",array($username))->find(); + + if (!$member) { + $this->sendError(10209); + return ; + } + + $data['username'] = $member['username'] ; + $data['uid'] = $member['uid'] ; + + + $id = D("Item")->where(" item_id = '$item_id' ")->save($data); + + $return = D("Item")->where("item_id = '$item_id' ")->find(); + + if (!$return) { + $this->sendError(10101); + } + + $this->sendResult($return); + } + + //删除项目 + public function delete(){ + $login_user = $this->checkLogin(); + + $item_id = I("item_id/d"); + $password = I("password"); + + $item = D("Item")->where("item_id = '$item_id' ")->find(); + + if(!$this->checkItemCreator($login_user['uid'] , $item['item_id'])){ + $this->sendError(10303); + return ; + } + + if(! D("User")-> checkLogin($item['username'],$password)){ + $this->sendError(10208); + return ; + } + + + D("Page")->where("item_id = '$item_id' ")->delete(); + D("Catalog")->where("item_id = '$item_id' ")->delete(); + D("PageHistory")->where("item_id = '$item_id' ")->delete(); + D("ItemMember")->where("item_id = '$item_id' ")->delete(); + $return = D("Item")->where("item_id = '$item_id' ")->delete(); + + if (!$return) { + $this->sendError(10101); + }else{ + } + + $this->sendResult($return); + } + + public function getKey(){ + $login_user = $this->checkLogin(); + + $item_id = I("item_id/d"); + + $item = D("Item")->where("item_id = '$item_id' ")->find(); + + if(!$this->checkItemCreator($login_user['uid'] , $item['item_id'])){ + $this->sendError(10303); + return ; + } + + $item_token = D("ItemToken")->getTokenByItemId($item_id); + if (!$item_token) { + $this->sendError(10101); + } + $this->sendResult($item_token); + + } + + public function resetKey(){ + + $login_user = $this->checkLogin(); + + $item_id = I("item_id/d"); + + $item = D("Item")->where("item_id = '$item_id' ")->find(); + + if(!$this->checkItemCreator($login_user['uid'] , $item['item_id'])){ + $this->sendError(10303); + return ; + } + + $ret = D("ItemToken")->where("item_id = '$item_id' ")->delete(); + + if ($ret) { + $this->getKey(); + }else{ + $this->sendError(10101); + } + } + + public function updateByApi(){ + $api_key = I("api_key"); + $api_token = I("api_token"); + $cat_name = I("cat_name"); + $cat_name_sub = I("cat_name_sub"); + $page_title = I("page_title"); + $page_content = I("page_content"); + $s_number = I("s_number") ? I("s_number") : 99; + + $ret = D("ItemToken")->getTokenByKey($api_key); + if ($ret && $ret['api_token'] == $api_token) { + $item_id = $ret['item_id'] ; + D("ItemToken")->setLastTime($item_id); + }else{ + $this->sendError(10306); + return false; + } + + //如果传送了二级目录 + if ($cat_name) { + $cat_name_array = D("Catalog")->where(" item_id = '$item_id' and level = 2 and cat_name = '%s' ",array($cat_name))->find(); + //如果不存在则新建 + if (!$cat_name_array) { + $add_data = array( + "cat_name" => $cat_name, + "item_id" => $item_id, + "addtime" => time(), + "level" => 2 + ); + D("Catalog")->add($add_data); + $cat_name_array = D("Catalog")->where(" item_id = '$item_id' and level = 2 and cat_name = '%s' ",array($cat_name))->find(); + } + } + + //如果传送了三级目录 + if ($cat_name_sub) { + $cat_name_sub_array = D("Catalog")->where(" item_id = '$item_id' and level = 3 and cat_name = '%s' ",array($cat_name_sub))->find(); + //如果不存在则新建 + if (!$cat_name_sub_array) { + $add_data = array( + "cat_name" => $cat_name_sub, + "item_id" => $item_id, + "parent_cat_id" => $cat_name_array['cat_id'], + "addtime" => time(), + "level" => 3 + ); + D("Catalog")->add($add_data); + $cat_name_sub_array = D("Catalog")->where(" item_id = '$item_id' and level = 3 and cat_name = '%s' ",array($cat_name_sub))->find(); + } + } + + //目录id + $cat_id = 0 ; + if ($cat_name_array && $cat_name_array['cat_id'] > 0 ) { + $cat_id = $cat_name_array['cat_id'] ; + } + + if ($cat_name_sub_array && $cat_name_sub_array['cat_id'] > 0 ) { + $cat_id = $cat_name_sub_array['cat_id'] ; + } + + if ($page_content) { + $page_array = D("Page")->where(" item_id = '$item_id' and cat_id = '$cat_id' and page_title ='%s' ",array($page_title))->find(); + //如果不存在则新建 + if (!$page_array) { + $add_data = array( + "author_username" => "from_api", + "item_id" => $item_id, + "cat_id" => $cat_id, + "page_title" => $page_title, + "page_content" => $page_content, + "s_number" => $s_number, + "addtime" => time(), + ); + $page_id = D("Page")->add($add_data); + }else{ + $page_id = $page_array['page_id'] ; + $update_data = array( + "author_username" => "from_api", + "item_id" => $item_id, + "cat_id" => $cat_id, + "page_title" => $page_title, + "page_content" => $page_content, + "s_number" => $s_number, + ); + D("Page")->where(" page_id = '$page_id' ")->save($update_data); + } + } + + if ($page_id) { + $ret = D("Page")->where(" page_id = '$page_id' ")->find(); + $this->sendResult($ret); + }else{ + $this->sendError(10101); + } + + + } +} \ No newline at end of file diff --git a/server/Application/Api/Controller/MemberController.class.php b/server/Application/Api/Controller/MemberController.class.php new file mode 100644 index 000000000..5a0495d8f --- /dev/null +++ b/server/Application/Api/Controller/MemberController.class.php @@ -0,0 +1,91 @@ +checkLogin(); + $uid = $login_user['uid'] ; + if(!$this->checkItemCreator($uid , $item_id)){ + $this->sendError(10303); + return ; + } + + $username = I("username"); + $member = D("User")->where(" username = '%s' ",array($username))->find(); + + if (!$member) { + $this->sendError(10209); + return ; + } + + $data['username'] = $member['username'] ; + $data['uid'] = $member['uid'] ; + $data['item_id'] = $item_id ; + $data['member_group_id'] = $member_group_id ; + $data['addtime'] = time() ; + + + $id = D("ItemMember")->add($data); + $return = D("ItemMember")->where(" item_member_id = '$id' ")->find(); + + if (!$return) { + $this->sendError(10101); + }else{ + $this->sendResult($return); + } + + } + + //获取成员列表 + public function getList(){ + $item_id = I("item_id/d"); + $login_user = $this->checkLogin(); + $uid = $login_user['uid'] ; + if(!$this->checkItemCreator($uid , $item_id)){ + $this->sendError(10303); + return ; + } + if ($item_id > 0 ) { + $ret = D("ItemMember")->where(" item_id = '$item_id' ")->order(" addtime asc ")->select(); + } + if ($ret) { + foreach ($ret as $key => &$value) { + $value['addtime'] = date("Y-m-d H:i:s",$value['addtime']); + $value['member_group'] = $value['member_group_id'] == 1 ? "编辑" :"只读"; + } + } + $this->sendResult($ret); + } + + //删除成员 + public function delete(){ + $item_id = I("item_id/d"); + $login_user = $this->checkLogin(); + $uid = $login_user['uid'] ; + if(!$this->checkItemCreator($uid , $item_id)){ + $this->sendError(10303); + return ; + } + $item_member_id = I("item_member_id/d"); + + if ($item_member_id) { + $member_array = D("ItemMember")->where(" item_id = '%d' and item_member_id = '%d' ",array($item_id,$item_member_id))->find(); + $ret = D("ItemMember")->where(" item_id = '%d' and item_member_id = '%d' ",array($item_id,$item_member_id))->delete(); + + } + if ($ret) { + $this->sendResult($ret); + }else{ + $this->sendError(10101); + } + } + + + + +} \ No newline at end of file diff --git a/server/Application/Api/Controller/index.html b/server/Application/Api/Controller/index.html new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/server/Application/Api/Controller/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/server/Application/Api/Model/BaseModel.class.php b/server/Application/Api/Model/BaseModel.class.php new file mode 100644 index 000000000..2298b39b0 --- /dev/null +++ b/server/Application/Api/Model/BaseModel.class.php @@ -0,0 +1,17 @@ +where("item_id = '$item_id' ")->field(" item_type, item_name ,item_description,password ")->find(); + //获取所有父目录id为0的页面 + $pages = D("Page")->where("cat_id = '0' and item_id = '$item_id' ")->field(" page_title ,page_content,s_number,page_comments ")->order(" `s_number` asc ")->select(); + //获取所有二级目录 + $catalogs = D("Catalog")->where("item_id = '$item_id' and level = 2 ")->field("cat_id, cat_name ,level,s_number ")->order(" `s_number` asc ")->select(); + if ($catalogs) { + foreach ($catalogs as $key => &$catalog) { + //该二级目录下的所有子页面 + $temp = D("Page")->where("cat_id = '$catalog[cat_id]' ")->field(" page_title ,page_content,s_number,page_comments ")->order(" `s_number` asc ")->select(); + $catalog['pages'] = $temp ? $temp: array(); + //该二级目录下的所有子目录 + $temp = D("catalog")->where("parent_cat_id = '$catalog[cat_id]' ")->field(" cat_id,cat_name ,level,s_number ")->order(" `s_number` asc ")->select(); + $catalog['catalogs'] = $temp ? $temp: array(); + if($catalog['catalogs']){ + //获取所有三级目录的子页面 + foreach ($catalog['catalogs'] as $key3 => &$catalog3) { + //该二级目录下的所有子页面 + $temp = D("Page")->where("cat_id = '$catalog3[cat_id]' ")->field(" page_title ,page_content,s_number,page_comments ")->order(" `s_number` asc ")->select(); + $catalog3['pages'] = $temp ? $temp: array(); + unset($catalog3['cat_id']); + } + } + unset($catalog['cat_id']); + } + } + $item['pages'] = array( + "pages" =>$pages, + "catalogs" =>$catalogs, + ); + unset($pages); + unset($catalogs); + $item['members'] = D("ItemMember")->where("item_id = '$item_id' ")->field(" member_group_id ,uid,username ")->select(); + return json_encode($item); + + } + public function import($json,$uid,$item_name= '',$item_description= '',$item_password = '',$item_domain = ''){ + $userInfo = D("User")->userInfo($uid); + $item = json_decode($json ,1 ); + unset($json); + if ($item) { + if ($item['item_domain']) { + $item2 = D("Item")->where("item_domain = '%s' ".array($item['item_domain']))->find(); + if ($item2) { + //个性域名已经存在 + return false; + } + if(!ctype_alnum($item_domain) || is_numeric($item_domain) ){ + //echo '个性域名只能是字母或数字的组合';exit; + return false; + } + }else{ + $item['item_domain'] = ''; + } + $item_data = array( + "item_name"=>$item_name ? $item_name :$item['item_name'], + "item_domain"=>$item_domain ? $item_domain :$item['item_domain'], + "item_type"=>$item['item_type'], + "item_description"=>$item_description ? $item_description :$item['item_description'], + "password"=>$item_password ? $item_password :$item['password'], + "uid"=>$userInfo['uid'], + "username"=>$userInfo['username'], + "addtime"=>time(), + ); + $item_id = D("Item")->add($item_data); + } + if ($item['pages']) { + //父页面们(一级目录) + if ($item['pages']['pages']) { + foreach ($item['pages']['pages'] as $key => &$value) { + $page_data = array( + "author_uid"=>$userInfo['uid'], + "author_username"=>$userInfo['username'], + "page_title" =>$value['page_title'], + "page_content" =>$value['page_content'], + "s_number" =>$value['s_number'], + "page_comments" =>$value['page_comments'], + "item_id" => $item_id, + "cat_id" => 0 , + "addtime" =>time(), + ); + D("Page")->add($page_data); + unset($page_data); + } + unset($item['pages']['pages']); + } + //二级目录 + if ($item['pages']['catalogs']) { + foreach ($item['pages']['catalogs'] as $key => &$value) { + $catalog_data = array( + "cat_name" => $value['cat_name'], + "level" => $value['level'], + "s_number" => $value['s_number'], + "item_id" => $item_id, + "addtime" =>time(), + ); + $cat_id = D("Catalog")->add($catalog_data); + //二级目录的页面们 + if ($value['pages']) { + foreach ($value['pages'] as $key2 => &$value2) { + $page_data = array( + "author_uid"=>$userInfo['uid'], + "author_username"=>$userInfo['username'], + "page_title" =>$value2['page_title'], + "page_content" =>$value2['page_content'], + "s_number" =>$value2['s_number'], + "page_comments" =>$value2['page_comments'], + "item_id" => $item_id, + "cat_id" => $cat_id , + "addtime" =>time(), + ); + D("Page")->add($page_data); + unset($page_data); + unset($value2); + } + } + //判断是否存在三级目录 + if ($value['catalogs']) { + foreach ($value['catalogs'] as $key3 => &$value3) { + $catalog_data = array( + "cat_name" => $value3['cat_name'], + "level" => $value3['level'], + "s_number" => $value3['s_number'], + "parent_cat_id" => $cat_id, + "item_id" => $item_id, + "addtime" =>time(), + ); + $cat_id2 = D("Catalog")->add($catalog_data); + //三级目录的页面们 + if ($value3['pages']) { + foreach ($value3['pages'] as $key4 => &$value4) { + $page_data = array( + "author_uid"=>$userInfo['uid'], + "author_username"=>$userInfo['username'], + "page_title" =>$value4['page_title'], + "page_content" =>$value4['page_content'], + "s_number" =>$value4['s_number'], + "page_comments" =>$value4['page_comments'], + "item_id" => $item_id, + "cat_id" => $cat_id2 , + "addtime" =>time(), + ); + D("Page")->add($page_data); + unset($page_data); + unset($value4); + } + } + unset($value3); + } + } + unset($value); + } + + } + } + + if ($item['members']) { + foreach ($item['members'] as $key => $value) { + $member_data = array( + "member_group_id"=>$value['member_group_id'], + "uid"=>$value['uid'], + "username"=>$value['username'], + "item_id"=>$item_id, + "addtime"=>time(), + ); + D("ItemMember")->add($member_data); + } + } + return $item_id; + } + + public function copy($item_id,$uid,$item_name= '',$item_description= '',$item_password = '',$item_domain){ + return $this->import($this->export($item_id),$uid,$item_name,$item_description,$item_password,$item_domain); + } + +} \ No newline at end of file diff --git a/server/Application/Api/Model/ItemTokenModel.class.php b/server/Application/Api/Model/ItemTokenModel.class.php new file mode 100644 index 000000000..eff5e4a72 --- /dev/null +++ b/server/Application/Api/Model/ItemTokenModel.class.php @@ -0,0 +1,41 @@ +add($data); + if ($ret) { + return $ret ; + } + return false ; + } + + public function getTokenByItemId($item_id){ + $item_token = $this->where("item_id='$item_id'")->find(); + if (!$item_token) { + $this->createToken($item_id); + $item_token = $this->where("item_id='$item_id'")->find(); + } + return $item_token ; + } + + public function getTokenByKey($api_key){ + $item_token = $this->where("api_key='%s'",array($api_key))->find(); + return $item_token ; + } + + public function setLastTime($item_id){ + return $this->where("item_id='$item_id'")->save(array("last_check_time"=>time())); + } +} \ No newline at end of file diff --git a/server/Application/Api/Model/UserModel.class.php b/server/Application/Api/Model/UserModel.class.php new file mode 100644 index 000000000..8e8e94505 --- /dev/null +++ b/server/Application/Api/Model/UserModel.class.php @@ -0,0 +1,48 @@ +where("username = '%s'",array($username))->find(); + } + + /** + * 注册新用户 + * + */ + public function register($username,$password){ + $password = md5(base64_encode(md5($password)).'576hbgh6'); + return $this->add(array('username'=>$username ,'password'=>$password , 'reg_time'=>time())); + } + + //修改用户密码 + public function updatePwd($uid, $password){ + $password = md5(base64_encode(md5($password)).'576hbgh6'); + return $this->where("uid ='%d' ",array($uid))->save(array('password'=>$password)); + } + + /** + * 返回用户信息 + * @return + */ + public function userInfo($uid){ + return $this->where("uid = '%d'",array($uid))->find(); + } + + /** + *@param username:登录名 + *@param password 登录密码 + */ + + public function checkLogin($username,$password){ + $password = md5(base64_encode(md5($password)).'576hbgh6'); + $where=array($username,$password,$username,$password); + return $this->where("( username='%s' and password='%s' ) ",$where)->find(); + } +} \ No newline at end of file diff --git a/server/Application/Api/Model/UserTokenModel.class.php b/server/Application/Api/Model/UserTokenModel.class.php new file mode 100644 index 000000000..9a18a9560 --- /dev/null +++ b/server/Application/Api/Model/UserTokenModel.class.php @@ -0,0 +1,34 @@ + 0 ? (time() + $token_expire ) : (time() + 60*60*24*90 ); + $token = md5(md5($uid.$token_expire.time().rand()."showdoc")."thyjhhyhhvxdtr6kiykyn"); + $data['uid'] = $uid ; + $data['token'] = $token ; + $data['token_expire'] = $token_expire ; + $data['ip'] = getIPaddress() ; + $data['addtime'] = time() ; + $ret = $this->add($data); + if ($ret) { + //删除过期的token + $this->where( "token_expire < ".time() )->delete(); + return $token ; + } + return false ; + } + + public function getToken($token){ + return $this->where("token='%s'",array($token))->find(); + } + + public function setLastTime($token){ + return $this->where("token='%s'",array($token))->save(array("last_check_time"=>time())); + } +} \ No newline at end of file diff --git a/server/Application/Api/Model/index.html b/server/Application/Api/Model/index.html new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/server/Application/Api/Model/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/server/Application/Api/View/index.html b/server/Application/Api/View/index.html new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/server/Application/Api/View/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/server/Application/Api/index.html b/server/Application/Api/index.html new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/server/Application/Api/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/server/Application/Common/Common/function.php b/server/Application/Common/Common/function.php new file mode 100644 index 000000000..9fbd135ff --- /dev/null +++ b/server/Application/Common/Common/function.php @@ -0,0 +1,196 @@ + + + + + + + Print + '.$data.''; + + $filepath = tmpfile(); + $data = str_replace("\n","",$data); + $data = str_replace("
    ","
    ",$data);
    +    $data = str_replace("
    ","
    ",$data); + $len = strlen($data); + fwrite($filepath, $data); + header("Content-type: application/octet-stream"); + header("Content-Disposition: attachment; filename={$fileName}.doc"); + header('Content-Description: File Transfer'); + header('Content-Type: application/octet-stream'); + header('Content-Disposition: attachment; filename='.$fileName.'.doc'); + header('Content-Transfer-Encoding: binary'); + header('Expires: 0'); + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Pragma: public'); + header('Content-Length: ' . $len); + rewind($filepath); + echo fread($filepath,$len); +} + + +function clear_runtime($path = RUNTIME_PATH){ + //给定的目录不是一个文件夹 + if(!is_dir($path)){ + return null; + } + + $fh = opendir($path); + while(($row = readdir($fh)) !== false){ + //过滤掉虚拟目录 + if($row == '.' || $row == '..'|| $row == 'index.html'){ + continue; + } + + if(!is_dir($path.'/'.$row)){ + unlink($path.'/'.$row); + } + clear_runtime($path.'/'.$row); + + } + //关闭目录句柄,否则出Permission denied + closedir($fh); + return true; +} + +//获取ip +function getIPaddress(){ + $IPaddress=''; + if (isset($_SERVER)){ + if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])){ + $IPaddress = $_SERVER["HTTP_X_FORWARDED_FOR"]; + } else if (isset($_SERVER["HTTP_CLIENT_IP"])) { + $IPaddress = $_SERVER["HTTP_CLIENT_IP"]; + } else { + $IPaddress = $_SERVER["REMOTE_ADDR"]; + } + } else { + if (getenv("HTTP_X_FORWARDED_FOR")){ + $IPaddress = getenv("HTTP_X_FORWARDED_FOR"); + } else if (getenv("HTTP_CLIENT_IP")) { + $IPaddress = getenv("HTTP_CLIENT_IP"); + } else { + $IPaddress = getenv("REMOTE_ADDR"); + } + } + return $IPaddress; + +} + +/** + * POST 请求 + * + * @param string $url + * @param array $param + * @return string content + */ +function http_post($url, $param) { + $oCurl = curl_init (); + if (stripos ( $url, "https://" ) !== FALSE) { + curl_setopt ( $oCurl, CURLOPT_SSL_VERIFYPEER, FALSE ); + curl_setopt ( $oCurl, CURLOPT_SSL_VERIFYHOST, false ); + } + if (is_string ( $param )) { + $strPOST = $param; + } else { + $aPOST = array (); + foreach ( $param as $key => $val ) { + $aPOST [] = $key . "=" . urlencode ( $val ); + } + $strPOST = join ( "&", $aPOST ); + } + curl_setopt ( $oCurl, CURLOPT_URL, $url ); + curl_setopt ( $oCurl, CURLOPT_RETURNTRANSFER, 1 ); + curl_setopt ( $oCurl, CURLOPT_POST, true ); + curl_setopt ( $oCurl, CURLOPT_POSTFIELDS, $strPOST ); + $sContent = curl_exec ( $oCurl ); + curl_close ( $oCurl ); + return $sContent; +} diff --git a/server/Application/Common/Common/index.html b/server/Application/Common/Common/index.html new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/server/Application/Common/Common/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/server/Application/Common/Conf/config.php b/server/Application/Common/Conf/config.php new file mode 100644 index 000000000..4232a492c --- /dev/null +++ b/server/Application/Common/Conf/config.php @@ -0,0 +1,35 @@ +'配置值' + //使用sqlite数据库 + 'DB_TYPE' => 'Sqlite', + 'DB_NAME' => '../Sqlite/showdoc.db.php', + //showdoc不再支持mysql http://www.showdoc.cc/help?page_id=31990 + 'DB_HOST' => 'localhost', + 'DB_USER' => 'showdoc', + 'DB_PWD' => 'showdoc123456', + 'DB_PORT' => 3306, // 端口 + 'DB_PREFIX' => '', // 数据库表前缀 + 'DB_CHARSET'=> 'utf8', // 字符集 + 'DB_DEBUG' => TRUE, // 数据库调试模式 开启后可以记录SQL日志 + 'URL_HTML_SUFFIX' => '',//url伪静态后缀 + 'URL_MODEL' => 3 ,//URL兼容模式 + 'URL_CASE_INSENSITIVE'=>true, + 'SHOW_ERROR_MSG' => true, // 显示错误信息,这样在部署模式下也能显示错误 + 'STATS_CODE' =>'', //可选,统计代码 + 'TMPL_CACHE_ON' => false,//禁止模板编译缓存 + 'HTML_CACHE_ON' => false,//禁止静态缓存 + //上传文件到七牛的配置 + 'UPLOAD_SITEIMG_QINIU' => array( + 'maxSize' => 5 * 1024 * 1024,//文件大小 + 'rootPath' => './', + 'saveName' => array ('uniqid', ''), + 'driver' => 'Qiniu', + 'driverConfig' => array ( + 'secrectKey' => '', + 'accessKey' => '', + 'domain' => '', + 'bucket' => '', + ) + ), +); \ No newline at end of file diff --git a/server/Application/Common/Conf/index.html b/server/Application/Common/Conf/index.html new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/server/Application/Common/Conf/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/server/Application/Common/index.html b/server/Application/Common/index.html new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/server/Application/Common/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/server/Application/Home/Common/index.html b/server/Application/Home/Common/index.html new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/server/Application/Home/Common/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/server/Application/Home/Conf/config.php b/server/Application/Home/Conf/config.php new file mode 100644 index 000000000..cc42ec62c --- /dev/null +++ b/server/Application/Home/Conf/config.php @@ -0,0 +1,4 @@ +'配置值' +); \ No newline at end of file diff --git a/server/Application/Home/Conf/index.html b/server/Application/Home/Conf/index.html new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/server/Application/Home/Conf/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/server/Application/Home/Controller/IndexController.class.php b/server/Application/Home/Controller/IndexController.class.php new file mode 100644 index 000000000..32e52da66 --- /dev/null +++ b/server/Application/Home/Controller/IndexController.class.php @@ -0,0 +1,8 @@ +show('

    :)

    欢迎使用 ThinkPHP


    版本 V{$Think.version}
    ','utf-8'); + } +} \ No newline at end of file diff --git a/server/Application/Home/Controller/index.html b/server/Application/Home/Controller/index.html new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/server/Application/Home/Controller/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/server/Application/Home/Model/index.html b/server/Application/Home/Model/index.html new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/server/Application/Home/Model/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/server/Application/Home/View/index.html b/server/Application/Home/View/index.html new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/server/Application/Home/View/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/server/Application/Home/index.html b/server/Application/Home/index.html new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/server/Application/Home/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/server/Application/README.md b/server/Application/README.md new file mode 100644 index 000000000..5bc1d44fe --- /dev/null +++ b/server/Application/README.md @@ -0,0 +1 @@ +项目目录 \ No newline at end of file diff --git a/server/Application/Runtime/index.html b/server/Application/Runtime/index.html new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/server/Application/Runtime/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/server/Application/index.html b/server/Application/index.html new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/server/Application/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/server/README.md b/server/README.md new file mode 100644 index 000000000..4ca8e4b5b --- /dev/null +++ b/server/README.md @@ -0,0 +1 @@ +server后台主要提供API给前台操作。由于历史原因,并不是很多接口都在server目录下。旧的就不管了,新的接口都会写到这里来 \ No newline at end of file diff --git a/server/index.php b/server/index.php new file mode 100644 index 000000000..026ccbebf --- /dev/null +++ b/server/index.php @@ -0,0 +1,26 @@ + +// +---------------------------------------------------------------------- + +// 应用入口文件 + +// 检测PHP环境 +if(version_compare(PHP_VERSION,'5.3.0','<')) die('require PHP > 5.3.0 !'); + +// 开启调试模式 建议开发阶段开启 部署阶段注释或者设为false +//define('APP_DEBUG',True); + +// 定义应用目录 +define('APP_PATH','./Application/'); + +// 引入ThinkPHP入口文件 +require '../ThinkPHP/ThinkPHP.php'; + +// 亲^_^ 后面不需要任何代码了 就是如此简单 \ No newline at end of file