本文整理汇总了PHP中execMethod函数 的典型用法代码示例。如果您正苦于以下问题:PHP execMethod函数的具体用法?PHP execMethod怎么用?PHP execMethod使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了execMethod函数 的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: index
function index()
{
$GLOBALS['phpgw']->xslttpl->add_file(array('user', 'nextmatchs', 'search_field'));
$account_info = $this->bo->read();
$content = array();
foreach ($account_info as $entry) {
if ($entry['grants']) {
$link_training = $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'hrm.uiuser.training', 'user_id' => $entry['account_id']));
$text_training = lang('training');
$lang_training_user_text = lang('Training profile');
} else {
$link_training = '';
$text_training = '';
$lang_training_user_text = '';
}
$content[] = array('first_name' => $entry['account_firstname'], 'last_name' => $entry['account_lastname'], 'link_training' => $link_training, 'link_view' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'hrm.uiuser.view', ' user_id' => $entry['account_id'])), 'lang_view_user_text' => lang('view the user'), 'lang_training_user_text' => $lang_training_user_text, 'lang_edit_user_text' => lang('edit the user'), 'text_view' => lang('view'), 'text_edit' => lang('edit'), 'text_training' => $text_training);
}
//_debug_array($content);
$table_header[] = array('sort_last_name' => $this->nextmatchs->show_sort_order(array('sort' => $this->sort, 'var' => 'account_lastname', 'order' => $this->order, 'extra' => array('menuaction' => 'hrm.uiuser.index', 'query' => $this->query, 'allrows' => $this->allrows))), 'lang_last_name' => lang('Last name'), 'sort_first_name' => $this->nextmatchs->show_sort_order(array('sort' => $this->sort, 'var' => 'account_firstname', 'order' => $this->order, 'extra' => array('menuaction' => 'hrm.uiuser.index', 'query' => $this->query, 'allrows' => $this->allrows))), 'lang_first_name' => lang('First name'), 'lang_training' => lang('training'), 'lang_edit' => lang('edit'), 'lang_view' => lang('view'));
if (!$this->allrows) {
$record_limit = $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
} else {
$record_limit = $this->bo->total_records;
}
$link_data = array('menuaction' => 'hrm.uiuser.index', 'sort' => $this->sort, 'order' => $this->order, 'query' => $this->query);
$data = array('menu' => execMethod('hrm.menu.links'), 'allow_allrows' => true, 'allrows' => $this->allrows, 'start_record' => $this->start, 'record_limit' => $record_limit, 'num_records' => count($account_info), 'all_records' => $this->bo->total_records, 'link_url' => $GLOBALS['phpgw']->link('/index.php', $link_data), 'img_path' => $GLOBALS['phpgw']->common->get_image_path('phpgwapi', 'default'), 'lang_searchfield_categorytext' => lang('Enter the search string. To show all entries, empty this field and press the SUBMIT button again'), 'lang_searchbutton_categorytext' => lang('Submit the search string'), 'query' => $this->query, 'lang_search' => lang('search'), 'table_header' => $table_header, 'values' => $content);
$appname = lang('user');
$function_msg = lang('list user');
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('hrm') . ' - ' . $appname . ': ' . $function_msg;
$GLOBALS['phpgw']->xslttpl->set_var('phpgw', array('list' => $data));
$this->save_sessiondata();
}
开发者ID:HaakonME, 项目名称:porticoestate, 代码行数:32, 代码来源:class.uiuser.inc.php
示例2: read
/**
* Get list of contacts to notify at location item
*
* @param array $data location_id and location_item_id
* @return array content.
*/
public function read($data = array())
{
if (!isset($data['location_id']) || !isset($data['location_item_id']) || !$data['location_item_id']) {
return array();
}
$location_id = (int) $data['location_id'];
$location_item_id = $data['location_item_id'];
// in case of bigint
$sql = "SELECT phpgw_notification.id, phpgw_notification.contact_id,phpgw_notification.user_id," . " phpgw_notification.is_active,phpgw_notification.entry_date,phpgw_notification.notification_method," . " first_name, last_name" . " FROM phpgw_notification" . " {$this->_join} phpgw_contact_person ON phpgw_notification.contact_id = phpgw_contact_person.person_id" . " WHERE location_id = {$location_id} AND location_item_id = '{$location_item_id}'";
$this->_db->query($sql, __LINE__, __FILE__);
$values = array();
$dateformat = $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
$lang_yes = lang('yes');
$lang_no = lang('no');
while ($this->_db->next_record()) {
$values[] = array('id' => $this->_db->f('id'), 'location_id' => $location_id, 'location_item_id' => $location_item_id, 'contact_id' => $this->_db->f('contact_id'), 'is_active' => $this->_db->f('is_active'), 'notification_method' => $this->_db->f('notification_method', true), 'user_id' => $this->_db->f('user_id'), 'entry_date' => $GLOBALS['phpgw']->common->show_date($this->_db->f('entry_date'), $dateformat), 'first_name' => $this->_db->f('first_name', true), 'last_name' => $this->_db->f('last_name', true));
}
$contacts = CreateObject('phpgwapi.contacts');
$socommon = CreateObject('property.socommon');
foreach ($values as &$entry) {
$comms = execMethod('addressbook.boaddressbook.get_comm_contact_data', $entry['contact_id']);
$entry['email'] = $comms[$entry['contact_id']]['work email'];
$entry['sms'] = $comms[$entry['contact_id']]['mobile (cell) phone'];
$entry['is_active_text'] = $entry['is_active'] ? $lang_yes : $lang_no;
$sql = "SELECT account_id FROM phpgw_accounts WHERE person_id = " . (int) $entry['contact_id'];
$this->_db->query($sql, __LINE__, __FILE__);
if ($this->_db->next_record()) {
$account_id = $this->_db->f('account_id');
$prefs = $socommon->create_preferences('property', $account_id);
$entry['email'] = isset($entry['email']) && $entry['email'] ? $entry['email'] : $prefs['email'];
$entry['sms'] = isset($entry['sms']) && $entry['sms'] ? $entry['sms'] : $prefs['cellphone'];
}
}
return $values;
}
开发者ID:HaakonME, 项目名称:porticoestate, 代码行数:41, 代码来源:class.notify.inc.php
示例3: get_buildings_on_property
function get_buildings_on_property($user_role, $parent_location_code, $level)
{
$children = execMethod('property.solocation.get_children', $parent_location_code);
foreach ($children as &$entry) {
$entry['id'] = "{$parent_location_code}-{$entry['id']}";
}
return $children;
/*
// Property level
if ($level == 1)
{
$property_location_code = $location_code;
}
// Building level
else if ($level > 1)
{
$split_loc_code_array = explode('-', $location_code);
$property_location_code = $split_loc_code_array[0];
}
if ($user_role)
{
$criteria = array();
$criteria['location_code'] = $property_location_code;
$criteria['field_name'] = 'loc2_name';
$criteria['child_level'] = '2';
$buildings_on_property = execMethod('property.solocation.get_children', $criteria);
}
else
{
$buildings_on_property = execMethod('property.solocation.get_children', $property_location_code);
}
return $buildings_on_property;
*/
}
开发者ID:HaakonME, 项目名称:porticoestate, 代码行数:34, 代码来源:class.location_finder.inc.php
示例4: item_expanded
function item_expanded($id)
{
static $navbar_state;
if (!isset($navbar_state)) {
$navbar_state = execMethod('phpgwapi.template_portico.retrieve_local', 'navbar_config');
}
return isset($navbar_state[$id]);
}
开发者ID:HaakonME, 项目名称:porticoestate, 代码行数:8, 代码来源:navbar.inc.php
示例5: purge_log
public function purge_log()
{
if ($GLOBALS['phpgw']->acl->check('error_log_access', 1, 'admin')) {
$GLOBALS['phpgw']->redirect_link('/index.php');
}
execMethod('admin.bolog.purge_log', phpgw::get_var('account_id', 'int'));
$GLOBALS['phpgw']->redirect_link('index.php', array('menuaction', 'admin.uilog.list_log'));
}
开发者ID:HaakonME, 项目名称:porticoestate, 代码行数:8, 代码来源:class.uilog.inc.php
示例6: links
function links()
{
if (!isset($GLOBALS['phpgw_info']['user']['preferences']['sms']['horisontal_menus']) || $GLOBALS['phpgw_info']['user']['preferences']['sms']['horisontal_menus'] == 'no') {
return;
}
$GLOBALS['phpgw']->xslttpl->add_file(array('menu'));
$menu_brutto = execMethod('sms.menu.get_menu');
$selection = explode('::', $GLOBALS['phpgw_info']['flags']['menu_selection']);
$level = 0;
$menu['navigation'] = $this->get_sub_menu($menu_brutto['navigation'], $selection, $level);
return $menu;
}
开发者ID:HaakonME, 项目名称:porticoestate, 代码行数:12, 代码来源:class.menu.inc.php
示例7: parse_navbar
/**
* Parse navigation bar
*
* @param boolean $force
*/
function parse_navbar($force = False)
{
// we hack the template root here as this is the template set of last resort
$tpl = CreateObject('phpgwapi.Template', dirname(__FILE__), "remove");
$tpl->set_file('navbar', 'navbar.tpl');
$tpl->set_block('navbar', 'app', 'apps');
$navbar = execMethod('phpgwapi.menu.get', 'navbar');
prepare_navbar($navbar);
foreach ($navbar as $app => $app_data) {
if ($app == 'logout') {
if (isset($GLOBALS['phpgw_info']['user']['apps']['manual'])) {
$tpl->set_var(array('url' => "javascript:openwindow('" . $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'manual.uimanual.help', 'app' => $GLOBALS['phpgw_info']['flags']['currentapp'], 'section' => isset($GLOBALS['phpgw_info']['apps']['manual']['section']) ? $GLOBALS['phpgw_info']['apps']['manual']['section'] : '', 'referer' => phpgw::get_var('menuaction'))) . "','700','600')", 'text' => lang('help'), 'icon' => $GLOBALS['phpgw']->common->image('manual', 'navbar')));
}
$tpl->parse('apps', 'app', true);
}
$tpl->set_var(array('url' => $app_data['url'], 'text' => $app_data['text'], 'icon' => $GLOBALS['phpgw']->common->image($app_data['image'][0], $app_data['image'][1])));
$tpl->parse('apps', 'app', true);
}
// Maybe we should create a common function in the phpgw_accounts_shared.inc.php file
// to get rid of duplicate code.
if (!isset($GLOBALS['phpgw_info']['user']['lastpasswd_change']) || $GLOBALS['phpgw_info']['user']['lastpasswd_change'] == 0) {
$api_messages = lang('You are required to change your password during your first login') . '<br> Click this image on the navbar: <img src="' . $GLOBALS['phpgw']->common->image('preferences', 'navbar') . '">';
} else {
if ($GLOBALS['phpgw_info']['user']['lastpasswd_change'] < time() - 86400 * 30) {
$api_messages = lang('it has been more then %1 days since you changed your password', 30);
}
}
// This is gonna change
if (isset($cd)) {
$var['messages'] = "<div class=\"warn\">{$api_messages}<br>\n" . checkcode($cd) . "</div>\n";
}
if (isset($GLOBALS['phpgw_info']['flags']['app_header'])) {
$var['current_app_header'] = $GLOBALS['phpgw_info']['flags']['app_header'];
} else {
$tpl->set_block('navbar', 'app_header', 'app_header');
$var['app_header'] = '';
}
$tpl->set_var($var);
$tpl->pfp('out', 'navbar');
// If the application has a header include, we now include it
if ((!isset($GLOBALS['phpgw_info']['flags']['noappheader']) || !$GLOBALS['phpgw_info']['flags']['noappheader']) && isset($_GET['menuaction'])) {
list($app, $class, $method) = explode('.', $_GET['menuaction']);
if (is_array($GLOBALS[$class]->public_functions) && isset($GLOBALS[$class]->public_functions['header'])) {
$GLOBALS[$class]->header();
}
}
$GLOBALS['phpgw']->template->set_root(PHPGW_APP_TPL);
$GLOBALS['phpgw']->hooks->process('after_navbar');
unset($GLOBALS['phpgw_info']['navbar']);
}
开发者ID:HaakonME, 项目名称:porticoestate, 代码行数:55, 代码来源:navbar.inc.php
示例8: execute
public function execute()
{
$orders = array();
$sql = "SELECT DISTINCT fm_workorder.id as order_id" . " FROM fm_workorder " . " {$this->join} fm_workorder_budget ON fm_workorder.id = fm_workorder_budget.order_id" . " WHERE continuous = 1" . " ORDER BY fm_workorder.id";
$this->db->query($sql, __LINE__, __FILE__);
$_order_budget = array();
while ($this->db->next_record()) {
$orders[] = $this->db->f('order_id');
}
foreach ($orders as $order_id) {
phpgwapi_cache::system_clear('property', "budget_order_{$order_id}");
execMethod('property.soworkorder.get_budget', $order_id);
}
$count_orders = count($orders);
$this->receipt['message'][] = array('msg' => "Rekalkulert budsjett for {$count_orders} løpende bestillinger");
}
开发者ID:HaakonME, 项目名称:porticoestate, 代码行数:16, 代码来源:reset_workorder_cached_budget.php
示例9: __construct
public function __construct($location_id, $debug = false)
{
$location_id = (int) $location_id;
set_time_limit(10000);
//Set the time limit for this request
$this->account = (int) $GLOBALS['phpgw_info']['user']['account_id'];
$this->db =& $GLOBALS['phpgw']->db;
$this->join = $this->db->join;
if ($location_id && !($category = execMethod('property.soadmin_entity.get_single_category', $location_id))) {
throw new Exception("Not a valid location for {$location_id}");
}
if ($debug) {
$this->debug = true;
}
$this->is_eav = !!$category['is_eav'];
$this->location_id = $location_id;
$this->entity_id = $category['entity_id'];
$this->cat_id = $category['id'];
if ($this->is_eav) {
$this->table = 'fm_bim_item';
$sql = "SELECT fm_bim_type.id FROM fm_bim_type WHERE location_id = {$location_id}";
$this->db->query($sql, __LINE__, __FILE__);
$this->db->next_record();
$this->bim_type_id = $this->db->f('id');
$custom = createObject('property.custom_fields');
$attributes = $custom->find2($location_id, 0, '', 'ASC', 'attrib_sort', true, true);
$this->metadata['id'] = array('primary_key' => true);
$this->metadata['location_id'] = array('primary_key' => true);
$this->metadata['model'] = array();
$this->metadata['p_location_id'] = array();
$this->metadata['p_id'] = array();
$this->metadata['location_code'] = array();
$this->metadata['loc1'] = array();
$this->metadata['address'] = array();
$this->metadata['entry_date'] = array();
$this->metadata['user_id'] = array();
foreach ($attributes as $attribute) {
$this->metadata[$attribute['column_name']] = array();
}
} else {
$this->table = "fm_entity_{$category['entity_id']}_{$category['id']}";
$this->metadata = $this->db->metadata($this->table);
}
}
开发者ID:HaakonME, 项目名称:porticoestate, 代码行数:44, 代码来源:import_update_generic.php
示例10: populate
protected function populate(int $unit_id, &$unit)
{
$location_code = $this->unmarshal($this->db->f('location_code', true), 'string');
// We get the data from the property module
$data = execMethod('property.bolocation.read_single', array('location_code' => $location_code, 'extra' => array('view' => true)));
$level = -1;
$names = array();
$levelFound = false;
for ($i = 1; !$levelFound; $i++) {
$loc_name = 'loc' . $i . '_name';
if (array_key_exists($loc_name, $data)) {
$level = $i;
$names[$level] = $data[$loc_name];
} else {
$levelFound = true;
}
}
$gab_id = '';
$gabinfos = execMethod('property.sogab.read', array('location_code' => $location_code, 'allrows' => true));
if ($gabinfos != null && is_array($gabinfos) && count($gabinfos) == 1) {
$gabinfo = array_shift($gabinfos);
$gab_id = $gabinfo['gab_id'];
}
$location = new rental_property_location($location_code, rental_uicommon::get_nicely_formatted_gab_id($gab_id), $level, $names);
$location->set_address_1($data['street_name'] . ' ' . $data['street_number']);
foreach ($data['attributes'] as $attributes) {
switch ($attributes['column_name']) {
case 'area_gross':
$location->set_area_gros($attributes['value']);
break;
case 'area_net':
$location->set_area_net($attributes['value']);
break;
case 'bruttoareal':
$location->set_area_gros($attributes['value']);
break;
case 'nettoareal':
$location->set_area_net($attributes['value']);
break;
}
}
return new rental_unit($this->unmarshal($this->db->f('id', true), 'int'), $this->unmarshal($this->db->f('composite_id', true), 'int'), $location);
}
开发者ID:HaakonME, 项目名称:porticoestate, 代码行数:43, 代码来源:class.sounit.inc.php
示例11: index
function index()
{
$GLOBALS['phpgw_info']['flags']['xslt_app'] = true;
if (!$this->acl->check($this->acl_location, PHPGW_ACL_READ, 'sms')) {
$this->bocommon->no_access();
return;
}
$GLOBALS['phpgw']->xslttpl->add_file(array('poll', 'nextmatchs', 'search_field'));
$receipt = $GLOBALS['phpgw']->session->appsession('session_data', 'sms_poll_receipt');
$GLOBALS['phpgw']->session->appsession('session_data', 'sms_poll_receipt', '');
$poll_info = $this->bo->read();
foreach ($poll_info as $entry) {
if ($this->bocommon->check_perms($entry['grants'], PHPGW_ACL_DELETE)) {
$link_delete = $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'sms.uipoll.delete', 'poll_id' => $entry['id']));
$text_delete = lang('delete');
$lang_delete_text = lang('delete the poll code');
}
if ($entry['enable'] == 1) {
$status = lang('enabled');
} else {
$status = lang('disabled');
}
$content[] = array('code' => $entry['code'], 'title' => $entry['title'], 'status' => $status, 'user' => $GLOBALS['phpgw']->accounts->id2name($entry['uid']), 'link_edit' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'sms.uipoll.edit', 'poll_id' => $entry['id'])), 'link_delete' => $link_delete, 'link_view' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'sms.uipoll.view', 'poll_id' => $entry['id'])), 'lang_view_config_text' => lang('view the config'), 'lang_edit_config_text' => lang('manage the poll code'), 'text_view' => lang('view'), 'text_edit' => lang('edit'), 'text_delete' => $text_delete, 'lang_delete_text' => $lang_delete_text);
unset($link_delete);
unset($text_delete);
unset($lang_delete_text);
}
$table_header[] = array('sort_code' => $this->nextmatchs->show_sort_order(array('sort' => $this->sort, 'var' => 'poll_code', 'order' => $this->order, 'extra' => array('menuaction' => 'sms.uipoll.index', 'query' => $this->query, 'cat_id' => $this->cat_id, 'allrows' => $this->allrows))), 'lang_code' => lang('code'), 'lang_delete' => lang('delete'), 'lang_edit' => lang('edit'), 'lang_view' => lang('view'), 'lang_user' => lang('user'), 'lang_title' => lang('title'), 'lang_status' => lang('status'));
if (!$this->allrows) {
$record_limit = $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
} else {
$record_limit = $this->bo->total_records;
}
$link_data = array('menuaction' => 'sms.uipoll.index', 'sort' => $this->sort, 'order' => $this->order, 'cat_id' => $this->cat_id, 'filter' => $this->filter, 'query' => $this->query);
$table_add[] = array('lang_add' => lang('add'), 'lang_add_statustext' => lang('add a poll'), 'add_action' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'sms.uipoll.add')));
$msgbox_data = $GLOBALS['phpgw']->common->msgbox_data($receipt);
$data = array('msgbox_data' => $GLOBALS['phpgw']->common->msgbox($msgbox_data), 'menu' => execMethod('sms.menu.links'), 'allow_allrows' => true, 'allrows' => $this->allrows, 'start_record' => $this->start, 'record_limit' => $record_limit, 'num_records' => count($poll_info), 'all_records' => $this->bo->total_records, 'link_url' => $GLOBALS['phpgw']->link('/index.php', $link_data), 'img_path' => $GLOBALS['phpgw']->common->get_image_path('phpgwapi', 'default'), 'lang_searchfield_statustext' => lang('Enter the search string. To show all entries, empty this field and press the SUBMIT button again'), 'lang_searchbutton_statustext' => lang('Submit the search string'), 'query' => $this->query, 'lang_search' => lang('search'), 'table_header' => $table_header, 'table_add' => $table_add, 'values' => $content);
$appname = lang('polls');
$function_msg = lang('list SMS polls');
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('sms') . ' - ' . $appname . ': ' . $function_msg;
$GLOBALS['phpgw']->xslttpl->set_var('phpgw', array('list' => $data));
$this->save_sessiondata();
}
开发者ID:HaakonME, 项目名称:porticoestate, 代码行数:43, 代码来源:class.uipoll.inc.php
示例12: index
function index()
{
$GLOBALS['phpgw']->xslttpl->add_file(array('place', 'nextmatchs', 'menu', 'search_field'));
$place_info = $this->bo->read();
while (is_array($place_info) && (list(, $entry) = each($place_info))) {
$content[] = array('name' => $entry['name'], 'link_edit' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'hrm.uiplace.edit', 'place_id' => $entry['id'])), 'link_delete' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'hrm.uiplace.delete', 'place_id' => $entry['id'])), 'link_view' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'hrm.uiplace.view', 'place_id' => $entry['id'])), 'lang_view_place_text' => lang('view the place'), 'lang_edit_place_text' => lang('edit the place'), 'text_view' => lang('view'), 'text_edit' => lang('edit'), 'text_delete' => lang('delete'), 'lang_delete_place_text' => lang('delete the place'));
}
//_debug_array($content);
$table_header[] = array('sort_name' => $this->nextmatchs->show_sort_order(array('sort' => $this->sort, 'var' => 'name', 'order' => $this->order, 'extra' => array('menuaction' => 'hrm.uiplace.index', 'query' => $this->query, 'cat_id' => $this->cat_id, 'allrows' => $this->allrows))), 'lang_delete' => lang('delete'), 'lang_edit' => lang('edit'), 'lang_view' => lang('view'));
if (!$this->allrows) {
$record_limit = $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
} else {
$record_limit = $this->bo->total_records;
}
$link_data = array('menuaction' => 'hrm.uiplace.index', 'sort' => $this->sort, 'order' => $this->order, 'cat_id' => $this->cat_id, 'filter' => $this->filter, 'query' => $this->query);
$table_add[] = array('lang_add' => lang('add'), 'lang_add_statustext' => lang('add a place'), 'add_action' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'hrm.uiplace.edit')));
$msgbox_data = $this->bocommon->msgbox_data($receipt);
$data = array('msgbox_data' => $GLOBALS['phpgw']->common->msgbox($msgbox_data), 'menu' => execMethod('hrm.menu.links'), 'allow_allrows' => true, 'allrows' => $this->allrows, 'start_record' => $this->start, 'record_limit' => $record_limit, 'num_records' => count($place_info), 'all_records' => $this->bo->total_records, 'link_url' => $GLOBALS['phpgw']->link('/index.php', $link_data), 'img_path' => $GLOBALS['phpgw']->common->get_image_path('phpgwapi', 'default'), 'lang_searchfield_statustext' => lang('Enter the search string. To show all entries, empty this field and press the SUBMIT button again'), 'lang_searchbutton_statustext' => lang('Submit the search string'), 'query' => $this->query, 'lang_search' => lang('search'), 'table_header' => $table_header, 'table_add' => $table_add, 'values' => $content);
$appname = lang('place');
$function_msg = lang('list place');
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('hrm') . ' - ' . $appname . ': ' . $function_msg;
$GLOBALS['phpgw']->xslttpl->set_var('phpgw', array('list' => $data));
$this->save_sessiondata();
}
开发者ID:HaakonME, 项目名称:porticoestate, 代码行数:24, 代码来源:class.uiplace.inc.php
示例13: forward
/**
* forward voucher to other persons
*
*/
public function forward()
{
$GLOBALS['phpgw_info']['flags']['noframework'] = true;
$user_lid = phpgw::get_var('user_lid', 'string', 'GET', 'all');
$voucher_id = phpgw::get_var('voucher_id', 'int', 'GET');
$redirect = false;
$role_check = array('is_janitor' => lang('janitor'), 'is_supervisor' => lang('supervisor'), 'is_budget_responsible' => lang('b - responsible'));
$approve = $this->bo->get_approve_role();
$values = phpgw::get_var('values');
$receipt = array();
if (isset($values['save'])) {
if ($GLOBALS['phpgw']->session->is_repost()) {
$receipt['error'][] = array('msg' => lang('repost'));
}
if (!$approve) {
$receipt['error'][] = array('msg' => lang('you are not approved for this task'));
}
if (!$receipt['error']) {
$values['voucher_id'] = $voucher_id;
$receipt = $this->bo->forward($values);
if (!$receipt['error']) {
execMethod('property.soworkorder.close_orders', phpgw::get_var('orders'));
$redirect = true;
}
}
}
$voucher = $this->bo->read_single_voucher($voucher_id);
$orders = array();
$_orders = array();
foreach ($voucher as $line) {
if ($line['order_id']) {
$_orders[] = $line['order_id'];
}
}
$_orders = array_unique($_orders);
foreach ($_orders as $_order) {
$orders[] = array('id' => $_order);
}
$approved_list = array();
$approved_list[] = array('role' => $role_check['is_janitor'], 'role_sign' => 'oppsynsmannid', 'initials' => $line['janitor'] ? $line['janitor'] : '', 'date' => $line['oppsynsigndato'] ? $GLOBALS['phpgw']->common->show_date(strtotime($line['oppsynsigndato'])) : '', 'user_list' => !$line['oppsynsigndato'] ? array('options_user' => $this->bocommon->get_user_list_right(32, isset($line['janitor']) ? $line['janitor'] : '', '.invoice')) : '');
$approved_list[] = array('role' => $role_check['is_supervisor'], 'role_sign' => 'saksbehandlerid', 'initials' => $line['supervisor'] ? $line['supervisor'] : '', 'date' => $line['saksigndato'] ? $GLOBALS['phpgw']->common->show_date(strtotime($line['saksigndato'])) : '', 'user_list' => !$line['saksigndato'] ? array('options_user' => $this->bocommon->get_user_list_right(64, isset($line['supervisor']) ? $line['supervisor'] : '', '.invoice')) : '');
$approved_list[] = array('role' => $role_check['is_budget_responsible'], 'role_sign' => 'budsjettansvarligid', 'initials' => $line['budget_responsible'] ? $line['budget_responsible'] : '', 'date' => $line['budsjettsigndato'] ? $GLOBALS['phpgw']->common->show_date(strtotime($line['budsjettsigndato'])) : '', 'user_list' => !$line['budsjettsigndato'] ? array('options_user' => $this->bocommon->get_user_list_right(128, isset($line['budget_responsible']) ? $line['budget_responsible'] : '', '.invoice')) : '');
$my_initials = $GLOBALS['phpgw_info']['user']['account_lid'];
foreach ($approve as &$_approve) {
if ($_approve['id'] == 'is_janitor' && $my_initials == $line['janitor'] && $line['oppsynsigndato']) {
$_approve['selected'] = 1;
$sign_orig = 'is_janitor';
} else {
if ($_approve['id'] == 'is_supervisor' && $my_initials == $line['supervisor'] && $line['saksigndato']) {
$_approve['selected'] = 1;
$sign_orig = 'is_supervisor';
} else {
if ($_approve['id'] == 'is_budget_responsible' && $my_initials == $line['budget_responsible'] && $line['budsjettsigndato']) {
$_approve['selected'] = 1;
$sign_orig = 'is_budget_responsible';
}
}
}
}
unset($_approve);
$approve_list = array();
foreach ($approve as $_approve) {
if ($_approve['id'] == 'is_janitor') {
if ($my_initials == $line['janitor'] && $line['oppsynsigndato'] || !$line['oppsynsigndato']) {
$approve_list[] = $_approve;
}
}
if ($_approve['id'] == 'is_supervisor') {
if ($my_initials == $line['supervisor'] && $line['saksigndato'] || !$line['saksigndato']) {
$approve_list[] = $_approve;
}
}
if ($_approve['id'] == 'is_budget_responsible') {
if ($my_initials == $line['budget_responsible'] && $line['budsjettsigndato'] || !$line['budsjettsigndato']) {
$approve_list[] = $_approve;
}
}
}
$data = array('redirect' => $redirect ? $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'property.uiinvoice.index', 'user_lid' => $user_lid)) : null, 'msgbox_data' => $GLOBALS['phpgw']->common->msgbox($GLOBALS['phpgw']->common->msgbox_data($receipt)), 'from_name' => $GLOBALS['phpgw_info']['user']['fullname'], 'form_action' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'property.uiinvoice.forward', 'user_lid' => $user_lid, 'voucher_id' => $voucher_id)), 'approve_list' => $approve_list, 'approved_list' => $approved_list, 'sign_orig' => $sign_orig, 'my_initials' => $my_initials, 'project_group_data' => $project_group_data, 'orders' => $orders, 'value_amount' => $line['amount'], 'value_currency' => $line['currency'], 'value_process_log' => isset($values['process_log']) && $values['process_log'] ? $values['process_log'] : $line['process_log']);
$GLOBALS['phpgw']->xslttpl->add_file('invoice');
$GLOBALS['phpgw']->xslttpl->set_var('phpgw', array('forward' => $data));
}
开发者ID:HaakonME, 项目名称:porticoestate, 代码行数:86, 代码来源:class.uiinvoice.inc.php
示例14: edit_favorite
public function edit_favorite()
{
if ($activity_id = phpgw::get_var('id')) {
$activity = $this->so->get_single($activity_id);
if (isset($GLOBALS['phpgw_info']['user']['preferences']['logistic']['menu_favorites']) && $GLOBALS['phpgw_info']['user']['preferences']['logistic']['menu_favorites']) {
$menu_favorites = $GLOBALS['phpgw_info']['user']['preferences']['logistic']['menu_favorites'];
} else {
$menu_favorites = array();
}
if (isset($menu_favorites['activity'][$activity_id])) {
unset($menu_favorites['activity'][$activity_id]);
} else {
$menu_favorites['activity'][$activity_id] = $activity->get_name();
}
$GLOBALS['phpgw']->preferences->account_id = $GLOBALS['phpgw_info']['user']['account_id'];
$GLOBALS['phpgw']->preferences->read();
$GLOBALS['phpgw']->preferences->add('logistic', 'menu_favorites', $menu_favorites, 'user');
$GLOBALS['phpgw']->preferences->save_repository();
execMethod('phpgwapi.menu.clear');
}
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction' => 'logistic.uiactivity.index'));
}
开发者ID:HaakonME, 项目名称:porticoestate, 代码行数:22, 代码来源:class.uiactivity.inc.php
示例15: array
<?php
$GLOBALS['phpgw_info'] = array();
$GLOBALS['phpgw_info']['flags'] = array('noheader' => true, 'nonavbar' => false, 'currentapp' => 'home', 'enable_network_class' => true, 'enable_contacts_class' => true, 'enable_nextmatchs_class' => true);
include_once '../header.inc.php';
// Start-------------------------------------------------
phpgw::import_class('phpgwapi.yui');
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/examples/treeview/assets/css/folders/tree.css');
phpgwapi_yui::load_widget('treeview');
phpgwapi_yui::load_widget('cookie');
$GLOBALS['phpgw']->js->validate_file('yahoo', 'test.menu', 'property');
$currentapp = $GLOBALS['phpgw_info']['flags']['currentapp'];
$applications = array();
$mapping = array(0 => array('name' => 'first_element_is_dummy'));
$exclude = array('home', 'preferences', 'about', 'logout');
$navbar = execMethod('phpgwapi.menu.get', 'navbar');
$i = 1;
foreach ($navbar as $app => $app_data) {
if (in_array($app, $exclude)) {
continue;
}
$applications[] = array('value' => array('id' => $i, 'app' => $app, 'label' => $app_data['text'], 'href' => str_replace('&', '&', $app_data['url'])), 'children' => array());
$mapping[$i] = array('id' => $i, 'name' => $app, 'expanded' => false, 'highlight' => true, 'is_leaf' => false);
$i++;
}
$applications = json_encode($applications);
$mapping = json_encode($mapping);
$html = <<<HTML
\t\t<div id="MenutreeDiv1"></div>
\t\t<script type="text/javascript">
\t\t var apps = {$applications};
开发者ID:HaakonME, 项目名称:porticoestate, 代码行数:31, 代码来源:test_menu.php
示例16: section_end
}
/**
*
*/
function section_end()
{
$GLOBALS['phpgw']->template->parse('rows', 'spacer_row', true);
}
/**
*
*
* @param $appname
* @param $file
* @param $file2
*/
function display_section($nav, $items)
{
section_start($nav['text'], $GLOBALS['phpgw']->common->image($nav['image'][0], $nav['image'][1]));
foreach ($items as $item) {
section_item($item['url'], $item['text']);
}
section_end();
}
$menus = execMethod('phpgwapi.menu.get');
foreach ($GLOBALS['phpgw_info']['user']['apps'] as $app => $app_info) {
if (isset($menus['preferences'][$app])) {
display_section($menus['navbar'][$app], $menus['preferences'][$app]);
}
}
$GLOBALS['phpgw']->template->pfp('out', 'list');
$GLOBALS['phpgw']->common->phpgw_footer();
开发者ID:HaakonME, 项目名称:porticoestate, 代码行数:31, 代码来源:index.php
示例17: query
public function query()
{
$entity_group_id = phpgw::get_var('entity_group_id', 'int');
$location_id = phpgw::get_var('location_id', 'int');
$control_area = phpgw::get_var('control_area', 'int');
$user_id = phpgw::get_var('user_id', 'int');
$district_id = phpgw::get_var('district_id', 'int');
$query = phpgw::get_var('query', 'string');
$year = phpgw::get_var('year', 'int');
$all_items = phpgw::get_var('all_items', 'bool');
$user_only = phpgw::get_var('user_only', 'bool');
$filter_status = phpgw::get_var('status', 'string');
$report_type = phpgw::get_var('report_type', 'string');
if ($filter_component_str = phpgw::get_var('filter_component', 'string')) {
$filter_component_arr = explode('_', $filter_component_str);
$location_id = $filter_component_arr[0];
$filter_component = $filter_component_arr[1];
}
if ($org_unit_id = phpgw::get_var('org_unit_id', 'int')) {
$_subs = execMethod('property.sogeneric.read_tree', array('node_id' => $org_unit_id, 'type' => 'org_unit'));
$this->org_units[] = $org_unit_id;
foreach ($_subs as $entry) {
$this->org_units[] = $entry['id'];
if (isset($entry['children']) && $entry['children']) {
$this->_get_children($entry['children']);
}
}
unset($entry);
unset($_subs);
}
$so_control = CreateObject('controller.socontrol');
$this->so = CreateObject('controller.socheck_list');
// Validates year. If year is not set, current year is chosen
$year = execMethod('controller.uicalendar.validate_year', $year);
// Gets timestamp of first day in year
$from_date_ts = execMethod('controller.uicalendar.get_start_date_year_ts', $year);
// Gets timestamp of first day in next year
$to_date_ts = execMethod('controller.uicalendar.get_end_date_year_ts', $year);
$location_filter = $this->get_location_filter();
foreach ($location_filter as $_location) {
$location_type_name[$_location['id']] = $_location['name'];
}
// _debug_array($location_type_name);
$components = array();
$keep_only_assigned_to = 0;
// $lookup_stray_items = false;
$lookup_stray_items = !!$entity_group_id;
if ($user_id < 0) {
$user_id = $user_id * -1;
$all_items = false;
$user_only = true;
// $keep_only_assigned_to = $user_id;
// $assigned_components = $so_control->get_assigned_control_components($from_date_ts, $to_date_ts, $assigned_to = $user_id);
// foreach($assigned_components as $_location_id => $component_list)
// {
// $_components = execMethod('property.soentity.read',array(
// 'filter_entity_group' => $entity_group_id,
// 'location_id' => $_location_id,
// 'district_id' => $district_id,
// 'allrows' => true,
// 'filter_item' => $component_list
// )
// );
// $components = array_merge($components, $_components);
// }
}
if (!$location_id) {
//nothing
} else {
if ($location_id == -1 && !$entity_group_id) {
//nothing
} else {
if (!$location_id && $entity_group_id) {
//still nothing
} else {
$exclude_locations = array();
foreach ($location_filter as $_location_filter) {
if ($location_id > 0 && $_location_filter['id'] != $location_id) {
continue;
}
$_location_id = (int) $_location_filter['id'];
$exclude_locations[] = $_location_id;
$_components = execMethod('property.soentity.read', array('filter_entity_group' => $entity_group_id, 'location_id' => $_location_id, 'district_id' => $district_id, 'org_units' => $this->org_units, 'allrows' => true, 'control_registered' => !$all_items, 'check_for_control' => true, 'filter_item' => $filter_component ? array($filter_component) : array()));
$components = array_merge($components, $_components);
}
if ($lookup_stray_items) {
$_components = execMethod('property.soentity.read_entity_group', array('entity_group_id' => $entity_group_id, 'exclude_locations' => $exclude_locations, 'location_id' => $_location_id, 'district_id' => $district_id, 'org_units' => $this->org_units, 'allrows' => true, 'control_registered' => !$all_items, 'check_for_control' => true));
$components = array_merge($components, $_components);
}
}
}
}
$all_components = array();
$components_with_calendar_array = array();
// _debug_array($components);
foreach ($components as $_component) {
$location_id = $_component['location_id'];
$component_id = $_component['id'];
$all_components["{$location_id}_{$component_id}"] = $_component;
$short_description = $_component['short_description'];
//.........这里部分代码省略.........
开发者ID:HaakonME, 项目名称:porticoestate, 代码行数:101, 代码来源:class.uicomponent.inc.php
************** 异常文本 **************System.TypeInitializationException:“myP
阅读:554| 2022-07-18
bradtraversy/iweather: Ionic 3 mobile weather app
阅读:1648| 2022-08-30
joaomh/curso-de-matlab
阅读:1208| 2022-08-17
魔兽世界怀旧服已经开启两个多月了,但作为一个猎人玩家,抓到“断牙”,已经成为了一
阅读:1064| 2022-11-06
rugk/mastodon-simplified-federation: Simplifies following and interacting with r
阅读:1131| 2022-08-17
unitUnit1;interfaceusesWinapi.Windows,Winapi.Messages,System.SysUtils,System.Var
阅读:575| 2022-07-18
Tangshitao/Dense-Scene-Matching: Learning Camera Localization via Dense Scene Ma
阅读:818| 2022-08-16
肉的笔顺怎么写?肉字笔顺笔画顺序是什么?中国练字网了解到好多人在学习中会遇到肉的笔
阅读:1502| 2022-07-30
ProtonVPN/linux-cli: Official ProtonVPN Linux app (CLI)
阅读:994| 2022-08-15
相信不少果粉在对自己的设备进行某些操作时,都会碰到Respring,但这个 Respring 到底
阅读:388| 2022-11-06
请发表评论