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()
12
12
public function index ()
13
13
{
14
14
$ data = array ();
15
- $ data ['viewtitle ' ] = 'index at Pagetest ' ;
15
+ $ data ['viewtitle ' ] = 'index at Indexhome index function ' ;
16
16
$ this ->load ->view ('header.php ' ,$ data );
17
17
$ this ->load ->view ('homesview.php ' ,$ data );
18
18
$ this ->load ->view ('footer.php ' ,$ data );
@@ -21,7 +21,7 @@ public function index()
21
21
public function testfunct ()
22
22
{
23
23
$ data = array ();
24
- $ data ['viewtitle ' ] = 'testfunc at Pagetest ' ;
24
+ $ data ['viewtitle ' ] = 'testfunc at Indexhome testfunct function ' ;
25
25
$ this ->load ->view ('header.php ' ,$ data );
26
26
$ this ->load ->view ('homesview.php ' ,$ data );
27
27
$ 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 5
5
6
6
echo br ().PHP_EOL ; // genera neuva linea en codigo html al navegador
7
7
echo form_fieldset ('This is the view ' .$ viewtitle ,array ('class ' =>'containerin ' ) );
8
-
8
+ echo ' User data from sesion checked: ' ;
9
9
echo '<div class="row"><div class="col-sm-4 col-sm-offset-4"> ' ;
10
10
foreach ($ userdata as $ ukey => $ value )
11
11
{
12
- echo '<spawn class="btn btn-danger"> ' .$ ukey .'</spawn>: ' .$ value ;
12
+ echo '<spawn class="btn btn-danger"> ' .$ ukey .'</spawn>: ' .$ value. br () ;
13
13
}
14
14
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 ();
15
21
echo anchor ('Indexauth/auth/logout ' ,'<spawn class="btn btn-danger">Logout</spawn> ' );
16
22
17
- echo form_fieldset_close () . PHP_EOL ;
18
23
?>
You can’t perform that action at this time.
0 commit comments