Beispiel #1
0
            $text = '<ul>';
            foreach ($potential as $p_file) {
                $text .= '<li>' . $p_file . '</li>';
            }
            $mes->addWarning($text);
            //$ns -> tablerender(ADLAN_ERR_1, $text);
        }
    }
}
// ---------------------------------------------------------
// auto db update
if ('0' == ADMINPERMS) {
    $sc = e107::getScBatch('admin');
    echo $tp->parseTemplate('{ADMIN_COREUPDATE=alert}', true, $sc);
    require_once e_ADMIN . 'update_routines.php';
    update_check();
}
// end auto db update
/*
if (e_QUERY == 'purge' && getperms('0'))
{
	$admin_log->purge_log_events(false);
}
*/
$td = 1;
// DEPRECATED
function render_links($link, $title, $description, $perms, $icon = FALSE, $mode = FALSE)
{
    return e107::getNav()->renderAdminButton($link, $title, $description, $perms, $icon, $mode);
}
function render_clean()
Beispiel #2
0
*  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 Mycodo. If not, see <http://www.gnu.org/licenses/>.
*
*  Contact at kylegabriel.com
*/
/*
 *
 * System Update
 *
 */
if (isset($_POST['UpdateCheck'])) {
    update_check($install_path, $update_check);
}
if (isset($_POST['UpdateMycodo'])) {
    exec("{$install_path}/cgi-bin/mycodo-wrapper updatecheck 2>&1", $update_check_output, $update_check_return);
    if ($update_check_return) {
        exec("{$install_path}/cgi-bin/mycodo-wrapper update >> /var/www/mycodo/log/update.log &");
        $settings_error = "The update process has begun. You can follow the progress of the update from the Update Log under the Data tab.";
    } else {
        $settings_error = "Error: Cannot update: You are already running the latest version of Mycodo.";
    }
}
if (isset($_POST['RestoreBackup'])) {
    $restore_directory = $_POST['RestoreBackup'];
    exec("{$install_path}/cgi-bin/mycodo-wrapper restore {$restore_directory} >> /var/www/mycodo/log/restore.log &");
    $data_error = "The restore process has begun. You can follow the progress of the restore from the Restore Log under the Data tab.";
}