Hi,
need help, now have a framework, with many modules, someone could help me with some idea how to migrate within each module within the yii, someone has done this before know where to start?
The current structure is that I have (briefly):
Quote
/config.php
/header.php
/footer.php
/class/dao_user.php
/class/dao_group.php
/lib/PEAR/pear.php
/lib/ajax/ajax.php
/lib/smarty/smarty.php
/themes/default/theme.php
/templates_c/
/modules/user/user.php
/modules/user/view/user.tpl
/modules/group/group.php
/modules/group/view/group.tpl
/modules/search/search.php
each module of the original file is like this:
include "../../config.php"; include_once ONE_PATH.'/classes/dao_user.php'; include_once ONE_MODULO_PATH.'/user/user.php'; $titulo="User config"; $ajaxClasse->printJavascript(ONE_AJAX_URL); //$p=page/action //$mod=module called $p=$_REQUEST['p']; $mod=$_REQUEST['mod']; if($p) { switch ($p) { case "eti" : $principal .=eti($_REQUEST'r_cod']); break; } } $oneSmarty->assign("principal","$principal"); include "../../header.php"; $oneSmarty->display(ONE_PATH."/page.tpl"); include "../../footer.php";
the config.php
call another file for defines and includes libs and start ajax, smarty, etc
like this:
define("CACHE_DIR", ONE_ROOT_PATH."/cache"); define("UPLOAD_DIR", ONE_ROOT_PATH."/uploads"); more deifnes... /************************************************************ * carregando ajax * ************************************************************/ $ajaxClasse = new xajax(); $ajaxClasse->setCharEncoding("ISO-8859-1"); $ajaxClasse->errorHandlerOn(); /************************************************************ * carregando conexao ao db * ************************************************************/ $one = &ADONewConnection(ONE_DB_TYPE); $one->PConnect(ONE_DB_HOST, ONE_DB_USER, ONE_DB_PASS,ONE_DB_NAME); $one->SetFetchMode(ADODB_FETCH_ASSOC); global $oneDB; $db=new Database(ONE_DB_HOST,ONE_DB_NAME,ONE_DB_USER,ONE_DB_PASS); $db->get_error(); global $db;
well, I would like to exchange ideas with has the same problem or who want to help / make a suggestion, any idea to migrate to the yiiframework
greetings
Max