File tree Expand file tree Collapse file tree 4 files changed +65
-5
lines changed Expand file tree Collapse file tree 4 files changed +65
-5
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ function __construct()
1212 public function index ()
1313 {
1414 $ data = array ();
15- $ data ['viewtitle ' ] = 'index at Pagetest ' ;
15+ $ data ['viewtitle ' ] = 'index at Indexhome index function ' ;
1616 $ this ->load ->view ('header.php ' ,$ data );
1717 $ this ->load ->view ('homesview.php ' ,$ data );
1818 $ this ->load ->view ('footer.php ' ,$ data );
@@ -21,7 +21,7 @@ public function index()
2121 public function testfunct ()
2222 {
2323 $ data = array ();
24- $ data ['viewtitle ' ] = 'testfunc at Pagetest ' ;
24+ $ data ['viewtitle ' ] = 'testfunc at Indexhome testfunct function ' ;
2525 $ this ->load ->view ('header.php ' ,$ data );
2626 $ this ->load ->view ('homesview.php ' ,$ data );
2727 $ this ->load ->view ('footer.php ' ,$ data );
Original file line number Diff line number Diff line change 1+ <?php if ( ! defined ('BASEPATH ' )) exit ('No direct script access allowed ' );
2+
3+ class Indexother extends CP_Controller {
4+
5+ function __construct ()
6+ {
7+ parent ::__construct ();
8+ $ this ->checksession ();
9+ }
10+
11+ /** http://127.0.0.1/codeigniterpower/index.php/indexcontroler/index */
12+ public function index ()
13+ {
14+ $ data = array ();
15+ $ data ['viewtitle ' ] = 'index at IndexOther at index ' ;
16+ $ this ->load ->view ('header.php ' ,$ data );
17+ $ this ->load ->view ('homesother.php ' ,$ data );
18+ $ this ->load ->view ('footer.php ' ,$ data );
19+ }
20+
21+ public function testfunct ()
22+ {
23+ $ data = array ();
24+ $ data ['viewtitle ' ] = 'testfunc at IndexOther at testfunct ' ;
25+ $ this ->load ->view ('header.php ' ,$ data );
26+ $ this ->load ->view ('homesother.php ' ,$ data );
27+ $ this ->load ->view ('footer.php ' ,$ data );
28+ }
29+ }
30+
31+ /* End of file welcome.php */
32+ /* Location: ./application/controllers/welcome.php */
Original file line number Diff line number Diff line change 1+ <h1>Welcome/Bienvenido a VNX Codeigniter</h1>
2+ <p >This is:</p>
3+ <?php
4+ $ userdata = $ this ->session ->userdata ('userdata ' );
5+
6+ echo br ().PHP_EOL ; // genera neuva linea en codigo html al navegador
7+ echo form_fieldset ('This is the view ' .$ viewtitle ,array ('class ' =>'containerin ' ) );
8+
9+ echo '<div class="row"><div class="col-sm-4 col-sm-offset-4"> ' ;
10+ foreach ($ userdata as $ ukey => $ value )
11+ {
12+ echo '<spawn class="btn btn-danger"> ' .$ ukey .'</spawn>: ' .$ value ;
13+ }
14+ echo '</div></div> ' ;
15+ echo form_fieldset_close () . PHP_EOL ;
16+
17+ echo 'Click here to test checksession on Home module/controller: ' .anchor ('Indexhome ' ,'<spawn class="btn btn-danger">Go to Indexhome</spawn> ' );
18+ echo br ();
19+ echo 'Click here to test checksession on same controller but textfunct method: ' .anchor ('Indexother/testfunct ' ,'<spawn class="btn btn-danger">indexother/testfunc</spawn> ' );
20+ echo br ();
21+ echo anchor ('Indexauth/auth/logout ' ,'<spawn class="btn btn-danger">Logout</spawn> ' );
22+
23+ ?>
Original file line number Diff line number Diff line change 55
66 echo br ().PHP_EOL ; // genera neuva linea en codigo html al navegador
77 echo form_fieldset ('This is the view ' .$ viewtitle ,array ('class ' =>'containerin ' ) );
8-
8+ echo ' User data from sesion checked: ' ;
99 echo '<div class="row"><div class="col-sm-4 col-sm-offset-4"> ' ;
1010 foreach ($ userdata as $ ukey => $ value )
1111 {
12- echo '<spawn class="btn btn-danger"> ' .$ ukey .'</spawn>: ' .$ value ;
12+ echo '<spawn class="btn btn-danger"> ' .$ ukey .'</spawn>: ' .$ value. br () ;
1313 }
1414 echo '</div></div> ' ;
15+ echo form_fieldset_close () . PHP_EOL ;
16+
17+ echo 'Click here to test checksession on other module/controller: ' .anchor ('Indexother ' ,'<spawn class="btn btn-danger">Go to indexother</spawn> ' );
18+ echo br ();
19+ echo 'Click here to test checksession on same controller but textfunct method: ' .anchor ('Indexhome/testfunct ' ,'<spawn class="btn btn-danger">testfunc method</spawn> ' );
20+ echo br ();
1521 echo anchor ('Indexauth/auth/logout ' ,'<spawn class="btn btn-danger">Logout</spawn> ' );
1622
17- echo form_fieldset_close () . PHP_EOL ;
1823 ?>
You can’t perform that action at this time.
0 commit comments