Пример #1
0
 /**
  * Show confirmation form before removing item from page
  */
 private function pageItems_Delete()
 {
     global $language;
     $id = fix_id($_REQUEST['id']);
     $manager = UserPageItemsManager::getInstance();
     // grab item from database
     $item = $manager->getSingleItem($manager->getFieldNames(), array('id' => $id));
     if ($item->type == user_page::VIDEO) {
         // get video title
         $video_manager = YouTube_VideoManager::getInstance();
         $name = $video_manager->getItemValue('title', array('id' => $item->item));
     } else {
         // get gallery title
         $gallery_manager = GalleryGroupManager::getInstance();
         $name = $gallery_manager->getItemValue('name', array('id' => $item->item));
     }
     // create template
     $template = new TemplateHandler('confirmation.xml', $this->path . 'templates/');
     $template->setMappedModule($this->name);
     // parse template
     $params = array('message' => $this->getLanguageConstant('message_page_item_delete'), 'name' => $name, 'yes_text' => $this->getLanguageConstant('delete'), 'no_text' => $this->getLanguageConstant('cancel'), 'yes_action' => window_LoadContent('user_pages_items_delete', url_Make('transfer_control', 'backend_module', array('module', $this->name), array('backend_action', 'page_items_delete_commit'), array('id', $id))), 'no_action' => window_Close('user_pages_items_delete'));
     $template->restoreXML();
     $template->setLocalParams($params);
     $template->parse();
 }
Пример #2
0
 /**
  * Show confirmation form for user removal
  */
 private function deleteUser()
 {
     $id = fix_id($_REQUEST['id']);
     $manager = UserManager::getInstance();
     $item = $manager->getSingleItem(array('fullname'), array('id' => $id));
     $template = new TemplateHandler('confirmation.xml', $this->parent->path . 'templates/');
     $template->setMappedModule($this->parent->name);
     $params = array('message' => $this->parent->getLanguageConstant('message_users_delete'), 'name' => $item->fullname, 'yes_text' => $this->parent->getLanguageConstant('delete'), 'no_text' => $this->parent->getLanguageConstant('cancel'), 'yes_action' => window_LoadContent('system_users_delete', url_Make('transfer_control', 'backend_module', array('module', $this->parent->name), array('backend_action', 'users_delete_commit'), array('id', $id))), 'no_action' => window_Close('system_users_delete'));
     $template->restoreXML();
     $template->setLocalParams($params);
     $template->parse();
 }
Пример #3
0
 /**
  * Show confirmation form before removing manufacturer
  */
 private function deleteManufacturer()
 {
     global $language;
     $id = fix_id($_REQUEST['id']);
     $manager = ShopManufacturerManager::getInstance();
     $item = $manager->getSingleItem(array('name'), array('id' => $id));
     $template = new TemplateHandler('confirmation.xml', $this->path . 'templates/');
     $template->setMappedModule($this->name);
     $params = array('message' => $this->_parent->getLanguageConstant("message_manufacturer_delete"), 'name' => $item->name[$language], 'yes_text' => $this->_parent->getLanguageConstant("delete"), 'no_text' => $this->_parent->getLanguageConstant("cancel"), 'yes_action' => window_LoadContent('shop_manufacturer_delete', url_Make('transfer_control', 'backend_module', array('module', $this->name), array('backend_action', 'manufacturers'), array('sub_action', 'delete_commit'), array('id', $id))), 'no_action' => window_Close('shop_manufacturer_delete'));
     $template->restoreXML();
     $template->setLocalParams($params);
     $template->parse();
 }
Пример #4
0
 /**
  * Print confirmation dialog prior to group removal
  */
 private function deleteGroup()
 {
     global $language;
     $id = fix_id(fix_chars($_REQUEST['id']));
     $manager = ArticleGroupManager::getInstance();
     $item = $manager->getSingleItem(array('title'), array('id' => $id));
     $template = new TemplateHandler('confirmation.xml', $this->path . 'templates/');
     $template->setMappedModule($this->name);
     $params = array('message' => $this->getLanguageConstant('message_group_delete'), 'name' => $item->title[$language], 'yes_text' => $this->getLanguageConstant('delete'), 'no_text' => $this->getLanguageConstant('cancel'), 'yes_action' => window_LoadContent('article_groups_delete', url_Make('transfer_control', 'backend_module', array('module', $this->name), array('backend_action', 'groups_delete_commit'), array('id', $id))), 'no_action' => window_Close('article_groups_delete'));
     $template->restoreXML();
     $template->setLocalParams($params);
     $template->parse();
 }
