<?php #---------------------------------------------------------------------- # This file is part of CMS Made Simple module: StripeGate # Copyright (C) 2016 Tom Phane <*****@*****.**> # Refer to licence and other details at the top of file StripeGate.module.php # More info at http://dev.cmsmadesimple.org/projects/stripegate #---------------------------------------------------------------------- if (!$this->CheckPermission('ModifyStripeAccount')) { exit; } $funcs = new StripeGate\Export(); $res = $funcs->Export($this, FALSE, $params['record_id']); if ($res === TRUE) { exit; } unset($funcs); $this->Redirect($id, 'administer', '', array('account_id' => $params['account_id'], 'message' => $this->Lang($res)));
# More info at http://dev.cmsmadesimple.org/projects/stripegate #---------------------------------------------------------------------- if (!$params['selitems']) { $this->Redirect($id, 'defaultadmin'); } if (isset($params['delete'])) { if (!($this->CheckPermission('ModifyStripeGateProperties') || $this->CheckPermission('ModifyStripeAccount'))) { exit; } $pref = cms_db_prefix(); $sql = 'DELETE FROM ' . $pref . 'module_sgt_account WHERE account_id=?'; $sql2 = 'DELETE FROM ' . $pref . 'module_sgt_record WHERE account_id=?'; foreach ($params['selitems'] as $aid) { //TODO delete 'no-longer-needed' uploaded css|icon files $db->Execute($sql, array($aid)); $db->Execute($sql2, array($aid)); } } if (isset($params['export'])) { if (!$this->CheckPermission('ModifyStripeAccount')) { exit; } $funcs = new StripeGate\Export(); $res = $funcs->Export($this, $params['selitems']); if ($res === TRUE) { exit; } unset($funcs); $this->Redirect($id, 'defaultadmin', '', array('message' => $this->Lang($res))); } $this->Redirect($id, 'defaultadmin');
<?php #---------------------------------------------------------------------- # This file is part of CMS Made Simple module: StripeGate # Copyright (C) 2016 Tom Phane <*****@*****.**> # Refer to licence and other details at the top of file StripeGate.module.php # More info at http://dev.cmsmadesimple.org/projects/stripegate #---------------------------------------------------------------------- if (!$this->CheckPermission('ModifyStripeAccount')) { exit; } $funcs = new StripeGate\Export(); $res = $funcs->Export($this, $params['account_id']); if ($res === TRUE) { exit; } unset($funcs); $this->Redirect($id, 'defaultadmin', $returnid, array('message' => $this->Lang($res)));
# Copyright (C) 2016 Tom Phane <*****@*****.**> # Refer to licence and other details at the top of file StripeGate.module.php # More info at http://dev.cmsmadesimple.org/projects/stripegate #---------------------------------------------------------------------- if (!$this->CheckPermission('ModifyStripeAccount')) { exit; } if (!$params['sel']) { $this->Redirect($id, 'administer', '', array('account_id' => $params['account_id'])); } if (isset($params['delete'])) { $pref = cms_db_prefix(); $sql = 'DELETE FROM ' . $pref . 'module_sgt_record WHERE record_id=?'; foreach ($params['sel'] as $rid) { $db->Execute($sql, array($rid)); } $more = $db->GetOne('SELECT record_id FROM ' . $pref . 'module_sgt_record'); if ($more) { $this->Redirect($id, 'administer', '', array('account_id' => $params['account_id'])); } } if (isset($params['export'])) { $funcs = new StripeGate\Export(); $res = $funcs->Export($this, FALSE, $params['sel']); if ($res === TRUE) { exit; } unset($funcs); $this->Redirect($id, 'administer', '', array('account_id' => $params['account_id'], 'message' => $this->Lang($res))); } $this->Redirect($id, 'defaultadmin');