Пример #1
0
 function popularAction()
 {
     $tblAssetSetting = new Pandamp_Modules_Dms_Catalog_Model_AssetSetting();
     $rowset = $tblAssetSetting->fetchAll("valueText='klinik'", "valueInt DESC", 6);
     $content = 0;
     $data = array();
     foreach ($rowset as $row) {
         $modelCatalog = new Pandamp_Modules_Dms_Catalog_Model_Catalog();
         $decorator = new Pandamp_BeanContext_Decorator($modelCatalog);
         $rowCatalog = $decorator->getCatalogByGuidAsEntity($row->guid);
         $modelCatalogAttribute = new Pandamp_Modules_Dms_Catalog_Model_CatalogAttribute();
         $rowCatalogTitle = $modelCatalogAttribute->getCatalogAttributeValue($rowCatalog->getId(), 'fixedCommentTitle');
         $rowCatalogQuestion = $modelCatalogAttribute->getCatalogAttributeValue($rowCatalog->getId(), 'fixedCommentQuestion');
         $rowCatalogSelectCat = $modelCatalogAttribute->getCatalogAttributeValue($rowCatalog->getId(), 'fixedKategoriKlinik');
         $author = $modelCatalogAttribute->getCatalogAttributeValue($rowCatalog->getId(), 'fixedSelectNama');
         $source = $modelCatalogAttribute->getCatalogAttributeValue($rowCatalog->getId(), 'fixedSelectMitra');
         $data[$content][0] = $rowCatalogTitle;
         $data[$content][1] = $rowCatalogQuestion;
         $data[$content][2] = $rowCatalogSelectCat;
         $data[$content][3] = $row->guid;
         $data[$content][4] = $rowCatalog->getCreatedBy();
         $data[$content][5] = isset($author) ? $author : '';
         $data[$content][6] = isset($source) ? $source : '';
         $data[$content][7] = $row->valueInt;
         $content++;
     }
     $num_rows = count($rowset);
     $this->view->numberOfRows = $num_rows;
     $this->view->data = $data;
 }
Пример #2
0
 function panelIndexAction()
 {
     $tblAssetSetting = new Pandamp_Modules_Dms_Catalog_Model_AssetSetting();
     $rowAsset = $tblAssetSetting->fetchRow("application='INDEX CATALOG'");
     if ($rowAsset) {
         $this->view->valueText = $rowAsset->valueText;
     } else {
         $this->view->valueText = 'None';
     }
 }
