-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
root
committed
Dec 20, 2011
1 parent
5795c55
commit 3b90140
Showing
8,753 changed files
with
386 additions
and
15 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,146 @@ | ||
<?php | ||
|
||
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap | ||
{ | ||
protected function _initTranslate() | ||
{ | ||
$registry = Zend_Registry::getInstance(); | ||
$locale = new Zend_Locale('en_US'); | ||
//$translate = new Zend_Translate('gettext', APPLICATION_PATH . DIRECTORY_SEPARATOR .'languages/en.mo', 'en_US'); | ||
//$translate->addTranslation( APPLICATION_PATH . DIRECTORY_SEPARATOR .'languages/nl.mo', 'nl_NL'); | ||
$registry->set('Zend_Locale', $locale); | ||
//$registry->set('Zend_Translate', $translate); | ||
return $registry; | ||
|
||
} | ||
|
||
protected function _initPdispatch() | ||
{ | ||
|
||
$this->bootstrap('frontController'); | ||
|
||
} | ||
require_once APPLICATION_PATH . '/controllers/plugin/LanguageSelector.php'; | ||
$plugin = new LanguageSelector(); | ||
|
||
$front = Zend_Controller_Front::getInstance(); | ||
$front->registerPlugin($plugin); | ||
return $plugin; | ||
} | ||
|
||
protected function _initHead() | ||
{ | ||
|
||
$this->bootstrap('view'); | ||
$view = $this->getResource('view'); | ||
$view->doctype('XHTML1_STRICT'); | ||
//$view->HeadScript()->appendFile('http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'); | ||
//$view->headLink()->appendStylesheet('/css/global.css'); | ||
$view->HeadScript()->appendFile('/js/jquery.min.js')->setIndent(8); | ||
$view->HeadScript()->appendFile('/js/jquery.ui.min.js')->setIndent(8); | ||
$view->HeadScript()->appendFile('/js/jquery.corner.js')->setIndent(8); | ||
$view->HeadScript()->appendFile('/js/jquery.shadow.pack.js')->setIndent(8); | ||
$view->HeadScript()->appendFile('/js/jquery.sparkline.min.js')->setIndent(8); | ||
//$view->HeadScript()->appendFile('/js/boot/vz.lib.js')->setIndent(8); | ||
//$view->HeadScript()->appendFile('/js/boot/frontpage.js')->setIndent(8); | ||
$view->HeadScript()->appendFile('/js/jquery.getimagedata.min.js'); | ||
|
||
ZendX_JQuery::enableView($view); | ||
|
||
|
||
|
||
/** | ||
* Global session tunneling | ||
* | ||
* | ||
*/ | ||
//Zend_Session::rememberMe(60); | ||
//Zend_Session::rememberMe(864000); | ||
Zend_Session::start(); | ||
|
||
$mysession = new Zend_Session_Namespace('mysession'); | ||
|
||
if (isset($mysession->rows['group'])) | ||
{ | ||
$view->member = $mysession->rows; | ||
$view->mydata = (object) $mysession->rows; | ||
$view->datas = (object) $view->member; | ||
// $view->mydata = (object) $view->member; | ||
$view->mydata = (object) $view->member; | ||
} | ||
|
||
} | ||
|
||
protected function _initAutoloading() | ||
{ | ||
|
||
$loader = new Zend_Loader_Autoloader_Resource(array( | ||
'basePath' => APPLICATION_PATH, | ||
'namespace' => 'My', | ||
)); | ||
$loader->addResourceType('form', 'forms', 'Form'); | ||
$loader->addResourceType('module','modules','Module'); | ||
} | ||
|
||
protected function _initRoutes() | ||
{ | ||
$front = Zend_Controller_Front::getInstance(); | ||
$router = $front->getRouter(); | ||
|
||
// http://localhost/public/a/123 is valid | ||
$dynamic = new Zend_Controller_Router_Route( | ||
'/a/:variable1', | ||
array( | ||
'controller' => 'index', | ||
'action' => 'index'), | ||
array('variable1' => '^[a-zA-Z0-9_]*$') | ||
); | ||
|
||
$static = new Zend_Controller_Router_Route_Static( | ||
'nice-looking-url-hello-world-seo', | ||
array( | ||
'controller' => 'index', | ||
'action' => 'add' | ||
)); | ||
|
||
$static1 = new Zend_Controller_Router_Route_Static( | ||
'/1/downloads.txt', | ||
array( | ||
'controller' => 'bart', | ||
'action' => 'ivvr' | ||
)); | ||
|
||
$regex = new Zend_Controller_Router_Route_Regex( | ||
'admin/(\d+)', | ||
array( | ||
'controller' => 'index', | ||
'action' => 'index' | ||
), | ||
array( | ||
1 => 'request' | ||
) | ||
); | ||
|
||
|
||
//http://www.test.be/blog/a/01-Usin.html | ||
$route = new Zend_Controller_Router_Route_Regex( | ||
'blog/a/(\d+)-(.+)\.html', | ||
array( | ||
'controller' => 'index', | ||
'action' => 'index' | ||
), | ||
array( | ||
1 => 'id', | ||
2 => 'description' | ||
), | ||
'blog/a/%d-%s.html' | ||
); | ||
|
||
// Add all of them | ||
$router->addRoute('dynamic', $dynamic); | ||
$router->addRoute('static' , $static); | ||
// IVVR | ||
$router->addRoute('static1' , $static1); | ||
$router->addRoute('regex' , $regex); | ||
$router->addRoute('blogArchive', $route); | ||
} | ||
|
||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,29 @@ | ||
[production] | ||
resources.view[] = | ||
resources.db.adapter = PDO_MYSQL | ||
resources.db.params.host = localhost | ||
resources.db.params.username = web145-mydb | ||
resources.db.params.password = | ||
resources.db.params.dbname = web145-mydb | ||
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/" | ||
resources.db.params.charset = "utf8" | ||
;resources.db.params.profiler.enabled = "true" | ||
;resources.db.params.profiler.class = "Zend_Db_Profiler_Firebug" | ||
phpSettings.display_startup_errors = 0 | ||
phpSettings.display_errors = 0 | ||
phpSettings.date.timezone = "Europe/Brussels" | ||
includePaths.library = APPLICATION_PATH "/../library" | ||
bootstrap.path = APPLICATION_PATH "/Bootstrap.php" | ||
bootstrap.class = "Bootstrap" | ||
appnamespace = "Application" | ||
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers" | ||
resources.frontController.params.displayExceptions = 0 | ||
|
||
ccemail = support@outside.com | ||
[staging : production] | ||
|
||
[testing : production] | ||
phpSettings.display_startup_errors = 1 | ||
phpSettings.display_errors = 1 | ||
|
||
[development : production] | ||
phpSettings.display_startup_errors = 1 | ||
phpSettings.display_errors = 1 | ||
resources.frontController.params.displayExceptions = 1 | ||
resources.frontController.params.displayExceptions = 1 |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php | ||
/** | ||
* Protocol Specification Version 0.2.2 | ||
* | ||
* This source file is subject to all the agents and customers | ||
* message protocol | ||
* Any updates for this protocol will make issue with Frontend | ||
* applications. | ||
* | ||
* Please change with your own risk. | ||
* Advised to backup first the working model. | ||
* | ||
* @category Community | ||
* @package Startagig | ||
* @copyright Copyright (c) 2011 Teleportel NV (http://www.teleportel.com) | ||
* @version 0.2.2 | ||
* | ||
* | ||
* Ref: | ||
* | ||
*/ | ||
class StartagigController extends Zend_Controller_Action | ||
{ | ||
|
||
/** | ||
* Centralized Database instance | ||
*/ | ||
private $db = null; | ||
/** | ||
* Centralized Data arival | ||
*/ | ||
private $data = null; | ||
|
||
/** | ||
* Startup protocol | ||
* | ||
* @uses Initialize all the controller packets header | ||
* allow the incoming GET/POST protocol requests to be instance | ||
* @return void | ||
*/ | ||
public function init() | ||
{ | ||
$this->_helper->layout()->disableLayout(); | ||
$this->_helper->viewRenderer->setNoRender(); | ||
$this->db = Application_Model_Db::db_load(); | ||
/** | ||
* Currently we are using GET not the POST protocol | ||
*/ | ||
//$post = $this->getRequest()->getPost(); | ||
$post = $this->getRequest()->getQuery(); | ||
$this->data = (object) $post; | ||
if ($this->view->member->group=='agent') { | ||
$this->data->username=$this->view->member->username; | ||
$this->data->password=$this->view->member->password; | ||
} | ||
|
||
unset ($post); | ||
|
||
|
||
} | ||
|
||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<?= $this->layout()->content; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!DOCTYPE html | ||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<?=$this->headTitle(); ?> | ||
<?=$this->headScript(); ?> | ||
<?=$this->headLink()->prependStylesheet('/css/global.css'); ?> | ||
</head> | ||
|
||
<body> | ||
<!-- default front page --> | ||
<div id="pagetop"> | ||
<?=$this->render('header.phtml'); ?> | ||
</div> | ||
|
||
<div id="page"> | ||
<div class="content"> | ||
<table class="layout_one"> | ||
<tr> | ||
<td> | ||
<?php echo $this->layout()->content; ?> | ||
</td> | ||
</tr> | ||
</table> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!DOCTYPE html | ||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<?=$this->headTitle(); ?> | ||
<?=$this->headScript(); ?> | ||
<?php | ||
|
||
if ($this->jQuery()->isEnabled()) { | ||
$this->jQuery()->setLocalPath('http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js') | ||
->enable() | ||
->setUiLocalPath('http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.0/jquery-ui.min.js') | ||
->uiEnable() | ||
->addStylesheet('http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/ui-lightness/jquery-ui.css'); | ||
echo $this->jQuery(); | ||
} | ||
?> | ||
|
||
<?= $this->headLink()->prependStylesheet('/css/global.css'); ?> | ||
</head> | ||
<body> | ||
<!-- default front page --> | ||
<div id="pagetop"> | ||
<?=$this->render('header_account.phtml'); ?> | ||
</div> | ||
|
||
<div id="page" > | ||
<div class="content"> | ||
<?= $this->layout()->content; ?> | ||
</div> | ||
</div> | ||
|
||
<div id="pagebottom"> | ||
<?=$this->render('footer.phtml'); ?> | ||
</div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!DOCTYPE html | ||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<?php echo $this->headTitle(); ?> | ||
<?php echo $this->headScript(); ?> | ||
<?php | ||
|
||
if ($this->jQuery()->isEnabled()) { | ||
$this->jQuery()->setLocalPath('http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js') | ||
->enable() | ||
->setUiLocalPath('http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.0/jquery-ui.min.js') | ||
->uiEnable() | ||
->addStylesheet('http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/ui-lightness/jquery-ui.css'); | ||
echo $this->jQuery(); | ||
} | ||
?> | ||
|
||
<?php echo $this->headLink()->prependStylesheet('/css/global.css'); ?> | ||
</head> | ||
|
||
<body> | ||
|
||
|
||
<?php echo $this->layout()->content; ?> | ||
|
||
|
||
|
||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html | ||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<?php echo $this->headTitle(); ?> | ||
<?php echo $this->headScript(); ?> | ||
<?php echo $this->headLink()->prependStylesheet('/css/global.css'); ?> | ||
</head> | ||
<body> | ||
<?=$this->layout()->content; ?> | ||
</body> | ||
</html> |
Oops, something went wrong.