Example #1
0
<?php

/*
 * @copyright Copyright (c) 2016, Afterlogic Corp.
 * @license AGPL-3.0
 *
 * This code is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License, version 3,
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License, version 3,
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 */
include_once 'common.php';
include_once AURORA_APP_ROOT_PATH . 'system/api.php';
\CApi::Init();
$oService = \System\Service::SingletonInstance()->Handle();
Example #2
0
 /**
  * 
  * @return mixed
  */
 public function EntryDownload()
 {
     $mResult = false;
     $aPaths = \System\Service::GetPaths();
     $sMethod = empty($aPaths[2]) ? '' : $aPaths[2];
     try {
         if (!empty($sMethod)) {
             $sRawKey = empty($aPaths[3]) ? '' : $aPaths[3];
             $aParameters = CApi::DecodeKeyValues($sRawKey);
             $aParameters['AuthToken'] = empty($aPaths[4]) ? '' : $aPaths[4];
             $aParameters['SharedHash'] = empty($aPaths[5]) ? '' : $aPaths[5];
             $mResult = $this->CallMethod($sMethod, $aParameters, true);
         }
     } catch (\Exception $oException) {
         \CApi::LogException($oException);
         $this->oHttp->StatusHeader(404);
     }
     return $mResult;
 }