-
Notifications
You must be signed in to change notification settings - Fork 0
/
code.js
152 lines (120 loc) · 3.18 KB
/
code.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/**
* This code can be used as a template for serving multiple HTML
* pages in a single Apps Script project. Note that the default
* page is titled "Index" the title for all other pages can be
* retrieved by using [e.parameter.page].
*/
/**
* Get the URL for the Google Apps Script running as a WebApp.
*/
function getScriptUrl() {
var url = ScriptApp.getService().getUrl();
return url;
}
/**
* Get "home page", or a requested page.
* Expects a 'page' parameter in querystring.
*
* @param {event} e Event passed to doGet, with querystring
* @returns {String/html} Html to be served
*/
function doGet(e) {
//Logger.log( Utilities.jsonStringify(e) ); // Shows web page details
if (!e.parameter.page) {
return HtmlService.createTemplateFromFile('Index')
.evaluate()
.setTitle("K.M.S Kerjava's Module System");
}
// else, use page parameter to pick an html file from the script
return HtmlService.createTemplateFromFile(e.parameter.page)
.evaluate()
.setTitle(e.parameter.page);
}
/**
* ****************************************************************************************
*/
function elect_clr(){
var this_user = Session.getActiveUser().getEmail();
user_storage_deldata(this_user + "elect");
}
/**
*
*/
function elect_load(){
var this_user = Session.getActiveUser().getEmail();
var data = user_storage_getdata(this_user + "elect");
return data;
}
function elct_save(data){
var this_user = Session.getActiveUser().getEmail();
Logger.log(data[0].name);
user_storage_setdata(this_user + "elect",data);
}
function elct_clr(){
var this_user = Session.getActiveUser().getEmail();
user_storage_deldata(this_user + "elect");
}
/**
* ****************************************************************************************
*/
/**
*
*/
function band_load(){
var this_user = Session.getActiveUser().getEmail();
var data = user_storage_getdata(this_user + "bandwidth");
return data;
}
/**
*
*/
function band_save(data){
var this_user = Session.getActiveUser().getEmail();
Logger.log(data[0].name);
user_storage_setdata(this_user + "bandwidth",data);
}
/**
* ****************************************************************************************************************************************************************
*/
var global = {};
/**
*
*/
function message_makechan(channame){
var this_user = Session.getActiveUser().getEmail();
var this_user = Session.getActiveUser().getEmail();
Logger.log(data[0].name);
user_storage_setdata(this_user + "bandwidth",data);
}
/**
*
*/
function message_removechan(channame){
}
/**
* data 0 : channame
* data 1 : timestamp
*/
function message_check(data){
var this_user = Session.getActiveUser().getEmail();
if(data.length > 1){
}else{
}
}
/**
*
*/
function message_send(data){
var this_user = Session.getActiveUser().getEmail();
//Logger.log(data[0].name);
storage_setdata(this_user + "messager",data);
}
function message_saveuser(data){
var this_user = Session.getActiveUser().getEmail();
Logger.log(data[0].name);
user_storage_setdata("message_userdata",data);
}
function message_savechanel(name,pub){
}
function message_delchanel(name){
}