attachment
[ class tree: attachment ] [ index: attachment ] [ all elements ]

Source for file attachment.inc.php

Documentation is available at attachment.inc.php

  1. <?php
  2.     /**
  3.      * @author            Matthias Reuter ($LastChangedBy: matthias $)
  4.      * @version            $LastChangedDate: 2009-08-26 19:19:41 +0200 (Mi, 26 Aug 2009) $
  5.      * @package            attachment
  6.      * @copyright        2007-2010 IPBWI development team
  7.      * @link            http://ipbwi.com/examples/attachment.php
  8.      * @since            2.0
  9.      * @license            http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License
  10.      */
  11.     class ipbwi_attachment extends ipbwi {
  12.         private    $ipbwi            null;
  13.         private    $mimeTypes        array();
  14.         private    $memoryLimit    false;
  15.         private    $maxFileSize    false;
  16.         private    $postMaxSize    false;
  17.         public    $hash            = false;
  18.         /**
  19.          * @desc            Loads and checks different vars when class is initiating
  20.          * @param    object    ipbwi The ipbwi class object
  21.          * @author            Matthias Reuter
  22.          * @since            2.0
  23.          * @ignore
  24.          */
  25.         public function __construct($ipbwi){
  26.             // loads common classes
  27.             $this->ipbwi $ipbwi;
  28.  
  29.             // load mimetypes
  30.             $mimeTypes array();
  31.             require_once(ipbwi_ROOT_PATH.'mimetypes.inc.php');
  32.             $this->mimeTypes $mimeTypes;
  33.  
  34.             // load upload max filesize
  35.             $this->memoryLimit        ini_get('memory_limit');
  36.             $this->maxFileSize        ini_get('upload_max_filesize');
  37.             $this->postMaxSize        ini_get('post_max_size');
  38.  
  39.             // create table for attachment deeplink protection
  40.             $sql_create '
  41.             CREATE TABLE IF NOT EXISTS '.ipbwi_DB_prefix.'attach_protect (
  42.             hashkey TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  43.             hashtime TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL
  44.             ) ENGINE = MYISAM;';
  45.             $this->ipbwi->ips_wrapper->DB->query($sql_create);
  46.  
  47.             // check if 24h are past
  48.             $sql_select 'SELECT * FROM '.ipbwi_DB_prefix.'attach_protect';
  49.             $sql_select $this->ipbwi->ips_wrapper->DB->query($sql_select);
  50.             $oldHash $this->ipbwi->ips_wrapper->DB->fetch($sql_select);
  51.  
  52.             // update hash after 24h
  53.             $newHash md5(rand()+time());
  54.             if($oldHash != false && is_array($oldHash&& $oldHash['hashtime'time()){
  55.                 $sql_update 'UPDATE '.ipbwi_DB_prefix.'attach_protect SET hashkey = "'.$newHash.'", hashtime = "'.(time()+86400).'" WHERE hashkey = "'.$oldHash['hashkey'].'";';
  56.                 $this->ipbwi->ips_wrapper->DB->query($sql_update);
  57.                 $this->hash = $newHash;
  58.             }elseif(empty($oldHash)){
  59.                 $sql_insert 'INSERT INTO '.ipbwi_DB_prefix.'attach_protect VALUES("'.$newHash.'", "'.(time()+86400).'");';
  60.                 $this->ipbwi->ips_wrapper->DB->query($sql_insert);
  61.                 $this->hash = $newHash;
  62.             }else{
  63.                 $this->hash = $oldHash['hashkey'];
  64.             }
  65.         }
  66.         /**
  67.          * @desc            reads a file from filesystem and sends it to the browser (chunked)
  68.          * @param    string    $filename serverside path and filename
  69.          * @param    bool    $retbytes set to true, if filesize in bytes should be returned
  70.          * @return    string    $returns filesize or status
  71.          * @author            Matthias Reuter
  72.          * @since            2.0
  73.          */
  74.         private function readFile($filename,$retbytes=true){
  75.             $chunksize 1*(1024*1024)// how many bytes per chunk
  76.             $buffer '';
  77.             $cnt =0;
  78.             // $handle = fopen($filename, 'rb');
  79.             $handle fopen($filename'rb');
  80.             if($handle === false){
  81.                 return false;
  82.             }
  83.             while(!feof($handle)){
  84.                 $buffer fread($handle$chunksize);
  85.                 echo $buffer;
  86.                 flush();
  87.                 if($retbytes){
  88.                     $cnt += strlen($buffer);
  89.                 }
  90.             }
  91.             $status fclose($handle);
  92.             if($retbytes && $status){
  93.                 return $cnt// return num. bytes delivered like readfile() does.
  94.             }
  95.             return $status;
  96.         }
  97.         /**
  98.          * @desc            gets the correct mime-type for the given file-extension
  99.          * @param    string    $ext file-extension without a dot. example: jpg
  100.          * @return    string    correct mimetype
  101.          * @author            Matthias Reuter
  102.          * @since            2.0
  103.          */
  104.         private function mimeType($ext){
  105.             if(isset($this->mimeTypes[$ext])){
  106.                 return $this->mimeTypes[$ext];
  107.             }else{
  108.                 $this->ipbwi->addSystemMessage('Error',$this->ipbwi->getLibLang('attachMimeNotFound'),'Located in file <strong>'.__FILE__.'</strong> at class <strong>'.__CLASS__.'</strong> in function <strong>'.__FUNCTION__.'</strong> on line #<strong>'.__LINE__.'</strong>');
  109.                 return false;
  110.             }
  111.         }
  112.         /**
  113.          * @desc            get's all available informations about attachments
  114.          * @param    mixed    $IDs relIDs (post or msg IDs) of the requested attachments. Deliver them as array or single integer.
  115.          * @param    array    $settings array with different settings for this function
  116.          *  The following settings are supported:
  117.          *  + string <b>$settings[ipbwiLink]:</b> If you want to use IPBWI for attachment-downloading, you are able to define the attachment-link here. The var %id% is required and will be replaced with the attachment-ID. The var %hash% is optional and will be replaced with current hash key for deeplink protection.
  118.          *  + string    <b>$settings[type]:</b> Define which type your IDs are, choose between post or msg
  119.          * @param    bool    $bypassPerms set to true, to ignore permissions
  120.          * @return    array    attachment-informations in an array
  121.          * @author            Matthias Reuter
  122.          * @sample
  123.          *  <code>
  124.          *  $ipbwi->attachment->info(12,array('type' => 'post','ipbwiLink' => ipbwi_WEB_URL.'examples/attachment.php?id=%id%'));
  125.          *  $ipbwi->attachment->info(12,array('type' => 'post','ipbwiLink' => ipbwi_WEB_URL.'examples/attachment.php?id=%id%&hash=%hash%'));
  126.          *  $ipbwi->attachment->info(array(20,104,55), array('type' => 'msg'),true);
  127.          *  </code>
  128.          * @since            2.0
  129.          */
  130.         public function info($IDs,$settings=array(),$bypassPerms=false){
  131.             // Initialize settings
  132.             if(empty($settings['ipbwiLink'])){
  133.                 $settings['ipbwiLink'false;
  134.             }
  135.             // define module
  136.             if(isset($settings['type']&& ($settings['type'== 'forum' || $settings['type'== 'topic' || $settings['type'== 'post')){
  137.                 $module 'post';
  138.             }elseif(isset($settings['type']&& $settings['type'== 'msg'){
  139.                 $module 'msg';
  140.             }else{
  141.                 $module false;
  142.             }
  143.             if($bypassPerms === false){
  144.                 $approved ' AND attach_approved="1"';
  145.             }else{
  146.                 $approved false;
  147.             }
  148.             // get attachments list
  149.             if($module === false){
  150.                 // more than one IDs?
  151.                 if(is_array($IDs)){
  152.                     $dbID '';
  153.                     foreach($IDs as $ID){
  154.                         if($dbID){
  155.                             $dbID .= ' OR attach_id = "'.intval($ID).'"';
  156.                         }else{
  157.                             $dbID 'attach_id = "'.intval($ID).'"';
  158.                         }
  159.                     }
  160.                 }else{
  161.                     $dbID 'attach_id = "'.intval($IDs).'"';
  162.                 }
  163.                 $query $this->ipbwi->ips_wrapper->DB->query('SELECT * FROM '.$this->ipbwi->board['sql_tbl_prefix'].'attachments WHERE ('.$dbID.')'.$approved.' ORDER BY attach_date DESC');
  164.             }else{
  165.                 // more than one IDs?
  166.                 if(is_array($IDs)){
  167.                     $dbID '';
  168.                     foreach($IDs as $ID){
  169.                         if($dbID){
  170.                             $dbID .= ' OR attach_rel_id = "'.intval($ID).'"';
  171.                         }else{
  172.                             $dbID 'attach_rel_id = "'.intval($ID).'"';
  173.                         }
  174.                     }
  175.                 }else{
  176.                     $dbID 'attach_rel_id = "'.intval($IDs).'"';
  177.                 }
  178.                 $query $this->ipbwi->ips_wrapper->DB->query('SELECT * FROM '.$this->ipbwi->board['sql_tbl_prefix'].'attachments WHERE attach_rel_module = "'.$module.'"'.$approved.' AND ('.$dbID.') ORDER BY attach_date DESC');
  179.             }
  180.             if($this->ipbwi->ips_wrapper->DB->getTotalRows($query== 0){
  181.                 return false;
  182.             }
  183.             while($row $this->ipbwi->ips_wrapper->DB->fetch($query)){
  184.                 // define board link
  185.                 $row['boardURL'$this->ipbwi->getBoardVar('upload_url').$row['attach_location'];
  186.                 $row['boardLink''<a href="'.$row['boardURL'].'">'.$row['attach_file'].'</a>';
  187.                 if($row['attach_is_image'== 1){
  188.                     // get image code
  189.                     $filePath $this->ipbwi->getBoardVar('upload_dir').$row['attach_location'];
  190.                     if(file_exists($filePath&& $size getimagesize($filePath)){
  191.                         $row['boardImageHTML''<img src="'.$row['boardURL'].'" '.$size[3].' alt="'.$row['attach_file'].'" />';
  192.                     }
  193.                     // get thumb code
  194.                     if($row['attach_thumb_location'!= ''){
  195.                         $row['boardThumbHTML''<a href="'.$row['boardURL'].'"><img src="'.$this->ipbwi->getBoardVar('upload_url').$row['attach_thumb_location'].'" width="'.$row['attach_thumb_width'].'" height="'.$row['attach_thumb_height'].'" alt="'.$row['attach_file'].'" /></a>';
  196.                     }
  197.                 }
  198.                 // define default best-case-code
  199.                 if(isset($row['boardThumbHTML'])){
  200.                     $row['defaultHTML'$row['boardThumbHTML'];
  201.                 }elseif(isset($row['boardImageHTML'])){
  202.                     $row['defaultHTML'$row['boardImageHTML'];
  203.                 }else{
  204.                     $row['defaultHTML'$row['boardLink'];
  205.                 }
  206.                 // define ipbwi link
  207.                 if($settings['ipbwiLink']){
  208.                     $row['ipbwiURL'str_replace(array('%id%','%hash%'),array($row['attach_id'],$this->hash),$settings['ipbwiLink']);
  209.                     $row['ipbwiLink''<a href="'.$row['ipbwiURL'].'">'.$row['attach_file'].'</a>';
  210.                     if($row['attach_is_image'== 1){
  211.                         // get image code
  212.                         $filePath $this->ipbwi->getBoardVar('upload_dir').$row['attach_location'];
  213.                         if($size getimagesize($filePath)){
  214.                             $row['ipbwiImageHTML''<img src="'.$row['ipbwiURL'].'" '.$size[3].' alt="'.$row['attach_file'].'" />';
  215.                         }
  216.                         // get thumb code
  217.                         if($row['attach_thumb_location'!= ''){
  218.                             $row['ipbwiThumbHTML''<a href="'.$row['ipbwiURL'].'"><img src="'.$this->ipbwi->getBoardVar('upload_url').$row['attach_thumb_location'].'" width="'.$row['attach_thumb_width'].'" height="'.$row['attach_thumb_height'].'" alt="'.$row['attach_file'].'" /></a>';
  219.                         }
  220.                     }
  221.                     // define default best-case-code
  222.                     if(isset($row['ipbwiThumbHTML'])){
  223.                         $row['defaultHTML'$row['ipbwiThumbHTML'];
  224.                     }elseif(isset($row['ipbwiImageHTML'])){
  225.                         $row['defaultHTML'$row['ipbwiImageHTML'];
  226.                     }else{
  227.                         $row['defaultHTML'$row['ipbwiLink'];
  228.                     }
  229.                 }
  230.                 $attachments[$row['attach_id']] $row;
  231.             }
  232.             // prevent a multidimensional array when there is just one entry
  233.             if(count($attachments== 1){
  234.                 foreach($attachments as $attachment){
  235.                     $attachments $attachment;
  236.                 }
  237.             }
  238.             return $attachments;
  239.         }
  240.         /**
  241.          * @desc            get's all available informations about attachments either from a list of forums, topics, posts or private messages
  242.          * @param    mixed    $IDs  IDs of the requested forums, topics, posts or PMs. Deliver them as array or single integer.
  243.          * @param    array    $settings array with different settings for this function
  244.          *  The following settings are supported:
  245.          *  + string <b>$settings[start]:</b> For performance purposes, you are able to set a start parameter to set a section of the attachment list. This is used for forum-attachment-list only.
  246.          *  + string <b>$settings[limit]:</b> For performance purposes, you are able to set a limit parameter to set a section of the attachment list. This is used for forum-attachment-list only.
  247.          *  + string <b>$settings[ipbwiLink]:</b> If you want to use IPBWI for attachment-downloading, you are able to define the attachment-link here. The var %id% is required and will be replaced with the attachment-ID.
  248.          *  + string    <b>$settings[type]:</b> Define which type your IDs are, choose between post or msg
  249.          * @param    bool    $bypassPerms set to true, to ignore permissions
  250.          * @return    array    attachment-informations in an array
  251.          * @author            Matthias Reuter
  252.          * @sample
  253.          *  <code>
  254.          *  $ipbwi->attachment->getList(12,array('type' => 'forum','start' => 10, 'limit' => 20));
  255.          *  $ipbwi->attachment->getList(array(20,104,55), array('type' => 'topic'),true);
  256.          *  </code>
  257.          * @since            2.0
  258.          */
  259.         public function getList($IDs,$settings=array(),$bypassPerms=false){
  260.             // retrieve attachments of a forum
  261.             if($settings['type'== 'forum'){
  262.                 $IDs $this->ipbwi->topic->getListIDs($IDs,$settings['start'],$settings['limit'],$bypassPerms);
  263.             // retrieve attachments of a topic
  264.             }elseif($settings['type'== 'topic'){
  265.                 $IDs $this->ipbwi->post->getListIDs($IDs);
  266.             }
  267.             // return attachment informations
  268.             return $this->info($IDs,$settings,$bypassPerms);
  269.         }
  270.         /**
  271.          * @desc            loads and views an attachment
  272.          * @param    int        $attachID ID of the attachment
  273.          * @param    bool    $bypassPerms set to true, to ignore permissions
  274.          * @return    file    returns attachment-file to the browser
  275.          * @author            Matthias Reuter
  276.          * @sample
  277.          *  <code>
  278.          *  $ipbwi->attachment->load(10,true);
  279.          *  </code>
  280.          * @since            2.0
  281.          */
  282.         public function load($attachID,$bypassPerms=false){
  283.             $attachInfo $this->info($attachID,$bypassPerms);
  284.             if($attachInfo){
  285.                 $fileName $attachInfo['attach_file'];
  286.                 $fileAddress $this->ipbwi->getBoardVar('upload_dir').$attachInfo['attach_location'];
  287.                 if(file_exists($fileAddress&& is_file($fileAddress)){
  288.                     header('Content-Length: '.filesize($fileAddress));
  289.                     // if attachment is a known image
  290.                     if($attachInfo['attach_is_image'&& $this->mimeType($attachInfo['attach_ext'])){
  291.                         header('Content-Disposition: inline; filename="'.$fileName.'"');
  292.                         header('Content-Type: '.$this->mimeType($attachInfo['attach_ext']));
  293.                         $this->readFile($fileAddress);
  294.                         die();
  295.                     }
  296.                     // if attachment is a known filetype
  297.                     elseif($this->mimeType($attachInfo['attach_ext'])){
  298.                         header('Content-Disposition: attachment; filename="'.$fileName.'"');
  299.                         header('Content-Type: '.$this->mimeType($attachInfo['attach_ext']));
  300.                         $this->readFile($fileAddress);
  301.                         die();
  302.                     }
  303.                     // if attachment is an unknown filetype
  304.                     else {
  305.                         header('Content-Type: x-application/x-octet-stream');
  306.                         header('Content-Disposition: attachment; filename="'.$fileName.'"');
  307.                         $this->readFile($fileAddress);
  308.                         die();
  309.                     }
  310.                 }else{
  311.                     $this->ipbwi->addSystemMessage('Error',$this->ipbwi->getLibLang('attachNotFoundFS'),'Located in file <strong>'.__FILE__.'</strong> at class <strong>'.__CLASS__.'</strong> in function <strong>'.__FUNCTION__.'</strong> on line #<strong>'.__LINE__.'</strong>');
  312.                     return false;
  313.                 }
  314.             }else{
  315.                 $this->ipbwi->addSystemMessage('Error',$this->ipbwi->getLibLang('attachNotFoundDB'),'Located in file <strong>'.__FILE__.'</strong> at class <strong>'.__CLASS__.'</strong> in function <strong>'.__FUNCTION__.'</strong> on line #<strong>'.__LINE__.'</strong>');
  316.                 return false;
  317.             }
  318.         }
  319.  
  320.         // @todo implement in later versions
  321.         private function create(){
  322.  
  323.         }
  324.         private function uploadFile(){
  325.  
  326.         }
  327.         private function moveFile(){
  328.             rename($dir.$_POST['file_select']$GLOBALS['straightCMS']['config']['root']['uploadpath'].$new_file_name);
  329.         }
  330.         private function copyFile($fileName,$postID){
  331.             if($this->ipbwi->member->isLoggedIn()){
  332.                 $member $this->ipbwi->member->info();
  333.                 $post $this->ipbwi->post->info($postID);
  334.                 // @todo implement permission check including bypass perms
  335.                 $files scandir(ipbwi_UPLOAD_PATH);
  336.                 if(in_array($_POST['file_select'],$files)){
  337.                     // copy file
  338.                     $newFileName    'post-'.$member['id'].'-'.time().'.ipb';
  339.                     $newDest        $this->ipbwi->getBoardVar('upload_dir').$newFileName;
  340.                     $fileParts        explode('.',$fileName);
  341.                     $filePartsCount    count($fileParts);
  342.                     $fileExt        $fileParts[$filePartsCount-1];
  343.                     copy(ipbwi_UPLOAD_PATH.$fileName$newDest);
  344.                     // check of allowed file extension
  345.                     $this->ipbwi->ips_wrapper->DB->query('SELECT atype_post FROM '.$this->ipbwi->board['sql_tbl_prefix'].'attachments_type WHERE atype_extension = '.$fileExt);
  346.                     if($row $this->ipbwi->ips_wrapper->DB->fetch()){
  347.                         if($row['atype_post'!= 1){
  348.                             $this->ipbwi->addSystemMessage('Error',$this->ipbwi->getLibLang('attachFileExtNotAllowed'),'Located in file <strong>'.__FILE__.'</strong> at class <strong>'.__CLASS__.'</strong> in function <strong>'.__FUNCTION__.'</strong> on line #<strong>'.__LINE__.'</strong>');
  349.                             return false;
  350.                         }
  351.                     }else{
  352.                         $this->ipbwi->addSystemMessage('Error',$this->ipbwi->getLibLang('attachFileExtNotExists'),'Located in file <strong>'.__FILE__.'</strong> at class <strong>'.__CLASS__.'</strong> in function <strong>'.__FUNCTION__.'</strong> on line #<strong>'.__LINE__.'</strong>');
  353.                         return false;
  354.                     }
  355.                     // check if file exceeds max file space per attachment of user
  356.                     $group $this->ipbwi->group->info();
  357.                     if(filesize($newDest$group['g_attach_per_post']){
  358.                         $this->ipbwi->addSystemMessage('Error',$this->ipbwi->getLibLang('attachFileTooBig'),'Located in file <strong>'.__FILE__.'</strong> at class <strong>'.__CLASS__.'</strong> in function <strong>'.__FUNCTION__.'</strong> on line #<strong>'.__LINE__.'</strong>');
  359.                         return false;
  360.                     }
  361.                     // check if file exceeds max file space of user
  362.                     if(filesize($newDest$group['g_attach_max']){
  363.                         $this->ipbwi->addSystemMessage('Error',$this->ipbwi->getLibLang('attachFileExceedsUserSpace'),'Located in file <strong>'.__FILE__.'</strong> at class <strong>'.__CLASS__.'</strong> in function <strong>'.__FUNCTION__.'</strong> on line #<strong>'.__LINE__.'</strong>');
  364.                         return false;
  365.                     }
  366.                     // check for permissions
  367.                     $topic $this->ipbwi->topic->info($post['topic_id']);
  368.                     $forum $this->ipbwi->forum->info($topic['forum_id']);
  369.                     $permission unserialize($forum['permission_array']);
  370.                     $permission $permission['upload_perms'];
  371.                     if(!in_array($group['g_id'],explode(',',$permission)) && !$bypassPerms){
  372.                         $this->ipbwi->addSystemMessage('Error',$this->ipbwi->getLibLang('noPerms'),'Located in file <strong>'.__FILE__.'</strong> at class <strong>'.__CLASS__.'</strong> in function <strong>'.__FUNCTION__.'</strong> on line #<strong>'.__LINE__.'</strong>');
  373.                         return false;
  374.                     }
  375.                     // @todo implement thumb creation
  376.                     // update database
  377.                     $hash            $post['post_key'];
  378.                     $sql =
  379.                     'INSERT INTO '.$this->ipbwi->board['sql_tbl_prefix'].'attachments'.
  380.                     '(' .
  381.                         'attach_ext,
  382.                         attach_file,
  383.                         attach_location,
  384.                         attach_thumb_location,
  385.                         attach_thumb_width,
  386.                         attach_thumb_height,
  387.                         attach_is_image,
  388.                         attach_hits,
  389.                         attach_date,
  390.                         attach_temp,
  391.                         attach_pid,
  392.                         attach_post_key,
  393.                         attach_msg,
  394.                         attach_member_id,
  395.                         attach_approved,
  396.                         attach_filesize' .
  397.                     ')'.
  398.                     'VALUES'.
  399.                     '(' .
  400.                         '"'.$fileExt.'",
  401.                         "'.$fileName.'",
  402.                         "'.$newFileName.'",
  403.                         "",
  404.                         "0",
  405.                         "0",
  406.                         "0",
  407.                         "0",
  408.                         "'.time().'",
  409.                         "0",
  410.                         "'.$postID.'",
  411.                         "'.$hash.'",
  412.                         "0",
  413.                         "'.$member['id'].'",
  414.                         "1",
  415.                         "'.filesize($this->ipbwi->getBoardVar('upload_dir').$newFileName).'"'.
  416.                     ');';
  417.                     if($this->ipbwi->ips_wrapper->DB->query($sql)){
  418.                         $this->ipbwi->addSystemMessage('Success',$this->ipbwi->getLibLang('attachCreated'),'Located in file <strong>'.__FILE__.'</strong> at class <strong>'.__CLASS__.'</strong> in function <strong>'.__FUNCTION__.'</strong> on line #<strong>'.__LINE__.'</strong>');
  419.                         return true;
  420.                     }else{
  421.                         $this->ipbwi->addSystemMessage('Error',$this->ipbwi->getLibLang('attachCreationFailed'),'Located in file <strong>'.__FILE__.'</strong> at class <strong>'.__CLASS__.'</strong> in function <strong>'.__FUNCTION__.'</strong> on line #<strong>'.__LINE__.'</strong>');
  422.                         return false;
  423.                     }
  424.                 }else{
  425.                     $this->ipbwi->addSystemMessage('Error',$this->ipbwi->getLibLang('attachFileNotInUploadDir'),'Located in file <strong>'.__FILE__.'</strong> at class <strong>'.__CLASS__.'</strong> in function <strong>'.__FUNCTION__.'</strong> on line #<strong>'.__LINE__.'</strong>');
  426.                     return false;
  427.                 }
  428.             }else{
  429.                 $this->ipbwi->addSystemMessage('Error',$this->ipbwi->getLibLang('membersOnly'),'Located in file <strong>'.__FILE__.'</strong> at class <strong>'.__CLASS__.'</strong> in function <strong>'.__FUNCTION__.'</strong> on line #<strong>'.__LINE__.'</strong>');
  430.                 return false;
  431.             }
  432.         }
  433.         private function delete(){
  434.  
  435.         }
  436.     }
  437. ?>

Documentation generated on Sat, 23 Oct 2010 23:35:46 +0200 by phpDocumentor 1.4.3