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


PHP phpgw类代码示例

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


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

示例1: __construct

 public function __construct($session = False)
 {
     $this->currentapp = $GLOBALS['phpgw_info']['flags']['currentapp'];
     $this->so = createObject('phpgwapi.custom_fields');
     if ($session) {
         $this->read_sessiondata();
         $this->use_session = True;
     }
     $start = phpgw::get_var('start', 'int');
     $query = phpgw::get_var('query');
     $sort = phpgw::get_var('sort');
     $order = phpgw::get_var('order');
     $filter = phpgw::get_var('filter');
     $location = phpgw::get_var('location');
     $allrows = phpgw::get_var('allrows', 'bool');
     $appname = phpgw::get_var('appname');
     if ($start) {
         $this->start = $start;
     } else {
         $this->start = 0;
     }
     $this->query = $query;
     $this->filter = $filter;
     $this->sort = $sort;
     $this->order = $order;
     $this->location = $location;
     $this->appname = $appname;
     $this->allrows = $allrows;
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:29,代码来源:class.bo_custom.inc.php

示例2: list_history

 public function list_history()
 {
     if ($GLOBALS['phpgw']->acl->check('access_log_access', 1, 'admin')) {
         $GLOBALS['phpgw']->redirect_link('/index.php');
     }
     $bo = createobject('admin.boaccess_history');
     $nextmatches = createobject('phpgwapi.nextmatchs');
     $account_id = phpgw::get_var('account_id', 'int', 'REQUEST');
     $start = phpgw::get_var('start', 'int', 'GET', 0);
     $sort = phpgw::get_var('sort', 'int', 'POST', 0);
     $order = phpgw::get_var('order', 'int', 'POST', 0);
     $GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin') . ' - ' . lang('View access log');
     $GLOBALS['phpgw_info']['flags']['menu_selection'] = 'admin::admin::access_log';
     $GLOBALS['phpgw']->common->phpgw_header(true);
     $t =& $GLOBALS['phpgw']->template;
     $t->set_root(PHPGW_APP_TPL);
     $t->set_file('accesslog', 'accesslog.tpl');
     $t->set_block('accesslog', 'list');
     $t->set_block('accesslog', 'row');
     $t->set_block('accesslog', 'row_empty');
     $total_records = $bo->total($account_id);
     $var = array('nextmatchs_left' => $nextmatches->left('/index.php', $start, $total_records, '&menuaction=admin.uiaccess_history.list_history&account_id=' . $account_id), 'nextmatchs_right' => $nextmatches->right('/index.php', $start, $total_records, '&menuaction=admin.uiaccess_history.list_history&account_id=' . $account_id), 'showing' => $nextmatches->show_hits($total_records, $start), 'lang_loginid' => lang('LoginID'), 'lang_ip' => lang('IP'), 'lang_login' => lang('Login'), 'lang_logout' => lang('Logout'), 'lang_total' => lang('Total'));
     if ($account_id) {
         $var['link_return_to_view_account'] = '<a href="' . $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'admin.uiaccounts.view', 'account_id' => $account_id)) . '">' . lang('Return to view account') . '</a>';
         $var['lang_last_x_logins'] = lang('Last %1 logins for %2', $total_records, $GLOBALS['phpgw']->common->grab_owner_name($account_id));
     } else {
         $var['lang_last_x_logins'] = lang('Last %1 logins', $total_records);
     }
     $t->set_var($var);
     $records = $bo->list_history($account_id, $start, $order, $sort);
     if (is_array($records)) {
         foreach ($records as &$record) {
             $nextmatches->template_alternate_row_class($t);
             $var = array('row_loginid' => $record['loginid'], 'row_ip' => $record['ip'], 'row_li' => $record['li'], 'row_lo' => $record['account_id'] ? $record['lo'] : '<b>' . lang($record['sessionid']) . '</b>', 'row_total' => $record['lo'] ? $record['total'] : '&nbsp;');
             $t->set_var($var);
             $t->fp('rows_access', 'row', true);
         }
     }
     if (!$total_records && $account_id) {
         $nextmatches->template_alternate_row_class($t);
         $t->set_var('row_message', lang('No login history exists for this user'));
         $t->fp('rows_access', 'row_empty', true);
     }
     $loggedout = $bo->return_logged_out($account_id);
     if ($total_records) {
         $percent = round($loggedout / $total_records * 100);
     } else {
         $percent = '0';
     }
     $var = array('footer_total' => lang('Total records') . ': ' . $total_records);
     if ($account_id) {
         $var['lang_percent'] = lang('Percent this user has logged out') . ': ' . $percent . '%';
     } else {
         $var['lang_percent'] = lang('Percent of users that logged out') . ': ' . $percent . '%';
     }
     // create the menu on the left, if needed
     $var['rows'] = createObject('admin.uimenuclass')->createHTMLCode('view_account');
     $t->set_var($var);
     $t->pfp('out', 'list');
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:60,代码来源:class.uiaccess_history.inc.php

示例3: setUp

 /**
  * Prepare the environment for the test suite to run
  *
  * @return void
  */
 public function setUp()
 {
     $GLOBALS['phpgw_info']['flags'] = array('currentapp' => 'login', 'login' => true, 'noapi' => false, 'noheader' => true);
     $header = realpath(PHPGW_API_UNIT_TEST_PATH . '/../../..') . '/header.inc.php';
     include_once $header;
     self::$sessionid = $GLOBALS['phpgw']->session->create(self::$login, '', false);
     $GLOBALS['phpgw_info']['user']['account_id'] = 7;
     phpgw::import_class('bim.sobim');
     phpgw::import_class('bim.sobimitem');
     phpgw::import_class('bim.sobimtype');
     phpgw::import_class('bim.sobimmodel');
     phpgw::import_class('bim.sovfs');
     phpgw::import_class('bim.bobimmodel');
     phpgw::import_class('bim.sobim_converter');
     phpgw::import_class('bim.bobimitem');
     phpgw::import_class('bim.uibim');
     phpgw::import_class('bim.bimmodelinformation');
     phpgw::import_class('bim.sobimmodelinformation');
     $this->db =& $GLOBALS['phpgw']->db;
     $this->loadXmlVariables();
     $this->addDummyModel();
     $this->addTestTypes();
     $this->removeTestItems();
     $this->addTestItems();
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:30,代码来源:PropertyBimTestSuite.php

示例4: edit

 public function edit()
 {
     $id = intval(phpgw::get_var('id', 'GET'));
     if ($id) {
         $person = $this->bo->read_single($id);
         $person['id'] = $id;
         $person['contactpersons_link'] = self::link(array('menuaction' => 'booking.uicontactperson.index'));
         $person['edit_link'] = self::link(array('menuaction' => 'booking.uicontactperson.edit', 'id' => $person['id']));
     } else {
         $person = array();
     }
     $errors = array();
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $person = array_merge($person, extract_values($_POST, array('ssn', 'name', 'homepage', 'phone', 'email', 'description')));
         $errors = $this->bo->validate($person);
         if (!$errors) {
             if ($id) {
                 $receipt = $this->bo->update($person);
             } else {
                 $receipt = $this->bo->add($person);
             }
             $this->redirect(array('menuaction' => $this->module . '.uicontactperson.show', 'id' => $receipt['id']));
         }
     }
     $this->flash_form_errors($errors);
     self::add_stylesheet('phpgwapi/js/yahoo/assets/skins/sam/skin.css');
     self::add_javascript('yahoo', 'yahoo/yahoo-dom-event', 'yahoo-dom-event.js');
     self::add_javascript('yahoo', 'yahoo/element', 'element-min.js');
     self::add_javascript('yahoo', 'yahoo/dom', 'dom-min.js');
     self::add_javascript('yahoo', 'yahoo/container', 'container_core-min.js');
     self::add_javascript('yahoo', 'yahoo/editor', 'simpleeditor-min.js');
     self::add_template_file("contactperson_fields");
     self::render_template('contactperson_edit', array('person' => $person));
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:34,代码来源:class.uicontactperson.inc.php

示例5: index

 /**
  * @param mixed $data
  * If $data is an array - then the process is run as cron - and will look for $data['function'] to
  * determine which custom class to load
  */
 function index($data = '')
 {
     if (!isset($GLOBALS['phpgw_info']['user']['apps']['admin'])) {
         return;
     }
     if (is_array($data)) {
         $function = $data['function'];
     } else {
         $data = unserialize(urldecode(phpgw::get_var('data')));
         $data = phpgw::clean_value($data);
         if (!isset($data['function'])) {
             $function = phpgw::get_var('function');
         } else {
             $function = $data['function'];
         }
     }
     // prevent path traversal
     if (preg_match('/\\.\\./', $function)) {
         return;
     }
     $file = PHPGW_SERVER_ROOT . "/property/inc/cron/{$GLOBALS['phpgw_info']['user']['domain']}/{$function}.php";
     if (is_file($file)) {
         require_once $file;
         $custom = new $function();
         $custom->pre_run($data);
     } else {
         echo "no such file: path_to_phpgw_server_root/property/inc/cron/{$GLOBALS['phpgw_info']['user']['domain']}/{$function}.php";
     }
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:34,代码来源:class.custom_functions.inc.php

示例6: __construct

 function __construct($session = false)
 {
     $this->so = CreateObject('sms.soautoreply');
     $this->bocommon = CreateObject('sms.bocommon');
     if ($session) {
         $this->read_sessiondata();
         $this->use_session = true;
     }
     $start = phpgw::get_var('start', 'int', 'REQUEST', 0);
     $query = phpgw::get_var('query');
     $sort = phpgw::get_var('sort');
     $order = phpgw::get_var('order');
     $filter = phpgw::get_var('filter', 'int');
     $cat_id = phpgw::get_var('cat_id', 'int');
     $allrows = phpgw::get_var('allrows', 'bool');
     $this->start = $start ? $start : 0;
     if (array_key_exists('query', $_POST) || array_key_exists('query', $_GET)) {
         $this->query = $query;
     }
     if (array_key_exists('filter', $_POST) || array_key_exists('filter', $_GET)) {
         $this->filter = $filter;
     }
     if (array_key_exists('sort', $_POST) || array_key_exists('sort', $_GET)) {
         $this->sort = $sort;
     }
     if (array_key_exists('order', $_POST) || array_key_exists('order', $_GET)) {
         $this->order = $order;
     }
     if (array_key_exists('cat_id', $_POST) || array_key_exists('cat_id', $_GET)) {
         $this->cat_id = $cat_id;
     }
     if ($allrows) {
         $this->allrows = $allrows;
     }
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:35,代码来源:class.boautoreply.inc.php

示例7: addfiles

 public function addfiles()
 {
     $GLOBALS['phpgw_info']['flags']['xslt_app'] = false;
     $GLOBALS['phpgw_info']['flags']['noframework'] = true;
     $GLOBALS['phpgw_info']['flags']['nofooter'] = true;
     $acl =& $GLOBALS['phpgw']->acl;
     $acl_add = $acl->check($this->acl_location, PHPGW_ACL_ADD, 'manual');
     $acl_edit = $acl->check($this->acl_location, PHPGW_ACL_EDIT, 'manual');
     $cat_id = phpgw::get_var('id', 'int');
     $check = phpgw::get_var('check', 'bool');
     $fileuploader = CreateObject('property.fileuploader');
     if (!$acl_add && !$acl_edit) {
         $GLOBALS['phpgw']->common->phpgw_exit();
     }
     if (!$cat_id) {
         $GLOBALS['phpgw']->common->phpgw_exit();
     }
     $test = false;
     if ($test) {
         if (!empty($_FILES)) {
             $tempFile = $_FILES['Filedata']['tmp_name'];
             $targetPath = "{$GLOBALS['phpgw_info']['server']['temp_dir']}/";
             $targetFile = str_replace('//', '/', $targetPath) . $_FILES['Filedata']['name'];
             move_uploaded_file($tempFile, $targetFile);
             echo str_replace($GLOBALS['phpgw_info']['server']['temp_dir'], '', $targetFile);
         }
         $GLOBALS['phpgw']->common->phpgw_exit();
     }
     if ($check) {
         $fileuploader->check($cat_id, '/manual');
     } else {
         $fileuploader->upload($cat_id, '/manual');
     }
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:34,代码来源:class.bodocuments.inc.php

示例8: check_form_values

/**
 * Check form values
 */
function check_form_values()
{
    $errors = '';
    $domains = phpgw::get_var('domains', 'string', 'POST');
    if (!is_array($domains)) {
        $domains = array();
    }
    foreach ($domains as $k => $v) {
        $deletedomain = phpgw::get_var('deletedomain', 'string', 'POST');
        if (isset($deletedomain[$k])) {
            continue;
        }
        if (!$_POST['settings'][$k]['config_pass']) {
            $errors .= '<br>' . lang("You didn't enter a config password for domain %1", $v);
        }
    }
    $setting = phpgw::get_var('setting', 'string', 'POST');
    if (!$setting['HEADER_ADMIN_PASSWORD']) {
        $errors .= '<br>' . lang("You didn't enter a header admin password");
    }
    if ($errors) {
        $GLOBALS['phpgw_setup']->html->show_header('Error', True);
        echo $errors;
        exit;
    }
}
开发者ID:HaakonME,项目名称:porticoestate,代码行数:29,代码来源:manageheader.php

示例9: edit

 public function edit()
 {
     $id = intval(phpgw::get_var('id', 'GET'));
     $activity = $this->bo->read_single($id);
     $parent_activity = $this->bo->read_single($activity['parent_id']);
     $activities = $this->bo->fetch_activities();
     $activities = $activities['results'];
     $activity['id'] = $id;
     $activity['activities_link'] = self::link(array('menuaction' => 'booking.uiactivity.index'));
     $activity['building_link'] = self::link(array('menuaction' => 'booking.uibuilding.index'));
     $errors = array();
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         if ($_POST['parent_id'] == '0') {
             $_POST['parent_id'] = null;
         }
         $activity = array_merge($activity, extract_values($_POST, array('name', 'active', 'description', 'parent_id')));
         $errors = $this->bo->validate($activity);
         if (!$errors) {
             $receipt = $this->bo->update($activity);
             $this->redirect(array('menuaction' => 'booking.uiactivity.index'));
         }
     }
     $this->flash_form_errors($errors);
     $activity['cancel_link'] = self::link(array('menuaction' => 'booking.uiactivity.index'));
     self::render_template('activity_edit', array('activity' => $activity, 'parent' => $parent_activity, 'activities' => $activities));
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:26,代码来源:class.uiactivity.inc.php

示例10: __construct

 public function __construct($session = false)
 {
     $this->so = CreateObject('admin.soconfig');
     if ($session) {
         $this->read_sessiondata();
         $this->use_session = true;
     }
     $start = phpgw::get_var('start', 'int', 'REQUEST', 0);
     $query = phpgw::get_var('query');
     $sort = phpgw::get_var('sort');
     $order = phpgw::get_var('order');
     $filter = phpgw::get_var('filter', 'int');
     $allrows = phpgw::get_var('allrows', 'bool');
     $location_id = phpgw::get_var('location_id', 'int', 'REQUEST', 0);
     $this->start = $start ? $start : 0;
     $this->location_id = $location_id ? $location_id : 0;
     $this->so->set_location($this->location_id);
     if (array_key_exists('query', $_POST) || array_key_exists('query', $_GET)) {
         $this->query = $query;
     }
     if (array_key_exists('filter', $_POST) || array_key_exists('filter', $_GET)) {
         $this->filter = $filter;
     }
     if (array_key_exists('sort', $_POST) || array_key_exists('sort', $_GET)) {
         $this->sort = $sort;
     }
     if (array_key_exists('order', $_POST) || array_key_exists('order', $_GET)) {
         $this->order = $order;
     }
     if ($allrows) {
         $this->allrows = $allrows;
     }
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:33,代码来源:class.boconfig.inc.php

示例11: __construct

 function __construct($session = false)
 {
     $this->so = CreateObject('property.sojasper');
     $this->grants =& $this->so->grants;
     if ($session) {
         $this->read_sessiondata();
         $this->use_session = true;
     }
     $start = phpgw::get_var('start', 'int', 'REQUEST', 0);
     $query = phpgw::get_var('query');
     $sort = phpgw::get_var('sort');
     $order = phpgw::get_var('order');
     $filter = phpgw::get_var('filter', 'int');
     $cat_id = phpgw::get_var('cat_id', 'int');
     $allrows = phpgw::get_var('allrows', 'bool');
     $app = phpgw::get_var('app');
     $this->start = $start ? $start : 0;
     $this->query = isset($_REQUEST['query']) ? $query : $this->query;
     $this->sort = isset($_REQUEST['sort']) ? $sort : $this->sort;
     $this->order = isset($_REQUEST['order']) ? $order : $this->order;
     $this->cat_id = isset($_REQUEST['cat_id']) ? $cat_id : $this->cat_id;
     $this->user_id = isset($_REQUEST['user_id']) ? $user_id : $this->user_id;
     $this->allrows = isset($allrows) && $allrows ? $allrows : '';
     $this->app = isset($_REQUEST['app']) ? $app : $this->app;
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:25,代码来源:class.bojasper.inc.php

示例12: edit

 public function edit()
 {
     date_default_timezone_set("Europe/Oslo");
     $date = new DateTime(phpgw::get_var('date'));
     $system_message = array();
     $system_message['building_id'] = intval(phpgw::get_var('building_id', 'GET'));
     $system_message['building_name'] = phpgw::get_var('building_name', 'GET');
     $system_message['cancel_link'] = self::link(array('menuaction' => $this->module . '.uisearch.index'));
     $system_message['created'] = $date->format('Y-m-d  H:m');
     $errors = array();
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $system_message = array_merge($system_message, extract_values($_POST, array('time', 'title', 'message', 'name', 'phone', 'email')));
         if ($system_message['message'] == '') {
             $errors['system_message'] = lang('Missing title');
         } elseif ($system_message['title'] == '') {
             $errors['system_message'] = lang('Missing message');
         } elseif ($system_message['name'] == '') {
             $errors['system_message'] = lang('Missing name');
         }
         if (!$errors) {
             $system_message['title'] = $system_message['building_name'] . " - " . $system . $system_message['title'];
             $receipt = $this->bo->add($system_message);
             $this->redirect(array('menuaction' => $this->module . '.uibuilding.show.index', 'id' => $system_message['building_id']));
         }
     }
     $this->flash_form_errors($errors);
     $this->use_yui_editor();
     self::render_template('system_message', array('system_message' => $system_message));
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:29,代码来源:class.uisystem_message.inc.php

示例13: get_schedule

 public function get_schedule($id, $module)
 {
     $date = new DateTime(phpgw::get_var('date'));
     // Make sure $from is a monday
     if ($date->format('w') != 1) {
         $date->modify('last monday');
     }
     $prev_date = clone $date;
     $next_date = clone $date;
     $prev_date->modify('-1 week');
     $next_date->modify('+1 week');
     $building = $this->read_single($id);
     $building['buildings_link'] = self::link(array('menuaction' => $module . '.index'));
     $building['building_link'] = self::link(array('menuaction' => $module . '.show', 'id' => $building['id']));
     $building['date'] = $date->format('Y-m-d');
     $building['week'] = intval($date->format('W'));
     $building['year'] = intval($date->format('Y'));
     $building['prev_link'] = self::link(array('menuaction' => $module . '.schedule', 'id' => $building['id'], 'date' => $prev_date->format('Y-m-d')));
     $building['next_link'] = self::link(array('menuaction' => $module . '.schedule', 'id' => $building['id'], 'date' => $next_date->format('Y-m-d')));
     for ($i = 0; $i < 7; $i++) {
         $building['days'][] = array('label' => sprintf('%s<br/>%s %s', lang($date->format('l')), lang($date->format('M')), $date->format('d')), 'key' => $date->format('D'));
         $date->modify('+1 day');
     }
     return $building;
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:25,代码来源:class.bobuilding.inc.php

示例14: parse_navbar

function parse_navbar($force = False)
{
    $navbar = array();
    $navbar = execMethod('phpgwapi.menu.get', 'navbar');
    $user = $GLOBALS['phpgw']->accounts->get($GLOBALS['phpgw_info']['user']['id']);
    $var = array('home_url' => $GLOBALS['phpgw']->link('/home.php'), 'home_text' => lang('home'), 'home_icon' => 'icon icon-home', 'about_url' => $GLOBALS['phpgw']->link('/about.php', array('app' => $GLOBALS['phpgw_info']['flags']['currentapp'])), 'about_text' => lang('about'), 'logout_url' => $GLOBALS['phpgw']->link('/logout.php'), 'logout_text' => lang('logout'), 'user_fullname' => $user->__toString());
    if ($GLOBALS['phpgw']->acl->check('run', PHPGW_ACL_READ, 'preferences')) {
        $var['preferences_url'] = $GLOBALS['phpgw']->link('/preferences/index.php');
        $var['preferences_text'] = lang('preferences');
    }
    if (isset($GLOBALS['phpgw_info']['user']['apps']['manual'])) {
        $var['help_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')";
        $var['help_text'] = lang('help');
        $var['help_icon'] = 'icon icon-help';
    }
    if (isset($GLOBALS['phpgw_info']['user']['apps']['admin'])) {
        $var['debug_url'] = "javascript:openwindow('" . $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'property.uidebug_json.index')) . "','','')";
        $var['debug_text'] = lang('debug');
        $var['debug_icon'] = 'icon icon-debug';
    }
    $GLOBALS['phpgw']->template->set_root(PHPGW_TEMPLATE_DIR);
    $GLOBALS['phpgw']->template->set_file('navbar', 'navbar.tpl');
    $flags =& $GLOBALS['phpgw_info']['flags'];
    $var['current_app_title'] = isset($flags['app_header']) ? $flags['app_header'] : lang($GLOBALS['phpgw_info']['flags']['currentapp']);
    $flags['menu_selection'] = isset($flags['menu_selection']) ? $flags['menu_selection'] : '';
    $GLOBALS['phpgw']->template->set_var($var);
    $GLOBALS['phpgw']->template->pfp('out', 'navbar');
    register_shutdown_function('parse_footer_end');
}
开发者ID:HaakonME,项目名称:porticoestate,代码行数:29,代码来源:navbar.inc.php

示例15: check_logoutcode

/**
 * Check logout error code
 *
 * @param integer $code Error code
 * @return string Error message
 */
function check_logoutcode($code)
{
    switch ($code) {
        case 1:
            return lang('You have been successfully logged out');
        case 2:
            return lang('Sorry, your login has expired');
        case 5:
            return lang('Bad login or password');
        case 20:
            return lang('Cannot find the mapping ! (please advice your adminstrator)');
        case 21:
            return lang('you had inactive mapping to %1 account', phpgw::get_var('phpgw_account', 'string', 'GET', ''));
        case 22:
            $GLOBALS['phpgw']->session->phpgw_setcookie('sessionid');
            $GLOBALS['phpgw']->session->phpgw_setcookie('kp3');
            $GLOBALS['phpgw']->session->phpgw_setcookie('domain');
            return lang('you seemed to have an active session elsewhere for the domain "%1", now set to expired - please try again', phpgw::get_var('domain', 'string', 'COOKIE'));
        case 99:
            return lang('Blocked, too many attempts');
        case 10:
            $GLOBALS['phpgw']->session->phpgw_setcookie('sessionid');
            $GLOBALS['phpgw']->session->phpgw_setcookie('kp3');
            $GLOBALS['phpgw']->session->phpgw_setcookie('domain');
            // fix for bug php4 expired sessions bug
            if ($GLOBALS['phpgw_info']['server']['sessions_type'] == 'php') {
                $GLOBALS['phpgw']->session->phpgw_setcookie('phpgwsessid');
            }
            return lang('Your session could not be verified.');
        default:
            return '&nbsp;';
    }
}
开发者ID:HaakonME,项目名称:porticoestate,代码行数:39,代码来源:login.php


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