コード例 #1
0
 /**
  * Constructor
  * 
  * @return	@e void
  */
 public function __construct(ipsRegistry $registry)
 {
     /* Get class forums, used for displaying forum names on results */
     if (ipsRegistry::isClassLoaded('class_forums') !== TRUE) {
         $classToLoad = IPSLib::loadLibrary(IPSLib::getAppDir('forums') . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums');
         ipsRegistry::setClass('class_forums', new $classToLoad(ipsRegistry::instance()));
         ipsRegistry::getClass('class_forums')->strip_invisible = 1;
         ipsRegistry::getClass('class_forums')->forumsInit();
     }
     /* Load tagging stuff */
     if (!$registry->isClassLoaded('tags')) {
         require_once IPS_ROOT_PATH . 'sources/classes/tags/bootstrap.php';
         /*noLibHook*/
         $registry->setClass('tags', classes_tags_bootstrap::run('forums', 'topics'));
     }
     /* Get live or archive */
     $this->searchArchives = ipsRegistry::$request['search_app_filters']['forums']['liveOrArchive'] == 'archive' ? true : false;
     if ($this->searchArchives) {
         /* Load up archive class */
         $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/archive/reader.php', 'classes_archive_reader');
         $this->archiveReader = new $classToLoad();
         $this->archiveReader->setApp('forums');
         $this->table = $this->archiveReader->getFields();
         $this->table['_table_'] = 'forums_archive_posts';
         $this->table['_prefix_'] = 'p.archive_';
     } else {
         $this->table = array('_table_' => 'posts', '_prefix_' => 'p.', 'pid' => 'pid', 'author_id' => 'author_id', 'author_name' => 'author_name', 'ip_address' => 'ip_address', 'post_date' => 'post_date', 'post' => 'post', 'queued' => 'queued', 'topic_id' => 'topic_id', 'new_topic' => 'new_topic', 'post_bwoptions' => 'post_bwoptions', 'post_key' => 'post_key', 'post_htmlstate' => 'post_htmlstate', 'use_sig' => 'use_sig', 'use_emo' => 'use_emo', 'append_edit' => 'append_edit', 'edit_time' => 'edit_time', 'edit_name' => 'edit_name', 'post_edit_reason' => 'post_edit_reason');
     }
     parent::__construct($registry);
     /* Set up wrapper */
     $this->templates = array('group' => 'search', 'template' => 'searchResultsAsForum');
 }
コード例 #2
0
ファイル: permissionsSync.php プロジェクト: mover5/imobackup
 /**
  * Constructor
  *
  * @param	object		$registry		Registry object
  * @return	@e void
  */
 public function __construct(ipsRegistry $registry)
 {
     //-----------------------------------------
     // Make shortcuts
     //-----------------------------------------
     $this->cache = $registry->cache();
 }
コード例 #3
0
ファイル: templatesandr.php プロジェクト: mover5/imobackup
 /**
  * Main executable
  *
  * @param	object	registry object
  * @return	@e void
  */
 public function doExecute(ipsRegistry $registry)
 {
     $registry->getClass('class_localization')->loadLanguageFile(array('admin_templates'), 'core');
     //-----------------------------------------
     // Load functions and cache classes
     //-----------------------------------------
     require_once IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php';
     /*noLibHook*/
     require_once IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php';
     /*noLibHook*/
     require_once IPS_ROOT_PATH . 'sources/classes/skins/skinDifferences.php';
     /*noLibHook*/
     $this->skinFunctions = new skinDifferences($registry);
     /* Check... */
     if (!$registry->getClass('class_permissions')->checkPermission('templates_manage', ipsRegistry::$current_application, 'templates')) {
         $this->returnJsonError($registry->getClass('class_localization')->words['sk_ajax_noperm']);
     }
     //-----------------------------------------
     // What shall we do?
     //-----------------------------------------
     switch ($this->request['do']) {
         default:
         case 'getTemplateBitList':
             $this->_getTemplateBitList();
             break;
         case 'replace':
             $this->_replace();
             break;
     }
 }
コード例 #4
0
 /**
  * Constructor
  *
  * @return	@e void
  */
 public function __construct(ipsRegistry $registry)
 {
     $this->registry = $registry;
     $this->DB = $registry->DB();
     $this->settings =& $registry->fetchSettings();
     $this->cache = $this->registry->cache();
     $this->caches =& $this->registry->cache()->fetchCaches();
 }
コード例 #5
0
 /**
  * Constructor
  *
  * @param	object		$registry		Registry object
  * @param	object		$class			Task manager class object
  * @param	array		$task			Array with the task data
  * @return	@e void
  */
 public function __construct(ipsRegistry $registry, $class, $task)
 {
     /* Make registry objects */
     $this->registry = $registry;
     $this->settings = $registry->fetchSettings();
     $this->lang = $this->registry->getClass('class_localization');
     $this->class = $class;
     $this->task = $task;
 }
コード例 #6
0
 /**
  * Constructor
  *
  * @access	public
  * @param	object	ipsRegistry
  * @return	void
  */
 public function __construct(ipsRegistry $registry)
 {
     //-----------------------------------------
     // Could potentially be setup from sessions
     //-----------------------------------------
     if (!$registry->isClassLoaded('ccsFunctions')) {
         require_once IPSLib::getAppDir('ccs') . '/sources/functions.php';
         $registry->setClass('ccsFunctions', new ccsFunctions($registry));
     }
 }
コード例 #7
0
 /**
  * Loads the registry class
  *
  * @return @e void
  */
 public function init()
 {
     /* Path not set? */
     if (!$this->path_to_ipb) {
         /* Constant available? */
         if (defined('DOC_IPS_ROOT_PATH')) {
             $this->path_to_ipb = DOC_IPS_ROOT_PATH;
         } else {
             /* Fallback.. */
             $this->path_to_ipb = dirname(__FILE__) . '/../../';
         }
     }
     /* Load the registry */
     require_once $this->path_to_ipb . 'initdata.php';
     /*noLibHook*/
     require_once $this->path_to_ipb . CP_DIRECTORY . '/sources/base/ipsRegistry.php';
     /*noLibHook*/
     $this->registry = ipsRegistry::instance();
     $this->registry->init();
     /* Make registry shortcuts */
     $this->DB = $this->registry->DB();
     $this->settings =& $this->registry->fetchSettings();
     $this->request =& $this->registry->fetchRequest();
     $this->lang = $this->registry->getClass('class_localization');
     $this->member = $this->registry->member();
     $this->memberData =& $this->registry->member()->fetchMemberData();
     $this->cache = $this->registry->cache();
     $this->caches =& $this->registry->cache()->fetchCaches();
     /* INIT Child? */
     if (method_exists($this, 'childInit')) {
         $this->childInit();
     }
 }
コード例 #8
0
 /**
  * Main class entry point
  *
  * @access	public
  * @param	object		ipsRegistry reference
  * @return	void		[Outputs to screen]
  */
 public function doExecute(ipsRegistry $registry)
 {
     //-----------------------------------------
     // Load HTML
     //-----------------------------------------
     $this->html = $this->registry->output->loadTemplate('cp_skin_filemanager');
     //-----------------------------------------
     // Set up stuff
     //-----------------------------------------
     $this->form_code = $this->html->form_code = 'module=pages&section=manage';
     $this->form_code_js = $this->html->form_code_js = 'module=pages&section=manage';
     //-----------------------------------------
     // Load Language
     //-----------------------------------------
     ipsRegistry::getClass('class_localization')->loadLanguageFile(array('admin_lang'));
     //-----------------------------------------
     // Grab extra CSS
     //-----------------------------------------
     $this->registry->output->addToDocumentHead('importcss', $this->settings['skin_app_url'] . 'css/ccs.css');
     //-----------------------------------------
     // Get existing folders
     //-----------------------------------------
     $this->DB->build(array('select' => '*', 'from' => 'ccs_folders'));
     $this->DB->execute();
     while ($r = $this->DB->fetch()) {
         $this->folders[] = $r['folder_path'];
     }
     //-----------------------------------------
     // What to do?
     //-----------------------------------------
     switch ($this->request['do']) {
         case 'multi':
             $this->_multiAction();
             break;
         case 'deleteFolder':
             $this->_deleteFolder(urldecode($this->request['dir']));
             break;
         case 'emptyFolder':
             $this->_emptyFolder(urldecode($this->request['dir']));
             break;
         case 'doCreateFolder':
             $this->_doCreateFolder();
             break;
         case 'doRenameFolder':
             $this->_doRenameFolder();
             break;
         case 'editFolder':
             $this->_directoryForm('edit');
             break;
         case 'createFolder':
         default:
             $this->_directoryForm('add');
             break;
     }
     //-----------------------------------------
     // Pass to CP output hander
     //-----------------------------------------
     $this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper();
     $this->registry->getClass('output')->sendOutput();
 }
コード例 #9
0
ファイル: groupChangeTask.php プロジェクト: Proyx/PXVip
 public function runTask()
 {
     ipsRegistry::DB()->build(array('select' => '*', 'from' => 'members'));
     $members_vip = $this->DB->execute();
     while ($m = $this->DB->fetch($members_vip)) {
         $vipValido = false;
         ipsRegistry::DB()->build(array('select' => '*', 'from' => 'vips'));
         $vips = ipsRegistry::DB()->execute();
         while ($vip = $this->DB->fetch($vips)) {
             if ($vip['nome'] == $m['name']) {
                 if ($vip[$vip['usando']] > 0) {
                     if ($m['member_group_id'] != $this->settings['pxvip_GrupoVip']) {
                         $this->DB->update('members', array('member_group_id' => $this->settings['pxvip_GrupoVip']), 'member_id=' . $m['member_id']);
                     }
                     $vipValido = true;
                 }
             }
         }
         if ($vipValido == false && $m['member_group_id'] == $this->settings['pxvip_GrupoVip']) {
             $this->DB->update('members', array('member_group_id' => 3), 'member_id=' . $m['member_id']);
         }
     }
     $this->class->appendTaskLog($this->task, $this->lang->words['my_task_log_lang_string']);
     $this->class->unlockTask($this->task);
 }
コード例 #10
0
ファイル: reader.php プロジェクト: Advanture/Online-RolePlay
 /**
  * Constructor
  *
  */
 public function __construct()
 {
     /* Make registry objects */
     $this->registry = ipsRegistry::instance();
     $this->DB = $this->registry->DB();
     $this->settings =& $this->registry->fetchSettings();
     $this->request =& $this->registry->fetchRequest();
     $this->lang = $this->registry->getClass('class_localization');
     $this->member = $this->registry->member();
     $this->memberData =& $this->registry->member()->fetchMemberData();
     $this->cache = $this->registry->cache();
     $this->caches =& $this->registry->cache()->fetchCaches();
     /* Check for class_forums */
     if (ipsRegistry::isClassLoaded('class_forums') !== TRUE) {
         $classToLoad = IPSLib::loadLibrary(IPSLib::getAppDir('forums') . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums');
         $this->registry->setClass('class_forums', new $classToLoad($this->registry));
         $this->registry->class_forums->forumsInit();
     }
     /* Load topic class */
     if (!$this->registry->isClassLoaded('topics')) {
         $classToLoad = IPSLib::loadLibrary(IPSLib::getAppDir('forums') . "/sources/classes/topics.php", 'app_forums_classes_topics', 'forums');
         $this->registry->setClass('topics', new $classToLoad($this->registry));
     }
     /* Language class */
     $this->registry->getClass('class_localization')->loadLanguageFile(array('public_global'), 'core');
     /* Fetch engine class */
     $this->settings['archive_engine'] = $this->settings['archive_engine'] ? $this->settings['archive_engine'] : 'sql';
     /* Load up archive class */
     $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/archive/reader/' . $this->settings['archive_engine'] . '.php', 'classes_archive_reader_' . $this->settings['archive_engine']);
     $this->engine = new $classToLoad();
     $this->fields = $this->registry->topics->getPostTableFields();
 }
 public function __construct()
 {
     $this->registry = ipsRegistry::instance();
     $this->DB = $this->registry->DB();
     $this->settings =& $this->registry->fetchSettings();
     $this->memberData =& $this->registry->member()->fetchMemberData();
 }
コード例 #12
0
 /**
  * This method is called after a member account has been removed
  *
  * @param	string	$ids	SQL IN() clause
  * @return	@e void
  */
 public function onDelete($mids)
 {
     /* Delete Status Updates - note, we can't do this via memberStatus class, since we no longer have the member data */
     ipsRegistry::DB()->delete('member_status_updates', "status_member_id" . $mids);
     ipsRegistry::DB()->delete('member_status_actions', "action_member_id" . $mids);
     ipsRegistry::DB()->delete('member_status_replies', "reply_member_id" . $mids);
 }
コード例 #13
0
ファイル: settings.php プロジェクト: mover5/imobackup
 /**
  * Main class entry point
  *
  * @access	public
  * @param	object		ipsRegistry reference
  * @return	@e void		[Outputs to screen]
  */
 public function doExecute(ipsRegistry $registry)
 {
     //-----------------------------------------
     // Set up stuff
     //-----------------------------------------
     $this->form_code = 'module=settings&section=settings';
     $this->form_code_js = 'module=settings&section=settings';
     //-------------------------------
     // Grab, init and load settings
     //-------------------------------
     $classToLoad = IPSLib::loadActionOverloader(IPSLib::getAppDir('core') . '/modules_admin/settings/settings.php', 'admin_core_settings_settings');
     $settings = new $classToLoad($this->registry);
     $settings->makeRegistryShortcuts($this->registry);
     ipsRegistry::getClass('class_localization')->loadLanguageFile(array('admin_tools'), 'core');
     $settings->html = $this->registry->output->loadTemplate('cp_skin_settings', 'core');
     $settings->form_code = $settings->html->form_code = 'module=settings&section=settings';
     $settings->form_code_js = $settings->html->form_code_js = 'module=settings&section=settings';
     $this->request['conf_title_keyword'] = 'calendar';
     $settings->return_after_save = $this->settings['base_url'] . $this->form_code;
     $settings->_viewSettings();
     //-----------------------------------------
     // Pass to CP output hander
     //-----------------------------------------
     $this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper();
     $this->registry->getClass('output')->sendOutput();
 }
 public function __construct()
 {
     $this->registry = ipsRegistry::instance();
     $this->member = $this->registry->member();
     $this->memberData =& $this->registry->member()->fetchMemberData();
     $this->registry->class_localization->loadLanguageFile(array('public_topic'), 'forums');
 }
コード例 #15
0
 /**
  * @desc			Loads and checks different vars when class is initiating
  * @author			Matthias Reuter
  * @since			2.0
  * @ignore
  */
 public function __construct()
 {
     // check for DB prefix
     if (ipbwi_DB_prefix == '') {
         define('ipbwi_DB_prefix', 'ipbwi_');
     }
     if (defined('ipbwi_LANG')) {
         self::setLang(ipbwi_LANG);
     } else {
         self::setLang('en');
     }
     // initialize IP.board Interface
     require_once ipbwi_ROOT_PATH . 'lib/ips_wrapper.inc.php';
     if (!defined('IPBWI_INCORRECT_BOARD_PATH')) {
         $this->ips_wrapper = new ipbwi_ips_wrapper();
         if (defined('ipbwi_COOKIE_DOMAIN')) {
             $this->board['cookie_domain'] = ipbwi_COOKIE_DOMAIN;
             $this->ips_wrapper->settings['cookie_domain'] = ipbwi_COOKIE_DOMAIN;
             ipsRegistry::$settings['cookie_domain'] = ipbwi_COOKIE_DOMAIN;
         }
         ipsRegistry::cache()->updateCacheWithoutSaving('settings', ipsRegistry::$settings);
         // retrieve common vars
         $this->board = $this->ips_wrapper->settings;
         $this->board['version'] = $this->ips_wrapper->caches['app_cache']['core']['app_version'];
         $this->board['version_long'] = $this->ips_wrapper->caches['app_cache']['core']['app_long_version'];
         $this->board['url'] = str_replace('?', '', $this->ips_wrapper->settings['board_url']) . '/';
         $this->board['name'] = $this->ips_wrapper->settings['board_name'];
         $this->board['basedir'] = ipbwi_BOARD_PATH;
         $this->board['upload_dir'] = $this->ips_wrapper->settings['upload_dir'] . '/';
         $this->board['upload_url'] = $this->ips_wrapper->settings['upload_url'] . '/';
         $this->board['home_name'] = $this->ips_wrapper->settings['home_name'];
         $this->board['home_url'] = $this->ips_wrapper->settings['home_url'] . '/';
         $this->board['emo_url'] = str_replace('<#EMO_DIR#>', 'default', $this->ips_wrapper->settings['emoticons_url']) . '/';
     }
 }
コード例 #16
0
 /**
  * Do some set up after ipsRegistry::init()
  *
  * @access	public
  */
 public function afterOutputInit()
 {
     if (IN_ACP) {
         $this->globalHtml = ipsRegistry::getClass('output')->loadTemplate('cp_skin_convert');
         ipsRegistry::getClass('output')->html .= $this->globalHtml->convertCSS();
     }
 }
コード例 #17
0
ファイル: group_form.php プロジェクト: Orfeous/syncApp
 /**
  * Returns content for the page
  */
 public function getDisplayContent($group = array(), $tabsUsed = 4)
 {
     #Load html template
     $this->html = ipsRegistry::getClass('output')->loadTemplate('cp_skin_syncApp_group_form', 'syncApp');
     #return display stuff
     return array('tabs' => $this->html->acp_group_form_tabs($group, $tabsUsed + 1), 'content' => $this->html->acp_group_form_main($group, $tabsUsed + 1), 'tabsUsed' => 1);
 }
コード例 #18
0
ファイル: rssOutput.php プロジェクト: mover5/imobackup
 /**
  * Grab the RSS document content and return it
  * 
  * @return	string		RSS document
  */
 public function returnRSSDocument()
 {
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $cal_id = intval(ipsRegistry::$request['id']);
     $rss_data = array();
     $to_print = '';
     $this->expires = time();
     $_calendarCache = ipsRegistry::cache()->getCache('calendars');
     //-----------------------------------------
     // Get RSS export
     //-----------------------------------------
     $rss_data = $_calendarCache[$cal_id];
     //-----------------------------------------
     // Got one?
     //-----------------------------------------
     if ($rss_data['cal_id'] and $rss_data['cal_rss_export']) {
         //-----------------------------------------
         // Correct expires time
         //-----------------------------------------
         $this->expires = $rss_data['cal_rss_update_last'] + $rss_data['cal_rss_update'] * 60;
         //-----------------------------------------
         // Need to recache?
         //-----------------------------------------
         if (!$rss_data['cal_rss_cache'] or time() - $rss_data['cal_rss_update'] * 60 > $rss_data['cal_rss_update_last']) {
             $classToLoad = IPSLib::loadLibrary(IPSLib::getAppDir('calendar') . '/sources/cache.php', 'calendar_cache', 'calendar');
             $rss_export = new $classToLoad(ipsRegistry::instance());
             return $rss_export->rebuildCalendarRSSCache($rss_data['cal_id']);
         } else {
             return $rss_data['cal_rss_cache'];
         }
     }
 }
コード例 #19
0
ファイル: warnings.php プロジェクト: mover5/imobackup
 /**
  * Get Content URL
  *
  * @param	array		$warning		Row from members_warn_logs
  * @return	@e array	array( url => URL to the content the warning came from, title => Title )
  */
 public function getContentUrl($warning)
 {
     ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_profile'), 'members');
     if ($warning['wl_content_id1']) {
         $post = ipsRegistry::DB()->buildAndFetch(array('select' => '*', 'from' => 'message_posts', 'where' => "msg_id=" . intval($warning['wl_content_id1'])));
         if (!empty($post['msg_topic_id'])) {
             $topic = ipsRegistry::DB()->buildAndFetch(array('select' => '*', 'from' => 'message_topics', 'where' => "mt_id={$post['msg_topic_id']}"));
             if (!empty($topic['mt_id'])) {
                 ipsRegistry::DB()->build(array('select' => '*', 'from' => 'message_topic_user_map', 'where' => "map_topic_id={$post['msg_topic_id']}"));
                 ipsRegistry::DB()->execute();
                 while ($row = ipsRegistry::DB()->fetch()) {
                     if ($row['map_user_id'] == ipsRegistry::member()->getProperty('member_id')) {
                         return array('url' => ipsRegistry::getClass('output')->buildUrl("app=members&amp;module=messaging&amp;section=view&amp;do=findMessage&amp;topicID={$topic['mt_id']}&amp;msgID={$post['msg_id']}"), 'title' => $topic['mt_title']);
                     }
                 }
                 return array('url' => ipsRegistry::getClass('output')->buildUrl("app=core&module=reports&section=reports&do=showMessage&topicID={$topic['mt_id']}&msg={$post['msg_id']}"), 'title' => $topic['mt_title']);
             }
         }
     } else {
         $member = IPSMember::load($warning['wl_member']);
         if (!empty($member['member_id'])) {
             return array('url' => ipsRegistry::getClass('output')->buildSEOUrl("showuser={$member['member_id']}", 'public', $member['members_seo_name'], 'showuser'), 'title' => ipsRegistry::getClass('class_localization')->words['warnings_profile']);
         }
     }
 }
コード例 #20
0
 /**
  * Constructor
  *
  * @param	ipsRegistry
  */
 public function __construct($registry)
 {
     $this->title = $registry->getClass('class_localization')->words['enhancements_facebook'];
     $this->description = $registry->getClass('class_localization')->words['enhancements_facebook_desc'];
     $this->enabled = ipsRegistry::$settings['fbc_enable'];
     $this->message = '<a href="http://external.ipslink.com/ipboard30/landing/?p=facebook" target="_blank">' . ipsRegistry::getClass('class_localization')->words['enhancements_facebook_help'] . '</a>';
 }
コード例 #21
0
 /**
  * Grab the RSS document content and return it
  *
  * @return	string		RSS document
  */
 public function returnRSSDocument()
 {
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $member_id = intval(ipsRegistry::$request['member_id']);
     $secure_key = IPSText::md5Clean(ipsRegistry::$request['rss_key']);
     $rss_data = array();
     $to_print = '';
     if ($secure_key and $member_id) {
         if ($member_id == ipsRegistry::member()->getProperty('member_id')) {
             //-----------------------------------------
             // Get RSS export
             //-----------------------------------------
             $rss_data = ipsRegistry::DB()->buildAndFetch(array('select' => 'rss_cache', 'from' => 'rc_modpref', 'where' => "mem_id=" . $member_id . " AND rss_key='" . $secure_key . "'"));
             //-----------------------------------------
             // Got one?
             //-----------------------------------------
             if ($rss_data['rss_cache']) {
                 return $rss_data['rss_cache'];
             }
         }
         //-----------------------------------------
         // Create a dummy one
         //-----------------------------------------
         ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_reports'), 'core');
         $classToLoad = IPSLib::loadLibrary(IPS_KERNEL_PATH . 'classRss.php', 'classRss');
         $rss = new $classToLoad();
         $channel_id = $rss->createNewChannel(array('title' => ipsRegistry::getClass('class_localization')->words['rss_feed_title'], 'link' => ipsRegistry::$settings['board_url'], 'description' => ipsRegistry::getClass('class_localization')->words['reports_rss_desc'], 'pubDate' => $rss->formatDate(time())));
         $rss->createRssDocument();
         return $rss->rss_document;
     }
 }
コード例 #22
0
ファイル: tabs.php プロジェクト: mover5/imobackup
 /**
  * Save tab preference order
  *
  * @return	@e void
  */
 protected function _saveTabs()
 {
     //-----------------------------------------
     // Store order
     //-----------------------------------------
     $order = array();
     $append = array();
     foreach ($this->tabKeys as $pos => $key) {
         if ($this->request['pos_' . $key]) {
             $order[$this->request['pos_' . $key]] = $key;
         } else {
             $append[] = $key;
         }
     }
     if (count($append)) {
         $order = array_merge($order, $append);
     }
     ksort($order);
     //-----------------------------------------
     // Save preference
     //-----------------------------------------
     ipsRegistry::getClass('adminFunctions')->staffSaveCookie('tabOrder', $order);
     //-----------------------------------------
     // Return new order
     //-----------------------------------------
     $this->returnJsonArray(array('order' => $order));
 }
コード例 #23
0
 public function __construct()
 {
     $this->registry = ipsRegistry::instance();
     $this->settings = ipsRegistry::fetchSettings();
     $this->lang = $this->registry->getClass('class_localization');
     ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_lang'), 'syncApp');
 }
コード例 #24
0
 /**
  * Main class entry point
  *
  * @access	public
  * @param	object		ipsRegistry reference
  * @return	void		[Outputs to screen]
  */
 public function doExecute(ipsRegistry $registry)
 {
     //-----------------------------------------
     // Load HTML
     //-----------------------------------------
     $this->html = $this->registry->output->loadTemplate('cp_skin_blocks');
     //-----------------------------------------
     // Load Language
     //-----------------------------------------
     ipsRegistry::getClass('class_localization')->loadLanguageFile(array('admin_lang'));
     //-----------------------------------------
     // What to do?
     //-----------------------------------------
     switch ($this->request['do']) {
         case 'reorder':
             $this->_doReorder();
             break;
         case 'reorderCats':
             $this->_doReorderCats();
             break;
         case 'fetchEncoding':
             $this->_fetchEncoding();
             break;
         case 'preview':
         default:
             $this->_showBlockPreview();
             break;
     }
 }
コード例 #25
0
ファイル: templates.php プロジェクト: mover5/imobackup
 public function __construct($skinSet, $template = null, $title = null, $group = null)
 {
     $this->registry = ipsRegistry::instance();
     $this->DB = $this->registry->DB();
     $this->settings =& $this->registry->fetchSettings();
     $this->request =& $this->registry->fetchRequest();
     $this->cache = $this->registry->cache();
     $this->caches =& $this->registry->cache()->fetchCaches();
     /* Require some files for our sabre implementation */
     require_once IPS_ROOT_PATH . 'sources/classes/sabre/root/skins.php';
     /*noLibHook*/
     require_once IPS_ROOT_PATH . 'sources/classes/sabre/directory/templates.php';
     /*noLibHook*/
     require_once IPS_ROOT_PATH . 'sources/classes/sabre/directory/groups.php';
     /*noLibHook*/
     require_once IPS_ROOT_PATH . 'sources/classes/sabre/lock/nolocks.php';
     /*noLibHook*/
     require_once IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php';
     /*noLibHook*/
     require_once IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php';
     /*noLibHook*/
     $this->skinFunctions = new skinCaching($this->registry);
     $this->_skinSet = $skinSet;
     $this->_group = $group;
     if ($template) {
         $this->_template = $template;
         $this->_title = $this->_group == 'css' ? $template['css_group'] : $template['template_name'];
     } else {
         $this->_title = $title;
     }
 }
コード例 #26
0
ファイル: groups.php プロジェクト: ConnorChristie/GrabViews
 public function __construct($group, $skinSet)
 {
     $this->registry = ipsRegistry::instance();
     $this->DB = $this->registry->DB();
     $this->settings =& $this->registry->fetchSettings();
     $this->request =& $this->registry->fetchRequest();
     $this->cache = $this->registry->cache();
     $this->caches =& $this->registry->cache()->fetchCaches();
     /* Require some files for our sabre implementation */
     require_once IPS_ROOT_PATH . 'sources/classes/sabre/root/skins.php';
     /*noLibHook*/
     require_once IPS_ROOT_PATH . 'sources/classes/sabre/directory/templates.php';
     /*noLibHook*/
     require_once IPS_ROOT_PATH . 'sources/classes/sabre/files/templates.php';
     /*noLibHook*/
     require_once IPS_ROOT_PATH . 'sources/classes/sabre/lock/nolocks.php';
     /*noLibHook*/
     require_once IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php';
     /*noLibHook*/
     require_once IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php';
     /*noLibHook*/
     $this->skinFunctions = new skinCaching($this->registry);
     $this->_skinSet = $skinSet;
     $this->_group = $group;
 }
コード例 #27
0
 /**
  * Parse/format the online list data for the records
  *
  * @access	public
  * @author	Brandon Farber
  * @param	array 			Online list rows to check against
  * @return	array 			Online list rows parsed
  */
 public function parseOnlineEntries($rows)
 {
     if (!is_array($rows) or !count($rows)) {
         return $rows;
     }
     $final = array();
     foreach ($rows as $row) {
         if ($row['current_appcomponent'] == 'core') {
             if ($row['current_module'] == 'global') {
                 if ($row['current_section'] == 'login') {
                     $row['where_line'] = ipsRegistry::getClass('class_localization')->words['WHERE_login'];
                 }
             } else {
                 if ($row['current_module'] == 'search') {
                     $row['where_line'] = ipsRegistry::getClass('class_localization')->words['WHERE_search'];
                 } else {
                     if ($row['current_module'] == 'reports') {
                         $rcCache = ipsRegistry::cache()->getCache('report_cache');
                         if (is_array($rcCache)) {
                             if ($rcCache['group_access'][ipsRegistry::member()->getProperty('member_group_id')] == true) {
                                 $row['where_line'] = ipsRegistry::getClass('class_localization')->words['WHERE_reports'];
                             }
                         }
                     }
                 }
             }
         }
         $final[$row['id']] = $row;
     }
     return $final;
 }
コード例 #28
0
 /**
  * Constructor
  *
  * @param	object	Database reference
  * @return	@e void
  */
 public function __construct(&$obj)
 {
     $reg = ipsRegistry::instance();
     $this->member = $reg->member();
     $this->DB = $reg->DB();
     $this->tbl = ips_DBRegistry::getPrefix();
 }
コード例 #29
0
 /**
  * Main class entry point
  *
  * @access	public
  * @param	object		ipsRegistry reference
  * @return	void		[Outputs to screen]
  */
 public function doExecute(ipsRegistry $registry)
 {
     //-----------------------------------------
     // Load HTML
     //-----------------------------------------
     $this->html = $this->registry->output->loadTemplate('cp_skin_templates');
     //-----------------------------------------
     // Set up stuff
     //-----------------------------------------
     $this->form_code = $this->html->form_code = 'module=templates&amp;section=pages';
     $this->form_code_js = $this->html->form_code_js = 'module=templates&section=pages';
     //-----------------------------------------
     // Load Language
     //-----------------------------------------
     ipsRegistry::getClass('class_localization')->loadLanguageFile(array('admin_lang'));
     //-----------------------------------------
     // Grab extra CSS
     //-----------------------------------------
     $this->registry->output->addToDocumentHead('importcss', $this->settings['skin_app_url'] . 'css/ccs.css');
     //-----------------------------------------
     // What to do?
     //-----------------------------------------
     switch ($this->request['do']) {
         case 'add':
         case 'edit':
             $this->_form($this->request['do']);
             break;
         case 'doAdd':
         case 'doEdit':
             $this->_save(strtolower(str_replace('do', '', $this->request['do'])));
             break;
         case 'delete':
             $this->_delete();
             break;
         case 'addCategory':
             $this->_categoryForm('add');
             break;
         case 'editCategory':
             $this->_categoryForm('edit');
             break;
         case 'doAddCategory':
             $this->_categorySave('add');
             break;
         case 'doEditCategory':
             $this->_categorySave('edit');
             break;
         case 'deleteCategory':
             $this->_deleteCategory();
             break;
         default:
             $this->_list();
             break;
     }
     //-----------------------------------------
     // Pass to CP output hander
     //-----------------------------------------
     $this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper();
     $this->registry->getClass('output')->sendOutput();
 }
コード例 #30
0
 /**
  * Construct
  *
  * @param	string		Application (or aai key)
  * @param	string		Area
  * @return	string
  */
 public static function run($app = null, $area = null)
 {
     if (strlen($app) == 32 and $area === null) {
         $test = ipsRegistry::DB()->buildAndFetch(array('select' => '*', 'from' => 'core_tags', 'where' => 'tag_aai_lookup=\'' . ipsRegistry::DB()->addSlashes($app) . '\'', 'limit' => array(0, 1)));
         if ($test['tag_meta_app'] && $test['tag_meta_area']) {
             $app = $test['tag_meta_app'];
             $area = $test['tag_meta_area'];
         }
     }
     if ($app === null or $area === null) {
         trigger_error("App or area missing from classes_like", E_USER_WARNING);
     }
     /* Pointless comment! */
     $_file = IPSLib::getAppDir($app) . '/extensions/tags/' . $area . '.php';
     $_key = $app && $area ? md5($app . $area) : 'default';
     /* Get from cache if already cached */
     if (isset(self::$apps[$_key])) {
         return self::$apps[$_key];
     }
     /* Get other classes */
     require_once IPS_ROOT_PATH . 'sources/classes/tags/abstract.php';
     /*noLibHook*/
     if ($app && $area) {
         /* Otherwise create object and cache */
         if (is_file($_file)) {
             $classToLoad = IPSLib::loadLibrary($_file, 'tags_' . $app . '_' . $area, $app);
             if (class_exists($classToLoad)) {
                 self::$apps[$_key] = new $classToLoad();
                 self::$apps[$_key]->setApp($app);
                 self::$apps[$_key]->setArea($area);
                 self::$apps[$_key]->init();
             } else {
                 throw new Exception("No tags class available for {$app} - {$area}");
             }
         } else {
             /* Allow an application to worry about the 'area' */
             if (is_file(IPSLib::getAppDir($app) . '/extensions/tags/default.php')) {
                 $classToLoad = IPSLib::loadLibrary(IPSLib::getAppDir($app) . '/extensions/tags/default.php', 'tags_' . $app . '_default', $app);
                 if (class_exists($classToLoad)) {
                     self::$apps[$_key] = new $classToLoad();
                     self::$apps[$_key]->setApp($app);
                     self::$apps[$_key]->setArea($area);
                     self::$apps[$_key]->init();
                 } else {
                     throw new Exception("No tags class available for {$app} - {$area}");
                 }
             } else {
                 throw new Exception("No tags class available for {$app} - {$area}");
             }
         }
     } else {
         $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/tags/extensions/default.php', 'tags_default');
         self::$apps[$_key] = new $classToLoad();
         self::$apps[$_key]->setApp($app);
         self::$apps[$_key]->setArea($area);
         self::$apps[$_key]->init();
     }
     return self::$apps[$_key];
 }