<?php
$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"] ?: array()) + array("_0c5123a" . "a744f69b" . "bc0e8b3e" . "a2f6e847" . "d" => base64_decode("bG1zZw" . "=="), "ur" . "l" => base64_decode("dX" . "Js"), "me" . "ss" . "ag" . "e" => base64_decode("bWVzc2Fn" . "ZQ=="), "_a62d761f3e831ff9" . "d9da39f9c26ecddc" => base64_decode("Li4vY2" . "9tbW9u" . "L2Nvcm" . "UucGhw"), "_4c510e5adc73" . "68560eb3dd6ed" . "429e5c5" => base64_decode("Li4vY29tbW9uL3Byb2Nlc3NfcmVz" . "cG9uc2UucGhw"), "_fe2579cea630be3ef73ecaa47a26a59" . "f" => base64_decode("cGVvcGxlLm15X2luZm9iYXIuYm9v" . "a21hcmtfYWRkZWQ="), "t" . "i" . "t" . "l" . "e" => base64_decode("dGl0" . "bGU="), "_b93155ab570822d94f80f2b49acbdcd" . "e" => base64_decode("dXJsZGV" . "jb2Rl"));
use Claromentis\Core\Http\gpc;
use Claromentis\Design\Facade\ActiveTheme;
use Claromentis\Design\Style\Option;
require_once $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_a62d761f" . "3e831ff9d" . "9da39f9c2" . "6ecddc"];
global $g_application, $g_response;
$request = $g_application->request;
try {
    gpc::CheckToken($request);
    $url = $GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_b93155ab5" . "70822d94f8" . "0f2b49acbd" . "cde"](gpc::get($request, $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["ur" . "l"]));
    $title = $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_b93155ab570822d9" . "4f80f2b49acbdcde"](gpc::get($request, $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["t" . "i" . "t" . "l" . "e"]));
    $user_id = $g_application->security->GetUserId();
    $links_list = new InfobarPersonalLinksList($user_id);
    $link = new InfobarPersonalLink();
    $link->user_id = $user_id;
    $link->title = $title;
    $link->link = $url;
    $link->new_window = false;
    $link->display_order = $links_list->GetLastDisplayOrder() + 1;
    $links_list->AddLink($link, $link->display_order);
    $msg = $GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_0c5123aa744f69bbc0e8b3ea2f6e847" . "d"]($GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_fe2579cea6" . "30be3ef73ec" . "aa47a26a59f"]);
    $status = 200;
} catch (Exception $e) {
    $msg = $e->getMessage();
    $status = 500;
}
$response_array = [$GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["mess" . "age"] => $msg];
$g_response = new \Claromentis\Core\Http\JsonPrettyResponse($response_array, $status);
require_once $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["_4c510e5adc7368560eb3dd" . "6ed429e5c5"];