Example #1
0
/**
 * @param App $a
 * @return string
 */
function admin_page_remoteupdate(&$a)
{
    if (!is_site_admin()) {
        return login(false);
    }
    $canwrite = canWeWrite();
    $canftp = function_exists('ftp_connect');
    $needupdate = true;
    $u = checkUpdate();
    if (!is_array($u)) {
        $needupdate = false;
        $u = array('', '', '');
    }
    $tpl = get_markup_template("admin_remoteupdate.tpl");
    return replace_macros($tpl, array('$baseurl' => $a->get_baseurl(true), '$submit' => t("Update now"), '$close' => t("Close"), '$localversion' => FRIENDICA_VERSION, '$remoteversion' => $u[1], '$needupdate' => $needupdate, '$canwrite' => $canwrite, '$canftp' => $canftp, '$ftphost' => array('ftphost', t("FTP Host"), '', ''), '$ftppath' => array('ftppath', t("FTP Path"), '/', ''), '$ftpuser' => array('ftpuser', t("FTP User"), '', ''), '$ftppwd' => array('ftppwd', t("FTP Password"), '', ''), '$remotefile' => array('remotefile', '', $u['2'], '')));
}
Example #2
0
    function getAvailableTariffs()
    {
        $tariffTable = new table('tariff');
        $allTariffs = $tariffTable->load();
        $availableTariffs = array();
        $userCity = $this->data['city'];
        for ($i = 0; $i < count($allTariffs); $i++) {
            $tariff = $allTariffs[$i];
            if (in_array($userCity, $tariff['city']) && $tariff['public'] === 1) {
                $availableTariffs[$tariff['id']] = $tariff;
            }
        }
        return $availableTariffs;
    }
}
checkUpdate();
session_start();
if (strpos($_SERVER['REQUEST_URI'], 'auth.php') === false && strpos($_SERVER['REQUEST_URI'], '/login.php') === false) {
    $_SESSION['url'] = substr($_SERVER['REQUEST_URI'], strrpos($_SERVER['REQUEST_URI'], '/'));
}
if (!isset($_SESSION['id']) && configgetvalue('system', 'ucp', NULL, 'IPautoLogin')) {
    $user = new User($ipRequest);
    if (configgetvalue('system', 'ucp', NULL, 'restrictUsersLoggedByIP')) {
        $user->isRestricted = true;
        $_SESSION['is_restricted'] = true;
    }
} else {
    if (!isset($_SESSION['id'])) {
        $user = new User();
    } else {
        if ($_SESSION['id'] === 0) {
Example #3
0
 private function initialize()
 {
     $this->tpl = new RainTPL();
     $this->tpl->assign('newversion', escape(checkUpdate()));
     $this->tpl->assign('feedurl', escape(indexUrl()));
     $searchcrits = '';
     // Search criteria
     if (!empty($_GET['searchtags'])) {
         $searchcrits .= '&searchtags=' . urlencode($_GET['searchtags']);
     } elseif (!empty($_GET['searchterm'])) {
         $searchcrits .= '&searchterm=' . urlencode($_GET['searchterm']);
     }
     $this->tpl->assign('searchcrits', $searchcrits);
     $this->tpl->assign('source', indexUrl());
     $this->tpl->assign('version', shaarli_version);
     $this->tpl->assign('scripturl', indexUrl());
     $this->tpl->assign('pagetitle', 'Shaarli');
     $this->tpl->assign('privateonly', !empty($_SESSION['privateonly']));
     // Show only private links?
     if (!empty($GLOBALS['title'])) {
         $this->tpl->assign('pagetitle', $GLOBALS['title']);
     }
     if (!empty($GLOBALS['titleLink'])) {
         $this->tpl->assign('titleLink', $GLOBALS['titleLink']);
     }
     if (!empty($GLOBALS['pagetitle'])) {
         $this->tpl->assign('pagetitle', $GLOBALS['pagetitle']);
     }
     $this->tpl->assign('shaarlititle', empty($GLOBALS['title']) ? 'Shaarli' : $GLOBALS['title']);
     return;
 }
Example #4
0
 private function initialize()
 {
     global $blog_settings;
     $this->tpl = new RainTPL();
     $this->tpl->assign('newversion', checkUpdate());
     $this->tpl->assign('feedurl', htmlspecialchars(indexUrl()));
     $searchcrits = '';
     // Search criteria
     if (!empty($_GET['searchtags'])) {
         $searchcrits .= '&searchtags=' . urlencode($_GET['searchtags']);
     } elseif (!empty($_GET['searchterm'])) {
         $searchcrits .= '&searchterm=' . urlencode($_GET['searchterm']);
     }
     $this->tpl->assign('searchcrits', $searchcrits);
     $this->tpl->assign('source', indexUrl());
     $this->tpl->assign('version', shaarli_version);
     $this->tpl->assign('scripturl', indexUrl());
     $this->tpl->assign('pagetitle', 'Shaarli');
     $this->tpl->assign('privateonly', !empty($_SESSION['privateonly']));
     // Show only private links ?
     if (!empty($GLOBALS['title'])) {
         $this->tpl->assign('pagetitle', $GLOBALS['title']);
     }
     if (!empty($GLOBALS['pagetitle'])) {
         $this->tpl->assign('pagetitle', $GLOBALS['pagetitle']);
     }
     $this->tpl->assign('shaarlititle', empty($GLOBALS['title']) ? 'Shaarli' : $GLOBALS['title']);
     $this->tpl->assign('planet_url', BP_PLANET_URL);
     $this->tpl->assign('planet_title', $blog_settings->get('planet_title'));
     global $core;
     $this->tpl->assign('shaarliuser', $core->auth->userID());
     return;
 }
Example #5
0
<?php

/************************************************************
 * InfiniteWP Admin panel									*
 * Copyright (c) 2012 Revmakx								*
 * www.revmakx.com											*
 *															*
 ************************************************************/
define('UPDATE_PAGE', true);
include 'includes/app.php';
if (!empty($_GET['downloadToken'])) {
    $GLOBALS['downloadToken'] = $_GET['downloadToken'];
}
if ($_GET['action'] == 'appUpdate' && !empty($_GET['newVersion'])) {
    $updateAvailable = checkUpdate(false, false);
    if ($_GET['newVersion'] == $updateAvailable['newVersion']) {
        echo str_pad(' ', 400);
        ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Updating</title>
</head>
<body style="font-family: 'Open Sans', sans-serif; font-size:12px; color: #555; line-height:24px;">
<div style="margin-top:-30px;"><?php 
        processAppUpdate();
        ?>
</div>
</body>
</html>
Example #6
0
$isAddonSuiteMiniLimitExceeded = panelRequestManager::checkIsAddonSuiteMiniLimitExceeded();
$isMiniExpired = panelRequestManager::checkIsMiniExpired();
$addonSuiteMiniActivity = panelRequestManager::getAddonSuiteMiniActivity();
$addonSuiteMiniLimit = panelRequestManager::getAddonSuiteMiniLimit();
$IDToBeUpgradedFromMini = panelRequestManager::getIDToBeUpgradedFromMini();
$IDForAddonSuite = panelRequestManager::getIDForAddonSuite();
$priceForSuiteUpgradedFromMini = panelRequestManager::getPriceForSuiteUpgradedFromMini();
$priceForAddonSuite = panelRequestManager::getPriceForAddonSuite();
$addonSuiteLimitExceededIllegally = json_encode(Reg::get('addonSuiteLimitExceededIllegally'));
$mainJson = json_encode(panelRequestManager::getSitesUpdates());
$toolTipData = json_encode(panelRequestManager::getUserHelp());
$favourites = json_encode(panelRequestManager::getFavourites());
$sitesData = json_encode(panelRequestManager::getSites());
$sitesListData = json_encode(panelRequestManager::getSitesList());
$groupData = json_encode(panelRequestManager::getGroupsSites());
$updateAvailable = json_encode(checkUpdate(false, false));
$updateAvailableNotify = json_encode(panelRequestManager::isUpdateHideNotify());
$totalSettings = json_encode(array("data" => panelRequestManager::requiredData(array("getSettingsAll" => 1))));
$fixedNotifications = json_encode(getNotifications(true));
$cronFrequency = json_encode(getRealSystemCronRunningFrequency());
$clientUpdatesAvailable = json_encode(panelRequestManager::getClientUpdateAvailableSiteIDs());
$purchasedAddons = json_encode(Reg::get('purchasedAddons'));
$allAddonsBought = json_encode(Reg::get('addonDetails'));
//$allAddonsBought = json_encode(Reg::get('activeAddons'));
//$allAddonsBought = json_encode(Reg::get('allPurchasedAddonsNameAndSlug'));
$multiUserAllowAccess = json_encode(panelRequestManager::requiredData(array("multiUserAllowAccess" => 1)));
//for notification center html
$notifCenterData = json_encode(panelRequestManager::requiredData(array("updateNotificationContent" => 1)));
$min = '.min';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Example #7
0
function runOffBrowserLoad()
{
    $GLOBALS['offline'] = true;
    checkUpdate();
    anonymousDataRunCheck();
    checkRawHistoryAndDelete();
    autoSelectConnectionMethod();
    if (manageEasyCron::isActive()) {
        manageEasyCron::manageCronEnable();
    }
    $temp = array();
    setHook('runOffBrowserLoad', $temp);
}
Example #8
0
 public static function forceCheckUpdate()
 {
     if (userStatus() == "admin") {
         return checkUpdate(true);
     } else {
         return false;
     }
 }