Пример #3
0
 function detailAction()
 {
     $catalogGuid = $this->_getParam('guid') ? $this->_getParam('guid') : '';
     $page = $this->_getParam('page') ? $this->_getParam('page') : '';
     // get current ip address
     $ip = Pandamp_Lib_Formater::getRealIpAddr();
     $modelCatalog = new Pandamp_Modules_Dms_Catalog_Model_Catalog();
     $modelCatalogAttribute = new Pandamp_Modules_Dms_Catalog_Model_CatalogAttribute();
     $decorator = new Pandamp_BeanContext_Decorator($modelCatalog);
     $rowset = $decorator->getCatalogByGuidAsEntity($catalogGuid);
     if (isset($rowset)) {
         $modelAsset = new Pandamp_Modules_Dms_Catalog_Model_AssetSetting();
     }
     $decorator = new Pandamp_BeanContext_Decorator($modelAsset);
     $rowAsset = $decorator->getAssetNumOfClickAsEntity($catalogGuid);
     $data = array('guid' => $catalogGuid, 'application' => 'ASSET', 'part' => 'MOST_READABLE_TICKER', 'valueType' => $ip, 'valueInt' => 1, 'valueText' => 'TICKER');
     $asset = $modelAsset->addCounterAsset($rowset->getId(), $data);
     $title = $modelCatalogAttribute->getCatalogAttributeValue($rowset->getId(), 'fixedTitle');
     $subtitle = $modelCatalogAttribute->getCatalogAttributeValue($rowset->getId(), 'fixedSubTitle');
     $content = $modelCatalogAttribute->getCatalogAttributeValue($rowset->getId(), 'fixedContent');
     $description = $modelCatalogAttribute->getCatalogAttributeValue($rowset->getId(), 'fixedDescription');
     $author = $modelCatalogAttribute->getCatalogAttributeValue($rowset->getId(), 'fixedAuthor');
     $array_hari = array(1 => "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu", "Minggu");
     $hari = $array_hari[date("N", strtotime($rowset->getCreatedDate()))];
     // get votes
     $modelVote = new Pandamp_Modules_Extension_Vote_Model_Vote();
     $decorator = new Pandamp_BeanContext_Decorator($modelVote);
     $rowRate = $decorator->getRatingAsEntity($catalogGuid, $ip);
     $val = $rowRate ? $rowRate->getValue() : 0;
     $counter = $rowRate ? $rowRate->getCounter() : 0;
     if ($counter < 1) {
         $count = 0;
     } else {
         $count = $counter;
         //how many votes total
     }
     $current_rating = $val;
     $tense = $count == 1 ? "vote" : "votes";
     //plural form votes/vote
     $rating = @number_format($current_rating / $count, 1);
     $drawrating = '(' . $count . ' ' . $tense . ', average: ' . $rating . ' out of 5)';
     $this->view->title = $title;
     $this->view->subtitle = $subtitle;
     $this->view->content = $content;
     $this->view->description = $description;
     $this->view->author = $author;
     $this->view->date = $hari . ', ' . date("d F Y", strtotime($rowset->getPublishedDate()));
     $this->view->numOfClick = isset($rowAsset) ? $rowAsset->getValueInt() : 0;
     $this->view->drawrating = $drawrating;
     $this->view->catalogGuid = $catalogGuid;
     $this->view->page = $page;
 }
Пример #4
0
 function klideAction()
 {
     $catalogGuid = $this->_getParam('guid') ? $this->_getParam('guid') : '';
     $ip = Pandamp_Lib_Formater::getRealIpAddr();
     $modelCatalog = new Pandamp_Modules_Dms_Catalog_Model_Catalog();
     $modelCatalogAttribute = new Pandamp_Modules_Dms_Catalog_Model_CatalogAttribute();
     $decorator = new Pandamp_BeanContext_Decorator($modelCatalog);
     $rowset = $decorator->getCatalogByGuidAsEntity($catalogGuid);
     if ($rowset) {
         $modelAsset = new Pandamp_Modules_Dms_Catalog_Model_AssetSetting();
         $decorator = new Pandamp_BeanContext_Decorator($modelAsset);
         $rowAsset = $decorator->getAssetNumOfClickAsEntity($catalogGuid);
         $data = array('guid' => $catalogGuid, 'application' => 'ASSET', 'part' => 'MOST_READABLE_CLINIC', 'valueType' => $ip, 'valueInt' => 1, 'valueText' => 'klinik');
         $asset = $modelAsset->addCounterAsset($rowset->getId(), $data);
         $title = $modelCatalogAttribute->getCatalogAttributeValue($rowset->getId(), 'fixedCommentTitle');
         $question = $modelCatalogAttribute->getCatalogAttributeValue($rowset->getId(), 'fixedCommentQuestion');
         $category = $modelCatalogAttribute->getCatalogAttributeValue($rowset->getId(), 'fixedKategoriKlinik');
         $answer = $modelCatalogAttribute->getCatalogAttributeValue($rowset->getId(), 'fixedAnswer');
         $author = $modelCatalogAttribute->getCatalogAttributeValue($rowset->getId(), 'fixedSelectNama');
         $source = $modelCatalogAttribute->getCatalogAttributeValue($rowset->getId(), 'fixedSelectMitra');
         $this->view->title = isset($title) ? $title : '';
         $this->view->question = isset($question) ? $question : '';
         $this->view->category = isset($category) ? $category : '';
         $this->view->answer = isset($answer) ? $answer : '';
         $this->view->author = isset($author) ? $author : '';
         $this->view->source = isset($source) ? $source : '';
         $this->view->createdBy = $rowset->getCreatedBy();
         $this->view->publishedDate = Pandamp_Lib_Formater::get_date($rowset->getPublishedDate());
         $this->view->numofclick = isset($rowAsset) ? $rowAsset->getValueInt() : 0;
         // get votes
         $modelVote = new Pandamp_Modules_Extension_Vote_Model_Vote();
         $decorator = new Pandamp_BeanContext_Decorator($modelVote);
         $rowRate = $decorator->getRatingAsEntity($catalogGuid, $ip);
         $val = $rowRate ? $rowRate->getValue() : 0;
         $counter = $rowRate ? $rowRate->getCounter() : 0;
         if ($counter < 1) {
             $count = 0;
         } else {
             $count = $counter;
             //how many votes total
         }
         $current_rating = $val;
         $tense = $count == 1 ? "vote" : "votes";
         //plural form votes/vote
         $rating = @number_format($current_rating / $count, 1);
         $drawrating = '(' . $count . ' ' . $tense . ', average: ' . $rating . ' out of 5)';
         $this->view->drawrating = $drawrating;
         $this->view->catalogGuid = $catalogGuid;
     }
 }
