Beispiel #1
0
 $title = $a_identified_hw->idstring;
 $usbid = $a_identified_hw->usbid;
 $pciid = $a_identified_hw->pciid;
 $art_image = get_the_post_thumbnail($a_identified_hw->postid, array(55, 55));
 $comment = $a_identified_hw->usercomment;
 $url = $a_identified_hw->url;
 $id = $a_identified_hw->id;
 $scantype = $a_identified_hw->scantype;
 $default_y = 'checked="checked"';
 $default_n = "";
 $buttontype = "green";
 $buttontext = $txt_submit;
 #"Submit";
 $showme = lhg_show_scanned_component($title, $id, $pciid);
 $short_pci_title = lhg_clean_pci_title($title);
 $is_onboard = lhg_pci_component_is_onboard($title, $sid, $id, $pciid);
 global $txt_yes;
 global $txt_no;
 if ($is_onboard == "yes") {
     $default_y = 'checked';
     $default_n = '';
 }
 if ($is_onboard == "no") {
     $default_y = '';
     $default_n = 'checked';
     $showme = true;
 }
 #if ($is_onboard == "yes")  { array_push( $pci_obl , $pciid); }
 #print "IO: $is_onboard - OBL: ".var_dump($pci_obl)." - PCIID: $pciid<br>";
 if ($comment != "" or $url != "") {
     $buttontype = "light";
function lhg_get_mainboard_fingerprint($sid)
{
    # list of pci ids whch are onboard
    $pci_obl = array();
    # search for scanned items
    global $lhg_price_db;
    $myquery = $lhg_price_db->prepare("SELECT id, postid, usbid, pciid, idstring , usercomment , url , scantype FROM `lhghwscans` WHERE sid = %s AND postid = 0 AND pciid <> ''", $sid);
    #$sql = "SELECT id FROM `lhgshops` WHERE region <> \"de\"";
    $unidentified_hw_pci = $lhg_price_db->get_results($myquery);
    foreach ($unidentified_hw_pci as $a_identified_hw) {
        $pciid = $a_identified_hw->pciid;
        $title = $a_identified_hw->idstring;
        $id = $a_identified_hw->id;
        $is_onboard = lhg_pci_component_is_onboard($title, $sid, $id, $pciid);
        #print "ID: $id > $pciid - OB: $is_onboard<br>";
        if ($is_onboard == "yes") {
            array_push($pci_obl, $pciid);
        }
    }
    #use , as separator!
    $pcistring = implode(",", $pci_obl);
    return $pcistring;
    #print "PCI-Onboard: "; var_dump( $pci_obl );
}