* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* @author [creator, or "Original Author"]
* @license http://bit.ly/aVWqRV PayAsYouGo License
* @copyright Copyright (c) 2010 Broadband Mechanics
* @package PeopleAggregator
*/
require_once dirname(__FILE__) . "/../../config.inc";
ob_start();
$login_required = TRUE;
include_once "web/includes/page.php";
require_once "api/User/User.php";
// PA includes
require_once "api/Logger/Logger.php";
require_once "web/functions.php";
require_once dirname(__FILE__) . "/common.php";
killslashes();
$script_url = self_url();
$_POST = get_proper_post();
// request dispatch
if (isset($_REQUEST['do'])) {
    switch ($_REQUEST['do']) {
        case 'discover':
            if (!isset($_POST['dix:/homesite']) or !strlen($_POST['dix:/homesite'])) {
                default_page('Please enter your homesite');
            } else {
                require_once 'Net/SXIP/Membersite.php';
                $ms = new Net_SXIP_Membersite();
                $response = $ms->discover($_POST['dix:/homesite']);
                if ($ms->isError($response)) {
                    default_page($response->getMessage());
                } else {
示例#2
0
             } else {
                 fputs($fp, html_entity_decode($_POST['fileContent']), strlen(html_entity_decode($_POST['fileContent'])));
             }
             fclose($fp);
             $uploadStatus = false;
             if ($mode == "FTP_BINARY") {
                 $uploadStatus = ftp_put($connection, html_entity_decode($currentDir) . "/" . html_entity_decode($file), $downloadDir . killslashes(html_entity_decode($file)) . "_" . $s, FTP_BINARY);
             } else {
                 $uploadStatus = ftp_put($connection, html_entity_decode($currentDir) . "/" . html_entity_decode($file), $downloadDir . killslashes(html_entity_decode($file)) . "_" . $s, FTP_ASCII);
             }
             if (!$uploadStatus) {
                 $errormessage = sprintf(_('File \'%1$s\' couldn\'t be saved!') . "\n", $file);
             } else {
                 $successmessage = sprintf(_('File \'%1$s\' was saved succesfully!') . "\n", $file);
             }
             unlink($downloadDir . killslashes(html_entity_decode($file)) . "_" . $s);
         }
     } else {
         $errormessage = sprintf(_('Files with this extension can\'t be created/edited!') . "\n", $file);
     }
     if (isset($_GET['op']) && $_GET['op'] != "new" && (isset($_POST['op']) && $_POST['op'] != "new")) {
         if ($file == "") {
             $editAble = false;
             $errormessage = _('Please enter a filename!') . "\n";
         }
     }
     break;
 case "mode":
     if ($_GET['mode'] == "FTP_BINARY") {
         $mode = "FTP_BINARY";
         $_SESSION['mode'] = "FTP_BINARY";