From 3ff03dc4f0a72432b34c00da620272cf011e4ddd Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Thu, 29 Jul 2021 14:17:20 +1000 Subject: Publishing h-node.org code. - this is the h-node.org code, except - removed a js file (3x copies at three different locations) without license / copyright headers - /Js/linkToForm.js - /Public/Js/linkToForm.js - /admin/Public/Js/linkToForm.js - removed config files containing credentials - /Application/Include/params.php - /Config/Config.php - /admin/Application/Include/params.php - /admin/Config/Config.php - added license and copyright header to one php file - /admin/Library/ErrorReporting.php (almost identical to /Library/ErrorReporting.php which has the headers) --- h-source/admin/Application/Include/hardware.php | 216 ++++++++++++++++++++++++ 1 file changed, 216 insertions(+) create mode 100644 h-source/admin/Application/Include/hardware.php (limited to 'h-source/admin/Application/Include/hardware.php') diff --git a/h-source/admin/Application/Include/hardware.php b/h-source/admin/Application/Include/hardware.php new file mode 100644 index 0000000..62dfa37 --- /dev/null +++ b/h-source/admin/Application/Include/hardware.php @@ -0,0 +1,216 @@ +. + +if (!defined('EG')) die('Direct access not allowed!'); + + +class Hardware +{ + + public static $controllers = array('notebooks','wifi','videocards','printers','scanners'); //used by UsersController::login() + + public static $commYear = 'not-specified,2010,2009,2008,2007,2006,2005,2004,2003,2002,2001,2000,1999,1998,1997,1996,1995,1994,1993,1992'; + +} + +class Printer extends hardware +{ + public static $vendors = array( + "brother" => "brother", + "Canon" => "Canon", + "EPSON" => "EPSON", + "Lexmark" => "Lexmark", + "KONICA-MINOLTA" => "KONICA-MINOLTA", + "Hewlett-Packard" => "Hewlett-Packard", + "Panasonic" => "Panasonic", + "RICOH" => "RICOH", + "SAMSUNG" => "SAMSUNG", + "SHARP" => "SHARP", + "TOSHIBA" => "TOSHIBA", + "XEROX" => "XEROX", + ); + + public static $compatibility = array( + "A Full" => "A-Full", + "B Partial" => "B-Partial", + "C None" => "C-None", + ); + + public static $interface = "not-specified,USB,Serial,Parallel,Firewire,SCSI,Ethernet"; + + public static function vendorsList() + { + return implode(',',array_values(self::$vendors)); + } + + public static function compatibilityList() + { + return implode(',',array_values(self::$compatibility)); + } + +} + +class Wifi extends hardware +{ + public static $vendors = array( + "A-LINK" => "A-LINK", + "Airlink101" => "Airlink101", + "Belkin" => "Belkin", + "Broadcom" => "Broadcom", + "CANYON" => "CANYON", + "D-Link" => "D-Link", + "Hawking" => "Hawking", + "LevelOne" => "LevelOne", + "Linksys" => "Linksys", + "NEC" => "NEC", + "Netgear" => "Netgear", + "Ralink" => "Ralink", + "TOSHIBA" => "TOSHIBA", + "TP-LINK" => "TP-LINK", + ); + + public static $interface = "not-specified,USB,PCI,PCI-E,mini-PCI,mini-PCI-E,ExpressCard,PC-Card"; + + public static $wifiSelect = 'yes,no'; + + public static function vendorsList() + { + return implode(',',array_values(self::$vendors)); + } +} + +class Videocard extends hardware +{ + public static $vendors = array( + "ATI" => "ATI", + "NVIDIA" => "NVIDIA", + "Intel" => "Intel", + ); + + public static $videoSelect = array( + "works with 3D acceleration" => "works_with_3D", + "works, but without 3D acceleration" => "works_without_3D", + ); + + public static $videoReverse = array( + "works_with_3D" => "works with 3D acceleration", + "works_without_3D" => "works, but without 3D acceleration", + ); + + public static $interface = "not-specified,PCI,AGP,PCI-E,ISA"; + + public static function vendorsList() + { + return implode(',',array_values(self::$vendors)); + } + + public static function videoList() + { + return implode(',',array_values(self::$videoSelect)); + } +} + + +class Notebooks extends Hardware +{ + + public static $vendors = array( + "Acer" => "Acer", + "Apple" => "Apple", + "Asus" => "Asus", + "Compal Electronics" => "Compal-Electronics", + "COMPAQ" => "COMPAQ", + "Dell" => "Dell", + "emachines" => "emachines", + "FUJITSU" => "FUJITSU", + "Gateway" => "Gateway", + "Hewlett Packard" => "Hewlett-Packard", + "IBM" => "IBM", + "Lenovo" => "Lenovo", + "LG" => "LG", + "Philips" => "Philips", + "Panasonic" => "Panasonic", + "Sony" => "Sony", + "SAMSUNG" => "SAMSUNG", + "Thomson" => "Thomson", + "TOSHIBA" => "TOSHIBA", + ); + + public static $compatibility = array( + "A Platinum" => "A-platinum", + "B Gold" => "B-gold", + "C Silver" => "C-silver", + "D Bronze" => "D-bronze", + "E Garbage" => "E-garbage" + ); + + public static $subtypeSelect = 'notebook,netbook,not-specified'; + + public static $videoSelect = array( + "not specified" => 'not-specified', + "yes, with 3D acceleration" => "yes_with_3D", + "yes, but without 3D acceleration" => "yes_without_3D", + "it does not work" => "no", + ); + + public static $videoReverse = array( + "yes_with_3D" => "works with 3D acceleration", + "yes_without_3D" => "works but without 3D acceleration", + "no" => "it does not work", + 'not-specified' => "not specified how it works", + "" => "" + ); + + public static $wifiSelect = array( + "not specified" => 'not-specified', + 'yes' => 'yes', + 'no' => 'no', + 'there is no wifi card' => 'no-wifi-card', + ); + + public static $wifiReverse = array( + "yes" => "it works", + "no" => "it does not work", + 'not-specified' => "not specified how it works", + 'no-wifi-card' => 'there is no wifi card', + "" => "" + ); + + public static function videoList() + { + return implode(',',array_values(self::$videoSelect)); + } + + public static function wifiList() + { + return implode(',',array_values(self::$wifiSelect)); + } + + public static function vendorsList() + { + return implode(',',array_values(self::$vendors)); + } + + public static function compatibilityList() + { + return implode(',',array_values(self::$compatibility)); + } + +} \ No newline at end of file -- cgit v1.2.3