@oxiaom/adoremix-linux-x64 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +24 -0
- package/native/.adoremix-native.json +1 -0
- package/native/AdoreMixV8.0.17_console_linuxx64 +0 -0
- package/native/README.md +20 -0
- package/native/audio/libqtaudio_alsa.so +0 -0
- package/native/audio/libqtmedia_pulse.so +0 -0
- package/native/bearer/libqconnmanbearer.so +0 -0
- package/native/bearer/libqgenericbearer.so +0 -0
- package/native/bearer/libqnmbearer.so +0 -0
- package/native/etc/Demo1.ini +49 -0
- package/native/etc/docroot/bangzhu/.project +22 -0
- package/native/etc/docroot/bangzhu/css/app.css +21 -0
- package/native/etc/docroot/bangzhu/css/feedback.css +131 -0
- package/native/etc/docroot/bangzhu/css/icons-extra.css +63 -0
- package/native/etc/docroot/bangzhu/css/mui.dtpicker.css +136 -0
- package/native/etc/docroot/bangzhu/css/mui.imageviewer.css +123 -0
- package/native/etc/docroot/bangzhu/css/mui.indexedlist.css +112 -0
- package/native/etc/docroot/bangzhu/css/mui.listpicker.css +95 -0
- package/native/etc/docroot/bangzhu/css/mui.min.css +5 -0
- package/native/etc/docroot/bangzhu/css/mui.picker.all.css +285 -0
- package/native/etc/docroot/bangzhu/css/mui.picker.css +85 -0
- package/native/etc/docroot/bangzhu/css/mui.picker.min.css +7 -0
- package/native/etc/docroot/bangzhu/css/mui.poppicker.css +64 -0
- package/native/etc/docroot/bangzhu/examples/accordion.html +125 -0
- package/native/etc/docroot/bangzhu/examples/actionsheet-plus.html +128 -0
- package/native/etc/docroot/bangzhu/examples/actionsheet.html +153 -0
- package/native/etc/docroot/bangzhu/examples/ad.html +47 -0
- package/native/etc/docroot/bangzhu/examples/ajax.html +155 -0
- package/native/etc/docroot/bangzhu/examples/badges.html +54 -0
- package/native/etc/docroot/bangzhu/examples/beecloud.html +150 -0
- package/native/etc/docroot/bangzhu/examples/best-practices/list-to-detail/detail.html +104 -0
- package/native/etc/docroot/bangzhu/examples/best-practices/list-to-detail/list-to-detail.css +160 -0
- package/native/etc/docroot/bangzhu/examples/best-practices/list-to-detail/listview.html +326 -0
- package/native/etc/docroot/bangzhu/examples/best-practices/list-to-detail/vue.min.js +8 -0
- package/native/etc/docroot/bangzhu/examples/buttons-with-badges.html +48 -0
- package/native/etc/docroot/bangzhu/examples/buttons-with-block.html +50 -0
- package/native/etc/docroot/bangzhu/examples/buttons-with-icons.html +68 -0
- package/native/etc/docroot/bangzhu/examples/buttons-with-loading.html +86 -0
- package/native/etc/docroot/bangzhu/examples/buttons.html +89 -0
- package/native/etc/docroot/bangzhu/examples/card.html +97 -0
- package/native/etc/docroot/bangzhu/examples/checkbox.html +68 -0
- package/native/etc/docroot/bangzhu/examples/clouddb_wilddog.html +268 -0
- package/native/etc/docroot/bangzhu/examples/date.html +88 -0
- package/native/etc/docroot/bangzhu/examples/dialog.html +82 -0
- package/native/etc/docroot/bangzhu/examples/dtpicker.html +129 -0
- package/native/etc/docroot/bangzhu/examples/echarts.html +150 -0
- package/native/etc/docroot/bangzhu/examples/feedback.html +72 -0
- package/native/etc/docroot/bangzhu/examples/grid-default.html +61 -0
- package/native/etc/docroot/bangzhu/examples/grid-pagination.html +266 -0
- package/native/etc/docroot/bangzhu/examples/guide.html +269 -0
- package/native/etc/docroot/bangzhu/examples/icons-extra.html +161 -0
- package/native/etc/docroot/bangzhu/examples/icons.html +182 -0
- package/native/etc/docroot/bangzhu/examples/im-chat.html +711 -0
- package/native/etc/docroot/bangzhu/examples/imageviewer-native.html +90 -0
- package/native/etc/docroot/bangzhu/examples/imageviewer.html +197 -0
- package/native/etc/docroot/bangzhu/examples/indexed-list-select.html +459 -0
- package/native/etc/docroot/bangzhu/examples/indexed-list.html +265 -0
- package/native/etc/docroot/bangzhu/examples/info.html +119 -0
- package/native/etc/docroot/bangzhu/examples/input.html +108 -0
- package/native/etc/docroot/bangzhu/examples/lazyload-image.html +73 -0
- package/native/etc/docroot/bangzhu/examples/list-triplex-row.html +115 -0
- package/native/etc/docroot/bangzhu/examples/list-with-input.html +91 -0
- package/native/etc/docroot/bangzhu/examples/locker-dom.html +85 -0
- package/native/etc/docroot/bangzhu/examples/login.html +83 -0
- package/native/etc/docroot/bangzhu/examples/media-list.html +220 -0
- package/native/etc/docroot/bangzhu/examples/message-bottom.html +87 -0
- package/native/etc/docroot/bangzhu/examples/modals.html +45 -0
- package/native/etc/docroot/bangzhu/examples/nav-nativeObj.html +45 -0
- package/native/etc/docroot/bangzhu/examples/nav.html +135 -0
- package/native/etc/docroot/bangzhu/examples/nav_transparent.html +127 -0
- package/native/etc/docroot/bangzhu/examples/nav_transparent_native.html +121 -0
- package/native/etc/docroot/bangzhu/examples/numbox.html +114 -0
- package/native/etc/docroot/bangzhu/examples/offcanvas-drag-down.html +384 -0
- package/native/etc/docroot/bangzhu/examples/offcanvas-drag-left-plus-main.html +293 -0
- package/native/etc/docroot/bangzhu/examples/offcanvas-drag-left-plus-menu.html +102 -0
- package/native/etc/docroot/bangzhu/examples/offcanvas-drag-left.html +228 -0
- package/native/etc/docroot/bangzhu/examples/offcanvas-drag-right-plus-main.html +292 -0
- package/native/etc/docroot/bangzhu/examples/offcanvas-drag-right-plus-menu.html +111 -0
- package/native/etc/docroot/bangzhu/examples/offcanvas-drag-right.html +220 -0
- package/native/etc/docroot/bangzhu/examples/pagination.html +236 -0
- package/native/etc/docroot/bangzhu/examples/picker.html +159 -0
- package/native/etc/docroot/bangzhu/examples/popovers.html +200 -0
- package/native/etc/docroot/bangzhu/examples/progressbar.html +171 -0
- package/native/etc/docroot/bangzhu/examples/pullrefresh.html +86 -0
- package/native/etc/docroot/bangzhu/examples/pullrefresh_main.html +46 -0
- package/native/etc/docroot/bangzhu/examples/pullrefresh_sub.html +101 -0
- package/native/etc/docroot/bangzhu/examples/pullrefresh_with_tab.html +586 -0
- package/native/etc/docroot/bangzhu/examples/radio.html +93 -0
- package/native/etc/docroot/bangzhu/examples/range.html +89 -0
- package/native/etc/docroot/bangzhu/examples/setting.html +910 -0
- package/native/etc/docroot/bangzhu/examples/slider-default.html +98 -0
- package/native/etc/docroot/bangzhu/examples/slider-native.html +43 -0
- package/native/etc/docroot/bangzhu/examples/slider-table-default.html +62 -0
- package/native/etc/docroot/bangzhu/examples/slider-table-pagination.html +74 -0
- package/native/etc/docroot/bangzhu/examples/slider-with-title.html +99 -0
- package/native/etc/docroot/bangzhu/examples/switches.html +92 -0
- package/native/etc/docroot/bangzhu/examples/tab-top-subpage-1.html +131 -0
- package/native/etc/docroot/bangzhu/examples/tab-top-subpage-2.html +131 -0
- package/native/etc/docroot/bangzhu/examples/tab-top-subpage-3.html +56 -0
- package/native/etc/docroot/bangzhu/examples/tab-top-subpage-4.html +110 -0
- package/native/etc/docroot/bangzhu/examples/tab-top-subpage-5.html +131 -0
- package/native/etc/docroot/bangzhu/examples/tab-top-webview-main.html +183 -0
- package/native/etc/docroot/bangzhu/examples/tab-vertical-scroll.html +170 -0
- package/native/etc/docroot/bangzhu/examples/tab-webview-main.html +112 -0
- package/native/etc/docroot/bangzhu/examples/tab-webview-subpage-about.html +38 -0
- package/native/etc/docroot/bangzhu/examples/tab-webview-subpage-chat.html +127 -0
- package/native/etc/docroot/bangzhu/examples/tab-webview-subpage-contact.html +155 -0
- package/native/etc/docroot/bangzhu/examples/tab-webview-subpage-setting.html +79 -0
- package/native/etc/docroot/bangzhu/examples/tab-with-segmented-control-vertical.html +85 -0
- package/native/etc/docroot/bangzhu/examples/tab-with-segmented-control.html +195 -0
- package/native/etc/docroot/bangzhu/examples/tab-with-viewpagerindicator.html +203 -0
- package/native/etc/docroot/bangzhu/examples/tabbar-labels-only.html +44 -0
- package/native/etc/docroot/bangzhu/examples/tabbar-with-submenus.html +75 -0
- package/native/etc/docroot/bangzhu/examples/tabbar.html +247 -0
- package/native/etc/docroot/bangzhu/examples/tableviews-with-badges.html +78 -0
- package/native/etc/docroot/bangzhu/examples/tableviews-with-collapses.html +83 -0
- package/native/etc/docroot/bangzhu/examples/tableviews-with-swipe.html +184 -0
- package/native/etc/docroot/bangzhu/examples/tableviews.html +87 -0
- package/native/etc/docroot/bangzhu/examples/typography.html +41 -0
- package/native/etc/docroot/bangzhu/fonts/mui-icons-extra.ttf +0 -0
- package/native/etc/docroot/bangzhu/fonts/mui.ttf +0 -0
- package/native/etc/docroot/bangzhu/images/60x60.gif +0 -0
- package/native/etc/docroot/bangzhu/images/cbd.jpg +0 -0
- package/native/etc/docroot/bangzhu/images/login-1.png +0 -0
- package/native/etc/docroot/bangzhu/images/logo.png +0 -0
- package/native/etc/docroot/bangzhu/images/muwu.jpg +0 -0
- package/native/etc/docroot/bangzhu/images/qrcode.png +0 -0
- package/native/etc/docroot/bangzhu/images/shuijiao.jpg +0 -0
- package/native/etc/docroot/bangzhu/images/yuantiao.jpg +0 -0
- package/native/etc/docroot/bangzhu/index-menu.html +196 -0
- package/native/etc/docroot/bangzhu/index.html +414 -0
- package/native/etc/docroot/bangzhu/js/95516.js +32 -0
- package/native/etc/docroot/bangzhu/js/arttmpl.js +2 -0
- package/native/etc/docroot/bangzhu/js/beecloud.js +141 -0
- package/native/etc/docroot/bangzhu/js/city.data-3.js +11548 -0
- package/native/etc/docroot/bangzhu/js/city.data.js +1605 -0
- package/native/etc/docroot/bangzhu/js/feedback.js +234 -0
- package/native/etc/docroot/bangzhu/js/mui.dtpicker.js +471 -0
- package/native/etc/docroot/bangzhu/js/mui.imageViewer.js +268 -0
- package/native/etc/docroot/bangzhu/js/mui.indexedlist.js +187 -0
- package/native/etc/docroot/bangzhu/js/mui.js +8390 -0
- package/native/etc/docroot/bangzhu/js/mui.lazyload.img.js +116 -0
- package/native/etc/docroot/bangzhu/js/mui.lazyload.js +327 -0
- package/native/etc/docroot/bangzhu/js/mui.listpicker.js +399 -0
- package/native/etc/docroot/bangzhu/js/mui.locker.js +303 -0
- package/native/etc/docroot/bangzhu/js/mui.min.js +6 -0
- package/native/etc/docroot/bangzhu/js/mui.picker.all.js +1018 -0
- package/native/etc/docroot/bangzhu/js/mui.picker.js +389 -0
- package/native/etc/docroot/bangzhu/js/mui.picker.min.js +7 -0
- package/native/etc/docroot/bangzhu/js/mui.poppicker.js +160 -0
- package/native/etc/docroot/bangzhu/js/mui.previewimage.js +382 -0
- package/native/etc/docroot/bangzhu/js/mui.pullToRefresh.js +407 -0
- package/native/etc/docroot/bangzhu/js/mui.pullToRefresh.material.js +352 -0
- package/native/etc/docroot/bangzhu/js/mui.view.js +628 -0
- package/native/etc/docroot/bangzhu/js/mui.zoom.js +322 -0
- package/native/etc/docroot/bangzhu/js/update.js +45 -0
- package/native/etc/docroot/bangzhu/js/webviewGroup.js +286 -0
- package/native/etc/docroot/bangzhu/libs/echarts-all.js +35 -0
- package/native/etc/docroot/bangzhu/manifest.json +994 -0
- package/native/etc/docroot/index.html +1 -0
- package/native/etc/docroot/luyin2/index.html +145 -0
- package/native/etc/docroot/luyin2/js/jquery-1.10.1.min.js +6 -0
- package/native/etc/docroot/luyin2/js/jquery-1.5.min.js +16 -0
- package/native/etc/docroot/luyin2/js/jquery.js +18 -0
- package/native/etc/docroot/luyin2/js/jquery.multiselect.js +104 -0
- package/native/etc/docroot/luyin2/js/lame.min.js +308 -0
- package/native/etc/docroot/luyin2/js/recordmp3.js +239 -0
- package/native/etc/docroot/luyin2/js/worker-realtime.js +106 -0
- package/native/etc/docroot/luyin2//346/223/215/344/275/234/346/214/207/345/215/227.txt +3 -0
- package/native/etc/docroot/static/css/app.8421a6d597ba48619941ccd4e386fbb2.css +675 -0
- package/native/etc/docroot/static/css/app.8421a6d597ba48619941ccd4e386fbb2.css.map +1 -0
- package/native/etc/docroot/static/fonts/element-icons.535877f.woff +0 -0
- package/native/etc/docroot/static/fonts/element-icons.732389d.ttf +0 -0
- package/native/etc/docroot/static/img/login_bg.ad6b482.jpg +0 -0
- package/native/etc/docroot/static/js/app.eff1c2200a448936b027.js +2 -0
- package/native/etc/docroot/static/js/app.eff1c2200a448936b027.js.map +1 -0
- package/native/etc/docroot/static/js/manifest.400eada2d24447a4fc30.js +2 -0
- package/native/etc/docroot/static/js/manifest.400eada2d24447a4fc30.js.map +1 -0
- package/native/etc/docroot/static/js/vendor.ca4f735ec1dfe336a804.js +45 -0
- package/native/etc/docroot/static/js/vendor.ca4f735ec1dfe336a804.js.map +1 -0
- package/native/etc/docroot/tts.js +151 -0
- package/native/etc/docroot/xcx/Discover.html +156 -0
- package/native/etc/docroot/xcx/css/mui.css +5649 -0
- package/native/etc/docroot/xcx/css/mui.min.css +5 -0
- package/native/etc/docroot/xcx/devicelist.html +659 -0
- package/native/etc/docroot/xcx/fonts/mui.ttf +0 -0
- package/native/etc/docroot/xcx/index.html +75 -0
- package/native/etc/docroot/xcx/index.js +1 -0
- package/native/etc/docroot/xcx/js/axios.min.js +3 -0
- package/native/etc/docroot/xcx/js/axios.min.map +1 -0
- package/native/etc/docroot/xcx/js/js.cookie.js +8 -0
- package/native/etc/docroot/xcx/js/mui.js +8390 -0
- package/native/etc/docroot/xcx/js/mui.min.js +6 -0
- package/native/etc/docroot/xcx/main.html +85 -0
- package/native/etc/ssl/README.txt +5 -0
- package/native/etc/ssl/ca.crt +21 -0
- package/native/etc/ssl/ca.key +27 -0
- package/native/etc/ssl/client.crt +20 -0
- package/native/etc/ssl/client.key +28 -0
- package/native/etc/ssl/client.p12 +0 -0
- package/native/etc/ssl/server.crt +20 -0
- package/native/etc/ssl/server.key +28 -0
- package/native/etc/templates/demo-de.tpl +12 -0
- package/native/etc/templates/demo.tpl +12 -0
- package/native/etc/ttys/adore03.sql +426 -0
- package/native/etc/ttys/adore04.sql +426 -0
- package/native/etc/ttys/adore1.sql +859 -0
- package/native/etc/ttys/adore_mix22.sql +806 -0
- package/native/etc/ttys/sqlite.sql +1140 -0
- package/native/etc/ttys/sqlite3main.sql +434 -0
- package/native/etc/ttys/sqltest.sql +279 -0
- package/native/etc/ttys/tp3sql.sql +1412 -0
- package/native/find.js +529 -0
- package/native/findsc.js +701 -0
- package/native/iconengines/libqsvgicon.so +0 -0
- package/native/imageformats/libqgif.so +0 -0
- package/native/imageformats/libqico.so +0 -0
- package/native/imageformats/libqjpeg.so +0 -0
- package/native/imageformats/libqsvg.so +0 -0
- package/native/lib/libQt5Concurrent.so.5 +0 -0
- package/native/lib/libQt5Core.so.5 +0 -0
- package/native/lib/libQt5DBus.so.5 +0 -0
- package/native/lib/libQt5Multimedia.so.5 +0 -0
- package/native/lib/libQt5MultimediaGstTools.so.5 +0 -0
- package/native/lib/libQt5Network.so.5 +0 -0
- package/native/lib/libQt5Sql.so.5 +0 -0
- package/native/lib/libQt5Svg.so.5 +0 -0
- package/native/lib/libQt5WebSockets.so.5 +0 -0
- package/native/lib/libQt5Xml.so.5 +0 -0
- package/native/lib/libcrypto.so.3 +0 -0
- package/native/lib/libgcc_s.so.1 +0 -0
- package/native/lib/libmariadb.so.3 +0 -0
- package/native/lib/libmp3lame.so.0 +0 -0
- package/native/lib/libmp3lame.so.0.0.0 +0 -0
- package/native/lib/libopus.so.0 +0 -0
- package/native/lib/libopus.so.0.8.0 +0 -0
- package/native/lib/libopusfile.so.0 +0 -0
- package/native/lib/libopusfile.so.0.4.2 +0 -0
- package/native/lib/libopusurl.so.0 +0 -0
- package/native/lib/libopusurl.so.0.4.2 +0 -0
- package/native/lib/libsqlite3.so.0 +0 -0
- package/native/lib/libsqlite3.so.0.8.6 +0 -0
- package/native/lib/libssl.so.3 +0 -0
- package/native/lib/libstdc++.so.6 +0 -0
- package/native/lib/libstdc++.so.6.0.30 +0 -0
- package/native/mediaservice/libgstaudiodecoder.so +0 -0
- package/native/mediaservice/libgstcamerabin.so +0 -0
- package/native/mediaservice/libgstmediacapture.so +0 -0
- package/native/mediaservice/libgstmediaplayer.so +0 -0
- package/native/platforms/libqeglfs.so +0 -0
- package/native/platforms/libqlinuxfb.so +0 -0
- package/native/platforms/libqminimal.so +0 -0
- package/native/platforms/libqminimalegl.so +0 -0
- package/native/platforms/libqoffscreen.so +0 -0
- package/native/platforms/libqvnc.so +0 -0
- package/native/platforms/libqxcb.so +0 -0
- package/native/qt.conf +3 -0
- package/native/sqldrivers/libqsqlite.so +0 -0
- package/native/sqldrivers/libqsqlmysql.so +0 -0
- package/native/sqldrivers/libsqlitecipher.so +0 -0
- package/native/tts.js +151 -0
- package/package.json +23 -0
package/native/find.js
ADDED
|
@@ -0,0 +1,529 @@
|
|
|
1
|
+
var mysql = require('mysql');
|
|
2
|
+
var connection =null;
|
|
3
|
+
var jsres={"res":false,"info":"ubs"};
|
|
4
|
+
var stdin = process.openStdin();
|
|
5
|
+
var request=null;
|
|
6
|
+
var countnow = 0;
|
|
7
|
+
stdin.on('data', function(chunk){
|
|
8
|
+
var jsonstr = JSON.parse(chunk);
|
|
9
|
+
var actionar = jsonstr.__path.split("/");
|
|
10
|
+
var action = actionar[actionar.length-1];
|
|
11
|
+
request = jsonstr;
|
|
12
|
+
if(jsonstr.sqlme.sqlmedbk == 1){
|
|
13
|
+
connection = mysql.createConnection({
|
|
14
|
+
host : jsonstr.sqlme.sqlmeip,
|
|
15
|
+
user : jsonstr.sqlme.sqlmeusername,
|
|
16
|
+
port : jsonstr.sqlme.sqlmeport,
|
|
17
|
+
password : jsonstr.sqlme.sqlmepasswd,
|
|
18
|
+
database : jsonstr.sqlme.sqlmebasename
|
|
19
|
+
});
|
|
20
|
+
connection.connect();
|
|
21
|
+
}else if(jsonstr.sqlme.sqlmedbk == 0){
|
|
22
|
+
|
|
23
|
+
}
|
|
24
|
+
if(action == "getfinder"){
|
|
25
|
+
endexit();
|
|
26
|
+
console.log(JSON.stringify(jsres));
|
|
27
|
+
}else if(action == "getusersinfo"){
|
|
28
|
+
getusersinfo();
|
|
29
|
+
}else if(action == "getusersdevice"){
|
|
30
|
+
getusersdevice();
|
|
31
|
+
}else if(action == "changeuserdevicemode"){
|
|
32
|
+
changeuserdevicemode();
|
|
33
|
+
}else if(action == "getwplantlist"){
|
|
34
|
+
getwplantlist();
|
|
35
|
+
}else if(action == "rmwplant"){
|
|
36
|
+
rmwplant();
|
|
37
|
+
}else if(action == "wplantadd"){ //wpdevicehistory
|
|
38
|
+
wplantadd();
|
|
39
|
+
}else if(action == "wpdevicehistory"){ //wpdevicehistory
|
|
40
|
+
wpdevicehistory();
|
|
41
|
+
}else if(action == "wfilelistrg"){ //wpdevicehistory
|
|
42
|
+
wfilelistrg();
|
|
43
|
+
}else if(action == "addziuser"){ //wpdevicehistory //listziuser
|
|
44
|
+
addziuser();
|
|
45
|
+
}else if(action == "listziuser"){ //listzrdevs
|
|
46
|
+
listziuser();
|
|
47
|
+
}else if(action == "listzrdevs"){ //getusersdevice
|
|
48
|
+
listzrdevs();
|
|
49
|
+
}else if(action == "listmydevice"){ //getusersdevice
|
|
50
|
+
listmydevice();
|
|
51
|
+
}else if(action == "changezidevices"){ //getusersdevice
|
|
52
|
+
changezidevices();
|
|
53
|
+
}else if(action == "changezimask"){ //getusersdevice
|
|
54
|
+
changezimask();
|
|
55
|
+
}else if(action == "gtoken"){ //getusersdevice
|
|
56
|
+
gtoken();
|
|
57
|
+
}else if(action == "getswapinfo"){ //getusersdevice
|
|
58
|
+
getswapinfo();
|
|
59
|
+
}else if(action == "ffffmyinfo"){ //newnickname
|
|
60
|
+
myinfo();
|
|
61
|
+
}else if(action == "newnickname"){ //newnickname
|
|
62
|
+
newnickname();
|
|
63
|
+
}else if(action == "newpasswdnick"){ //save_user_yinsixieyi
|
|
64
|
+
newpasswdnick();
|
|
65
|
+
}else if(action == "newpasswdnick"){ //save_user_yinsixieyi
|
|
66
|
+
newpasswdnick();
|
|
67
|
+
}else{
|
|
68
|
+
endexit();
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
function newpasswdnick(){
|
|
72
|
+
var sqline = "UPDATE `sbox_users` SET `user_pass` = '@user_pass' WHERE ( `id` = '@userid' and `token` = '@token' );";
|
|
73
|
+
sqline = sqline.replace("@userid",request.id);
|
|
74
|
+
sqline = sqline.replace("@token",request.token);
|
|
75
|
+
sqline = sqline.replace("@user_pass",request.newpass);
|
|
76
|
+
connection.query(sqline,function(error, results, fields){
|
|
77
|
+
if(error != null ){
|
|
78
|
+
jsres['res'] = false;
|
|
79
|
+
jsres['info'] = error;
|
|
80
|
+
}else{
|
|
81
|
+
jsres['res'] = true;
|
|
82
|
+
jsres['info'] = error;
|
|
83
|
+
}
|
|
84
|
+
console.log( JSON.stringify(jsres) );
|
|
85
|
+
endexit();
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function newnickname(){
|
|
90
|
+
var sqline = "UPDATE `sbox_users` SET `nickname` = '@nickname' WHERE ( `id` = '@userid' and `token` = '@token' );";
|
|
91
|
+
sqline = sqline.replace("@userid",request.id);
|
|
92
|
+
sqline = sqline.replace("@token",request.token);
|
|
93
|
+
sqline = sqline.replace("@nickname",request.nickname);
|
|
94
|
+
connection.query(sqline,function(error, results, fields){
|
|
95
|
+
if(error != null ){
|
|
96
|
+
jsres['res'] = false;
|
|
97
|
+
jsres['info'] = error;
|
|
98
|
+
|
|
99
|
+
}else{
|
|
100
|
+
jsres['res'] = true;
|
|
101
|
+
jsres['info'] = error;
|
|
102
|
+
jsres['nickname'] = request.nickname;
|
|
103
|
+
}
|
|
104
|
+
console.log( JSON.stringify(jsres) );
|
|
105
|
+
endexit();
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
}
|
|
109
|
+
function myinfo(){
|
|
110
|
+
var sqline = "SELECT * FROM sbox_users where ( `id` = '@userid' and `token` = '@token' );";
|
|
111
|
+
|
|
112
|
+
sqline = sqline.replace("@userid",request.id);
|
|
113
|
+
sqline = sqline.replace("@token",request.token);
|
|
114
|
+
connection.query(sqline,function(error, results, fields){
|
|
115
|
+
if(error != null ){
|
|
116
|
+
jsres['res'] = false;
|
|
117
|
+
jsres['info'] = error;
|
|
118
|
+
|
|
119
|
+
}else{
|
|
120
|
+
jsres['res'] = true;
|
|
121
|
+
jsres['info'] = error;
|
|
122
|
+
jsres['data'] = results[0];
|
|
123
|
+
}
|
|
124
|
+
console.log( JSON.stringify(jsres) );
|
|
125
|
+
endexit();
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
function getswapinfo(){
|
|
129
|
+
var sqline = "SELECT * FROM swap_info;";
|
|
130
|
+
connection.query(sqline,function(error, results, fields){
|
|
131
|
+
if(error != null ){
|
|
132
|
+
jsres['res'] = false;
|
|
133
|
+
jsres['info'] = error;
|
|
134
|
+
|
|
135
|
+
}else{
|
|
136
|
+
jsres['res'] = true;
|
|
137
|
+
jsres['info'] = error;
|
|
138
|
+
jsres['data'] = results;
|
|
139
|
+
}
|
|
140
|
+
console.log( JSON.stringify(jsres) );
|
|
141
|
+
endexit();
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
function gtoken(){
|
|
145
|
+
var sqline = "SELECT * FROM sbox_users where ( `user_name` = '@user_name' and `user_pass` = '@user_pass' );";
|
|
146
|
+
sqline = sqline.replace("@user_name",request.username);
|
|
147
|
+
sqline = sqline.replace("@user_pass",request.passwd);
|
|
148
|
+
connection.query(sqline,function(error, results, fields){
|
|
149
|
+
if(error != null ){
|
|
150
|
+
jsres['res'] = false;
|
|
151
|
+
jsres['info'] = error;
|
|
152
|
+
|
|
153
|
+
}else if(results.length == 1){
|
|
154
|
+
jsres['res'] = true;
|
|
155
|
+
jsres['info'] = error;
|
|
156
|
+
jsres['data'] = results[0];
|
|
157
|
+
}else{
|
|
158
|
+
jsres['res'] = false;
|
|
159
|
+
jsres['info'] = error;
|
|
160
|
+
}
|
|
161
|
+
console.log( JSON.stringify(jsres) );
|
|
162
|
+
endexit();
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
function insertStr(source, start, newStr) {
|
|
166
|
+
return source.slice(0, start) + newStr + source.slice(start+1)
|
|
167
|
+
}
|
|
168
|
+
function changezimask(){
|
|
169
|
+
var zuserid = request.userid;
|
|
170
|
+
var zdex = request.zdex;
|
|
171
|
+
var zcase = request.zcase;
|
|
172
|
+
jsres['zcase'] = zcase ;
|
|
173
|
+
jsres['zdex'] = zdex ;
|
|
174
|
+
var sqline = "SELECT * FROM sbox_users where id = '@zuserid';";
|
|
175
|
+
sqline = sqline.replace("@zuserid",zuserid);
|
|
176
|
+
connection.query(sqline,function(error, results, fields){
|
|
177
|
+
if(error != null ){
|
|
178
|
+
jsres['res'] = false;
|
|
179
|
+
jsres['res1'] = false;
|
|
180
|
+
jsres['info'] = error;
|
|
181
|
+
}else{
|
|
182
|
+
jsres['res'] = true;
|
|
183
|
+
jsres['results'] = results;
|
|
184
|
+
if(results.length == 1){
|
|
185
|
+
var endmask = "";
|
|
186
|
+
jsres['endmask'] = results[0].mask;
|
|
187
|
+
if(zcase == "false"){
|
|
188
|
+
endmask= insertStr(results[0].mask,parseInt(zdex),"0");
|
|
189
|
+
}else{
|
|
190
|
+
endmask= insertStr(results[0].mask,parseInt(zdex),"1");
|
|
191
|
+
|
|
192
|
+
}
|
|
193
|
+
sqline = "UPDATE `sbox_users` SET `mask` = '@mask' WHERE (`id` = '@zuserid');";
|
|
194
|
+
sqline = sqline.replace("@zuserid",zuserid);
|
|
195
|
+
sqline = sqline.replace("@mask",endmask);
|
|
196
|
+
jsres['endmask'] = endmask;
|
|
197
|
+
connection.query(sqline,function(error, results, fields){
|
|
198
|
+
if(error != null ){
|
|
199
|
+
jsres['res1'] = false;
|
|
200
|
+
jsres['info'] = error;
|
|
201
|
+
|
|
202
|
+
}else{
|
|
203
|
+
jsres['res1'] = true;
|
|
204
|
+
jsres['info'] = error;
|
|
205
|
+
jsres['endmask'] = endmask;
|
|
206
|
+
}
|
|
207
|
+
console.log( JSON.stringify(jsres) );
|
|
208
|
+
endexit();
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
}else{
|
|
212
|
+
jsres['info'] = error;
|
|
213
|
+
console.log( JSON.stringify(jsres) );
|
|
214
|
+
endexit();
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
console.log( JSON.stringify(jsres) );
|
|
218
|
+
endexit();
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
}
|
|
223
|
+
function changezidevices(){
|
|
224
|
+
//console.log(request);
|
|
225
|
+
if(request.pus_idstr != "null"){
|
|
226
|
+
var sqline = "call pus_str( '@idS' , @masterid, @zid );";
|
|
227
|
+
sqline = sqline.replace("@idS" ,request.pus_idstr);
|
|
228
|
+
sqline = sqline.replace("@masterid" ,request.id);
|
|
229
|
+
sqline = sqline.replace("@zid" ,request.gid);
|
|
230
|
+
connection.query(sqline,function(error, results, fields){
|
|
231
|
+
if(error != null ){
|
|
232
|
+
jsres['res'] = false;
|
|
233
|
+
jsres['sqline'] = sqline;
|
|
234
|
+
jsres['info'] = error;
|
|
235
|
+
//changezidevices();
|
|
236
|
+
}else{
|
|
237
|
+
jsres['res'] = true;
|
|
238
|
+
jsres['info'] = error;
|
|
239
|
+
}
|
|
240
|
+
if(request.dis_idstr != "null" ){
|
|
241
|
+
sqline = "call dis_str('@idS',@zid);";
|
|
242
|
+
sqline = sqline.replace("@idS" ,request.dis_idstr);
|
|
243
|
+
sqline = sqline.replace("@zid" ,request.gid);
|
|
244
|
+
connection.query(sqline,function(error, results, fields){
|
|
245
|
+
if(error != null ){
|
|
246
|
+
jsres['res'] = false;
|
|
247
|
+
jsres['info'] = error;
|
|
248
|
+
}else{
|
|
249
|
+
jsres['res'] = true;
|
|
250
|
+
jsres['info'] = error;
|
|
251
|
+
}
|
|
252
|
+
console.log( JSON.stringify(jsres) );
|
|
253
|
+
endexit();
|
|
254
|
+
});
|
|
255
|
+
}else{
|
|
256
|
+
console.log( JSON.stringify(jsres) );
|
|
257
|
+
endexit();
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
}else if(request.dis_idstr != "null" ){
|
|
262
|
+
jsres['pus_idstr'] = "null";
|
|
263
|
+
var sqline = "call dis_str('@idS',@zid);";
|
|
264
|
+
sqline = sqline.replace("@idS" ,request.dis_idstr);
|
|
265
|
+
sqline = sqline.replace("@zid" ,request.gid);
|
|
266
|
+
//console.log(sqline);
|
|
267
|
+
connection.query(sqline,function(error, results, fields){
|
|
268
|
+
if(error != null ){
|
|
269
|
+
jsres['res'] = false;
|
|
270
|
+
jsres['info'] = error;
|
|
271
|
+
}else{
|
|
272
|
+
jsres['res'] = true;
|
|
273
|
+
jsres['info'] = error;
|
|
274
|
+
}
|
|
275
|
+
console.log( JSON.stringify(jsres) );
|
|
276
|
+
endexit();
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
}else{
|
|
280
|
+
jsres['pus_idstr'] = "null";
|
|
281
|
+
jsres['dis_idstr'] = "null";
|
|
282
|
+
console.log( JSON.stringify(jsres) );
|
|
283
|
+
endexit();
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
}
|
|
287
|
+
function listmydevice(){
|
|
288
|
+
var sqline = "SELECT * FROM sbox_device_info where (`user_id` = '@user_id');";
|
|
289
|
+
sqline = sqline.replace("@user_id",request.id);
|
|
290
|
+
connection.query(sqline,function(error, results, fields){
|
|
291
|
+
if(error != null ){
|
|
292
|
+
jsres['res'] = false;
|
|
293
|
+
jsres['info'] = error;
|
|
294
|
+
console.log( JSON.stringify(jsres) );
|
|
295
|
+
endexit();
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
jsres['res']=true;
|
|
299
|
+
jsres['results']=results;
|
|
300
|
+
for(var line in results){
|
|
301
|
+
jsres['results'][line].devname = new Buffer( results[line].device_name , 'base64').toString();
|
|
302
|
+
};
|
|
303
|
+
//jsres['sqline']=sqline;
|
|
304
|
+
console.log( JSON.stringify(jsres) );
|
|
305
|
+
endexit();
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
function listzrdevs(){
|
|
310
|
+
var sqline = "SELECT * FROM sbox_device_info where (`user_id` = '@user_id');";
|
|
311
|
+
sqline = sqline.replace("@user_id",request.ziid);
|
|
312
|
+
connection.query(sqline,function(error, results, fields){
|
|
313
|
+
if(error != null ){
|
|
314
|
+
jsres['res'] = false;
|
|
315
|
+
jsres['info'] = error;
|
|
316
|
+
console.log( JSON.stringify(jsres) );
|
|
317
|
+
endexit();
|
|
318
|
+
}
|
|
319
|
+
jsres['res']=true;
|
|
320
|
+
jsres['sqline']=sqline;
|
|
321
|
+
jsres['results']=results;
|
|
322
|
+
console.log( JSON.stringify(jsres) );
|
|
323
|
+
endexit();
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
function listziuser(){
|
|
328
|
+
var sqline = "select * from `sbox_users` where `master_id` = '@master_id' ;";
|
|
329
|
+
sqline = sqline.replace("@master_id",request.id);
|
|
330
|
+
connection.query(sqline,function(error, results, fields){
|
|
331
|
+
if(error != null ){
|
|
332
|
+
jsres['res'] = false;
|
|
333
|
+
jsres['info'] = error;
|
|
334
|
+
console.log( JSON.stringify(jsres) );
|
|
335
|
+
endexit();
|
|
336
|
+
}
|
|
337
|
+
jsres['res']=true;
|
|
338
|
+
jsres['results']=results;
|
|
339
|
+
console.log( JSON.stringify(jsres) );
|
|
340
|
+
endexit();
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
function addziuser(){
|
|
345
|
+
var sqline = "INSERT INTO `sbox_users` (`user_name`, `user_pass`, `master_id`, `mask`, `beizhu` , `token`, `nickname`) VALUES ('@user_name', '@user_pass', '@master_id', '@mask', '@beizhu' , '@token', '@nickname');";
|
|
346
|
+
sqline = sqline.replace("@user_name",request.ziusername);
|
|
347
|
+
sqline = sqline.replace("@user_pass",request.zipasswd);
|
|
348
|
+
sqline = sqline.replace("@master_id",request.id);
|
|
349
|
+
sqline = sqline.replace("@mask",request.mask);
|
|
350
|
+
sqline = sqline.replace("@beizhu",request.beizhu );
|
|
351
|
+
sqline = sqline.replace("@token",request.token );
|
|
352
|
+
sqline = sqline.replace("@nickname",request.nickname );
|
|
353
|
+
connection.query(sqline,function(error, results, fields){
|
|
354
|
+
if(error != null ){
|
|
355
|
+
jsres['res'] = false;
|
|
356
|
+
jsres['info'] = error;
|
|
357
|
+
console.log( JSON.stringify(jsres) );
|
|
358
|
+
endexit();
|
|
359
|
+
}
|
|
360
|
+
jsres['res']=true;
|
|
361
|
+
jsres['results']=results;
|
|
362
|
+
console.log( JSON.stringify(jsres) );
|
|
363
|
+
endexit();
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
function wfilelistrg(){
|
|
368
|
+
var sqline = "select * from `warregister` where `userid` = '@userid' ;";
|
|
369
|
+
sqline = sqline.replace("@userid",request.id);
|
|
370
|
+
connection.query(sqline,function(error, results, fields){
|
|
371
|
+
if(error != null ){
|
|
372
|
+
jsres['res'] = false;
|
|
373
|
+
jsres['info'] = error;
|
|
374
|
+
console.log( JSON.stringify(jsres) );
|
|
375
|
+
endexit();
|
|
376
|
+
}
|
|
377
|
+
jsres['res']=true;
|
|
378
|
+
jsres['results']=results;
|
|
379
|
+
console.log( JSON.stringify(jsres) );
|
|
380
|
+
endexit();
|
|
381
|
+
});
|
|
382
|
+
};
|
|
383
|
+
function wpdevicehistory(){
|
|
384
|
+
var sqline = "SELECT * FROM sbox_device_info where (`user_id` = '@user_id' and `iswarning` = '99');";
|
|
385
|
+
sqline = sqline.replace("@user_id",request.id);
|
|
386
|
+
connection.query(sqline,function(error, results, fields){
|
|
387
|
+
if(error != null ){
|
|
388
|
+
jsres['res'] = false;
|
|
389
|
+
jsres['info'] = error;
|
|
390
|
+
console.log( JSON.stringify(jsres) );
|
|
391
|
+
endexit();
|
|
392
|
+
}
|
|
393
|
+
jsres['res'] = true;
|
|
394
|
+
jsres['results'] = results;
|
|
395
|
+
for(var line in results){
|
|
396
|
+
jsres['results'][line].devname = new Buffer( results[line].device_name , 'base64').toString();
|
|
397
|
+
};
|
|
398
|
+
console.log( JSON.stringify(jsres) );
|
|
399
|
+
endexit();
|
|
400
|
+
});
|
|
401
|
+
};
|
|
402
|
+
function wplantadd(){
|
|
403
|
+
var sqline = "INSERT INTO `warningplant` (`snids`,`url`, `name`, `userid`) VALUES ('@snids','@url','@name','@userid')";
|
|
404
|
+
sqline = sqline.replace("@snids",request.snlist);
|
|
405
|
+
sqline = sqline.replace("@url",request.url);
|
|
406
|
+
sqline = sqline.replace("@name",request.plantname);
|
|
407
|
+
sqline = sqline.replace("@userid",request.id);
|
|
408
|
+
connection.query(sqline,function(error, results, fields){
|
|
409
|
+
if(error != null ){
|
|
410
|
+
jsres['res'] = false;
|
|
411
|
+
jsres['info'] = error;
|
|
412
|
+
console.log( JSON.stringify(jsres) );
|
|
413
|
+
endexit();
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
jsres['res'] = true;
|
|
417
|
+
console.log( JSON.stringify(jsres) );
|
|
418
|
+
endexit();
|
|
419
|
+
});
|
|
420
|
+
};
|
|
421
|
+
function rmwplant(){
|
|
422
|
+
var sqline = "DELETE FROM `warningplant` WHERE (`id` = '@id' and userid = '@userid') ;";
|
|
423
|
+
sqline = sqline.replace("@userid",request.id);
|
|
424
|
+
sqline = sqline.replace("@id",request.pltid);
|
|
425
|
+
connection.query(sqline,function(error, results, fields){
|
|
426
|
+
if(error != null ){
|
|
427
|
+
jsres['res'] = false;
|
|
428
|
+
jsres['info'] = error;
|
|
429
|
+
console.log( JSON.stringify(jsres) );
|
|
430
|
+
endexit();
|
|
431
|
+
}
|
|
432
|
+
jsres['res'] = true;
|
|
433
|
+
console.log( JSON.stringify(jsres) );
|
|
434
|
+
endexit();
|
|
435
|
+
});
|
|
436
|
+
};
|
|
437
|
+
function getwplantlist(){
|
|
438
|
+
var sqline = " SELECT * FROM warningplant WHERE (`userid` = '@userid' );";
|
|
439
|
+
sqline = sqline.replace("@userid",request.id);
|
|
440
|
+
connection.query(sqline,function(error, results, fields){
|
|
441
|
+
if(error != null ){
|
|
442
|
+
jsres['res'] = false;
|
|
443
|
+
jsres['info'] = error;
|
|
444
|
+
console.log( JSON.stringify(jsres) );
|
|
445
|
+
endexit();
|
|
446
|
+
}
|
|
447
|
+
jsres['res'] = true;
|
|
448
|
+
jsres['results'] = results;
|
|
449
|
+
|
|
450
|
+
for(var line in results){
|
|
451
|
+
var snids = results[line].snids;
|
|
452
|
+
var snidlist = snids.split("|");
|
|
453
|
+
jsres['results'][line].sncount = snidlist.length;
|
|
454
|
+
};
|
|
455
|
+
|
|
456
|
+
console.log( JSON.stringify(jsres) );
|
|
457
|
+
endexit();
|
|
458
|
+
});
|
|
459
|
+
};
|
|
460
|
+
function changeuserdevicemode(){
|
|
461
|
+
var sqline = "UPDATE `sbox_device_info` SET `iswarning` = '@iswarning' ,`kind` = '@kind' ,`device_type` = '@device_type' \
|
|
462
|
+
WHERE (`user_id` = '@userid' and `id` = '@deviceid' );";
|
|
463
|
+
sqline = sqline.replace("@userid",request.userid);
|
|
464
|
+
sqline = sqline.replace("@iswarning",request.iswarning);
|
|
465
|
+
sqline = sqline.replace("@device_type",request.device_type);
|
|
466
|
+
sqline = sqline.replace("@kind",request.kind);
|
|
467
|
+
sqline = sqline.replace("@deviceid",request.deviceid);
|
|
468
|
+
connection.query(sqline,function(error, results, fields){
|
|
469
|
+
if(error != null ){
|
|
470
|
+
jsres['res'] = false;
|
|
471
|
+
jsres['info'] = error;
|
|
472
|
+
console.log( JSON.stringify(jsres) );
|
|
473
|
+
endexit();
|
|
474
|
+
}
|
|
475
|
+
jsres['res'] = true;
|
|
476
|
+
jsres['efrow'] = results.affectedRows;
|
|
477
|
+
console.log( JSON.stringify(jsres) );
|
|
478
|
+
endexit();
|
|
479
|
+
});
|
|
480
|
+
};
|
|
481
|
+
function getusersdevice(){
|
|
482
|
+
var sqline = 'SELECT * FROM sbox_device_info where user_id = \'@userid\';';
|
|
483
|
+
sqline = sqline.replace("@userid",request.userid);
|
|
484
|
+
connection.query(sqline,function(error, results, fields){
|
|
485
|
+
if(error != null ){
|
|
486
|
+
endexit();
|
|
487
|
+
}
|
|
488
|
+
jsres['data'] = results;
|
|
489
|
+
jsres['res'] = true;
|
|
490
|
+
console.log(JSON.stringify(jsres));
|
|
491
|
+
endexit();
|
|
492
|
+
});
|
|
493
|
+
};
|
|
494
|
+
function getusersinfo(){
|
|
495
|
+
connection.query("SELECT * FROM sbox_users;",function(error, results, fields){
|
|
496
|
+
|
|
497
|
+
if(error != null ){
|
|
498
|
+
endexit();
|
|
499
|
+
}
|
|
500
|
+
var obary = [];
|
|
501
|
+
for(var line in results){
|
|
502
|
+
var obj = {};
|
|
503
|
+
obj.id = results[line].id;
|
|
504
|
+
obj.user_name = results[line].user_name;
|
|
505
|
+
obj.master_id = results[line].master_id;
|
|
506
|
+
obj.ctime = results[line].ctime;
|
|
507
|
+
obj.nickname = results[line].nickname;
|
|
508
|
+
obj.user_level = results[line].user_level;
|
|
509
|
+
obj.user_type = results[line].user_type;
|
|
510
|
+
obj.status = results[line].status;
|
|
511
|
+
obj.token = results[line].token;
|
|
512
|
+
obj.qianfei = results[line].qianfei;
|
|
513
|
+
obj.cdnpath = results[line].cdnpath;
|
|
514
|
+
obj.jiankong = results[line].jiankong;
|
|
515
|
+
obj.mask = results[line].mask;
|
|
516
|
+
obary.push(obj);
|
|
517
|
+
};
|
|
518
|
+
jsres['data'] = obary;
|
|
519
|
+
jsres['res'] = true;
|
|
520
|
+
console.log(JSON.stringify(jsres));
|
|
521
|
+
endexit();
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
function endexit(){
|
|
525
|
+
if(jsonstr.sqlme.sqlmedbk == 1){
|
|
526
|
+
connection.end();
|
|
527
|
+
}
|
|
528
|
+
process.exit();
|
|
529
|
+
}
|