public function _tags_delete()
 {
     $tag = new ArticleTagEntity($_GET['id']);
     $tag->deleteObject();
     Messages::sendGreenAlert('Tag deleted');
     App::add('Tag ' . $tag->getTitle() . ' deleted');
     if (IS_AJAX_REQUEST) {
         die('1');
     }
     go('?p=' . P . '&do=tags');
 }
 public function _delete()
 {
     $id = abs((int) $_GET['id']);
     if (!$id) {
         return;
     }
     $subscriber = new EmailSubscriberEntity($id);
     $subscriber->deleteObject();
     App::add('Email Subscriber with email  "' . $subscriber->getEmail() . '" deleted');
     Messages::sendMessage('Subscriber deleted');
     back();
 }
Esempio n. 3
0
 public static function _categories_delete()
 {
     if (!isset($_GET['id']) || !ctype_digit((string) $_GET['id'])) {
         return;
     }
     $id = $_GET['id'];
     $category = new FaqCategoryEntity($id);
     $category->deleteObject();
     App::add('Category ' . $category->getTitle() . ' deleted');
     Messages::sendMessage('Category deleted');
     back();
 }
Esempio n. 4
0
 /**
  * Action for Edit contents
  */
 public function _edit_content()
 {
     $dir =& $_GET['path'];
     if (isset($dir[0]) && $dir[0] == '/') {
         $dir = substr($dir, 1);
     }
     if (!is_file(DIR_BASE . $dir)) {
         error('Not a file');
     }
     file_put_contents(DIR_BASE . $dir, $_POST['content']);
     App::add('Content of file "' . $_POST['name'] . '" edited');
     Messages::sendGreenAlert('Content of file "' . $_POST['name'] . '" edited');
     $path_to_dir = explode('/', $dir);
     array_pop($path_to_dir);
     go('?p=' . P . '&do=show_files&nomenu&path=' . implode('/', $path_to_dir) . '/');
 }
<?php

defined('INC') or exit;
use TMCms\Admin\Messages;
use TMCms\Cache\Cacher;
use TMCms\Config\Configuration;
use TMCms\Log\App;
use TMCms\Network\Mailer;
Mailer::getInstance()->setSubject('Message from ' . Configuration::getInstance()->get('site')['name'] . ' (' . CFG_DOMAIN . ')')->setSender(Configuration::getInstance()->get('site')['email'], Configuration::getInstance()->get('site')['name'])->setRecipient(CMS_SUPPORT_EMAIL, CMS_NAME)->setMessage($_POST['message'])->send();
Cacher::getInstance()->getDefaultCacher()->set('cms_home_support_email', NOW);
App::add('Message sent to developers');
Messages::sendGreenAlert('Message sent to developers');
back();
Esempio n. 6
0
 public function _delete()
 {
     $id = abs((int) $_GET['id']);
     if (!$id) {
         return;
     }
     $entity = $this->getRealEntityInUse($id);
     $name = $this->getRealEntityName($entity);
     $entity->deleteObject();
     App::add($name . ' deleted');
     Messages::sendGreenAlert($name . ' deleted');
     back();
 }
 public function _delete()
 {
     $id = abs((int) $_GET['id']);
     if (!$id) {
         return;
     }
     $review = new ReviewEntity($id);
     $review->deleteObject();
     App::add('Review "' . $review->getTitle() . '" deleted');
     Messages::sendMessage('Review deleted');
     back();
 }
Esempio n. 8
0
<?php

defined('INC') or exit;
use TMCms\Admin\Messages;
use TMCms\Admin\Users\Entity\AdminUser;
use TMCms\Log\App;
$user = new AdminUser(USER_ID);
$user->loadDataFromArray($_POST);
$user->save();
App::add('Notes updated');
Messages::sendGreenAlert('Notes updated');
back();
 public function _setting_options_delete()
 {
     $id = abs((int) $_GET['id']);
     if (!$id) {
         return;
     }
     $option = new CustomSettingOption($id);
     $option->deleteObject();
     App::add('Custom Setting Option "' . $option->getOptionName() . '" deleted');
     Messages::sendMessage('Setting Option deleted');
     back();
 }