} break; default: die("Invalid action specified"); break; } } switch ($event) { case 'view': draw_header(); draw_location(); draw_tree(); draw_files(); draw_footer(); break; case 'upload': upload_file(); break; case 'mkdir': make_directory(); break; case 'download': download_file(); break; case 'passwd': change_passwd(); break; default: die('Invalid event'); break; }
# it under the terms of the GNU General Public License version 3 # as published by the Free Software Foundation. # # Cronus 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 Cronus. If not; see <http://www.gnu.org/licenses/>. /* * * Usage Example: /api/idp/update/user/passwd * * passed values: * subdomain : Customer's subdomain * username : Customer's username * password : Customer's password * * Returns: JSON {status:success|fail} * */ // Include helper lib file include "{$module}/lib/{$action_on}.inc.php"; include "{$module}/{$action_on}/config.php"; $retval = change_passwd(param('username'), param('password')); if ($retval) { print json_encode(array('status' => 'success')); } else { print json_encode(array('status' => 'fail', 'message' => 'Invalid parameters or internal error.')); }
defined( '_PHP_CONGES' ) or die( 'Restricted access' ); if($_SESSION['config']['where_to_find_user_email']=="ldap"){ include CONFIG_PATH .'config_ldap.php';} $change_passwd = getpost_variable('change_passwd', 0); $new_passwd1 = getpost_variable('new_passwd1'); $new_passwd2 = getpost_variable('new_passwd2'); if($change_passwd==1) { change_passwd($new_passwd1, $new_passwd2, $DEBUG); } else { $PHP_SELF=$_SERVER['PHP_SELF']; $session=session_id(); echo '<h1>'. _('user_change_password') .' :</h1>'; echo '<form action="'.$PHP_SELF.'?session='.$session.'&onglet='.$onglet.'" method="POST">'; echo '<table cellpadding="2" class="tablo" width="500">'; echo '<thead>'; /* echo '<tr> <td class="titre">'. _('user_passwd_saisie_1') .'</td>