当前位置: 首页>>代码示例>>PHP>>正文


PHP call_script函数代码示例

本文整理汇总了PHP中call_script函数的典型用法代码示例。如果您正苦于以下问题:PHP call_script函数的具体用法?PHP call_script怎么用?PHP call_script使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了call_script函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: mysql_query

                    }
                    // End empty poll check
                }
                // End if/then record count check
            }
            // Random chance check
        }
        // End else
        //***********************************************************************************
    }
    // End if/then check for processing for more than 3 records - live database
    //***********************************************************************************
}
// End if/then time check
//***********************************************************************************
//***********************************************************************************
// Script finished, set status to 0
mysql_query("UPDATE `main_loop_status` SET `field_data` = '0' WHERE `main_loop_status`.`field_name` = 'transclerk_heartbeat_active' LIMIT 1");
// Record when this script finished
mysql_query("UPDATE `main_loop_status` SET `field_data` = '" . time() . "' WHERE `main_loop_status`.`field_name` = 'transclerk_last_heartbeat' LIMIT 1");
//**********
//Launch another instance right away when getting
//transaction history in sync with the network
if ($transaction_multi == TRUE) {
    $main_loop_status = mysql_result(mysql_query("SELECT * FROM `main_loop_status` WHERE `field_name` = 'main_heartbeat_active' LIMIT 1"), 0, "field_data");
    if ($main_loop_status == 1 || $main_loop_status == 2) {
        call_script("transclerk.php");
    }
    exit;
}
//***********************************************************************************
开发者ID:LoveLeAnon,项目名称:timekoin,代码行数:31,代码来源:transclerk.php

示例2: activate

                    activate(TIMEKOINSYSTEM, 1);
                    // In case this was disabled from a emergency stop call in the server GUI
                }
            }
            // Check watchdog script to make sure it is still running
            $script_loop_active = mysql_result(mysql_query("SELECT * FROM `main_loop_status` WHERE `field_name` = 'watchdog_heartbeat_active' LIMIT 1"), 0, "field_data");
            $script_last_heartbeat = mysql_result(mysql_query("SELECT * FROM `main_loop_status` WHERE `field_name` = 'watchdog_last_heartbeat' LIMIT 1"), 0, "field_data");
            if ($script_loop_active > 0) {
                // Watchdog should still be active
                if (time() - $script_last_heartbeat > 100) {
                    // Watchdog stop was unexpected
                    write_log("Watchdog has Failed, going to try an Ambient Peer Restart", "PL");
                    mysql_query("UPDATE `main_loop_status` SET `field_data` = '" . time() . "' WHERE `main_loop_status`.`field_name` = 'watchdog_last_heartbeat' LIMIT 1");
                    // Set loop at active now
                    mysql_query("UPDATE `main_loop_status` SET `field_data` = '1' WHERE `main_loop_status`.`field_name` = 'watchdog_heartbeat_active' LIMIT 1");
                    call_script("watchdog.php", 0);
                }
            }
        }
        // End Ambient Peer Restart Active Check
    }
    // End Randomize Check
    // Log inbound IP activity
    log_ip("PL");
    exit;
}
//***********************************************************************************
//***********************************************************************************
// Answer poll challenge
if ($_GET["action"] == "polltime") {
    echo time();
开发者ID:LoveLeAnon,项目名称:timekoin,代码行数:31,代码来源:peerlist.php

示例3: call_script

     call_script("peerlist.php");
 }
 $script_loop_active = mysql_result(mysql_query("SELECT * FROM `main_loop_status` WHERE `field_name` = 'queueclerk_heartbeat_active' LIMIT 1"), 0, "field_data");
 // Check if script is already running
 if ($script_loop_active == 0) {
     call_script("queueclerk.php");
 }
 $script_loop_active = mysql_result(mysql_query("SELECT * FROM `main_loop_status` WHERE `field_name` = 'balance_heartbeat_active' LIMIT 1"), 0, "field_data");
 // Check if script is already running
 if ($script_loop_active == 0) {
     call_script("balance.php", 0);
 }
 $script_loop_active = mysql_result(mysql_query("SELECT * FROM `main_loop_status` WHERE `field_name` = 'genpeer_heartbeat_active' LIMIT 1"), 0, "field_data");
 // Check if script is already running
 if ($script_loop_active == 0) {
     call_script("genpeer.php");
 }
 if (rand(1, 3) == 2) {
     // Check watchdog script to make sure it is still running
     $script_loop_active = mysql_result(mysql_query("SELECT * FROM `main_loop_status` WHERE `field_name` = 'watchdog_heartbeat_active' LIMIT 1"), 0, "field_data");
     $watchdog_last_heartbeat = mysql_result(mysql_query("SELECT * FROM `main_loop_status` WHERE `field_name` = 'watchdog_last_heartbeat' LIMIT 1"), 0, "field_data");
     if ($script_loop_active > 0) {
         // Watchdog should still be active
         if (time() - $watchdog_last_heartbeat > 60) {
             // Watchdog stop was unexpected
             write_log("Watchdog is Stalled...", "MA");
         }
     }
 }
 //*****************************************************************************************************
 //*****************************************************************************************************
