tutos-commits Mailing List for TUTOS
Projects / CRM / PLM / Calendar / Tasks / SCRUM / Test / Inventory
Brought to you by:
gokohnert
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(13) |
Aug
(214) |
Sep
(144) |
Oct
(22) |
Nov
(22) |
Dec
(93) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(25) |
Feb
(31) |
Mar
(92) |
Apr
(70) |
May
(103) |
Jun
(130) |
Jul
(265) |
Aug
(325) |
Sep
(233) |
Oct
(244) |
Nov
(261) |
Dec
(157) |
2003 |
Jan
(101) |
Feb
(135) |
Mar
(148) |
Apr
(164) |
May
(53) |
Jun
(116) |
Jul
(149) |
Aug
(126) |
Sep
(45) |
Oct
(109) |
Nov
(36) |
Dec
(61) |
2004 |
Jan
(131) |
Feb
(236) |
Mar
(278) |
Apr
(259) |
May
(92) |
Jun
(110) |
Jul
(150) |
Aug
(64) |
Sep
(141) |
Oct
(141) |
Nov
(146) |
Dec
(65) |
2005 |
Jan
(70) |
Feb
(77) |
Mar
(129) |
Apr
(153) |
May
(161) |
Jun
(63) |
Jul
(42) |
Aug
(16) |
Sep
(30) |
Oct
(3) |
Nov
(8) |
Dec
(40) |
2006 |
Jan
(114) |
Feb
(16) |
Mar
(12) |
Apr
(15) |
May
(4) |
Jun
(9) |
Jul
(69) |
Aug
(27) |
Sep
(12) |
Oct
(80) |
Nov
(62) |
Dec
(41) |
2007 |
Jan
(34) |
Feb
(2) |
Mar
(38) |
Apr
(82) |
May
(61) |
Jun
(37) |
Jul
(16) |
Aug
(64) |
Sep
(7) |
Oct
(52) |
Nov
(18) |
Dec
(28) |
2008 |
Jan
(168) |
Feb
(26) |
Mar
(27) |
Apr
(19) |
May
(10) |
Jun
(58) |
Jul
(58) |
Aug
(91) |
Sep
(14) |
Oct
(23) |
Nov
(56) |
Dec
(38) |
2009 |
Jan
(58) |
Feb
(90) |
Mar
(204) |
Apr
(90) |
May
(27) |
Jun
(177) |
Jul
(116) |
Aug
(53) |
Sep
(42) |
Oct
(120) |
Nov
(51) |
Dec
(58) |
2010 |
Jan
(117) |
Feb
(231) |
Mar
(163) |
Apr
(90) |
May
(40) |
Jun
(139) |
Jul
(49) |
Aug
(118) |
Sep
(25) |
Oct
(80) |
Nov
(102) |
Dec
(99) |
2011 |
Jan
(176) |
Feb
(42) |
Mar
(60) |
Apr
(52) |
May
(30) |
Jun
(29) |
Jul
(27) |
Aug
(16) |
Sep
(51) |
Oct
(70) |
Nov
(63) |
Dec
(58) |
2012 |
Jan
(28) |
Feb
(26) |
Mar
(7) |
Apr
(12) |
May
(41) |
Jun
(61) |
Jul
(59) |
Aug
(38) |
Sep
(30) |
Oct
(28) |
Nov
(14) |
Dec
(31) |
2013 |
Jan
(24) |
Feb
(54) |
Mar
(45) |
Apr
(22) |
May
(35) |
Jun
(8) |
Jul
(18) |
Aug
(38) |
Sep
(11) |
Oct
(8) |
Nov
(19) |
Dec
(20) |
2014 |
Jan
(20) |
Feb
(22) |
Mar
(4) |
Apr
(6) |
May
(13) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(6) |
2015 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2016 |
Jan
(4) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(8) |
Aug
(13) |
Sep
(12) |
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2021 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1
|
2
(4) |
3
|
4
(1) |
5
(1) |
6
(2) |
7
(1) |
8
|
9
(4) |
10
(2) |
11
(1) |
12
|
13
|
14
|
15
|
16
(6) |
17
(3) |
18
|
19
|
20
(15) |
21
|
22
|
23
|
24
|
25
(3) |
26
(1) |
27
|
28
|
29
|
30
(7) |
|
|
|
|
|
From: Gero K. <gok...@us...> - 2009-11-30 21:52:22
|
Update of /cvsroot/tutos/tutos/php/module_template In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv23803 Modified Files: AAA.pinc AAA_config.php Added Files: demodata.p3 make_module.sh Log Message: update --- NEW FILE: demodata.p3 --- <?php /** * Copyright 2004 - 2009 by Gero Kohnert * * 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; version 2 of the License. * * CVS Info: $Id: demodata.p3,v 1.1 2009/11/30 21:20:49 gokohnert Exp $ * $Author: gokohnert $ * * Filling in demodata * this file is simply "sourced" when creating a database and filling in demodata * @modulegroup AAA * @module demodata * @package AAA */ ?> --- NEW FILE: make_module.sh --- #! /bin/sh # # the ultimate team organization software # --------------------------------------- # # building Module from a template # # Copyright 2008 - 2009 by Gero Kohnert # (see html/copyright.html for License) # # Author: Gero Kohnert # # $Header: /cvsroot/tutos/tutos/php/module_template/make_module.sh,v 1.1 2009/11/30 21:20:49 gokohnert Exp $ # help() { echo "--------------------------" echo "TUTOS make_module.sh " echo "--------------------------" echo " " echo " This is a script for generating TUTOS modules based on a template" echo " $0 MODULE_NAME MODULE_DIRNAME" echo " " echo " " exit } D=`dirname $PWD` BASE=`basename $PWD` if [ $BASE != 'module_template' ] ; then echo "Error: call $0 in the module_template directory" echo "You are in: $PWD" help fi if [ -z "$1" ] ; then echo "Error: missing MODULE_NAME" help fi if [ -z "$2" ] ; then echo "Error: missing MODULE_DIRNAME" help fi MODNAME=$1 MODPATH="$D/$2" MODDIR=$2 echo " ----------------------------" echo " Modulename : $MODNAME (used for class and filenames)" echo " Moduledir : $MODDIR" echo " Modulepath : $MODPATH" if [ -e "$MODPATH" ] ; then echo "Error: $MODPATH already exists" help fi echo "Press return to continue or CTRL-C to abort" read INP mkdir $MODPATH cp -a *.php *.pinc *.p3 README help $MODPATH cd $MODPATH rm -rf help/CVS replace AAA $MODNAME -- *.p3 *.pinc *.php help/* replace module_template $MODDIR -- *.p3 *.pinc *.php help/* mv AAA_new.php ${MODNAME}_new.php php -l ${MODNAME}_new.php mv AAA_show.php ${MODNAME}_show.php php -l ${MODNAME}_show.php mv AAA_ins.php ${MODNAME}_ins.php php -l ${MODNAME}_ins.php mv AAA_overview.php ${MODNAME}_overview.php php -l ${MODNAME}_overview.php mv AAA_select.php ${MODNAME}_select.php php -l ${MODNAME}_select.php mv AAA_config.php ${MODNAME}_config.php php -l ${MODNAME}_config.php mv AAA.pinc ${MODNAME}.pinc php -l ${MODNAME}.pinc echo " edit mconfig.pinc and mtable.pinc" echo " then customize all other scripts according to your mtable.pinc" # EOF Index: AAA.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/module_template/AAA.pinc,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- AAA.pinc 30 Nov 2009 16:02:51 -0000 1.1 +++ AAA.pinc 30 Nov 2009 21:20:49 -0000 1.2 @@ -217,7 +217,7 @@ * create a list of AAAs for the given object and given user */ static function infolist (&$user,&$obj,$cols,$format = "html") { - global $lang; + global $lang,$tutos; $r = ''; if (! is_object($obj) ) return $r; @@ -233,15 +233,23 @@ $r .= "<tr>\n"; $r .= $user->layout->showfield($lang['AAAs']); $r .= " <td valign=\"top\" colspan=\"".($cols-1)."\">\n"; + $pre = ''; if ( $format == "paper" ) { foreach ($obj->list[AAA::gettypeid()] as $o) { - $r .= $o; + $r .= $pre.$o->getLink(); + $pre = '<br />'; } } else { - $pre = ''; + $cnt = 0; foreach ($obj->list[AAA::gettypeid()] as $o) { $r .= $pre.$o->getLink(); $pre = '<br />'; + $cnt++; + if ( $cnt >= $tutos[maxshort] ) { + $r .= $pre.$user->layout->theme->getImage(folder,'list'); + $r .= ' '. makelink('module_template/AAA_overview.php?link_id='. $obj->id,sprintf($lang['AllEntries'], count($obj->list[AAA::gettypeid()]))); + break; + } } } $r .= " </td>\n"; Index: AAA_config.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/module_template/AAA_config.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- AAA_config.php 30 Nov 2009 16:02:51 -0000 1.1 +++ AAA_config.php 30 Nov 2009 21:20:49 -0000 1.2 @@ -1,5 +1,4 @@ <?php -<?php /** * Copyright 2009 by Gero Kohnert * |
From: Gero K. <gok...@us...> - 2009-11-30 21:22:53
|
Update of /cvsroot/tutos/tutos/php In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv25324 Modified Files: admin_show.php permission.p3 Log Message: fix Index: admin_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/admin_show.php,v retrieving revision 1.110 retrieving revision 1.111 diff -u -d -r1.110 -r1.111 --- admin_show.php 20 Nov 2009 20:26:08 -0000 1.110 +++ admin_show.php 30 Nov 2009 21:22:43 -0000 1.111 @@ -2,8 +2,8 @@ /** * Copyright 2001 - 2009 by Gero Kohnert * - * 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 + * 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; version 2 of the License. * * @modulegroup ADMIN @@ -31,7 +31,7 @@ // split the semi-serialized data into keys and values $splitRegex = '/([^;}][A-Za-z0-9_]*?)\|/'; $splitArray = preg_split($splitRegex, $val, -1,PREG_SPLIT_DELIM_CAPTURE); - + // remove offset 0 -- always empty array_shift($splitArray); // build a useful array @@ -62,7 +62,7 @@ */ Function getinfo(&$table) { global $dbconn; - + foreach($table as $i => $f) { $table[$i]['count'] = 0; $table[$i]['count'] = getTableCount($f[name],$dbconn); @@ -267,7 +267,7 @@ $r .= $this->orderHeader("", $lang['AdminKillSession'],"",1); $r .= "</tr>\n"; $line = 0; - while (false !== ($file = readdir($handle))) { + while (false !== ($file = readdir($handle))) { if ( ! ereg("^sess_",$file) ) { continue; } @@ -320,7 +320,7 @@ } $r .= $this->SubTableEnd(); $r .= "</td></tr>\n"; - closedir($handle); + closedir($handle); return $r; } @@ -328,7 +328,7 @@ * */ Function info() { - global $lang,$tutos; + global $lang,$tutos; $r = ''; @@ -404,11 +404,13 @@ $r .= $this->showfield("PHP"); $r .= $this->showdata('served by '. PHP_OS .' with PHP '. PHP_SAPI .' Version '. PHP_VERSION .' ',9); $r .= "</tr>\n"; - $r .= "<tr>\n"; - $r .= $this->showfield("Apache"); - $r .= $this->showdata(apache_get_version(),9); - $r .= "</tr>\n"; + if (function_exists('apach_get_version')) { + $r .= "<tr>\n"; + $r .= $this->showfield("Apache"); + $r .= $this->showdata(apache_get_version(),9); + $r .= "</tr>\n"; + } $r .= $this->debug_info(); $r .= "<tr>\n"; @@ -490,7 +492,7 @@ } $r .= "</td>\n"; $r .= $this->OverviewRowEnd($line++); - unset($table); + unset($table); } $r .= "<tr><td colspan=\"9\"> </td></tr>\n"; @@ -577,14 +579,14 @@ text => $lang['UserCreate'], info => $lang['UserCreate'], category => array("user","new") - ); + ); $this->addMenu($x); if ($tutos[useacl] == 1) { $x = array( url => 'acl_overview.php', text => $lang['ACLOverview'], info => $lang['ACLOverview'], category => array("admin") - ); + ); $this->addMenu($x); } if ($tutos[usesync] == 1) { @@ -592,7 +594,7 @@ text => $lang['AdminDBSync'], info => $lang['AdminDBSync'], category => array("admin") - ); + ); $this->addMenu($x); } @@ -601,7 +603,7 @@ info => "PHP - Info for this TUTOS", 'target' => 'admin', category => array('admin') - ); + ); $this->addMenu($x); if ( $this->user->isadmin() && function_exists("eaccelerator_info")) { @@ -610,7 +612,7 @@ info => 'Info about optimization', 'target' => 'admin', category => array('admin') - ); + ); $this->addMenu($x); } if ( $this->user->isadmin() && class_exists("memcache")) { @@ -619,28 +621,28 @@ info => 'Info about optimization', 'target' => 'admin', category => array('admin') - ); + ); $this->addMenu($x); } $x = array( url => 'module_overview.php', text => $lang['AdminModules'], info => $lang['AdminModulesI'], category => array('admin') - ); + ); $this->addMenu($x); $x = array( url => 'admin/customize_show.php', text => $lang['AdminCustomizeLang'], info => $lang['AdminCustomizeLangI'], category => array('admin') - ); + ); $this->addMenu($x); $x = array( url => 'admin/main_config.php', text => $lang['AdminMainConfig'], info => $lang['AdminMainConfigI'], category => array('admin','config') - ); + ); $this->addMenu($x); } } @@ -651,6 +653,6 @@ $dbconn->close(); ?> <!-- - CVS Info: $Id$ - $Author$ ---> +CVS Info: $Id$ + $Author$ + --> \ No newline at end of file Index: permission.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/permission.p3,v retrieving revision 1.178 retrieving revision 1.179 diff -u -d -r1.178 -r1.179 --- permission.p3 23 Oct 2009 19:09:11 -0000 1.178 +++ permission.p3 30 Nov 2009 21:22:43 -0000 1.179 @@ -2,8 +2,8 @@ /** * Copyright 1999 - 2009 by Gero Kohnert * - * 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 + * 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; version 2 of the License. * * CVS Info: $Id$ @@ -106,7 +106,9 @@ @session_cache_limiter('public'); #session_cache_limiter('private, must-revalidate'); #session_cache_limiter('private_no_expire'); -@session_start(); +if (session_id() == '') { + @session_start(); +} set_magic_quotes_runtime(0); define ('minimumversion',"5.1.0"); @@ -126,7 +128,7 @@ return false; else return true; -} +} /** * allow a pseudo login for free pages like help @@ -162,7 +164,7 @@ } /** generate a password */ -function generatePassword() +function generatePassword() { return substr(md5(uniqid()),0,8); } @@ -499,7 +501,7 @@ * DOES THIS WORK with TEAMS in TEAMS ?? */ Function check_dbacl( &$dbconn, &$query, $user_id, $id_name="id") { - global $tutos,$current_user; + global $tutos,$current_user; if ($tutos[use_check_dbacl] != 1) return; if ($current_user->isadmin()) return; @@ -509,13 +511,13 @@ $t2 = ''; if ( count($current_user->teamlist) > 0 ) { $t1 = 'left join '.$dbconn->prefix .'adrteam t on (a.adr_id = t.team_id) '; -# $t2 = ' OR ((t.adr_id='.$user_id.') AND (a.adr_id=t.team_id))'; + # $t2 = ' OR ((t.adr_id='.$user_id.') AND (a.adr_id=t.team_id))'; $t2 = ' OR (t.adr_id='.$user_id.')'; } - $query = 'SELECT DISTINCT i.* FROM ('.$query.') AS i' - .' left join '.$dbconn->prefix .'acl a on (i.'.$id_name.' = a.obj_id) ' - .$t1 - . 'WHERE (a.perm is null OR a.perm>='.$tutos[seeok].')' - .' AND ((a.adr_id is null) OR (a.adr_id='.$user_id.') OR (a.adr_id=0) OR (a.adr_id < 0)'. $t2 .' )'; + $query = 'SELECT DISTINCT i.* FROM ('.$query.') AS i' + .' left join '.$dbconn->prefix .'acl a on (i.'.$id_name.' = a.obj_id) ' + .$t1 + . 'WHERE (a.perm is null OR a.perm>='.$tutos[seeok].')' + .' AND ((a.adr_id is null) OR (a.adr_id='.$user_id.') OR (a.adr_id=0) OR (a.adr_id < 0)'. $t2 .' )'; } ?> \ No newline at end of file |
From: Gero K. <gok...@us...> - 2009-11-30 21:21:01
|
Update of /cvsroot/tutos/tutos/php/module_template/help In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv23803/help Added Files: .htaccess Log Message: update --- NEW FILE: .htaccess --- # # This file is part of TUTOS # # # $Id: .htaccess,v 1.1 2009/11/30 21:20:49 gokohnert Exp $ # # Dont allow access to files # Order allow,deny Deny from all |
From: Gero K. <gok...@us...> - 2009-11-30 16:03:06
|
Update of /cvsroot/tutos/tutos/php/module_template In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv6334/module_template Added Files: .cvsignore AAA.pinc AAA_config.php AAA_ins.php AAA_new.php AAA_overview.php AAA_select.php AAA_show.php README en.p3 mconfig.pinc mtable.pinc Log Message: a new module template to make life easier when building new modules. Np functionality, just a blueprint --- NEW FILE: .cvsignore --- # # $Id: .cvsignore,v 1.1 2009/11/30 16:02:51 gokohnert Exp $ # *~ *_custom.p3 --- NEW FILE: AAA_new.php --- <?php /** * Copyright 2009 by Gero Kohnert * * 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; version 2 of the License. * * @modulegroup AAA * @module AAA_new * @package AAA */ $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; require_once 'permission.p3'; /* Check if user is allowed to use it */ check_user(); loadmodules('AAA','new'); loadmodule('AAA'); loadlayout(); /** * change/modify or create a AAA */ class AAA_new extends layout { /** * info */ Function info() { global $lang,$table; $this->width = 6; $r = ''; $r .= '<form id="AAAnew" name="AAAnew" action="AAA_ins.php" method="post">'."\n"; if ( $this->obj->id > 0 ) { $this->addHidden("id",$this->obj->id); } $r .= $this->DataTableStart(); $r .= $this->Headline(); $r .= $this->acl_line(true); $r .= "<tr>\n"; $r .= $this->showfieldc($lang['AAAName'],1,'name'); $r .= ' <td colspan="'.($this->width -1).'">'; $r .= ' <input id="name" size="'. min($table['AAA']['name'][size],40) .'" maxlength="'. $table['AAA']['name'][size] .'" name="name" value="'. myentities($this->obj->name) ."\" />\n"; $r .= "</td></tr>\n"; $r .= "<tr>\n"; $r .= $this->showfieldc($lang['AAAReference'],1,'link_id'); $r .= " <td colspan=\"5\">\n"; if ($this->obj->id == -1) { $r .= $lang[$this->obj->ref->getType()] ." ". $this->obj->ref->getLink() ."\n"; $this->addhidden("link_id",$this->obj->link_id); } else { $r .= " <select name=\"link_id\">\n"; foreach ($this->obj->plist as $i => $f) { $r .= ' <option value="'. $i .'"'. ($i == $this->obj->link_id ? ' selected="selected">* ':'>') . $lang[$f->getType()] .': '. myentities($f->getFullName()) ."</option>\n"; } $r .= " </select>\n"; } $r .= " </tr>\n"; $r .= " </td>\n"; // Edit additional custom fields $r .= edit_custom_fields($this,$this->obj->gettype(),$this->obj,5); // References to modules $r .= module_addforms($this->user,$this->obj,4); if ( $this->obj->mod_ok() ) { $r .= "<tr>\n"; if ($this->obj->id > 0 ) { $r .= submit_reset(0,1,1,1,1,0); } else { $r .= submit_reset(0,-1,1,1,1,0); } $r .= "</tr>\n"; } $r .= $this->DataTableEnd(); $r .= hiddenFormElements(); $r .= $this->getHidden(); $r .= $this->markBadFields(); $r .= '</form>'."\n"; echo $r; } /** * prepare */ Function prepare() { global $msg,$lang,$current_user; $this->obj = new AAA($this->dbconn); if(isset($_GET['id']) && is_numeric($_GET['id'])) { $this->obj = $this->obj->read($_GET['id'],$this->obj); $this->name = $lang['AAAMod']; if ( !is_object($this->obj) ) { $msg .= sprintf($lang['Err0040'],$lang['AAA']); $this->stop = true; return; } } else { $this->name = $lang['AAACreate']; } if ( !$this->user->feature_ok($this->obj->gettypeid(),PERM_NEW) ) { $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]); $this->stop = true; return; } if ( ! $this->obj->mod_ok() ) { $msg .= sprintf($lang['Err0024'],$lang[$this->obj->getType()]); $this->stop = true; return; } if ( isset($_GET['link_id']) ){ $this->obj->link_id = $_GET['link_id']; } $this->obj->set_string_from_arg('name','name',$lang['AAAName']); // preset additional custom fields preset_custom_fields($this->obj->gettype(),$this->obj); $this->obj->read_reference(); # $this->obj->read_relations(); add_module_newlinks($this,$this->obj); } } $l = new AAA_new($current_user); $l->display(); $dbconn->Close(); ?> <!-- CVS Info: $Id: AAA_new.php,v 1.1 2009/11/30 16:02:51 gokohnert Exp $ $Author: gokohnert $ --> --- NEW FILE: AAA.pinc --- <?php /** * Copyright 1999 - 2009 by Gero Kohnert * * 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; version 2 of the License. * * CVS Info: $Id: AAA.pinc,v 1.1 2009/11/30 16:02:51 gokohnert Exp $ * $Author: gokohnert $ */ /** * base class for module AAA * * @package AAA */ class AAA extends tutos_module { /** * init */ function AAA(&$dbconn) { global $table; $this->init($dbconn); $this->name = ''; $this->link_id = -1; $this->ref = null; $this->tablename = $this->dbconn->prefix .$table['AAA'][name]; $this->run_postinit_hook(); } /** * read the database data for AAA */ function read_result (&$r, $pos ) { $this->name = $r->get($pos, 'name'); $this->link_id = $r->get($pos, 'link_id'); $this->creator = $r->getObject($pos, "creator"); parent::read_result($r,$pos); return; } /** * read the linked object */ function read_reference () { if ( $this->link_id == -1 ) return; if ( empty($this->link_id) ) return; $this->ref = getObject($this->dbconn,$this->link_id); if ( ! is_object($this->ref) ) { $this->ref = null; } return; } /** * Return a link to this AAA */ function getURL() { return 'module_template/AAA_show.php?id='.$this->id; } /** * Return a link to modify this AAA */ function getModURL() { return 'module_template/AAA_new.php?id='.$this->id; } /** * set the AAA name */ function setName($value) { return $this->setStrField('name',$value,'AAAName'); } /** * set the reference */ function setReference($name) { if ( $this->link_id != $name ) { $this->modified[] = array ( "field" => 'AAAReference', 'old' => $this->link_id , "new" => $name ); $this->link_id = $name; } return; } /** * Return a fullname */ function getFullname() { return $this->name; } /** * save the AAA data to the database */ function save () { global $table; $msg = ''; $msg .= $this->run_presave_hook(); $q = new query($this->dbconn); $q->addFV('name',$this->name,'STRING',$table['AAA']['name'][size]); $q->addFV('link_id',$this->link_id,'INT'); $q->setTable($this->tablename); if ( $this->id < 0 ) { $this->modified = array(); if ( isset($this->newid) ) { $this->id = $this->newid; $q->addFV('id',$this->id,''); } else { $this->id = $q->addFV('id',-1,'NEXTID'); // adopt the permissions from the referenced object # $this->acl = $this->ref->acl; acl_default($this,$this->creator); // Prepare the history $this->modified[] = array ( 'field' => 'AAACreate' , 'old' => "-1" , 'new' => $this->id, 'obj_id' => $this->link_id ); $this->modified[] = array ( 'field' => 'created' , 'old' => $this->getType() , 'new' => $this->id, 'obj_id' => $this->id ); } $q->addFV('creator',$this->creator,'OBJ'); $q->addFV('creation',$this->creation,'DATETIME'); $query = $q->getInsert(); } else { $q->addWC('id',$this->id,''); $query = $q->getUpdate(); } $r = $this->dbconn->Exec($query); $r->free(); $msg .= parent::save(); return $msg; } /** * Delete AAA from DB */ function delete() { $msg = ''; $q = 'DELETE FROM '. $this->tablename .' WHERE id = '. $this->id; $r = $this->dbconn->Exec($q); $r->free(); $msg .= parent::delete(); return $msg; } /** * get the type of object */ function gettype () { global $tutos; return $tutos[modules]['AAA'][name]; } /** * get the type id of object */ function gettypeid () { global $tutos; return $tutos[modules]['AAA']['perm']; } /* --------------------------------------------------------------------------- * The following methods are abstract factory functions for groups * which handle the membership list of an object * --------------------------------------------------------------------------- */ /** * Return Info about connected notes to a object */ static function obj_read(&$obj) { global $table; if (! is_object($obj) ) return; if ( $obj->id < 0 ) return; if ( isset($obj->list[AAA::gettypeid()]) ) { return; } $obj->list[AAA::gettypeid()] = array(); $q = 'SELECT * from '. $obj->dbconn->prefix .$table['AAA'][name].' where link_id = '. $obj->id .' order by creation desc'; $r = $obj->dbconn->Exec($q); $n = $r->numrows(); $a = 0; while ($a < $n) { $o = new AAA($obj->dbconn); $o->read_result($r,$a); if ( $o->see_ok() ) { $obj->list[AAA::gettypeid()][$o->id] = &$o; } $a++; unset($o); } $r->free(); return; } /** * create a list of AAAs for the given object and given user */ static function infolist (&$user,&$obj,$cols,$format = "html") { global $lang; $r = ''; if (! is_object($obj) ) return $r; if ( $obj->id < 0 ) return $r; if ( ! $user->feature_ok(AAA::gettypeid(),PERM_SEE) ) { return $r; } AAA::obj_read($obj); if ( count($obj->list[AAA::gettypeid()]) == 0 ) { return $r; } $r .= "<tr>\n"; $r .= $user->layout->showfield($lang['AAAs']); $r .= " <td valign=\"top\" colspan=\"".($cols-1)."\">\n"; if ( $format == "paper" ) { foreach ($obj->list[AAA::gettypeid()] as $o) { $r .= $o; } } else { $pre = ''; foreach ($obj->list[AAA::gettypeid()] as $o) { $r .= $pre.$o->getLink(); $pre = '<br />'; } } $r .= " </td>\n"; $r .= "</tr>\n"; return $r; } /** * create a link where a AAA for the given object could be added */ static function getaddlink (&$user,&$obj,$text = "") { global $lang; if (! is_object($obj) ) return ''; if ( $obj->id == -1 ) return ''; if (! $user->feature_ok(AAA::gettypeid(),PERM_NEW) ) return ''; if (! $obj->use_ok() ) return ''; $x = array( url => 'module_template/AAA_new.php?link_id='. $obj->id, confirm => false, text => ($text == '' ? $lang['AAACreate']:$text), info => sprintf($lang['AAACreateI'], $obj->getFullName()), category => array(AAA::gettypeid(),'new','module') ); return $x; } /** * create a link to a overview page */ static function getSelectLink (&$user,$text = "") { global $lang,$tutos; if ( ! $user->feature_ok(AAA::gettypeid(),PERM_SEL) ) { return; } return array( url => 'module_template/AAA_select.php', image => $user->layout->theme->getImage(AAA::getHtmlIcon(),'menu'), text => ($text == "" ? $lang['AAASearch']: $text), info => $lang['SearchForAAA'], category => array('search',AAA::gettype(),'module') ); } /** * get the help index */ function getHelpIndex () { global $lang; $r = ''; $r .= '<h3>'. makelink('help.php?p=glossary#'.AAA::getType(),$lang['AAAs'],$lang['AAAs']) ."</h3><ul>\n"; $r .= '<li>'. makelink('help.php?p=AAA_new',$lang["NewEntry"].'/'. $lang['Modify'],$lang['NewEntry'].'/'. $lang['Modify']) ."</li>\n"; $r .= "</ul>\n"; return $r; } } ?> --- NEW FILE: AAA_show.php --- <?php /** * Copyright 2009 by Gero Kohnert * * 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; version 2 of the License. * * @modulegroup AAA * @module AAA_show * @package AAA */ $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; require_once 'permission.p3'; /* Check if user is allowed to use it */ check_user(); loadmodules('AAA','show'); loadmodule('AAA'); loadlayout(); /** * show a AAA */ class AAA_show extends layout { /** * info */ Function info() { global $lang; $this->obj->read_reference(); $r = ''; $r .= $this->DataTableStart(); $r .= "<tr>\n"; $r .= ' <th colspan="3">'. $lang['AAA'] ."</th>\n"; $r .= $this->showGuiIcons('<th class="icons">','</th>',$this->obj,$this->obj,array('mod','del','perm'),false); $r .= "</tr>\n"; $r .= $this->CreatorInfoLine($this->obj,4); $r .= "<tr>\n"; $r .= $this->showfield($lang['AAAName']); $r .= '<td colspan="3">'. myentities($this->obj->name) .'</font></b></td>'; $r .= "</tr>\n"; $r .= "<tr>\n"; $r .= $this->showfield($lang['AAAReference']); $r .= '<td colspan="3">'. (is_object($this->obj->ref) ? $lang[$this->obj->ref->getType()].' '.$this->obj->ref->getLink():'-') .'</font></b></td>'; $r .= "</tr>\n"; // Show additional custom fields $r .= show_custom_fields($this,$this->obj->gettype(),$this->obj,4); // References to modules $r .= show_module_infolists($this->user,$this->obj,4); $r .= $this->obj->getHistoryLink(4); $r .= $this->DataTableEnd(); return $r; } /** * prepare */ Function prepare() { global $msg,$lang,$current_user; $this->name = $lang['AAADetail']; $this->obj = new AAA($this->dbconn); if ( isset($_GET['id']) ) { $this->obj = $this->obj->read($_GET['id'],$this->obj); } if ( !is_object($this->obj) ) { $msg .= sprintf($lang['Err0040'],$lang['AAA']); $this->stop = true; $this->format = "html"; return; } else if ( ! $this->obj->see_ok() ) { $msg .= sprintf($lang['Err0022'],$lang[$this->obj->getType()]); $this->stop = true; return; } else if ( $this->obj->id < 0 ) { $msg .= sprintf($lang['Err0040'],$lang[$this->obj->getType()]); $this->stop = true; return; } // menu $m = AAA::getSelectLink($this->user, $lang['Search']); $m[category][] = "obj"; $this->addmenu($m); add_module_addlinks($this,$this->obj); // add this page to the browsehistory of the users session $this->addtohistory(); } } $l = new AAA_show($current_user); $l->display(); $dbconn->Close(); ?> <!-- CVS Info: $Id: AAA_show.php,v 1.1 2009/11/30 16:02:51 gokohnert Exp $ $Author: gokohnert $ --> --- NEW FILE: mtable.pinc --- <?php /** * Copyright 2009 by Gero Kohnert * * 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; version 2 of the License. * * Information about the tables and indices neccessary for this module * * CVS Info: $Id: mtable.pinc,v 1.1 2009/11/30 16:02:51 gokohnert Exp $ * $Author: gokohnert $ */ # # Module AAA # $table['AAA'][name] = 'AAA'; $table['AAA'][Desc] = 'TUTOS AAA Element'; $table['AAA']['id'] = array(type => 'ID_TYPE', constraints => 'PK', Desc => 'Object ID'); $table['AAA']['name'] = array(type => 'VARCHAR', size => 30, constraints => '', Desc => 'title'); $table['AAA']['link_id'] = array(type => 'ID_TYPE', constraints => '', Desc => 'link ID'); $table['AAA']['creator'] = array(type => 'ID_TYPE', constraints => "NN", Desc => 'creator ID'); $table['AAA']['creation'] = array(type => 'TS_TYPE', constraints => "NN", Desc => 'creation date'); ?> --- NEW FILE: AAA_select.php --- <?php /** * Copyright 1999 - 2009 by Gero Kohnert * submitted by "Nonn" <nonn at resce.com> * * 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; version 2 of the License. * * @modulegroup AAA * @module AAA_select * @package AAA */ $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; require_once 'permission.p3'; // Check if user is allowed to use it check_user(); loadmodules('AAA','select'); loadmodule('AAA'); loadlayout(); /** * select AAAs */ class AAA_select extends layout { /** * display the form */ Function info() { global $tutos,$lang; $r = ''; $r .= "<form id=\"AAAsearch\" name=\"AAAsearch\" method=\"get\" action=\"AAA_overview.php\">\n"; $r .= DoubleTableStart(); $r .= "<tr>\n"; $r .= '<th colspan="3">'. $lang['SearchForAAA'] ."</th>\n"; $r .= "</tr><tr>\n"; $r .= $this->showfieldc($lang['AAASearchField']); $r .= " <td ><input type=\"text\" value=\"\" name=\"name\" /></td>\n"; $r .= " <td align=\"center\">\n"; $r .= " <input type=\"submit\" value=\"". $lang['Search'] ."\" /></td>\n"; $r .= "</tr><tr>\n"; $r .= "<tr>\n"; if ( $this->ext == false ) { $this->addHidden('ext',0); } else { $this->addHidden('ext',1); // add custom selectors $x = get_custom_selectors(AAA::getType()); foreach ($x as $s) { $r .= "</tr><tr>\n"; $r .= $this->showfieldc($s[0]); $r .= " <td colspan=\"2\">\n"; $r .= $s[1]; $r .= " </td>\n"; } } $r .= "</tr>\n"; $r .= DoubleTableEnd(); $r .= hiddenFormElements(); $r .= $this->getHidden(); $r .= "</form>\n"; // shortcuts with urls if (class_exists('url')) { $r .= url::getFastSelect($this); } $r .= $this->setfocus("AAAsearch.name"); return $r; } /** * prepare */ Function prepare() { global $msg,$lang,$current_user; $this->name = $lang['AAASearch']; $this->layout_id = USEAAA; $this->center = true; $this->css_class = 'selectbox'; if ( ! $this->user->feature_ok(usedoctracker,PERM_SEL) ) { $msg .= sprintf($lang['Err0022'],"'". $this->name ."'"); $this->stop = true; } if ( ! isset($_GET['ext']) ) { $this->ext = 0; } else { $this->ext = $_GET['ext']; } } } $l = new AAA_select($current_user); $l->display(); $dbconn->Close(); ?> <!-- CVS Info: $Id: AAA_select.php,v 1.1 2009/11/30 16:02:51 gokohnert Exp $ $Author: gokohnert $ --> --- NEW FILE: mconfig.pinc --- <?php /** * Copyright 2009 by Gero Kohnert * * Module specific configuration * * CVS Info: $Id: mconfig.pinc,v 1.1 2009/11/30 16:02:51 gokohnert Exp $ * $Author: gokohnert $ */ # # Every module must have an individual ID ( < 0 > -100 ). # statetransition management is module 98 # define('USEAAA',-85); $tutos[modules]['AAA'] = array( name => 'AAA', Desc => 'a module template', file => 'php/module_template/AAA.pinc', 'overview' => 'module_template/AAA_overview.php', 'configurl' => 'module_template/AAA_config.php', 'perm' => USEAAA ); # # globally enable this module # $tutos[USEAAA] = 1; # # List of objects/modules where we do something with this module # and need to include this module # $tutos[modulesinc]['AAA'][] = 'product'; # # modules that we use # $tutos[modulesinc]['note'][] = 'AAA'; $tutos[modulesinc]['file'][] = 'AAA'; $tutos[modulesinc]['watchlist'][] = 'AAA'; ?> --- NEW FILE: en.p3 --- <?php # $Id: en.p3,v 1.1 2009/11/30 16:02:51 gokohnert Exp $ # # ========================= NOTE ======================== # Please put site specific extensions and changes # to TUTOS language files in a file called "en_custom.p3" # or "lang_custom.p3" (for all languages) # using the same format like here # ======================================================= # # # English Texts for this AAA module # $lang['AAA'] = 'AAA'; $lang['AAAs'] = 'AAAs'; $lang['AAAName'] = 'Name'; $lang['AAAReference'] = 'Reference'; $lang['AAAMod'] = 'AAA Mod'; $lang['AAACreate'] = 'AAA Create'; $lang['AAADeleteI'] = 'delete AAA %s'; $lang['AAAOverview'] = 'AAA Overview'; $lang['AAADetail'] = 'AAA'; $lang['AAAConfig'] = 'AAA Configuration'; $lang['AAASearch'] = 'AAA Search'; $lang['SearchForAAA'] = 'Search for AAA'; $lang['AAASearchField'] = 'search for'; $lang['perm'][USEAAA] = "use AAA"; ?> --- NEW FILE: AAA_config.php --- <?php <?php /** * Copyright 2009 by Gero Kohnert * * 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; version 2 of the License. * * CVS Info: $Id: AAA_config.php,v 1.1 2009/11/30 16:02:51 gokohnert Exp $ * $Author: gokohnert $ * * @modulegroup AAA * @module AAA_config * @package AAA */ $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; require_once 'permission.p3'; check_user(); loadmodules('AAA','config'); loadmodule('AAA'); loadlayout(); /** * display a admin page for AAA */ class AAA_config extends layout { /** * */ function info() { global $lang,$table,$tutos; $r = ''; $r .= "<form id=\"bugconfig\" name=\"bugconfig\" action=\"bug_config.php\" method=\"post\">\n"; $r .= $this->DataTableStart(); $line = 0; // first Config Variable $r .= $this->OverviewRowStart($line); $r .= $this->OverviewRowEnd($line++); $r .= '<tr>'; $r .= submit_reset(0,1,1,1,1,0); $r .= '</tr>'; $r .= $this->DataTableEnd(); $this->addHidden("save", 1); $r .= hiddenFormElements(); $r .= $this->getHidden(); $r .= "</form>\n"; return $r; } /** * */ function prepare() { global $lang,$msg,$tutos; $this->name = $lang['AAAConfig']; if ( ! $this->user->isAdmin() ) { $msg .= $this->error("Only admins are allowed to see this"); $this->stop = true; return; } if (isset($_REQUEST['save']) && ($_REQUEST['save'] == 1) ) { $msg .= ' saving done '; } } } $l = new AAA_config($current_user); $l->display(); $dbconn->close(); ?> --- NEW FILE: README --- This is a blueprint for new TUTOS modules AAA itself has no real functionality Activation: For activation you should have a line @include("AAA/mconfig.pinc"); somewhere in your [tutos install dir]/php/config.* file run http://....../php/admin/update.php?id=xxx where xxx is your database index from config (in most cases this is 0) License: GPL Copyright All rights reserved Copyright 2009 by Gero Kohnert To use it do: (we assume the new moudle to be called MYMOUDULE and placed in MYMODULEDIR) * make a new directory MYMODULEDIR in tutos/php mkdir php/MYMODULEDIR * copy all the stuff from module_template cd tutos/php; cp -a module_template MYMODULE * rename AAA to MYMODULEDIR cd tutos/php/MYMOUDLEDIR replace AAA MYMODULE -- *.pinc *.php .*p3 replace module_template MYMODULEDIR -- *.pinc *.php .*p3 * rename the AAA in the filenames to MYMMODULE mv AAA_show.php MYMOUDLE_show.php mv AAA_new.php MYMOUDLE_new.php mv AAA_ins.php MYMOUDLE_ins.php mv AAA_overview.php MYMOUDLE_overview.php mv AAA_select.php MYMOUDLE_select.php mv AAA.pinc MYMOUDLE.pinc mv AAA_config.php MYMOUDLE_config.php * do replacing and renaming also in the help subdirecotry * edit tutos/php/MYMODULEDIR/mconfig.pinc - change the ID to some unused one - select the moudles that interfere with the new one * edit tutos/php/MYMODULEDIR/mtable.pinc - define the structure you need # $Id: README,v 1.1 2009/11/30 16:02:51 gokohnert Exp $ --- NEW FILE: AAA_overview.php --- <?php /** * Copyright 2009 by Gero Kohnert * * 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; version 2 of the License. * * @modulegroup AAA * @module AAA_overview * @package AAA */ $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; require_once 'permission.p3'; /* Check if user is allowed to use it */ check_user(); loadmodules('AAA','overview'); loadmodule('AAA'); loadlayout(); /** * show a AAA overview */ class AAA_overview extends layout { /** * info */ Function info() { global $tutos,$lang; $n = $this->result->numrows(); if ( $this->start == -1 ) { // Show the last part $a = $n - $tutos[maxshow]; $end = $n; $this->start = $a; } else { $a = $this->start; $end = $this->start + $tutos[maxshow]; } $this->flds = 3; $r = ''; $r .= $this->header; $r .= $this->actionformStart('AAA_overview.php'); $r .= $this->OverviewTableStart(); $r .= "<thead>\n"; $r .= "<tr>\n"; if ($this->head['name']) { $r .= $this->orderHeader('name',$lang['AAAName'],$this->link2); $this->flds++; } if ( $tutos[massupdate] == 1 ) { $r .= " <th nowrap=\"nowrap\"><input type=\"checkbox\" name=\"checkit\" "CheckAll2();\" /></th>\n"; } $r .= "</tr>\n"; $r .= "</thead>\n"; $line = 1; while ( ($a < $n) && ($a < $end) ) { $obj = new AAA($this->dbconn); $obj->read_result($this->result,$a); $obj->read_reference(); $r .= $this->OverviewRowStart($line); $r .= show_custom_overview_data($this,'doctracker',$b); // NAME if ($this->head['name']) { $x = $obj->name; if ( isset($this->filter['name']) && $this->filter['name'] != "" ) { $x = eregi_replace("(". $this->filter['name'] .")","<span class=\"found\">\\1</span>",$x); } $r .= ' <td>'. $obj->getLink($x) .'</td>'."\n"; } // MASSUPDATE if ( $tutos[massupdate] == 1 ) { $r .= " <td align=\"center\">\n"; if ( $obj->mod_ok() ) { $r .= '<input name="mark[]" type="checkbox" value="'. $obj->id ."\" />\n"; } else { $r .= "-\n"; } $r .= "</td>\n"; } $r .= $this->OverviewRowEnd($line++); $a++; } $this->result->free(); $r .= $this->list_navigation($this->link1,$this->flds + $tutos[massupdate],$this->start,$a,$n); // MASSUPDATE CONTROL if ( $tutos[massupdate] == 1 ) { $r .= $this->UpdateRowStart($this->flds-1); $r .= sprintf($lang['withmarked'],$lang['AAAs']); $r .= " <select name=\"action\">\n"; $r .= ' <option value="-1" selected="selected">'. $lang['ActionNil'] ."</option>\n"; $r .= ' <option value="-2">'. $lang['Delete'] ."</option>\n"; $r .= ' <option value="-4">'. $lang['AclModify'] ."</option>\n"; if (class_exists('watchlist')) { $r .= watchlist::action_options(); } $r .= "</select>\n"; $r .= $this->UpdateRowEnd(2); } $r .= $this->OverviewTableEnd(); $r .= $this->actionformEnd('AAA_overview.php'); return $r; } /** * action via massupdate */ Function action() { global $lang,$msg; if ( $_GET['action'] == -2 ) { $this->dbconn->Begin("WORK"); foreach ($_GET['mark'] as $val) { $obj = new AAA($this->dbconn); $obj = $obj->read($val,$obj); if ( $obj->id != $val ) { continue; } if ( $obj->del_ok() ) { $msg .= sprintf($lang['AAADeleteI'], $obj->getFullName()) ."<br />"; $msg .= $obj->delete(); } else { $msg .= $obj->getLink() .": ". sprintf($lang['Err0023'],$lang[$obj->getType()]) ."<br />\n"; } unset($obj); } $this->dbconn->Commit("WORK"); return; } if ( $_GET['action'] == -4 ) { $this->redirect = "../" . acl_action(); return; } if (class_exists('watchlist')) { watchlist::parse_action($this->user); } } /** * prepare */ Function prepare() { global $msg,$lang,$current_user,$table; $this->name = $lang['AAAOverview']; $this->layout_id = USEAAA; if ( ! $this->user->feature_ok(USEAAA,PERM_SEE) ) { $msg .= sprintf($lang['Err0022'],"'". $this->name ."'"); $this->stop = true; return; } if (isset($_GET['ext'])) { $this->ext = $_GET['ext']; } else { $this->ext = 0; } $this->header = ''; $this->head['name'] = true; $this->head['refid'] = true; $this->filter['name'] = ''; $this->link1 = 'module_template/AAA_overview.php'; $this->q = 'SELECT distinct d.* FROM '. $this->dbconn->prefix .$table['AAA'][name].' d'; $this->qpre = ' WHERE '; overview_arg($this,'name',OVERVIEW_ARG_STRING,'AAA',array('name'),'AAAName','d.'); // sorting $xxx = ''; $this->link2 = $this->link1; order_parse($this->q,$this->link1,$xxx,$xxx,'creation DESC'); // display default sortorder if (!isset($_GET['xf'])) { $_GET['xf'] = 'creation'; $_GET['xo'] = 2; } $this->result = $this->dbconn->Exec($this->q); // menu $m = AAA::getSelectLink($this->user, $lang['Search']); $m[category][] = "obj"; $this->addmenu($m); if (class_exists('url')) { $this->addMenu(url::getAddLinkPreset($this->user,$this)); } } } $l = new AAA_overview($current_user); $l->display(); $dbconn->Close(); ?> <!-- CVS Info: $Id: AAA_overview.php,v 1.1 2009/11/30 16:02:51 gokohnert Exp $ $Author: gokohnert $ --> --- NEW FILE: AAA_ins.php --- <? /** * Copyright 1999 - 2009 by Gero Kohnert * * 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; version 2 of the License. * * this script parses all the inputs and stores the object into the database. * on completition it jumps to the detail screen of the stored object * * @modulegroup AAA * @module AAA_ins * @package AAA */ $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; require_once 'permission.p3'; // Check if user is allowed to use it check_user(); loadmodules('AAA','ins'); loadmodule('AAA'); $msg = ''; $gotourl = 'module_template/AAA_new.php'; $obj = new AAA($dbconn); if ( isset($_POST['id']) ) { // update $obj = $obj->read($_POST['id'],$obj); if ( !is_object($obj) ) { $msg .= sprintf($lang['Err0040'],$lang['AAA']); $obj = new AAA($dbconn); } $gotourl= addUrlParameter($gotourl,'id='. $_POST['id'],true); } if ( empty($_POST['name']) ) { $msg .= sprintf($lang['Err0009'],$lang['AAAName']) ."<br />"; $gotourl = addBadField($gotourl,'name',true); } else { $obj->setName(StripSlashes($_POST['name'])); $gotourl= addUrlParameter($gotourl,'name='. UrlEncode($obj->name),true); } if ( empty($_POST['link_id']) ) { $msg .= "No Link ID given !<br />"; } else { $obj->setReference($_POST['link_id']); $gotourl= addUrlParameter($gotourl,"link_id=". $obj->link_id,true); $obj->read_reference(); } // // Parse additional custom fields // $msg .= parse_custom_fields($obj->gettype(),$obj); // other modules $msg .= module_parseforms($current_user,$obj,$gotourl); $msg .= $obj->run_check_hook(); if ( $msg == '' ) { $dbconn->Begin("WORK"); $msg .= $obj->save(); $dbconn->Commit("WORK"); $gotourl = $obj->getURL(); } leave_insert($dbconn,'../'.$gotourl,$msg); /** * CVS Info: $Id: AAA_ins.php,v 1.1 2009/11/30 16:02:51 gokohnert Exp $ * $Author: gokohnert $ */ ?> |
From: Gero K. <gok...@us...> - 2009-11-30 16:03:05
|
Update of /cvsroot/tutos/tutos/php/module_template/help In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv6334/module_template/help Added Files: AAA_config.html AAA_new.html AAA_overview.html AAA_select.html AAA_show.html Log Message: a new module template to make life easier when building new modules. Np functionality, just a blueprint --- NEW FILE: AAA_select.html --- --- NEW FILE: AAA_new.html --- --- NEW FILE: AAA_config.html --- --- NEW FILE: AAA_show.html --- --- NEW FILE: AAA_overview.html --- |
From: Gero K. <gok...@us...> - 2009-11-30 15:56:25
|
Update of /cvsroot/tutos/tutos/php/module_template/help In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv4636/help Log Message: Directory /cvsroot/tutos/tutos/php/module_template/help added to the repository |
From: Gero K. <gok...@us...> - 2009-11-30 15:54:51
|
Update of /cvsroot/tutos/tutos/php/module_template In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv4281/module_template Log Message: Directory /cvsroot/tutos/tutos/php/module_template added to the repository |
From: Gero K. <gok...@us...> - 2009-11-26 09:04:47
|
Update of /cvsroot/tutos/tutos/php/file In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv15173 Modified Files: file.pinc Log Message: fix Index: file.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/file.pinc,v retrieving revision 1.95 retrieving revision 1.96 diff -u -d -r1.95 -r1.96 --- file.pinc 20 Nov 2009 20:26:08 -0000 1.95 +++ file.pinc 26 Nov 2009 09:04:36 -0000 1.96 @@ -2,8 +2,8 @@ /** * Copyright 1999 - 2009 by Gero Kohnert * - * 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 + * 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; version 2 of the License. * * Class to maintain files their location ,version and history @@ -139,7 +139,7 @@ "old" => $f->id , "new" => $nf->id, "obj_id" => $nf->id - ); + ); history_save($nf); } } @@ -373,7 +373,7 @@ global $lang; if ( empty($text) ) { - $text = $this->getFullName(); + $text = $this->getFullName(); } if ( empty($text) ) { $text = "?"; @@ -494,8 +494,8 @@ if (class_exists("ZipArchive")) { $za = new ZipArchive(); $za->open($fname); -# $r .= "Status :" . $za->status . "\n"; -# $r .= "SysStatus :" . $za->statussys . "\n"; + # $r .= "Status :" . $za->status . "\n"; + # $r .= "SysStatus :" . $za->statussys . "\n"; $r .= "Files :" . $za->numFiles . "\n"; $r .= "Comment :" . $za->comment . "\n"; $za->close(); @@ -504,7 +504,7 @@ if (!is_resource($p)) die ('Problems with: zipinfo'); while(!feof($p)) { $r .= htmlentities(fread($p,1024)); - } + } pclose($p); } $r .= "</pre>\n"; @@ -515,7 +515,7 @@ if (!is_resource($p)) die ('Problems with:'. $tutos[pdfinfo]); while(!feof($p)) { $r .= htmlentities(fread($p,1024)); - } + } pclose($p); $r .= "</pre>\n"; } else { @@ -538,7 +538,8 @@ global $tutos; Header("Expires: 0"); - Header("Cache-Control: no-cache"); + Header("Cache-Control:"); + Header("Pragma:"); if ( ($v == "") || ($this->vsys == 0) ) { myreadfile ($this->base ."/". $this->fileloc); return; @@ -592,7 +593,8 @@ $fname = $this->base ."/". $this->fileloc; Header("Expires: 0"); - Header("Cache-control: no-cache"); + Header("Cache-control:"); + Header("Pragma:"); Header("Content-Description: ". $this->name ); if ( $this->filetype == "text/plain" ) { Header("Content-type: text/plain"); @@ -615,11 +617,11 @@ # Header("Content-Disposition: inline; filename=\"". $this->filename .".html\""); $ly->HTML_Start(); $ly->layout_start(); -# $r .= $ly->PrintHeader(); + # $r .= $ly->PrintHeader(); showzip($fname); $ly->layout_stop(); $ly->HTML_Stop(); -# $r .= $ly->PrintFooter(); + # $r .= $ly->PrintFooter(); } else { Header("Content-type: text/plain"); Header("Content-Disposition: inline; filename=\"". $this->filename .".txt\""); @@ -631,10 +633,10 @@ Header("Content-Disposition: inline; filename=\"". $this->filename ."\""); @passthru("tar tIvf \"". $fname ."\""); return; - } else if ( eregi("\.dxf$",$this->filename) - && file_exists($tutos[dxf2fig]) && is_executable($tutos[dxf2fig]) - && file_exists($tutos[fig2dev]) && is_executable($tutos[fig2dev]) - ) { + } else if ( eregi("\.dxf$",$this->filename) + && file_exists($tutos[dxf2fig]) && is_executable($tutos[dxf2fig]) + && file_exists($tutos[fig2dev]) && is_executable($tutos[fig2dev]) + ) { $tmpname = tempnam ($tutos[sessionpath], "dxf"); $tmpname1 = $tmpname.'.dxf'; @@ -642,8 +644,6 @@ $cmd = $tutos[dxf2fig] .' '. $tmpname1 .' '. $tmpname2.' ;'. $tutos[fig2dev] .' -L gif '.$tmpname2; @copy ($this->base ."/". $this->fileloc,$tmpname1); #die($cmd); - Header("Expires: 0"); - Header("Cache-control: no-cache"); Header("Content-type: image/gif"); Header("Content-Description: ". $this->name ); Header("Content-Disposition: inline; filename=\"". $this->filename ."\""); @@ -653,8 +653,6 @@ unlink($tmpname2); return; } else if ( eregi("\.fig$",$this->filename) && file_exists($tutos[fig2dev]) && is_executable($tutos[fig2dev]) ) { - Header("Expires: 0"); - Header("Cache-control: no-cache"); Header("Content-type: image/gif"); Header("Content-Description: ". $this->name ); Header("Content-Disposition: inline; filename=\"". $this->filename ."\""); @@ -670,12 +668,12 @@ Header("Content-Disposition: inline; filename=\"". $this->filename ."\""); @passthru($tutos[tiffConvert] . " -sample 842x1190 ". $this->base ."/". $this->fileloc ." jpeg:-"); return; - } else if ( ereg("image/.*",$this->filetype) + } else if ( ereg("image/.*",$this->filetype) || eregi("\.jpg$",$this->filename) || eregi("\.jpeg$",$this->filename) || eregi("\.gif$",$this->filename) || eregi("\.png$",$this->filename) - ) { + ) { Header("Content-type: ". $this->filetype); Header("Content-Disposition: inline; filename=\"". $this->filename ."\""); myreadfile ($this->base ."/". $this->fileloc); @@ -711,11 +709,11 @@ Header("Content-Disposition: inline; filename=\"". $this->filename ."\""); myreadfile ($this->base ."/". $this->fileloc); return; - } else if ( eregi("\.mm$",$this->filename) && - (($this->filetype == "text/x-troff-mm") || - ($this->filetype == "application/freemind") || + } else if ( eregi("\.mm$",$this->filename) && + (($this->filetype == "text/x-troff-mm") || + ($this->filetype == "application/freemind") || ($this->filetype == "text/mm") || - ($this->filetype == "application/octet-stream")) && + ($this->filetype == "application/octet-stream")) && (file_exists($tutos['base']."/".$tutos[freemind]))) { Header("Content-type: text/html"); echo '<html><head><title>'.$this->getFullname().'</title></head><body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">'."\n"; @@ -904,7 +902,7 @@ $msg .= $this->run_presave_hook(); if ( !is_dir($this->base)) { - $x = @mkdir($this->base ,octdec($tutos['file_dirperm'])); + $x = @mkdir($this->base ,octdec($tutos['file_dirperm'])); if ( $x == FALSE ) { $msg .= "<br />Could not create ". $this->base . " ". $php_errormsg; } @@ -939,14 +937,14 @@ $dirname = substr($this->id,0,2); // Make the Directories if ( ! @file_exists($this->base . "/" . $dirname )) { - $x = @mkdir($this->base . "/" . $dirname ,octdec($tutos['file_dirperm'])); + $x = @mkdir($this->base . "/" . $dirname ,octdec($tutos['file_dirperm'])); if ( $x == FALSE ) { $msg .= "<br />Could not create ". $this->base . "/" .$dirname ." ". $php_errormsg; } } if ( ! @file_exists($this->base . "/" . $dirname ."/". $this->id )) { - $x = @mkdir($this->base . "/" .$dirname ."/". $this->id ,octdec($tutos['file_dirperm'])); + $x = @mkdir($this->base . "/" .$dirname ."/". $this->id ,octdec($tutos['file_dirperm'])); if ( $x == FALSE ) { $msg .= "<br />Could not create ". $this->base . "/" .$dirname ."/". $this->id ." ". $php_errormsg; } @@ -1001,14 +999,14 @@ } if ( ($this->vsys == FILE_RCS) && (is_executable($tutos[file_ci])) ) { // RCS (make a rcs init) - mkdir($this->base . "/" .$dirname ."/". $this->id ."/RCS" ,octdec($tutos['file_dirperm'])); + mkdir($this->base . "/" .$dirname ."/". $this->id ."/RCS" ,octdec($tutos['file_dirperm'])); passthru($tutos[file_ci] ." -i -t-\"". $this->name ."\" -l -q -w". $current_user->f_name."_". $current_user->l_name ." ". $this->base ."/". $this->fileloc); } // Defaut Access Control -# $this->read_reference(); + # $this->read_reference(); -# $this->acl = $this->ref->acl; + # $this->acl = $this->ref->acl; acl_default($this,$current_user); // Prepare the history @@ -1019,13 +1017,13 @@ "old" => "-1" , "new" => $this->id, "obj_id" => $x->id - ); + ); $this->modified[] = array ( "field" => "created" , "old" => $this->getType() , "new" => $this->id, "obj_id" => $this->id - ); + ); $query = $q->getInsert(); } else { // A file was given @@ -1096,29 +1094,29 @@ @unlink($this->base ."/". $this->fileloc); } - // Delete older versions - if ($this->vsys == FILE_RCS) { - if (file_exists($this->base ."/". dirname($this->fileloc) ."/RCS/". basename($this->fileloc) .",v")) { - @unlink($this->base ."/". dirname($this->fileloc) ."/RCS/". basename($this->fileloc) .",v"); - } - if (is_dir($this->base ."/". dirname($this->fileloc) ."/RCS")) { - @rmdir($this->base ."/". dirname($this->fileloc) ."/RCS"); - } - } else if ( $this->vsys == FILE_COPY ) { - $xx = $this->base ."/". $this->fileloc; - - // Read all files that look like $xx - $d = @opendir(dirname($xx)); - if ( $d != false ) { - @rewinddir($d); - while (($f = @readdir($d))!= false) { - if ( ereg("^". basename($xx), $f) && file_exists(dirname($xx) ."/". $f)) { - @unlink(dirname($xx) ."/". $f); - } - } - @closedir($d); - } - } + // Delete older versions + if ($this->vsys == FILE_RCS) { + if (file_exists($this->base ."/". dirname($this->fileloc) ."/RCS/". basename($this->fileloc) .",v")) { + @unlink($this->base ."/". dirname($this->fileloc) ."/RCS/". basename($this->fileloc) .",v"); + } + if (is_dir($this->base ."/". dirname($this->fileloc) ."/RCS")) { + @rmdir($this->base ."/". dirname($this->fileloc) ."/RCS"); + } + } else if ( $this->vsys == FILE_COPY ) { + $xx = $this->base ."/". $this->fileloc; + + // Read all files that look like $xx + $d = @opendir(dirname($xx)); + if ( $d != false ) { + @rewinddir($d); + while (($f = @readdir($d))!= false) { + if ( ereg("^". basename($xx), $f) && file_exists(dirname($xx) ."/". $f)) { + @unlink(dirname($xx) ."/". $f); + } + } + @closedir($d); + } + } if ( is_dir($this->base ."/". dirname($this->fileloc)) ) { @rmdir ($this->base ."/". dirname($this->fileloc) ); } @@ -1181,28 +1179,28 @@ case 'FileCreate': case 'FileReference': $x = $f; - $x['field'] = isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']; - if ( $f['old'] <= 0 ) { - $x['old'] = ''; - } else { - $b = getObject($this->dbconn,$f['old']); - if ( is_object($b) ) { - $x['old'] = $b->getLink(); + $x['field'] = isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']; + if ( $f['old'] <= 0 ) { + $x['old'] = ''; } else { - $x['old'] = makelink("history_show.php?id=". $f['old'],$lang['HistoryDeleted']) ; + $b = getObject($this->dbconn,$f['old']); + if ( is_object($b) ) { + $x['old'] = $b->getLink(); + } else { + $x['old'] = makelink("history_show.php?id=". $f['old'],$lang['HistoryDeleted']) ; + } } - } - if ( $f['new'] <= 0 ) { - $x['new'] = ''; - } else { - $b = getObject($this->dbconn,$f['new']); - if ( is_object($b) ) { - $x['new'] = $b->getLink(); + if ( $f['new'] <= 0 ) { + $x['new'] = ''; } else { - $x['new'] = makelink("history_show.php?id=". $f['new'],$lang['HistoryDeleted']) ; + $b = getObject($this->dbconn,$f['new']); + if ( is_object($b) ) { + $x['new'] = $b->getLink(); + } else { + $x['new'] = makelink("history_show.php?id=". $f['new'],$lang['HistoryDeleted']) ; + } } - } - break; + break; } return $x; } @@ -1350,7 +1348,7 @@ text => ($text == "" ? $lang['FileCreate']:$text), info => sprintf($lang['FileCreate'], $obj->getFullName()), category => array("file","new","module") - ); + ); return $x; } /** @@ -1386,7 +1384,7 @@ text => ($text == "" ? $lang['FileSearch'] : $text), info => $lang['SearchForFile'], category => array("search","file","module") - ); + ); } /** * show the mytutos info about files @@ -1477,7 +1475,7 @@ if (filetype($ff) == 'dir') continue; if (filesize($ff) == 0) continue; if (!is_readable($ff) == 'dir') continue; - + if ($filter != '') { if (!eregi($filter,$file)) continue; } @@ -1490,4 +1488,4 @@ } } -?> +?> \ No newline at end of file |
From: Gero K. <gok...@us...> - 2009-11-25 19:15:17
|
Update of /cvsroot/tutos/tutos/php In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv21901 Modified Files: company.pinc department.pinc webelements.p3 Log Message: fixes Index: department.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/department.pinc,v retrieving revision 1.81 retrieving revision 1.82 diff -u -d -r1.81 -r1.82 --- department.pinc 20 Nov 2009 15:40:54 -0000 1.81 +++ department.pinc 25 Nov 2009 19:15:06 -0000 1.82 @@ -2,8 +2,8 @@ /** * Copyright 1999 - 2009 by Gero Kohnert * - * 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 + * 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; version 2 of the License. * * CVS Info: $Id$ @@ -74,7 +74,7 @@ function read_members () { if ($this->id == -1) return; if (count($this->member) > 0) return; - + $q = "SELECT a.* FROM ". $this->dbconn->prefix ."addresses a, ". $this->dbconn->prefix ."location l, ". $this->dbconn->prefix ."adrloc r WHERE l.d_id = ". $this->id ." AND a.id = r.adr_id AND r.loc_id = l.id ORDER BY l_name"; $r = $this->dbconn->Exec($q); $n = $r->numrows(); @@ -109,7 +109,7 @@ } /** - * search for a department + * search for a department * fill a array with possible departments * mode 1 fill objects * mode 0 do not fill objects @@ -118,7 +118,7 @@ global $table; if ( trim($name) == "" ) return 0; - + $pos = strpos($name," / "); if ( $pos == false ) { $q = "SELECT ".($mode == 1 ? '*':'id')." from "; @@ -185,7 +185,7 @@ $q->addFV("c_id",$this->c_id,""); $q->addFV("name",$this->name,"STRING",$table['department']['name'][size]); $this->save_custom_fields($q); - + if ( $this->id < 0 ) { $this->modified = array(); if ( isset($this->newid) ) { @@ -200,11 +200,11 @@ "old" => $this->getType() , "new" => $this->id, "obj_id" => $this->id - ); + ); } $q->addFV("creator",$this->creator,"OBJ"); $q->addFV("creation",$this->creation,"DATETIME"); - + $query = $q->getInsert(); } else { $q->addWC("id",$this->id,""); @@ -228,15 +228,15 @@ $this->read_locs(); $this->dbconn->Lock("location"); - + $r = $this->dbconn->Exec("DELETE from ". $this->tablename ." WHERE id =" .$this->id); $r->free(); $r = $this->dbconn->Exec("UPDATE ". $this->dbconn->prefix ."location SET d_id = null WHERE d_id =" .$this->id); $r->free(); - + $msg .= product::obj_delete($current_user,$this); $msg .= appointment::obj_delete($current_user,$this); - + foreach($this->loc as $i => $f) { $msg .= $f->delete(); } @@ -264,7 +264,7 @@ } return $url; } - + /** * the url where we go after deleting this object */ @@ -281,12 +281,12 @@ if ($this->id == -1) return; if ( empty($text) ) { - $text = $this->getFullName(); + $text = myentities($this->getFullName()); } if ( $this->see_ok() ) { - return makelink($this->getURL() , myentities($text), sprintf($lang['DepLinkInfo'],$this->name,$this->company->getFullName()) ); + return makelink($this->getURL() , $text, sprintf($lang['DepLinkInfo'],$this->name,$this->company->getFullName()) ); } else { - return myentities($text); + return $text; } } @@ -330,7 +330,7 @@ $r = ''; if (! is_object($obj) ) return $r; - + department::obj_read($obj); if ( count($obj->list[usedepartment]) > 0 ) { $r .= "<tr>\n"; @@ -355,21 +355,21 @@ if (! is_object($obj) ) return ""; if (! $obj->see_ok() ) return ""; - + if ( $obj->gettype() == "department" ) { $x = array( url => "department_new.php?cid=". $obj->company->id, confirm => false, text => ($text == "" ? $lang['DepartmentCreate']:$text), info => sprintf($lang['DepCreateInfo'], $obj->company->getFullName()), category => array("department","new","obj") - ); + ); } else { $x = array( url => "department_new.php?cid=". $obj->id, confirm => false, text => ($text == "" ? $lang['DepartmentCreate']:$text), info => sprintf($lang['DepCreateInfo'], $obj->getFullName()), category => array("department","new","module") - ); + ); } return $x; } @@ -404,7 +404,7 @@ static function obj_delete(&$user,&$obj) { $msg = ''; department::obj_read($obj); - + if ( count($obj->list[usedepartment]) > 0 ) { foreach ($obj->list[usedepartment] as $i => $f) { $msg .= $obj->list[usedepartment][$i]->delete(); @@ -425,6 +425,6 @@ $r .= "</ul>\n"; return $r; } -} + } $tutos['classes'][usedepartment] = 'department'; ?> \ No newline at end of file Index: webelements.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/webelements.p3,v retrieving revision 1.390 retrieving revision 1.391 diff -u -d -r1.390 -r1.391 --- webelements.p3 5 Nov 2009 11:28:12 -0000 1.390 +++ webelements.p3 25 Nov 2009 19:15:06 -0000 1.391 @@ -2,8 +2,8 @@ /** * Copyright 1999 - 2009 Gero Kohnert * - * 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 + * 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; version 2 of the License. * * CVS Info: $Id$ @@ -62,7 +62,7 @@ return; } -/** +/** * check if a lang variable is there oherwise return the key */ Function getLang($key,$index='') { @@ -70,8 +70,8 @@ $r = $key; if (isset($lang[$key])) { - if ($index == '') - $r = $lang[$key]; + if ($index == '') + $r = $lang[$key]; else $r = (isset($lang[$key][$index]) ? $lang[$key][$index] : $key.$index); } @@ -84,8 +84,11 @@ global $lang,$tutos; $r = ''; + if ( ($multi != false) and (substr($fldname,-2) != '[]') ) { + $fldname .= '[]'; + } $r .= '<select id="'. $fldname .'" name="'.$fldname.'"'; - if ($multi) { + if ($multi != false) { $r .= ' multiple="multiple"'; } $r .= '>'."\n"; @@ -100,7 +103,7 @@ if ( $f < 0 ) continue; $old = false; - if (isset($tutos['deprecated'][$lgname]) + if (isset($tutos['deprecated'][$lgname]) && in_array($f,$tutos['deprecated'][$lgname]) ) { $old = true; } @@ -384,7 +387,7 @@ if ( $t == "object" && method_exists($a,"gettype")) { $t = $a->getType(); } -# $msg .= $sep ."<". gettype($t) .">".$a; + # $msg .= $sep ."<". gettype($t) .">".$a; $sep = ","; } $msg .= ")"; @@ -478,7 +481,7 @@ if ( isset($_SERVER['SERVER_SOFTWARE']) ) { $msg .= "APACHE Version:\t". $_SERVER['SERVER_SOFTWARE'] ."\n"; } - // Backtrace + // Backtrace $msg .= TUTOS_backtrace(); error_log($msg,3,$tutos[errlog]); return; @@ -491,7 +494,7 @@ global $current_user,$lang,$tutos,$dbconn; if ( ! headers_sent() ) { -# @ob_end_clean(); + # @ob_end_clean(); loadlayout(); $l = new layout($current_user); echo $l->PrintHeader("FATAL ERROR"); @@ -608,7 +611,7 @@ $o1 = getcwd()."/".$tutos['base']. "/". $tutos[overlib] .'/overlib_mini.js'; if ( file_exists($o1) && is_readable($o1) ) { $o1 = $tutos['base']. "/". $tutos[overlib] .'/overlib_mini.js'; -# $o1 = $tutos['base']. "/". $tutos[overlib] .'/overlib.js'; + # $o1 = $tutos['base']. "/". $tutos[overlib] .'/overlib.js'; $tutos[useoverlib] = 1; echo " <div id=\"overDiv\" style=\"position:absolute; visibility:hidden; z-index:1;\"></div>\n"; echo " <script language=\"JavaScript\" src=\"". $o1 ."\" type=\"text/javascript\"></script>\n"; @@ -616,7 +619,7 @@ if ( file_exists($o2) && is_readable($o2) ) { $o2 = $tutos['base']. "/". $tutos[overlib] .'/overlib_shadow_mini.js'; # echo " <script language=\"JavaScript\" src=\"". $o2 ."\" type=\"text/javascript\"></script>\n"; -# $tutos[overlibargs] += ",SHADOW, SHADOWOPACITY, 60"; + # $tutos[overlibargs] += ",SHADOW, SHADOWOPACITY, 60"; } } else { $tutos[useoverlib] = 0; @@ -687,7 +690,7 @@ $r = sprintf("%s/%s/",$tutos[baseurl][$_SESSION['dbnr']],$dir); return $r; } else if ( function_exists('getBaseURL_special')) { - // You may change generation of BaseURL in function 'getBaseURL_special' in + // You may change generation of BaseURL in function 'getBaseURL_special' in // file 'webelements_special.p3'. return( getBaseURL_special()); } else { @@ -746,7 +749,7 @@ * remove html */ function removehtml($s) { - # return html_entity_decode($s); +# return html_entity_decode($s); $s = preg_replace("/<[\/]?[bui]+>/i","",$s); $s = preg_replace("/"/",'"',$s); $s = preg_replace("/</",'<',$s); @@ -776,7 +779,7 @@ $s[] = '/(@IMG.*)(height)=["]?(\d+)["]?(.*@)/im'; $r[] = '$1$2="$3"$4'; $n = preg_replace($s,$r,$n); - + tutos_file::obj_read($obj); foreach($obj->list[usedocmanagement] as $x) { $u1 = $tutos['base'].'/php/'.$x->getUrl(); @@ -1457,8 +1460,8 @@ break; case useaddressbook: $ref = &new tutos_address($dbconn); - $ref = $ref->read($id,$ref); - break; + $ref = $ref->read($id,$ref); + break; case usecompany: if ( ! class_exists ('company') ) { require_once 'company.pinc'; @@ -1475,8 +1478,8 @@ break; case useteams: $ref = &new team($dbconn); - $ref = $ref->read($id,$ref); - break; + $ref = $ref->read($id,$ref); + break; case usetaskmanagement: if ( ! class_exists ('task') ) { require_once 'task.pinc'; @@ -1486,8 +1489,8 @@ break; case useuser: $ref = &new tutos_user($dbconn); - $ref = $ref->read($id,$ref,1); - break; + $ref = $ref->read($id,$ref,1); + break; case uselocation: if ( ! class_exists ('location') ) { require_once 'location.pinc'; @@ -1504,8 +1507,8 @@ break; case usedbs: $ref = &new database($dbconn); - $ref = $ref->read($id,$ref); - break; + $ref = $ref->read($id,$ref); + break; default: // Check module $ref = -1; @@ -1526,7 +1529,7 @@ break; } - // if we are here we have found something that has no entry in + // if we are here we have found something that has no entry in // the hashtable if( (is_object($ref)) && ! $found_by_hash ) { $g_hash['fail']++; @@ -1641,13 +1644,13 @@ $r .= "</select>\n"; } else { // AJAX stuff -# $me = base64_encode(json_encode($mods)); -# $ma = base64_encode(json_encode($ma)); + # $me = base64_encode(json_encode($mods)); + # $ma = base64_encode(json_encode($ma)); $me = base64_encode(serialize($mods)); $ma = base64_encode(serialize($ma)); if (!isset($obj->search_id)) $obj->search_id = -1; $js = ' '; -# $js = ' '; + # $js = ' '; if ( is_object($sobj) && isset($sobj->id) && $sobj->id > 0 ) { $r .= '<input id="'. $name .'" size="'.$size.'" maxlength="'.max(40,$size).'" name="'. $name .'fn" value="'. myentities($sobj->getFullname()) .'" '.$js.' />'; @@ -1818,7 +1821,7 @@ $u = $u->read($to->id,$u); ReadLang1($to->lg,$tutos['base'] ."/php/localization",$u); load_module_langfiles($u,$to->lg); -# $to->lg = &$lang; + # $to->lg = &$lang; $fn = $p ."/". $name .".". $u->lang; } else if ( $to->getType() == "user" ) { $to->lg = $lang; @@ -1860,12 +1863,12 @@ $mformat = 'text/plain'; // nothing to do } - // 7) try english default html file + // 7) try english default html file else if ( file_exists(getcwd().'/'.$p.'/'.$name.'.en.html') ) { $mformat = 'text/html'; $fn = $p.'/'.$name.'.en.html'; } - // 8) try english default txt file + // 8) try english default txt file else if ( file_exists(getcwd().'/'.$p.'/'.$name.'.en') ) { $mformat = 'text/plain'; $fn = $p.'/'.$name.'.en'; @@ -1881,7 +1884,7 @@ } /** - * + * */ function myentities($text , $escapequotes = 0) { if ( $escapequotes == 1 ) { @@ -1983,7 +1986,7 @@ } $ver = JPG_VERSION; if (!is_numeric($ver)) return true; - if ( $ver >= $r) + if ( $ver >= $r) return true; $msg .= 'JPraph Version '. JPG_VERSION .'<br />'; } @@ -2064,7 +2067,7 @@ $tutos[$cname] = $cvalue; $x++; } - + $r->free(); } @@ -2073,7 +2076,7 @@ */ function write_config_value($dbconn,$name,$tag) { global $tutos,$table; - + delete_config_value($dbconn,$name); $q = 'INSERT into '. $dbconn->prefix. $table['tutos_config'][name] .' (cname,cvalue,ctag) values ('; $q .= "'".$name."',"; @@ -2089,7 +2092,7 @@ */ function delete_config_value($dbconn,$name) { global $tutos,$table; - + $q = 'DELETE from '. $dbconn->prefix. $table['tutos_config'][name] .' WHERE cname = \''. $name .'\''; $r = $dbconn->Exec($q); $r->free(); @@ -2132,8 +2135,8 @@ function overview_arg($obj,$arg,$type,$tbl,$cnames,$lgid,$prefix = '',$mode = null) { global $lang,$tutos,$table; - - if (!is_object($obj)) die('overview_arg: Object not defined'); + + if (!is_object($obj)) die('overview_arg: Object not defined'); if (!isset($obj->q)) { $obj->q = 'SELECT * from ' .$obj->dbconn->prefix.$table[$tbl][name]; $obj->qpre = " WHERE "; @@ -2143,9 +2146,9 @@ $obj->header = ''; $obj->hpre = ''; } - - if (!isset($obj->head)) $obj->head = array(); - if (!isset($obj->filter)) $obj->filter = array(); + + if (!isset($obj->head)) $obj->head = array(); + if (!isset($obj->filter)) $obj->filter = array(); $obj->filter[$arg] = ''; $obj->head[$arg] = true; @@ -2190,7 +2193,7 @@ $header = '= ('; $pre = ''; foreach($x as $i) { - if (!is_numeric($i)) die('overview_arg: non numeric argument -> '.$i); + if (!is_numeric($i)) die('overview_arg: non numeric argument -> '.$i); $q .= $pre.$i; $xo = getObject($obj->dbconn,$i); if (is_object($xo)) { @@ -2206,7 +2209,7 @@ $header .= ')'; $show = true; } else { - if (!is_numeric($x)) die('overview_arg: non numeric argument -> '.$x); + if (!is_numeric($x)) die('overview_arg: non numeric argument -> '.$x); $q = ' = '.$x; $xo = getObject($obj->dbconn,$x); if (is_object($xo)) { @@ -2247,7 +2250,7 @@ $obj->qpre = " AND "; return true; } - // serach in dates + // serach in dates if ( ($type == OVERVIEW_ARG_D_FROM) || ($type == OVERVIEW_ARG_D_TO) ) { $d = new TUTOS_Date_Time(0); if ( isset($_REQUEST[$arg.'d']) ) { @@ -2286,7 +2289,7 @@ $pre = ''; foreach($x as $i) { if ($i == -1) $skip = true; - if (!is_numeric($i)) die('overview_arg: non numeric argument -> '.$i); + if (!is_numeric($i)) die('overview_arg: non numeric argument -> '.$i); $q .= $pre.$i; $header .= $pre.$lang[$lgid[1]][$i]; $pre = ','; @@ -2298,10 +2301,10 @@ $show = true; } else { if ($x == -1) $skip = true; - if (!is_numeric($x)) die('overview_arg: non numeric argument -> '.$x); + if (!is_numeric($x)) die('overview_arg: non numeric argument -> '.$x); $q = ' = '.$x; $header .= ' = '.$lang[$lgid[1]][$x] ; - $show = false; // no nxeed to display if we check for exactly one + $show = false; // no nxeed to display if we check for exactly one $obj->link1 = addUrlParameter($obj->link1,$arg.'='.$x); $obj->addHidden($arg,$x); } @@ -2341,4 +2344,4 @@ } -?> +?> \ No newline at end of file Index: company.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/company.pinc,v retrieving revision 1.80 retrieving revision 1.81 diff -u -d -r1.80 -r1.81 --- company.pinc 20 Nov 2009 15:40:54 -0000 1.80 +++ company.pinc 25 Nov 2009 19:15:05 -0000 1.81 @@ -2,8 +2,8 @@ /** * Copyright 1999 - 2009 by Gero Kohnert * - * 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 + * 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; version 2 of the License. * * CVS Info: $Id$ @@ -31,7 +31,7 @@ $this->credit_limit = ''; $this->employees = ''; $this->revenue = ''; - + $this->rl1 = false; $this->rl2 = false; $this->tablename = $this->dbconn->prefix.$table['company'][name]; @@ -53,7 +53,7 @@ */ function read_result ( &$r,$pos ) { if ( ! isset($pos) ) return; - + $this->name = $r->get($pos, "name"); $this->legal_name = $r->get($pos, "legal_name"); $this->company_code = $r->get($pos, "company_code"); @@ -62,7 +62,7 @@ $this->employees = $r->get($pos, "employees"); $this->revenue = $r->get($pos, "revenue"); $this->creator = $r->getObject($pos, "creator"); - + parent::read_result($r,$pos); return; } @@ -108,11 +108,11 @@ */ function getNeighbours () { global $lang; - + if (count ($this->neighbours) > 0 ) return $this->neighbours; - + parent::getNeighbours(); - + // Possible new parents are all related projects $this->read_departments(); foreach ($this->list[usedepartment] as $a => $b) { @@ -133,7 +133,7 @@ } /** - * search for a company + * search for a company * fill a array with possible companies * mode 1 fill objects * mode 0 do not fill objects @@ -171,7 +171,7 @@ $a++; } $r->free(); - + return $n; } @@ -243,7 +243,7 @@ $q->addFV("revenue",$this->revenue,"STRING",$table['company']['revenue'][size]); $q->addFV("employees",$this->employees,"STRING",$table['company']['employees'][size]); $this->save_custom_fields($q); - + if ( $this->id < 0 ) { $this->modified = array(); if ( isset($this->newid) ) { @@ -258,23 +258,23 @@ "old" => $this->getType() , "new" => $this->id, "obj_id" => $this->id - ); + ); } $q->addFV("creator",$this->creator,"OBJ"); $q->addFV("creation",$this->creation,"DATETIME"); - - + + $query = $q->getInsert(); } else { $q->addWC("id",$this->id,""); $query = $q->getUpdate(); } - + $r = $this->dbconn->Exec($query); $r->free(); - + $msg .= parent::save(); - + return $msg; } @@ -287,19 +287,19 @@ $msg = ''; $this->read_locs(); $msg .= department::obj_delete($current_user,$this); - + $r = $this->dbconn->Exec("DELETE from ". $this->tablename ." WHERE id =" .$this->id); $r->free(); $r = $this->dbconn->Exec("UPDATE ". $this->dbconn->prefix ."location SET c_id = null WHERE c_id =" .$this->id); $r->free(); - + $msg .= product::obj_delete($current_user,$this); $msg .= appointment::obj_delete($current_user,$this); foreach($this->loc as $f) { $msg .= $f->delete(); } - + $msg .= parent::delete(); return $msg; } @@ -342,12 +342,12 @@ if ($this->id == "") return; if ( empty($text) ) { - $text = $this->name; + $text = myentities($this->name); } if ( $this->see_ok() ) { - return makelink($this->getURL() , myentities($text), sprintf($lang['CompanyLinkInfo'], $this->name)); + return makelink($this->getURL(), $text, sprintf($lang['CompanyLinkInfo'], $this->name)); } else { - return myentities($text); + return $text; } } @@ -380,7 +380,7 @@ $r = parent::exportXML_body(); if (!$only_ids) { $r .= "<name>". htmlspecialchars($this->name) ."</name>\n"; - } + } if ( isset($this->location) && (count($this->location) > 0) ) { foreach($this->location as $i => $f) { $r .= $f->exportXML_start(); |
From: Gero K. <gok...@us...> - 2009-11-25 19:15:16
|
Update of /cvsroot/tutos/tutos/php/bugtracking In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv21901/bugtracking Modified Files: bug_overview.php Log Message: fixes Index: bug_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug_overview.php,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- bug_overview.php 22 Oct 2009 11:11:33 -0000 1.57 +++ bug_overview.php 25 Nov 2009 19:15:07 -0000 1.58 @@ -2,8 +2,8 @@ /** * Copyright 1999 - 2009 by Gero Kohnert * - * 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 + * 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; version 2 of the License. * * CVS Info: $Id$ @@ -43,11 +43,11 @@ $r .= $this->blist[0]->exportXMLHeader(); $r .= $this->blist[0]->exportXML_Head(); $r .= "<bug_set>\n"; - foreach ($this->blist as $i => $b) { + foreach ($this->blist as $i => $b) { $r .= $b->exportXML_start(); $r .= $b->exportXML_body(); $r .= $b->exportXML_end(); - } + } $r .= "</bug_set>\n"; return $r; } else if ($this->format == "excel") { @@ -149,12 +149,12 @@ fpassthru($fh); fclose($fh); @unlink($tmpname); - return $r; + return $r; } else if ( $this->format == "stat") { return $this->statinfo(); } - + $n = count($this->blist); if ( 0 == $n) { $r .= $this->error($lang['Err0048']); @@ -216,7 +216,7 @@ if ( $this->filter['name'] != "" ) { $x = eregi_replace("(". $this->filter['name'] .")","<span class=\"found\">\\1</span>",$x); } -# $r .= " <td nowrap=\"nowrap\" align=\"right\">". makelink($b->getUrl(),$x) ."</td>\n"; + # $r .= " <td nowrap=\"nowrap\" align=\"right\">". makelink($b->getUrl(),$x) ."</td>\n"; $r .= " <td nowrap=\"nowrap\" align=\"right\">". $b->getLink($x) ."</td>\n"; $r .= " <td>". $b->creation->getDate() ."</td>\n"; @@ -375,7 +375,7 @@ unset($b); } - // we need it + // we need it $b = new bug($this->dbconn); $r .= $this->DataTableStart(); @@ -653,9 +653,6 @@ $this->layout_id = usebugtracking; - $this->header = ''; - $hpre = ''; - $this->filter = array(); $this->filter['refname'] = ''; $this->filter['name'] = ''; @@ -695,9 +692,9 @@ if ( isset($_GET['pid']) ) { $pid = $_GET['pid']; } -// if ( isset($_GET['solverid']) && is_int($_GET['solverid']) ) { -// $solverid = $_GET['solverid']; -// } + // if ( isset($_GET['solverid']) && is_int($_GET['solverid']) ) { + // $solverid = $_GET['solverid']; + // } if ( isset($_GET['state']) ) { @@ -872,20 +869,20 @@ $h = array(); $x = 0; if (false) { - while ( $x < $n1 ) { - $b = new bug($this->dbconn); - $b = $b->read($this->result1->get($x, "id"),$b); - $x++; - if ( ! $b->see_ok() ) { - continue; - } - if (! isset($h[$b->id]) ) { - $this->blist[] = &$b; - $h[$b->id] = 1; + while ( $x < $n1 ) { + $b = new bug($this->dbconn); + $b = $b->read($this->result1->get($x, "id"),$b); + $x++; + if ( ! $b->see_ok() ) { + continue; + } + if (! isset($h[$b->id]) ) { + $this->blist[] = &$b; + $h[$b->id] = 1; + } + unset($b); } - unset($b); - } - $this->result1->free(); + $this->result1->free(); } $x = 0; while ( $x < $n2 ) { @@ -932,7 +929,7 @@ text => $lang['NewEntry'], info => $lang['CreateNewBug'], category => array("bug","new","obj") - ); + ); $this->addMenu($x); } @@ -943,7 +940,7 @@ text => $lang['Printable'], info => $lang['PrintableInfo'], category => array("view","bug") - ); + ); $this->addMenu($x); $l = addUrlParameter($this->link1,"format=stat"); @@ -952,7 +949,7 @@ text => $lang['BugStats'], info => $lang['BugStatsInfo'], category => array("view","bug") - ); + ); $this->addMenu($x); } $l = addUrlParameter($this->link1,"format=excel"); @@ -960,7 +957,7 @@ text => $lang['Export'] ."(EXCEL)", info => $lang['ExportInfo'], category => array("bug","view") - ); + ); $this->addMenu($x); if (class_exists('url')) { @@ -973,4 +970,4 @@ $l = new Bug_overview($current_user); $l->display(); $dbconn->Close(); -?> +?> \ No newline at end of file |
From: Gero K. <gok...@us...> - 2009-11-25 18:12:11
|
Update of /cvsroot/tutos/tutos/php In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv3319 Modified Files: company_ins.php Log Message: fix Index: company_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/company_ins.php,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- company_ins.php 20 Nov 2009 20:26:08 -0000 1.37 +++ company_ins.php 25 Nov 2009 18:11:56 -0000 1.38 @@ -2,8 +2,8 @@ /** * Copyright 1999 - 2009 by Gero Kohnert * - * 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 + * 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; version 2 of the License. * * this script parses all the inputs and stores the object into the database. @@ -23,7 +23,7 @@ $gotourl = 'company_new.php'; $msg = ''; $c = new company($dbconn); -// Location +// Location $l = new location($dbconn); if ( isset($_POST['id']) ) { @@ -91,7 +91,7 @@ // // Parse additional custom fields // -$msg .= parse_custom_fields($d->gettype(),$d); +$msg .= parse_custom_fields($c->gettype(),$c); // other modules $msg .= module_parseforms($current_user,$c,$gotourl); |
From: Gero K. <gok...@us...> - 2009-11-20 20:26:20
|
Update of /cvsroot/tutos/tutos/php/testmanager In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28298/testmanager Modified Files: testcase_ins.php testrun_ins.php testrun_new.php testsuite_ins.php testsuite_new.php Log Message: more custom fields support / more hook support Index: testrun_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/testmanager/testrun_new.php,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- testrun_new.php 2 Nov 2009 14:39:42 -0000 1.15 +++ testrun_new.php 20 Nov 2009 20:26:08 -0000 1.16 @@ -6,9 +6,9 @@ * under the terms of the GNU General Public License as published by the * Free Software Foundation; version 2 of the License. * - * @modulegroup note - * @module note_new - * @package note + * @modulegroup testmanager + * @module testrun_new + * @package testrun */ $tutos['base'] = "../.."; ini_set("include_path",".."); @@ -99,7 +99,7 @@ $r .= "<tr>\n"; $r .= $this->showfieldc($lang['TestrunName'],1,'name'); - $r .= ' <td colspan="5"><input id="name" size="'. min($table['testrun']['name'][size],40) .'" maxlength="'. $table['note']['name'][size] .'" name="name" value="'. myentities($this->obj->name) ."\" /></td>\n"; + $r .= ' <td colspan="5"><input id="name" size="'. min($table['testrun']['name'][size],40) .'" maxlength="'. $table['testrun']['name'][size] .'" name="name" value="'. myentities($this->obj->name) ."\" /></td>\n"; $r .= " </td>\n"; $r .= "</tr>\n"; @@ -248,4 +248,4 @@ <!-- CVS Info: $Id$ $Author$ ---> \ No newline at end of file +--> Index: testsuite_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/testmanager/testsuite_ins.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- testsuite_ins.php 17 Nov 2009 11:58:45 -0000 1.11 +++ testsuite_ins.php 20 Nov 2009 20:26:08 -0000 1.12 @@ -244,6 +244,7 @@ # other modules $msg .= module_parseforms($current_user,$obj,$gotourl); +$msg .= $obj->run_check_hook(); if ( $msg == '' ) { $dbconn->Begin("WORK"); $msg .= $obj->save(); Index: testrun_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/testmanager/testrun_ins.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- testrun_ins.php 4 Nov 2009 08:41:20 -0000 1.7 +++ testrun_ins.php 20 Nov 2009 20:26:08 -0000 1.8 @@ -111,6 +111,7 @@ # other modules $msg .= module_parseforms($current_user,$obj,$gotourl); +$msg .= $obj->run_check_hook(); if ( $msg == '' ) { $dbconn->Begin("WORK"); $msg .= $obj->save(); Index: testsuite_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/testmanager/testsuite_new.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- testsuite_new.php 2 Nov 2009 14:39:42 -0000 1.9 +++ testsuite_new.php 20 Nov 2009 20:26:08 -0000 1.10 @@ -6,9 +6,9 @@ * under the terms of the GNU General Public License as published by the * Free Software Foundation; version 2 of the License. * - * @modulegroup note - * @module note_new - * @package note + * @modulegroup testmanager + * @module testsuite_new + * @package testsuite */ $tutos['base'] = "../.."; ini_set("include_path",".."); @@ -45,7 +45,7 @@ $r .= "<tr>\n"; $r .= $this->showfieldc($lang['TestsuiteName'],1,'name'); - $r .= ' <td colspan="5"><input id="name" size="'. min($table['testsuite']['name'][size],40) .'" maxlength="'. $table['note']['name'][size] .'" name="name" value="'. myentities($this->obj->name) ."\" /></td>\n"; + $r .= ' <td colspan="5"><input id="name" size="'. min($table['testsuite']['name'][size],40) .'" maxlength="'. $table['testsuite']['name'][size] .'" name="name" value="'. myentities($this->obj->name) ."\" /></td>\n"; $r .= " </td>\n"; $r .= "</tr>\n"; @@ -231,4 +231,4 @@ <!-- CVS Info: $Id$ $Author$ ---> \ No newline at end of file +--> Index: testcase_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/testmanager/testcase_ins.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- testcase_ins.php 2 Nov 2009 14:39:42 -0000 1.5 +++ testcase_ins.php 20 Nov 2009 20:26:08 -0000 1.6 @@ -86,6 +86,7 @@ $msg .= sprintf($lang['Err0009'],$lang['TestcaseSteps']) ."<br />"; } +$msg .= $obj->run_check_hook(); if ( $msg == '' ) { foreach ($obj as $o) { $dbconn->Begin("WORK"); |
From: Gero K. <gok...@us...> - 2009-11-20 20:26:20
|
Update of /cvsroot/tutos/tutos/php/file In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28298/file Modified Files: file.pinc file_ins.php Log Message: more custom fields support / more hook support Index: file_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/file_ins.php,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- file_ins.php 12 Oct 2009 21:06:50 -0000 1.36 +++ file_ins.php 20 Nov 2009 20:26:08 -0000 1.37 @@ -290,6 +290,7 @@ # other modules $msg .= module_parseforms($current_user,$f,$gotourl); +$msg .= $f->run_check_hook(); if ( $msg == "" ) { $f->oldversion = $f->version; $f->setVersion($version); Index: file.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/file.pinc,v retrieving revision 1.94 retrieving revision 1.95 diff -u -d -r1.94 -r1.95 --- file.pinc 16 Nov 2009 14:20:46 -0000 1.94 +++ file.pinc 20 Nov 2009 20:26:08 -0000 1.95 @@ -17,8 +17,6 @@ define ('FILE_COPY',1); define ('FILE_RCS',2); -require_once 'mtable.pinc'; - /* * get some pdf properties * function from http://www.fpdf.org/en/script/script59.php |
From: Gero K. <gok...@us...> - 2009-11-20 20:26:20
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28298 Modified Files: admin_show.php app_ins.php check.php company_ins.php module_overview.php notfound.php product_ins.php task_ins.php team_ins.php timetrack_ins.php Log Message: more custom fields support / more hook support Index: admin_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/admin_show.php,v retrieving revision 1.109 retrieving revision 1.110 diff -u -d -r1.109 -r1.110 --- admin_show.php 16 Nov 2009 15:28:53 -0000 1.109 +++ admin_show.php 20 Nov 2009 20:26:08 -0000 1.110 @@ -328,7 +328,7 @@ * */ Function info() { - global $lang,$tutos; + global $lang,$tutos; $r = ''; @@ -490,6 +490,7 @@ } $r .= "</td>\n"; $r .= $this->OverviewRowEnd($line++); + unset($table); } $r .= "<tr><td colspan=\"9\"> </td></tr>\n"; Index: team_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/team_ins.php,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- team_ins.php 5 Oct 2009 16:18:03 -0000 1.39 +++ team_ins.php 20 Nov 2009 20:26:08 -0000 1.40 @@ -86,6 +86,7 @@ # other modules $msg .= module_parseforms($current_user,$t,$gotourl); +$msg .= $t->run_check_hook(); if ( $msg == "" ) { $t->SetName($name); $o = new tutos_address($dbconn); Index: product_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/product_ins.php,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- product_ins.php 5 Oct 2009 16:18:03 -0000 1.71 +++ product_ins.php 20 Nov 2009 20:26:08 -0000 1.72 @@ -201,6 +201,7 @@ # other modules $msg .= module_parseforms($current_user,$p,$gotourl); +$msg .= $p->run_check_hook(); if ( !$bad && ($msg == '') ) { $p->setDescription(trim(StripSlashes($_POST['description']))); $p->setDesc1(trim(StripSlashes($_POST['desc1']))); Index: company_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/company_ins.php,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- company_ins.php 20 Nov 2009 15:59:10 -0000 1.36 +++ company_ins.php 20 Nov 2009 20:26:08 -0000 1.37 @@ -94,8 +94,8 @@ $msg .= parse_custom_fields($d->gettype(),$d); // other modules $msg .= module_parseforms($current_user,$c,$gotourl); -$msg .= $c->run_check_hook(); +$msg .= $c->run_check_hook(); if ( $msg == "" ) { $dbconn->Begin("WORK"); $msg .= $c->save(); Index: timetrack_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/timetrack_ins.php,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- timetrack_ins.php 5 Oct 2009 16:18:03 -0000 1.61 +++ timetrack_ins.php 20 Nov 2009 20:26:08 -0000 1.62 @@ -186,7 +186,7 @@ // other modules $msg .= module_parseforms($current_user,$tt,$gotourl); - +$msg .= $tt->run_check_hook(); if ( $msg == "" ) { $dbconn->Begin("WORK"); $msg .= $tt->save(); Index: notfound.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/notfound.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- notfound.php 5 Oct 2009 16:18:03 -0000 1.3 +++ notfound.php 20 Nov 2009 20:26:08 -0000 1.4 @@ -7,6 +7,10 @@ * Free Software Foundation; version 2 of the License. * */ +$a = dirname($_SERVER["SCRIPT_NAME"]); +$b = dirname($_SERVER["REDIRECT_URL"]); + + require_once 'webelements.p3'; require_once 'permission.p3'; Index: module_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/module_overview.php,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- module_overview.php 9 Nov 2009 08:02:02 -0000 1.14 +++ module_overview.php 20 Nov 2009 20:26:08 -0000 1.15 @@ -130,6 +130,13 @@ } else if (isset($tutos[$m[1]]) && $tutos[$m[1]] != 0) { $r .= "<font color=\"green\">\n"; $r .= "known and usable"; + foreach ($tutos[modules] as $i2 => $m2) { + if ($m2['perm'] == $m[1]) { + $this->mods[$i][0] = '<i>'.$m[0].'</i><br />'.$m2[name]; + $this->mods[$i][8] = '<i>'.$this->mods[$i][8].'</i><br />'.$m2[Desc]; + break; + } + } } else { $r .= "<font color=\"red\">\n"; $r .= "unknown"; @@ -137,8 +144,8 @@ $r .= "</font>\n"; $r .= "</td>\n"; - foreach($m as $f) { - $r .= "<td>". urlReplace($f,1) ." </td>\n"; + foreach($this->mods[$i] as $i2 => $m2) { + $r .= "<td>". urlReplace($m2,1) ." </td>\n"; } $r .= $this->OverviewRowEnd($line++); } @@ -155,7 +162,7 @@ $this->name = $lang['AdminModOverview']; $this->css_class = 'overviewbox'; - $this->url = "http://www.tutos.org/modules.php"; + $this->url = 'http://www.tutos.org/modules.php'; $this->mods = array(); $this->infos = array(); $this->url = addUrlParameter($this->url,"version=". $tutos[version]); Index: app_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/app_ins.php,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- app_ins.php 5 Oct 2009 16:18:02 -0000 1.46 +++ app_ins.php 20 Nov 2009 20:26:08 -0000 1.47 @@ -241,6 +241,7 @@ } +$msg .= $a->run_check_hook(); ################################################## # End of Checks ################################################## Index: check.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/check.php,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- check.php 5 Oct 2009 16:18:03 -0000 1.45 +++ check.php 20 Nov 2009 20:26:08 -0000 1.46 @@ -55,7 +55,7 @@ if ($age < (2* $tutos[timetolive] * 60)) { continue; } -# echo $filename." ".date ("F d Y H:i:s.", filemtime($filename))." ". $age/3600 ."<br>\n"; +## echo $filename." ".date ("F d Y H:i:s.", filemtime($filename))." ". $age/3600 ."<br>\n"; unlink($filename); } closedir($handle); Index: task_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/task_ins.php,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- task_ins.php 5 Oct 2009 16:18:03 -0000 1.59 +++ task_ins.php 20 Nov 2009 20:26:08 -0000 1.60 @@ -208,6 +208,7 @@ # other modules $msg .= module_parseforms($current_user,$t,$gotourl); +$msg .= $t->run_check_hook(); if ( $msg == "" ) { $t->parent = getObject($dbconn,$t->p_id); |
From: Gero K. <gok...@us...> - 2009-11-20 20:26:20
|
Update of /cvsroot/tutos/tutos/php/bugtracking In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28298/bugtracking Modified Files: bug_ins.php Log Message: more custom fields support / more hook support Index: bug_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug_ins.php,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- bug_ins.php 14 Oct 2009 12:52:20 -0000 1.33 +++ bug_ins.php 20 Nov 2009 20:26:08 -0000 1.34 @@ -175,6 +175,7 @@ # other modules $msg .= module_parseforms($current_user,$b,$gotourl); +$msg .= $b->run_check_hook(); if ( $msg != "" ) { $gotourl = addMessage($gotourl,$msg,true); $gotourl = addSessionKey($gotourl,true); |
From: Gero K. <gok...@us...> - 2009-11-20 20:26:20
|
Update of /cvsroot/tutos/tutos/php/stuff In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28298/stuff Modified Files: stuff_ins.php stuff_new.php stuff_show.php Log Message: more custom fields support / more hook support Index: stuff_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/stuff/stuff_show.php,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- stuff_show.php 5 Oct 2009 16:17:39 -0000 1.20 +++ stuff_show.php 20 Nov 2009 20:26:08 -0000 1.21 @@ -35,7 +35,7 @@ } /** - * change/modify a stuff + * show a stuff */ class Stuff_show extends layout { /** @@ -126,6 +126,7 @@ $r .= $this->DataTableEnd(); return $r; } + /** * prepare */ Index: stuff_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/stuff/stuff_ins.php,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- stuff_ins.php 5 Oct 2009 16:17:39 -0000 1.15 +++ stuff_ins.php 20 Nov 2009 20:26:08 -0000 1.16 @@ -34,6 +34,7 @@ if ( !isset($_POST['name']) || empty($_POST['name']) || ($_POST['name'] == $lang['PlsChangeName']) ) { $msg .= sprintf($lang['Err0009'],$lang['StuffName']) ."<br />"; + $gotourl = addBadField($gotourl,'name',true); } else { $obj->setName(trim(StripSlashes($_POST['name']))); $gotourl = addUrlParameter($gotourl,"name=". UrlEncode($obj->name),true); @@ -41,6 +42,7 @@ if ( !isset($_POST['desc']) ) { $msg .= sprintf($lang['Err0009'],$lang['StuffDesc']) ."<br />"; + $gotourl = addBadField($gotourl,'desc',true); } else { $obj->setDesc(trim(StripSlashes($_POST['desc']))); $gotourl = addUrlParameter($gotourl,"desc=". UrlEncode(StripSlashes($_POST['desc'])),true); @@ -55,6 +57,7 @@ if ( !isset($_POST['serial']) ) { $msg .= sprintf($lang['Err0009'],$lang['StuffSerial']) ."<br />"; + $gotourl = addBadField($gotourl,'serial',true); } else { $obj->setSerial(trim(StripSlashes($_POST['serial']))); $gotourl = addUrlParameter($gotourl,"serial=". UrlEncode(StripSlashes($_POST['serial'])),true); @@ -163,6 +166,7 @@ # other modules $msg .= module_parseforms($current_user,$obj,$gotourl); +$msg .= $obj->run_check_hook(); if ( $msg == "" ) { $dbconn->Begin("WORK"); $msg .= $obj->save(); Index: stuff_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/stuff/stuff_new.php,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- stuff_new.php 5 Oct 2009 16:17:39 -0000 1.17 +++ stuff_new.php 20 Nov 2009 20:26:08 -0000 1.18 @@ -205,7 +205,7 @@ $m[category][] = "obj"; $this->addMenu($m); if ( $this->user->feature_ok(USESTUFF,PERM_NEW) ) { - $x = array( url => "stuff/stuff_new.php", + $x = array( url => 'stuff/stuff_new.php', text => $lang['NewEntry'], info => $lang['StuffCreate'], category => array("stuff","new","obj") |
From: Gero K. <gok...@us...> - 2009-11-20 20:26:19
|
Update of /cvsroot/tutos/tutos/php/expense In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28298/expense Modified Files: expense.pinc Log Message: more custom fields support / more hook support Index: expense.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/expense/expense.pinc,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- expense.pinc 5 Oct 2009 16:17:39 -0000 1.34 +++ expense.pinc 20 Nov 2009 20:26:08 -0000 1.35 @@ -137,6 +137,7 @@ $this->t_start = new TUTOS_Date_Time(); $this->t_end = new TUTOS_Date_Time(0); $this->tablename = $this->dbconn->prefix ."expenses"; + $this->run_postinit_hook(); } /** * fill the object data with a given resultset @@ -555,7 +556,8 @@ function save() { global $current_user, $tutos,$table; - $msg = ""; + $msg = ''; + $msg .= $this->run_presave_hook(); if ( $this->link_id == -1 ) { } |
From: Gero K. <gok...@us...> - 2009-11-20 20:26:18
|
Update of /cvsroot/tutos/tutos/php/installation In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28298/installation Modified Files: installation_ins.php Log Message: more custom fields support / more hook support Index: installation_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/installation/installation_ins.php,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- installation_ins.php 5 Oct 2009 16:18:06 -0000 1.22 +++ installation_ins.php 20 Nov 2009 20:26:08 -0000 1.23 @@ -107,6 +107,7 @@ $msg .= module_parseforms($current_user,$obj,$gotourl); +$msg .= $obj->run_check_hook(); if ( $msg == "" ) { $obj->setMoney($_POST['money']); $obj->setCurrency($_POST['currency']); |
From: Gero K. <gok...@us...> - 2009-11-20 20:26:18
|
Update of /cvsroot/tutos/tutos/php/rate In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28298/rate Modified Files: rate.pinc Log Message: more custom fields support / more hook support Index: rate.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/rate/rate.pinc,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- rate.pinc 5 Oct 2009 16:18:07 -0000 1.48 +++ rate.pinc 20 Nov 2009 20:26:08 -0000 1.49 @@ -72,6 +72,7 @@ $this->tablename = $this->dbconn->prefix ."rates"; $this->acl[$current_user->id] = $tutos[modok]; + $this->run_postinit_hook(); } /** * fill the object data with a given resultset @@ -360,7 +361,8 @@ function save() { global $current_user, $tutos,$table; - $msg = ""; + $msg = ''; + $msg .= $this->run_presave_hook(); if ( $this->link_id == -1 ) { $this->ref = $this->creator; @@ -377,6 +379,7 @@ $q->addFV("vat",$this->vat,"FLOAT"); $q->addFV("role_id",$this->role_id,"INT"); $q->addFV("state",$this->state,"INT"); + $this->save_custom_fields($q); if ( $this->id < 0 ) { $this->modified = array(); |
From: Gero K. <gok...@us...> - 2009-11-20 20:26:18
|
Update of /cvsroot/tutos/tutos/php/note In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28298/note Modified Files: note.pinc Log Message: more custom fields support / more hook support Index: note.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/note.pinc,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- note.pinc 5 Oct 2009 16:18:07 -0000 1.82 +++ note.pinc 20 Nov 2009 20:26:08 -0000 1.83 @@ -313,7 +313,8 @@ function save() { global $current_user, $tutos,$table; - $msg = ""; + $msg = ''; + $msg .= $this->run_presave_hook(); if ( $this->link_id == -1 ) { $this->ref = $this->creator; |
From: Gero K. <gok...@us...> - 2009-11-20 20:26:18
|
Update of /cvsroot/tutos/tutos/php/counter In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28298/counter Modified Files: mconfig.pinc Log Message: more custom fields support / more hook support Index: mconfig.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/counter/mconfig.pinc,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mconfig.pinc 14 Jun 2009 19:53:22 -0000 1.4 +++ mconfig.pinc 20 Nov 2009 20:26:08 -0000 1.5 @@ -15,7 +15,7 @@ define('usecounter',-96); $tutos[modules]['counter'] = array( name => "counter", - Desc => "counter", + Desc => "count object access", file => "php/counter/counter.pinc", 'overview' => "counter/counter_overview.php", 'perm' => usecounter |
From: Gero K. <gok...@us...> - 2009-11-20 20:26:18
|
Update of /cvsroot/tutos/tutos/php/invoice In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28298/invoice Modified Files: invoice.pinc invoice_ins.php invoice_new.php Log Message: more custom fields support / more hook support Index: invoice.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/invoice/invoice.pinc,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- invoice.pinc 23 Oct 2009 19:09:12 -0000 1.83 +++ invoice.pinc 20 Nov 2009 20:26:08 -0000 1.84 @@ -46,7 +46,7 @@ } $r .= '>'. $lang['any'] .'</option>'; } -# Any but not closed + // Any but not closed if ( $any == 2 ) { $r .= '<option value="-2"'; if ( -2 == $default ) { @@ -777,6 +777,7 @@ $q->addFV("d_due1",$this->datedue[1],"DATETIME"); $q->addFV("d_due2",$this->datedue[2],"DATETIME"); $q->addFV("d_finish",$this->datefinish,"DATETIME"); + $this->save_custom_fields($q); if ( $this->id < 0 ) { unset ($this->modified); Index: invoice_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/invoice/invoice_new.php,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- invoice_new.php 5 Oct 2009 16:18:06 -0000 1.63 +++ invoice_new.php 20 Nov 2009 20:26:08 -0000 1.64 @@ -32,7 +32,7 @@ $r = ''; $r .= "<tr>\n"; if ( $f->id != -1 ) { -# EXISTING + // EXISTING if ( is_object($f->ref) ) { $r .= ' <td valign="top"><label for="del_'. $f->id .'">'. $f->ref->getLink(sprintf("%04d",$f->pos)) ."</label></td>"; } else { @@ -222,7 +222,7 @@ -# The existing positions in the invoice + // The existing positions in the invoice $r .= "<tr>\n"; $r .= '<th colspan="9">'. $lang['InvExistingPos'] ."</th>\n"; $r .= "</tr>\n"; @@ -252,7 +252,7 @@ unset($f); } if ( $this->obj->change_ok() ) { -# The possible positions in the invoice + // The possible positions in the invoice $r .= "<tr>\n"; $r .= ' <th colspan="9">'. $lang['InvPossiblePos'] ."</th>\n"; $r .= "</tr>\n"; @@ -313,8 +313,8 @@ unset($p); } } - } # if expense - } + } // if expense + } // Installation related to out project if( $tutos[useinstmanagement] ) { @@ -371,7 +371,7 @@ unset($f2); } } - } # bugtracking + } // bugtracking if( $tutos[useexpenses] ) { loadmodule("expense"); @@ -388,9 +388,11 @@ unset($p); } } - } # expenses - } + } // expenses + } + // Edit additional custom fields + $r .= edit_custom_fields($this,$this->obj->gettype(),$this->obj,9); // References to modules $r .= module_addforms($this->user,$this->obj,9); Index: invoice_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/invoice/invoice_ins.php,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- invoice_ins.php 5 Oct 2009 16:18:06 -0000 1.25 +++ invoice_ins.php 20 Nov 2009 20:26:08 -0000 1.26 @@ -143,9 +143,14 @@ } } +// +// Parse additional custom fields +// +$msg .= parse_custom_fields($i->gettype(),$i); # other modules $msg .= module_parseforms($current_user,$i,$gotourl); +$msg .= $i->run_check_hook(); if ( $msg == "" ) { $dbconn->Begin("WORK"); $msg .= $i->save(); |
From: Gero K. <gok...@us...> - 2009-11-20 20:26:18
|
Update of /cvsroot/tutos/tutos/php/group In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28298/group Modified Files: group_ins.php Log Message: more custom fields support / more hook support Index: group_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/group/group_ins.php,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- group_ins.php 5 Oct 2009 16:18:06 -0000 1.22 +++ group_ins.php 20 Nov 2009 20:26:08 -0000 1.23 @@ -50,6 +50,7 @@ # other modules $msg .= module_parseforms($current_user,$obj,$gotourl); +$msg .= $obj->run_check_hook(); if ( $msg == "" ) { $obj->setDesc(trim(StripSlashes($_POST['desc']))); |
From: Gero K. <gok...@us...> - 2009-11-20 17:05:59
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16103 Modified Files: module_base.pinc Log Message: bugfix Index: module_base.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/module_base.pinc,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- module_base.pinc 5 Oct 2009 16:18:03 -0000 1.54 +++ module_base.pinc 20 Nov 2009 17:05:47 -0000 1.55 @@ -44,7 +44,7 @@ ReadLang1($lang,dirname($tutos['base'] .'/'. $tutos[modules][$key][file]),$current_user); if (file_exists(dirname($tutos['base'] .'/'. $tutos[modules][$key][file]) .'/mtable.pinc') ) { - @include_once dirname($tutos['base'] .'/'. $tutos[modules][$key][file]) .'/mtable.pinc'; + @include dirname($tutos['base'] .'/'. $tutos[modules][$key][file]) .'/mtable.pinc'; } // Load Config Values |
From: Gero K. <gok...@us...> - 2009-11-20 15:59:20
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv32088 Modified Files: department_ins.php company_ins.php Log Message: custom fields Index: company_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/company_ins.php,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- company_ins.php 5 Oct 2009 16:18:03 -0000 1.35 +++ company_ins.php 20 Nov 2009 15:59:10 -0000 1.36 @@ -23,7 +23,7 @@ $gotourl = 'company_new.php'; $msg = ''; $c = new company($dbconn); -# Location +// Location $l = new location($dbconn); if ( isset($_POST['id']) ) { @@ -79,7 +79,7 @@ } } -# location +// location $_POST['c_id'] = -1; $lmsg = $l->parseform(); if ($l->used || ($l->id >0)) { @@ -88,6 +88,10 @@ $c->setName($name); +// +// Parse additional custom fields +// +$msg .= parse_custom_fields($d->gettype(),$d); // other modules $msg .= module_parseforms($current_user,$c,$gotourl); $msg .= $c->run_check_hook(); Index: department_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/department_ins.php,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- department_ins.php 5 Oct 2009 16:18:03 -0000 1.36 +++ department_ins.php 20 Nov 2009 15:59:10 -0000 1.37 @@ -90,6 +90,10 @@ $d->setName($name); $d->c_id = $d->company->id; +// +// Parse additional custom fields +// +$msg .= parse_custom_fields($d->gettype(),$d); // other modules $msg .= module_parseforms($current_user,$d,$gotourl); |