Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-xmlrpc
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-xmlrpc
Commits
8f7cdb4c
Commit
8f7cdb4c
authored
Aug 13, 2006
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- one-time-password now working - more or less
parent
2cdef24c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
144 additions
and
0 deletions
+144
-0
select-test-3.adp
www/select-test-3.adp
+58
-0
select-test-3.tcl
www/select-test-3.tcl
+86
-0
No files found.
www/select-test-3.adp
0 → 100644
View file @
8f7cdb4c
<master>
<property name="title">@page_title@</property>
<property name="main_navbar_label">admin</property>
<h1>@page_title@</h1>
<if "ok" eq @status@>
<form action="select-test-4" method=POST>
<%= [export_form_vars url token timestamp user_id object_type] %>
<table cellpadding=2 cellspacing=0 border=0>
<tr class=roweven>
<td valign=top>URL:</td>
<td>@url@</td>
</tr>
<tr class=rowodd>
<td valign=top>User ID:</td>
<td>@user_id@</td>
</tr>
<tr class=roweven>
<td valign=top>Timestamp:</td>
<td>@timestamp@</td>
</tr>
<tr class=rowodd>
<td valign=top>Token:</td>
<td>@token@</td>
</tr>
<tr class=roweven>
<td valign=top>Object Type:</td>
<td><input type=text name=object_type value="@object_type@" size=20 disabled></td>
</tr>
<tr class=rowodd>
<td valign=top>Object ID:</td>
<td>
<select name=object_id>
@object_id_options;noquote@
</select>
</td>
</tr>
<tr>
<td></td>
<td><input type=submit></td>
</tr>
</table>
</form>
</if>
<else>
<ul>
<li>Error: @error@
<li>Message:<br><pre>@error_msg@</pre>
</ul>
</else>
www/select-test-3.tcl
0 → 100644
View file @
8f7cdb4c
ad_page_contract
{
Autenticate the user and issue an auth-token
that needs to be specified for every xmlrpc-request
@author Frank Bergmann
(
frank.bergmann@project-open.com
)
}
{
user_id
timestamp
token
object_type
column_name
column_operator
column_value
url
{
method
"sqlapi.select"
}
}
# ------------------------------------------------------------
# Security & Defaults
# ------------------------------------------------------------
set
return_url
"
[
ad_conn url
]
?
[
ad_conn query
]
"
set
page_title
"Select-Test-2"
set
context_bar
[
im_context_bar
$page
_title
]
set
current_user_id
[
im_xmlrpc_get_user_id
]
# ------------------------------------------------------------
#
# ------------------------------------------------------------
set
error
""
set
result
""
set
info
""
set
query_results
[
list
]
# Get the list of all objects of that type
if
{[
catch
{
set authinfo
[
list
\
[
list
-string token
]
\
[
list
-int
$user
_id
]
\
[
list
-string
$timestamp
]
\
[
list
-string
$token
]
\
]
set where_condition1
[
list
\
[
list
-string
$column
_name
]
\
[
list
-string
$column
_operator
]
\
[
list
-string
$column
_value
]
\
]
set query_results
[
xmlrpc::remote_call
\
$url
\
"sqlapi.select"
\
-array
$authinfo
\
-string
$object
_type
\
-array
[
list
[
list
-array
$where
_condition1
]
[
list
-array
$where
_condition1
]]
\
]
}
err_msg
]}
{
append error
$err
_msg
}
set
status
[
lindex
$query
_results 0
]
set
object_id_options
[
list
]
if
{
"ok"
!=
$status
}
{
set error
"
$status
"
set error_msg
[
lindex
$query
_results 1
]
}
else
{
set object_ids
[
lindex
$query
_results 1
]
foreach id
$object
_ids
{
set object_id
[
lindex
$id
0
]
set object_name
[
lindex
$id
1
]
append object_id_options
"<option value=
\"
$object
_id
\"
>
$object
_name</option>
\n
"
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment