Location: PHPKode > projects > MembersGear > membersgear/includes/theme_class.php
<?php
 
 require_once "peardb_class.php";
    
 class themes_class extends peardb_class
 {   
    function View($pQuery, $pValues=false, $types=true, $pStart=0, $pEnd=0)
    {
        /*
        global $mdb2;    
        $result;  
 
        $query      = 'SELECT * FROM tbluser1 t limit 10;';
        $resultset  = $mdb2->query($query);
        
        if(PEAR::isError($resultset)) 
        {
            die("Failed to issue query, error message : " . $resultset->getMessage());
        }
        
        while($row = $resultset->fetchRow(MDB2_FETCHMODE_ASSOC))
        {
            $result[] = $row;
        }
                                                                                                                 
        return  $result;   
        */
        //print_r($pParameters);
        
        return $this->BaseView($pQuery,$pValues,$types,$pStart,$pEnd);
        
    }
    
    function Update($pQuery, $pValues=false, $types=true)
    { 
       
        return $this->BaseUpdate($pQuery, $pValues, $types);
    
    }

    
    function Insert($pQuery, $pValues=false, $types=true)
    { 
    
        return $this->BaseInsert($pQuery, $pValues, $types);
    
    }
    
     function Delete($pQuery, $pValues=false, $types=true)
    {
        
      return $this->BaseDelete($pQuery, $pValues,null);
        
    }
    
    function getDefaultTheme()
     {
       $themeQuery="select * from ".TABLE_PREFIX."theme where isdefault=1";
       $result=$this->View($themeQuery);
       return $result;
     }
     
     function getUnsubscribeContent($pThemeId)
      {
        $themeUnsubscribeQuery="select * from ".TABLE_PREFIX."theme_pages where themeid=$pThemeId and name='USER_UNSUBSCRIBE'";
        $result= $this->View($themeUnsubscribeQuery); 
        return $result;     
      
      }
      function getSubscribeContent($pThemeId)
      {
        $themeUnsubscribeQuery="select * from ".TABLE_PREFIX."theme_pages where themeid=$pThemeId and name='USER_SUBSCRIBE'";
        $result= $this->View($themeUnsubscribeQuery); 
        return $result;     
      
      }
    
 }   
   
   
 
    

?>
Return current item: MembersGear