public static function getTemplateInfo($templateId)
 {
     $db = new DBconnection();
     $query = "SELECT * FROM " . self::getTableName() . " WHERE " . $db->getWherePart(self::getTableKeyField(), $templateId);
     $result = $db->selectQuery($query, self::getTableFields());
     return $result[0];
 }
 /**
  * return module id by search parameters
  *
  * @param Array $values
  * @return data array
  */
 public static function getModuleVisibility($values)
 {
     $db = new DBconnection();
     $query = "SELECT * FROM " . self::getTableName();
     $where = $db->getWherePart(self::getTableFields(), $values);
     if ($where != "") {
         $query .= " WHERE {$where}";
     }
     $query .= " ORDER BY `" . self::$fields["requestOrder"] . "`";
     $result = $db->selectQuery($query, self::getTableFields());
     return $result;
 }
 public static function login($login, $pass)
 {
     $values = array();
     $values["login"] = $login;
     $values["pass"] = $pass;
     $db = new DBconnection();
     $query = "SELECT * FROM " . self::getTableName() . " WHERE " . $db->getWherePart(self::getTableFields(), $values);
     $result = $db->selectQuery($query, self::getTableFields());
     if (isset($result[0])) {
         unset($result[0]["pass"]);
         return $result[0];
     }
     return null;
 }