1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
vote_tools.php
См. документацию.
1<?
3$VOTE_CACHE_VOTING = Array();
4
6{
7 $arr = array(
8 "reference_id" => array(0,1,2,3,4,5),
9 "reference" => array("radio", "checkbox", "dropdown", "multiselect", "text", "textarea")
10 );
11 return $arr;
12}
13
15{
17 return $object->arType;
18}
19
21{
23
24 return Array(
25 "reference_id" => array_keys($object->arType),
26 "reference" => array_values($object->arType)
27 );
28}
29
30// vote data
31function GetVoteDataByID($VOTE_ID, &$arChannel, &$arVote, &$arQuestions, &$arAnswers, &$arDropDown, &$arMultiSelect, &$arGroupAnswers, $arAddParams = "N")
32{
33 $VOTE_ID = intval($VOTE_ID);
34 $arChannel = array();
35 $arVote = array();
36 $arQuestions = array();
37 $arAnswers = array();
38 $arDropDown = array();
39 $arMultiSelect = array();
40 $arAddParams = (is_array($arAddParams) ? $arAddParams : array("bGetMemoStat" => $arAddParams));
41
42 $GLOBALS["VOTE_CACHE_VOTING"][$VOTE_ID] = (isset($GLOBALS["VOTE_CACHE_VOTING"][$VOTE_ID]) && is_array($GLOBALS["VOTE_CACHE_VOTING"][$VOTE_ID]) ? $GLOBALS["VOTE_CACHE_VOTING"][$VOTE_ID] : array());
43
44 if (empty($GLOBALS["VOTE_CACHE_VOTING"][$VOTE_ID]))
45 {
46 $db_res = CVote::GetByIDEx($VOTE_ID);
47 if (!($db_res && $arVote = $db_res->GetNext()))
48 {
49 return false;
50 }
51
52 foreach ($arVote as $key => $res)
53 {
54 if (mb_strpos($key, "CHANNEL_") === 0)
55 {
56 $arChannel[mb_substr($key, 8)] = $res;
57 }
58 elseif (mb_strpos($key, "~CHANNEL_") === 0)
59 {
60 $arChannel["~".mb_substr($key, 9)] = $res;
61 }
62 }
63 $db_res = CVoteQuestion::GetList($VOTE_ID, "s_c_sort", "asc", array("ACTIVE" => "Y"));
64 while ($res = $db_res->GetNext())
65 {
66 $arQuestions[$res["ID"]] = $res + array("ANSWERS" => array());
67 }
68 if (!empty($arQuestions))
69 {
71 array("C_SORT" => "ASC"),
72 array("VOTE_ID" => $VOTE_ID, "ACTIVE" => "Y", "@QUESTION_ID" => array_keys($arQuestions)));
73 while ($res = $db_res->GetNext())
74 {
75 $arQuestions[$res["QUESTION_ID"]]["ANSWERS"][$res["ID"]] = $res;
76
77 $arAnswers[$res["QUESTION_ID"]][] = $res;
78
79 switch ($res["FIELD_TYPE"]) // dropdown and multiselect and text inputs
80 {
81 case 2:
82 $arDropDown[$res["QUESTION_ID"]] = (is_array($arDropDown[$res["QUESTION_ID"]]) ? $arDropDown[$res["QUESTION_ID"]] :
83 array("reference" => array(), "reference_id" => array(), "~reference" => array()));
84 $arDropDown[$res["QUESTION_ID"]]["reference"][] = $res["MESSAGE"];
85 $arDropDown[$res["QUESTION_ID"]]["~reference"][] = $res["~MESSAGE"];
86 $arDropDown[$res["QUESTION_ID"]]["reference_id"][] = $res["ID"];
87 break;
88 case 3:
89 $arMultiSelect[$res["QUESTION_ID"]] = (is_array($arMultiSelect[$res["QUESTION_ID"]]) ? $arMultiSelect[$res["QUESTION_ID"]] :
90 array("reference" => array(), "reference_id" => array(), "~reference" => array()));
91 $arMultiSelect[$res["QUESTION_ID"]]["reference"][] = $res["MESSAGE"];
92 $arMultiSelect[$res["QUESTION_ID"]]["~reference"][] = $res["~MESSAGE"];
93 $arMultiSelect[$res["QUESTION_ID"]]["reference_id"][] = $res["ID"];
94 break;
95 }
96 }
97 $event_id = intval(isset($arAddParams["bRestoreVotedData"]) && $arAddParams["bRestoreVotedData"] == "Y" && isset($_SESSION["VOTE"]["VOTES"][$VOTE_ID]) && !!$_SESSION["VOTE"]["VOTES"][$VOTE_ID] ?
98 $_SESSION["VOTE"]["VOTES"][$VOTE_ID] : 0);
99 if ($event_id > 0)
100 {
102 array("bGetMemoStat" => "N", "bGetEventResults" => $event_id));
103 if ($db_res && ($res = $db_res->Fetch()))
104 {
105 do
106 {
107 if (isset($arQuestions[$res["QUESTION_ID"]]) && is_array($arQuestions[$res["QUESTION_ID"]]["ANSWERS"][$res["ANSWER_ID"]]) && is_array($res))
108 {
109 $arQuestions[$res["QUESTION_ID"]]["ANSWERS"][$res["ANSWER_ID"]] += $res;
110 if ($event_id > 0 && !empty($res["RESTORED_ANSWER_ID"]))
111 {
112 switch ($arQuestions[$res["QUESTION_ID"]]["ANSWERS"][$res["ANSWER_ID"]]["FIELD_TYPE"]):
113 case 0: // radio
114 case 2: // dropdown list
115 $fieldName = ($arQuestions[$res["QUESTION_ID"]]["ANSWERS"][$res["ANSWER_ID"]]["FIELD_TYPE"] == 0 ?
116 "vote_radio_" : "vote_dropdown_").$res["QUESTION_ID"];
117 $_REQUEST[$fieldName] = $res["RESTORED_ANSWER_ID"];
118 break;
119 case 1: // checkbox
120 case 3: // multiselect list
121 $fieldName = ($arQuestions[$res["QUESTION_ID"]]["ANSWERS"][$res["ANSWER_ID"]]["FIELD_TYPE"] == 1 ?
122 "vote_checkbox_" : "vote_multiselect_").$res["QUESTION_ID"];
123 $_REQUEST[$fieldName] = (is_array($_REQUEST[$fieldName]) ? $_REQUEST[$fieldName] : array());
124 $_REQUEST[$fieldName][] = $res["ANSWER_ID"];
125 break;
126 case 4: // field
127 case 5: // text
128 // do not restored
129 break;
130 endswitch;
131 }
132 }
133 } while ($res = $db_res->Fetch());
134 }
135 }
136 }
137
138 reset($arChannel);
139 reset($arVote);
140 reset($arQuestions);
141 reset($arDropDown);
142 reset($arMultiSelect);
143 reset($arAnswers);
144
145 $GLOBALS["VOTE_CACHE_VOTING"][$VOTE_ID] = array(
146 "V" => $arVote,
147 "C" => $arChannel,
148 "QA" => array(
149 "Q" => $arQuestions,
150 "A" => $arAnswers,
151 "M" => $arMultiSelect,
152 "D" => $arDropDown,
153 "G" => array(),
154 "GA" => "N"
155 )
156 );
157 }
158
159 if ($arAddParams["bGetMemoStat"] == "Y" && $GLOBALS["VOTE_CACHE_VOTING"][$VOTE_ID]["QA"]["GA"] == "N")
160 {
161 $db_res = CVoteEvent::GetUserAnswerStat($VOTE_ID, array("bGetMemoStat" => "Y"));
162 while ($res = $db_res->GetNext(true, false))
163 {
164 $arGroupAnswers[$res['ANSWER_ID']][] = $res;
165 }
166 $GLOBALS["VOTE_CACHE_VOTING"][$VOTE_ID]["QA"]["G"] = $arGroupAnswers;
167 $GLOBALS["VOTE_CACHE_VOTING"][$VOTE_ID]["QA"]["GA"] = "Y";
168 }
169
170 $arVote = $GLOBALS["VOTE_CACHE_VOTING"][$VOTE_ID]["V"];
171 $arChannel = $GLOBALS["VOTE_CACHE_VOTING"][$VOTE_ID]["C"];
172 $arQuestions = $GLOBALS["VOTE_CACHE_VOTING"][$VOTE_ID]["QA"]["Q"];
173 $arAnswers = $GLOBALS["VOTE_CACHE_VOTING"][$VOTE_ID]["QA"]["A"];
174 $arMultiSelect = $GLOBALS["VOTE_CACHE_VOTING"][$VOTE_ID]["QA"]["M"];
175 $arDropDown = $GLOBALS["VOTE_CACHE_VOTING"][$VOTE_ID]["QA"]["D"];
176 $arGroupAnswers = $GLOBALS["VOTE_CACHE_VOTING"][$VOTE_ID]["QA"]["G"];
177 return $arVote["ID"];
178}
179
180// return vote id for channel sid with check permissions and ACTIVE vote
181function GetCurrentVote($GROUP_SID, $site_id=SITE_ID, $access=1)
182{
183 $z = CVoteChannel::GetList('', '', array("SID"=>$GROUP_SID, "SID_EXACT_MATCH"=>"Y", "SITE"=>$site_id, "ACTIVE"=>"Y"));
184 if ($zr = $z->Fetch())
185 {
187 if (intval($perm)>=$access)
188 {
189 $v = CVote::GetList('', '', array("CHANNEL_ID"=>$zr["ID"], "LAMP"=>"green"));
190 if ($vr = $v->Fetch()) return $vr["ID"];
191 }
192 }
193 return 0;
194}
195
196// return PREIOUS vote id for channel sid with check permissions and ACTIVE vote
197function GetPrevVote($GROUP_SID, $level=1, $site_id=SITE_ID, $access=1)
198{
199 $VOTE_ID = 0;
200 $z = CVoteChannel::GetList('', '', array("SID"=>$GROUP_SID, "SID_EXACT_MATCH"=>"Y", "SITE"=>$site_id, "ACTIVE"=>"Y"));
201 if ($zr = $z->Fetch())
202 {
204 if (intval($perm)>=$access)
205 {
206 $v = CVote::GetList("s_date_start", "desc", array("CHANNEL_ID"=>$zr["ID"], "LAMP"=>"red"));
207 $i = 0;
208 while ($vr=$v->Fetch())
209 {
210 $i++;
211 if ($level==$i)
212 {
213 $VOTE_ID = $vr["ID"];
214 break;
215 }
216 }
217 }
218 }
219 return intval($VOTE_ID);
220}
221
222// return votes list id for channel sid with check permissions and ACTIVE vote
223function GetVoteList($GROUP_SID = "", $params = array(), $site_id = SITE_ID)
224{
225 $strSqlOrder = (is_string($params) ? $params : "ORDER BY C.C_SORT, C.ID, V.C_SORT, V.DATE_START desc");
226 $params = (is_array($params) ? $params : array());
227 if (array_key_exists("order", $params))
228 $strSqlOrder = $params["order"];
229 $arFilter["SITE"] = (array_key_exists("SITE_ID", $params) ? $params["SITE_ID"] : (
230 array_key_exists("siteId", $params) ? $params["siteId"] : $site_id
231 ));
232
233 if (is_array($GROUP_SID) && !empty($GROUP_SID))
234 {
235 $arr = array();
236 foreach ($GROUP_SID as $v)
237 {
238 if (!empty($v))
239 $arr[] = $v;
240 }
241 if (!empty($arr))
242 $arFilter["CHANNEL"] = $arr;
243 }
244 elseif (!empty($GROUP_SID))
245 {
246 $arFilter["CHANNEL"] = $GROUP_SID;
247 }
248 $z = CVote::GetPublicList($arFilter, $strSqlOrder, $params);
249 return $z;
250}
251
252// return true if user already vote on this vote
253function IsUserVoted($voteId)
254{
255 return \Bitrix\Vote\User::getCurrent()->isVotedFor($voteId);
256}
257
258// return random unvoted vote id for user whith check permissions
259function GetAnyAccessibleVote($site_id=SITE_ID, $channel_id=null)
260{
261 $arParams = array("ACTIVE"=>"Y","SITE"=>$site_id);
262
263 if ($channel_id !== null)
264 {
265 $arParams['SID'] = $channel_id;
266 $arParams['SID_EXACT_MATCH'] = 'Y';
267 }
268
269 $z = CVoteChannel::GetList("s_c_sort", "asc", $arParams);
270 $arResult = array();
271
272 while ($zr = $z->Fetch())
273 {
275
276 if (intval($perm)>=2)
277 {
278 $v = CVote::GetList('', '', array("CHANNEL_ID"=>$zr["ID"], "LAMP"=>"green"));
279 while ($vr = $v->Fetch())
280 {
281 if (!(IsUserVoted($vr['ID']))) $arResult[] = $vr['ID'];
282 }
283 }
284 }
285
286 if (sizeof($arResult) > 0)
287 return array_rand(array_flip($arResult));
288
289 return false;
290}
291
292
293/********************************************************************
294 Functions for old templates
295/*******************************************************************/
296function GetTemplateList($type="SV", $path="xxx")
297{
298 $arReferenceId = array();
299 $arReference = array();
300 if ($path=="xxx")
301 {
302 if ($type=="SV")
303 $path = COption::GetOptionString("vote", "VOTE_TEMPLATE_PATH");
304 elseif ($type=="RV")
305 $path = COption::GetOptionString("vote", "VOTE_TEMPLATE_PATH_VOTE");
306 elseif ($type=="RQ")
307 $path = COption::GetOptionString("vote", "VOTE_TEMPLATE_PATH_QUESTION");
308 }
309 if (is_dir($_SERVER["DOCUMENT_ROOT"].$path))
310 {
311 $handle=@opendir($_SERVER["DOCUMENT_ROOT"].$path);
312 if($handle)
313 {
314 while (false!==($fname = readdir($handle)))
315 {
316 if (is_file($_SERVER["DOCUMENT_ROOT"].$path.$fname) && $fname!="." && $fname!="..")
317 {
318 $arReferenceId[] = $fname;
319 $arReference[] = $fname;
320 }
321 }
322 closedir($handle);
323 }
324 }
325 $arr = array("reference" => $arReference,"reference_id" => $arReferenceId);
326 return $arr;
327}
328
329function arrAnswersSort(&$arr, $order="desc")
330{
331 $count = count($arr);
332 for ($key1=0; $key1<$count; $key1++)
333 {
334 for ($key2=0; $key2<$count; $key2++)
335 {
336 $sort1 = intval($arr[$key1]["COUNTER"]);
337 $sort2 = intval($arr[$key2]["COUNTER"]);
338 if ($order=="asc")
339 {
340 if ($sort1<$sort2)
341 {
342 $arr_tmp = $arr[$key1];
343 $arr[$key1] = $arr[$key2];
344 $arr[$key2] = $arr_tmp;
345 }
346 }
347 else
348 {
349 if ($sort1>$sort2)
350 {
351 $arr_tmp = $arr[$key1];
352 $arr[$key1] = $arr[$key2];
353 $arr[$key2] = $arr_tmp;
354 }
355 }
356 }
357 }
358}
359
360// return current vote form for channel
361function ShowCurrentVote($GROUP_SID, $site_id=SITE_ID)
362{
363 $CURRENT_VOTE_ID = GetCurrentVote($GROUP_SID, $site_id, 2);
364 if (intval($CURRENT_VOTE_ID)>0) ShowVote($CURRENT_VOTE_ID);
365}
366// return previous vote results
367function ShowPrevVoteResults($GROUP_SID, $level=1, $site_id=SITE_ID)
368{
369 $PREV_VOTE_ID = GetPrevVote($GROUP_SID, $level, $site_id);
370 if (intval($PREV_VOTE_ID)>0) ShowVoteResults($PREV_VOTE_ID);
371}
372// return current vote results
374{
375 $CURRENT_VOTE_ID = GetCurrentVote($GROUP_SID, $site_id);
376 if (intval($CURRENT_VOTE_ID)>0) ShowVoteResults($CURRENT_VOTE_ID);
377}
378
379// return current vote form with check permissions
380function ShowVote($VOTE_ID, $template1="")
381{
382 global $VOTING_LAMP, $VOTING_OK, $USER_ALREADY_VOTE, $USER_GROUP_PERMISSION, $APPLICATION;
383
384 $VOTING_LAMP = ($VOTING_LAMP == "green") ? $VOTING_LAMP : "red";
385 $VOTING_OK = ($VOTING_OK == "Y") ? $VOTING_OK : "N";
386 $USER_ALREADY_VOTE = ($USER_ALREADY_VOTE == "Y") ? $USER_ALREADY_VOTE : "N";
387 $USER_GROUP_PERMISSION = intval($USER_GROUP_PERMISSION);
388 if ($USER_GROUP_PERMISSION > 2) $USER_GROUP_PERMISSION = 0;
389
390 $VOTE_ID = GetVoteDataByID($VOTE_ID, $arChannel, $arVote, $arQuestions, $arAnswers, $arDropDown, $arMultiSelect, $arGroupAnswers, "N");
391 if (intval($VOTE_ID)>0)
392 {
393 $perm = CVoteChannel::GetGroupPermission($arChannel["ID"]);
394 /***** for old pre-component templates **********/
395 $GLOBALS["VOTE_PERMISSION"] = $perm;
396 /***** /old *************************************/
397 if (intval($perm)>=2)
398 {
399 $template = ($arVote["TEMPLATE"] == '') ? "default.php" : $arVote["TEMPLATE"];
400 require_once ($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/vote/include.php");
401 IncludeModuleLangFile(__FILE__);
402 $path = COption::GetOptionString("vote", "VOTE_TEMPLATE_PATH");
403 if ($template1 <> '') $template = $template1;
404
405 if ($APPLICATION->GetShowIncludeAreas())
406 {
407 $arIcons = Array();
408 if (CModule::IncludeModule("fileman"))
409 {
410 $arIcons[] = Array(
411 "URL" => "/bitrix/admin/fileman_file_edit.php?lang=".LANGUAGE_ID."&site=".SITE_ID."&full_src=Y&path=". urlencode($path.$template),
412 "SRC" => "/bitrix/images/vote/panel/edit_template.gif",
413 "ALT" => GetMessage("VOTE_PUBLIC_ICON_TEMPLATE")
414 );
415 $arrUrl = parse_url($_SERVER["REQUEST_URI"]);
416 $arIcons[] = Array(
417 "URL" => "/bitrix/admin/fileman_file_edit.php?lang=".LANGUAGE_ID."&site=".SITE_ID."&full_src=Y&path=". urlencode($arrUrl["path"]),
418 "SRC" => "/bitrix/images/vote/panel/edit_file.gif",
419 "ALT" => GetMessage("VOTE_PUBLIC_ICON_HANDLER")
420 );
421 }
422 $arIcons[] = Array(
423 "URL" => "/bitrix/admin/vote_edit.php?lang=".LANGUAGE_ID."&ID=".$VOTE_ID,
424 "SRC" => "/bitrix/images/vote/panel/edit_vote.gif",
425 "ALT" => GetMessage("VOTE_PUBLIC_ICON_SETTINGS")
426 );
427 echo $APPLICATION->IncludeStringBefore($arIcons);
428 }
430 include($_SERVER["DOCUMENT_ROOT"].$path.$template);
431 if ($APPLICATION->GetShowIncludeAreas())
432 {
433 echo $APPLICATION->IncludeStringAfter();
434 }
435 }
436 }
437}
438// return current vote results with check permissions
439function ShowVoteResults($VOTE_ID, $template1="")
440{
441 global $APPLICATION;
442 $VOTE_ID = GetVoteDataByID($VOTE_ID, $arChannel, $arVote, $arQuestions, $arAnswers, $arDropDown, $arMultiSelect, $arGroupAnswers, "Y");
443 if (intval($VOTE_ID)>0)
444 {
445 /***** for old pre-component templates **********/
446 global $VOTE_PERMISSION;
447 $VOTE_PERMISSION = CVote::UserGroupPermission($arChannel["ID"]);
448 /***** /old *************************************/
449
450 $perm = CVoteChannel::GetGroupPermission($arChannel["ID"]);
451 if (intval($perm)>=1)
452 {
453 $template = ($arVote["RESULT_TEMPLATE"] == '') ? "default.php" : $arVote["RESULT_TEMPLATE"];
454 require_once ($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/vote/include.php");
455 IncludeModuleLangFile(__FILE__);
456 $path = COption::GetOptionString("vote", "VOTE_TEMPLATE_PATH_VOTE");
457 if ($template1 <> '') $template = $template1;
458 if ($APPLICATION->GetShowIncludeAreas())
459 {
460 $arIcons = Array();
461 if (CModule::IncludeModule("fileman"))
462 {
463 $arIcons[] =
464 Array(
465 "URL" => "/bitrix/admin/fileman_file_edit.php?lang=".LANGUAGE_ID."&site=".SITE_ID."&full_src=Y&path=". urlencode($path.$template),
466 "SRC" => "/bitrix/images/vote/panel/edit_template.gif",
467 "ALT" => GetMessage("VOTE_PUBLIC_ICON_TEMPLATE")
468 );
469 $arrUrl = parse_url($_SERVER["REQUEST_URI"]);
470 $arIcons[] =
471 Array(
472 "URL" => "/bitrix/admin/fileman_file_edit.php?lang=".LANGUAGE_ID."&site=".SITE_ID."&full_src=Y&path=". urlencode($arrUrl["path"]),
473 "SRC" => "/bitrix/images/vote/panel/edit_file.gif",
474 "ALT" => GetMessage("VOTE_PUBLIC_ICON_HANDLER")
475 );
476 }
477 $arIcons[] =
478 Array(
479 "URL" => "/bitrix/admin/vote_edit.php?lang=".LANGUAGE_ID."&ID=".$VOTE_ID,
480 "SRC" => "/bitrix/images/vote/panel/edit_vote.gif",
481 "ALT" => GetMessage("VOTE_PUBLIC_ICON_SETTINGS")
482 );
483 echo $APPLICATION->IncludeStringBefore($arIcons);
484 }
486 include($_SERVER["DOCUMENT_ROOT"].$path.$template);
487 if ($APPLICATION->GetShowIncludeAreas())
488 {
489 echo $APPLICATION->IncludeStringAfter();
490 }
491 }
492 }
493}
494
495function fill_arc($start, $end, $color)
496{
497 global $diameter, $centerX, $centerY, $im, $radius;
498 $radius = $diameter/2;
499 imagearc($im, $centerX, $centerY, $diameter, $diameter, $start, $end+1, $color);
500 imageline($im, $centerX, $centerY, $centerX + cos(deg2rad($start)) * $radius, $centerY + sin(deg2rad($start)) * $radius, $color);
501 imageline($im, $centerX, $centerY, $centerX + cos(deg2rad($end)) * $radius, $centerY + sin(deg2rad($end)) * $radius, $color);
502 $x = $centerX + $radius * 0.5 * cos(deg2rad($start+($end-$start)/2));
503 $y = $centerY + $radius * 0.5 * sin(deg2rad($start+($end-$start)/2));
504 imagefill ($im, $x, $y, $color);
505}
506
507function DecRGBColor($hex, &$dec1, &$dec2, &$dec3)
508{
509 if (mb_substr($hex, 0, 1) != "#") $hex = "#".$hex;
510 $dec1 = hexdec(mb_substr($hex, 1, 2));
511 $dec2 = hexdec(mb_substr($hex, 3, 2));
512 $dec3 = hexdec(mb_substr($hex, 5, 2));
513}
514
515function DecColor($hex)
516{
517 if (mb_substr($hex, 0, 1) != "#") $hex = "#".$hex;
518 $dec = hexdec(mb_substr($hex, 1, 6));
519 return intval($dec);
520}
521
522function HexColor($dec)
523{
524 $hex = sprintf("%06X",$dec);
525 return $hex;
526}
527
528function GetNextColor(&$color, &$current_color, $total, $start_color="0000CC", $end_color="FFFFCC")
529{
530 if (mb_substr($start_color, 0, 1) == "#") $start_color = mb_substr($start_color, 1, 6);
531 if (mb_substr($end_color, 0, 1) == "#") $end_color = mb_substr($end_color, 1, 6);
532 if (mb_substr($current_color, 0, 1) == "#") $current_color = mb_substr($current_color, 1, 6);
533 if ($current_color == '') $color = "#".$start_color;
534 else
535 {
536 $step = round((hexdec($end_color)-hexdec($start_color))/$total);
537 if (intval($step)<=0) $step = "1500";
538 $dec = DecColor($current_color)+intval($step);
539 if ($dec<hexdec($start_color)) $dec = $start_color;
540 elseif ($dec>hexdec($end_color)) $dec = $end_color;
541 elseif ($dec>hexdec("FFFFFF")) $dec = "000000";
542 else $dec = HexColor($dec);
543 $color = "#".$dec;
544 }
545 $current_color = $color;
546}
$arParams
Определения access_dialog.php:21
$path
Определения access_edit.php:21
$count
Определения admin_tab.php:4
$type
Определения options.php:106
$db_res
Определения options_user_settings.php:8
global $APPLICATION
Определения include.php:80
$arResult
Определения generate_coupon.php:16
static GetListEx($arOrder=array("ID"=> "ASC"), $arFilter=array())
Определения answer.php:299
static GetGroupPermission($channel_id, $arGroups=false, $params=array())
Определения channel.php:423
static GetList($by='s_id', $order='desc', $arFilter=[])
Определения channel.php:210
static UserGroupPermission($CHANNEL_ID)
Определения vote.php:484
static GetByIDEx($ID)
Определения vote.php:360
static GetList($VOTE_ID, $by='s_c_sort', $order='asc', $arFilter=[])
Определения question.php:268
static & getInstance()
Определения channel.php:493
static GetUserAnswerStat($arSort=array(), $arFilter=array(), $arParams=array())
Определения event.php:14
static GetPublicList($arFilter=Array(), $strSqlOrder="ORDER BY C.C_SORT, C.ID, V.DATE_START desc", $params=array())
Определения vote.php:310
static GetList($by='s_id', $order='desc', $arFilter=[])
Определения vote.php:98
$template
Определения file_edit.php:49
$arr
Определения file_new.php:624
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$res
Определения filter_act.php:7
$handle
Определения include.php:55
$perm
Определения options.php:169
$zr
Определения options.php:5
$_REQUEST["admin_mnu_menu_id"]
Определения get_menu.php:8
$start
Определения get_search.php:9
$_SERVER["DOCUMENT_ROOT"]
Определения cron_frame.php:9
$z
Определения options.php:31
if(!is_array($deviceNotifyCodes)) $access
Определения options.php:174
IncludeModuleLangFile($filepath, $lang=false, $bReturnArray=false)
Определения tools.php:3778
Rel2Abs($curdir, $relpath)
Определения tools.php:3297
GetMessage($name, $aReplace=null)
Определения tools.php:3397
$order
Определения payment.php:8
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения prolog_main_admin.php:393
if(empty($signedUserToken)) $key
Определения quickway.php:257
$i
Определения factura.php:643
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"
Определения waybill.php:936
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения template.php:799
$site_id
Определения sonet_set_content_view.php:9
const SITE_ID
Определения sonet_set_content_view.php:12
$GLOBALS['_____370096793']
Определения update_client.php:1
$arFilter
Определения user_search.php:106
GetVoteDataByID($VOTE_ID, &$arChannel, &$arVote, &$arQuestions, &$arAnswers, &$arDropDown, &$arMultiSelect, &$arGroupAnswers, $arAddParams="N")
Определения vote_tools.php:31
DecRGBColor($hex, &$dec1, &$dec2, &$dec3)
Определения vote_tools.php:507
GetTemplateList($type="SV", $path="xxx")
Определения vote_tools.php:296
GetVoteList($GROUP_SID="", $params=array(), $site_id=SITE_ID)
Определения vote_tools.php:223
GetPrevVote($GROUP_SID, $level=1, $site_id=SITE_ID, $access=1)
Определения vote_tools.php:197
HexColor($dec)
Определения vote_tools.php:522
GetAnyAccessibleVote($site_id=SITE_ID, $channel_id=null)
Определения vote_tools.php:259
ShowPrevVoteResults($GROUP_SID, $level=1, $site_id=SITE_ID)
Определения vote_tools.php:367
arrAnswersSort(&$arr, $order="desc")
Определения vote_tools.php:329
GetCurrentVote($GROUP_SID, $site_id=SITE_ID, $access=1)
Определения vote_tools.php:181
GetAnswerTypeList()
Определения vote_tools.php:5
IsUserVoted($voteId)
Определения vote_tools.php:253
ShowCurrentVoteResults($GROUP_SID, $site_id=SITE_ID)
Определения vote_tools.php:373
fill_arc($start, $end, $color)
Определения vote_tools.php:495
GetVoteDiagramArray()
Определения vote_tools.php:14
ShowVoteResults($VOTE_ID, $template1="")
Определения vote_tools.php:439
ShowVote($VOTE_ID, $template1="")
Определения vote_tools.php:380
global $VOTE_CACHE_VOTING
Определения vote_tools.php:2
ShowCurrentVote($GROUP_SID, $site_id=SITE_ID)
Определения vote_tools.php:361
GetNextColor(&$color, &$current_color, $total, $start_color="0000CC", $end_color="FFFFCC")
Определения vote_tools.php:528
DecColor($hex)
Определения vote_tools.php:515
GetVoteDiagramList()
Определения vote_tools.php:20