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


PHP run_script_update函数代码示例

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


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

示例1: do_updates

function do_updates()
{
    // Poll timekoin.com for any program updates
    $context = stream_context_create(array('http' => array('header' => 'Connection: close')));
    // Force close socket after complete
    ini_set('user_agent', 'Timekoin Server (GUI) v' . TIMEKOIN_VERSION);
    ini_set('default_socket_timeout', 10);
    // Timeout for request in seconds
    $poll_version = file_get_contents("https://timekoin.com/tkupdates/" . NEXT_VERSION, FALSE, $context, NULL, 10);
    $update_status = 'Starting Update Process...<br><br>';
    if (empty($poll_version) == FALSE) {
        //****************************************************
        //Check for CSS updates
        $update_status .= 'Checking for <strong>CSS Template</strong> Update...<br>';
        $update_status .= run_script_update("CSS Template (admin.css)", "admin.css", $poll_version, $context, 0, "css");
        //****************************************************
        //****************************************************
        $update_status .= 'Checking for <strong>RSA Code</strong> Update...<br>';
        $update_status .= run_script_update("RSA Code (RSA.php)", "RSA", $poll_version, $context);
        //****************************************************
        $update_status .= 'Checking for <strong>Openssl Template</strong> Update...<br>';
        $update_status .= run_script_update("Openssl Template (openssl.cnf)", "openssl.cnf", $poll_version, $context, 0);
        //****************************************************
        //****************************************************
        $update_status .= 'Checking for <strong>API Access</strong> Update...<br>';
        $update_status .= run_script_update("API Access (api.php)", "api", $poll_version, $context);
        //****************************************************
        //****************************************************
        $update_status .= 'Checking for <strong>Balace Indexer</strong> Update...<br>';
        $update_status .= run_script_update("Balance Indexer (balance.php)", "balance", $poll_version, $context);
        //****************************************************
        $update_status .= 'Checking for <strong>Transaction Foundation Manager</strong> Update...<br>';
        $update_status .= run_script_update("Transaction Foundation Manager (foundation.php)", "foundation", $poll_version, $context);
        //****************************************************
        $update_status .= 'Checking for <strong>Currency Generation Manager</strong> Update...<br>';
        $update_status .= run_script_update("Currency Generation Manager (generation.php)", "generation", $poll_version, $context);
        //****************************************************
        $update_status .= 'Checking for <strong>Generation Peer Manager</strong> Update...<br>';
        $update_status .= run_script_update("Generation Peer Manager (genpeer.php)", "genpeer", $poll_version, $context);
        //****************************************************
        $update_status .= 'Checking for <strong>Timekoin Web Interface</strong> Update...<br>';
        $update_status .= run_script_update("Timekoin Web Interface (index.php)", "index", $poll_version, $context);
        //****************************************************
        $update_status .= 'Checking for <strong>Main Program</strong> Update...<br>';
        $update_status .= run_script_update("Main Program (main.php)", "main", $poll_version, $context);
        //****************************************************
        $update_status .= 'Checking for <strong>Peer List Manager</strong> Update...<br>';
        $update_status .= run_script_update("Peer List Manager (peerlist.php)", "peerlist", $poll_version, $context);
        //****************************************************
        $update_status .= 'Checking for <strong>Transaction Queue Manager</strong> Update...<br>';
        $update_status .= run_script_update("Transaction Queue Manager (queueclerk.php)", "queueclerk", $poll_version, $context);
        //****************************************************
        $update_status .= 'Checking for <strong>Timekoin Module Status</strong> Update...<br>';
        $update_status .= run_script_update("Timekoin Module Status (status.php)", "status", $poll_version, $context);
        //****************************************************
        $update_status .= 'Checking for <strong>Web Interface Template</strong> Update...<br>';
        $update_status .= run_script_update("Web Interface Template (templates.php)", "templates", $poll_version, $context);
        //****************************************************
        $update_status .= 'Checking for <strong>Transaction Clerk</strong> Update...<br>';
        $update_status .= run_script_update("Transaction Clerk (transclerk.php)", "transclerk", $poll_version, $context);
        //****************************************************
        $update_status .= 'Checking for <strong>Treasurer Processor</strong> Update...<br>';
        $update_status .= run_script_update("Treasurer Processor (treasurer.php)", "treasurer", $poll_version, $context);
        //****************************************************
        $update_status .= 'Checking for <strong>Process Watchdog</strong> Update...<br>';
        $update_status .= run_script_update("Process Watchdog (watchdog.php)", "watchdog", $poll_version, $context);
        //****************************************************
        // We do the function storage last because it contains the version info.
        // That way if some unknown error prevents updating the files above, this
        // will allow the user to try again for an update without being stuck in
        // a new version that is half-updated.
        $update_status .= 'Checking for <strong>Function Storage</strong> Update...<br>';
        $update_status .= run_script_update("Function Storage (function.php)", "function", $poll_version, $context);
        //****************************************************
        $finish_message = file_get_contents("https://timekoin.com/tkupdates/v{$poll_version}/ZZZfinish.txt", FALSE, $context, NULL);
        $update_status .= '<br>' . $finish_message;
    } else {
        $update_status .= '<font color="red"><strong>ERROR: Could Not Contact Secure Server https://timekoin.com</strong></font>';
    }
    return $update_status;
}
开发者ID:LoveLeAnon,项目名称:timekoin,代码行数:81,代码来源:function.php

