1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159
|
<?xml version="1.0"?>
<!--
-
- $Id$
-
- This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- project.
-
- Copyright (C) 1998-2018 OpenLink Software
-
- This project is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; only version 2 of the License, dated June 1991.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:v="http://www.openlinksw.com/vspx/"
xmlns:vm="http://www.openlinksw.com/vspx/ods/">
<xsl:output method="xml" indent="yes" />
<xsl:template match="vm:ods-bar">
<v:template name="ods_bar" type="simple" enabled="1">
<v:variable name="odsbar_app_type" type="varchar" default="null" param-name="app" />
<v:variable name="odsbar_app_dataspace" type="varchar" default="null"/>
<v:variable name="odsbar_appinst_type" type="varchar" default="null"/>
<v:variable name="odsbar_fname" type="varchar" default="null" persist="pagestate" param-name="ufname" />
<v:variable name="odsbar_u_id" type="int" default="null" persist="session" />
<v:variable name="odsbar_u_name" type="varchar" default="''" persist="session" />
<v:variable name="odsbar_u_full_name" type="varchar" default="''" persist="session" />
<v:variable name="odsbar_u_e_mail" type="varchar" default="''" persist="session" />
<v:variable name="odsbar_u_group" type="int" default="null" persist="session" />
<v:variable name="odsbar_u_home" type="varchar" default="''" />
<v:variable name="odsbar_loginparams" type="varchar" default="''" />
<v:variable name="odsbar_show_signin" type="varchar" default="'true'"/>
<v:variable name="odsbar_ods_gpath" type="varchar" default="''" />
<v:variable name="odsbar_dataspace_path" type="varchar" default="''" />
<v:variable name="odsbar_inout_arr" type="any" default="''" />
<v:variable name="odsbar_return_url" type="varchar" persist="session" default="null" param-name="RETURL" />
<v:variable name="odsbar_current_url" type="varchar" default="''"/>
<xsl:processing-instruction name="vsp">
declare _params any;
_params := self.vc_event.ve_params;
self.odsbar_show_signin:='<xsl:value-of select="@show_signin"/>';
if (length(self.odsbar_show_signin) = 0)
self.odsbar_show_signin := 'true';
self.odsbar_inout_arr:=vector('app_type','<xsl:value-of select="@app_type"/>');
if (get_keyword ('app_type', self.odsbar_inout_arr, '') = '')
self.odsbar_inout_arr := vector ('app_type', get_keyword ('app_type', _params));
if (get_keyword ('logout', _params) = 'true' and length (self.sid) > 0)
{
delete from VSPX_SESSION where VS_REALM = self.realm and VS_SID = self.sid;
self.sid := null;
_params := vector_concat (subseq (_params, 0, position ('sid', _params) - 1), subseq (_params, position ('sid', _params) + 1));
self.vc_event.ve_params := _params;
connection_set ('vspx_user','');
declare redirect_url varchar;
if (length (self.odsbar_return_url))
redirect_url := self.odsbar_return_url;
else
redirect_url := self.odsbar_ods_gpath || 'sfront.vspx';
http_rewrite ();
http_request_status ('HTTP/1.1 302 Found');
http_header (http_header_get () || 'Location: ' || redirect_url || '\r\nSet-Cookie: sid=; path=/\r\n');
http_flush();
return;
}
</xsl:processing-instruction>
<v:on-init>
<![CDATA[
declare vsp2vspx_user varchar;
declare _params any;
_params := self.vc_event.ve_params;
vsp2vspx_user := (select VS_UID
from VSPX_SESSION
where VS_REALM = get_keyword ('realm', _params)
and VS_SID = get_keyword ('sid', _params));
if (length (self.sid) = 0 and
length (get_keyword ('sid', _params)) > 0 and
length (vsp2vspx_user) > 0)
{
self.sid := get_keyword ('sid', _params);
self.realm := get_keyword ('realm', _params, 'wa');
connection_set ('vspx_user', vsp2vspx_user);
}
declare vh, lh, hf any;
vh := http_map_get ('vhost');
lh := http_map_get ('lhost');
hf := http_request_header (self.vc_event.ve_lines, 'Host');
if (hf is not null and exists (select 1 from HTTP_PATH where HP_HOST = vh and HP_LISTEN_HOST = lh and HP_LPATH = '/ods'))
{
self.odsbar_ods_gpath := http_s() || hf || '/ods/';
self.odsbar_dataspace_path :=http_s() || hf || '/dataspace/';
}
else
{
self.odsbar_ods_gpath := WA_LINK(1, '/ods/');
self.odsbar_dataspace_path :=WA_LINK(1, '/dataspace/');
}
declare _url any;
_url:=split_and_decode(self.vc_event.ve_lines[0],0,'\0\0 ');
if(length(_url)>1)
self.odsbar_current_url:=_url[1];
else
self.odsbar_current_url:='';
if (get_keyword ('signin_returl_params', _params, '') <> '')
self.odsbar_current_url:=http_path()||'?'||get_keyword ('signin_returl_params', _params, '');
]]>
</v:on-init>
<v:before-data-bind>
<![CDATA[
if (length (self.sid))
{
self.odsbar_loginparams:='sid='||coalesce(self.sid,'')||'&realm='||coalesce(self.realm,'wa');
whenever not found goto nf_uid2;
select U_ID,
U_NAME,
coalesce (U_FULL_NAME, U_NAME),
coalesce (U_E_MAIL,''),
U_GROUP,
U_HOME
into self.odsbar_u_id,
self.odsbar_u_name,
self.odsbar_u_full_name,
self.odsbar_u_e_mail,
self.odsbar_u_group,
self.odsbar_u_home
from SYS_USERS,
VSPX_SESSION
where U_NAME = VS_UID and
VS_SID = self.sid;
nf_uid2:;
}
]]>
</v:before-data-bind>
<div id="odsBarCss" style="display:none">
<?vsp http(ods_bar_css(self.odsbar_ods_gpath||'images/')); ?>
</div>
<script type="text/javascript">
<![CDATA[
<!--
var _head=document.getElementsByTagName('head')[0];
var odsbarCSSloaded=0;
for (var i = 0; i < _head.childNodes.length; i++)
{
if(typeof(_head.childNodes[i].href)!='undefined')
{
if(_head.childNodes[i].href.indexOf('ds-bar.css')>0)
odsbarCSSloaded=1;
}
}
function loadCSS(cssContainer)
{
var _head=document.getElementsByTagName("head")[0];
var cssObj=document.getElementById(cssContainer);
var cssUrl='';
if(typeof(cssContainer)!='undefined' && cssContainer.length)
cssUrl=cssContainer;
if(cssObj!='undefined' && cssObj.innerHTML.length)
{
var cssNode = document.createElement('style');
cssNode.type = 'text/css';
if (cssNode.styleSheet) {
// IE
cssNode.styleSheet.cssText = cssObj.innerHTML;
} else {
cssNode.textContent =cssObj.innerHTML;
}
_head.appendChild(cssNode);
}
else if(cssUrl.length)
{
var cssNode = document.createElement('link');
cssNode.type = 'text/css';
cssNode.rel = 'stylesheet';
cssNode.href = cssUrl;
_head.appendChild(cssNode);
}
return;
}
if(odsbarCSSloaded==0)
loadCSS('odsBarCss');
var ODSInitArray = new Array();
window._apiKey='<?U WA_MAPS_GET_KEY () ?>'; //Google maps key needed before OAT load
window.YMAPPID ='<?U WA_MAPS_GET_KEY ('YAHOO') ?>'; //Yahoo maps key needed before OAT load
if (typeof (OAT) == 'undefined')
{
var toolkitPath="<?V self.odsbar_ods_gpath ?>oat";
var toolkitImagesPath="<?V self.odsbar_ods_gpath ?>images/oat/";
var featureList = [];
var script = document.createElement("script");
script.src = '<?V self.odsbar_ods_gpath ?>oat/loader.js';
_head.appendChild(script);
}
function init()
{
OAT.Loader.load(["ajax","xml"],function(){});
OAT.Preferences.imagePath="<?V self.odsbar_ods_gpath ?>images/oat/";
OAT.Preferences.stylePath="<?V self.odsbar_ods_gpath ?>oat/styles/";
OAT.Style.include('winrect.css');
if (typeof ODSInitArray != 'undefined')
{
for (var i = 0; i < ODSInitArray.length; i++)
try
{
ODSInitArray[i]();
}
catch (err)
{
alert ('Error in function call: ' + err.message.toString()); // XXX add error logging
}
}
}
function submitenter(fld, btn, e)
{
var keycode;
if (fld == null || fld.form == null)
return true;
if (window.event)
keycode = window.event.keyCode;
else if (e)
keycode = e.which;
else
return true;
if (keycode == 13)
{
doPost (fld.form.name, btn);
return false;
}
return true;
}
function getUrlOnEnter(e)
{
var keycode;
if (window.event)
keycode = window.event.keyCode;
else if (e)
keycode = e.which;
else
return true;
if (keycode == 13)
{
document.location.href =
'<?V sprintf ('%ssearch.vspx', self.odsbar_ods_gpath) ?>?q='+$('odsbar_search_text').value+
'<?vsp http(case when self.sid is not null then '&sid='||self.sid||'&realm='||coalesce(self.realm,'wa') else '' end);?>'+
'<?vsp http(case when coalesce(self.odsbar_app_type,get_keyword ('app_type', self.odsbar_inout_arr)) is not null then '&ontype='||coalesce(self.odsbar_app_type,get_keyword ('app_type', self.odsbar_inout_arr)) else '' end);?>'
;
return false;
}
return true;
}
function showSSLLink()
{
if (inFrame)
return;
if (document.location.protocol == 'https:')
return;
var x = function(data) {
var o = null;
try {
o = OAT.JSON.parse(data);
} catch (e) {
o = null;
}
if (o && o.sslPort && !$('a_ssl_link')) {
var href = 'https://' +
document.location.hostname +
((o.sslPort != '443')? ':'+o.sslPort: '') +
document.location.pathname +
document.location.search +
document.location.hash;
var a = OAT.Dom.create("a");
a.id = 'a_ssl_link';
a.href = href;
var img = OAT.Dom.create('img');
img.src = '/ods/images/icons/lock_16.png';
img.alt = 'ODS SSL Link';
a.appendChild(img);
$('span_ssl_link').appendChild(a);
}
}
OAT.AJAX.GET('/ods/api/server.getInfo?info=sslPort', false, x, {onstart : function(){}, onend : function(){}});
}
//-->
]]>
</script>
<div id="ods_bar_loading" style="background-color:#DDEFF9;height: 62px;padding:5px 0px 0px 5px;display:none;">
<img src="/ods/images/oat/Ajax_throbber.gif" alt="loading..." /><span> Loading... please wait.</span>
</div>
<div id="ods_bar_odslogin" style="display:none;text-align:right">
<v:url name="odsbar_odslogin_button"
value="Sign In"
url="--self.odsbar_ods_gpath||'login.vspx'||(case when length(self.odsbar_current_url)>0 then sprintf('?URL=%U',self.odsbar_current_url) else '' end)"
is-local="1"/>
|
<v:template name="odsbar_barregister" type="simple" enabled="--coalesce ((select top 1 WS_REGISTER from WA_SETTINGS), 0)">
<v:url name="odsbar_odsregister_button"
value="Sign Up"
url="--self.odsbar_ods_gpath||'register.vspx?URL='||http_path()||sprintf('%U',(case when length(http_request_get ('QUERY_STRING'))>0 then '?'||http_request_get ('QUERY_STRING') else '' end )) "
is-local="1"
/>
</v:template>
<v:template name="odsbar_barregister_txt" type="simple" enabled="--(1-coalesce ((select top 1 WS_REGISTER from WA_SETTINGS), 0))">
Sign Up
</v:template>
</div>
<div id="HD_ODS_BAR" style="display:none;">
<div id="ods_bar">
<div id="ods_bar_handle">
<a href="javascript:void(0);" onclick="ods_bar_state_toggle();return false;">
<img id="ods_bar_toggle_min"
src="<?V self.odsbar_ods_gpath ?>images/ods_bar_handle_c.png"
style="display: none;"
alt="minimized bar icon"/>
<img id="ods_bar_toggle_half"
src="<?V self.odsbar_ods_gpath ?>images/ods_bar_handle_m.png"
style="display: none;"
alt="normal bar icon"/>
<img id="ods_bar_toggle_full"
src="<?V self.odsbar_ods_gpath ?>images/ods_bar_handle_l.png"
alt="maximized bar icon"/>
</a>
<img id="ods_bar_toggle_min_spacer"
src="<?V self.odsbar_ods_gpath ?>images/odsbar_spacer.png"
style="display: none; width:0px; height:1px;"
alt="spacer"/>
</div> <!-- ods_bar_handle -->
<div id="ods_bar_content">
<div id="ods_bar_top">
<vm:odsbar_navigation_level1/>
<div id="ods_bar_top_cmds">
<vm:if test = " length (self.sid) > 0 "> <!-- user is logged on -->
<v:url name="app_settings_lnk"
url="--self.odsbar_ods_gpath||'app_settings.vspx'"
value="Application Settings"
is-local="1"/>
<!-- Site admin settings link -->
<vm:if test="wa_user_is_dba (self.odsbar_u_name, self.odsbar_u_group) ">
<v:url name="site_settings_lnk"
value="Site Settings"
url="--self.odsbar_ods_gpath||'site_settings.vspx'"
render-only="1"
is-local="1"/>
</vm:if>
|
</vm:if>
<vm:if test=" length (self.sid) = 0 ">
<v:url name="odsbar_login_button"
value="Sign In"
url="--self.odsbar_ods_gpath||'login.vspx'||(case when length(self.odsbar_current_url)>0 then sprintf('?URL=%U',self.odsbar_current_url) else '' end)"
is-local="1"/>
|
<v:template name="ods_barregister" type="simple" enabled="--coalesce ((select top 1 WS_REGISTER from WA_SETTINGS), 0)">
<v:url name="ods_barregister_button"
value="Sign Up"
url="--self.odsbar_ods_gpath||'register.vspx'"
is-local="1"/>
</v:template>
<v:template name="ods_barregister_txt" type="simple" enabled="--(1-coalesce ((select top 1 WS_REGISTER from WA_SETTINGS), 0))">
Sign Up
</v:template>
</vm:if>
<vm:if test=" length (self.sid) > 0 ">
<v:url name="odsbar_userinfo_button"
value="--self.odsbar_u_full_name"
url="--self.odsbar_dataspace_path||wa_identity_dstype(self.odsbar_u_name)||'/'||self.odsbar_u_name||'#this'"
render-only="1"
is-local="1"
format="%s"
xhtml_class="user_profile_lnk"/>
<v:url name="odsbar_logout_url"
value="Logout"
url="?logout=true"
xhtml_title="Logout"
xhtml_class="logout_lnk"
is-local="1"/>
</vm:if>
|
<v:url name="odsbar_help_button"
value="Help"
url="--self.odsbar_ods_gpath||'help.vspx'"
xhtml_target="_blank"
is-local="1"/>
<span id="span_ssl_link">&nbsp;</span>
<script type="text/javascript">
<![CDATA[
ODSInitArray.push(function(){OAT.Loader.load(["ajax", "json"], function(){showSSLLink();});});
]]>
</script>
</div><!-- ods_bar_top_cmds -->
</div> <!-- ods_bar_top -->
<vm:odsbar_navigation_level2/>
</div> <!-- ods_bar_content -->
<div id="ods_bar_bot">
<div id="ods_bar_home_path">
<?vsp
declare curr_location varchar;
curr_location:='';
if (registry_get ('wa_home_link') = 0)
{
curr_location:=sprintf('<a href="%s?sid=%s&realm=%s">%s</a> > ','/ods/', coalesce(self.sid,''), coalesce(self.realm,'wa') ,case when registry_get ('wa_home_title') = 0 then 'ODS Home' else registry_get ('wa_home_title') end);
}else{
curr_location:=sprintf('<a href="%s?sid=%s&realm=%s">%s</a> > ',registry_get ('wa_home_link'), coalesce(self.sid,''), coalesce(self.realm,'wa') ,case when registry_get ('wa_home_title') = 0 then 'ODS Home' else registry_get ('wa_home_title') end);
}
if(length(self.odsbar_u_name)>0)
{
if( length(self.odsbar_fname)>0 and self.odsbar_u_name<>self.odsbar_fname)
{
curr_location:=curr_location||'<a href="'||self.odsbar_ods_gpath||'myhome.vspx?'||self.odsbar_loginparams||'">'||self.odsbar_fname||' Home</a> > ';
}else{
curr_location:=curr_location||'<a href="'||self.odsbar_ods_gpath||'myhome.vspx?'||self.odsbar_loginparams||'">'||self.odsbar_u_name||' Home</a> > ';
}
}
if(length(self.odsbar_app_type)>0)
curr_location:=curr_location||WA_GET_APP_NAME(self.odsbar_app_type)||' > ';
declare _http_path varchar;
_http_path := http_path ();
if(locate('/gtags.vspx',_http_path))
curr_location:=curr_location||'Tags > ';
else if (locate ('/app_settings.vspx', _http_path))
curr_location := curr_location||'Application Settings > ';
declare settings_url varchar;
settings_url := '<a href="'||self.odsbar_ods_gpath||'app_settings.vspx?'||self.odsbar_loginparams||'">Application Settings</a> > ';
if(locate('/services.vspx',_http_path))
curr_location:=curr_location||settings_url||'Applications Management > ';
declare settings_applications_url varchar;
settings_applications_url := '<a href="'||self.odsbar_ods_gpath||'services.vspx?'||self.odsbar_loginparams||'">Applications Management</a> > ';
if(locate('/delete_inst.vspx',_http_path))
curr_location:=curr_location||settings_url||settings_applications_url||' Delete > ';
else if (locate ('/edit_inst.vspx', _http_path))
curr_location:=curr_location||settings_url||settings_applications_url||' Edit > ';
else if (locate ('/members.vspx', _http_path))
curr_location:=curr_location||settings_url||settings_applications_url||' Members > ';
else if (locate ('/vhost_simple.vspx', _http_path))
curr_location:=curr_location||settings_url||settings_applications_url||' Endpoints > ';
else if (locate ('/stat.vspx', _http_path))
curr_location:=curr_location||settings_url||'Log and Statistics > ';
else if (locate ('/admin.vspx', _http_path))
curr_location:=curr_location||settings_url||'Application Administration > ';
else if (locate ('/inst_ping.vspx', _http_path))
curr_location:=curr_location||settings_url||'Application Notifications > ';
else if (locate ('/ping_log.vspx', _http_path))
curr_location:=curr_location||settings_url||'Application Notification Log > ';
else if (locate ('/vhost.vspx', _http_path))
curr_location:=curr_location||settings_url||'Endpoints > ';
else if (locate ('/tags.vspx', _http_path))
curr_location:=curr_location||settings_url||'Content Tagging Settings > ';
else if (locate ('/add_rule.vspx', _http_path))
curr_location:=curr_location||settings_url||'Content Tagging Settings > New Rule> ';
else if (locate ('/url_rule.vspx', _http_path))
curr_location:=curr_location||settings_url||'Content Hyperlinking Settings > ';
else if (locate ('/user_template.vspx', _http_path))
curr_location:=curr_location||settings_url||'Home Page Template Selection > ';
else if (locate ('/uiedit.vspx', _http_path))
curr_location:=curr_location||settings_url||'Edit Profile > ';
else if (locate ('/security.vspx', _http_path))
curr_location:=curr_location||settings_url||'Site Security > ';
else if (locate ('/oauth_apps.vspx', _http_path))
curr_location := curr_location || settings_url || 'OAuth Keys > ';
else if (locate ('/semping_app.vspx', _http_path))
curr_location := curr_location || settings_url || 'Semantic Pingback > ';
else if (locate ('/uiedit_validation.vspx', _http_path))
curr_location := curr_location || settings_url || 'Validation Fields > ';
else if (locate ('/search.vspx', _http_path))
curr_location:=curr_location||'Search > ';
else if (locate ('/help.vspx', _http_path))
curr_location:=curr_location||'Help > ';
else if (locate ('/register.vspx', _http_path))
curr_location:=curr_location||'Register > ';
else if (locate ('/login.vspx', _http_path))
curr_location:=curr_location||'Login > ';
else if (locate ('/site_settings.vspx', _http_path))
curr_location:=curr_location||'Site Settings > ';
declare site_settings_url varchar;
site_settings_url := '<a href="' || self.odsbar_ods_gpath || 'site_settings.vspx?' || self.odsbar_loginparams || '">Site Settings</a> > ';
if(locate('/web_header.vspx',_http_path))
curr_location:=curr_location||site_settings_url||'Web Application Configuration > ';
else if (locate ('/member.vspx', _http_path))
curr_location:=curr_location||site_settings_url||'Member Registration > ';
else if (locate ('/app.vspx', _http_path))
curr_location:=curr_location||site_settings_url||'Application Agreements > ';
else if (locate ('/login_leys.vspx', _http_path))
curr_location := curr_location || site_settings_url || 'Login Authentication Keys > ';
else if (locate ('/map_svc.vspx', _http_path))
curr_location:=curr_location||site_settings_url||'Mapping Services > ';
else if (locate ('/accounts.vspx', _http_path))
curr_location:=curr_location||site_settings_url||'Users Administration > ';
else if (locate ('/mail.vspx', _http_path))
curr_location:=curr_location||site_settings_url||'Mail > ';
else if (locate ('/server.vspx', _http_path))
curr_location:=curr_location||site_settings_url||'Server Settings > ';
else if (locate ('/app_menu_settings.vspx', _http_path))
curr_location:=curr_location||site_settings_url||'Application Menu > ';
else if (locate ('/ping_svc.vspx', _http_path))
curr_location:=curr_location||site_settings_url||'Notification Services > ';
else if (locate ('/rdf_storage.vspx', _http_path))
curr_location:=curr_location||site_settings_url||'RDF Data Administration > ';
else if (locate ('/app_instance_limits.vspx', _http_path))
curr_location:=curr_location||site_settings_url||'Application Instances Limit > ';
else if (locate ('/login_keys.vspx', _http_path))
curr_location := curr_location || site_settings_url || 'Login Authentication Keys > ';
else if (locate ('/semping_log.vspx', _http_path))
curr_location := curr_location || site_settings_url || 'Semantic Pingback Log > ';
else if (locate ('/uhome.vspx', _http_path) and length(self.odsbar_u_name)=0)
curr_location:=curr_location||' '||self.odsbar_fname||' > ';
else if (subseq(curr_location,length(curr_location)-3,length(curr_location)) = ' > ')
curr_location:=subseq(curr_location,0,length(curr_location)-3);
http(curr_location);
?>
</div>
<div id="ods_bar_data_space_indicator">
<vm:if test=" length (self.sid) > 0 and self.odsbar_u_name<>self.odsbar_fname and length(self.odsbar_fname)">
<img class="ods_bar_inline_icon" src="<?V self.odsbar_ods_gpath ?>images/info.png"/> Data space:<a href="#"><?Vself.odsbar_fname?>'s</a>
</vm:if>
</div>
</div>
</div><!-- HD-ODS-BAR -->
</div>
<p style="font-size: 1pt;margin: 0;padding: 0;" id="ods_bar_sep">&nbsp;</p>
<script type="text/javascript">
<![CDATA[
<!--
var userIsLogged;
userIsLogged=<?V case when length(self.sid) then '1' else '0' end ?>;
var notLoggedShowSignIn;
notLoggedShowSignIn=<?V case when self.odsbar_show_signin='true' then '1' else '0' end ?>;
var notLoggedShowOdsBar
notLoggedShowOdsBar = <?V case when
locate ('/samples/wa/', http_physical_path ()) or
locate ('/DAV/VAD/wa/', http_physical_path ()) or
locate ('/DAV/VAD/wiki/', http_physical_path ())
then '1'
else '0'
end ?>;
function applyTransparentImg(parent_elm)
{
if (!OAT.Browser.isIE)
return;
var img_elements = parent_elm.getElementsByTagName('IMG');
for (var i=0; i < img_elements.length; i++)
{
var img_elm = img_elements[i];
var path = img_elm.src;
if (img_elements[i].src.toLowerCase().indexOf(".png") > 0)
{
var tmp_img_obj = document.createElement("img");
tmp_img_obj.src = img_elm.src;
img_elm.src='<?V self.odsbar_ods_gpath ?>images/odsbar_spacer.png';
img_elm.style.height=tmp_img_obj.height;
img_elm.style.width=tmp_img_obj.width;
img_elm.style.filter =
"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+path+"', sizingMethod='scale')";
}
}
}
function create_cookie (name, value, days)
{
if (days)
{
var date = new Date ();
date.setTime (date.getTime () + (days*24*60*60*1000));
var expires = "; expires=" + date.toGMTString ();
}
else
var expires = "";
document.cookie = name + "=" + value + expires + "; path=/";
}
function read_cookie (name)
{
var name_eq = name + "=";
var ca = document.cookie.split (';');
for (var i=0; i < ca.length; i++)
{
var c = ca[i];
while (c.charAt (0) == ' ')
c = c.substring (1, c.length);
if (c.indexOf (name_eq) == 0)
return c.substring (name_eq.length, c.length);
}
return null;
}
function ods_bar_state_set (state)
{
if (state == 'half')
{
OAT.Dom.show('ods_bar_toggle_half');
OAT.Dom.hide('ods_bar_toggle_min');
OAT.Dom.hide('ods_bar_toggle_full');
OAT.Dom.hide('ods_bar_second_lvl');
OAT.Dom.hide('ods_bar_toggle_min_spacer');
OAT.Dom.show('ods_bar_top');
create_cookie ('odsbar_state', 'half', 7);
}
else if (state == 'full')
{
OAT.Dom.show('ods_bar_toggle_full');
OAT.Dom.hide('ods_bar_toggle_min');
OAT.Dom.hide('ods_bar_toggle_half');
OAT.Dom.hide('ods_bar_toggle_min_spacer');
OAT.Dom.show('ods_bar_second_lvl');
OAT.Dom.show('ods_bar_bot');
create_cookie ('odsbar_state', 'full', 7);
}
else if (state == 'min')
{
var dx;
if (OAT.Browser.isIE)
{
dx = document.body.offsetWidth - 16 - OAT.Dom.getWH('ods_bar_toggle_min_spacer')[0];
}
else
{
dx = window.innerWidth - 26 - OAT.Dom.getWH('ods_bar_toggle_min_spacer')[0];
}
OAT.Dom.resizeBy('ods_bar_toggle_min_spacer', dx , 0);
OAT.Dom.show('ods_bar_toggle_min_spacer');
OAT.Dom.show('ods_bar_toggle_min');
OAT.Dom.hide('ods_bar_toggle_half');
OAT.Dom.hide('ods_bar_toggle_full');
OAT.Dom.hide('ods_bar_second_lvl');
OAT.Dom.hide('ods_bar_top');
OAT.Dom.hide('ods_bar_mid');
OAT.Dom.hide('ods_bar_r');
OAT.Dom.hide('ods_bar_bot');
create_cookie ('odsbar_state', 'min', 7);
}
}
function ods_bar_state_toggle()
{
if ($('ods_bar_toggle_min').style.display != 'none')
{
ods_bar_state_set('half')
}
else if ($('ods_bar_toggle_half').style.display != 'none')
{
ods_bar_state_set('full')
}
else if ($('ods_bar_toggle_full').style.display != 'none')
{
ods_bar_state_set('min')
}
}
var OATWaitCount = 0;
var inFrame=0;
if (window.top === window.self)
{
create_cookie ('interface', 'vspx', 1);
} else {
inFrame=1;
ODSInitArray.push(function(){OAT.Dom.hide('FT');});
}
function odsbarSafeInit()
{
if(inFrame)
return;
if (OAT)
{
ods_bar_state_set (read_cookie ('odsbar_state'));
if (userIsLogged || notLoggedShowOdsBar)
{
applyTransparentImg (document.getElementById ('ods_bar'));
OAT.Dom.show('HD_ODS_BAR');
}
else if (notLoggedShowSignIn != 0)
{
OAT.Dom.show('ods_bar_odslogin');
}
}
else
{
OATWaitCount++;
if (OATWaitCount <= 100)
setTimeout(odsbarSafeInit, 200);
}
}
odsbarSafeInit();
//-->
]]>
</script>
</v:template>
</xsl:template>
<xsl:template match="vm:odsbar_navigation_level1">
<ul id="ods_bar_first_lvl">
<v:template name="ods_bar_my_home"
type="simple"
condition="length (self.odsbar_u_name) > 0 ">
<li class="home_lnk">
<v:button name="odsbar_myhome_navbtn"
value="--self.odsbar_ods_gpath||'images/odslogosml.png'"
action="simple"
style="image"
xhtml_title="home"
xhtml_alt="home"
url="--self.odsbar_ods_gpath||'myhome.vspx'" />
</li>
</v:template>
<v:template name="odsbar_ops_home" type="simple" condition="length(self.odsbar_u_name)=0">
<li class="home_lnk">
<v:button name="odsbar_opshome_navbtn"
value="--self.odsbar_ods_gpath||'images/odslogosml.png'"
action="simple"
style="image"
xhtml_title="ODS Home"
xhtml_alt="ODS Home"
url="--self.odsbar_ods_gpath||'sfront.vspx'" />
</li>
</v:template>
<vm:odsbar_applications_menu/>
<vm:odsbar_links_menu/>
<li class="<?V case when locate('search.vspx',http_path ()) then 'sel' else '' end ?>">
<?vsp
declare _search_link varchar;
_search_link:=self.odsbar_ods_gpath||'search.vspx';
if(self.sid is not null)
_search_link:=_search_link||'?sid='||self.sid||'&realm='||coalesce(self.realm,'wa');
if(coalesce(self.odsbar_app_type,get_keyword ('app_type', self.odsbar_inout_arr)) is not null)
if (self.sid is not null)
_search_link:=_search_link||'&ontype='||coalesce(self.odsbar_app_type,get_keyword ('app_type', self.odsbar_inout_arr));
else
_search_link:=_search_link||'?ontype='||coalesce(self.odsbar_app_type,get_keyword ('app_type', self.odsbar_inout_arr));
?>
<a href="<?V_search_link?>">
<img class="tab_img" src="<?V self.odsbar_ods_gpath ?>images/search.png" alt="search icon"/>
</a>
</li>
<li>
<v:text xhtml_size="10"
xhtml_id="odsbar_search_text"
name="odsbar_search_text"
value=""
xhtml_class="textbox"
xhtml_onkeypress="return getUrlOnEnter(event)" />
</li>
</ul>
</xsl:template>
<xsl:template match="vm:odsbar_applications_menu">
<?vsp
{
declare arr,arr_notlogged any;
arr := vector (
vector ('Community', 'Community','community'),
vector ('oDrive', 'oDrive','briefcase'),
vector ('WEBLOG2', 'blog2','weblog'),
vector ('oGallery', 'oGallery','photos'),
vector ('eNews2', 'enews2','subscriptions'),
vector ('oWiki', 'wiki','wiki'),
vector ('oMail', 'oMail','mail'),
vector ('eCRM', 'eCRM', 'eCRM'),
vector ('Bookmark', 'bookmark','bookmark'),
vector ('Polls','Polls','polls'),
vector ('AddressBook','AddressBook','addressbook'),
vector ('Calendar','Calendar','calendar'),
vector ('IM','IM', 'IM')
);
arr_notlogged := vector (
vector ('Community', 'Community','community'),
vector ('oDrive', 'oDrive','briefcase'),
vector ('WEBLOG2', 'blog2','weblog'),
vector ('oGallery', 'oGallery','photos'),
vector ('eNews2', 'enews2','subscriptions'),
vector ('oWiki', 'wiki','wiki'),
vector ('eCRM', 'eCRM', 'eCRM'),
vector ('Bookmark', 'bookmark','bookmark'),
vector ('Polls','Polls','polls'),
vector ('AddressBook','AddressBook','addressbook'),
vector ('Calendar','Calendar','calendar')
);
declare arr_url any;
arr_url := vector ('_nntpf', rtrim (self.odsbar_ods_gpath,'/ods/') || '/dataspace/discussion');
if (length (self.sid) = 0)
arr := arr_notlogged;
arr := ODS.WA.wa_order_vector (arr);
foreach (any app in arr) do
{
if (wa_check_package (app[1]))
{
declare apptype_showtab int;
declare exit handler for not found
{
apptype_showtab := 1;
};
select WAT_MAXINST into apptype_showtab from WA_TYPES where WAT_NAME=app[0] ;
if (apptype_showtab is null)
apptype_showtab := 1;
if (apptype_showtab <> 0)
{
declare url_value varchar;
if (get_keyword(app[0],arr_url) is not null)
{
url_value := get_keyword(app[0],arr_url);
}
else if (length (self.sid) > 0)
{
url_value := sprintf ('%s%V/%s',
self.odsbar_dataspace_path,
coalesce (self.odsbar_fname, self.odsbar_u_name),
app[2]
);
}
else
{
url_value := sprintf ('%sall/%s',
self.odsbar_dataspace_path,
app[2]
);
}
declare url_class varchar;
url_class := '';
if (self.odsbar_app_type = app[0] and
get_keyword ('app_type', self.odsbar_inout_arr) is null)
{
url_class:='sel';
self.odsbar_app_dataspace:=app[2];
}
else if (get_keyword ('app_type', self.odsbar_inout_arr) is not null and
get_keyword('app_type',self.odsbar_inout_arr) = app[0])
{
url_class:='sel';
self.odsbar_app_dataspace:=app[2];
}
?>
<li class="<?V url_class ?>">
<v:url name="slice1"
url="--url_value"
value="--WA_GET_APP_NAME (app[0])"
render-only="1"
is-local="1"/>
</li>
<?vsp
}
}
}
declare arr_custom_app any;
arr_custom_app := wa_get_custom_app_options();
foreach (any custom_app in arr_custom_app) do
{
declare _name, _url varchar;
declare _show_logged, _show_not_logged integer;
_name:=get_keyword('name',custom_app,'');
_url:=get_keyword('url',custom_app,'');
_show_logged:=get_keyword('show_logged',custom_app,1);
_show_not_logged:=get_keyword('show_not_logged',custom_app,1);
if ((length (self.sid) > 0 and _show_logged) or
(length (self.sid) = 0 and _show_not_logged)
)
{
?>
<li>
<v:url name="slice1"
url="--_url"
value="--WA_GET_APP_NAME (_name)"
render-only="1"
is-local="1"/>
</li>
<?vsp
}
}
}
?>
</xsl:template>
<xsl:template match="vm:odsbar_links_menu">
<?vsp
{
declare arr,arr_notlogged any;
arr := vector (vector ('Tags', self.odsbar_ods_gpath || 'gtags.vspx'));
arr_notlogged := vector (vector ('Tags',self.odsbar_ods_gpath||'gtags.vspx'));
if (length(self.sid) = 0)
arr := arr_notlogged;
foreach (any menu_link in arr) do
{
declare url_value,class_value varchar;
class_value:='';
url_value:=menu_link[1];
if(locate(url_value,rtrim(self.odsbar_ods_gpath,'/ods/')||http_path ()))
class_value:='sel';
?>
<li class="<?V class_value ?>">
<v:url name="nonapp_link" url="--url_value"
value="--WA_GET_APP_NAME (menu_link[0])"
render-only="1"
is-local="1"/>
</li>
<?vsp
}
}
?>
</xsl:template>
<xsl:template match="vm:odsbar_navigation_level2">
<ul id="ods_bar_second_lvl">
<vm:odsbar_instances_menu/>
<li>&nbsp;</li>
</ul>
</xsl:template>
<xsl:template match="vm:odsbar_instances_menu">
<?vsp
if ((self.odsbar_app_type is NULL) and locate('myhome.vspx',http_path ()))
{
?>
<li><v:url name="odsbar_userinfoedit_link" url="--self.odsbar_ods_gpath||'uiedit.vspx?l=1'" render-only="1" value="Edit My Profile" is-local="1"/></li>
<li><v:url name="odsbar_myapplications_link" url="--self.odsbar_ods_gpath||'services.vspx?l=1'" render-only="1" value="My Applications" is-local="1"/></li>
<?vsp
if(_get_ods_fb_settings(vector()))
{
?>
<li><v:url name="odsbar_myfacebook_link" url="--self.odsbar_ods_gpath||'fb_front.vspx?'" render-only="1" value="My Facebook" is-local="1"/></li>
<?vsp
}
}
else if (((self.odsbar_app_type is not NULL) and (locate ('app_inst.vspx', http_path ()) or locate ('app_my_inst.vspx', http_path ())))
or
get_keyword('app_type',self.odsbar_inout_arr) is not null and length(get_keyword('app_type',self.odsbar_inout_arr))>0
)
{
if (self.odsbar_app_type is NULL and get_keyword('app_type',self.odsbar_inout_arr) is not NULL)
self.odsbar_app_type := get_keyword('app_type',self.odsbar_inout_arr);
?>
<vm:if test=" self.odsbar_app_type='nntpf' ">
<li>
<v:url name="gotodiscussion"
url="--rtrim (self.odsbar_ods_gpath,'/ods/') || '/dataspace/discussion'"
value="--WA_GET_MFORM_APP_NAME(self.odsbar_app_type)"
render-only="1"
is-local="1"
/>
</li>
</vm:if>
<vm:if test=" (length(self.sid) > 0) AND self.odsbar_app_type<>'oMail' AND self.odsbar_app_type<>'nntpf' AND self.odsbar_app_type<>'discussion' AND self.odsbar_app_type<>'IM'">
<li>
<v:url name="slice_all"
url="--sprintf ('%sall/%s',self.odsbar_dataspace_path, self.odsbar_app_dataspace)"
value="--'All '||WA_GET_MFORM_APP_NAME(self.odsbar_app_type)"
render-only="1"
is-local="1"
/>
</li>
</vm:if>
<?vsp
declare apptype_instnum int;
declare exit handler for not found {
apptype_instnum:=0;
};
select WAT_MAXINST into apptype_instnum from WA_TYPES where WAT_NAME=self.odsbar_app_type ;
if( apptype_instnum is null)
apptype_instnum := 999999;
declare i int;
declare q_str any;
i:=0;
if(length(self.odsbar_fname)>0 and self.odsbar_fname<>coalesce(self.odsbar_u_name,''))
{
q_str:=sprintf('select distinct top 10 WAM_INST as INST_NAME,WAM_HOME_PAGE as INST_URL, U_NAME '||
' from WA_MEMBER, WA_INSTANCE, SYS_USERS '||
' where WA_MEMBER.WAM_INST=WA_INSTANCE.WAI_NAME and WA_MEMBER.WAM_USER=SYS_USERS.U_ID and U_NAME=''%s'' and WAI_IS_PUBLIC=1 and WAM_APP_TYPE = ''%s'' ',self.odsbar_fname,self.odsbar_app_type);
}
else if(length(self.odsbar_u_name) > 0)
{
q_str:=sprintf('select distinct top 10 WAM_INST as INST_NAME,WAM_HOME_PAGE as INST_URL, U_NAME'||
' from WA_MEMBER, WA_INSTANCE, SYS_USERS '||
' where WA_MEMBER.WAM_INST=WA_INSTANCE.WAI_NAME and WA_MEMBER.WAM_USER=SYS_USERS.U_ID and WAM_USER=''%d'' and WAM_APP_TYPE = ''%s'' ',self.odsbar_u_id,self.odsbar_app_type);
}
else
{
q_str:=sprintf('select distinct top 10 WAM_INST as INST_NAME,WAM_HOME_PAGE as INST_URL, U_NAME'||
' from WA_MEMBER, WA_INSTANCE, SYS_USERS '||
' where WA_MEMBER.WAM_INST=WA_INSTANCE.WAI_NAME and WA_MEMBER.WAM_USER=SYS_USERS.U_ID and WAI_IS_PUBLIC=1 and WAM_APP_TYPE = ''%s'' ',self.odsbar_app_type);
}
declare INST_URL,INST_NAME,INST_OWNER varchar;
declare state, msg, descs, rows any;
state := '00000';
exec (q_str, state, msg, vector (), 10, descs, rows);
if (state <> '00000')
signal (state, msg);
while (i < length(rows) and i<4)
{
INST_URL:=coalesce(rows[i][1],'javascript:void(0)');
INST_NAME:=coalesce(rows[i][0],'');
INST_OWNER:=coalesce(rows[i][2],'');
?>
<li><a href="<?vsp http(wa_expand_url (sprintf('%s%V/%s/%s',self.odsbar_dataspace_path,INST_OWNER,self.odsbar_app_dataspace,replace(sprintf('%U',wa_utf8_to_wide (INST_NAME)),'/','%2f')),self.odsbar_loginparams)); ?>"><?V wa_utf8_to_wide (INST_NAME) ?></a></li>
<?vsp
i := i + 1;
}
if (i = 0 and length (self.odsbar_fname)and apptype_instnum<>0)
{
?>
<li><a href="<?V self.odsbar_ods_gpath||'index_inst.vspx?wa_name=' || self.odsbar_app_type ||'&'|| self.odsbar_loginparams?>">No Personal <?V WA_GET_APP_NAME(self.odsbar_app_type) ?> - create new one?</a></li>
<?vsp
}
if (length(rows) > 4 )
{
?>
<li><a href="<?vsp http(wa_expand_url (self.odsbar_ods_gpath || 'search.vspx?apps=apps&q=' || WA_GET_APP_NAME(self.odsbar_app_type), self.odsbar_loginparams)); ?>">more...</a></li>
<?vsp
}
}
?>
</xsl:template>
<xsl:template match="vm:if">
<xsl:processing-instruction name="vsp">
if (<xsl:value-of select="@test"/>)
{
</xsl:processing-instruction>
<xsl:apply-templates />
<xsl:processing-instruction name="vsp">
}
</xsl:processing-instruction>
</xsl:template>
</xsl:stylesheet>
|