Пример #5
0
 /**
  * Show confirmation from before deleting affiliate.
  */
 private function deleteAffiliate()
 {
     if ($_SESSION['level'] < 10) {
         die('Access denied!');
     }
     $id = fix_id($_REQUEST['id']);
     $manager = AffiliatesManager::getInstance();
     $item = $manager->getSingleItem(array('name'), array('id' => $id));
     $template = new TemplateHandler('confirmation.xml', $this->path . 'templates/');
     $template->setMappedModule($this->name);
     $params = array('message' => $this->getLanguageConstant("message_affiliate_delete"), 'name' => $item->name, 'yes_text' => $this->getLanguageConstant("delete"), 'no_text' => $this->getLanguageConstant("cancel"), 'yes_action' => window_LoadContent('affiliates_delete', url_Make('transfer_control', 'backend_module', array('module', $this->name), array('backend_action', 'affiliate_delete_commit'), array('id', $id))), 'no_action' => window_Close('affiliates_delete'));
     $template->restoreXML();
     $template->setLocalParams($params);
     $template->parse();
 }
Пример #6
0
 /**
  * Show confirmation form before deleting category
  */
 private function deleteCategory()
 {
     $id = fix_id($_REQUEST['id']);
     $manager = ShopCategoryManager::getInstance();
     $title = $manager->getItemValue('title', array('id' => $id));
     $template = new TemplateHandler('confirmation.xml', $this->path . 'templates/');
     $template->setMappedModule($this->name);
     $params = array('message' => $this->_parent->getLanguageConstant('message_category_delete'), 'name' => $title, 'yes_text' => $this->_parent->getLanguageConstant('delete'), 'no_text' => $this->_parent->getLanguageConstant('cancel'), 'yes_action' => window_LoadContent('shop_category_delete', url_Make('transfer_control', 'backend_module', array('module', $this->name), array('backend_action', 'categories'), array('sub_action', 'delete_commit'), array('id', $id))), 'no_action' => window_Close('shop_category_delete'));
     $template->restoreXML();
     $template->setLocalParams($params);
     $template->parse();
 }
Пример #7
0
 /**
  * Show confirmation form for interval.
  */
 private function delete_interval()
 {
     global $language;
     $id = fix_id($_REQUEST['id']);
     $manager = IntervalManager::getInstance();
     $item = $manager->getSingleItem(array('days'), array('id' => $id));
     $days = array();
     for ($i = 0; $i < 7; $i++) {
         if ($item->days[$i] == '1') {
             $days[] = $this->getLanguageConstant('label_' . ($i + 1));
         }
     }
     $days = implode(', ', $days);
     $template = new TemplateHandler('confirmation.xml', $this->path . 'templates/');
     $template->setMappedModule($this->name);
     $params = array('message' => $this->getLanguageConstant('message_interval_delete'), 'name' => $days, 'yes_text' => $this->getLanguageConstant('delete'), 'no_text' => $this->getLanguageConstant('cancel'), 'yes_action' => window_LoadContent('delivery_intervals_delete', url_Make('transfer_control', 'backend_module', array('module', $this->name), array('backend_action', 'intervals_delete_commit'), array('id', $id))), 'no_action' => window_Close('delivery_intervals_delete'));
     $template->restoreXML();
     $template->setLocalParams($params);
     $template->parse();
 }
Пример #8
0
 /**
  * Present confirmation dialog before logout
  */
 private function logout()
 {
     $template = new TemplateHandler('confirmation.xml', $this->parent->path . 'templates/');
     $template->setMappedModule($this->parent->name);
     $params = array('message' => $this->parent->getLanguageConstant('message_logout'), 'name' => '', 'yes_text' => $this->parent->getLanguageConstant('logout'), 'no_text' => $this->parent->getLanguageConstant('cancel'), 'yes_action' => window_LoadContent('logout_window', backend_UrlMake($this->parent->name, 'logout_commit')), 'no_action' => window_Close('logout_window'));
     $template->restoreXML();
     $template->setLocalParams($params);
     $template->parse();
 }
