0) { $sql = "SELECT m.model_type_key,m.model_key,model_title,model_desc,model_code,ot.object_type_title,ot.object_type_key,o.object_desc,o.object_code,o.object_title,o.object_format,o.life_cycle_status, o.URI FROM hw_models m, hw_objects o, hw_object_types ot where o.model_key=m.model_key and o.object_type_key=ot.object_type_key and o.object_key=".$object_key; $result = $conn->query($sql); $row = $result->fetch_assoc(); $object_type_key=$row['object_type_key']; $model_type_key=$row['model_type_key']; $model_key=$row['model_key']; $object_type_title=$row['object_type_title']; $model_title=$row['model_title']; $object_title=$_GET['title']; $rec_limit = 50; $pageurl="hw_attributes.php?key=" . $object_key . "&title=" . $object_title; $sql2 = "SELECT count(*) total FROM hw_attributes a, hw_objects_attributes oa where hw_attribute_status!='deleted' and a.attribute_key= oa.attribute_key and oa.object_key=".$object_key; $result2 = $conn->query($sql2); $row2 = $result2->fetch_assoc(); $rec_count=$row2['total']; if( isset($_GET{'page'} ) ) { $page = ($_GET{'page'}*1) + 1; $offset = $rec_limit * $page ; } else { $page = 0; $offset = 0; } $left_rec = $rec_count - ($page * $rec_limit); $sql = "SELECT * FROM hw_attributes a, hw_objects_attributes oa where hw_attribute_status!='deleted' and a.attribute_key= oa.attribute_key and oa.object_key=".$object_key." LIMIT ".$offset.", ".$rec_limit; $result = $conn->query($sql); //echo "

".$model_title." - ".$object_type_title."

"; echo "
"; if($model_type_key==6){ echo "Glossaries " . $model_title . "
"; }else { echo "Models " . $model_title . " " . $object_type_title . "
"; } // output data of each row echo "
".$object_title."
Code
".$row['object_code']."
Title
".$row['object_title']."
Description
".$row['object_desc']."
Format
".$row['object_format']."
Life Cycle Status
".$row['life_cycle_status']."
"; if($row['URI']!=""){echo "";} echo "
"; if ($result->num_rows > 0) { echo "
Attributes
"; echo ''; echo "
Attribute Code
Attribute Title
"; $cnt=$offset; while ($row = $result->fetch_assoc()) { $cnt++; echo "
".$cnt."
".$row["attribute_code"] . "
" . $row["attribute_title"] . "
"; } $totalpages=round($rec_count/$rec_limit, 0, PHP_ROUND_HALF_UP)-1; if($rec_limit<$rec_count){ echo "
"; if( $page > 0 ) { $last = $page - 2; echo "First   |  "; echo "Prev   |  "; if($page <$totalpages+1){ echo "Next   |  "; echo "Last "; } } else if( $page == 0 && $page <$totalpages+2) { echo "Next   |  "; echo "Last "; } else if( $left_rec < $rec_limit ) { $last = $page - 2; echo "First   |  "; echo "Prev "; } echo "
"; } echo "
"; } else { echo ""; } echo "
"; getMappings($object_key ,'object',$conn); }else{ echo "No Object Selected";} ?>
Thank You
Thank You
Thank You