Beispiel #1
0
		function mylink_categories_selbox( $whr )
		{
			include_once dirname( dirname(__FILE__) ).'/class/mycategory.php' ;
			$mycategory = new MyCategory( $this->mydirname, 'Show' ) ;

			$category = array() ;
			$idarray = $this->get_mylink_idarray() ;
			if( empty( $idarray ) ) return array() ;

			$sql  = "SELECT d.cid, c.path FROM ".$this->table." d LEFT JOIN ".$this->cat_table." c ON d.cid=c.cid" ;
			$sql .= " WHERE ( d.".$whr." ) AND ( ". $this->get_whr_mylink( $idarray )." ) ORDER BY c.cat_weight ASC" ;
			$result = $this->db->query( $sql ) ;
			while( $array = $this->db->fetchArray( $result ) ) {
				foreach ( $array as $key=>$value ){
					$$key = $value;
				}
				$catid = intval( $cid ) ;
				$path_array = $mycategory->unserialize_my_path( $catid, $whr, $path ) ;
				$category[ $catid ]  = $mycategory->getPathFromId( $catid, $whr , $path_array ) ;
				$category[ $catid ] .= " (".$this->total_mylink( $catid, $whr, 0, $idarray ).")" ;
			}
			return $category ;
		}