Пример #5
0
 function indexingCatalogAction()
 {
     $guid = $this->_getParam('guid') ? $this->_getParam('guid') : '';
     $catalogGuid = $this->_getParam('catalogGuid') ? $this->_getParam('catalogGuid') : '';
     $solrAdapter = Pandamp_Search::manager();
     try {
         $solrAdapter->indexCatalog($catalogGuid);
         $tblTmpIndex = new Pandamp_Modules_Extension_Index_Model_TmpIndex();
         $tblTmpIndex->delete("guid='{$guid}'");
         $auth = Zend_Auth::getInstance();
         if ($auth->hasIdentity()) {
             $username = '******' . $auth->getIdentity()->username;
         } else {
             $username = '******';
         }
         // log to assetSetting
         $tblAssetSetting = new Pandamp_Modules_Dms_Catalog_Model_AssetSetting();
         $rowAsset = $tblAssetSetting->fetchRow("application='INDEX CATALOG'");
         if ($rowAsset) {
             $rowAsset->valueText = "Update indexing-catalog at " . date("d-m-Y H:i:s") . $username;
             $rowAsset->valueInt = $rowAsset->valueInt + 1;
         } else {
             $gman = new Pandamp_Core_Guid();
             $catalogGuid = $gman->generateGuid();
             $rowAsset = $tblAssetSetting->fetchNew();
             $rowAsset->guid = $catalogGuid;
             $rowAsset->application = "INDEX CATALOG";
             $rowAsset->part = "KUTU";
             $rowAsset->valueType = "INDEX";
             $rowAsset->valueInt = 0;
             $rowAsset->valueText = "Indexing catalog at " . date("d-m-Y H:i:s") . $username;
         }
         $rowAsset->save();
         $this->view->success = true;
     } catch (Exception $e) {
         $this->view->success = false;
     }
 }
