diff options
author | vdigital <vdigital@piwigo.org> | 2006-12-16 09:21:40 +0000 |
---|---|---|
committer | vdigital <vdigital@piwigo.org> | 2006-12-16 09:21:40 +0000 |
commit | 53d1b22c76f4e16b1e16cdca9dd785a0b2f1e859 (patch) | |
tree | 65254958dada9b0d32a6b1f2153006e9c88d860c | |
parent | eef3bf079dc63c34739092853a3c0a1b424bb899 (diff) |
Web Service Admin part 2
git-svn-id: http://piwigo.org/svn/trunk@1661 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/ws_checker.php | 459 | ||||
-rw-r--r-- | language/en_UK.iso-8859-1/help/web_service.html | 56 | ||||
-rw-r--r-- | language/fr_FR.iso-8859-1/help/web_service.html | 57 | ||||
-rw-r--r-- | template/yoga/admin/ws_checker.tpl | 298 |
4 files changed, 870 insertions, 0 deletions
diff --git a/admin/ws_checker.php b/admin/ws_checker.php new file mode 100644 index 000000000..a95f4c8b8 --- /dev/null +++ b/admin/ws_checker.php @@ -0,0 +1,459 @@ +<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | branch : BSF (Best So Far)
+// | file : $RCSfile$
+// | last update : $Date: 2006-12-15 23:16:37 +0200 (ven., 15 dec. 2006) $
+// | last modifier : $Author: vdigital $
+// | revision : $Revision: 1658 $
+// +-----------------------------------------------------------------------+
+// | This program 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 |
+// | |
+// | 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// +-----------------------------------------------------------------------+
+// | functions |
+// +-----------------------------------------------------------------------+
+
+// Function to migrate be useful for ws
+function official_req()
+{
+return array(
+ 'random' /* Random order */
+ , 'list' /* list on MBt & z0rglub request */
+ , 'maxviewed' /* hit > 0 and hit desc order */
+ , 'recent' /* recent = Date_available desc order */
+ , 'highrated' /* avg_rate > 0 and desc order */
+ , 'oldest' /* Date_available asc order */
+ , 'lessviewed' /* hit asc order */
+ , 'lowrated' /* avg_rate asc order */
+ , 'undescribed' /* description missing */
+ , 'unnamed' /* new name missing */
+ , 'portraits' /* width < height (portrait oriented) */
+ , 'landscapes' /* width > height (landscape oriented) */
+ , 'squares' /* width ~ height (square form) */
+);
+}
+
+function expand_id_list($ids)
+{
+ $tid = array();
+ foreach ( $ids as $id )
+ {
+ if ( is_numeric($id) )
+ {
+ $tid[] = (int) $id;
+ }
+ else
+ {
+ $range = explode( '-', $id );
+ if ( is_numeric($range[0]) and is_numeric($range[1]) )
+ {
+ $from = min($range[0],$range[1]);
+ $to = max($range[0],$range[1]);
+ for ($i = $from; $i <= $to; $i++)
+ {
+ $tid[] = (int) $i;
+ }
+ }
+ }
+ }
+ $result = array_unique ($tid); // remove duplicates...
+ sort ($result);
+ return $result;
+}
+
+function check_target($list)
+{
+ if ( $list !== '' )
+ {
+ $type = explode('/',$list); // Find type list
+ if ( !in_array($type[0],array('list','cat','tag') ) )
+ {
+ $type[0] = 'list'; // Assume an id list
+ }
+ $ids = explode( ',',$type[1] );
+ $list = $type[0] . '/';
+
+ // 1,2,21,3,22,4,5,9-12,6,11,12,13,2,4,6,
+
+ $result = expand_id_list( $ids );
+
+ // 1,2,3,4,5,6,9,10,11,12,13,21,22,
+ // I would like
+ // 1-6,9-13,21-22
+ $serial[] = $result[0]; // To be shifted
+ foreach ($result as $k => $id)
+ {
+ $next_less_1 = (isset($result[$k + 1]))? $result[$k + 1] - 1:-1;
+ if ( $id == $next_less_1 and end($serial)=='-' )
+ { // nothing to do
+ }
+ elseif ( $id == $next_less_1 )
+ {
+ $serial[]=$id;
+ $serial[]='-';
+ }
+ else
+ {
+ $serial[]=$id; // end serie or non serie
+ }
+ }
+ $null = array_shift($serial); // remove first value
+ $list .= array_shift($serial); // add the real first one
+ $separ = ',';
+ foreach ($serial as $id)
+ {
+ $list .= ($id=='-') ? '' : $separ . $id;
+ $separ = ($id=='-') ? '-':','; // add comma except if hyphen
+ }
+ }
+ return $list;
+}
+
+// Next evolution...
+// Out of parameter WS management
+// The remainer objective is to check
+// - Does Web Service working properly?
+// - Does any access return something really?
+// Give a way to check to the webmaster...
+// These questions are one of module name explainations (checker).
+
+if((!defined("PHPWG_ROOT_PATH")) or (!$conf['allow_web_services']))
+{
+ die('Hacking attempt!');
+}
+include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
+
+// +-----------------------------------------------------------------------+
+// | Check Access and exit when user status is not ok |
+// +-----------------------------------------------------------------------+
+check_status(ACCESS_ADMINISTRATOR);
+
+
+// FIXME would be in migration process but could stay here
+// Config parameters
+if (!isset($conf['ws_status']))
+{
+ $conf['ws_status'] = false;
+
+ $query = '
+ INSERT INTO '.CONFIG_TABLE.'
+ (param,value,comment)
+ VALUES
+ (\'ws_status\', \'false\', \'Web Service status\' )
+ ;';
+ pwg_query($query);
+}
+
+// accepted queries
+$req_type_list = official_req();
+
+
+//--------------------------------------------------------- update informations
+
+// Is status temporary changed?
+if (isset($_POST['wss_submit']))
+{
+ $ws_status = get_boolean( $_POST['ws_status'] ); // Requested status
+ $ws_update = $lang['ws_success_upd']; // Normal update
+ if ($conf['allow_web_services'] == false and $ws_status == true )
+ { /* Set true is disallowed */
+ $ws_status = false;
+ $ws_update = $lang['ws_disallowed'];
+ }
+ if ( $ws_status !== true and $ws_status !== false )
+ { /* Avoiding SQL injection by no change */
+ $ws_status = $conf['ws_status'];
+ }
+ if ($conf['ws_status'] == $ws_status)
+ {
+ $ws_update = $lang['ws_disallowed'];
+ }
+ else
+ {
+ $query = '
+UPDATE '.CONFIG_TABLE.' SET
+ value = \''.boolean_to_string($ws_status).'\'
+WHERE param = \'ws_status\'
+ AND value <> \''.boolean_to_string($ws_status).'\'
+;';
+ pwg_query($query);
+ $conf['ws_status'] = $ws_status;
+ }
+ $template->assign_block_vars(
+ 'update_result',
+ array(
+ 'UPD_ELEMENT'=> $lang['ws_set_status'].': '.$ws_update,
+ )
+ );
+}
+
+// Next, is a new access required?
+
+if (isset($_POST['wsa_submit']))
+{
+// Check $_post
+$add_partner = htmlspecialchars( $_POST['add_partner'], ENT_QUOTES);
+$add_access = check_target( $_POST['add_access']) ;
+$add_start = ( is_numeric($_POST['add_start']) ) ? $_POST['add_start']:0;
+$add_end = ( is_numeric($_POST['add_end']) ) ? $_POST['add_end']:0;
+$add_request = ( ctype_alpha($_POST['add_request']) ) ?
+ $_POST['add_request']:'';
+$add_high = ( $_POST['add_high'] == 'true' ) ? 'true':'false';
+$add_normal = ( $_POST['add_normal'] == 'true' ) ? 'true':'false';
+$add_limit = ( is_numeric($_POST['add_limit']) ) ? $_POST['add_limit']:1;
+$add_comment = htmlspecialchars( $_POST['add_comment'], ENT_QUOTES);
+if ( strlen($add_partner) < 8 )
+{
+}
+ $query = '
+INSERT INTO '.WEB_SERVICES_ACCESS_TABLE.'
+( `name` , `access` , `start` , `end` , `request` ,
+ `high` , `normal` , `limit` , `comment` )
+VALUES (' . "
+ '$add_partner', '$add_access',
+ ADDDATE( NOW(), INTERVAL $add_start DAY),
+ ADDDATE( NOW(), INTERVAL $add_end DAY),
+ '$add_request', '$add_high', '$add_normal', '$add_limit', '$add_comment' );";
+
+ pwg_query($query);
+
+ $template->assign_block_vars(
+ 'update_result',
+ array(
+ 'UPD_ELEMENT'=> $lang['ws_adding_legend'].$lang['ws_success_upd'],
+ )
+ );
+}
+
+// Next, Update selected access
+if (isset($_POST['wsu_submit']))
+{
+ $upd_end = ( is_numeric($_POST['upd_end']) ) ? $_POST['upd_end']:0;
+ $settxt = ' end = ADDDATE(NOW(), INTERVAL '. $upd_end .' DAY)';
+
+ if ((isset($_POST['selection'])) and (trim($settxt) != ''))
+ {
+ $uid = (int) $_POST['selection'];
+ $query = '
+ UPDATE '.WEB_SERVICES_ACCESS_TABLE.'
+ SET '.$settxt.'
+ WHERE id = '.$uid.'; ';
+ pwg_query($query);
+ $template->assign_block_vars(
+ 'update_result',
+ array(
+ 'UPD_ELEMENT'=> $lang['ws_update_legend'].$lang['ws_success_upd'],
+ )
+ );
+ } else {
+ $template->assign_block_vars(
+ 'update_result',
+ array(
+ 'UPD_ELEMENT'=> $lang['ws_update_legend'].$lang['ws_failed_upd'],
+ )
+ );
+ }
+}
+// Next, Delete selected access
+
+if (isset($_POST['wsX_submit']))
+{
+ if ((isset($_POST['delete_confirmation']))
+ and (isset($_POST['selection'])))
+ {
+ $uid = (int) $_POST['selection'];
+ $query = 'DELETE FROM '.WEB_SERVICES_ACCESS_TABLE.'
+ WHERE id = '.$uid.'; ';
+ pwg_query($query);
+ $template->assign_block_vars(
+ 'update_result',
+ array(
+ 'UPD_ELEMENT'=> $lang['ws_delete_legend'].$lang['ws_success_upd'],
+ )
+ );
+ } else {
+ $template->assign_block_vars(
+ 'update_result',
+ array(
+ 'UPD_ELEMENT'=> $lang['Not selected / Not confirmed']
+ .$lang['ws_failed_upd'],
+ )
+ );
+ }
+}
+
+
+$ws_status = $conf['ws_status'];
+$template->assign_vars(
+ array(
+ 'L_CURRENT_STATUS' => ( $ws_status == true ) ?
+ $lang['ws_enable']:$lang['ws_disable'],
+ 'STATUS_YES' => ( $ws_status == true ) ? '':'checked',
+ 'STATUS_NO' => ( $ws_status == true ) ? 'checked':'',
+ 'DEFLT_HIGH_YES' => '',
+ 'DEFLT_HIGH_NO' => 'checked',
+ 'DEFLT_NORMAL_YES' => '',
+ 'DEFLT_NORMAL_NO' => 'checked',
+ 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=web_service',
+ )
+ );
+
+// Build where
+$where = '';
+$order = ' ORDER BY `id` DESC' ;
+
+$query = '
+SELECT *
+ FROM '.WEB_SERVICES_ACCESS_TABLE.'
+WHERE 1=1 '
+.$where.
+' '
+.$order.
+';';
+$result = pwg_query($query);
+$acc_list = mysql_num_rows($result);
+$result = pwg_query($query);
+// +-----------------------------------------------------------------------+
+// | template init |
+// +-----------------------------------------------------------------------+
+
+$template->set_filenames(
+ array(
+ 'ws_checker' => 'admin/ws_checker.tpl'
+ )
+ );
+
+$checked = 'checked="checked"';
+$selected = 'selected="selected"';
+$num=0;
+if ( $acc_list > 0 )
+{
+ $template->assign_block_vars(
+ 'acc_list', array() );
+}
+
+// Access List
+while ($row = mysql_fetch_array($result))
+{
+ $num++;
+ $template->assign_block_vars(
+ 'acc_list.access',
+ array(
+ 'CLASS' => ($num % 2 == 1) ? 'row1' : 'row2',
+ 'ID' => $row['id'],
+ 'NAME' =>
+ (is_adviser()) ? '*********' : $row['name'],
+ 'ACCESS' => $row['access'],
+ 'START' => $row['start'],
+ 'END' => $row['end'],
+ 'FORCE' => $row['request'],
+ 'HIGH' => $row['high'],
+ 'NORMAL' => $row['normal'],
+ 'LIMIT' => $row['limit'],
+ 'COMMENT' => $row['comment'],
+ 'SELECTED' => '',
+ )
+ );
+}
+
+$template->assign_block_vars(
+ 'add_request',
+ array(
+ 'VALUE'=> '',
+ 'CONTENT' => '',
+ 'SELECTED' => $selected,
+ )
+);
+foreach ($req_type_list as $value) {
+
+ $template->assign_block_vars(
+ 'add_request',
+ array(
+ 'VALUE'=> $value,
+ 'CONTENT' => $lang['ws_'.$value],
+ 'SELECTED' => '',
+ )
+ );
+}
+
+$columns = array (
+ 'ID' => 'id',
+ 'ws_KeyName' => 'name',
+ 'ws_Access' => 'ws_access',
+ 'ws_Start' => 'ws_start',
+ 'ws_End' => 'ws_end',
+ 'ws_Request' => 'ws_request',
+ 'ws_High' => 'ws_high',
+ 'ws_Normal' => 'ws_normal',
+ 'ws_Limit' => 'ws_limit',
+ 'ws_Comment' => 'ws_comment',
+);
+
+foreach ($conf['ws_allowed_limit'] as $value) {
+ $template->assign_block_vars(
+ 'add_limit',
+ array(
+ 'VALUE'=> $value,
+ 'CONTENT' => $value,
+ 'SELECTED' => ($conf['ws_allowed_limit'][0] == $value) ? $selected:'',
+ )
+ );
+}
+
+// Postponed Start Date
+// By default 0, 1, 2, 3, 5, 7, 14 or 30 days
+foreach ($conf['ws_postponed_start'] as $value) {
+ $template->assign_block_vars(
+ 'add_start',
+ array(
+ 'VALUE'=> $value,
+ 'CONTENT' => $value,
+ 'SELECTED' => ($conf['ws_postponed_start'][0] == $value) ? $selected:'',
+ )
+ );
+}
+
+// Durations (Allowed Web Services Period)
+// By default 10, 5, 2, 1 year(s) or 6, 3, 1 month(s) or 15, 10, 7, 5, 1, 0 day(s)
+foreach ($conf['ws_durations'] as $value) {
+ $template->assign_block_vars(
+ 'add_end',
+ array(
+ 'VALUE'=> $value,
+ 'CONTENT' => $value,
+ 'SELECTED' => ($conf['ws_durations'][3] == $value) ? $selected:'',
+ )
+ );
+ if ( $acc_list > 0 )
+ {
+ $template->assign_block_vars(
+ 'acc_list.upd_end',
+ array(
+ 'VALUE'=> $value,
+ 'CONTENT' => $value,
+ 'SELECTED' => ($conf['ws_durations'][3] == $value) ? $selected:'',
+ )
+ );
+ }
+}
+
+//----------------------------------------------------------- sending html code
+
+$template->assign_var_from_handle('ADMIN_CONTENT', 'ws_checker');
+?>
diff --git a/language/en_UK.iso-8859-1/help/web_service.html b/language/en_UK.iso-8859-1/help/web_service.html new file mode 100644 index 000000000..63bd9522f --- /dev/null +++ b/language/en_UK.iso-8859-1/help/web_service.html @@ -0,0 +1,56 @@ +<h2>Web Service Checker</h2>
+
+<p>This page let you define all parameters for your web service.</p>
+
+<dl>
+
+ <dt>Environment temporary setting</dt>
+
+ <dd>If Web Service are available (Advanced configuration => $conf['allow_web_services'])
+ then you are able to set it by administration interface as enable or disable when you want.</dd>
+
+ <dt>Confidential partner key (Mandatory)</dt>
+
+ <dd>Unique key to share with your partner. Keep that one long enough (e.g. 8 characters).
+ Keep it as complex enough (mixed figures, upper and lower case characters, special characters).
+ For example: "P!e2r!k Le G@2l".
+
+ <strong>Hidden to anyone in adviser mode.</strong>
+
+ <dt>Target (Optional)</dt>
+
+ <dd>Can be an image id list like that:<ul><li>
+ list/277,275,142,235,178,190,204,236-238,253,268,276,285,41,73</li><li>
+ a category id list as : cat/16,32,21</li><li>
+ or a tag id list as: tag/22,61,36 </li></ul>
+ all id list will be reduced to the min list as:<ul><li>
+ list/41,73,142,178,190,204,<strong>235-238</strong>,253,268,<strong>275-277</strong>,285</li></ul>
+ </dd>
+
+ <dt>Restrict access (Optional)</dt>
+
+ <dd>If you want to limit your partner to a specific request.</dd>
+
+ <dt>Returned images limit </dt>
+
+ <dd>Images limit count: to return to your partner for each request.</dd>
+
+ <dt>Postponed availability </dt>
+
+ <dd>Can start in few days from now. Remember Web Service would be available and enable.</dd>
+
+ <dt>Duration </dt>
+
+ <dd>From now, set availability in days. If you postpone over the duration, the service would never be available.</dd>
+
+ <dt>High / Normal </dt>
+
+ <dd>Result contains description for high resolution picture (pwg_high). Normal size picture as well.
+ If both are set to No. Only thumbnail information will be sent to your partner.</dd>
+
+ <dt>Comment </dt>
+
+ <dd>Let you describe who's behind this Web Service, be clear enough.
+ Don't forget that if someone is Admin and Adviser on your website. He can read this comment zone.</dd>
+
+</dl>
diff --git a/language/fr_FR.iso-8859-1/help/web_service.html b/language/fr_FR.iso-8859-1/help/web_service.html new file mode 100644 index 000000000..aa9e7128b --- /dev/null +++ b/language/fr_FR.iso-8859-1/help/web_service.html @@ -0,0 +1,57 @@ +<h2>Web Service Checker</h2>
+
+<p>Cette page permet de définir les paramètres de votre web service.</p>
+
+<dl>
+
+ <dt>Modification temporaire de l'Environnement</dt>
+
+ <dd>Si le Service Web est autorisé (Configuration avancée => $conf['allow_web_services'])
+ alors vous avez la possibilité de modifier par l'interface d'Administration, l'environnement en Actif ou Inactif quand vous le souhaitez.</dd>
+
+ <dt>Clé confidentielle (Obligatoire)</dt>
+
+ <dd>Clé unique à partager avec votre partenaire. Doit être assez longue ( 8 caractères par exemple),
+ doit être assez complexe (avec des chiffres, des majuscules et minuscules, et des caractères spéciaux).
+ Par exemple: "P!e2r!k Le G@2l".
+
+ <strong>Ce champ est masqué en mode conseillé.</strong>
+
+ <dt>Cible (Facultatif)</dt>
+
+ <dd>Soit une liste d'identifiants d'images ceci:<ul><li>
+ list/277,275,142,235,178,190,204,236-238,253,268,276,285,41,73</li><li>
+ une liste de catégories comme : cat/16,32,21</li><li>
+ ou encore une liste de tags : tag/22,61,36 </li></ul>
+ Tout liste d'identifiants sera réduite a sa plus simple expression:<ul><li>
+ list/41,73,142,178,190,204,<strong>235-238</strong>,253,268,<strong>275-277</strong>,285</li></ul>
+
+ </dd>
+
+ <dt>Accès restreint (Facultatif)</dt>
+
+ <dd>Si vous souhaitez limiter votre partenaire à un type de requête particulier.</dd>
+
+ <dt>Limite de transmision </dt>
+
+ <dd>Nombre d'images maximum adressées à votre partenaire à chacune de ses requêtes.</dd>
+
+ <dt>Report de disponibilité </dt>
+
+ <dd>La disponibilité peut être décalée de quelques jours à compter de cet instant. N'oubliez pas que les Services doivent être autorisés et actifs le jour venu.</dd>
+
+ <dt>Durée </dt>
+
+ <dd>A partir de maintenant, indiquez la disponibilité en jours. Si vous reportez la disponibilité au delà de sa durée, le service ne devrait jamais être rendu.</dd>
+
+ <dt>High / Normal </dt>
+
+ <dd>Résultat containdra les informations relatives aux images en haute résolution (pwg_high). Les images Normal(es) suivent le même principe.
+ Si les deux sont à "Non", seulement les informations des miniatures seront adressées à votre partenaire.</dd>
+
+ <dt>Commentaire </dt>
+
+ <dd>Vous permet de décrire qui se trouve derrière ce Service Web, de façon plus claire pour vous.
+ N'oubliez pas qu'un Administrateur en mode conseiller peut lire le contenu de ce commentaire.</dd>
+
+</dl>
diff --git a/template/yoga/admin/ws_checker.tpl b/template/yoga/admin/ws_checker.tpl new file mode 100644 index 000000000..8bc336d85 --- /dev/null +++ b/template/yoga/admin/ws_checker.tpl @@ -0,0 +1,298 @@ +<!-- $Id: ws_checker.tpl 939 2005-11-17 20:13:36Z VDigital $ -->
+
+<div class="titrePage">
+ <ul class="categoryActions">
+ <li><a href="{U_HELP}" onclick="popuphelp(this.href); return false;" title="{lang:Help}"><img src="{themeconf:icon_dir}/help.png" class="button" alt="(?)"></a></li>
+ </ul>
+ <h2>{lang:title_wscheck} - {lang:web_services}</h2>
+</div>
+
+<!-- BEGIN update_result -->
+<ul>
+ {update_result.UPD_ELEMENT}
+</ul>
+<!-- END update_result -->
+
+
+<!-- Set Web Services : Open/Disable -->
+<form method="post" name="ws_status" action="{F_STATUS_ACTION}">
+ <!-- Current status -->
+ <fieldset>
+ <legend>{lang:ws_set_status} : <strong>{L_CURRENT_STATUS}</strong></legend>
+ <table>
+ <tr>
+ <td width="70%">
+ {lang:ws set to}
+ <label><input type="radio" name="ws_status" value="true"
+ {STATUS_YES} /> {lang:ws_enable}
+ </label>
+ <label><input type="radio" name="ws_status" value="false"
+ {STATUS_NO} /> {lang:ws_disable}
+ </label>
+ </td>
+ <td width="4%">
+
+ </td>
+ <td>
+ <input type="submit" value="{lang:submit}"
+ style="width: 10em; padding-top: 3px;"
+ name="wss_submit" {TAG_INPUT_ENABLED} />
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+</form>
+
+
+<!-- Add Access -->
+<form method="post" name="adding_access" action="{F_STATUS_ACTION}">
+ <!-- Current Default -->
+ <fieldset>
+ <legend>{lang:ws_adding_legend}</legend>
+ <table>
+ <!-- Access key -->
+ <tr>
+ <td>
+ <label for="KeyName">{lang:Confidential partner key} </label>
+ </td>
+ <td>
+ <input type="text" maxlength="35" size="35" name="add_partner"
+ id="add_partner" value="{F_ADD_PARTNER}"
+ title="{lang:Basis of access key calculation}" />
+ </td>
+ </tr>
+
+ <!-- Target (cat/ids, tag/ids, or list/ids ids=id,id-id,...) -->
+ <tr>
+ <td>
+ <label for="Access">{lang:Target}</label>
+ </td>
+ <td>
+ <input type="text" maxlength="128" size="35" name="add_access"
+ id="add_access" value="{F_ADD_ACCESS}"
+ title="{lang:Facultative and restrictive option}" />
+ <i><small> ({lang:Access: see help text for more})
+ </small></i>
+ </td>
+ </tr>
+
+ <!-- Restricted access to specific request -->
+ <tr>
+ <td>
+ <label for="add_request">{lang:Restrict access to}</label>
+ </td>
+ <td>
+ <select name="add_request" id="add_request" style="width: 18em"
+ onfocus="this.className='focus';"
+ onblur="this.className='nofocus';">
+ <!-- BEGIN add_request -->
+ <option value="{add_request.VALUE}"
+ {add_request.SELECTED}>{add_request.CONTENT}
+ </option>
+ <!-- END add_request -->
+ </select>
+ <i><small> ({lang:ws_Request})</small></i>
+ </td>
+ </tr>
+
+ <!-- Limit number of images information to be return -->
+ <tr>
+ <td>
+ <label for="add_limit">{lang:Returned images limit}</label>
+ </td>
+ <td>
+ <select name="add_limit" id="add_limit" style="width: 10em"
+ onfocus="this.className='focus';"
+ onblur="this.className='nofocus';">
+ <!-- BEGIN add_limit -->
+ <option value="{add_limit.VALUE}"
+ {add_limit.SELECTED}>{add_limit.CONTENT}
+ </option>
+ <!-- END add_limit -->
+ </select>
+ </td>
+ </tr>
+
+ <!-- Open service is postponed by n days -->
+ <tr>
+ <td>
+ <label for="add_start">{lang:Postponed availability in days}</label>
+ </td>
+ <td>
+ <select name="add_start" id="add_start" style="width: 10em"
+ onfocus="this.className='focus';"
+ onblur="this.className='nofocus';">
+ <!-- BEGIN add_start -->
+ <option value="{add_start.VALUE}"
+ {add_start.SELECTED}>{add_start.CONTENT}
+ </option>
+ <!-- END add_start -->
+ </select>
+ </td>
+ </tr>
+
+ <!-- Opened service only for n days -->
+ <tr>
+ <td>
+ <label for="add_end">{lang:Duration in days}</label>
+ </td>
+ <td>
+ <select name="add_end" id="add_end" style="width: 10em"
+ onfocus="this.className='focus';"
+ onblur="this.className='nofocus';">
+ <!-- BEGIN add_end -->
+ <option value="{add_end.VALUE}"
+ {add_end.SELECTED}>{add_end.CONTENT}
+ </option>
+ <!-- END add_end -->
+ </select>
+ </td>
+ </tr>
+
+ <!-- High resolution information will be returned -->
+ <tr>
+ <td>
+ <label for="add_High">{lang:ws_High}</label>
+ <br />
+ </td>
+ <td>
+ <label><input type="radio" name="add_high"
+ value="true" {DEFLT_HIGH_YES}
+ title="{lang:High resolution information will be returned to your partner}"
+ /> {lang:yes}
+ </label>
+ <label><input type="radio" name="add_high"
+ value="false" {DEFLT_HIGH_NO} /> {lang:no}
+ </label>
+ </td>
+ </tr>
+
+ <!-- Normal size information will be returned -->
+ <tr>
+ <td>
+ <label for="add_Normal">{lang:ws_Normal}</label>
+ <br />
+ </td>
+ <td>
+ <label><input type="radio" name="add_normal"
+ value="true" {DEFLT_NORMAL_YES}
+ title="{lang:Normal size information will be returned to your partner}"
+ /> {lang:yes}
+ </label>
+ <label><input type="radio" name="add_normal"
+ value="false" {DEFLT_NORMAL_NO} /> {lang:no}
+ </label>
+ </td>
+ </tr>
+
+ <!-- Idendify your partner (name / website / phone) as you want -->
+ <tr>
+ <td>
+ <label for="add_Comment">{lang:ws_Comment}</label>
+ <br />
+ </td>
+ <td>
+ <textarea name="add_comment" id="add_comment" maxlength="255"
+ rows="4" cols="80">{lang:Comment to identify your partner clearly}</textarea>
+ </td>
+ </tr>
+
+ <!-- Add submit button -->
+ <tr>
+ <td>
+ </td>
+ <td>
+ <input type="submit" name="wsa_submit" style="width: 10em; padding-top: 3px;"
+ value="{lang:Submit}" {TAG_INPUT_ENABLED}
+ title="{lang:Add this access definition}" />
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+</form>
+
+<!-- BEGIN acc_list -->
+<!-- Access list -->
+<form method="post" name="preferences" action="{F_STATUS_ACTION}">
+ <input type="hidden" name="partner_prev" value="{F_PREV_PARTNER}" />
+ <input type="hidden" name="request_prev" value="{F_PREV_REQUEST}" />
+ <input type="hidden" name="high_prev" value="{F_PREV_HIGH}" />
+ <input type="hidden" name="normal_prev" value="{F_PREV_NORMAL}" />
+ <input type="hidden" name="order_prev" value="{F_PREV_ORDER}" />
+ <input type="hidden" name="dir5n_prev" value="{F_PREV_DIR5N}" />
+ <!-- Delete / Update Selected -->
+ <fieldset>
+ <legend>{lang:ws_update_legend}</legend>
+ <table class="table2">
+ <tr class="throw">
+ <th> </th>
+ <th>{lang:ws_KeyName}</th>
+ <th>{lang:ws_Access}</th>
+ <th>{lang:ws_Start}</th>
+ <th>{lang:ws_End}</th>
+ <th>{lang:ws_Request}</th>
+ <th>{lang:ws_High}</th>
+ <th>{lang:ws_Normal}</th>
+ <th>{lang:ws_Limit}</th>
+ <th>{lang:ws_Comment}</th>
+ </tr>
+ <!-- BEGIN access -->
+ <tr class="{acc_list.access.CLASS}">
+ <td>
+ <input type="radio" name="selection"
+ value="{acc_list.access.ID}" id="selection-{acc_list.access.ID}" />
+ </td>
+ <td><label for="selection-{acc_list.access.ID}">{acc_list.access.NAME}</label></td>
+ <td>{acc_list.access.ACCESS}</td>
+ <td>{acc_list.access.START}</td>
+ <td>{acc_list.access.END}</td>
+ <td>{acc_list.access.FORCE}</td>
+ <td>{acc_list.access.HIGH}</td>
+ <td>{acc_list.access.NORMAL}</td>
+ <td>{acc_list.access.LIMIT}</td>
+ <td>{acc_list.access.COMMENT}</td>
+ </tr>
+ <!-- END user -->
+ </table>
+
+ <table>
+ <tr>
+ <td>
+ {lang:ws_delete_legend}
+ </td>
+ <td>
+ <input type="radio" name="delete_confirmation"
+ value="true" />
+ <input type="submit" name="wsX_submit" style="width: 10em; padding-top: 3px;"
+ value="{lang:Delete}" {TAG_INPUT_ENABLED}/>
+ </td>
+ </tr>
+ </table>
+ <hr>
+ <table>
+ <tr>
+ <td>
+ <span class="property">
+ <label for="upd_end">{lang:Modify End from Now +} </label>
+ </span>
+ <select name="upd_end" id="upd_end" style="width: 10em"
+ onfocus="this.className='focus';"
+ onblur="this.className='nofocus';">
+ <!-- BEGIN upd_end -->
+ <option value="{acc_list.upd_end.VALUE}" {acc_list.upd_end.SELECTED}>
+ {acc_list.upd_end.CONTENT}
+ </option>
+ <!-- END upd_end -->
+ </select>
+ <input type="submit" name="wsu_submit" style="width: 10em; padding-top: 3px;"
+ value="{lang:Submit}" {TAG_INPUT_ENABLED}/>
+ </td>
+ <td>
+ <i><small> ({lang:Web Services availability duration in days})</small></i>
+ </td>
+ </tr>
+ </table>
+
+ </fieldset>
+</form>
+<!-- END acc_list -->
|