开发者ID:LoveLeAnon,项目名称:timekoin,代码行数:31,代码来源:main.php

示例4: mysql_query

        if ($watchdog_heartbeat_active === FALSE) {
            mysql_query("INSERT INTO `main_loop_status` (`field_name` ,`field_data`)VALUES ('watchdog_heartbeat_active', '0')");
        }
        mysql_query("UPDATE `main_loop_status` SET `field_data` = '" . time() . "' WHERE `main_loop_status`.`field_name` = 'watchdog_last_heartbeat' LIMIT 1");
        // Set loop at active now
        mysql_query("UPDATE `main_loop_status` SET `field_data` = '1' WHERE `main_loop_status`.`field_name` = 'watchdog_heartbeat_active' LIMIT 1");
        // CLI Mode selection
        $cli_mode = intval(mysql_result(mysql_query("SELECT field_data FROM `options` WHERE `field_name` = 'cli_mode' LIMIT 1"), 0, 0));
        // Start main system script
        if ($cli_mode == TRUE) {
            call_script("watchdog.php", 0);
        } else {
            session_name("tkwatchcli");
            session_start();
            ini_set('default_socket_timeout', 1);
            call_script("watchdog.php", NULL, NULL, TRUE);
        }
        header("Location: index.php?menu=system&code=2");
        exit;
    } else {
        header("Location: index.php?menu=system&code=89");
        exit;
    }
}
$mysql_link = mysql_connect(MYSQL_IP, MYSQL_USERNAME, MYSQL_PASSWORD);
mysql_select_db(MYSQL_DATABASE);
// Check for banned IP address
if (ip_banned($_SERVER['REMOTE_ADDR']) == TRUE) {
    // Sorry, your IP address has been banned :(
    exit("Your IP Has Been Banned");
}
开发者ID:LoveLeAnon,项目名称:timekoin,代码行数:31,代码来源:watchdog.php

示例5: mysql_query

                         if (empty($find_php[0]) == TRUE) {
                             // Could not find it anywhere :(
                         } else {
                             // Found it! Save location and start Timekoin
                             mysql_query("UPDATE `options` SET `field_data` = '" . addslashes($find_php[0]) . "' WHERE `options`.`field_name` = 'php_location' LIMIT 1");
                         }
                     }
                     // Check if php-win.exe exist check
                 }
                 // Windows OS Check
             }
             // End Database Check for custom PHP location
             mysql_query("UPDATE `main_loop_status` SET `field_data` = '" . time() . "' WHERE `main_loop_status`.`field_name` = 'main_last_heartbeat' LIMIT 1");
             // Set loop at active now
             mysql_query("UPDATE `main_loop_status` SET `field_data` = '1' WHERE `main_loop_status`.`field_name` = 'main_heartbeat_active' LIMIT 1");
             call_script("main.php");
             // Start main.php process
             activate(TIMEKOINSYSTEM, 1);
             // In case this was disabled from a stop call in the server GUI
             // Use uPNP to map inbound ports for Windows systems
             if (getenv("OS") == "Windows_NT" && file_exists("utils\\upnpc.exe") == TRUE) {
                 $server_port_number = mysql_result(mysql_query("SELECT * FROM `options` WHERE `field_name` = 'server_port_number' LIMIT 1"), 0, "field_data");
                 $server_IP = gethostbyname(trim(`hostname`));
                 pclose(popen("start /B utils\\upnpc.exe -e Timekoin -a {$server_IP} {$server_port_number} {$server_port_number} TCP", "r"));
             }
         }
         // End active main.php process check
     }
     // End DB check
 }
 // End Autostart check