Пример #6
0
 public function reIndexCatalog()
 {
     gc_enable();
     $this->emptyIndex();
     $time_start = microtime(true);
     $solr =& $this->_solr;
     $formater = new Pandamp_Lib_Formater();
     $title = new Pandamp_Controller_Action_Helper_GetCatalogTitle();
     //		$tbl = new Pandamp_Core_Orm_Table_Catalog();
     //		$rowset = $tbl->fetchAll(); //("profileGuid='Pandamp_peraturan'");
     $query = "SELECT * FROM KutuCatalog";
     $results = $this->_conn->query($query);
     $rowset = $results->fetchAll(PDO::FETCH_OBJ);
     $documents = array();
     $rowCount = count($rowset);
     for ($iCount = 0; $iCount < $rowCount; $iCount++) {
         $row = $rowset[$iCount];
         //			if($iCount == 100)
         //				break;
         //			echo 'urutan: '.$iCount .'<br>';
         $nextRow = $rowset[$iCount + 1];
         //			echo 'current guid: '.$row->guid.'  '.'next guid: '.$nextRow->guid.'<br>';
         if ($row->modifiedBy !== $row->createdBy) {
             $modified = '<font color=red>[modifiedBy:<i>' . $row->modifiedBy . '</i>]</font>&nbsp;';
         } else {
             $modified = '';
         }
         echo '<li><span style="font:11px verdana,arial,helvetica,sans-serif;">[urutan:' . $iCount . ']&nbsp;indexing:<font color=green>' . $title->getCatalogTitle($row->guid) . '</font>[current guid: ' . $row->guid . '  ' . 'next guid: ' . $nextRow->guid . '][author:<i>' . $row->createdBy . '</i>]&nbsp;' . $modified . '[createdDate:<i>' . $formater->get_date($row->createdDate) . '</i>]</span></li>';
         $documents[] = $this->_createSolrDocument($row);
         if ($iCount % 500 == 0) {
             try {
                 $solr->addDocuments($documents);
                 $solr->commit();
                 //					$solr->optimize();
                 $documents = array();
             } catch (Exception $e) {
                 //					echo "Error occured when processing record starting from number: ". ($iCount - 1000) . ' to '.$iCount.' '.$row->guid;
                 $log->err($e->getMessage());
                 throw new Zend_Exception($e->getMessage());
                 //					echo $e->getMessage().'<br>';
             }
         }
         flush();
     }
     echo '</ul></div></td></tr></table>';
     try {
         $solr->addDocuments($documents);
         $solr->commit();
         //			$solr->optimize();
     } catch (Exception $e) {
         $log->err($e->getMessage());
         throw new Zend_Exception($e->getMessage());
         //			echo $e->getMessage().'<br>';
     }
     $time_end = microtime(true);
     $time = $time_end - $time_start;
     //		echo'<br>WAKTU EKSEKUSI: '. $time;
     //		$log->info("WAKTU EKSEKUSI: ". $time." indexing catalog ".$iCount." dari ".$rowCount ." ".$username);
     echo '<br><br><span style="font:11px verdana,arial,helvetica,sans-serif;color:#00FF00">WAKTU EKSEKUSI: ' . $time . '<br>indexing catalog ' . $iCount . ' dari ' . $rowCount . '</span>';
     // log to assetSetting
     $tblAssetSetting = new Pandamp_Modules_Dms_Catalog_Model_AssetSetting();
     $rowAsset = $tblAssetSetting->fetchRow("application='INDEX CATALOG'");
     if ($rowAsset) {
         $rowAsset->valueText = "Update {$rowCount} indexing-catalog at " . date("Y-m-d H:i:s") . $username;
         $rowAsset->valueInt = $rowAsset->valueInt + 1;
     } else {
         $gman = new Pandamp_Core_Guid();
         $catalogGuid = $gman->generateGuid();
         $rowAsset = $tblAssetSetting->fetchNew();
         $rowAsset->guid = $catalogGuid;
         $rowAsset->application = "INDEX CATALOG";
         $rowAsset->part = "KUTU";
         $rowAsset->valueType = "INDEX";
         $rowAsset->valueInt = 0;
         $rowAsset->valueText = $rowCount . " Indexing catalog at " . date("Y-m-d H:i:s") . $username;
     }
     $rowAsset->save();
 }
