"([0-9]+)", "%album_title%" => "([0-9a-zA-Z._\W]+)", "%photo_id%" => "([0-9]+)", "%photo_title%" => "([0-9a-zA-Z._\W]+)", "%rowstart%" => "([0-9]+)", "%c_start%" => "([0-9]+)", "%stype%" => "(p)", "%comment_id%" => "([0-9]+)", "%hash_stop%" => "\#(?=\s*|)" ]; $pattern = [ "submit-%stype%/photos" => "submit.php?stype=%stype%", "submit-%stype%/photos/submitted-and-thank-you" => "submit.php?stype=%stype%&submitted=p", "gallery/browse/%rowstart%" => "infusions/gallery/gallery.php?rowstart=%rowstart%", "gallery/browse/%album_id%/%rowstart%" => "infusions/gallery/gallery.php?album_id=%album_id%&rowstart=%rowstart%", "gallery/photo/comments-%c_start%/%photo_id%/%photo_title%" => "infusions/gallery/gallery.php?photo_id=%photo_id%&c_start=%c_start%", "gallery/photo/%photo_id%/%photo_title%" => "infusions/gallery/gallery.php?photo_id=%photo_id%", "gallery/%album_id%/%album_title%" => "infusions/gallery/gallery.php?album_id=%album_id%", "gallery" => "infusions/gallery/gallery.php" ]; $pattern_tables["%album_id%"] = [ "table" => DB_PHOTO_ALBUMS, "primary_key" => "album_id", "id" => ["%album_id%" => "album_id"], "columns" => [ "%album_title%" => "album_title" ] ]; $pattern_tables["%photo_id%"] = [ "table" => DB_PHOTOS, "primary_key" => "photo_id", "id" => ["%photo_id%" => "photo_id"], "columns" => [ "%photo_title%" => "photo_title" ] ];