]> git.stg.codes - stg.git/blob - doc/xmlrpc/API-user.xml
Fill STG-MIB with real tree branches
[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             </para>
247         </refsect1>
248     </refentry>
249     <refentry id="stargazer.get_users">
250         <refmeta>
251             <refentrytitle>stargazer.get_users</refentrytitle>
252         </refmeta>
253         <refnamediv>
254             <refname>stargazer.get_users</refname>
255             <refpurpose>Получение информации о пользователях</refpurpose>
256         </refnamediv>
257         <refsynopsisdiv>
258             <funcsynopsis>
259                 <funcprototype>
260                     <funcdef><function>stargazer.get_users</function></funcdef>
261                     <paramdef>string <parameter>cookie</parameter></paramdef>
262                 </funcprototype>
263             </funcsynopsis>
264         </refsynopsisdiv>
265         <refsect1>
266             <title>Description</title>
267             <para>Метод <function>stargazer.get_users</function> возвращает информацию о пользователях системы.</para>
268             <variablelist>
269                 <varlistentry>
270                     <term>string <parameter>cookie</parameter></term>
271                     <listitem>
272                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
273                     </listitem>
274                 </varlistentry>
275             </variablelist>
276             <refsect2>
277                 <title>Return Value</title>
278                 <para>
279                     Возвращает массив структур:
280                     <variablelist>
281                         <varlistentry>
282                             <term>bool <structfield>result</structfield></term>
283                             <listitem>
284                                 <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie, неправильный логин пользователя).</para>
285                             </listitem>
286                         </varlistentry>
287                         <varlistentry>
288                             <term>string <structfield>login</structfield></term>
289                             <listitem>
290                                 <para>Логин пользователя</para>
291                             </listitem>
292                         </varlistentry>
293                         <varlistentry>
294                             <term>string <structfield>password</structfield></term>
295                             <listitem>
296                                 <para>Пароль пользователя</para>
297                             </listitem>
298                         </varlistentry>
299                         <varlistentry>
300                             <term>double <structfield>cash</structfield></term>
301                             <listitem>
302                                 <para>Количество денег на счету</para>
303                             </listitem>
304                         </varlistentry>
305                         <varlistentry>
306                             <term>double <structfield>freemb</structfield></term>
307                             <listitem>
308                                 <para>Количество свободных мегабайт на счету</para>
309                             </listitem>
310                         </varlistentry>
311                         <varlistentry>
312                             <term>double <structfield>credit</structfield></term>
313                             <listitem>
314                                 <para>Размер кредита</para>
315                             </listitem>
316                         </varlistentry>
317                         <varlistentry>
318                             <term>int <structfield>creditexpire</structfield></term>
319                             <listitem>
320                                 <para>Время истечения срока кредита в формате Unix-timestamp</para>
321                             </listitem>
322                         </varlistentry>
323                         <varlistentry>
324                             <term>string <structfield>tariff</structfield></term>
325                             <listitem>
326                                 <para>Текущий тариф пользователя. В случае, если заказано изменение тарифа в следующем месяце возвращаются оба тарифа, разделенные символом "/" (косая черта)</para>
327                             </listitem>
328                         </varlistentry>
329                         <varlistentry>
330                             <term>string <structfield>note</structfield></term>
331                             <listitem>
332                                 <para>Примечания</para>
333                             </listitem>
334                         </varlistentry>
335                         <varlistentry>
336                             <term>string <structfield>phone</structfield></term>
337                             <listitem>
338                                 <para>Контактный телефон</para>
339                             </listitem>
340                         </varlistentry>
341                         <varlistentry>
342                             <term>string <structfield>address</structfield></term>
343                             <listitem>
344                                 <para>Адрес пользователя</para>
345                             </listitem>
346                         </varlistentry>
347                         <varlistentry>
348                             <term>string <structfield>email</structfield></term>
349                             <listitem>
350                                 <para>E-Mail пользователя</para>
351                             </listitem>
352                         </varlistentry>
353                         <varlistentry>
354                             <term>array of strings <structfield>userdata</structfield></term>
355                             <listitem>
356                                 <para>Набор полей UserData</para>
357                             </listitem>
358                         </varlistentry>
359                         <varlistentry>
360                             <term>string <structfield>name</structfield></term>
361                             <listitem>
362                                 <para>Реальное имя пользователя</para>
363                             </listitem>
364                         </varlistentry>
365                         <varlistentry>
366                             <term>string <structfield>group</structfield></term>
367                             <listitem>
368                                 <para>Группа пользователя</para>
369                             </listitem>
370                         </varlistentry>
371                         <varlistentry>
372                             <term>boolean <structfield>status</structfield></term>
373                             <listitem>
374                                 <para>Статус пользователя. true - подключен, false - отключен</para>
375                             </listitem>
376                         </varlistentry>
377                         <varlistentry>
378                             <term>boolean <structfield>aonline</structfield></term>
379                             <listitem>
380                                 <para>Признак "Always Online"</para>
381                             </listitem>
382                         </varlistentry>
383                         <varlistentry>
384                             <term>boolean <structfield>down</structfield></term>
385                             <listitem>
386                                 <para>Пользователь отключен</para>
387                             </listitem>
388                         </varlistentry>
389                         <varlistentry>
390                             <term>boolean <structfield>passive</structfield></term>
391                             <listitem>
392                                 <para>Пользователь "заморожен"</para>
393                             </listitem>
394                         </varlistentry>
395                         <varlistentry>
396                             <term>boolean <structfield>disableddetailstat</structfield></term>
397                             <listitem>
398                                 <para>Для пользователя отключено ведение детальной статистики</para>
399                             </listitem>
400                         </varlistentry>
401                         <varlistentry>
402                             <term>string <structfield>currip</structfield></term>
403                             <listitem>
404                                 <para>Текущий IP-адрес пользователя в формате A.B.C.D</para>
405                             </listitem>
406                         </varlistentry>
407                         <varlistentry>
408                             <term>string <structfield>ips</structfield></term>
409                             <listitem>
410                                 <para>IP-адреса, назначенные пользователю, разделенные символом "," (запятая)</para>
411                             </listitem>
412                         </varlistentry>
413                         <varlistentry>
414                             <term>double <structfield>lastcash</structfield></term>
415                             <listitem>
416                                 <para>Последнее пополнение счета</para>
417                             </listitem>
418                         </varlistentry>
419                         <varlistentry>
420                             <term>double <structfield>lasttimecash</structfield></term>
421                             <listitem>
422                                 <para>Время последнего пополнения счета в формате Unix-timestamp</para>
423                             </listitem>
424                         </varlistentry>
425                         <varlistentry>
426                             <term>int <structfield>lastactivitytime</structfield></term>
427                             <listitem>
428                                 <para>Время последней активности пользователя в формате Unix-timestamp</para>
429                             </listitem>
430                         </varlistentry>
431                         <varlistentry>
432                             <term>int <structfield>pingtime</structfield></term>
433                             <listitem>
434                                 <para>Время последнего пинга пользователя в формате Unix-timestamp</para>
435                             </listitem>
436                         </varlistentry>
437                         <varlistentry>
438                             <term>struct <structfield>traff</structfield></term>
439                             <listitem>
440                                 <para>Информация о трафике</para>
441                                 <variablelist>
442                                     <varlistentry>
443                                         <term>array of i8 <structfield>mu</structfield></term>
444                                         <listitem>
445                                             <para>Исходяий трафик за месяц (по направлениям)</para>
446                                         </listitem>
447                                     </varlistentry>
448                                     <varlistentry>
449                                         <term>array of i8 <structfield>md</structfield></term>
450                                         <listitem>
451                                             <para>Входящий трафик за месяц (по направлениям)</para>
452                                         </listitem>
453                                     </varlistentry>
454                                     <varlistentry>
455                                         <term>array of i8 <structfield>su</structfield></term>
456                                         <listitem>
457                                             <para>Исходяий трафик за сессию (по направлениям)</para>
458                                         </listitem>
459                                     </varlistentry>
460                                     <varlistentry>
461                                         <term>array of i8 <structfield>sd</structfield></term>
462                                         <listitem>
463                                             <para>Входящий трафик за сессию (по направлениям)</para>
464                                         </listitem>
465                                     </varlistentry>
466                                 </variablelist>
467                             </listitem>
468                         </varlistentry>
469                     </variablelist>
470                 </para>
471             </refsect2>
472         </refsect1>
473         <refsect1>
474             <title>See also</title>
475             <para>
476                 <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
477                 <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
478                 <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
479                 <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
480                 <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
481                 <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>,
482                 <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
483                 <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
484             </para>
485         </refsect1>
486     </refentry>
487     <refentry id="stargazer.add_user">
488         <refmeta>
489             <refentrytitle>stargazer.add_user</refentrytitle>
490         </refmeta>
491         <refnamediv>
492             <refname>stargazer.add_user</refname>
493             <refpurpose>Регистрация нового пользователя</refpurpose>
494         </refnamediv>
495         <refsynopsisdiv>
496             <funcsynopsis>
497                 <funcprototype>
498                     <funcdef><function>stargazer.add_user</function></funcdef>
499                     <paramdef>string <parameter>cookie</parameter></paramdef>
500                     <paramdef>string <parameter>login</parameter></paramdef>
501                 </funcprototype>
502             </funcsynopsis>
503         </refsynopsisdiv>
504         <refsect1>
505             <title>Description</title>
506             <para>Метод <function>stargazer.add_user</function> регистрирует в системе нового "пустого" пользователя. Для изменения регистрационной информации сразу после создания используется метод <function><link linkend="stargazer.chg_user">stargazer.chg_user</link></function></para>
507             <variablelist>
508                 <varlistentry>
509                     <term>string <parameter>cookie</parameter></term>
510                     <listitem>
511                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
512                     </listitem>
513                 </varlistentry>
514                 <varlistentry>
515                     <term>string <parameter>login</parameter></term>
516                     <listitem>
517                         <para>Логин пользователя</para>
518                     </listitem>
519                 </varlistentry>
520             </variablelist>
521             <refsect2>
522                 <title>Return Value</title>
523                 <para>Возвращает true в случае успеха и false в случае неудачи</para>
524             </refsect2>
525         </refsect1>
526         <refsect1>
527             <title>See also</title>
528             <para>
529                 <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
530                 <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
531                 <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
532                 <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
533                 <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
534                 <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>,
535                 <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
536                 <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
537             </para>
538         </refsect1>
539     </refentry>
540     <refentry id="stargazer.chg_user">
541         <refmeta>
542             <refentrytitle>stargazer.chg_user</refentrytitle>
543         </refmeta>
544         <refnamediv>
545             <refname>stargazer.chg_user</refname>
546             <refpurpose>Изменение регистрационной информации и данных о трафике пользователя</refpurpose>
547         </refnamediv>
548         <refsynopsisdiv>
549             <funcsynopsis>
550                 <funcprototype>
551                     <funcdef><function>stargazer.chg_user</function></funcdef>
552                     <paramdef>string <parameter>cookie</parameter></paramdef>
553                     <paramdef>string <parameter>login</parameter></paramdef>
554                     <paramdef>struct <parameter>info</parameter></paramdef>
555                 </funcprototype>
556             </funcsynopsis>
557         </refsynopsisdiv>
558         <refsect1>
559             <title>Description</title>
560             <para>Метод <function>stargazer.chg_user</function> сохраняет регистрационную информацию и данные о трафике пользователя. Допустимо частичное указание параметров в структуре info. В этом случае изменение затронет только указанные параметры. Дополнительные поля структуры (не входящие в описание) будут проигнорированы.</para>
561             <variablelist>
562                 <varlistentry>
563                     <term>string <parameter>cookie</parameter></term>
564                     <listitem>
565                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
566                     </listitem>
567                 </varlistentry>
568                 <varlistentry>
569                     <term>string <parameter>login</parameter></term>
570                     <listitem>
571                         <para>Логин пользователя</para>
572                     </listitem>
573                 </varlistentry>
574                 <varlistentry>
575                     <term>struct <parameter>info</parameter></term>
576                     <listitem>
577                         <para>
578                             Регистрационная информация и данные о трафике.
579                             <variablelist>
580                                 <varlistentry>
581                                     <term>bool <structfield>result</structfield></term>
582                                     <listitem>
583                                         <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie, неправильный логин пользователя).</para>
584                                     </listitem>
585                                 </varlistentry>
586                                 <varlistentry>
587                                     <term>string <structfield>login</structfield></term>
588                                     <listitem>
589                                         <para>Логин пользователя</para>
590                                     </listitem>
591                                 </varlistentry>
592                                 <varlistentry>
593                                     <term>string <structfield>password</structfield></term>
594                                     <listitem>
595                                         <para>Пароль пользователя</para>
596                                     </listitem>
597                                 </varlistentry>
598                                 <varlistentry>
599                                     <term>double <structfield>freemb</structfield></term>
600                                     <listitem>
601                                         <para>Количество свободных мегабайт на счету</para>
602                                     </listitem>
603                                 </varlistentry>
604                                 <varlistentry>
605                                     <term>double <structfield>credit</structfield></term>
606                                     <listitem>
607                                         <para>Размер кредита</para>
608                                     </listitem>
609                                 </varlistentry>
610                                 <varlistentry>
611                                     <term>int <structfield>creditexpire</structfield></term>
612                                     <listitem>
613                                         <para>Время истечения срока кредита в формате Unix-timestamp</para>
614                                     </listitem>
615                                 </varlistentry>
616                                 <varlistentry>
617                                     <term>string <structfield>note</structfield></term>
618                                     <listitem>
619                                         <para>Примечания</para>
620                                     </listitem>
621                                 </varlistentry>
622                                 <varlistentry>
623                                     <term>string <structfield>phone</structfield></term>
624                                     <listitem>
625                                         <para>Контактный телефон</para>
626                                     </listitem>
627                                 </varlistentry>
628                                 <varlistentry>
629                                     <term>string <structfield>address</structfield></term>
630                                     <listitem>
631                                         <para>Адрес пользователя</para>
632                                     </listitem>
633                                 </varlistentry>
634                                 <varlistentry>
635                                     <term>string <structfield>email</structfield></term>
636                                     <listitem>
637                                         <para>E-Mail пользователя</para>
638                                     </listitem>
639                                 </varlistentry>
640                                 <varlistentry>
641                                     <term>array of strings <structfield>userdata</structfield></term>
642                                     <listitem>
643                                         <para>Набор полей UserData</para>
644                                     </listitem>
645                                 </varlistentry>
646                                 <varlistentry>
647                                     <term>string <structfield>name</structfield></term>
648                                     <listitem>
649                                         <para>Реальное имя пользователя</para>
650                                     </listitem>
651                                 </varlistentry>
652                                 <varlistentry>
653                                     <term>string <structfield>group</structfield></term>
654                                     <listitem>
655                                         <para>Группа пользователя</para>
656                                     </listitem>
657                                 </varlistentry>
658                                 <varlistentry>
659                                     <term>boolean <structfield>status</structfield></term>
660                                     <listitem>
661                                         <para>Статус пользователя. true - подключен, false - отключен</para>
662                                     </listitem>
663                                 </varlistentry>
664                                 <varlistentry>
665                                     <term>boolean <structfield>aonline</structfield></term>
666                                     <listitem>
667                                         <para>Признак "Always Online"</para>
668                                     </listitem>
669                                 </varlistentry>
670                                 <varlistentry>
671                                     <term>boolean <structfield>down</structfield></term>
672                                     <listitem>
673                                         <para>Пользователь отключен</para>
674                                     </listitem>
675                                 </varlistentry>
676                                 <varlistentry>
677                                     <term>boolean <structfield>passive</structfield></term>
678                                     <listitem>
679                                         <para>Пользователь "заморожен"</para>
680                                     </listitem>
681                                 </varlistentry>
682                                 <varlistentry>
683                                     <term>boolean <structfield>disableddetailstat</structfield></term>
684                                     <listitem>
685                                         <para>Для пользователя отключено ведение детальной статистики</para>
686                                     </listitem>
687                                 </varlistentry>
688                                 <varlistentry>
689                                     <term>string <structfield>ips</structfield></term>
690                                     <listitem>
691                                         <para>IP-адреса, назначенные пользователю, разделенные символом "," (запятая)</para>
692                                     </listitem>
693                                 </varlistentry>
694                                 <varlistentry>
695                                     <term>struct <structfield>traff</structfield></term>
696                                     <listitem>
697                                         <para>Информация о трафике</para>
698                                         <variablelist>
699                                             <varlistentry>
700                                                 <term>array of i8 <structfield>mu</structfield></term>
701                                                 <listitem>
702                                                     <para>Исходяий трафик за месяц (по направлениям)</para>
703                                                 </listitem>
704                                             </varlistentry>
705                                             <varlistentry>
706                                                 <term>array of i8 <structfield>md</structfield></term>
707                                                 <listitem>
708                                                     <para>Входящий трафик за месяц (по направлениям)</para>
709                                                 </listitem>
710                                             </varlistentry>
711                                         </variablelist>
712                                     </listitem>
713                                 </varlistentry>
714                             </variablelist>
715                         </para>
716                     </listitem>
717                 </varlistentry>
718             </variablelist>
719             <refsect2>
720                 <title>Return Value</title>
721                 <para>Возвращает true в случае успеха и false в случае неудачи</para>
722             </refsect2>
723         </refsect1>
724         <refsect1>
725             <title>See also</title>
726             <para>
727                 <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
728                 <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
729                 <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
730                 <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
731                 <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
732                 <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>,
733                 <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
734                 <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
735             </para>
736         </refsect1>
737     </refentry>
738     <refentry id="stargazer.del_user">
739         <refmeta>
740             <refentrytitle>stargazer.del_user</refentrytitle>
741         </refmeta>
742         <refnamediv>
743             <refname>stargazer.del_user</refname>
744             <refpurpose>Удаление пользователя</refpurpose>
745         </refnamediv>
746         <refsynopsisdiv>
747             <funcsynopsis>
748                 <funcprototype>
749                     <funcdef><function>stargazer.del_user</function></funcdef>
750                     <paramdef>string <parameter>cookie</parameter></paramdef>
751                     <paramdef>string <parameter>login</parameter></paramdef>
752                 </funcprototype>
753             </funcsynopsis>
754         </refsynopsisdiv>
755         <refsect1>
756             <title>Description</title>
757             <para>Метод <function>stargazer.del_user</function> удаляет из системы пользователя с указанным логином.</para>
758             <variablelist>
759                 <varlistentry>
760                     <term>string <parameter>cookie</parameter></term>
761                     <listitem>
762                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
763                     </listitem>
764                 </varlistentry>
765                 <varlistentry>
766                     <term>string <parameter>login</parameter></term>
767                     <listitem>
768                         <para>Логин пользователя</para>
769                     </listitem>
770                 </varlistentry>
771             </variablelist>
772             <refsect2>
773                 <title>Return Value</title>
774                 <para>Возвращает true в случае успеха и false в случае неудачи</para>
775             </refsect2>
776         </refsect1>
777         <refsect1>
778             <title>See also</title>
779             <para>
780                 <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
781                 <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
782                 <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
783                 <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
784                 <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
785                 <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>,
786                 <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
787                 <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
788             </para>
789         </refsect1>
790     </refentry>
791     <refentry id="stargazer.add_user_cash">
792         <refmeta>
793             <refentrytitle>stargazer.add_user_cash</refentrytitle>
794         </refmeta>
795         <refnamediv>
796             <refname>stargazer.add_user_cash</refname>
797             <refpurpose>Добавление денег на счет пользователя</refpurpose>
798         </refnamediv>
799         <refsynopsisdiv>
800             <funcsynopsis>
801                 <funcprototype>
802                     <funcdef><function>stargazer.add_user_cash</function></funcdef>
803                     <paramdef>string <parameter>cookie</parameter></paramdef>
804                     <paramdef>string <parameter>login</parameter></paramdef>
805                     <paramdef>double <parameter>amount</parameter></paramdef>
806                     <paramdef>string <parameter>comment</parameter></paramdef>
807                 </funcprototype>
808             </funcsynopsis>
809         </refsynopsisdiv>
810         <refsect1>
811             <title>Description</title>
812             <para>Метод <function>stargazer.add_user_cash</function> позволяет добавить деньги на счет указанного пользователя.</para>
813             <variablelist>
814                 <varlistentry>
815                     <term>string <parameter>cookie</parameter></term>
816                     <listitem>
817                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
818                     </listitem>
819                 </varlistentry>
820                 <varlistentry>
821                     <term>string <parameter>login</parameter></term>
822                     <listitem>
823                         <para>Логин пользователя</para>
824                     </listitem>
825                 </varlistentry>
826                 <varlistentry>
827                     <term>double <parameter>amount</parameter></term>
828                     <listitem>
829                         <para>Добавляемая сумма</para>
830                     </listitem>
831                 </varlistentry>
832                 <varlistentry>
833                     <term>string <parameter>comment</parameter></term>
834                     <listitem>
835                         <para>Коментарий</para>
836                     </listitem>
837                 </varlistentry>
838             </variablelist>
839             <refsect2>
840                 <title>Return Value</title>
841                 <para>Возвращает true в случае успеха и false в случае неудачи</para>
842             </refsect2>
843         </refsect1>
844         <refsect1>
845             <title>See also</title>
846             <para>
847                 <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
848                 <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
849                 <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
850                 <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
851                 <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
852                 <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>,
853                 <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
854                 <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
855             </para>
856         </refsect1>
857     </refentry>
858     <refentry id="stargazer.set_user_cash">
859         <refmeta>
860             <refentrytitle>stargazer.set_user_cash</refentrytitle>
861         </refmeta>
862         <refnamediv>
863             <refname>stargazer.set_user_cash</refname>
864             <refpurpose>Установка состояния счета пользователя</refpurpose>
865         </refnamediv>
866         <refsynopsisdiv>
867             <funcsynopsis>
868                 <funcprototype>
869                     <funcdef><function>stargazer.set_user_cash</function></funcdef>
870                     <paramdef>string <parameter>cookie</parameter></paramdef>
871                     <paramdef>string <parameter>login</parameter></paramdef>
872                     <paramdef>double <parameter>cash</parameter></paramdef>
873                     <paramdef>string <parameter>comment</parameter></paramdef>
874                 </funcprototype>
875             </funcsynopsis>
876         </refsynopsisdiv>
877         <refsect1>
878             <title>Description</title>
879             <para>Метод <function>stargazer.set_user_cash</function> позволяет установить состояние счета пользователя.</para>
880             <variablelist>
881                 <varlistentry>
882                     <term>string <parameter>cookie</parameter></term>
883                     <listitem>
884                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
885                     </listitem>
886                 </varlistentry>
887                 <varlistentry>
888                     <term>string <parameter>login</parameter></term>
889                     <listitem>
890                         <para>Логин пользователя</para>
891                     </listitem>
892                 </varlistentry>
893                 <varlistentry>
894                     <term>double <parameter>cash</parameter></term>
895                     <listitem>
896                         <para>Устанавливаемая сумма</para>
897                     </listitem>
898                 </varlistentry>
899                 <varlistentry>
900                     <term>string <parameter>comment</parameter></term>
901                     <listitem>
902                         <para>Коментарий</para>
903                     </listitem>
904                 </varlistentry>
905             </variablelist>
906             <refsect2>
907                 <title>Return Value</title>
908                 <para>Возвращает true в случае успеха и false в случае неудачи</para>
909             </refsect2>
910         </refsect1>
911         <refsect1>
912             <title>See also</title>
913             <para>
914                 <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
915                 <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
916                 <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
917                 <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
918                 <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
919                 <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
920                 <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
921                 <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
922             </para>
923         </refsect1>
924     </refentry>
925     <refentry id="stargazer.chg_user_tariff">
926         <refmeta>
927             <refentrytitle>stargazer.chg_user_tariff</refentrytitle>
928         </refmeta>
929         <refnamediv>
930             <refname>stargazer.chg_user_tariff</refname>
931             <refpurpose>Изменение тарифного плана пользователя</refpurpose>
932         </refnamediv>
933         <refsynopsisdiv>
934             <funcsynopsis>
935                 <funcprototype>
936                     <funcdef><function>stargazer.chg_user_tariff</function></funcdef>
937                     <paramdef>string <parameter>cookie</parameter></paramdef>
938                     <paramdef>string <parameter>login</parameter></paramdef>
939                     <paramdef>string <parameter>tariff</parameter></paramdef>
940                     <paramdef>boolean <parameter>delayed</parameter></paramdef>
941                     <paramdef>string <parameter>comment</parameter></paramdef>
942                 </funcprototype>
943             </funcsynopsis>
944         </refsynopsisdiv>
945         <refsect1>
946             <title>Description</title>
947             <para>Метод <function>stargazer.chg_user_tariff</function> позволяет изменить тарифный план пользователя или запланировать его изменение на начало нового месяца.</para>
948             <variablelist>
949                 <varlistentry>
950                     <term>string <parameter>cookie</parameter></term>
951                     <listitem>
952                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
953                     </listitem>
954                 </varlistentry>
955                 <varlistentry>
956                     <term>string <parameter>login</parameter></term>
957                     <listitem>
958                         <para>Логин пользователя</para>
959                     </listitem>
960                 </varlistentry>
961                 <varlistentry>
962                     <term>string <parameter>tariff</parameter></term>
963                     <listitem>
964                         <para>Название нового тарифа</para>
965                     </listitem>
966                 </varlistentry>
967                 <varlistentry>
968                     <term>boolean <parameter>delayed</parameter></term>
969                     <listitem>
970                         <para>Отложенное изменение тарифа (в начале следующего месяца)</para>
971                     </listitem>
972                 </varlistentry>
973                 <varlistentry>
974                     <term>string <parameter>comment</parameter></term>
975                     <listitem>
976                         <para>Коментарий</para>
977                     </listitem>
978                 </varlistentry>
979             </variablelist>
980             <refsect2>
981                 <title>Return Value</title>
982                 <para>Возвращает true в случае успеха и false в случае неудачи</para>
983             </refsect2>
984         </refsect1>
985         <refsect1>
986             <title>See also</title>
987             <para>
988                 <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
989                 <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
990                 <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
991                 <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
992                 <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
993                 <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
994                 <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>
995                 <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
996             </para>
997         </refsect1>
998     </refentry>
999     <refentry id="stargazer.get_online_ips">
1000         <refmeta>
1001             <refentrytitle>stargazer.get_online_ips</refentrytitle>
1002         </refmeta>
1003         <refnamediv>
1004             <refname>stargazer.get_online_ips</refname>
1005             <refpurpose>Получение списка IP-адресов online-пользователей</refpurpose>
1006         </refnamediv>
1007         <refsynopsisdiv>
1008             <funcsynopsis>
1009                 <funcprototype>
1010                     <funcdef><function>stargazer.get_online_ips</function></funcdef>
1011                     <paramdef>string <parameter>cookie</parameter></paramdef>
1012                     <paramdef>array of strings <parameter>subnets</parameter></paramdef>
1013                 </funcprototype>
1014             </funcsynopsis>
1015         </refsynopsisdiv>
1016         <refsect1>
1017             <title>Description</title>
1018             <para>Метод <function>stargazer.get_online_ips</function> позволяет получить список IP-адресов авторизованных пользователей системы для указанного списка подсетей.</para>
1019             <variablelist>
1020                 <varlistentry>
1021                     <term>string <parameter>cookie</parameter></term>
1022                     <listitem>
1023                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
1024                     </listitem>
1025                 </varlistentry>
1026                 <varlistentry>
1027                     <term>array of strings <parameter>subnets</parameter></term>
1028                     <listitem>
1029                         <para>Список подсетей в CIDR-нотации</para>
1030                     </listitem>
1031                 </varlistentry>
1032             </variablelist>
1033             <refsect2>
1034                 <title>Return Value</title>
1035                 <para>Возвращает структуру:</para>
1036                 <variablelist>
1037                     <varlistentry>
1038                         <term>bool <structfield>result</structfield></term>
1039                         <listitem>
1040                             <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie).</para>
1041                         </listitem>
1042                     </varlistentry>
1043                     <varlistentry>
1044                         <term>array of strings <structfield>ips</structfield></term>
1045                         <listitem>
1046                             <para>Список IP-адресов авторизованных пользователей из этих подсетей</para>
1047                         </listitem>
1048                     </varlistentry>
1049                 </variablelist>
1050             </refsect2>
1051         </refsect1>
1052         <refsect1>
1053             <title>See also</title>
1054             <para>
1055                 <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
1056                 <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
1057                 <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
1058                 <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
1059                 <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
1060                 <link linkend="stargazer.add_user_cash"><function>stargazer.add_user_cash</function></link>,
1061                 <link linkend="stargazer.set_user_cash"><function>stargazer.set_user_cash</function></link>
1062                 <link linkend="stargazer.chg_user_tariff"><function>stargazer.chg_user_tariff</function></link>
1063             </para>
1064         </refsect1>
1065     </refentry>
1066 </chapter>