Пример #7
0
 function downloadFile_OldAction()
 {
     $this->_helper->layout()->disableLayout();
     $catalogGuid = $this->_getParam('guid');
     $parentGuid = $this->_getParam('parent');
     $tblCatalog = new Pandamp_Modules_Dms_Catalog_Model_Catalog();
     $rowsetCatalog = $tblCatalog->find($catalogGuid);
     if (count($rowsetCatalog)) {
         $auth = Zend_Auth::getInstance();
         if ($auth->hasIdentity()) {
             $guidUser = $auth->getIdentity()->kopel;
         }
         $tblAsetSetting = new Pandamp_Modules_Dms_Catalog_Model_AssetSetting();
         $rowAset = $tblAsetSetting->find($catalogGuid)->current();
         if ($rowAset) {
             $rowAset->valueInt = $rowAset->valueInt + 1;
         } else {
             $rowAset = $tblAsetSetting->fetchNew();
             $rowAset->guid = $catalogGuid;
             $rowAset->application = "kutu_doc";
             $rowAset->part = isset($guidUser) ? $guidUser : '';
             $rowAset->valueType = gethostbyaddr($_SERVER['REMOTE_ADDR']);
             $rowAset->valueInt = 1;
         }
         $rowAset->save();
         $rowCatalog = $rowsetCatalog->current();
         $rowsetCatAtt = $rowCatalog->findDependentRowsetCatalogAttribute();
         $contentType = $rowsetCatAtt->findByAttributeGuid('docMimeType')->value;
         $filename = $systemname = $rowsetCatAtt->findByAttributeGuid('docSystemName')->value;
         $oriName = $oname = $rowsetCatAtt->findByAttributeGuid('docOriginalName')->value;
         $tblRelatedItem = new Pandamp_Modules_Dms_Catalog_Model_RelatedItem();
         $rowsetRelatedItem = $tblRelatedItem->fetchAll("itemGuid='{$catalogGuid}' AND relateAs='RELATED_FILE'");
         $flagFileFound = false;
         foreach ($rowsetRelatedItem as $rowRelatedItem) {
             if (!$flagFileFound) {
                 $parentGuid = $rowRelatedItem->relatedGuid;
                 $sDir1 = ROOT_DIR . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR . 'files' . DIRECTORY_SEPARATOR . $systemname;
                 $sDir2 = ROOT_DIR . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR . 'files' . DIRECTORY_SEPARATOR . $parentGuid . DIRECTORY_SEPARATOR . $systemname;
                 $sDir3 = ROOT_DIR . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR . 'files' . DIRECTORY_SEPARATOR . $oname;
                 $sDir4 = ROOT_DIR . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR . 'files' . DIRECTORY_SEPARATOR . $parentGuid . DIRECTORY_SEPARATOR . $oname;
                 if (file_exists($sDir1)) {
                     $flagFileFound = true;
                     header("Content-type: {$contentType}");
                     header("Content-Disposition: attachment; filename={$oriName}");
                     @readfile($sDir1);
                     die;
                 } else {
                     if (file_exists($sDir2)) {
                         $flagFileFound = true;
                         header("Content-type: {$contentType}");
                         header("Content-Disposition: attachment; filename={$oriName}");
                         @readfile($sDir2);
                         die;
                     }
                 }
                 if (file_exists($sDir3)) {
                     $flagFileFound = true;
                     header("Content-type: {$contentType}");
                     header("Content-Disposition: attachment; filename={$oriName}");
                     @readfile($sDir3);
                     die;
                 }
                 if (file_exists($sDir4)) {
                     $flagFileFound = true;
                     header("Content-type: {$contentType}");
                     header("Content-Disposition: attachment; filename={$oriName}");
                     @readfile($sDir4);
                     die;
                 } else {
                     $flagFileFound = false;
                     $this->_forward('forbidden', 'browser', 'hold');
                 }
             }
         }
     } else {
         $flagFileFound = false;
         $this->_forward('forbidden', 'browser', 'hold');
     }
 }
