本文整理汇总了PHP中AppDocument::remove方法的典型用法代码示例。如果您正苦于以下问题:PHP AppDocument::remove方法的具体用法?PHP AppDocument::remove怎么用?PHP AppDocument::remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AppDocument
的用法示例。
在下文中一共展示了AppDocument::remove方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Publisher
$G_PUBLISH = new Publisher();
$oCase = new Cases();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_MessagesView', '', $oCase->getHistoryMessagesTrackerView($_POST['APP_UID'], $_POST['APP_MSG_UID']));
G::RenderPage('publish', 'raw');
break;
case 'deleteUploadedDocument':
//require_once 'classes/model/AppDocument.php';
$oAppDocument = new AppDocument();
$oAppDocument->remove($_POST['DOC']);
$oCase = new Cases();
$oCase->getAllUploadedDocumentsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED']);
break;
case 'deleteGeneratedDocument':
//require_once 'classes/model/AppDocument.php';
$oAppDocument = new AppDocument();
$oAppDocument->remove($_POST['DOC']);
$oCase = new Cases();
$oCase->getAllGeneratedDocumentsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED']);
break;
/* @Author Erik Amaru Ortiz <erik@colosa.com> */
/* @Author Erik Amaru Ortiz <erik@colosa.com> */
case 'resendMessage':
//require_once 'classes/model/Configuration.php';
G::LoadClass('spool');
$oCase = new Cases();
$data = $oCase->getHistoryMessagesTrackerView($_POST['APP_UID'], $_POST['APP_MSG_UID']);
//print_r($data);
G::LoadClass("system");
$aSetup = System::getEmailConfiguration();
$passwd = $aSetup['MESS_PASSWORD'];
$passwdDec = G::decrypt($passwd, 'EMAILENCRYPT');
示例2: removeDocument
/**
* remove document
*
* @param string $appDocUid
* @return $result will return an object
*/
public function removeDocument ($appDocUid)
{
try {
$oAppDocument = new AppDocument();
$oAppDocument->remove( $appDocUid, 1 ); //always send version 1
$result = new wsResponse( 0, " $appDocUid" );
return $result;
} catch (Exception $e) {
$result = new wsResponse( 100, $e->getMessage() );
return $result;
}
}
示例3: generateHtml2ps_pdf
//.........这里部分代码省略.........
$header_html = '';
$footer_html = '';
$filter = new PreTreeFilterHeaderFooter($header_html, $footer_html);
$pipeline->pre_tree_filters[] = $filter;
if ($GLOBALS['g_config']['renderfields']) {
$pipeline->pre_tree_filters[] = new PreTreeFilterHTML2PSFields();
}
if ($GLOBALS['g_config']['method'] === 'ps') {
$pipeline->layout_engine = new LayoutEnginePS();
} else {
$pipeline->layout_engine = new LayoutEngineDefault();
}
$pipeline->post_tree_filters = array();
if ($GLOBALS['g_config']['pslevel'] == 3) {
$image_encoder = new PSL3ImageEncoderStream();
} else {
$image_encoder = new PSL2ImageEncoderStream();
}
switch ($GLOBALS['g_config']['method']) {
case 'fastps':
if ($GLOBALS['g_config']['pslevel'] == 3) {
$pipeline->output_driver = new OutputDriverFastPS($image_encoder);
} else {
$pipeline->output_driver = new OutputDriverFastPSLevel2($image_encoder);
}
break;
case 'pdflib':
$pipeline->output_driver = new OutputDriverPDFLIB16($GLOBALS['g_config']['pdfversion']);
break;
case 'fpdf':
$pipeline->output_driver = new OutputDriverFPDF();
break;
case 'png':
$pipeline->output_driver = new OutputDriverPNG();
break;
case 'pcl':
$pipeline->output_driver = new OutputDriverPCL();
break;
default:
die('Unknown output method');
}
if (isset($GLOBALS['g_config']['watermarkhtml'])) {
$watermark_text = $GLOBALS['g_config']['watermarkhtml'];
} else {
$watermark_text = '';
}
$pipeline->output_driver->set_watermark($watermark_text);
if ($watermark_text != '') {
$dispatcher =& $pipeline->getDispatcher();
}
if ($GLOBALS['g_config']['debugbox']) {
$pipeline->output_driver->set_debug_boxes(true);
}
if ($GLOBALS['g_config']['draw_page_border']) {
$pipeline->output_driver->set_show_page_border(true);
}
if ($GLOBALS['g_config']['ps2pdf']) {
$pipeline->output_filters[] = new OutputFilterPS2PDF($GLOBALS['g_config']['pdfversion']);
}
if ($GLOBALS['g_config']['compress'] && $GLOBALS['g_config']['method'] == 'fastps') {
$pipeline->output_filters[] = new OutputFilterGZip();
}
if (!isset($GLOBALS['g_config']['process_mode'])) {
$GLOBALS['g_config']['process_mode'] = '';
}
if ($GLOBALS['g_config']['process_mode'] == 'batch') {
$filename = 'batch';
} else {
$filename = $sFilename;
}
switch ($GLOBALS['g_config']['output']) {
case 0:
$pipeline->destination = new DestinationBrowser($filename);
break;
case 1:
$pipeline->destination = new DestinationDownload($filename);
break;
case 2:
$pipeline->destination = new DestinationFile($filename);
break;
}
copy($sPath . $sFilename . '.html', PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.html');
try {
$status = $pipeline->process((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . '/files/' . $_SESSION['APPLICATION'] . '/outdocs/' . $sFilename . '.html', $g_media);
copy(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.pdf', $sPath . $sFilename . '.pdf');
unlink(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.pdf');
unlink(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.html');
} catch (Exception $e) {
if ($e->getMessage() == 'ID_OUTPUT_NOT_GENERATE') {
include_once 'classes/model/AppDocument.php';
$dataDocument = explode('_', $sFilename);
if (!isset($dataDocument[1])) {
$dataDocument[1] = 1;
}
$oAppDocument = new AppDocument();
$oAppDocument->remove($dataDocument[0], $dataDocument[1]);
G::SendTemporalMessage(G::LoadTranslation('ID_OUTPUT_NOT_GENERATE'), 'Error');
}
}
}
示例4: removeCase
public function removeCase($sAppUid)
{
try {
$this->getExecuteTriggerProcess($sAppUid, 'DELETED');
$oAppDelegation = new AppDelegation();
$oAppDocument = new AppDocument();
//Delete the delegations of a application
$oCriteria2 = new Criteria('workflow');
$oCriteria2->add(AppDelegationPeer::APP_UID, $sAppUid);
$oDataset2 = AppDelegationPeer::doSelectRS($oCriteria2);
$oDataset2->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset2->next();
while ($aRow2 = $oDataset2->getRow()) {
$oAppDelegation->remove($sAppUid, $aRow2['DEL_INDEX']);
$oDataset2->next();
}
//Delete the documents assigned to a application
$oCriteria2 = new Criteria('workflow');
$oCriteria2->add(AppDocumentPeer::APP_UID, $sAppUid);
$oDataset2 = AppDocumentPeer::doSelectRS($oCriteria2);
$oDataset2->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset2->next();
while ($aRow2 = $oDataset2->getRow()) {
$oAppDocument->remove($aRow2['APP_DOC_UID'], $aRow2['DOC_VERSION']);
$oDataset2->next();
}
//Delete the actions from a application
$oCriteria2 = new Criteria('workflow');
$oCriteria2->add(AppDelayPeer::APP_UID, $sAppUid);
AppDelayPeer::doDelete($oCriteria2);
//Delete the messages from a application
$oCriteria2 = new Criteria('workflow');
$oCriteria2->add(AppMessagePeer::APP_UID, $sAppUid);
AppMessagePeer::doDelete($oCriteria2);
//Delete the threads from a application
$oCriteria2 = new Criteria('workflow');
$oCriteria2->add(AppThreadPeer::APP_UID, $sAppUid);
AppThreadPeer::doDelete($oCriteria2);
//Delete the events from a application
$criteria = new Criteria("workflow");
$criteria->add(AppEventPeer::APP_UID, $sAppUid);
AppEventPeer::doDelete($criteria);
//Delete the histories from a application
$criteria = new Criteria("workflow");
$criteria->add(AppHistoryPeer::APP_UID, $sAppUid);
AppHistoryPeer::doDelete($criteria);
//Delete the notes from a application
$criteria = new Criteria("workflow");
//.........这里部分代码省略.........
示例5: AppDocument
* 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
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/* Permissions */
switch ($RBAC->userCanAccess('PM_CASES')) {
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
/* Includes */
require_once "classes/model/AppDocumentPeer.php";
G::LoadClass('case');
/* GET , POST & $_SESSION Vars */
/* Process the info */
$oAppDocument = new AppDocument();
$oAppDocument->remove($_GET['DOC']);
/* Redirect */
G::header('location: ' . $_SERVER['HTTP_REFERER']);
示例6: documentdelete
function documentdelete()
{
include_once ("classes/model/AppDocument.php");
$oAppDocument = new AppDocument ();
$oAppDocument->remove($_POST['sFileUID'],$_POST['docVersion']);
/*we need to delete fisicaly the file use the follow code
$appId= "00000000000000000000000000000000";
$sPathName = PATH_DOCUMENT . $appId . PATH_SEP;
unlink($sPathName.$_POST['sFileUID'].'_1.jpg');*/
}
示例7: removeCase
public function removeCase($sAppUid)
{
try {
$oApplication = new Application();
$oAppDelegation = new AppDelegation();
$oAppDocument = new AppDocument();
//Delete the delegations of a application
$oCriteria2 = new Criteria('workflow');
$oCriteria2->add(AppDelegationPeer::APP_UID, $sAppUid);
$oDataset2 = AppDelegationPeer::doSelectRS($oCriteria2);
$oDataset2->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset2->next();
while ($aRow2 = $oDataset2->getRow()) {
$oAppDelegation->remove($sAppUid, $aRow2['DEL_INDEX']);
$oDataset2->next();
}
//Delete the documents assigned to a application
$oCriteria2 = new Criteria('workflow');
$oCriteria2->add(AppDocumentPeer::APP_UID, $sAppUid);
$oDataset2 = AppDocumentPeer::doSelectRS($oCriteria2);
$oDataset2->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset2->next();
while ($aRow2 = $oDataset2->getRow()) {
$oAppDocument->remove($aRow2['APP_DOC_UID'], $aRow2['DOC_VERSION']);
$oDataset2->next();
}
//Delete the actions from a application
$oCriteria2 = new Criteria('workflow');
$oCriteria2->add(AppDelayPeer::APP_UID, $sAppUid);
AppDelayPeer::doDelete($oCriteria2);
//Delete the messages from a application
$oCriteria2 = new Criteria('workflow');
$oCriteria2->add(AppMessagePeer::APP_UID, $sAppUid);
AppMessagePeer::doDelete($oCriteria2);
//Delete the threads from a application
$oCriteria2 = new Criteria('workflow');
$oCriteria2->add(AppThreadPeer::APP_UID, $sAppUid);
AppThreadPeer::doDelete($oCriteria2);
//Before delete verify if is a child case
$oCriteria2 = new Criteria('workflow');
$oCriteria2->add(SubApplicationPeer::APP_UID, $sAppUid);
$oCriteria2->add(SubApplicationPeer::SA_STATUS, 'ACTIVE');
if (SubApplicationPeer::doCount($oCriteria2) > 0) {
G::LoadClass('derivation');
$oDerivation = new Derivation();
$oDerivation->verifyIsCaseChild($sAppUid);
}
//Delete the registries in the table SUB_APPLICATION
$oCriteria2 = new Criteria('workflow');
$oCriteria2->add(SubApplicationPeer::APP_UID, $sAppUid);
SubApplicationPeer::doDelete($oCriteria2);
$oCriteria2 = new Criteria('workflow');
$oCriteria2->add(SubApplicationPeer::APP_PARENT, $sAppUid);
SubApplicationPeer::doDelete($oCriteria2);
$oApp = new Application();
$result = $oApp->remove($sAppUid);
//delete application from index
if ($this->appSolr != null) {
$this->appSolr->deleteApplicationSearchIndex($sAppUid);
}
return $result;
} catch (exception $e) {
throw $e;
}
}
示例8: removeTest
function removeTest($aTestData, $aFields)
{
$oAppDocument = new AppDocument();
try {
return $oAppDocument->remove($aFields['APP_DOC_UID']);
} catch (Exception $oError) {
return $oError;
}
}