Cheetah
export.php
Go to the documentation of this file.
1 <?php
2 
8 require_once( 'inc/header.inc.php' );
9 require_once( CH_DIRECTORY_PATH_INC . 'design.inc.php' );
10 require_once( CH_DIRECTORY_PATH_INC . 'profiles.inc.php' );
11 require_once( CH_DIRECTORY_PATH_INC . 'utils.inc.php' );
12 
13 check_logged();
14 
15 ch_import ('ChWsbExport');
16 
17 if ('popup' === ch_get('action')) {
18  echo PopupBox('ch_profile_export', _t('_adm_txt_langs_export'), $GLOBALS['oSysTemplate']->parseHtmlByName('export.html', array(
19  'content' => $GLOBALS['oFunctions']->loadingBoxInline(),
20  'profile_id' => (int)ch_get('profile_id'),
21  )));
22 }
23 else {
24  $mixedRes = false;
25  if (0 === strcasecmp($_SERVER['REQUEST_METHOD'], 'POST')) {
26  $iProfileId = isAdmin() && (int)ch_get('profile_id') ? (int)ch_get('profile_id') : getLoggedId();
28  }
29 
30  header('Content-Type: text/html; charset=utf-8');
31  if (true === $mixedRes) {
33  echo json_encode(array('err' => 0, 'msg' => _t('_sys_export_success', $aProfile['Email'])));
34  }
35  else {
36  echo json_encode(array('err' => 1, 'msg' => $mixedRes ? $mixedRes : _t('_Error occured')));
37  }
38 }
header
</code > Be careful enabling this directive if you have a redirector script that does not use the< code > Location</code > HTTP header
Definition: URI.MungeResources.txt:10
check_logged
check_logged()
Definition: admin.inc.php:238
ch_import
ch_import($sClassName, $aModule=array())
Definition: utils.inc.php:1218
ch_get
ch_get($sName)
Definition: utils.inc.php:1664
php
isAdmin
isAdmin()
Definition: index.php:649
getLoggedId
getLoggedId()
Definition: profiles.inc.php:32
$aProfile
$aProfile
Definition: flash.php:14
ChWsbExport\generateAllExports
static generateAllExports($iProfileId)
Definition: ChWsbExport.php:83
_t
_t($key, $arg0="", $arg1="", $arg2="")
Definition: languages.inc.php:509
PopupBox
PopupBox($sName, $sTitle, $sContent, $aActions=array())
Definition: design.inc.php:189
getProfileInfo
getProfileInfo($iProfileID=0, $checkActiveStatus=false, $forceCache=false)
Definition: profiles.inc.php:249
$iProfileId
if( $sMembersList) $iProfileId
Definition: communicator.php:29
$GLOBALS
$GLOBALS['iAdminPage']
Definition: advanced_settings.php:10