]> git.stg.codes - stg.git/blob - doc/xmlrpc/API-user.xml
Moved CHECK_USER parser from global scope.
[stg.git] / doc / xmlrpc / API-user.xml
1 <?xml version='1.0' encoding='UTF-8'?>
2 <chapter xmlns="http://docbook.org/ns/docbook">
3     <title>Управление пользователями</title>
4     <refentry id="stargazer.get_user">
5         <refmeta>
6             <refentrytitle>stargazer.get_user</refentrytitle>
7         </refmeta>
8         <refnamediv>
9             <refname>stargazer.get_user</refname>
10             <refpurpose>Получение информации о пользователе</refpurpose>
11         </refnamediv>
12         <refsynopsisdiv>
13             <funcsynopsis>
14                 <funcprototype>
15                     <funcdef><function>stargazer.get_user</function></funcdef>
16                     <paramdef>string <parameter>cookie</parameter></paramdef>
17                     <paramdef>string <parameter>login</parameter></paramdef>
18                 </funcprototype>
19             </funcsynopsis>
20         </refsynopsisdiv>
21         <refsect1>
22             <title>Description</title>
23             <para>Метод <function>stargazer.get_user</function> возвращает информацию о пользователе системы.</para>
24             <variablelist>
25                 <varlistentry>
26                     <term>string <parameter>cookie</parameter></term>
27                     <listitem>
28                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
29                     </listitem>
30                 </varlistentry>
31                 <varlistentry>
32                     <term>string <parameter>login</parameter></term>
33                     <listitem>
34                         <para>Логин пользователя</para>
35                     </listitem>
36                 </varlistentry>
37             </variablelist>
38             <refsect2>
39                 <title>Return Value</title>
40                 <para>
41                     Возвращает структуру:
42                     <variablelist>
43                         <varlistentry>
44                             <term>bool <structfield>result</structfield></term>
45                             <listitem>
46                                 <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie, неправильный логин пользователя).</para>
47                             </listitem>
48                         </varlistentry>
49                         <varlistentry>
50                             <term>string <structfield>login</structfield></term>
51                             <listitem>
52                                 <para>Логин пользователя</para>
53                             </listitem>
54                         </varlistentry>
55                         <varlistentry>
56                             <term>string <structfield>password</structfield></term>
57                             <listitem>
58                                 <para>Пароль пользователя</para>
59                             </listitem>
60                         </varlistentry>
61                         <varlistentry>
62                             <term>double <structfield>cash</structfield></term>
63                             <listitem>
64                                 <para>Количество денег на счету</para>
65                             </listitem>
66                         </varlistentry>
67                         <varlistentry>
68                             <term>double <structfield>freemb</structfield></term>
69                             <listitem>
70                                 <para>Количество свободных мегабайт на счету</para>
71                             </listitem>
72                         </varlistentry>
73                         <varlistentry>
74                             <term>double <structfield>credit</structfield></term>
75                             <listitem>
76                                 <para>Размер кредита</para>
77                             </listitem>
78                         </varlistentry>
79                         <varlistentry>
80                             <term>int <structfield>creditexpire</structfield></term>
81                             <listitem>
82                                 <para>Время истечения срока кредита в формате Unix-timestamp</para>
83                             </listitem>
84                         </varlistentry>
85                         <varlistentry>
86                             <term>string <structfield>tariff</structfield></term>
87                             <listitem>
88                                 <para>Текущий тариф пользователя. В случае, если заказано изменение тарифа в следующем месяце возвращаются оба тарифа, разделенные символом "/" (косая черта)</para>
89                             </listitem>
90                         </varlistentry>
91                         <varlistentry>
92                             <term>string <structfield>note</structfield></term>
93                             <listitem>
94                                 <para>Примечания</para>
95                             </listitem>
96                         </varlistentry>
97                         <varlistentry>
98                             <term>string <structfield>phone</structfield></term>
99                             <listitem>
100                                 <para>Контактный телефон</para>
101                             </listitem>
102                         </varlistentry>
103                         <varlistentry>
104                             <term>string <structfield>address</structfield></term>
105                             <listitem>
106                                 <para>Адрес пользователя</para>
107                             </listitem>
108                         </varlistentry>
109                         <varlistentry>
110                             <term>string <structfield>email</structfield></term>
111                             <listitem>
112                                 <para>E-Mail пользователя</para>
113                             </listitem>
114                         </varlistentry>
115                         <varlistentry>
116                             <term>array of strings <structfield>userdata</structfield></term>
117                             <listitem>
118                                 <para>Набор полей UserData</para>
119                             </listitem>
120                         </varlistentry>
121                         <varlistentry>
122                             <term>string <structfield>name</structfield></term>
123                             <listitem>
124                                 <para>Реальное имя пользователя</para>
125                             </listitem>
126                         </varlistentry>
127                         <varlistentry>
128                             <term>string <structfield>group</structfield></term>
129                             <listitem>
130                                 <para>Группа пользователя</para>
131                             </listitem>
132                         </varlistentry>
133                         <varlistentry>
134                             <term>boolean <structfield>status</structfield></term>
135                             <listitem>
136                                 <para>Статус пользователя. true - подключен, false - отключен</para>
137                             </listitem>
138                         </varlistentry>
139                         <varlistentry>
140                             <term>boolean <structfield>aonline</structfield></term>
141                             <listitem>
142                                 <para>Признак "Always Online"</para>
143                             </listitem>
144                         </varlistentry>
145                         <varlistentry>
146                             <term>boolean <structfield>down</structfield></term>
147                             <listitem>
148                                 <para>Пользователь отключен</para>
149                             </listitem>
150                         </varlistentry>
151                         <varlistentry>
152                             <term>boolean <structfield>passive</structfield></term>
153                             <listitem>
154                                 <para>Пользователь "заморожен"</para>
155                             </listitem>
156                         </varlistentry>
157                         <varlistentry>
158                             <term>boolean <structfield>disableddetailstat</structfield></term>
159                             <listitem>
160                                 <para>Для пользователя отключено ведение детальной статистики</para>
161                             </listitem>
162                         </varlistentry>
163                         <varlistentry>
164                             <term>string <structfield>currip</structfield></term>
165                             <listitem>
166                                 <para>Текущий IP-адрес пользователя в формате A.B.C.D</para>
167                             </listitem>
168                         </varlistentry>
169                         <varlistentry>
170                             <term>string <structfield>ips</structfield></term>
171                             <listitem>
172                                 <para>IP-адреса, назначенные пользователю, разделенные символом "," (запятая)</para>
173                             </listitem>
174                         </varlistentry>
175                         <varlistentry>
176                             <term>double <structfield>lastcash</structfield></term>
177                             <listitem>
178                                 <para>Последнее пополнение счета</para>
179                             </listitem>
180                         </varlistentry>
181                         <varlistentry>
182                             <term>double <structfield>lasttimecash</structfield></term>
183                             <listitem>
184                                 <para>Время последнего пополнения счета в формате Unix-timestamp</para>
185                             </listitem>
186                         </varlistentry>
187                         <varlistentry>
188                             <term>int <structfield>lastactivitytime</structfield></term>
189                             <listitem>
190                                 <para>Время последней активности пользователя в формате Unix-timestamp</para>
191                             </listitem>
192                         </varlistentry>
193                         <varlistentry>
194                             <term>int <structfield>pingtime</structfield></term>
195                             <listitem>
196                                 <para>Время последнего пинга пользователя в формате Unix-timestamp</para>
197                             </listitem>
198                         </varlistentry>
199                         <varlistentry>
200                             <term>struct <structfield>traff</structfield></term>
201                             <listitem>
202                                 <para>Информация о трафике</para>
203                                 <variablelist>
204                                     <varlistentry>
205                                         <term>array of i8 <structfield>mu</structfield></term>
206                                         <listitem>
207                                             <para>Исходяий трафик за месяц (по направлениям)</para>
208                                         </listitem>
209                                     </varlistentry>
210                                     <varlistentry>
211                                         <term>array of i8 <structfield>md</structfield></term>
212                                         <listitem>
213                                             <para>Входящий трафик за месяц (по направлениям)</para>
214                                         </listitem>
215                                     </varlistentry>
216                                     <varlistentry>
217                                         <term>array of i8 <structfield>su</structfield></term>
218                                         <listitem>
219                                             <para>Исходяий трафик за сессию (по направлениям)</para>
220                                         </listitem>
221                                     </varlistentry>
222                                     <varlistentry>
223                                         <term>array of i8 <structfield>sd</structfield></term>
224                                         <listitem>
225                                             <para>Входящий трафик за сессию (по направлениям)</para>
226                                         </listitem>
227                                     </varlistentry>
228                                 </variablelist>
229                             </listitem>
230                         </varlistentry>
231                     </variablelist>
232                 </para>
233             </refsect2>
234         </refsect1>
235         <refsect1>
236             <title>See also</title>
237             <para>
238                 <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
239                 <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
240                 <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
241                 <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
242                 <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
243                 <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>,
244                 <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
245                 <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
246                 <link linkend="stargazer.get_user_auth_by"><function>stargazer.get_user_auth_by</function></link>
247             </para>
248         </refsect1>
249     </refentry>
250     <refentry id="stargazer.get_users">
251         <refmeta>
252             <refentrytitle>stargazer.get_users</refentrytitle>
253         </refmeta>
254         <refnamediv>
255             <refname>stargazer.get_users</refname>
256             <refpurpose>Получение информации о пользователях</refpurpose>
257         </refnamediv>
258         <refsynopsisdiv>
259             <funcsynopsis>
260                 <funcprototype>
261                     <funcdef><function>stargazer.get_users</function></funcdef>
262                     <paramdef>string <parameter>cookie</parameter></paramdef>
263                 </funcprototype>
264             </funcsynopsis>
265         </refsynopsisdiv>
266         <refsect1>
267             <title>Description</title>
268             <para>Метод <function>stargazer.get_users</function> возвращает информацию о пользователях системы.</para>
269             <variablelist>
270                 <varlistentry>
271                     <term>string <parameter>cookie</parameter></term>
272                     <listitem>
273                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
274                     </listitem>
275                 </varlistentry>
276             </variablelist>
277             <refsect2>
278                 <title>Return Value</title>
279                 <para>
280                     Возвращает массив структур:
281                     <variablelist>
282                         <varlistentry>
283                             <term>bool <structfield>result</structfield></term>
284                             <listitem>
285                                 <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie, неправильный логин пользователя).</para>
286                             </listitem>
287                         </varlistentry>
288                         <varlistentry>
289                             <term>string <structfield>login</structfield></term>
290                             <listitem>
291                                 <para>Логин пользователя</para>
292                             </listitem>
293                         </varlistentry>
294                         <varlistentry>
295                             <term>string <structfield>password</structfield></term>
296                             <listitem>
297                                 <para>Пароль пользователя</para>
298                             </listitem>
299                         </varlistentry>
300                         <varlistentry>
301                             <term>double <structfield>cash</structfield></term>
302                             <listitem>
303                                 <para>Количество денег на счету</para>
304                             </listitem>
305                         </varlistentry>
306                         <varlistentry>
307                             <term>double <structfield>freemb</structfield></term>
308                             <listitem>
309                                 <para>Количество свободных мегабайт на счету</para>
310                             </listitem>
311                         </varlistentry>
312                         <varlistentry>
313                             <term>double <structfield>credit</structfield></term>
314                             <listitem>
315                                 <para>Размер кредита</para>
316                             </listitem>
317                         </varlistentry>
318                         <varlistentry>
319                             <term>int <structfield>creditexpire</structfield></term>
320                             <listitem>
321                                 <para>Время истечения срока кредита в формате Unix-timestamp</para>
322                             </listitem>
323                         </varlistentry>
324                         <varlistentry>
325                             <term>string <structfield>tariff</structfield></term>
326                             <listitem>
327                                 <para>Текущий тариф пользователя. В случае, если заказано изменение тарифа в следующем месяце возвращаются оба тарифа, разделенные символом "/" (косая черта)</para>
328                             </listitem>
329                         </varlistentry>
330                         <varlistentry>
331                             <term>string <structfield>note</structfield></term>
332                             <listitem>
333                                 <para>Примечания</para>
334                             </listitem>
335                         </varlistentry>
336                         <varlistentry>
337                             <term>string <structfield>phone</structfield></term>
338                             <listitem>
339                                 <para>Контактный телефон</para>
340                             </listitem>
341                         </varlistentry>
342                         <varlistentry>
343                             <term>string <structfield>address</structfield></term>
344                             <listitem>
345                                 <para>Адрес пользователя</para>
346                             </listitem>
347                         </varlistentry>
348                         <varlistentry>
349                             <term>string <structfield>email</structfield></term>
350                             <listitem>
351                                 <para>E-Mail пользователя</para>
352                             </listitem>
353                         </varlistentry>
354                         <varlistentry>
355                             <term>array of strings <structfield>userdata</structfield></term>
356                             <listitem>
357                                 <para>Набор полей UserData</para>
358                             </listitem>
359                         </varlistentry>
360                         <varlistentry>
361                             <term>string <structfield>name</structfield></term>
362                             <listitem>
363                                 <para>Реальное имя пользователя</para>
364                             </listitem>
365                         </varlistentry>
366                         <varlistentry>
367                             <term>string <structfield>group</structfield></term>
368                             <listitem>
369                                 <para>Группа пользователя</para>
370                             </listitem>
371                         </varlistentry>
372                         <varlistentry>
373                             <term>boolean <structfield>status</structfield></term>
374                             <listitem>
375                                 <para>Статус пользователя. true - подключен, false - отключен</para>
376                             </listitem>
377                         </varlistentry>
378                         <varlistentry>
379                             <term>boolean <structfield>aonline</structfield></term>
380                             <listitem>
381                                 <para>Признак "Always Online"</para>
382                             </listitem>
383                         </varlistentry>
384                         <varlistentry>
385                             <term>boolean <structfield>down</structfield></term>
386                             <listitem>
387                                 <para>Пользователь отключен</para>
388                             </listitem>
389                         </varlistentry>
390                         <varlistentry>
391                             <term>boolean <structfield>passive</structfield></term>
392                             <listitem>
393                                 <para>Пользователь "заморожен"</para>
394                             </listitem>
395                         </varlistentry>
396                         <varlistentry>
397                             <term>boolean <structfield>disableddetailstat</structfield></term>
398                             <listitem>
399                                 <para>Для пользователя отключено ведение детальной статистики</para>
400                             </listitem>
401                         </varlistentry>
402                         <varlistentry>
403                             <term>string <structfield>currip</structfield></term>
404                             <listitem>
405                                 <para>Текущий IP-адрес пользователя в формате A.B.C.D</para>
406                             </listitem>
407                         </varlistentry>
408                         <varlistentry>
409                             <term>string <structfield>ips</structfield></term>
410                             <listitem>
411                                 <para>IP-адреса, назначенные пользователю, разделенные символом "," (запятая)</para>
412                             </listitem>
413                         </varlistentry>
414                         <varlistentry>
415                             <term>double <structfield>lastcash</structfield></term>
416                             <listitem>
417                                 <para>Последнее пополнение счета</para>
418                             </listitem>
419                         </varlistentry>
420                         <varlistentry>
421                             <term>double <structfield>lasttimecash</structfield></term>
422                             <listitem>
423                                 <para>Время последнего пополнения счета в формате Unix-timestamp</para>
424                             </listitem>
425                         </varlistentry>
426                         <varlistentry>
427                             <term>int <structfield>lastactivitytime</structfield></term>
428                             <listitem>
429                                 <para>Время последней активности пользователя в формате Unix-timestamp</para>
430                             </listitem>
431                         </varlistentry>
432                         <varlistentry>
433                             <term>int <structfield>pingtime</structfield></term>
434                             <listitem>
435                                 <para>Время последнего пинга пользователя в формате Unix-timestamp</para>
436                             </listitem>
437                         </varlistentry>
438                         <varlistentry>
439                             <term>struct <structfield>traff</structfield></term>
440                             <listitem>
441                                 <para>Информация о трафике</para>
442                                 <variablelist>
443                                     <varlistentry>
444                                         <term>array of i8 <structfield>mu</structfield></term>
445                                         <listitem>
446                                             <para>Исходяий трафик за месяц (по направлениям)</para>
447                                         </listitem>
448                                     </varlistentry>
449                                     <varlistentry>
450                                         <term>array of i8 <structfield>md</structfield></term>
451                                         <listitem>
452                                             <para>Входящий трафик за месяц (по направлениям)</para>
453                                         </listitem>
454                                     </varlistentry>
455                                     <varlistentry>
456                                         <term>array of i8 <structfield>su</structfield></term>
457                                         <listitem>
458                                             <para>Исходяий трафик за сессию (по направлениям)</para>
459                                         </listitem>
460                                     </varlistentry>
461                                     <varlistentry>
462                                         <term>array of i8 <structfield>sd</structfield></term>
463                                         <listitem>
464                                             <para>Входящий трафик за сессию (по направлениям)</para>
465                                         </listitem>
466                                     </varlistentry>
467                                 </variablelist>
468                             </listitem>
469                         </varlistentry>
470                     </variablelist>
471                 </para>
472             </refsect2>
473         </refsect1>
474         <refsect1>
475             <title>See also</title>
476             <para>
477                 <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
478                 <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
479                 <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
480                 <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
481                 <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
482                 <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>,
483                 <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
484                 <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
485                 <link linkend="stargazer.get_user_auth_by"><function>stargazer.get_user_auth_by</function></link>
486             </para>
487         </refsect1>
488     </refentry>
489     <refentry id="stargazer.add_user">
490         <refmeta>
491             <refentrytitle>stargazer.add_user</refentrytitle>
492         </refmeta>
493         <refnamediv>
494             <refname>stargazer.add_user</refname>
495             <refpurpose>Регистрация нового пользователя</refpurpose>
496         </refnamediv>
497         <refsynopsisdiv>
498             <funcsynopsis>
499                 <funcprototype>
500                     <funcdef><function>stargazer.add_user</function></funcdef>
501                     <paramdef>string <parameter>cookie</parameter></paramdef>
502                     <paramdef>string <parameter>login</parameter></paramdef>
503                 </funcprototype>
504             </funcsynopsis>
505         </refsynopsisdiv>
506         <refsect1>
507             <title>Description</title>
508             <para>Метод <function>stargazer.add_user</function> регистрирует в системе нового "пустого" пользователя. Для изменения регистрационной информации сразу после создания используется метод <function><link linkend="stargazer.chg_user">stargazer.chg_user</link></function></para>
509             <variablelist>
510                 <varlistentry>
511                     <term>string <parameter>cookie</parameter></term>
512                     <listitem>
513                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
514                     </listitem>
515                 </varlistentry>
516                 <varlistentry>
517                     <term>string <parameter>login</parameter></term>
518                     <listitem>
519                         <para>Логин пользователя</para>
520                     </listitem>
521                 </varlistentry>
522             </variablelist>
523             <refsect2>
524                 <title>Return Value</title>
525                 <para>Возвращает true в случае успеха и false в случае неудачи</para>
526             </refsect2>
527         </refsect1>
528         <refsect1>
529             <title>See also</title>
530             <para>
531                 <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
532                 <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
533                 <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
534                 <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
535                 <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
536                 <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>,
537                 <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
538                 <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
539                 <link linkend="stargazer.get_user_auth_by"><function>stargazer.get_user_auth_by</function></link>
540             </para>
541         </refsect1>
542     </refentry>
543     <refentry id="stargazer.chg_user">
544         <refmeta>
545             <refentrytitle>stargazer.chg_user</refentrytitle>
546         </refmeta>
547         <refnamediv>
548             <refname>stargazer.chg_user</refname>
549             <refpurpose>Изменение регистрационной информации и данных о трафике пользователя</refpurpose>
550         </refnamediv>
551         <refsynopsisdiv>
552             <funcsynopsis>
553                 <funcprototype>
554                     <funcdef><function>stargazer.chg_user</function></funcdef>
555                     <paramdef>string <parameter>cookie</parameter></paramdef>
556                     <paramdef>string <parameter>login</parameter></paramdef>
557                     <paramdef>struct <parameter>info</parameter></paramdef>
558                 </funcprototype>
559             </funcsynopsis>
560         </refsynopsisdiv>
561         <refsect1>
562             <title>Description</title>
563             <para>Метод <function>stargazer.chg_user</function> сохраняет регистрационную информацию и данные о трафике пользователя. Допустимо частичное указание параметров в структуре info. В этом случае изменение затронет только указанные параметры. Дополнительные поля структуры (не входящие в описание) будут проигнорированы.</para>
564             <variablelist>
565                 <varlistentry>
566                     <term>string <parameter>cookie</parameter></term>
567                     <listitem>
568                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
569                     </listitem>
570                 </varlistentry>
571                 <varlistentry>
572                     <term>string <parameter>login</parameter></term>
573                     <listitem>
574                         <para>Логин пользователя</para>
575                     </listitem>
576                 </varlistentry>
577                 <varlistentry>
578                     <term>struct <parameter>info</parameter></term>
579                     <listitem>
580                         <para>
581                             Регистрационная информация и данные о трафике.
582                             <variablelist>
583                                 <varlistentry>
584                                     <term>bool <structfield>result</structfield></term>
585                                     <listitem>
586                                         <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie, неправильный логин пользователя).</para>
587                                     </listitem>
588                                 </varlistentry>
589                                 <varlistentry>
590                                     <term>string <structfield>login</structfield></term>
591                                     <listitem>
592                                         <para>Логин пользователя</para>
593                                     </listitem>
594                                 </varlistentry>
595                                 <varlistentry>
596                                     <term>string <structfield>password</structfield></term>
597                                     <listitem>
598                                         <para>Пароль пользователя</para>
599                                     </listitem>
600                                 </varlistentry>
601                                 <varlistentry>
602                                     <term>double <structfield>freemb</structfield></term>
603                                     <listitem>
604                                         <para>Количество свободных мегабайт на счету</para>
605                                     </listitem>
606                                 </varlistentry>
607                                 <varlistentry>
608                                     <term>double <structfield>credit</structfield></term>
609                                     <listitem>
610                                         <para>Размер кредита</para>
611                                     </listitem>
612                                 </varlistentry>
613                                 <varlistentry>
614                                     <term>int <structfield>creditexpire</structfield></term>
615                                     <listitem>
616                                         <para>Время истечения срока кредита в формате Unix-timestamp</para>
617                                     </listitem>
618                                 </varlistentry>
619                                 <varlistentry>
620                                     <term>string <structfield>note</structfield></term>
621                                     <listitem>
622                                         <para>Примечания</para>
623                                     </listitem>
624                                 </varlistentry>
625                                 <varlistentry>
626                                     <term>string <structfield>phone</structfield></term>
627                                     <listitem>
628                                         <para>Контактный телефон</para>
629                                     </listitem>
630                                 </varlistentry>
631                                 <varlistentry>
632                                     <term>string <structfield>address</structfield></term>
633                                     <listitem>
634                                         <para>Адрес пользователя</para>
635                                     </listitem>
636                                 </varlistentry>
637                                 <varlistentry>
638                                     <term>string <structfield>email</structfield></term>
639                                     <listitem>
640                                         <para>E-Mail пользователя</para>
641                                     </listitem>
642                                 </varlistentry>
643                                 <varlistentry>
644                                     <term>array of strings <structfield>userdata</structfield></term>
645                                     <listitem>
646                                         <para>Набор полей UserData</para>
647                                     </listitem>
648                                 </varlistentry>
649                                 <varlistentry>
650                                     <term>string <structfield>name</structfield></term>
651                                     <listitem>
652                                         <para>Реальное имя пользователя</para>
653                                     </listitem>
654                                 </varlistentry>
655                                 <varlistentry>
656                                     <term>string <structfield>group</structfield></term>
657                                     <listitem>
658                                         <para>Группа пользователя</para>
659                                     </listitem>
660                                 </varlistentry>
661                                 <varlistentry>
662                                     <term>boolean <structfield>status</structfield></term>
663                                     <listitem>
664                                         <para>Статус пользователя. true - подключен, false - отключен</para>
665                                     </listitem>
666                                 </varlistentry>
667                                 <varlistentry>
668                                     <term>boolean <structfield>aonline</structfield></term>
669                                     <listitem>
670                                         <para>Признак "Always Online"</para>
671                                     </listitem>
672                                 </varlistentry>
673                                 <varlistentry>
674                                     <term>boolean <structfield>down</structfield></term>
675                                     <listitem>
676                                         <para>Пользователь отключен</para>
677                                     </listitem>
678                                 </varlistentry>
679                                 <varlistentry>
680                                     <term>boolean <structfield>passive</structfield></term>
681                                     <listitem>
682                                         <para>Пользователь "заморожен"</para>
683                                     </listitem>
684                                 </varlistentry>
685                                 <varlistentry>
686                                     <term>boolean <structfield>disableddetailstat</structfield></term>
687                                     <listitem>
688                                         <para>Для пользователя отключено ведение детальной статистики</para>
689                                     </listitem>
690                                 </varlistentry>
691                                 <varlistentry>
692                                     <term>string <structfield>ips</structfield></term>
693                                     <listitem>
694                                         <para>IP-адреса, назначенные пользователю, разделенные символом "," (запятая)</para>
695                                     </listitem>
696                                 </varlistentry>
697                                 <varlistentry>
698                                     <term>struct <structfield>traff</structfield></term>
699                                     <listitem>
700                                         <para>Информация о трафике</para>
701                                         <variablelist>
702                                             <varlistentry>
703                                                 <term>array of i8 <structfield>mu</structfield></term>
704                                                 <listitem>
705                                                     <para>Исходяий трафик за месяц (по направлениям)</para>
706                                                 </listitem>
707                                             </varlistentry>
708                                             <varlistentry>
709                                                 <term>array of i8 <structfield>md</structfield></term>
710                                                 <listitem>
711                                                     <para>Входящий трафик за месяц (по направлениям)</para>
712                                                 </listitem>
713                                             </varlistentry>
714                                         </variablelist>
715                                     </listitem>
716                                 </varlistentry>
717                             </variablelist>
718                         </para>
719                     </listitem>
720                 </varlistentry>
721             </variablelist>
722             <refsect2>
723                 <title>Return Value</title>
724                 <para>Возвращает true в случае успеха и false в случае неудачи</para>
725             </refsect2>
726         </refsect1>
727         <refsect1>
728             <title>See also</title>
729             <para>
730                 <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
731                 <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
732                 <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
733                 <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
734                 <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
735                 <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>,
736                 <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
737                 <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
738                 <link linkend="stargazer.get_user_auth_by"><function>stargazer.get_user_auth_by</function></link>
739             </para>
740         </refsect1>
741     </refentry>
742     <refentry id="stargazer.del_user">
743         <refmeta>
744             <refentrytitle>stargazer.del_user</refentrytitle>
745         </refmeta>
746         <refnamediv>
747             <refname>stargazer.del_user</refname>
748             <refpurpose>Удаление пользователя</refpurpose>
749         </refnamediv>
750         <refsynopsisdiv>
751             <funcsynopsis>
752                 <funcprototype>
753                     <funcdef><function>stargazer.del_user</function></funcdef>
754                     <paramdef>string <parameter>cookie</parameter></paramdef>
755                     <paramdef>string <parameter>login</parameter></paramdef>
756                 </funcprototype>
757             </funcsynopsis>
758         </refsynopsisdiv>
759         <refsect1>
760             <title>Description</title>
761             <para>Метод <function>stargazer.del_user</function> удаляет из системы пользователя с указанным логином.</para>
762             <variablelist>
763                 <varlistentry>
764                     <term>string <parameter>cookie</parameter></term>
765                     <listitem>
766                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
767                     </listitem>
768                 </varlistentry>
769                 <varlistentry>
770                     <term>string <parameter>login</parameter></term>
771                     <listitem>
772                         <para>Логин пользователя</para>
773                     </listitem>
774                 </varlistentry>
775             </variablelist>
776             <refsect2>
777                 <title>Return Value</title>
778                 <para>Возвращает true в случае успеха и false в случае неудачи</para>
779             </refsect2>
780         </refsect1>
781         <refsect1>
782             <title>See also</title>
783             <para>
784                 <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
785                 <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
786                 <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
787                 <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
788                 <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
789                 <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>,
790                 <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
791                 <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
792                 <link linkend="stargazer.get_user_auth_by"><function>stargazer.get_user_auth_by</function></link>
793             </para>
794         </refsect1>
795     </refentry>
796     <refentry id="stargazer.add_user_cash">
797         <refmeta>
798             <refentrytitle>stargazer.add_user_cash</refentrytitle>
799         </refmeta>
800         <refnamediv>
801             <refname>stargazer.add_user_cash</refname>
802             <refpurpose>Добавление денег на счет пользователя</refpurpose>
803         </refnamediv>
804         <refsynopsisdiv>
805             <funcsynopsis>
806                 <funcprototype>
807                     <funcdef><function>stargazer.add_user_cash</function></funcdef>
808                     <paramdef>string <parameter>cookie</parameter></paramdef>
809                     <paramdef>string <parameter>login</parameter></paramdef>
810                     <paramdef>double <parameter>amount</parameter></paramdef>
811                     <paramdef>string <parameter>comment</parameter></paramdef>
812                 </funcprototype>
813             </funcsynopsis>
814         </refsynopsisdiv>
815         <refsect1>
816             <title>Description</title>
817             <para>Метод <function>stargazer.add_user_cash</function> позволяет добавить деньги на счет указанного пользователя.</para>
818             <variablelist>
819                 <varlistentry>
820                     <term>string <parameter>cookie</parameter></term>
821                     <listitem>
822                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
823                     </listitem>
824                 </varlistentry>
825                 <varlistentry>
826                     <term>string <parameter>login</parameter></term>
827                     <listitem>
828                         <para>Логин пользователя</para>
829                     </listitem>
830                 </varlistentry>
831                 <varlistentry>
832                     <term>double <parameter>amount</parameter></term>
833                     <listitem>
834                         <para>Добавляемая сумма</para>
835                     </listitem>
836                 </varlistentry>
837                 <varlistentry>
838                     <term>string <parameter>comment</parameter></term>
839                     <listitem>
840                         <para>Коментарий</para>
841                     </listitem>
842                 </varlistentry>
843             </variablelist>
844             <refsect2>
845                 <title>Return Value</title>
846                 <para>Возвращает true в случае успеха и false в случае неудачи</para>
847             </refsect2>
848         </refsect1>
849         <refsect1>
850             <title>See also</title>
851             <para>
852                 <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
853                 <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
854                 <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
855                 <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
856                 <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
857                 <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>,
858                 <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
859                 <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
860                 <link linkend="stargazer.get_user_auth_by"><function>stargazer.get_user_auth_by</function></link>
861             </para>
862         </refsect1>
863     </refentry>
864     <refentry id="stargazer.set_user_cash">
865         <refmeta>
866             <refentrytitle>stargazer.set_user_cash</refentrytitle>
867         </refmeta>
868         <refnamediv>
869             <refname>stargazer.set_user_cash</refname>
870             <refpurpose>Установка состояния счета пользователя</refpurpose>
871         </refnamediv>
872         <refsynopsisdiv>
873             <funcsynopsis>
874                 <funcprototype>
875                     <funcdef><function>stargazer.set_user_cash</function></funcdef>
876                     <paramdef>string <parameter>cookie</parameter></paramdef>
877                     <paramdef>string <parameter>login</parameter></paramdef>
878                     <paramdef>double <parameter>cash</parameter></paramdef>
879                     <paramdef>string <parameter>comment</parameter></paramdef>
880                 </funcprototype>
881             </funcsynopsis>
882         </refsynopsisdiv>
883         <refsect1>
884             <title>Description</title>
885             <para>Метод <function>stargazer.set_user_cash</function> позволяет установить состояние счета пользователя.</para>
886             <variablelist>
887                 <varlistentry>
888                     <term>string <parameter>cookie</parameter></term>
889                     <listitem>
890                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
891                     </listitem>
892                 </varlistentry>
893                 <varlistentry>
894                     <term>string <parameter>login</parameter></term>
895                     <listitem>
896                         <para>Логин пользователя</para>
897                     </listitem>
898                 </varlistentry>
899                 <varlistentry>
900                     <term>double <parameter>cash</parameter></term>
901                     <listitem>
902                         <para>Устанавливаемая сумма</para>
903                     </listitem>
904                 </varlistentry>
905                 <varlistentry>
906                     <term>string <parameter>comment</parameter></term>
907                     <listitem>
908                         <para>Коментарий</para>
909                     </listitem>
910                 </varlistentry>
911             </variablelist>
912             <refsect2>
913                 <title>Return Value</title>
914                 <para>Возвращает true в случае успеха и false в случае неудачи</para>
915             </refsect2>
916         </refsect1>
917         <refsect1>
918             <title>See also</title>
919             <para>
920                 <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
921                 <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
922                 <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
923                 <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
924                 <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
925                 <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
926                 <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
927                 <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
928                 <link linkend="stargazer.get_user_auth_by"><function>stargazer.get_user_auth_by</function></link>
929             </para>
930         </refsect1>
931     </refentry>
932     <refentry id="stargazer.chg_user_tariff">
933         <refmeta>
934             <refentrytitle>stargazer.chg_user_tariff</refentrytitle>
935         </refmeta>
936         <refnamediv>
937             <refname>stargazer.chg_user_tariff</refname>
938             <refpurpose>Изменение тарифного плана пользователя</refpurpose>
939         </refnamediv>
940         <refsynopsisdiv>
941             <funcsynopsis>
942                 <funcprototype>
943                     <funcdef><function>stargazer.chg_user_tariff</function></funcdef>
944                     <paramdef>string <parameter>cookie</parameter></paramdef>
945                     <paramdef>string <parameter>login</parameter></paramdef>
946                     <paramdef>string <parameter>tariff</parameter></paramdef>
947                     <paramdef>boolean <parameter>delayed</parameter></paramdef>
948                     <paramdef>string <parameter>comment</parameter></paramdef>
949                 </funcprototype>
950             </funcsynopsis>
951         </refsynopsisdiv>
952         <refsect1>
953             <title>Description</title>
954             <para>Метод <function>stargazer.chg_user_tariff</function> позволяет изменить тарифный план пользователя или запланировать его изменение на начало нового месяца.</para>
955             <variablelist>
956                 <varlistentry>
957                     <term>string <parameter>cookie</parameter></term>
958                     <listitem>
959                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
960                     </listitem>
961                 </varlistentry>
962                 <varlistentry>
963                     <term>string <parameter>login</parameter></term>
964                     <listitem>
965                         <para>Логин пользователя</para>
966                     </listitem>
967                 </varlistentry>
968                 <varlistentry>
969                     <term>string <parameter>tariff</parameter></term>
970                     <listitem>
971                         <para>Название нового тарифа</para>
972                     </listitem>
973                 </varlistentry>
974                 <varlistentry>
975                     <term>boolean <parameter>delayed</parameter></term>
976                     <listitem>
977                         <para>Отложенное изменение тарифа (в начале следующего месяца)</para>
978                     </listitem>
979                 </varlistentry>
980                 <varlistentry>
981                     <term>string <parameter>comment</parameter></term>
982                     <listitem>
983                         <para>Коментарий</para>
984                     </listitem>
985                 </varlistentry>
986             </variablelist>
987             <refsect2>
988                 <title>Return Value</title>
989                 <para>Возвращает true в случае успеха и false в случае неудачи</para>
990             </refsect2>
991         </refsect1>
992         <refsect1>
993             <title>See also</title>
994             <para>
995                 <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
996                 <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
997                 <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
998                 <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
999                 <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
1000                 <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
1001                 <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>
1002                 <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
1003                 <link linkend="stargazer.get_user_auth_by"><function>stargazer.get_user_auth_by</function></link>
1004             </para>
1005         </refsect1>
1006     </refentry>
1007     <refentry id="stargazer.get_online_ips">
1008         <refmeta>
1009             <refentrytitle>stargazer.get_online_ips</refentrytitle>
1010         </refmeta>
1011         <refnamediv>
1012             <refname>stargazer.get_online_ips</refname>
1013             <refpurpose>Получение списка IP-адресов online-пользователей</refpurpose>
1014         </refnamediv>
1015         <refsynopsisdiv>
1016             <funcsynopsis>
1017                 <funcprototype>
1018                     <funcdef><function>stargazer.get_online_ips</function></funcdef>
1019                     <paramdef>string <parameter>cookie</parameter></paramdef>
1020                     <paramdef>array of strings <parameter>subnets</parameter></paramdef>
1021                 </funcprototype>
1022             </funcsynopsis>
1023         </refsynopsisdiv>
1024         <refsect1>
1025             <title>Description</title>
1026             <para>Метод <function>stargazer.get_online_ips</function> позволяет получить список IP-адресов авторизованных пользователей системы для указанного списка подсетей.</para>
1027             <variablelist>
1028                 <varlistentry>
1029                     <term>string <parameter>cookie</parameter></term>
1030                     <listitem>
1031                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
1032                     </listitem>
1033                 </varlistentry>
1034                 <varlistentry>
1035                     <term>array of strings <parameter>subnets</parameter></term>
1036                     <listitem>
1037                         <para>Список подсетей в CIDR-нотации</para>
1038                     </listitem>
1039                 </varlistentry>
1040             </variablelist>
1041             <refsect2>
1042                 <title>Return Value</title>
1043                 <para>Возвращает структуру:</para>
1044                 <variablelist>
1045                     <varlistentry>
1046                         <term>bool <structfield>result</structfield></term>
1047                         <listitem>
1048                             <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie).</para>
1049                         </listitem>
1050                     </varlistentry>
1051                     <varlistentry>
1052                         <term>array of strings <structfield>ips</structfield></term>
1053                         <listitem>
1054                             <para>Список IP-адресов авторизованных пользователей из этих подсетей</para>
1055                         </listitem>
1056                     </varlistentry>
1057                 </variablelist>
1058             </refsect2>
1059         </refsect1>
1060         <refsect1>
1061             <title>See also</title>
1062             <para>
1063                 <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
1064                 <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
1065                 <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
1066                 <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
1067                 <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
1068                 <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
1069                 <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>
1070                 <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
1071                 <link linkend="stargazer.get_user_auth_by"><function>stargazer.get_user_auth_by</function></link>
1072             </para>
1073         </refsect1>
1074     </refentry>
1075     <refentry id="stargazer.get_user_auth_by">
1076         <refmeta>
1077             <refentrytitle>stargazer.get_user_auth_by</refentrytitle>
1078         </refmeta>
1079         <refnamediv>
1080             <refname>stargazer.get_user_auth_by</refname>
1081             <refpurpose>Получение списка авторизаторов которыми авторизован пользователь</refpurpose>
1082         </refnamediv>
1083         <refsynopsisdiv>
1084             <funcsynopsis>
1085                 <funcprototype>
1086                     <funcdef><function>stargazer.get_user_auth_by</function></funcdef>
1087                     <paramdef>string <parameter>cookie</parameter></paramdef>
1088                     <paramdef>string <parameter>login</parameter></paramdef>
1089                 </funcprototype>
1090             </funcsynopsis>
1091         </refsynopsisdiv>
1092         <refsect1>
1093             <title>Description</title>
1094             <para>Метод <function>stargazer.get_user_auth_by</function> позволяет получить список авторизаторов которыми в данный момент авторизован пользователь.</para>
1095             <variablelist>
1096                 <varlistentry>
1097                     <term>string <parameter>cookie</parameter></term>
1098                     <listitem>
1099                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
1100                     </listitem>
1101                 </varlistentry>
1102                 <varlistentry>
1103                     <term>string <parameter>login</parameter></term>
1104                     <listitem>
1105                         <para>Логин пользователя</para>
1106                     </listitem>
1107                 </varlistentry>
1108             </variablelist>
1109             <refsect2>
1110                 <title>Return Value</title>
1111                 <para>Возвращает структуру:</para>
1112                 <variablelist>
1113                     <varlistentry>
1114                         <term>bool <structfield>result</structfield></term>
1115                         <listitem>
1116                             <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie).</para>
1117                         </listitem>
1118                     </varlistentry>
1119                     <varlistentry>
1120                         <term>array of strings <structfield>auths</structfield></term>
1121                         <listitem>
1122                             <para>Список авторизаторов которыми авторизован пользователь.</para>
1123                         </listitem>
1124                     </varlistentry>
1125                 </variablelist>
1126             </refsect2>
1127         </refsect1>
1128         <refsect1>
1129             <title>See also</title>
1130             <para>
1131                 <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
1132                 <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
1133                 <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
1134                 <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
1135                 <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
1136                 <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
1137                 <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>
1138                 <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
1139                 <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
1140             </para>
1141         </refsect1>
1142     </refentry>
1143 </chapter>