开发者ID:LoveLeAnon,项目名称:timekoin,代码行数:31,代码来源:index.php

示例6: initialization_database

             $_SESSION["login_username"] = $http_username;
             $_SESSION["valid_login"] = TRUE;
             initialization_database();
             // Do any required data upgrades
             // Start any plugins
             $sql = "SELECT * FROM `options` WHERE `field_name` LIKE 'installed_plugins%' ORDER BY `options`.`field_name` ASC";
             $sql_result = mysql_query($sql);
             $sql_num_results = mysql_num_rows($sql_result);
             for ($i = 0; $i < $sql_num_results; $i++) {
                 $sql_row = mysql_fetch_array($sql_result);
                 $plugin_file = find_string("---file=", "---enable", $sql_row["field_data"]);
                 $plugin_enable = intval(find_string("---enable=", "---show", $sql_row["field_data"]));
                 $plugin_service = find_string("---service=", "---end", $sql_row["field_data"]);
                 if ($plugin_enable == TRUE && empty($plugin_service) == FALSE) {
                     // Start Plugin Service
                     call_script($plugin_file, 0, TRUE);
                     // Log Service Start
                     write_log("Started Plugin Service: {$plugin_service}", "GU");
                 }
             }
             // Finish Starting Plugin Services
             header("Location: index.php");
             exit;
         }
     }
     // Log invalid attempts
     write_log("Invalid Login from IP: " . $_SERVER['REMOTE_ADDR'] . " trying Username:[" . filter_sql($http_username) . "] with Password:[" . filter_sql($http_password) . "]", "GU");
 }
 sleep(1);
 // One second delay to help prevent brute force attack
 login_screen("Login Failed");
开发者ID:LoveLeAnon,项目名称:timekoin,代码行数:31,代码来源:index.php

示例7: mysql_result

 $script_loop_active = mysql_result(mysql_query("SELECT field_data FROM `main_loop_status` WHERE `field_name` = 'balance_heartbeat_active' LIMIT 1"), 0, 0);
 // Check if script is already running
 if ($script_loop_active == 0) {
     if ($cli_mode == TRUE) {
         call_script("balance.php", 0);
     } else {
         call_script("balance.php", NULL, NULL, TRUE);
     }
 }
 $script_loop_active = mysql_result(mysql_query("SELECT field_data FROM `main_loop_status` WHERE `field_name` = 'genpeer_heartbeat_active' LIMIT 1"), 0, 0);
 // Check if script is already running
 if ($script_loop_active == 0) {
     if ($cli_mode == TRUE) {
         call_script("genpeer.php");
     } else {
         call_script("genpeer.php", NULL, NULL, TRUE);
     }
 }
 if (rand(1, 4) == 3) {
     // Check watchdog script to make sure it is still running
     $script_loop_active = mysql_result(mysql_query("SELECT field_data FROM `main_loop_status` WHERE `field_name` = 'watchdog_heartbeat_active' LIMIT 1"), 0, 0);
     $watchdog_last_heartbeat = mysql_result(mysql_query("SELECT field_data FROM `main_loop_status` WHERE `field_name` = 'watchdog_last_heartbeat' LIMIT 1"), 0, 0);
     if ($script_loop_active > 0) {
         // Watchdog should still be active
         if (time() - $watchdog_last_heartbeat > 90) {
             // Watchdog stop was unexpected
             write_log("Watchdog is Stalled...", "MA");
         }
     }
 }
 //*****************************************************************************************************
开发者ID:LoveLeAnon,项目名称:timekoin,代码行数:31,代码来源:main.php


注:本文中的call_script函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。