コード例 #1
0
         $adminService->serviceCmd($service, $service_command);
         if (!$adminService->waitCallback()) {
             nt_common_add_debug('Error while waiting for callback on service \'' . $service . '\' for command : ' . $service_command);
         } else {
             // the locator displays a nice output, no need for the raw one
             //$tpl->assign('tool_execute_command', 	$service_command);
             $tpl->assign('tool_guild_errors', tool_gl_parse_grade_change($command_return_data));
         }
     }
 case 'dumpguild':
     $service = $NELTOOL['GET_VARS']['servicealias'];
     $guild_shard_id = $NELTOOL['GET_VARS']['guildshardid'];
     $guild_id = $NELTOOL['GET_VARS']['guildid'];
     if ($guild_shard_id > 0 && $guild_id > 0 && $service != '') {
         $service_command = 'dumpGuild ' . $guild_shard_id . ':' . $guild_id;
         nt_log("Domain '{$AS_Name}' : '{$service_command}' on " . $service);
         $tpl->assign('tool_execute_result', '');
         $command_return_data = array();
         $adminService->serviceCmd($service, $service_command);
         if (!$adminService->waitCallback()) {
             nt_common_add_debug('Error while waiting for callback on service \'' . $service . '\' for command : ' . $service_command);
         } else {
             // the locator displays a nice output, no need for the raw one
             //$tpl->assign('tool_execute_command', 	$service_command);
         }
         if (sizeof($command_return_data)) {
             $tool_sub_services_gl = null;
             if (isset($NELTOOL['POST_VARS']['subservices_gl'])) {
                 $tool_sub_services_gl = $NELTOOL['POST_VARS']['subservices_gl'];
             } elseif (isset($NELTOOL['GET_VARS']['subservices_gl'])) {
                 $tool_sub_services_gl = $NELTOOL['GET_VARS']['subservices_gl'];
コード例 #2
0
function tool_main_set_restart_sequence_user($AS_ShardRestart)
{
    global $db;
    global $AS_Name, $AS_ShardName;
    global $nel_user;
    global $restart_notification_emails;
    $sequence_info = tool_main_get_restart_sequence_by_id($AS_ShardRestart);
    if ($sequence_info) {
        $sql = "UPDATE " . NELDB_RESTART_SEQUENCE_TABLE . " SET restart_sequence_user_name='" . $nel_user['user_name'] . "' WHERE restart_sequence_id=" . $AS_ShardRestart;
        $db->sql_query($sql);
        nt_log("Shard Restart (Domain: '" . $AS_Name . "' - Shard: '" . $AS_ShardName . "' - Sequence: '" . $AS_ShardRestart . "') owner set to '" . $nel_user['user_name'] . "'");
        $email_subject = "[Shard Admin Tool] Restart Sequence Takeover (id: " . $sequence_info['restart_sequence_id'] . ", step: " . $sequence_info['restart_sequence_step'] . ") for shard " . $AS_Name . "/" . $AS_ShardName . " by " . $nel_user['user_name'];
        $email_message = $email_subject;
        nt_email($email_subject, $email_message, $restart_notification_emails);
    }
}
コード例 #3
0
ファイル: index.php プロジェクト: cls1991/ryzomcore
                 $adminService->controlCmd($service, 'abortService');
                 if (!$adminService->waitCallback()) {
                     nt_common_add_debug('Error while waiting for callback on service \'' . $service . '\' for abortService');
                 }
             }
             nt_sleep(VIEW_DELAY);
         }
     }
     break;
 case 'execute':
     if (tool_admin_applications_check('tool_main_execute')) {
         if (isset($_POST['service_command'])) {
             $service_command = trim(stripslashes(html_entity_decode($_POST['service_command'], ENT_QUOTES)));
             $service_list = tool_main_get_checked_services();
             if (sizeof($service_list)) {
                 nt_log("Domain '{$AS_Name}' : '{$service_command}' on " . implode(', ', array_values($service_list)));
                 nt_common_add_debug(array_combine($service_list, $service_list));
                 $tpl->assign('tool_service_select_list', array_combine($service_list, $service_list));
                 $tpl->assign('tool_execute_result', '');
                 reset($service_list);
                 foreach ($service_list as $service) {
                     nt_common_add_debug("about to run command '{$service_command}' on '{$service}' ...");
                     $adminService->serviceCmd($service, $service_command);
                     if (!$adminService->waitCallback()) {
                         nt_common_add_debug('Error while waiting for callback on service \'' . $service . '\' for command : ' . $service_command);
                     } else {
                         $tpl->assign('tool_execute_command', htmlentities($service_command, ENT_QUOTES));
                     }
                 }
             }
         }