prepare(DbUtils::substTableAlias($sql)); $stmt->execute(array("Admin",1,0,0,0,0,0,1,0,1,1,1,1,0,0,0,0,1,1)); $id = $pdo->lastInsertId(); return $id; } public static function insertDigiManagerRole($pdo) { $sql = "INSERT INTO %roles% (name," . "is_admin,right_waiter,right_kitchen,right_bar,right_supply,right_paydesk," . "right_statistics,right_bill,right_products,right_manager,right_closing," . "right_dash,right_reservation,right_rating,right_changeprice,right_customers,right_timetracking,right_timemanager) VALUES(" . "?,?,?,?,? ,?,?,?,?,?, ?,?,?,?,?, ?,?,?,?)"; $stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt->execute(array("Manager",0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)); $id = $pdo->lastInsertId(); return $id; } public static function insertWorkManagerRole($pdo) { $sql = "INSERT INTO %roles% (name," . "is_admin,right_waiter,right_kitchen,right_bar,right_supply,right_paydesk," . "right_statistics,right_bill,right_products,right_manager,right_closing," . "right_dash,right_reservation,right_rating,right_changeprice,right_customers,right_timetracking,right_timemanager) VALUES(" . "?,?,?,?,? ,?,?,?,?,?, ?,?,?,?,?, ?,?,?,?)"; $stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt->execute(array("Manager",0,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1)); $id = $pdo->lastInsertId(); return $id; } public static function insertDigiWaiterRole($pdo) { $sql = "INSERT INTO %roles% (name," . "is_admin,right_waiter,right_kitchen,right_bar,right_supply,right_paydesk," . "right_statistics,right_bill,right_products,right_manager,right_closing," . "right_dash,right_reservation,right_rating,right_changeprice,right_customers,right_timetracking,right_timemanager) VALUES(" . "?,?,?,?,? ,?,?,?,?,?, ?,?,?,?,?, ?,?,?,?)"; $stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt->execute(array("Kellner",0,1,1,1,1,1,0,1,0,0,1,0,1,0,1,0,1,0)); $id = $pdo->lastInsertId(); return $id; } public static function insertWorkWaiterRole($pdo) { $sql = "INSERT INTO %roles% (name," . "is_admin,right_waiter,right_kitchen,right_bar,right_supply,right_paydesk," . "right_statistics,right_bill,right_products,right_manager,right_closing," . "right_dash,right_reservation,right_rating,right_changeprice,right_customers,right_timetracking,right_timemanager) VALUES(" . "?,?,?,?,? ,?,?,?,?,?, ?,?,?,?,?, ?,?,?,?)"; $stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt->execute(array("Kellner",0,1,0,0,0,1,0,1,0,0,1,0,1,0,1,0,1,0)); $id = $pdo->lastInsertId(); return $id; } public static function insertCookRole($pdo) { $sql = "INSERT INTO %roles% (name," . "is_admin,right_waiter,right_kitchen,right_bar,right_supply,right_paydesk," . "right_statistics,right_bill,right_products,right_manager,right_closing," . "right_dash,right_reservation,right_rating,right_changeprice,right_customers,right_timetracking,right_timemanager) VALUES(" . "?,?,?,?,? ,?,?,?,?,?, ?,?,?,?,?, ?,?,?,?)"; $stmt = $pdo->prepare(DbUtils::substTableAlias($sql)); $stmt->execute(array("Koch",0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,0)); $id = $pdo->lastInsertId(); return $id; } }