示例2: do_updates

function do_updates()
{
    // Poll timekoin.com for any program updates
    $context = stream_context_create(array('http' => array('header' => 'Connection: close')));
    // Force close socket after complete
    ini_set('user_agent', 'Timekoin Client (GUI) v' . TIMEKOIN_VERSION);
    ini_set('default_socket_timeout', 10);
    // Timeout for request in seconds
    $poll_version = file_get_contents("https://timekoin.com/tkcliupdates/" . NEXT_VERSION, FALSE, $context, NULL, 10);
    $update_status = 'Starting Update Process...<br><br>';
    if (empty($poll_version) == FALSE) {
        //****************************************************
        //Check for CSS updates
        $update_status .= 'Checking for <strong>CSS Template</strong> Update...<br>';
        $update_status .= run_script_update("CSS Template (admin.css)", "admin.css", $poll_version, $context, 0, "css");
        //****************************************************
        //****************************************************
        //Check for javascript updates
        $update_status .= 'Checking for <strong>Javascript Template</strong> Update...<br>';
        $update_status .= run_script_update("Javascript Template (tkgraph.js)", "tkgraph.js", $poll_version, $context, 0, "js");
        //****************************************************
        //****************************************************
        $update_status .= 'Checking for <strong>RSA Code</strong> Update...<br>';
        $update_status .= run_script_update("RSA Code (RSA.php)", "RSA", $poll_version, $context);
        //****************************************************
        $update_status .= 'Checking for <strong>Openssl Template</strong> Update...<br>';
        $update_status .= run_script_update("Openssl Template (openssl.cnf)", "openssl.cnf", $poll_version, $context, 0);
        //****************************************************
        //****************************************************
        $update_status .= 'Checking for <strong>Timekoin Web Interface</strong> Update...<br>';
        $update_status .= run_script_update("Timekoin Web Interface (index.php)", "index", $poll_version, $context);
        //****************************************************
        //****************************************************
        $update_status .= 'Checking for <strong>Timekoin Background Task</strong> Update...<br>';
        $update_status .= run_script_update("Timekoin Background Task (task.php)", "task", $poll_version, $context);
        //****************************************************
        //****************************************************
        $update_status .= 'Checking for <strong>Web Interface Template</strong> Update...<br>';
        $update_status .= run_script_update("Web Interface Template (templates.php)", "templates", $poll_version, $context);
        //****************************************************
        //****************************************************
        // We do the function storage last because it contains the version info.
        // That way if some unknown error prevents updating the files above, this
        // will allow the user to try again for an update without being stuck in
        // a new version that is half-updated.
        $update_status .= 'Checking for <strong>Function Storage</strong> Update...<br>';
        $update_status .= run_script_update("Function Storage (function.php)", "function", $poll_version, $context);
        //****************************************************
        $finish_message = file_get_contents("https://timekoin.com/tkcliupdates/v{$poll_version}/ZZZfinish.txt", FALSE, $context, NULL);
        $update_status .= '<br>' . $finish_message;
        // Reset available update alert
        mysql_query("UPDATE `options` SET `field_data` = '0' WHERE `options`.`field_name` = 'update_available' LIMIT 1");
    } else {
        $update_status .= '<strong>ERROR: Could Not Contact Secure Server https://timekoin.com</strong>';
    }
    return $update_status;
}
开发者ID:LoveLeAnon,项目名称:timekoin,代码行数:57,代码来源:function.php


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