]> git.stg.codes - stg.git/blob - doc/xmlrpc-doc/API-user.xml
У консольному конфігураторі додано завершуючий нуль після використання
[stg.git] / doc / xmlrpc-doc / 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>disabledetailstat</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_cash"><function>stargazer.add_cash</function></link>,
243                 <link linkend="stargazer.set_cash"><function>stargazer.set_cash</function></link>,
244                 <link linkend="stargazer.change_tariff"><function>stargazer.change_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>disabledetailstat</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_cash"><function>stargazer.add_cash</function></link>,
481                 <link linkend="stargazer.set_cash"><function>stargazer.set_cash</function></link>,
482                 <link linkend="stargazer.change_tariff"><function>stargazer.change_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_cash"><function>stargazer.add_cash</function></link>,
534                 <link linkend="stargazer.set_cash"><function>stargazer.set_cash</function></link>,
535                 <link linkend="stargazer.change_tariff"><function>stargazer.change_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>struct <parameter>info</parameter></paramdef>
554                 </funcprototype>
555             </funcsynopsis>
556         </refsynopsisdiv>
557         <refsect1>
558             <title>Description</title>
559             <para>Метод <function>stargazer.chg_user</function> сохраняет регистрационную информацию и данные о трафике пользователя. Допустимо частичное указание параметров в структуре info. В этом случае изменение затронет только указанные параметры. Дополнительные поля структуры (не входящие в описание) будут проигнорированы.</para>
560             <variablelist>
561                 <varlistentry>
562                     <term>string <parameter>cookie</parameter></term>
563                     <listitem>
564                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
565                     </listitem>
566                 </varlistentry>
567                 <varlistentry>
568                     <term>struct <parameter>info</parameter></term>
569                     <listitem>
570                         <para>
571                             Регистрационная информация и данные о трафике.
572                             <variablelist>
573                                 <varlistentry>
574                                     <term>bool <structfield>result</structfield></term>
575                                     <listitem>
576                                         <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie, неправильный логин пользователя).</para>
577                                     </listitem>
578                                 </varlistentry>
579                                 <varlistentry>
580                                     <term>string <structfield>login</structfield></term>
581                                     <listitem>
582                                         <para>Логин пользователя</para>
583                                     </listitem>
584                                 </varlistentry>
585                                 <varlistentry>
586                                     <term>string <structfield>password</structfield></term>
587                                     <listitem>
588                                         <para>Пароль пользователя</para>
589                                     </listitem>
590                                 </varlistentry>
591                                 <varlistentry>
592                                     <term>double <structfield>freemb</structfield></term>
593                                     <listitem>
594                                         <para>Количество свободных мегабайт на счету</para>
595                                     </listitem>
596                                 </varlistentry>
597                                 <varlistentry>
598                                     <term>double <structfield>credit</structfield></term>
599                                     <listitem>
600                                         <para>Размер кредита</para>
601                                     </listitem>
602                                 </varlistentry>
603                                 <varlistentry>
604                                     <term>int <structfield>creditexpire</structfield></term>
605                                     <listitem>
606                                         <para>Время истечения срока кредита в формате Unix-timestamp</para>
607                                     </listitem>
608                                 </varlistentry>
609                                 <varlistentry>
610                                     <term>string <structfield>note</structfield></term>
611                                     <listitem>
612                                         <para>Примечания</para>
613                                     </listitem>
614                                 </varlistentry>
615                                 <varlistentry>
616                                     <term>string <structfield>phone</structfield></term>
617                                     <listitem>
618                                         <para>Контактный телефон</para>
619                                     </listitem>
620                                 </varlistentry>
621                                 <varlistentry>
622                                     <term>string <structfield>address</structfield></term>
623                                     <listitem>
624                                         <para>Адрес пользователя</para>
625                                     </listitem>
626                                 </varlistentry>
627                                 <varlistentry>
628                                     <term>string <structfield>email</structfield></term>
629                                     <listitem>
630                                         <para>E-Mail пользователя</para>
631                                     </listitem>
632                                 </varlistentry>
633                                 <varlistentry>
634                                     <term>array of strings <structfield>userdata</structfield></term>
635                                     <listitem>
636                                         <para>Набор полей UserData</para>
637                                     </listitem>
638                                 </varlistentry>
639                                 <varlistentry>
640                                     <term>string <structfield>name</structfield></term>
641                                     <listitem>
642                                         <para>Реальное имя пользователя</para>
643                                     </listitem>
644                                 </varlistentry>
645                                 <varlistentry>
646                                     <term>string <structfield>group</structfield></term>
647                                     <listitem>
648                                         <para>Группа пользователя</para>
649                                     </listitem>
650                                 </varlistentry>
651                                 <varlistentry>
652                                     <term>boolean <structfield>status</structfield></term>
653                                     <listitem>
654                                         <para>Статус пользователя. true - подключен, false - отключен</para>
655                                     </listitem>
656                                 </varlistentry>
657                                 <varlistentry>
658                                     <term>boolean <structfield>aonline</structfield></term>
659                                     <listitem>
660                                         <para>Признак "Always Online"</para>
661                                     </listitem>
662                                 </varlistentry>
663                                 <varlistentry>
664                                     <term>boolean <structfield>down</structfield></term>
665                                     <listitem>
666                                         <para>Пользователь отключен</para>
667                                     </listitem>
668                                 </varlistentry>
669                                 <varlistentry>
670                                     <term>boolean <structfield>passive</structfield></term>
671                                     <listitem>
672                                         <para>Пользователь "заморожен"</para>
673                                     </listitem>
674                                 </varlistentry>
675                                 <varlistentry>
676                                     <term>boolean <structfield>disabledetailstat</structfield></term>
677                                     <listitem>
678                                         <para>Для пользователя отключено ведение детальной статистики</para>
679                                     </listitem>
680                                 </varlistentry>
681                                 <varlistentry>
682                                     <term>string <structfield>ips</structfield></term>
683                                     <listitem>
684                                         <para>IP-адреса, назначенные пользователю, разделенные символом "," (запятая)</para>
685                                     </listitem>
686                                 </varlistentry>
687                                 <varlistentry>
688                                     <term>struct <structfield>traff</structfield></term>
689                                     <listitem>
690                                         <para>Информация о трафике</para>
691                                         <variablelist>
692                                             <varlistentry>
693                                                 <term>array of i8 <structfield>mu</structfield></term>
694                                                 <listitem>
695                                                     <para>Исходяий трафик за месяц (по направлениям)</para>
696                                                 </listitem>
697                                             </varlistentry>
698                                             <varlistentry>
699                                                 <term>array of i8 <structfield>md</structfield></term>
700                                                 <listitem>
701                                                     <para>Входящий трафик за месяц (по направлениям)</para>
702                                                 </listitem>
703                                             </varlistentry>
704                                         </variablelist>
705                                     </listitem>
706                                 </varlistentry>
707                             </variablelist>
708                         </para>
709                     </listitem>
710                 </varlistentry>
711             </variablelist>
712             <refsect2>
713                 <title>Return Value</title>
714                 <para>Возвращает true в случае успеха и false в случае неудачи</para>
715             </refsect2>
716         </refsect1>
717         <refsect1>
718             <title>See also</title>
719             <para>
720                 <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
721                 <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
722                 <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
723                 <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
724                 <link linkend="stargazer.add_cash"><function>stargazer.add_cash</function></link>,
725                 <link linkend="stargazer.set_cash"><function>stargazer.set_cash</function></link>,
726                 <link linkend="stargazer.change_tariff"><function>stargazer.change_tariff</function></link>
727                 <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
728             </para>
729         </refsect1>
730     </refentry>
731     <refentry id="stargazer.del_user">
732         <refmeta>
733             <refentrytitle>stargazer.del_user</refentrytitle>
734         </refmeta>
735         <refnamediv>
736             <refname>stargazer.del_user</refname>
737             <refpurpose>Удаление пользователя</refpurpose>
738         </refnamediv>
739         <refsynopsisdiv>
740             <funcsynopsis>
741                 <funcprototype>
742                     <funcdef><function>stargazer.del_user</function></funcdef>
743                     <paramdef>string <parameter>cookie</parameter></paramdef>
744                     <paramdef>string <parameter>login</parameter></paramdef>
745                 </funcprototype>
746             </funcsynopsis>
747         </refsynopsisdiv>
748         <refsect1>
749             <title>Description</title>
750             <para>Метод <function>stargazer.del_user</function> удаляет из системы пользователя с указанным логином.</para>
751             <variablelist>
752                 <varlistentry>
753                     <term>string <parameter>cookie</parameter></term>
754                     <listitem>
755                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
756                     </listitem>
757                 </varlistentry>
758                 <varlistentry>
759                     <term>string <parameter>login</parameter></term>
760                     <listitem>
761                         <para>Логин пользователя</para>
762                     </listitem>
763                 </varlistentry>
764             </variablelist>
765             <refsect2>
766                 <title>Return Value</title>
767                 <para>Возвращает true в случае успеха и false в случае неудачи</para>
768             </refsect2>
769         </refsect1>
770         <refsect1>
771             <title>See also</title>
772             <para>
773                 <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
774                 <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
775                 <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
776                 <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
777                 <link linkend="stargazer.add_cash"><function>stargazer.add_cash</function></link>,
778                 <link linkend="stargazer.set_cash"><function>stargazer.set_cash</function></link>,
779                 <link linkend="stargazer.change_tariff"><function>stargazer.change_tariff</function></link>
780                 <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
781             </para>
782         </refsect1>
783     </refentry>
784     <refentry id="stargazer.add_cash">
785         <refmeta>
786             <refentrytitle>stargazer.add_cash</refentrytitle>
787         </refmeta>
788         <refnamediv>
789             <refname>stargazer.add_cash</refname>
790             <refpurpose>Добавление денег на счет пользователя</refpurpose>
791         </refnamediv>
792         <refsynopsisdiv>
793             <funcsynopsis>
794                 <funcprototype>
795                     <funcdef><function>stargazer.add_cash</function></funcdef>
796                     <paramdef>string <parameter>cookie</parameter></paramdef>
797                     <paramdef>string <parameter>login</parameter></paramdef>
798                     <paramdef>double <parameter>amount</parameter></paramdef>
799                     <paramdef>string <parameter>comment</parameter></paramdef>
800                 </funcprototype>
801             </funcsynopsis>
802         </refsynopsisdiv>
803         <refsect1>
804             <title>Description</title>
805             <para>Метод <function>stargazer.add_cash</function> позволяет добавить деньги на счет указанного пользователя.</para>
806             <variablelist>
807                 <varlistentry>
808                     <term>string <parameter>cookie</parameter></term>
809                     <listitem>
810                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
811                     </listitem>
812                 </varlistentry>
813                 <varlistentry>
814                     <term>string <parameter>login</parameter></term>
815                     <listitem>
816                         <para>Логин пользователя</para>
817                     </listitem>
818                 </varlistentry>
819                 <varlistentry>
820                     <term>double <parameter>amount</parameter></term>
821                     <listitem>
822                         <para>Добавляемая сумма</para>
823                     </listitem>
824                 </varlistentry>
825                 <varlistentry>
826                     <term>string <parameter>comment</parameter></term>
827                     <listitem>
828                         <para>Коментарий</para>
829                     </listitem>
830                 </varlistentry>
831             </variablelist>
832             <refsect2>
833                 <title>Return Value</title>
834                 <para>Возвращает true в случае успеха и false в случае неудачи</para>
835             </refsect2>
836         </refsect1>
837         <refsect1>
838             <title>See also</title>
839             <para>
840                 <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
841                 <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
842                 <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
843                 <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
844                 <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
845                 <link linkend="stargazer.set_cash"><function>stargazer.set_cash</function></link>,
846                 <link linkend="stargazer.change_tariff"><function>stargazer.change_tariff</function></link>
847                 <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
848             </para>
849         </refsect1>
850     </refentry>
851     <refentry id="stargazer.set_cash">
852         <refmeta>
853             <refentrytitle>stargazer.set_cash</refentrytitle>
854         </refmeta>
855         <refnamediv>
856             <refname>stargazer.set_cash</refname>
857             <refpurpose>Установка состояния счета пользователя</refpurpose>
858         </refnamediv>
859         <refsynopsisdiv>
860             <funcsynopsis>
861                 <funcprototype>
862                     <funcdef><function>stargazer.set_cash</function></funcdef>
863                     <paramdef>string <parameter>cookie</parameter></paramdef>
864                     <paramdef>string <parameter>login</parameter></paramdef>
865                     <paramdef>double <parameter>cash</parameter></paramdef>
866                     <paramdef>string <parameter>comment</parameter></paramdef>
867                 </funcprototype>
868             </funcsynopsis>
869         </refsynopsisdiv>
870         <refsect1>
871             <title>Description</title>
872             <para>Метод <function>stargazer.set_cash</function> позволяет установить состояние счета пользователя.</para>
873             <variablelist>
874                 <varlistentry>
875                     <term>string <parameter>cookie</parameter></term>
876                     <listitem>
877                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
878                     </listitem>
879                 </varlistentry>
880                 <varlistentry>
881                     <term>string <parameter>login</parameter></term>
882                     <listitem>
883                         <para>Логин пользователя</para>
884                     </listitem>
885                 </varlistentry>
886                 <varlistentry>
887                     <term>double <parameter>cash</parameter></term>
888                     <listitem>
889                         <para>Устанавливаемая сумма</para>
890                     </listitem>
891                 </varlistentry>
892                 <varlistentry>
893                     <term>string <parameter>comment</parameter></term>
894                     <listitem>
895                         <para>Коментарий</para>
896                     </listitem>
897                 </varlistentry>
898             </variablelist>
899             <refsect2>
900                 <title>Return Value</title>
901                 <para>Возвращает true в случае успеха и false в случае неудачи</para>
902             </refsect2>
903         </refsect1>
904         <refsect1>
905             <title>See also</title>
906             <para>
907                 <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
908                 <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
909                 <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
910                 <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
911                 <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
912                 <link linkend="stargazer.add_cash"><function>stargazer.add_cash</function></link>,
913                 <link linkend="stargazer.change_tariff"><function>stargazer.change_tariff</function></link>
914                 <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
915             </para>
916         </refsect1>
917     </refentry>
918     <refentry id="stargazer.change_tariff">
919         <refmeta>
920             <refentrytitle>stargazer.change_tariff</refentrytitle>
921         </refmeta>
922         <refnamediv>
923             <refname>stargazer.change_tariff</refname>
924             <refpurpose>Изменение тарифного плана пользователя</refpurpose>
925         </refnamediv>
926         <refsynopsisdiv>
927             <funcsynopsis>
928                 <funcprototype>
929                     <funcdef><function>stargazer.change_tariff</function></funcdef>
930                     <paramdef>string <parameter>cookie</parameter></paramdef>
931                     <paramdef>string <parameter>login</parameter></paramdef>
932                     <paramdef>string <parameter>tariff</parameter></paramdef>
933                     <paramdef>boolean <parameter>delayed</parameter></paramdef>
934                     <paramdef>string <parameter>comment</parameter></paramdef>
935                 </funcprototype>
936             </funcsynopsis>
937         </refsynopsisdiv>
938         <refsect1>
939             <title>Description</title>
940             <para>Метод <function>stargazer.change_tariff</function> позволяет изменить тарифный план пользователя или запланировать его изменение на начало нового месяца.</para>
941             <variablelist>
942                 <varlistentry>
943                     <term>string <parameter>cookie</parameter></term>
944                     <listitem>
945                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
946                     </listitem>
947                 </varlistentry>
948                 <varlistentry>
949                     <term>string <parameter>login</parameter></term>
950                     <listitem>
951                         <para>Логин пользователя</para>
952                     </listitem>
953                 </varlistentry>
954                 <varlistentry>
955                     <term>string <parameter>tariff</parameter></term>
956                     <listitem>
957                         <para>Название нового тарифа</para>
958                     </listitem>
959                 </varlistentry>
960                 <varlistentry>
961                     <term>boolean <parameter>delayed</parameter></term>
962                     <listitem>
963                         <para>Отложенное изменение тарифа (в начале следующего месяца)</para>
964                     </listitem>
965                 </varlistentry>
966                 <varlistentry>
967                     <term>string <parameter>comment</parameter></term>
968                     <listitem>
969                         <para>Коментарий</para>
970                     </listitem>
971                 </varlistentry>
972             </variablelist>
973             <refsect2>
974                 <title>Return Value</title>
975                 <para>Возвращает true в случае успеха и false в случае неудачи</para>
976             </refsect2>
977         </refsect1>
978         <refsect1>
979             <title>See also</title>
980             <para>
981                 <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
982                 <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
983                 <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
984                 <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
985                 <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
986                 <link linkend="stargazer.add_cash"><function>stargazer.add_cash</function></link>,
987                 <link linkend="stargazer.set_cash"><function>stargazer.set_cash</function></link>
988                 <link linkend="stargazer.get_online_ips"><function>stargazer.get_online_ips</function></link>
989             </para>
990         </refsect1>
991     </refentry>
992     <refentry id="stargazer.get_online_ips">
993         <refmeta>
994             <refentrytitle>stargazer.get_online_ips</refentrytitle>
995         </refmeta>
996         <refnamediv>
997             <refname>stargazer.get_online_ips</refname>
998             <refpurpose>Получение списка IP-адресов online-пользователей</refpurpose>
999         </refnamediv>
1000         <refsynopsisdiv>
1001             <funcsynopsis>
1002                 <funcprototype>
1003                     <funcdef><function>stargazer.get_online_ips</function></funcdef>
1004                     <paramdef>string <parameter>cookie</parameter></paramdef>
1005                     <paramdef>array of strings <parameter>subnets</parameter></paramdef>
1006                 </funcprototype>
1007             </funcsynopsis>
1008         </refsynopsisdiv>
1009         <refsect1>
1010             <title>Description</title>
1011             <para>Метод <function>stargazer.get_online_ips</function> позволяет получить список IP-адресов авторизованных пользователей системы для указанного списка подсетей.</para>
1012             <variablelist>
1013                 <varlistentry>
1014                     <term>string <parameter>cookie</parameter></term>
1015                     <listitem>
1016                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
1017                     </listitem>
1018                 </varlistentry>
1019                 <varlistentry>
1020                     <term>array of strings <parameter>subnets</parameter></term>
1021                     <listitem>
1022                         <para>Список подсетей в CIDR-нотации</para>
1023                     </listitem>
1024                 </varlistentry>
1025             </variablelist>
1026             <refsect2>
1027                 <title>Return Value</title>
1028                 <para>Возвращает структуру:</para>
1029                 <variablelist>
1030                     <varlistentry>
1031                         <term>bool <structfield>result</structfield></term>
1032                         <listitem>
1033                             <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie).</para>
1034                         </listitem>
1035                     </varlistentry>
1036                     <varlistentry>
1037                         <term>array of strings <structfield>ips</structfield></term>
1038                         <listitem>
1039                             <para>Список IP-адресов авторизованных пользователей из этих подсетей</para>
1040                         </listitem>
1041                     </varlistentry>
1042                 </variablelist>
1043             </refsect2>
1044         </refsect1>
1045         <refsect1>
1046             <title>See also</title>
1047             <para>
1048                 <link linkend="stargazer.get_users"><function>stargazer.get_users</function></link>,
1049                 <link linkend="stargazer.get_user"><function>stargazer.get_user</function></link>,
1050                 <link linkend="stargazer.add_user"><function>stargazer.add_user</function></link>,
1051                 <link linkend="stargazer.chg_user"><function>stargazer.chg_user</function></link>,
1052                 <link linkend="stargazer.del_user"><function>stargazer.del_user</function></link>,
1053                 <link linkend="stargazer.add_cash"><function>stargazer.add_cash</function></link>,
1054                 <link linkend="stargazer.set_cash"><function>stargazer.set_cash</function></link>
1055                 <link linkend="stargazer.change_tariff"><function>stargazer.change_tariff</function></link>
1056             </para>
1057         </refsect1>
1058     </refentry>
1059 </chapter>
1060