/** * 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(); }
/** * 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'); }
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); }
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; } }
/** * 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; }
<?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;
/** * 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; }
* 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'); } }
<?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 = '******'; $password = '******'; $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/>";
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
<?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; }
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); $sql = "INSERT INTO fm_bim_item (" . implode(',', array_keys($values_insert)) . ') VALUES (' . $this->db->validate_insert(array_values($values_insert)) . ')'; } $ok = false; if ($this->debug) { _debug_array($sql); } else { $ok = $this->db->query($sql, __LINE__, __FILE__); } if ($ok) { $this->messages[] = "Successfully imported record: id ({$id})"; } else { $this->errors[] = "Error importing record: id ({$id})"; } return $ok; }
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; }
*/ /* 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'); }
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; }
<?php phpgw::import_class('activitycalendar.socommon'); include_class('activitycalendar', 'organization', 'inc/model/'); include_class('activitycalendar', 'contact_person', 'inc/model/'); class activitycalendar_soorganization extends activitycalendar_socommon { protected static $so; var $public_functions = array('fix_duplicates' => true); /** * Get a static reference to the storage object associated with this model object * * @return rental_soparty the storage object */ public static function get_instance() { if (self::$so == null) { self::$so = CreateObject('activitycalendar.soorganization'); } return self::$so; } /** * Generate SQL query * * @todo Add support for filter "party_type", meaning what type of contracts * the party is involved in. * * @param string $sort_field * @param boolean $ascending * @param string $search_for * @param string $search_type
<?php phpgw::import_class('booking.sopermission'); class booking_sopermission_booking extends booking_sopermission { /** * @see booking_sopermission */ protected function build_object_relations() { return array(); } }
* * 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 mobilefrontend * @version $Id$ */ phpgw::import_class('phpgwapi.uicommon'); // phpgw::import_class('phpgwapi.jquery'); class mobilefrontend_uifront extends phpgwapi_uicommon { public $public_functions = array('index' => true); public function __construct() { parent::__construct(); } /** * Entry function for this class * * @return void */ public function index() {
* 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 logistic * @version $Id$ */ phpgw::import_class('phpgwapi.uicommon'); phpgw::import_class('logistic.soactivity'); include_class('logistic', 'activity', '/inc/model/'); include_class('logistic', 'requirement', '/inc/model/'); include_class('logistic', 'requirement_value', '/inc/model/'); include_class('logistic', 'requirement_resource_allocation', '/inc/model/'); class logistic_uirequirement_resource_allocation extends phpgwapi_uicommon { var $cat_id; var $start; var $query; var $sort; var $order; var $filter; var $type_id; var $location_code; private $bo;
<?php phpgw::import_class('rental.uicommon'); phpgw::import_class('rental.soinvoice_price_item'); include_class('rental', 'contract', 'inc/model/'); include_class('rental', 'billing', 'inc/model/'); class rental_uiinvoice_price_item extends rental_uicommon { public $public_functions = array('query' => true, 'download' => true); public function query() { // YUI variables for paging and sorting $start_index = phpgw::get_var('startIndex', 'int'); $num_of_objects = phpgw::get_var('results', 'int', 'GET', 1000); $sort_field = phpgw::get_var('sort'); $sort_ascending = phpgw::get_var('dir') == 'desc' ? false : true; // Form variables $search_for = phpgw::get_var('query'); $search_type = phpgw::get_var('search_option'); // Create an empty result set $result_objects = array(); $result_count = 0; //Retrieve the type of query and perform type specific logic $query_type = phpgw::get_var('type'); switch ($query_type) { case 'invoice_price_items': $filters = array('invoice_id' => phpgw::get_var('invoice_id')); $result_objects = rental_soinvoice_price_item::get_instance()->get($start_index, $num_of_objects, $sort_field, $sort_ascending, $search_for, $search_type, $filters); $object_count = rental_soinvoice_price_item::get_instance()->get_count($search_for, $search_type, $filters); break; }
* Query statements for "account" table * @author Edgar Antonio Luna <*****@*****.**> * @copyright Copyright (C) 2003,2004 Free Software Foundation, Inc. http://www.fsf.org/ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License * @package phpgwapi * @subpackage contacts * @version $Id$ */ /** * Use SQL criteria */ phpgw::import_class('phpgwapi.sql_criteria'); /** * Use SQL entity */ phpgw::import_class('phpgwapi.sql_entity'); /** * Query statements for "account" table * * @package phpgwapi * @subpackage contacts */ class contact_accounts extends phpgwapi_sql_entity { var $map = array('account_id' => array('select' => '', 'criteria' => '', 'insert' => '', 'update' => '', 'delete' => '', 'sort' => '', 'field' => '', 'type' => 'integer'), 'account_person_id' => array('select' => '', 'criteria' => '', 'insert' => '', 'update' => '', 'delete' => '', 'sort' => '', 'field' => 'person_id', 'type' => 'integer'), 'person_only' => array('criteria' => ''), 'is_user' => array('select' => '')); function __construct($ali = '', $field = '', $criteria = '') { $this->_constructor('phpgw_accounts', 'contact_accounts'); if ($field) { $this->add_select($field); }
* * 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 logistic * @version $Id$ */ phpgw::import_class('logistic.sorequirement'); phpgw::import_class('logistic.sorequirement_resource_allocation'); phpgw::import_class('phpgwapi.uicommon'); phpgw::import_class('logistic.soactivity'); phpgw::import_class('phpgwapi.jquery'); include_class('logistic', 'actvity'); class logistic_uiactivity extends phpgwapi_uicommon { private $so; private $so_project; private $so_requirement; private $so_resource_allocation; private $read; private $add; private $edit; private $delete; private $manage; public $public_functions = array('query' => true, 'add' => true, 'edit' => true, 'view' => true, 'index' => true, 'save' => true, 'edit_favorite' => true, 'view_resource_allocation' => true); public function __construct() {
<?php phpgw::import_class('activitycalendar.soorganization'); phpgw::import_class('activitycalendar.sogroup'); phpgw::import_class('activitycalendar.soarena'); phpgw::import_class('activitycalendar.socontactperson'); include_class('activitycalendar', 'model', 'inc/model/'); class activitycalendar_activity extends activitycalendar_model { public static $so; protected $id; protected $title; protected $organization_id; protected $group_id; protected $district; protected $office; protected $category; protected $state; protected $target; protected $description; protected $arena; protected $time; protected $create_date; protected $last_change_date; protected $contact_person_1; protected $contact_person_2; protected $contact_person_2_address; protected $contact_person_2_zip; protected $special_adaptation; protected $secret; protected $internal_arena;
<?php phpgw::import_class('activitycalendar.uicommon'); phpgw::import_class('activitycalendar.soarena'); include_class('activitycalendar', 'arena', 'inc/model/'); class activitycalendar_uiarena extends activitycalendar_uicommon { public $public_functions = array('index' => true, 'query' => true, 'view' => true, 'add' => true, 'edit' => true, 'download' => true, 'get_address_search' => true); public function __construct() { parent::__construct(); self::set_active_menu('activitycalendar::arena'); $config = CreateObject('phpgwapi.config', 'activitycalendar'); $config->read(); } /** * Public method. Forwards the user to edit mode. */ public function add() { $GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction' => 'activitycalendar.uiarena.edit')); } /** * Public method. */ public function get_address_search() { $search_string = phpgw::get_var('search'); //var_dump($search_string); return activitycalendar_soarena::get_instance()->get_address($search_string); }
*/ /* This program is free software: you can redistribute it and/or modify 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 Lesser 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('phpgwapi.datetime'); /** * Description * @package property */ class property_socommon_core { /** * @var int $_total_records total number of records found */ protected $_total_records = 0; /** * @var int $_receipt feedback on actions */ protected $_receipt = array(); /**
* SQL Generator Criteria - help to create criterias for common queries * @author Edgar Antonio Luna Diaz <*****@*****.**> * @author Alejadro Borges * @author Jonathan Alberto Rivera Gomez * @copyright Copyright (C) 2003,2004 Free Software Foundation, Inc. http://www.fsf.org/ * @license http://www.fsf.org/licenses/gpl.html GNU General Public License * @package phpgwapi * @subpackage database * @version $Id$ * @internal Development of this application was funded by http://www.sogrp.com * @link http://www.sogrp.com/ */ /** * Include SQL class */ phpgw::import_class('phpgwapi.sql'); /** * SQL Generator Criteria - help to create criterias for common queries * * This class provide common methods to set, mantain, an retrive the queries * to use in a query (for the where clause). * @package phpgwapi * @subpackage database */ class phpgwapi_sql_criteria extends phpgwapi_sql { /* public function __construct() { } */
<?php phpgw::import_class('booking.uidocumentation'); class bookingfrontend_uidocumentation extends booking_uidocumentation { public $public_functions = array('download' => true, 'index' => true, 'index_images' => true); protected $module; public function __construct() { parent::__construct(); $this->module = "bookingfrontend"; } }
<?php /** * Class for creating select boxes for addresse, projects, array items, ... * @author Ralf Becker <*****@*****.**> * @copyright Copyright (C) 2000-2004 Free Software Foundation, Inc. http://www.fsf.org/ * @license http://www.fsf.org/licenses/lgpl.html GNU Lesser General Public License * @package phpgwapi * @subpackage gui * @version $Id$ */ /** * Include parent class * @see sbox */ phpgw::import_class('phpgwapi.sbox'); /** * Class for creating select boxes for addresse, projects, array items, ... * * @package phpgwapi * @subpackage gui */ class phpgwapi_sbox2 extends phpgwapi_sbox { public function __construct() { trigger_error('phpgwapi_sbox2 is no longer used, please port your code to phpgw_sbox', E_USER_NOTICE); parent::__construct(); } }
* 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.socommon'); include_class('controller', 'control_group_list', 'inc/model/'); include_class('controller', 'control_group', 'inc/model/'); class controller_socontrol_group_list extends controller_socommon { protected static $so; /** * Get a static reference to the storage object associated with this model object * * @return controller_socontrol_group the storage object */ public static function get_instance() { if (self::$so == null) { self::$so = CreateObject('controller.socontrol_group_list'); }
* * 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/bbb_/ekstern/ * @package property * @subpackage location * @version $Id$ */ /** * Description * @package property */ phpgw::import_class('phpgwapi.yui'); class property_uilocation { var $grants; var $cat_id; var $start; var $query; var $sort; var $order; var $filter; var $currentapp; var $type_id; var $location_code; var $public_functions = array('download' => true, 'index' => true, 'view' => true, 'edit' => true, 'delete' => true, 'update_cat' => true, 'stop' => true, 'summary' => true, 'columns' => true, 'update_location' => true, 'responsiblility_role' => true); function __construct() {