obliquid-cvs Mailing List for obliquid
Status: Beta
Brought to you by:
slocati
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(230) |
Aug
(425) |
Sep
(348) |
Oct
(176) |
Nov
(133) |
Dec
(337) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(385) |
Feb
(75) |
Mar
(272) |
Apr
(496) |
May
(205) |
Jun
(372) |
Jul
(235) |
Aug
(496) |
Sep
(180) |
Oct
(325) |
Nov
(261) |
Dec
(234) |
| 2004 |
Jan
(326) |
Feb
|
Mar
(197) |
Apr
(182) |
May
(49) |
Jun
(74) |
Jul
(83) |
Aug
(29) |
Sep
(57) |
Oct
(17) |
Nov
(12) |
Dec
(32) |
| 2005 |
Jan
(89) |
Feb
(71) |
Mar
(24) |
Apr
(2) |
May
(20) |
Jun
(26) |
Jul
(7) |
Aug
|
Sep
|
Oct
(2) |
Nov
(8) |
Dec
(12) |
| 2006 |
Jan
(26) |
Feb
(1) |
Mar
(9) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
(2) |
Mar
(18) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <sl...@sc...> - 2007-04-29 19:07:44
|
Update of /cvsroot/obliquid/obliquid/common/pages/user In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2585/pages/user Modified Files: lostpwd.php Log Message: html format Index: lostpwd.php =================================================================== RCS file: /cvsroot/obliquid/obliquid/common/pages/user/lostpwd.php,v retrieving revision 1.2 retrieving revision 1.3 diff -b -u -d -r1.2 -r1.3 --- lostpwd.php 26 Mar 2005 22:54:53 -0000 1.2 +++ lostpwd.php 29 Apr 2007 19:07:39 -0000 1.3 @@ -1,7 +1,7 @@ <?php /* Obliquid - PHP/XML application framework for groupware websites. - * Copyright (C) 2002,2003 Stefano Locati <in...@ob...> + * Copyright (C) 2002-2006 Stefano Locati <in...@ob...> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -77,7 +77,10 @@ .$_obweb->mb->GetBooleanFieldValue(true); $ok=$_obweb->mb->QueryRow($sql, $row); if ($ok) { - for ($i=0; $i<count($field); $i++) $p[ $field[$i] ] = $row[$i]; + for ($i=0; $i<count($field); $i++) { + //$p[ $field[$i] ] = mb_convert_encoding($row[$i], "ISO-8859-15", "UTF-8"); + $p[ $field[$i] ] = htmlentities($row[$i], ENT_QUOTES, "UTF-8"); + } return $p; } else { return false; @@ -111,7 +114,8 @@ $frm["username"]=$dbf->getTextInput("username", array("maxlength" => "32")); $frm["email"]=$dbf->getTextInput("email", array("maxlength" => "128")); $frm["submit"]=$dbf->getSubmit("sendit", _l("Send"), - array("class" => "buttonform", "style" => "width: 120px")).$dbf->getHidden("action", "sendit"); + array("class" => "buttonform", "style" => "width: 120px")) + .$dbf->getHidden("action", "sendit"); return $frm; } @@ -129,14 +133,23 @@ $tpl->assign(array("p" => $p)); //get the generated message, @ suppress Smarty warnings $body = @$tpl->fetch("msg:user_lost_password"); + $body = "<html><head><title>Password dimenticata</title></head><body>" + .$body."</body></html>"; //build the extra headers $headers.="From: ".$_obweb->configparms["sitetitle"] - ." <".$_obweb->configparms["site_email"].">\r\n"; + ." <".$_obweb->configparms["site_email"].">\r\n" + ."MIME-Version: 1.0\r\n" + ."Content-type: text/html; charset=iso-8859-15\r\n"; + /* //queue the emails - $mymsg->setTXTBody($body); + $mymsg->setTxtBody($body); + //$mymsg->setHTMLBody($body); $mymsg->setHeaders($headers); $mymsg->setSendImmediately(true); $mymsg->queue($p["id_person"]); + */ + //if ($p["id_person"]==1) echo("*".$body); + mail($p["email"], $subject, $body, $headers); $_obweb->addErr(_l("Your password has been emailed")."\n","USER_NOTICE"); } header("Location: index.php"); |
|
From: <sl...@sc...> - 2007-04-29 11:31:09
|
Update of /cvsroot/obliquid/obliquid/common/classes/obliquid In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17772/classes/obliquid Modified Files: user.php Log Message: a part of deleteUserGroup() was accidentally deleted: problem solved Index: user.php =================================================================== RCS file: /cvsroot/obliquid/obliquid/common/classes/obliquid/user.php,v retrieving revision 1.69 retrieving revision 1.70 diff -b -u -d -r1.69 -r1.70 --- user.php 29 Apr 2007 09:59:24 -0000 1.69 +++ user.php 29 Apr 2007 11:30:59 -0000 1.70 @@ -587,5 +587,12 @@ function deleteUserGroup($id_person, $id_group) { global $_obweb; + $dbf =& new db_form(); + $dbf->setDBConnection($_obweb->mb); + $dbf->setTable("person_group", $_obweb->tprefix); + $dbf->setFormValue("id_person", $id_person); + $dbf->setFormValue("id_group", $id_group); + $dbf->executeSqlDelete(false, _l("Removing a group from a user"), "user", true); + } } |
|
From: <sl...@sc...> - 2007-04-29 09:59:29
|
Update of /cvsroot/obliquid/obliquid/common/classes/obliquid In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19098/classes/obliquid Modified Files: user.php Log Message: Added support for clear text groupname Index: user.php =================================================================== RCS file: /cvsroot/obliquid/obliquid/common/classes/obliquid/user.php,v retrieving revision 1.68 retrieving revision 1.69 diff -b -u -d -r1.68 -r1.69 --- user.php 21 May 2005 16:49:50 -0000 1.68 +++ user.php 29 Apr 2007 09:59:24 -0000 1.69 @@ -46,16 +46,19 @@ if (!is_array($groupname) || !is_array($description)) return false; $has_groupname=false; $_obweb->getLanguages(); + $name_clear=""; for ($i=0; $i<count($_obweb->language); $i++) { $locale=$_obweb->language[$i]["value"]; + if ($name_clear=="") $name_clear = $groupname[$locale]; if ($groupname[$locale]!="") $has_groupname=true; } if (!$has_groupname) return false; $ok=$_obweb->mb->getSequenceNextValue($_obweb->tprefix."group", $id_group); if (!$ok) return 0; $sql="INSERT INTO ".$_obweb->tprefix - .sprintf("group (id_group, groupname, description, is_role) VALUES (%d, %s, %s, %s)", + .sprintf("group (id_group, groupname, name_clear, description, is_role) VALUES (%d, %s, %s, %s, %s)", $id_group, $_obweb->mb->GetTextFieldValue(base64_encode(serialize($groupname))), + $_obweb->mb->GetTextFieldValue($name_clear), $_obweb->mb->GetTextFieldValue(base64_encode(serialize($description))), $_obweb->mb->GetBooleanFieldValue($is_role)); $ok=$_obweb->mb->Query($sql); @@ -77,14 +80,17 @@ if (!is_array($groupname) || !is_array($description)) return false; $has_groupname=false; $_obweb->getLanguages(); + $name_clear=""; for ($i=0; $i<count($_obweb->language); $i++) { $locale=$_obweb->language[$i]["value"]; + if ($name_clear=="") $name_clear = $groupname[$locale]; if ($groupname[$locale]!="") $has_groupname=true; } if (!$has_groupname) return false; $sql="UPDATE ".$_obweb->tprefix - .sprintf("group SET groupname=%s, description=%s, is_role=%s WHERE id_group=%d", + .sprintf("group SET groupname=%s, name_clear=%s, description=%s, is_role=%s WHERE id_group=%d", $_obweb->mb->GetTextFieldValue(base64_encode(serialize($groupname))), + $_obweb->mb->GetTextFieldValue($name_clear), $_obweb->mb->GetTextFieldValue(base64_encode(serialize($description))), $_obweb->mb->GetBooleanFieldValue($is_role), $id_group); @@ -101,7 +107,6 @@ function delGroup($id_group) { global $_obweb; - //delete of associated operations $sql=sprintf("DELETE FROM %ssecurity WHERE ug='g%d'", $_obweb->tprefix, $id_group); @@ -130,7 +135,6 @@ function readGroup($id_group, &$groupname, &$description) { global $_obweb; - $sql="SELECT groupname, description FROM ".$_obweb->tprefix .sprintf("group WHERE id_group=%d", $id_group); $ok=$_obweb->mb->QueryRow($sql, $row); @@ -150,7 +154,6 @@ function groupInfo($id_group, &$groupname, &$groupdesc) { global $_obweb; - $description=""; if ($id_group=="**") { $groupname=_l("Everyone"); @@ -180,7 +183,6 @@ function groupIdToNames($groupIds) { global $_obweb; - $names=""; $group=explode(",", $groupIds); for ($j=0; $j<count($group); $j++) { @@ -198,7 +200,6 @@ function groupIds($id_person) { global $_obweb; - $sql = "SELECT id_group FROM " .$_obweb->tprefix."person_group WHERE id_person=$id_person"; $_obweb->mb->queryColumn($sql, $grps); @@ -223,7 +224,6 @@ function &listGroups($get="G") { global $_obweb; - $sql="SELECT id_group, groupname, description FROM ".$_obweb->tprefix."group "; if ($get=="G") { $sql.=sprintf("WHERE is_role=%s", $_obweb->mb->GetBooleanFieldValue(false)); @@ -286,7 +286,6 @@ function &listUserGroups($id_person) { global $_obweb; - $sql="SELECT gr.id_group, groupname, description FROM ".$_obweb->tprefix ."group AS gr, ".$_obweb->tprefix .sprintf("person_group AS pg WHERE gr.id_group=pg.id_group AND pg.id_person=%d", @@ -323,7 +322,6 @@ function peekHas($a, $b, $c, $p=0) { global $_obweb; - if ($p==0) { //If no special person, just use the normal routine return $_obweb->has($id_module,$name,$c); @@ -376,7 +374,6 @@ function has($id_module, $name, $c="") { global $_obweb; - return $_obweb->has($id_module,$name,$c); } @@ -394,7 +391,6 @@ */ function ensure_has($a, $b, $c, $t) { global $_obweb; - $secobj = $a.":".$b.":".$c; $sql = sprintf("SELECT count(id_security) FROM %ssecurity WHERE ifq='%s'", $_obweb->tprefix, $secobj); @@ -423,7 +419,6 @@ function loadRole($filename, $id_group=0, $id_security=0) { global $_obweb; - $fp = fopen($filename, "r"); $inserted=0; $line_n=0; @@ -511,7 +506,6 @@ */ function canViewUser($id_person) { global $_obweb; - //we can see the user 0 (we're probably adding a user) and ourself if ($_SESSION["_obperson"]["id_person"]==$id_person || !$id_person) return true; //if we can view any group, we can view any person @@ -535,7 +529,6 @@ */ function hasGroup($id_person, $id_group) { global $_obweb; - //build query $sql= "SELECT COUNT(id_group) FROM ".$_obweb->tprefix .sprintf("person_group WHERE id_person=%d AND id_group=%d",$id_person,$id_group); @@ -550,7 +543,6 @@ */ function delete($id_person) { global $_obweb; - $dbf =& new db_form(); $dbf->setDBConnection($_obweb->mb); $dbf->setTable("person_group", $_obweb->tprefix); @@ -596,12 +588,4 @@ { global $_obweb; - $dbf =& new db_form(); - $dbf->setDBConnection($_obweb->mb); - $dbf->setTable("person_group", $_obweb->tprefix); - $dbf->setFormValue("id_person", $id_person); - $dbf->setFormValue("id_group", $id_group); - $dbf->executeSqlDelete(false, _l("Removing a group from a user"), "user", true); - } - } |
|
From: <sl...@sc...> - 2007-04-29 09:48:58
|
Update of /cvsroot/obliquid/obliquid/common/templates/core In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15041/templates/core Modified Files: editpage.tpl Log Message: Used $pagename variable passed from php instead of $smarty.get.pagename Index: editpage.tpl =================================================================== RCS file: /cvsroot/obliquid/obliquid/common/templates/core/editpage.tpl,v retrieving revision 1.37 retrieving revision 1.38 diff -b -u -d -r1.37 -r1.38 --- editpage.tpl 23 Mar 2007 15:35:37 -0000 1.37 +++ editpage.tpl 29 Apr 2007 09:48:53 -0000 1.38 @@ -166,7 +166,7 @@ <tr> <td></td> <td colspan="2" class="tableheader"> <a -href="index.php?page=core_pagecomment&pagename={{$smarty.get.pagename}}&is_common={{$is_common}}" +href="index.php?page=core_pagecomment&pagename={{$pagename}}&is_common={{$is_common}}" {{popup text="`$msg.comment`"}}><img src="common/images/core/editor.gif" width="16" height="16" border="0" alt=""/></a> {{$page_comment}} @@ -179,9 +179,9 @@ {{/if}}<br/> {{if $msg.pagesec}} -<a href="index.php?page=user_securityasgn&id=:{{$smarty.get.pagename}}:&type=n&rtn={{$ret_url}}"><img +<a href="index.php?page=user_securityasgn&id=:{{$pagename}}:&type=n&rtn={{$ret_url}}"><img src="common/images/core/lock.gif" width="16" height="16" border="0" alt=""/> -<a href="index.php?page=user_securityasgn&id=:{{$smarty.get.pagename}}:&type=n&rtn={{$ret_url}}" +<a href="index.php?page=user_securityasgn&id=:{{$pagename}}:&type=n&rtn={{$ret_url}}" class="textmini">{{$msg.pagesec}}</a> {{/if}} <td> |
|
From: <sl...@sc...> - 2007-03-23 15:35:44
|
Update of /cvsroot/obliquid/obliquid/common/templates/core In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22376/templates/core Modified Files: editpage.tpl Log Message: Used $_GET instead of $smarty.get that seems not to work when register globals is off Index: editpage.tpl =================================================================== RCS file: /cvsroot/obliquid/obliquid/common/templates/core/editpage.tpl,v retrieving revision 1.36 retrieving revision 1.37 diff -b -u -d -r1.36 -r1.37 --- editpage.tpl 7 Feb 2005 21:21:57 -0000 1.36 +++ editpage.tpl 23 Mar 2007 15:35:37 -0000 1.37 @@ -4,7 +4,7 @@ <td></td> <td><a href="index.php?page=core_editpagegroup&mod={{$mod}}" class="textmini">» {{$msg.module}}</a></td> - <td><a href="index.php?page={{$smarty.get.pagename}}" + <td><a href="index.php?page={{$pagename}}" class="textmini">» {{$msg.preview}}</a></td> <td class="textmini"> <form method="post">{{$msg.location}} {{$common_local}}</form></td> |
|
From: <sl...@sc...> - 2007-03-23 15:35:44
|
Update of /cvsroot/obliquid/obliquid/common/pages/core In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22376/pages/core Modified Files: editpage.php Log Message: Used $_GET instead of $smarty.get that seems not to work when register globals is off Index: editpage.php =================================================================== RCS file: /cvsroot/obliquid/obliquid/common/pages/core/editpage.php,v retrieving revision 1.67 retrieving revision 1.68 diff -b -u -d -r1.67 -r1.68 --- editpage.php 18 Jan 2005 18:12:45 -0000 1.67 +++ editpage.php 23 Mar 2007 15:35:37 -0000 1.68 @@ -248,6 +248,8 @@ "data" => $slotlist, "show" => $show, "common_local" => $common_local, "dst" => $dst, "page_comment" => $page_comment, "is_common" => $mypage["is_common"], "show" => $show, - "ret_url" => urlencode("index.php?page=core_editpage&pagename=".$_GET["pagename"]) )); + "ret_url" => urlencode("index.php?page=core_editpage&pagename=" + .$_GET["pagename"]), + "pagename" => $_GET["pagename"] )); } |
|
From: <sl...@sc...> - 2007-03-07 17:34:29
|
Update of /cvsroot/obliquid/obliquid/common/classes/fckeditor/_docs/contents/002 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26873/002 Removed Files: FileBrowserConnector.gif Log Message: removed doc --- FileBrowserConnector.gif DELETED --- |
|
From: <sl...@sc...> - 2007-03-07 17:34:29
|
Update of /cvsroot/obliquid/obliquid/common/classes/fckeditor/_docs/contents In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26873 Removed Files: 001.html 002.html 003.html 004.html 005.html 006.html 007.html 008.html 009.html 010.html Log Message: removed doc --- 001.html DELETED --- --- 002.html DELETED --- --- 003.html DELETED --- --- 004.html DELETED --- --- 005.html DELETED --- --- 006.html DELETED --- --- 007.html DELETED --- --- 008.html DELETED --- --- 009.html DELETED --- --- 010.html DELETED --- |
|
From: <sl...@sc...> - 2007-03-07 15:59:46
|
Update of /cvsroot/obliquid/obliquid/common/classes/fckeditor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19804 Modified Files: editpage.php Log Message: File obsoleted: added exit() on top to not allow to use it Index: editpage.php =================================================================== RCS file: /cvsroot/obliquid/obliquid/common/classes/fckeditor/editpage.php,v retrieving revision 1.3 retrieving revision 1.4 diff -b -u -d -r1.3 -r1.4 --- editpage.php 22 Oct 2006 16:35:36 -0000 1.3 +++ editpage.php 7 Mar 2007 15:59:36 -0000 1.4 @@ -1,5 +1,5 @@ <?php -session_start(); +exit(); ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> |
|
From: <sl...@sc...> - 2007-03-07 15:09:26
|
Update of /cvsroot/obliquid/obliquid/common/pagexml/core In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27706/pagexml/core Added Files: fckdel.xml Log Message: Page to delete files / folder --- NEW FILE: fckdel.xml --- <?xml version="1.0" encoding="UTF-8"?> <PAGE NAME="core_fckdel" TPL="common" FRAME="frame" GROUP="core"> <SLOT NAME="core/fckdel" PHP="common" POSITION="center2" TPL="common" BLOCK="title_em"/> </PAGE> |
|
From: <sl...@sc...> - 2007-03-07 15:09:26
|
Update of /cvsroot/obliquid/obliquid/common/templates/core In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27706/templates/core Added Files: fckdel.tpl Log Message: Page to delete files / folder --- NEW FILE: fckdel.tpl --- <script language="JavaScript" type="text/javascript"> <!-- {{if $redirect}} open("common/classes/fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/php/connector.php", "FCKBrowseWindow"); {{/if}} --> </script> <form method="post" action=""> <p>{{$frm.msg}}</p> {{$frm.yes}} {{$frm.no}} </form> |
|
From: <sl...@sc...> - 2007-03-07 15:06:43
|
Update of /cvsroot/obliquid/obliquid/common/classes/obliquid In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27213/classes/obliquid Modified Files: core.php Log Message: Added calls to clearstatcache(), improved comments Index: core.php =================================================================== RCS file: /cvsroot/obliquid/obliquid/common/classes/obliquid/core.php,v retrieving revision 1.56 retrieving revision 1.57 diff -b -u -d -r1.56 -r1.57 --- core.php 25 Dec 2005 21:22:13 -0000 1.56 +++ core.php 7 Mar 2007 15:06:32 -0000 1.57 @@ -139,6 +139,12 @@ $is_common[$cur_page] = $dir=="common"; /* PARSE XML FILE start */ + + // THIS CALL IS NEEDED BECAUSE "filesize()" CACHE RESULT BETWEEN MULTIPLE CALL + // SO FREAD CAN READ ONLY A PIECE OF THE FILE. + // MORE INFO AT: http://www.php.net/manual/en/function.clearstatcache.php + clearstatcache(); + $fd=fopen($cur_file, "r"); $xmldoc=fread($fd, filesize($cur_file)); $tree =& eZXML::domTree($xmldoc); @@ -153,8 +159,7 @@ if ($attr[$j]->name=="FRAME") $cur_frame=$attr[$j]->content; if ($attr[$j]->name=="TPL") $cur_tpl=$attr[$j]->content; } - //GROUP is now given by the module dir, the attribute could be removed - //if ($fgroup!="" && $cur_group!=$fgroup) continue; + if ($fgroup!="" && $cur_group!=$fgroup) continue; $frame[$cur_page]=$cur_frame; $tpl[$cur_page]=$cur_tpl; // finds the slots for a page @@ -249,7 +254,6 @@ return $page; } - /** getPage returns an associative array with page attributes * Returns: * Array([NAME] => core_configparms @@ -262,8 +266,6 @@ * [SLOT] => Array ( * [0] => Array ( * [NAME] => core/nav - * [NAME_PHP] => - * [NAME_TPL] => * [PHP] => common * [TPL] => common * [FRAME] => frame @@ -279,13 +281,19 @@ $page = $this->pageInfo($name); /* PARSE XML FILE start */ + + // THIS CALL IS NEEDED BECAUSE "filesize()" CACHE RESULT BETWEEN MULTIPLE CALL + // SO FREAD CAN READ ONLY A PIECE OF THE FILE. + // MORE INFO AT: http://www.php.net/manual/en/function.clearstatcache.php + clearstatcache(); + $fd=@fopen($page["path"], "r"); if (!$fd) return false; $xmldoc=fread($fd, filesize($page["path"])); $tree =& eZXML::domTree($xmldoc); $first_lev =& $tree->children; $page_attr=array("NAME", "GROUP", "FRAME", "TPL"); - $slot_attr=array("NAME", "NAME_PHP", "NAME_TPL", "PHP", "TPL", "FRAME", "POSITION", "BLOCK", "FUNCTION"); + $slot_attr=array("NAME", "PHP", "TPL", "FRAME", "POSITION", "BLOCK", "FUNCTION"); for ($i=0; $i<count($first_lev); $i++) { if ($first_lev[$i]->name!="PAGE") continue; //may also have "text" nodes! // finds attributes cur_page and cur_group @@ -369,6 +377,12 @@ if (!is_writable($page["path"])) { $_obweb->addErr(sprintf(_l("%s is not writeable: can't modify"), $page["path"])."\n"); } + + // THIS CALL IS NEEDED BECAUSE "filesize()" CACHE RESULT BETWEEN MULTIPLE CALL + // SO FREAD CAN READ ONLY A PIECE OF THE FILE. + // MORE INFO AT: http://www.php.net/manual/en/function.clearstatcache.php + clearstatcache(); + $fd=fopen($page["path"], "r"); $xmldoc=fread($fd, filesize($page["path"])); $tree =& eZXML::domTree($xmldoc); @@ -540,6 +554,12 @@ $config_tpl="common/configs/".$fname.".tpl"; $fp=fopen($config_tpl, "r"); if (!$fp) return false; + + // THIS CALL IS NEEDED BECAUSE "filesize()" CACHE RESULT BETWEEN MULTIPLE CALL + // SO FREAD CAN READ ONLY A PIECE OF THE FILE. + // MORE INFO AT: http://www.php.net/manual/en/function.clearstatcache.php + clearstatcache(); + $mb_cfg=fread($fp, filesize($config_tpl)); fclose($fp); $newdb=sprintf("%d", $newdb); @@ -568,3 +588,4 @@ } + |
|
From: <sl...@sc...> - 2007-03-07 14:59:45
|
Update of /cvsroot/obliquid/obliquid/common/classes/general In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23836/classes/general Modified Files: db_form.php Log Message: Checkbox label can be specified as an attribute Index: db_form.php =================================================================== RCS file: /cvsroot/obliquid/obliquid/common/classes/general/db_form.php,v retrieving revision 1.126 retrieving revision 1.127 diff -b -u -d -r1.126 -r1.127 --- db_form.php 3 Mar 2007 11:09:26 -0000 1.126 +++ db_form.php 7 Mar 2007 14:59:39 -0000 1.127 @@ -1283,13 +1283,16 @@ * @param text $field field name, repeat the same name for radios of a group, * don't use spaces, condider using only letters, numbers and underscore * the field name will be used also as id - * @param text $attribute an optional associative attributes array, useful to pass style - * information or javascript event handlers - * @param text $label an optional label. Clicking on the label will activate the radio + * @param text $attribute an optional associative attributes array, useful + * to pass style information or javascript event handlers. The "label" + * key can be used to pass a label instead of using $label parameter + * @param text $label an optional label. Clicking on the label will activate + * the radio * @return text html markup to display the checkbox */ function getCheckbox($field, $attribute=array(), $label="") { + if ($attribute["label"]) $label=$attribute["label"]; $res = "<label style=\"cursor:pointer;cursor:hand;\" for=\"".$field ."\"><input type=\"checkbox\" value=\"1\" id=\"".$field ."\" name=\"$field\" "; |
|
From: <sl...@sc...> - 2007-03-07 14:53:02
|
Update of /cvsroot/obliquid/obliquid/common/pages/core In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20149/pages/core Added Files: fckdel.php Log Message: Page to delete files or folders with fckeditor --- NEW FILE: fckdel.php --- <?php /** Deletes a fck editor file or directory */ function core_fckdel_() { global $_obweb; $dbf =& new db_form(); $shortname = $_GET["fdel"]; //echo "del ".$shortname." "; $shortname = preg_replace("/^.*\/obfiles(.*)/", "\\1", $shortname); //if (substr($shortname, -1, 1)=="/") $fullname = realpath("obfiles/Image".$shortname); else $fullname = realpath("obfiles".$shortname); if (!$fullname) { echo "not found "."obfiles".$shortname; return; //file or dir doesnt exists } //security check: force users within obfiles realm if (strpos($fullname, getcwd()."/obfiles/")!==0) { echo "not in path"; return; } if ($_POST) { if ($_POST["yes"]) { if (is_file($fullname)) { unlink($fullname); $file_pos = strrpos($fullname, "/")+1; unlink( substr($fullname, 0, $file_pos)."sm_".substr($fullname, $file_pos).".jpg" ); } else { rmdir($fullname); } } $_obweb->smslot->assign("redirect", "true"); return; } $frm = array(); $frm["yes"] = $dbf->getSubmit("yes", _l("Yes")); $frm["no"] = $dbf->getSubmit("no", _l("No")); if (is_dir($fullname)) { if (is_folder_empty($fullname)) { $frm["msg"] = "Vuoi veramente cancellare la directory ".$shortname."?"; } else { $frm["msg"] = "La directory ".$shortname ." contiene files e non può essere cancellata"; $frm["yes"] = ""; $frm["no"] = $dbf->getSubmit("no", _l("OK")); } } else { $frm["msg"] = "Vuoi veramente cancellare il file ".$shortname."?"; } $_obweb->smslot->assign("frm", $frm); } function is_folder_empty($dir) { $dl=opendir($dir); if (!$dl) return false; //not found.. return false anyway while ($name = readdir($dl)) { if ($name=="." || $name=="..") continue; return false; } closedir($dl); return true; } |
|
From: <sl...@sc...> - 2007-03-07 14:45:45
|
Update of /cvsroot/obliquid/obliquid/common/classes/fckeditor/editor/filemanager/browser/default In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17556/classes/fckeditor/editor/filemanager/browser/default Modified Files: frmresourceslist.php Log Message: Allows to delete files and folders Index: frmresourceslist.php =================================================================== RCS file: /cvsroot/obliquid/obliquid/common/classes/fckeditor/editor/filemanager/browser/default/frmresourceslist.php,v retrieving revision 1.3 retrieving revision 1.4 diff -b -u -d -r1.3 -r1.4 --- frmresourceslist.php 12 Feb 2005 12:08:12 -0000 1.3 +++ frmresourceslist.php 7 Mar 2007 14:45:40 -0000 1.4 @@ -41,7 +41,7 @@ this.Table.deleteRow(0) ; } -oListManager.AddFolder = function( folderName, folderPath ) +oListManager.AddFolder = function( folderName, folderPath, folderUrl ) { // Create the new row. var oRow = this.Table.insertRow(-1) ; @@ -58,7 +58,10 @@ oCell = oRow.insertCell(-1) ; oCell.noWrap = true ; oCell.colSpan = 2 ; - oCell.innerHTML = ' ' + sLink + folderName + '</a>' ; + oCell.innerHTML = ' ' + sLink + folderName + '</a> <a href="' + + '../../../../../../../index.php?page=core_fckdel&fdel=' + + folderUrl + folderName + + '"><img src="../../../../../../images/core/window-delete.gif" border="0"/></a>'; } oListManager.AddFile = function(fileName, fileUrl, fileSize) @@ -93,12 +96,16 @@ } else { - oCell.innerHTML = sLink + '<img alt="" src="images/icons/' + sIcon + '.gif" width="16" height="16" border="0"></a>' ; + oCell.innerHTML = sLink + '<img alt="" src="images/icons/' + sIcon + + '.gif" width="16" height="16" border="0"></a>' ; } // Add the file name cell. oCell = oRow.insertCell(-1) ; - oCell.innerHTML = ' ' + sLink + fileName + '</a>' ; + oCell.innerHTML = ' ' + sLink + fileName + + '</a> <a href="' + + '../../../../../../../index.php?page=core_fckdel&fdel=' + fileUrl + + '"><img src="../../../../../../images/core/window-delete.gif" border="0"/></a>'; // Add the file size cell. oCell = oRow.insertCell(-1) ; @@ -148,7 +155,7 @@ for ( var i = 0 ; i < oNodes.length ; i++ ) { var sFolderName = oNodes[i].attributes.getNamedItem('name').value ; - oListManager.AddFolder( sFolderName, sCurrentFolderPath + sFolderName + "/" ) ; + oListManager.AddFolder( sFolderName, sCurrentFolderPath + sFolderName + "/", sCurrentFolderUrl) ; } // Add the Files. |
|
From: <sl...@sc...> - 2007-03-07 09:10:33
|
Update of /cvsroot/obliquid/obliquid/common/templates/core In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9117/templates/core Modified Files: newpage.tpl Log Message: Removed the choice of the frame position, that now depends only on the theme position Index: newpage.tpl =================================================================== RCS file: /cvsroot/obliquid/obliquid/common/templates/core/newpage.tpl,v retrieving revision 1.5 retrieving revision 1.6 diff -b -u -d -r1.5 -r1.6 --- newpage.tpl 8 Feb 2004 11:56:15 -0000 1.5 +++ newpage.tpl 7 Mar 2007 09:10:25 -0000 1.6 @@ -5,24 +5,21 @@ <tr> <td class="tableheader">{{$msg.module}}</td> <td class="tableheader">{{$msg.page}}</td> -<td class="tableheader">{{$msg.tpl}} -</td> <td class="tableheader">{{$msg.frame}}</td> </tr> <tr> <td class="tablebody">{{$pdata.GROUP}}</td> <td class="tablebody">{{$pdata.NAME}}</td> -<td class="tablebody">{{$pdata.TPL}}</td> <td class="tablebody">{{$pdata.FRAME}}</td> </tr> <tr> -<td class="tableheader" colspan="4">{{$msg.comment}}</td> +<td class="tableheader" colspan="3">{{$msg.comment}}</td> </tr> <tr> -<td class="tablebody" colspan="4">{{$pdata.comment}}</td> +<td class="tablebody" colspan="3">{{$pdata.comment}}</td> </tr> <tr><td>{{$pdata.SUBMIT}}</td></tr> |
|
From: <sl...@sc...> - 2007-03-07 09:10:33
|
Update of /cvsroot/obliquid/obliquid/common/pages/core In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9117/pages/core Modified Files: newpage.php Log Message: Removed the choice of the frame position, that now depends only on the theme position Index: newpage.php =================================================================== RCS file: /cvsroot/obliquid/obliquid/common/pages/core/newpage.php,v retrieving revision 1.23 retrieving revision 1.24 diff -b -u -d -r1.23 -r1.24 --- newpage.php 8 Apr 2004 15:25:55 -0000 1.23 +++ newpage.php 7 Mar 2007 09:10:21 -0000 1.24 @@ -94,18 +94,20 @@ $dbf =& new db_form(); $dbf->parseForm(); $pdata["NAME"]=$dbf->getTextInput("NAME", - array("class" => "textform", "maxlength" => "32", "size" => "25")); + array("class" => "textform", "maxlength" => "32", "style" => "width:200px")); + $dbf->setFormValue("TPL", "common"); + /* $options=array( array("LABEL" => "none", "VALUE" => "none"), array("LABEL" => "common", "VALUE" => "common"), array("LABEL" => "local", "VALUE" => "local") ); - $dbf->setFormValue("TPL", "common"); $pdata["TPL"]=$dbf->getArraySelect("TPL", $options, array("class" => "textform")); + */ $dbf->setFormValue("FRAME", "frame"); $pdata["FRAME"]=$dbf->getTextInput("FRAME", array("class" => "textform")); $pdata["GROUP"]=$dbf->getSelect("GROUP", $module, array("class" => "textform")); $pdata["comment"]=$dbf->getTextInput("comment", - array("class" => "textform", "maxlength" => "255", "size" => "82")); + array("class" => "textform", "maxlength" => "255", "style" => "width:400px")); $pdata["SUBMIT"]=$dbf->getHidden("action", "newpage") .$dbf->getSubmit("submit", _l("Save"), array("class" => "buttonform")); |
|
From: <sl...@sc...> - 2007-03-03 11:46:03
|
Update of /cvsroot/obliquid/obliquid/common/pages/prj In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19846/pages/prj Modified Files: bidac.php Log Message: Added mtime Index: bidac.php =================================================================== RCS file: /cvsroot/obliquid/obliquid/common/pages/prj/bidac.php,v retrieving revision 1.32 retrieving revision 1.33 diff -b -u -d -r1.32 -r1.33 --- bidac.php 30 Dec 2004 02:23:50 -0000 1.32 +++ bidac.php 3 Mar 2007 11:45:51 -0000 1.33 @@ -91,6 +91,7 @@ $dbf->setTable("prj_project", $_obweb->tprefix); $dbf->fetch($prjid); $dbf->parseForm(); + $dbf->setFormValue("mtime", MetabaseNow()); $dbf->executeSqlUpdate(); if ($_POST["prjstatus"]==9) { //Once they update costs, we will change status so they can proceed. @@ -206,6 +207,7 @@ $dbf->setFormValue("date_end", $dbf->getDBValue("date_end")); } } + $dbf->setFormValue("mtime", MetabaseNow()); $dbf->executeSqlUpdate(false); } if (isset($_POST["dophases"])) { @@ -241,6 +243,7 @@ $dbf->fetch($ph); } //Move the values from POST to db_form + $dbf->setFormValue("mtime", MetabaseNow()); $dbf->setFormValue("verified",0); //Checkbox does not return anything if unchecked. foreach ($_POST as $k => $v) { if (strncmp($pfx, $k, $pfxl)==0) { |
|
From: <sl...@sc...> - 2007-03-03 11:41:58
|
Update of /cvsroot/obliquid/obliquid/common/pages/prj In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18299/pages/prj Modified Files: addbid1.php Log Message: added mtime Index: addbid1.php =================================================================== RCS file: /cvsroot/obliquid/obliquid/common/pages/prj/addbid1.php,v retrieving revision 1.11 retrieving revision 1.12 diff -b -u -d -r1.11 -r1.12 --- addbid1.php 25 Mar 2004 12:29:36 -0000 1.11 +++ addbid1.php 3 Mar 2007 11:41:52 -0000 1.12 @@ -56,6 +56,7 @@ $dbf->setFormValue("hourly_rate", $_obweb->configparms["hourly_rate"]); $dbf->setFormValue("distance_cost", $_obweb->configparms["distance_cost"]); $dbf->setFormValue("travel_distance", $travel_distance); + $dbf->setFormValue("mtime", MetabaseNow()); $dbf->executeSqlInsert(); $prjid = $dbf->getValue("id_project"); //Need to insert all the mandatory phases into the new project |
|
From: <sl...@sc...> - 2007-03-03 11:26:56
|
Update of /cvsroot/obliquid/obliquid/common/pages/prj In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12683/pages/prj Modified Files: phases.php Log Message: just comment changes Index: phases.php =================================================================== RCS file: /cvsroot/obliquid/obliquid/common/pages/prj/phases.php,v retrieving revision 1.21 retrieving revision 1.22 diff -b -u -d -r1.21 -r1.22 --- phases.php 30 Dec 2004 02:10:59 -0000 1.21 +++ phases.php 3 Mar 2007 11:26:49 -0000 1.22 @@ -30,17 +30,14 @@ /** prj class */ require_once "common/classes/obliquid/prj.php"; -/** Display form and current information for changes to the prj_phases table */ +/** Display form and current information for changes to the prj_phases table. + * This code assumes it will not be a high volume page, or have a lot of phases + * to a project. This makes the code easier to maintain, but somewhat less + * efficient. + */ function prj_phases_() { -/***************************************************************************** -This code assumes it will not be a high volume page, or have a lot of phases -to a project. This makes the code easier to maintain, but somewhat less -efficient. -******************************************************************************/ - global $_obweb; - $prj = & new prj(); $prjid = sprintf("%d",$_GET["id"]); |
|
From: <sl...@sc...> - 2007-03-03 11:22:30
|
Update of /cvsroot/obliquid/obliquid/common/pages/cal In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10659/pages/cal Modified Files: addwork.php Log Message: Added mtime Index: addwork.php =================================================================== RCS file: /cvsroot/obliquid/obliquid/common/pages/cal/addwork.php,v retrieving revision 1.40 retrieving revision 1.41 diff -b -u -d -r1.40 -r1.41 --- addwork.php 28 Jun 2005 03:54:47 -0000 1.40 +++ addwork.php 3 Mar 2007 11:22:24 -0000 1.41 @@ -56,6 +56,7 @@ $dbf->setFormValue("hours", substr(strtok(" "), 0, -3)); $dbf->setFormValue("worked", date("G:i",strtotime($dbf->getValue("end")))); } + $dbf->setFormValue("mtime", MetabaseNow()); $sql = "SELECT status FROM ".$_obweb->tprefix .sprintf("prj_phase WHERE id_phase=%d", $dbf->getValue("id_categ")); $_obweb->mb->QueryRow($sql, $row); @@ -124,7 +125,8 @@ if ($res) { //inserts the association person_cal $sql="INSERT INTO ".$_obweb->tprefix - .sprintf("cal_person (id_cal, id_person, status_date, ord) VALUES (%d, %d, NOW(), 1)", + ."cal_person (id_cal, id_person, status_date, ord, mtime) " + .sprintf("VALUES (%d, %d, NOW(), 1, NOW())", $dbf->getValue("id_cal"), $_SESSION["_obperson"]["id_person"]); $res=$_obweb->mb->Query($sql); } |
|
From: <sl...@sc...> - 2007-03-03 11:09:32
|
Update of /cvsroot/obliquid/obliquid/common/classes/general In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4961/classes/general Modified Files: db_form.php Log Message: Added method fetchWithWhere, getSqlReplace, executeSqlReplace. Replace is now implemented with MySQL REPLACE syntax and should be rewritten with DELETE + INSERT Index: db_form.php =================================================================== RCS file: /cvsroot/obliquid/obliquid/common/classes/general/db_form.php,v retrieving revision 1.125 retrieving revision 1.126 diff -b -u -d -r1.125 -r1.126 --- db_form.php 24 Oct 2006 11:47:43 -0000 1.125 +++ db_form.php 3 Mar 2007 11:09:26 -0000 1.126 @@ -199,16 +199,14 @@ } /** Fetches a record from db and fills internal status with it - * @param $id primary key of the record to fetch, supposed on a single field + * @param $where the where part of a sql instruction to fetch the + * record. Example $where="mtime<>'0000-00-00'"; * @return true in case of success, false otherwise */ - function fetch($id, $debug=false) + function fetchWithWhere($where, $debug=false) { - $prikey=$this->getPrimaryKeys(); - $this->_field[$prikey[0]]["DB_VALUE"]=$id; $sql="SELECT ".$this->_getFieldList()." FROM ".$this->_tprefix2 - .$this->_table_name." WHERE `".$prikey[0]."`=" - .$this->getValueForSql($prikey[0]); + .$this->_table_name." WHERE ".$where." LIMIT 1"; $types=array(); foreach ($this->_field as $key => $value) { if ($this->_field[$key]["IS_DB"]) { @@ -216,7 +214,10 @@ } } $ok=$this->_mb->QueryRow($sql, $row, $types); - if (!$ok) echo "ERROR: ".$this->_mb->Error()." "; + if (!$ok) { + $err = $this->_mb->Error(); + if ($err!="result set is empty") echo "ERROR: ".$err." "; + } if ($debug) echo $sql." "; $i=0; foreach ($this->_field as $fname => $value) { @@ -228,6 +229,18 @@ return $ok; } + /** Fetches a record from db and fills internal status with it + * @param $id primary key of the record to fetch, supposed on a single field + * @return true in case of success, false otherwise + */ + function fetch($id, $debug=false) + { + $prikey=$this->getPrimaryKeys(); + $this->_field[$prikey[0]]["DB_VALUE"]=$id; + $where = "`".$prikey[0]."`=".$this->getValueForSql($prikey[0]); + return $this->fetchWithWhere($where, $debug); + } + /** Fetches an array with all the keys from the current table * NOTE: uses only the first primary key field * @access private @@ -474,14 +487,14 @@ * @return String * @access private */ - function _getWhere() + function _getWhere($sep=" AND ") { $res = ""; $first = true; foreach ($this->_field as $field_name => $value) { if ($this->_field[$field_name]["IS_PRIMARY"]) { if (!$first) { - $res.=" AND "; + $res.=$sep; } else { $first=false; } @@ -699,8 +712,19 @@ return $res; } + /** returns a SQL statement to replace data according to the primary key value + * @return text + */ + function getSqlReplace() + { + $sql="REPLACE INTO ".$this->_tprefix2.$this->_table_name." SET " + .$this->_getWhere(", ").", ".$this->_getUpdateCore(); + return $sql; + } + /** executes a replace statement -- insert or update */ - function executeSqlReplace($debug=false, $logentry="", $module="", $sameop=true, $operation="") { + function executeSqlReplace($debug=false, $logentry="", $module="", $sameop=true, $operation="") + { $prikeys=$this->getPrimaryKeys(); $prikey_val=$this->getValue($prikeys[0]); $sql="SELECT COUNT(*) FROM ".$this->_tprefix2 |
|
From: <sl...@sc...> - 2007-02-21 09:24:10
|
Update of /cvsroot/obliquid/obliquid/common/theme In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19879 Modified Files: header.tpl Log Message: fixed broken html Index: header.tpl =================================================================== RCS file: /cvsroot/obliquid/obliquid/common/theme/header.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -b -u -d -r1.3 -r1.4 --- header.tpl 11 Mar 2006 18:21:15 -0000 1.3 +++ header.tpl 21 Feb 2007 09:24:04 -0000 1.4 @@ -2,7 +2,8 @@ <html> <head> <title>{{$page_title}}</title> - <meta http-equiv="Content-Type" content="text/html; name="description" content="{{$meta_description}}"/> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <meta name="description" content="{{$meta_description}}"/> <meta name="keywords" content="{{$meta_keywords}}"/> {{$metadata}} <link rel="SHORTCUT ICON" href="favicon.ico" type="image/x-icon"/> |
|
From: <sl...@sc...> - 2007-02-21 08:44:34
|
Update of /cvsroot/obliquid/obliquid/common/classes/obliquid In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3369/classes/obliquid Modified Files: msg.php Log Message: Just added \n for the next addErr() message Index: msg.php =================================================================== RCS file: /cvsroot/obliquid/obliquid/common/classes/obliquid/msg.php,v retrieving revision 1.45 retrieving revision 1.46 diff -b -u -d -r1.45 -r1.46 --- msg.php 18 Jul 2005 12:19:40 -0000 1.45 +++ msg.php 21 Feb 2007 08:44:29 -0000 1.46 @@ -511,12 +511,12 @@ $to=$email[$i][1]; if (strlen($to)==0) { //If no email address.. mark it as sent, but ignore it... - $this->markSent( $email[$i][0],$sent_field ); + $this->markSent( $email[$i][0], $sent_field ); continue; } if ( !util::valid_email($to) ) { $this->markSent( $email[$i][0],$sent_field ); - $_obweb->addErr('Invalid email:'.$to); + $_obweb->addErr('Invalid email:'.$to."\n"); continue; } $joined_msg++; |
|
From: <sl...@sc...> - 2006-10-24 11:47:50
|
Update of /cvsroot/obliquid/obliquid/common/classes/general In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27487/classes/general Modified Files: db_form.php Log Message: fixed problem with empty decimal values Index: db_form.php =================================================================== RCS file: /cvsroot/obliquid/obliquid/common/classes/general/db_form.php,v retrieving revision 1.124 retrieving revision 1.125 diff -b -u -d -r1.124 -r1.125 --- db_form.php 22 Oct 2006 16:16:11 -0000 1.124 +++ db_form.php 24 Oct 2006 11:47:43 -0000 1.125 @@ -763,7 +763,8 @@ } return "'".$contents."'"; case "decimal": - return $this->_mb->GetDecimalFieldValue($this->getValue($field)); + $value = (is_numeric($this->getValue($field)) ? $this->getValue($field) : 0); + return $this->_mb->GetDecimalFieldValue($value); default: echo "<b>Warning</b>: db_form::getValueForSql, unknown type '" .$this->_field[$field]["TYPE"]."' for field '".$field."' in table '" |