Changeset 4362


Ignore:
Timestamp:
05/12/11 11:52:50 (13 years ago)
Author:
afernandes
Message:

Ticket #1416 - Disponibilizado módulo de recursos para a comunidade

Location:
contrib
Files:
7 added
23 edited

Legend:

Unmodified
Added
Removed
  • contrib/Dms/inc/class.uimydms.inc.php

    r3526 r4362  
    1313         
    1414        /* $Id: class.uimydms.inc.php 22794 2006-11-06 05:53:11Z lkneschke $ */ 
    15  
     15define('PHPGW_SERVER_ROOT','/var/www/expresso'); 
    1616        require_once(PHPGW_SERVER_ROOT.'/mydms/inc/inc.Settings.php'); 
    1717        require_once(PHPGW_SERVER_ROOT.'/mydms/inc/inc.DBAccess.php'); 
     
    759759                        $this->t->set_var('lang_comment',lang('comment')); 
    760760                        $this->t->set_var('lang_keywords',lang('keywords')); 
    761                         $this->t->set_var('lang_download',lang('download')); 
     761                        $this->t->set_var('lang_download',lang('Descargar Archivo')); 
    762762                        $this->t->set_var('lang_last_update',lang('last update')); 
    763763                        $this->t->set_var('lang_current_version',lang('current version')); 
     
    776776                        $this->t->set_var('lang_delete',lang('delete')); 
    777777                        $this->t->set_var('lang_view_online',lang('view online')); 
    778                         $this->t->set_var('lang_confirm_delete',lang('Do you really want to delete this document?')); 
     778                        $this->t->set_var('lang_confirm_delete',lang('Relmente quiere borrar el documento?')); 
    779779                        $this->t->set_var('lang_update_document',lang('update document')); 
    780780                        $this->t->set_var('lang_update',lang('update')); 
     
    865865                { 
    866866                        $documentID = ($_documentID === false ? (int)$_GET['documentid'] : $_documentID); 
    867  
     867                         
     868                        //echo "documento".$documentID; 
    868869                        if(!$document   = getDocument($documentID)) 
    869870                        { 
    870871                                print "Access denied!"; exit; 
    871872                        } 
     873                 
     874 
    872875                        $user           = getUser($GLOBALS['phpgw_info']['user']['account_id']); 
    873876                        $accessMode     = $document->getAccessMode($user); 
  • contrib/Dms/inc/inc.ClassDocument.php

    r3526 r4362  
    33function getDocument($id) 
    44{ 
     5         
     6//      echo "aggggi".$id; 
    57        if (!is_numeric($id)) 
    68                die ("invalid documentid"); 
    79         
    810        $queryStr = "SELECT * FROM phpgw_mydms_Documents WHERE id = " . $id; 
     11         
     12        //echo "<br>documentos".$queryStr."<br>"; 
    913        $resArr = $GLOBALS['mydms']->db->getResultArray($queryStr); 
    1014        if (is_bool($resArr) && $resArr == false) 
     
    1519 
    1620        $resArr = $resArr[0]; 
    17         $newDocument = new Document($resArr["id"], $resArr["name"], $resArr["comment"], $resArr["date"], $resArr["expires"], $resArr["owner"], $resArr["folder"], $resArr["inheritAccess"], $resArr["defaultAccess"], $resArr["locked"], $resArr["keywords"], $resArr["sequence"]); 
    18  
     21        $newDocument = new Document($resArr["id"], $resArr["name"], $resArr["comment"], $resArr["date"], $resArr["expires"], $resArr["owner"], $resArr["folder"], $resArr[7], $resArr[8], $resArr[9], $resArr["keywords"], $resArr["sequence"]); 
     22 
     23         
    1924        if($newDocument->getAccessMode(getUser($GLOBALS['phpgw_info']['user']['account_id'])) > M_NONE) 
    2025                return $newDocument; 
     
    419424                                return M_NONE; 
    420425                } 
    421                  
     426                return $this->getAccessList2(); 
    422427                //Berechtigung erben?? 
    423428                // wird ï¿œber GetAccessList() bereits realisiert. 
     
    431436                } 
    432437                */ 
    433                 $highestPrivileged = M_NONE; 
     438        /*      $highestPrivileged = M_NONE; 
    434439                 
    435440                //ACLs durchforsten 
     
    465470                 
    466471                //Standard-Berechtigung verwenden 
    467                 return $this->getDefaultAccess(); 
    468         } 
    469  
     472                return $this->getDefaultAccess();*/ 
     473        } 
     474function getAccessList2() 
     475        { 
     476                 
     477                $grupos=read_repository2($GLOBALS['phpgw_info']['user']['account_id']); 
     478        //      echo "".$GLOBALS['phpgw_info']['user']['account_id']; 
     479 
     480        if($grupos!=''){ 
     481                        $queryStr = "SELECT * FROM phpgw_mydms_acls WHERE targettype = ".T_FOLDER." AND target in ( select folder from phpgw_mydms_Documents WHERE id=" . $this->_id . ") and (userid=".$GLOBALS['phpgw_info']['user']['account_id']." or groupid in (".$grupos."))  ORDER BY targettype"; 
     482        }else{ 
     483                                        $queryStr = "SELECT * FROM phpgw_mydms_acls WHERE targettype = ".T_FOLDER." AND target in  ( select folder from phpgw_mydms_Documents WHERE id=" . $this->_id . ") and (userid=".$GLOBALS['phpgw_info']['user']['account_id']." )  ORDER BY targettype"; 
     484                 
     485        } 
     486//echo "aqui".$queryStr ; 
     487                        $resArr = $GLOBALS['mydms']->db->getResultArray($queryStr); 
     488 
     489 
     490                        if (is_bool($resArr) && !$resArr) 
     491                                return false; 
     492                         
     493                        //$this->_accessList = array("groups" => array(), "users" => array()); 
     494                        foreach ($resArr as $row) 
     495                        { 
     496                                 
     497                                                                //echo "el grupo de acceso es".$row[4]."   ".$row["groupid"]."<br>"; 
     498                                return $row["mode"]; 
     499                                /*if ($row["userid"] != -1) 
     500                                        array_push($this->_accessList["users"], new UserAccess($row["userid"], $row["mode"])); 
     501                                else //if ($row["groupID"] != -1) 
     502                                        array_push($this->_accessList["groups"], new GroupAccess($row["groupid"], $row["mode"]));*/ 
     503                        } 
     504                 
     505 
     506                return $this->_accessList; 
     507        } 
    470508        function getNotifyList() 
    471509        { 
     
    683721                ); 
    684722                         
    685                 if(!$this->db->select('phpgw_mydms_DocumentContent', $cols, $where, __LINE__, __FILE__)) { 
     723                if(!$this->db->select('phpgw_mydms_DocumentContent', $cols, $where, __LINE__, __FILE__, false, 'ORDER BY version,id desc')) { 
    686724                        return false; 
    687725                } 
  • contrib/Dms/inc/inc.ClassFolder.php

    r3526 r4362  
    44        if (!is_numeric($id)) 
    55                die ("invalid folderid"); 
    6  
    7         $queryStr = "SELECT * FROM phpgw_mydms_Folders WHERE id = " . $id; 
     6        $queryStr = "SELECT id,name,parent,comment,owner,inheritaccess,defaultaccess,sequence FROM phpgw_mydms_folders WHERE id = " . $id; 
     7         
     8        //echo "<br>folderrrrr".$queryStr."<br>"; 
    89        $resArr = $GLOBALS['mydms']->db->getResultArray($queryStr); 
    910                 
     
    1516        $resArr = $resArr[0]; 
    1617        if($id == 1) { 
    17                 $resArr["defaultAccess"] = M_READ; 
    18         } 
    19         $newFolder =  new Folder($resArr["id"], $resArr["name"], $resArr["parent"], $resArr["comment"], $resArr["owner"], $resArr["inheritAccess"], $resArr["defaultAccess"], $resArr["sequence"]); 
     18                $resArr[6] = M_READ; 
     19        } 
     20        //      echo $resArr["id"]."  ".$resArr[6]." ".$resArr["parent"]."   ".$id."  ".$GLOBALS['phpgw_info']['user']['account_id']." dddd ".$resArr[5]."  dddd ".$resArr["defaultAccess"]; 
    2021         
     22        $newFolder =  new Folder($resArr["id"], $resArr["name"], $resArr["parent"], $resArr["comment"], $resArr["owner"], $resArr["inheritaccess"], $resArr["defaultaccess"], $resArr["sequence"]); 
     23        //echo "llll".$GLOBALS['phpgw_info']['user']['account_id']."   ".$resArr["inheritaccess"]; 
    2124        #print $resArr["name"]."<br>"; 
    2225        #print $newFolder->getAccessMode(getUser($GLOBALS['phpgw_info']['user']['account_id']))."<br>"; 
    23         if($newFolder->getAccessMode(getUser($GLOBALS['phpgw_info']['user']['account_id'])) > 1) 
    24                 return $newFolder; 
    25         else 
     26        if($newFolder->getAccessMode(getUser($GLOBALS['phpgw_info']['user']['account_id'])) > 1){ 
     27        //echo "retornoooo";     
     28                return $newFolder; 
     29        } 
     30        else{ 
    2631                return false; 
     32        } 
    2733} 
    2834 
     
    4551        function Folder($id, $name, $parentID, $comment, $ownerID, $inheritAccess, $defaultAccess, $sequence) 
    4652        { 
     53                //echo "aaaaaccccseexxx".$inheritAccess; 
     54                        if($inheritAccess=='f'){ 
     55                                unset($inheritAccess); 
     56                        }        
    4757                $this->_id = $id; 
    4858                $this->_name = $name; 
     
    5363                $this->_defaultAccess = $defaultAccess; 
    5464                $this->_sequence = $sequence; 
    55                  
    5665                $this->db = clone($GLOBALS['phpgw']->db); 
    5766                $this->db->set_app('mydms'); 
     67        //      echo"accc".$defaultAccess."lll{ñ{{ñ".$inheritAccess; 
    5868        } 
    5969 
     
    6777                $where  = array('id' => $this->_id); 
    6878                 
    69                 if(!$this->db->update('phpgw_mydms_Folders', $data, $where, __LINE__, __FILE__)) 
     79                if(!$this->db->update('phpgw_mydms_folders', $data, $where, __LINE__, __FILE__)) 
    7080                        return false; 
    7181                 
     
    8292                $where  = array('id' => $this->_id); 
    8393                 
    84                 if(!$this->db->update('phpgw_mydms_Folders', $data, $where, __LINE__, __FILE__)) 
     94                if(!$this->db->update('phpgw_mydms_folders', $data, $where, __LINE__, __FILE__)) 
    8595                        return false; 
    8696                 
     
    105115                $where  = array('id' => $this->_id); 
    106116                 
    107                 if(!$this->db->update('phpgw_mydms_Folders', $data, $where, __LINE__, __FILE__)) 
     117                if(!$this->db->update('phpgw_mydms_folders', $data, $where, __LINE__, __FILE__)) 
    108118                        return false; 
    109119                 
     
    126136                $where  = array('id' => $this->_id); 
    127137                 
    128                 if(!$this->db->update('phpgw_mydms_Folders', $data, $where, __LINE__, __FILE__)) 
     138                if(!$this->db->update('phpgw_mydms_folders', $data, $where, __LINE__, __FILE__)) 
    129139                        return false; 
    130140                 
     
    151161                $where  = array('id' => $this->_id); 
    152162                 
    153                 if(!$this->db->update('phpgw_mydms_Folders', $data, $where, __LINE__, __FILE__)) 
     163                if(!$this->db->update('phpgw_mydms_folders', $data, $where, __LINE__, __FILE__)) 
    154164                        return false; 
    155165                 
     
    167177                $where  = array('id' => $this->_id); 
    168178                 
    169                 if(!$this->db->update('phpgw_mydms_Folders', $data, $where, __LINE__, __FILE__)) 
     179                if(!$this->db->update('phpgw_mydms_folders', $data, $where, __LINE__, __FILE__)) 
    170180                        return false; 
    171181                 
     
    181191                $where  = array('id' => $this->_id); 
    182192                 
    183                 if(!$this->db->update('phpgw_mydms_Folders', $data, $where, __LINE__, __FILE__)) 
     193                if(!$this->db->update('phpgw_mydms_folders', $data, $where, __LINE__, __FILE__)) 
    184194                        return false; 
    185195 
     
    192202                if (!isset($this->_subFolders)) 
    193203                { 
    194                         $queryStr = "SELECT * FROM phpgw_mydms_Folders WHERE parent = " . $this->_id . " ORDER BY sequence"; 
     204                        $queryStr = "SELECT * FROM phpgw_mydms_folders WHERE parent = " . $this->_id . " ORDER BY sequence"; 
    195205 
    196206 
     
    226236                        'sequence'      => $sequence, 
    227237                ); 
    228                 $res = $this->db->insert('phpgw_mydms_Folders', $insertData, '', __LINE__, __FILE__, 'mydms'); 
     238                $res = $this->db->insert('phpgw_mydms_folders', $insertData, '', __LINE__, __FILE__, 'mydms'); 
    229239 
    230240                if (!$res) 
     
    233243                unset($this->_subFolders); 
    234244                 
    235                 return getFolder($this->db->get_last_insert_id('phpgw_mydms_Folders','id')); 
     245                return getFolder($this->db->get_last_insert_id('phpgw_mydms_folders','id')); 
    236246        } 
    237247 
     
    307317        function getDocuments() 
    308318        { 
     319                 
     320        //      echo "aaaaaaaquoooooo"; 
    309321                if (!isset($this->_documents)) 
    310322                { 
    311                         $queryStr = "SELECT * FROM phpgw_mydms_Documents WHERE folder = " . $this->_id . " ORDER BY sequence"; 
     323                        $queryStr = "SELECT * FROM phpgw_mydms_documents WHERE folder = " . $this->_id . " ORDER BY id desc,sequence"; 
     324                //      echo "eeeeee".$queryStr; 
    312325                        $resArr = $GLOBALS['mydms']->db->getResultArray($queryStr); 
    313326                        if (is_bool($resArr) && !$resArr) 
     
    341354                        'sequence'      => $sequence, 
    342355                ); 
    343                 $res = $this->db->insert('phpgw_mydms_Documents', $insertData, '', __LINE__, __FILE__, 'mydms'); 
     356                $res = $this->db->insert('phpgw_mydms_documents', $insertData, '', __LINE__, __FILE__, 'mydms'); 
    344357 
    345358                if (!$res) 
     
    355368                #       return false; 
    356369                 
    357                 $document = getDocument($this->db->get_last_insert_id('phpgw_mydms_Documents','id')); 
     370                $document = getDocument($this->db->get_last_insert_id('phpgw_mydms_documents','id')); 
    358371                 
    359372                $res = $document->addContent($comment, $owner, $tmpFile, $orgFileName, $fileType, $mimeType); 
    360373                if (is_bool($res) && !$res) 
    361374                { 
    362                         $queryStr = "DELETE FROM phpgw_mydms_Documents WHERE id = " . $document->getID(); 
     375                        $queryStr = "DELETE FROM phpgw_mydms_documents WHERE id = " . $document->getID(); 
    363376                        $GLOBALS['mydms']->db->getResult($queryStr); 
    364377                        return false; 
     
    389402                 
    390403                //Entfernen der Datenbankeintrï¿œge 
    391                 $queryStr = "DELETE FROM phpgw_mydms_Folders WHERE id =  " . $this->_id; 
    392                 if (!$GLOBALS['mydms']->db->getResult($queryStr)) 
    393                         return false; 
    394                 $queryStr = "DELETE FROM phpgw_mydms_ACLs WHERE target = ". $this->_id. " AND targetType = " . T_FOLDER; 
    395                 if (!$GLOBALS['mydms']->db->getResult($queryStr)) 
    396                         return false; 
    397                 $queryStr = "DELETE FROM phpgw_mydms_Notify WHERE target = ". $this->_id. " AND targetType = " . T_FOLDER; 
     404                $queryStr = "DELETE FROM phpgw_mydms_folders WHERE id =  " . $this->_id; 
     405                if (!$GLOBALS['mydms']->db->getResult($queryStr)) 
     406                        return false; 
     407                $queryStr = "DELETE FROM phpgw_mydms_acls WHERE target = ". $this->_id. " AND targettype = " . T_FOLDER; 
     408                if (!$GLOBALS['mydms']->db->getResult($queryStr)) 
     409                        return false; 
     410                $queryStr = "DELETE FROM phpgw_mydms_notify WHERE target = ". $this->_id. " AND targettype = " . T_FOLDER; 
    398411                if (!$GLOBALS['mydms']->db->getResult($queryStr)) 
    399412                        return false; 
     
    415428                if (!isset($this->_accessList)) 
    416429                { 
    417                         $queryStr = "SELECT * FROM phpgw_mydms_ACLs WHERE targetType = ".T_FOLDER." AND target = " . $this->_id . " ORDER BY targetType"; 
    418  
     430                        $queryStr = "SELECT * FROM phpgw_mydms_acls WHERE targettype = ".T_FOLDER." AND target = " . $this->_id . " ORDER BY targettype"; 
     431//echo "aqui".$queryStr ; 
    419432                        $resArr = $GLOBALS['mydms']->db->getResultArray($queryStr); 
    420433 
     
    426439                        foreach ($resArr as $row) 
    427440                        { 
     441                                                                //echo "el grupo de acceso es".$row[4]."   ".$row["groupid"]."<br>"; 
     442                                 
    428443                                if ($row["userid"] != -1) 
    429444                                        array_push($this->_accessList["users"], new UserAccess($row["userid"], $row["mode"])); 
     
    435450                return $this->_accessList; 
    436451        } 
     452         
     453         
     454         
     455function getAccessList2() 
     456        { 
     457                 
     458                $grupos=read_repository2($GLOBALS['phpgw_info']['user']['account_id']); 
     459        //      echo "".$GLOBALS['phpgw_info']['user']['account_id']; 
     460 
     461        if($grupos!=''){ 
     462                        $queryStr = "SELECT * FROM phpgw_mydms_acls WHERE targettype = ".T_FOLDER." AND target = " . $this->_id . " and (userid=".$GLOBALS['phpgw_info']['user']['account_id']." or groupid in (".$grupos."))  ORDER BY targettype"; 
     463        }else{ 
     464                                        $queryStr = "SELECT * FROM phpgw_mydms_acls WHERE targettype = ".T_FOLDER." AND target = " . $this->_id . " and (userid=".$GLOBALS['phpgw_info']['user']['account_id']." )  ORDER BY targettype"; 
     465                 
     466        } 
     467//echo "<br>aqui".$queryStr ; 
     468                        $resArr = $GLOBALS['mydms']->db->getResultArray($queryStr); 
     469 
     470 
     471                        if (is_bool($resArr) && !$resArr) 
     472                                return false; 
     473                         
     474                        //$this->_accessList = array("groups" => array(), "users" => array()); 
     475                        foreach ($resArr as $row) 
     476                        { 
     477                                //echo "acceso".$row["mode"]; 
     478                                                                //echo "el grupo de acceso es".$row[4]."   ".$row["groupid"]."<br>"; 
     479                                return $row["mode"]; 
     480                                /*if ($row["userid"] != -1) 
     481                                        array_push($this->_accessList["users"], new UserAccess($row["userid"], $row["mode"])); 
     482                                else //if ($row["groupID"] != -1) 
     483                                        array_push($this->_accessList["groups"], new GroupAccess($row["groupid"], $row["mode"]));*/ 
     484                        } 
     485                 
     486                return false; 
     487        } 
    437488 
    438489        function clearAccessList() 
    439490        { 
    440                 $queryStr = "DELETE FROM phpgw_mydms_ACLs WHERE targetType = " . T_FOLDER . " AND target = " . $this->_id; 
     491                $queryStr = "DELETE FROM phpgw_mydms_acls WHERE targettype = " . T_FOLDER . " AND target = " . $this->_id; 
    441492                if (!$GLOBALS['mydms']->db->getResult($queryStr)) 
    442493                        return false; 
     
    450501                $userOrGroup = ($isUser) ? "userid" : "groupid"; 
    451502                 
    452                 $queryStr = "INSERT INTO phpgw_mydms_ACLs (target, targetType, ".$userOrGroup.", mode) VALUES  
     503                $queryStr = "INSERT INTO phpgw_mydms_acls (target, targettype, ".$userOrGroup.", mode) VALUES  
    453504                                        (".$this->_id.", ".T_FOLDER.", " . $userOrGroupID . ", " .$mode. ")"; 
    454505                if (!$GLOBALS['mydms']->db->getResult($queryStr)) 
     
    463514                $userOrGroup = ($isUser) ? "userID" : "groupID"; 
    464515                 
    465                 $queryStr = "UPDATE phpgw_mydms_ACLs SET mode = " . $newMode . " WHERE targetType = ".T_FOLDER." AND target = " . $this->_id . " AND " . $userOrGroup . " = " . $userOrGroupID; 
     516                $queryStr = "UPDATE phpgw_mydms_acls SET mode = " . $newMode . " WHERE targettype = ".T_FOLDER." AND target = " . $this->_id . " AND " . $userOrGroup . " = " . $userOrGroupID; 
    466517                if (!$GLOBALS['mydms']->db->getResult($queryStr)) 
    467518                        return false; 
     
    475526                $userOrGroup = ($isUser) ? "userID" : "groupID"; 
    476527                 
    477                 $queryStr = "DELETE FROM phpgw_mydms_ACLs WHERE targetType = ".T_FOLDER." AND target = ".$this->_id." AND ".$userOrGroup." = " . $userOrGroupID; 
     528                $queryStr = "DELETE FROM phpgw_mydms_acls WHERE targettype = ".T_FOLDER." AND target = ".$this->_id." AND ".$userOrGroup." = " . $userOrGroupID; 
    478529                if (!$GLOBALS['mydms']->db->getResult($queryStr)) 
    479530                        return false; 
     
    492543        function getAccessMode($user) 
    493544        { 
     545                 
    494546                GLOBAL $settings; 
    495547 
     
    532584                //ACLs durchforsten 
    533585                $foundInACL = false; 
    534                 $accessList = $this->getAccessList(); 
     586                 
     587                return $this->getAccessList2(); 
     588                /*$accessList = $this->getAccessList(); 
    535589                if (!$accessList) { 
    536590                        return false; 
     
    552606                foreach ($accessList["groups"] as $groupAccess) 
    553607                { 
     608                         
    554609                        if ($user->isMemberOfGroup($groupAccess->getGroup())) 
    555610                        { 
     611                                 
     612                                                //      echo "entro grupoooo<br>";//.$groupAccess->getGroup()."  <br>"; 
     613                                 
    556614                                $foundInACL = true; 
    557615                                if ($groupAccess->getMode() > $highestPrivileged) 
     
    562620                } 
    563621                if ($foundInACL) 
    564                         return $highestPrivileged; 
     622                        return $highestPrivileged;*/ 
    565623                 
    566624                //Standard-Berechtigung verwenden 
    567                 return $this->getDefaultAccess(); 
     625                //return $this->getDefaultAccess(); 
    568626        } 
    569627 
     
    572630                if (!isset($this->_notifyList)) 
    573631                { 
    574                         $queryStr ="SELECT * FROM phpgw_mydms_Notify WHERE targetType = " . T_FOLDER . " AND target = " . $this->_id; 
     632                        $queryStr ="SELECT * FROM phpgw_mydms_notify WHERE targettype = " . T_FOLDER . " AND target = " . $this->_id; 
    575633                        $resArr = $GLOBALS['mydms']->db->getResultArray($queryStr); 
    576634                        if (is_bool($resArr) && $resArr == false) 
     
    593651                $userOrGroup = ($isUser) ? "userID" : "groupID"; 
    594652                 
    595                 $queryStr = "INSERT INTO phpgw_mydms_Notify (target, targetType, " . $userOrGroup . ") VALUES (" . $this->_id . ", " . T_FOLDER . ", " . $userOrGroupID . ")"; 
     653                $queryStr = "INSERT INTO phpgw_mydms_notify (target, targettype, " . $userOrGroup . ") VALUES (" . $this->_id . ", " . T_FOLDER . ", " . $userOrGroupID . ")"; 
    596654                if (!$GLOBALS['mydms']->db->getResult($queryStr)) 
    597655                        return false; 
     
    605663                $userOrGroup = ($isUser) ? "userID" : "groupID"; 
    606664                 
    607                 $queryStr = "DELETE FROM phpgw_mydms_Notify WHERE target = " . $this->_id . " AND targetType = " . T_FOLDER . " AND " . $userOrGroup . " = " . $userOrGroupID; 
     665                $queryStr = "DELETE FROM phpgw_mydms_notify WHERE target = " . $this->_id . " AND targettype = " . T_FOLDER . " AND " . $userOrGroup . " = " . $userOrGroupID; 
    608666                if (!$GLOBALS['mydms']->db->getResult($queryStr)) 
    609667                        return false; 
  • contrib/Dms/inc/inc.ClassGroup.php

    r3526 r4362  
    1010         
    1111        $name = $GLOBALS['phpgw']->accounts->id2name($id); 
    12          
     12//      echo" el grupo es".$name."   ".$id."<br>"; 
    1313        return new Group($id, $name, ''); 
    1414} 
     
    144144        { 
    145145                //Wenn die User bereits abgefragt wurden, geht's so schneller: 
     146                 
     147                //echo "usuariooooo".$user->getID()."<br>"; 
     148                 
    146149                if (isset($this->_users)) 
    147150                { 
     
    154157                 
    155158                $members = $GLOBALS['phpgw']->accounts->member((int)$this->_id); 
     159         
    156160                $phpgw_group_member = array(); 
    157161 
    158162                if (is_array($members)) 
    159163                { 
    160                         foreach($members as $member) 
     164                     /*   foreach($members as $member) 
    161165                        { 
    162166                                if(!in_array($member['account_id'],$phpgw_group_member)) 
    163167                                { 
    164168                                        $phpgw_group_member[] = $member['account_id']; 
    165                                 } 
    166                         } 
     169                                        //echo "grupomiembro".$member['account_id']."   ".$this->_id."<br>"; 
     170                                }//else{ 
     171                                        //echo "<br>arrreglo<br>".$member['account_id']."   ".$phpgw_group_member->id."<br>"; 
     172                                //} 
     173                        }*/ 
    167174                } 
    168175                                                 
     
    177184 
    178185        } 
     186         
     187 
     188         
    179189 
    180190        /** 
  • contrib/Dms/inc/inc.ClassUser.php

    r3526 r4362  
    4949} 
    5050 
     51 
     52 
     53 
     54                 
     55        function read_repository2($id) 
     56                { 
     57                         
     58                        $login=$GLOBALS['phpgw']->accounts->id2name($id); 
     59                                $ds = $GLOBALS['phpgw']->common->ldapConnect(); 
     60                                $user_context  = $GLOBALS['phpgw_info']['server']['ldap_context']; 
     61                                $group_context  = $GLOBALS['phpgw_info']['server']['ldap_context']; 
     62                                $justthese = array("gidnumber"); 
     63                                $sri = @ldap_search($ds, $group_context, ("(&(memberUid=" . $login.")(phpgwaccounttype=g))"), $justthese); 
     64                         
     65                                if(!$sri) 
     66                                return null; 
     67                                $allValues = ldap_get_entries($ds, $sri); 
     68 
     69                                 
     70                                while (list($null,$allVals) = @each($allValues)) 
     71                                { 
     72                                        settype($allVals,'array'); 
     73                                         
     74                                        if($data!=""){ 
     75                                                $data=$data.","; 
     76                                        } 
     77                                        $data=$data. $allVals['gidnumber'][0]; 
     78                                 
     79                                         
     80                                         
     81                                } 
     82                                 
     83                                //echo "<br>".$data; 
     84                                return $data; 
     85                } 
     86                 
     87 
     88function get_account_name($account_id,$valor) 
     89                { 
     90                //      $acct_type = $this->get_type($account_id); 
     91$acct_type ='u'; 
     92                        /* jakjr: using justthese with ldap_search */ 
     93                        //$justthese = array("cn","uid","givenname","sn","gecos"); 
     94 
     95                        /* search the dn for the given uid */ 
     96$ds = $GLOBALS['phpgw']->common->ldapConnect(); 
     97$user_context  = $GLOBALS['phpgw_info']['server']['ldap_context']; 
     98                         
     99$justthese = array("uidnumber",  "cn",  "mail","gecos","dn"); 
     100                        //      $sri = @ldap_search($this->ds, "ou=usuarios,ou=cnti,dc=gob,dc=ve", ("(&(sn=*)(mail=*@*)(structuralObjectClass=inetOrgPerson)(deliveryMode=virtual))"), $justthese); 
     101 
     102                        //if(($acct_type == 'g') && $this->group_context) 
     103                //      { 
     104                //              $sri = @ldap_search($this->ds, $this->group_context, '(gidnumber=' . (int)$account_id . ')', $justthese); 
     105                //      } 
     106                //      else 
     107                //      { 
     108                                $sri = @ldap_search($ds, $user_context, '(uidnumber=' . (int)$account_id . ')', $justthese); 
     109                        //} 
     110 
     111//echo $this->ds.",". $this->user_context.",". '(uidnumber=' . (int)$account_id . ')'.",". $justthese; 
     112                        if(!$sri) 
     113                                return False; 
     114                        $allValues = ldap_get_entries($ds, $sri); 
     115$retorna=""; 
     116                        if($acct_type =='g') 
     117                        { 
     118                                if($valor=='gecos') { 
     119                                        $retorna=$GLOBALS['phpgw']->translation->convert($allValues[0]['gecos'][0],'utf-8'); 
     120                                } 
     121                                if($valor=='uidnumber') { 
     122                                        $retorna=$GLOBALS['phpgw']->translation->convert($allValues[0]['uidnumber'][0],'utf-8'); 
     123                                } 
     124                                if($valor=='cn') { 
     125                                        $retorna=$GLOBALS['phpgw']->translation->convert($allValues[0]['cn'][0],'utf-8'); 
     126                                } 
     127 
     128                                if($valor=='mail') { 
     129                                        $retorna=$GLOBALS['phpgw']->translation->convert($allValues[0]['mail'][0],'utf-8'); 
     130                                } 
     131                                if($valor=='dn') { 
     132                                        $retorna=$GLOBALS['phpgw']->translation->convert($allValues[0]['dn'][0],'utf-8'); 
     133                                } 
     134                                 
     135                        } 
     136                        else 
     137                        { 
     138                                if($valor=='gecos') { 
     139                                        $retorna=$GLOBALS['phpgw']->translation->convert($allValues[0]['gecos'][0],'utf-8'); 
     140                                } 
     141                                if($valor=='uidnumber') { 
     142                                        $retorna=$GLOBALS['phpgw']->translation->convert($allValues[0]['uidnumber'][0],'utf-8'); 
     143                                } 
     144                                if($valor=='cn') { 
     145                                        $retorna=$GLOBALS['phpgw']->translation->convert($allValues[0]['cn'][0],'utf-8'); 
     146                                } 
     147 
     148                                if($valor=='mail') { 
     149                                        $retorna=$GLOBALS['phpgw']->translation->convert($allValues[0]['mail'][0],'utf-8'); 
     150                                } 
     151                                if($valor=='dn') { 
     152                                        $retorna=$GLOBALS['phpgw']->translation->convert($allValues[0]['dn'][0],'utf-8'); 
     153                                } 
     154                                 
     155 
     156 
     157 
     158                        } 
     159                        return $retorna; 
     160                } 
     161 
    51162function getUser($id) 
    52163{ 
     164//echo "llego"; 
    53165        $resArr["id"] = $id; 
    54         $resArr["login"] = phpgw_id2name($id); 
     166        $resArr["login"] =  phpgw_id2name($id);//get_account_name($id,'dn'); 
    55167        $resArr["fullName"] = phpgw_get_accname($id); 
    56168        $resArr["email"] = phpgw_get_accemail($id); 
     
    59171        $resArr["pwd"] = ''; 
    60172        $resArr["comment"] = ''; 
     173//      echo "hhh".$resArr["login"]."  ".$resArr["fullName"]."  ".$resArr["isAdmin"]; 
    61174        return new User($resArr["id"], $resArr["login"], $resArr["pwd"], $resArr["fullName"], $resArr["email"], $resArr["comment"], $resArr["isAdmin"]); 
    62175} 
     
    137250                $this->_isAdmin = $isAdmin; 
    138251        } 
     252         
     253         
     254        function add($id,$login,$fullName,$email,$isAdmin,$pwd,$comment) 
     255    { 
     256        $this->User = new User($id, $login, $pwd, $fullName, $email, $comment, $isAdmin); 
     257    } 
     258         
     259         function sortDataSet($s) 
     260    { 
     261        //Sort by the given parameter 
     262        switch($s) 
     263        { 
     264            case "fullName": 
     265                //Note use of array to reference member method of this object in callback 
     266                uasort($this->User,array($this,"cmpName")); 
     267                break; 
     268            
     269            case "login": 
     270                uasort($this->User,array($this,"cmpX")); 
     271                break; 
     272                
     273            case "id": 
     274                uasort($this->User,array($this,"cmpY")); 
     275                break;                
     276            
     277            case "added": 
     278            default: 
     279                //Re-sort array by original keys 
     280                ksort($this->User);        
     281        } 
     282    } 
     283 
     284    //Callback function for sorting by name 
     285    //$a and $b are dataItem objects 
     286    function cmpName($a,$b) 
     287    { 
     288        //Use sort() for simple alphabetical comparison 
     289        //Convert to lowercase to ensure consistent behaviour 
     290        $sortable = array(strtolower($a->_fullName),strtolower($b->_fullName)); 
     291        $sorted = $sortable; 
     292        sort($sorted);    
     293        
     294        //If the names have switched position, return -1. Otherwise, return 1. 
     295        return ($sorted[0] == $sortable[0]) ? -1 : 1; 
     296    } 
     297    
     298    //Callback function for sorting by x 
     299    //$a and $b are dataItem objects 
     300    function cmpX($a,$b) 
     301    { 
     302        //Use sort() for simple alphabetical comparison 
     303        //Convert to lowercase to ensure consistent behaviour 
     304        $sortable = array(strtolower($a->x),strtolower($b->x)); 
     305        $sorted = $sortable; 
     306        sort($sorted);    
     307        
     308        //If the names have switched position, return -1. Otherwise, return 1. 
     309        return ($sorted[0] == $sortable[0]) ? -1 : 1; 
     310    } 
     311    
     312    //Callback function for sorting by y 
     313    //$a and $b are dataItem objects 
     314    function cmpY($a,$b) 
     315    {        
     316        //If $a's y attribute >= $b's y attribute, return 1. Otherwise, return -1. 
     317        return ($a->y >= $b->y) ? 1 : -1; 
     318    }    
    139319 
    140320        function getID() { return $this->_id; } 
     
    339519        function isMemberOfGroup($group) 
    340520        { 
     521                //echo "es miembro de".$this."<br>"; 
    341522                return $group->isMember($this); 
    342523        } 
  • contrib/Dms/out/out.AddDocument.php

    r3526 r4362  
    1515 
    1616$folderid = (isset($_GET['folderid'])) ? (int) $_GET['folderid'] : 1; 
    17 $folder = getFolder($folderid); 
     17//$folder = getFolder($folderid); 
     18 
     19//if ($folder->getAccessMode($user) < M_READWRITE) 
     20        //die("access denied"); 
     21         
     22if(!$folder = getFolder($folderid)) { 
     23$GLOBALS['phpgw']->redirect_link('out/out.ViewFolder.php?error=accesso denegado!'); 
     24                 
     25} 
    1826 
    1927if ($folder->getAccessMode($user) < M_READWRITE) 
    20         die("access denied"); 
     28$GLOBALS['phpgw']->redirect_link('out/out.ViewFolder.php?error=accesso denegado!'); 
     29 
    2130 
    2231printHTMLHead( getMLText("folder_title", array("foldername" => $folder->getName()) ) ); 
     
    4857printStartBox(getMLText("add_document")); 
    4958?> 
     59 
     60<font color="red"><b>NOTA:</b> El documento hereda el permiso correspondiente de la carpeta que lo contiene </font><br></br> 
     61 
     62 
    5063 
    5164<form action="../op/op.AddDocument.php" enctype="multipart/form-data" method="post" name="form1" onsubmit="return checkForm();"> 
  • contrib/Dms/out/out.AddSubFolder.php

    r3526 r4362  
    1818 
    1919$folderid = (isset($_GET['folderid'])) ? (int) $_GET['folderid'] : 1; 
    20 $folder = getFolder($folderid); 
    2120 
     21//echo "<br>folderid".$folderid; 
     22//$folder = getFolder($folderid); 
     23if(!$folder = getFolder($folderid)) { 
     24$GLOBALS['phpgw']->redirect_link('out/out.ViewFolder.php?error=accesso denegado!'); 
     25                 
     26} 
    2227 
    2328if ($folder->getAccessMode($user) < M_READWRITE) 
    24         die("accesso denegado"); 
     29$GLOBALS['phpgw']->redirect_link('out/out.ViewFolder.php?error=accesso denegado!'); 
    2530 
    2631 
  • contrib/Dms/out/out.EditFolder.php

    r3526 r4362  
    1515 
    1616$folderid = (isset($_GET['folderid'])) ? (int) $_GET['folderid'] : 1; 
    17 $folder = getFolder($folderid); 
     17//$folder = getFolder($folderid); 
     18 
     19 
     20if(!$folder = getFolder($folderid)) { 
     21$GLOBALS['phpgw']->redirect_link('out/out.ViewFolder.php?error=accesso denegado!'); 
     22                 
     23} 
     24 
     25if ($folder->getAccessMode($user) < M_READWRITE) 
     26$GLOBALS['phpgw']->redirect_link('out/out.ViewFolder.php?error=accesso denegado!'); 
    1827 
    1928$parent = ($folder->getID() == $settings->_rootFolderID) ? false : $folder->getParent(); 
    2029 
    21 if ($folder->getAccessMode($user) < M_READWRITE) 
    22         die ("Access denied"); 
     30//if ($folder->getAccessMode($user) < M_READWRITE) 
     31        //die ("Access denied"); 
    2332 
    2433 
  • contrib/Dms/out/out.FolderAccess.php

    r3526 r4362  
    1313 
    1414include("../inc/inc.Authentication.php"); 
     15// 
    1516 
    1617 
     
    2627 
    2728$folderid       = (isset($_GET['folderid'])) ? (int) $_GET['folderid'] : NULL; 
    28 $folder         = getFolder($folderid); 
    29  
    30 $allUsers = getAllUsers(); 
    31  
    32 if ($folder->getAccessMode($user) < M_ALL) 
    33         die ("Access denied"); 
     29//$folder               = getFolder($folderid); 
     30 
     31if(!$folder = getFolder($folderid)) { 
     32$GLOBALS['phpgw']->redirect_link('out/out.ViewFolder.php?error=accesso denegado!'); 
     33                 
     34} 
     35 
     36if ($folder->getAccessMode($user) < M_READWRITE) 
     37$GLOBALS['phpgw']->redirect_link('out/out.ViewFolder.php?error=accesso denegado!'); 
     38 
     39 
     40//$allUsers = getAllUsers(); 
     41//foreach($allUsers as $c=>$v) 
     42   //  echo "<p>El vector con indice $c tiene el valor $v </p>"; 
     43     //while (list($clave, $valor) = each($allUsers)) { 
     44      //echo "<p>El vector con indice $clave tiene el valor $valor </p>"; 
     45     //} 
     46//asort($allUsers); 
     47//uasort($allUsers,'ordenar'); 
     48   
     49 
     50 
     51 
     52 
     53$accounts = $GLOBALS['phpgw']->accounts->get_list('accounts');  
     54        $allUsers = array(); 
     55        for ($i = 0; $i < count($accounts); $i++) 
     56        { 
     57                $id = $accounts[$i]["account_id"]; 
     58                $login = $accounts[$i]["account_lid"]; 
     59                $fullName = $accounts[$i]['account_firstname'].' '.$accounts[$i]['account_lastname']; 
     60                $email = $accounts[$i]["account_email"]; 
     61                $isAdmin = phpgw_is_admin($id); 
     62                $pwd = ''; 
     63                $comment = ''; 
     64                //$myCollection->add($id,$login,$fullName,$email,$isAdmin,$pwd,$comment); 
     65                $allUsers[$i]=new User($id, $login, $pwd, $fullName, $email, $comment, $isAdmin); 
     66        } 
     67//$allUsers->sortDataSet("fullName"); 
     68 
     69         
     70         function cmpNames($a,$b) 
     71    { 
     72        //Use sort() for simple alphabetical comparison 
     73        //Convert to lowercase to ensure consistent behaviour 
     74        $sortable = array(strtolower($a->_fullName),strtolower($b->_fullName)); 
     75        $sorted = $sortable; 
     76        sort($sorted);    
     77        
     78        //If the names have switched position, return -1. Otherwise, return 1. 
     79        return ($sorted[0] == $sortable[0]) ? -1 : 1; 
     80    } 
     81uasort($allUsers, "cmpNames"); 
     82 
     83 
     84//                                      $allGroups = getAllGroups(); 
     85$phpgw_groups = $GLOBALS['phpgw']->accounts->get_list('groups'); 
     86 
     87$allGroups= array(); 
     88         
     89         
     90        for ($i = 0; $i < count($phpgw_groups); $i++) 
     91                $allGroups[$i] = new Group($phpgw_groups[$i]["account_id"], $phpgw_groups[$i]["account_lid"], ''); 
     92         
     93 function cmpNamesg($a,$b) 
     94    { 
     95        //Use sort() for simple alphabetical comparison 
     96        //Convert to lowercase to ensure consistent behaviour 
     97        $sortable = array(strtolower($a->_name),strtolower($b->_name)); 
     98        $sorted = $sortable; 
     99        sort($sorted);    
     100        
     101        //If the names have switched position, return -1. Otherwise, return 1. 
     102        return ($sorted[0] == $sortable[0]) ? -1 : 1; 
     103    } 
     104     
     105    uasort($allGroups, "cmpNamesg"); 
     106     
     107 
     108//Sort by name: 
     109//$myCollection->sortDataSet("fullName"); 
     110//print_r($myCollection->dataSet); 
     111 //$allUsers[]->sortDataSet("fullName"); 
     112 
     113//Sort by x 
     114//$myCollection->sortDataSet("login"); 
     115//print_r($myCollection->dataSet); 
     116 
     117//Sort by y 
     118//$myCollection->sortDataSet("id"); 
     119//print_r($myCollection->dataSet); 
     120 
     121//Sort by order added 
     122//$myCollection->sortDataSet("added"); 
     123//print_r($myCollection->dataSet); 
     124         
     125 
     126 
     127//if ($folder->getAccessMode($user) < M_ALL) 
     128        //die ("Access denied"); 
    34129 
    35130 
     
    58153printFolderPageStart($folder); 
    59154printPageHeader(getMLText("edit_folder_access") . ": " . $folder->getName()); 
    60  
    61  
    62 //Nur admin darf Besitzer ändern 
     155$owner = $folder->getOwner(); 
     156if($user->getID()==1120 ||$owner->getID()==$user->getID()){ 
     157 
     158//Nur admin darf Besitzer ï¿œndern 
    63159if ($user->isAdmin()) 
    64160{ 
     
    112208} 
    113209 
     210if($user->getID()==1120 ){ 
    114211printMLText("does_not_inherit_access_msg", array("inheriturl" => "../op/op.FolderAccess.php?folderid=".$folderid."&action=inherit")); 
     212} 
    115213print "</div>"; 
    116214 
     
    118216$accessList = $folder->getAccessList(); 
    119217 
    120 printNextBox(getMLText("default_access")); 
    121 ?> 
    122  
    123 <div class="defaultAccess"> 
    124 <form action="../op/op.FolderAccess.php"> 
    125         <input type="Hidden" name="folderid" value="<?php print $folderid;?>"> 
    126         <input type="Hidden" name="action" value="setdefault"> 
    127          
    128         <?php printAccessModeSelection($folder->getDefaultAccess()); ?> 
    129         <p> 
    130         <input type="Submit"> 
    131 </form> 
    132 </div> 
     218//printNextBox(getMLText("default_access")); 
     219?> 
     220 
     221 
    133222 
    134223<?php 
     
    227316                                <option value="none">------------------------------- 
    228317                                <?php 
    229                                         $allGroups = getAllGroups(); 
    230318                                        foreach ($allGroups as $groupObj) 
    231319                                                print "<option value=\"".$groupObj->getID()."\">" . $groupObj->getName() . "\n"; 
     
    251339 
    252340printEndBox(); 
     341 
     342 
    253343printFolderPageEnd($folder); 
     344 
     345} 
    254346printHTMLFoot(); 
    255347?> 
  • contrib/Dms/out/out.FolderNotify.php

    r3526 r4362  
    1515 
    1616$folderid = (isset($_GET['folderid'])) ? (int) $_GET['folderid'] : 1; 
    17 $folder = getFolder($folderid); 
     17//$folder = getFolder($folderid); 
     18 
     19if(!$folder = getFolder($folderid)) { 
     20$GLOBALS['phpgw']->redirect_link('out/out.ViewFolder.php?error=accesso denegado!'); 
     21                 
     22} 
     23 
     24if ($folder->getAccessMode($user) < M_READWRITE) 
     25$GLOBALS['phpgw']->redirect_link('out/out.ViewFolder.php?error=accesso denegado!'); 
     26 
    1827 
    1928$notifyList = $folder->getNotifyList(); 
    2029 
    21 if ($folder->getAccessMode($user) < M_READWRITE) 
    22         die ("Access denied"); 
     30//if ($folder->getAccessMode($user) < M_READWRITE) 
     31        //die ("Access denied"); 
    2332 
    2433 
  • contrib/Dms/out/out.SetExpires.php

    r3526 r4362  
    3434                        <td valign="top" class="inputDescription"><?php printMLText("expires");?>:</td> 
    3535                        <td class="standardText"> 
    36                                 <input type="Radio" name="expires" value="false"<?phpif (!$document->expires()) print " checked";?>><?php printMLText("does_not_expire");?><br> 
    37                                 <input type="radio" name="expires" value="true"<?phpif ($document->expires()) print " checked";?>><?php if ($document->expires()) printDateChooser($document->getExpires(), "exp"); else printDateChooser(-1, "exp"); ?> 
     36                                <input type="Radio" name="expires" value="false"<?php if (!$document->expires()) print " checked";?>><?php printMLText("does_not_expire");?><br> 
     37                                <input type="radio" name="expires" value="true"<?php if ($document->expires()) print " checked";?>><?php if ($document->expires()) printDateChooser($document->getExpires(), "exp"); else printDateChooser(-1, "exp"); ?> 
    3838                        </td> 
    3939                </tr> 
  • contrib/Dms/out/out.UpdateDocument.php

    r3526 r4362  
    8787                        <td valign="top" class="inputDescription"><?php printMLText("expires");?>:</td> 
    8888                        <td class="standardText"> 
    89                                 <input type="Radio" name="expires" value="false"<?phpif (!$document->expires()) print " checked";?>><?php printMLText("does_not_expire");?><br> 
    90                                 <input type="radio" name="expires" value="true"<?phpif ($document->expires()) print " checked";?>><?php printDateChooser(-1, "exp");?> 
     89                                <input type="Radio" name="expires" value="false"<?php if (!$document->expires()) print " checked";?>><?php printMLText("does_not_expire");?><br> 
     90                                <input type="radio" name="expires" value="true"<?php if ($document->expires()) print " checked";?>><?php printDateChooser(-1, "exp");?> 
    9191                        </td> 
    9292                </tr> 
  • contrib/Dms/out/out.ViewDocument.php

    r3526 r4362  
    1919$document = getDocument($documentid); 
    2020$folder = $document->getFolder(); 
     21//echo $folder. "folder id<br>"; 
     22//echo $document. "doc id<br>"; 
     23//echo $documentid. "documentidid<br>"; 
     24//echo $user. "user<br>"; 
     25 
     26 
     27 
    2128 
    2229if ($document->getAccessMode($user) < M_READ) 
  • contrib/Dms/out/out.ViewFolder.php

    r3526 r4362  
    11<?php 
     2 
     3 
     4 
    25include("../inc/inc.Settings.php"); 
    36include("../inc/inc.AccessUtils.php"); 
     
    1417 
    1518include("../inc/inc.Authentication.php"); 
     19//include("../../phpgwapi/inc/class.accounts_ldap.inc.php"); 
     20 
     21 
     22 
     23//echo"<br>".; 
     24//read_repository2($GLOBALS['phpgw_info']['user']['account_id']); 
     25 
     26 
     27$acceso=0; 
    1628 
    1729$folderid = (isset($_GET['folderid'])) ? (int) $_GET['folderid'] : 1; 
     30 
     31//echo "<br>a".$folderid."  b  ".$_GET['folderid']."<br>"; 
     32 
    1833if(!$folder = getFolder($folderid)) { 
    1934        //die ("Accesso denegado!".$folderid."  ".getFolder($folderid)); 
    20  
     35$acceso=0; 
    2136$GLOBALS['phpgw']->redirect_link('out/out.ViewFolder.php?error=accesso denegado!'); 
    2237 
     38}else{ 
     39        $acceso=1; 
    2340} 
     41 
     42//echo $folder->getAccessMode(); 
    2443 
    2544if ($folder->getAccessMode($user) < M_READ) { 
    2645        //die ("accesso denegado!"."  ".$folder->getAccessMode($user)); 
     46        $acceso=0; 
    2747$GLOBALS['phpgw']->redirect_link('out/out.ViewFolder.php?error=accesso denegado!'); 
     48}else{ 
     49        $acceso=1; 
    2850} 
    2951 
     
    6890        </table> 
    6991 
    70  
     92<?php 
     93//echo "acccceso".$acceso; 
     94          if (isset($_GET['folderid'])||$_GET['folderid']>1){ 
     95?> 
    7196 
    7297 
     
    93118                        <td colspan="2" height="8" class="textSidebox">&nbsp;</td> 
    94119                </tr> 
    95                 <tr class="divSideboxEntry"> 
     120        <!--    <tr class="divSideboxEntry"> 
    96121                        <td width="20" align="center" valign="middle" class="textSidebox"><img class="sideboxstar" src="<?php echo  $GLOBALS['phpgw_info']['server']['webserver_url']?>/phpgwapi/templates/idots/images/orange-ball.png" width="9" height="9" alt="ball"/></td><td class="textSidebox"><a class="textSidebox" href="<?php echo  $GLOBALS['phpgw_info']['server']['webserver_url'];?>/mydms/out/out.FolderNotify.php?folderid=<?php echo $folderid;?>">notificaciones</a></td> 
    97                 </tr> 
     122                </tr> --> 
    98123                <tr class="divSideboxEntry"> 
    99124                        <td width="20" align="center" valign="middle" class="textSidebox"><img class="sideboxstar" src="<?php echo  $GLOBALS['phpgw_info']['server']['webserver_url']?>/phpgwapi/templates/idots/images/orange-ball.png" width="9" height="9" alt="ball"/></td><td class="textSidebox"><a class="textSidebox" href="<?php echo  $GLOBALS['phpgw_info']['server']['webserver_url'];?>/mydms/out/out.FolderAccess.php?folderid=<?php echo $folderid;?>">derechos de acceso</a></td> 
    100125 
    101126                </tr> 
     127                 
     128                <?php }?> 
    102129                </table>         
    103130        <table cellspacing="5" cellpadding="0" border="0"> 
    104131        <?php 
     132          if($acceso>0){ 
    105133                $documents = $folder->getDocuments(); 
    106                 $documents = filterAccess($documents, $user, M_READ); 
     134                //echo "user".$user; 
     135                //$documents = filterAccess($documents, $user, M_READ); 
    107136                if (count($documents) > 0) 
    108137                { 
     
    149178                        print "<tr><td class=\"filelist\">".getMLText("no_documents")."</td></tr>"; 
    150179                } 
     180          } 
    151181        ?> 
    152182        </table> 
  • contrib/Dms/templates/default/viewDocument.tpl

    r3526 r4362  
    1616                <th width="20%" id="tab1" class="activetab" onclick="javascript:tab.display(1);"><a href="#" tabindex="0" accesskey="1" onfocus="tab.display(1);" onclick="tab.display(1); return(false);" style="font-size:10px;">Informaci&oacute;n</a></th> 
    1717                <th width="20%" id="tab2" class="activetab" onclick="javascript:tab.display(2);"><a href="#" tabindex="0" accesskey="2" onfocus="tab.display(2);" onclick="tab.display(2); return(false);" style="font-size:10px;">Todas las versiones</a></th> 
    18                 <th width="20%" id="tab3" class="activetab" onclick="javascript:tab.display(3);"><a href="#" tabindex="0" accesskey="3" onfocus="tab.display(3);" onclick="tab.display(3); return(false);" style="font-size:10px;">Documentos relacionados</a></th> 
    19                 <th width="20%" id="tab4" class="activetab" onclick="javascript:tab.display(4);"><a href="#" tabindex="0" accesskey="4" onfocus="tab.display(4);" onclick="tab.display(4); return(false);" style="font-size:10px;">Notificaciones</a></th> 
    20                 <th width="20%" id="tab5" class="activetab" onclick="javascript:tab.display(5);"><a href="#" tabindex="0" accesskey="5" onfocus="tab.display(5);" onclick="tab.display(5); return(false);" style="font-size:10px;">{lang_acl}</a></th> 
     18                <!--<th width="20%" id="tab3" class="activetab" onclick="javascript:tab.display(3);"><a href="#" tabindex="0" accesskey="3" onfocus="tab.display(3);" onclick="tab.display(3); return(false);" style="font-size:10px;">Documentos relacionados</a></th> 
     19                <th width="20%" id="tab4" class="activetab" onclick="javascript:tab.display(4);"><a href="#" tabindex="0" accesskey="4" onfocus="tab.display(4);" onclick="tab.display(4); return(false);" style="font-size:10px;">Notificaciones</a></th>  
     20                <th width="20%" id="tab5" class="activetab" onclick="javascript:tab.display(5);"><a href="#" tabindex="0" accesskey="5" onfocus="tab.display(5);" onclick="tab.display(5); return(false);" style="font-size:10px;">{lang_acl}</a></th>--> 
    2121        </tr> 
    2222</table> 
     
    187187 
    188188<!-- BEGIN lock_row --> 
    189         <tr class="row_on"> 
     189<!--    <tr class="row_on"> 
    190190                <td class="description" valign="top">Status de Bloqueo:</td> 
    191191                <td class="infos" colspan="3"> 
     
    202202                        </div> 
    203203                </td> 
    204         </tr> 
     204        </tr>--> 
    205205<!-- END lock_row --> 
    206206 
     
    298298                                <input type="hidden" id="targetid" name="targetid" value="unchanged"> 
    299299                        </td> 
    300                         <td align="center" width="150px"><a href="#" onclick="selectFolder({current_folder_id},'info_form'); return(false);" style="font-size:10px;">Mover Documento</a></td> 
     300                        <td align="center" width="150px"></td> 
    301301                </tr> 
    302302                <tr class="row_on"> 
  • contrib/Dms/themes/default/DocumentPageEnd.html

    r3526 r4362  
    2020  </tr> 
    2121  <tr> 
    22     <td width="45" background="<?php echo(printImgPath("line_vert.gif")) ?>"> 
     22    <td width="45" background="<?php echo(printImgPath("line_vert.gif"));  ?>" > 
    2323      &nbsp; 
    2424    </td> 
  • contrib/Resources/inc/class.boresources.inc.php

    r3524 r4362  
    267267                        } 
    268268 
    269                         /*$this->so = CreateObject('resources.soresources', 
     269                        $this->so = CreateObject('calendar.socalendar', 
    270270                                Array( 
    271271                                        'owner'         => $this->owner, 
     
    274274                                        'g_owner'       => $this->g_owner 
    275275                                ) 
    276                         );*/ 
     276                        ); 
    277277                        $this->rpt_day = array( // need to be after creation of soresources 
    278278                                MCAL_M_SUNDAY    => 'Sunday', 
     
    589589 
    590590                        $event = $this->so->read_entry($id); 
    591                                 echo $event; 
     591                                //echo $event; 
    592592                         
    593593                         
    594594                        return False; 
     595                } 
     596                 
     597                 
     598        function read_entry2($id,$ignore_acl=False) 
     599                { 
     600                         
     601                         
     602                                $event = $this->so->read_entry($id); 
     603                                if(!isset($event['participants'][$this->owner]) && $this->user_is_a_member($event,$this->owner)) 
     604                                { 
     605                                        $this->so->add_attribute('participants','U',(int)$this->owner); 
     606                                        $this->so->add_entry($event); 
     607                                        $event = $this->get_cached_event(); 
     608                                } 
     609                                return $this->xmlrpc ? $this->xmlrpc_prepare($event) : $event; 
     610                         
    595611                } 
    596612 
     
    774790 
    775791                         
     792                         
    776793                        $send_to_ui = True; 
    777794                        //if ((!is_array($l_start) || !is_array($l_end)) && !isset($_GET['readsess']))  // xmlrpc call 
     
    799816                                        foreach($params['participants'] as $user => $data) 
    800817                                        { 
     818                                                 
    801819                                                $l_participants[] = $user.$data['status']; 
    802820                                        } 
     
    12041222                                } 
    12051223 
     1224                                 
    12061225                                $overlapping_events = $this->overlap( 
    12071226                                        $this->maketime($event['start']), 
     
    14711490                } 
    14721491 
    1473                 function overlap($starttime,$endtime,$participants,$owner=0,$id=0,$restore_cache=False) 
     1492        function overlap($starttime,$endtime,$participants,$owner=0,$id=0,$restore_cache=False,$location='n/a') 
    14741493                { 
    14751494//                      $retval = Array(); 
     
    14781497/* This needs some attention.. by commenting this chunk of code it will fix bug #444265 */ 
    14791498 
     1499                        //        foreach($id as $c=>$v) 
     1500                  //   echo "<p>El 565vector con indice $c tiene el valor $v </p>"; 
     1501                 
     1502                         
     1503                         
    14801504                        if($restore_cache) 
    14811505                        { 
     
    14881512//                      $temp_end_time = (int)$GLOBALS['phpgw']->common->show_date($endtime,'Hi'); 
    14891513                        $temp_start = (int)(date('Ymd',$starttime)); 
     1514 
    14901515                        $temp_start_time = (int)(date('Hi',$starttime)); 
    14911516                        $temp_end = (int)(date('Ymd',$endtime)); 
    14921517                        $temp_end_time = (int)(date('Hi',$endtime)); 
     1518                //      echo "<br>inicio".$temp_start_time." <br> fin ".$temp_end_time."<br>   ".(int)(date('Hi a',$endtime))."<br>"; 
     1519                //      echo "<br>inicio".$temp_start." <br> fin ".$temp_end."<br>   ".(int)(date('Hi a',$endtime))."<br>"; 
     1520                         
    14931521                        if($this->debug) 
    14941522                        { 
     
    15091537                                $users[] = $this->owner; 
    15101538                        } 
     1539 
    15111540 
    15121541                        $possible_conflicts = $this->store_to_cache( 
     
    15181547                                        'eday'  => substr(strval($temp_end),6,2), 
    15191548                                        'eyear' => substr(strval($temp_end),0,4), 
    1520                                         'owner' => $users 
     1549                                        'owner' => $users, 
     1550                                        'location'      => $location 
    15211551                                ) 
    15221552                        ); 
     
    15271557                                echo '<!-- Possible Conflicts ('.$temp_start.'): '.count($possible_conflicts[$temp_start]).' '.count($id).' -->'."\n"; 
    15281558                        } 
    1529  
     1559//echo "aaa".$possible_conflicts[$temp_start]; 
     1560//echo "bbbb".$possible_conflicts[$temp_end]; 
    15301561                        if($possible_conflicts[$temp_start] || $possible_conflicts[$temp_end]) 
    15311562                        { 
     
    15691600                                                        $temp_event_end = sprintf("%d%02d",$event['end']['hour'],$event['end']['min']); 
    15701601//                                                      if((($temp_start_time <= $temp_event_start) && ($temp_end_time >= $temp_event_start) && ($temp_end_time <= $temp_event_end)) || 
     1602 
     1603 
     1604                        /*}*/ 
     1605 
     1606 
     1607 
    15711608                                                        if(($temp_start_time <= $temp_event_start && 
    1572                                                                 $temp_end_time > $temp_event_start && 
    1573                                                                 $temp_end_time <= $temp_event_end || 
    1574                                                                 $temp_start_time >= $temp_event_start && 
    1575                                                                 $temp_start_time < $temp_event_end && 
    1576                                                                 $temp_end_time >= $temp_event_end || 
    1577                                                                 $temp_start_time <= $temp_event_start && 
    1578                                                                 $temp_end_time >= $temp_event_end || 
    1579                                                                 $temp_start_time >= $temp_event_start && 
    1580                                                                 $temp_end_time <= $temp_event_end) && 
    1581                                                                 $this->participants_not_rejected($participants,$event)) 
     1609                                                                $temp_end_time >= $temp_event_start && 
     1610                                                                $temp_end_time <= $temp_event_end) || 
     1611                                                                ($temp_start_time <= $temp_event_start && 
     1612                                                                $temp_end_time >= $temp_event_start && 
     1613                                                                $temp_end_time >= $temp_event_end)|| 
     1614                                                                ($temp_start_time <= $temp_event_start && 
     1615                                                                $temp_end_time >= $temp_event_end) ||            
     1616 
     1617                                                                ($temp_start_time >= $temp_event_start && 
     1618                                                                $temp_start_time <= $temp_event_end && 
     1619                                                                $temp_end_time >= $temp_event_end) || 
     1620                                                                 
     1621                                                                ($temp_start_time >= $temp_event_start && 
     1622                                                                $temp_end_time <= $temp_event_end))  
    15821623                                                        { 
    15831624                                                                if($this->debug) 
     
    15851626                                                                        echo ' Conflicts'; 
    15861627                                                                } 
    1587                                                                 $retval[] = $event['id']; 
     1628                                                                $retval[] = $event; 
    15881629                                                        } 
    15891630                                                        if($this->debug) 
     
    15971638                        else 
    15981639                        { 
    1599                                 $retval = False; 
     1640                                $retval1 = False; 
     1641                                $retval = Array(); 
    16001642                        } 
    16011643 
     
    20222064                        } 
    20232065                        $repeated = $this->repeating_events; 
     2066 
     2067//echo $repeated."repeat<br>" ; 
    20242068                        $r_events = count($repeated); 
     2069//echo $r_events."  ".$this->repeating_event[1]. "repeat23<br>" ; 
    20252070                        for ($i=0;$i<$r_events;$i++) 
    20262071                        { 
    20272072                                $rep_events = $this->repeating_events[$i]; 
     2073 
    20282074                                $id = $rep_events['id']; 
     2075//echo $id; 
    20292076                                $event_beg_day = mktime(0,0,0,$rep_events['start']['month'],$rep_events['start']['mday'],$rep_events['start']['year']); 
    20302077                                if($rep_events['recur_enddate']['month'] != 0 && $rep_events['recur_enddate']['mday'] != 0 && $rep_events['recur_enddate']['year'] != 0) 
     
    21602207                                return False; 
    21612208                        } 
    2162                         if (isset($params['start']) && ($datearr = $GLOBALS['server']->iso86012date($params['start']))) 
     2209$location=$params['location']; 
     2210 
     2211        //echo "location".$location;             
     2212        if (isset($params['start']) && ($datearr = $GLOBALS['server']->iso86012date($params['start']))) 
    21632213                        { 
    21642214                                $syear = $datearr['year']; 
     
    22192269                                //Se $emonth nao tem valor, recebe o valor de $smonth (que recebe $params['smonth']) e soma 1. 
    22202270                                //O valor $params['emonth'] indica o mes final para a pesquisa de eventos, e passou a ser 
    2221                                 //informado na a impressao de eventos mensais. Mudancas feitas em class.uiresources.inc.php,  
     2271                                //informado na a impressao de eventos mensais. Mudancas feitas em class.uicalendar.inc.php,  
    22222272                                //function display_month_print(); 
    22232273                                if(!$emonth) 
     
    22362286                                $edate = mktime(23,59,59,$emonth,$eday,$eyear); 
    22372287                        } 
    2238                         //echo "<p>boresources::store_to_cache(".print_r($params,True).") syear=$syear, smonth=$smonth, sday=$sday, eyear=$eyear, emonth=$emonth, eday=$eday, xmlrpc='$param[xmlrpc]'</p>\n"; 
     2288                        //echo "<p>bocalendar::store_to_cache(".print_r($params,True).") syear=$syear, smonth=$smonth, sday=$sday, eyear=$eyear, emonth=$emonth, eday=$eday, xmlrpc='$param[xmlrpc]'</p>\n"; 
    22392289                        if($this->debug) 
    22402290                        { 
     
    22482298                        if($owner_id) 
    22492299                        { 
    2250                                 $cached_event_ids = "";//$this->so->list_events($syear,$smonth,$sday,$eyear,$emonth,$eday,$owner_id); 
    2251                                 $cached_event_ids_repeating = "";//$this->so->list_repeated_events($syear,$smonth,$sday,$eyear,$emonth,$eday,$owner_id); 
     2300 
     2301                                $cached_event_ids = $this->so->list_events($syear,$smonth,$sday,$eyear,$emonth,$eday,$owner_id,$location); 
     2302                                $cached_event_ids_repeating = $this->so->list_repeated_events($syear,$smonth,$sday,$eyear,$emonth,$eday,$owner_id,$location); 
    22522303                        } 
    22532304                        else 
    22542305                        { 
    2255                                 $cached_event_ids = "";//$this->so->list_events($syear,$smonth,$sday,$eyear,$emonth,$eday); 
    2256                                 $cached_event_ids_repeating = "";//$this->so->list_repeated_events($syear,$smonth,$sday,$eyear,$emonth,$eday); 
     2306 
     2307                                $cached_event_ids = $this->so->list_events($syear,$smonth,$sday,$eyear,$emonth,$eday,0,$location); 
     2308                                $cached_event_ids_repeating = $this->so->list_repeated_events($syear,$smonth,$sday,$eyear,$emonth,$eday,0,$location); 
    22572309                        } 
    22582310 
    22592311                        $c_cached_ids = count($cached_event_ids); 
    22602312                        $c_cached_ids_repeating = count($cached_event_ids_repeating); 
    2261  
     2313//echo "totaless".$c_cached_ids." -  ".$c_cached_ids_repeating; 
    22622314                        if($this->debug) 
    22632315                        { 
     
    22742326 
    22752327                        $cache_start = (int)(sprintf("%04d%02d%02d",$syear,$smonth,$sday)); 
     2328 
    22762329                        $cached_event=$this->get_cached_event(); 
     2330 
    22772331                        if($c_cached_ids) 
    22782332                        { 
     2333 
    22792334                                for($i=0;$i<$c_cached_ids;$i++) 
    22802335                                { 
    2281                                         $event = "";//$this->so->read_entry($cached_event_ids[$i]); 
     2336                                        $event = $this->so->read_entry($cached_event_ids[$i]); 
     2337 
     2338//echo "<br>antrrrrroooo".$event['start']."  a ".$event['end']." b ".$event['id']; 
    22822339                                        if ($event['recur_type']) 
    22832340                                        { 
     
    22872344                                        $enddate = (int)(date('Ymd',$this->maketime($event['end']))); 
    22882345                                        $this->cached_events[$startdate][] = $event; 
     2346//echo "ver".$event['recur_type'].$startdate." ---".$enddate."<br>antrrrrroooo";; 
    22892347                                        if($startdate != $enddate) 
    22902348                                        { 
     
    22942352                                                for($j=$startdate,$k=0;$j<=$enddate;$k++,$j=(int)(date('Ymd',mktime(0,0,0,$start['month'],$start['mday'] + $k,$start['year'])))) 
    22952353                                                { 
     2354 
     2355 
    22962356                                                        $c_evt_day = count($this->cached_events[$j]) - 1; 
     2357//echo "<br>aaaa".$c_evt_day."<br>antrrrrroooo"; ; 
    22972358                                                        if($c_evt_day < 0) 
    22982359                                                        { 
     
    23102371                                                                } 
    23112372                                                                $this->cached_events[$j][] = $event; 
     2373//echo "<br>llll:".$event."<br>antrrrrroooo";; 
    23122374                                                        } 
    23132375                                                        if ($j >= $cache_start && (@$params['no_doubles'] || @$this->xmlrpc)) 
     
    23232385                        if($c_cached_ids_repeating) 
    23242386                        { 
     2387//echo "repeaiting".$c_cached_ids_repeating; 
     2388 
    23252389                                for($i=0;$i<$c_cached_ids_repeating;$i++) 
    23262390                                { 
    2327                                         $this->repeating_events[$i] = "";//$this->so->read_entry($cached_event_ids_repeating[$i]); 
     2391                                        $this->repeating_events[$i] = $this->so->read_entry($cached_event_ids_repeating[$i]); 
     2392//echo "abc".$this->repeating_events[$i]."<br>"; 
    23282393                                        if($this->debug) 
    23292394                                        { 
     
    23392404                                        } 
    23402405                                        $this->check_repeating_events($date); 
     2406 
     2407 
    23412408                                        if($this->debug) 
    23422409                                        { 
     
    23492416                                } 
    23502417                        } 
     2418 
     2419//echo "countt".count($this->cached_events); 
    23512420                        $retval = Array(); 
    23522421                        for($j=date('Ymd',mktime(0,0,0,$smonth,$sday,$syear)),$k=0;$j<=date('Ymd',mktime(0,0,0,$emonth,$eday,$eyear));$k++,$j=date('Ymd',mktime(0,0,0,$smonth,$sday + $k,$syear))) 
    23532422                        { 
     2423//echo "vueltaaaa".$j."<br>"; 
    23542424                                if(is_array($this->cached_events[$j])) 
    23552425                                { 
     
    23592429                                                { 
    23602430                                                        $retval[] = $this->xmlrpc_prepare($event); 
     2431//echo "cachhhhhheeeeeqqq2222".$this->xmlrpc_prepare($event)."<br>"; 
    23612432                                                } 
    23622433                                        } 
     
    23642435                                        { 
    23652436                                                $retval[$j] = $this->cached_events[$j]; 
    2366                                         } 
    2367                                 } 
     2437                                                //foreach($this->cached_events[$j][0] as $c=>$v) 
     2438                                                //echo "<p>El vector con indice $c tiene el valor $v </p>"; 
     2439//echo "cachhhhhheeeeeqqq".$this->cached_events[$j][0]['public']."<br>"; 
     2440                                        } 
     2441                                } 
     2442 
     2443 
    23682444                        } 
    23692445                        //echo "store_to_cache(".print_r($params,True).")=<pre>".print_r($retval,True)."</pre>\n"; 
    2370                         //$this->so->cal->event = $cached_event; 
     2446                        $this->so->cal->event = $cached_event; 
    23712447                        return $retval; 
    23722448                } 
  • contrib/Resources/inc/class.soresources.inc.php

    r3524 r4362  
    4949                                echo '<!-- SO cat_id : '.$this->cat_id.' -->'."\n"; 
    5050                        } 
    51                         $this->cal = CreateObject('infolog.soinfolog_'); 
     51                //      $this->cal = CreateObject('infolog.soinfolog_'); 
     52                        $this->cal = CreateObject('calendar.socalendar_'); 
    5253                        //$this->open_box($this->owner); 
    5354                } 
     
    7677                } 
    7778 
     79        function read_entry2($id) 
     80                { 
     81                        return $this->cal->fetch_event($id); 
     82                } 
     83                 
    7884                function list_events($startYear,$startMonth,$startDay,$endYear=0,$endMonth=0,$endDay=0,$owner_id=0) 
    7985                { 
     
    427433                        $this->cal->set_recur_yearly($year,$month,$day,$interval); 
    428434                } 
     435function list_eventsa($startYear,$startMonth,$startDay,$endYear=0,$endMonth=0,$endDay=0,$owner_id=0,$location='n/a') 
     436                { 
     437 
     438                        $extra = ''; 
     439                        $extra .= (strpos($this->filter,'private')?'AND phpgw_cal.is_public=0 ':''); 
     440                        //$extra .= ($this->cat_id?"AND phpgw_cal.category like '%".$this->cat_id."%' ":''); 
     441                        if ($this->cat_id) 
     442                        { 
     443                                if (!is_object($GLOBALS['phpgw']->categories)) 
     444                                { 
     445                                        $GLOBALS['phpgw']->categories = CreateObject('phpgwapi.categories'); 
     446                                } 
     447                                $cats = $GLOBALS['phpgw']->categories->return_all_children($this->cat_id); 
     448                                $extra .= "AND (phpgw_cal.category".(count($cats) > 1 ? " IN ('".implode("','",$cats)."')" : '=\''.(int)$this->cat_id."'"); 
     449                                foreach($cats as $cat) 
     450                                { 
     451                                        $extra .= " OR phpgw_cal.category LIKE '$cat,%' OR phpgw_cal.category LIKE '%,$cat,%' OR phpgw_cal.category LIKE '%,$cat'"; 
     452                                } 
     453                                $extra .= ') '; 
     454                        } 
     455                        if($owner_id) 
     456                        { 
     457                                return $this->cal->list_events($startYear,$startMonth,$startDay,$endYear,$endMonth,$endDay,$extra,$GLOBALS['phpgw']->datetime->tz_offset,$owner_id,$location); 
     458                        } 
     459                        else 
     460                        { 
     461                                return $this->cal->list_events($startYear,$startMonth,$startDay,$endYear,$endMonth,$endDay,$extra,$GLOBALS['phpgw']->datetime->tz_offset); 
     462                        } 
     463                } 
    429464                 
    430465                /* End mcal equiv functions */ 
  • contrib/Resources/inc/class.uiresources.inc.php

    r3524 r4362  
    3737                'footer' => True                         
    3838                ); 
     39 
     40 
    3941 
    4042 
     
    135137                function uiresources() 
    136138                { 
    137  
    138  
     139                        $localtime = $GLOBALS['phpgw']->datetime->users_localtime; 
     140 
     141                                        $this->year = date('Y',$localtime); 
     142                                        $this->month = date('m',$localtime); 
     143                                        $this->day = date('d',$localtime); 
     144                        $this->today = date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime); 
    139145 
    140146 
     
    954960'accionmodificar'       =>'index.php?menuaction=resources.uiresources.edit&id='. $data['id'], 
    955961'accionlistar'  =>'index.php?menuaction=resources.uiresources.search2&id='.  $data['name'], 
     962                                 
    956963'accionborrar'  =>'index.php?menuaction=resources.uiresources.delete&id='. $data['id'], 
    957964'accionreservar'        =>'index.php?menuaction=calendar.uicalendar.add&location='. $data['name'] 
     
    985992        //              } 
    986993 
    987                         $sql = 'select t1.*,t2.cat_name from   phpgw_resources t1 ,phpgw_categories t2 where t1.cat_id=t2.cat_id ' 
     994                        $sql = "select t1.*,t2.cat_name from   phpgw_resources t1 ,phpgw_categories t2 where t1.cat_id=t2.cat_id and t1.name !='n/a'" 
    988995                                        . $from; 
    989996                                        //.$search; 
     
    14521459 
    14531460//print_r($_REQUEST);  
     1461$this->today = date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime); 
     1462 
     1463 
     1464 
     1465                        $jscal = CreateObject('phpgwapi.jscalendar');   // before phpgw_header() !!! 
     1466 
     1467                        unset($GLOBALS['phpgw_info']['flags']['noheader']); 
     1468                        unset($GLOBALS['phpgw_info']['flags']['nonavbar']); 
     1469                        $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['resources']['title'].' - '.lang('Search Results'); 
     1470                        $GLOBALS['phpgw']->common->phpgw_header(); 
     1471 
     1472                        $error = ''; 
     1473 
     1474 
     1475 
     1476                        $matches = 0; 
     1477 
     1478//echo "aaaaa".$GLOBALS['phpgw']->common->show_date(1288884600); 
     1479 
     1480//echo "aaaaa".$GLOBALS['phpgw']->common->show_date(1288886400); 
     1481 
     1482if (isset($_REQUEST['fecha'])){ 
     1483list($dia,$mes,$ano)=split("/",$_REQUEST['fecha']); 
     1484if (isset($_REQUEST['fecha2'])){ 
     1485list($dia2,$mes2,$ano2)=split("/",$_REQUEST['fecha2']); 
     1486}else{ 
     1487        list($dia2,$mes2,$ano2)=split("/",$_REQUEST['fecha']); 
     1488         
     1489} 
     1490if(isset($_REQUEST['hora'])){ 
     1491list($horai,$minutoi,$horaf,$minutof)=split(":",$_REQUEST['hora']); 
     1492}else{ 
     1493        $horai=0; 
     1494        $minutoi=0; 
     1495        $horaf=23; 
     1496        $minutof=59; 
     1497} 
     1498        $starttimea = $this->bo->maketime2(0,0,0,$dia,$mes,$ano,'am') - $GLOBALS['phpgw']->datetime->tz_offset; 
     1499 
     1500 
     1501}else{ 
     1502        $localtime = $GLOBALS['phpgw']->datetime->users_localtime; 
     1503        $ano = date('Y',$localtime); 
     1504        $mes = date('m',$localtime); 
     1505        $dia = date('d',$localtime);                                     
     1506        $ano2 = date('Y',$localtime); 
     1507        $mes2 = date('m',$localtime); 
     1508        $dia2 = date('d',$localtime); 
     1509        $horai=0; 
     1510        $minutoi=0; 
     1511        $horaf=23; 
     1512        $minutof=59; 
     1513 
     1514//$starttime = $this->bo->maketime2(0,0,0,$dia,$mes,$ano,'am') - $GLOBALS['phpgw']->datetime->tz_offset; 
     1515///echo $starttime; 
     1516//$starttime2 = $this->bo->maketime2(23,59,59,$dia,$mes,$ano,'pm') - $GLOBALS['phpgw']->datetime->tz_offset; 
     1517///echo $starttime2; 
     1518 
     1519} 
     1520 
     1521 
     1522 
     1523$pm='pm'; 
     1524if($horaf<12){ 
     1525        $pm='am'; 
     1526}else{ 
     1527        $horaf=$horaf-12; 
     1528} 
     1529$am='am'; 
     1530if($horai>11){ 
     1531        $am='pm'; 
     1532        $horai=$horai-12; 
     1533         
     1534} 
     1535 
     1536 
     1537//echo $horai."  <br>  ".$starttimea."<br>".$horaf; 
     1538        $starttime = $this->bo->maketime2($horai,$minutoi,0,$dia,$mes,$ano,$am) - $GLOBALS['phpgw']->datetime->tz_offset; 
     1539//echo "fff".$starttime; 
     1540$starttime2 = $this->bo->maketime2($horaf,$minutof,59,$dia2,$mes2,$ano2,$pm) - $GLOBALS['phpgw']->datetime->tz_offset; 
     1541///echo $starttime2; 
     1542                //$event = $this->bo->read_entry($res_id);       
     1543$location=''; 
     1544if($_GET['id']!=''){ 
     1545$location=$_GET['id'];}else{ 
     1546$location='n/a';} 
     1547 
     1548/*$eventtt=$this->bo->store_to_cache( 
     1549                                Array( 
     1550                                        'syear'  => $ano, 
     1551                                        'smonth' => $mes, 
     1552                                        'sday'   => $dia, 
     1553                                'shour'   => $horai, 
     1554                                'smin'   => $minutoi, 
     1555                                        'eyear'  => $ano, 
     1556                                        'emonth' => $mes, 
     1557                                        'eday'   => $dia, 
     1558                                'fhour'   => $horaf, 
     1559                                'fmin'   => $minutof, 
     1560'location'      =>      $location 
     1561                                ) 
     1562                        );      */ 
     1563                $date_to_eval = sprintf("%04d%02d%02d",$ano,$mes,$dia); 
     1564                 
     1565        //      echo "date _to _eval".$date_to_eval."<br>"; 
     1566//$events = $this->bo->cached_events[$date_to_eval];//(5,23,0,22,10,2010)  
     1567$events=$this->bo->overlap($starttime,$starttime2,Array(),0,0,'False',$location); 
     1568                                print_debug('Date',$date_to_eval); 
     1569                                print_debug('Count',count($events)); 
     1570//echo "llll<br>".'Date'.$date_to_eval; 
     1571//echo "llll<br>".'Count'.count($events); 
     1572if(count($events)>0){ 
     1573                                foreach($events as $event) 
     1574                                { 
     1575                                        if ($this->bo->rejected_no_show($event)) 
     1576                                        { 
     1577                                                continue;       // user does not want to see rejected events 
     1578                                        } 
     1579                                        if ($event['recur_type'])       // calculate start- + end-datetime for recuring events 
     1580                                        { 
     1581                                                $this->bo->set_recur_date($event,$date_to_eval); 
     1582                                        } 
     1583                                        //$events_to_show[] = array( 
     1584                                        //      'starttime' => $this->bo->maketime($event['start']), 
     1585                                        //      'endtime'   => $this->bo->maketime($event['end']), 
     1586                                        //      'content'   => $this->link_to_entry($event,$mes,$dia,$ano) 
     1587                                        //); 
     1588 
     1589                                } 
     1590} 
     1591//echo "eeeevento".count($event)."<br>"; 
     1592                        $date_to_eval = sprintf("%04d%02d%02d",$ano,$mes,$dia); 
     1593 
     1594//$event = $this->get_event_ids2($_REQUEST['id'],$starttime,$starttime2); 
     1595 
     1596 
     1597                        //$event_ids = $this->bo->search_keywords($_POST['keywords']); 
     1598 
     1599                         
     1600                        $matches = count($event); 
     1601 
     1602//echo "matches" . $matches."<br>"; 
     1603 
     1604                        if ($matches == 1) 
     1605                        { 
     1606                                $quantity = lang('1 match found').'.'; 
     1607                        } 
     1608                        elseif ($matches > 0) 
     1609                        { 
     1610                                $quantity = lang('%1 matches found',$matches).'.'; 
     1611                        } 
     1612                        else 
     1613                        { 
     1614                                echo lang('no matches found')." para el ".$dia."/".$mes."/".$ano."  en la sala:".$location; 
     1615                                 
     1616                                //return; 
     1617                        } 
     1618 
     1619                        if ($matches > 0){ 
     1620                        $p = $GLOBALS['phpgw']->template; 
     1621                        $p->set_file( 
     1622                                Array( 
     1623                                        'search_form'   => 'search2.tpl' 
     1624                                ) 
     1625                        ); 
     1626                         
     1627                }else{ 
     1628                        $p = $GLOBALS['phpgw']->template; 
     1629                        $p->set_file( 
     1630                                Array( 
     1631                                        'search_form'   => 'search3.tpl' 
     1632                                ) 
     1633                        ); 
     1634                } 
     1635                $p->set_block('search_form','search','search'); 
     1636                        $p->set_block('search_form','search_list_header','search_list_header'); 
     1637                        $p->set_block('search_form','search_list','search_list'); 
     1638                        $p->set_block('search_form','search_list_footer','search_list_footer'); 
     1639 
     1640$script=''; 
     1641 
     1642                 
     1643 
     1644                        if($matches > 0) 
     1645                        { 
     1646                                $p->parse('rows','search_list_header',True); 
     1647                        } 
     1648 
     1649//if($info){ 
     1650//echo $matches; 
     1651//for($i=0;$i<$matches;$i++) 
     1652                //      { 
     1653//echo "i".$i; 
     1654if(count($events)>0){ 
     1655                        foreach($events  as $id => $data) 
     1656                        { 
     1657 
     1658//echo "<br>dataaaa".$data['title']; 
     1659//echo "<br>".$this->get_account_name($data['owner'],'gecos')."  ".$data['owner']; 
     1660                                $datetime = $this->bo->maketime($event['start']) - $GLOBALS['phpgw']->datetime->tz_offset; 
     1661 
     1662 
     1663 
     1664//echo "ffffffeeecha".$GLOBALS['phpgw']->common->show_date($data[$i]['datetime'])."     ".$data[$i]['start']."  ".$this->bo->maketime($data[$i]['start']); 
     1665//echo $data['location']."  .. ".$data['last_status']."  .. ".$data['is_public']; 
     1666if($data['public']==1){ 
     1667        $descripcion=$data['description']; 
     1668        $name=$data['title']; 
     1669}else{ 
     1670        $descripcion='-'; 
     1671        $name='Privado'; 
     1672} 
     1673$dueno=$this->get_account_name($data['owner'],'gecos'); 
     1674                                $info = array( 
     1675                                        'tr_color'      => $GLOBALS['phpgw']->nextmatchs->alternate_row_color(), 
     1676                                        'date'          => $GLOBALS['phpgw']->common->show_date($datetime), 
     1677'id'    => $data['id'], 
     1678                                        'name'         => $name, 
     1679                                        'description'         => $descripcion, 
     1680                                        'location'         =>$data['location'], 
     1681                                 
     1682                                        'owner'=>$this->get_account_name($data['owner'],'gecos'), 
     1683                                        'fecha'=> $dia."/".$mes."/".$ano." <br>   ".$GLOBALS['phpgw']->common->show_hour($this->bo->maketime($data['start']))."-".$GLOBALS['phpgw']->common->show_hour($this->bo->maketime($data['end'])), 
     1684                                        'priority'=>'', 
     1685                                        'ispublic'=>$data['is_public'], 
     1686 
     1687'accionmodificar'       =>'index.php?menuaction=resources.uiresources.edit&id='. $data['id'], 
     1688'accionlistar'  =>'index.php?menuaction=resources.uiresources.search2&id='. $data['id'], 
     1689'accionborrar'  =>$data['id'], 
     1690'accionreservar'        =>'index.php?menuaction=calendar.uicalendar.add&location='. $data['id'] 
     1691                                ); 
     1692 
     1693 
     1694 
     1695//'accionagregar'       =>'index.php?menuaction=resources.uiresources.edit&parent='. $data['id'] 
     1696$p->set_var($info); 
     1697                                $p->set_var($info); 
     1698                                $p->parse('rows','search_list',True); 
     1699                        } 
     1700//} 
     1701//      } 
     1702} 
     1703                        if($matches > 0) 
     1704                        { 
     1705                                $p->parse('rows','search_list_footer',True); 
     1706                        } 
     1707 
     1708                        $p->pparse('out','search'); 
     1709                } 
     1710 
     1711                 
     1712         
     1713                 
     1714                 
     1715                 
     1716        function search22() 
     1717                { 
     1718 
     1719//print_r($_REQUEST);  
    14541720 
    14551721                        $jscal = CreateObject('phpgwapi.jscalendar');   // before phpgw_header() !!! 
     
    15681834                } 
    15691835 
    1570  
    1571  
    1572  
     1836         
    15731837function get_event_ids2($idd,$starttime,$starttime2) 
    15741838                { 
    1575 ////echo "tamannn".count($search)."  ".$search[0]; 
    1576  
     1839 
     1840 
     1841 
     1842$from =""; 
    15771843$from =""; 
    15781844if (isset($idd)){ 
     
    15821848 
    15831849if (isset($starttime)){ 
     1850 
     1851                        $from =$from .' and t1.datetime>=\''.$starttime.'\''; 
    15841852if (isset($starttime2)){ 
    15851853 
    1586                         $from =$from .' and t1.datetime>=\''.$starttime.'\' and t1.datetime<=\''.$starttime2.'\' '; 
     1854                        $from =$from .' and t1.datetime<=\''.$starttime2.'\' '; 
    15871855} 
    15881856                        } 
     
    16011869 
    16021870 
     1871//echo $sql; 
    16031872 
    16041873 
     
    16381907                                ); 
    16391908 
    1640  
    16411909                        } 
    16421910                 
     
    16461914                        return $retval; 
    16471915                } 
     1916function link_to_entry($event,$month,$day,$year) 
     1917                { 
     1918                        $str = ''; 
     1919                        $is_private = !$event['public'] && !$this->bo->check_perms(PHPGW_ACL_READ,$event); 
     1920                        $viewable = !$this->bo->printer_friendly && $this->bo->check_perms(PHPGW_ACL_READ,$event); 
     1921 
     1922                        $starttime = $this->bo->maketime($event['start']) - $GLOBALS['phpgw']->datetime->tz_offset; 
     1923                        $endtime = $this->bo->maketime($event['end']) - $GLOBALS['phpgw']->datetime->tz_offset; 
     1924                        $rawdate = mktime(0,0,0,$month,$day,$year); 
     1925                        $rawdate_offset = $rawdate - $GLOBALS['phpgw']->datetime->tz_offset; 
     1926                        $nextday = mktime(0,0,0,$month,$day + 1,$year) - $GLOBALS['phpgw']->datetime->tz_offset; 
     1927                        if ((int)$GLOBALS['phpgw']->common->show_date($starttime,'Hi') && $starttime == $endtime) 
     1928                        { 
     1929                                $time = $GLOBALS['phpgw']->common->show_date($starttime,$this->bo->users_timeformat); 
     1930                        } 
     1931                        elseif ($starttime <= $rawdate_offset && $endtime >= $nextday - 60) 
     1932                        { 
     1933                                $time = '[ '.lang('All Day').' ]'; 
     1934                        } 
     1935                        elseif ((int)$GLOBALS['phpgw']->common->show_date($starttime,'Hi') || $starttime != $endtime) 
     1936                        { 
     1937                                if($starttime < $rawdate_offset && $event['recur_type'] == MCAL_RECUR_NONE) 
     1938                                { 
     1939                                        $start_time = $GLOBALS['phpgw']->common->show_date($rawdate_offset,$this->bo->users_timeformat); 
     1940                                } 
     1941                                else 
     1942                                { 
     1943                                        $start_time = $GLOBALS['phpgw']->common->show_date($starttime,$this->bo->users_timeformat); 
     1944                                } 
     1945 
     1946                                if($endtime >= ($rawdate_offset + 86400)) 
     1947                                { 
     1948                                        $end_time = $GLOBALS['phpgw']->common->show_date(mktime(23,59,59,$month,$day,$year) - $GLOBALS['phpgw']->datetime->tz_offset,$this->bo->users_timeformat); 
     1949                                } 
     1950                                else 
     1951                                { 
     1952                                        $end_time = $GLOBALS['phpgw']->common->show_date($endtime,$this->bo->users_timeformat); 
     1953                                } 
     1954                                $time = $start_time.'-'.$end_time; 
     1955                        } 
     1956                        else 
     1957                        { 
     1958                                $time = ''; 
     1959                        } 
     1960                         
     1961                        $texttitle = $texttime = $textdesc = $textlocation = $textstatus = ''; 
     1962 
     1963                         
     1964                         
     1965                        if(!$is_private) 
     1966                        { 
     1967                                //$text .= $this->bo->display_status($event['users_status']); 
     1968                                 
     1969                                // split text for better display by templates, also see $texttime $texttitle $textdesc $textlocation     
     1970                                $textstatus=$this->bo->display_status($event['users_status']);  
     1971                                 
     1972                        } 
     1973 
     1974                        /* 
     1975                        $text = '<nobr>&nbsp;'.$time.'&nbsp;</nobr> '.$this->bo->get_short_field($event,$is_private,'title').$text. 
     1976                                (!$is_private && $event['description'] ? ': <i>'.$this->bo->get_short_field($event,$is_private,'description').'</i>':''). 
     1977                                $GLOBALS['phpgw']->browser->br; 
     1978                        */ 
     1979                         
     1980                        $texttime=$time; 
     1981                        $texttitle=$this->bo->get_short_field($event,$is_private,'title'); 
     1982                        $textdesc=(!$is_private && $event['description'] ? $this->bo->get_short_field($event,$is_private,'description'):''); 
     1983                        // added $textlocation but this must be activated in the actual pict_link.tpl file of the used template set 
     1984                        $textlocation=$this->bo->get_short_field($event,$is_private,'location'); 
     1985 
     1986                        if ($viewable) 
     1987                        { 
     1988                                $date = sprintf('%04d%02d%02d',$year,$month,$day); 
     1989                                $this->link_tpl->set_var('link_link',$this->page('view','&cal_id='.$event['id'].'&date='.$date)); 
     1990                                $this->link_tpl->set_var('lang_view',lang('View this entry')); 
     1991                                $this->link_tpl->set_var('desc', $textdesc); 
     1992                                $this->link_tpl->set_var('location', $textlocation); 
     1993                                $this->link_tpl->parse('picture','link_open',True); 
     1994                        } 
     1995                        if (!$is_private) 
     1996                        { 
     1997                                if($event['priority'] == 3) 
     1998                                { 
     1999                                        $picture[] = Array( 
     2000                                                'pict'  => $GLOBALS['phpgw']->common->image('calendar','high'), 
     2001                                                'width' => 16, 
     2002                                                'height'=> 16, 
     2003                                                'title' => lang('high priority') 
     2004                                        ); 
     2005                                } 
     2006                                if($event['recur_type'] == MCAL_RECUR_NONE) 
     2007                                { 
     2008                                        $picture[] = Array( 
     2009                                                'pict'  => $GLOBALS['phpgw']->common->image('calendar','circle'), 
     2010                                                'width' => 9, 
     2011                                                'height'=> 9, 
     2012                                                'title' => lang('single event') 
     2013                                        ); 
     2014                                } 
     2015                                else 
     2016                                { 
     2017                                        $picture[] = Array( 
     2018                                                'pict'  => $GLOBALS['phpgw']->common->image('calendar','recur'), 
     2019                                                'width' => 12, 
     2020                                                'height'=> 12, 
     2021                                                'title' => lang('recurring event') 
     2022                                        ); 
     2023                                } 
     2024                        } 
     2025                         
     2026                        if($event['public'] == 0) 
     2027                        { 
     2028                                $picture[] = Array( 
     2029                                        'pict'  => $GLOBALS['phpgw']->common->image('calendar','private'), 
     2030                                        'width' => 13, 
     2031                                        'height'=> 13, 
     2032                                        'title' => lang('private') 
     2033                                ); 
     2034                        } 
     2035                /**     if(@isset($event['alarm']) && count($event['alarm']) >= 1 && !$is_private) 
     2036                        { 
     2037                                // if the alarm is to go off the day before the event 
     2038                                // the icon does not show up because of 'alarm_today' 
     2039                                // - TOM 
     2040                                if($this->bo->alarm_today($event,$rawdate_offset,$starttime)) 
     2041                                { 
     2042                                        $picture[] = Array( 
     2043                                                'pict'  => $GLOBALS['phpgw']->common->image('calendar','alarm'), 
     2044                                                'width' => 13, 
     2045                                                'height'=> 13, 
     2046                                                'title' => lang('alarm') 
     2047                                        ); 
     2048                                } 
     2049                        }*/ 
     2050 
     2051                        $description = $this->bo->get_short_field($event,$is_private,'description'); 
     2052                        for($i=0;$i<count($picture);$i++) 
     2053                        { 
     2054                                $var = Array( 
     2055                                        'pic_image' => $picture[$i]['pict'], 
     2056                                        'width'     => $picture[$i]['width'], 
     2057                                        'height'    => $picture[$i]['height'], 
     2058                                        'title'     => $picture[$i]['title'] 
     2059                                ); 
     2060                                $this->output_template_array($this->link_tpl,'picture','pict',$var); 
     2061                        } 
     2062                        if ($texttitle) 
     2063                        { 
     2064                                $var = Array( 
     2065                        //              'text' => $text, 
     2066                                        'time'=> $texttime, 
     2067                                        'title'=> $texttitle, 
     2068                                        'users_status'=>$textstatus, 
     2069                                        'desc'=> $textdesc, 
     2070                                        'location'=> "<br><b>Local:</b> ".$textlocation 
     2071                                ); 
     2072                                $this->output_template_array($this->link_tpl,'picture','link_text',$var); 
     2073                        } 
     2074 
     2075                        if ($viewable) 
     2076                        { 
     2077                                $this->link_tpl->parse('picture','link_close',True); 
     2078                        } 
     2079                        $str = $this->link_tpl->fp('out','link_pict'); 
     2080                        $this->link_tpl->set_var('picture',''); 
     2081                        $this->link_tpl->set_var('out',''); 
     2082//                      unset($p); 
     2083                        return $str; 
     2084                } 
    16482085 
    16492086 
  • contrib/Resources/templates/default/head.tpl

    r3524 r4362  
    1717<table id="calendar_head_table" class="calendar_head_table" border="0" width="100%" cols="{cols}" cellpadding="6" cellspacing="0"> 
    1818        <tr> 
    19                 <td rowspan=10> 
     19                <td> 
    2020         
    21         <div id="divSubContainer"> 
    22                 <table cellpadding="0" cellspacing="0" width="100%"> 
    23                 <tbody><tr> 
    24                 <!-- Sidebox Column --> 
    25 <td id="tdSidebox" valign="top"><div id="thesideboxcolumn" style="width: 203px;"><div id="sideresize"></div> 
    26 <div class="divSidebox"> 
    27         <div class="divSideboxHeader"><span>Recursos Men&uacute;</span></div> 
    28  
    29         <div> 
    30                 <table cellpadding="0" cellspacing="0" width="100%"> 
    31                 <tbody><tr class="divSideboxEntry"> 
    32                         <td class="textSidebox" align="center" valign="middle" width="20"><img class="sideboxstar" src="/resources/templates/default/images/orange-ball.png" alt="ball" height="9" width="9"></td><td class="textSidebox"><a class="textSidebox" href="index.php?menuaction=resources.uiresources.search">Lista del registro</a></td> 
    33                 </tr> 
    34                 <tr class="divSideboxEntry"> 
    35                         <td class="textSidebox" align="center" valign="middle" width="20"><img class="sideboxstar" src="/resources/templates/default/images/orange-ball.png" alt="ball" height="9" width="9"></td><td class="textSidebox"><a class="textSidebox" href=""></a><a class="textSidebox" href="index.php?menuaction=resources.uiresources.edit"  >A&ntilde;adir</a></td> 
    36                 </tr> 
    37  
    38                 </tbody></table>         
    39         </div> 
    40 </div> 
    41  
    42 <div class="sideboxSpace"></div> 
    43  
    44 </td> <td>  
     21         
    4522 
    4623 
  • contrib/Resources/templates/default/search.tpl

    r3524 r4362  
    5656        </td> 
    5757         
    58         <td> 
    59                 <table> 
    6058         
    61                         <tr> 
    62                         <td class="inactiv_sortcolumn" align="left">Categor&iacute;a <br>Administrador</td> 
    63                          
    64                         </tr> 
    65                          
    66                 </table> 
    67         </td> 
    6859<td> 
    6960                <table> 
     
    10394 
    10495 
    105 <td>{category}<br>{administrador}</td> 
     96 
    10697<td>    {location}</td> 
    10798 
     
    109100 
    110101 
    111 <td> 
    112 <a href="{accionmodificar}"><img src=/resources/templates/default/images/edit.png alt="modificar"></a>&nbsp;&nbsp;&nbsp; 
    113 </td> 
     102 
    114103<td> 
    115104<a href="{accionlistar}"><img src=/resources/templates/default/images/calendar.png alt="ver recursos asignados"></a>&nbsp;&nbsp;&nbsp; 
     
    121110<a href="{accionreservar}"><img src=/resources/templates/default/images/bookable.png alt="reservar"></a>&nbsp;&nbsp;&nbsp; 
    122111</td> 
    123 <td> 
    124112 
    125 <a href="" onClick="if ( 0 || confirm('eliminar esta entrada?')) return submitit2('{accionborrar}');; "><img src=/infolog/templates/default/images/delete.png alt="borrar"></a><br> 
    126  
    127  
    128 <br> 
    129  
    130 </td> 
    131113 
    132114 
  • contrib/Resources/templates/default/search2.tpl

    r3524 r4362  
    3131</script> 
    3232<center> 
    33  
    34 <table id="calendar_search_table" width="90%"> 
     33<table id="calendar_search_table" width="800"> 
    3534 
    3635<tr><td align=left> 
     
    4039         
    4140<td> 
    42                 <table> 
     41                <table width="150"> 
    4342         
    4443                        <tr> 
     
    5049        </td> 
    5150<td> 
    52                 <table> 
     51                <table width="300"> 
    5352         
    5453                        <tr> 
     
    6261         
    6362<td> 
    64                 <table> 
     63                <table width="100"> 
    6564         
    6665                        <tr> 
     
    7170                </table> 
    7271        </td> 
     72 
    7373<td> 
    74                 <table> 
    75          
    76                         <tr> 
    77                         <td class="inactiv_sortcolumn" align="left">Grupos</td> 
    78                          
    79                         </tr> 
    80                          
    81                 </table> 
    82         </td> 
    83         <td> 
    84                 <table> 
    85          
    86                         <tr> 
    87                         <td class="inactiv_sortcolumn" align="left">Prioridad</td> 
    88                          
    89                         </tr> 
    90                          
    91                 </table> 
    92         </td> 
    93 <td> 
    94                 <table> 
    95          
    96                         <tr> 
    97                         <td class="inactiv_sortcolumn" align="left">Public</td> 
    98                          
    99                         </tr> 
    100                          
    101                 </table> 
    102         </td> 
    103 <td> 
    104                 <table> 
     74                <table width="150"> 
    10575         
    10676                        <tr> 
     
    12595        </td> 
    12696<td> 
    127                 <table> 
     97                <table width="100"> 
    12898         
    12999                        <tr> 
     
    158128<td>{description}</td> 
    159129<td>    {location}</td> 
    160 <td>    {groups}</td> 
    161 <td>    {priority}</td> 
    162 <td>    {ispublic}</td> 
     130 
    163131<td>    {fecha}</td> 
    164 <td>{owner}</td> 
     132<td>{owner}<input type=hidden value={id}></td> 
    165133 
    166134 
  • contrib/Resources/todo

    r3526 r4362  
    1111add buy and prize functionality 
    1212add location functionality 
    13  
    14  
    15 CREATE TABLE phpgw_resources 
    16 ( 
    17   res_id integer NOT NULL DEFAULT nextval('seq_phpgw_resources'::regclass), 
    18   "name" character varying(100), 
    19   short_description character varying(100), 
    20   cat_id integer NOT NULL, 
    21   quantity integer, 
    22   useable integer, 
    23   "location" character varying(100), 
    24   bookable character(1), 
    25   prize character varying(200), 
    26   picture_src character varying(20), 
    27   accessory_of integer, 
    28   storage_info character varying(200), 
    29   inventory_number character varying(20), 
    30   administrador character varying(255), 
    31   email character varying(255), 
    32   "owner" character varying(255), 
    33   CONSTRAINT phpgw_resources_pkey PRIMARY KEY (res_id) 
    34 ) 
    35 WITH (OIDS=TRUE); 
    36 ALTER TABLE phpgw_resources OWNER TO postgres; 
Note: See TracChangeset for help on using the changeset viewer.