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
|
<?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:template match="vm:body[not vm:login]">
<vm:home-init />
<vm:login redirect="uhome.vspx"/>
<xsl:apply-templates />
</xsl:template>
<xsl:template match="vm:home-init">
<v:variable name="ufid" type="integer" default="0"/>
<v:variable name="isowner" type="integer" default="0"/>
<v:variable name="is_org" type="integer" default="0"/>
<v:variable name="visb" type="any" default="null"/>
<v:variable name="arr" type="any" default="null" persist="temp"/>
<v:variable name="friends_name" type="varchar" default="''"/>
<v:variable name="sne_id" type="int" default="0" />
<v:variable name="notags" type="integer" default="0"/>
<v:local-variable name="lvsn">
<v:before-data-bind>
<![CDATA[
if (self.fname is null)
self.fname := self.u_name;
{
whenever not found goto nf_user;
select U_ID into self.ufid from SYS_USERS where U_NAME = self.fname;
}
if (0)
{
declare tmp_uid varchar;
declare exit handler for not found
{
signal ('22023', sprintf ('The user "%s" does not exist.', self.fname));
};
nf_user:
select U_NAME, U_ID into tmp_uid, self.ufid
from SYS_USERS, WA_USER_INFO
where WAUI_U_ID = U_ID and WAUI_NICK = self.fname;
self.fname := tmp_uid;
}
if (not exists (select 1 from WA_USER_INFO where WAUI_U_ID = self.ufid))
{
insert into WA_USER_INFO (WAUI_U_ID) values (self.ufid);
}
self.visb := WA_USER_VISIBILITY(self.fname);
if (self.ufid = self.u_id)
self.isowner := 1; --user is the owner of the page.
self.arr := WA_GET_USER_INFO (self.u_id, self.ufid, self.visb, self.isowner);
self.is_org := self.arr[49];
]]>
</v:before-data-bind>
<v:after-data-bind>
<![CDATA[
declare id any;
if (self.isowner)
id := self.u_name;
else
id := self.fname;
self.friends_name := (select coalesce (u_full_name, u_name) from sys_users where u_name = id);
if (not length (self.friends_name))
self.friends_name := id;
select sne_id into self.sne_id from sn_entity where sne_name = id;
]]>
</v:after-data-bind>
</v:local-variable>
</xsl:template>
<xsl:template match="vm:user-dashboard">
<v:template name="userdashboard" type="simple" condition="self.isowner">
<tr><th><v:label value="--self.friends_name" />'s Dashboard</th></tr>
<tr>
<td id="mainarea">
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="infoarea1">
<tr>
<td width="50%" align="right" valign="top">
<vm:dash-blog-summary />
</td>
<td width="50%" valign="top">
<vm:dash-enews-summary/>
</td>
</tr>
</table>
</td>
</tr>
</v:template>
</xsl:template>
<xsl:template match="vm:page-hd">
<h1 class="page_hd">
<xsl:apply-templates/>
</h1>
</xsl:template>
<xsl:template match="vm:friends-name">
<v:label value="--self.friends_name" render-only="1" format="%s" />
</xsl:template>
<!-- url="-#-sprintf ('ufoaf.xml?:sne=%d', self.sne_id)" -->
<xsl:template match="vm:foaf-link">
<v:url name="u2"
value='<img src="images/foaf.gif" border="0" alt="FOAF" />'
format="%s"
url="--WA_LINK (1, sprintf ('/dataspace/%s/%s/foaf.rdf', wa_identity_dstype(case when self.isowner then self.u_name else self.fname end), case when self.isowner then self.u_name else self.fname end))"
/>
</xsl:template>
<xsl:template match="vm:vcard-link">
<v:url name="u1"
value='<img src="images/vcard.gif" border="0" alt="vCard" />'
format="%s"
url="--sprintf ('sn_user_export.vspx?ufid=%d&ufname=%s', self.ufid, self.fname)"
/>
</xsl:template>
<xsl:template match="vm:sioc-link">
<v:url name="u1"
value='<img src="images/sioc_button.png" border="0" alt="SIOC" />'
format="%s"
url="--WA_LINK (1, sprintf ('/dataspace/%s/sioc.rdf', self.fname))" xhtml_target="_blank"
/>
</xsl:template>
<xsl:template match="vm:geo-link">
<?vsp if (1=0 and self.e_lat is not null and self.e_lng is not null) { ?>
<v:url name="u1"
value='<img src="http://i.geourl.org/80x15/simple.png" border="0" alt="GeoURL" />'
format="%s"
url="--sprintf ('http://geourl.org/near?p=%U', WA_LINK (1, sprintf ('/dataspace/%s', self.fname)))" xhtml_target="_blank"
/>
<?vsp } ?>
</xsl:template>
<xsl:template match="vm:add-to-friends">
<?vsp if (not (self.isowner = 1) and
not exists (select 1
from SN_FRENDS
where FROM_U_NAME = self.u_name and
TO_U_NAME = self.fname) and
not exists (select 1 from SN_FRENDS
where FROM_U_NAME = self.fname and
TO_U_NAME = self.u_name)) {
?>
<v:label value="Do you know this person?" render-only="1" />
&nbsp;
<v:url name="addtof"
value="--'Add to friends.'" format="%s"
url="--sprintf('sn_make_inv.vspx?fmail=%s',coalesce(self.arr[4],''))"
xhtml_class="profile_tab"
/>
<?vsp
} else {
?>
You are already connected to <?V self.fname ?>
<?vsp
}
?>
</xsl:template>
<xsl:template match="vm:user-apps">
<div class="widget w_user_apps">
User applications
</div>
</xsl:template>
<xsl:template match="vm:user-details">
<v:template name="user_details" type="simple" enabled="1">
<?vsp
{
declare pg any;
pg := atoi(get_keyword('page', control.vc_page.vc_event.ve_params, '1'));
?>
<div id="p" class="c1 vcard" style="margin: 7px;">
<div class="tabs">
<div onclick="javascript: showTab('p', 5, 0);" class="tab activeTab" id="p_tab_0"><?V case when self.is_org then 'Organization' else 'Personal' end ?></div>
<div onclick="javascript: showTab('p', 5, 1);" class="tab" id="p_tab_1">Contact</div>
<div onclick="javascript: showTab('p', 5, 2);" class="tab" id="p_tab_2">Home</div>
<div onclick="javascript: showTab('p', 5, 3);" class="tab" id="p_tab_3">Business</div>
<div onclick="javascript: showTab('p', 5, 4);" class="tab" id="p_tab_4">Data Explorer</div>
</div>
<div class="contents">
<div id="p_content_0" class="tabContent">
<table>
<tr>
<th><v:label value="Account:" /></th>
<td><span class="nickname"><v:label value="--coalesce(self.fname,'')" /></span></td>
</tr>
<?vsp if (length (self.arr[37])) { ?>
<tr>
<th><v:label value="Photo:" /></th>
<td><img class="photo" src="<?V self.arr[37] ?>" width="64" border="0" /></td>
</tr>
<?vsp } ?>
<tr>
<th><v:label value="Title:" enabled="--case when coalesce(self.arr[0],'') <> '' then 1 else 0 end" /></th>
<td><span class="honorific-prefix"><v:label value="--coalesce(self.arr[0],'')" /></span></td>
</tr>
<tr>
<th><v:label value="First Name:" enabled="--case when coalesce(self.arr[1],'') <> '' then 1 else 0 end" /></th>
<td><span class="given-name"><v:label value="--coalesce(self.arr[1],'')" /></span></td>
</tr>
<tr>
<th><v:label value="Last Name:" enabled="--case when coalesce(self.arr[2],'') <> '' then 1 else 0 end" /></th>
<td><span class="family-name"><v:label value="--coalesce(self.arr[2],'')" /></span></td>
</tr>
<tr>
<th><v:label value="Full Name:" enabled="--case when coalesce(self.arr[3],'') <> '' then 1 else 0 end" /></th>
<td><span class="fn"><v:label value="--coalesce(self.arr[3],'')" /></span></td>
</tr>
<?vsp if (length (self.arr[4])) { ?>
<tr>
<th><v:label value="E-mail:" /></th>
<td><span class="email"><v:url name="lemail1" value="--coalesce(self.arr[4],'')" url="--concat ('mailto:', self.arr[4])" /></span></td>
</tr>
<?vsp } ?>
<tr>
<th><v:label value="Gender:" enabled="--case when coalesce(self.arr[5],'') <> '' and equ (self.is_org, 0) then 1 else 0 end" /></th>
<td><v:label value="--coalesce(self.arr[5],'')" /></td>
</tr>
<tr>
<th><v:label value="Birthday:" enabled="--case when coalesce(self.arr[6],'') <> '' then 1 else 0 end" /></th>
<td><span class="bday"><v:label value="--coalesce(self.arr[6],'')" /></span></td>
</tr>
<?vsp
if (length (self.arr[7])) {
?>
<tr>
<th valign="top"><v:label value="Personal Webpage:" /></th>
<td>
<v:url name="lwpage1" value="--coalesce(self.arr[7],'')" url="--self.arr[7]" xhtml_target="_blank" xhtml_class="url"/>
<br />
<img src="data:image/jpg;base64,<?V ODS.ODS_API.qrcode(self.arr[7]) ?>"/>
</td>
</tr>
<?vsp
}
if (length (self.arr[8])) {
?>
<tr>
<th valign="top"><v:label value="Other Identity URIs (synonyms):" /></th>
<td>
<?vsp
for select Y from DB.DBA.ODS_USER_IDENTIY_URLS (uname) (Y varchar) sub where uname = self.fname do
{
?>
<a href="<?V Y ?>" target="_blank"><?V Y ?></a><br />
<?vsp
}
?>
</td>
</tr>
<?vsp } ?>
<v:template name="umsign" type="simple" enabled="--case when coalesce(self.arr[9],'') <> '' then 1 else 0 end">
<tr>
<th><v:label value="Mail Signature:" /></th>
<td><pre><v:label value="--coalesce(self.arr[9],'')" /></pre></td>
</tr>
</v:template>
<v:template name="usummary" type="simple" enabled="--case when coalesce(self.arr[33],'') <> '' then 1 else 0 end">
<tr>
<th><v:label value="Summary:" /></th>
<td><pre><v:label value="--coalesce(self.arr[33],'')" /></pre></td>
</tr>
</v:template>
<?vsp
if (coalesce(self.arr[44],'') <> '')
{
?>
<tr>
<th><v:label value="" />Favorite Books:</th>
<td><v:label value="--coalesce(self.arr[44],'')" /></td>
</tr>
<?vsp
}
if (coalesce(self.arr[45],'') <> '')
{
?>
<tr>
<th><v:label value="" />Favorite Music:</th>
<td><v:label value="--coalesce(self.arr[45],'')" /></td>
</tr>
<?vsp
}
if (coalesce(self.arr[46],'') <> '')
{
?>
<tr>
<th><v:label value="" />Favorite Movies:</th>
<td><v:label value="--coalesce(self.arr[46],'')" /></td>
</tr>
<?vsp
}
if (coalesce(self.arr[43],'') <> '')
{
?>
<tr>
<th>Audio:</th>
<td><a href="<?V self.arr[43] ?>"><img border="0" alt="Owner audio" src="images/icons/audio_16.gif" /></a></td>
</tr>
<?vsp
}
?>
<v:form name="upl" type="simple" method="POST" action="uhome.vspx">
<v:template name="UserAssignedTags" type="simple" enabled="--case when (self.isowner = 1 or isnull(self.u_id)) then 0 else 1 end">
<tr>
<th><v:label value="Tags:" enabled="--case when coalesce(WA_USER_TAG_GET(self.fname),'') <> '' then 1 else 0 end" /></th>
<td><span class="tags"><v:label value="--coalesce(WA_USER_TAG_GET(self.fname),'')" /></span></td>
</tr>
<tr>
<th nowrap="nowrap">
<v:label value="--sprintf('My tags for %s', self.fname)" />
<span class="explain"> (comma separated list of keywords)</span>
</th>
<td>
<v:button value="Tag" action="simple" name="bt_tag1" enabled="--case when( WA_USER_IS_TAGGED(self.u_id, self.ufid) = 1 or self.notags = 1) then 0 else 1 end">
<v:on-post>
if (not self.vc_is_valid)
return;
self.notags := 1;
self.upl.vc_data_bind(e);
</v:on-post>
</v:button>
<v:template name="AssignedTags" type="simple" enabled="--case when( WA_USER_IS_TAGGED(self.u_id, self.ufid) = 1 or self.notags = 1) then 1 else 0 end">
<v:textarea name="s_tags"
value="--WA_USER_TAGS_GET(self.u_id,self.ufid)"
xhtml_cols="50"
xhtml_rows="5"
xhtml_tabindex="12"/>
<v:button value="Change Tags" action="simple" name="bt_tags_ch1">
<v:on-post>
if (not self.vc_is_valid)
return;
self.notags := 0;
declare tag varchar;
declare tid integer;
tag := WA_TAG_PREPARE(self.s_tags.ufl_value);
if (not WA_VALIDATE_TAGS(tag))
{
self.vc_is_valid := 0;
self.vc_error_message := 'The Tags expression is not valid.';
return;
};
WA_USER_TAG_SET(self.u_id, self.ufid, tag);
self.upl.vc_data_bind(e);
</v:on-post>
</v:button>
</v:template>
</td>
</tr>
</v:template>
</v:form>
<v:template name="UserOwnTags" type="simple" enabled="--case when self.isowner = 1 then 1 else 0 end">
<tr>
<th><v:label value="Tags:" enabled="--case when coalesce(WA_USER_TAG_GET(self.u_name),'') <> '' then 1 else 0 end" /></th>
<td><v:label value="--coalesce(WA_USER_TAG_GET(self.u_name),'')" /></td>
</tr>
</v:template>
<?vsp
-- uncomment this for old behaviour
if (0)
{
declare sneid, for_user any;
for_user := coalesce (self.fname, self.u_name);
declare exit handler for not found { signal ('22023', 'Internal error, no such user'); };
select sne_id into sneid from sn_entity where sne_name = for_user;
if (exists (select 1 from sn_related where (snr_from = sneid or snr_to = sneid)))
{
?>
<tr>
<th valign="top"><v:label value="--concat(coalesce(self.fname,''),'''s friends')" /></th>
<td>
<table cellpadding="0" cellspacing="0">
<?vsp
declare i int;
i := 0;
for select top 6 sne_name, U_FULL_NAME from
(
select top 6 sne_name, U_FULL_NAME from sn_related, sn_entity, SYS_USERS where snr_to = sne_id and snr_from = sneid and U_NAME = sne_name
union all
select top 6 sne_name, U_FULL_NAME from sn_related, sn_entity, SYS_USERS where snr_from = sne_id and snr_to = sneid and U_NAME = sne_name
) sub do
{
if (i >= 5)
goto next;
?>
<tr>
<td>
<a href="<?V wa_expand_url('/dataspace/'|| wa_identity_dstype(sne_name)||'/'|| sne_name ||'#this', self.login_pars)?>"><?V wa_utf8_to_wide (coalesce (U_FULL_NAME, sne_name)) ?></a>
</td>
</tr>
<?vsp
next:;
i := i + 1;
}
if (i > 5)
{
?>
<tr>
<td>
<v:url name="viewall" value="--sprintf('View All of %s''s friends ', coalesce(self.fname,'') )" format="%s" url="--sprintf('sn_connections.vspx?ufname=%U', self.fname)" xhtml_class="profile_tab"/>
</td>
</tr>
<?vsp
}
?>
</table>
</td>
</tr>
<?vsp
}
}
?>
</table>
</div>
<div id="p_content_1" class="tabContent" style="display: none;">
<table>
<tr>
<th><v:label value="ICQ Number:" enabled="--case when coalesce(self.arr[10],'') <> '' then 1 else 0 end" /></th>
<td><v:label value="--coalesce(self.arr[10],'')" /></td>
</tr>
<?vsp if (length (self.arr[11])) { ?>
<tr>
<th><v:label value="Skype ID:" /></th>
<td><v:url name="1skype1" value="--coalesce(self.arr[11],'')" url="--concat ('callto:', self.arr[11])" /></td>
</tr>
<?vsp } ?>
<tr>
<th><v:label value="AIM Name:" enabled="--case when coalesce(self.arr[12],'') <> '' then 1 else 0 end" /></th>
<td><v:label value="--coalesce(self.arr[12],'')" /></td>
</tr>
<tr>
<th><v:label value="Yahoo! ID:" enabled="--case when coalesce(self.arr[13],'') <> '' then 1 else 0 end" /></th>
<td><v:label value="--coalesce(self.arr[13],'')" /></td>
</tr>
<tr>
<th><v:label value="MSN Messenger:" enabled="--case when coalesce(self.arr[14],'') <> '' then 1 else 0 end" /></th>
<td><v:label value="--coalesce(self.arr[14],'')" /></td>
</tr>
</table>
</div>
<div id="p_content_2" class="tabContent adr" style="display: none;">
<span class="type" style="display: none;">home</span>
<table>
<tr>
<th><v:label value="Country:" enabled="--case when coalesce(self.arr[16][2],'') <> '' then 1 else 0 end" /></th>
<td><span class="country-name"><v:label value="--coalesce(self.arr[16][2],'')" /></span></td>
</tr>
<tr>
<th><v:label value="State/Province:" enabled="--case when coalesce(self.arr[16][1],'') <> '' then 1 else 0 end" /></th>
<td><span class="region"><v:label value="--coalesce(self.arr[16][1],'')" /></span></td>
</tr>
<tr>
<th><v:label value="City/Town:" enabled="--case when coalesce(self.arr[16][0],'') <> '' then 1 else 0 end" /></th>
<td><span class="locality"><v:label value="--coalesce(self.arr[16][0],'')" /></span></td>
</tr>
<tr>
<th><v:label value="Zip/Postal Code:" enabled="--case when coalesce(self.arr[15][2],'') <> '' then 1 else 0 end" /></th>
<td><span class="postal-code"><v:label value="--coalesce(self.arr[15][2],'')" /></span></td>
</tr>
<tr>
<th><v:label value="Address1:" enabled="--case when coalesce(self.arr[15][0],'') <> '' then 1 else 0 end" /></th>
<td><span class="street-address"><v:label value="--coalesce(self.arr[15][0],'')" /></span></td>
</tr>
<tr>
<th><v:label value="Address2:" enabled="--case when coalesce(self.arr[15][1],'') <> '' then 1 else 0 end" /></th>
<td><span class="extended-address"><v:label value="--coalesce(self.arr[15][1],'')" /></span></td>
</tr>
<tr>
<th><v:label value="Time-Zone:" enabled="--case when coalesce(self.arr[17],'') <> '' then 1 else 0 end" /></th>
<td><span class="tz"><v:label value="--coalesce(self.arr[17],'')" /></span></td>
</tr>
<?vsp if (self.arr[39] is not null) { ?>
<tr>
<th><v:label value="Location:" /></th>
<td>
<v:url name="wa_map"
value="--sprintf('latitude: %.6f, longitude: %.6f', coalesce(self.arr[39],0), coalesce(self.arr[40],0))"
format="%s"
url="--sprintf ('wa_maps.vspx?ufname=%U', self.fname)" />
</td>
</tr>
<?vsp } ?>
<tr>
<th><v:label value="Phone:" enabled="--case when coalesce(self.arr[18][0],'') <> '' then 1 else 0 end" /></th>
<td><span class="tel"><v:label value="--coalesce(self.arr[18][0],'')" /></span></td>
</tr>
<tr>
<th><v:label value="Mobile:" enabled="--case when coalesce(self.arr[18][1],'') <> '' then 1 else 0 end" /></th>
<td><span class="tel"><span class="type" style="display: none;">CELL</span><v:label value="--coalesce(self.arr[18][1],'')" /></span></td>
</tr>
</table>
</div>
<div id="p_content_3" class="tabContent adr" style="display: none;">
<span class="type" style="display: none;">WORK</span>
<table>
<tr>
<th><v:label value="Industry:" enabled="--case when coalesce(self.arr[19],'') <> '' then 1 else 0 end" /></th>
<td><v:label value="--coalesce(self.arr[19],'')" /></td>
</tr>
<tr>
<th><v:label value="Organization:" enabled="--case when coalesce(self.arr[20],'') <> '' then 1 else 0 end" /></th>
<td><span class="org"><v:label value="--coalesce(self.arr[20],'')" /></span></td>
</tr>
<tr>
<th><v:label value="Job Title:" enabled="--case when coalesce(self.arr[21],'') <> '' then 1 else 0 end" /></th>
<td><v:label value="--coalesce(self.arr[21],'')" /></td>
</tr>
<tr>
<th><v:label value="Country:" enabled="--case when coalesce(self.arr[23][2],'') <> '' then 1 else 0 end" /></th>
<td><span class="country-name"><v:label value="--coalesce(self.arr[23][2],'')" /></span></td>
</tr>
<tr>
<th><v:label value="State/Province:" enabled="--case when coalesce(self.arr[23][1],'') <> '' then 1 else 0 end" /></th>
<td><span class="region"><v:label value="--coalesce(self.arr[23][1],'')" /></span></td>
</tr>
<tr>
<th><v:label value="City/Town:" enabled="--case when coalesce(self.arr[23][0],'') <> '' then 1 else 0 end" /></th>
<td><span class="locality"><v:label value="--coalesce(self.arr[23][0],'')" /></span></td>
</tr>
<tr>
<th><v:label value="Zip/Postal Code:" enabled="--case when coalesce(self.arr[22][2],'') <> '' then 1 else 0 end" /></th>
<td><span class="postal-code"><v:label value="--coalesce(self.arr[22][2],'')" /></span></td>
</tr>
<tr>
<th><v:label value="Address1:" enabled="--case when coalesce(self.arr[22][0],'') <> '' then 1 else 0 end" /></th>
<td><span class="street-address"><v:label value="--coalesce(self.arr[22][0],'')" /></span></td>
</tr>
<tr>
<th><v:label value="Address2:" enabled="--case when coalesce(self.arr[22][1],'') <> '' then 1 else 0 end" /></th>
<td><span class="extended-address"><v:label value="--coalesce(self.arr[22][1],'')" /></span></td>
</tr>
<tr>
<th><v:label value="Time-Zone:" enabled="--case when coalesce(self.arr[24],'') <> '' then 1 else 0 end" /></th>
<td><v:label value="--coalesce(self.arr[24],'')" /></td>
</tr>
<tr>
<th><v:label value="Phone:" enabled="--case when coalesce(self.arr[25][0],'') <> '' then 1 else 0 end" /></th>
<td><span class="tel"><span class="type" style="display: none;">WORK</span><v:label value="--coalesce(self.arr[25][0],'')" /></span></td>
</tr>
<tr>
<th><v:label value="Mobile:" enabled="--case when coalesce(self.arr[25][1],'') <> '' then 1 else 0 end" /></th>
<td><span class="tel"><span class="type" style="display: none;">WORK</span><span class="type" style="display: none;">CELL</span><v:label value="--coalesce(self.arr[25][1],'')" /></span></td>
</tr>
<tr>
<th><v:label value="VAT Reg number (EU only) or Tax ID:" enabled="--case when coalesce(self.arr[26],'') <> '' then 1 else 0 end" /></th>
<td><v:label value="--coalesce(self.arr[26],'')" /></td>
</tr>
<tr>
<th><v:label value="Career / Organization Status:" enabled="--case when coalesce(self.arr[27],'') <> '' then 1 else 0 end" /></th>
<td><v:label value="--coalesce(self.arr[27],'')" /></td>
</tr>
<tr>
<th><v:label value="No. of Employees:" enabled="--case when coalesce(self.arr[28],'') <> '' then 1 else 0 end" /></th>
<td><v:label value="--coalesce(self.arr[28],'')" /></td>
</tr>
<tr>
<th><v:label value="Are you a technology vendor:" enabled="--case when coalesce(self.arr[29],'') <> '' then 1 else 0 end" /></th>
<td><v:label value="--coalesce(self.arr[29],'')" /></td>
</tr>
<tr>
<th><v:label value="If so, what technology service do you provide:" enabled="--case when coalesce(self.arr[30],'') <> '' then 1 else 0 end" /></th>
<td><v:label value="--coalesce(self.arr[30],'')" /></td>
</tr>
<tr>
<th><v:label value="Other Technology service:" enabled="--case when coalesce(self.arr[31],'') <> '' then 1 else 0 end" /></th>
<td><v:label value="--coalesce(self.arr[31],'')" /></td>
</tr>
<tr>
<th><v:label value="Importance of OpenLink Network for you:" enabled="--case when coalesce(self.arr[32],'') <> '' then 1 else 0 end" /></th>
<td><v:label value="--coalesce(self.arr[32],'')" /></td>
</tr>
<tr>
<th><v:label value="Resume:" enabled="--case when coalesce(self.arr[34],'') <> '' then 1 else 0 end" /></th>
<td><pre><v:label value="--coalesce(self.arr[34],'')" render-only="1" /></pre></td>
</tr>
</table>
</div>
<div id="p_content_4" class="tabContent" style="display: none;">
<![CDATA[
<script type="text/javascript" src="rdfm.js"></script>
]]>
<script type="text/javascript">
<![CDATA[
var graphIRI = "<?V WA_LINK (1, WA_USER_DATASPACE(self.fname)) ?>";
var fList = ["rdfmini","dimmer","grid","graphsvg","map","timeline","tagcloud","anchor","dock"];
ODSInitArray.push ( function () { OAT.Loader.load(fList, RDFMInit); } );
]]>
</script>
<div id="dock_content">
</div>
</div>
</div>
</div>
<?vsp } ?>
</v:template>
</xsl:template>
<xsl:template match="vm:condition">
<xsl:choose>
<xsl:when test="@test='owner'">
<xsl:variable name="condition" select="'self.isowner'"/>
</xsl:when>
<xsl:when test="@test='not-owner'">
<xsl:variable name="condition" select="'not self.isowner'"/>
</xsl:when>
<xsl:when test="@test='login'">
<xsl:variable name="condition" select="'length (self.sid)'"/>
</xsl:when>
<xsl:otherwise>
<xsl:message terminate="yes">Invalid condition</xsl:message>
</xsl:otherwise>
</xsl:choose>
<xsl:processing-instruction name="vsp"> if (<xsl:value-of select="$condition"/>) { </xsl:processing-instruction>
<xsl:apply-templates />
<xsl:processing-instruction name="vsp"> } </xsl:processing-instruction>
</xsl:template>
<xsl:template match="vm:invite-link">
<v:url name="inv_link" url="sn_make_inv.vspx">
<xsl:attribute name="value">'<xsl:value-of select="@title"/>'</xsl:attribute>
</v:url>
</xsl:template>
<xsl:template match="vm:contacts-link">
<v:url name="inv_link" url="sn_connections.vspx?l=1">
<xsl:attribute name="value">'<xsl:value-of select="@title"/>'</xsl:attribute>
</v:url>
</xsl:template>
<xsl:template match="vm:addressbook-link">
<?vsp
for (select top 1 WAI_ID from DB.DBA.WA_INSTANCE, DB.DBA.WA_MEMBER where WAI_TYPE_NAME = 'AddressBook' and WAI_NAME = WAM_INST and WAM_MEMBER_TYPE = 1 and WAM_USER = self.u_id) do
http (sprintf ('<li><img src="images/icons/ods_ab_16.png" alt="Your AddressBook" /><a href="%s?sid=%s&realm=%s"> %V</a></li>', SIOC..addressbook_iri (AB.WA.domain_name (WAI_ID)), self.sid, self.realm, 'Your AddressBook'));
?>
</xsl:template>
<xsl:template match="v:template[@condition]">
<xsl:processing-instruction name="vsp"> if (<xsl:value-of select="@condition"/>) { </xsl:processing-instruction>
<xsl:apply-templates />
<xsl:processing-instruction name="vsp"> } </xsl:processing-instruction>
</xsl:template>
<xsl:template match="v:label[@enabled][ancestor::table[@id='user_details']]">
<xsl:processing-instruction name="vsp"> if (<xsl:value-of select="substring-after(@enabled, '--')"/>) { </xsl:processing-instruction>
<v:label name="{@name}" value="{@value}" render-only="1">
<xsl:if test="@format">
<xsl:copy-of select="@format"/>
</xsl:if>
</v:label>
<xsl:processing-instruction name="vsp"> } </xsl:processing-instruction>
</xsl:template>
<xsl:template match="v:template[@enabled][ancestor::table[@id='user_details']]">
<xsl:processing-instruction name="vsp"> if (<xsl:value-of select="substring-after(@enabled, '--')"/>) { </xsl:processing-instruction>
<xsl:apply-templates />
<xsl:processing-instruction name="vsp"> } </xsl:processing-instruction>
</xsl:template>
<xsl:template match="v:label[ not(@enabled) and not(@render-only) ]">
<v:label name="{@name}" value="{@value}" render-only="1">
<xsl:if test="@format">
<xsl:copy-of select="@format"/>
</xsl:if>
</v:label>
</xsl:template>
<xsl:template match="vm:user-friends">
<div class="contacts_ctr">
<h2>Contacts</h2>
<ul>
<?vsp
{
declare sneid, for_user any;
sneid := self.sne_id;
{
declare i int;
i := 0;
for select top 100 sne_name, U_FULL_NAME, WAUI_PHOTO_URL, WAUI_HCOUNTRY, WAUI_HSTATE, WAUI_HCITY from
(
select sne_name, U_FULL_NAME, WAUI_PHOTO_URL, WAUI_HCOUNTRY, WAUI_HSTATE, WAUI_HCITY
from sn_related, sn_entity, SYS_USERS, WA_USER_INFO where snr_from = sneid and snr_to = sne_id and U_NAME = sne_name and U_ID = WAUI_U_ID
union all
select sne_name, U_FULL_NAME, WAUI_PHOTO_URL, WAUI_HCOUNTRY, WAUI_HSTATE, WAUI_HCITY
from sn_related, sn_entity, SYS_USERS, WA_USER_INFO where snr_to = sneid and snr_from = sne_id and U_NAME = sne_name and U_ID = WAUI_U_ID option (order)
) sub do
{
declare addr any;
addr := '';
if (length (WAUI_HCITY))
addr := addr || WAUI_HCITY;
if (length (WAUI_HSTATE))
addr := addr || ', ' || WAUI_HSTATE;
if (length (WAUI_HCOUNTRY))
addr := addr || '(' || WAUI_HCOUNTRY || ')';
if (not length (WAUI_PHOTO_URL))
WAUI_PHOTO_URL := 'images/icons/user_32.png';
?>
<li>
<a href="<?V wa_expand_url('/dataspace/'||wa_identity_dstype(sne_name)||'/'|| sne_name ||'#this', self.login_pars)?>"><?vsp if (length (WAUI_PHOTO_URL)) { ?>
<img src="<?V WAUI_PHOTO_URL ?>" border="0" alt="Photo" width="32" hspace="3"/>
<?vsp } ?><?V wa_utf8_to_wide (coalesce (U_FULL_NAME, sne_name)) ?>
</a>
<span class="home_addr"><?V wa_utf8_to_wide (addr) ?></span>
</li>
<?vsp
i := i + 1;
}
if (i = 0)
{
if (self.isowner)
{
?>
You have no connections yet. <br />
<v:url name="search_users_fr" value="Search for Contacts" url="search.vspx?page=2&l=1" render-only="1"/>
<?vsp
}
else
{
?>
<li>This user has no contacts.</li>
<?vsp
}
}
}
}
?>
</ul>
</div>
</xsl:template>
<xsl:template match="vm:user-home-map">
<v:template type="simple" name="user_home_map" enabled="--case when isstring (self.maps_key) and length (self.maps_key) > 0 then 1 else 0 end">
<vm:oatmap-control
sql="sprintf ('\n' ||
'select _LAT,_LNG,_KEY_VAL,EXCERPT \n' ||
'from ( \n' ||
' select \n' ||
' case when WAUI_LATLNG_HBDEF=0 THEN WAUI_LAT ELSE WAUI_BLAT end as _LAT, \n' ||
' case when WAUI_LATLNG_HBDEF=0 THEN WAUI_LNG ELSE WAUI_BLNG end as _LNG, \n' ||
' WAUI_U_ID as _KEY_VAL, \n' ||
' WA_SEARCH_USER_GET_EXCERPT_HTML (\n' ||
' %d, \n' ||
' vector (), \n' ||
' WAUI_U_ID, \n' ||
' '''', \n' ||
' WAUI_FULL_NAME, \n' ||
' U_NAME, \n' ||
' WAUI_PHOTO_URL, \n' ||
' U_E_MAIL) as EXCERPT \n' ||
' from DB.DBA.WA_USER_INFO, DB.DBA.SYS_USERS \n' ||
' where \n' ||
' WAUI_LAT is not null and WAUI_LNG is not null and WAUI_U_ID = U_ID ' ||
' and (exists (select 1 from (\n' ||
' select 1 as x from DB.DBA.sn_related, DB.DBA.sn_entity sne_from, DB.DBA.sn_entity sne_to \n' ||
' where \n' ||
' snr_to = sne_to.sne_id and snr_from = sne_from.sne_id and \n' ||
' sne_from.sne_name = U_NAME and sne_to.sne_name = ''%S'' \n' ||
' union all \n' ||
' select 1 as x from DB.DBA.sn_related, DB.DBA.sn_entity sne_from, DB.DBA.sn_entity sne_to \n' ||
' where \n' ||
' snr_to = sne_to.sne_id and snr_from = sne_from.sne_id and \n' ||
' sne_to.sne_name = U_NAME and sne_from.sne_name = ''%S'' \n' ||
' and sne_to.sne_name <> sne_from.sne_name\n' ||
' union all \n' ||
' select 1 as x from WA_USER_TAG where contains (\n' ||
' WAUTG_TAGS, \n' ||
' sprintf (''[__lang "x-any" __enc "UTF-8"] (%S) AND ("^UID%%d") AND ("^TID%%d")'', \n' ||
' http_nobody_uid (), U_ID) \n' ||
' ) \n' ||
' ) x) or WAUI_U_ID = %d)\n' ||
' ) _tmp_tbl\n' ||
' where _LAT is not null and _LNG is not null \n',
coalesce (self.u_id, self.ufid), self.fname, self.fname, WA_GET_USER_TAGS_OR_QRY (self.ufid), self.ufid)"
baloon-inx="4"
lat-inx="1"
lng-inx="2"
key-name-inx="3"
key-val="self.ufid"
div_id="user_map"
zoom="0"
base_url="HTTP_REQUESTED_URL ()" />
</v:template>
</xsl:template>
<xsl:template match="vm:header-wrapper">
<?vsp
wa_template_header_render (self);
?>
</xsl:template>
<xsl:template match="vm:body-wrapper">
<?vsp
wa_template_body_render (self);
?>
<xsl:apply-templates select="vm:home-init|vm:login"/>
</xsl:template>
</xsl:stylesheet>
|