Changeset 1745


Ignore:
Timestamp:
Jan 23, 2007, 9:38:04 PM (17 years ago)
Author:
vdigital
Message:

ws_status is now removed from config table. It will be replaced by ws_access_control managed in config file.

Location:
trunk
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/ws_checker.php

    • Property svn:eol-style set to native
    • Property svn:keywords set to Author Date Id Revision
    r1670 r1745  
    77// | branch        : BSF (Best So Far)
    88// | file          : $RCSfile$
    9 // | last update   : $Date: 2006-12-15 23:16:37 +0200 (ven., 15 dec. 2006) $
    10 // | last modifier : $Author: vdigital $
    11 // | revision      : $Revision: 1658 $
     9// | last update   : $Date$
     10// | last modifier : $Author$
     11// | revision      : $Revision$
    1212// +-----------------------------------------------------------------------+
    1313// | This program is free software; you can redistribute it and/or modify  |
     
    5151//--------------------------------------------------------- update informations
    5252
    53 // Is status temporary changed?
    54 if (isset($_POST['wss_submit']))
    55 {
    56   $ws_status = get_boolean( $_POST['ws_status'] );      // Requested status
    57   $ws_update = $lang['ws_success_upd'];  // Normal update
    58   if ($conf['allow_web_services'] == false and $ws_status == true )
    59   { /* Set true is disallowed */
    60     $ws_status = false;
    61     $ws_update = $lang['ws_disallowed'];
    62   }
    63   if ( $ws_status !== true and $ws_status !== false )
    64   { /* Avoiding SQL injection by no change */
    65     $ws_status = $conf['ws_status'];
    66   }
    67   if ($conf['ws_status'] == $ws_status)
    68   {
    69     $ws_update = $lang['ws_disallowed'];
    70   }
    71   else
    72   {
    73     $query = '
    74 UPDATE '.CONFIG_TABLE.' SET
    75  value = \''.boolean_to_string($ws_status).'\'
    76 WHERE param = \'ws_status\'
    77  AND value <> \''.boolean_to_string($ws_status).'\'
    78 ;';
    79     pwg_query($query);
    80     $conf['ws_status'] = $ws_status;
    81   }
    82   $template->assign_block_vars(
    83     'update_result',
    84     array(
    85       'UPD_ELEMENT'=> $lang['ws_set_status'].': '.$ws_update,
    86       )
    87   );
    88 }
    89 
    90 // Next, is a new access required?
     53// Is a new access required?
    9154
    9255if (isset($_POST['wsa_submit']))
    9356{
    94 // Check $_post
     57// Check $_post (Some values are commented - maybe a future use)
    9558$add_partner = htmlspecialchars( $_POST['add_partner'], ENT_QUOTES);
    9659$add_access = check_target( $_POST['add_access']) ;
    97 $add_start = ( is_numeric($_POST['add_start']) ) ? $_POST['add_start']:0;
     60$add_start = 0; // ( is_numeric($_POST['add_start']) ) ? $_POST['add_start']:0;
    9861$add_end = ( is_numeric($_POST['add_end']) ) ? $_POST['add_end']:0;
    9962$add_request = ( ctype_alpha($_POST['add_request']) ) ?
    10063  $_POST['add_request']:'';
    101 $add_high = ( $_POST['add_high'] == 'true' ) ? 'true':'false';
    102 $add_normal = ( $_POST['add_normal'] == 'true' ) ? 'true':'false';
     64$add_high = 'true'; // ( $_POST['add_high'] == 'true' ) ? 'true':'false';
     65$add_normal = 'true'; // ( $_POST['add_normal'] == 'true' ) ? 'true':'false';
    10366$add_limit = ( is_numeric($_POST['add_limit']) ) ? $_POST['add_limit']:1;
    10467$add_comment = htmlspecialchars( $_POST['add_comment'], ENT_QUOTES);
     
    184147
    185148
    186 $ws_status = $conf['ws_status'];
     149
    187150$template->assign_vars(
    188151  array(
    189     'L_CURRENT_STATUS' => ( $ws_status == true ) ?
    190        $lang['ws_enable']:$lang['ws_disable'],
    191     'STATUS_YES' => ( $ws_status == true ) ? '':'checked',
    192     'STATUS_NO' => ( $ws_status == true ) ? 'checked':'',
    193152    'DEFLT_HIGH_YES' => '',
    194153    'DEFLT_HIGH_NO' => 'checked',
     
    224183  );
    225184
    226 $checked = 'checked="checked"';
    227185$selected = 'selected="selected"';
    228186$num=0;
     
    277235}
    278236
    279 $columns = array (
    280        'ID'               => 'id',
    281        'ws_KeyName'       => 'name',
    282        'ws_Access'        => 'ws_access',
    283        'ws_Start'         => 'ws_start',
    284        'ws_End'           => 'ws_end',
    285        'ws_Request'       => 'ws_request',
    286        'ws_High'          => 'ws_high',
    287        'ws_Normal'        => 'ws_normal',
    288        'ws_Limit'         => 'ws_limit',
    289        'ws_Comment'       => 'ws_comment',
    290 );
    291 
    292237foreach ($conf['ws_allowed_limit'] as $value) {
    293238  $template->assign_block_vars(
  • trunk/language/en_UK.iso-8859-1/admin.lang.php

    r1744 r1745  
    500500$lang['title_wscheck'] = ' Access management ';
    501501$lang['ws_set_status'] = ' Environment ';
    502 $lang['ws_status'] = ' Status ';
    503502$lang['ws_enable'] = ' Enable ';
    504503$lang['ws_disable'] = ' Disable ';
  • trunk/language/fr_FR.iso-8859-1/admin.lang.php

    r1744 r1745  
    499499$lang['title_wscheck'] = ' Gestion des accès ';
    500500$lang['ws_set_status'] = ' Environnement ';
    501 $lang['ws_status'] = ' Statut ';
    502501$lang['ws_enable'] = ' Actif ';
    503502$lang['ws_disable'] = ' Inactif ';
  • trunk/template/yoga/admin/ws_checker.tpl

    r1661 r1745  
    1313</ul>
    1414<!-- END update_result -->
    15 
    16 
    17 <!-- Set Web Services : Open/Disable -->
    18 <form method="post" name="ws_status" action="{F_STATUS_ACTION}">
    19   <!-- Current status -->
    20   <fieldset>
    21     <legend>{lang:ws_set_status} : <strong>{L_CURRENT_STATUS}</strong></legend>
    22     <table>
    23       <tr>
    24         <td width="70%">
    25           {lang:ws set to}  &nbsp; &nbsp; &nbsp;
    26           <label><input type="radio" name="ws_status" value="true"
    27             {STATUS_YES} /> {lang:ws_enable}
    28           </label> &nbsp; &nbsp; &nbsp;
    29           <label><input type="radio" name="ws_status" value="false"
    30             {STATUS_NO} /> {lang:ws_disable}
    31           </label>
    32         </td>
    33         <td width="4%">
    34           &nbsp;
    35         </td>
    36         <td>
    37           <input type="submit" value="{lang:submit}" 
    38             style="width: 10em; padding-top: 3px;" 
    39             name="wss_submit" {TAG_INPUT_ENABLED} />
    40         </td>
    41       </tr>
    42     </table>
    43   </fieldset>
    44 </form>
    45 
    4615
    4716<!-- Add Access -->
     
    11584
    11685    <!-- Open service is postponed by n days -->
     86    <!-- In comment currently
    11787      <tr>
    11888        <td>
     
    130100          </select>
    131101        </td>
    132       </tr>
     102      </tr> -->
    133103
    134104    <!-- Opened service only for n days -->
     
    151121
    152122    <!-- High resolution information will be returned -->
     123    <!-- In comment currently
    153124      <tr>
    154125        <td>
     
    166137          </label> 
    167138        </td>
    168       </tr>
     139      </tr> -->
    169140
    170141    <!-- Normal size information will be returned -->
     142    <!-- In comment currently
    171143      <tr>
    172144        <td>
     
    184156          </label>
    185157        </td>
    186       </tr>
     158      </tr> -->
    187159
    188160    <!-- Idendify your partner (name / website / phone) as you want -->
     
    229201        <th>{lang:ws_KeyName}</th>
    230202        <th>{lang:ws_Access}</th>
    231         <th>{lang:ws_Start}</th>
     203        <!-- <th>{lang:ws_Start}</th> -->
    232204        <th>{lang:ws_End}</th>
    233205        <th>{lang:ws_Request}</th>
    234         <th>{lang:ws_High}</th>
    235         <th>{lang:ws_Normal}</th>
     206        <!-- <th>{lang:ws_High}</th> -->
     207        <!-- <th>{lang:ws_Normal}</th> -->
    236208        <th>{lang:ws_Limit}</th>
    237209        <th>{lang:ws_Comment}</th>
     
    245217        <td><label for="selection-{acc_list.access.ID}">{acc_list.access.NAME}</label></td>
    246218        <td>{acc_list.access.ACCESS}</td>
    247         <td>{acc_list.access.START}</td>
     219        <!-- <td>{acc_list.access.START}</td> -->
    248220        <td>{acc_list.access.END}</td>
    249221        <td>{acc_list.access.FORCE}</td>
    250         <td>{acc_list.access.HIGH}</td>
    251         <td>{acc_list.access.NORMAL}</td>
     222        <!-- <td>{acc_list.access.HIGH}</td> -->
     223        <!-- <td>{acc_list.access.NORMAL}</td> -->
    252224        <td>{acc_list.access.LIMIT}</td>
    253225        <td>{acc_list.access.COMMENT}</td>
Note: See TracChangeset for help on using the changeset viewer.