当前位置: 首页>>代码示例>>PHP>>正文


PHP Base_ThemeCommon类代码示例

本文整理汇总了PHP中Base_ThemeCommon的典型用法代码示例。如果您正苦于以下问题:PHP Base_ThemeCommon类的具体用法?PHP Base_ThemeCommon怎么用?PHP Base_ThemeCommon使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Base_ThemeCommon类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: install

	public function install() {
		
		$fields = array(
			array('name' => _M('Project Name'), 'type'=>'text', 'required'=>true, 'param'=>'64', 'extra'=>false, 'visible'=>true,'display_callback'=>array('Tests_BugtrackCommon', 'display_bugtrack')),	
			array('name' => _M('Company Name'), 'type'=>'select', 'required'=>true, 'param'=>array('company'=>'Company Name'), 'extra'=>false, 'visible'=>true),
			array('name' => _M('Due Date'), 'type'=>'date', 'required'=>true, 'param'=>64, 'extra'=>false, 'visible'=>true),
			array('name' => _M('Status'), 'type'=>'commondata', 'required'=>true, 'param'=>'Bugtrack_Status', 'extra'=>false,'visible'=>true),
			array('name' => _M('Description'), 'type'=>'long text', 'required'=>false, 'param'=>'64', 'extra'=>false)
		);
		Utils_RecordBrowserCommon::install_new_recordset('bugtrack', $fields);
		Utils_RecordBrowserCommon::new_filter('bugtrack', 'Company Name');
		Utils_RecordBrowserCommon::set_quickjump('bugtrack', 'Project Name');
		Utils_RecordBrowserCommon::set_favorites('bugtrack', true);
		Utils_RecordBrowserCommon::set_recent('bugtrack', 15);
		Utils_RecordBrowserCommon::set_caption('bugtrack', _M('Bugtrack'));
		Utils_RecordBrowserCommon::set_icon('bugtrack', Base_ThemeCommon::get_template_filename('Tests/Bugtrack', 'icon.png'));
		
// ************ addons ************** //
		Utils_AttachmentCommon::new_addon('bugtrack');
		Utils_RecordBrowserCommon::new_addon('company', 'Tests/Bugtrack', 'company_bugtrack_addon', 'Bugtrack');

// ************ other ************** //	
		Utils_CommonDataCommon::new_array('Bugtrack_Status',array('new'=>_M('New'),'inprog'=>_M('In Progress'),'cl'=>_M('Closed')),true,true);

		Utils_RecordBrowserCommon::add_access('bugtrack', 'view', 'ACCESS:employee');
		Utils_RecordBrowserCommon::add_access('bugtrack', 'add', 'ACCESS:employee');
		Utils_RecordBrowserCommon::add_access('bugtrack', 'edit', 'ACCESS:employee');
		Utils_RecordBrowserCommon::add_access('bugtrack', 'delete', array('ACCESS:employee', 'ACCESS:manager'));

		return true;
	}
开发者ID:62BRAINS,项目名称:EPESI,代码行数:31,代码来源:BugtrackInstall.php

