Project

General

Profile

Statistics
| Branch: | Revision:

colonymech / docs / www / colonyscout / internal / partsview.php @ f59acf11

History | View | Annotate | Download (2.85 KB)

1
<?php require("includes/internal.php");
2
$pageType="parts";
3
?>
4

    
5
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
6
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head> 
7
                <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>        
8
                <meta name="description" content="FILL IN"/> 
9
                <meta name="keywords" content="FILL IN"/> 
10
<?php include($docRoot."internal/includes/header_internal.php"); ?>
11
                <title>View Part| ColonyScout.com</title>
12
<?php include('includes/querybox.php');?>
13
</head>
14
<body bgcolor="#eeeeee"> 
15

    
16
<div id="general"> 
17
<?php include("includes/nav_internal.php"); ?> 
18
        <div id="body">
19
                <div id="body-boxes">
20
                        <div class="box-row" style="margin-top: 7px;">
21
                                <div class="white-top"></div>                
22
                                <div class="white-body text-box">
23

    
24
<?php
25
        if(!isset($_GET["q"])) {
26
                echo "<h1 style=\"color:#FF6600;\">Please search for a part..</h1>";
27
        } else {
28
                $info = getPartInfo($_GET["q"]);
29
                $datasheet = ($info["datasheet"]=="") ? $info["url"]        : $info["datasheet"];
30
                $systems = getSystemsForPart($info["data"]["ID"]);$usedString="";
31
                if (!empty($systems)) {
32
                        foreach($systems as $sysName) {$usedString.=$sysName.", ";}
33
                }
34
                
35
                echo ($info["data"]==0)
36
                ?
37
                        "<h1 style=\"color:#FF6600;\">Sorry, that part number could not be found.</h1>"
38
                : 
39
                        "
40
                        <div style=\"overflow:hidden;\">
41
                                <img src=\"".$info["thumb"]."\" width=\"200px\" class=\"box-img\"/>
42
                                <div class=\"box-part-title\"><h1>".$info["data"]["Name"]." ".$info["data"]["Description"]."</h1><br/>
43
                                        <h2 class=\"part\">".$info["vendor"].": ".$info["data"]["VendorPartNo"]."<a target=\"_blank;\" href=\"".$info["url"]."\">
44
                                        <img src=\"images/shortcut.png\"/></a></h2>
45
                                </div>
46
                                <div class=\"box-part-text\">
47
                                        <table class=\"part-content\">
48
                                        <tr>
49
                                                <td align=\"right\"><b>Datasheet:</b></td>
50
                                                <td><a href=\"".$datasheet."\"><img src=\"images/pdf.gif\"/> ".$info["data"]["VendorPartNo"]."</a></td>
51
                                                <td width=\"150px\" rowspan=\"5\">".getPriceTable($info["data"]["VendorPartNo"])."</td>                                                
52
                                        </tr>
53
                                        <tr>
54
                                                <td width=\"160px\" align=\"right\"><b>Manufacturer:</b></td>
55
                                                <td width=\"190px\">".$info["data"]["ManufacturerName"]."</td>
56
                                        </tr>
57
                                        <tr>        
58
                                                <td align=\"right\"><b>Manufacturer Part No: </b></td>
59
                                                <td>".$info["data"]["ManufacturerPartNo"]."</td>
60
                                        </tr>
61
                                        <tr>
62
                                                <td align=\"right\"><b>Used:</b></td>
63
                                                <td>".$usedString." ".$info["data"]["WhereUsed"]."</td>
64
                                        </tr>
65
                                        <tr>
66
                                                <td align=\"right\"><b>Qty In Stock:</b></td>
67
                                                <td>".$info["data"]["InStock"]."</td>
68
                                        </tr>
69
                                        </table>
70
                                </div>
71
                        </div>
72
                        ";
73
        }                                
74
?>
75
                                </div>
76
                                <div class="white-bottom"></div>
77
                        </div>        
78
                </div>        
79
        </div> <!--BODY!--> 
80

    
81

    
82
<?php include($docRoot."footer.php"); ?>
83

    
84
</div><!--GENERAL!--> 
85
 
86
 
87
</body></html>
88

    
89
<?php                
90
        mysqli_close($mysqli);
91
?>