The best way to learn how to use the WebCore is by example. See the documentation for more information.
The requested URL is always shown first; if a page uses one or more WebCore templates, those are shown afterwards.
Source for: https://www.earthli.com/recipes/log_in.php
Uses WebCore template(s):
00 <?php
01
02 /****************************************************************************
03
04 Copyright (c) 2002-2014 Marco Von Ballmoos
05
06 This file is part of earthli Recipes.
07
08 earthli Recipes is free software; you can redistribute it and/or modify
09 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 earthli Recipes is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with earthli Recipes; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
22 For more information about the earthli Recipes, visit:
23
24 http://www.earthli.com/software/webcore/recipes
25
26 ****************************************************************************/
27
28 require_once ('recipes/start.php');
29 require_once ($App->page_template_for ('webcore/pages/log_in.php'));
30 ?>
31
Source for template: webcore/pages/log_in.php
00 <?php
01
02 /****************************************************************************
03
04 Copyright (c) 2002-2014 Marco Von Ballmoos
05
06 This file is part of earthli WebCore.
07
08 earthli WebCore is free software; you can redistribute it and/or modify
09 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 earthli WebCore is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with earthli WebCore; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
22 For more information about the earthli WebCore, visit:
23
24 http://www.earthli.com/software/webcore
25
26 ****************************************************************************/
27
28 $class_name = $App->final_class_name ('LOG_IN_FORM', 'webcore/forms/log_in_form.php');
29 /** @var LOG_IN_FORM $form */
30 $form = new $class_name ($App);
31
32 $Page->title->subject = 'Log in';
33
34 $form->process_plain ();
35 if ($form->committed ())
36 {
37 $App->return_to_referer ('index.php');
38 }
39 else
40 {
41 if ($form->submitted ())
42 {
43 $Page->title->subject = 'Login Failed';
44 }
45 }
46
47 $Page->location->add_root_link ();
48 $Page->location->append ($App->resolve_icon_as_html ('{icons}buttons/login', Sixteen_px, ' ') . ' ' . $Page->title->subject);
49
50 $Page->start_display ();
51 ?>
52 <div class="main-box">
53 <div class="form-content">
54 <?php
55 $form->display ();
56 ?>
57 </div>
58 </div>
59 <?php
60 $Page->finish_display ();
61 ?>