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
|
<?xml version="1.0"?>
<!--
-
- $Id: bridge.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
-
- This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- project.
-
- Copyright (C) 1998-2006 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
-
-
-->
<html>
<head>
<link rel="stylesheet" type="text/css" href="../demo.css"/>
</head>
<body>
<v:page name="pageset1" xmlns:v="http://www.openlinksw.com/vspx/">
<v:variable name="blogid" type="varchar" default="'home'" persist="1"/>
<!-- LOGIN -->
<v:login name="login1" realm="blog" mode="url"
user-password-check="BLOG..blog_user_password_check">
<v:template type="if-no-login" redirect="login.vspx" />
<v:template type="if-login" />
</v:login>
<!-- END LOGIN -->
<div align="center">
<div align="left" style="margin-left: 100px;"><H2>Weblog bridge setup</H2></div>
<p style="color: red;"><v:error-summary /></p>
<v:form name="form1" type="simple" action="bridge.vspx" >
<table border="0" cellpadding="0" cellspacing="0" width="80%">
<tr>
<td valign="top">
<!-- DATASET -->
<v:data-set name="ds" sql="select bb_blog_id, bb_endpoint, bb_type, bb_user, bb_pwd, bb_self_id
from blog_bridge where bb_self_id = :thisblogid" nrows="10" scrollable="1" cursor-type="keyset" edit="1" width="80">
<v:param name="thisblogid" value="--self.blogid" />
<v:template name="template1" type="simple" name-to-remove="table" set-to-remove="bottom">
<table width="400" cellspacing="0" cellpadding="0" class="tableresult">
<tr>
<th align="center">
<b>Action</b>
</th>
<th align="center">
<b>
<v:label name="label1" value="'Endpoint'" format="%s" width="80"/>
</b>
</th>
<th align="center">
<b>
<v:label name="label2" value="'BlogID'" format="%s" width="80"/>
</b>
</th>
<th align="center">
<b>
<v:label name="label3" value="'Type'" format="%s" width="80"/>
</b>
</th>
<th align="center">
<b>
<v:label name="label4" value="'User'" format="%s" width="80"/>
</b>
</th>
<th align="center">
<b>
<v:label name="label5" value="'Password'" format="%s" width="80"/>
</b>
</th>
</tr>
</table>
</v:template>
<v:template name="template2" type="repeat" name-to-remove="" set-to-remove="">
<v:template name="template7" type="if-not-exists" name-to-remove="table" set-to-remove="both">
<table width="400" border="2" cellspacing="0" cellpadding="0">
<tr>
<td align="center" colspan="5">
<b>No rows selected</b>
</td>
</tr>
</table>
</v:template>
<v:template name="template5" type="edit" name-to-remove="" set-to-remove="">
<v:form name="upf" type="update" table="blog_bridge" if-not-exists="insert">
<v:key column="bb_endpoint" value="--self.ds.ds_current_row.te_rowset[1]" default="null"/>
<v:key column="bb_blog_id" value="--self.ds.ds_current_row.te_rowset[0]" default="null"/>
<v:key column="bb_self_id" value="--self.ds.ds_current_row.te_rowset[5]" default="null"/>
<v:template name="template6" type="simple" name-to-remove="table" set-to-remove="both">
<table width="400" border="1" cellspacing="2" cellpadding="0">
<tr>
<td nowrap="nowrap">
<v:button name="upd_button" action="submit" value="Update"/>
<input type="submit" name="ds_cancel" value="Cancel"/>
</td>
<td nowrap="nowrap">
<v:text name="b_endpoint1" column="bb_endpoint" xhtml_size="50%"/>
</td>
<td>
<v:text name="b_blogid1" column="bb_blog_id"/>
</td>
<td>
<v:data-list name="b_type1"
column="bb_type" table="blog_types" key-column="bt_name" value-column="bt_name"/>
</td>
<td>
<v:text name="b_user1" column="bb_user"/>
</td>
<td>
<v:text name="b_pwd1" column="bb_pwd" type="password"/>
<v:text name="b_self1" column="bb_self_id" type="hidden"/>
</td>
</tr>
</table>
</v:template>
<v:validator name="vv1" test="sql" message="the specified blog does not exists (update)">
;
</v:validator>
</v:form>
</v:template>
<v:template name="template8" type="add" name-to-remove="" set-to-remove="">
<v:form name="add" type="update" table="blog_bridge" if-not-exists="insert">
<v:key column="bb_endpoint" value="--''" default="null"/>
<v:key column="bb_blog_id" value="--''" default="null"/>
<v:key column="bb_self_id" value="--self.blogid" default="null"/>
<v:template name="template9" type="simple" name-to-remove="table" set-to-remove="both">
<table width="400" border="1" cellspacing="2" cellpadding="0">
<tr>
<td nowrap="nowrap">
<v:button name="add_button" action="submit" value="Add"/>
</td>
<td nowrap="nowrap">
<v:text name="b_endpoint" column="bb_endpoint" xhtml_size="50%"/>
</td>
<td nowrap="nowrap">
<v:text name="b_blogid" column="bb_blog_id"/>
<v:browse-button name="get_blogs" value="Fetch" selector="get_blogs.vspx"
child-window-options="scrollbars=yes, menubar=no, height=100, width=600">
<v:field name="b_endpoint" />
<v:field name="b_user" />
<v:field name="b_pwd" />
<v:field name="b_blogid" />
</v:browse-button>
</td>
<td>
<v:data-list name="b_type"
column="bb_type" table="blog_types" key-column="bt_name" value-column="bt_name"/>
</td>
<td>
<v:text name="b_user" column="bb_user"/>
</td>
<td>
<v:text name="b_pwd" column="bb_pwd" type="password"/>
<v:text name="b_self" column="bb_self_id" type="hidden" value="--self.blogid" />
</td>
</tr>
</table>
</v:template>
<v:validator name="vv2" test="sql" message="the specified blog does not exists (insert)">
if (control.vc_focus)
{
;
}
</v:validator>
</v:form>
</v:template>
<v:template name="template4" type="browse" name-to-remove="table" set-to-remove="both">
<table width="400" border="1" cellspacing="2" cellpadding="0">
<tr>
<td nowrap="1">
<v:button name="ds_edit" action="simple" value="Edit"/>
<v:button name="ds_delete" action="simple" value="Delete">
<v:on-post>
<v:script><![CDATA[
{
delete from blog_bridge where
bb_endpoint = self.ds.ds_current_row.te_rowset[1] and
bb_blog_id = self.ds.ds_current_row.te_rowset[0] and
bb_self_id = self.ds.ds_current_row.te_rowset[5];
self.ds.vc_data_bind(e);
}
]]></v:script>
</v:on-post>
</v:button>
</td>
<td align="left" nowrap="1">
<v:label name="label51" value="--(control.vc_parent as vspx_row_template).te_rowset[1]" format="%s" width="80"/>
</td>
<td align="left" nowrap="1">
<v:label name="label61" value="--(control.vc_parent as vspx_row_template).te_rowset[0]" format="%s" width="80"/>
</td>
<td align="left" nowrap="1">
<v:label name="label71" value="--(control.vc_parent as vspx_row_template).te_rowset[2]" format="%s" width="80"/>
</td>
<td align="left" nowrap="1">
<v:label name="label81" value="--(control.vc_parent as vspx_row_template).te_rowset[3]" format="%s" width="80"/>
</td>
<td align="left" nowrap="1">
<v:label name="label91" value="--'*****'" format="%s" width="80"/>
</td>
</tr>
</table>
</v:template>
</v:template>
<v:template name="template3" type="simple" name-to-remove="table" set-to-remove="top">
<table width="400" border="1" cellspacing="2" cellpadding="0">
<tr>
<td>
</td>
<td align="right">
<v:button name="ds_prev" action="simple" value="<<" xhtml:size="10pt"/>
</td>
<td align="left">
<v:button name="ds_next" action="simple" value=">>" xhtml:size="10pt"/>
</td>
<td align="right">
</td>
</tr>
</table>
</v:template>
</v:data-set>
<!-- END DATASET -->
</td>
</tr>
</table>
</v:form>
<v:url name="work" url="blog.vspx" value="Home" />
</div>
</v:page>
</body>
</html>
|