# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. */ $_SERVER['SCRIPT_NAME'] !== "/controller.php" ? require_once __DIR__ . "/classes/Requires.php" : (Links::$pretty = true); //Get recipes $recipes = array(); $result = MySQLQueries::get_recipes(); while ($row = MySQLConnection::fetch_object($result)) { //Calculate Statistics $row->lines = substr_count($row->content, "\n") + 1; $row->length = Functions::format_bytes(strlen($row->content)); $recipes[$row->id] = $row; } //Get number of versions for all recipes $result = MySQLQueries::get_number_of_recipe_versions(); while ($row = MySQLConnection::fetch_object($result)) { $recipes[$row->id]->number_of_versions = $row->count; } $recipes = Functions::format_dates($recipes); Header::set_title("Commando.io - Recipes"); Header::render(); Navigation::render("recipes"); ?> <div class="container"> <h1 class="header">Recipes</h1> <div class="row"> <div class="span12">