示例2: install

 public function install()
 {
     Base_ThemeCommon::install_default_theme($this->get_type());
     Variable::set('error_mail', '');
     $this->create_data_dir();
     return true;
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:7,代码来源:ErrorInstall.php

示例3: uninstall

 public function uninstall()
 {
     Base_ThemeCommon::uninstall_default_theme($this->get_type());
     DB::DropTable('base_home_page');
     DB::DropTable('base_home_page_clearance');
     return true;
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:7,代码来源:HomePageInstall.php

示例4: submit_contact

 public static function submit_contact($values, $mode)
 {
     if ($mode == 'display') {
         $ret = array();
         $in = self::Instance();
         $filename = self::get_photo($values['id']);
         if ($filename) {
             $file = $in->get_data_dir() . $filename;
         } else {
             $file = Base_ThemeCommon::get_template_file('CRM/Contacts/Photo', 'placeholder.png');
             $ret['photo_note'] = __('Click to change');
         }
         $ret['photo_link'] = Module::create_href(array('upload_new_photo' => $values['id'])) . ' ' . Utils_TooltipCommon::open_tag_attrs(__('Click to change the photo'), false);
         $ret['photo_src'] = $file;
     } else {
         $ret = $values;
     }
     if (isset($_REQUEST['upload_new_photo']) && $_REQUEST['upload_new_photo'] == $values['id']) {
         unset($_REQUEST['upload_new_photo']);
         $x = ModuleManager::get_instance('/Base_Box|0');
         if (!$x) {
             trigger_error('There is no base box module instance', E_USER_ERROR);
         }
         $x->push_main('CRM/Contacts/Photo', 'body', array($values));
     }
     return $ret;
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:27,代码来源:PhotoCommon_0.php

示例5: uninstall

 public function uninstall()
 {
     Base_ThemeCommon::uninstall_default_theme($this->get_type());
     DB::DropTable('epesi_store_modules');
     $this->remove_data_dir();
     return true;
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:7,代码来源:EpesiStoreInstall.php

示例6: uninstall

	public function uninstall() {
		global $database;
		$ret = true;
		$ret &= DB::DropTable('utils_commondata_tree');
		Base_ThemeCommon::uninstall_default_theme($this->get_type());
		return $ret;
	}
开发者ID:62BRAINS,项目名称:EPESI,代码行数:7,代码来源:CommonDataInstall.php

示例7: get_installed_applets_html

 public static function get_installed_applets_html()
 {
     $colors = Base_DashboardCommon::get_available_colors();
     $app_cap = ModuleManager::call_common_methods('applet_caption');
     asort($app_cap);
     $app_info = ModuleManager::call_common_methods('applet_info');
     $html = '';
     foreach ($app_cap as $name => $cap) {
         if (!$cap) {
             continue;
         }
         $th = Base_ThemeCommon::init_smarty();
         $id = str_replace('_', '-', $name);
         if (!isset($app_info[$name])) {
             $app_info[$name] = '';
         }
         $th->assign('content', '<div class="content" style="padding:4px;" id="dashboard_applet_content_' . $id . '">' . $app_info[$name] . '</div>');
         $th->assign('handle_class', 'handle');
         $th->assign('caption', $cap);
         $th->assign('color', $colors[0]['class']);
         $remove_button = Base_DashboardCommon::get_remove_applet_button($id, false);
         $th->assign('remove', $remove_button);
         $th->assign('__link', array('remove' => Base_ThemeCommon::parse_links('remove', $remove_button)));
         //print('<xmp>'.self::get_remove_applet_button(null, false).'</xmp><br>');
         $th->assign('actions', array());
         $th->assign('config_mode', true);
         $html .= '<div class="applet" searchkey="' . strtolower($cap ? $cap : $name) . ';' . strtolower($app_info[$name]) . '" id="ab_item_' . 'new_' . $id . '">';
         ob_start();
         Base_ThemeCommon::display_smarty($th, 'Base_Dashboard', 'default');
         $html .= ob_get_clean();
         $html .= '</div>';
     }
     return $html;
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:34,代码来源:DashboardCommon_0.php

示例8: uninstall

 public function uninstall()
 {
     $ret = true;
     if ($ret) {
         $ret = Variable::delete('mail_from_addr');
     }
     if ($ret) {
         $ret = Variable::delete('mail_from_name');
     }
     if ($ret) {
         $ret = Variable::delete('mail_use_replyto');
     }
     if ($ret) {
         $ret = Variable::delete('mail_method');
     }
     if ($ret) {
         $ret = Variable::delete('mail_user');
     }
     if ($ret) {
         $ret = Variable::delete('mail_password');
     }
     if ($ret) {
         $ret = Variable::delete('mail_host');
     }
     if ($ret) {
         $ret = Variable::delete('mail_security');
     }
     if ($ret) {
         $ret = Variable::delete('mail_auth');
     }
     Base_ThemeCommon::uninstall_default_theme($this->get_type());
     return $ret;
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:33,代码来源:MailInstall.php

示例9: print_structure

	private function print_structure($t = array(), $level = 0, $path = null) {
		if(count($t) > 0) {
			if($path===null) {
				$this->_sub = 0;
				$ret = '<div class=utils_tree_root>';
			} else {
				$ret = '<div class=utils_tree_submenu id=utils_tree_'.$this->_id.'_'.$this->_sub.'>';
				$this->_sub++;
			}
			foreach( $t as $k => $v ) {
				$ret .= '<div id=utils_tree_node_'.$this->_id.' class=utils_tree_node onmouseover=\'if(typeof(utils_tree_hl)!="undefined")utils_tree_hl(this)\' onmouseout=\'if(typeof(utils_tree_rg)!="undefined")utils_tree_rg(this)\'><table><tr>';
				if(isset($v['sub']) && count($v['sub']) > 0)
					$ret .= '<td id=utils_tree_opener_'.$this->_id.'_'.($this->_sub).' class=utils_tree_opener_active_closed onclick="tree_node_visibility_toggle('.$this->_id.', '.($this->_sub).')"><img id=utils_tree_opener_img_'.$this->_id.'_'.($this->_sub).' src="'.Base_ThemeCommon::get_template_file($this->get_type(),'opener_active_closed.gif').'"></td>';
				else
				$ret .= '<td class=utils_tree_opener_inactive><img src="'.Base_ThemeCommon::get_template_file($this->get_type(),'opener_inactive.gif').'"></td>';
				if(isset($v['selected']) && $v['selected'] == 1)
					$ret .= "<td class=utils_tree_node_content_selected>".$v['name']."</td>";
				else
					$ret .= "<td class=utils_tree_node_content>".$v['name']."</td>";
				if(isset($v['visible']) && $v['visible'] == 1 && $path!==null)
					array_push($this->_opened_paths, $path);
				if(isset($v['opened']) && $v['opened'] == 1 && is_array($v['sub']) && !empty($v['sub']))
					array_push($this->_opened_paths, $path.'_'.$this->_sub);
					
				$ret .= "</tr></table></div>";
				if(isset($v['sub']) && is_array($v['sub'])) {
					$ret .= $this->print_structure($v['sub'], $level + 1, $path.'_'.$this->_sub);
				}
			}
			$ret .= "</div>";
			return $ret;
		}
		return '';
	}
开发者ID:62BRAINS,项目名称:EPESI,代码行数:34,代码来源:Tree_0.php

示例10: uninstall

 public function uninstall()
 {
     Utils_CommonDataCommon::remove('Calling_Codes');
     Utils_CommonDataCommon::remove('Countries');
     Base_ThemeCommon::uninstall_default_theme($this->get_type());
     return true;
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:7,代码来源:CountriesInstall.php

示例11: uninstall

 public function uninstall()
 {
     Base_AclCommon::delete_permission('Calendar');
     DB::DropTable('crm_calendar_custom_events_handlers');
     Base_ThemeCommon::uninstall_default_theme('CRM/Calendar');
     return true;
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:7,代码来源:CalendarInstall.php

示例12: get

 public static function get($id, $content, $header = '', $big = 0)
 {
     if (MOBILE_DEVICE) {
         return '';
     }
     static $init = true;
     if ($init) {
         Base_ThemeCommon::load_css('Libs/Leightbox', 'default', false);
         load_js('modules/Libs/Leightbox/leightbox.js');
         $init = false;
     }
     ob_start();
     print '<div id="' . $id . '" big="1" class="leightbox">';
     print '<input type="hidden" id="' . $id . '_bigsize" value="' . ($big ? 1 : 0) . '" />';
     if ($big) {
         eval_js('s = $(\'' . $id . '\').style;' . 's.top = \'5%\';' . 's.left = \'5%\';' . 's.width = \'90%\';' . 's.height = \'90%\';' . 's.padding = \'0px\';');
     }
     $smarty = Base_ThemeCommon::init_smarty();
     $smarty->assign('close_href', 'href="javascript:leightbox_deactivate(\'' . $id . '\')"');
     $smarty->assign('content', $content);
     $smarty->assign('header', $header);
     $smarty->assign('close_label', __('Close'));
     $smarty->assign('resize_label', __('Resize'));
     $smarty->assign('close_href', 'href="javascript:leightbox_deactivate(\'' . $id . '\')"');
     Base_ThemeCommon::display_smarty($smarty, 'Libs_Leightbox');
     print '</div>';
     return ob_get_clean();
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:28,代码来源:LeightboxCommon_0.php

示例13: manage

 public function manage()
 {
     if (!Base_EpesiStoreCommon::admin_access()) {
         return;
     }
     $button_label = Base_EssClientCommon::has_license_key() ? __('License Key') : __('Register EPESI!');
     Base_ActionBarCommon::add(Base_ThemeCommon::get_template_file('Base_EpesiStore', 'icon.png'), $button_label, $this->create_callback_href(array($this, 'display_registration_form')));
     Base_ActionBarCommon::add('view', __('Invoices'), $this->create_callback_href(array($this, 'display_invoices')));
     $setup = $this->init_module('Base_Setup');
     $setup->set_inline_display();
     if (Base_SetupCommon::is_simple_setup()) {
         if (!$this->isset_module_variable('filter_set')) {
             eval_js('base_setup__last_filter="' . (!Base_EssClientCommon::has_license_key() ? '' : (Base_EpesiStoreCommon::is_update_available() ? 'updates' : 'store')) . '";');
             $this->set_module_variable('filter_set', true);
         }
         $this->display_module($setup, array(true), 'admin');
         return;
     }
     Base_ActionBarCommon::add('settings', __('Simple view'), $this->create_callback_href(array($this, 'switch_simple'), true));
     $tb = $this->init_module('Utils_TabbedBrowser');
     $tb->set_tab('Modules Setup', array($this, 'setup_admin'), array($setup));
     $tb->set_tab('Epesi Store', array($this, 'form_main_store'), array());
     $tb->tag();
     $this->display_module($tb);
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:25,代码来源:EpesiStore_0.php

示例14: uninstall

 public function uninstall()
 {
     Base_ThemeCommon::uninstall_default_theme('CRM/Contacts/Activities');
     Utils_RecordBrowserCommon::delete_addon('company', 'CRM/Contacts/Activities', 'company_activities');
     Utils_RecordBrowserCommon::delete_addon('contact', 'CRM/Contacts/Actitivies', 'contact_activities');
     return true;
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:7,代码来源:ActivitiesInstall.php

示例15: uninstall

 public function uninstall()
 {
     Base_AclCommon::delete_permission('Fax - Browse');
     Base_AclCommon::delete_permission('Fax - Send');
     Base_ThemeCommon::uninstall_default_theme($this->get_type());
     return true;
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:7,代码来源:FaxInstall.php


注:本文中的Base_ThemeCommon类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。