Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

user reg is config flag now

  • Loading branch information...
commit a63735e8c311b91929acd43bc80f46fc8453e0e5 1 parent 813c3ba
@mgkimsal authored
View
2  application/controllers/AuthController.php
@@ -8,9 +8,9 @@ class AuthController extends Zend_Controller_Action
public function init()
{
+ parent::_init();
$this->view->pageTitle = "Log in";
$this->view->pageSubTitle = "";
- $this->_config = Zend_Registry::get("config");
}
public function indexAction()
View
5 application/controllers/ErrorController.php
@@ -3,6 +3,11 @@
class ErrorController extends Zend_Controller_Action
{
+ public function _init()
+ {
+ parent::_init();
+ }
+
public function errorAction()
{
View
3  application/controllers/IndexController.php
@@ -1,11 +1,12 @@
<?php
-class IndexController extends Zend_Controller_Action
+class IndexController extends Zk_Controller
{
public function init()
{
+ parent::_init();
// print_r( $this->_helper->_layout);
$this->view->pageTitle = "main";
/* Initialize action controller here */
View
42 application/controllers/MobileController.php
@@ -0,0 +1,42 @@
+<?php
+
+class MobileController extends Zend_Controller_Action
+{
+
+
+ public function init()
+ {
+ parent::_init();
+// print_r( $this->_helper->_layout);
+ $this->view->pageTitle = "mobile";
+ $this->_helper->_layout->setLayout("mobile");
+ /* Initialize action controller here */
+ }
+
+ public function indexAction()
+ {
+ }
+
+
+ public function aboutAction()
+ {
+
+//$u->addStatusMessage("3skckw1eg0j4n", "testing");
+//$u->update(array("id"=>"3skckw1eg0j4n", "isFeatured"=>true, "isBlocked"=>true));
+ }
+
+
+ public function contactAction()
+ {
+ }
+
+ public function tosAction()
+ {
+ }
+
+ public function privacyAction()
+ {
+ }
+}
+
+
View
3  application/controllers/RegisterController.php
@@ -5,8 +5,7 @@ class RegisterController extends Zend_Controller_Action
public function init()
{
- $this->_config = Zend_Registry::get("config");
- $this->session = new Zend_Session_Namespace("site");
+ parent::_init();
$this->view->pageTitle = "Register";
}
View
1  application/controllers/TestController.php
@@ -6,6 +6,7 @@ class TestController extends Zend_Controller_Action
public function init()
{
+ parent::_init();
/* Initialize action controller here */
}
View
8 application/layouts/scripts/main.phtml
@@ -12,6 +12,7 @@
<!-- Le styles -->
<script src="<?=$this->baseUrl();?>js/jquery-1.7.2.min.js"></script>
+ <link rel="stylesheet" href="<?=$this->baseUrl();?>bootstrap/css/bootstrap.min.css"/>
<link rel="stylesheet" href="<?=$this->baseUrl();?>css/<?=$this->theme;?>.bootstrap.min.css"/>
<link rel="stylesheet" href="<?=$this->baseUrl();?>css/05_main.css"/>
<script src="<?=$this->baseUrl();?>js/bootstrap-alert.js"></script>
@@ -34,6 +35,7 @@
<ul class="nav">
<li><a href="<?=$this->baseUrl();?>">Home</a></li>
</ul>
+<?php if($this->config['register']['usesUsers']==1) : ?>
<?php if(!$this->loggedIn()) : ?>
<form method="post" action="<?php echo $this->baseUrl();?>auth" class="pull-right topform">
<input class="topinput input-small" type="text" name="username" placeholder="Username">
@@ -48,6 +50,7 @@ Welcome <?php echo $this->loggedInAs()->username; ?>
&nbsp;
<a href="<?php echo $this->baseUrl();?>auth/logout">Log out</a>
<?php endif; ?>
+ <?php endif; ?>
</div>
</div>
@@ -63,7 +66,10 @@ Welcome <?php echo $this->loggedInAs()->username; ?>
</div>
<div class="row">
- <div class="span14">
+ <div class="span4">
+ MENU AREA
+ </div>
+ <div class="span8">
<?php echo $this->layout()->content; ?>
View
15 library/Zk/Controller.php
@@ -0,0 +1,15 @@
+<?php
+
+class Zk_Controller extends Zend_Controller_Action
+{
+
+ public function _init()
+ {
+ $this->_config = Zend_Registry::get("config");
+ $this->session = new Zend_Session_Namespace("site");
+ $this->view->config = $this->_config;
+ //Zend_Debug::dump($this->_config);die();
+ }
+
+
+}
Please sign in to comment.
Something went wrong with that request. Please try again.