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


PHP phpgw::import_class方法代码示例

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


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

示例1: 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

示例2: setUp

 /**
  * Setup the environment for the tests
  *
  * @return void
  */
 protected 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;
     //$GLOBALS['phpgw']->acl->set_account_id(7); // not sure why this is needed...
     //require('..\..\inc\class.sobim.inc.php');
     //require('..\..\inc\class.sobimtype.inc.php');
     phpgw::import_class('bim.sobimrest');
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:17,代码来源:TestSObimrest_solo.php

示例3: testTemplate

 private function testTemplate()
 {
     phpgw::import_class('phpgwapi.template_portico');
     $app = $GLOBALS['phpgw_info']['flags']['currentapp'];
     $GLOBALS['phpgw']->template->set_root("C:\\vBoxShare\\html\\dev-bim2\\bim\\templates\\portico");
     $GLOBALS['phpgw']->template->set_unknowns('remove');
     $GLOBALS['phpgw']->template->set_file('test', 'test.tpl');
     $tpl_vars = array('test2' => "myTest");
     $GLOBALS['phpgw']->template->set_var($tpl_vars);
     $GLOBALS['phpgw']->template->pfp('out', 'test');
     unset($tpl_vars);
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:12,代码来源:class.uibimitem.inc.php

示例4: __construct

 public function __construct($currentapp = '', $yui = '')
 {
     $GLOBALS['phpgw_info']['server']['no_jscombine'] = true;
     // start: to be removed
     phpgw::import_class('phpgwapi.yui');
     phpgwapi_yui::load_widget('dragdrop');
     phpgwapi_yui::load_widget('datatable');
     phpgwapi_yui::load_widget('history');
     phpgwapi_yui::load_widget('paginator');
     phpgwapi_yui::load_widget('menu');
     phpgwapi_yui::load_widget('calendar');
     phpgwapi_yui::load_widget('autocomplete');
     phpgwapi_yui::load_widget('animation');
     //end: to be removed
     $yui = isset($yui) && $yui == 'yui3' ? 'yui3' : 'yahoo';
     $currentapp = $currentapp ? $currentapp : $GLOBALS['phpgw_info']['flags']['currentapp'];
     $this->tmpl_search_path = array();
     array_push($this->tmpl_search_path, PHPGW_SERVER_ROOT . '/phpgwapi/templates/base');
     array_push($this->tmpl_search_path, PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info']['server']['template_set']);
     array_push($this->tmpl_search_path, PHPGW_SERVER_ROOT . '/' . $currentapp . '/templates/base');
     array_push($this->tmpl_search_path, PHPGW_SERVER_ROOT . '/' . $currentapp . '/templates/' . $GLOBALS['phpgw_info']['server']['template_set']);
     if ($yui == 'yui3') {
         self::add_javascript('phpgwapi', 'yui3', 'yui/yui-min.js');
     }
     self::add_javascript('phpgwapi', $yui, 'common.js');
     phpgwapi_jquery::load_widget('core');
     self::add_javascript('phpgwapi', "jquery", 'common.js');
     $this->url_prefix = str_replace('_', '.', get_class($this));
     $this->dateFormat = $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
     $this->acl =& $GLOBALS['phpgw']->acl;
     $this->locations =& $GLOBALS['phpgw']->locations;
     $GLOBALS['phpgw_info']['flags']['app_header'] = lang($currentapp);
     self::add_javascript('phpgwapi', 'DataTables', 'media/js/jquery.dataTables.min.js');
     self::add_javascript('phpgwapi', 'DataTables', 'extensions/Responsive/js/dataTables.responsive.js');
     self::add_javascript('phpgwapi', 'DataTables', 'extensions/ColVis/js/dataTables.colVis.min.js');
     self::add_javascript('phpgwapi', 'DataTables', 'extensions/TableTools/js/dataTables.tableTools.js');
     self::add_javascript('phpgwapi', 'jquery', 'editable/jquery.jeditable.js');
     self::add_javascript('phpgwapi', 'jquery', 'editable/jquery.dataTables.editable.js');
     $GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/DataTables/media/css/jquery.dataTables.css');
     $GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/DataTables/extensions/Responsive/css/dataTables.responsive.css');
     $GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/DataTables/extensions/ColVis/css/dataTables.colVis.min.css');
     $GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/DataTables/extensions/ColVis/css/dataTables.colvis.jqueryui.css');
     $GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/DataTables/extensions/TableTools/css/dataTables.tableTools.css');
     //pop up script
     self::add_javascript('phpgwapi', 'tinybox2', 'packed.js');
     $GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/tinybox2/style.css');
     if (phpgw::get_var('nonavbar')) {
         //	$GLOBALS['phpgw_info']['flags']['nonavbar'] = true;
         $GLOBALS['phpgw_info']['flags']['noframework'] = true;
         //	$GLOBALS['phpgw_info']['flags']['headonly']=true;
     }
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:52,代码来源:class.uicommon_jquery.inc.php

示例5: validate_admin

/**
 * Validate the data for the admin user account
 *
 * @param string &$username the login id for the admin user - 
 * @param string $passwd    the password for the new user
 * @param string $passwd2   the verification password for the new user
 * @param string $fname     the first name of the administrator
 * @param string $lname     the lastname of the administrator
 *
 * @return array list of errors - empty array if valid
 *
 * @internal we pass the username by ref so it can be unset if invalid
 */
function validate_admin(&$username, $passwd, &$passwd2, $fname, $lname)
{
    phpgw::import_class('phpgwapi.globally_denied');
    $errors = array();
    if ($passwd != $passwd2) {
        $errors[] = lang('Passwords did not match, please re-enter');
    } else {
        $account = new phpgwapi_user();
        try {
            $account->validate_password($passwd);
        } catch (Exception $e) {
            $errors[] = $e->getMessage();
        }
    }
    if (!$username) {
        $errors[] = lang('You must enter a username for the admin');
    } else {
        if (phpgwapi_globally_denied::user($username)) {
            $errors[] = lang('You can not use %1 as the admin username, please try again with another username', $username);
            $username = '';
        }
    }
    return $errors;
}
开发者ID:HaakonME,项目名称:porticoestate,代码行数:37,代码来源:accounts.php

示例6: array

<?php

phpgw::import_class('booking.socommon');
class booking_soevent extends booking_socommon
{
    function __construct()
    {
        parent::__construct('bb_event', array('id' => array('type' => 'int'), 'id_string' => array('type' => 'string', 'required' => false, 'default' => '0', 'query' => true), 'active' => array('type' => 'int', 'required' => true), 'activity_id' => array('type' => 'int', 'required' => true), 'application_id' => array('type' => 'int', 'required' => false), 'description' => array('type' => 'string', 'required' => true, 'query' => true), 'building_id' => array('type' => 'int', 'required' => true), 'building_name' => array('type' => 'string', 'required' => true, 'query' => true), 'from_' => array('type' => 'string', 'required' => true), 'to_' => array('type' => 'string', 'required' => true), 'cost' => array('type' => 'decimal', 'required' => true), 'contact_name' => array('type' => 'string', 'required' => true, 'query' => true), 'contact_email' => array('type' => 'string', 'sf_validator' => createObject('booking.sfValidatorEmail', array(), array('invalid' => '%field% is invalid'))), 'contact_phone' => array('type' => 'string'), 'completed' => array('type' => 'int', 'required' => true, 'nullable' => false, 'default' => '0'), 'reminder' => array('type' => 'int', 'required' => true, 'nullable' => false, 'default' => '1'), 'is_public' => array('type' => 'int', 'required' => true, 'nullable' => false, 'default' => '1'), 'secret' => array('type' => 'string', 'required' => true), 'sms_total' => array('type' => 'int', 'required' => false), 'customer_organization_name' => array('type' => 'string', 'required' => False, 'query' => true), 'customer_organization_id' => array('type' => 'int', 'required' => False), 'customer_identifier_type' => array('type' => 'string', 'required' => False), 'customer_ssn' => array('type' => 'string', 'sf_validator' => createObject('booking.sfValidatorNorwegianSSN'), 'required' => false), 'customer_organization_number' => array('type' => 'string', 'sf_validator' => createObject('booking.sfValidatorNorwegianOrganizationNumber', array(), array('invalid' => '%field% is invalid'))), 'customer_internal' => array('type' => 'int', 'required' => true), 'activity_name' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'bb_activity', 'fkey' => 'activity_id', 'key' => 'id', 'column' => 'name')), 'audience' => array('type' => 'int', 'required' => true, 'manytomany' => array('table' => 'bb_event_targetaudience', 'key' => 'event_id', 'column' => 'targetaudience_id')), 'agegroups' => array('type' => 'int', 'required' => true, 'manytomany' => array('table' => 'bb_event_agegroup', 'key' => 'event_id', 'column' => array('agegroup_id' => array('type' => 'int', 'required' => true), 'male' => array('type' => 'int', 'required' => true), 'female' => array('type' => 'int', 'required' => true)))), 'comments' => array('type' => 'string', 'manytomany' => array('table' => 'bb_event_comment', 'key' => 'event_id', 'column' => array('time', 'author', 'comment', 'type'), 'order' => array('sort' => 'time', 'dir' => 'ASC'))), 'resources' => array('type' => 'int', 'required' => true, 'manytomany' => array('table' => 'bb_event_resource', 'key' => 'event_id', 'column' => 'resource_id')), 'dates' => array('type' => 'timestamp', 'manytomany' => array('table' => 'bb_event_date', 'key' => 'event_id', 'column' => array('from_', 'to_', 'id')))));
    }
    function get_building_info($id)
    {
        $this->db->limit_query("SELECT bb_building.id, bb_building.name, bb_building.email, bb_building.tilsyn_email, bb_building.tilsyn_email2 FROM bb_building, bb_resource, bb_event_resource WHERE bb_building.id=bb_resource.building_id AND bb_resource.id=bb_event_resource.resource_id AND bb_event_resource.event_id=" . intval($id), 0, __LINE__, __FILE__, 1);
        if (!$this->db->next_record()) {
            return False;
        }
        return array('id' => $this->db->f('id', false), 'name' => $this->db->f('name', false), 'email' => $this->db->f('email', false), 'tilsyn_email' => $this->db->f('tilsyn_email', false), 'tilsyn_email2' => $this->db->f('tilsyn_email2', false));
    }
    function get_ordered_comments($id)
    {
        $results = array();
        $this->db->query("select time,author,comment,type from bb_event_comment where event_id=({$id}) order by time desc", __LINE__, __FILE__);
        while ($this->db->next_record()) {
            $results[] = array('time' => $this->db->f('time', false), 'author' => $this->db->f('author', false), 'comment' => $this->db->f('comment', false), 'type' => $this->db->f('type', false));
        }
        return $results;
    }
    function get_resource_info($id)
    {
        $this->db->limit_query("SELECT bb_resource.id, bb_resource.name FROM bb_resource WHERE bb_resource.id=" . intval($id), 0, __LINE__, __FILE__, 1);
        if (!$this->db->next_record()) {
            return False;
开发者ID:HaakonME,项目名称:porticoestate,代码行数:31,代码来源:class.soevent.inc.php

示例7: create_tabs

    /**
     * Create tabs
     *
     * @param array   $tabs      With ($id,$tab) pairs
     * @param integer $selection array key of selected tab
     * @param boolean $lang      Translate label?
     *
     * @return string html snippet for creating tabs in a modern browser
     */
    public function create_tabs($tabs, $selection, $lang = false)
    {
        phpgw::import_class('phpgwapi.yui');
        if ($lang) {
            foreach ($tabs as &$tab) {
                $tab = lang($tab);
            }
        }
        $html = phpgwapi_yui::tabview_generate($tabs, $selection);
        $output = <<<HTML
\t\t\t<div class="yui-navset">
\t\t\t\t{$html}
\t\t\t</div>

HTML;
        return $output;
    }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:26,代码来源:class.common.inc.php

示例8: __construct

 * phpGroupWare is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * phpGroupWare is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with phpGroupWare; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 * @license http://www.gnu.org/licenses/gpl.html GNU General Public License
 * @internal Development of this application was funded by http://www.bergen.kommune.no/
 * @package property
 * @subpackage controller
 * @version $Id$
 */
phpgw::import_class('controller.uicheck_list');
class mobilefrontend_uicheck_list extends controller_uicheck_list
{
    public function __construct()
    {
        parent::__construct();
        $GLOBALS['phpgw_info']['flags']['nonavbar'] = true;
        //FIXME
        $GLOBALS['phpgw']->css->add_external_file('controller/templates/mobilefrontend/css/base.css');
    }
}
开发者ID:HaakonME,项目名称:porticoestate,代码行数:31,代码来源:class.uicheck_list.inc.php

示例9: array

<?php

/**************************************************************************\
* phpGroupWare - XML-RPC Test App                                          *
* http://www.phpgroupware.org                                              *
* --------------------------------------------                             *
*  This program is free software; you can redistribute it and/or modify it *
*  under the terms of the GNU General Public License as published by the   *
*  Free Software Foundation; either version 2 of the License, or (at your  *
*  option) any later version.                                              *
\**************************************************************************/
/* $Id$ */
$GLOBALS['phpgw_info'] = array();
$GLOBALS['phpgw_info']['flags'] = array('currentapp' => 'xmlrpc', 'noheader' => False, 'noappheader' => False, 'nonavbar' => False);
include '../header.inc.php';
phpgw::import_class('phpgwapi.xmlrpc_client');
if ($_POST['stateno'] != '') {
    $username = 'anonymous';
    $password = 'anonymous1';
    $phpgw_domain = 'default';
    $stateno = phpgw::get_var('stateno', 'int', 'POST', 0);
    $c = new xmlrpc_client("{$GLOBALS['phpgw_info']['server']['webserver_url']}/xmlrpc.php?domain={$phpgw_domain}", $_SERVER['HTTP_HOST'], 80);
    $c->setCredentials($username, $password);
    $f = new xmlrpcmsg('xmlrpc.examples.findstate', array(php_xmlrpc_encode($stateno)));
    //		print "<pre>" . htmlentities($f->serialize('UTF-8')) . "</pre>\n";
    //		$c->setDebug(1);
    $r =& $c->send($f);
    //		$cookies = $r->cookies();
    if (!$r->faultCode()) {
        $v = $r->value();
        print "</pre><br/>State number " . $stateno . " is " . htmlspecialchars($v->scalarval()) . "<br/>";
开发者ID:HaakonME,项目名称:porticoestate,代码行数:31,代码来源:client.php

示例10:

  it under the terms of the GNU Lesser General Public License as published by
  the Free Software Foundation, either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU Lesser General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
/*
 * Import account data objects
 */
phpgw::import_class('phpgwapi.account');
/**
 * Class for handling user and group accounts
 *
 * @package phpgroupware
 * @subpackage phpgwapi
 * @category accounts
 */
abstract class phpgwapi_accounts_
{
    /**
     * @var object $account the currently selected user object
     */
    public $account;
    /**
     * @var integer $account_id track the current account_id - which may not match the this->account->id
开发者ID:HaakonME,项目名称:porticoestate,代码行数:31,代码来源:class.accounts_.inc.php

示例11: getDatabaseId

<?php

phpgw::import_class('bim.bimobject');
class BimItem extends BimObject
{
    private $databaseId;
    private $guid;
    private $type;
    private $xml;
    private $modelId;
    function __construct($databaseId = null, $guid = null, $type = null, $xml = null, $modelId = null)
    {
        //$this->databaseId = (is_null($databaseId)) ? null : (int)$databaseId;
        $this->databaseId = (int) $databaseId;
        $this->guid = $guid;
        $this->type = $type;
        $this->xml = $xml;
        $this->modelId = $modelId;
    }
    function getDatabaseId()
    {
        return $this->databaseId;
    }
    function setDatabaseId($databaseId)
    {
        $this->databaseId = $databaseId;
    }
    function getGuid()
    {
        return $this->guid;
    }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:31,代码来源:class.bimitem.inc.php

示例12: _add_eav

 private function _add_eav($data)
 {
     static $count_records = 0;
     // -------- produce data_set
     $error = false;
     $table = $this->table;
     $fields = $this->fields;
     if (!$table) {
         throw new Exception("Tabell er ikke angitt");
     }
     $remove_keys = array();
     foreach ($this->metadata as $key => $info) {
         if (isset($info['primary_key']) && $info['primary_key']) {
             $_value = $data[array_search($key, $fields)];
             if (!array_search($key, $fields) || !$_value) {
                 if (array_search($key, $fields) === 0 && $_value) {
                     break;
                 }
                 if ($count_records === 0) {
                     throw new Exception("Fant ikke verdi for feltet 'primary key' {$key}");
                 } else {
                     $found_data = false;
                     foreach ($data as $value) {
                         if ($value && !$found_data) {
                             $found_data = true;
                         }
                     }
                     if ($found_data) {
                         throw new Exception("Fant ikke verdi for feltet 'primary key' {$key}");
                     } else {
                         $this->warnings[] = "Fant ikke verdi for feltet 'primary key' {$key}";
                         return true;
                     }
                 }
             }
             $remove_keys[] = $key;
         }
     }
     $count_records++;
     unset($key);
     unset($info);
     unset($_value);
     $value_set = array();
     foreach ($fields as $key => $field) {
         if (isset($this->metadata[$field])) {
             $value_set[$field] = $this->validate_value($data[$key], $field);
         }
     }
     $id = (int) $value_set['id'];
     $filtermethod = "location_id = {$this->location_id} AND id = {$id}";
     //---------produce data_set
     $location_id = $this->location_id;
     $sql = "SELECT fm_bim_item.id FROM fm_bim_item WHERE {$filtermethod}";
     $this->db->query($sql, __LINE__, __FILE__);
     $type = (int) $this->bim_type_id;
     $location_name = "_entity_{$this->entity_id}_{$this->cat_id}";
     if ($this->db->next_record()) {
         $this->warnings[] = "ID finnes fra før: {$id}, oppdaterer";
         foreach ($remove_keys as $remove_key) {
             unset($value_set[$remove_key]);
         }
         phpgw::import_class('phpgwapi.xmlhelper');
         $xmldata = phpgwapi_xmlhelper::toXML($value_set, $location_name);
         $doc = new DOMDocument();
         $doc->preserveWhiteSpace = true;
         $doc->loadXML($xmldata);
         $domElement = $doc->getElementsByTagName($location_name)->item(0);
         $domAttribute = $doc->createAttribute('appname');
         $domAttribute->value = 'property';
         // Don't forget to append it to the element
         $domElement->appendChild($domAttribute);
         // Append it to the document itself
         $doc->appendChild($domElement);
         $doc->formatOutput = true;
         $xml = $doc->saveXML();
         $_value_set = array('xml_representation' => $this->db->db_addslashes($xml), 'p_location_id' => isset($value_set['p_location_id']) && $value_set['p_location_id'] ? $value_set['p_location_id'] : '', 'p_id' => isset($value_set['p_id']) && $value_set['p_id'] ? $value_set['p_id'] : '', 'location_code' => $value_set['location_code'], 'loc1' => $value_set['loc1'], 'address' => $value_set['address']);
         $_value_set = $this->db->validate_update($_value_set);
         $sql = "UPDATE fm_bim_item SET {$_value_set} WHERE id = {$id} AND location_id = {$location_id}";
     } else {
         $this->warnings[] = "Denne er ny: {$id}, legger til";
         phpgw::import_class('phpgwapi.xmlhelper');
         $xmldata = phpgwapi_xmlhelper::toXML($value_set, $location_name);
         $doc = new DOMDocument();
         $doc->preserveWhiteSpace = true;
         $doc->loadXML($xmldata);
         $domElement = $doc->getElementsByTagName($location_name)->item(0);
         $domAttribute = $doc->createAttribute('appname');
         $domAttribute->value = 'property';
         // Don't forget to append it to the element
         $domElement->appendChild($domAttribute);
         // Append it to the document itself
         $doc->appendChild($domElement);
         $doc->formatOutput = true;
         $xml = $doc->saveXML();
         if (function_exists('com_create_guid') === true) {
             $guid = trim(com_create_guid(), '{}');
         } else {
             $guid = sprintf('%04X%04X-%04X-%04X-%04X-%04X%04X%04X', mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(16384, 20479), mt_rand(32768, 49151), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535));
         }
         $values_insert = array('id' => $id, 'type' => $type, 'location_id' => $location_id, 'guid' => $guid, 'xml_representation' => $this->db->db_addslashes($xml), 'model' => 0, 'p_location_id' => isset($value_set['p_location_id']) && $value_set['p_location_id'] ? $value_set['p_location_id'] : '', 'p_id' => isset($value_set['p_id']) && $value_set['p_id'] ? $value_set['p_id'] : '', 'location_code' => $value_set['location_code'], 'loc1' => $value_set['loc1'], 'address' => $value_set['address'], 'entry_date' => time(), 'user_id' => $this->account);
//.........这里部分代码省略.........
开发者ID:HaakonME,项目名称:porticoestate,代码行数:101,代码来源:import_update_generic.php

示例13: update_control_serie

 function update_control_serie()
 {
     if ($start_date = phpgw::get_var('control_start_date', 'string')) {
         phpgw::import_class('phpgwapi.datetime');
         $start_date = phpgwapi_datetime::date_to_timestamp($start_date);
     }
     $so_control = CreateObject('controller.socontrol');
     $values = array('ids' => phpgw::get_var('ids', 'int'), 'action' => phpgw::get_var('action', 'string'), 'assigned_to' => phpgw::get_var('control_responsible', 'int'), 'start_date' => $start_date, 'repeat_interval' => phpgw::get_var('repeat_interval', 'int'), 'controle_time' => phpgw::get_var('controle_time', 'float'), 'service_time' => phpgw::get_var('service_time', 'float'));
     $ret = $so_control->update_control_serie($values);
     if ($ret) {
         $result = array('status_kode' => 'ok', 'status' => 'Ok', 'msg' => lang('updated'));
     } else {
         $result = array('status_kode' => 'error', 'status' => lang('error'), 'msg' => 'Noe gikk galt');
     }
     return $result;
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:16,代码来源:class.boentity.inc.php

示例14: __construct

 */
/*
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
phpgw::import_class('frontend.uifrontend');
/**
 * Helpdesk
 *
 * @package Frontend
 */
class frontend_uihelpdesk extends frontend_uifrontend
{
    public $public_functions = array('index' => true, 'add_ticket' => true, 'view' => true);
    public function __construct()
    {
        phpgwapi_cache::session_set('frontend', 'tab', $GLOBALS['phpgw']->locations->get_id('frontend', '.ticket'));
        parent::__construct();
        $this->location_code = $this->header_state['selected_location'];
        $GLOBALS['phpgw']->translation->add_app('property');
    }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:31,代码来源:class.uihelpdesk.inc.php

示例15: prepare_data

 function prepare_data($importfile = '', $list = '', $uicols = '')
 {
     $fields = array();
     for ($i = 0; $i < count($uicols['input_type']); $i++) {
         if ($uicols['import'][$i]) {
             $fields[] = array('name' => $uicols['name'][$i], 'descr' => $uicols['descr'][$i]);
             $uicols2['input_type'][] = 'text';
             $uicols2['name'][] = $uicols['name'][$i];
             $uicols2['descr'][] = $uicols['descr'][$i];
         }
     }
     $this->uicols2 = $uicols2;
     phpgw::import_class('phpgwapi.phpexcel');
     $objPHPExcel = PHPExcel_IOFactory::load($importfile);
     $sheetData = $objPHPExcel->getActiveSheet()->toArray(null, true, true, true);
     foreach ($fields as &$entry) {
         $entry['id'] = array_search($entry['descr'], $sheetData[1]);
     }
     $valueset = array();
     $rows = count($sheetData) + 1;
     for ($i = 2; $i < $rows; $i++) {
         foreach ($fields as $entry) {
             $valueset[$i - 2][$entry['name']] = $sheetData[$i][$entry['id']];
         }
     }
     return $valueset;
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:27,代码来源:class.import.inc.php


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