Ejemplo n.º 1
0
 public static function codeToKey($code)
 {
     if (self::$temp == null) {
         self::$temp = explode("\n", self::$table);
     }
     foreach (self::$temp as $line) {
         $e = explode(",", $line);
         if ($e[1] == $code) {
             return $e[0];
         }
     }
     return null;
 }
Ejemplo n.º 2
0
 *  (at your option) any later version.
 *  fheME is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  2007 - 2012, Rainer Furtmeier - Rainer@Furtmeier.de
 */
if (isset($argv[1])) {
    $_GET["cloud"] = $argv[1];
}
if (isset($argv[2])) {
    $_SERVER["HTTP_HOST"] = $argv[2];
}
session_name("ExtConnEinkaufszettel");
require_once realpath(dirname(__FILE__) . "/../../system/connect.php");
$absolutePathToPhynx = realpath(dirname(__FILE__) . "/../../") . "/";
$e = new ExtConn($absolutePathToPhynx);
$e->addClassPath($absolutePathToPhynx . "/fheME/Einkaufszettel");
$e->addClassPath($absolutePathToPhynx . "/ubiquitous/openEAN");
$e->useDefaultMySQLData();
$e->useUser();
$data = explode(";", $_GET["data"]);
foreach ($data as $k => $v) {
    $data[$k] = LinuxKeycodes::codeToKey($v);
}
$E = new mEinkaufszettelGUI(-1);
$E->addEAN(strtolower(implode("", $data)), false);
$e->cleanUp();