Пример #9
0
 /**
  * Delete admin access
  */
 private function deleteAdmin()
 {
     global $language;
     $id = fix_id($_REQUEST['id']);
     $manager = ChatAdminManager::getInstance();
     $user_manager = ChatUserManager::getInstance();
     $room_manager = ChatRoomManager::getInstance();
     $item = $manager->getSingleItem($manager->getFieldNames(), array('id' => $id));
     $user = $user_manager->getItemValue('display_name', array('id' => $item->user));
     $room = $room_manager->getItemValue('name_' . $language, array('id' => $item->room));
     $template = new TemplateHandler('confirmation.xml', $this->path . 'templates/');
     $template->setMappedModule($this->name);
     $params = array('message' => $this->getLanguageConstant("message_chat_admin_delete"), 'name' => "{$user} / {$room}", 'yes_text' => $this->getLanguageConstant("delete"), 'no_text' => $this->getLanguageConstant("cancel"), 'yes_action' => window_LoadContent('chat_admins_delete', url_Make('transfer_control', 'backend_module', array('module', $this->name), array('backend_action', 'admins_delete_commit'), array('id', $id))), 'no_action' => window_Close('chat_admins_delete'));
     $template->restoreXML();
     $template->setLocalParams($params);
     $template->parse();
 }
Пример #10
0
 /**
  * Print confirmation dialog before disabling module
  */
 private function disableModule()
 {
     $module_name = fix_chars($_REQUEST['module_name']);
     $template = new TemplateHandler('confirmation.xml', $this->path . 'templates/');
     $template->setMappedModule($this->name);
     $params = array('message' => $this->getLanguageConstant('message_module_disable'), 'name' => $module_name, 'yes_action' => window_LoadContent($this->name . '_module_dialog', url_Make('transfer_control', 'backend_module', array('module', $this->name), array('backend_action', 'module_disable_commit'), array('module_name', $module_name))), 'yes_text' => $this->getLanguageConstant("disable"), 'no_action' => window_Close($this->name . '_module_dialog'), 'no_text' => $this->getLanguageConstant("cancel"));
     $template->restoreXML();
     $template->setLocalParams($params);
     $template->parse();
 }
Пример #11
0
 /**
  * Show confirmation form before removing activity.
  */
 private function deleteActivity()
 {
     global $language;
     $id = fix_id($_REQUEST['id']);
     $manager = ActivityManager::getInstance();
     $item = $manager->getSingleItem($manager->getFieldNames(), array('id' => $id));
     $template = new TemplateHandler('confirmation.xml', $this->path . 'templates/');
     $template->setMappedModule($this->name);
     $params = array('message' => $this->getLanguageConstant('message_activity_delete'), 'name' => $item->activity . ' - ' . $item->function, 'yes_text' => $this->getLanguageConstant('delete'), 'no_text' => $this->getLanguageConstant('cancel'), 'yes_action' => window_LoadContent('activities_delete', url_Make('transfer_control', 'backend_module', array('module', $this->name), array('backend_action', 'delete_commit'), array('id', $id))), 'no_action' => window_Close('activities_delete'));
     $template->restoreXML();
     $template->setLocalParams($params);
     $template->parse();
 }
Пример #12
0
 /**
  * Show confirmation dialog before deleting
  */
 private function deleteLicense()
 {
     $id = fix_id(fix_chars($_REQUEST['id']));
     $manager = LicenseManager::getInstance();
     $item = $manager->getSingleItem(array('domain'), array('id' => $id));
     $template = new TemplateHandler('confirmation.xml', $this->path . 'templates/');
     $template->setMappedModule($this->name);
     $params = array('message' => $this->getLanguageConstant("message_license_delete"), 'name' => $item->domain, 'yes_text' => $this->getLanguageConstant("delete"), 'no_text' => $this->getLanguageConstant("cancel"), 'yes_action' => window_LoadContent('licenses_delete', url_Make('transfer_control', 'backend_module', array('module', $this->name), array('backend_action', 'delete_commit'), array('id', $id))), 'no_action' => window_Close('licenses_delete'));
     $template->restoreXML();
     $template->setLocalParams($params);
     $template->parse();
 }