Пример #8
0
 protected function _postDelete()
 {
     $registry = Zend_Registry::getInstance();
     $config = $registry->get(Pandamp_Keys::REGISTRY_APP_OBJECT);
     $cdn = $config->getOption('cdn');
     //find related docs and delete them
     $tblRelatedItem = new Pandamp_Modules_Dms_Catalog_Model_RelatedItem();
     $rowsetRelatedDocs = $tblRelatedItem->fetchAll("relatedGuid='{$this->guid}' AND relateAs IN ('RELATED_FILE','RELATED_IMAGE')");
     if (count($rowsetRelatedDocs)) {
         foreach ($rowsetRelatedDocs as $rowRelatedDoc) {
             $tblCatalog = new Pandamp_Modules_Dms_Catalog_Model_Catalog();
             $rowCatalog = $tblCatalog->find($rowRelatedDoc->itemGuid)->current();
             $rowCatalog->delete();
         }
     }
     if ($this->profileGuid == 'kutu_doc') {
         //get parentGuid
         $tblRelatedItem = new Pandamp_Modules_Dms_Catalog_Model_RelatedItem();
         $rowsetRelatedItem = $tblRelatedItem->fetchAll("itemGuid='{$this->guid}' AND relateAs IN ('RELATED_FILE','RELATED_IMAGE')");
         if (count($rowsetRelatedItem)) {
             foreach ($rowsetRelatedItem as $rowRelatedItem) {
                 //must delete the physical files
                 $rowsetCatAtt = $this->findDependentRowsetCatalogAttribute();
                 $systemname = $rowsetCatAtt->findByAttributeGuid('docSystemName')->value;
                 $parentGuid = $rowRelatedItem->relatedGuid;
                 //$sDir1 = ROOT_DIR.DIRECTORY_SEPARATOR.'uploads'.DIRECTORY_SEPARATOR.'files'.DIRECTORY_SEPARATOR.$systemname;
                 //$sDir2 = ROOT_DIR.DIRECTORY_SEPARATOR.'uploads'.DIRECTORY_SEPARATOR.'files'.DIRECTORY_SEPARATOR.$parentGuid.DIRECTORY_SEPARATOR.$systemname;
                 $sDir1 = $cdn['static']['dir']['files'] . "/" . $systemname;
                 $sDir2 = $cdn['static']['dir']['files'] . "/" . $parentGuid . "/" . $systemname;
                 $sDir1_Remote = $cdn['remote']['dir']['files'] . "/" . $systemname;
                 $sDir2_Remote = $cdn['remote']['dir']['files'] . "/" . $parentGuid . "/" . $systemname;
                 if (file_exists($sDir1)) {
                     // delete file
                     unlink($sDir1);
                     // check remote file
                     if (file_exists($sDir1_Remote)) {
                         $this->remoteDeleteFile($sDir1_Remote);
                     }
                 } else {
                     if (file_exists($sDir2)) {
                         //delete file
                         unlink($sDir2);
                         // check remote file
                         if (file_exists($sDir2_Remote)) {
                             $this->remoteDeleteFile($sDir2_Remote);
                         }
                     }
                 }
                 $img1 = $cdn['static']['dir']['images'] . "/" . $systemname;
                 $img2 = $cdn['static']['dir']['images'] . "/" . $parentGuid . "/" . $systemname;
                 $img1_Remote = $cdn['remote']['dir']['images'] . "/" . $systemname;
                 $img2_Remote = $cdn['remote']['dir']['images'] . "/" . $parentGuid . "/" . $systemname;
                 if (file_exists($img1)) {
                     // delete file
                     unlink($img1);
                     // check remote file
                     if (file_exists($img1_Remote)) {
                         $this->remoteDeleteFile($img1_Remote);
                     }
                 } else {
                     if (file_exists($img2)) {
                         //delete file
                         unlink($img2);
                         // check remote file
                         if (file_exists($img2_Remote)) {
                             $this->remoteDeleteFile($img2_Remote);
                         }
                     }
                 }
             }
         }
     }
     //delete from table CatalogAttribute
     $tblCatalogAttribute = new Pandamp_Modules_Dms_Catalog_Model_CatalogAttribute();
     $tblCatalogAttribute->delete("catalogGuid='{$this->guid}'");
     //delete catalogGuid from table CatalogFolder
     $tblCatalogFolder = new Pandamp_Modules_Dms_Catalog_Model_CatalogFolder();
     $tblCatalogFolder->delete("catalogGuid='{$this->guid}'");
     //delete guid from table AssetSetting
     $tblAssetSetting = new Pandamp_Modules_Dms_Catalog_Model_AssetSetting();
     $tblAssetSetting->delete("guid='{$this->guid}'");
     //delete from table relatedItem
     $tblRelatedItem = new Pandamp_Modules_Dms_Catalog_Model_RelatedItem();
     $tblRelatedItem->delete("itemGuid='{$this->guid}'");
     $tblRelatedItem->delete("relatedGuid='{$this->guid}'");
     $indexingEngine = Pandamp_Search::manager();
     try {
         $hits = $indexingEngine->deleteCatalogFromIndex($this->guid);
     } catch (Exception $e) {
     }
     //delete physical catalog folder from uploads/files/[catalogGuid]
     //$sDir = ROOT_DIR.DIRECTORY_SEPARATOR.'uploads'.DIRECTORY_SEPARATOR.'files'.DIRECTORY_SEPARATOR.$this->guid;
     $sDir = $cdn['static']['dir']['files'] . "/" . $this->guid;
     $sDir_Remote = $cdn['remote']['dir']['files'] . "/" . $this->guid;
     try {
         if (is_dir($sDir)) {
             rmdir($sDir);
             // check remote is_dir
             if (is_dir($sDir_Remote)) {
                 $this->remoteRemoveDir($sDir_Remote);
             }
         }
     } catch (Exception $e) {
     }
     //$sDir = ROOT_DIR.DIRECTORY_SEPARATOR.'uploads'.DIRECTORY_SEPARATOR.'images';
     $sDir = $cdn['static']['dir']['images'];
     try {
         if (file_exists($sDir . "/" . $this->guid . ".gif")) {
             unlink($sDir . "/" . $this->guid . ".gif");
         }
         if (file_exists($sDir . "/tn_" . $this->guid . ".gif")) {
             unlink($sDir . "/tn_" . $this->guid . ".gif");
         }
         if (file_exists($sDir . "/" . $this->guid . ".jpg")) {
             unlink($sDir . "/" . $this->guid . ".jpg");
         }
         if (file_exists($sDir . "/tn_" . $this->guid . ".jpg")) {
             unlink($sDir . "/tn_" . $this->guid . ".jpg");
         }
         if (file_exists($sDir . "/" . $this->guid . ".jpeg")) {
             unlink($sDir . "/" . $this->guid . ".jpeg");
         }
         if (file_exists($sDir . "/tn_" . $this->guid . ".jpeg")) {
             unlink($sDir . "/tn_" . $this->guid . ".jpeg");
         }
         if (file_exists($sDir . "/" . $this->guid . ".png")) {
             unlink($sDir . "/" . $this->guid . ".png");
         }
         if (file_exists($sDir . "/tn_" . $this->guid . ".png")) {
             unlink($sDir . "/tn_" . $this->guid . ".png");
         }
     } catch (Exception $e) {
     }
     $sDir = $cdn['remote']['dir']['images'];
     try {
         if (file_exists($sDir . "/" . $this->guid . ".gif")) {
             $this->remoteDeleteFile($sDir . "/" . $this->guid . ".gif");
         }
         if (file_exists($sDir . "/tn_" . $this->guid . ".gif")) {
             $this->remoteDeleteFile($sDir . "/tn_" . $this->guid . ".gif");
         }
         if (file_exists($sDir . "/" . $this->guid . ".jpg")) {
             $this->remoteDeleteFile($sDir . "/" . $this->guid . ".jpg");
         }
         if (file_exists($sDir . "/tn_" . $this->guid . ".jpg")) {
             $this->remoteDeleteFile($sDir . "/tn_" . $this->guid . ".jpg");
         }
         if (file_exists($sDir . "/" . $this->guid . ".jpeg")) {
             $this->remoteDeleteFile($sDir . "/" . $this->guid . ".jpeg");
         }
         if (file_exists($sDir . "/tn_" . $this->guid . ".jpeg")) {
             $this->remoteDeleteFile($sDir . "/tn_" . $this->guid . ".jpeg");
         }
         if (file_exists($sDir . "/" . $this->guid . ".png")) {
             $this->remoteDeleteFile($sDir . "/" . $this->guid . ".png");
         }
         if (file_exists($sDir . "/tn_" . $this->guid . ".png")) {
             $this->remoteDeleteFile($sDir . "/tn_" . $this->guid . ".png");
         }
     } catch (Exception $e) {
     }
 }